The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Use existing shared helpers instead of local copies in front (#27429)
Félix Malfaitc1165fa33f98
diff --git a/packages/twenty-front/src/hooks/__tests__/useCombinedRefs.test.ts b/packages/twenty-front/src/hooks/__tests__/useCombinedRefs.test.tsdeleted file mode 100644index df15d7ae1c2..00000000000--- a/packages/twenty-front/src/hooks/__tests__/useCombinedRefs.test.ts+++ /dev/null@@ -1,23 +0,0 @@-import React from 'react';-import { renderHook } from '@testing-library/react';--import { useCombinedRefs } from '~/hooks/useCombinedRefs';--describe('useCombinedRefs', () => {- it('should combine refs', () => {- const { result } = renderHook(() => {- const ref1 = React.useRef<string>(null);- const ref2 = React.useRef<string>(null);- const refCallback = useCombinedRefs(ref1, ref2);-- React.useEffect(() => {- refCallback('test');- }, [refCallback]);-- return [ref1, ref2];- });-- expect(result.current[0].current).toBe('test');- expect(result.current[1].current).toBe('test');- });-});diff --git a/packages/twenty-front/src/hooks/useCombinedRefs.ts b/packages/twenty-front/src/hooks/useCombinedRefs.tsdeleted file mode 100644index dc514cd84a7..00000000000--- a/packages/twenty-front/src/hooks/useCombinedRefs.ts+++ /dev/null@@ -1,6 +0,0 @@-import { type Ref, type RefCallback } from 'react';-import { combineRefs } from '~/utils/combineRefs';--export const useCombinedRefs = <T>(- ...refs: (Ref<T> | undefined)[]-): RefCallback<T> => combineRefs<T>(...refs);diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/components/EventRow.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/components/EventRow.tsxindex fff83364a4d..55ed767c2d6 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/components/EventRow.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/components/EventRow.tsx@@ -1,7 +1,6 @@import { styled } from '@linaria/react';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useContext } from 'react';-import { TimelineActivityContext } from '@/activities/timeline-activities/contexts/TimelineActivityContext';import { TIMELINE_ICON_SLOT_SIZE } from '@/activities/timeline-activities/constants/TimelineIconSlotSize';@@ -22,7 +21,6 @@ import { recordStoreFamilyState } from '@/object-record/record-store/states/recoimport { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';import { themeCssVariables } from 'twenty-ui/theme';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { allowRequestsToTwentyIconsState } from '@/client-config/states/allowRequestsToTwentyIcons';import { frontComponentsSelector } from '@/front-components/states/frontComponentsSelector';import { isDefined } from 'twenty-shared/utils';@@ -153,14 +151,14 @@ export const EventRow = ({objectMetadataItems,}) ?? null;- if (isUndefinedOrNull(currentWorkspaceMember)) {+ if (!isDefined(currentWorkspaceMember)) {return null;}- if (isUndefinedOrNull(recordStore)) {+ if (!isDefined(recordStore)) {return null;}- if (isUndefinedOrNull(mainObjectMetadataItem)) {+ if (!isDefined(mainObjectMetadataItem)) {return null;}diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent.tsxindex 253fa097558..c13ff964757 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent.tsx@@ -21,7 +21,6 @@ import {formatToHumanReadableMonth,formatToHumanReadableTime,} from '~/utils/format/formatDate';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';const StyledEventCardCalendarEventContainer = styled.div`cursor: pointer;@@ -157,7 +156,7 @@ export const EventCardCalendarEvent = ({return <CalendarEventNotSharedContent />;}- if (isUndefinedOrNull(calendarEvent.startsAt)) {+ if (!isDefined(calendarEvent.startsAt)) {return <div>{t`Calendar event has no start date`}</div>;}diff --git a/packages/twenty-front/src/modules/ai/utils/__tests__/formatRecordReference.test.ts b/packages/twenty-front/src/modules/ai/utils/__tests__/formatRecordReference.test.tsdeleted file mode 100644index 2ab63543de3..00000000000--- a/packages/twenty-front/src/modules/ai/utils/__tests__/formatRecordReference.test.ts+++ /dev/null@@ -1,13 +0,0 @@-import { formatRecordReference } from '@/ai/utils/formatRecordReference';--describe('formatRecordReference', () => {- it('should close the reference with ]]', () => {- expect(- formatRecordReference({- objectNameSingular: 'company',- recordId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',- displayName: 'Acme',- }),- ).toBe('[[record:company:a1b2c3d4-e5f6-7890-abcd-ef1234567890:Acme]]');- });-});diff --git a/packages/twenty-front/src/modules/ai/utils/formatRecordReference.ts b/packages/twenty-front/src/modules/ai/utils/formatRecordReference.tsdeleted file mode 100644index 04ac9e55ace..00000000000--- a/packages/twenty-front/src/modules/ai/utils/formatRecordReference.ts+++ /dev/null@@ -1 +0,0 @@-export { formatRecordReference } from 'twenty-shared/ai';diff --git a/packages/twenty-front/src/modules/app/hooks/useInitializeQueryParamState.ts b/packages/twenty-front/src/modules/app/hooks/useInitializeQueryParamState.tsindex 4d3bec7da34..510f2f530ac 100644--- a/packages/twenty-front/src/modules/app/hooks/useInitializeQueryParamState.ts+++ b/packages/twenty-front/src/modules/app/hooks/useInitializeQueryParamState.ts@@ -5,8 +5,8 @@ import { returnToPathState } from '@/auth/states/returnToPathState';import { type BillingCheckoutSession } from '@/auth/types/BillingCheckoutSession';import { isValidReturnToPath } from '@/auth/utils/isValidReturnToPath';import { BILLING_CHECKOUT_SESSION_DEFAULT_VALUE } from '@/settings/billing/constants/BillingCheckoutSessionDefaultValue';-import deepEqual from 'deep-equal';import { useStore } from 'jotai';+import { isDeeplyEqual } from '~/utils/isDeeplyEqual';export const useInitializeQueryParamState = () => {const store = useStore();@@ -26,7 +26,7 @@ export const useInitializeQueryParamState = () => {'plan' in parsedValue &&'interval' in parsedValue &&'requirePaymentMethod' in parsedValue &&- !deepEqual(billingCheckoutSession, parsedValue)+ !isDeeplyEqual(billingCheckoutSession, parsedValue)) {store.set(billingCheckoutSessionState.atom,diff --git a/packages/twenty-front/src/modules/blocknote-editor/blocks/FileBlock.tsx b/packages/twenty-front/src/modules/blocknote-editor/blocks/FileBlock.tsxindex 78165ceba45..51304967b83 100644--- a/packages/twenty-front/src/modules/blocknote-editor/blocks/FileBlock.tsx+++ b/packages/twenty-front/src/modules/blocknote-editor/blocks/FileBlock.tsx@@ -2,7 +2,6 @@ import { createReactBlockSpec } from '@blocknote/react';import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import { type ChangeEvent, useRef } from 'react';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { themeCssVariables } from 'twenty-ui/theme';import { type AttachmentFileCategory } from '@/activities/files/types/AttachmentFileCategory';@@ -60,7 +59,7 @@ export const FileBlock = createReactBlockSpec(const inputFileRef = useRef<HTMLInputElement>(null);const handleUploadAttachment = async (file: File) => {- if (isUndefinedOrNull(file)) {+ if (!isDefined(file)) {return '';}const fileUrl = await editor.uploadFile?.(file);diff --git a/packages/twenty-front/src/modules/blocknote-editor/utils/getFirstNonEmptyLineOfRichText.ts b/packages/twenty-front/src/modules/blocknote-editor/utils/getFirstNonEmptyLineOfRichText.tsindex 9cbe1f690c9..4db11d0f4d5 100644--- a/packages/twenty-front/src/modules/blocknote-editor/utils/getFirstNonEmptyLineOfRichText.ts+++ b/packages/twenty-front/src/modules/blocknote-editor/utils/getFirstNonEmptyLineOfRichText.ts@@ -1,5 +1,5 @@import type { PartialBlock } from '@blocknote/core';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { isDefined } from 'twenty-shared/utils';export const getFirstNonEmptyLineOfRichText = (blocks: PartialBlock[] | null,@@ -8,7 +8,7 @@ export const getFirstNonEmptyLineOfRichText = (return '';}for (const block of blocks) {- if (!isUndefinedOrNull(block.content)) {+ if (isDefined(block.content)) {const contentArray = Array.isArray(block.content)? (block.content as Array<{ text: string } | { link: string }>): [block.content as { text: string } | { link: string } | string];diff --git a/packages/twenty-front/src/modules/client-config/hooks/useCaptcha.ts b/packages/twenty-front/src/modules/client-config/hooks/useCaptcha.tsindex b7dc1eed023..b6ae123f92c 100644--- a/packages/twenty-front/src/modules/client-config/hooks/useCaptcha.ts+++ b/packages/twenty-front/src/modules/client-config/hooks/useCaptcha.ts@@ -4,7 +4,6 @@ import { captchaState } from '@/client-config/states/captchaState';import { clientConfigApiStatusState } from '@/client-config/states/clientConfigApiStatusState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { isDefined } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';export const useCaptcha = () => {const captcha = useAtomStateValue(captchaState);@@ -21,7 +20,7 @@ export const useCaptcha = () => {return {isCaptchaScriptLoaded,- isCaptchaConfigured: !isUndefinedOrNull(captcha),+ isCaptchaConfigured: isDefined(captcha),isCaptchaReady,};};diff --git a/packages/twenty-front/src/modules/command-menu-item/display/hooks/useCommandMenuAppActions.ts b/packages/twenty-front/src/modules/command-menu-item/display/hooks/useCommandMenuAppActions.tsindex 411fc754890..f87a7e65ca7 100644--- a/packages/twenty-front/src/modules/command-menu-item/display/hooks/useCommandMenuAppActions.ts+++ b/packages/twenty-front/src/modules/command-menu-item/display/hooks/useCommandMenuAppActions.ts@@ -11,7 +11,7 @@ import { sidePanelSearchState } from '@/side-panel/states/sidePanelSearchState';import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';import { isSelectOptionMatchingSearch } from '@/ui/input/components/internal/select/utils/isSelectOptionMatchingSearch';import { useColorScheme } from '@/ui/theme/hooks/useColorScheme';-import { useIsMobile } from 'twenty-ui/utilities';+import { normalizeSearchText, useIsMobile } from 'twenty-ui/utilities';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';@@ -22,7 +22,6 @@ import { useContext } from 'react';import { IconCode, IconCopy, IconTerminal } from 'twenty-ui/icon';import { FeatureFlagKey } from '~/generated-metadata/graphql';import { useCopyToClipboard } from '~/hooks/useCopyToClipboard';-import { normalizeSearchText } from '~/utils/normalizeSearchText';export const useCommandMenuAppActions = () => {const { t } = useLingui();diff --git a/packages/twenty-front/src/modules/command-menu-item/edit/components/SidePanelCommandMenuItemEditPage.tsx b/packages/twenty-front/src/modules/command-menu-item/edit/components/SidePanelCommandMenuItemEditPage.tsxindex b8ed8595566..6854f26c5d7 100644--- a/packages/twenty-front/src/modules/command-menu-item/edit/components/SidePanelCommandMenuItemEditPage.tsx+++ b/packages/twenty-front/src/modules/command-menu-item/edit/components/SidePanelCommandMenuItemEditPage.tsx@@ -32,7 +32,7 @@ import {import { ButtonGroup } from 'twenty-ui/primitives/input';import { themeCssVariables } from 'twenty-ui/theme';import { type CommandMenuItemFieldsFragment } from '~/generated-metadata/graphql';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/dashboards/graphql/fragments/pageLayoutTabFragment.ts b/packages/twenty-front/src/modules/dashboards/graphql/fragments/pageLayoutTabFragment.tsindex dec02833be9..4364ef70285 100644--- a/packages/twenty-front/src/modules/dashboards/graphql/fragments/pageLayoutTabFragment.ts+++ b/packages/twenty-front/src/modules/dashboards/graphql/fragments/pageLayoutTabFragment.ts@@ -1,4 +1,4 @@-import { PAGE_LAYOUT_WIDGET_FRAGMENT } from '@/dashboards/graphql/fragments/pageLayoutWidgetFragment';+import { PAGE_LAYOUT_WIDGET_FRAGMENT } from '@/page-layout/graphql/fragments/pageLayoutWidgetFragment';import { gql } from '@apollo/client';export const PAGE_LAYOUT_TAB_FRAGMENT = gql`diff --git a/packages/twenty-front/src/modules/dashboards/graphql/fragments/pageLayoutWidgetFragment.ts b/packages/twenty-front/src/modules/dashboards/graphql/fragments/pageLayoutWidgetFragment.tsdeleted file mode 100644index deb139d212f..00000000000--- a/packages/twenty-front/src/modules/dashboards/graphql/fragments/pageLayoutWidgetFragment.ts+++ /dev/null@@ -1 +0,0 @@-export { PAGE_LAYOUT_WIDGET_FRAGMENT } from '@/page-layout/graphql/fragments/pageLayoutWidgetFragment';diff --git a/packages/twenty-front/src/modules/marketplace/utils/buildPermissionSummaryFromRoleManifest.ts b/packages/twenty-front/src/modules/marketplace/utils/buildPermissionSummaryFromRoleManifest.tsindex 7bf26bae43f..55fd0918f9c 100644--- a/packages/twenty-front/src/modules/marketplace/utils/buildPermissionSummaryFromRoleManifest.ts+++ b/packages/twenty-front/src/modules/marketplace/utils/buildPermissionSummaryFromRoleManifest.ts@@ -1,5 +1,5 @@import { type RoleManifest } from 'twenty-shared/application';-import { isDefined } from 'twenty-shared/utils';+import { capitalize, isDefined } from 'twenty-shared/utils';import {type IconComponent,IconAddressBook,@@ -54,7 +54,7 @@ export const buildPermissionSummaryFromRoleManifest = (items.push({Icon: IconAddressBook,- label: label.charAt(0).toUpperCase() + label.slice(1) + ' records',+ label: capitalize(label) + ' records',});}diff --git a/packages/twenty-front/src/modules/mention/extensions/MentionTag.ts b/packages/twenty-front/src/modules/mention/extensions/MentionTag.tsindex 770b1d9e549..9ce21274428 100644--- a/packages/twenty-front/src/modules/mention/extensions/MentionTag.ts+++ b/packages/twenty-front/src/modules/mention/extensions/MentionTag.ts@@ -1,7 +1,7 @@-import { formatRecordReference } from '@/ai/utils/formatRecordReference';import { MentionChip } from '@/mention/components/MentionChip';import { Node } from '@tiptap/core';import { mergeAttributes, ReactNodeViewRenderer } from '@tiptap/react';+import { formatRecordReference } from 'twenty-shared/ai';export const MentionTag = Node.create({name: 'mentionTag',diff --git a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemAddDropdownContent.tsx b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemAddDropdownContent.tsxindex 310fae8f321..5369e8c39e7 100644--- a/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemAddDropdownContent.tsx+++ b/packages/twenty-front/src/modules/navigation-menu-item/edit/components/NavigationMenuItemAddDropdownContent.tsx@@ -17,7 +17,7 @@ import {useNavigationMenuItemEditController,type NewNavigationMenuItemInput,} from '@/navigation-menu-item/edit/hooks/useNavigationMenuItemEditController';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const VIEW_OBJECT_PAGE = 'view-object';diff --git a/packages/twenty-front/src/modules/object-core/commands/hooks/useCoreObjectsCommands.ts b/packages/twenty-front/src/modules/object-core/commands/hooks/useCoreObjectsCommands.tsindex 6c7e9baa327..8e47ff5dfac 100644--- a/packages/twenty-front/src/modules/object-core/commands/hooks/useCoreObjectsCommands.ts+++ b/packages/twenty-front/src/modules/object-core/commands/hooks/useCoreObjectsCommands.ts@@ -21,7 +21,7 @@ import { PermissionFlagType } from 'twenty-shared/constants';import { sidePanelSearchState } from '@/side-panel/states/sidePanelSearchState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';export const useCoreObjectsCommands = () => {const { t } = useLingui();diff --git a/packages/twenty-front/src/modules/object-metadata/hooks/useSortSubFieldChoicesForField.ts b/packages/twenty-front/src/modules/object-metadata/hooks/useSortSubFieldChoicesForField.tsindex f1204b9fe07..017884c7b81 100644--- a/packages/twenty-front/src/modules/object-metadata/hooks/useSortSubFieldChoicesForField.ts+++ b/packages/twenty-front/src/modules/object-metadata/hooks/useSortSubFieldChoicesForField.ts@@ -1,7 +1,4 @@import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';-import { getEnabledAddressSubFields } from '@/object-metadata/utils/getEnabledAddressSubFields';-import { resolveAddressSortSubField } from '@/object-metadata/utils/resolveAddressSortSubField';-import { resolvePrimaryFullNameSortSubField } from '@/object-metadata/utils/resolvePrimaryFullNameSortSubField';import { useLingui } from '@lingui/react/macro';import { ALLOWED_FULL_NAME_SORT_SUBFIELDS } from 'twenty-shared/constants';import {@@ -10,6 +7,11 @@ import {type FieldMetadataSettingsMapping,} from 'twenty-shared/types';import { FieldMetadataType } from '~/generated-metadata/graphql';+import {+ getEnabledAddressSubFields,+ resolveAddressSortSubField,+ resolvePrimaryFullNameSortSubField,+} from 'twenty-shared/utils';export type SortSubFieldChoice = {value: string;diff --git a/packages/twenty-front/src/modules/object-metadata/utils/__tests__/getOrderByForRelationField.test.ts b/packages/twenty-front/src/modules/object-metadata/utils/__tests__/getOrderByForRelationField.test.tsindex 90ffe68230b..b70c92b9b6b 100644--- a/packages/twenty-front/src/modules/object-metadata/utils/__tests__/getOrderByForRelationField.test.ts+++ b/packages/twenty-front/src/modules/object-metadata/utils/__tests__/getOrderByForRelationField.test.ts@@ -1,6 +1,6 @@import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';-import { getOrderByForRelationField } from '@/object-metadata/utils/getOrderByForFieldMetadataType';+import { getOrderByForRelationField } from '@/object-metadata/utils/getOrderByForRelationField';import { FieldMetadataType } from '~/generated-metadata/graphql';describe('getOrderByForRelationField', () => {diff --git a/packages/twenty-front/src/modules/object-metadata/utils/getEnabledAddressSubFields.ts b/packages/twenty-front/src/modules/object-metadata/utils/getEnabledAddressSubFields.tsdeleted file mode 100644index e5b6f354022..00000000000--- a/packages/twenty-front/src/modules/object-metadata/utils/getEnabledAddressSubFields.ts+++ /dev/null@@ -1 +0,0 @@-export { getEnabledAddressSubFields } from 'twenty-shared/utils';diff --git a/packages/twenty-front/src/modules/object-metadata/utils/getObjectOrderByField.ts b/packages/twenty-front/src/modules/object-metadata/utils/getObjectOrderByField.tsindex c25a91d75ee..870a0042978 100644--- a/packages/twenty-front/src/modules/object-metadata/utils/getObjectOrderByField.ts+++ b/packages/twenty-front/src/modules/object-metadata/utils/getObjectOrderByField.ts@@ -1,12 +1,11 @@import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';import { getLabelIdentifierFieldMetadataItem } from '@/object-metadata/utils/getLabelIdentifierFieldMetadataItem';-import { getOrderByForFieldMetadataType } from '@/object-metadata/utils/getOrderByForFieldMetadataType';import {type OrderBy,type RecordGqlOperationOrderBy,} from 'twenty-shared/types';-import { isDefined } from 'twenty-shared/utils';+import { getOrderByForFieldMetadataType, isDefined } from 'twenty-shared/utils';export const getOrderByFieldForObjectMetadataItem = (objectMetadataItem: EnrichedObjectMetadataItem,diff --git a/packages/twenty-front/src/modules/object-metadata/utils/getOrderByForFieldMetadataType.ts b/packages/twenty-front/src/modules/object-metadata/utils/getOrderByForRelationField.tssimilarity index 93%rename from packages/twenty-front/src/modules/object-metadata/utils/getOrderByForFieldMetadataType.tsrename to packages/twenty-front/src/modules/object-metadata/utils/getOrderByForRelationField.tsindex b1dcefd4688..a11cb15ebe8 100644--- a/packages/twenty-front/src/modules/object-metadata/utils/getOrderByForFieldMetadataType.ts+++ b/packages/twenty-front/src/modules/object-metadata/utils/getOrderByForRelationField.ts@@ -7,8 +7,6 @@ import {} from 'twenty-shared/types';import { getOrderByForRelationField as computeRelationOrderBy } from 'twenty-shared/utils';-export { getOrderByForFieldMetadataType } from 'twenty-shared/utils';-export const getOrderByForRelationField = ({field,relatedObjectMetadataItem,diff --git a/packages/twenty-front/src/modules/object-metadata/utils/resolveAddressSortSubField.ts b/packages/twenty-front/src/modules/object-metadata/utils/resolveAddressSortSubField.tsdeleted file mode 100644index 829736a1e5d..00000000000--- a/packages/twenty-front/src/modules/object-metadata/utils/resolveAddressSortSubField.ts+++ /dev/null@@ -1 +0,0 @@-export { resolveAddressSortSubField } from 'twenty-shared/utils';diff --git a/packages/twenty-front/src/modules/object-metadata/utils/resolvePrimaryFullNameSortSubField.ts b/packages/twenty-front/src/modules/object-metadata/utils/resolvePrimaryFullNameSortSubField.tsdeleted file mode 100644index 9ec1cca0af0..00000000000--- a/packages/twenty-front/src/modules/object-metadata/utils/resolvePrimaryFullNameSortSubField.ts+++ /dev/null@@ -1 +0,0 @@-export { resolvePrimaryFullNameSortSubField } from 'twenty-shared/utils';diff --git a/packages/twenty-front/src/modules/object-metadata/utils/shouldFieldBeQueried.ts b/packages/twenty-front/src/modules/object-metadata/utils/shouldFieldBeQueried.tsindex de8e60838d1..a21b9bacf81 100644--- a/packages/twenty-front/src/modules/object-metadata/utils/shouldFieldBeQueried.ts+++ b/packages/twenty-front/src/modules/object-metadata/utils/shouldFieldBeQueried.ts@@ -1,6 +1,5 @@import { type RecordGqlOperationGqlRecordFields } from 'twenty-shared/types';import { type ObjectRecord } from '@/object-record/types/ObjectRecord';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { getRelationIdFieldNames } from '@/object-metadata/utils/getRelationIdFieldNames';import { isFieldMorphRelation } from '@/object-record/record-field/ui/types/guards/isFieldMorphRelation';@@ -26,14 +25,14 @@ export const shouldFieldBeQueried = ({getRelationIdFieldNames(fieldMetadata).includes(gqlField);if (- isUndefinedOrNull(recordGqlFields) &&+ !isDefined(recordGqlFields) &&!isFieldRelation(fieldMetadata) &&!isFieldMorphRelation(fieldMetadata)) {return true;}- if (isUndefinedOrNull(recordGqlFields) && isJoinColumn) {+ if (!isDefined(recordGqlFields) && isJoinColumn) {return true;}diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelContainer.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelContainer.tsxindex 1f8de832e1f..90afeaa692f 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelContainer.tsx@@ -7,7 +7,7 @@ import { useChildRecordFiltersAndRecordFilterGroups } from '@/object-record/advaimport { AdvancedFilterContext } from '@/object-record/advanced-filter/states/context/AdvancedFilterContext';import { rootLevelRecordFilterGroupComponentSelector } from '@/object-record/advanced-filter/states/rootLevelRecordFilterGroupComponentSelector';import { isRecordFilterGroupChildARecordFilterGroup } from '@/object-record/advanced-filter/utils/isRecordFilterGroupChildARecordFilterGroup';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { styled } from '@linaria/react';import { isDefined } from 'twenty-shared/utils';diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/states/context/AdvancedFilterContext.ts b/packages/twenty-front/src/modules/object-record/advanced-filter/states/context/AdvancedFilterContext.tsindex 3a4b86c417d..c2f74c7e5cb 100644--- a/packages/twenty-front/src/modules/object-record/advanced-filter/states/context/AdvancedFilterContext.ts+++ b/packages/twenty-front/src/modules/object-record/advanced-filter/states/context/AdvancedFilterContext.ts@@ -1,5 +1,5 @@import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { createContext } from 'react';type AdvancedFilterContextType = {diff --git a/packages/twenty-front/src/modules/object-record/cache/utils/getRecordFromCache.ts b/packages/twenty-front/src/modules/object-record/cache/utils/getRecordFromCache.tsindex 68add84af16..423ba6a697c 100644--- a/packages/twenty-front/src/modules/object-record/cache/utils/getRecordFromCache.ts+++ b/packages/twenty-front/src/modules/object-record/cache/utils/getRecordFromCache.ts@@ -7,8 +7,7 @@ import { type RecordGqlFields } from '@/object-record/graphql/record-gql-fields/import { generateDepthRecordGqlFieldsFromObject } from '@/object-record/graphql/record-gql-fields/utils/generateDepthRecordGqlFieldsFromObject';import { type ObjectRecord } from '@/object-record/types/ObjectRecord';import { type ObjectPermissions } from 'twenty-shared/types';-import { capitalize, isEmptyObject } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { capitalize, isDefined, isEmptyObject } from 'twenty-shared/utils';export type GetRecordFromCacheArgs = {cache: ApolloCache;@@ -32,7 +31,7 @@ export const getRecordFromCache = <T extends ObjectRecord = ObjectRecord>({recordGqlFields,objectPermissionsByObjectMetadataId,}: GetRecordFromCacheArgs) => {- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return null;}@@ -68,7 +67,7 @@ export const getRecordFromCache = <T extends ObjectRecord = ObjectRecord>({returnPartialData: true,});- if (isUndefinedOrNull(record) || isEmptyObject(record)) {+ if (!isDefined(record) || isEmptyObject(record)) {return null;}diff --git a/packages/twenty-front/src/modules/object-record/cache/utils/getRecordFromRecordNode.ts b/packages/twenty-front/src/modules/object-record/cache/utils/getRecordFromRecordNode.tsindex 426a507ed26..6bd4da8ac40 100644--- a/packages/twenty-front/src/modules/object-record/cache/utils/getRecordFromRecordNode.ts+++ b/packages/twenty-front/src/modules/object-record/cache/utils/getRecordFromRecordNode.ts@@ -2,7 +2,6 @@ import { getRecordsFromRecordConnection } from '@/object-record/cache/utils/getRimport { type RecordGqlNode } from '@/object-record/graphql/types/RecordGqlNode';import { type ObjectRecord } from '@/object-record/types/ObjectRecord';import { isDefined } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';export const getRecordFromRecordNode = <T extends ObjectRecord>({recordNode,@@ -15,7 +14,7 @@ export const getRecordFromRecordNode = <T extends ObjectRecord>({...Object.fromEntries(Object.entries(recordNode).map(([fieldName, value]) => {if (- isUndefinedOrNull(value) ||+ !isDefined(value) ||Array.isArray(value) ||typeof value !== 'object') {diff --git a/packages/twenty-front/src/modules/object-record/cache/utils/modifyRecordFromCache.ts b/packages/twenty-front/src/modules/object-record/cache/utils/modifyRecordFromCache.tsindex f43c8f8eb6d..707e970c79a 100644--- a/packages/twenty-front/src/modules/object-record/cache/utils/modifyRecordFromCache.ts+++ b/packages/twenty-front/src/modules/object-record/cache/utils/modifyRecordFromCache.ts@@ -2,8 +2,7 @@ import { type ApolloCache, type Modifiers } from '@apollo/client/cache';import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';import { type ObjectRecord } from '@/object-record/types/ObjectRecord';-import { capitalize } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { capitalize, isDefined } from 'twenty-shared/utils';export const modifyRecordFromCache = <CachedObjectRecord extends ObjectRecord = ObjectRecord,@@ -18,7 +17,7 @@ export const modifyRecordFromCache = <fieldModifiers: Modifiers<CachedObjectRecord>;recordId: string;}) => {- if (isUndefinedOrNull(objectMetadataItem)) return;+ if (!isDefined(objectMetadataItem)) return;const cachedRecordId = cache.identify({__typename: capitalize(objectMetadataItem.nameSingular),diff --git a/packages/twenty-front/src/modules/object-record/cache/utils/updateRecordFromCache.ts b/packages/twenty-front/src/modules/object-record/cache/utils/updateRecordFromCache.tsindex afde362351f..7d1dac82e9d 100644--- a/packages/twenty-front/src/modules/object-record/cache/utils/updateRecordFromCache.ts+++ b/packages/twenty-front/src/modules/object-record/cache/utils/updateRecordFromCache.ts@@ -8,8 +8,7 @@ import { type RecordGqlFields } from '@/object-record/graphql/record-gql-fields/import { type RecordGqlNode } from '@/object-record/graphql/types/RecordGqlNode';import { type ObjectRecord } from '@/object-record/types/ObjectRecord';import { type ObjectPermissions } from 'twenty-shared/types';-import { capitalize } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { capitalize, isDefined } from 'twenty-shared/utils';export const updateRecordFromCache = <T extends ObjectRecord>({objectMetadataItems,@@ -29,7 +28,7 @@ export const updateRecordFromCache = <T extends ObjectRecord>({ObjectPermissions & { objectMetadataId: string }>;}) => {- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return null;}@@ -58,7 +57,7 @@ export const updateRecordFromCache = <T extends ObjectRecord>({record,});- if (isUndefinedOrNull(recordWithConnection)) {+ if (!isDefined(recordWithConnection)) {return;}diff --git a/packages/twenty-front/src/modules/object-record/graphql/types/RecordGqlConnection.ts b/packages/twenty-front/src/modules/object-record/graphql/types/RecordGqlConnection.tsindex 3e228342417..2bebda56cb6 100644--- a/packages/twenty-front/src/modules/object-record/graphql/types/RecordGqlConnection.ts+++ b/packages/twenty-front/src/modules/object-record/graphql/types/RecordGqlConnection.ts@@ -1,5 +1,5 @@import { type RecordGqlEdge } from '@/object-record/graphql/types/RecordGqlEdge';-import { type Nullable } from 'twenty-ui/utilities';+import { type Nullable } from 'twenty-shared/types';export type RecordGqlConnection = {__typename?: string;diff --git a/packages/twenty-front/src/modules/object-record/hooks/useCreateManyRecordsMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useCreateManyRecordsMutation.tsindex 97fba15dfad..2d8c47ada2a 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useCreateManyRecordsMutation.ts+++ b/packages/twenty-front/src/modules/object-record/hooks/useCreateManyRecordsMutation.ts@@ -8,8 +8,7 @@ import { EMPTY_MUTATION } from '@/object-record/constants/EmptyMutation';import { type RecordGqlOperationGqlRecordFields } from 'twenty-shared/types';import { useObjectPermissions } from '@/object-record/hooks/useObjectPermissions';import { getCreateManyRecordsMutationResponseField } from '@/object-record/utils/getCreateManyRecordsMutationResponseField';-import { capitalize } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { capitalize, isDefined } from 'twenty-shared/utils';export const useCreateManyRecordsMutation = ({objectNameSingular,@@ -26,7 +25,7 @@ export const useCreateManyRecordsMutation = ({const objectMetadataItems = useAtomStateValue(objectMetadataItemsSelector);- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return { createManyRecordsMutation: EMPTY_MUTATION };}diff --git a/packages/twenty-front/src/modules/object-record/hooks/useCreateOneRecordMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useCreateOneRecordMutation.tsindex 8f88c2ea13c..ac16cf1031d 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useCreateOneRecordMutation.ts+++ b/packages/twenty-front/src/modules/object-record/hooks/useCreateOneRecordMutation.ts@@ -5,7 +5,7 @@ import { generateCreateOneRecordMutation } from '@/object-metadata/utils/generatimport { EMPTY_MUTATION } from '@/object-record/constants/EmptyMutation';import { type RecordGqlOperationGqlRecordFields } from 'twenty-shared/types';import { useObjectPermissions } from '@/object-record/hooks/useObjectPermissions';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { isDefined } from 'twenty-shared/utils';export const useCreateOneRecordMutation = ({objectNameSingular,@@ -22,7 +22,7 @@ export const useCreateOneRecordMutation = ({const { objectPermissionsByObjectMetadataId } = useObjectPermissions();- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return { createOneRecordMutation: EMPTY_MUTATION };}diff --git a/packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecordsMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecordsMutation.tsindex e8d9773a67a..16845aaec82 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecordsMutation.ts+++ b/packages/twenty-front/src/modules/object-record/hooks/useDeleteManyRecordsMutation.ts@@ -3,8 +3,7 @@ import gql from 'graphql-tag';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { EMPTY_MUTATION } from '@/object-record/constants/EmptyMutation';import { getDeleteManyRecordsMutationResponseField } from '@/object-record/utils/getDeleteManyRecordsMutationResponseField';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';-import { capitalize } from 'twenty-shared/utils';+import { capitalize, isDefined } from 'twenty-shared/utils';export const useDeleteManyRecordsMutation = ({objectNameSingular,@@ -15,7 +14,7 @@ export const useDeleteManyRecordsMutation = ({objectNameSingular,});- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return { deleteManyRecordsMutation: EMPTY_MUTATION };}diff --git a/packages/twenty-front/src/modules/object-record/hooks/useDeleteOneRecordMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useDeleteOneRecordMutation.tsindex c3d81e9cf3e..6542a9bf0d4 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useDeleteOneRecordMutation.ts+++ b/packages/twenty-front/src/modules/object-record/hooks/useDeleteOneRecordMutation.ts@@ -4,8 +4,7 @@ import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataimport { mapSoftDeleteFieldsToGraphQLQuery } from '@/object-metadata/utils/mapSoftDeleteFieldsToGraphQLQuery';import { EMPTY_MUTATION } from '@/object-record/constants/EmptyMutation';import { getDeleteOneRecordMutationResponseField } from '@/object-record/utils/getDeleteOneRecordMutationResponseField';-import { capitalize } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { capitalize, isDefined } from 'twenty-shared/utils';export const useDeleteOneRecordMutation = ({objectNameSingular,@@ -16,7 +15,7 @@ export const useDeleteOneRecordMutation = ({objectNameSingular,});- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return { deleteOneRecordMutation: EMPTY_MUTATION };}diff --git a/packages/twenty-front/src/modules/object-record/hooks/useDestroyManyRecordsMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useDestroyManyRecordsMutation.tsindex f8bff6efa50..c45a7f5638d 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useDestroyManyRecordsMutation.ts+++ b/packages/twenty-front/src/modules/object-record/hooks/useDestroyManyRecordsMutation.ts@@ -3,8 +3,7 @@ import gql from 'graphql-tag';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { EMPTY_MUTATION } from '@/object-record/constants/EmptyMutation';import { getDestroyManyRecordsMutationResponseField } from '@/object-record/utils/getDestroyManyRecordsMutationResponseField';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';-import { capitalize } from 'twenty-shared/utils';+import { capitalize, isDefined } from 'twenty-shared/utils';export const useDestroyManyRecordsMutation = ({objectNameSingular,@@ -15,7 +14,7 @@ export const useDestroyManyRecordsMutation = ({objectNameSingular,});- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return { destroyManyRecordsMutation: EMPTY_MUTATION };}diff --git a/packages/twenty-front/src/modules/object-record/hooks/useDestroyOneRecordMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useDestroyOneRecordMutation.tsindex 8e68d75fb40..e8ef6781fcd 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useDestroyOneRecordMutation.ts+++ b/packages/twenty-front/src/modules/object-record/hooks/useDestroyOneRecordMutation.ts@@ -3,8 +3,7 @@ import gql from 'graphql-tag';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { EMPTY_MUTATION } from '@/object-record/constants/EmptyMutation';import { getDestroyOneRecordMutationResponseField } from '@/object-record/utils/getDestroyOneRecordMutationResponseField';-import { capitalize } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { capitalize, isDefined } from 'twenty-shared/utils';export const useDestroyOneRecordMutation = ({objectNameSingular,@@ -15,7 +14,7 @@ export const useDestroyOneRecordMutation = ({objectNameSingular,});- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return { destroyOneRecordMutation: EMPTY_MUTATION };}diff --git a/packages/twenty-front/src/modules/object-record/hooks/useMergeManyRecordsMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useMergeManyRecordsMutation.tsindex 6cee6851709..e15e60969fe 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useMergeManyRecordsMutation.ts+++ b/packages/twenty-front/src/modules/object-record/hooks/useMergeManyRecordsMutation.ts@@ -9,8 +9,7 @@ import { useGenerateDepthRecordGqlFieldsFromObject } from '@/object-record/graphimport { type RecordGqlOperationGqlRecordFields } from 'twenty-shared/types';import { useObjectPermissions } from '@/object-record/hooks/useObjectPermissions';import { getMergeManyRecordsMutationResponseField } from '@/object-record/utils/getMergeManyRecordsMutationResponseField';-import { capitalize } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { capitalize, isDefined } from 'twenty-shared/utils';export const useMergeManyRecordsMutation = ({objectNameSingular,@@ -34,7 +33,7 @@ export const useMergeManyRecordsMutation = ({const { objectPermissionsByObjectMetadataId } = useObjectPermissions();- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return { mergeManyRecordsMutation: EMPTY_MUTATION };}diff --git a/packages/twenty-front/src/modules/object-record/hooks/useRestoreManyRecordsMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useRestoreManyRecordsMutation.tsindex fc8c9567435..04ef9ba910c 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useRestoreManyRecordsMutation.ts+++ b/packages/twenty-front/src/modules/object-record/hooks/useRestoreManyRecordsMutation.ts@@ -3,8 +3,7 @@ import gql from 'graphql-tag';import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { EMPTY_MUTATION } from '@/object-record/constants/EmptyMutation';import { getRestoreManyRecordsMutationResponseField } from '@/object-record/utils/getRestoreManyRecordsMutationResponseField';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';-import { capitalize } from 'twenty-shared/utils';+import { capitalize, isDefined } from 'twenty-shared/utils';export const useRestoreManyRecordsMutation = ({objectNameSingular,@@ -15,7 +14,7 @@ export const useRestoreManyRecordsMutation = ({objectNameSingular,});- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return { restoreManyRecordsMutation: EMPTY_MUTATION };}diff --git a/packages/twenty-front/src/modules/object-record/hooks/useUpdateManyRecordsMutation.ts b/packages/twenty-front/src/modules/object-record/hooks/useUpdateManyRecordsMutation.tsindex 29c05ae0ab4..e23bb38c5d6 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useUpdateManyRecordsMutation.ts+++ b/packages/twenty-front/src/modules/object-record/hooks/useUpdateManyRecordsMutation.ts@@ -1,7 +1,7 @@import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { generateUpdateManyRecordsMutation } from '@/object-metadata/utils/generateUpdateManyRecordsMutation';import { EMPTY_MUTATION } from '@/object-record/constants/EmptyMutation';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { isDefined } from 'twenty-shared/utils';export const useUpdateManyRecordsMutation = ({objectNameSingular,@@ -12,7 +12,7 @@ export const useUpdateManyRecordsMutation = ({objectNameSingular,});- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return { updateManyRecordsMutation: EMPTY_MUTATION };}diff --git a/packages/twenty-front/src/modules/object-record/object-sort-dropdown/utils/turnSortsIntoOrderBy.ts b/packages/twenty-front/src/modules/object-record/object-sort-dropdown/utils/turnSortsIntoOrderBy.tsindex 6c55f3e4ae9..e139c7ecc3c 100644--- a/packages/twenty-front/src/modules/object-record/object-sort-dropdown/utils/turnSortsIntoOrderBy.ts+++ b/packages/twenty-front/src/modules/object-record/object-sort-dropdown/utils/turnSortsIntoOrderBy.ts@@ -5,15 +5,11 @@ import {type RecordGqlOperationOrderBy,} from 'twenty-shared/types';import { mapArrayToObject } from '~/utils/array/mapArrayToObject';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';-import {- getOrderByForFieldMetadataType,- getOrderByForRelationField,-} from '@/object-metadata/utils/getOrderByForFieldMetadataType';+import { getOrderByForRelationField } from '@/object-metadata/utils/getOrderByForRelationField';import { hasObjectMetadataItemPositionField } from '@/object-metadata/utils/hasObjectMetadataItemPositionField';import { type RecordSort } from '@/object-record/record-sort/types/RecordSort';-import { isDefined } from 'twenty-shared/utils';+import { getOrderByForFieldMetadataType, isDefined } from 'twenty-shared/utils';import {FieldMetadataType,ViewSortDirection,@@ -32,7 +28,7 @@ export const turnSortsIntoOrderBy = (.map((sort) => {const correspondingField = fieldsById[sort.fieldMetadataId];- if (isUndefinedOrNull(correspondingField)) {+ if (!isDefined(correspondingField)) {return undefined;}diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/components/FormFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/components/FormFieldInput.tsxindex 0c39da1c1fa..72b736dd0ce 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/components/FormFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/components/FormFieldInput.tsx@@ -24,7 +24,7 @@ import { FormSelectFieldInput } from '@/object-record/record-field/ui/form-typesimport { FormTextFieldInput } from '@/object-record/record-field/ui/form-types/components/FormTextFieldInput';import { FormUuidFieldInput } from '@/object-record/record-field/ui/form-types/components/FormUuidFieldInput';import { type FormFieldInputSettings } from '@/object-record/record-field/ui/form-types/types/FormFieldInputSettings';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FieldDefinition } from '@/object-record/record-field/ui/types/FieldDefinition';import {type FieldAddressValue,diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormAddressFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormAddressFieldInput.tsxindex a8a5353d11f..21aba16c06d 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormAddressFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormAddressFieldInput.tsx@@ -2,7 +2,7 @@ import { FormCountrySelectInput } from '@/object-record/record-field/ui/form-typimport { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputContainer';import { FormNestedFieldInputContainer } from '@/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer';import { FormTextFieldInput } from '@/object-record/record-field/ui/form-types/components/FormTextFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FieldAddressDraftValue } from '@/object-record/record-field/ui/types/FieldInputDraftValue';import { type FieldAddressValue } from '@/object-record/record-field/ui/types/FieldMetadata';import { Field } from 'twenty-ui/primitives/input';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsxindex d0d92094bff..5369a1f3c9e 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormArrayFieldInput.tsx@@ -3,7 +3,7 @@ import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/foimport { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { FormFieldPlaceholder } from '@/object-record/record-field/ui/form-types/components/FormFieldPlaceholder';import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { ArrayFieldMenuItem } from '@/object-record/record-field/ui/meta-types/input/components/ArrayFieldMenuItem';import { MultiItemBaseInput } from '@/object-record/record-field/ui/meta-types/input/components/MultiItemBaseInput';import { type FieldArrayValue } from '@/object-record/record-field/ui/types/FieldMetadata';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldInput.tsxindex 680f76437d1..8bd5831ddbb 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormBooleanFieldInput.tsx@@ -2,7 +2,7 @@ import { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputConimport { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer';import { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { Field } from 'twenty-ui/primitives/input';import { Select } from '@/ui/input/components/Select';import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCallingCodeSelectInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCallingCodeSelectInput.tsxindex a08128be9cf..38a1358a005 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCallingCodeSelectInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCallingCodeSelectInput.tsx@@ -1,7 +1,7 @@import { useMemo } from 'react';import { FormSelectFieldInput } from '@/object-record/record-field/ui/form-types/components/FormSelectFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { useCountries } from '@/ui/input/components/internal/hooks/useCountries';import { isStandaloneVariableString } from 'twenty-shared/workflow';import { t } from '@lingui/core/macro';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCountryMultiSelectInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCountryMultiSelectInput.tsxindex 0e527fed5fa..cd47a4b8f80 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCountryMultiSelectInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCountryMultiSelectInput.tsx@@ -1,7 +1,7 @@import { useMemo } from 'react';import { FormMultiSelectFieldInput } from '@/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FieldMultiSelectValue } from '@/object-record/record-field/ui/types/FieldMetadata';import { useCountries } from '@/ui/input/components/internal/hooks/useCountries';import { type IconComponentProps } from 'twenty-ui/icon';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCountrySelectInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCountrySelectInput.tsxindex 58bde6e6e70..22170e84276 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCountrySelectInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCountrySelectInput.tsx@@ -2,7 +2,7 @@ import { t } from '@lingui/core/macro';import { useMemo } from 'react';import { FormSelectFieldInput } from '@/object-record/record-field/ui/form-types/components/FormSelectFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { useCountries } from '@/ui/input/components/internal/hooks/useCountries';import { IconCircleOff, type IconComponentProps } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCurrencyFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCurrencyFieldInput.tsxindex 33abd1915dd..661ca519e13 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCurrencyFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormCurrencyFieldInput.tsx@@ -4,7 +4,7 @@ import { FormNestedFieldInputContainer } from '@/object-record/record-field/ui/fimport { FormCurrencyAmountFieldInput } from '@/object-record/record-field/ui/form-types/components/FormCurrencyAmountFieldInput';import { FormSelectFieldInput } from '@/object-record/record-field/ui/form-types/components/FormSelectFieldInput';import { type FormFieldCurrencyInputSettings } from '@/object-record/record-field/ui/form-types/types/FormFieldCurrencyInputSettings';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FormFieldCurrencyValue } from '@/object-record/record-field/ui/types/FieldMetadata';import { CURRENCIES } from '@/settings/data-model/constants/Currencies';import { Field } from 'twenty-ui/primitives/input';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsxindex 79ce8f6b789..62f6e9924ed 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateFieldInput.tsx@@ -2,7 +2,7 @@ import { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputConimport { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer';import { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { Field } from 'twenty-ui/primitives/input';import { DatePicker } from '@/ui/input/components/internal/date/components/DatePicker';import { DatePickerInput } from '@/ui/input/components/internal/date/components/DatePickerInput';@@ -28,7 +28,7 @@ import { Temporal } from 'temporal-polyfill';import { Key } from 'ts-key-enum';import { isDefined } from 'twenty-shared/utils';import { themeCssVariables } from 'twenty-ui/theme';-import { type Nullable } from 'twenty-ui/utilities';+import { type Nullable } from 'twenty-shared/types';const FORM_DATE_FIELD_PICKER_CLICK_OUTSIDE_ID ='form-date-field-picker-floating';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsxindex 9c9f87aee9e..be72d610a29 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormDateTimeFieldInput.tsx@@ -2,7 +2,7 @@ import { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputConimport { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer';import { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { Field } from 'twenty-ui/primitives/input';import { DateTimePicker } from '@/ui/input/components/internal/date/components/DateTimePicker';import { DateTimePickerInput } from '@/ui/input/components/internal/date/components/DateTimePickerInput';@@ -28,7 +28,7 @@ import { useId, useRef, useState } from 'react';import { Temporal } from 'temporal-polyfill';import { Key } from 'ts-key-enum';import { isDefined } from 'twenty-shared/utils';-import { type Nullable } from 'twenty-ui/utilities';+import { type Nullable } from 'twenty-shared/types';const FORM_DATE_TIME_FIELD_PICKER_CLICK_OUTSIDE_ID ='form-date-time-field-picker-floating';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormEmailsFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormEmailsFieldInput.tsxindex b2f24eb36a1..5467808e140 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormEmailsFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormEmailsFieldInput.tsx@@ -1,7 +1,7 @@import { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputContainer';import { FormNestedFieldInputContainer } from '@/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer';import { FormTextFieldInput } from '@/object-record/record-field/ui/form-types/components/FormTextFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FieldEmailsValue } from '@/object-record/record-field/ui/types/FieldMetadata';import { Field } from 'twenty-ui/primitives/input';import { useLingui } from '@lingui/react/macro';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFilesFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFilesFieldInput.tsxindex dc49131e2d5..2b21a9f27da 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFilesFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFilesFieldInput.tsx@@ -3,7 +3,7 @@ import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/foimport { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { TextVariableEditor } from '@/object-record/record-field/ui/form-types/components/TextVariableEditor';import { useTextVariableEditor } from '@/object-record/record-field/ui/form-types/hooks/useTextVariableEditor';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { Field } from 'twenty-ui/primitives/input';import { t } from '@lingui/core/macro';import { useId } from 'react';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFullNameFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFullNameFieldInput.tsxindex 08ff2a1b93e..bb490cdfe27 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFullNameFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormFullNameFieldInput.tsx@@ -2,7 +2,7 @@ import { t } from '@lingui/core/macro';import { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputContainer';import { FormNestedFieldInputContainer } from '@/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer';import { FormTextFieldInput } from '@/object-record/record-field/ui/form-types/components/FormTextFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { FIRST_NAME_PLACEHOLDER_WITH_SPECIAL_CHARACTER_TO_AVOID_PASSWORD_MANAGERS } from '@/object-record/record-field/ui/meta-types/input/constants/FirstNamePlaceholder';import { LAST_NAME_PLACEHOLDER_WITH_SPECIAL_CHARACTER_TO_AVOID_PASSWORD_MANAGERS } from '@/object-record/record-field/ui/meta-types/input/constants/LastNamePlaceholder';import { type FieldFullNameValue } from '@/object-record/record-field/ui/types/FieldMetadata';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormLinksFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormLinksFieldInput.tsxindex bb047374151..577d1938d74 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormLinksFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormLinksFieldInput.tsx@@ -1,7 +1,7 @@import { FormArrayFieldInput } from '@/object-record/record-field/ui/form-types/components/FormArrayFieldInput';import { FormNestedFieldInputContainer } from '@/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer';import { FormTextFieldInput } from '@/object-record/record-field/ui/form-types/components/FormTextFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FieldLinksDraftValue } from '@/object-record/record-field/ui/types/FieldInputDraftValue';import {type FieldArrayValue,diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMorphRelationToOneFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMorphRelationToOneFieldInput.tsxindex db294d32aff..de5c32ab877 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMorphRelationToOneFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMorphRelationToOneFieldInput.tsx@@ -10,7 +10,7 @@ import {type RecordId,type Variable,} from '@/object-record/record-field/ui/form-types/types/RecordPickerValue';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { ForbiddenFieldDisplay } from '@/object-record/record-field/ui/meta-types/display/components/ForbiddenFieldDisplay';import { Field } from 'twenty-ui/primitives/input';import { styled } from '@linaria/react';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordPicker.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordPicker.tsxindex 627938f57db..503566ac16b 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordPicker.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiRecordPicker.tsx@@ -7,7 +7,7 @@ import {type RecordId,type Variable,} from '@/object-record/record-field/ui/form-types/types/RecordPickerValue';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import {type FormMultiRecordPickerDraftValue,getFormMultiRecordPickerDraftValue,diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsxindex b524e05a23c..440ce7ce6f0 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput.tsx@@ -6,7 +6,7 @@ import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/foimport { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { FormFieldPlaceholder } from '@/object-record/record-field/ui/form-types/components/FormFieldPlaceholder';import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FieldMultiSelectValue } from '@/object-record/record-field/ui/types/FieldMetadata';import { MultiSelectDisplay } from '@/ui/field/display/components/MultiSelectDisplay';import { MultiSelectInput } from '@/ui/field/input/components/MultiSelectInput';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiTextFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiTextFieldInput.tsxindex f7479e5e546..e931f00636f 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiTextFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormMultiTextFieldInput.tsx@@ -3,7 +3,7 @@ import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/foimport { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { TextVariableEditor } from '@/object-record/record-field/ui/form-types/components/TextVariableEditor';import { useMultiItemFieldEditor } from '@/object-record/record-field/ui/form-types/hooks/useMultiItemFieldEditor';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { Field } from 'twenty-ui/primitives/input';import { parseMultiItemEditorContent } from '@/workflow/workflow-variables/utils/parseMultiItemEditorContent';import { t } from '@lingui/core/macro';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormNumberFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormNumberFieldInput.tsxindex 5f5c6a83e74..65eaa1ecece 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormNumberFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormNumberFieldInput.tsx@@ -2,7 +2,7 @@ import { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputConimport { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer';import { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { StyledTextInput } from '@/ui/field/input/components/TextInput';import { Field } from 'twenty-ui/primitives/input';import { isStandaloneVariableString } from 'twenty-shared/workflow';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormPhoneFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormPhoneFieldInput.tsxindex 4155a09dc7a..c274e22ce03 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormPhoneFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormPhoneFieldInput.tsx@@ -5,7 +5,7 @@ import {import { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputContainer';import { FormNestedFieldInputContainer } from '@/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer';import { FormTextFieldInput } from '@/object-record/record-field/ui/form-types/components/FormTextFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FieldPhonesValue } from '@/object-record/record-field/ui/types/FieldMetadata';import { Field } from 'twenty-ui/primitives/input';import { t } from '@lingui/core/macro';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRawJsonFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRawJsonFieldInput.tsxindex d03fba71348..301e98e65d1 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRawJsonFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRawJsonFieldInput.tsx@@ -4,7 +4,7 @@ import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/foimport { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { TextVariableEditor } from '@/object-record/record-field/ui/form-types/components/TextVariableEditor';import { useTextVariableEditor } from '@/object-record/record-field/ui/form-types/hooks/useTextVariableEditor';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { Field } from 'twenty-ui/primitives/input';import { useId } from 'react';import { isDefined } from 'twenty-shared/utils';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelationToOneFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelationToOneFieldInput.tsxindex c3ca00de5ab..c1e0f837076 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelationToOneFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRelationToOneFieldInput.tsx@@ -1,5 +1,5 @@import { FormSingleRecordPicker } from '@/object-record/record-field/ui/form-types/components/FormSingleRecordPicker';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import {type FieldRelationToOneValue,type FieldRelationValue,diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRichTextFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRichTextFieldInput.tsxindex 5679fbb180e..b1f3027a7b2 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRichTextFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormRichTextFieldInput.tsx@@ -1,6 +1,6 @@import { FormAdvancedTextFieldInput } from '@/advanced-text-editor/components/FormAdvancedTextFieldInput';import { RECORD_RICH_TEXT_EDITOR_PROFILE } from '@/object-record/record-field/ui/form-types/constants/RecordRichTextEditorProfile';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FieldRichTextValue } from '@/object-record/record-field/ui/types/FieldMetadata';import { convertTipTapDocumentToBlockNote } from '@/object-record/record-field/ui/form-types/utils/convertTipTapDocumentToBlockNote';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsxindex a1ebc47876d..5ff2426a626 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSelectFieldInput.tsx@@ -1,7 +1,7 @@import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer';import { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputContainer';import { Select } from '@/ui/input/components/Select';import { type SelectCallToActionButton } from '@/ui/input/types/SelectCallToActionButton';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsxindex 64491b47cac..fe409aaf081 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormSingleRecordPicker.tsx@@ -7,7 +7,7 @@ import {type RecordId,type Variable,} from '@/object-record/record-field/ui/form-types/types/RecordPickerValue';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { SingleRecordPicker } from '@/object-record/record-picker/single-record-picker/components/SingleRecordPicker';import { singleRecordPickerSearchFilterComponentState } from '@/object-record/record-picker/single-record-picker/states/singleRecordPickerSearchFilterComponentState';import { singleRecordPickerSelectedIdComponentState } from '@/object-record/record-picker/single-record-picker/states/singleRecordPickerSelectedIdComponentState';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormTextFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormTextFieldInput.tsxindex 44d2d65f34b..17bade69ff4 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormTextFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormTextFieldInput.tsx@@ -4,7 +4,7 @@ import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/foimport { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { TextVariableEditor } from '@/object-record/record-field/ui/form-types/components/TextVariableEditor';import { useTextVariableEditor } from '@/object-record/record-field/ui/form-types/hooks/useTextVariableEditor';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { Field } from 'twenty-ui/primitives/input';import { parseEditorContent } from '@/workflow/workflow-variables/utils/parseEditorContent';import { useId } from 'react';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormUuidFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormUuidFieldInput.tsxindex 31910d346f5..8a6ae4e138b 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormUuidFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormUuidFieldInput.tsx@@ -2,7 +2,7 @@ import { FormFieldInputContainer } from '@/ui/input/components/FormFieldInputConimport { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputInnerContainer';import { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { VariableChipStandalone } from '@/object-record/record-field/ui/form-types/components/VariableChipStandalone';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { StyledTextInput } from '@/ui/field/input/components/TextInput';import { Field } from 'twenty-ui/primitives/input';import { isStandaloneVariableString } from 'twenty-shared/workflow';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInput.tsxindex eee167d4495..3a070f93dff 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInput.tsx@@ -14,7 +14,7 @@ import { FormFieldInputInnerContainer } from '@/object-record/record-field/ui/foimport { FormFieldInputRowContainer } from '@/object-record/record-field/ui/form-types/components/FormFieldInputRowContainer';import { FormWorkspaceMemberFilterValueInputDropdownContent } from '@/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputDropdownContent';import { FormWorkspaceMemberFilterValueInputTrigger } from '@/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputTrigger';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import {buildWorkspaceMemberFilterJsonValue,type ParsedWorkspaceMemberFilterValue,diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputDropdownContent.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputDropdownContent.tsxindex d6e267eaf6f..e5a7849960f 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputDropdownContent.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/components/FormWorkspaceMemberFilterValueInputDropdownContent.tsx@@ -9,7 +9,7 @@ import { CURRENT_WORKSPACE_MEMBER_SELECTABLE_ITEM_ID } from '@/object-record/objimport { type SelectableItem } from '@/object-record/select/types/SelectableItem';import { SelectOptionIcon } from '@/ui/input/components/SelectOptionIcon';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';type FormWorkspaceMemberFilterValueInputDropdownContentProps = {searchFilter: string;diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/types/VariablePickerComponent.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/types/VariablePickerComponent.tsdeleted file mode 100644index 5449c21f363..00000000000--- a/packages/twenty-front/src/modules/object-record/record-field/ui/form-types/types/VariablePickerComponent.ts+++ /dev/null@@ -1 +0,0 @@-export type { VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/CurrencyFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/CurrencyFieldInput.tsxindex d97b0bd69cf..aaedf12c2e3 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/CurrencyFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/CurrencyFieldInput.tsx@@ -4,7 +4,6 @@ import { isNonEmptyString } from '@sniptt/guards';import { type FieldCurrencyValue } from '@/object-record/record-field/ui/types/FieldMetadata';import { CurrencyInput } from '@/ui/field/input/components/CurrencyInput';import { CurrencyCode } from 'twenty-shared/constants';-import { useCurrencyField } from '@/object-record/record-field/ui/meta-types/hooks/useCurrencyField';import { FieldInputEventContext } from '@/object-record/record-field/ui/contexts/FieldInputEventContext';@@ -15,7 +14,7 @@ import { isFieldCurrencyValue } from '@/object-record/record-field/ui/types/guarimport { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { useContext } from 'react';import { convertCurrencyAmountToCurrencyMicros } from '~/utils/convertCurrencyToCurrencyMicros';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { isDefined } from 'twenty-shared/utils';export const CurrencyFieldInput = () => {const { fieldValue, draftValue, setDraftValue, defaultValue } =@@ -123,7 +122,7 @@ export const CurrencyFieldInput = () => {const handleSelect = (newValue: string) => {setDraftValue({- amount: isUndefinedOrNull(draftValue?.amount) ? '' : draftValue?.amount,+ amount: !isDefined(draftValue?.amount) ? '' : draftValue?.amount,currencyCode: newValue as CurrencyCode,});};diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/DateFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/DateFieldInput.tsxindex 82959f7c6e5..a250a71207f 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/DateFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/DateFieldInput.tsx@@ -5,7 +5,7 @@ import { FieldInputEventContext } from '@/object-record/record-field/ui/contextsimport { RecordFieldComponentInstanceContext } from '@/object-record/record-field/ui/states/contexts/RecordFieldComponentInstanceContext';import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { useContext } from 'react';-import { type Nullable } from 'twenty-ui/utilities';+import { type Nullable } from 'twenty-shared/types';export const DateFieldInput = () => {const { fieldValue, setDraftValue } = useDateField();diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/DateTimeFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/DateTimeFieldInput.tsxindex 1d7c0e82689..8aa1e1989a9 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/DateTimeFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/DateTimeFieldInput.tsx@@ -5,8 +5,8 @@ import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/comimport { isNonEmptyString } from '@sniptt/guards';import { useContext } from 'react';import { Temporal } from 'temporal-polyfill';-import { type Nullable } from 'twenty-ui/utilities';import { useDateTimeField } from '@/object-record/record-field/ui/meta-types/hooks/useDateTimeField';+import { type Nullable } from 'twenty-shared/types';export const DateTimeFieldInput = () => {const { fieldValue, setDraftValue } = useDateTimeField();diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemBaseInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemBaseInput.tsxindex c1d248f6af6..955e3320bdb 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemBaseInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemBaseInput.tsx@@ -7,7 +7,7 @@ import { Key } from 'ts-key-enum';import { isNonEmptyString } from '@sniptt/guards';import { themeCssVariables } from 'twenty-ui/theme';import { isDefined } from 'twenty-shared/utils';-import { useCombinedRefs } from '~/hooks/useCombinedRefs';+import { combineRefs } from '~/utils/combineRefs';const StyledInput = styled.input<{withRightComponent?: boolean;@@ -95,7 +95,7 @@ export const MultiItemBaseInput = ({ref,}: MultiItemBaseInputProps & { ref?: Ref<HTMLInputElement> }) => {const inputRef = useRef<HTMLInputElement>(null);- const combinedRef = useCombinedRefs(ref, inputRef);+ const combinedRef = combineRefs(ref, inputRef);useListenClickOutside({refs: [inputRef],diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsxindex f1aa9de9170..5144be9cd73 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx@@ -29,8 +29,8 @@ import { FieldMetadataType } from '~/generated-metadata/graphql';import { moveArrayItem } from '~/utils/array/moveArrayItem';import { toSpliced } from '~/utils/array/toSpliced';import { isDeeplyEqual } from '~/utils/isDeeplyEqual';-import { normalizeSearchText } from '~/utils/normalizeSearchText';import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledAddItemContainer = styled.div`padding: ${themeCssVariables.spacing[1]};diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromFieldValue.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromFieldValue.tsindex ecfb26d66f7..395bd058d18 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromFieldValue.ts+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/computeDraftValueFromFieldValue.ts@@ -13,7 +13,6 @@ import { isFieldRelation } from '@/object-record/record-field/ui/types/guards/isimport { computeEmptyDraftValue } from '@/object-record/record-field/ui/utils/computeEmptyDraftValue';import { isFieldValueEmpty } from '@/object-record/record-field/ui/utils/isFieldValueEmpty';import { isDefined } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { stripSimpleQuotesFromString } from '~/utils/string/stripSimpleQuotesFromString';const PERCENTAGE_DRAFT_VALUE_PRECISION = 15;@@ -40,7 +39,7 @@ export const computeDraftValueFromFieldValue = <FieldValue>({}return {- amount: isUndefinedOrNull(fieldValue?.amountMicros)+ amount: !isDefined(fieldValue?.amountMicros)? '': (fieldValue.amountMicros / 1000000).toString(),currencyCode: fieldValue?.currencyCode ?? '',@@ -87,7 +86,7 @@ export const computeDraftValueFromFieldValue = <FieldValue>({isFieldNumberValue(fieldValue) &&fieldDefinition.metadata.settings?.type === 'percentage') {- return (isUndefinedOrNull(fieldValue)+ return (!isDefined(fieldValue)? '': parseFloat((fieldValue * 100).toPrecision(PERCENTAGE_DRAFT_VALUE_PRECISION),diff --git a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/getFieldButtonIcon.ts b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/getFieldButtonIcon.tsindex 57d5b783dc5..bf9e6b04c57 100644--- a/packages/twenty-front/src/modules/object-record/record-field/ui/utils/getFieldButtonIcon.ts+++ b/packages/twenty-front/src/modules/object-record/record-field/ui/utils/getFieldButtonIcon.ts@@ -6,11 +6,11 @@ import { isFieldLinks } from '@/object-record/record-field/ui/types/guards/isFieimport { isFieldMultiSelect } from '@/object-record/record-field/ui/types/guards/isFieldMultiSelect';import { isFieldPhones } from '@/object-record/record-field/ui/types/guards/isFieldPhones';import { isFieldRelation } from '@/object-record/record-field/ui/types/guards/isFieldRelation';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { isFieldArray } from '@/object-record/record-field/ui/types/guards/isFieldArray';import { isFieldFiles } from '@/object-record/record-field/ui/types/guards/isFieldFiles';import { IconPencil, type IconComponent } from 'twenty-ui/icon';+import { isDefined } from 'twenty-shared/utils';export const getFieldButtonIcon = (fieldDefinition:@@ -18,7 +18,7 @@ export const getFieldButtonIcon = (| undefined| null,): IconComponent | undefined => {- if (isUndefinedOrNull(fieldDefinition)) return undefined;+ if (!isDefined(fieldDefinition)) return undefined;if (isFieldDisplayedAsPhone(fieldDefinition) ||diff --git a/packages/twenty-front/src/modules/object-record/record-group/hooks/useAddRecordGroup.ts b/packages/twenty-front/src/modules/object-record/record-group/hooks/useAddRecordGroup.tsindex caaf80cdbb2..d28c33bc73e 100644--- a/packages/twenty-front/src/modules/object-record/record-group/hooks/useAddRecordGroup.ts+++ b/packages/twenty-front/src/modules/object-record/record-group/hooks/useAddRecordGroup.ts@@ -9,7 +9,6 @@ import { type ViewGroup } from '@/views/types/ViewGroup';import { useStore } from 'jotai';import { isDefined } from 'twenty-shared/utils';import { v4 } from 'uuid';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';export const useAddRecordGroup = () => {const { canPersistChanges } = useCanPersistViewChanges();@@ -37,10 +36,7 @@ export const useAddRecordGroup = () => {const view = getViewFromState(currentViewId);- if (- isUndefinedOrNull(view) ||- !isDefined(view.mainGroupByFieldMetadataId)- ) {+ if (!isDefined(view) || !isDefined(view.mainGroupByFieldMetadataId)) {return;}diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexViewBarEffect.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexViewBarEffect.tsxindex 1dc892e5024..0210bef98c1 100644--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexViewBarEffect.tsx+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexViewBarEffect.tsx@@ -4,7 +4,7 @@ import { useColumnDefinitionsFromObjectMetadata } from '@/object-metadata/hooks/import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';import { useObjectNameSingularFromPlural } from '@/object-metadata/hooks/useObjectNameSingularFromPlural';import { useInitViewBar } from '@/views/hooks/useInitViewBar';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { isDefined } from 'twenty-shared/utils';type RecordIndexViewBarEffectProps = {objectNamePlural: string;@@ -30,7 +30,7 @@ export const RecordIndexViewBarEffect = ({useInitViewBar(viewBarId);useEffect(() => {- if (isUndefinedOrNull(objectMetadataItem)) {+ if (!isDefined(objectMetadataItem)) {return;}setViewObjectMetadataId?.(objectMetadataItem.id);diff --git a/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexExportRecords.ts b/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexExportRecords.tsindex 0a46bd00ded..952bd99e6d6 100644--- a/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexExportRecords.ts+++ b/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexExportRecords.ts@@ -20,7 +20,6 @@ import {sanitizeValueForCSVExport,} from 'twenty-shared/utils';import { FieldMetadataType, RelationType } from '~/generated-metadata/graphql';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';type GenerateExportOptions = {columns: Pick<@@ -125,7 +124,7 @@ const percentage = (part: number, whole: number): number => {};export const displayedExportProgress = (progress?: ExportProgress): string => {- if (isUndefinedOrNull(progress?.exportedRecordCount)) {+ if (!isDefined(progress?.exportedRecordCount)) {return t`Export`;}diff --git a/packages/twenty-front/src/modules/object-record/record-index/hooks/useHandleRecordGroupField.ts b/packages/twenty-front/src/modules/object-record/record-index/hooks/useHandleRecordGroupField.tsindex d7b380ddef9..d5777c28f9c 100644--- a/packages/twenty-front/src/modules/object-record/record-index/hooks/useHandleRecordGroupField.ts+++ b/packages/twenty-front/src/modules/object-record/record-index/hooks/useHandleRecordGroupField.ts@@ -9,7 +9,6 @@ import { useGetViewFromState } from '@/views/hooks/useGetViewFromState';import { useStore } from 'jotai';import { useCallback } from 'react';import { isDefined } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';export const useHandleRecordGroupField = () => {const currentViewIdCallbackState = useAtomComponentStateCallbackState(@@ -65,7 +64,7 @@ export const useHandleRecordGroupField = () => {const view = getViewFromState(currentViewId);- if (isUndefinedOrNull(view)) {+ if (!isDefined(view)) {return;}@@ -73,7 +72,7 @@ export const useHandleRecordGroupField = () => {if (!isRelationGroupBy &&- (isUndefinedOrNull(fieldMetadataItem.options) ||+ (!isDefined(fieldMetadataItem.options) ||fieldMetadataItem.options.length === 0)) {return;@@ -101,7 +100,7 @@ export const useHandleRecordGroupField = () => {const view = getViewFromState(currentViewId);- if (isUndefinedOrNull(view)) {+ if (!isDefined(view)) {return;}diff --git a/packages/twenty-front/src/modules/page-layout/widgets/timeline/components/WidgetActionTimelineFilter.tsx b/packages/twenty-front/src/modules/page-layout/widgets/timeline/components/WidgetActionTimelineFilter.tsxindex b760f3072a0..b0c2cfd86e6 100644--- a/packages/twenty-front/src/modules/page-layout/widgets/timeline/components/WidgetActionTimelineFilter.tsx+++ b/packages/twenty-front/src/modules/page-layout/widgets/timeline/components/WidgetActionTimelineFilter.tsx@@ -12,7 +12,7 @@ import { useState } from 'react';import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';import { Dropdown } from 'twenty-ui/components/navigation';import { IconFilter, IconFilterOff, useIcons } from 'twenty-ui/icon';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';export const WidgetActionTimelineFilter = () => {const { t } = useLingui();diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsxindex e4f992e3d58..8b723567406 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx@@ -34,6 +34,7 @@ import { type GetUpgradeStatusQuery } from '~/generated-admin/graphql';import { dateLocaleState } from '~/localization/states/dateLocaleState';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';import { formatDateTimeString } from '~/utils/string/formatDateTimeString';+import { getWorkspaceUrl } from '~/utils/getWorkspaceUrl';type SettingsAdminWorkspaceContentProps = {activeWorkspace: WorkspaceInfo | undefined;@@ -64,10 +65,6 @@ export const SettingsAdminWorkspaceContent = ({localeCatalog: localeCatalog,});- const getWorkspaceUrl = (workspaceUrls: WorkspaceInfo['workspaceUrls']) => {- return workspaceUrls.customUrl ?? workspaceUrls.subdomainUrl;- };-const upgradeHealthStatusBadge = getUpgradeHealthStatusBadge(workspaceUpgradeStatus?.health,);diff --git a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsxindex 99a11b97ea4..f98857a4e91 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/config-variables/components/SettingsAdminConfigVariables.tsx@@ -15,10 +15,10 @@ import {ConfigSource,GetConfigVariablesGroupedDocument,} from '~/generated-admin/graphql';-import { normalizeSearchText } from '~/utils/normalizeSearchText';import { ConfigVariableSearchInput } from './ConfigVariableSearchInput';import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';import { Section } from 'twenty-ui/components/layout';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledControlsContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsxindex 7c465cae740..2af8803a458 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/health-status/components/SettingsAdminWorkerMetricsGraph.tsx@@ -6,7 +6,7 @@ import { useQuery } from '@apollo/client/react';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { ResponsiveLine } from '@nivo/line';-import { isDefined } from 'twenty-shared/utils';+import { capitalize, isDefined } from 'twenty-shared/utils';import { useTheme, themeCssVariables } from 'twenty-ui/theme';import {GetQueueMetricsDocument,@@ -207,7 +207,7 @@ export const SettingsAdminWorkerMetricsGraph = ({items={Object.entries(metricsDetails).filter(([key]) => key !== '__typename').map(([key, value]) => ({- label: key.charAt(0).toUpperCase() + key.slice(1),+ label: capitalize(key),value:typeof value === 'number'? valuediff --git a/packages/twenty-front/src/modules/settings/billing/utils/filterUsageLimitRows.ts b/packages/twenty-front/src/modules/settings/billing/utils/filterUsageLimitRows.tsindex 21cabcf601f..1a479a4ca0e 100644--- a/packages/twenty-front/src/modules/settings/billing/utils/filterUsageLimitRows.ts+++ b/packages/twenty-front/src/modules/settings/billing/utils/filterUsageLimitRows.ts@@ -2,7 +2,7 @@ import { isDefined } from 'twenty-shared/utils';import { type UsageLimitRow } from '@/settings/billing/types/UsageLimitRow';import { type UsageResourceType } from '~/generated-metadata/graphql';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';export const filterUsageLimitRows = ({rows,diff --git a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsxindex 994217429f7..649920f205d 100644--- a/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/graph-overview/components/SettingsDataModelOverviewEffect.tsx@@ -3,7 +3,6 @@ import { useEffect } from 'react';import { useFilteredObjectMetadataItems } from '@/object-metadata/hooks/useFilteredObjectMetadataItems';import { isDefined } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { themeCssVariables } from 'twenty-ui/theme';type SettingsDataModelOverviewEffectProps = {@@ -73,10 +72,7 @@ export const SettingsDataModelOverviewEffect = ({targetObject: targetObj,},});- if (- !isUndefinedOrNull(sourceObj) &&- !isUndefinedOrNull(targetObj)- ) {+ if (isDefined(sourceObj) && isDefined(targetObj)) {g.setEdge(sourceObj, targetObj);}}diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsxindex baf186bf237..eea7cc6515a 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsObjectRelationsTable.tsx@@ -27,11 +27,11 @@ import { SettingsRow } from 'twenty-ui/components/settings';import { IconArchive, IconFilter, IconSearch } from 'twenty-ui/icon';import { Button } from 'twenty-ui/primitives/input';import { themeCssVariables } from 'twenty-ui/theme';-import { normalizeSearchText } from '~/utils/normalizeSearchText';import {OBJECT_RELATION_TABLE_ROW_GRID_TEMPLATE_COLUMNS,SettingsObjectRelationItemTableRow,} from './SettingsObjectRelationItemTableRow';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledSearchAndFilterContainer = styled.div`display: flex;diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection.tsxindex ca0053e4796..76da387e269 100644--- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection.tsx+++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/tabs/SettingsObjectIndexesSection.tsx@@ -25,7 +25,7 @@ import { Button } from 'twenty-ui/primitives/input';import { themeCssVariables } from 'twenty-ui/theme';import { SettingsObjectIndexTable } from '~/pages/settings/data-model/SettingsObjectIndexTable';import { type SettingsObjectIndexesTableItem } from '~/pages/settings/data-model/types/SettingsObjectIndexesTableItem';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';type SettingsObjectIndexesSectionProps = {objectMetadataItem: EnrichedObjectMetadataItem;diff --git a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogDatePickerInput.tsx b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogDatePickerInput.tsxdeleted file mode 100644index ac813405d75..00000000000--- a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogDatePickerInput.tsx+++ /dev/null@@ -1 +0,0 @@-export { SettingsDatePickerInput as EventLogDatePickerInput } from '@/settings/components/SettingsDatePickerInput';diff --git a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogFilters.tsx b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogFilters.tsxindex 2bcd85c27b4..b36077d4124 100644--- a/packages/twenty-front/src/modules/settings/event-logs/components/EventLogFilters.tsx+++ b/packages/twenty-front/src/modules/settings/event-logs/components/EventLogFilters.tsx@@ -10,10 +10,8 @@ import { useLingui } from '@lingui/react/macro';import { IconBox, IconUser, useIcons } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';import { themeCssVariables } from 'twenty-ui/theme';-import { EventLogTable } from '~/generated-metadata/graphql';--import { EventLogDatePickerInput } from './EventLogDatePickerInput';+import { SettingsDatePickerInput } from '@/settings/components/SettingsDatePickerInput';type EventLogFiltersProps = {table: EventLogTable;@@ -132,13 +130,13 @@ export const EventLogFilters = ({<StyledFullWidthField><InputLabel>{t`Period`}</InputLabel><StyledPeriodRow>- <EventLogDatePickerInput+ <SettingsDatePickerInputinstanceId="event-log-start-date"value={value.dateRange?.start}onChange={handleStartDateChange}placeholder={t`Start date`}/>- <EventLogDatePickerInput+ <SettingsDatePickerInputinstanceId="event-log-end-date"value={value.dateRange?.end}onChange={handleEndDateChange}diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsxindex f4121acfae4..7f8548b8d61 100644--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentEntityPickerDropdown.tsx@@ -10,7 +10,7 @@ import {FindManyAgentsDocument,GetApiKeysDocument,} from '~/generated-metadata/graphql';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';type EntityData = Agent | ApiKeyForRole;diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTable.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTable.tsxindex cb1c7125393..a75001b931f 100644--- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTable.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentTable.tsx@@ -15,9 +15,9 @@ import { useMemo, useState } from 'react';import { Section } from 'twenty-ui/components/layout';import { IconSearch } from 'twenty-ui/icon';import { type Agent, type ApiKeyForRole } from '~/generated-metadata/graphql';-import { normalizeSearchText } from '~/utils/normalizeSearchText';import { type PartialWorkspaceMember } from '@/settings/roles/types/RoleWithPartialMembers';import { themeCssVariables } from 'twenty-ui/theme';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledTable = styled.div`border-bottom: 1px solid ${themeCssVariables.border.color.light};diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsxindex bc956796d0c..1a1715b740f 100644--- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx+++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionVariablePicker.tsx@@ -8,7 +8,7 @@ import { Dropdown } from 'twenty-ui/components/navigation';import { IconVariablePlus } from 'twenty-ui/icon';import { useTheme, themeCssVariables } from 'twenty-ui/theme';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { SettingsRolePermissionsObjectLevelRecordLevelPermissionMeValueSelect } from '@/settings/roles/role-permissions/object-level-permissions/record-level-permissions/components/SettingsRolePermissionsObjectLevelRecordLevelPermissionMeValueSelect';import { RecordLevelPermissionVariablePickerContext } from '@/settings/roles/role-permissions/object-level-permissions/record-level-permissions/contexts/RecordLevelPermissionVariablePickerContext';import { DropdownRoot } from '@/ui/layout/dropdown/components/DropdownRoot';diff --git a/packages/twenty-front/src/modules/settings/translations/components/SettingsMetadataTranslationsSection.tsx b/packages/twenty-front/src/modules/settings/translations/components/SettingsMetadataTranslationsSection.tsxindex 4d2a2cc788f..230701901cd 100644--- a/packages/twenty-front/src/modules/settings/translations/components/SettingsMetadataTranslationsSection.tsx+++ b/packages/twenty-front/src/modules/settings/translations/components/SettingsMetadataTranslationsSection.tsx@@ -10,7 +10,7 @@ import { IconSearch } from 'twenty-ui/icon';import { themeCssVariables } from 'twenty-ui/theme';import { type MetadataTranslationsInput } from '~/generated-metadata/graphql';import { useLocaleOptions } from '~/localization/hooks/useLocaleOptions';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledSearchInputContainer = styled.div`padding-bottom: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/settings/usage/components/UsageByUserTableSection.tsx b/packages/twenty-front/src/modules/settings/usage/components/UsageByUserTableSection.tsxindex e573ea35458..ba93b045254 100644--- a/packages/twenty-front/src/modules/settings/usage/components/UsageByUserTableSection.tsx+++ b/packages/twenty-front/src/modules/settings/usage/components/UsageByUserTableSection.tsx@@ -15,7 +15,7 @@ import { IconChevronRight } from 'twenty-ui/icon';import { Avatar } from 'twenty-ui/primitives/data-display';import { useTheme, themeCssVariables } from 'twenty-ui/theme';import { type UsageOperationType } from '~/generated-metadata/graphql';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledSearchInputContainer = styled.div`padding-bottom: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/modules/settings/workspace-member/components/WorkspaceMemberPictureUploader.tsx b/packages/twenty-front/src/modules/settings/workspace-member/components/WorkspaceMemberPictureUploader.tsxindex b9811ab5089..3c4d73dad4a 100644--- a/packages/twenty-front/src/modules/settings/workspace-member/components/WorkspaceMemberPictureUploader.tsx+++ b/packages/twenty-front/src/modules/settings/workspace-member/components/WorkspaceMemberPictureUploader.tsx@@ -12,7 +12,6 @@ import { FileFolder } from 'twenty-shared/types';import { isDefined } from 'twenty-shared/utils';import { useToast } from 'twenty-ui/components/feedback';import { REACT_APP_SERVER_BASE_URL } from '~/config';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';type WorkspaceMemberPictureUploaderProps = {workspaceMemberId: string;@@ -51,7 +50,7 @@ export const WorkspaceMemberPictureUploader = ({const canEdit = isEditingSelf ? canEditProfilePicture : !disabled;const handleUpload = async (file: File) => {- if (isUndefinedOrNull(file) || !canEdit) {+ if (!isDefined(file) || !canEdit) {return;}diff --git a/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsx b/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsxindex 8f8524a87da..ea2d7c6d940 100644--- a/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsx+++ b/packages/twenty-front/src/modules/settings/workspace/components/NameField.tsx@@ -12,7 +12,6 @@ import { isDefined } from 'twenty-shared/utils';import { themeCssVariables } from 'twenty-ui/theme';import { useMutation } from '@apollo/client/react';import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { logError } from '~/utils/logError';const StyledComboInputContainer = styled.div`@@ -74,7 +73,7 @@ export const NameField = ({if (isDefined(result.error) ||- isUndefinedOrNull(result.data?.updateWorkspace)+ !isDefined(result.data?.updateWorkspace)) {throw result.error;}diff --git a/packages/twenty-front/src/modules/settings/workspace/components/WorkspaceLogoUploader.tsx b/packages/twenty-front/src/modules/settings/workspace/components/WorkspaceLogoUploader.tsxindex a33799d48b3..041e65b9112 100644--- a/packages/twenty-front/src/modules/settings/workspace/components/WorkspaceLogoUploader.tsx+++ b/packages/twenty-front/src/modules/settings/workspace/components/WorkspaceLogoUploader.tsx@@ -8,7 +8,7 @@ import { useUploadWorkspaceLogo } from '@/workspace/hooks/useUploadWorkspaceLogoimport { useMutation } from '@apollo/client/react';import { useToast } from 'twenty-ui/components/feedback';import { UpdateWorkspaceDocument } from '~/generated-metadata/graphql';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { isDefined } from 'twenty-shared/utils';export const WorkspaceLogoUploader = () => {const { enqueueToast } = useToast();@@ -22,7 +22,7 @@ export const WorkspaceLogoUploader = () => {const [errorMessage, setErrorMessage] = useState<string | null>(null);const onUpload = async (file: File) => {- if (isUndefinedOrNull(file)) {+ if (!isDefined(file)) {return;}diff --git a/packages/twenty-front/src/modules/side-panel/components/SidePanelInformationBanner/SidePanelInformationBanner.tsx b/packages/twenty-front/src/modules/side-panel/components/SidePanelInformationBanner/SidePanelInformationBanner.tsxindex e751c72c40a..220435d2bf8 100644--- a/packages/twenty-front/src/modules/side-panel/components/SidePanelInformationBanner/SidePanelInformationBanner.tsx+++ b/packages/twenty-front/src/modules/side-panel/components/SidePanelInformationBanner/SidePanelInformationBanner.tsx@@ -1,6 +1,5 @@import { css } from '@linaria/core';import { clsx } from 'clsx';-import { isDefined } from 'twenty-ui/utilities';import { IconAlertTriangle, IconInfoCircle } from 'twenty-ui/icon';import { Tooltip } from 'twenty-ui/primitives/surfaces';@@ -43,8 +42,8 @@ const styles = {}`,};-import { type SidePanelInformationBannerProps } from './types/SidePanelInformationBannerProps';+import { isDefined } from 'twenty-shared/utils';export const SidePanelInformationBanner = ({message,diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartGroupByFieldSelectionTargetObjectFieldsView.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartGroupByFieldSelectionTargetObjectFieldsView.tsxindex 3973abc5ec2..1c967b3d5e3 100644--- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartGroupByFieldSelectionTargetObjectFieldsView.tsx+++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartGroupByFieldSelectionTargetObjectFieldsView.tsx@@ -21,7 +21,7 @@ import { useMemo, useState } from 'react';import { isDefined } from 'twenty-shared/utils';import { IconChevronLeft, useIcons } from 'twenty-ui/icon';import { filterBySearchQuery } from '~/utils/filterBySearchQuery';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const RECORD_ITEM_ID = 'record';diff --git a/packages/twenty-front/src/modules/side-panel/pages/root/hooks/useFilterCommandMenuItemsWithSidePanelSearch.ts b/packages/twenty-front/src/modules/side-panel/pages/root/hooks/useFilterCommandMenuItemsWithSidePanelSearch.tsindex b17fa55e230..d71892d7042 100644--- a/packages/twenty-front/src/modules/side-panel/pages/root/hooks/useFilterCommandMenuItemsWithSidePanelSearch.ts+++ b/packages/twenty-front/src/modules/side-panel/pages/root/hooks/useFilterCommandMenuItemsWithSidePanelSearch.ts@@ -4,7 +4,7 @@ import { interpolateMessagePlaceholders } from 'twenty-shared/i18n';import { type CommandMenuContextApi } from 'twenty-shared/types';import { getCommandMenuItemPlaceholderValues } from '@/command-menu-item/utils/getCommandMenuItemPlaceholderValues';import { type CommandMenuItemFieldsFragment } from '~/generated-metadata/graphql';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const checkInShortcuts = (commandMenuItem: CommandMenuItemFieldsFragment,diff --git a/packages/twenty-front/src/modules/skill-suggestion/utils/getSkillSuggestionItems.ts b/packages/twenty-front/src/modules/skill-suggestion/utils/getSkillSuggestionItems.tsindex 3cf6e3c4997..3db784182b1 100644--- a/packages/twenty-front/src/modules/skill-suggestion/utils/getSkillSuggestionItems.ts+++ b/packages/twenty-front/src/modules/skill-suggestion/utils/getSkillSuggestionItems.ts@@ -1,6 +1,6 @@import type { SkillSuggestionItem } from '@/skill-suggestion/types/SkillSuggestionItem';import { type FindManySkillsForSuggestionQuery } from '~/generated-metadata/graphql';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';export const getSkillSuggestionItems = ({skills,diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/MatchColumnSelectFieldSelectDropdownContent.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/MatchColumnSelectFieldSelectDropdownContent.tsxindex e40cdfe8d7f..30cca5da484 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/components/MatchColumnSelectFieldSelectDropdownContent.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/MatchColumnSelectFieldSelectDropdownContent.tsx@@ -12,7 +12,7 @@ import { Dropdown, useDropdownPage } from 'twenty-ui/components/navigation';import { IconForbid, useIcons } from 'twenty-ui/icon';import { type SelectOption } from 'twenty-ui/primitives/input';import { type ReadonlyDeep } from 'type-fest';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledContainer = styled.div`max-height: 360px;diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/ReactSpreadsheetImportContextProvider.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/ReactSpreadsheetImportContextProvider.tsxindex a6cfcec43d6..4d0a5b696d8 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/components/ReactSpreadsheetImportContextProvider.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/ReactSpreadsheetImportContextProvider.tsx@@ -1,7 +1,6 @@import { createContext } from 'react';-import { type SpreadsheetImportDialogOptions } from '@/spreadsheet-import/types';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { isDefined } from 'twenty-shared/utils';export const RsiContext = createContext({} as any);@@ -14,7 +13,7 @@ export const ReactSpreadsheetImportContextProvider = ({children,values,}: ReactSpreadsheetImportContextProviderProps) => {- if (isUndefinedOrNull(values.spreadsheetImportFields)) {+ if (!isDefined(values.spreadsheetImportFields)) {throw new Error('Fields must be provided to spreadsheet-import');}diff --git a/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx b/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsxindex 91dd6735408..711d32f0b89 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/components/StepNavigationButton.tsx@@ -5,7 +5,7 @@ import { themeCssVariables } from 'twenty-ui/theme';import { t } from '@lingui/core/macro';import { Loader } from 'twenty-ui/primitives/feedback';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { isDefined } from 'twenty-shared/utils';const StyledFooterContainer = styled.div`> div {@@ -35,7 +35,7 @@ export const StepNavigationButton = ({return (<StyledFooterContainer><Dialog.Footer style={{ padding: 'var(--t-spacing-5)' }}>- {!isUndefinedOrNull(onBack) && (+ {isDefined(onBack) && (<MainButtonstartIcon={isLoading ? <Loader /> : undefined}onClick={!isLoading ? onBack : undefined}@@ -44,7 +44,7 @@ export const StepNavigationButton = ({{backTitle}</MainButton>)}- {!isUndefinedOrNull(onContinue) && (+ {isDefined(onContinue) && (<MainButtonstartIcon={isLoading ? <Loader /> : undefined}onClick={!isLoading ? onContinue : undefined}diff --git a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectInput.tsx b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectInput.tsxindex 03cbdffeba6..8ef18733cbf 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectInput.tsx+++ b/packages/twenty-front/src/modules/spreadsheet-import/steps/components/MatchColumnsStep/components/SubMatchingSelectInput.tsx@@ -4,7 +4,7 @@ import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';import { Dropdown } from 'twenty-ui/components/navigation';import { type TagColor, Tag } from 'twenty-ui/primitives/data-display';import { type SelectOption } from 'twenty-ui/primitives/input';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';type SubMatchingSelectInputProps = {onOptionSelected: (selectedOption: SelectOption) => void;diff --git a/packages/twenty-front/src/modules/spreadsheet-import/utils/dataMutations.ts b/packages/twenty-front/src/modules/spreadsheet-import/utils/dataMutations.tsindex ef54ce6895a..f8ca64e5d8a 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/utils/dataMutations.ts+++ b/packages/twenty-front/src/modules/spreadsheet-import/utils/dataMutations.ts@@ -13,7 +13,6 @@ import {type SpreadsheetImportTableHook,} from '@/spreadsheet-import/types';import { isDefined } from 'twenty-shared/utils';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';export const addErrorsAndRunHooks = (data: (ImportedStructuredRow & Partial<ImportedStructuredRowMetadata>)[],@@ -56,7 +55,7 @@ export const addErrorsAndRunHooks = (values.forEach((value) => {if (fieldValidationDefinition.allowEmpty === true &&- (isUndefinedOrNull(value) || value === '' || !Boolean(value))+ (!isDefined(value) || value === '' || !Boolean(value))) {return;}@@ -163,7 +162,7 @@ export const addErrorsAndRunHooks = (ImportedStructuredRowMetadata;}- if (isUndefinedOrNull(errors[index]) && isDefined(value?.__errors)) {+ if (!isDefined(errors[index]) && isDefined(value?.__errors)) {return { ...newValue, __errors: null } as ImportedStructuredRow &ImportedStructuredRowMetadata;}diff --git a/packages/twenty-front/src/modules/spreadsheet-import/utils/spreadsheetImportGetSubFieldOptions.ts b/packages/twenty-front/src/modules/spreadsheet-import/utils/spreadsheetImportGetSubFieldOptions.tsindex 1c5c862c287..d11f26bbdb1 100644--- a/packages/twenty-front/src/modules/spreadsheet-import/utils/spreadsheetImportGetSubFieldOptions.ts+++ b/packages/twenty-front/src/modules/spreadsheet-import/utils/spreadsheetImportGetSubFieldOptions.ts@@ -1,6 +1,6 @@import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';import { type SpreadsheetImportFieldOption } from '@/spreadsheet-import/types/SpreadsheetImportFieldOption';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';export const getSubFieldOptions = (fieldMetadataItem: FieldMetadataItem,diff --git a/packages/twenty-front/src/modules/ui/field/display/components/CurrencyDisplay.tsx b/packages/twenty-front/src/modules/ui/field/display/components/CurrencyDisplay.tsxindex afc009a6a09..6ab0f48abc1 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/CurrencyDisplay.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/CurrencyDisplay.tsx@@ -13,7 +13,6 @@ import { SETTINGS_FIELD_CURRENCY_CODES } from '@/settings/data-model/constants/Simport { EllipsisDisplay } from '@/ui/field/display/components/internal/EllipsisDisplay/EllipsisDisplay';import { TooltipDelay } from '@/ui/layout/tooltip/constants/TooltipDelay';import { DEFAULT_DECIMAL_VALUE } from '~/utils/format/formatNumber';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';const StyledCurrencyIconContainer = styled.span`align-items: center;@@ -37,7 +36,7 @@ export const CurrencyDisplay = ({: null;const CurrencyIcon = currencyMetadata?.Icon ?? null;- const amountToDisplay = isUndefinedOrNull(currencyValue?.amountMicros)+ const amountToDisplay = !isDefined(currencyValue?.amountMicros)? null: currencyValue?.amountMicros / 1000000;diff --git a/packages/twenty-front/src/modules/ui/field/display/components/SelectDisplay/SelectDisplay.tsx b/packages/twenty-front/src/modules/ui/field/display/components/SelectDisplay/SelectDisplay.tsxindex 85e56e60805..405aacd57ae 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/SelectDisplay/SelectDisplay.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/SelectDisplay/SelectDisplay.tsx@@ -1,7 +1,7 @@import { type IconComponent } from 'twenty-ui/icon';import { Tag } from 'twenty-ui/primitives/data-display';import { type ThemeColor } from 'twenty-ui/theme';-import { isDefined } from 'twenty-ui/utilities';+import { isDefined } from 'twenty-shared/utils';type SelectDisplayProps = {color: ThemeColor | 'transparent';diff --git a/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon.tsx b/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon.tsxindex 60d3364031b..e08cf23b32d 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/AvatarOrIcon.tsx@@ -3,8 +3,8 @@ import { isNonEmptyString } from '@sniptt/guards';import { Avatar } from 'twenty-ui/primitives/data-display';import { useTheme } from 'twenty-ui/theme';-import { isDefined } from 'twenty-ui/utilities';import { type AvatarOrIconProps } from './types/AvatarOrIconProps';+import { isDefined } from 'twenty-shared/utils';const styles = {iconWithBackgroundContainer: css`diff --git a/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/types/AvatarOrIconProps.ts b/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/types/AvatarOrIconProps.tsindex 24aa468ae43..8499a2c3ddc 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/types/AvatarOrIconProps.ts+++ b/packages/twenty-front/src/modules/ui/field/display/components/internal/AvatarOrIcon/types/AvatarOrIconProps.ts@@ -3,7 +3,7 @@ import {type AvatarProps,type AvatarShape,} from 'twenty-ui/primitives/data-display';-import { type Nullable } from 'twenty-ui/utilities';+import { type Nullable } from 'twenty-shared/types';export type AvatarOrIconProps = Pick<AvatarProps,diff --git a/packages/twenty-front/src/modules/ui/field/display/components/internal/ContactLink/ContactLink.tsx b/packages/twenty-front/src/modules/ui/field/display/components/internal/ContactLink/ContactLink.tsxindex 4736f46050c..ff99b0e50ed 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/internal/ContactLink/ContactLink.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/internal/ContactLink/ContactLink.tsx@@ -1,8 +1,7 @@import { css } from '@linaria/core';import * as React from 'react';-import { getSafeUrl } from 'twenty-ui/utilities';-+import { getSafeUrl } from 'twenty-shared/utils';const styles = {root: css`& {diff --git a/packages/twenty-front/src/modules/ui/field/display/components/internal/EllipsisDisplay/EllipsisDisplay.tsx b/packages/twenty-front/src/modules/ui/field/display/components/internal/EllipsisDisplay/EllipsisDisplay.tsxindex 3564a87cd96..4e4ac7236a7 100644--- a/packages/twenty-front/src/modules/ui/field/display/components/internal/EllipsisDisplay/EllipsisDisplay.tsx+++ b/packages/twenty-front/src/modules/ui/field/display/components/internal/EllipsisDisplay/EllipsisDisplay.tsx@@ -1,8 +1,7 @@import { css } from '@linaria/core';import { clsx } from 'clsx';-import { Text } from 'twenty-ui/primitives/typography';-import { isDefined } from 'twenty-ui/utilities';+import { isDefined } from 'twenty-shared/utils';const styles = {ellipsis: css`diff --git a/packages/twenty-front/src/modules/ui/field/display/utils/getDisplayValueByUrlType.ts b/packages/twenty-front/src/modules/ui/field/display/utils/getDisplayValueByUrlType.tsindex f0d3af60e10..0fa5fb503aa 100644--- a/packages/twenty-front/src/modules/ui/field/display/utils/getDisplayValueByUrlType.ts+++ b/packages/twenty-front/src/modules/ui/field/display/utils/getDisplayValueByUrlType.ts@@ -1,6 +1,6 @@import { type LinkType } from '@/ui/field/display/components/SocialLink/LinkType';import { SOCIAL_LINK_PROVIDERS } from '@/ui/field/display/components/SocialLink/socialLinkProviders';-import { isDefined } from 'twenty-ui/utilities';+import { isDefined } from 'twenty-shared/utils';type GetDisplayValueByUrlTypeProps = {type: LinkType;diff --git a/packages/twenty-front/src/modules/ui/field/input/components/DateInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/DateInput.tsxindex ed54ffb047c..887139e1e0f 100644--- a/packages/twenty-front/src/modules/ui/field/input/components/DateInput.tsx+++ b/packages/twenty-front/src/modules/ui/field/input/components/DateInput.tsx@@ -4,7 +4,7 @@ import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-typimport { DatePicker } from '@/ui/input/components/internal/date/components/DatePicker';import { currentFocusIdSelector } from '@/ui/utilities/focus/states/currentFocusIdSelector';import { useStore } from 'jotai';-import { type Nullable } from 'twenty-ui/utilities';+import { type Nullable } from 'twenty-shared/types';export type DateInputProps = {instanceId: string;diff --git a/packages/twenty-front/src/modules/ui/field/input/components/DateTimeInput.tsx b/packages/twenty-front/src/modules/ui/field/input/components/DateTimeInput.tsxindex 659b9584249..409e8c16898 100644--- a/packages/twenty-front/src/modules/ui/field/input/components/DateTimeInput.tsx+++ b/packages/twenty-front/src/modules/ui/field/input/components/DateTimeInput.tsx@@ -6,7 +6,7 @@ import { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUsimport { currentFocusIdSelector } from '@/ui/utilities/focus/states/currentFocusIdSelector';import { useStore } from 'jotai';import { type Temporal } from 'temporal-polyfill';-import { type Nullable } from 'twenty-ui/utilities';+import { type Nullable } from 'twenty-shared/types';type DateTimeInputProps = {instanceId: string;diff --git a/packages/twenty-front/src/modules/ui/input/components/Select.tsx b/packages/twenty-front/src/modules/ui/input/components/Select.tsxindex 85a56ce9a48..5a5fecf3fe2 100644--- a/packages/twenty-front/src/modules/ui/input/components/Select.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/Select.tsx@@ -17,7 +17,7 @@ import { SelectControl } from '@/ui/input/components/SelectControl';import { isNonEmptyArray, isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { themeCssVariables } from 'twenty-ui/theme';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledContainer = styled.div<{ fullWidth?: boolean }>`width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};diff --git a/packages/twenty-front/src/modules/ui/input/components/SelectInput.tsx b/packages/twenty-front/src/modules/ui/input/components/SelectInput.tsxindex e92eab99817..32d68e9381b 100644--- a/packages/twenty-front/src/modules/ui/input/components/SelectInput.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/SelectInput.tsx@@ -7,7 +7,7 @@ import { Tag } from 'twenty-ui/primitives/data-display';import { type SelectOption } from 'twenty-ui/primitives/input';import { AddSelectOptionDropdownSection } from '@/ui/input/components/AddSelectOptionDropdownSection';import { filterSelectOptionsBySearch } from '@/ui/input/utils/filterSelectOptionsBySearch';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';type SelectInputProps = {onOptionSelected: (selectedOption: SelectOption) => void;diff --git a/packages/twenty-front/src/modules/ui/input/components/TextInput.tsx b/packages/twenty-front/src/modules/ui/input/components/TextInput.tsxindex e86427cc3f3..5ae714edc88 100644--- a/packages/twenty-front/src/modules/ui/input/components/TextInput.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/TextInput.tsx@@ -17,7 +17,7 @@ import { isDefined } from 'twenty-shared/utils';import { IconEye, IconEyeOff } from 'twenty-ui/icon';import { Field } from 'twenty-ui/primitives/input';import { useTheme, themeCssVariables } from 'twenty-ui/theme';-import { useCombinedRefs } from '~/hooks/useCombinedRefs';+import { combineRefs } from '~/utils/combineRefs';import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';import { PASSWORD_MANAGER_IGNORE_ATTRIBUTES } from '@/ui/input/constants/PasswordManagerIgnoreAttributes';const StyledContainer = styled.div<Pick<TextInputComponentProps, 'fullWidth'>>`@@ -284,7 +284,7 @@ const TextInputComponent = forwardRef<) => {const theme = useTheme();const inputRef = useRef<HTMLInputElement>(null);- const combinedRef = useCombinedRefs(ref, inputRef, inputProps?.ref);+ const combinedRef = combineRefs(ref, inputRef, inputProps?.ref);const [passwordVisible, setPasswordVisible] = useState(false);const [isFocused, setIsFocused] = useState(false);diff --git a/packages/twenty-front/src/modules/ui/input/components/internal/select/utils/isSelectOptionMatchingSearch.ts b/packages/twenty-front/src/modules/ui/input/components/internal/select/utils/isSelectOptionMatchingSearch.tsindex 6890187028b..8abce40ce1c 100644--- a/packages/twenty-front/src/modules/ui/input/components/internal/select/utils/isSelectOptionMatchingSearch.ts+++ b/packages/twenty-front/src/modules/ui/input/components/internal/select/utils/isSelectOptionMatchingSearch.ts@@ -1,7 +1,7 @@import { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { type SelectOption } from 'twenty-ui/primitives/input';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';export const isSelectOptionMatchingSearch = ({option: { label, searchKeywords },diff --git a/packages/twenty-front/src/modules/ui/input/utils/filterSelectOptionsBySearch.ts b/packages/twenty-front/src/modules/ui/input/utils/filterSelectOptionsBySearch.tsindex 55579e06ae1..44cac9ebb1b 100644--- a/packages/twenty-front/src/modules/ui/input/utils/filterSelectOptionsBySearch.ts+++ b/packages/twenty-front/src/modules/ui/input/utils/filterSelectOptionsBySearch.ts@@ -1,5 +1,5 @@import { type SelectOption } from 'twenty-ui/primitives/input';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';export const filterSelectOptionsBySearch = ({options,diff --git a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInput.tsx b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInput.tsxindex 90a8a1cb928..0a7ed684983 100644--- a/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInput.tsx+++ b/packages/twenty-front/src/modules/ui/layout/dropdown/components/DropdownMenuInput.tsx@@ -10,7 +10,7 @@ import 'react-phone-number-input/style.css';import { useRegisterInputEvents } from '@/object-record/record-field/ui/meta-types/input/hooks/useRegisterInputEvents';import { isDefined } from 'twenty-shared/utils';import { themeCssVariables } from 'twenty-ui/theme';-import { useCombinedRefs } from '~/hooks/useCombinedRefs';+import { combineRefs } from '~/utils/combineRefs';const StyledInput = styled.input<{withRightComponent?: boolean;@@ -111,7 +111,7 @@ export const DropdownMenuInput = forwardRef<ref,) => {const inputRef = useRef<HTMLInputElement>(null);- const combinedRef = useCombinedRefs(ref, inputRef);+ const combinedRef = combineRefs(ref, inputRef);useRegisterInputEvents({focusId: instanceId,diff --git a/packages/twenty-front/src/modules/ui/navigation/hooks/useMouseDownNavigation.ts b/packages/twenty-front/src/modules/ui/navigation/hooks/useMouseDownNavigation.tsindex 17b50b7b253..a7b99c50e2c 100644--- a/packages/twenty-front/src/modules/ui/navigation/hooks/useMouseDownNavigation.ts+++ b/packages/twenty-front/src/modules/ui/navigation/hooks/useMouseDownNavigation.ts@@ -2,7 +2,7 @@ import { isNavigationModifierPressed } from '@/ui/navigation/utils/isNavigationMimport { type TriggerEventType } from '@/ui/navigation/types/TriggerEventType';import { type MouseEvent } from 'react';import { useNavigate } from 'react-router-dom';-import { isDefined } from 'twenty-ui/utilities';+import { isDefined } from 'twenty-shared/utils';type UseMouseDownNavigationProps = {to?: string;diff --git a/packages/twenty-front/src/modules/ui/navigation/link/components/RoundedLink/RoundedLink.tsx b/packages/twenty-front/src/modules/ui/navigation/link/components/RoundedLink/RoundedLink.tsxindex 7402424f909..a632c8e328b 100644--- a/packages/twenty-front/src/modules/ui/navigation/link/components/RoundedLink/RoundedLink.tsx+++ b/packages/twenty-front/src/modules/ui/navigation/link/components/RoundedLink/RoundedLink.tsx@@ -2,8 +2,7 @@ import { isNonEmptyString } from '@sniptt/guards';import { styled } from '@linaria/react';import { type MouseEvent } from 'react';-import { getSafeUrl } from 'twenty-ui/utilities';-+import { getSafeUrl } from 'twenty-shared/utils';const StyledLink = styled.a`align-items: center;background-color: var(--t-background-transparent-lighter);diff --git a/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts b/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.tsindex 8d570098c57..1dc654e7651 100644--- a/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts+++ b/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts@@ -23,7 +23,6 @@ import { useCallback } from 'react';import { isDefined } from 'twenty-shared/utils';import { v4 } from 'uuid';import { ViewCalendarLayout } from '~/generated-metadata/graphql';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';export const useCreateViewFromCurrentView = (viewBarComponentId?: string) => {const { performViewApiCreate } = usePerformViewApiPersist();@@ -161,7 +160,7 @@ export const useCreateViewFromCurrentView = (viewBarComponentId?: string) => {const newViewId = result.response.data?.createView.id;- if (isUndefinedOrNull(newViewId)) {+ if (!isDefined(newViewId)) {throw new Error('Failed to create view');}diff --git a/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewFields.ts b/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewFields.tsindex 1fa9243b54c..9d32f7f3f52 100644--- a/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewFields.ts+++ b/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewFields.ts@@ -12,7 +12,7 @@ import {type UpdateViewFieldMutationVariables,} from '~/generated-metadata/graphql';import { isDeeplyEqual } from '~/utils/isDeeplyEqual';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';+import { isDefined } from 'twenty-shared/utils';export const useSaveCurrentViewFields = () => {const { canPersistChanges } = useCanPersistViewChanges();@@ -41,7 +41,7 @@ export const useSaveCurrentViewFields = () => {const view = getViewFromState(currentViewId);- if (isUndefinedOrNull(view)) {+ if (!isDefined(view)) {return;}@@ -71,7 +71,7 @@ export const useSaveCurrentViewFields = () => {createViewFieldInput.fieldMetadataId,);- if (isUndefinedOrNull(existingField)) {+ if (!isDefined(existingField)) {return {viewFieldsToCreate: [...viewFieldsToCreate,diff --git a/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewGroups.ts b/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewGroups.tsindex bbdfc515d27..1978e5706e8 100644--- a/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewGroups.ts+++ b/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewGroups.ts@@ -9,7 +9,6 @@ import { useGetViewFromState } from '@/views/hooks/useGetViewFromState';import { type ViewGroup } from '@/views/types/ViewGroup';import { isDefined } from 'twenty-shared/utils';import { isDeeplyEqual } from '~/utils/isDeeplyEqual';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';export const useSaveCurrentViewGroups = () => {const { canPersistChanges } = useCanPersistViewChanges();@@ -37,7 +36,7 @@ export const useSaveCurrentViewGroups = () => {const view = getViewFromState(currentViewId);- if (isUndefinedOrNull(view)) {+ if (!isDefined(view)) {return;}@@ -48,7 +47,7 @@ export const useSaveCurrentViewGroups = () => {currentViewGroup.fieldValue === viewGroupToSave.fieldValue,);- if (isUndefinedOrNull(existingField)) {+ if (!isDefined(existingField)) {return;}@@ -103,7 +102,7 @@ export const useSaveCurrentViewGroups = () => {const view = getViewFromState(currentViewId);- if (isUndefinedOrNull(view)) {+ if (!isDefined(view)) {return;}@@ -116,7 +115,7 @@ export const useSaveCurrentViewGroups = () => {currentViewGroup.fieldValue === viewGroupToSave.fieldValue,);- if (isUndefinedOrNull(existingField)) {+ if (!isDefined(existingField)) {return undefined;}diff --git a/packages/twenty-front/src/modules/views/utils/mapViewFieldsToColumnDefinitions.ts b/packages/twenty-front/src/modules/views/utils/mapViewFieldsToColumnDefinitions.tsindex 6b7eb4e5dc0..3c62d6313a6 100644--- a/packages/twenty-front/src/modules/views/utils/mapViewFieldsToColumnDefinitions.ts+++ b/packages/twenty-front/src/modules/views/utils/mapViewFieldsToColumnDefinitions.ts@@ -2,7 +2,6 @@ import { type FieldMetadata } from '@/object-record/record-field/ui/types/FieldMimport { type ColumnDefinition } from '@/object-record/record-table/types/ColumnDefinition';import { mapArrayToObject } from '~/utils/array/mapArrayToObject';import { moveArrayItem } from '~/utils/array/moveArrayItem';-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';import { isDefined } from 'twenty-shared/utils';import { type ViewField } from '@/views/types/ViewField';@@ -26,7 +25,7 @@ export const mapViewFieldsToColumnDefinitions = ({const correspondingColumnDefinition =columnDefinitionsByFieldMetadataId[viewField.fieldMetadataId];- if (isUndefinedOrNull(correspondingColumnDefinition)) return null;+ if (!isDefined(correspondingColumnDefinition)) return null;const { isLabelIdentifier } = correspondingColumnDefinition;diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFieldLeaf.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFieldLeaf.tsxindex 80237aa4896..a6f655ba0cc 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFieldLeaf.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFieldLeaf.tsx@@ -6,7 +6,7 @@ import { FormNumberFieldInput } from '@/object-record/record-field/ui/form-typesimport { FormSelectFieldInput } from '@/object-record/record-field/ui/form-types/components/FormSelectFieldInput';import { FormSingleRecordPicker } from '@/object-record/record-field/ui/form-types/components/FormSingleRecordPicker';import { FormTextFieldInput } from '@/object-record/record-field/ui/form-types/components/FormTextFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { type FieldArrayValue } from '@/object-record/record-field/ui/types/FieldMetadata';import { getWorkflowCodeFieldsEnumSelectOptions } from '@/workflow/workflow-steps/workflow-actions/code-action/utils/getWorkflowCodeFieldsEnumSelectOptions';import { getWorkflowCodeFieldsLeafKind } from '@/workflow/workflow-steps/workflow-actions/code-action/utils/getWorkflowCodeFieldsLeafKind';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsxindex 515d6416df5..cf6329cbe44 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx@@ -1,5 +1,5 @@import { FormNestedFieldInputContainer } from '@/object-record/record-field/ui/form-types/components/FormNestedFieldInputContainer';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { InputLabel } from '@/ui/input/components/internal/InputLabel/InputLabel';import { WorkflowEditActionCodeFieldLeaf } from '@/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFieldLeaf';import { getInputSchemaPropertyAtPath } from '@/workflow/workflow-steps/workflow-actions/code-action/utils/getInputSchemaPropertyAtPath';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowFormFieldInput.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowFormFieldInput.tsxindex 68b3fdc7553..d191eeb20ae 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowFormFieldInput.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowFormFieldInput.tsx@@ -1,7 +1,7 @@import { useFieldMetadataItemById } from '@/object-metadata/hooks/useFieldMetadataItemById';import { formatFieldMetadataItemAsFieldDefinition } from '@/object-metadata/utils/formatFieldMetadataItemAsFieldDefinition';import { FormFieldInput } from '@/object-record/record-field/ui/components/FormFieldInput';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { isDefined } from 'twenty-shared/utils';import { type JsonValue } from 'type-fest';diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSendEmailAttachments.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSendEmailAttachments.tsxindex e3e2598d116..59a98982ebc 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSendEmailAttachments.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/components/WorkflowSendEmailAttachments.tsx@@ -1,7 +1,7 @@import { useFileUpload } from '@/file-upload/hooks/useFileUpload';import { AttachmentChip } from '@/file/components/AttachmentChip';import { VariableChip } from '@/object-record/record-field/ui/form-types/components/VariableChip';-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { InputLabel } from '@/ui/input/components/internal/InputLabel/InputLabel';import { useUploadWorkflowFile } from '@/workflow/workflow-steps/workflow-actions/hooks/useUploadWorkflowFile';diff --git a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablePicker.tsx b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablePicker.tsxindex 14b14bb2f37..69afab1f9a7 100644--- a/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablePicker.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-variables/components/WorkflowVariablePicker.tsx@@ -1,4 +1,4 @@-import { type VariablePickerComponent } from '@/object-record/record-field/ui/form-types/types/VariablePickerComponent';+import { type VariablePickerComponent } from '@/ui/input/types/VariablePickerComponent';import { isDropdownOpenComponentState } from '@/ui/layout/dropdown/states/isDropdownOpenComponentState';import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { WorkflowVariablesDropdown } from '@/workflow/workflow-variables/components/WorkflowVariablesDropdown';diff --git a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsx b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsxindex 2d91d46b9bc..61eee7518bf 100644--- a/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsx+++ b/packages/twenty-front/src/pages/settings/admin-panel/SettingsAdminNewAiProvider.tsx@@ -22,7 +22,7 @@ import { Link, useNavigate } from 'react-router-dom';import { slugify } from 'transliteration';import { type AiSdkPackage, isDataResidency } from 'twenty-shared/ai';import { SettingsPath } from 'twenty-shared/types';-import { getSettingsPath } from 'twenty-shared/utils';+import { capitalize, getSettingsPath } from 'twenty-shared/utils';import { InlineBanner, useToast } from 'twenty-ui/components/feedback';import { Section } from 'twenty-ui/components/layout';import { IconPlus } from 'twenty-ui/icon';@@ -80,7 +80,7 @@ export const SettingsAdminNewAiProvider = () => {() =>modelsDevProviders.map((provider) => ({value: provider.id,- label: `${provider.id.charAt(0).toUpperCase() + provider.id.slice(1)} (${provider.modelCount} models)`,+ label: `${capitalize(provider.id)} (${provider.modelCount} models)`,Icon: getProviderIcon(provider.id),})),[modelsDevProviders],@@ -116,10 +116,7 @@ export const SettingsAdminNewAiProvider = () => {form.setValue('npm', suggestion?.npm ?? '@ai-sdk/openai-compatible');- form.setValue(- 'label',- providerId.charAt(0).toUpperCase() + providerId.slice(1),- );+ form.setValue('label', capitalize(providerId));};const handleCustomMode = () => {diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsxindex 90fc28564db..46f253bc430 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx@@ -24,8 +24,8 @@ import {} from '~/generated-metadata/graphql';import { SETTINGS_SKILL_TABLE_METADATA } from '~/pages/settings/ai/constants/SettingsSkillTableMetadata';import { type SettingsSkillTableItem } from '~/pages/settings/ai/types/SettingsSkillTableItem';-import { normalizeSearchText } from '~/utils/normalizeSearchText';import { SettingsAgentSkillsTable } from './SettingsAgentSkillsTable';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledSearchContainer = styled.div`padding-bottom: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTab.tsxindex 457f79321c8..b495ff4b2ed 100644--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTab.tsx+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentToolsTab.tsx@@ -14,7 +14,7 @@ import { SettingsAgentToolsTable } from '~/pages/settings/ai/components/Settingsimport { useSettingsAgentToolsTable } from '~/pages/settings/ai/hooks/useSettingsAgentToolsTable';import { type SettingsAgentToolItem } from '~/pages/settings/ai/types/SettingsAgentToolItem';import { isOwnedByInstalledApplication } from '@/applications/utils/isOwnedByInstalledApplication';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledSearchContainer = styled.div`padding-bottom: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailContentTab.tsx b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailContentTab.tsxindex ef49dec302f..166fd076830 100644--- a/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailContentTab.tsx+++ b/packages/twenty-front/src/pages/settings/applications/tabs/SettingsApplicationDetailContentTab.tsx@@ -18,7 +18,7 @@ import {import { useInstalledTimelineActivityTypes } from '~/pages/settings/applications/hooks/useInstalledTimelineActivityTypes';import { filterSettingsApplicationTimelineActivityTypes } from '~/pages/settings/applications/utils/filterSettingsApplicationTimelineActivityTypes';import { getSettingsApplicationTimelineActivityTypes } from '~/pages/settings/applications/utils/getSettingsApplicationTimelineActivityTypes';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';type InstalledApplicationForContentTab = Omit<Application,diff --git a/packages/twenty-front/src/pages/settings/applications/utils/filterSettingsApplicationTimelineActivityTypes.ts b/packages/twenty-front/src/pages/settings/applications/utils/filterSettingsApplicationTimelineActivityTypes.tsindex 8d3f3a22248..adea66932d1 100644--- a/packages/twenty-front/src/pages/settings/applications/utils/filterSettingsApplicationTimelineActivityTypes.ts+++ b/packages/twenty-front/src/pages/settings/applications/utils/filterSettingsApplicationTimelineActivityTypes.ts@@ -1,7 +1,7 @@import { isNonEmptyString } from '@sniptt/guards';import { isDefined } from 'twenty-shared/utils';import { type SettingsApplicationTimelineActivityType } from '~/pages/settings/applications/types/SettingsApplicationTimelineActivityType';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';export const filterSettingsApplicationTimelineActivityTypes = ({timelineActivityTypes,diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldTable.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldTable.tsxindex a30032719a0..f51d3de7558 100644--- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldTable.tsx+++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldTable.tsx@@ -32,7 +32,7 @@ import { IconArchive, IconCircleDashed, IconSettings } from 'twenty-ui/icon';import { themeCssVariables } from 'twenty-ui/theme';import { useMapFieldMetadataItemToSettingsObjectDetailTableItem } from '~/pages/settings/data-model/hooks/useMapFieldMetadataItemToSettingsObjectDetailTableItem';import { type SettingsObjectDetailTableItem } from '~/pages/settings/data-model/types/SettingsObjectDetailTableItem';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledSearchContainer = styled.div`padding-bottom: ${themeCssVariables.spacing[2]};diff --git a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsxindex d011e164490..9e073c0e5b7 100644--- a/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx+++ b/packages/twenty-front/src/pages/settings/data-model/SettingsObjectTable.tsx@@ -37,7 +37,7 @@ import { MOBILE_VIEWPORT, useTheme, themeCssVariables } from 'twenty-ui/theme';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { GET_SETTINGS_OBJECT_TABLE_METADATA } from '~/pages/settings/data-model/constants/SettingsObjectTableMetadata';import type { SettingsObjectTableItem } from '~/pages/settings/data-model/types/SettingsObjectTableItem';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledIconChevronRightContainer = styled.div`color: ${themeCssVariables.font.color.tertiary};diff --git a/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx b/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsxindex 50c00147a69..95b753c02d5 100644--- a/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx+++ b/packages/twenty-front/src/pages/settings/members/tabs/SettingsWorkspaceMembersTeamTab.tsx@@ -37,7 +37,7 @@ import { useDebounce } from 'use-debounce';import { useNavigateApp } from '~/hooks/useNavigateApp';import { useNavigateSettings } from '~/hooks/useNavigateSettings';import { getAbsoluteImageUrl } from '~/utils/image/getAbsoluteImageUrl';-import { normalizeSearchText } from '~/utils/normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';const StyledTableContainer = styled.div<{ hasMoreRows?: boolean }>`> div {diff --git a/packages/twenty-front/src/utils/__tests__/isUndefinedOrNull.test.ts b/packages/twenty-front/src/utils/__tests__/isUndefinedOrNull.test.tsdeleted file mode 100644index 3c1f2f6111d..00000000000--- a/packages/twenty-front/src/utils/__tests__/isUndefinedOrNull.test.ts+++ /dev/null@@ -1,31 +0,0 @@-import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';--describe('isUndefinedOrNull', () => {- it('should return true for null', () => {- expect(isUndefinedOrNull(null)).toBe(true);- });-- it('should return true for undefined', () => {- expect(isUndefinedOrNull(undefined)).toBe(true);- });-- it('should return false for a number', () => {- expect(isUndefinedOrNull(0)).toBe(false);- expect(isUndefinedOrNull(42)).toBe(false);- });-- it('should return false for a string', () => {- expect(isUndefinedOrNull('')).toBe(false);- expect(isUndefinedOrNull('hello')).toBe(false);- });-- it('should return false for an object', () => {- expect(isUndefinedOrNull({})).toBe(false);- expect(isUndefinedOrNull([])).toBe(false);- });-- it('should return false for a boolean', () => {- expect(isUndefinedOrNull(false)).toBe(false);- expect(isUndefinedOrNull(true)).toBe(false);- });-});diff --git a/packages/twenty-front/src/utils/compareNonEmptyStrings.ts b/packages/twenty-front/src/utils/compareNonEmptyStrings.tsindex 90995d079d8..df93e7e8a2a 100644--- a/packages/twenty-front/src/utils/compareNonEmptyStrings.ts+++ b/packages/twenty-front/src/utils/compareNonEmptyStrings.ts@@ -1,5 +1,5 @@import { isNonEmptyString } from '@sniptt/guards';-import { type Nullable } from 'twenty-ui/utilities';+import { type Nullable } from 'twenty-shared/types';export const compareNonEmptyStrings = (valueA: Nullable<string>,diff --git a/packages/twenty-front/src/utils/compareStrictlyExceptForNullAndUndefined.ts b/packages/twenty-front/src/utils/compareStrictlyExceptForNullAndUndefined.tsindex 35a2569592c..2899f4fe0d7 100644--- a/packages/twenty-front/src/utils/compareStrictlyExceptForNullAndUndefined.ts+++ b/packages/twenty-front/src/utils/compareStrictlyExceptForNullAndUndefined.ts@@ -1,5 +1,5 @@import { isDefined } from 'twenty-shared/utils';-import { type Nullable } from 'twenty-ui/utilities';+import { type Nullable } from 'twenty-shared/types';// TODO: we should create a custom oxlint rule that enforces the use of this function// instead of using the `===` operator where a and b are | undefined | nulldiff --git a/packages/twenty-front/src/utils/filterBySearchQuery.ts b/packages/twenty-front/src/utils/filterBySearchQuery.tsindex 9d413f4b5f0..61b6d18a9f6 100644--- a/packages/twenty-front/src/utils/filterBySearchQuery.ts+++ b/packages/twenty-front/src/utils/filterBySearchQuery.ts@@ -1,6 +1,6 @@import { isNonEmptyString } from '@sniptt/guards';-import { normalizeSearchText } from './normalizeSearchText';+import { normalizeSearchText } from 'twenty-ui/utilities';type FilterBySearchQueryParams<T> = {items: T[];diff --git a/packages/twenty-front/src/utils/isUndefinedOrNull.ts b/packages/twenty-front/src/utils/isUndefinedOrNull.tsdeleted file mode 100644index 176380e2b19..00000000000--- a/packages/twenty-front/src/utils/isUndefinedOrNull.ts+++ /dev/null@@ -1,4 +0,0 @@-import { isNull, isUndefined } from '@sniptt/guards';--export const isUndefinedOrNull = (value: any): value is null | undefined =>- isUndefined(value) || isNull(value);diff --git a/packages/twenty-front/src/utils/normalizeSearchText.ts b/packages/twenty-front/src/utils/normalizeSearchText.tsdeleted file mode 100644index 895e35c9f93..00000000000--- a/packages/twenty-front/src/utils/normalizeSearchText.ts+++ /dev/null@@ -1 +0,0 @@-export { normalizeSearchText } from 'twenty-ui/utilities';