The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
feat(record-form): render the record creation form behind a flag (#25203)
Thomas Trompette40eba2dad3ca
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphqlindex ef806aafda6..58eee974177 100644--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql@@ -1915,6 +1915,7 @@ enum FeatureFlagKey {IS_API_RATE_LIMIT_V2_ENABLEDIS_MESSAGE_CALENDAR_TARGET_READ_ENABLEDIS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED+ IS_RECORD_CREATION_FORM_ENABLED}type WorkspaceUrls {diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.tsindex 086a79bfc63..93801aab4aa 100644--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts@@ -1533,7 +1533,7 @@ export interface FeatureFlag {__typename: 'FeatureFlag'}-export type FeatureFlagKey = 'IS_APP_CLAIMING_ENABLED' | 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_EMAIL_GROUP_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' | 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' | 'IS_WORKFLOW_CORE_INDEX_PAGE_ENABLED' | 'IS_API_RATE_LIMIT_V2_ENABLED' | 'IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED' | 'IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED'+export type FeatureFlagKey = 'IS_APP_CLAIMING_ENABLED' | 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_EMAIL_GROUP_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' | 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' | 'IS_WORKFLOW_CORE_INDEX_PAGE_ENABLED' | 'IS_API_RATE_LIMIT_V2_ENABLED' | 'IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED' | 'IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED' | 'IS_RECORD_CREATION_FORM_ENABLED'export interface WorkspaceUrls {customUrl?: Scalars['String']@@ -10394,7 +10394,8 @@ export const enumFeatureFlagKey = {IS_WORKFLOW_CORE_INDEX_PAGE_ENABLED: 'IS_WORKFLOW_CORE_INDEX_PAGE_ENABLED' as const,IS_API_RATE_LIMIT_V2_ENABLED: 'IS_API_RATE_LIMIT_V2_ENABLED' as const,IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED: 'IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED' as const,- IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED: 'IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED' as const+ IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED: 'IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED' as const,+ IS_RECORD_CREATION_FORM_ENABLED: 'IS_RECORD_CREATION_FORM_ENABLED' as const}export const enumIdentityProviderType = {diff --git a/packages/twenty-front/src/generated-admin/graphql.ts b/packages/twenty-front/src/generated-admin/graphql.tsindex eb6916bd475..e944f176edd 100644--- a/packages/twenty-front/src/generated-admin/graphql.ts+++ b/packages/twenty-front/src/generated-admin/graphql.ts@@ -408,6 +408,7 @@ export enum FeatureFlagKey {IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED = 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED',IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED = 'IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED',IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED = 'IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED',+ IS_RECORD_CREATION_FORM_ENABLED = 'IS_RECORD_CREATION_FORM_ENABLED',IS_REST_METADATA_API_NEW_FORMAT_DIRECT = 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT',IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED',IS_WORKFLOW_CORE_INDEX_PAGE_ENABLED = 'IS_WORKFLOW_CORE_INDEX_PAGE_ENABLED'diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.tsindex 85aacac3afb..c95069102b9 100644--- a/packages/twenty-front/src/generated-metadata/graphql.ts+++ b/packages/twenty-front/src/generated-metadata/graphql.ts@@ -1953,6 +1953,7 @@ export enum FeatureFlagKey {IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED = 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED',IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED = 'IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED',IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED = 'IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED',+ IS_RECORD_CREATION_FORM_ENABLED = 'IS_RECORD_CREATION_FORM_ENABLED',IS_REST_METADATA_API_NEW_FORMAT_DIRECT = 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT',IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED',IS_WORKFLOW_CORE_INDEX_PAGE_ENABLED = 'IS_WORKFLOW_CORE_INDEX_PAGE_ENABLED'@@ -8549,6 +8550,43 @@ export type UpsertViewWidgetMutationVariables = Exact<{export type UpsertViewWidgetMutation = { __typename?: 'Mutation', upsertViewWidget: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: string | null, calendarEndFieldMetadataId?: string | null, calendarLayout?: ViewCalendarLayout | null, visibility: ViewVisibility, createdByUserWorkspaceId?: string | null, isActive: boolean, viewFields: Array<{ __typename?: 'ViewField', id: string, fieldMetadataId: string, viewId: string, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, viewFieldGroupId?: string | null, isActive: boolean, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFieldGroups: Array<{ __typename?: 'ViewFieldGroup', id: string, name: string, position: number, isVisible: boolean, viewId: string, isActive: boolean, createdAt: string, updatedAt: string, deletedAt?: string | null, viewFields: Array<{ __typename?: 'ViewField', id: string, fieldMetadataId: string, viewId: string, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, viewFieldGroupId?: string | null, isActive: boolean, createdAt: string, updatedAt: string, deletedAt?: string | null }> }>, viewFilters: Array<{ __typename?: 'ViewFilter', id: string, fieldMetadataId: string, operand: ViewFilterOperand, value: any, viewFilterGroupId?: string | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, relationTargetFieldMetadataId?: string | null, viewId: string, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilterGroups: Array<{ __typename?: 'ViewFilterGroup', id: string, parentViewFilterGroupId?: string | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: string }>, viewSorts: Array<{ __typename?: 'ViewSort', id: string, fieldMetadataId: string, direction: ViewSortDirection, subFieldName?: string | null, viewId: string, createdAt: string, deletedAt?: string | null, updatedAt: string }>, viewGroups: Array<{ __typename?: 'ViewGroup', id: string, isVisible: boolean, fieldValue: string, position: number, viewId: string, createdAt: string, updatedAt: string, deletedAt?: string | null }> } };+export type FindAllRecordFormPageLayoutsQueryVariables = Exact<{ [key: string]: never; }>;+++export type FindAllRecordFormPageLayoutsQuery = { __typename?: 'Query', getPageLayouts: Array<{ __typename?: 'PageLayout', id: string, applicationId: string, name: string, objectMetadataId?: string | null, type: PageLayoutType, universalIdentifier: string, isSystemSideEffect: boolean, isFirstTabPinned: boolean, defaultTabToFocusOnMobileAndSidePanelId?: string | null, createdAt: string, updatedAt: string, tabs?: Array<{ __typename?: 'PageLayoutTab', id: string, applicationId: string, universalIdentifier: string, isSystemSideEffect: boolean, title: string, icon?: string | null, position: number, layoutMode?: PageLayoutTabLayoutMode | null, pageLayoutId: string, isActive: boolean, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: string, applicationId: string, universalIdentifier: string, isSystemSideEffect: boolean, title: string, type: WidgetType, objectMetadataId?: string | null, createdAt: string, updatedAt: string, isActive: boolean, deletedAt?: string | null, conditionalDisplay?: any | null, conditionalAvailabilityExpression?: string | null, pageLayoutTabId: string, gridPosition?: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number } | null, position?:+ | { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode }+ | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number }+ | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number }+ | null, configuration:+ | { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, numberFormat?: ChartNumberFormat | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: string, optionValue: string } | null }+ | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array<string> | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array<string> | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, numberFormat?: ChartNumberFormat | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, splitMultiValueFields?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null }+ | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'CallRecordingSummaryConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'CallRecordingTranscriptConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'EmailThreadConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType, fieldDisplayMode: FieldDisplayMode, fieldMetadataId: string, viewId?: string | null, nestedRelationFieldMetadataId?: string | null, isUIEditable?: boolean | null }+ | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType, viewId?: string | null, newFieldDefaultVisibility?: boolean | null, shouldAllowUserToSeeHiddenFields?: boolean | null }+ | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'FormFieldConfiguration', configurationType: WidgetConfigurationType, fieldMetadataId: string }+ | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: string, headerCommandMenuItemUniversalIdentifiers?: Array<string> | null }+ | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null }+ | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array<string> | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array<string> | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, numberFormat?: ChartNumberFormat | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, splitMultiValueFields?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null }+ | { __typename?: 'MessageCampaignBodyConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'MessageCampaignDetailsConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: string, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array<string> | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, numberFormat?: ChartNumberFormat | null, hideEmptyCategory?: boolean | null, splitMultiValueFields?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null }+ | { __typename?: 'RecordTableConfiguration', configurationType: WidgetConfigurationType, viewId?: string | null, recordLimit?: number | null, isUIEditable?: boolean | null }+ | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextBody', blocknote?: string | null, markdown?: string | null } }+ | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType }+ | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType }+ }> | null }> | null }> };+export type FindAllRecordPageLayoutsQueryVariables = Exact<{ [key: string]: never; }>;@@ -9884,6 +9922,7 @@ export const ResetPageLayoutWidgetToDefaultDocument = {"kind":"Document","definiexport const UpdatePageLayoutWithTabsAndWidgetsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdatePageLayoutWithTabsAndWidgets"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdatePageLayoutWithTabsInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updatePageLayoutWithTabsAndWidgets"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"isFirstTabPinned"}},{"kind":"Field","name":{"kind":"Name","value":"defaultTabToFocusOnMobileAndSidePanelId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"tabs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutTabFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutWidgetFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidget"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"gridPosition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}}]}},{"kind":"Field","name":{"kind":"Name","value":"position"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetGridPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetVerticalListPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"index"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetCanvasPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"configuration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BarChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"groupMode"}},{"kind":"Field","name":{"kind":"Name","value":"layout"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LineChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"isStacked"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PieChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"groupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"groupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"dateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"orderBy"}},{"kind":"Field","name":{"kind":"Name","value":"manualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"showCenterMetric"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"hideEmptyCategory"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AggregateChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"prefix"}},{"kind":"Field","name":{"kind":"Name","value":"suffix"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}},{"kind":"Field","name":{"kind":"Name","value":"ratioAggregateConfig"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"optionValue"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"IframeConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StandaloneRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blocknote"}},{"kind":"Field","name":{"kind":"Name","value":"markdown"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CalendarConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingSummaryConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingTranscriptConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignBodyConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignDetailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"fieldDisplayMode"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"nestedRelationFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"newFieldDefaultVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"shouldAllowUserToSeeHiddenFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FormFieldConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FilesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NotesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TasksConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TimelineConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RecordTableConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"recordLimit"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowRunConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowVersionConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FrontComponentConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"headerCommandMenuItemUniversalIdentifiers"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutTabId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutTabFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutTab"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"widgets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutWidgetFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<UpdatePageLayoutWithTabsAndWidgetsMutation, UpdatePageLayoutWithTabsAndWidgetsMutationVariables>;export const UpsertFieldsWidgetDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpsertFieldsWidget"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpsertFieldsWidgetInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"upsertFieldsWidget"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"viewFieldGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFieldGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewFields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFilterFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFilter"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"operand"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"viewFilterGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"positionInViewFilterGroup"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"relationTargetFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFilterGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFilterGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"parentViewFilterGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"logicalOperator"}},{"kind":"Field","name":{"kind":"Name","value":"positionInViewFilterGroup"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewSortFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewSort"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"fieldValue"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"View"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"isCompact"}},{"kind":"Field","name":{"kind":"Name","value":"kanbanAggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"kanbanAggregateOperationFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"mainGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"shouldHideEmptyGroups"}},{"kind":"Field","name":{"kind":"Name","value":"kanbanColumnWidth"}},{"kind":"Field","name":{"kind":"Name","value":"anyFieldFilterValue"}},{"kind":"Field","name":{"kind":"Name","value":"calendarFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"calendarEndFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"calendarLayout"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"createdByUserWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"viewFields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewFieldGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldGroupFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewFilters"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewFilterGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterGroupFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewSorts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewSortFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewGroupFragment"}}]}}]}}]} as unknown as DocumentNode<UpsertFieldsWidgetMutation, UpsertFieldsWidgetMutationVariables>;export const UpsertViewWidgetDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpsertViewWidget"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpsertViewWidgetInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"upsertViewWidget"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewField"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"size"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"viewFieldGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFieldGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFieldGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewFields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFilterFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFilter"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"operand"}},{"kind":"Field","name":{"kind":"Name","value":"value"}},{"kind":"Field","name":{"kind":"Name","value":"viewFilterGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"positionInViewFilterGroup"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"relationTargetFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFilterGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewFilterGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"parentViewFilterGroupId"}},{"kind":"Field","name":{"kind":"Name","value":"logicalOperator"}},{"kind":"Field","name":{"kind":"Name","value":"positionInViewFilterGroup"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewSortFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewSort"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"direction"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewGroupFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isVisible"}},{"kind":"Field","name":{"kind":"Name","value":"fieldValue"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"View"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"isCompact"}},{"kind":"Field","name":{"kind":"Name","value":"kanbanAggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"kanbanAggregateOperationFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"mainGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"shouldHideEmptyGroups"}},{"kind":"Field","name":{"kind":"Name","value":"kanbanColumnWidth"}},{"kind":"Field","name":{"kind":"Name","value":"anyFieldFilterValue"}},{"kind":"Field","name":{"kind":"Name","value":"calendarFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"calendarEndFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"calendarLayout"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"createdByUserWorkspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"viewFields"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewFieldGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldGroupFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewFilters"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewFilterGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterGroupFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewSorts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewSortFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewGroupFragment"}}]}}]}}]} as unknown as DocumentNode<UpsertViewWidgetMutation, UpsertViewWidgetMutationVariables>;+export const FindAllRecordFormPageLayoutsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindAllRecordFormPageLayouts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getPageLayouts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"pageLayoutType"},"value":{"kind":"EnumValue","value":"RECORD_FORM"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutWidgetFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidget"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"gridPosition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}}]}},{"kind":"Field","name":{"kind":"Name","value":"position"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetGridPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetVerticalListPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"index"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetCanvasPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"configuration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BarChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"groupMode"}},{"kind":"Field","name":{"kind":"Name","value":"layout"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LineChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"isStacked"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PieChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"groupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"groupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"dateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"orderBy"}},{"kind":"Field","name":{"kind":"Name","value":"manualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"showCenterMetric"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"hideEmptyCategory"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AggregateChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"prefix"}},{"kind":"Field","name":{"kind":"Name","value":"suffix"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}},{"kind":"Field","name":{"kind":"Name","value":"ratioAggregateConfig"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"optionValue"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"IframeConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StandaloneRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blocknote"}},{"kind":"Field","name":{"kind":"Name","value":"markdown"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CalendarConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingSummaryConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingTranscriptConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignBodyConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignDetailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"fieldDisplayMode"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"nestedRelationFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"newFieldDefaultVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"shouldAllowUserToSeeHiddenFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FormFieldConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FilesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NotesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TasksConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TimelineConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RecordTableConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"recordLimit"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowRunConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowVersionConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FrontComponentConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"headerCommandMenuItemUniversalIdentifiers"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutTabId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutTabFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutTab"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"widgets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutWidgetFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayout"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"isFirstTabPinned"}},{"kind":"Field","name":{"kind":"Name","value":"defaultTabToFocusOnMobileAndSidePanelId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"tabs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutTabFragment"}}]}}]}}]} as unknown as DocumentNode<FindAllRecordFormPageLayoutsQuery, FindAllRecordFormPageLayoutsQueryVariables>;export const FindAllRecordPageLayoutsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindAllRecordPageLayouts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getPageLayouts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"pageLayoutType"},"value":{"kind":"EnumValue","value":"RECORD_PAGE"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutWidgetFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidget"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"conditionalAvailabilityExpression"}},{"kind":"Field","name":{"kind":"Name","value":"gridPosition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}}]}},{"kind":"Field","name":{"kind":"Name","value":"position"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetGridPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"row"}},{"kind":"Field","name":{"kind":"Name","value":"column"}},{"kind":"Field","name":{"kind":"Name","value":"rowSpan"}},{"kind":"Field","name":{"kind":"Name","value":"columnSpan"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetVerticalListPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"index"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutWidgetCanvasPosition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"configuration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"BarChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"groupMode"}},{"kind":"Field","name":{"kind":"Name","value":"layout"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LineChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"primaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisGroupByDateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisOrderBy"}},{"kind":"Field","name":{"kind":"Name","value":"secondaryAxisManualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"omitNullValues"}},{"kind":"Field","name":{"kind":"Name","value":"axisNameDisplay"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMin"}},{"kind":"Field","name":{"kind":"Name","value":"rangeMax"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"isStacked"}},{"kind":"Field","name":{"kind":"Name","value":"isCumulative"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PieChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"groupByFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"groupBySubFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"dateGranularity"}},{"kind":"Field","name":{"kind":"Name","value":"orderBy"}},{"kind":"Field","name":{"kind":"Name","value":"manualSortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"showCenterMetric"}},{"kind":"Field","name":{"kind":"Name","value":"displayLegend"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"hideEmptyCategory"}},{"kind":"Field","name":{"kind":"Name","value":"splitMultiValueFields"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AggregateChartConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"aggregateOperation"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"displayDataLabel"}},{"kind":"Field","name":{"kind":"Name","value":"numberFormat"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"filter"}},{"kind":"Field","name":{"kind":"Name","value":"prefix"}},{"kind":"Field","name":{"kind":"Name","value":"suffix"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"firstDayOfTheWeek"}},{"kind":"Field","name":{"kind":"Name","value":"ratioAggregateConfig"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"optionValue"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"IframeConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StandaloneRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blocknote"}},{"kind":"Field","name":{"kind":"Name","value":"markdown"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CalendarConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingSummaryConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CallRecordingTranscriptConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignBodyConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MessageCampaignDetailsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"fieldDisplayMode"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"nestedRelationFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldRichTextConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FieldsConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"newFieldDefaultVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"shouldAllowUserToSeeHiddenFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FormFieldConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FilesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"NotesConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TasksConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TimelineConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ViewConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RecordTableConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"viewId"}},{"kind":"Field","name":{"kind":"Name","value":"recordLimit"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowRunConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkflowVersionConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FrontComponentConfiguration"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configurationType"}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentId"}},{"kind":"Field","name":{"kind":"Name","value":"headerCommandMenuItemUniversalIdentifiers"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutTabId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutTabFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayoutTab"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"layoutMode"}},{"kind":"Field","name":{"kind":"Name","value":"widgets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutWidgetFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageLayoutId"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PageLayoutFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PageLayout"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"objectMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isSystemSideEffect"}},{"kind":"Field","name":{"kind":"Name","value":"isFirstTabPinned"}},{"kind":"Field","name":{"kind":"Name","value":"defaultTabToFocusOnMobileAndSidePanelId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"tabs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutTabFragment"}}]}}]}}]} as unknown as DocumentNode<FindAllRecordPageLayoutsQuery, FindAllRecordPageLayoutsQueryVariables>;export const CallRecordingIdForCalendarEventDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CallRecordingIdForCalendarEvent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"calendarEventId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"callRecordingIdForCalendarEvent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"calendarEventId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"calendarEventId"}}}]}]}}]} as unknown as DocumentNode<CallRecordingIdForCalendarEventQuery, CallRecordingIdForCalendarEventQueryVariables>;export const BarChartDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"BarChartData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"BarChartDataInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"barChartData"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"}},{"kind":"Field","name":{"kind":"Name","value":"indexBy"}},{"kind":"Field","name":{"kind":"Name","value":"keys"}},{"kind":"Field","name":{"kind":"Name","value":"series"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}},{"kind":"Field","name":{"kind":"Name","value":"xAxisLabel"}},{"kind":"Field","name":{"kind":"Name","value":"yAxisLabel"}},{"kind":"Field","name":{"kind":"Name","value":"showLegend"}},{"kind":"Field","name":{"kind":"Name","value":"showDataLabels"}},{"kind":"Field","name":{"kind":"Name","value":"layout"}},{"kind":"Field","name":{"kind":"Name","value":"groupMode"}},{"kind":"Field","name":{"kind":"Name","value":"hasTooManyGroups"}},{"kind":"Field","name":{"kind":"Name","value":"formattedToRawLookup"}}]}}]}}]} as unknown as DocumentNode<BarChartDataQuery, BarChartDataQueryVariables>;diff --git a/packages/twenty-front/src/modules/app/components/WorkspaceAppProviders.tsx b/packages/twenty-front/src/modules/app/components/WorkspaceAppProviders.tsxindex c74a4444bda..fa4b1c68fbd 100644--- a/packages/twenty-front/src/modules/app/components/WorkspaceAppProviders.tsx+++ b/packages/twenty-front/src/modules/app/components/WorkspaceAppProviders.tsx@@ -22,6 +22,7 @@ import { IsMinimalMetadataReadyEffect } from '@/metadata-store/effect-componentsimport { MinimalMetadataLoadEffect } from '@/metadata-store/effect-components/MinimalMetadataLoadEffect';import { UserMetadataProviderInitialEffect } from '@/metadata-store/effect-components/UserMetadataProviderInitialEffect';import { ApolloCoreProvider } from '@/object-metadata/components/ApolloCoreProvider';+import { RecordCreationFormProvider } from '@/object-record/record-form/components/RecordCreationFormProvider';import { WelcomeOverlay } from '@/onboarding/components/WelcomeOverlay/WelcomeOverlay';import { CompanyEnrichmentOnboardingEffect } from '@/onboarding/effect-components/CompanyEnrichmentOnboardingEffect';import { ApolloAdminProvider } from '@/settings/admin-panel/apollo/components/ApolloAdminProvider';@@ -75,10 +76,12 @@ export const WorkspaceAppProviders = () => {<GotoHotkeysEffectsProvider /><PageTitle title={pageTitle} /><PageFavicon />- <Outlet />- <GlobalFilePreviewModal />- <CommandMenuConfirmationModalManager />- <CommandRunner />+ <RecordCreationFormProvider>+ <Outlet />+ <GlobalFilePreviewModal />+ <CommandMenuConfirmationModalManager />+ <CommandRunner />+ </RecordCreationFormProvider></StrictMode></DialogManager></DialogComponentInstanceContext.Provider>diff --git a/packages/twenty-front/src/modules/metadata-store/hooks/useLoadStaleMetadataEntities.ts b/packages/twenty-front/src/modules/metadata-store/hooks/useLoadStaleMetadataEntities.tsindex 1311cea102f..ea2323f34e7 100644--- a/packages/twenty-front/src/modules/metadata-store/hooks/useLoadStaleMetadataEntities.ts+++ b/packages/twenty-front/src/modules/metadata-store/hooks/useLoadStaleMetadataEntities.ts@@ -12,6 +12,7 @@ import {FindAllViewsDocument,FindManyCommandMenuItemsDocument,FindAllRecordPageLayoutsDocument,+ FindAllRecordFormPageLayoutsDocument,FindFieldsWidgetViewsDocument,FindTableWidgetViewsDocument,FindManyFrontComponentsDocument,@@ -146,29 +147,33 @@ export const useLoadStaleMetadataEntities = () => {if (hasOverlap(staleEntityKeys, PAGE_LAYOUTS_GROUP_KEYS)) {fetchPromises.push(- client- .query({+ Promise.all([+ client.query({query: FindAllRecordPageLayoutsDocument,fetchPolicy: 'network-only',- })- .then((result) => {- if (!isDefined(result.data?.getPageLayouts)) {- return;- }+ }),+ client.query({+ query: FindAllRecordFormPageLayoutsDocument,+ fetchPolicy: 'network-only',+ }),+ ]).then(([recordPageResult, recordFormResult]) => {+ const allPageLayouts = [+ ...(recordPageResult.data?.getPageLayouts ?? []),+ ...(recordFormResult.data?.getPageLayouts ?? []),+ ];- const transformed =- result.data.getPageLayouts.map(transformPageLayout);+ const transformed = allPageLayouts.map(transformPageLayout);- const {- flatPageLayouts,- flatPageLayoutTabs,- flatPageLayoutWidgets,- } = splitPageLayoutWithRelated(transformed);+ const {+ flatPageLayouts,+ flatPageLayoutTabs,+ flatPageLayoutWidgets,+ } = splitPageLayoutWithRelated(transformed);- replaceDraft('pageLayouts', flatPageLayouts);- replaceDraft('pageLayoutTabs', flatPageLayoutTabs);- replaceDraft('pageLayoutWidgets', flatPageLayoutWidgets);- }),+ replaceDraft('pageLayouts', flatPageLayouts);+ replaceDraft('pageLayoutTabs', flatPageLayoutTabs);+ replaceDraft('pageLayoutWidgets', flatPageLayoutWidgets);+ }),);}diff --git a/packages/twenty-front/src/modules/object-record/record-form/components/RecordCreationFormCancellationEffect.tsx b/packages/twenty-front/src/modules/object-record/record-form/components/RecordCreationFormCancellationEffect.tsxnew file mode 100644index 00000000000..6471af70da4--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/components/RecordCreationFormCancellationEffect.tsx@@ -0,0 +1,31 @@+import { isSidePanelOpenedState } from '@/side-panel/states/isSidePanelOpenedState';+import { sidePanelNavigationStackState } from '@/side-panel/states/sidePanelNavigationStackState';+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { useEffect } from 'react';++type RecordCreationFormCancellationEffectProps = {+ requestId: string;+ onCancel: (params: { requestId: string }) => void;+};++export const RecordCreationFormCancellationEffect = ({+ requestId,+ onCancel,+}: RecordCreationFormCancellationEffectProps) => {+ const sidePanelNavigationStack = useAtomStateValue(+ sidePanelNavigationStackState,+ );+ const isSidePanelOpened = useAtomStateValue(isSidePanelOpenedState);++ const isRecordCreationFormOpen =+ isSidePanelOpened &&+ sidePanelNavigationStack.some(({ pageId }) => pageId === requestId);++ useEffect(() => {+ if (!isRecordCreationFormOpen) {+ onCancel({ requestId });+ }+ }, [isRecordCreationFormOpen, onCancel, requestId]);++ return null;+};diff --git a/packages/twenty-front/src/modules/object-record/record-form/components/RecordCreationFormProvider.tsx b/packages/twenty-front/src/modules/object-record/record-form/components/RecordCreationFormProvider.tsxnew file mode 100644index 00000000000..552003885a4--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/components/RecordCreationFormProvider.tsx@@ -0,0 +1,182 @@+import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';+import { RecordCreationFormCancellationEffect } from '@/object-record/record-form/components/RecordCreationFormCancellationEffect';+import {+ RecordCreationFormContext,+ type RecordCreationFormContextValue,+} from '@/object-record/record-form/contexts/RecordCreationFormContext';+import { type ObjectRecord } from '@/object-record/types/ObjectRecord';+import { useSidePanelMenu } from '@/side-panel/hooks/useSidePanelMenu';+import { recordCreationFormRequestComponentState } from '@/side-panel/pages/record-creation-form/states/recordCreationFormRequestComponentState';+import { t } from '@lingui/core/macro';+import { useStore } from 'jotai';+import { type ReactNode, useCallback, useMemo, useState } from 'react';+import { SidePanelPages } from 'twenty-shared/types';+import { isDefined } from 'twenty-shared/utils';+import { IconPlus } from 'twenty-ui/icon';+import { v4 } from 'uuid';++type PendingRecordCreation = {+ requestId: string;+ objectMetadataLabelSingular: string;+ createRecord: (draftRecord: Partial<ObjectRecord>) => Promise<ObjectRecord>;+ resolve: (createdRecord: ObjectRecord | null) => void;+ isSettling: boolean;+};++type RecordCreationFormProviderProps = {+ children: ReactNode;+};++export const RecordCreationFormProvider = ({+ children,+}: RecordCreationFormProviderProps) => {+ const store = useStore();+ const { navigateSidePanelMenu } = useSidePanelMenu();++ const [pendingRecordCreations, setPendingRecordCreations] = useState<+ PendingRecordCreation[]+ >([]);++ const settleRecordCreationDraft = useCallback(+ async ({+ requestId,+ draftRecord,+ }: {+ requestId: string;+ draftRecord: Partial<ObjectRecord> | null;+ }) => {+ const pendingRecordCreation = pendingRecordCreations.find(+ (candidate) => candidate.requestId === requestId,+ );++ if (+ !isDefined(pendingRecordCreation) ||+ pendingRecordCreation.isSettling+ ) {+ return;+ }++ if (draftRecord === null) {+ pendingRecordCreation.resolve(null);++ setPendingRecordCreations((previousPendingRecordCreations) =>+ previousPendingRecordCreations.filter(+ (candidate) => candidate.requestId !== requestId,+ ),+ );++ return;+ }++ setPendingRecordCreations((previousPendingRecordCreations) =>+ previousPendingRecordCreations.map((candidate) =>+ candidate.requestId === requestId+ ? { ...candidate, isSettling: true }+ : candidate,+ ),+ );++ try {+ const createdRecord =+ await pendingRecordCreation.createRecord(draftRecord);++ pendingRecordCreation.resolve(createdRecord);++ setPendingRecordCreations((previousPendingRecordCreations) =>+ previousPendingRecordCreations.filter(+ (candidate) => candidate.requestId !== requestId,+ ),+ );+ } catch {+ setPendingRecordCreations((previousPendingRecordCreations) =>+ previousPendingRecordCreations.map((candidate) =>+ candidate.requestId === requestId+ ? { ...candidate, isSettling: false }+ : candidate,+ ),+ );++ navigateSidePanelMenu({+ page: SidePanelPages.RecordCreationForm,+ pageTitle: t`New ${pendingRecordCreation.objectMetadataLabelSingular}`,+ pageIcon: IconPlus,+ pageId: requestId,+ });+ }+ },+ [navigateSidePanelMenu, pendingRecordCreations],+ );++ const requestRecordCreation = useCallback(+ ({+ objectMetadataItem,+ initialDraftRecord,+ createRecord,+ }: {+ objectMetadataItem: EnrichedObjectMetadataItem;+ initialDraftRecord?: Partial<ObjectRecord>;+ createRecord: (+ draftRecord: Partial<ObjectRecord>,+ ) => Promise<ObjectRecord>;+ }) => {+ const requestId = v4();++ store.set(+ recordCreationFormRequestComponentState.atomFamily({+ instanceId: requestId,+ }),+ {+ requestId,+ objectMetadataId: objectMetadataItem.id,+ initialDraftRecord: initialDraftRecord ?? {},+ },+ );++ return new Promise<ObjectRecord | null>((resolve) => {+ setPendingRecordCreations((previousPendingRecordCreations) => [+ ...previousPendingRecordCreations,+ {+ requestId,+ objectMetadataLabelSingular: objectMetadataItem.labelSingular,+ createRecord,+ resolve,+ isSettling: false,+ },+ ]);++ navigateSidePanelMenu({+ page: SidePanelPages.RecordCreationForm,+ pageTitle: t`New ${objectMetadataItem.labelSingular}`,+ pageIcon: IconPlus,+ pageId: requestId,+ });+ });+ },+ [navigateSidePanelMenu, store],+ );++ const cancelPendingRecordCreation = useCallback(+ ({ requestId }: { requestId: string }) => {+ settleRecordCreationDraft({ requestId, draftRecord: null });+ },+ [settleRecordCreationDraft],+ );++ const contextValue = useMemo<RecordCreationFormContextValue>(+ () => ({ requestRecordCreation, settleRecordCreationDraft }),+ [requestRecordCreation, settleRecordCreationDraft],+ );++ return (+ <RecordCreationFormContext.Provider value={contextValue}>+ {children}+ {pendingRecordCreations.map(({ requestId }) => (+ <RecordCreationFormCancellationEffect+ key={requestId}+ requestId={requestId}+ onCancel={cancelPendingRecordCreation}+ />+ ))}+ </RecordCreationFormContext.Provider>+ );+};diff --git a/packages/twenty-front/src/modules/object-record/record-form/components/RecordFormFieldInputs.tsx b/packages/twenty-front/src/modules/object-record/record-form/components/RecordFormFieldInputs.tsxnew file mode 100644index 00000000000..1e8df9dafcc--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/components/RecordFormFieldInputs.tsx@@ -0,0 +1,51 @@+import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';+import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';+import { formatFieldMetadataItemAsFieldDefinition } from '@/object-metadata/utils/formatFieldMetadataItemAsFieldDefinition';+import { getFieldMetadataItemGqlFieldName } from '@/object-metadata/utils/getFieldMetadataItemGqlFieldName';+import { FormFieldInput } from '@/object-record/record-field/ui/components/FormFieldInput';+import { type ObjectRecord } from '@/object-record/types/ObjectRecord';+import { styled } from '@linaria/react';+import { type JsonValue } from 'type-fest';+import { themeCssVariables } from 'twenty-ui/theme-constants';++const StyledFieldList = styled.div`+ display: flex;+ flex-direction: column;+ gap: ${themeCssVariables.spacing[3]};+`;++type RecordFormFieldInputsProps = {+ objectMetadataItem: EnrichedObjectMetadataItem;+ fieldMetadataItems: FieldMetadataItem[];+ draftRecord: Partial<ObjectRecord>;+ onFieldValueChange: (gqlFieldName: string, value: JsonValue) => void;+ onFieldValueClear: (gqlFieldName: string) => void;+};++export const RecordFormFieldInputs = ({+ objectMetadataItem,+ fieldMetadataItems,+ draftRecord,+ onFieldValueChange,+ onFieldValueClear,+}: RecordFormFieldInputsProps) => (+ <StyledFieldList>+ {fieldMetadataItems.map((fieldMetadataItem) => {+ const gqlFieldName = getFieldMetadataItemGqlFieldName(fieldMetadataItem);++ return (+ <FormFieldInput+ key={fieldMetadataItem.id}+ field={formatFieldMetadataItemAsFieldDefinition({+ field: fieldMetadataItem,+ objectMetadataItem,+ showLabel: true,+ })}+ defaultValue={draftRecord[gqlFieldName]}+ onChange={(value) => onFieldValueChange(gqlFieldName, value)}+ onClear={() => onFieldValueClear(gqlFieldName)}+ />+ );+ })}+ </StyledFieldList>+);diff --git a/packages/twenty-front/src/modules/object-record/record-form/contexts/RecordCreationFormContext.ts b/packages/twenty-front/src/modules/object-record/record-form/contexts/RecordCreationFormContext.tsnew file mode 100644index 00000000000..6eb6747dfdc--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/contexts/RecordCreationFormContext.ts@@ -0,0 +1,18 @@+import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';+import { type ObjectRecord } from '@/object-record/types/ObjectRecord';+import { createContext } from 'react';++export type RecordCreationFormContextValue = {+ requestRecordCreation: (params: {+ objectMetadataItem: EnrichedObjectMetadataItem;+ initialDraftRecord?: Partial<ObjectRecord>;+ createRecord: (draftRecord: Partial<ObjectRecord>) => Promise<ObjectRecord>;+ }) => Promise<ObjectRecord | null>;+ settleRecordCreationDraft: (params: {+ requestId: string;+ draftRecord: Partial<ObjectRecord> | null;+ }) => void;+};++export const RecordCreationFormContext =+ createContext<RecordCreationFormContextValue | null>(null);diff --git a/packages/twenty-front/src/modules/object-record/record-form/hooks/useRecordCreationForm.ts b/packages/twenty-front/src/modules/object-record/record-form/hooks/useRecordCreationForm.tsnew file mode 100644index 00000000000..d53cebcaf0e--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/hooks/useRecordCreationForm.ts@@ -0,0 +1,51 @@+import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';+import { RecordCreationFormContext } from '@/object-record/record-form/contexts/RecordCreationFormContext';+import { useRecordFormFieldMetadataItems } from '@/object-record/record-form/hooks/useRecordFormFieldMetadataItems';+import { type ObjectRecord } from '@/object-record/types/ObjectRecord';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';+import { useCallback, useContext } from 'react';+import { isDefined, isNonEmptyArray } from 'twenty-shared/utils';+import { FeatureFlagKey } from '~/generated-metadata/graphql';++export const useRecordCreationForm = ({+ objectMetadataItem,+}: {+ objectMetadataItem: EnrichedObjectMetadataItem;+}) => {+ const recordCreationFormContext = useContext(RecordCreationFormContext);++ const isRecordCreationFormEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_RECORD_CREATION_FORM_ENABLED,+ );++ const { recordFormFieldMetadataItems } = useRecordFormFieldMetadataItems({+ objectMetadataItem,+ });++ const shouldOpenRecordCreationForm =+ isRecordCreationFormEnabled &&+ isDefined(recordCreationFormContext) &&+ isNonEmptyArray(recordFormFieldMetadataItems);++ const requestRecordCreation = useCallback(+ ({+ initialDraftRecord,+ createRecord,+ }: {+ initialDraftRecord?: Partial<ObjectRecord>;+ createRecord: (+ draftRecord: Partial<ObjectRecord>,+ ) => Promise<ObjectRecord>;+ }) =>+ isDefined(recordCreationFormContext)+ ? recordCreationFormContext.requestRecordCreation({+ objectMetadataItem,+ initialDraftRecord,+ createRecord,+ })+ : createRecord(initialDraftRecord ?? {}),+ [recordCreationFormContext, objectMetadataItem],+ );++ return { shouldOpenRecordCreationForm, requestRecordCreation };+};diff --git a/packages/twenty-front/src/modules/object-record/record-form/hooks/useRecordCreationFormSettle.ts b/packages/twenty-front/src/modules/object-record/record-form/hooks/useRecordCreationFormSettle.tsnew file mode 100644index 00000000000..41eb98967ad--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/hooks/useRecordCreationFormSettle.ts@@ -0,0 +1,28 @@+import { RecordCreationFormContext } from '@/object-record/record-form/contexts/RecordCreationFormContext';+import { type ObjectRecord } from '@/object-record/types/ObjectRecord';+import { useCallback, useContext } from 'react';+import { isDefined } from 'twenty-shared/utils';++export const useRecordCreationFormSettle = () => {+ const recordCreationFormContext = useContext(RecordCreationFormContext);++ const settleRecordCreationDraft = useCallback(+ ({+ requestId,+ draftRecord,+ }: {+ requestId: string;+ draftRecord: Partial<ObjectRecord> | null;+ }) => {+ if (isDefined(recordCreationFormContext)) {+ recordCreationFormContext.settleRecordCreationDraft({+ requestId,+ draftRecord,+ });+ }+ },+ [recordCreationFormContext],+ );++ return { settleRecordCreationDraft };+};diff --git a/packages/twenty-front/src/modules/object-record/record-form/hooks/useRecordFormFieldMetadataItems.ts b/packages/twenty-front/src/modules/object-record/record-form/hooks/useRecordFormFieldMetadataItems.tsnew file mode 100644index 00000000000..9aa29d6b709--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/hooks/useRecordFormFieldMetadataItems.ts@@ -0,0 +1,34 @@+import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';+import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';+import { useObjectPermissionsForObject } from '@/object-record/hooks/useObjectPermissionsForObject';+import { computeRecordFormFieldMetadataItems } from '@/object-record/record-form/utils/computeRecordFormFieldMetadataItems';+import { recordFormPageLayoutByObjectMetadataIdFamilySelector } from '@/page-layout/states/selectors/recordFormPageLayoutByObjectMetadataIdFamilySelector';+import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';+import { isDefined } from 'twenty-shared/utils';++export const useRecordFormFieldMetadataItems = ({+ objectMetadataItem,+}: {+ objectMetadataItem: EnrichedObjectMetadataItem;+}): { recordFormFieldMetadataItems: FieldMetadataItem[] } => {+ const recordFormPageLayout = useAtomFamilySelectorValue(+ recordFormPageLayoutByObjectMetadataIdFamilySelector,+ { objectMetadataId: objectMetadataItem.id },+ );++ const objectPermissions = useObjectPermissionsForObject(+ objectMetadataItem.id,+ );++ if (!isDefined(recordFormPageLayout)) {+ return { recordFormFieldMetadataItems: [] };+ }++ return {+ recordFormFieldMetadataItems: computeRecordFormFieldMetadataItems({+ recordFormPageLayout,+ fieldMetadataItems: objectMetadataItem.fields,+ restrictedFields: objectPermissions.restrictedFields,+ }),+ };+};diff --git a/packages/twenty-front/src/modules/object-record/record-form/utils/__tests__/computeRecordFormCreateRecordInput.test.ts b/packages/twenty-front/src/modules/object-record/record-form/utils/__tests__/computeRecordFormCreateRecordInput.test.tsnew file mode 100644index 00000000000..5e655701833--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/utils/__tests__/computeRecordFormCreateRecordInput.test.ts@@ -0,0 +1,75 @@+import { computeRecordFormCreateRecordInput } from '@/object-record/record-form/utils/computeRecordFormCreateRecordInput';+import { getMockObjectMetadataItemOrThrow } from '~/testing/utils/getMockObjectMetadataItemOrThrow';+import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock';++describe('computeRecordFormCreateRecordInput', () => {+ const objectMetadataItems = getTestEnrichedObjectMetadataItemsMock();+ const petObjectMetadataItem = getMockObjectMetadataItemOrThrow('pet');+ const rocketObjectMetadataId = getMockObjectMetadataItemOrThrow('rocket').id;++ it('maps a morph relation selection to its target join column', () => {+ const createRecordInput = computeRecordFormCreateRecordInput({+ draftRecord: {+ name: 'Rex',+ polymorphicOwner: {+ targetObjectMetadataId: rocketObjectMetadataId,+ id: 'record-id',+ },+ },+ fieldMetadataItems: petObjectMetadataItem.fields,+ objectMetadataItems,+ });++ expect(createRecordInput).toEqual({+ name: 'Rex',+ polymorphicOwnerRocketId: 'record-id',+ });+ });++ it('strips caller-seeded join columns when the user clears the morph relation', () => {+ const createRecordInput = computeRecordFormCreateRecordInput({+ draftRecord: {+ name: 'Rex',+ polymorphicOwnerRocketId: 'caller-seeded-id',+ polymorphicOwner: null,+ },+ fieldMetadataItems: petObjectMetadataItem.fields,+ objectMetadataItems,+ });++ expect(createRecordInput).toEqual({ name: 'Rex' });+ });++ it('strips stale join columns when the user replaces the morph target', () => {+ const createRecordInput = computeRecordFormCreateRecordInput({+ draftRecord: {+ name: 'Rex',+ polymorphicOwnerSurveyResultId: 'caller-seeded-id',+ polymorphicOwner: {+ targetObjectMetadataId: rocketObjectMetadataId,+ id: 'record-id',+ },+ },+ fieldMetadataItems: petObjectMetadataItem.fields,+ objectMetadataItems,+ });++ expect(createRecordInput).toEqual({+ name: 'Rex',+ polymorphicOwnerRocketId: 'record-id',+ });+ });++ it('keeps non-morph draft values untouched, including caller-provided keys', () => {+ const createRecordInput = computeRecordFormCreateRecordInput({+ draftRecord: {+ name: 'Rex',+ position: 'first',+ },+ fieldMetadataItems: petObjectMetadataItem.fields,+ objectMetadataItems,+ });++ expect(createRecordInput).toEqual({ name: 'Rex', position: 'first' });+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-form/utils/__tests__/computeRecordFormFieldMetadataItems.test.ts b/packages/twenty-front/src/modules/object-record/record-form/utils/__tests__/computeRecordFormFieldMetadataItems.test.tsnew file mode 100644index 00000000000..9d6c19a78da--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/utils/__tests__/computeRecordFormFieldMetadataItems.test.ts@@ -0,0 +1,168 @@+import { computeRecordFormFieldMetadataItems } from '@/object-record/record-form/utils/computeRecordFormFieldMetadataItems';+import {+ PageLayoutTabLayoutMode,+ WidgetConfigurationType,+ WidgetType,+} from '~/generated-metadata/graphql';++const buildFieldMetadataItem = (id: string, name: string) => ({ id, name });++const buildFormFieldWidget = ({+ fieldMetadataId,+ index,+ isActive = true,+ type = WidgetType.FORM_FIELD,+}: {+ fieldMetadataId: string;+ index: number;+ isActive?: boolean;+ type?: WidgetType;+}) => ({+ id: `widget-${fieldMetadataId}`,+ isActive,+ type,+ position: {+ layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,+ index,+ },+ configuration: {+ configurationType: WidgetConfigurationType.FORM_FIELD,+ fieldMetadataId,+ },+});++const buildPageLayout = (+ tabs: {+ position: number;+ isActive?: boolean;+ widgets: ReturnType<typeof buildFormFieldWidget>[];+ }[],+) => ({+ tabs: tabs.map((tab) => ({+ isActive: tab.isActive ?? true,+ position: tab.position,+ widgets: tab.widgets,+ })),+});++const NAME_FIELD = buildFieldMetadataItem('field-name', 'name');+const CODE_FIELD = buildFieldMetadataItem('field-code', 'code');+const CITY_FIELD = buildFieldMetadataItem('field-city', 'city');++describe('computeRecordFormFieldMetadataItems', () => {+ it('should order fields by their widget index', () => {+ const result = computeRecordFormFieldMetadataItems({+ recordFormPageLayout: buildPageLayout([+ {+ position: 10,+ widgets: [+ buildFormFieldWidget({ fieldMetadataId: 'field-code', index: 1 }),+ buildFormFieldWidget({ fieldMetadataId: 'field-name', index: 0 }),+ ],+ },+ ]),+ fieldMetadataItems: [NAME_FIELD, CODE_FIELD],+ restrictedFields: {},+ });++ expect(result.map((field) => field.name)).toEqual(['name', 'code']);+ });++ it('should keep every tab contiguous rather than interleaving their indexes', () => {+ const result = computeRecordFormFieldMetadataItems({+ recordFormPageLayout: buildPageLayout([+ {+ position: 20,+ widgets: [+ buildFormFieldWidget({ fieldMetadataId: 'field-city', index: 0 }),+ ],+ },+ {+ position: 10,+ widgets: [+ buildFormFieldWidget({ fieldMetadataId: 'field-name', index: 0 }),+ buildFormFieldWidget({ fieldMetadataId: 'field-code', index: 1 }),+ ],+ },+ ]),+ fieldMetadataItems: [NAME_FIELD, CODE_FIELD, CITY_FIELD],+ restrictedFields: {},+ });++ expect(result.map((field) => field.name)).toEqual(['name', 'code', 'city']);+ });++ it('should drop inactive widgets, inactive tabs and non form field widgets', () => {+ const result = computeRecordFormFieldMetadataItems({+ recordFormPageLayout: buildPageLayout([+ {+ position: 10,+ widgets: [+ buildFormFieldWidget({ fieldMetadataId: 'field-name', index: 0 }),+ buildFormFieldWidget({+ fieldMetadataId: 'field-code',+ index: 1,+ isActive: false,+ }),+ buildFormFieldWidget({+ fieldMetadataId: 'field-city',+ index: 2,+ type: WidgetType.FIELDS,+ }),+ ],+ },+ {+ position: 20,+ isActive: false,+ widgets: [+ buildFormFieldWidget({ fieldMetadataId: 'field-city', index: 0 }),+ ],+ },+ ]),+ fieldMetadataItems: [NAME_FIELD, CODE_FIELD, CITY_FIELD],+ restrictedFields: {},+ });++ expect(result.map((field) => field.name)).toEqual(['name']);+ });++ it('should drop widgets whose field is not on the object', () => {+ const result = computeRecordFormFieldMetadataItems({+ recordFormPageLayout: buildPageLayout([+ {+ position: 10,+ widgets: [+ buildFormFieldWidget({ fieldMetadataId: 'field-name', index: 0 }),+ buildFormFieldWidget({ fieldMetadataId: 'field-gone', index: 1 }),+ ],+ },+ ]),+ fieldMetadataItems: [NAME_FIELD],+ restrictedFields: {},+ });++ expect(result.map((field) => field.name)).toEqual(['name']);+ });++ it('should drop fields the user cannot update, keeping explicitly allowed and unrestricted ones', () => {+ const result = computeRecordFormFieldMetadataItems({+ recordFormPageLayout: buildPageLayout([+ {+ position: 10,+ widgets: [+ buildFormFieldWidget({ fieldMetadataId: 'field-name', index: 0 }),+ buildFormFieldWidget({ fieldMetadataId: 'field-code', index: 1 }),+ buildFormFieldWidget({ fieldMetadataId: 'field-city', index: 2 }),+ ],+ },+ ]),+ fieldMetadataItems: [NAME_FIELD, CODE_FIELD, CITY_FIELD],+ restrictedFields: {+ 'field-code': { canRead: true, canUpdate: false },+ 'field-city': { canRead: true, canUpdate: true },+ },+ });++ expect(result.map((field) => field.name)).toEqual(['name', 'city']);+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-form/utils/computeRecordFormCreateRecordInput.ts b/packages/twenty-front/src/modules/object-record/record-form/utils/computeRecordFormCreateRecordInput.tsnew file mode 100644index 00000000000..17cf9efb425--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/utils/computeRecordFormCreateRecordInput.ts@@ -0,0 +1,89 @@+import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';+import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';+import { getFieldMetadataItemGqlFieldName } from '@/object-metadata/utils/getFieldMetadataItemGqlFieldName';+import { buildMorphRelationUpdateInput } from '@/object-record/record-field/ui/meta-types/input/utils/buildMorphRelationUpdateInput';+import { type ObjectRecord } from '@/object-record/types/ObjectRecord';+import { isNonEmptyString } from '@sniptt/guards';+import { isDefined } from 'twenty-shared/utils';+import { FieldMetadataType } from '~/generated-metadata/graphql';++type MorphRelationDraftValue = {+ targetObjectMetadataId: string;+ id: string;+};++const isMorphRelationDraftValue = (+ draftValue: unknown,+): draftValue is MorphRelationDraftValue =>+ isDefined(draftValue) &&+ typeof draftValue === 'object' &&+ 'targetObjectMetadataId' in draftValue &&+ isNonEmptyString(draftValue.targetObjectMetadataId) &&+ 'id' in draftValue &&+ isNonEmptyString(draftValue.id);++export const computeRecordFormCreateRecordInput = ({+ draftRecord,+ fieldMetadataItems,+ objectMetadataItems,+}: {+ draftRecord: Partial<ObjectRecord>;+ fieldMetadataItems: FieldMetadataItem[];+ objectMetadataItems: EnrichedObjectMetadataItem[];+}): Partial<ObjectRecord> => {+ const gqlFieldNamesToOmit = new Set<string>();+ const morphJoinColumnValuesToSet: Record<string, string> = {};++ for (const fieldMetadataItem of fieldMetadataItems) {+ if (fieldMetadataItem.type !== FieldMetadataType.MORPH_RELATION) {+ continue;+ }++ const gqlFieldName = getFieldMetadataItemGqlFieldName(fieldMetadataItem);++ if (!(gqlFieldName in draftRecord)) {+ continue;+ }++ const draftValue = draftRecord[gqlFieldName];+ const morphRelationType = fieldMetadataItem.morphRelations?.[0]?.type;++ if (!isDefined(morphRelationType)) {+ continue;+ }++ const { updateInput } = buildMorphRelationUpdateInput({+ morphRelations: fieldMetadataItem.morphRelations ?? [],+ fieldName: fieldMetadataItem.name,+ relationType: morphRelationType,+ objectMetadataItems,+ ...(isMorphRelationDraftValue(draftValue)+ ? {+ targetRecordId: draftValue.id,+ targetObjectMetadataId: draftValue.targetObjectMetadataId,+ }+ : {}),+ });++ gqlFieldNamesToOmit.add(gqlFieldName);++ for (const [joinColumnName, joinColumnValue] of Object.entries(+ updateInput,+ )) {+ gqlFieldNamesToOmit.add(joinColumnName);++ if (isDefined(joinColumnValue)) {+ morphJoinColumnValuesToSet[joinColumnName] = joinColumnValue;+ }+ }+ }++ return {+ ...Object.fromEntries(+ Object.entries(draftRecord).filter(+ ([gqlFieldName]) => !gqlFieldNamesToOmit.has(gqlFieldName),+ ),+ ),+ ...morphJoinColumnValuesToSet,+ };+};diff --git a/packages/twenty-front/src/modules/object-record/record-form/utils/computeRecordFormFieldMetadataItems.ts b/packages/twenty-front/src/modules/object-record/record-form/utils/computeRecordFormFieldMetadataItems.tsnew file mode 100644index 00000000000..256b8aaeab4--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-form/utils/computeRecordFormFieldMetadataItems.ts@@ -0,0 +1,87 @@+import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';+import { type PageLayoutTab } from '@/page-layout/types/PageLayoutTab';+import { type PageLayoutWidget } from '@/page-layout/types/PageLayoutWidget';+import { type RestrictedFieldsPermissions } from 'twenty-shared/types';+import { isDefined } from 'twenty-shared/utils';+import {+ PageLayoutTabLayoutMode,+ WidgetConfigurationType,+ WidgetType,+} from '~/generated-metadata/graphql';++type RecordFormWidget = Pick<+ PageLayoutWidget,+ 'isActive' | 'type' | 'position' | 'configuration'+>;++type RecordFormTab = Pick<PageLayoutTab, 'isActive' | 'position'> & {+ widgets?: RecordFormWidget[] | null;+};++type RecordFormLayout = { tabs: RecordFormTab[] };++const getVerticalListIndex = (pageLayoutWidget: RecordFormWidget): number => {+ const { position } = pageLayoutWidget;++ return isDefined(position) &&+ position.layoutMode === PageLayoutTabLayoutMode.VERTICAL_LIST &&+ 'index' in position+ ? position.index+ : 0;+};++const getFormFieldMetadataId = (+ pageLayoutWidget: RecordFormWidget,+): string | undefined => {+ const { configuration } = pageLayoutWidget;++ return configuration.configurationType ===+ WidgetConfigurationType.FORM_FIELD && 'fieldMetadataId' in configuration+ ? configuration.fieldMetadataId+ : undefined;+};++export const computeRecordFormFieldMetadataItems = <+ TFieldMetadataItem extends Pick<FieldMetadataItem, 'id'>,+>({+ recordFormPageLayout,+ fieldMetadataItems,+ restrictedFields,+}: {+ recordFormPageLayout: RecordFormLayout;+ fieldMetadataItems: TFieldMetadataItem[];+ restrictedFields: RestrictedFieldsPermissions;+}): TFieldMetadataItem[] => {+ const fieldMetadataItemById = new Map(+ fieldMetadataItems+ .filter(+ (fieldMetadataItem) =>+ restrictedFields[fieldMetadataItem.id]?.canUpdate !== false,+ )+ .map((fieldMetadataItem) => [fieldMetadataItem.id, fieldMetadataItem]),+ );++ return [...recordFormPageLayout.tabs]+ .filter((pageLayoutTab) => pageLayoutTab.isActive)+ .sort((tabA, tabB) => tabA.position - tabB.position)+ .flatMap((pageLayoutTab) =>+ [...(pageLayoutTab.widgets ?? [])]+ .filter(+ (pageLayoutWidget) =>+ pageLayoutWidget.isActive &&+ pageLayoutWidget.type === WidgetType.FORM_FIELD,+ )+ .sort(+ (widgetA, widgetB) =>+ getVerticalListIndex(widgetA) - getVerticalListIndex(widgetB),+ ),+ )+ .map((pageLayoutWidget) => {+ const fieldMetadataId = getFormFieldMetadataId(pageLayoutWidget);++ return isDefined(fieldMetadataId)+ ? fieldMetadataItemById.get(fieldMetadataId)+ : undefined;+ })+ .filter(isDefined);+};diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableNoRecordGroupAddNew.tsx b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableNoRecordGroupAddNew.tsxindex a36d92a5a3b..93da0448708 100644--- a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableNoRecordGroupAddNew.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableNoRecordGroupAddNew.tsx@@ -57,6 +57,10 @@ export const RecordTableNoRecordGroupAddNew = () => {...recordInput,});+ if (!isDefined(createdRecord)) {+ return;+ }+upsertRecordsInStore({ partialRecords: [createdRecord] });if (isDefined(totalNumberOfRecordsToVirtualize)) {diff --git a/packages/twenty-front/src/modules/object-record/record-table/hooks/useCreateNewIndexRecord.ts b/packages/twenty-front/src/modules/object-record/record-table/hooks/useCreateNewIndexRecord.tsindex 19b3f4614b6..108245cb264 100644--- a/packages/twenty-front/src/modules/object-record/record-table/hooks/useCreateNewIndexRecord.ts+++ b/packages/twenty-front/src/modules/object-record/record-table/hooks/useCreateNewIndexRecord.ts@@ -1,6 +1,7 @@import { type EnrichedObjectMetadataItem } from '@/object-metadata/types/EnrichedObjectMetadataItem';import { getLabelIdentifierFieldMetadataItem } from '@/object-metadata/utils/getLabelIdentifierFieldMetadataItem';import { useBuildRecordInputFromRLSPredicates } from '@/object-record/hooks/useBuildRecordInputFromRLSPredicates';+import { useRecordCreationForm } from '@/object-record/record-form/hooks/useRecordCreationForm';import { useCreateOneRecord } from '@/object-record/hooks/useCreateOneRecord';import { recordGroupDefinitionsComponentSelector } from '@/object-record/record-group/states/selectors/recordGroupDefinitionsComponentSelector';import { getFieldMetadataItemGqlFieldName } from '@/object-metadata/utils/getFieldMetadataItemGqlFieldName';@@ -64,6 +65,9 @@ export const useCreateNewIndexRecord = ({const { upsertRecordsInStore } = useUpsertRecordsInStore();+ const { shouldOpenRecordCreationForm, requestRecordCreation } =+ useRecordCreationForm({ objectMetadataItem });+const navigate = useNavigateApp();const { buildRecordInputFromFilters } = useBuildRecordInputFromFilters({@@ -76,7 +80,7 @@ export const useCreateNewIndexRecord = ({objectMetadataItem,});- const createNewIndexRecord = useCallback(+ const createIndexRecord = useCallback(async (recordInput?: Partial<ObjectRecord>) => {const recordId = v4();const recordInputFromRLSPredicates = buildRecordInputFromRLSPredicates();@@ -93,24 +97,35 @@ export const useCreateNewIndexRecord = ({...mergedRecordInput,});+ const labelIdentifierFieldMetadataItem =+ getLabelIdentifierFieldMetadataItem(objectMetadataItem);++ const shouldOpenLabelIdentifierInEditMode =+ !isDefined(labelIdentifierFieldMetadataItem) ||+ !isDefined(+ recordInput?.[+ getFieldMetadataItemGqlFieldName(labelIdentifierFieldMetadataItem)+ ],+ );+if (workspaceSurface.type === 'side-panel') {openRecordInSidePanel({recordId,objectNameSingular: objectMetadataItem.nameSingular,- isNewRecord: true,+ isNewRecord: shouldOpenLabelIdentifierInEditMode,resetNavigationStack: false,});} else if (openRecordIn === OpenRecordIn.SIDE_PANEL) {openRecordInSidePanel({recordId,objectNameSingular: objectMetadataItem.nameSingular,- isNewRecord: true,+ isNewRecord: shouldOpenLabelIdentifierInEditMode,});} else {- const labelIdentifierFieldMetadataItem =- getLabelIdentifierFieldMetadataItem(objectMetadataItem);-- if (isDefined(labelIdentifierFieldMetadataItem)) {+ if (+ shouldOpenLabelIdentifierInEditMode &&+ isDefined(labelIdentifierFieldMetadataItem)+ ) {store.set(newRecordTitleCellToOpenState.atom, {recordId,fieldName: labelIdentifierFieldMetadataItem.name,@@ -181,6 +196,23 @@ export const useCreateNewIndexRecord = ({],);+ const createNewIndexRecord = useCallback(+ async (recordInput?: Partial<ObjectRecord>) => {+ if (!shouldOpenRecordCreationForm) {+ return createIndexRecord(recordInput);+ }++ const createdRecord = await requestRecordCreation({+ initialDraftRecord: recordInput,+ createRecord: (draftRecord) =>+ createIndexRecord({ ...recordInput, ...draftRecord }),+ });++ return createdRecord ?? undefined;+ },+ [createIndexRecord, requestRecordCreation, shouldOpenRecordCreationForm],+ );+return {createNewIndexRecord,};diff --git a/packages/twenty-front/src/modules/page-layout/graphql/queries/findAllRecordFormPageLayouts.ts b/packages/twenty-front/src/modules/page-layout/graphql/queries/findAllRecordFormPageLayouts.tsnew file mode 100644index 00000000000..3a27d1b4537--- /dev/null+++ b/packages/twenty-front/src/modules/page-layout/graphql/queries/findAllRecordFormPageLayouts.ts@@ -0,0 +1,11 @@+import { PAGE_LAYOUT_FRAGMENT } from '@/dashboards/graphql/fragments/pageLayoutFragment';+import { gql } from '@apollo/client';++export const FIND_ALL_RECORD_FORM_PAGE_LAYOUTS = gql`+ ${PAGE_LAYOUT_FRAGMENT}+ query FindAllRecordFormPageLayouts {+ getPageLayouts(pageLayoutType: RECORD_FORM) {+ ...PageLayoutFragment+ }+ }+`;diff --git a/packages/twenty-front/src/modules/page-layout/states/selectors/recordFormPageLayoutByObjectMetadataIdFamilySelector.ts b/packages/twenty-front/src/modules/page-layout/states/selectors/recordFormPageLayoutByObjectMetadataIdFamilySelector.tsnew file mode 100644index 00000000000..c2b698c52d9--- /dev/null+++ b/packages/twenty-front/src/modules/page-layout/states/selectors/recordFormPageLayoutByObjectMetadataIdFamilySelector.ts@@ -0,0 +1,29 @@+import { pageLayoutsWithRelationsSelector } from '@/page-layout/states/pageLayoutsWithRelationsSelector';+import { type PageLayout } from '@/page-layout/types/PageLayout';+import { createAtomFamilySelector } from '@/ui/utilities/state/jotai/utils/createAtomFamilySelector';+import { PageLayoutType } from '~/generated-metadata/graphql';++export const recordFormPageLayoutByObjectMetadataIdFamilySelector =+ createAtomFamilySelector<+ PageLayout | undefined,+ { objectMetadataId: string }+ >({+ key: 'recordFormPageLayoutByObjectMetadataIdFamilySelector',+ get:+ ({ objectMetadataId }) =>+ ({ get }) => {+ const pageLayouts = get(pageLayoutsWithRelationsSelector);++ const recordFormPageLayouts = pageLayouts.filter(+ (pageLayout) =>+ pageLayout.type === PageLayoutType.RECORD_FORM &&+ pageLayout.objectMetadataId === objectMetadataId,+ );++ const customRecordFormPageLayout = recordFormPageLayouts.find(+ (pageLayout) => !pageLayout.isSystemSideEffect,+ );++ return customRecordFormPageLayout ?? recordFormPageLayouts[0];+ },+ });diff --git a/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx b/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsxindex 4e01225eaf6..aed88c8cd2a 100644--- a/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx+++ b/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx@@ -13,6 +13,7 @@ import { SidePanelComposeEmailPage } from '@/side-panel/pages/compose-email/compimport { SidePanelComposeCalendarEventPage } from '@/side-panel/pages/compose-calendar-event/components/SidePanelComposeCalendarEventPage';import { SidePanelCreateRelatedRecordPage } from '@/side-panel/pages/create-related-record/components/SidePanelCreateRelatedRecordPage';import { SidePanelSendCampaignPage } from '@/side-panel/pages/send-campaign/components/SidePanelSendCampaignPage';+import { SidePanelRecordCreationFormPage } from '@/side-panel/pages/record-creation-form/components/SidePanelRecordCreationFormPage';import { SidePanelSendCampaignTestPage } from '@/side-panel/pages/send-campaign-test/components/SidePanelSendCampaignTestPage';import { SidePanelFrontComponentPage } from '@/side-panel/pages/front-component/components/SidePanelFrontComponentPage';import { SidePanelDashboardChartSettings } from '@/side-panel/pages/page-layout/components/dashboard/SidePanelDashboardChartSettings';@@ -99,6 +100,7 @@ export const SIDE_PANEL_PAGES_CONFIG = new Map<[SidePanelPages.ComposeEmail, <SidePanelComposeEmailPage />],[SidePanelPages.CreateRelatedRecord, <SidePanelCreateRelatedRecordPage />],[SidePanelPages.SendCampaign, <SidePanelSendCampaignPage />],+ [SidePanelPages.RecordCreationForm, <SidePanelRecordCreationFormPage />],[SidePanelPages.SendCampaignTest, <SidePanelSendCampaignTestPage />],[SidePanelPages.EmailBlockSettings, <SidePanelEmailBlockSettingsPage />],[diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/SidePanelRecordCreationFormPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/SidePanelRecordCreationFormPage.tsxnew file mode 100644index 00000000000..d959f450699--- /dev/null+++ b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/components/SidePanelRecordCreationFormPage.tsx@@ -0,0 +1,144 @@+import { useObjectMetadataItemById } from '@/object-metadata/hooks/useObjectMetadataItemById';+import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';+import { RecordFormFieldInputs } from '@/object-record/record-form/components/RecordFormFieldInputs';+import { useRecordCreationFormSettle } from '@/object-record/record-form/hooks/useRecordCreationFormSettle';+import { useRecordFormFieldMetadataItems } from '@/object-record/record-form/hooks/useRecordFormFieldMetadataItems';+import { computeRecordFormCreateRecordInput } from '@/object-record/record-form/utils/computeRecordFormCreateRecordInput';+import { type ObjectRecord } from '@/object-record/types/ObjectRecord';+import { useSidePanelHistory } from '@/side-panel/hooks/useSidePanelHistory';+import { recordCreationFormDraftComponentState } from '@/side-panel/pages/record-creation-form/states/recordCreationFormDraftComponentState';+import { recordCreationFormRequestComponentState } from '@/side-panel/pages/record-creation-form/states/recordCreationFormRequestComponentState';+import { SidePanelFooter } from '@/ui/layout/side-panel/components/SidePanelFooter';+import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';+import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';+import { useState } from 'react';+import { styled } from '@linaria/react';+import { t } from '@lingui/core/macro';+import { type JsonValue } from 'type-fest';+import { isDefined } from 'twenty-shared/utils';+import { IconPlus } from 'twenty-ui/icon';+import { Button } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';++const StyledContainer = styled.div`+ display: flex;+ flex-direction: column;+ height: 100%;+`;++const StyledContent = styled.div`+ display: flex;+ flex: 1;+ flex-direction: column;+ gap: ${themeCssVariables.spacing[4]};+ overflow-y: auto;+ padding: ${themeCssVariables.spacing[4]};+`;++export const SidePanelRecordCreationFormPage = () => {+ const recordCreationFormRequest = useAtomComponentStateValue(+ recordCreationFormRequestComponentState,+ );++ if (!isDefined(recordCreationFormRequest)) {+ return null;+ }++ return (+ <SidePanelRecordCreationForm+ requestId={recordCreationFormRequest.requestId}+ objectMetadataId={recordCreationFormRequest.objectMetadataId}+ initialDraftRecord={recordCreationFormRequest.initialDraftRecord}+ />+ );+};++const SidePanelRecordCreationForm = ({+ requestId,+ objectMetadataId,+ initialDraftRecord,+}: {+ requestId: string;+ objectMetadataId: string;+ initialDraftRecord: Partial<ObjectRecord>;+}) => {+ const { objectMetadataItem } = useObjectMetadataItemById({+ objectId: objectMetadataId,+ });++ const { objectMetadataItems } = useObjectMetadataItems();++ const { settleRecordCreationDraft } = useRecordCreationFormSettle();+ const { goBackFromSidePanel } = useSidePanelHistory();++ const [recordCreationFormDraft, setRecordCreationFormDraft] =+ useAtomComponentState(recordCreationFormDraftComponentState);++ const [isSubmitting, setIsSubmitting] = useState(false);++ const draftRecord = recordCreationFormDraft ?? initialDraftRecord;++ const { recordFormFieldMetadataItems } = useRecordFormFieldMetadataItems({+ objectMetadataItem,+ });++ const handleFieldValueChange = (gqlFieldName: string, value: JsonValue) => {+ setRecordCreationFormDraft((previousDraftRecord) => ({+ ...(previousDraftRecord ?? initialDraftRecord),+ [gqlFieldName]: value,+ }));+ };++ const handleFieldValueClear = (gqlFieldName: string) => {+ setRecordCreationFormDraft((previousDraftRecord) => ({+ ...(previousDraftRecord ?? initialDraftRecord),+ [gqlFieldName]: null,+ }));+ };++ const handleCreateClick = () => {+ if (isSubmitting) {+ return;+ }++ setIsSubmitting(true);+ settleRecordCreationDraft({+ requestId,+ draftRecord: computeRecordFormCreateRecordInput({+ draftRecord,+ fieldMetadataItems: recordFormFieldMetadataItems,+ objectMetadataItems,+ }),+ });+ goBackFromSidePanel();+ };++ return (+ <StyledContainer>+ <StyledContent>+ <RecordFormFieldInputs+ objectMetadataItem={objectMetadataItem}+ fieldMetadataItems={recordFormFieldMetadataItems}+ draftRecord={draftRecord}+ onFieldValueChange={handleFieldValueChange}+ onFieldValueClear={handleFieldValueClear}+ />+ </StyledContent>+ <SidePanelFooter+ actions={[+ <Button+ key="create-record"+ title={t`Create`}+ Icon={IconPlus}+ variant="primary"+ accent="blue"+ size="small"+ onClick={handleCreateClick}+ disabled={isSubmitting}+ dataTestId="record-creation-form-create-button"+ />,+ ]}+ />+ </StyledContainer>+ );+};diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/states/recordCreationFormDraftComponentState.ts b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/states/recordCreationFormDraftComponentState.tsnew file mode 100644index 00000000000..0d9fb017628--- /dev/null+++ b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/states/recordCreationFormDraftComponentState.ts@@ -0,0 +1,10 @@+import { type ObjectRecord } from '@/object-record/types/ObjectRecord';+import { SidePanelPageComponentInstanceContext } from '@/side-panel/states/contexts/SidePanelPageComponentInstanceContext';+import { createAtomComponentState } from '@/ui/utilities/state/jotai/utils/createAtomComponentState';++export const recordCreationFormDraftComponentState =+ createAtomComponentState<Partial<ObjectRecord> | null>({+ key: 'side-panel/record-creation-form-draft',+ defaultValue: null,+ componentInstanceContext: SidePanelPageComponentInstanceContext,+ });diff --git a/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/states/recordCreationFormRequestComponentState.ts b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/states/recordCreationFormRequestComponentState.tsnew file mode 100644index 00000000000..1910afaa24f--- /dev/null+++ b/packages/twenty-front/src/modules/side-panel/pages/record-creation-form/states/recordCreationFormRequestComponentState.ts@@ -0,0 +1,16 @@+import { type ObjectRecord } from '@/object-record/types/ObjectRecord';+import { SidePanelPageComponentInstanceContext } from '@/side-panel/states/contexts/SidePanelPageComponentInstanceContext';+import { createAtomComponentState } from '@/ui/utilities/state/jotai/utils/createAtomComponentState';++export type RecordCreationFormRequest = {+ requestId: string;+ objectMetadataId: string;+ initialDraftRecord: Partial<ObjectRecord>;+};++export const recordCreationFormRequestComponentState =+ createAtomComponentState<RecordCreationFormRequest | null>({+ key: 'side-panel/record-creation-form-request',+ defaultValue: null,+ componentInstanceContext: SidePanelPageComponentInstanceContext,+ });diff --git a/packages/twenty-front/src/testing/graphqlMocks.ts b/packages/twenty-front/src/testing/graphqlMocks.tsindex 68a8bbd856b..d62efb41d98 100644--- a/packages/twenty-front/src/testing/graphqlMocks.ts+++ b/packages/twenty-front/src/testing/graphqlMocks.ts@@ -210,6 +210,11 @@ export const graphqlMocks = {data: { getPageLayouts: [] },});}),+ metadataGraphql.query('FindAllRecordFormPageLayouts', () => {+ return HttpResponse.json({+ data: { getPageLayouts: [] },+ });+ }),metadataGraphql.query('FindManyLogicFunctions', () => {return HttpResponse.json({data: { findManyLogicFunctions: [] },diff --git a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.tsindex c29e06e5d15..6d9033125ee 100644--- a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts+++ b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util.ts@@ -10,6 +10,7 @@ const DEFAULT_SEEDED_FEATURE_FLAGS: Partial<Record<FeatureFlagKey, boolean>> = {[FeatureFlagKey.IS_JUNCTION_RELATIONS_ENABLED]: true,[FeatureFlagKey.IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED]: true,[FeatureFlagKey.IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED]: false,+ [FeatureFlagKey.IS_RECORD_CREATION_FORM_ENABLED]: false,};type SeedFeatureFlagsArgs = {diff --git a/packages/twenty-shared/src/types/FeatureFlagKey.ts b/packages/twenty-shared/src/types/FeatureFlagKey.tsindex 0c949a6f1e6..6bef945b393 100644--- a/packages/twenty-shared/src/types/FeatureFlagKey.ts+++ b/packages/twenty-shared/src/types/FeatureFlagKey.ts@@ -10,4 +10,5 @@ export enum FeatureFlagKey {IS_API_RATE_LIMIT_V2_ENABLED = 'IS_API_RATE_LIMIT_V2_ENABLED',IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED = 'IS_MESSAGE_CALENDAR_TARGET_READ_ENABLED',IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED = 'IS_QUOTA_ENGINE_CREDIT_BOUND_ENABLED',+ IS_RECORD_CREATION_FORM_ENABLED = 'IS_RECORD_CREATION_FORM_ENABLED',}diff --git a/packages/twenty-shared/src/types/SidePanelPages.ts b/packages/twenty-shared/src/types/SidePanelPages.tsindex a30e1385a7b..ca3b75b677b 100644--- a/packages/twenty-shared/src/types/SidePanelPages.ts+++ b/packages/twenty-shared/src/types/SidePanelPages.ts@@ -35,6 +35,7 @@ export enum SidePanelPages {ComposeCalendarEvent = 'compose-calendar-event',CreateRelatedRecord = 'create-related-record',SendCampaign = 'send-campaign',+ RecordCreationForm = 'record-creation-form',SendCampaignTest = 'send-campaign-test',WorkflowVersions = 'workflow-versions',WorkflowVersion = 'workflow-version',