The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add weekly layout to record calendar (#22819)
Weiko25bd2897a331
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphqlindex c0c80148fca..2042fb39f09 100644--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql@@ -819,6 +819,7 @@ type View {shouldHideEmptyGroups: Boolean!kanbanColumnWidth: IntcalendarFieldMetadataId: UUID+ calendarEndFieldMetadataId: UUIDworkspaceId: UUID!anyFieldFilterValue: StringcalendarLayout: ViewCalendarLayout@@ -1726,6 +1727,7 @@ type FeatureFlag {enum FeatureFlagKey {IS_UNIQUE_INDEXES_ENABLEDIS_JSON_FILTER_ENABLED+ IS_CALENDAR_WEEK_VIEW_ENABLEDIS_EMAIL_GROUP_ENABLEDIS_JUNCTION_RELATIONS_ENABLEDIS_REST_METADATA_API_NEW_FORMAT_DIRECT@@ -3617,6 +3619,7 @@ input CreateViewInput {anyFieldFilterValue: StringcalendarLayout: ViewCalendarLayoutcalendarFieldMetadataId: UUID+ calendarEndFieldMetadataId: UUIDmainGroupByFieldMetadataId: UUIDvisibility: ViewVisibility}@@ -3634,6 +3637,7 @@ input UpdateViewInput {anyFieldFilterValue: StringcalendarLayout: ViewCalendarLayoutcalendarFieldMetadataId: UUID+ calendarEndFieldMetadataId: UUIDvisibility: ViewVisibilitymainGroupByFieldMetadataId: UUIDshouldHideEmptyGroups: Booleandiff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.tsindex acf4eb742d4..ca97b67a59a 100644--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts@@ -581,6 +581,7 @@ export interface View {shouldHideEmptyGroups: Scalars['Boolean']kanbanColumnWidth?: Scalars['Int']calendarFieldMetadataId?: Scalars['UUID']+ calendarEndFieldMetadataId?: Scalars['UUID']workspaceId: Scalars['UUID']anyFieldFilterValue?: Scalars['String']calendarLayout?: ViewCalendarLayout@@ -1388,7 +1389,7 @@ export interface FeatureFlag {__typename: 'FeatureFlag'}-export type FeatureFlagKey = '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_SETTINGS_DISCOVERY_HERO_ENABLED' | 'IS_WORKFLOW_VERSION_IN_CORE_ENABLED'+export type FeatureFlagKey = 'IS_UNIQUE_INDEXES_ENABLED' | 'IS_JSON_FILTER_ENABLED' | 'IS_CALENDAR_WEEK_VIEW_ENABLED' | 'IS_EMAIL_GROUP_ENABLED' | 'IS_JUNCTION_RELATIONS_ENABLED' | 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' | 'IS_LOGIC_FUNCTION_PREBUILT_MODE_ENABLED' | 'IS_SETTINGS_DISCOVERY_HERO_ENABLED' | 'IS_WORKFLOW_VERSION_IN_CORE_ENABLED'export interface WorkspaceUrls {customUrl?: Scalars['String']@@ -3642,6 +3643,7 @@ export interface ViewGenqlSelection{shouldHideEmptyGroups?: boolean | numberkanbanColumnWidth?: boolean | numbercalendarFieldMetadataId?: boolean | number+ calendarEndFieldMetadataId?: boolean | numberworkspaceId?: boolean | numberanyFieldFilterValue?: boolean | numbercalendarLayout?: boolean | number@@ -6280,9 +6282,9 @@ export interface DestroyViewFilterInput {/** The id of the view filter to destroy. */id: Scalars['UUID']}-export interface CreateViewInput {id?: (Scalars['UUID'] | null),name: Scalars['String'],objectMetadataId: Scalars['UUID'],type?: (ViewType | null),key?: (ViewKey | null),icon: Scalars['String'],position?: (Scalars['Float'] | null),isCompact?: (Scalars['Boolean'] | null),shouldHideEmptyGroups?: (Scalars['Boolean'] | null),kanbanColumnWidth?: (Scalars['Int'] | null),openRecordIn?: (ViewOpenRecordIn | null),kanbanAggregateOperation?: (AggregateOperations | null),kanbanAggregateOperationFieldMetadataId?: (Scalars['UUID'] | null),anyFieldFilterValue?: (Scalars['String'] | null),calendarLayout?: (ViewCalendarLayout | null),calendarFieldMetadataId?: (Scalars['UUID'] | null),mainGroupByFieldMetadataId?: (Scalars['UUID'] | null),visibility?: (ViewVisibility | null)}+export interface CreateViewInput {id?: (Scalars['UUID'] | null),name: Scalars['String'],objectMetadataId: Scalars['UUID'],type?: (ViewType | null),key?: (ViewKey | null),icon: Scalars['String'],position?: (Scalars['Float'] | null),isCompact?: (Scalars['Boolean'] | null),shouldHideEmptyGroups?: (Scalars['Boolean'] | null),kanbanColumnWidth?: (Scalars['Int'] | null),openRecordIn?: (ViewOpenRecordIn | null),kanbanAggregateOperation?: (AggregateOperations | null),kanbanAggregateOperationFieldMetadataId?: (Scalars['UUID'] | null),anyFieldFilterValue?: (Scalars['String'] | null),calendarLayout?: (ViewCalendarLayout | null),calendarFieldMetadataId?: (Scalars['UUID'] | null),calendarEndFieldMetadataId?: (Scalars['UUID'] | null),mainGroupByFieldMetadataId?: (Scalars['UUID'] | null),visibility?: (ViewVisibility | null)}-export interface UpdateViewInput {id?: (Scalars['UUID'] | null),name?: (Scalars['String'] | null),type?: (ViewType | null),icon?: (Scalars['String'] | null),position?: (Scalars['Float'] | null),isCompact?: (Scalars['Boolean'] | null),openRecordIn?: (ViewOpenRecordIn | null),kanbanAggregateOperation?: (AggregateOperations | null),kanbanAggregateOperationFieldMetadataId?: (Scalars['UUID'] | null),anyFieldFilterValue?: (Scalars['String'] | null),calendarLayout?: (ViewCalendarLayout | null),calendarFieldMetadataId?: (Scalars['UUID'] | null),visibility?: (ViewVisibility | null),mainGroupByFieldMetadataId?: (Scalars['UUID'] | null),shouldHideEmptyGroups?: (Scalars['Boolean'] | null),kanbanColumnWidth?: (Scalars['Int'] | null)}+export interface UpdateViewInput {id?: (Scalars['UUID'] | null),name?: (Scalars['String'] | null),type?: (ViewType | null),icon?: (Scalars['String'] | null),position?: (Scalars['Float'] | null),isCompact?: (Scalars['Boolean'] | null),openRecordIn?: (ViewOpenRecordIn | null),kanbanAggregateOperation?: (AggregateOperations | null),kanbanAggregateOperationFieldMetadataId?: (Scalars['UUID'] | null),anyFieldFilterValue?: (Scalars['String'] | null),calendarLayout?: (ViewCalendarLayout | null),calendarFieldMetadataId?: (Scalars['UUID'] | null),calendarEndFieldMetadataId?: (Scalars['UUID'] | null),visibility?: (ViewVisibility | null),mainGroupByFieldMetadataId?: (Scalars['UUID'] | null),shouldHideEmptyGroups?: (Scalars['Boolean'] | null),kanbanColumnWidth?: (Scalars['Int'] | null)}export interface UpsertViewWidgetInput {/** The id of the view widget (page layout widget). */@@ -9151,6 +9153,7 @@ export const enumLogicFunctionExecutionStatus = {export const enumFeatureFlagKey = {IS_UNIQUE_INDEXES_ENABLED: 'IS_UNIQUE_INDEXES_ENABLED' as const,IS_JSON_FILTER_ENABLED: 'IS_JSON_FILTER_ENABLED' as const,+ IS_CALENDAR_WEEK_VIEW_ENABLED: 'IS_CALENDAR_WEEK_VIEW_ENABLED' as const,IS_EMAIL_GROUP_ENABLED: 'IS_EMAIL_GROUP_ENABLED' as const,IS_JUNCTION_RELATIONS_ENABLED: 'IS_JUNCTION_RELATIONS_ENABLED' as const,IS_REST_METADATA_API_NEW_FORMAT_DIRECT: 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT' as const,diff --git a/packages/twenty-client-sdk/src/metadata/generated/types.ts b/packages/twenty-client-sdk/src/metadata/generated/types.tsindex af51e023cf0..5087965200d 100644--- a/packages/twenty-client-sdk/src/metadata/generated/types.ts+++ b/packages/twenty-client-sdk/src/metadata/generated/types.ts@@ -1595,6 +1595,9 @@ export default {"calendarFieldMetadataId": [3],+ "calendarEndFieldMetadataId": [+ 3+ ],"workspaceId": [3],@@ -9546,6 +9549,9 @@ export default {"calendarFieldMetadataId": [3],+ "calendarEndFieldMetadataId": [+ 3+ ],"mainGroupByFieldMetadataId": [3],@@ -9593,6 +9599,9 @@ export default {"calendarFieldMetadataId": [3],+ "calendarEndFieldMetadataId": [+ 3+ ],"visibility": [70],diff --git a/packages/twenty-docs/developers/extend/apps/layout/views.mdx b/packages/twenty-docs/developers/extend/apps/layout/views.mdxindex e64adf61844..ee444d84dc4 100644--- a/packages/twenty-docs/developers/extend/apps/layout/views.mdx+++ b/packages/twenty-docs/developers/extend/apps/layout/views.mdx@@ -49,7 +49,7 @@ export default defineView({| `isCompact` | `boolean` | Compact row display. || `mainGroupByFieldMetadataUniversalIdentifier` + `shouldHideEmptyGroups` | — | Group records (e.g. kanban columns) by a field. || `kanbanAggregateOperation`, `kanbanAggregateOperationFieldMetadataUniversalIdentifier`, `kanbanColumnWidth` | `AggregateOperations.*` | Kanban column aggregates and sizing. |-| `calendarLayout`, `calendarFieldMetadataUniversalIdentifier` | `ViewCalendarLayout.DAY` / `WEEK` / `MONTH` | Calendar views: layout and the date field that positions records. |+| `calendarLayout`, `calendarFieldMetadataUniversalIdentifier`, `calendarEndFieldMetadataUniversalIdentifier` | `ViewCalendarLayout.DAY` / `WEEK` / `MONTH` | Calendar views: layout, the date field that positions records, and an optional end date field. |All enums above are exported from `twenty-sdk/define`.diff --git a/packages/twenty-front/src/generated-admin/graphql.ts b/packages/twenty-front/src/generated-admin/graphql.tsindex b343699e896..8f8bd6011c1 100644--- a/packages/twenty-front/src/generated-admin/graphql.ts+++ b/packages/twenty-front/src/generated-admin/graphql.ts@@ -314,6 +314,7 @@ export type FeatureFlag = {};export enum FeatureFlagKey {+ IS_CALENDAR_WEEK_VIEW_ENABLED = 'IS_CALENDAR_WEEK_VIEW_ENABLED',IS_EMAIL_GROUP_ENABLED = 'IS_EMAIL_GROUP_ENABLED',IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED',IS_JUNCTION_RELATIONS_ENABLED = 'IS_JUNCTION_RELATIONS_ENABLED',diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.tsindex 858382c4a91..cb89939e586 100644--- a/packages/twenty-front/src/generated-metadata/graphql.ts+++ b/packages/twenty-front/src/generated-metadata/graphql.ts@@ -1332,6 +1332,7 @@ export type CreateViewGroupInput = {export type CreateViewInput = {anyFieldFilterValue?: InputMaybe<Scalars['String']['input']>;+ calendarEndFieldMetadataId?: InputMaybe<Scalars['UUID']['input']>;calendarFieldMetadataId?: InputMaybe<Scalars['UUID']['input']>;calendarLayout?: InputMaybe<ViewCalendarLayout>;icon: Scalars['String']['input'];@@ -1737,6 +1738,7 @@ export type FeatureFlag = {};export enum FeatureFlagKey {+ IS_CALENDAR_WEEK_VIEW_ENABLED = 'IS_CALENDAR_WEEK_VIEW_ENABLED',IS_EMAIL_GROUP_ENABLED = 'IS_EMAIL_GROUP_ENABLED',IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED',IS_JUNCTION_RELATIONS_ENABLED = 'IS_JUNCTION_RELATIONS_ENABLED',@@ -5649,6 +5651,7 @@ export type UpdateViewGroupInputUpdates = {export type UpdateViewInput = {anyFieldFilterValue?: InputMaybe<Scalars['String']['input']>;+ calendarEndFieldMetadataId?: InputMaybe<Scalars['UUID']['input']>;calendarFieldMetadataId?: InputMaybe<Scalars['UUID']['input']>;calendarLayout?: InputMaybe<ViewCalendarLayout>;icon?: InputMaybe<Scalars['String']['input']>;@@ -5956,6 +5959,7 @@ export type VersionDistributionEntry = {export type View = {__typename?: 'View';anyFieldFilterValue?: Maybe<Scalars['String']['output']>;+ calendarEndFieldMetadataId?: Maybe<Scalars['UUID']['output']>;calendarFieldMetadataId?: Maybe<Scalars['UUID']['output']>;calendarLayout?: Maybe<ViewCalendarLayout>;createdAt: Scalars['DateTime']['output'];@@ -7524,14 +7528,14 @@ export type UpsertFieldsWidgetMutationVariables = Exact<{}>;-export type UpsertFieldsWidgetMutation = { __typename?: 'Mutation', upsertFieldsWidget: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 UpsertFieldsWidgetMutation = { __typename?: 'Mutation', upsertFieldsWidget: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 UpsertViewWidgetMutationVariables = Exact<{input: UpsertViewWidgetInput;}>;-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, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 UpsertViewWidgetMutation = { __typename?: 'Mutation', upsertViewWidget: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 FindAllPageLayoutsQueryVariables = Exact<{ [key: string]: never; }>;@@ -8344,7 +8348,7 @@ export type ViewFilterFragmentFragment = { __typename?: 'ViewFilter', id: stringexport type ViewFilterGroupFragmentFragment = { __typename?: 'ViewFilterGroup', id: string, parentViewFilterGroupId?: string | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: string };-export type ViewFragmentFragment = { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 ViewFragmentFragment = { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 ViewGroupFragmentFragment = { __typename?: 'ViewGroup', id: string, isVisible: boolean, fieldValue: string, position: number, viewId: string, createdAt: string, updatedAt: string, deletedAt?: string | null };@@ -8376,7 +8380,7 @@ export type CreateViewMutationVariables = Exact<{}>;-export type CreateViewMutation = { __typename?: 'Mutation', createView: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 CreateViewMutation = { __typename?: 'Mutation', createView: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 CreateViewFieldMutationVariables = Exact<{input: CreateViewFieldInput;@@ -8524,7 +8528,7 @@ export type UpdateViewMutationVariables = Exact<{}>;-export type UpdateViewMutation = { __typename?: 'Mutation', updateView: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 UpdateViewMutation = { __typename?: 'Mutation', updateView: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 UpdateViewFieldMutationVariables = Exact<{input: UpdateViewFieldInput;@@ -8574,14 +8578,14 @@ export type FindAllViewsQueryVariables = Exact<{}>;-export type FindAllViewsQuery = { __typename?: 'Query', getViews: Array<{ __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 FindAllViewsQuery = { __typename?: 'Query', getViews: Array<{ __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 FindFieldsWidgetViewsQueryVariables = Exact<{viewTypes?: InputMaybe<Array<ViewType> | ViewType>;}>;-export type FindFieldsWidgetViewsQuery = { __typename?: 'Query', getViews: Array<{ __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 FindFieldsWidgetViewsQuery = { __typename?: 'Query', getViews: Array<{ __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 FindManyViewFieldsQueryVariables = Exact<{viewId: Scalars['String']['input'];@@ -8624,14 +8628,14 @@ export type FindManyViewsQueryVariables = Exact<{}>;-export type FindManyViewsQuery = { __typename?: 'Query', getViews: Array<{ __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 FindManyViewsQuery = { __typename?: 'Query', getViews: Array<{ __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 FindOneViewQueryVariables = Exact<{id: Scalars['String']['input'];}>;-export type FindOneViewQuery = { __typename?: 'Query', getView?: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 }> } | null };+export type FindOneViewQuery = { __typename?: 'Query', getView?: { __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 }> } | null };export type FindOneViewFieldQueryVariables = Exact<{id: Scalars['String']['input'];@@ -8673,7 +8677,7 @@ export type FindTableWidgetViewsQueryVariables = Exact<{}>;-export type FindTableWidgetViewsQuery = { __typename?: 'Query', getViews: Array<{ __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: string | null, mainGroupByFieldMetadataId?: string | null, shouldHideEmptyGroups: boolean, kanbanColumnWidth?: number | null, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: 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 FindTableWidgetViewsQuery = { __typename?: 'Query', getViews: Array<{ __typename?: 'View', id: string, name: string, objectMetadataId: string, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, 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 DeleteWorkspaceInvitationMutationVariables = Exact<{appTokenId: Scalars['String']['input'];@@ -8804,7 +8808,7 @@ export const ViewFilterFragmentFragmentDoc = {"kind":"Document","definitions":[{export const ViewFilterGroupFragmentFragmentDoc = {"kind":"Document","definitions":[{"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"}}]}}]} as unknown as DocumentNode<ViewFilterGroupFragmentFragment, unknown>;export const ViewSortFragmentFragmentDoc = {"kind":"Document","definitions":[{"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"}}]}}]} as unknown as DocumentNode<ViewSortFragmentFragment, unknown>;export const ViewGroupFragmentFragmentDoc = {"kind":"Document","definitions":[{"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"}}]}}]} as unknown as DocumentNode<ViewGroupFragmentFragment, unknown>;-export const ViewFragmentFragmentDoc = {"kind":"Document","definitions":[{"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":"openRecordIn"}},{"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":"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"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<ViewFragmentFragment, unknown>;+export const ViewFragmentFragmentDoc = {"kind":"Document","definitions":[{"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":"openRecordIn"}},{"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"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<ViewFragmentFragment, unknown>;export const PreviewMessageCampaignAudienceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"PreviewMessageCampaignAudience"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PreviewMessageCampaignAudienceInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"previewMessageCampaignAudience"},"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":"totalMembers"}},{"kind":"Field","name":{"kind":"Name","value":"withoutEmail"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateEmails"}},{"kind":"Field","name":{"kind":"Name","value":"globallyUnsubscribed"}},{"kind":"Field","name":{"kind":"Name","value":"topicUnsubscribed"}},{"kind":"Field","name":{"kind":"Name","value":"sendable"}}]}}]}}]} as unknown as DocumentNode<PreviewMessageCampaignAudienceQuery, PreviewMessageCampaignAudienceQueryVariables>;export const UnsubscribeTopicsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UnsubscribeTopics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"unsubscribeTopics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}}]}}]}}]} as unknown as DocumentNode<UnsubscribeTopicsQuery, UnsubscribeTopicsQueryVariables>;export const SendEmailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SendEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SendEmailInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sendEmail"},"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":"success"}},{"kind":"Field","name":{"kind":"Name","value":"error"}},{"kind":"Field","name":{"kind":"Name","value":"messageThreadId"}}]}}]}}]} as unknown as DocumentNode<SendEmailMutation, SendEmailMutationVariables>;@@ -8927,8 +8931,8 @@ export const ResetPageLayoutTabToDefaultDocument = {"kind":"Document","definitioexport const ResetPageLayoutToDefaultDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResetPageLayoutToDefault"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resetPageLayoutToDefault"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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<ResetPageLayoutToDefaultMutation, ResetPageLayoutToDefaultMutationVariables>;export const ResetPageLayoutWidgetToDefaultDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResetPageLayoutWidgetToDefault"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resetPageLayoutWidgetToDefault"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PageLayoutWidgetFragment"}}]}}]}},{"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":"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":"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":"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":"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":"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":"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":"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":"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":"pageLayoutTabId"}}]}}]} as unknown as DocumentNode<ResetPageLayoutWidgetToDefaultMutation, ResetPageLayoutWidgetToDefaultMutationVariables>;export 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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"openRecordIn"}},{"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":"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":"openRecordIn"}},{"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":"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 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":"openRecordIn"}},{"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":"openRecordIn"}},{"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 FindAllPageLayoutsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindAllPageLayouts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getPageLayouts"},"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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<FindAllPageLayoutsQuery, FindAllPageLayoutsQueryVariables>;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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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 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>;@@ -9035,7 +9039,7 @@ export const GetCurrentUserDocument = {"kind":"Document","definitions":[{"kind":export const CreateManyViewFieldGroupsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateManyViewFieldGroups"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewFieldGroupInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createManyViewFieldGroups"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inputs"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldGroupFragment"}}]}}]}},{"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"}}]}}]}}]} as unknown as DocumentNode<CreateManyViewFieldGroupsMutation, CreateManyViewFieldGroupsMutationVariables>;export const CreateManyViewFieldsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateManyViewFields"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewFieldInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createManyViewFields"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inputs"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<CreateManyViewFieldsMutation, CreateManyViewFieldsMutationVariables>;export const CreateManyViewGroupsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateManyViewGroups"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewGroupInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createManyViewGroups"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inputs"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewGroupFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<CreateManyViewGroupsMutation, CreateManyViewGroupsMutationVariables>;-export const CreateViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createView"},"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":"openRecordIn"}},{"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":"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<CreateViewMutation, CreateViewMutationVariables>;+export const CreateViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createView"},"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":"openRecordIn"}},{"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<CreateViewMutation, CreateViewMutationVariables>;export const CreateViewFieldDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateViewField"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewFieldInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createViewField"},"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":"ViewFieldFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<CreateViewFieldMutation, CreateViewFieldMutationVariables>;export const CreateViewFieldGroupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateViewFieldGroup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewFieldGroupInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createViewFieldGroup"},"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":"ViewFieldGroupFragment"}}]}}]}},{"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"}}]}}]}}]} as unknown as DocumentNode<CreateViewFieldGroupMutation, CreateViewFieldGroupMutationVariables>;export const CreateViewFilterDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateViewFilter"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateViewFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createViewFilter"},"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":"ViewFilterFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<CreateViewFilterMutation, CreateViewFilterMutationVariables>;@@ -9056,28 +9060,28 @@ export const DestroyViewFilterGroupDocument = {"kind":"Document","definitions":[export const DestroyViewGroupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DestroyViewGroup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DestroyViewGroupInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"destroyViewGroup"},"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":"ViewGroupFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<DestroyViewGroupMutation, DestroyViewGroupMutationVariables>;export const DestroyViewSortDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DestroyViewSort"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DestroyViewSortInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"destroyViewSort"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode<DestroyViewSortMutation, DestroyViewSortMutationVariables>;export const UpdateManyViewGroupsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateManyViewGroups"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateViewGroupInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateManyViewGroups"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inputs"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inputs"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewGroupFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<UpdateManyViewGroupsMutation, UpdateManyViewGroupsMutationVariables>;-export const UpdateViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateView"},"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":"UpdateViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateView"},"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":"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":"openRecordIn"}},{"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":"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<UpdateViewMutation, UpdateViewMutationVariables>;+export const UpdateViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateView"},"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":"UpdateViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateView"},"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":"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":"openRecordIn"}},{"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<UpdateViewMutation, UpdateViewMutationVariables>;export const UpdateViewFieldDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateViewField"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateViewFieldInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateViewField"},"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":"ViewFieldFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<UpdateViewFieldMutation, UpdateViewFieldMutationVariables>;export const UpdateViewFieldGroupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateViewFieldGroup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateViewFieldGroupInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateViewFieldGroup"},"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":"ViewFieldGroupFragment"}}]}}]}},{"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"}}]}}]}}]} as unknown as DocumentNode<UpdateViewFieldGroupMutation, UpdateViewFieldGroupMutationVariables>;export const UpdateViewFilterDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateViewFilter"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateViewFilterInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateViewFilter"},"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":"ViewFilterFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<UpdateViewFilterMutation, UpdateViewFilterMutationVariables>;export const UpdateViewFilterGroupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateViewFilterGroup"},"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":"UpdateViewFilterGroupInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateViewFilterGroup"},"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":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterGroupFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<UpdateViewFilterGroupMutation, UpdateViewFilterGroupMutationVariables>;export const UpdateViewGroupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateViewGroup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateViewGroupInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateViewGroup"},"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":"ViewGroupFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<UpdateViewGroupMutation, UpdateViewGroupMutationVariables>;export const UpdateViewSortDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateViewSort"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateViewSortInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateViewSort"},"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":"ViewSortFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<UpdateViewSortMutation, UpdateViewSortMutationVariables>;-export const FindAllViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindAllViews"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ViewType"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViews"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewTypes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}}}],"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":"openRecordIn"}},{"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":"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<FindAllViewsQuery, FindAllViewsQueryVariables>;-export const FindFieldsWidgetViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindFieldsWidgetViews"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ViewType"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViews"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewTypes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}}}],"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":"openRecordIn"}},{"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":"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<FindFieldsWidgetViewsQuery, FindFieldsWidgetViewsQueryVariables>;+export const FindAllViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindAllViews"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ViewType"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViews"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewTypes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}}}],"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":"openRecordIn"}},{"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<FindAllViewsQuery, FindAllViewsQueryVariables>;+export const FindFieldsWidgetViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindFieldsWidgetViews"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ViewType"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViews"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewTypes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}}}],"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":"openRecordIn"}},{"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<FindFieldsWidgetViewsQuery, FindFieldsWidgetViewsQueryVariables>;export const FindManyViewFieldsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyViewFields"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewFields"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindManyViewFieldsQuery, FindManyViewFieldsQueryVariables>;export const FindManyViewFilterGroupsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyViewFilterGroups"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewFilterGroups"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterGroupFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindManyViewFilterGroupsQuery, FindManyViewFilterGroupsQueryVariables>;export const FindManyViewFiltersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyViewFilters"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewFilters"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindManyViewFiltersQuery, FindManyViewFiltersQueryVariables>;export const FindManyViewGroupsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyViewGroups"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewGroups"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewGroupFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindManyViewGroupsQuery, FindManyViewGroupsQueryVariables>;export const FindManyViewSortsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyViewSorts"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewSorts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewSortFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindManyViewSortsQuery, FindManyViewSortsQueryVariables>;-export const FindManyViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyViews"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"objectMetadataId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ViewType"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViews"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"objectMetadataId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"objectMetadataId"}}},{"kind":"Argument","name":{"kind":"Name","value":"viewTypes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}}}],"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":"openRecordIn"}},{"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":"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<FindManyViewsQuery, FindManyViewsQueryVariables>;-export const FindOneViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getView"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"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":"openRecordIn"}},{"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":"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<FindOneViewQuery, FindOneViewQueryVariables>;+export const FindManyViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyViews"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"objectMetadataId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ViewType"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViews"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"objectMetadataId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"objectMetadataId"}}},{"kind":"Argument","name":{"kind":"Name","value":"viewTypes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}}}],"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":"openRecordIn"}},{"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<FindManyViewsQuery, FindManyViewsQueryVariables>;+export const FindOneViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getView"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"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":"openRecordIn"}},{"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<FindOneViewQuery, FindOneViewQueryVariables>;export const FindOneViewFieldDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneViewField"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewField"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFieldFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindOneViewFieldQuery, FindOneViewFieldQueryVariables>;export const FindOneViewFilterDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneViewFilter"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewFilter"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindOneViewFilterQuery, FindOneViewFilterQueryVariables>;export const FindOneViewFilterGroupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneViewFilterGroup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewFilterGroup"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewFilterGroupFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindOneViewFilterGroupQuery, FindOneViewFilterGroupQueryVariables>;export const FindOneViewGroupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneViewGroup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewGroup"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewGroupFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindOneViewGroupQuery, FindOneViewGroupQueryVariables>;export const FindOneViewSortDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneViewSort"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViewSort"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewSortFragment"}}]}}]}},{"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"}}]}}]} as unknown as DocumentNode<FindOneViewSortQuery, FindOneViewSortQueryVariables>;-export const FindTableWidgetViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindTableWidgetViews"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ViewType"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViews"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewTypes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}}}],"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":"openRecordIn"}},{"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":"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<FindTableWidgetViewsQuery, FindTableWidgetViewsQueryVariables>;+export const FindTableWidgetViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindTableWidgetViews"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ViewType"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getViews"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"viewTypes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewTypes"}}}],"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":"openRecordIn"}},{"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<FindTableWidgetViewsQuery, FindTableWidgetViewsQueryVariables>;export const DeleteWorkspaceInvitationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteWorkspaceInvitation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"appTokenId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteWorkspaceInvitation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"appTokenId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"appTokenId"}}}]}]}}]} as unknown as DocumentNode<DeleteWorkspaceInvitationMutation, DeleteWorkspaceInvitationMutationVariables>;export const ResendWorkspaceInvitationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResendWorkspaceInvitation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"appTokenId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resendWorkspaceInvitation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"appTokenId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"appTokenId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"errors"}},{"kind":"Field","name":{"kind":"Name","value":"result"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceInvitation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}}]}}]}}]}}]} as unknown as DocumentNode<ResendWorkspaceInvitationMutation, ResendWorkspaceInvitationMutationVariables>;export const SendInvitationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SendInvitations"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"emails"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"roleId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sendInvitations"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"emails"},"value":{"kind":"Variable","name":{"kind":"Name","value":"emails"}}},{"kind":"Argument","name":{"kind":"Name","value":"roleId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"roleId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"errors"}},{"kind":"Field","name":{"kind":"Name","value":"result"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceInvitation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"expiresAt"}}]}}]}}]}}]}}]} as unknown as DocumentNode<SendInvitationsMutation, SendInvitationsMutationVariables>;diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarEndFieldsContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarEndFieldsContent.tsxnew file mode 100644index 00000000000..1f9cb4181b3--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarEndFieldsContent.tsx@@ -0,0 +1,109 @@+import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';+import { useObjectOptionsDropdown } from '@/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';+import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';+import { DropdownMenuHeader } from '@/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader';+import { DropdownMenuHeaderLeftComponent } from '@/ui/layout/dropdown/components/DropdownMenuHeader/internal/DropdownMenuHeaderLeftComponent';+import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';+import { DropdownMenuSearchInput } from '@/ui/layout/dropdown/components/DropdownMenuSearchInput';+import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator';+import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';+import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';+import { useUpdateCurrentView } from '@/views/hooks/useUpdateCurrentView';+import { useGetAvailableFieldsForCalendar } from '@/views/view-picker/hooks/useGetAvailableFieldsForCalendar';+import { getAvailableCalendarEndFieldMetadataItems } from '@/views/view-picker/utils/getAvailableCalendarEndFieldMetadataItems';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';+import { useLingui } from '@lingui/react/macro';+import { useState } from 'react';+import { isDefined } from 'twenty-shared/utils';+import { IconChevronLeft, useIcons } from 'twenty-ui/icon';+import { MenuItemSelect } from 'twenty-ui/navigation';+import { FeatureFlagKey } from '~/generated-metadata/graphql';++export const ObjectOptionsDropdownCalendarEndFieldsContent = () => {+ const { t } = useLingui();+ const { getIcon } = useIcons();+ const [searchInput, setSearchInput] = useState('');+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );++ const { resetContent, closeDropdown } = useObjectOptionsDropdown();++ const { currentView } = useGetCurrentViewOnly();+ const { updateCurrentView } = useUpdateCurrentView();+ const { availableFieldsForCalendar } = useGetAvailableFieldsForCalendar();++ const setRecordIndexCalendarEndFieldMetadataId = useSetAtomState(+ recordIndexCalendarEndFieldMetadataIdState,+ );++ const availableCalendarEndFieldMetadataItems =+ getAvailableCalendarEndFieldMetadataItems({+ availableFieldsForCalendar,+ calendarFieldMetadataId: currentView?.calendarFieldMetadataId,+ });++ const filteredCalendarEndFields =+ availableCalendarEndFieldMetadataItems.filter((field) =>+ field.label.toLowerCase().includes(searchInput.toLowerCase()),+ );++ const handleCalendarEndFieldChange = async (+ fieldMetadataItem: FieldMetadataItem | null,+ ) => {+ if (!isCalendarWeekViewEnabled) {+ return;+ }++ const calendarEndFieldMetadataId = fieldMetadataItem?.id ?? null;++ setRecordIndexCalendarEndFieldMetadataId(calendarEndFieldMetadataId);+ await updateCurrentView({ calendarEndFieldMetadataId });+ closeDropdown();+ };++ if (!isCalendarWeekViewEnabled) {+ return null;+ }++ return (+ <DropdownContent>+ <DropdownMenuHeader+ StartComponent={+ <DropdownMenuHeaderLeftComponent+ onClick={() => resetContent()}+ Icon={IconChevronLeft}+ />+ }+ >+ {t`End date field`}+ </DropdownMenuHeader>+ <DropdownMenuSearchInput+ autoFocus+ value={searchInput}+ placeholder={t`Search fields`}+ onChange={(event) => setSearchInput(event.target.value)}+ />+ <DropdownMenuSeparator />+ <DropdownMenuItemsContainer>+ <MenuItemSelect+ selected={!isDefined(currentView?.calendarEndFieldMetadataId)}+ onClick={() => handleCalendarEndFieldChange(null)}+ text={t`None`}+ />+ {filteredCalendarEndFields.map((fieldMetadataItem) => (+ <MenuItemSelect+ key={fieldMetadataItem.id}+ selected={+ fieldMetadataItem.id === currentView?.calendarEndFieldMetadataId+ }+ onClick={() => handleCalendarEndFieldChange(fieldMetadataItem)}+ LeftIcon={getIcon(fieldMetadataItem.icon)}+ text={fieldMetadataItem.label}+ />+ ))}+ </DropdownMenuItemsContainer>+ </DropdownContent>+ );+};diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarFieldsContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarFieldsContent.tsxindex 7715e47b18e..500d4cdc553 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarFieldsContent.tsx+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarFieldsContent.tsx@@ -1,5 +1,6 @@import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';import { useObjectOptionsDropdown } from '@/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';import { recordIndexCalendarFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarFieldMetadataIdState';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';import { DropdownMenuHeader } from '@/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader';@@ -13,6 +14,7 @@ import { useGetAvailableFieldsForCalendar } from '@/views/view-picker/hooks/useGimport { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';import { useLingui } from '@lingui/react/macro';import { useState } from 'react';+import { isDefined } from 'twenty-shared/utils';import { IconChevronLeft, IconSettings, useIcons } from 'twenty-ui/icon';import { MenuItem, MenuItemSelect } from 'twenty-ui/navigation';@@ -32,6 +34,9 @@ export const ObjectOptionsDropdownCalendarFieldsContent = () => {const setRecordIndexCalendarFieldMetadataId = useSetAtomState(recordIndexCalendarFieldMetadataIdState,);+ const setRecordIndexCalendarEndFieldMetadataId = useSetAtomState(+ recordIndexCalendarEndFieldMetadataIdState,+ );const calendarFieldMetadata = currentView?.calendarFieldMetadataId? objectMetadataItem.fields.find(@@ -39,6 +44,12 @@ export const ObjectOptionsDropdownCalendarFieldsContent = () => {): undefined;+ const calendarEndFieldMetadata = currentView?.calendarEndFieldMetadataId+ ? objectMetadataItem.fields.find(+ (field) => field.id === currentView.calendarEndFieldMetadataId,+ )+ : undefined;+const filteredCalendarFields = availableFieldsForCalendar.filter((field) =>field.label.toLowerCase().includes(searchInput.toLowerCase()),);@@ -46,9 +57,22 @@ export const ObjectOptionsDropdownCalendarFieldsContent = () => {const handleCalendarFieldChange = async (fieldMetadataItem: FieldMetadataItem,) => {+ const shouldClearCalendarEndField =+ isDefined(currentView?.calendarEndFieldMetadataId) &&+ (!isDefined(calendarEndFieldMetadata) ||+ calendarEndFieldMetadata.id === fieldMetadataItem.id ||+ calendarEndFieldMetadata.type !== fieldMetadataItem.type);+setRecordIndexCalendarFieldMetadataId(fieldMetadataItem.id);+ if (shouldClearCalendarEndField) {+ setRecordIndexCalendarEndFieldMetadataId(null);+ }+await updateCurrentView({calendarFieldMetadataId: fieldMetadataItem.id,+ ...(shouldClearCalendarEndField+ ? { calendarEndFieldMetadataId: null }+ : {}),});closeDropdown();};diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarViewContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarViewContent.tsxindex 6f203d56c9f..8ee168efad6 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarViewContent.tsx+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarViewContent.tsx@@ -1,5 +1,6 @@import { OBJECT_OPTIONS_DROPDOWN_ID } from '@/object-record/object-options-dropdown/constants/ObjectOptionsDropdownId';import { useObjectOptionsDropdown } from '@/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown';+import { getSupportedRecordCalendarLayout } from '@/object-record/record-calendar/utils/getSupportedRecordCalendarLayout';import { recordIndexCalendarLayoutState } from '@/object-record/record-index/states/recordIndexCalendarLayoutState';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';import { DropdownMenuHeader } from '@/ui/layout/dropdown/components/DropdownMenuHeader/DropdownMenuHeader';@@ -12,6 +13,7 @@ import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useimport { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState';import { useUpdateCurrentView } from '@/views/hooks/useUpdateCurrentView';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { t } from '@lingui/core/macro';import { Pill } from 'twenty-ui/data-display';import {@@ -21,13 +23,23 @@ import {IconTimelineEvent,} from 'twenty-ui/icon';import { MenuItemSelect } from 'twenty-ui/navigation';-import { ViewCalendarLayout } from '~/generated-metadata/graphql';+import {+ FeatureFlagKey,+ ViewCalendarLayout,+} from '~/generated-metadata/graphql';export const ObjectOptionsDropdownCalendarViewContent = () => {const { resetContent } = useObjectOptionsDropdown();const recordIndexCalendarLayout = useAtomStateValue(recordIndexCalendarLayoutState,);+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );+ const supportedCalendarLayout = getSupportedRecordCalendarLayout({+ calendarLayout: recordIndexCalendarLayout,+ isCalendarWeekViewEnabled,+ });const setRecordIndexCalendarLayout = useSetAtomState(recordIndexCalendarLayoutState,);@@ -47,6 +59,18 @@ export const ObjectOptionsDropdownCalendarViewContent = () => {];const handleCalendarViewChange = async (calendarView: ViewCalendarLayout) => {+ if (+ calendarView === ViewCalendarLayout.WEEK &&+ !isCalendarWeekViewEnabled+ ) {+ return;+ }++ if (calendarView === supportedCalendarLayout) {+ closeDropdown();+ return;+ }+setRecordIndexCalendarLayout(calendarView);await updateCurrentView({calendarLayout: calendarView,@@ -75,17 +99,26 @@ export const ObjectOptionsDropdownCalendarViewContent = () => {<SelectableListItemitemId={ViewCalendarLayout.WEEK}onEnter={() => {- handleCalendarViewChange(ViewCalendarLayout.WEEK);+ if (isCalendarWeekViewEnabled) {+ handleCalendarViewChange(ViewCalendarLayout.WEEK);+ }}}><MenuItemSelectLeftIcon={IconCalendarWeek}text={t`Week`}- selected={recordIndexCalendarLayout === ViewCalendarLayout.WEEK}+ selected={supportedCalendarLayout === ViewCalendarLayout.WEEK}+ onClick={+ isCalendarWeekViewEnabled+ ? () => handleCalendarViewChange(ViewCalendarLayout.WEEK)+ : undefined+ }focused={selectedItemId === ViewCalendarLayout.WEEK}- contextualText={<Pill label={t`Soon`} />}+ contextualText={+ isCalendarWeekViewEnabled ? undefined : <Pill label={t`Soon`} />+ }contextualTextPosition="right"- disabled+ disabled={!isCalendarWeekViewEnabled}/></SelectableListItem><SelectableListItem@@ -95,7 +128,7 @@ export const ObjectOptionsDropdownCalendarViewContent = () => {<MenuItemSelectLeftIcon={IconCalendarMonth}text={t`Month`}- selected={recordIndexCalendarLayout === ViewCalendarLayout.MONTH}+ selected={supportedCalendarLayout === ViewCalendarLayout.MONTH}onClick={() => handleCalendarViewChange(ViewCalendarLayout.MONTH)}focused={selectedItemId === ViewCalendarLayout.MONTH}/>diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownContent.tsxindex ae156da1fac..8917a5905da 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownContent.tsx+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownContent.tsx@@ -1,5 +1,6 @@import { ObjectOptionsDropdownAddRecordGroupContent } from '@/object-record/object-options-dropdown/components/ObjectOptionsDropdownAddRecordGroupContent';import { ObjectOptionsDropdownCalendarFieldsContent } from '@/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarFieldsContent';+import { ObjectOptionsDropdownCalendarEndFieldsContent } from '@/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarEndFieldsContent';import { ObjectOptionsDropdownCalendarViewContent } from '@/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarViewContent';import { ObjectOptionsDropdownFieldsContent } from '@/object-record/object-options-dropdown/components/ObjectOptionsDropdownFieldsContent';import { ObjectOptionsDropdownHiddenFieldsContent } from '@/object-record/object-options-dropdown/components/ObjectOptionsDropdownHiddenFieldsContent';@@ -12,9 +13,14 @@ import { ObjectOptionsDropdownRecordGroupsContent } from '@/object-record/objectimport { ObjectOptionsDropdownRecordGroupSortContent } from '@/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupSortContent';import { ObjectOptionsDropdownVisibilityContent } from '@/object-record/object-options-dropdown/components/ObjectOptionsDropdownVisibilityContent';import { useObjectOptionsDropdown } from '@/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';+import { FeatureFlagKey } from '~/generated-metadata/graphql';export const ObjectOptionsDropdownContent = () => {const { currentContentId } = useObjectOptionsDropdown();+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );switch (currentContentId) {case 'layout':@@ -39,6 +45,12 @@ export const ObjectOptionsDropdownContent = () => {return <ObjectOptionsDropdownCalendarViewContent />;case 'calendarFields':return <ObjectOptionsDropdownCalendarFieldsContent />;+ case 'calendarEndFields':+ return isCalendarWeekViewEnabled ? (+ <ObjectOptionsDropdownCalendarEndFieldsContent />+ ) : (+ <ObjectOptionsDropdownMenuContent />+ );case 'visibility':return <ObjectOptionsDropdownVisibilityContent />;default:diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCustomView.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCustomView.tsxindex f61efba877d..6ea2b089ee4 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCustomView.tsx+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCustomView.tsx@@ -2,6 +2,7 @@ import { ObjectOptionsDropdownMenuViewName } from '@/object-record/object-optionimport { OBJECT_OPTIONS_DROPDOWN_ID } from '@/object-record/object-options-dropdown/constants/ObjectOptionsDropdownId';import { useObjectOptionsDropdown } from '@/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown';import { useObjectOptionsForBoard } from '@/object-record/object-options-dropdown/hooks/useObjectOptionsForBoard';+import { getSupportedRecordCalendarLayout } from '@/object-record/record-calendar/utils/getSupportedRecordCalendarLayout';import { recordIndexCalendarLayoutState } from '@/object-record/record-index/states/recordIndexCalendarLayoutState';import { recordIndexGroupFieldMetadataItemComponentState } from '@/object-record/record-index/states/recordIndexGroupFieldMetadataComponentState';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';@@ -22,6 +23,7 @@ import {viewTypeIconMapping,} from '@/views/types/ViewType';import { useDestroyViewFromCurrentState } from '@/views/view-picker/hooks/useDestroyViewFromCurrentState';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { viewPickerReferenceViewIdComponentState } from '@/views/view-picker/states/viewPickerReferenceViewIdComponentState';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';@@ -37,7 +39,10 @@ import {} from 'twenty-ui/icon';import { AppTooltip } from 'twenty-ui/surfaces';import { MenuItem } from 'twenty-ui/navigation';-import { ViewCalendarLayout } from '~/generated-metadata/graphql';+import {+ FeatureFlagKey,+ ViewCalendarLayout,+} from '~/generated-metadata/graphql';interface ObjectOptionsDropdownCustomViewProps {onBackToDefault?: () => void;@@ -70,6 +75,12 @@ export const ObjectOptionsDropdownCustomView = ({): undefined;+ const calendarEndFieldMetadata = currentView?.calendarEndFieldMetadataId+ ? objectMetadataItem.fields.find(+ (field) => field.id === currentView.calendarEndFieldMetadataId,+ )+ : undefined;+const viewsOnCurrentObject = useAtomFamilySelectorValue(viewsFromObjectMetadataItemFamilySelector,{ objectMetadataItemId: objectMetadataItem.id },@@ -81,6 +92,13 @@ export const ObjectOptionsDropdownCustomView = ({const recordIndexCalendarLayout = useAtomStateValue(recordIndexCalendarLayoutState,);+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );+ const supportedCalendarLayout = getSupportedRecordCalendarLayout({+ calendarLayout: recordIndexCalendarLayout,+ isCalendarWeekViewEnabled,+ });const { visibleBoardFields } = useObjectOptionsForBoard({objectNameSingular: objectMetadataItem.nameSingular,@@ -111,7 +129,11 @@ export const ObjectOptionsDropdownCustomView = ({'Visibility','Fields',...(customViewData?.type === ViewType.CALENDAR- ? ['CalendarDateField', 'CalendarView']+ ? [+ 'CalendarDateField',+ ...(isCalendarWeekViewEnabled ? ['CalendarEndDateField'] : []),+ 'CalendarView',+ ]: []),...(customViewData?.type !== ViewType.CALENDAR ? ['Group'] : []),'Delete view',@@ -196,6 +218,29 @@ export const ObjectOptionsDropdownCustomView = ({/></SelectableListItem></div>+ {isCalendarWeekViewEnabled && (+ <div id="calendar-end-date-field-picker-menu-item">+ <SelectableListItem+ itemId="CalendarEndDateField"+ onEnter={() => onContentChange('calendarEndFields')}+ >+ <MenuItem+ focused={selectedItemId === 'CalendarEndDateField'}+ onClick={() => onContentChange('calendarEndFields')}+ LeftIcon={IconCalendar}+ text={t`End date field`}+ contextualText={+ isDefaultView+ ? t`Not available on Default View`+ : (calendarEndFieldMetadata?.label ?? t`None`)+ }+ contextualTextPosition="right"+ hasSubMenu+ disabled={isDefaultView}+ />+ </SelectableListItem>+ </div>+ )}<SelectableListItemitemId="CalendarView"onEnter={() => onContentChange('calendarView')}@@ -206,9 +251,9 @@ export const ObjectOptionsDropdownCustomView = ({LeftIcon={IconCalendarWeek}text={t`Calendar view`}contextualText={- recordIndexCalendarLayout === ViewCalendarLayout.MONTH+ supportedCalendarLayout === ViewCalendarLayout.MONTH? t`Month`- : recordIndexCalendarLayout === ViewCalendarLayout.WEEK+ : supportedCalendarLayout === ViewCalendarLayout.WEEK? t`Week`: t`Day`}diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsxindex 3da7828a2d3..e5fcc91fd69 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownLayoutContent.tsx@@ -1,6 +1,7 @@import { OBJECT_OPTIONS_DROPDOWN_ID } from '@/object-record/object-options-dropdown/constants/ObjectOptionsDropdownId';import { useObjectOptionsDropdown } from '@/object-record/object-options-dropdown/hooks/useObjectOptionsDropdown';import { useSetViewTypeFromLayoutOptionsMenu } from '@/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu';+import { getSupportedRecordCalendarLayout } from '@/object-record/record-calendar/utils/getSupportedRecordCalendarLayout';import { recordIndexCalendarLayoutState } from '@/object-record/record-index/states/recordIndexCalendarLayoutState';import { recordIndexGroupFieldMetadataItemComponentState } from '@/object-record/record-index/states/recordIndexGroupFieldMetadataComponentState';import { recordIndexOpenRecordInState } from '@/object-record/record-index/states/recordIndexOpenRecordInState';@@ -24,6 +25,7 @@ import {} from '@/views/types/ViewType';import { useGetAvailableFieldsForCalendar } from '@/views/view-picker/hooks/useGetAvailableFieldsForCalendar';import { useGetAvailableFieldsToGroupRecordsBy } from '@/views/view-picker/hooks/useGetAvailableFieldsToGroupRecordsBy';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useLingui } from '@lingui/react/macro';import { useCallback } from 'react';@@ -41,6 +43,7 @@ import {import { OverflowingTextWithTooltip } from 'twenty-ui/surfaces';import { MenuItem, MenuItemSelect, MenuItemToggle } from 'twenty-ui/navigation';import {+ FeatureFlagKey,ViewCalendarLayout,ViewOpenRecordIn,} from '~/generated-metadata/graphql';@@ -72,6 +75,13 @@ export const ObjectOptionsDropdownLayoutContent = () => {const recordIndexCalendarLayout = useAtomStateValue(recordIndexCalendarLayoutState,);+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );+ const supportedCalendarLayout = getSupportedRecordCalendarLayout({+ calendarLayout: recordIndexCalendarLayout,+ isCalendarWeekViewEnabled,+ });const recordIndexGroupFieldMetadataItem = useAtomComponentStateValue(recordIndexGroupFieldMetadataItemComponentState,);@@ -82,6 +92,12 @@ export const ObjectOptionsDropdownLayoutContent = () => {): undefined;+ const calendarEndFieldMetadata = currentView?.calendarEndFieldMetadataId+ ? objectMetadataItem.fields.find(+ (field) => field.id === currentView.calendarEndFieldMetadataId,+ )+ : undefined;+const { setAndPersistViewType } = useSetViewTypeFromLayoutOptionsMenu();const { availableFieldsForGrouping, navigateToSelectSettings } =useGetAvailableFieldsToGroupRecordsBy();@@ -127,7 +143,11 @@ export const ObjectOptionsDropdownLayoutContent = () => {ViewOpenRecordIn.SIDE_PANEL,...(currentView?.type === ViewType.KANBAN ? ['Group'] : []),...(currentView?.type === ViewType.CALENDAR- ? ['CalendarView', 'CalendarDateField']+ ? [+ 'CalendarView',+ 'CalendarDateField',+ ...(isCalendarWeekViewEnabled ? ['CalendarEndDateField'] : []),+ ]: []),...(currentView?.type !== ViewType.TABLE ? ['Compact view'] : []),];@@ -236,6 +256,24 @@ export const ObjectOptionsDropdownLayoutContent = () => {hasSubMenu/></SelectableListItem>+ {isCalendarWeekViewEnabled && (+ <SelectableListItem+ itemId="CalendarEndDateField"+ onEnter={() => onContentChange('calendarEndFields')}+ >+ <MenuItem+ focused={selectedItemId === 'CalendarEndDateField'}+ onClick={() => onContentChange('calendarEndFields')}+ LeftIcon={IconCalendar}+ text={t`End date field`}+ contextualText={+ calendarEndFieldMetadata?.label ?? t`None`+ }+ contextualTextPosition="right"+ hasSubMenu+ />+ </SelectableListItem>+ )}<SelectableListItemitemId="CalendarView"onEnter={() => onContentChange('calendarView')}@@ -246,9 +284,9 @@ export const ObjectOptionsDropdownLayoutContent = () => {LeftIcon={IconCalendarWeek}text={t`Calendar view`}contextualText={- recordIndexCalendarLayout === ViewCalendarLayout.MONTH+ supportedCalendarLayout === ViewCalendarLayout.MONTH? t`Month`- : recordIndexCalendarLayout === ViewCalendarLayout.WEEK+ : supportedCalendarLayout === ViewCalendarLayout.WEEK? t`Week`: t`Day`}diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.tsindex 6c4b329047a..f8c1b69ffc2 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/hooks/useSetViewTypeFromLayoutOptionsMenu.ts@@ -97,6 +97,7 @@ export const useSetViewTypeFromLayoutOptionsMenu = () => {...currentView,type: viewType,calendarFieldMetadataId,+ calendarEndFieldMetadataId: null,calendarLayout: ViewCalendarLayout.MONTH,},objectMetadataItem,@@ -109,6 +110,7 @@ export const useSetViewTypeFromLayoutOptionsMenu = () => {updateCurrentViewParams.calendarLayout = ViewCalendarLayout.MONTH;updateCurrentViewParams.calendarFieldMetadataId =calendarFieldMetadataId;+ updateCurrentViewParams.calendarEndFieldMetadataId = null;updateCurrentViewParams.mainGroupByFieldMetadataId = null;return await updateCurrentView(updateCurrentViewParams);}diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/types/ObjectOptionsContentId.ts b/packages/twenty-front/src/modules/object-record/object-options-dropdown/types/ObjectOptionsContentId.tsindex 32df7efc30f..ce83017f31f 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/types/ObjectOptionsContentId.ts+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/types/ObjectOptionsContentId.ts@@ -9,5 +9,6 @@ export type ObjectOptionsContentId =| 'recordGroupSort'| 'addRecordGroup'| 'calendarFields'+ | 'calendarEndFields'| 'calendarView'| 'visibility';diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsxindex 4d7edb5bccc..c8f2e909ad2 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendar.tsx@@ -5,16 +5,26 @@ import { COMMAND_MENU_CLICK_OUTSIDE_ID } from '@/command-menu/constants/CommandMimport { RecordCalendarTopBar } from '@/object-record/record-calendar/components/RecordCalendarTopBar';import { RECORD_CALENDAR_CLICK_OUTSIDE_LISTENER_ID } from '@/object-record/record-calendar/constants/RecordCalendarClickOutsideListenerId';import { RecordCalendarMonth } from '@/object-record/record-calendar/month/components/RecordCalendarMonth';+import { RecordCalendarWeek } from '@/object-record/record-calendar/week/components/RecordCalendarWeek';import { RECORD_CALENDAR_CARD_CLICK_OUTSIDE_ID } from '@/object-record/record-calendar/record-calendar-card/constants/RecordCalendarCardClickOutsideId';+import { recordIndexCalendarLayoutState } from '@/object-record/record-index/states/recordIndexCalendarLayoutState';import { RecordCalendarComponentInstanceContext } from '@/object-record/record-calendar/states/contexts/RecordCalendarComponentInstanceContext';import { useRecordCalendarSelection } from '@/object-record/record-calendar/states/selectors/useRecordCalendarSelection';+import { getSupportedRecordCalendarLayout } from '@/object-record/record-calendar/utils/getSupportedRecordCalendarLayout';import { MODAL_BACKDROP_CLICK_OUTSIDE_ID } from '@/ui/layout/modal/constants/ModalBackdropClickOutsideId';import { PAGE_ACTION_CONTAINER_CLICK_OUTSIDE_ID } from '@/ui/layout/page/constants/PageActionContainerClickOutsideId';import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';import { ScrollWrapper } from '@/ui/utilities/scroll/components/ScrollWrapper';import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';+import { useEffect } from 'react';import { LINK_CHIP_CLICK_OUTSIDE_ID } from 'twenty-ui/data-display';import { themeCssVariables } from 'twenty-ui/theme-constants';+import {+ FeatureFlagKey,+ ViewCalendarLayout,+} from '~/generated-metadata/graphql';const StyledContainerContainer = styled.div`box-sizing: border-box;@@ -33,6 +43,21 @@ export const RecordCalendar = () => {const { resetRecordSelection } = useRecordCalendarSelection(recordCalendarId);+ const recordIndexCalendarLayout = useAtomStateValue(+ recordIndexCalendarLayoutState,+ );+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );+ const supportedCalendarLayout = getSupportedRecordCalendarLayout({+ calendarLayout: recordIndexCalendarLayout,+ isCalendarWeekViewEnabled,+ });++ useEffect(() => {+ resetRecordSelection();+ }, [resetRecordSelection, supportedCalendarLayout]);+useListenClickOutside({excludedClickOutsideIds: [COMMAND_MENU_DROPDOWN_CLICK_OUTSIDE_ID,@@ -55,7 +80,11 @@ export const RecordCalendar = () => {<ScrollWrappercomponentInstanceId={`scroll-wrapper-record-calendar-${recordCalendarId}`}>- <RecordCalendarMonth />+ {supportedCalendarLayout === ViewCalendarLayout.WEEK ? (+ <RecordCalendarWeek />+ ) : (+ <RecordCalendarMonth />+ )}</ScrollWrapper></StyledContainerContainer>);diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarAddNew.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarAddNew.tsxindex adeff443449..09556f2e866 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarAddNew.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarAddNew.tsx@@ -2,6 +2,7 @@ import { useObjectPermissionsForObject } from '@/object-record/hooks/useObjectPeimport { isFieldMetadataReadOnlyByPermissions } from '@/object-record/read-only/utils/internal/isFieldMetadataReadOnlyByPermissions';import { useRecordCalendarContextOrThrow } from '@/object-record/record-calendar/contexts/RecordCalendarContext';import { hasAnySoftDeleteFilterOnViewComponentSelector } from '@/object-record/record-filter/states/hasAnySoftDeleteFilterOnView';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';import { recordIndexCalendarFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarFieldMetadataIdState';import { useCreateNewIndexRecord } from '@/object-record/record-table/hooks/useCreateNewIndexRecord';import { canCreateRecordsForObjectMetadataItem } from '@/object-record/utils/canCreateRecordsForObjectMetadataItem';@@ -9,24 +10,30 @@ import { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUsimport { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue';import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { styled } from '@linaria/react';+import { t } from '@lingui/core/macro';import { useContext } from 'react';import { type Temporal } from 'temporal-polyfill';+import { FieldMetadataType } from 'twenty-shared/types';import { IconPlus } from 'twenty-ui/icon';import { Button } from 'twenty-ui/input';import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants';-const StyledButtonContainer = styled.div`+const StyledButtonContainer = styled.div<{ compact: boolean }>`height: auto;min-width: unset;- padding: ${themeCssVariables.spacing['0.5']};+ padding: ${({ compact }) => (compact ? 0 : themeCssVariables.spacing['0.5'])};`;type RecordCalendarAddNewProps = {cardDate: Temporal.PlainDate;+ cardTime?: Temporal.PlainTime;+ compact?: boolean;};export const RecordCalendarAddNew = ({cardDate,+ cardTime,+ compact = false,}: RecordCalendarAddNewProps) => {const { theme } = useContext(ThemeContext);const { userTimezone } = useUserTimezone();@@ -46,18 +53,33 @@ export const RecordCalendarAddNew = ({const recordIndexCalendarFieldMetadataId = useAtomStateValue(recordIndexCalendarFieldMetadataIdState,);+ const recordIndexCalendarEndFieldMetadataId = useAtomStateValue(+ recordIndexCalendarEndFieldMetadataIdState,+ );const calendarFieldMetadataItem = objectMetadataItem.fields.find((field) => field.id === recordIndexCalendarFieldMetadataId,);+ const calendarEndFieldMetadataItem = objectMetadataItem.fields.find(+ (field) => field.id === recordIndexCalendarEndFieldMetadataId,+ );const isCalendarFieldReadOnly = calendarFieldMetadataItem- ? isFieldMetadataReadOnlyByPermissions({+ ? calendarFieldMetadataItem.isUIEditable === false ||+ isFieldMetadataReadOnlyByPermissions({objectPermissions,fieldMetadataId: calendarFieldMetadataItem.id,}): false;+ const isCalendarEndFieldReadOnly = calendarEndFieldMetadataItem+ ? calendarEndFieldMetadataItem.isUIEditable === false ||+ isFieldMetadataReadOnlyByPermissions({+ objectPermissions,+ fieldMetadataId: calendarEndFieldMetadataItem.id,+ })+ : false;+if (hasAnySoftDeleteFilterOnView === true ||!canCreateRecordsForObjectMetadataItem({@@ -70,17 +92,49 @@ export const RecordCalendarAddNew = ({return null;}+ const createRecordAriaLabel = cardTime+ ? t`Create record on ${cardDate.toLocaleString(undefined, {+ dateStyle: 'full',+ })} at ${cardTime.toLocaleString(undefined, { timeStyle: 'short' })}`+ : t`Create record`;+return (- <StyledButtonContainer>+ <StyledButtonContainer compact={compact}><Button- onClick={async () => {+ ariaLabel={createRecordAriaLabel}+ onClick={async (event) => {+ event.stopPropagation();++ const startDateTime = cardDate.toZonedDateTime({+ timeZone: userTimezone,+ plainTime: cardTime,+ });+ const startValue =+ calendarFieldMetadataItem.type === FieldMetadataType.DATE+ ? cardDate.toString()+ : startDateTime.toInstant().toString();+await createNewIndexRecord({- [calendarFieldMetadataItem.name]: cardDate- .toZonedDateTime(userTimezone)- .toInstant()- .toString(),+ [calendarFieldMetadataItem.name]: startValue,+ ...(calendarFieldMetadataItem.type === FieldMetadataType.DATE &&+ isCalendarEndFieldReadOnly === false &&+ calendarEndFieldMetadataItem?.type === FieldMetadataType.DATE && {+ [calendarEndFieldMetadataItem.name]: cardDate.toString(),+ }),+ ...(calendarFieldMetadataItem.type ===+ FieldMetadataType.DATE_TIME &&+ isCalendarEndFieldReadOnly === false &&+ calendarEndFieldMetadataItem?.type ===+ FieldMetadataType.DATE_TIME && {+ [calendarEndFieldMetadataItem.name]: startDateTime+ .add({ hours: 1 })+ .toInstant()+ .toString(),+ }),});}}+ size={compact ? 'small' : 'medium'}+ type="button"variant="tertiary"Icon={() => <IconPlus size={theme.icon.size.sm} />}/>diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsxindex fb91ea19b94..a9f5a2c3257 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx@@ -1,7 +1,12 @@import { RecordCalendarComponentInstanceContext } from '@/object-record/record-calendar/states/contexts/RecordCalendarComponentInstanceContext';import { recordCalendarSelectedDateComponentState } from '@/object-record/record-calendar/states/recordCalendarSelectedDateComponentState';+import { getSupportedRecordCalendarLayout } from '@/object-record/record-calendar/utils/getSupportedRecordCalendarLayout';+import { useRecordCalendarWeekDaysRange } from '@/object-record/record-calendar/week/hooks/useRecordCalendarWeekDaysRange';+import { formatRecordCalendarWeekRange } from '@/object-record/record-calendar/week/utils/formatRecordCalendarWeekRange';+import { recordIndexCalendarLayoutState } from '@/object-record/record-index/states/recordIndexCalendarLayoutState';import { DatePickerWithoutCalendar } from '@/ui/input/components/internal/date/components/DatePickerWithoutCalendar';import { TimeZoneAbbreviation } from '@/ui/input/components/internal/date/components/TimeZoneAbbreviation';+import { Select } from '@/ui/input/components/Select';import { SelectControl } from '@/ui/input/components/SelectControl';import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';@@ -9,6 +14,10 @@ import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { type DropdownOffset } from '@/ui/layout/dropdown/types/DropdownOffset';import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { useAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentState';+import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState';+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { useUpdateCurrentView } from '@/views/hooks/useUpdateCurrentView';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { styled } from '@linaria/react';import { t } from '@lingui/core/macro';import { format } from 'date-fns';@@ -21,6 +30,11 @@ import {import { IconChevronLeft, IconChevronRight } from 'twenty-ui/icon';import { Button } from 'twenty-ui/input';import { themeCssVariables } from 'twenty-ui/theme-constants';+import {+ FeatureFlagKey,+ ViewCalendarLayout,+} from '~/generated-metadata/graphql';+import { dateLocaleState } from '~/localization/states/dateLocaleState';const StyledContainer = styled.div`align-items: center;@@ -55,6 +69,23 @@ export const RecordCalendarTopBar = () => {const [recordCalendarSelectedDate, setRecordCalendarSelectedDate] =useAtomComponentState(recordCalendarSelectedDateComponentState);+ const [recordIndexCalendarLayout, setRecordIndexCalendarLayout] =+ useAtomState(recordIndexCalendarLayoutState);+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );+ const supportedCalendarLayout = getSupportedRecordCalendarLayout({+ calendarLayout: recordIndexCalendarLayout,+ isCalendarWeekViewEnabled,+ });++ const dateLocale = useAtomStateValue(dateLocaleState);+ const { firstDayOfWeek, lastDayOfWeek } = useRecordCalendarWeekDaysRange(+ recordCalendarSelectedDate,+ );++ const { updateCurrentView } = useUpdateCurrentView();+const datePickerDropdownId = `record-calendar-date-picker-${recordCalendarId}`;const { closeDropdown } = useCloseDropdown();@@ -65,32 +96,71 @@ export const RecordCalendarTopBar = () => {closeDropdown(datePickerDropdownId);};- const handlePreviousMonth = () => {+ const handlePreviousPeriod = () => {setRecordCalendarSelectedDate(- recordCalendarSelectedDate.subtract({ months: 1 }),+ supportedCalendarLayout === ViewCalendarLayout.WEEK+ ? recordCalendarSelectedDate.subtract({ weeks: 1 })+ : recordCalendarSelectedDate.subtract({ months: 1 }),);};- const handleNextMonth = () => {+ const handleNextPeriod = () => {setRecordCalendarSelectedDate(- recordCalendarSelectedDate?.add({ months: 1 }),+ supportedCalendarLayout === ViewCalendarLayout.WEEK+ ? recordCalendarSelectedDate.add({ weeks: 1 })+ : recordCalendarSelectedDate.add({ months: 1 }),);};+ const handleCalendarLayoutChange = (calendarLayout: ViewCalendarLayout) => {+ if (+ calendarLayout === ViewCalendarLayout.WEEK &&+ !isCalendarWeekViewEnabled+ ) {+ return;+ }++ setRecordIndexCalendarLayout(calendarLayout);+ void updateCurrentView({ calendarLayout });+ };+const handleTodayClick = () => {setRecordCalendarSelectedDate(Temporal.Now.plainDateISO());};- const formattedDate = format(- turnPlainDateToShiftedDateInSystemTimeZone(recordCalendarSelectedDate),- 'MMMM yyyy',- );+ const formattedDate =+ supportedCalendarLayout === ViewCalendarLayout.WEEK+ ? formatRecordCalendarWeekRange({+ firstDayOfWeek,+ lastDayOfWeek,+ locale: dateLocale.localeCatalog,+ })+ : format(+ turnPlainDateToShiftedDateInSystemTimeZone(+ recordCalendarSelectedDate,+ ),+ 'MMMM yyyy',+ { locale: dateLocale.localeCatalog },+ );const dropdownContentOffset = { x: 140, y: 0 } satisfies DropdownOffset;return (<StyledContainer><StyledLeftSection>+ {isCalendarWeekViewEnabled && (+ <Select+ dropdownId={`record-calendar-layout-${recordCalendarId}`}+ value={supportedCalendarLayout}+ options={[+ { label: t`Week`, value: ViewCalendarLayout.WEEK },+ { label: t`Month`, value: ViewCalendarLayout.MONTH },+ ]}+ selectSizeVariant="small"+ dropdownWidth={120}+ onChange={handleCalendarLayoutChange}+ />+ )}<DropdowndropdownId={datePickerDropdownId}clickableComponent={@@ -116,7 +186,9 @@ export const RecordCalendarTopBar = () => {}dropdownOffset={dropdownContentOffset}/>- <TimeZoneAbbreviation instant={Temporal.Now.instant()} />+ {supportedCalendarLayout !== ViewCalendarLayout.WEEK && (+ <TimeZoneAbbreviation instant={Temporal.Now.instant()} />+ )}</StyledLeftSection><StyledNavigationSection>@@ -125,7 +197,7 @@ export const RecordCalendarTopBar = () => {size="small"variant="tertiary"Icon={IconChevronLeft}- onClick={handlePreviousMonth}+ onClick={handlePreviousPeriod}/></StyledNavigationButtonContainer><Button@@ -139,7 +211,7 @@ export const RecordCalendarTopBar = () => {size="small"variant="tertiary"Icon={IconChevronRight}- onClick={handleNextMonth}+ onClick={handleNextPeriod}/></StyledNavigationButtonContainer></StyledNavigationSection>diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/__tests__/RecordCalendar.test.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/__tests__/RecordCalendar.test.tsxnew file mode 100644index 00000000000..7227934ca1d--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/__tests__/RecordCalendar.test.tsx@@ -0,0 +1,87 @@+import { render, screen } from '@testing-library/react';++import { RecordCalendar } from '@/object-record/record-calendar/components/RecordCalendar';+import {+ FeatureFlagKey,+ ViewCalendarLayout,+} from '~/generated-metadata/graphql';++jest.mock(+ '@/object-record/record-calendar/components/RecordCalendarTopBar',+ () => ({+ RecordCalendarTopBar: () => <div data-testid="calendar-top-bar" />,+ }),+);+jest.mock(+ '@/object-record/record-calendar/month/components/RecordCalendarMonth',+ () => ({+ RecordCalendarMonth: () => <div data-testid="calendar-month" />,+ }),+);+jest.mock(+ '@/object-record/record-calendar/week/components/RecordCalendarWeek',+ () => ({+ RecordCalendarWeek: () => <div data-testid="calendar-week" />,+ }),+);+jest.mock('@/ui/utilities/scroll/components/ScrollWrapper', () => ({+ ScrollWrapper: ({ children }: { children: React.ReactNode }) => children,+}));+jest.mock(+ '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow',+ () => ({+ useAvailableComponentInstanceIdOrThrow: jest.fn(() => 'calendar-id'),+ }),+);+jest.mock(+ '@/object-record/record-calendar/states/selectors/useRecordCalendarSelection',+ () => ({+ useRecordCalendarSelection: jest.fn(() => ({+ resetRecordSelection: jest.fn(),+ })),+ }),+);+jest.mock('@/ui/utilities/pointer-event/hooks/useListenClickOutside', () => ({+ useListenClickOutside: jest.fn(),+}));+jest.mock('@/ui/utilities/state/jotai/hooks/useAtomStateValue', () => ({+ useAtomStateValue: jest.fn(),+}));+jest.mock('@/workspace/hooks/useIsFeatureEnabled', () => ({+ useIsFeatureEnabled: jest.fn(),+}));++const useAtomStateValueMock = jest.requireMock(+ '@/ui/utilities/state/jotai/hooks/useAtomStateValue',+).useAtomStateValue;+const useIsFeatureEnabledMock = jest.requireMock(+ '@/workspace/hooks/useIsFeatureEnabled',+).useIsFeatureEnabled;++describe('RecordCalendar', () => {+ beforeEach(() => {+ jest.clearAllMocks();+ useAtomStateValueMock.mockReturnValue(ViewCalendarLayout.WEEK);+ });++ it('renders month when a persisted week layout is disabled', () => {+ useIsFeatureEnabledMock.mockReturnValue(false);++ render(<RecordCalendar />);++ expect(screen.getByTestId('calendar-month')).toBeInTheDocument();+ expect(screen.queryByTestId('calendar-week')).not.toBeInTheDocument();+ expect(useIsFeatureEnabledMock).toHaveBeenCalledWith(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );+ });++ it('renders week when the week layout is enabled', () => {+ useIsFeatureEnabledMock.mockReturnValue(true);++ render(<RecordCalendar />);++ expect(screen.getByTestId('calendar-week')).toBeInTheDocument();+ expect(screen.queryByTestId('calendar-month')).not.toBeInTheDocument();+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/constants/RecordCalendarMonthVisibleRecordLimit.ts b/packages/twenty-front/src/modules/object-record/record-calendar/constants/RecordCalendarMonthVisibleRecordLimit.tsnew file mode 100644index 00000000000..3aa80b8ca94--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/constants/RecordCalendarMonthVisibleRecordLimit.ts@@ -0,0 +1 @@+export const RECORD_CALENDAR_MONTH_VISIBLE_RECORD_LIMIT = 5;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/hooks/useRecordCalendarGroupByRecords.ts b/packages/twenty-front/src/modules/object-record/record-calendar/hooks/useRecordCalendarGroupByRecords.tsindex 90fa734ca27..b7e94c0fc01 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/hooks/useRecordCalendarGroupByRecords.ts+++ b/packages/twenty-front/src/modules/object-record/record-calendar/hooks/useRecordCalendarGroupByRecords.ts@@ -5,6 +5,7 @@ import { useGroupByRecordsQuery } from '@/object-record/hooks/useGroupByRecordsQimport { useRecordCalendarContextOrThrow } from '@/object-record/record-calendar/contexts/RecordCalendarContext';import { useRecordCalendarQueryDateRangeFilter } from '@/object-record/record-calendar/month/hooks/useRecordCalendarQueryDateRangeFilter';import { useRelevantRecordsGqlFields } from '@/object-record/record-field/hooks/useRelevantRecordsGqlFields';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';import { recordIndexCalendarFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarFieldMetadataIdState';import { type ObjectRecord } from '@/object-record/types/ObjectRecord';import { buildGroupByFieldObject } from '@/page-layout/widgets/graph/utils/buildGroupByFieldObject';@@ -29,10 +30,16 @@ export const useRecordCalendarGroupByRecords = (const recordIndexCalendarFieldMetadataId = useAtomStateValue(recordIndexCalendarFieldMetadataIdState,);+ const recordIndexCalendarEndFieldMetadataId = useAtomStateValue(+ recordIndexCalendarEndFieldMetadataIdState,+ );const recordGqlFields = useRelevantRecordsGqlFields({objectMetadataItem,- additionalFieldMetadataId: recordIndexCalendarFieldMetadataId,+ additionalFieldMetadataIds: [+ recordIndexCalendarFieldMetadataId,+ recordIndexCalendarEndFieldMetadataId,+ ],});const { dateRangeFilter } =diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonth.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonth.tsxindex 0c887d25628..ec5ac17e90f 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonth.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonth.tsx@@ -3,6 +3,7 @@ import { RecordCalendarMonthHeader } from '@/object-record/record-calendar/monthimport { RecordCalendarMonthContextProvider } from '@/object-record/record-calendar/month/contexts/RecordCalendarMonthContext';import { useRecordCalendarMonthDaysRange } from '@/object-record/record-calendar/month/hooks/useRecordCalendarMonthDaysRange';import { recordCalendarSelectedDateComponentState } from '@/object-record/record-calendar/states/recordCalendarSelectedDateComponentState';+import { getRecordIdFromRecordCalendarCardDraggableId } from '@/object-record/record-calendar/record-calendar-card/utils/getRecordCalendarCardDraggableId';import { useEndRecordDrag } from '@/object-record/record-drag/hooks/useEndRecordDrag';import { useProcessCalendarCardDrop } from '@/object-record/record-drag/hooks/useProcessCalendarCardDrop';import { useStartRecordDrag } from '@/object-record/record-drag/hooks/useStartRecordDrag';@@ -46,7 +47,15 @@ export const RecordCalendarMonth = () => {} = useRecordCalendarMonthDaysRange(recordCalendarSelectedDate);const handleDragStart = (start: DragStart) => {- startRecordDrag(start, []);+ startRecordDrag(+ {+ ...start,+ draggableId: getRecordIdFromRecordCalendarCardDraggableId(+ start.draggableId,+ ),+ },+ [],+ );};const handleDragEnd: OnDragEndResponder = (result) => {diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyDay.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyDay.tsxindex f944ce0ab17..2b3befdaa08 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyDay.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/components/RecordCalendarMonthBodyDay.tsx@@ -1,4 +1,5 @@import { RecordCalendarCardDraggableContainer } from '@/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardDraggableContainer';+import { RECORD_CALENDAR_MONTH_VISIBLE_RECORD_LIMIT } from '@/object-record/record-calendar/constants/RecordCalendarMonthVisibleRecordLimit';import { recordCalendarSelectedDateComponentState } from '@/object-record/record-calendar/states/recordCalendarSelectedDateComponentState';import { calendarDayRecordIdsComponentFamilySelector } from '@/object-record/record-calendar/states/selectors/calendarDayRecordsComponentFamilySelector';import { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUserTimezone';@@ -151,13 +152,16 @@ export const RecordCalendarMonthBodyDay = ({ref={droppableProvided.innerRef}isDraggedOver={droppableSnapshot.isDraggingOver}>- {recordIds.slice(0, 5).map((recordId, index) => (- <RecordCalendarCardDraggableContainer- key={recordId}- recordId={recordId}- index={index}- />- ))}+ {recordIds+ .slice(0, RECORD_CALENDAR_MONTH_VISIBLE_RECORD_LIMIT)+ .map((recordId, index) => (+ <RecordCalendarCardDraggableContainer+ key={`${recordId}-${dayKey}`}+ calendarDay={dayKey}+ recordId={recordId}+ index={index}+ />+ ))}{droppableProvided.placeholder}</StyledCardsContainer>)}diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/hooks/useRecordCalendarMonthDaysRange.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/hooks/useRecordCalendarMonthDaysRange.tsxindex 27c5b9178cb..b5a21e3bef3 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/hooks/useRecordCalendarMonthDaysRange.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/hooks/useRecordCalendarMonthDaysRange.tsx@@ -26,14 +26,12 @@ export const useRecordCalendarMonthDaysRange = (const currentWorkspaceMember = useAtomStateValue(currentWorkspaceMemberState);const dateLocale = useAtomStateValue(dateLocaleState);- if (!currentWorkspaceMember) {- throw new Error('Current workspace member not found');- }-+ const calendarStartDay =+ currentWorkspaceMember?.calendarStartDay ?? CalendarStartDay.SYSTEM;const weekStartsOnDayIndex = (- currentWorkspaceMember?.calendarStartDay === CalendarStartDay.SYSTEM+ calendarStartDay === CalendarStartDay.SYSTEM? CalendarStartDay[detectCalendarStartDay()]- : (currentWorkspaceMember?.calendarStartDay ?? 0)+ : calendarStartDay) as 0 | 1 | 2 | 3 | 4 | 5 | 6;const firstDayOfMonth = selectedDate.with({ day: 1 });diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/hooks/useRecordCalendarQueryDateRangeFilter.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/month/hooks/useRecordCalendarQueryDateRangeFilter.tsxindex 1414f1ea954..0c9dc5cbf9b 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/month/hooks/useRecordCalendarQueryDateRangeFilter.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/hooks/useRecordCalendarQueryDateRangeFilter.tsx@@ -1,6 +1,8 @@import { flattenedFieldMetadataItemsSelector } from '@/object-metadata/states/flattenedFieldMetadataItemsSelector';import { useRecordCalendarContextOrThrow } from '@/object-record/record-calendar/contexts/RecordCalendarContext';import { useRecordCalendarMonthDaysRange } from '@/object-record/record-calendar/month/hooks/useRecordCalendarMonthDaysRange';+import { getRecordCalendarDateRangeOverlapFilter } from '@/object-record/record-calendar/month/utils/getRecordCalendarDateRangeOverlapFilter';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';import { currentRecordFilterGroupsComponentState } from '@/object-record/record-filter-group/states/currentRecordFilterGroupsComponentState';import { useFilterValueDependencies } from '@/object-record/record-filter/hooks/useFilterValueDependencies';import { anyFieldFilterValueComponentState } from '@/object-record/record-filter/states/anyFieldFilterValueComponentState';@@ -20,6 +22,7 @@ import {turnAnyFieldFilterIntoRecordGqlFilter,turnPlainDateIntoUserTimeZoneInstantString,} from 'twenty-shared/utils';+import { FieldMetadataType } from '~/generated-metadata/graphql';const DATE_RANGE_FILTER_AFTER_ID = 'DATE_RANGE_FILTER_AFTER_ID';const DATE_RANGE_FILTER_BEFORE_ID = 'DATE_RANGE_FILTER_BEFORE_ID';@@ -51,6 +54,9 @@ export const useRecordCalendarQueryDateRangeFilter = (const flattenedFieldMetadataItems = useAtomStateValue(flattenedFieldMetadataItemsSelector,);+ const recordIndexCalendarEndFieldMetadataId = useAtomStateValue(+ recordIndexCalendarEndFieldMetadataIdState,+ );const anyFieldFilterValue = useAtomComponentStateValue(anyFieldFilterValueComponentState,@@ -80,6 +86,31 @@ export const useRecordCalendarQueryDateRangeFilter = (const dateRangeFilterFieldMetadataId = currentView.calendarFieldMetadataId;+ const calendarFieldMetadataItem = objectMetadataItem.fields.find(+ (fieldMetadataItem) =>+ fieldMetadataItem.id === currentView.calendarFieldMetadataId,+ );++ const calendarEndFieldMetadataItem = objectMetadataItem.fields.find(+ (fieldMetadataItem) =>+ fieldMetadataItem.id === recordIndexCalendarEndFieldMetadataId,+ );++ const dateRangeOverlapFilter = isDefined(calendarFieldMetadataItem)+ ? getRecordCalendarDateRangeOverlapFilter({+ calendarField: calendarFieldMetadataItem,+ calendarEndField: calendarEndFieldMetadataItem,+ firstDayOfRange:+ calendarFieldMetadataItem.type === FieldMetadataType.DATE_TIME+ ? firstDayOfFirstWeekISOString+ : firstDayOfFirstWeek.toString(),+ nextDayAfterLastDayOfRange:+ calendarFieldMetadataItem.type === FieldMetadataType.DATE_TIME+ ? nextDayAfterLastDayOfLastWeekISOString+ : lastDayOfLastWeek.add({ days: 1 }).toString(),+ })+ : undefined;+const dateRangeFilterAfter: RecordFilter = {id: DATE_RANGE_FILTER_AFTER_ID,fieldMetadataId: dateRangeFilterFieldMetadataId,@@ -100,11 +131,9 @@ export const useRecordCalendarQueryDateRangeFilter = (displayValue: `${lastDayOfLastWeek.toString()}`,};- const calendarRecordFilters = [- ...currentRecordFilters,- dateRangeFilterAfter,- dateRangeFilterBefore,- ];+ const calendarRecordFilters = isDefined(dateRangeOverlapFilter)+ ? currentRecordFilters+ : [...currentRecordFilters, dateRangeFilterAfter, dateRangeFilterBefore];const dateRangeFilter = computeRecordGqlOperationFilter({filterValueDependencies,@@ -119,7 +148,11 @@ export const useRecordCalendarQueryDateRangeFilter = (filterValue: anyFieldFilterValue,});- const combinedFilter = combineFilters([dateRangeFilter, anyFieldFilter]);+ const combinedFilter = combineFilters([+ dateRangeFilter,+ dateRangeOverlapFilter ?? {},+ anyFieldFilter,+ ]);return {dateRangeFilter: combinedFilter,diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/utils/__tests__/getRecordCalendarDateRangeOverlapFilter.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/month/utils/__tests__/getRecordCalendarDateRangeOverlapFilter.test.tsnew file mode 100644index 00000000000..d0f72caee64--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/utils/__tests__/getRecordCalendarDateRangeOverlapFilter.test.ts@@ -0,0 +1,113 @@+import { getRecordCalendarDateRangeOverlapFilter } from '@/object-record/record-calendar/month/utils/getRecordCalendarDateRangeOverlapFilter';+import { FieldMetadataType } from 'twenty-shared/types';++describe('getRecordCalendarDateRangeOverlapFilter', () => {+ it('matches DATE ranges that overlap the visible range', () => {+ expect(+ getRecordCalendarDateRangeOverlapFilter({+ calendarField: {+ name: 'startDate',+ type: FieldMetadataType.DATE,+ },+ calendarEndField: {+ name: 'endDate',+ type: FieldMetadataType.DATE,+ },+ firstDayOfRange: '2026-06-29',+ nextDayAfterLastDayOfRange: '2026-08-10',+ }),+ ).toEqual({+ and: [+ {+ startDate: {+ lt: '2026-08-10',+ },+ },+ {+ or: [+ {+ startDate: {+ gte: '2026-06-29',+ },+ },+ {+ endDate: {+ gte: '2026-06-29',+ },+ },+ ],+ },+ ],+ });+ });++ it('returns undefined when no end field is configured', () => {+ expect(+ getRecordCalendarDateRangeOverlapFilter({+ calendarField: {+ name: 'startDate',+ type: FieldMetadataType.DATE,+ },+ calendarEndField: undefined,+ firstDayOfRange: '2026-06-29',+ nextDayAfterLastDayOfRange: '2026-08-10',+ }),+ ).toBeUndefined();+ });++ it('matches DATE_TIME ranges that overlap the visible range', () => {+ expect(+ getRecordCalendarDateRangeOverlapFilter({+ calendarField: {+ name: 'startsAt',+ type: FieldMetadataType.DATE_TIME,+ },+ calendarEndField: {+ name: 'endsAt',+ type: FieldMetadataType.DATE_TIME,+ },+ firstDayOfRange: '2026-06-28T22:00:00Z',+ nextDayAfterLastDayOfRange: '2026-08-09T22:00:00Z',+ }),+ ).toEqual({+ and: [+ {+ startsAt: {+ lt: '2026-08-09T22:00:00Z',+ },+ },+ {+ or: [+ {+ startsAt: {+ gte: '2026-06-28T22:00:00Z',+ },+ },+ {+ endsAt: {+ gte: '2026-06-28T22:00:00Z',+ },+ },+ ],+ },+ ],+ });+ });++ it('returns undefined for incompatible calendar field types', () => {+ expect(+ getRecordCalendarDateRangeOverlapFilter({+ calendarField: {+ name: 'startsAt',+ type: FieldMetadataType.DATE_TIME,+ },+ calendarEndField: {+ name: 'endDate',+ type: FieldMetadataType.DATE,+ },+ firstDayOfRange: '2026-06-28T22:00:00Z',+ nextDayAfterLastDayOfRange: '2026-08-09T22:00:00Z',+ }),+ ).toBeUndefined();+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/month/utils/getRecordCalendarDateRangeOverlapFilter.ts b/packages/twenty-front/src/modules/object-record/record-calendar/month/utils/getRecordCalendarDateRangeOverlapFilter.tsnew file mode 100644index 00000000000..e68114e35f5--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/month/utils/getRecordCalendarDateRangeOverlapFilter.ts@@ -0,0 +1,59 @@+import {+ FieldMetadataType,+ type RecordGqlOperationFilter,+} from 'twenty-shared/types';++type CalendarDateField = {+ name: string;+ type: FieldMetadataType;+};++type GetRecordCalendarDateRangeOverlapFilterParams = {+ calendarField: CalendarDateField;+ calendarEndField: CalendarDateField | undefined;+ firstDayOfRange: string;+ nextDayAfterLastDayOfRange: string;+};++export const getRecordCalendarDateRangeOverlapFilter = ({+ calendarField,+ calendarEndField,+ firstDayOfRange,+ nextDayAfterLastDayOfRange,+}: GetRecordCalendarDateRangeOverlapFilterParams):+ | RecordGqlOperationFilter+ | undefined => {+ const hasCompatibleDateRangeFields =+ (calendarField.type === FieldMetadataType.DATE &&+ calendarEndField?.type === FieldMetadataType.DATE) ||+ (calendarField.type === FieldMetadataType.DATE_TIME &&+ calendarEndField?.type === FieldMetadataType.DATE_TIME);++ if (!hasCompatibleDateRangeFields) {+ return undefined;+ }++ return {+ and: [+ {+ [calendarField.name]: {+ lt: nextDayAfterLastDayOfRange,+ },+ },+ {+ or: [+ {+ [calendarField.name]: {+ gte: firstDayOfRange,+ },+ },+ {+ [calendarEndField.name]: {+ gte: firstDayOfRange,+ },+ },+ ],+ },+ ],+ };+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCard.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCard.tsxindex 3618b57b8c9..9c2b7085dd1 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCard.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCard.tsx@@ -11,10 +11,13 @@ import { RecordCalendarCardComponentInstanceContext } from '@/object-record/recoimport { isRecordCalendarCardSelectedComponentFamilyState } from '@/object-record/record-calendar/record-calendar-card/states/isRecordCalendarCardSelectedComponentFamilyState';import { RecordCalendarComponentInstanceContext } from '@/object-record/record-calendar/states/contexts/RecordCalendarComponentInstanceContext';import { RecordCard } from '@/object-record/record-card/components/RecordCard';+import { isDraggingRecordComponentState } from '@/object-record/record-drag/states/isDraggingRecordComponentState';import { RecordFieldsScopeContextProvider } from '@/object-record/record-field-list/contexts/RecordFieldsScopeContext';+import { useOpenRecordFromIndexView } from '@/object-record/record-index/hooks/useOpenRecordFromIndexView';import { useOpenDropdown } from '@/ui/layout/dropdown/hooks/useOpenDropdown';import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';import { useAtomComponentFamilyState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyState';+import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';import { styled } from '@linaria/react';@@ -36,6 +39,12 @@ export const RecordCalendarCard = ({ recordId }: RecordCalendarCardProps) => {const { currentView } = useGetCurrentViewOnly();const isCompactModeActive = currentView?.isCompact ?? false;+ const isDraggingRecord = useAtomComponentStateValue(+ isDraggingRecordComponentState,+ );++ const { openRecordFromIndexView } = useOpenRecordFromIndexView();+const [isRecordCalendarCardSelected, setIsRecordCalendarCardSelected] =useAtomComponentFamilyState(isRecordCalendarCardSelectedComponentFamilyState,@@ -58,6 +67,14 @@ export const RecordCalendarCard = ({ recordId }: RecordCalendarCardProps) => {const { openDropdown } = useOpenDropdown();+ const handleCardClick = () => {+ if (isDraggingRecord) {+ return;+ }++ openRecordFromIndexView({ recordId });+ };+const handleContextMenuOpen = (event: React.MouseEvent) => {event.preventDefault();setIsRecordCalendarCardSelected(true);@@ -88,6 +105,7 @@ export const RecordCalendarCard = ({ recordId }: RecordCalendarCardProps) => {<RecordCarddata-selected={isRecordCalendarCardSelected}data-click-outside-id={RECORD_CALENDAR_CARD_CLICK_OUTSIDE_ID}+ onClick={isCompactModeActive ? handleCardClick : undefined}><RecordCalendarCardHeader recordId={recordId} /><AnimatedEaseInOut isOpen={!isCompactModeActive} initial={false}>diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardDraggableContainer.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardDraggableContainer.tsxindex 55f6ce4ed19..3049c12bb84 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardDraggableContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardDraggableContainer.tsx@@ -2,15 +2,10 @@ import { styled } from '@linaria/react';import { Draggable } from '@hello-pangea/dnd';import { getCssCompatibleDraggableProps } from '@/ui/layout/draggable-list/utils/getCssCompatibleDraggableProps';-import { useObjectPermissionsForObject } from '@/object-record/hooks/useObjectPermissionsForObject';-import { useIsRecordReadOnly } from '@/object-record/read-only/hooks/useIsRecordReadOnly';-import { isFieldMetadataReadOnlyByPermissions } from '@/object-record/read-only/utils/internal/isFieldMetadataReadOnlyByPermissions';-import { useRecordCalendarContextOrThrow } from '@/object-record/record-calendar/contexts/RecordCalendarContext';import { RecordCalendarCard } from '@/object-record/record-calendar/record-calendar-card/components/RecordCalendarCard';+import { useIsRecordCalendarCardDragDisabled } from '@/object-record/record-calendar/record-calendar-card/hooks/useIsRecordCalendarCardDragDisabled';import { RecordCalendarCardComponentInstanceContext } from '@/object-record/record-calendar/record-calendar-card/states/contexts/RecordCalendarCardComponentInstanceContext';-import { recordIndexCalendarFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarFieldMetadataIdState';-import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';-import { isDefined } from 'twenty-shared/utils';+import { getRecordCalendarCardDraggableId } from '@/object-record/record-calendar/record-calendar-card/utils/getRecordCalendarCardDraggableId';const StyledDraggableContainer = styled.div`position: relative;@@ -20,63 +15,34 @@ const StyledDraggableContainer = styled.div``;export const RecordCalendarCardDraggableContainer = ({+ calendarDay,recordId,index,}: {+ calendarDay: string;recordId: string;index: number;}) => {- const { objectMetadataItem } = useRecordCalendarContextOrThrow();+ const dragIsDisabled = useIsRecordCalendarCardDragDisabled(recordId);- const recordIsReadOnly = useIsRecordReadOnly({+ const draggableId = getRecordCalendarCardDraggableId({+ calendarDay,recordId,- objectMetadataId: objectMetadataItem.id,});- const objectPermissions = useObjectPermissionsForObject(- objectMetadataItem.id,- );-- const recordIndexCalendarFieldMetadataId = useAtomStateValue(- recordIndexCalendarFieldMetadataIdState,- );-- const calendarFieldMetadataItem = objectMetadataItem.fields.find(- (field) => field.id === recordIndexCalendarFieldMetadataId,- );-- const calendarFieldMetadataItemIsUIReadOnly =- calendarFieldMetadataItem?.isUIEditable === false;-- const calendarFieldMetadataItemIsRestrictedForUpdate = isDefined(- calendarFieldMetadataItem,- )- ? isFieldMetadataReadOnlyByPermissions({- objectPermissions,- fieldMetadataId: calendarFieldMetadataItem.id,- })- : false;-- const calendarFieldMetadataItemIsReadOnly =- calendarFieldMetadataItemIsUIReadOnly ||- calendarFieldMetadataItemIsRestrictedForUpdate;-- const dragIsDisabled =- recordIsReadOnly || calendarFieldMetadataItemIsReadOnly;-return (<RecordCalendarCardComponentInstanceContext.Providervalue={{ instanceId: recordId }}><Draggable- key={recordId}- draggableId={recordId}+ key={draggableId}+ draggableId={draggableId}index={index}isDragDisabled={dragIsDisabled}>{(draggableProvided) => (<StyledDraggableContainer- id={`record-calendar-card-${recordId}`}+ id={`record-calendar-card-${recordId}-${calendarDay}`}ref={draggableProvided?.innerRef}// oxlint-disable-next-line react/jsx-props-no-spreading{...draggableProvided?.dragHandleProps}diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardHeader.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardHeader.tsxindex f712e150985..752bd2e22cb 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardHeader.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/components/RecordCalendarCardHeader.tsx@@ -69,16 +69,27 @@ export const RecordCalendarCardHeader = ({padding={themeCssVariables.spacing[1]}><StyledRecordChipContainer>- <StopPropagationContainer>+ {isCompactModeActive ? (<RecordChipobjectNameSingular={objectMetadataItem.nameSingular}record={recordStore}variant={ChipVariant.Transparent}isIconHidden={true}- onClick={handleChipClick}+ forceDisableClicktriggerEvent={'CLICK'}/>- </StopPropagationContainer>+ ) : (+ <StopPropagationContainer>+ <RecordChip+ objectNameSingular={objectMetadataItem.nameSingular}+ record={recordStore}+ variant={ChipVariant.Transparent}+ isIconHidden={true}+ onClick={handleChipClick}+ triggerEvent={'CLICK'}+ />+ </StopPropagationContainer>+ )}</StyledRecordChipContainer><StyledCheckboxContainer className="checkbox-container"><StopPropagationContainer>diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/hooks/useIsRecordCalendarCardDragDisabled.ts b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/hooks/useIsRecordCalendarCardDragDisabled.tsnew file mode 100644index 00000000000..46b39f4685b--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/hooks/useIsRecordCalendarCardDragDisabled.ts@@ -0,0 +1,51 @@+import { useObjectPermissionsForObject } from '@/object-record/hooks/useObjectPermissionsForObject';+import { useIsRecordReadOnly } from '@/object-record/read-only/hooks/useIsRecordReadOnly';+import { isFieldMetadataReadOnlyByPermissions } from '@/object-record/read-only/utils/internal/isFieldMetadataReadOnlyByPermissions';+import { useRecordCalendarContextOrThrow } from '@/object-record/record-calendar/contexts/RecordCalendarContext';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';+import { recordIndexCalendarFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarFieldMetadataIdState';+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { isDefined } from 'twenty-shared/utils';++export const useIsRecordCalendarCardDragDisabled = (recordId: string) => {+ const { objectMetadataItem } = useRecordCalendarContextOrThrow();+ const recordIsReadOnly = useIsRecordReadOnly({+ recordId,+ objectMetadataId: objectMetadataItem.id,+ });+ const objectPermissions = useObjectPermissionsForObject(+ objectMetadataItem.id,+ );+ const recordIndexCalendarFieldMetadataId = useAtomStateValue(+ recordIndexCalendarFieldMetadataIdState,+ );+ const recordIndexCalendarEndFieldMetadataId = useAtomStateValue(+ recordIndexCalendarEndFieldMetadataIdState,+ );++ const calendarFieldMetadataItem = objectMetadataItem.fields.find(+ (field) => field.id === recordIndexCalendarFieldMetadataId,+ );+ const calendarEndFieldMetadataItem = objectMetadataItem.fields.find(+ (field) => field.id === recordIndexCalendarEndFieldMetadataId,+ );++ const calendarFieldIsReadOnly =+ calendarFieldMetadataItem?.isUIEditable === false ||+ (isDefined(calendarFieldMetadataItem) &&+ isFieldMetadataReadOnlyByPermissions({+ objectPermissions,+ fieldMetadataId: calendarFieldMetadataItem.id,+ }));+ const calendarEndFieldIsReadOnly =+ calendarEndFieldMetadataItem?.isUIEditable === false ||+ (isDefined(calendarEndFieldMetadataItem) &&+ isFieldMetadataReadOnlyByPermissions({+ objectPermissions,+ fieldMetadataId: calendarEndFieldMetadataItem.id,+ }));++ return (+ recordIsReadOnly || calendarFieldIsReadOnly || calendarEndFieldIsReadOnly+ );+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/utils/__tests__/getRecordCalendarCardDraggableId.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/utils/__tests__/getRecordCalendarCardDraggableId.test.tsnew file mode 100644index 00000000000..22defde0841--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/utils/__tests__/getRecordCalendarCardDraggableId.test.ts@@ -0,0 +1,42 @@+import {+ getRecordCalendarCardDraggableId,+ getRecordIdFromRecordCalendarCardDraggableId,+} from '@/object-record/record-calendar/record-calendar-card/utils/getRecordCalendarCardDraggableId';++describe('getRecordCalendarCardDraggableId', () => {+ it('creates a different draggable id for each rendered day', () => {+ const firstDayDraggableId = getRecordCalendarCardDraggableId({+ calendarDay: '2026-07-08',+ recordId: 'record-id',+ });+ const secondDayDraggableId = getRecordCalendarCardDraggableId({+ calendarDay: '2026-07-09',+ recordId: 'record-id',+ });++ expect(firstDayDraggableId).not.toBe(secondDayDraggableId);+ expect(+ getRecordIdFromRecordCalendarCardDraggableId(firstDayDraggableId),+ ).toBe('record-id');+ expect(+ getRecordIdFromRecordCalendarCardDraggableId(secondDayDraggableId),+ ).toBe('record-id');+ });++ it('preserves record ids containing separator characters', () => {+ const draggableId = getRecordCalendarCardDraggableId({+ calendarDay: '2026-07-08',+ recordId: 'record:id/with special characters',+ });++ expect(getRecordIdFromRecordCalendarCardDraggableId(draggableId)).toBe(+ 'record:id/with special characters',+ );+ });++ it('accepts legacy draggable ids', () => {+ expect(+ getRecordIdFromRecordCalendarCardDraggableId('legacy-record-id'),+ ).toBe('legacy-record-id');+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/utils/getRecordCalendarCardDraggableId.ts b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/utils/getRecordCalendarCardDraggableId.tsnew file mode 100644index 00000000000..14839f45b95--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/record-calendar-card/utils/getRecordCalendarCardDraggableId.ts@@ -0,0 +1,36 @@+const RECORD_CALENDAR_CARD_DRAGGABLE_ID_PREFIX = 'calendar-card:';++export const getRecordCalendarCardDraggableId = ({+ calendarDay,+ recordId,+}: {+ calendarDay: string;+ recordId: string;+}) =>+ `${RECORD_CALENDAR_CARD_DRAGGABLE_ID_PREFIX}${encodeURIComponent(recordId)}:${calendarDay}`;++export const getRecordIdFromRecordCalendarCardDraggableId = (+ draggableId: string,+) => {+ if (!draggableId.startsWith(RECORD_CALENDAR_CARD_DRAGGABLE_ID_PREFIX)) {+ return draggableId;+ }++ const encodedRecordIdAndCalendarDay = draggableId.slice(+ RECORD_CALENDAR_CARD_DRAGGABLE_ID_PREFIX.length,+ );+ const calendarDaySeparatorIndex =+ encodedRecordIdAndCalendarDay.lastIndexOf(':');++ if (calendarDaySeparatorIndex <= 0) {+ return draggableId;+ }++ try {+ return decodeURIComponent(+ encodedRecordIdAndCalendarDay.slice(0, calendarDaySeparatorIndex),+ );+ } catch {+ return draggableId;+ }+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/states/selectors/calendarDayRecordsComponentFamilySelector.ts b/packages/twenty-front/src/modules/object-record/record-calendar/states/selectors/calendarDayRecordsComponentFamilySelector.tsindex 307306b177f..153cdec1c9f 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/states/selectors/calendarDayRecordsComponentFamilySelector.ts+++ b/packages/twenty-front/src/modules/object-record/record-calendar/states/selectors/calendarDayRecordsComponentFamilySelector.ts@@ -3,6 +3,9 @@ import { hasObjectMetadataItemPositionField } from '@/object-metadata/utils/hasOimport { RecordCalendarComponentInstanceContext } from '@/object-record/record-calendar/states/contexts/RecordCalendarComponentInstanceContext';import { recordCalendarRecordIdsComponentState } from '@/object-record/record-calendar/states/recordCalendarRecordIdsComponentState';+import { isRecordCalendarDayInDateRange } from '@/object-record/record-calendar/utils/isRecordCalendarDayInDateRange';+import { isRecordCalendarDayInDateTimeRange } from '@/object-record/record-calendar/utils/isRecordCalendarDayInDateTimeRange';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';import { recordIndexCalendarFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarFieldMetadataIdState';import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';import { createAtomComponentFamilySelector } from '@/ui/utilities/state/jotai/utils/createAtomComponentFamilySelector';@@ -25,6 +28,9 @@ export const calendarDayRecordIdsComponentFamilySelector =const calendarFieldMetadataId = get(recordIndexCalendarFieldMetadataIdState,);+ const calendarEndFieldMetadataId = get(+ recordIndexCalendarEndFieldMetadataIdState,+ );const objectMetadataItems = get(objectMetadataItemsSelector);const objectMetadataItem = objectMetadataItems.find(@@ -48,6 +54,11 @@ export const calendarDayRecordIdsComponentFamilySelector =return [];}+ const endFieldMetadataItem = objectMetadataItem.fields.find(+ (fieldMetadataItem) =>+ fieldMetadataItem.id === calendarEndFieldMetadataId,+ );+const allRecordIds = get(recordCalendarRecordIdsComponentState, {instanceId,});@@ -61,14 +72,43 @@ export const calendarDayRecordIdsComponentFamilySelector =return false;}- const recordDateAsPlainDateInTimeZone =- fieldMetadataItem.type === FieldMetadataType.DATE- ? Temporal.PlainDate.from(recordDate)- : Temporal.Instant.from(recordDate)- .toZonedDateTimeISO(timeZone)- .toPlainDate();+ if (fieldMetadataItem.type === FieldMetadataType.DATE) {+ const recordStartDate = Temporal.PlainDate.from(recordDate);+ const recordEndDateValue = isDefined(endFieldMetadataItem)+ ? record?.[endFieldMetadataItem.name]+ : undefined;++ if (+ endFieldMetadataItem?.type === FieldMetadataType.DATE &&+ isNonEmptyString(recordEndDateValue)+ ) {+ try {+ return isRecordCalendarDayInDateRange({+ day,+ startDate: recordStartDate,+ endDate: Temporal.PlainDate.from(recordEndDateValue),+ });+ } catch {+ return isSamePlainDate(day, recordStartDate);+ }+ }++ return isSamePlainDate(day, recordStartDate);+ }- return isSamePlainDate(day, recordDateAsPlainDateInTimeZone);+ const recordEndDateValue = isDefined(endFieldMetadataItem)+ ? record?.[endFieldMetadataItem.name]+ : undefined;++ return isRecordCalendarDayInDateTimeRange({+ day,+ startDateTime: recordDate,+ endDateTime:+ endFieldMetadataItem?.type === FieldMetadataType.DATE_TIME+ ? recordEndDateValue+ : undefined,+ timeZone,+ });});if (diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/getEffectiveRecordCalendarEndFieldMetadataId.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/getEffectiveRecordCalendarEndFieldMetadataId.test.tsnew file mode 100644index 00000000000..badc68104d2--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/getEffectiveRecordCalendarEndFieldMetadataId.test.ts@@ -0,0 +1,33 @@+import { getEffectiveRecordCalendarEndFieldMetadataId } from '@/object-record/record-calendar/utils/getEffectiveRecordCalendarEndFieldMetadataId';++describe('getEffectiveRecordCalendarEndFieldMetadataId', () => {+ it('keeps the configured end field when the week view is enabled', () => {+ expect(+ getEffectiveRecordCalendarEndFieldMetadataId({+ calendarEndFieldMetadataId: 'end-field-id',+ isCalendarWeekViewEnabled: true,+ }),+ ).toBe('end-field-id');+ });++ it.each([null, undefined])(+ 'normalizes %s to null when the week view is enabled',+ (calendarEndFieldMetadataId) => {+ expect(+ getEffectiveRecordCalendarEndFieldMetadataId({+ calendarEndFieldMetadataId,+ isCalendarWeekViewEnabled: true,+ }),+ ).toBeNull();+ },+ );++ it('makes a configured end field inert when the week view is disabled', () => {+ expect(+ getEffectiveRecordCalendarEndFieldMetadataId({+ calendarEndFieldMetadataId: 'end-field-id',+ isCalendarWeekViewEnabled: false,+ }),+ ).toBeNull();+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/getSupportedRecordCalendarLayout.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/getSupportedRecordCalendarLayout.test.tsnew file mode 100644index 00000000000..36dcffbf4af--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/getSupportedRecordCalendarLayout.test.ts@@ -0,0 +1,40 @@+import { getSupportedRecordCalendarLayout } from '@/object-record/record-calendar/utils/getSupportedRecordCalendarLayout';+import { ViewCalendarLayout } from '~/generated-metadata/graphql';++describe('getSupportedRecordCalendarLayout', () => {+ it.each([+ [ViewCalendarLayout.WEEK, ViewCalendarLayout.WEEK],+ [ViewCalendarLayout.MONTH, ViewCalendarLayout.MONTH],+ [ViewCalendarLayout.DAY, ViewCalendarLayout.MONTH],+ [null, ViewCalendarLayout.MONTH],+ [undefined, ViewCalendarLayout.MONTH],+ ])(+ 'normalizes %s to %s when the week view is enabled',+ (calendarLayout, expectedLayout) => {+ expect(+ getSupportedRecordCalendarLayout({+ calendarLayout,+ isCalendarWeekViewEnabled: true,+ }),+ ).toBe(expectedLayout);+ },+ );++ it.each([+ ViewCalendarLayout.WEEK,+ ViewCalendarLayout.MONTH,+ ViewCalendarLayout.DAY,+ null,+ undefined,+ ])(+ 'normalizes %s to month when the week view is disabled',+ (calendarLayout) => {+ expect(+ getSupportedRecordCalendarLayout({+ calendarLayout,+ isCalendarWeekViewEnabled: false,+ }),+ ).toBe(ViewCalendarLayout.MONTH);+ },+ );+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/isRecordCalendarDayInDateRange.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/isRecordCalendarDayInDateRange.test.tsnew file mode 100644index 00000000000..6857105b444--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/isRecordCalendarDayInDateRange.test.ts@@ -0,0 +1,43 @@+import { isRecordCalendarDayInDateRange } from '@/object-record/record-calendar/utils/isRecordCalendarDayInDateRange';+import { Temporal } from 'temporal-polyfill';++describe('isRecordCalendarDayInDateRange', () => {+ const startDate = Temporal.PlainDate.from('2026-07-06');+ const endDate = Temporal.PlainDate.from('2026-07-08');++ it.each([+ ['2026-07-05', false],+ ['2026-07-06', true],+ ['2026-07-07', true],+ ['2026-07-08', true],+ ['2026-07-09', false],+ ])('checks whether %s is inside the inclusive range', (day, expected) => {+ expect(+ isRecordCalendarDayInDateRange({+ day: Temporal.PlainDate.from(day),+ startDate,+ endDate,+ }),+ ).toBe(expected);+ });++ it.each([undefined, null, Temporal.PlainDate.from('2026-07-05')])(+ 'falls back to the start day for an unusable end date',+ (unusableEndDate) => {+ expect(+ isRecordCalendarDayInDateRange({+ day: startDate,+ startDate,+ endDate: unusableEndDate,+ }),+ ).toBe(true);+ expect(+ isRecordCalendarDayInDateRange({+ day: startDate.add({ days: 1 }),+ startDate,+ endDate: unusableEndDate,+ }),+ ).toBe(false);+ },+ );+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/isRecordCalendarDayInDateTimeRange.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/isRecordCalendarDayInDateTimeRange.test.tsnew file mode 100644index 00000000000..6371d88bf1e--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/__tests__/isRecordCalendarDayInDateTimeRange.test.ts@@ -0,0 +1,55 @@+import { isRecordCalendarDayInDateTimeRange } from '@/object-record/record-calendar/utils/isRecordCalendarDayInDateTimeRange';+import { Temporal } from 'temporal-polyfill';++const timeZone = 'Europe/Paris';++describe('isRecordCalendarDayInDateTimeRange', () => {+ it.each([+ ['2026-07-07', false],+ ['2026-07-08', true],+ ['2026-07-09', true],+ ['2026-07-10', true],+ ['2026-07-11', false],+ ])('matches the overlapping days of a multi-day event: %s', (day, result) => {+ expect(+ isRecordCalendarDayInDateTimeRange({+ day: Temporal.PlainDate.from(day),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-10T18:59:00Z',+ timeZone,+ }),+ ).toBe(result);+ });++ it('does not include the next day when an event ends exactly at midnight', () => {+ expect(+ isRecordCalendarDayInDateTimeRange({+ day: Temporal.PlainDate.from('2026-07-10'),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-09T22:00:00Z',+ timeZone,+ }),+ ).toBe(false);+ });++ it('uses the one-hour fallback when the end is unusable', () => {+ expect(+ isRecordCalendarDayInDateTimeRange({+ day: Temporal.PlainDate.from('2026-07-09'),+ startDateTime: '2026-07-08T21:30:00Z',+ endDateTime: 'not-a-date',+ timeZone,+ }),+ ).toBe(true);+ });++ it('returns false when the start is unusable', () => {+ expect(+ isRecordCalendarDayInDateTimeRange({+ day: Temporal.PlainDate.from('2026-07-08'),+ startDateTime: 'not-a-date',+ timeZone,+ }),+ ).toBe(false);+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/getEffectiveRecordCalendarEndFieldMetadataId.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/getEffectiveRecordCalendarEndFieldMetadataId.tsnew file mode 100644index 00000000000..d5896b528bf--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/getEffectiveRecordCalendarEndFieldMetadataId.ts@@ -0,0 +1,10 @@+type GetEffectiveRecordCalendarEndFieldMetadataIdArgs = {+ calendarEndFieldMetadataId: string | null | undefined;+ isCalendarWeekViewEnabled: boolean;+};++export const getEffectiveRecordCalendarEndFieldMetadataId = ({+ calendarEndFieldMetadataId,+ isCalendarWeekViewEnabled,+}: GetEffectiveRecordCalendarEndFieldMetadataIdArgs) =>+ isCalendarWeekViewEnabled ? (calendarEndFieldMetadataId ?? null) : null;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/getRecordCalendarDateTimeRange.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/getRecordCalendarDateTimeRange.tsnew file mode 100644index 00000000000..691bc466920--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/getRecordCalendarDateTimeRange.ts@@ -0,0 +1,45 @@+import { Temporal } from 'temporal-polyfill';++type GetRecordCalendarDateTimeRangeArgs = {+ endDateTime?: unknown;+ startDateTime: unknown;+ timeZone: string;+};++export type RecordCalendarDateTimeRange = {+ end: Temporal.ZonedDateTime;+ isEndDateTimeFallback: boolean;+ start: Temporal.ZonedDateTime;+};++const getZonedDateTimeFromValue = (value: unknown, timeZone: string) => {+ if (typeof value !== 'string') {+ return null;+ }++ try {+ return Temporal.Instant.from(value).toZonedDateTimeISO(timeZone);+ } catch {+ return null;+ }+};++export const getRecordCalendarDateTimeRange = ({+ endDateTime,+ startDateTime,+ timeZone,+}: GetRecordCalendarDateTimeRangeArgs): RecordCalendarDateTimeRange | null => {+ const start = getZonedDateTimeFromValue(startDateTime, timeZone);++ if (start === null) {+ return null;+ }++ const configuredEnd = getZonedDateTimeFromValue(endDateTime, timeZone);+ const isEndDateTimeFallback =+ configuredEnd === null ||+ Temporal.Instant.compare(configuredEnd.toInstant(), start.toInstant()) <= 0;+ const end = isEndDateTimeFallback ? start.add({ hours: 1 }) : configuredEnd;++ return { end, isEndDateTimeFallback, start };+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/getSupportedRecordCalendarLayout.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/getSupportedRecordCalendarLayout.tsnew file mode 100644index 00000000000..b0b4d8fe843--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/getSupportedRecordCalendarLayout.ts@@ -0,0 +1,14 @@+import { ViewCalendarLayout } from '~/generated-metadata/graphql';++type GetSupportedRecordCalendarLayoutArgs = {+ calendarLayout: ViewCalendarLayout | null | undefined;+ isCalendarWeekViewEnabled: boolean;+};++export const getSupportedRecordCalendarLayout = ({+ calendarLayout,+ isCalendarWeekViewEnabled,+}: GetSupportedRecordCalendarLayoutArgs) =>+ isCalendarWeekViewEnabled && calendarLayout === ViewCalendarLayout.WEEK+ ? ViewCalendarLayout.WEEK+ : ViewCalendarLayout.MONTH;diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/isRecordCalendarDayInDateRange.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/isRecordCalendarDayInDateRange.tsnew file mode 100644index 00000000000..f93270da552--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/isRecordCalendarDayInDateRange.ts@@ -0,0 +1,25 @@+import { Temporal } from 'temporal-polyfill';++type IsRecordCalendarDayInDateRangeArgs = {+ day: Temporal.PlainDate;+ endDate?: Temporal.PlainDate | null;+ startDate: Temporal.PlainDate;+};++export const isRecordCalendarDayInDateRange = ({+ day,+ endDate,+ startDate,+}: IsRecordCalendarDayInDateRangeArgs) => {+ const validEndDate =+ endDate !== null &&+ endDate !== undefined &&+ Temporal.PlainDate.compare(endDate, startDate) >= 0+ ? endDate+ : startDate;++ return (+ Temporal.PlainDate.compare(day, startDate) >= 0 &&+ Temporal.PlainDate.compare(day, validEndDate) <= 0+ );+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/utils/isRecordCalendarDayInDateTimeRange.ts b/packages/twenty-front/src/modules/object-record/record-calendar/utils/isRecordCalendarDayInDateTimeRange.tsnew file mode 100644index 00000000000..420c40e84ee--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/utils/isRecordCalendarDayInDateTimeRange.ts@@ -0,0 +1,37 @@+import { getRecordCalendarDateTimeRange } from '@/object-record/record-calendar/utils/getRecordCalendarDateTimeRange';+import { Temporal } from 'temporal-polyfill';++type IsRecordCalendarDayInDateTimeRangeArgs = {+ day: Temporal.PlainDate;+ endDateTime?: unknown;+ startDateTime: unknown;+ timeZone: string;+};++export const isRecordCalendarDayInDateTimeRange = ({+ day,+ endDateTime,+ startDateTime,+ timeZone,+}: IsRecordCalendarDayInDateTimeRangeArgs) => {+ const range = getRecordCalendarDateTimeRange({+ endDateTime,+ startDateTime,+ timeZone,+ });++ if (range === null) {+ return false;+ }++ const dayStart = day.toZonedDateTime({ timeZone }).toInstant();+ const nextDayStart = day+ .add({ days: 1 })+ .toZonedDateTime({ timeZone })+ .toInstant();++ return (+ Temporal.Instant.compare(range.start.toInstant(), nextDayStart) < 0 &&+ Temporal.Instant.compare(range.end.toInstant(), dayStart) > 0+ );+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/components/RecordCalendarWeek.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/week/components/RecordCalendarWeek.tsxnew file mode 100644index 00000000000..d941d51502b--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/components/RecordCalendarWeek.tsx@@ -0,0 +1,704 @@+import { useDateTimeFormat } from '@/localization/hooks/useDateTimeFormat';+import { RecordCalendarAddNew } from '@/object-record/record-calendar/components/RecordCalendarAddNew';+import { useRecordCalendarContextOrThrow } from '@/object-record/record-calendar/contexts/RecordCalendarContext';+import { RecordCalendarComponentInstanceContext } from '@/object-record/record-calendar/states/contexts/RecordCalendarComponentInstanceContext';+import { recordCalendarSelectedDateComponentState } from '@/object-record/record-calendar/states/recordCalendarSelectedDateComponentState';+import { calendarDayRecordIdsComponentFamilySelector } from '@/object-record/record-calendar/states/selectors/calendarDayRecordsComponentFamilySelector';+import { RecordCalendarWeekEvent } from '@/object-record/record-calendar/week/components/RecordCalendarWeekEvent';+import { RecordCalendarWeekDragDropContext } from '@/object-record/record-calendar/week/components/RecordCalendarWeekDragDropContext';+import { RECORD_CALENDAR_WEEK_DIMENSIONS } from '@/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions';+import { useRecordCalendarWeekDaysRange } from '@/object-record/record-calendar/week/hooks/useRecordCalendarWeekDaysRange';+import { computeRecordCalendarWeekEventLayouts } from '@/object-record/record-calendar/week/utils/computeRecordCalendarWeekEventLayouts';+import { getRecordCalendarWeekTimedEventMetrics } from '@/object-record/record-calendar/week/utils/getRecordCalendarWeekTimedEventMetrics';+import { getRecordCalendarWeekSlotIndex } from '@/object-record/record-calendar/week/utils/getRecordCalendarWeekSlotIndex';+import {+ type RecordCalendarWeekActiveSlot,+ type RecordCalendarWeekSlotInteractionMode,+ updateRecordCalendarWeekActiveSlot,+} from '@/object-record/record-calendar/week/utils/updateRecordCalendarWeekActiveSlot';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';+import { recordIndexCalendarFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarFieldMetadataIdState';+import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';+import { TimeZoneAbbreviation } from '@/ui/input/components/internal/date/components/TimeZoneAbbreviation';+import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';+import { useAtomComponentFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorValue';+import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { styled } from '@linaria/react';+import { t } from '@lingui/core/macro';+import { format } from 'date-fns';+import { formatInTimeZone } from 'date-fns-tz';+import { useStore } from 'jotai';+import {+ type FocusEvent,+ type KeyboardEvent,+ type MouseEvent,+ memo,+ useCallback,+ useEffect,+ useRef,+ useState,+} from 'react';+import { Temporal } from 'temporal-polyfill';+import {+ isDefined,+ isPlainDateInWeekend,+ isSamePlainDate,+} from 'twenty-shared/utils';+import { themeCssVariables } from 'twenty-ui/theme-constants';+import { FieldMetadataType } from '~/generated-metadata/graphql';++const CURRENT_TIME_REFRESH_INTERVAL_IN_MILLISECONDS = 60_000;+const DEFAULT_KEYBOARD_SLOT_INDEX = 18;++const StyledContainer = styled.div`+ background: ${themeCssVariables.background.primary};+ border: 1px solid ${themeCssVariables.border.color.light};+ border-radius: ${themeCssVariables.border.radius.sm};+ min-width: 1000px;+ overflow: clip;+`;++const StyledHeader = styled.div`+ background: ${themeCssVariables.background.primary};+ border-bottom: 1px solid ${themeCssVariables.border.color.light};+ display: grid;+ grid-template-columns:+ ${RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth}px+ repeat(7, minmax(120px, 1fr));+ position: sticky;+ top: 0;+ z-index: 3;+`;++const StyledHeaderGutter = styled.div`+ align-items: center;+ color: ${themeCssVariables.font.color.light};+ display: flex;+ font-size: ${themeCssVariables.font.size.xs};+ height: 32px;+ justify-content: flex-end;+ padding-right: ${themeCssVariables.spacing[1]};+`;++const StyledDayHeader = styled.div`+ align-items: center;+ border-left: 1px solid ${themeCssVariables.border.color.light};+ color: ${themeCssVariables.font.color.light};+ display: flex;+ font-size: ${themeCssVariables.font.size.sm};+ gap: ${themeCssVariables.spacing[1]};+ height: 32px;+ justify-content: center;+`;++const StyledDayNumber = styled.span<{ isToday: boolean }>`+ align-items: center;+ background: ${({ isToday }) =>+ isToday ? themeCssVariables.color.blue : 'transparent'};+ border-radius: ${themeCssVariables.border.radius.sm};+ color: ${({ isToday }) =>+ isToday+ ? themeCssVariables.font.color.inverted+ : themeCssVariables.font.color.primary};+ display: flex;+ font-size: ${themeCssVariables.font.size.sm};+ font-weight: ${({ isToday }) =>+ isToday+ ? themeCssVariables.font.weight.medium+ : themeCssVariables.font.weight.regular};+ height: 20px;+ justify-content: center;+ width: 20px;+`;++const StyledAllDayLabel = styled(StyledHeaderGutter)`+ border-top: 1px solid ${themeCssVariables.border.color.light};+ height: 28px;+`;++const StyledAllDayCell = styled.div`+ align-items: center;+ border-left: 1px solid ${themeCssVariables.border.color.light};+ border-top: 1px solid ${themeCssVariables.border.color.light};+ display: flex;+ gap: ${themeCssVariables.spacing['0.5']};+ height: 28px;+ min-width: 0;+ overflow: hidden;+ padding: ${themeCssVariables.spacing['0.5']};+`;++const StyledAdditionalEventCount = styled.span`+ color: ${themeCssVariables.font.color.light};+ font-size: ${themeCssVariables.font.size.xs};+ white-space: nowrap;+`;++const StyledGrid = styled.div`+ display: grid;+ grid-template-columns:+ ${RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth}px+ repeat(7, minmax(120px, 1fr));+ height: ${RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight}px;+ position: relative;+`;++const StyledTimeGutter = styled.div`+ height: ${RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight}px;+ position: relative;+`;++const StyledHourLabel = styled.span<{ topInPixels: number }>`+ color: ${themeCssVariables.font.color.light};+ font-size: ${themeCssVariables.font.size.xs};+ position: absolute;+ right: ${themeCssVariables.spacing[1]};+ top: ${({ topInPixels }) => `${topInPixels}px`};+ transform: translateY(-50%);+ white-space: nowrap;+`;++const StyledDayColumn = styled.div<{ isWeekend: boolean }>`+ background-color: ${({ isWeekend }) =>+ isWeekend+ ? themeCssVariables.background.secondary+ : themeCssVariables.background.primary};+ background-image: repeating-linear-gradient(+ to bottom,+ ${themeCssVariables.border.color.light} 0,+ ${themeCssVariables.border.color.light} 1px,+ transparent 1px,+ transparent ${RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight}px+ );+ border-left: 1px solid ${themeCssVariables.border.color.light};+ height: ${RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight}px;+ isolation: isolate;+ overflow: hidden;+ position: relative;+`;++const StyledSlotAddNewPositioner = styled.div<{ topInPixels: number }>`+ align-items: center;+ display: flex;+ height: ${RECORD_CALENDAR_WEEK_DIMENSIONS.slotHeight}px;+ left: ${themeCssVariables.spacing['0.5']};+ pointer-events: none;+ position: absolute;+ right: 0;+ top: ${({ topInPixels }) => `${topInPixels}px`};+ z-index: 0;++ > div {+ pointer-events: auto;+ }+`;++const StyledCurrentTimeLine = styled.div<{ topInPixels: number }>`+ background: ${themeCssVariables.color.red8};+ height: 1px;+ left: ${RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth}px;+ pointer-events: none;+ position: absolute;+ right: 0;+ top: ${({ topInPixels }) => `${topInPixels}px`};+ z-index: 2;++ &::after {+ background: ${themeCssVariables.color.red8};+ border-radius: 50%;+ content: '';+ height: 5px;+ left: -2px;+ position: absolute;+ top: -2px;+ width: 5px;+ }+`;++const StyledCurrentTimeLabel = styled.span<{ topInPixels: number }>`+ background: ${themeCssVariables.background.primary};+ color: ${themeCssVariables.color.red9};+ font-size: ${themeCssVariables.font.size.xs};+ padding-right: ${themeCssVariables.spacing['0.5']};+ position: absolute;+ right: calc(100% - ${RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth - 1}px);+ top: ${({ topInPixels }) => `${topInPixels}px`};+ transform: translateY(-50%);+ white-space: nowrap;+ z-index: 3;+`;++const StyledScrollAnchor = styled.div<{ topInPixels: number }>`+ height: 1px;+ left: 0;+ pointer-events: none;+ position: absolute;+ top: ${({ topInPixels }) => `${topInPixels}px`};+ width: 1px;+`;++type WeekDayCellProps = {+ calendarEndFieldName?: string;+ calendarFieldName: string;+ calendarFieldType: FieldMetadataType;+ day: Temporal.PlainDate;+ timeFormat: string;+ timeZone: string;+};++type RecordCalendarWeekAllDayCellProps = WeekDayCellProps;+type RecordCalendarWeekDayColumnProps = Omit<WeekDayCellProps, 'day'> & {+ activeSlotIndex: number | null;+ dayString: string;+ onActiveSlotIndexChange: (+ day: string,+ slotIndex: number | null,+ interactionMode: RecordCalendarWeekSlotInteractionMode,+ ) => void;+};++const RecordCalendarWeekAllDayCell = ({+ calendarFieldName,+ calendarFieldType,+ day,+ timeFormat,+ timeZone,+}: RecordCalendarWeekAllDayCellProps) => {+ const recordIds = useAtomComponentFamilySelectorValue(+ calendarDayRecordIdsComponentFamilySelector,+ { day, timeZone },+ );++ const allDayRecordIds =+ calendarFieldType === FieldMetadataType.DATE ? recordIds : [];++ return (+ <StyledAllDayCell>+ {allDayRecordIds.slice(0, 1).map((recordId) => (+ <RecordCalendarWeekEvent+ key={recordId}+ calendarDay={day}+ calendarFieldName={calendarFieldName}+ calendarFieldType={calendarFieldType}+ isAllDay+ recordId={recordId}+ timeFormat={timeFormat}+ timeZone={timeZone}+ />+ ))}+ {allDayRecordIds.length > 1 && (+ <StyledAdditionalEventCount>+ +{allDayRecordIds.length - 1}+ </StyledAdditionalEventCount>+ )}+ </StyledAllDayCell>+ );+};++const RecordCalendarWeekDayColumn = memo(+ ({+ activeSlotIndex,+ calendarEndFieldName,+ calendarFieldName,+ calendarFieldType,+ dayString,+ onActiveSlotIndexChange,+ timeFormat,+ timeZone,+ }: RecordCalendarWeekDayColumnProps) => {+ const day = Temporal.PlainDate.from(dayString);+ const store = useStore();+ const recordIds = useAtomComponentFamilySelectorValue(+ calendarDayRecordIdsComponentFamilySelector,+ { day, timeZone },+ );++ const eventLayoutInputs =+ calendarFieldType === FieldMetadataType.DATE+ ? []+ : recordIds+ .map((recordId) => {+ const record = store.get(+ recordStoreFamilyState.atomFamily(recordId),+ );+ const recordDate = record?.[calendarFieldName];+ const recordEndDate = isDefined(calendarEndFieldName)+ ? record?.[calendarEndFieldName]+ : undefined;+ const metrics = getRecordCalendarWeekTimedEventMetrics({+ day,+ startDateTime: recordDate,+ endDateTime: recordEndDate,+ timeZone,+ });++ if (metrics === null) {+ return null;+ }++ return {+ ...metrics,+ recordId,+ };+ })+ .filter(isDefined);++ const eventLayouts =+ computeRecordCalendarWeekEventLayouts(eventLayoutInputs);++ const handleMouseMove = (event: MouseEvent<HTMLDivElement>) => {+ if (+ event.target instanceof Element &&+ event.target.closest('[data-selectable-id]') !== null+ ) {+ onActiveSlotIndexChange(dayString, null, 'pointer');+ return;+ }++ const columnRect = event.currentTarget.getBoundingClientRect();++ onActiveSlotIndexChange(+ dayString,+ getRecordCalendarWeekSlotIndex({+ columnHeight: columnRect.height,+ columnTop: columnRect.top,+ pointerY: event.clientY,+ }),+ 'pointer',+ );+ };++ const handleFocus = (event: FocusEvent<HTMLDivElement>) => {+ if (+ event.target === event.currentTarget &&+ event.currentTarget.matches(':focus-visible')+ ) {+ onActiveSlotIndexChange(+ dayString,+ activeSlotIndex ?? DEFAULT_KEYBOARD_SLOT_INDEX,+ 'keyboard',+ );+ }+ };++ const handleBlur = (event: FocusEvent<HTMLDivElement>) => {+ if (!event.currentTarget.contains(event.relatedTarget)) {+ onActiveSlotIndexChange(dayString, null, 'keyboard');+ }+ };++ const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {+ if (event.target !== event.currentTarget) {+ return;+ }++ const slotCount =+ (RECORD_CALENDAR_WEEK_DIMENSIONS.hoursInDay * 60) /+ RECORD_CALENDAR_WEEK_DIMENSIONS.snapIntervalInMinutes;++ if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {+ event.preventDefault();++ const slotDelta = event.key === 'ArrowDown' ? 1 : -1;++ onActiveSlotIndexChange(+ dayString,+ Math.min(+ slotCount - 1,+ Math.max(+ 0,+ (activeSlotIndex ?? DEFAULT_KEYBOARD_SLOT_INDEX) + slotDelta,+ ),+ ),+ 'keyboard',+ );+ }+ };++ return (+ <StyledDayColumn+ aria-label={day.toLocaleString(undefined, { dateStyle: 'full' })}+ isWeekend={isPlainDateInWeekend(day)}+ onBlur={handleBlur}+ onFocus={handleFocus}+ onKeyDown={handleKeyDown}+ onMouseLeave={() => onActiveSlotIndexChange(dayString, null, 'pointer')}+ onMouseMove={handleMouseMove}+ tabIndex={0}+ >+ {isDefined(activeSlotIndex) && (+ <StyledSlotAddNewPositioner+ data-testid="record-calendar-week-slot-add"+ topInPixels={+ activeSlotIndex * RECORD_CALENDAR_WEEK_DIMENSIONS.slotHeight+ }+ >+ <RecordCalendarAddNew+ cardDate={day}+ cardTime={Temporal.PlainTime.from('00:00').add({+ minutes:+ activeSlotIndex *+ RECORD_CALENDAR_WEEK_DIMENSIONS.snapIntervalInMinutes,+ })}+ compact+ />+ </StyledSlotAddNewPositioner>+ )}+ {eventLayouts.map(+ ({+ columnCount,+ columnIndex,+ endInPixels,+ recordId,+ startInPixels,+ }) => (+ <RecordCalendarWeekEvent+ key={recordId}+ calendarDay={day}+ calendarEndFieldName={calendarEndFieldName}+ calendarFieldName={calendarFieldName}+ calendarFieldType={calendarFieldType}+ columnCount={columnCount}+ columnIndex={columnIndex}+ endInPixels={endInPixels}+ isAllDay={false}+ recordId={recordId}+ startInPixels={startInPixels}+ timeFormat={timeFormat}+ timeZone={timeZone}+ />+ ),+ )}+ </StyledDayColumn>+ );+ },+);++export const RecordCalendarWeek = () => {+ const { objectMetadataItem } = useRecordCalendarContextOrThrow();+ const { timeFormat, timeZone } = useDateTimeFormat();+ const recordCalendarId = useAvailableComponentInstanceIdOrThrow(+ RecordCalendarComponentInstanceContext,+ );+ const recordCalendarSelectedDate = useAtomComponentStateValue(+ recordCalendarSelectedDateComponentState,+ recordCalendarId,+ );+ const recordIndexCalendarFieldMetadataId = useAtomStateValue(+ recordIndexCalendarFieldMetadataIdState,+ );+ const recordIndexCalendarEndFieldMetadataId = useAtomStateValue(+ recordIndexCalendarEndFieldMetadataIdState,+ );+ const scrollAnchorRef = useRef<HTMLDivElement>(null);+ const gridRef = useRef<HTMLDivElement>(null);+ const [currentInstant, setCurrentInstant] = useState(() =>+ Temporal.Now.instant(),+ );+ const [activeSlot, setActiveSlot] =+ useState<RecordCalendarWeekActiveSlot | null>(null);++ const handleActiveSlotIndexChange = useCallback(+ (+ day: string,+ slotIndex: number | null,+ interactionMode: RecordCalendarWeekSlotInteractionMode,+ ) => {+ setActiveSlot((currentActiveSlot) =>+ updateRecordCalendarWeekActiveSlot({+ currentActiveSlot,+ day,+ interactionMode,+ slotIndex,+ }),+ );+ },+ [],+ );++ const clearActivePointerSlot = useCallback(() => {+ setActiveSlot((currentActiveSlot) =>+ currentActiveSlot?.interactionMode === 'pointer'+ ? null+ : currentActiveSlot,+ );+ }, []);++ useEffect(() => {+ const handleDocumentMouseMove = (event: globalThis.MouseEvent) => {+ const eventTarget = event.target;++ if (+ !(eventTarget instanceof Node) ||+ gridRef.current?.contains(eventTarget) !== true+ ) {+ clearActivePointerSlot();+ }+ };++ const clearActiveSlot = () => setActiveSlot(null);++ document.addEventListener('mousemove', handleDocumentMouseMove);+ document.addEventListener('mouseleave', clearActivePointerSlot);+ window.addEventListener('blur', clearActiveSlot);++ return () => {+ document.removeEventListener('mousemove', handleDocumentMouseMove);+ document.removeEventListener('mouseleave', clearActivePointerSlot);+ window.removeEventListener('blur', clearActiveSlot);+ };+ }, [clearActivePointerSlot]);++ const { firstDayOfWeek, lastDayOfWeek, weekDays } =+ useRecordCalendarWeekDaysRange(recordCalendarSelectedDate);++ const calendarFieldMetadataItem = objectMetadataItem.fields.find(+ (field) => field.id === recordIndexCalendarFieldMetadataId,+ );+ const calendarEndFieldMetadataItem = objectMetadataItem.fields.find(+ (field) => field.id === recordIndexCalendarEndFieldMetadataId,+ );++ const now = currentInstant.toZonedDateTimeISO(timeZone);+ const today = now.toPlainDate();+ const isCurrentWeek =+ Temporal.PlainDate.compare(today, firstDayOfWeek) >= 0 &&+ Temporal.PlainDate.compare(today, lastDayOfWeek) <= 0;+ const currentTimeTopInPixels =+ (now.hour + now.minute / 60) * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight;+ const initialScrollHour = isCurrentWeek ? Math.max(now.hour - 2, 0) : 8;+ const firstDayOfWeekString = firstDayOfWeek.toString();++ useEffect(() => {+ const intervalId = window.setInterval(() => {+ setCurrentInstant(Temporal.Now.instant());+ }, CURRENT_TIME_REFRESH_INTERVAL_IN_MILLISECONDS);++ return () => window.clearInterval(intervalId);+ }, []);++ const isAllDayView =+ calendarFieldMetadataItem?.type === FieldMetadataType.DATE;+ const isTimedView =+ calendarFieldMetadataItem?.type === FieldMetadataType.DATE_TIME;+ const compatibleCalendarEndFieldName =+ isTimedView &&+ calendarEndFieldMetadataItem?.type === FieldMetadataType.DATE_TIME+ ? calendarEndFieldMetadataItem.name+ : undefined;++ useEffect(() => {+ if (!isTimedView) {+ return;+ }++ scrollAnchorRef.current?.scrollIntoView({+ block: 'center',+ inline: 'nearest',+ });+ }, [firstDayOfWeekString, isTimedView]);++ if (+ !isDefined(calendarFieldMetadataItem) ||+ (!isAllDayView && !isTimedView)+ ) {+ return null;+ }++ return (+ <RecordCalendarWeekDragDropContext+ gridRef={gridRef}+ weekDays={weekDays.map(({ date }) => date)}+ >+ <StyledContainer>+ <StyledHeader>+ <StyledHeaderGutter>+ {isTimedView && <TimeZoneAbbreviation instant={currentInstant} />}+ </StyledHeaderGutter>+ {weekDays.map(({ date, label }) => {+ const isToday = isSamePlainDate(date, today);++ return (+ <StyledDayHeader key={date.toString()}>+ <span>{label}</span>+ <StyledDayNumber isToday={isToday}>{date.day}</StyledDayNumber>+ </StyledDayHeader>+ );+ })}+ {isAllDayView && (+ <>+ <StyledAllDayLabel>{t`All day`}</StyledAllDayLabel>+ {weekDays.map(({ date }) => (+ <RecordCalendarWeekAllDayCell+ key={`all-day-${date.toString()}`}+ calendarFieldName={calendarFieldMetadataItem.name}+ calendarFieldType={calendarFieldMetadataItem.type}+ day={date}+ timeFormat={timeFormat}+ timeZone={timeZone}+ />+ ))}+ </>+ )}+ </StyledHeader>+ {isTimedView && (+ <StyledGrid ref={gridRef} onMouseLeave={clearActivePointerSlot}>+ <StyledTimeGutter>+ {Array.from(+ { length: RECORD_CALENDAR_WEEK_DIMENSIONS.hoursInDay },+ (_, hour) => (+ <StyledHourLabel+ key={hour}+ topInPixels={+ hour * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight+ }+ >+ {format(new Date(2000, 0, 1, hour), timeFormat)}+ </StyledHourLabel>+ ),+ )}+ <StyledScrollAnchor+ ref={scrollAnchorRef}+ topInPixels={+ initialScrollHour * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight+ }+ />+ </StyledTimeGutter>+ {weekDays.map(({ date }) => {+ const dateString = date.toString();++ return (+ <RecordCalendarWeekDayColumn+ key={dateString}+ activeSlotIndex={+ activeSlot?.day === dateString ? activeSlot.slotIndex : null+ }+ calendarEndFieldName={compatibleCalendarEndFieldName}+ calendarFieldName={calendarFieldMetadataItem.name}+ calendarFieldType={calendarFieldMetadataItem.type}+ dayString={dateString}+ onActiveSlotIndexChange={handleActiveSlotIndexChange}+ timeFormat={timeFormat}+ timeZone={timeZone}+ />+ );+ })}+ {isCurrentWeek && (+ <>+ <StyledCurrentTimeLine topInPixels={currentTimeTopInPixels} />+ <StyledCurrentTimeLabel topInPixels={currentTimeTopInPixels}>+ {formatInTimeZone(+ new Date(currentInstant.toString()),+ timeZone,+ timeFormat,+ )}+ </StyledCurrentTimeLabel>+ </>+ )}+ </StyledGrid>+ )}+ </StyledContainer>+ </RecordCalendarWeekDragDropContext>+ );+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/components/RecordCalendarWeekDragDropContext.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/week/components/RecordCalendarWeekDragDropContext.tsxnew file mode 100644index 00000000000..72499c5d71c--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/components/RecordCalendarWeekDragDropContext.tsx@@ -0,0 +1,115 @@+import { useProcessRecordCalendarWeekEventDrop } from '@/object-record/record-calendar/week/hooks/useProcessRecordCalendarWeekEventDrop';+import { type RecordCalendarWeekDndData } from '@/object-record/record-calendar/week/types/RecordCalendarWeekDndData';+import { resolveRecordCalendarWeekEventDrop } from '@/object-record/record-calendar/week/utils/resolveRecordCalendarWeekEventDrop';+import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar';+import { DND_KIT_SENSORS } from '@/ui/utilities/drag-and-drop/constants/DndKitSensors';+import { DragDropProvider } from '@dnd-kit/react';+import { t } from '@lingui/core/macro';+import {+ type ComponentProps,+ type ReactNode,+ type RefObject,+ useState,+} from 'react';+import type { Temporal } from 'temporal-polyfill';+import { isDefined } from 'twenty-shared/utils';+import { logError } from '~/utils/logError';++type DragStartPayload = Parameters<+ NonNullable<+ ComponentProps<+ typeof DragDropProvider<RecordCalendarWeekDndData>+ >['onDragStart']+ >+>[0];+type DragEndPayload = Parameters<+ NonNullable<+ ComponentProps<+ typeof DragDropProvider<RecordCalendarWeekDndData>+ >['onDragEnd']+ >+>[0];++type RecordCalendarWeekDragDropContextProps = {+ children: ReactNode;+ gridRef: RefObject<HTMLDivElement | null>;+ weekDays: Temporal.PlainDate[];+};++export const RecordCalendarWeekDragDropContext = ({+ children,+ gridRef,+ weekDays,+}: RecordCalendarWeekDragDropContextProps) => {+ const [grabOffsetY, setGrabOffsetY] = useState(0);+ const { processRecordCalendarWeekEventDrop } =+ useProcessRecordCalendarWeekEventDrop();+ const { enqueueErrorSnackBar } = useSnackBar();++ const handleDragStart = ({ operation }: DragStartPayload) => {+ const sourceElement = operation.source?.element;++ if (!isDefined(sourceElement)) {+ setGrabOffsetY(0);+ return;+ }++ setGrabOffsetY(+ operation.position.current.y - sourceElement.getBoundingClientRect().top,+ );+ };++ const handleDragEnd = ({ canceled, operation }: DragEndPayload) => {+ if (+ canceled ||+ !isDefined(operation.source) ||+ !isDefined(gridRef.current)+ ) {+ return;+ }++ const sourceData = operation.source.data;++ if (sourceData.kind !== 'record-calendar-week-event') {+ return;+ }++ const gridRect = gridRef.current.getBoundingClientRect();+ const resolvedDrop = resolveRecordCalendarWeekEventDrop({+ dayCount: weekDays.length,+ grabOffsetY,+ gridRect,+ pointerX: operation.position.current.x,+ pointerY: operation.position.current.y,+ });++ if (!isDefined(resolvedDrop)) {+ return;+ }++ const destinationDay = weekDays[resolvedDrop.dayIndex];++ if (!isDefined(destinationDay)) {+ return;+ }++ void processRecordCalendarWeekEventDrop({+ destinationDay,+ destinationMinutes: resolvedDrop.destinationMinutes,+ recordId: sourceData.recordId,+ }).catch((error) => {+ logError(error);+ enqueueErrorSnackBar({ message: t`Failed to move record` });+ });+ };++ return (+ <DragDropProvider<RecordCalendarWeekDndData>+ sensors={DND_KIT_SENSORS}+ onDragStart={handleDragStart}+ onDragEnd={handleDragEnd}+ >+ {children}+ </DragDropProvider>+ );+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/components/RecordCalendarWeekEvent.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/week/components/RecordCalendarWeekEvent.tsxnew file mode 100644index 00000000000..21d300c6fcb--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/components/RecordCalendarWeekEvent.tsx@@ -0,0 +1,319 @@+import { RecordChip } from '@/object-record/components/RecordChip';+import { StopPropagationContainer } from '@/object-record/record-board/record-board-card/components/StopPropagationContainer';+import { useRecordCalendarContextOrThrow } from '@/object-record/record-calendar/contexts/RecordCalendarContext';+import { RECORD_CALENDAR_CARD_CLICK_OUTSIDE_ID } from '@/object-record/record-calendar/record-calendar-card/constants/RecordCalendarCardClickOutsideId';+import { useIsRecordCalendarCardDragDisabled } from '@/object-record/record-calendar/record-calendar-card/hooks/useIsRecordCalendarCardDragDisabled';+import { isRecordCalendarCardSelectedComponentFamilyState } from '@/object-record/record-calendar/record-calendar-card/states/isRecordCalendarCardSelectedComponentFamilyState';+import { getRecordCalendarCardDraggableId } from '@/object-record/record-calendar/record-calendar-card/utils/getRecordCalendarCardDraggableId';+import { RECORD_CALENDAR_WEEK_DIMENSIONS } from '@/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions';+import { type RecordCalendarWeekDndData } from '@/object-record/record-calendar/week/types/RecordCalendarWeekDndData';+import { formatRecordCalendarWeekEventTimes } from '@/object-record/record-calendar/week/utils/formatRecordCalendarWeekEventTimes';+import { getRecordCalendarWeekEventHorizontalPosition } from '@/object-record/record-calendar/week/utils/getRecordCalendarWeekEventHorizontalPosition';+import { getRecordCalendarWeekTimedEventHeight } from '@/object-record/record-calendar/week/utils/getRecordCalendarWeekTimedEventMetrics';+import { RecordCard } from '@/object-record/record-card/components/RecordCard';+import { useOpenRecordFromIndexView } from '@/object-record/record-index/hooks/useOpenRecordFromIndexView';+import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';+import { useAtomComponentFamilyState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilyState';+import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue';+import { useDraggable } from '@dnd-kit/react';+import { styled } from '@linaria/react';+import { type Temporal } from 'temporal-polyfill';+import { isDefined } from 'twenty-shared/utils';+import { ChipVariant } from 'twenty-ui/data-display';+import { Checkbox, CheckboxVariant } from 'twenty-ui/input';+import { themeCssVariables } from 'twenty-ui/theme-constants';+import { FieldMetadataType } from '~/generated-metadata/graphql';++const RECORD_CALENDAR_WEEK_EVENT_TIME_ROW_HEIGHT = 14;+const RECORD_CALENDAR_WEEK_EVENT_EXPANDED_MIN_HEIGHT =+ RECORD_CALENDAR_WEEK_DIMENSIONS.minimumEventSlotHeight ++ RECORD_CALENDAR_WEEK_EVENT_TIME_ROW_HEIGHT;++const StyledEventPositioner = styled.div<{+ columnCount: number;+ columnIndex: number;+ heightInPixels: number;+ isAllDay: boolean;+ topInPixels: number;+}>`+ box-sizing: border-box;+ height: ${({ heightInPixels, isAllDay }) =>+ isAllDay ? '22px' : `${heightInPixels}px`};+ left: ${({ columnCount, columnIndex, isAllDay }) =>+ isAllDay+ ? 'auto'+ : getRecordCalendarWeekEventHorizontalPosition({+ columnCount,+ columnIndex,+ }).left};+ min-width: 0;+ overflow: hidden;+ position: ${({ isAllDay }) => (isAllDay ? 'relative' : 'absolute')};+ right: auto;+ top: ${({ isAllDay, topInPixels }) =>+ isAllDay+ ? 'auto'+ : `${topInPixels + RECORD_CALENDAR_WEEK_DIMENSIONS.eventVerticalGap / 2}px`};+ width: ${({ columnCount, columnIndex, isAllDay }) =>+ isAllDay+ ? '100%'+ : getRecordCalendarWeekEventHorizontalPosition({+ columnCount,+ columnIndex,+ }).width};+ z-index: ${({ columnCount, columnIndex, isAllDay }) =>+ isAllDay+ ? 1+ : getRecordCalendarWeekEventHorizontalPosition({+ columnCount,+ columnIndex,+ }).stackingOrder};++ &:focus-within,+ &:hover {+ z-index: ${({ columnCount, columnIndex, isAllDay }) =>+ isAllDay+ ? 1+ : getRecordCalendarWeekEventHorizontalPosition({+ columnCount,+ columnIndex,+ }).hoverStackingOrder};+ }++ > div {+ height: 100%;+ }+`;++const StyledEventContent = styled.div<{ isAllDay: boolean }>`+ align-items: ${({ isAllDay }) => (isAllDay ? 'center' : 'flex-start')};+ box-sizing: border-box;+ display: flex;+ flex-direction: ${({ isAllDay }) => (isAllDay ? 'row' : 'column')};+ height: 100%;+ min-width: 0;+ overflow: hidden;+ padding: ${({ isAllDay }) =>+ isAllDay+ ? `0 ${themeCssVariables.spacing['0.5']}`+ : `${themeCssVariables.spacing['0.5']} ${themeCssVariables.spacing[1]}`};+ position: relative;+ width: 100%;+`;++const StyledEventHeader = styled.div`+ align-items: center;+ display: flex;+ height: 20px;+ min-width: 0;+ width: 100%;+`;++const StyledEventLabel = styled.div`+ align-items: center;+ display: flex;+ flex: 1;+ font-size: ${themeCssVariables.font.size.xs};+ height: 20px;+ min-width: 0;+ overflow: hidden;+`;++const StyledRecordChipContainer = styled.div`+ display: flex;+ flex: 0 1 auto;+ min-width: 0;+ overflow: hidden;++ [data-testid='chip'],+ [data-testid='chip'] > * {+ color: ${themeCssVariables.font.color.primary};+ }++ [data-testid='chip'] {+ min-width: 0;+ padding-right: 0;+ }+`;++const StyledCompactEventStartTime = styled.span`+ color: ${themeCssVariables.font.color.tertiary};+ flex-shrink: 0;+ font-size: ${themeCssVariables.font.size.xxs};+ font-weight: ${themeCssVariables.font.weight.medium};+ line-height: 12px;+ white-space: nowrap;+`;++const StyledCheckboxContainer = styled.div`+ align-items: center;+ display: flex;+ flex-shrink: 0;+ height: 20px;+ margin-left: auto;+`;++const StyledEventTimeRow = styled.div`+ align-items: center;+ display: flex;+ height: ${RECORD_CALENDAR_WEEK_EVENT_TIME_ROW_HEIGHT}px;+ min-width: 0;+ overflow: hidden;+ width: 100%;+`;++const StyledEventTime = styled.span`+ color: ${themeCssVariables.font.color.tertiary};+ font-size: ${themeCssVariables.font.size.xxs};+ line-height: 12px;+ white-space: nowrap;+`;++type RecordCalendarWeekEventProps = {+ calendarDay: Temporal.PlainDate;+ calendarEndFieldName?: string;+ calendarFieldName: string;+ calendarFieldType: FieldMetadataType;+ columnCount?: number;+ columnIndex?: number;+ endInPixels?: number;+ isAllDay: boolean;+ recordId: string;+ startInPixels?: number;+ timeFormat: string;+ timeZone: string;+};++export const RecordCalendarWeekEvent = ({+ calendarDay,+ calendarEndFieldName,+ calendarFieldName,+ calendarFieldType,+ columnCount = 1,+ columnIndex = 0,+ endInPixels = 0,+ isAllDay,+ recordId,+ startInPixels = 0,+ timeFormat,+ timeZone,+}: RecordCalendarWeekEventProps) => {+ const { objectNameSingular } = useRecordCalendarContextOrThrow();+ const { openRecordFromIndexView } = useOpenRecordFromIndexView();+ const dragIsDisabled = useIsRecordCalendarCardDragDisabled(recordId);+ const draggableId = getRecordCalendarCardDraggableId({+ calendarDay: calendarDay.toString(),+ recordId,+ });+ const { isDragSource, ref: draggableRef } =+ useDraggable<RecordCalendarWeekDndData>({+ id: draggableId,+ data: {+ kind: 'record-calendar-week-event',+ recordId,+ },+ disabled: isAllDay || dragIsDisabled,+ feedback: 'clone',+ });+ const recordStore = useAtomFamilyStateValue(recordStoreFamilyState, recordId);+ const recordDate = recordStore?.[calendarFieldName];+ const recordEndDate = isDefined(calendarEndFieldName)+ ? recordStore?.[calendarEndFieldName]+ : undefined;++ const [isRecordCalendarCardSelected, setIsRecordCalendarCardSelected] =+ useAtomComponentFamilyState(+ isRecordCalendarCardSelectedComponentFamilyState,+ recordId,+ );++ const isDateOnly = calendarFieldType === FieldMetadataType.DATE;++ if (+ !isDefined(recordStore) ||+ typeof recordDate !== 'string' ||+ isAllDay !== isDateOnly+ ) {+ return null;+ }++ const eventTimes = !isDateOnly+ ? formatRecordCalendarWeekEventTimes({+ startDateTime: recordDate,+ endDateTime: recordEndDate,+ timeFormat,+ timeZone,+ })+ : null;+ const heightInPixels = getRecordCalendarWeekTimedEventHeight({+ endInPixels,+ startInPixels,+ });+ const isCompactTimedEvent =+ !isAllDay &&+ heightInPixels < RECORD_CALENDAR_WEEK_EVENT_EXPANDED_MIN_HEIGHT;+ const expandedEventTime = eventTimes?.timeRange;++ return (+ <StyledEventPositioner+ ref={draggableRef}+ columnCount={columnCount}+ columnIndex={columnIndex}+ heightInPixels={heightInPixels}+ isAllDay={isAllDay}+ topInPixels={startInPixels}+ data-selectable-id={recordId}+ >+ <RecordCard+ data-click-outside-id={RECORD_CALENDAR_CARD_CLICK_OUTSIDE_ID}+ data-selected={isRecordCalendarCardSelected}+ onClick={() => {+ if (!isDragSource) {+ openRecordFromIndexView({ recordId });+ }+ }}+ >+ <StyledEventContent isAllDay={isAllDay}>+ <StyledEventHeader>+ <StyledEventLabel>+ <StyledRecordChipContainer>+ <RecordChip+ objectNameSingular={objectNameSingular}+ record={recordStore}+ variant={ChipVariant.Transparent}+ isIconHidden+ forceDisableClick+ triggerEvent="CLICK"+ />+ </StyledRecordChipContainer>+ {isCompactTimedEvent && isDefined(eventTimes) && (+ <StyledCompactEventStartTime>+ {`, ${eventTimes.startTime}`}+ </StyledCompactEventStartTime>+ )}+ </StyledEventLabel>+ <StyledCheckboxContainer className="checkbox-container">+ <StopPropagationContainer>+ <Checkbox+ hoverable+ checked={isRecordCalendarCardSelected}+ onChange={(event) => {+ setIsRecordCalendarCardSelected(event.target.checked);+ }}+ variant={CheckboxVariant.Secondary}+ />+ </StopPropagationContainer>+ </StyledCheckboxContainer>+ </StyledEventHeader>+ {!isAllDay &&+ !isCompactTimedEvent &&+ isDefined(expandedEventTime) && (+ <StyledEventTimeRow>+ <StyledEventTime>{expandedEventTime}</StyledEventTime>+ </StyledEventTimeRow>+ )}+ </StyledEventContent>+ </RecordCard>+ </StyledEventPositioner>+ );+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions.tsnew file mode 100644index 00000000000..c2dcc312e98--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions.ts@@ -0,0 +1,27 @@+function createRecordCalendarWeekDimensions({+ hourHeight,+ hoursInDay,+ snapIntervalInMinutes,+}: {+ hourHeight: number;+ hoursInDay: number;+ snapIntervalInMinutes: number;+}) {+ return {+ eventVerticalGap: 8,+ gridHeight: hoursInDay * hourHeight,+ hourHeight,+ hoursInDay,+ minimumEventSlotHeight: 24,+ slotHeight: (hourHeight * snapIntervalInMinutes) / 60,+ snapIntervalInMinutes,+ timeGutterWidth: 56,+ } as const;+}++export const RECORD_CALENDAR_WEEK_DIMENSIONS =+ createRecordCalendarWeekDimensions({+ hourHeight: 48,+ hoursInDay: 24,+ snapIntervalInMinutes: 30,+ });diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/hooks/useProcessRecordCalendarWeekEventDrop.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/hooks/useProcessRecordCalendarWeekEventDrop.tsnew file mode 100644index 00000000000..4e250938d4c--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/hooks/useProcessRecordCalendarWeekEventDrop.ts@@ -0,0 +1,88 @@+import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';+import { useRecordCalendarContextOrThrow } from '@/object-record/record-calendar/contexts/RecordCalendarContext';+import { getRecordCalendarWeekEventDropDateTime } from '@/object-record/record-calendar/week/utils/getRecordCalendarWeekEventDropDateTime';+import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';+import { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUserTimezone';+import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';+import { useStore } from 'jotai';+import { useCallback } from 'react';+import type { Temporal } from 'temporal-polyfill';+import { isDefined } from 'twenty-shared/utils';+import { FieldMetadataType } from '~/generated-metadata/graphql';++type ProcessRecordCalendarWeekEventDropArgs = {+ destinationDay: Temporal.PlainDate;+ destinationMinutes: number;+ recordId: string;+};++export const useProcessRecordCalendarWeekEventDrop = () => {+ const store = useStore();+ const { objectMetadataItem } = useRecordCalendarContextOrThrow();+ const { currentView } = useGetCurrentViewOnly();+ const { updateOneRecord } = useUpdateOneRecord();+ const { userTimezone } = useUserTimezone();++ const processRecordCalendarWeekEventDrop = useCallback(+ async ({+ destinationDay,+ destinationMinutes,+ recordId,+ }: ProcessRecordCalendarWeekEventDropArgs) => {+ const calendarFieldMetadataItem = objectMetadataItem.fields.find(+ (field) => field.id === currentView?.calendarFieldMetadataId,+ );++ if (calendarFieldMetadataItem?.type !== FieldMetadataType.DATE_TIME) {+ return;+ }++ const calendarEndFieldMetadataItem = objectMetadataItem.fields.find(+ (field) => field.id === currentView?.calendarEndFieldMetadataId,+ );+ const record = store.get(recordStoreFamilyState.atomFamily(recordId));++ if (!isDefined(record)) {+ return;+ }++ const shiftedDateTime = getRecordCalendarWeekEventDropDateTime({+ destinationDay,+ destinationMinutes,+ startDateTime: record[calendarFieldMetadataItem.name],+ endDateTime:+ calendarEndFieldMetadataItem?.type === FieldMetadataType.DATE_TIME+ ? record[calendarEndFieldMetadataItem.name]+ : undefined,+ timeZone: userTimezone,+ });++ if (shiftedDateTime === null) {+ return;+ }++ await updateOneRecord({+ objectNameSingular: objectMetadataItem.nameSingular,+ idToUpdate: recordId,+ updateOneRecordInput: {+ [calendarFieldMetadataItem.name]: shiftedDateTime.startDateTime,+ ...(isDefined(calendarEndFieldMetadataItem) &&+ isDefined(shiftedDateTime.endDateTime) && {+ [calendarEndFieldMetadataItem.name]: shiftedDateTime.endDateTime,+ }),+ },+ });+ },+ [+ currentView?.calendarEndFieldMetadataId,+ currentView?.calendarFieldMetadataId,+ objectMetadataItem.fields,+ objectMetadataItem.nameSingular,+ store,+ updateOneRecord,+ userTimezone,+ ],+ );++ return { processRecordCalendarWeekEventDrop };+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/hooks/useRecordCalendarWeekDaysRange.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/hooks/useRecordCalendarWeekDaysRange.tsnew file mode 100644index 00000000000..a696bd380aa--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/hooks/useRecordCalendarWeekDaysRange.ts@@ -0,0 +1,48 @@+import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';+import { detectCalendarStartDay } from '@/localization/utils/detection/detectCalendarStartDay';+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';+import { format } from 'date-fns';+import { type Temporal } from 'temporal-polyfill';+import { CalendarStartDay } from 'twenty-shared/constants';+import { turnPlainDateToShiftedDateInSystemTimeZone } from 'twenty-shared/utils';+import { dateLocaleState } from '~/localization/states/dateLocaleState';++export const useRecordCalendarWeekDaysRange = (+ selectedDate: Temporal.PlainDate,+) => {+ const currentWorkspaceMember = useAtomStateValue(currentWorkspaceMemberState);+ const dateLocale = useAtomStateValue(dateLocaleState);++ const calendarStartDay =+ currentWorkspaceMember?.calendarStartDay ?? CalendarStartDay.SYSTEM;++ const weekStartsOnDayIndex = (+ calendarStartDay === CalendarStartDay.SYSTEM+ ? CalendarStartDay[detectCalendarStartDay()]+ : calendarStartDay+ ) as 0 | 1 | 2 | 3 | 4 | 5 | 6;++ const selectedDayIndex = selectedDate.dayOfWeek % 7;+ const daysSinceStartOfWeek =+ (selectedDayIndex - weekStartsOnDayIndex + 7) % 7;+ const firstDayOfWeek = selectedDate.subtract({+ days: daysSinceStartOfWeek,+ });++ const weekDays = Array.from({ length: 7 }, (_, index) => {+ const date = firstDayOfWeek.add({ days: index });++ return {+ date,+ label: format(turnPlainDateToShiftedDateInSystemTimeZone(date), 'EEE', {+ locale: dateLocale.localeCatalog,+ }),+ };+ });++ return {+ firstDayOfWeek,+ lastDayOfWeek: firstDayOfWeek.add({ days: 6 }),+ weekDays,+ };+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/types/RecordCalendarWeekDndData.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/types/RecordCalendarWeekDndData.tsnew file mode 100644index 00000000000..5205d8a52b5--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/types/RecordCalendarWeekDndData.ts@@ -0,0 +1,4 @@+export type RecordCalendarWeekDndData = {+ kind: 'record-calendar-week-event';+ recordId: string;+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/computeRecordCalendarWeekEventLayouts.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/computeRecordCalendarWeekEventLayouts.test.tsnew file mode 100644index 00000000000..44fa3ed4095--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/computeRecordCalendarWeekEventLayouts.test.ts@@ -0,0 +1,141 @@+import { computeRecordCalendarWeekEventLayouts } from '@/object-record/record-calendar/week/utils/computeRecordCalendarWeekEventLayouts';++describe('computeRecordCalendarWeekEventLayouts', () => {+ it('gives non-overlapping events the full column width', () => {+ const layouts = computeRecordCalendarWeekEventLayouts([+ { recordId: 'first', startInPixels: 0, endInPixels: 44 },+ { recordId: 'second', startInPixels: 44, endInPixels: 88 },+ ]);++ expect(layouts).toEqual([+ {+ recordId: 'first',+ startInPixels: 0,+ endInPixels: 44,+ columnIndex: 0,+ columnCount: 1,+ },+ {+ recordId: 'second',+ startInPixels: 44,+ endInPixels: 88,+ columnIndex: 0,+ columnCount: 1,+ },+ ]);+ });++ it('places overlapping events in adjacent columns', () => {+ const layouts = computeRecordCalendarWeekEventLayouts([+ { recordId: 'first', startInPixels: 0, endInPixels: 44 },+ { recordId: 'second', startInPixels: 10, endInPixels: 54 },+ { recordId: 'third', startInPixels: 20, endInPixels: 64 },+ ]);++ expect(+ layouts.map(({ recordId, columnIndex, columnCount }) => ({+ recordId,+ columnIndex,+ columnCount,+ })),+ ).toEqual([+ { recordId: 'first', columnIndex: 0, columnCount: 3 },+ { recordId: 'second', columnIndex: 1, columnCount: 3 },+ { recordId: 'third', columnIndex: 2, columnCount: 3 },+ ]);+ });++ it('keeps every event in a larger overlapping group', () => {+ const layouts = computeRecordCalendarWeekEventLayouts([+ { recordId: 'first', startInPixels: 0, endInPixels: 60 },+ { recordId: 'second', startInPixels: 0, endInPixels: 60 },+ { recordId: 'third', startInPixels: 0, endInPixels: 60 },+ { recordId: 'fourth', startInPixels: 15, endInPixels: 75 },+ { recordId: 'fifth', startInPixels: 30, endInPixels: 90 },+ ]);++ expect(+ layouts.map(({ recordId, columnIndex, columnCount }) => ({+ recordId,+ columnIndex,+ columnCount,+ })),+ ).toEqual([+ { recordId: 'first', columnIndex: 0, columnCount: 5 },+ { recordId: 'second', columnIndex: 1, columnCount: 5 },+ { recordId: 'third', columnIndex: 2, columnCount: 5 },+ { recordId: 'fourth', columnIndex: 3, columnCount: 5 },+ { recordId: 'fifth', columnIndex: 4, columnCount: 5 },+ ]);+ });++ it('reuses a free column within an overlapping group', () => {+ const layouts = computeRecordCalendarWeekEventLayouts([+ { recordId: 'first', startInPixels: 0, endInPixels: 44 },+ { recordId: 'second', startInPixels: 10, endInPixels: 54 },+ { recordId: 'third', startInPixels: 44, endInPixels: 88 },+ ]);++ expect(+ layouts.map(({ recordId, columnIndex, columnCount }) => ({+ recordId,+ columnIndex,+ columnCount,+ })),+ ).toEqual([+ { recordId: 'first', columnIndex: 0, columnCount: 2 },+ { recordId: 'second', columnIndex: 1, columnCount: 2 },+ { recordId: 'third', columnIndex: 0, columnCount: 2 },+ ]);+ });++ it('keeps a long event in the first column while shorter events reuse the overlay column', () => {+ const layouts = computeRecordCalendarWeekEventLayouts([+ { recordId: 'long', startInPixels: 0, endInPixels: 180 },+ { recordId: 'first-short', startInPixels: 30, endInPixels: 60 },+ { recordId: 'second-short', startInPixels: 60, endInPixels: 90 },+ ]);++ expect(+ layouts.map(({ recordId, columnIndex, columnCount }) => ({+ recordId,+ columnIndex,+ columnCount,+ })),+ ).toEqual([+ { recordId: 'long', columnIndex: 0, columnCount: 2 },+ { recordId: 'first-short', columnIndex: 1, columnCount: 2 },+ { recordId: 'second-short', columnIndex: 1, columnCount: 2 },+ ]);+ });++ it('places the longer event behind shorter events with the same start', () => {+ const layouts = computeRecordCalendarWeekEventLayouts([+ { recordId: 'short', startInPixels: 0, endInPixels: 60 },+ { recordId: 'long', startInPixels: 0, endInPixels: 180 },+ ]);++ expect(+ layouts.map(({ recordId, columnIndex, columnCount }) => ({+ recordId,+ columnIndex,+ columnCount,+ })),+ ).toEqual([+ { recordId: 'long', columnIndex: 0, columnCount: 2 },+ { recordId: 'short', columnIndex: 1, columnCount: 2 },+ ]);+ });++ it('sorts events before assigning columns', () => {+ const layouts = computeRecordCalendarWeekEventLayouts([+ { recordId: 'second', startInPixels: 10, endInPixels: 54 },+ { recordId: 'first', startInPixels: 0, endInPixels: 44 },+ ]);++ expect(layouts.map(({ recordId }) => recordId)).toEqual([+ 'first',+ 'second',+ ]);+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/formatRecordCalendarWeekEventTimes.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/formatRecordCalendarWeekEventTimes.test.tsnew file mode 100644index 00000000000..c7cc4a04746--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/formatRecordCalendarWeekEventTimes.test.ts@@ -0,0 +1,50 @@+import { formatRecordCalendarWeekEventTimes } from '@/object-record/record-calendar/week/utils/formatRecordCalendarWeekEventTimes';++const timeZone = 'Europe/Paris';+const timeFormat = 'HH:mm';++describe('formatRecordCalendarWeekEventTimes', () => {+ it('formats the start time and configured time range', () => {+ expect(+ formatRecordCalendarWeekEventTimes({+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-10T18:59:00Z',+ timeFormat,+ timeZone,+ }),+ ).toEqual({+ startTime: '17:59',+ timeRange: '17:59 - 20:59',+ });+ });++ it.each([+ ['missing', undefined],+ ['null', null],+ ['invalid', 'not-a-date'],+ ['equal to the start', '2026-07-08T15:59:00Z'],+ ['before the start', '2026-07-08T14:59:00Z'],+ ])('uses only the start time when the end is %s', (_label, endDateTime) => {+ expect(+ formatRecordCalendarWeekEventTimes({+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime,+ timeFormat,+ timeZone,+ }),+ ).toEqual({+ startTime: '17:59',+ timeRange: '17:59',+ });+ });++ it('returns null when the start is unusable', () => {+ expect(+ formatRecordCalendarWeekEventTimes({+ startDateTime: 'not-a-date',+ timeFormat,+ timeZone,+ }),+ ).toBeNull();+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/formatRecordCalendarWeekRange.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/formatRecordCalendarWeekRange.test.tsnew file mode 100644index 00000000000..72497954c53--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/formatRecordCalendarWeekRange.test.ts@@ -0,0 +1,35 @@+import { formatRecordCalendarWeekRange } from '@/object-record/record-calendar/week/utils/formatRecordCalendarWeekRange';+import { enUS } from 'date-fns/locale';+import { Temporal } from 'temporal-polyfill';++describe('formatRecordCalendarWeekRange', () => {+ it('formats a week within one month', () => {+ expect(+ formatRecordCalendarWeekRange({+ firstDayOfWeek: Temporal.PlainDate.from('2026-07-06'),+ lastDayOfWeek: Temporal.PlainDate.from('2026-07-12'),+ locale: enUS,+ }),+ ).toBe('Jul 6 – 12, 2026');+ });++ it('formats a week spanning two months', () => {+ expect(+ formatRecordCalendarWeekRange({+ firstDayOfWeek: Temporal.PlainDate.from('2026-06-29'),+ lastDayOfWeek: Temporal.PlainDate.from('2026-07-05'),+ locale: enUS,+ }),+ ).toBe('Jun 29 – Jul 5, 2026');+ });++ it('formats a week spanning two years', () => {+ expect(+ formatRecordCalendarWeekRange({+ firstDayOfWeek: Temporal.PlainDate.from('2025-12-29'),+ lastDayOfWeek: Temporal.PlainDate.from('2026-01-04'),+ locale: enUS,+ }),+ ).toBe('Dec 29, 2025 – Jan 4, 2026');+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekEventDropDateTime.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekEventDropDateTime.test.tsnew file mode 100644index 00000000000..5924b2aa021--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekEventDropDateTime.test.ts@@ -0,0 +1,93 @@+import { getRecordCalendarWeekEventDropDateTime } from '@/object-record/record-calendar/week/utils/getRecordCalendarWeekEventDropDateTime';+import { Temporal } from 'temporal-polyfill';++describe('getRecordCalendarWeekEventDropDateTime', () => {+ it('moves a multi-day event start to the drop position from any fragment', () => {+ expect(+ getRecordCalendarWeekEventDropDateTime({+ destinationDay: Temporal.PlainDate.from('2026-07-10'),+ destinationMinutes: 10 * 60,+ startDateTime: '2026-07-07T07:00:00Z',+ endDateTime: '2026-07-09T10:00:00Z',+ timeZone: 'Europe/Paris',+ }),+ ).toEqual({+ startDateTime: '2026-07-10T08:00:00Z',+ endDateTime: '2026-07-12T11:00:00Z',+ });+ });++ it('lands at the drop time when the original start is the later repeated DST time', () => {+ expect(+ getRecordCalendarWeekEventDropDateTime({+ destinationDay: Temporal.PlainDate.from('2026-10-26'),+ destinationMinutes: 10 * 60,+ startDateTime: '2026-10-25T01:30:00Z',+ endDateTime: '2026-10-25T02:30:00Z',+ timeZone: 'Europe/Paris',+ }),+ ).toEqual({+ startDateTime: '2026-10-26T09:00:00Z',+ endDateTime: '2026-10-26T10:00:00Z',+ });+ });++ it('shifts an end that is equal to the start', () => {+ expect(+ getRecordCalendarWeekEventDropDateTime({+ destinationDay: Temporal.PlainDate.from('2026-07-10'),+ destinationMinutes: 10 * 60,+ startDateTime: '2026-07-07T07:00:00Z',+ endDateTime: '2026-07-07T07:00:00Z',+ timeZone: 'Europe/Paris',+ }),+ ).toEqual({+ startDateTime: '2026-07-10T08:00:00Z',+ endDateTime: '2026-07-10T08:00:00Z',+ });+ });++ it.each([undefined, null, 42])(+ 'returns null for a non-string start: %s',+ (startDateTime) => {+ expect(+ getRecordCalendarWeekEventDropDateTime({+ destinationDay: Temporal.PlainDate.from('2026-07-10'),+ destinationMinutes: 10 * 60,+ startDateTime,+ timeZone: 'Europe/Paris',+ }),+ ).toBeNull();+ },+ );++ it('returns null for a malformed start', () => {+ expect(+ getRecordCalendarWeekEventDropDateTime({+ destinationDay: Temporal.PlainDate.from('2026-07-10'),+ destinationMinutes: 10 * 60,+ startDateTime: 'not-a-date',+ timeZone: 'Europe/Paris',+ }),+ ).toBeNull();+ });++ it.each([+ ['missing', undefined],+ ['non-string', 42],+ ['malformed', 'not-a-date'],+ ['before the start', '2026-07-07T06:59:00Z'],+ ])('moves only the start when the end is %s', (_label, endDateTime) => {+ expect(+ getRecordCalendarWeekEventDropDateTime({+ destinationDay: Temporal.PlainDate.from('2026-07-10'),+ destinationMinutes: 10 * 60,+ startDateTime: '2026-07-07T07:00:00Z',+ endDateTime,+ timeZone: 'Europe/Paris',+ }),+ ).toEqual({+ startDateTime: '2026-07-10T08:00:00Z',+ });+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekEventHorizontalPosition.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekEventHorizontalPosition.test.tsnew file mode 100644index 00000000000..69f0bd879bf--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekEventHorizontalPosition.test.ts@@ -0,0 +1,59 @@+import { getRecordCalendarWeekEventHorizontalPosition } from '@/object-record/record-calendar/week/utils/getRecordCalendarWeekEventHorizontalPosition';++describe('getRecordCalendarWeekEventHorizontalPosition', () => {+ it('uses the available width for a non-overlapping event', () => {+ expect(+ getRecordCalendarWeekEventHorizontalPosition({+ columnCount: 1,+ columnIndex: 0,+ }),+ ).toEqual({+ hoverStackingOrder: 2,+ left: 'calc(0% + 4px)',+ stackingOrder: 1,+ width: 'calc(100% - 8px)',+ });+ });++ it('cascades overlapping events from their column to the right edge', () => {+ expect(+ Array.from({ length: 5 }, (_, columnIndex) =>+ getRecordCalendarWeekEventHorizontalPosition({+ columnCount: 5,+ columnIndex,+ }),+ ),+ ).toEqual([+ {+ hoverStackingOrder: 6,+ left: 'calc(0% + 4px)',+ stackingOrder: 1,+ width: 'calc(100% - 8px)',+ },+ {+ hoverStackingOrder: 6,+ left: 'calc(20% + 2.8px)',+ stackingOrder: 2,+ width: 'calc(80% - 6.8px)',+ },+ {+ hoverStackingOrder: 6,+ left: 'calc(40% + 1.6px)',+ stackingOrder: 3,+ width: 'calc(60% - 5.6px)',+ },+ {+ hoverStackingOrder: 6,+ left: 'calc(60% + 0.4px)',+ stackingOrder: 4,+ width: 'calc(40% - 4.4px)',+ },+ {+ hoverStackingOrder: 6,+ left: 'calc(80% - 0.8px)',+ stackingOrder: 5,+ width: 'calc(20% - 3.2px)',+ },+ ]);+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekSlotIndex.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekSlotIndex.test.tsnew file mode 100644index 00000000000..dbb0f5f7173--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekSlotIndex.test.ts@@ -0,0 +1,35 @@+import { RECORD_CALENDAR_WEEK_DIMENSIONS } from '@/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions';+import { getRecordCalendarWeekSlotIndex } from '@/object-record/record-calendar/week/utils/getRecordCalendarWeekSlotIndex';++const columnTop = 100;+const columnHeight = RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight;++describe('getRecordCalendarWeekSlotIndex', () => {+ it.each([+ [columnTop, 0],+ [columnTop + 23.9, 0],+ [columnTop + 24, 1],+ [columnTop + columnHeight - 0.1, 47],+ ])('maps pointer position %s to slot %s', (pointerY, expectedSlot) => {+ expect(+ getRecordCalendarWeekSlotIndex({+ columnHeight,+ columnTop,+ pointerY,+ }),+ ).toBe(expectedSlot);+ });++ it.each([columnTop - 0.1, columnTop + columnHeight])(+ 'returns null outside the day column at %s',+ (pointerY) => {+ expect(+ getRecordCalendarWeekSlotIndex({+ columnHeight,+ columnTop,+ pointerY,+ }),+ ).toBeNull();+ },+ );+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekTimedEventMetrics.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekTimedEventMetrics.test.tsnew file mode 100644index 00000000000..3fbd03de9c8--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/getRecordCalendarWeekTimedEventMetrics.test.ts@@ -0,0 +1,159 @@+import { RECORD_CALENDAR_WEEK_DIMENSIONS } from '@/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions';+import {+ getRecordCalendarWeekTimedEventHeight,+ getRecordCalendarWeekTimedEventMetrics,+} from '@/object-record/record-calendar/week/utils/getRecordCalendarWeekTimedEventMetrics';+import { Temporal } from 'temporal-polyfill';++const timeZone = 'Europe/Paris';+const day = Temporal.PlainDate.from('2026-07-06');++describe('getRecordCalendarWeekTimedEventMetrics', () => {+ it('uses the configured duration', () => {+ expect(+ getRecordCalendarWeekTimedEventMetrics({+ day,+ startDateTime: '2026-07-06T07:00:00Z',+ endDateTime: '2026-07-06T08:30:00Z',+ timeZone,+ }),+ ).toEqual({+ startInPixels: 9 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ endInPixels: 10.5 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ });+ });++ it('renders a one-hour event with the vertical inset from the design', () => {+ const metrics = getRecordCalendarWeekTimedEventMetrics({+ day,+ startDateTime: '2026-07-06T07:00:00Z',+ timeZone,+ });++ expect(getRecordCalendarWeekTimedEventHeight(metrics!)).toBe(40);+ });++ it.each([undefined, null, 'not-a-date', '2026-07-06T06:00:00Z'])(+ 'falls back to one hour for an unusable end value: %s',+ (endDateTime) => {+ expect(+ getRecordCalendarWeekTimedEventMetrics({+ day,+ startDateTime: '2026-07-06T07:00:00Z',+ endDateTime,+ timeZone,+ }),+ ).toEqual({+ startInPixels: 9 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ endInPixels: 10 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ });+ },+ );++ it('keeps short events large enough to interact with', () => {+ const metrics = getRecordCalendarWeekTimedEventMetrics({+ day,+ startDateTime: '2026-07-06T07:00:00Z',+ endDateTime: '2026-07-06T07:05:00Z',+ timeZone,+ });++ expect(metrics).toEqual({+ startInPixels: 9 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ endInPixels: 9.5 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ });+ expect(getRecordCalendarWeekTimedEventHeight(metrics!)).toBe(+ RECORD_CALENDAR_WEEK_DIMENSIONS.minimumEventSlotHeight,+ );+ });++ it('renders the start-day fragment of a multi-day event to midnight', () => {+ expect(+ getRecordCalendarWeekTimedEventMetrics({+ day: Temporal.PlainDate.from('2026-07-08'),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-10T18:59:00Z',+ timeZone,+ }),+ ).toEqual({+ startInPixels:+ (17 + 59 / 60) * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ endInPixels: RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight,+ });+ });++ it('renders a full-day middle fragment of a multi-day event', () => {+ expect(+ getRecordCalendarWeekTimedEventMetrics({+ day: Temporal.PlainDate.from('2026-07-09'),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-10T18:59:00Z',+ timeZone,+ }),+ ).toEqual({+ startInPixels: 0,+ endInPixels: RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight,+ });+ });++ it('renders the end-day fragment of a multi-day event to its end time', () => {+ expect(+ getRecordCalendarWeekTimedEventMetrics({+ day: Temporal.PlainDate.from('2026-07-10'),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-10T18:59:00Z',+ timeZone,+ }),+ ).toEqual({+ startInPixels: 0,+ endInPixels: (20 + 59 / 60) * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ });+ });++ it('does not render a multi-day event outside its range', () => {+ expect(+ getRecordCalendarWeekTimedEventMetrics({+ day: Temporal.PlainDate.from('2026-07-11'),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-10T18:59:00Z',+ timeZone,+ }),+ ).toBeNull();+ });++ it('clips the one-hour fallback at the grid boundary', () => {+ expect(+ getRecordCalendarWeekTimedEventMetrics({+ day,+ startDateTime: '2026-07-06T21:30:00Z',+ timeZone,+ }),+ ).toEqual({+ startInPixels: 23.5 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ endInPixels: RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight,+ });+ });++ it('positions instants using the configured timezone', () => {+ expect(+ getRecordCalendarWeekTimedEventMetrics({+ day,+ startDateTime: '2026-07-06T09:00:00Z',+ timeZone,+ }),+ ).toEqual({+ startInPixels: 11 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ endInPixels: 12 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight,+ });+ });++ it('returns null for an unusable start value', () => {+ expect(+ getRecordCalendarWeekTimedEventMetrics({+ day,+ startDateTime: 'not-a-date',+ timeZone,+ }),+ ).toBeNull();+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/resolveRecordCalendarWeekEventDrop.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/resolveRecordCalendarWeekEventDrop.test.tsnew file mode 100644index 00000000000..3ef5c5832d4--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/resolveRecordCalendarWeekEventDrop.test.ts@@ -0,0 +1,81 @@+import { RECORD_CALENDAR_WEEK_DIMENSIONS } from '@/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions';+import { resolveRecordCalendarWeekEventDrop } from '@/object-record/record-calendar/week/utils/resolveRecordCalendarWeekEventDrop';++const gridRect = {+ height: RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight,+ left: 100,+ top: 200,+ width: 756,+};++describe('resolveRecordCalendarWeekEventDrop', () => {+ it('resolves a day and snaps the event start to 30 minutes', () => {+ expect(+ resolveRecordCalendarWeekEventDrop({+ dayCount: 7,+ grabOffsetY: 10,+ gridRect,+ pointerX:+ gridRect.left ++ RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth ++ 2.5 * 100,+ pointerY:+ gridRect.top + 10 * RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight + 17,+ }),+ ).toEqual({+ dayIndex: 2,+ destinationMinutes: 10 * 60,+ });+ });++ it.each([+ ['time gutter', gridRect.left + 20, gridRect.top + 100],+ ['left of grid', gridRect.left - 1, gridRect.top + 100],+ ['right of grid', gridRect.left + gridRect.width, gridRect.top + 100],+ [+ 'above grid',+ gridRect.left + RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth + 10,+ gridRect.top - 1,+ ],+ [+ 'below grid',+ gridRect.left + RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth + 10,+ gridRect.top + gridRect.height,+ ],+ ])('rejects a drop in the %s', (_label, pointerX, pointerY) => {+ expect(+ resolveRecordCalendarWeekEventDrop({+ dayCount: 7,+ grabOffsetY: 0,+ gridRect,+ pointerX,+ pointerY,+ }),+ ).toBeNull();+ });++ it('clamps the first event start to midnight', () => {+ expect(+ resolveRecordCalendarWeekEventDrop({+ dayCount: 7,+ grabOffsetY: 20,+ gridRect,+ pointerX:+ gridRect.left + RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth + 10,+ pointerY: gridRect.top + 1,+ }),+ ).toMatchObject({ destinationMinutes: 0 });+ });++ it('clamps the last event start to 23:30', () => {+ expect(+ resolveRecordCalendarWeekEventDrop({+ dayCount: 7,+ grabOffsetY: 0,+ gridRect,+ pointerX: gridRect.left + gridRect.width - 1,+ pointerY: gridRect.top + gridRect.height - 1,+ }),+ ).toEqual({ dayIndex: 6, destinationMinutes: 23.5 * 60 });+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/updateRecordCalendarWeekActiveSlot.test.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/updateRecordCalendarWeekActiveSlot.test.tsnew file mode 100644index 00000000000..a87def5199c--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/__tests__/updateRecordCalendarWeekActiveSlot.test.ts@@ -0,0 +1,105 @@+import { updateRecordCalendarWeekActiveSlot } from '@/object-record/record-calendar/week/utils/updateRecordCalendarWeekActiveSlot';++describe('updateRecordCalendarWeekActiveSlot', () => {+ it('replaces the active slot when another day becomes active', () => {+ expect(+ updateRecordCalendarWeekActiveSlot({+ currentActiveSlot: {+ day: '2026-07-13',+ interactionMode: 'pointer',+ slotIndex: 18,+ },+ day: '2026-07-14',+ interactionMode: 'pointer',+ slotIndex: 20,+ }),+ ).toEqual({+ day: '2026-07-14',+ interactionMode: 'pointer',+ slotIndex: 20,+ });+ });++ it('clears the active day', () => {+ expect(+ updateRecordCalendarWeekActiveSlot({+ currentActiveSlot: {+ day: '2026-07-13',+ interactionMode: 'pointer',+ slotIndex: 18,+ },+ day: '2026-07-13',+ interactionMode: 'pointer',+ slotIndex: null,+ }),+ ).toBeNull();+ });++ it('does not clear another active day', () => {+ const currentActiveSlot = {+ day: '2026-07-14',+ interactionMode: 'pointer' as const,+ slotIndex: 20,+ };++ expect(+ updateRecordCalendarWeekActiveSlot({+ currentActiveSlot,+ day: '2026-07-13',+ interactionMode: 'pointer',+ slotIndex: null,+ }),+ ).toBe(currentActiveSlot);+ });++ it('preserves the active slot reference when the pointer stays in one slot', () => {+ const currentActiveSlot = {+ day: '2026-07-13',+ interactionMode: 'pointer' as const,+ slotIndex: 18,+ };++ expect(+ updateRecordCalendarWeekActiveSlot({+ currentActiveSlot,+ day: '2026-07-13',+ interactionMode: 'pointer',+ slotIndex: 18,+ }),+ ).toBe(currentActiveSlot);+ });++ it('keeps a keyboard slot active while the pointer moves', () => {+ const currentActiveSlot = {+ day: '2026-07-13',+ interactionMode: 'keyboard' as const,+ slotIndex: 18,+ };++ expect(+ updateRecordCalendarWeekActiveSlot({+ currentActiveSlot,+ day: '2026-07-14',+ interactionMode: 'pointer',+ slotIndex: 20,+ }),+ ).toBe(currentActiveSlot);+ });++ it('does not clear a keyboard slot on pointer leave', () => {+ const currentActiveSlot = {+ day: '2026-07-13',+ interactionMode: 'keyboard' as const,+ slotIndex: 18,+ };++ expect(+ updateRecordCalendarWeekActiveSlot({+ currentActiveSlot,+ day: '2026-07-13',+ interactionMode: 'pointer',+ slotIndex: null,+ }),+ ).toBe(currentActiveSlot);+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/computeRecordCalendarWeekEventLayouts.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/computeRecordCalendarWeekEventLayouts.tsnew file mode 100644index 00000000000..2c89a2a4166--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/computeRecordCalendarWeekEventLayouts.ts@@ -0,0 +1,81 @@+export type RecordCalendarWeekEventLayoutInput = {+ endInPixels: number;+ recordId: string;+ startInPixels: number;+};++export type RecordCalendarWeekEventLayout =+ RecordCalendarWeekEventLayoutInput & {+ columnCount: number;+ columnIndex: number;+ };++const layoutOverlappingEventGroup = (+ events: RecordCalendarWeekEventLayoutInput[],+): RecordCalendarWeekEventLayout[] => {+ const columnEndPositions: number[] = [];++ const layouts = events.map((event) => {+ const availableColumnIndex = columnEndPositions.findIndex(+ (endInPixels) => endInPixels <= event.startInPixels,+ );++ const columnIndex =+ availableColumnIndex === -1+ ? columnEndPositions.length+ : availableColumnIndex;++ columnEndPositions[columnIndex] = event.endInPixels;++ return {+ ...event,+ columnCount: 0,+ columnIndex,+ };+ });++ const columnCount = columnEndPositions.length;++ return layouts.map((layout) => ({+ ...layout,+ columnCount,+ }));+};++export const computeRecordCalendarWeekEventLayouts = (+ events: RecordCalendarWeekEventLayoutInput[],+): RecordCalendarWeekEventLayout[] => {+ const sortedEvents = [...events].sort(+ (eventA, eventB) =>+ eventA.startInPixels - eventB.startInPixels ||+ eventB.endInPixels - eventA.endInPixels ||+ eventA.recordId.localeCompare(eventB.recordId),+ );++ const overlappingEventGroups: RecordCalendarWeekEventLayoutInput[][] = [];+ let currentGroup: RecordCalendarWeekEventLayoutInput[] = [];+ let currentGroupEndInPixels = Number.NEGATIVE_INFINITY;++ for (const event of sortedEvents) {+ if (+ currentGroup.length > 0 &&+ event.startInPixels >= currentGroupEndInPixels+ ) {+ overlappingEventGroups.push(currentGroup);+ currentGroup = [];+ currentGroupEndInPixels = Number.NEGATIVE_INFINITY;+ }++ currentGroup.push(event);+ currentGroupEndInPixels = Math.max(+ currentGroupEndInPixels,+ event.endInPixels,+ );+ }++ if (currentGroup.length > 0) {+ overlappingEventGroups.push(currentGroup);+ }++ return overlappingEventGroups.flatMap(layoutOverlappingEventGroup);+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/formatRecordCalendarWeekEventTimes.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/formatRecordCalendarWeekEventTimes.tsnew file mode 100644index 00000000000..54d94bb91dd--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/formatRecordCalendarWeekEventTimes.ts@@ -0,0 +1,49 @@+import { getRecordCalendarDateTimeRange } from '@/object-record/record-calendar/utils/getRecordCalendarDateTimeRange';+import { formatInTimeZone } from 'date-fns-tz';++type FormatRecordCalendarWeekEventTimesArgs = {+ endDateTime?: unknown;+ startDateTime: unknown;+ timeFormat: string;+ timeZone: string;+};++export type RecordCalendarWeekEventTimes = {+ startTime: string;+ timeRange: string;+};++export const formatRecordCalendarWeekEventTimes = ({+ endDateTime,+ startDateTime,+ timeFormat,+ timeZone,+}: FormatRecordCalendarWeekEventTimesArgs): RecordCalendarWeekEventTimes | null => {+ const range = getRecordCalendarDateTimeRange({+ endDateTime,+ startDateTime,+ timeZone,+ });++ if (range === null) {+ return null;+ }++ const startTime = formatInTimeZone(+ range.start.epochMilliseconds,+ timeZone,+ timeFormat,+ );++ if (range.isEndDateTimeFallback) {+ return { startTime, timeRange: startTime };+ }++ const endTime = formatInTimeZone(+ range.end.epochMilliseconds,+ timeZone,+ timeFormat,+ );++ return { startTime, timeRange: `${startTime} - ${endTime}` };+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/formatRecordCalendarWeekRange.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/formatRecordCalendarWeekRange.tsnew file mode 100644index 00000000000..cbad8990dac--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/formatRecordCalendarWeekRange.ts@@ -0,0 +1,41 @@+import { format, type Locale } from 'date-fns';+import { type Temporal } from 'temporal-polyfill';+import { turnPlainDateToShiftedDateInSystemTimeZone } from 'twenty-shared/utils';++type FormatRecordCalendarWeekRangeArgs = {+ firstDayOfWeek: Temporal.PlainDate;+ lastDayOfWeek: Temporal.PlainDate;+ locale: Locale;+};++export const formatRecordCalendarWeekRange = ({+ firstDayOfWeek,+ lastDayOfWeek,+ locale,+}: FormatRecordCalendarWeekRangeArgs) => {+ const firstDay = turnPlainDateToShiftedDateInSystemTimeZone(firstDayOfWeek);+ const lastDay = turnPlainDateToShiftedDateInSystemTimeZone(lastDayOfWeek);+ const formatOptions = { locale };++ if (firstDayOfWeek.year !== lastDayOfWeek.year) {+ return `${format(firstDay, 'MMM d, yyyy', formatOptions)} – ${format(+ lastDay,+ 'MMM d, yyyy',+ formatOptions,+ )}`;+ }++ if (firstDayOfWeek.month !== lastDayOfWeek.month) {+ return `${format(firstDay, 'MMM d', formatOptions)} – ${format(+ lastDay,+ 'MMM d, yyyy',+ formatOptions,+ )}`;+ }++ return `${format(firstDay, 'MMM d', formatOptions)} – ${format(+ lastDay,+ 'd, yyyy',+ formatOptions,+ )}`;+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekEventDropDateTime.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekEventDropDateTime.tsnew file mode 100644index 00000000000..52c73a4ee28--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekEventDropDateTime.ts@@ -0,0 +1,48 @@+import { getShiftedRecordCalendarEndDateTime } from '@/object-record/record-drag/utils/getShiftedRecordCalendarEndDateTime';+import { Temporal } from 'temporal-polyfill';++type GetRecordCalendarWeekEventDropDateTimeArgs = {+ destinationDay: Temporal.PlainDate;+ destinationMinutes: number;+ endDateTime?: unknown;+ startDateTime?: unknown;+ timeZone: string;+};++export const getRecordCalendarWeekEventDropDateTime = ({+ destinationDay,+ destinationMinutes,+ endDateTime,+ startDateTime,+ timeZone,+}: GetRecordCalendarWeekEventDropDateTimeArgs) => {+ if (typeof startDateTime !== 'string') {+ return null;+ }++ try {+ const currentStartInstant = Temporal.Instant.from(startDateTime);+ const shiftedStartInstant = destinationDay+ .toZonedDateTime({+ timeZone,+ plainTime: Temporal.PlainTime.from('00:00').add({+ nanoseconds: Math.round(destinationMinutes * 60 * 1_000_000_000),+ }),+ })+ .toInstant();+ const shiftedEndDateTime = getShiftedRecordCalendarEndDateTime({+ endDateTime,+ originalStartInstant: currentStartInstant,+ shiftedStartInstant,+ });++ return {+ startDateTime: shiftedStartInstant.toString(),+ ...(shiftedEndDateTime !== undefined && {+ endDateTime: shiftedEndDateTime,+ }),+ };+ } catch {+ return null;+ }+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekEventHorizontalPosition.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekEventHorizontalPosition.tsnew file mode 100644index 00000000000..fc24cde2974--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekEventHorizontalPosition.ts@@ -0,0 +1,57 @@+const RECORD_CALENDAR_WEEK_EVENT_HORIZONTAL_INSET = 4;+const RECORD_CALENDAR_WEEK_EVENT_COLUMN_GAP = 2;+const RECORD_CALENDAR_WEEK_EVENT_POSITION_ROUNDING_FACTOR = 10_000;++type GetRecordCalendarWeekEventHorizontalPositionArgs = {+ columnCount: number;+ columnIndex: number;+};++export type RecordCalendarWeekEventHorizontalPosition = {+ hoverStackingOrder: number;+ left: string;+ stackingOrder: number;+ width: string;+};++const roundPositionValue = (value: number) =>+ Math.round(value * RECORD_CALENDAR_WEEK_EVENT_POSITION_ROUNDING_FACTOR) /+ RECORD_CALENDAR_WEEK_EVENT_POSITION_ROUNDING_FACTOR;++const formatPercentageWithPixelOffset = (+ percentage: number,+ pixelOffset: number,+) =>+ pixelOffset < 0+ ? `calc(${percentage}% - ${Math.abs(pixelOffset)}px)`+ : `calc(${percentage}% + ${pixelOffset}px)`;++export const getRecordCalendarWeekEventHorizontalPosition = ({+ columnCount,+ columnIndex,+}: GetRecordCalendarWeekEventHorizontalPositionArgs): RecordCalendarWeekEventHorizontalPosition => {+ const columnSpan = columnCount - columnIndex;+ const leftPercentage = roundPositionValue((columnIndex * 100) / columnCount);+ const leftPixelOffset = roundPositionValue(+ RECORD_CALENDAR_WEEK_EVENT_HORIZONTAL_INSET -+ ((RECORD_CALENDAR_WEEK_EVENT_HORIZONTAL_INSET * 2 -+ RECORD_CALENDAR_WEEK_EVENT_COLUMN_GAP) *+ columnIndex) /+ columnCount,+ );+ const widthPercentage = roundPositionValue((columnSpan * 100) / columnCount);+ const widthPixelReduction = roundPositionValue(+ RECORD_CALENDAR_WEEK_EVENT_COLUMN_GAP ++ ((RECORD_CALENDAR_WEEK_EVENT_HORIZONTAL_INSET * 2 -+ RECORD_CALENDAR_WEEK_EVENT_COLUMN_GAP) *+ columnSpan) /+ columnCount,+ );++ return {+ hoverStackingOrder: columnCount + 1,+ left: formatPercentageWithPixelOffset(leftPercentage, leftPixelOffset),+ stackingOrder: columnIndex + 1,+ width: `calc(${widthPercentage}% - ${widthPixelReduction}px)`,+ };+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekSlotIndex.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekSlotIndex.tsnew file mode 100644index 00000000000..d7ad4f3c15a--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekSlotIndex.ts@@ -0,0 +1,28 @@+import { RECORD_CALENDAR_WEEK_DIMENSIONS } from '@/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions';++type GetRecordCalendarWeekSlotIndexArgs = {+ columnHeight: number;+ columnTop: number;+ pointerY: number;+};++export const getRecordCalendarWeekSlotIndex = ({+ columnHeight,+ columnTop,+ pointerY,+}: GetRecordCalendarWeekSlotIndexArgs): number | null => {+ if (pointerY < columnTop || pointerY >= columnTop + columnHeight) {+ return null;+ }++ const slotCount =+ (RECORD_CALENDAR_WEEK_DIMENSIONS.hoursInDay * 60) /+ RECORD_CALENDAR_WEEK_DIMENSIONS.snapIntervalInMinutes;++ return Math.min(+ slotCount - 1,+ Math.floor(+ (pointerY - columnTop) / RECORD_CALENDAR_WEEK_DIMENSIONS.slotHeight,+ ),+ );+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekTimedEventMetrics.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekTimedEventMetrics.tsnew file mode 100644index 00000000000..a539b930dd4--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/getRecordCalendarWeekTimedEventMetrics.ts@@ -0,0 +1,83 @@+import { RECORD_CALENDAR_WEEK_DIMENSIONS } from '@/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions';+import { getRecordCalendarDateTimeRange } from '@/object-record/record-calendar/utils/getRecordCalendarDateTimeRange';+import { Temporal } from 'temporal-polyfill';++type GetRecordCalendarWeekTimedEventMetricsArgs = {+ day: Temporal.PlainDate;+ endDateTime?: unknown;+ startDateTime: unknown;+ timeZone: string;+};++export type RecordCalendarWeekTimedEventMetrics = {+ endInPixels: number;+ startInPixels: number;+};++export const getRecordCalendarWeekTimedEventHeight = ({+ endInPixels,+ startInPixels,+}: RecordCalendarWeekTimedEventMetrics) =>+ Math.max(+ RECORD_CALENDAR_WEEK_DIMENSIONS.minimumEventSlotHeight,+ endInPixels -+ startInPixels -+ RECORD_CALENDAR_WEEK_DIMENSIONS.eventVerticalGap,+ );++const getTimeOfDayInPixels = (dateTime: Temporal.ZonedDateTime) =>+ (dateTime.hour + dateTime.minute / 60 + dateTime.second / 3600) *+ RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight;++export const getRecordCalendarWeekTimedEventMetrics = ({+ day,+ endDateTime,+ startDateTime,+ timeZone,+}: GetRecordCalendarWeekTimedEventMetricsArgs): RecordCalendarWeekTimedEventMetrics | null => {+ const range = getRecordCalendarDateTimeRange({+ endDateTime,+ startDateTime,+ timeZone,+ });++ if (range === null) {+ return null;+ }++ const dayStart = day.toZonedDateTime({ timeZone });+ const nextDayStart = day.add({ days: 1 }).toZonedDateTime({ timeZone });++ if (+ Temporal.Instant.compare(+ range.start.toInstant(),+ nextDayStart.toInstant(),+ ) >= 0 ||+ Temporal.Instant.compare(range.end.toInstant(), dayStart.toInstant()) <= 0+ ) {+ return null;+ }++ const startInPixels =+ Temporal.Instant.compare(range.start.toInstant(), dayStart.toInstant()) <= 0+ ? 0+ : getTimeOfDayInPixels(range.start);+ let endInPixels =+ Temporal.Instant.compare(range.end.toInstant(), nextDayStart.toInstant()) >=+ 0+ ? RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight+ : getTimeOfDayInPixels(range.end);++ endInPixels = Math.min(+ RECORD_CALENDAR_WEEK_DIMENSIONS.gridHeight,+ Math.max(+ endInPixels,+ startInPixels + RECORD_CALENDAR_WEEK_DIMENSIONS.minimumEventSlotHeight,+ ),+ );++ return {+ endInPixels,+ startInPixels,+ };+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/resolveRecordCalendarWeekEventDrop.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/resolveRecordCalendarWeekEventDrop.tsnew file mode 100644index 00000000000..57668e88779--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/resolveRecordCalendarWeekEventDrop.ts@@ -0,0 +1,65 @@+import { RECORD_CALENDAR_WEEK_DIMENSIONS } from '@/object-record/record-calendar/week/constants/RecordCalendarWeekDimensions';++type CalendarGridRect = {+ height: number;+ left: number;+ top: number;+ width: number;+};++type ResolveRecordCalendarWeekEventDropArgs = {+ dayCount: number;+ grabOffsetY: number;+ gridRect: CalendarGridRect;+ pointerX: number;+ pointerY: number;+};++export type RecordCalendarWeekEventDrop = {+ dayIndex: number;+ destinationMinutes: number;+};++export const resolveRecordCalendarWeekEventDrop = ({+ dayCount,+ grabOffsetY,+ gridRect,+ pointerX,+ pointerY,+}: ResolveRecordCalendarWeekEventDropArgs): RecordCalendarWeekEventDrop | null => {+ const daysLeft =+ gridRect.left + RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth;+ const daysWidth =+ gridRect.width - RECORD_CALENDAR_WEEK_DIMENSIONS.timeGutterWidth;++ if (+ dayCount <= 0 ||+ pointerX < daysLeft ||+ pointerX >= daysLeft + daysWidth ||+ pointerY < gridRect.top ||+ pointerY >= gridRect.top + gridRect.height+ ) {+ return null;+ }++ const dayIndex = Math.floor((pointerX - daysLeft) / (daysWidth / dayCount));+ const eventTopInPixels =+ pointerY -+ gridRect.top -+ grabOffsetY -+ RECORD_CALENDAR_WEEK_DIMENSIONS.eventVerticalGap / 2;+ const unsnappedMinutes =+ (eventTopInPixels / RECORD_CALENDAR_WEEK_DIMENSIONS.hourHeight) * 60;+ const destinationMinutes = Math.min(+ 24 * 60 - RECORD_CALENDAR_WEEK_DIMENSIONS.snapIntervalInMinutes,+ Math.max(+ 0,+ Math.round(+ unsnappedMinutes /+ RECORD_CALENDAR_WEEK_DIMENSIONS.snapIntervalInMinutes,+ ) * RECORD_CALENDAR_WEEK_DIMENSIONS.snapIntervalInMinutes,+ ),+ );++ return { dayIndex, destinationMinutes };+};diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/updateRecordCalendarWeekActiveSlot.ts b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/updateRecordCalendarWeekActiveSlot.tsnew file mode 100644index 00000000000..0135e172d9a--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-calendar/week/utils/updateRecordCalendarWeekActiveSlot.ts@@ -0,0 +1,45 @@+export type RecordCalendarWeekActiveSlot = {+ day: string;+ interactionMode: RecordCalendarWeekSlotInteractionMode;+ slotIndex: number;+};++export type RecordCalendarWeekSlotInteractionMode = 'keyboard' | 'pointer';++type UpdateRecordCalendarWeekActiveSlotArgs = {+ currentActiveSlot: RecordCalendarWeekActiveSlot | null;+ day: string;+ interactionMode: RecordCalendarWeekSlotInteractionMode;+ slotIndex: number | null;+};++export const updateRecordCalendarWeekActiveSlot = ({+ currentActiveSlot,+ day,+ interactionMode,+ slotIndex,+}: UpdateRecordCalendarWeekActiveSlotArgs): RecordCalendarWeekActiveSlot | null => {+ if (slotIndex === null) {+ return currentActiveSlot?.day === day &&+ currentActiveSlot.interactionMode === interactionMode+ ? null+ : currentActiveSlot;+ }++ if (+ currentActiveSlot?.interactionMode === 'keyboard' &&+ interactionMode === 'pointer'+ ) {+ return currentActiveSlot;+ }++ if (+ currentActiveSlot?.day === day &&+ currentActiveSlot.interactionMode === interactionMode &&+ currentActiveSlot.slotIndex === slotIndex+ ) {+ return currentActiveSlot;+ }++ return { day, interactionMode, slotIndex };+};diff --git a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessCalendarCardDrop.ts b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessCalendarCardDrop.tsindex f8ed8101277..1cea7633791 100644--- a/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessCalendarCardDrop.ts+++ b/packages/twenty-front/src/modules/object-record/record-drag/hooks/useProcessCalendarCardDrop.ts@@ -5,12 +5,16 @@ import { useStore } from 'jotai';import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';import { useRecordCalendarContextOrThrow } from '@/object-record/record-calendar/contexts/RecordCalendarContext';import { calendarDayRecordIdsComponentFamilySelector } from '@/object-record/record-calendar/states/selectors/calendarDayRecordsComponentFamilySelector';+import { getRecordIdFromRecordCalendarCardDraggableId } from '@/object-record/record-calendar/record-calendar-card/utils/getRecordCalendarCardDraggableId';import { extractRecordPositions } from '@/object-record/record-drag/utils/extractRecordPositions';+import { getShiftedRecordCalendarDateTime } from '@/object-record/record-drag/utils/getShiftedRecordCalendarDateTime';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';import { computeNewPositionOfDraggedRecord } from '@/object-record/utils/computeNewPositionOfDraggedRecord';import { useUserTimezone } from '@/ui/input/components/internal/date/hooks/useUserTimezone';import { useAtomComponentFamilySelectorCallbackState } from '@/ui/utilities/state/jotai/hooks/useAtomComponentFamilySelectorCallbackState';+import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';import { useGetCurrentViewOnly } from '@/views/hooks/useGetCurrentViewOnly';import { Temporal } from 'temporal-polyfill';import { FieldMetadataType } from 'twenty-shared/types';@@ -21,6 +25,9 @@ export const useProcessCalendarCardDrop = () => {const { objectMetadataItem } = useRecordCalendarContextOrThrow();const { currentView } = useGetCurrentViewOnly();const { updateOneRecord } = useUpdateOneRecord();+ const recordIndexCalendarEndFieldMetadataId = useAtomStateValue(+ recordIndexCalendarEndFieldMetadataIdState,+ );const { userTimezone } = useUserTimezone();@@ -37,11 +44,15 @@ export const useProcessCalendarCardDrop = () => {)return;- const { draggableId: recordId } = calendarCardDropResult;+ const recordId = getRecordIdFromRecordCalendarCardDraggableId(+ calendarCardDropResult.draggableId,+ );const destinationDate = calendarCardDropResult.destination.droppableId;const destinationIndex = calendarCardDropResult.destination.index;+ const sourceDate = calendarCardDropResult.source.droppableId;const destinationPlainDate = Temporal.PlainDate.from(destinationDate);+ const sourcePlainDate = Temporal.PlainDate.from(sourceDate);const record = store.get(recordStoreFamilyState.atomFamily(recordId));@@ -50,16 +61,34 @@ export const useProcessCalendarCardDrop = () => {const calendarFieldMetadata = objectMetadataItem.fields.find((field) => field.id === currentView.calendarFieldMetadataId,);+ const calendarEndFieldMetadata = objectMetadataItem.fields.find(+ (field) => field.id === recordIndexCalendarEndFieldMetadataId,+ );if (!calendarFieldMetadata) return;- const destinationRecordIds = store.get(+ const destinationRecordIdsIncludingDraggedRecord = store.get(calendarDayRecordIdsSelector({day: destinationPlainDate,timeZone: userTimezone,}),);+ const isCrossDayDrop = sourceDate !== destinationDate;+ const draggedRecordIndexInDestination =+ destinationRecordIdsIncludingDraggedRecord.indexOf(recordId);+ const destinationRecordIds = isCrossDayDrop+ ? destinationRecordIdsIncludingDraggedRecord.filter(+ (destinationRecordId) => destinationRecordId !== recordId,+ )+ : destinationRecordIdsIncludingDraggedRecord;+ const adjustedDestinationIndex =+ isCrossDayDrop &&+ draggedRecordIndexInDestination !== -1 &&+ draggedRecordIndexInDestination < destinationIndex+ ? destinationIndex - 1+ : destinationIndex;+const targetDayIsEmpty = destinationRecordIds.length === 0;let newPosition: number;@@ -77,13 +106,13 @@ export const useProcessCalendarCardDrop = () => {const isDroppedAfterList =(recordsWithPosition.length === 2 &&- destinationIndex === 1 &&+ adjustedDestinationIndex === 1 &&!droppedRecordIsFromAnotherList) ||- destinationIndex === recordsWithPosition.length;+ adjustedDestinationIndex === recordsWithPosition.length;const targetRecord = isDroppedAfterList? recordsWithPosition.at(-1)- : recordsWithPosition.at(destinationIndex);+ : recordsWithPosition.at(adjustedDestinationIndex);if (!isDefined(targetRecord)) {throw new Error(@@ -104,32 +133,89 @@ export const useProcessCalendarCardDrop = () => {| undefined;if (calendarFieldMetadata.type === FieldMetadataType.DATE) {+ let shiftedStartDate = destinationPlainDate.toString();+ let shiftedEndDate: string | undefined;++ if (isDefined(currentFieldValue)) {+ try {+ const currentStartDate = Temporal.PlainDate.from(currentFieldValue);+ const dayOffset = sourcePlainDate.until(destinationPlainDate).days;++ shiftedStartDate = currentStartDate+ .add({ days: dayOffset })+ .toString();++ if (calendarEndFieldMetadata?.type === FieldMetadataType.DATE) {+ const currentEndFieldValue = record[+ calendarEndFieldMetadata.name+ ] as string | undefined;++ if (isDefined(currentEndFieldValue)) {+ const currentEndDate =+ Temporal.PlainDate.from(currentEndFieldValue);++ if (+ Temporal.PlainDate.compare(+ currentEndDate,+ currentStartDate,+ ) >= 0+ ) {+ shiftedEndDate = currentEndDate+ .add({ days: dayOffset })+ .toString();+ }+ }+ }+ } catch {+ shiftedStartDate = destinationPlainDate.toString();+ shiftedEndDate = undefined;+ }+ }+await updateOneRecord({objectNameSingular: objectMetadataItem.nameSingular,idToUpdate: recordId,updateOneRecordInput: {- [calendarFieldMetadata.name]: destinationPlainDate.toString(),+ [calendarFieldMetadata.name]: shiftedStartDate,+ ...(isDefined(calendarEndFieldMetadata) &&+ isDefined(shiftedEndDate) && {+ [calendarEndFieldMetadata.name]: shiftedEndDate,+ }),position: newPosition,},});} else if (calendarFieldMetadata.type === FieldMetadataType.DATE_TIME) {- const newDate = isDefined(currentFieldValue)- ? Temporal.Instant.from(currentFieldValue)- .toZonedDateTimeISO(userTimezone)- .with({- day: destinationPlainDate.day,- month: destinationPlainDate.month,- year: destinationPlainDate.year,- })- : Temporal.PlainDate.from(destinationPlainDate).toZonedDateTime(- userTimezone,- );+ let shiftedDateTime = null;++ if (isDefined(currentFieldValue)) {+ shiftedDateTime = getShiftedRecordCalendarDateTime({+ sourceDay: sourcePlainDate,+ destinationDay: destinationPlainDate,+ startDateTime: currentFieldValue,+ endDateTime:+ calendarEndFieldMetadata?.type === FieldMetadataType.DATE_TIME+ ? record[calendarEndFieldMetadata.name]+ : undefined,+ timeZone: userTimezone,+ });+ }++ const shiftedStartDateTime =+ shiftedDateTime?.startDateTime ??+ destinationPlainDate+ .toZonedDateTime({ timeZone: userTimezone })+ .toInstant()+ .toString();await updateOneRecord({objectNameSingular: objectMetadataItem.nameSingular,idToUpdate: recordId,updateOneRecordInput: {- [calendarFieldMetadata.name]: newDate.toInstant().toString(),+ [calendarFieldMetadata.name]: shiftedStartDateTime,+ ...(isDefined(calendarEndFieldMetadata) &&+ isDefined(shiftedDateTime?.endDateTime) && {+ [calendarEndFieldMetadata.name]: shiftedDateTime.endDateTime,+ }),position: newPosition,},});@@ -143,6 +229,7 @@ export const useProcessCalendarCardDrop = () => {calendarDayRecordIdsSelector,userTimezone,updateOneRecord,+ recordIndexCalendarEndFieldMetadataId,],);diff --git a/packages/twenty-front/src/modules/object-record/record-drag/utils/__tests__/getShiftedRecordCalendarDateTime.test.ts b/packages/twenty-front/src/modules/object-record/record-drag/utils/__tests__/getShiftedRecordCalendarDateTime.test.tsnew file mode 100644index 00000000000..5304c2647af--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-drag/utils/__tests__/getShiftedRecordCalendarDateTime.test.ts@@ -0,0 +1,121 @@+import { getShiftedRecordCalendarDateTime } from '@/object-record/record-drag/utils/getShiftedRecordCalendarDateTime';+import { Temporal } from 'temporal-polyfill';++const timeZone = 'Europe/Paris';++describe('getShiftedRecordCalendarDateTime', () => {+ it('moves a timed event by the rendered day offset and preserves duration', () => {+ expect(+ getShiftedRecordCalendarDateTime({+ sourceDay: Temporal.PlainDate.from('2026-07-08'),+ destinationDay: Temporal.PlainDate.from('2026-07-11'),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-10T18:59:00Z',+ timeZone,+ }),+ ).toEqual({+ startDateTime: '2026-07-11T15:59:00Z',+ endDateTime: '2026-07-13T18:59:00Z',+ });+ });++ it('moves a continuation fragment by its visual anchor', () => {+ expect(+ getShiftedRecordCalendarDateTime({+ sourceDay: Temporal.PlainDate.from('2026-07-10'),+ destinationDay: Temporal.PlainDate.from('2026-07-11'),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-10T18:59:00Z',+ timeZone,+ }),+ ).toEqual({+ startDateTime: '2026-07-09T15:59:00Z',+ endDateTime: '2026-07-11T18:59:00Z',+ });+ });++ it('lands on the requested local time and preserves duration across DST', () => {+ expect(+ getShiftedRecordCalendarDateTime({+ sourceDay: Temporal.PlainDate.from('2026-03-28'),+ destinationDay: Temporal.PlainDate.from('2026-03-29'),+ startDateTime: '2026-03-28T09:00:00Z',+ endDateTime: '2026-03-28T11:00:00Z',+ timeZone,+ }),+ ).toEqual({+ startDateTime: '2026-03-29T08:00:00Z',+ endDateTime: '2026-03-29T10:00:00Z',+ });+ });++ it('preserves the later offset when the source start is a repeated DST time', () => {+ expect(+ getShiftedRecordCalendarDateTime({+ sourceDay: Temporal.PlainDate.from('2026-10-25'),+ destinationDay: Temporal.PlainDate.from('2026-10-26'),+ startDateTime: '2026-10-25T01:30:00Z',+ endDateTime: '2026-10-25T02:30:00Z',+ timeZone,+ }),+ ).toEqual({+ startDateTime: '2026-10-26T01:30:00Z',+ endDateTime: '2026-10-26T02:30:00Z',+ });+ });++ it('keeps the local start time when a continuation moves across DST', () => {+ expect(+ getShiftedRecordCalendarDateTime({+ sourceDay: Temporal.PlainDate.from('2026-03-29'),+ destinationDay: Temporal.PlainDate.from('2026-03-30'),+ startDateTime: '2026-03-28T09:00:00Z',+ endDateTime: '2026-03-30T10:00:00Z',+ timeZone,+ }),+ ).toEqual({+ startDateTime: '2026-03-29T08:00:00Z',+ endDateTime: '2026-03-31T09:00:00Z',+ });+ });++ it('does not synthesize an end when it is unusable', () => {+ expect(+ getShiftedRecordCalendarDateTime({+ sourceDay: Temporal.PlainDate.from('2026-07-08'),+ destinationDay: Temporal.PlainDate.from('2026-07-09'),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: 'not-a-date',+ timeZone,+ }),+ ).toEqual({+ startDateTime: '2026-07-09T15:59:00Z',+ });+ });++ it('shifts an end that is equal to the start', () => {+ expect(+ getShiftedRecordCalendarDateTime({+ sourceDay: Temporal.PlainDate.from('2026-07-08'),+ destinationDay: Temporal.PlainDate.from('2026-07-09'),+ startDateTime: '2026-07-08T15:59:00Z',+ endDateTime: '2026-07-08T15:59:00Z',+ timeZone,+ }),+ ).toEqual({+ startDateTime: '2026-07-09T15:59:00Z',+ endDateTime: '2026-07-09T15:59:00Z',+ });+ });++ it('returns null for an unusable start', () => {+ expect(+ getShiftedRecordCalendarDateTime({+ sourceDay: Temporal.PlainDate.from('2026-07-08'),+ destinationDay: Temporal.PlainDate.from('2026-07-09'),+ startDateTime: 'not-a-date',+ timeZone,+ }),+ ).toBeNull();+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-drag/utils/__tests__/getShiftedRecordCalendarEndDateTime.test.ts b/packages/twenty-front/src/modules/object-record/record-drag/utils/__tests__/getShiftedRecordCalendarEndDateTime.test.tsnew file mode 100644index 00000000000..f35d251ffcc--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-drag/utils/__tests__/getShiftedRecordCalendarEndDateTime.test.ts@@ -0,0 +1,43 @@+import { getShiftedRecordCalendarEndDateTime } from '@/object-record/record-drag/utils/getShiftedRecordCalendarEndDateTime';+import { Temporal } from 'temporal-polyfill';++const originalStartInstant = Temporal.Instant.from('2026-07-07T07:00:00Z');+const shiftedStartInstant = Temporal.Instant.from('2026-07-10T08:00:00Z');++describe('getShiftedRecordCalendarEndDateTime', () => {+ it('preserves the original elapsed duration from the shifted start', () => {+ expect(+ getShiftedRecordCalendarEndDateTime({+ endDateTime: '2026-07-09T10:00:00Z',+ originalStartInstant,+ shiftedStartInstant,+ }),+ ).toBe('2026-07-12T11:00:00Z');+ });++ it('preserves a zero-duration end', () => {+ expect(+ getShiftedRecordCalendarEndDateTime({+ endDateTime: originalStartInstant.toString(),+ originalStartInstant,+ shiftedStartInstant,+ }),+ ).toBe(shiftedStartInstant.toString());+ });++ it.each([+ ['missing', undefined],+ ['null', null],+ ['non-string', 42],+ ['malformed', 'not-a-date'],+ ['before the start', '2026-07-07T06:59:00Z'],+ ])('returns undefined when the end is %s', (_label, endDateTime) => {+ expect(+ getShiftedRecordCalendarEndDateTime({+ endDateTime,+ originalStartInstant,+ shiftedStartInstant,+ }),+ ).toBeUndefined();+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-drag/utils/getShiftedRecordCalendarDateTime.ts b/packages/twenty-front/src/modules/object-record/record-drag/utils/getShiftedRecordCalendarDateTime.tsnew file mode 100644index 00000000000..1449ad4cad3--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-drag/utils/getShiftedRecordCalendarDateTime.ts@@ -0,0 +1,51 @@+import { getShiftedRecordCalendarEndDateTime } from '@/object-record/record-drag/utils/getShiftedRecordCalendarEndDateTime';+import { Temporal } from 'temporal-polyfill';++type GetShiftedRecordCalendarDateTimeArgs = {+ destinationDay: Temporal.PlainDate;+ endDateTime?: unknown;+ sourceDay: Temporal.PlainDate;+ startDateTime?: unknown;+ timeZone: string;+};++export type ShiftedRecordCalendarDateTime = {+ endDateTime?: string;+ startDateTime: string;+};++export const getShiftedRecordCalendarDateTime = ({+ destinationDay,+ endDateTime,+ sourceDay,+ startDateTime,+ timeZone,+}: GetShiftedRecordCalendarDateTimeArgs): ShiftedRecordCalendarDateTime | null => {+ if (typeof startDateTime !== 'string') {+ return null;+ }++ try {+ const currentStartInstant = Temporal.Instant.from(startDateTime);+ const dayOffset = sourceDay.until(destinationDay).days;+ const shiftedStartInstant = currentStartInstant+ .toZonedDateTimeISO(timeZone)+ .add({ days: dayOffset })+ .toInstant();++ const shiftedEndDateTime = getShiftedRecordCalendarEndDateTime({+ endDateTime,+ originalStartInstant: currentStartInstant,+ shiftedStartInstant,+ });++ return {+ startDateTime: shiftedStartInstant.toString(),+ ...(shiftedEndDateTime !== undefined && {+ endDateTime: shiftedEndDateTime,+ }),+ };+ } catch {+ return null;+ }+};diff --git a/packages/twenty-front/src/modules/object-record/record-drag/utils/getShiftedRecordCalendarEndDateTime.ts b/packages/twenty-front/src/modules/object-record/record-drag/utils/getShiftedRecordCalendarEndDateTime.tsnew file mode 100644index 00000000000..18ce1f51fd5--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-drag/utils/getShiftedRecordCalendarEndDateTime.ts@@ -0,0 +1,35 @@+import { Temporal } from 'temporal-polyfill';++type GetShiftedRecordCalendarEndDateTimeArgs = {+ endDateTime?: unknown;+ originalStartInstant: Temporal.Instant;+ shiftedStartInstant: Temporal.Instant;+};++export const getShiftedRecordCalendarEndDateTime = ({+ endDateTime,+ originalStartInstant,+ shiftedStartInstant,+}: GetShiftedRecordCalendarEndDateTimeArgs): string | undefined => {+ if (typeof endDateTime !== 'string') {+ return undefined;+ }++ try {+ const originalEndInstant = Temporal.Instant.from(endDateTime);++ if (+ Temporal.Instant.compare(originalEndInstant, originalStartInstant) < 0+ ) {+ return undefined;+ }++ return Temporal.Instant.fromEpochNanoseconds(+ shiftedStartInstant.epochNanoseconds ++ (originalEndInstant.epochNanoseconds -+ originalStartInstant.epochNanoseconds),+ ).toString();+ } catch {+ return undefined;+ }+};diff --git a/packages/twenty-front/src/modules/object-record/record-field/hooks/useRelevantRecordsGqlFields.ts b/packages/twenty-front/src/modules/object-record/record-field/hooks/useRelevantRecordsGqlFields.tsindex 9ef5975a6fe..ceef5d3f3c5 100644--- a/packages/twenty-front/src/modules/object-record/record-field/hooks/useRelevantRecordsGqlFields.ts+++ b/packages/twenty-front/src/modules/object-record/record-field/hooks/useRelevantRecordsGqlFields.ts@@ -17,12 +17,12 @@ import { filterDuplicatesById, isDefined } from 'twenty-shared/utils';type UseRecordsUsefulGqlFields = {objectMetadataItem: EnrichedObjectMetadataItem;- additionalFieldMetadataId?: string | null;+ additionalFieldMetadataIds?: Array<string | null | undefined>;};export const useRelevantRecordsGqlFields = ({objectMetadataItem,- additionalFieldMetadataId,+ additionalFieldMetadataIds = [],}: UseRecordsUsefulGqlFields) => {const visibleRecordFields = useAtomComponentSelectorValue(visibleRecordFieldsComponentSelector,@@ -52,16 +52,18 @@ export const useRelevantRecordsGqlFields = ({).filter(isDefined);- const additionalFieldMetadataItem = isDefined(additionalFieldMetadataId)- ? fieldMetadataItemByFieldMetadataItemId[additionalFieldMetadataId]- : undefined;+ const additionalFieldMetadataItems = additionalFieldMetadataIds+ .filter(isDefined)+ .map(+ (fieldMetadataId) =>+ fieldMetadataItemByFieldMetadataItemId[fieldMetadataId],+ )+ .filter(isDefined);const fieldMetadataItemsToUse = [...visibleRecordFieldMetadataItems,...(recordFilterFields ?? []),- ...(isDefined(additionalFieldMetadataItem)- ? [additionalFieldMetadataItem]- : []),+ ...additionalFieldMetadataItems,].filter(filterDuplicatesById);const allDepthOneGqlFields = generateDepthRecordGqlFieldsFromFields({diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexLoadBaseOnContextStoreEffect.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexLoadBaseOnContextStoreEffect.tsxindex 114866f79a6..e00623fba27 100644--- a/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexLoadBaseOnContextStoreEffect.tsx+++ b/packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexLoadBaseOnContextStoreEffect.tsx@@ -4,19 +4,26 @@ import { useLoadRecordIndexStates } from '@/object-record/record-index/hooks/useimport { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue';import { useAtomFamilySelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue';import { viewFromViewIdFamilySelector } from '@/views/states/selectors/viewFromViewIdFamilySelector';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { useEffect, useState } from 'react';import { isDefined } from 'twenty-shared/utils';+import { FeatureFlagKey } from '~/generated-metadata/graphql';export const RecordIndexLoadBaseOnContextStoreEffect = () => {const { loadRecordIndexStates } = useLoadRecordIndexStates();const contextStoreCurrentViewId = useAtomComponentStateValue(contextStoreCurrentViewIdComponentState,);-- const [loadedViewId, setLoadedViewId] = useState<string | undefined>(- undefined,+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,);+ const currentViewLoadKey = isDefined(contextStoreCurrentViewId)+ ? `${contextStoreCurrentViewId}-${isCalendarWeekViewEnabled}`+ : undefined;++ const [loadedViewKey, setLoadedViewKey] = useState<string | undefined>();+const view = useAtomFamilySelectorValue(viewFromViewIdFamilySelector, {viewId: contextStoreCurrentViewId ?? '',});@@ -24,10 +31,7 @@ export const RecordIndexLoadBaseOnContextStoreEffect = () => {const { objectMetadataItem } = useContextStoreObjectMetadataItemOrThrow();useEffect(() => {- if (- isDefined(contextStoreCurrentViewId) &&- loadedViewId === contextStoreCurrentViewId- ) {+ if (isDefined(currentViewLoadKey) && loadedViewKey === currentViewLoadKey) {return;}@@ -37,12 +41,12 @@ export const RecordIndexLoadBaseOnContextStoreEffect = () => {if (isDefined(view)) {loadRecordIndexStates(view, objectMetadataItem);- setLoadedViewId(contextStoreCurrentViewId);+ setLoadedViewKey(currentViewLoadKey);}}, [- contextStoreCurrentViewId,+ currentViewLoadKey,loadRecordIndexStates,- loadedViewId,+ loadedViewKey,objectMetadataItem,view,]);diff --git a/packages/twenty-front/src/modules/object-record/record-index/components/__tests__/RecordIndexLoadBaseOnContextStoreEffect.test.tsx b/packages/twenty-front/src/modules/object-record/record-index/components/__tests__/RecordIndexLoadBaseOnContextStoreEffect.test.tsxnew file mode 100644index 00000000000..a9f23e882d6--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-index/components/__tests__/RecordIndexLoadBaseOnContextStoreEffect.test.tsx@@ -0,0 +1,87 @@+import { render } from '@testing-library/react';++import { RecordIndexLoadBaseOnContextStoreEffect } from '@/object-record/record-index/components/RecordIndexLoadBaseOnContextStoreEffect';+import { FeatureFlagKey } from '~/generated-metadata/graphql';++jest.mock(+ '@/object-record/record-index/hooks/useLoadRecordIndexStates',+ () => ({+ useLoadRecordIndexStates: jest.fn(),+ }),+);+jest.mock(+ '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue',+ () => ({+ useAtomComponentStateValue: jest.fn(),+ }),+);+jest.mock(+ '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue',+ () => ({+ useAtomFamilySelectorValue: jest.fn(),+ }),+);+jest.mock(+ '@/context-store/hooks/useContextStoreObjectMetadataItemOrThrow',+ () => ({+ useContextStoreObjectMetadataItemOrThrow: jest.fn(),+ }),+);+jest.mock('@/workspace/hooks/useIsFeatureEnabled', () => ({+ useIsFeatureEnabled: jest.fn(),+}));++const useLoadRecordIndexStatesMock = jest.requireMock(+ '@/object-record/record-index/hooks/useLoadRecordIndexStates',+).useLoadRecordIndexStates;+const useAtomComponentStateValueMock = jest.requireMock(+ '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue',+).useAtomComponentStateValue;+const useAtomFamilySelectorValueMock = jest.requireMock(+ '@/ui/utilities/state/jotai/hooks/useAtomFamilySelectorValue',+).useAtomFamilySelectorValue;+const useContextStoreObjectMetadataItemOrThrowMock = jest.requireMock(+ '@/context-store/hooks/useContextStoreObjectMetadataItemOrThrow',+).useContextStoreObjectMetadataItemOrThrow;+const useIsFeatureEnabledMock = jest.requireMock(+ '@/workspace/hooks/useIsFeatureEnabled',+).useIsFeatureEnabled;++describe('RecordIndexLoadBaseOnContextStoreEffect', () => {+ const loadRecordIndexStates = jest.fn();+ const view = { id: 'view-id' };+ const objectMetadataItem = { id: 'object-metadata-id' };++ beforeEach(() => {+ jest.clearAllMocks();+ useLoadRecordIndexStatesMock.mockReturnValue({ loadRecordIndexStates });+ useAtomComponentStateValueMock.mockReturnValue('view-id');+ useAtomFamilySelectorValueMock.mockReturnValue(view);+ useContextStoreObjectMetadataItemOrThrowMock.mockReturnValue({+ objectMetadataItem,+ });+ useIsFeatureEnabledMock.mockReturnValue(false);+ });++ it('reloads the persisted view state when the week-view flag changes', () => {+ const { rerender } = render(<RecordIndexLoadBaseOnContextStoreEffect />);++ expect(loadRecordIndexStates).toHaveBeenCalledTimes(1);+ expect(loadRecordIndexStates).toHaveBeenLastCalledWith(+ view,+ objectMetadataItem,+ );++ rerender(<RecordIndexLoadBaseOnContextStoreEffect />);++ expect(loadRecordIndexStates).toHaveBeenCalledTimes(1);++ useIsFeatureEnabledMock.mockReturnValue(true);+ rerender(<RecordIndexLoadBaseOnContextStoreEffect />);++ expect(loadRecordIndexStates).toHaveBeenCalledTimes(2);+ expect(useIsFeatureEnabledMock).toHaveBeenCalledWith(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );+ });+});diff --git a/packages/twenty-front/src/modules/object-record/record-index/hooks/useLoadRecordIndexStates.ts b/packages/twenty-front/src/modules/object-record/record-index/hooks/useLoadRecordIndexStates.tsindex 2932203c1c4..f2a2563a4a3 100644--- a/packages/twenty-front/src/modules/object-record/record-index/hooks/useLoadRecordIndexStates.ts+++ b/packages/twenty-front/src/modules/object-record/record-index/hooks/useLoadRecordIndexStates.ts@@ -11,10 +11,14 @@ import { type FieldMetadata } from '@/object-record/record-field/ui/types/FieldMimport { currentRecordFilterGroupsComponentState } from '@/object-record/record-filter-group/states/currentRecordFilterGroupsComponentState';import { currentRecordFiltersComponentState } from '@/object-record/record-filter/states/currentRecordFiltersComponentState';import { useSetRecordGroups } from '@/object-record/record-group/hooks/useSetRecordGroups';+import { getSupportedRecordCalendarLayout } from '@/object-record/record-calendar/utils/getSupportedRecordCalendarLayout';+import { getEffectiveRecordCalendarEndFieldMetadataId } from '@/object-record/record-calendar/utils/getEffectiveRecordCalendarEndFieldMetadataId';+import { recordIndexCalendarEndFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState';import { recordIndexGroupFieldMetadataItemComponentState } from '@/object-record/record-index/states/recordIndexGroupFieldMetadataComponentState';import { currentRecordSortsComponentState } from '@/object-record/record-sort/states/currentRecordSortsComponentState';import { recordIndexCalendarFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexCalendarFieldMetadataIdState';+import { recordIndexCalendarLayoutState } from '@/object-record/record-index/states/recordIndexCalendarLayoutState';import { RECORD_BOARD_COLUMN_WIDTH } from '@/object-record/record-board/constants/RecordBoardColumnWidth';import { clampRecordBoardColumnWidth } from '@/object-record/record-board/utils/clampRecordBoardColumnWidth';import { recordIndexFieldDefinitionsState } from '@/object-record/record-index/states/recordIndexFieldDefinitionsState';@@ -38,13 +42,18 @@ import { mapViewFieldToRecordField } from '@/views/utils/mapViewFieldToRecordFieimport { mapViewFieldsToColumnDefinitions } from '@/views/utils/mapViewFieldsToColumnDefinitions';import { mapViewFilterGroupsToRecordFilterGroups } from '@/views/utils/mapViewFilterGroupsToRecordFilterGroups';import { mapViewFiltersToFilters } from '@/views/utils/mapViewFiltersToFilters';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { atom, useStore } from 'jotai';import { useCallback } from 'react';import { isDefined } from 'twenty-shared/utils';+import { FeatureFlagKey } from '~/generated-metadata/graphql';import { isDeeplyEqual } from '~/utils/isDeeplyEqual';export const useLoadRecordIndexStates = () => {const store = useStore();+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );const contextStoreTargetedRecordsRuleAtom =useAtomComponentStateCallbackState(@@ -323,6 +332,20 @@ export const useLoadRecordIndexStates = () => {recordIndexCalendarFieldMetadataIdState.atom,view.calendarFieldMetadataId ?? null,);+ batchSet(+ recordIndexCalendarEndFieldMetadataIdState.atom,+ getEffectiveRecordCalendarEndFieldMetadataId({+ calendarEndFieldMetadataId: view.calendarEndFieldMetadataId,+ isCalendarWeekViewEnabled,+ }),+ );+ batchSet(+ recordIndexCalendarLayoutState.atom,+ getSupportedRecordCalendarLayout({+ calendarLayout: view.calendarLayout,+ isCalendarWeekViewEnabled,+ }),+ );}batchSet(@@ -379,6 +402,7 @@ export const useLoadRecordIndexStates = () => {getFieldMetadataItemByIdOrThrow,setRecordGroupsFromViewGroups,syncRecordIndexViewFields,+ isCalendarWeekViewEnabled,],);diff --git a/packages/twenty-front/src/modules/object-record/record-index/hooks/useRecordIndexGroupCommonQueryVariables.ts b/packages/twenty-front/src/modules/object-record/record-index/hooks/useRecordIndexGroupCommonQueryVariables.tsindex 1abeb36e453..2502ae769f7 100644--- a/packages/twenty-front/src/modules/object-record/record-index/hooks/useRecordIndexGroupCommonQueryVariables.ts+++ b/packages/twenty-front/src/modules/object-record/record-index/hooks/useRecordIndexGroupCommonQueryVariables.ts@@ -71,7 +71,7 @@ export const useRecordIndexGroupCommonQueryVariables = () => {const recordGqlFields = useRelevantRecordsGqlFields({objectMetadataItem,- additionalFieldMetadataId: recordIndexGroupFieldMetadataItem?.id,+ additionalFieldMetadataIds: [recordIndexGroupFieldMetadataItem?.id],});const recordGroupDefinitions = useAtomComponentSelectorValue(diff --git a/packages/twenty-front/src/modules/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState.ts b/packages/twenty-front/src/modules/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState.tsnew file mode 100644index 00000000000..b0f1c1cf4c0--- /dev/null+++ b/packages/twenty-front/src/modules/object-record/record-index/states/recordIndexCalendarEndFieldMetadataIdState.ts@@ -0,0 +1,8 @@+import { createAtomState } from '@/ui/utilities/state/jotai/utils/createAtomState';++export const recordIndexCalendarEndFieldMetadataIdState = createAtomState<+ string | null+>({+ key: 'recordIndexCalendarEndFieldMetadataIdState',+ defaultValue: null,+});diff --git a/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsx b/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsxindex 70a526de3c4..709ed44531e 100644--- a/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsx+++ b/packages/twenty-front/src/modules/settings/lab/components/SettingsLabContent.tsx@@ -6,6 +6,7 @@ import { styled } from '@linaria/react';import { isNonEmptyString } from '@sniptt/guards';import { useState } from 'react';import {+ IconCalendarWeek,IconRelationManyToMany,IconSparkles,type IconComponent,@@ -29,6 +30,7 @@ const StyledImage = styled.img``;const labFeatureFlagIcons: Partial<Record<FeatureFlagKey, IconComponent>> = {+ [FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED]: IconCalendarWeek,[FeatureFlagKey.IS_JUNCTION_RELATIONS_ENABLED]: IconRelationManyToMany,[FeatureFlagKey.IS_SETTINGS_DISCOVERY_HERO_ENABLED]: IconSparkles,};diff --git a/packages/twenty-front/src/modules/views/graphql/fragments/viewFragment.ts b/packages/twenty-front/src/modules/views/graphql/fragments/viewFragment.tsindex 054df7ffc5a..889e42d672f 100644--- a/packages/twenty-front/src/modules/views/graphql/fragments/viewFragment.ts+++ b/packages/twenty-front/src/modules/views/graphql/fragments/viewFragment.ts@@ -31,6 +31,7 @@ export const VIEW_FRAGMENT = gql`kanbanColumnWidthanyFieldFilterValuecalendarFieldMetadataId+ calendarEndFieldMetadataIdcalendarLayoutvisibilitycreatedByUserWorkspaceIddiff --git a/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts b/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.tsindex 0f8329ead58..ab56f8ab16d 100644--- a/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts+++ b/packages/twenty-front/src/modules/views/hooks/useCreateViewFromCurrentView.ts@@ -74,6 +74,7 @@ export const useCreateViewFromCurrentView = (viewBarComponentId?: string) => {icon,mainGroupByFieldMetadataId,calendarFieldMetadataId,+ calendarEndFieldMetadataId,type,visibility,}: Partial<@@ -84,6 +85,7 @@ export const useCreateViewFromCurrentView = (viewBarComponentId?: string) => {| 'icon'| 'mainGroupByFieldMetadataId'| 'calendarFieldMetadataId'+ | 'calendarEndFieldMetadataId'| 'type'| 'visibility'>@@ -140,6 +142,10 @@ export const useCreateViewFromCurrentView = (viewBarComponentId?: string) => {viewType === ViewType.CALENDAR? calendarFieldMetadataId: undefined,+ calendarEndFieldMetadataId:+ viewType === ViewType.CALENDAR+ ? calendarEndFieldMetadataId+ : undefined,visibility,},},diff --git a/packages/twenty-front/src/modules/views/types/GraphQLView.ts b/packages/twenty-front/src/modules/views/types/GraphQLView.tsindex 680bae5d256..f202b04ac85 100644--- a/packages/twenty-front/src/modules/views/types/GraphQLView.ts+++ b/packages/twenty-front/src/modules/views/types/GraphQLView.ts@@ -35,6 +35,7 @@ export type GraphQLView = {anyFieldFilterValue?: string | null;calendarLayout?: ViewCalendarLayout | null;calendarFieldMetadataId?: string | null;+ calendarEndFieldMetadataId?: string | null;visibility: ViewVisibility;createdByUserWorkspaceId?: string | null;};diff --git a/packages/twenty-front/src/modules/views/types/View.ts b/packages/twenty-front/src/modules/views/types/View.tsindex 44921b2f762..873ee25f6a0 100644--- a/packages/twenty-front/src/modules/views/types/View.ts+++ b/packages/twenty-front/src/modules/views/types/View.ts@@ -32,6 +32,7 @@ export type View = {shouldHideEmptyGroups: boolean;kanbanColumnWidth?: number | null;calendarFieldMetadataId?: string | null;+ calendarEndFieldMetadataId?: string | null;calendarLayout?: ViewCalendarLayout | null;position: number;icon: string;diff --git a/packages/twenty-front/src/modules/views/utils/__tests__/convertUpdateViewInputToGql.test.ts b/packages/twenty-front/src/modules/views/utils/__tests__/convertUpdateViewInputToGql.test.tsnew file mode 100644index 00000000000..2fa4dde4562--- /dev/null+++ b/packages/twenty-front/src/modules/views/utils/__tests__/convertUpdateViewInputToGql.test.ts@@ -0,0 +1,16 @@+import { convertUpdateViewInputToGql } from '@/views/utils/convertUpdateViewInputToGql';++describe('convertUpdateViewInputToGql', () => {+ it('includes a null calendar end field so it can be cleared', () => {+ expect(+ convertUpdateViewInputToGql({ calendarEndFieldMetadataId: null }),+ ).toEqual({+ calendarEndFieldMetadataId: null,+ id: undefined,+ });+ });++ it('omits an undefined calendar end field', () => {+ expect(convertUpdateViewInputToGql({})).toEqual({ id: undefined });+ });+});diff --git a/packages/twenty-front/src/modules/views/utils/convertUpdateViewInputToGql.ts b/packages/twenty-front/src/modules/views/utils/convertUpdateViewInputToGql.tsindex b288de51072..c31a116f847 100644--- a/packages/twenty-front/src/modules/views/utils/convertUpdateViewInputToGql.ts+++ b/packages/twenty-front/src/modules/views/utils/convertUpdateViewInputToGql.ts@@ -32,6 +32,9 @@ export const convertUpdateViewInputToGql = (...(isDefined(view.calendarFieldMetadataId) && {calendarFieldMetadataId: view.calendarFieldMetadataId,}),+ ...(view.calendarEndFieldMetadataId !== undefined && {+ calendarEndFieldMetadataId: view.calendarEndFieldMetadataId,+ }),...(isDefined(view.visibility) && { visibility: view.visibility }),...(isDefined(view.shouldHideEmptyGroups) && {shouldHideEmptyGroups: view.shouldHideEmptyGroups,diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsxindex d78bb79bac9..f8ded3baf87 100644--- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx+++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentCreateMode.tsx@@ -20,6 +20,7 @@ import { ViewPickerCreateButton } from '@/views/view-picker/components/ViewPickeimport { ViewPickerIconAndNameContainer } from '@/views/view-picker/components/ViewPickerIconAndNameContainer';import { ViewPickerSaveButtonContainer } from '@/views/view-picker/components/ViewPickerSaveButtonContainer';import { ViewPickerSelectContainer } from '@/views/view-picker/components/ViewPickerSelectContainer';+import { VIEW_PICKER_CALENDAR_END_FIELD_DROPDOWN_ID } from '@/views/view-picker/constants/ViewPickerCalendarEndFieldDropdownId';import { VIEW_PICKER_CALENDAR_FIELD_DROPDOWN_ID } from '@/views/view-picker/constants/ViewPickerCalendarFieldDropdownId';import { VIEW_PICKER_DROPDOWN_ID } from '@/views/view-picker/constants/ViewPickerDropdownId';import { VIEW_PICKER_KANBAN_FIELD_DROPDOWN_ID } from '@/views/view-picker/constants/ViewPickerKanbanFieldDropdownId';@@ -29,6 +30,7 @@ import { useCreateViewFromCurrentState } from '@/views/view-picker/hooks/useCreaimport { useGetAvailableFieldsForCalendar } from '@/views/view-picker/hooks/useGetAvailableFieldsForCalendar';import { useGetAvailableFieldsToGroupRecordsBy } from '@/views/view-picker/hooks/useGetAvailableFieldsToGroupRecordsBy';import { useViewPickerMode } from '@/views/view-picker/hooks/useViewPickerMode';+import { viewPickerCalendarEndFieldMetadataIdComponentState } from '@/views/view-picker/states/viewPickerCalendarEndFieldMetadataIdComponentState';import { viewPickerCalendarFieldMetadataIdComponentState } from '@/views/view-picker/states/viewPickerCalendarFieldMetadataIdComponentState';import { viewPickerInputNameComponentState } from '@/views/view-picker/states/viewPickerInputNameComponentState';import { viewPickerIsDirtyComponentState } from '@/views/view-picker/states/viewPickerIsDirtyComponentState';@@ -36,10 +38,13 @@ import { viewPickerIsPersistingComponentState } from '@/views/view-picker/statesimport { viewPickerMainGroupByFieldMetadataIdComponentState } from '@/views/view-picker/states/viewPickerMainGroupByFieldMetadataIdComponentState';import { viewPickerSelectedIconComponentState } from '@/views/view-picker/states/viewPickerSelectedIconComponentState';import { viewPickerTypeComponentState } from '@/views/view-picker/states/viewPickerTypeComponentState';+import { getAvailableCalendarEndFieldMetadataItems } from '@/views/view-picker/utils/getAvailableCalendarEndFieldMetadataItems';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { Trans, useLingui } from '@lingui/react/macro';import { useMemo, useState } from 'react';import { IconX } from 'twenty-ui/icon';import { themeCssVariables } from 'twenty-ui/theme-constants';+import { FeatureFlagKey } from '~/generated-metadata/graphql';const StyledFieldAvailableContainer = styled.div`color: ${themeCssVariables.font.color.light};@@ -53,6 +58,9 @@ export const ViewPickerContentCreateMode = () => {const { t } = useLingui();const { viewPickerMode, setViewPickerMode } = useViewPickerMode();const [hasManuallySelectedIcon, setHasManuallySelectedIcon] = useState(false);+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );const viewObjectMetadataId = useAtomComponentStateValue(viewObjectMetadataIdComponentState,@@ -85,6 +93,11 @@ export const ViewPickerContentCreateMode = () => {setViewPickerCalendarFieldMetadataId,] = useAtomComponentState(viewPickerCalendarFieldMetadataIdComponentState);+ const [+ viewPickerCalendarEndFieldMetadataId,+ setViewPickerCalendarEndFieldMetadataId,+ ] = useAtomComponentState(viewPickerCalendarEndFieldMetadataIdComponentState);+const [viewPickerType, setViewPickerType] = useAtomComponentState(viewPickerTypeComponentState,);@@ -96,6 +109,12 @@ export const ViewPickerContentCreateMode = () => {const { availableFieldsForCalendar } = useGetAvailableFieldsForCalendar();+ const availableCalendarEndFieldMetadataItems =+ getAvailableCalendarEndFieldMetadataItems({+ availableFieldsForCalendar,+ calendarFieldMetadataId: viewPickerCalendarFieldMetadataId,+ });+useHotkeysOnFocusedElement({keys: [Key.Enter],callback: async () => {@@ -227,6 +246,27 @@ export const ViewPickerContentCreateMode = () => {fullWidthvalue={viewPickerCalendarFieldMetadataId}onChange={(value) => {+ const nextCalendarFieldMetadataItem =+ availableFieldsForCalendar.find(+ (fieldMetadataItem) => fieldMetadataItem.id === value,+ );+ const currentCalendarEndFieldMetadataItem =+ availableFieldsForCalendar.find(+ (fieldMetadataItem) =>+ fieldMetadataItem.id ===+ viewPickerCalendarEndFieldMetadataId,+ );++ if (+ viewPickerCalendarEndFieldMetadataId !== '' &&+ (currentCalendarEndFieldMetadataItem === undefined ||+ currentCalendarEndFieldMetadataItem.id === value ||+ currentCalendarEndFieldMetadataItem.type !==+ nextCalendarFieldMetadataItem?.type)+ ) {+ setViewPickerCalendarEndFieldMetadataId('');+ }+setViewPickerIsDirty(true);setViewPickerCalendarFieldMetadataId(value);}}@@ -241,6 +281,27 @@ export const ViewPickerContentCreateMode = () => {dropdownId={VIEW_PICKER_CALENDAR_FIELD_DROPDOWN_ID}/></ViewPickerSelectContainer>+ {isCalendarWeekViewEnabled && (+ <ViewPickerSelectContainer>+ <Select+ label={t`End date field`}+ fullWidth+ value={viewPickerCalendarEndFieldMetadataId}+ onChange={(value) => {+ setViewPickerIsDirty(true);+ setViewPickerCalendarEndFieldMetadataId(value);+ }}+ options={[+ { value: '', label: t`None` },+ ...availableCalendarEndFieldMetadataItems.map((field) => ({+ value: field.id,+ label: field.label,+ })),+ ]}+ dropdownId={VIEW_PICKER_CALENDAR_END_FIELD_DROPDOWN_ID}+ />+ </ViewPickerSelectContainer>+ )}{availableFieldsForCalendar.length === 0 && (<StyledFieldAvailableContainer><Trans>diff --git a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentEffect.tsx b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentEffect.tsxindex d0727b29bf1..5e84e2b748c 100644--- a/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentEffect.tsx+++ b/packages/twenty-front/src/modules/views/view-picker/components/ViewPickerContentEffect.tsx@@ -11,6 +11,7 @@ import { viewTypeIconMapping } from '@/views/types/ViewType';import { useGetAvailableFieldsForCalendar } from '@/views/view-picker/hooks/useGetAvailableFieldsForCalendar';import { useGetAvailableFieldsToGroupRecordsBy } from '@/views/view-picker/hooks/useGetAvailableFieldsToGroupRecordsBy';import { useViewPickerMode } from '@/views/view-picker/hooks/useViewPickerMode';+import { viewPickerCalendarEndFieldMetadataIdComponentState } from '@/views/view-picker/states/viewPickerCalendarEndFieldMetadataIdComponentState';import { viewPickerCalendarFieldMetadataIdComponentState } from '@/views/view-picker/states/viewPickerCalendarFieldMetadataIdComponentState';import { viewPickerInputNameComponentState } from '@/views/view-picker/states/viewPickerInputNameComponentState';import { viewPickerIsDirtyComponentState } from '@/views/view-picker/states/viewPickerIsDirtyComponentState';@@ -20,6 +21,7 @@ import { viewPickerReferenceViewIdComponentState } from '@/views/view-picker/staimport { viewPickerSelectedIconComponentState } from '@/views/view-picker/states/viewPickerSelectedIconComponentState';import { viewPickerTypeComponentState } from '@/views/view-picker/states/viewPickerTypeComponentState';import { viewPickerVisibilityComponentState } from '@/views/view-picker/states/viewPickerVisibilityComponentState';+import { getAvailableCalendarEndFieldMetadataItems } from '@/views/view-picker/utils/getAvailableCalendarEndFieldMetadataItems';import { isDefined } from 'twenty-shared/utils';import {ViewVisibility,@@ -43,10 +45,13 @@ export const ViewPickerContentEffect = () => {setViewPickerMainGroupByFieldMetadataId,] = useAtomComponentState(viewPickerMainGroupByFieldMetadataIdComponentState);- const [- viewPickerCalendarFieldMetadataId,- setViewPickerCalendarFieldMetadataId,- ] = useAtomComponentState(viewPickerCalendarFieldMetadataIdComponentState);+ const setViewPickerCalendarFieldMetadataId = useSetAtomComponentState(+ viewPickerCalendarFieldMetadataIdComponentState,+ );++ const setViewPickerCalendarEndFieldMetadataId = useSetAtomComponentState(+ viewPickerCalendarEndFieldMetadataIdComponentState,+ );const [viewPickerType, setViewPickerType] = useAtomComponentState(viewPickerTypeComponentState,@@ -98,18 +103,46 @@ export const ViewPickerContentEffect = () => {);setViewPickerInputName(referenceView.name);setViewPickerType(referenceView.type);++ const calendarFieldMetadataId =+ isDefined(referenceView.calendarFieldMetadataId) &&+ availableFieldsForCalendar.some(+ (fieldMetadataItem) =>+ fieldMetadataItem.id === referenceView.calendarFieldMetadataId,+ )+ ? referenceView.calendarFieldMetadataId+ : (availableFieldsForCalendar[0]?.id ?? '');++ const availableCalendarEndFieldMetadataItems =+ getAvailableCalendarEndFieldMetadataItems({+ availableFieldsForCalendar,+ calendarFieldMetadataId,+ });++ setViewPickerCalendarFieldMetadataId(calendarFieldMetadataId);+ setViewPickerCalendarEndFieldMetadataId(+ availableCalendarEndFieldMetadataItems.some(+ (fieldMetadataItem) =>+ fieldMetadataItem.id === referenceView.calendarEndFieldMetadataId,+ )+ ? (referenceView.calendarEndFieldMetadataId ?? '')+ : '',+ );}}, [referenceView,setViewPickerInputName,setViewPickerSelectedIcon,setViewPickerType,+ setViewPickerCalendarFieldMetadataId,+ setViewPickerCalendarEndFieldMetadataId,setViewPickerVisibility,viewPickerIsPersisting,viewPickerIsDirty,viewPickerMode,viewPickerType,hasViewPermission,+ availableFieldsForCalendar,]);useEffect(() => {@@ -125,26 +158,11 @@ export const ViewPickerContentEffect = () => {: availableFieldsForGrouping[0].id,);}- if (- isDefined(referenceView) &&- availableFieldsForCalendar.length > 0 &&- viewPickerCalendarFieldMetadataId === ''- ) {- setViewPickerCalendarFieldMetadataId(- isDefined(referenceView.calendarFieldMetadataId) &&- referenceView.calendarFieldMetadataId !== ''- ? referenceView.calendarFieldMetadataId- : availableFieldsForCalendar[0].id,- );- }}, [referenceView,availableFieldsForGrouping,viewPickerMainGroupByFieldMetadataId,setViewPickerMainGroupByFieldMetadataId,- availableFieldsForCalendar,- viewPickerCalendarFieldMetadataId,- setViewPickerCalendarFieldMetadataId,]);return <></>;diff --git a/packages/twenty-front/src/modules/views/view-picker/constants/ViewPickerCalendarEndFieldDropdownId.ts b/packages/twenty-front/src/modules/views/view-picker/constants/ViewPickerCalendarEndFieldDropdownId.tsnew file mode 100644index 00000000000..7825cac1dec--- /dev/null+++ b/packages/twenty-front/src/modules/views/view-picker/constants/ViewPickerCalendarEndFieldDropdownId.ts@@ -0,0 +1,2 @@+export const VIEW_PICKER_CALENDAR_END_FIELD_DROPDOWN_ID =+ 'view-picker-calendar-end-field-dropdown-id';diff --git a/packages/twenty-front/src/modules/views/view-picker/hooks/useCloseAndResetViewPicker.ts b/packages/twenty-front/src/modules/views/view-picker/hooks/useCloseAndResetViewPicker.tsindex f03056cb047..59103ff466b 100644--- a/packages/twenty-front/src/modules/views/view-picker/hooks/useCloseAndResetViewPicker.ts+++ b/packages/twenty-front/src/modules/views/view-picker/hooks/useCloseAndResetViewPicker.ts@@ -2,6 +2,8 @@ import { useCallback } from 'react';import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown';import { useSetAtomComponentState } from '@/ui/utilities/state/jotai/hooks/useSetAtomComponentState';+import { VIEW_PICKER_CALENDAR_END_FIELD_DROPDOWN_ID } from '@/views/view-picker/constants/ViewPickerCalendarEndFieldDropdownId';+import { VIEW_PICKER_CALENDAR_FIELD_DROPDOWN_ID } from '@/views/view-picker/constants/ViewPickerCalendarFieldDropdownId';import { VIEW_PICKER_DROPDOWN_ID } from '@/views/view-picker/constants/ViewPickerDropdownId';import { VIEW_PICKER_KANBAN_FIELD_DROPDOWN_ID } from '@/views/view-picker/constants/ViewPickerKanbanFieldDropdownId';import { VIEW_PICKER_VIEW_TYPE_DROPDOWN_ID } from '@/views/view-picker/constants/ViewPickerViewTypeDropdownId';@@ -22,6 +24,8 @@ export const useCloseAndResetViewPicker = () => {const closeAndResetViewPicker = useCallback(() => {setViewPickerIsPersisting(false);setViewPickerMode('list');+ closeDropdown(VIEW_PICKER_CALENDAR_END_FIELD_DROPDOWN_ID);+ closeDropdown(VIEW_PICKER_CALENDAR_FIELD_DROPDOWN_ID);closeDropdown(VIEW_PICKER_KANBAN_FIELD_DROPDOWN_ID);closeDropdown(VIEW_PICKER_VIEW_TYPE_DROPDOWN_ID);closeDropdown(VIEW_PICKER_DROPDOWN_ID);diff --git a/packages/twenty-front/src/modules/views/view-picker/hooks/useCreateViewFromCurrentState.ts b/packages/twenty-front/src/modules/views/view-picker/hooks/useCreateViewFromCurrentState.tsindex deeab35845e..42e1a2748bd 100644--- a/packages/twenty-front/src/modules/views/view-picker/hooks/useCreateViewFromCurrentState.ts+++ b/packages/twenty-front/src/modules/views/view-picker/hooks/useCreateViewFromCurrentState.ts@@ -3,6 +3,7 @@ import { useChangeView } from '@/views/hooks/useChangeView';import { useCreateViewFromCurrentView } from '@/views/hooks/useCreateViewFromCurrentView';import { ViewType } from '@/views/types/ViewType';import { useCloseAndResetViewPicker } from '@/views/view-picker/hooks/useCloseAndResetViewPicker';+import { viewPickerCalendarEndFieldMetadataIdComponentState } from '@/views/view-picker/states/viewPickerCalendarEndFieldMetadataIdComponentState';import { viewPickerCalendarFieldMetadataIdComponentState } from '@/views/view-picker/states/viewPickerCalendarFieldMetadataIdComponentState';import { viewPickerInputNameComponentState } from '@/views/view-picker/states/viewPickerInputNameComponentState';import { viewPickerIsDirtyComponentState } from '@/views/view-picker/states/viewPickerIsDirtyComponentState';@@ -12,12 +13,17 @@ import { viewPickerModeComponentState } from '@/views/view-picker/states/viewPicimport { viewPickerSelectedIconComponentState } from '@/views/view-picker/states/viewPickerSelectedIconComponentState';import { viewPickerTypeComponentState } from '@/views/view-picker/states/viewPickerTypeComponentState';import { viewPickerVisibilityComponentState } from '@/views/view-picker/states/viewPickerVisibilityComponentState';+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';import { useStore } from 'jotai';import { useCallback } from 'react';import { isDefined } from 'twenty-shared/utils';+import { FeatureFlagKey } from '~/generated-metadata/graphql';export const useCreateViewFromCurrentState = () => {const { closeAndResetViewPicker } = useCloseAndResetViewPicker();+ const isCalendarWeekViewEnabled = useIsFeatureEnabled(+ FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ );const viewPickerInputNameCallbackState = useAtomComponentStateCallbackState(viewPickerInputNameComponentState,@@ -40,6 +46,11 @@ export const useCreateViewFromCurrentState = () => {viewPickerCalendarFieldMetadataIdComponentState,);+ const viewPickerCalendarEndFieldMetadataIdCallbackState =+ useAtomComponentStateCallbackState(+ viewPickerCalendarEndFieldMetadataIdComponentState,+ );+const viewPickerIsPersistingCallbackState =useAtomComponentStateCallbackState(viewPickerIsPersistingComponentState);@@ -70,6 +81,9 @@ export const useCreateViewFromCurrentState = () => {const calendarFieldMetadataId = store.get(viewPickerCalendarFieldMetadataIdCallbackState,);+ const calendarEndFieldMetadataId = store.get(+ viewPickerCalendarEndFieldMetadataIdCallbackState,+ );const viewPickerMode = store.get(viewPickerModeCallbackState);const visibility = store.get(viewPickerVisibilityCallbackState);@@ -88,6 +102,10 @@ export const useCreateViewFromCurrentState = () => {mainGroupByFieldMetadataId:type === ViewType.KANBAN ? mainGroupByFieldMetadataId : null,calendarFieldMetadataId,+ calendarEndFieldMetadataId:+ isCalendarWeekViewEnabled && calendarEndFieldMetadataId !== ''+ ? calendarEndFieldMetadataId+ : null,visibility,},shouldCopyFiltersAndSortsAndAggregate,@@ -107,10 +125,12 @@ export const useCreateViewFromCurrentState = () => {viewPickerIsPersistingCallbackState,viewPickerMainGroupByFieldMetadataIdCallbackState,viewPickerCalendarFieldMetadataIdCallbackState,+ viewPickerCalendarEndFieldMetadataIdCallbackState,viewPickerSelectedIconCallbackState,viewPickerTypeCallbackState,viewPickerModeCallbackState,viewPickerVisibilityCallbackState,+ isCalendarWeekViewEnabled,]);return { createViewFromCurrentState };diff --git a/packages/twenty-front/src/modules/views/view-picker/states/viewPickerCalendarEndFieldMetadataIdComponentState.ts b/packages/twenty-front/src/modules/views/view-picker/states/viewPickerCalendarEndFieldMetadataIdComponentState.tsnew file mode 100644index 00000000000..a6d904a97c3--- /dev/null+++ b/packages/twenty-front/src/modules/views/view-picker/states/viewPickerCalendarEndFieldMetadataIdComponentState.ts@@ -0,0 +1,9 @@+import { createAtomComponentState } from '@/ui/utilities/state/jotai/utils/createAtomComponentState';+import { ViewComponentInstanceContext } from '@/views/states/contexts/ViewComponentInstanceContext';++export const viewPickerCalendarEndFieldMetadataIdComponentState =+ createAtomComponentState<string>({+ key: 'viewPickerCalendarEndFieldMetadataIdComponentState',+ defaultValue: '',+ componentInstanceContext: ViewComponentInstanceContext,+ });diff --git a/packages/twenty-front/src/modules/views/view-picker/utils/__tests__/getAvailableCalendarEndFieldMetadataItems.test.ts b/packages/twenty-front/src/modules/views/view-picker/utils/__tests__/getAvailableCalendarEndFieldMetadataItems.test.tsnew file mode 100644index 00000000000..1baec7f44eb--- /dev/null+++ b/packages/twenty-front/src/modules/views/view-picker/utils/__tests__/getAvailableCalendarEndFieldMetadataItems.test.ts@@ -0,0 +1,29 @@+import { getAvailableCalendarEndFieldMetadataItems } from '@/views/view-picker/utils/getAvailableCalendarEndFieldMetadataItems';+import { FieldMetadataType } from '~/generated-metadata/graphql';++const availableFieldsForCalendar = [+ { id: 'date-start', type: FieldMetadataType.DATE },+ { id: 'date-end', type: FieldMetadataType.DATE },+ { id: 'date-time-start', type: FieldMetadataType.DATE_TIME },+ { id: 'date-time-end', type: FieldMetadataType.DATE_TIME },+];++describe('getAvailableCalendarEndFieldMetadataItems', () => {+ it('returns fields matching the start field type and excludes the start field', () => {+ expect(+ getAvailableCalendarEndFieldMetadataItems({+ availableFieldsForCalendar,+ calendarFieldMetadataId: 'date-time-start',+ }),+ ).toEqual([{ id: 'date-time-end', type: FieldMetadataType.DATE_TIME }]);+ });++ it('returns no fields when the start field cannot be found', () => {+ expect(+ getAvailableCalendarEndFieldMetadataItems({+ availableFieldsForCalendar,+ calendarFieldMetadataId: 'missing',+ }),+ ).toEqual([]);+ });+});diff --git a/packages/twenty-front/src/modules/views/view-picker/utils/getAvailableCalendarEndFieldMetadataItems.ts b/packages/twenty-front/src/modules/views/view-picker/utils/getAvailableCalendarEndFieldMetadataItems.tsnew file mode 100644index 00000000000..fb2def2511f--- /dev/null+++ b/packages/twenty-front/src/modules/views/view-picker/utils/getAvailableCalendarEndFieldMetadataItems.ts@@ -0,0 +1,27 @@+import { type FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';++type CalendarFieldMetadataItem = Pick<FieldMetadataItem, 'id' | 'type'>;++export const getAvailableCalendarEndFieldMetadataItems = <+ T extends CalendarFieldMetadataItem,+>({+ availableFieldsForCalendar,+ calendarFieldMetadataId,+}: {+ availableFieldsForCalendar: T[];+ calendarFieldMetadataId: string | null | undefined;+}): T[] => {+ const calendarFieldMetadataItem = availableFieldsForCalendar.find(+ (fieldMetadataItem) => fieldMetadataItem.id === calendarFieldMetadataId,+ );++ if (calendarFieldMetadataItem === undefined) {+ return [];+ }++ return availableFieldsForCalendar.filter(+ (fieldMetadataItem) =>+ fieldMetadataItem.id !== calendarFieldMetadataItem.id &&+ fieldMetadataItem.type === calendarFieldMetadataItem.type,+ );+};diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-10/2-10-workspace-command-1799000055000-sync-call-recording-standard-objects.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-10/2-10-workspace-command-1799000055000-sync-call-recording-standard-objects.command.tsindex 8908fabde66..03e7625d937 100644--- a/packages/twenty-server/src/database/commands/upgrade-version-command/2-10/2-10-workspace-command-1799000055000-sync-call-recording-standard-objects.command.ts+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-10/2-10-workspace-command-1799000055000-sync-call-recording-standard-objects.command.ts@@ -161,6 +161,7 @@ const buildLegacyCalendarEventRecordingPreferenceFieldMetadata = ({fieldPermissionIds: [],kanbanAggregateOperationViewIds: [],calendarViewIds: [],+ calendarEndViewIds: [],mainGroupByFieldMetadataViewIds: [],createdAt: now,updatedAt: now,@@ -175,6 +176,7 @@ const buildLegacyCalendarEventRecordingPreferenceFieldMetadata = ({fieldPermissionUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],viewSortIds: [],viewSortUniversalIdentifiers: [],diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-22/2-22-instance-command-fast-1783956795000-add-calendar-end-field-metadata-id-to-view.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-22/2-22-instance-command-fast-1783956795000-add-calendar-end-field-metadata-id-to-view.tsnew file mode 100644index 00000000000..1d80efbabfa--- /dev/null+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-22/2-22-instance-command-fast-1783956795000-add-calendar-end-field-metadata-id-to-view.ts@@ -0,0 +1,33 @@+import { QueryRunner } from 'typeorm';++import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-instance-command.decorator';+import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';++@RegisteredInstanceCommand('2.22.0', 1783956795000)+export class AddCalendarEndFieldMetadataIdToViewFastInstanceCommand+ implements FastInstanceCommand+{+ public async up(queryRunner: QueryRunner): Promise<void> {+ await queryRunner.query(+ 'ALTER TABLE "core"."view" ADD COLUMN IF NOT EXISTS "calendarEndFieldMetadataId" uuid',+ );+ await queryRunner.query(+ 'CREATE INDEX IF NOT EXISTS "IDX_VIEW_CALENDAR_END_FIELD_METADATA" ON "core"."view" ("calendarEndFieldMetadataId") ',+ );+ await queryRunner.query(+ 'DO $$ BEGIN ALTER TABLE "core"."view" ADD CONSTRAINT "FK_e1d69dd7402cd7df3b03ce11311" FOREIGN KEY ("calendarEndFieldMetadataId") REFERENCES "core"."fieldMetadata"("id") ON DELETE SET NULL ON UPDATE NO ACTION; EXCEPTION WHEN duplicate_object THEN NULL; END $$',+ );+ }++ public async down(queryRunner: QueryRunner): Promise<void> {+ await queryRunner.query(+ 'ALTER TABLE "core"."view" DROP CONSTRAINT IF EXISTS "FK_e1d69dd7402cd7df3b03ce11311"',+ );+ await queryRunner.query(+ 'DROP INDEX IF EXISTS "core"."IDX_VIEW_CALENDAR_END_FIELD_METADATA"',+ );+ await queryRunner.query(+ 'ALTER TABLE "core"."view" DROP COLUMN IF EXISTS "calendarEndFieldMetadataId"',+ );+ }+}diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-22/__tests__/add-calendar-end-field-metadata-id-to-view.instance-command.spec.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-22/__tests__/add-calendar-end-field-metadata-id-to-view.instance-command.spec.tsnew file mode 100644index 00000000000..1b543eacf08--- /dev/null+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-22/__tests__/add-calendar-end-field-metadata-id-to-view.instance-command.spec.ts@@ -0,0 +1,49 @@+import { type QueryRunner } from 'typeorm';++import { AddCalendarEndFieldMetadataIdToViewFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-22/2-22-instance-command-fast-1783956795000-add-calendar-end-field-metadata-id-to-view';+import { ADD_CALENDAR_END_FIELD_METADATA_ID_TO_VIEW_UPGRADE_COMMAND_NAME } from 'src/database/commands/upgrade-version-command/2-22/add-calendar-end-field-metadata-id-to-view-upgrade-command-name.constant';+import { getRegisteredInstanceCommandMetadata } from 'src/engine/core-modules/upgrade/decorators/registered-instance-command.decorator';++describe('AddCalendarEndFieldMetadataIdToViewFastInstanceCommand', () => {+ const command =+ new AddCalendarEndFieldMetadataIdToViewFastInstanceCommand();++ it('is registered against the current version with a matching name', () => {+ const metadata = getRegisteredInstanceCommandMetadata(+ AddCalendarEndFieldMetadataIdToViewFastInstanceCommand,+ );++ expect(metadata).toEqual({+ timestamp: 1783956795000,+ type: 'fast',+ version: '2.22.0',+ });+ expect(+ `${metadata?.version}_${AddCalendarEndFieldMetadataIdToViewFastInstanceCommand.name}_${metadata?.timestamp}`,+ ).toBe(ADD_CALENDAR_END_FIELD_METADATA_ID_TO_VIEW_UPGRADE_COMMAND_NAME);+ });++ it('adds the column, index and foreign key idempotently', async () => {+ const query = jest.fn().mockResolvedValue(undefined);++ await command.up({ query } as unknown as QueryRunner);++ expect(query.mock.calls.map((call) => call[0] as string)).toEqual([+ 'ALTER TABLE "core"."view" ADD COLUMN IF NOT EXISTS "calendarEndFieldMetadataId" uuid',+ 'CREATE INDEX IF NOT EXISTS "IDX_VIEW_CALENDAR_END_FIELD_METADATA" ON "core"."view" ("calendarEndFieldMetadataId") ',+ 'DO $$ BEGIN ALTER TABLE "core"."view" ADD CONSTRAINT "FK_e1d69dd7402cd7df3b03ce11311" FOREIGN KEY ("calendarEndFieldMetadataId") REFERENCES "core"."fieldMetadata"("id") ON DELETE SET NULL ON UPDATE NO ACTION; EXCEPTION WHEN duplicate_object THEN NULL; END $$',+ ]);+ });++ it('removes the foreign key, index and column idempotently', async () => {+ const query = jest.fn().mockResolvedValue(undefined);++ await command.down({ query } as unknown as QueryRunner);++ expect(query.mock.calls.map((call) => call[0] as string)).toEqual([+ 'ALTER TABLE "core"."view" DROP CONSTRAINT IF EXISTS "FK_e1d69dd7402cd7df3b03ce11311"',+ 'DROP INDEX IF EXISTS "core"."IDX_VIEW_CALENDAR_END_FIELD_METADATA"',+ 'ALTER TABLE "core"."view" DROP COLUMN IF EXISTS "calendarEndFieldMetadataId"',+ ]);+ });+});diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-22/add-calendar-end-field-metadata-id-to-view-upgrade-command-name.constant.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-22/add-calendar-end-field-metadata-id-to-view-upgrade-command-name.constant.tsnew file mode 100644index 00000000000..517a5915f57--- /dev/null+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-22/add-calendar-end-field-metadata-id-to-view-upgrade-command-name.constant.ts@@ -0,0 +1,2 @@+export const ADD_CALENDAR_END_FIELD_METADATA_ID_TO_VIEW_UPGRADE_COMMAND_NAME =+ '2.22.0_AddCalendarEndFieldMetadataIdToViewFastInstanceCommand_1783956795000';diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.tsindex 1bfbcf48d26..46d0e5547ff 100644--- a/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts@@ -110,6 +110,7 @@ import { BackfillGalleryImagesOnApplicationRegistrationSlowInstanceCommand } froimport { AddWorkflowVersionSyncableColumnsFastInstanceCommand } from './2-20/2-20-instance-command-fast-1783603454480-add-workflow-version-syncable-columns';import { BackfillWorkspaceDatabaseSchemaSlowInstanceCommand } from './2-21/2-21-instance-command-slow-1783934147089-backfill-workspace-database-schema';import { AddLogoFileIdToApplicationRegistrationFastInstanceCommand } from './2-21/2-21-instance-command-fast-1783945979243-add-logo-file-id-to-application-registration';+import { AddCalendarEndFieldMetadataIdToViewFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-22/2-22-instance-command-fast-1783956795000-add-calendar-end-field-metadata-id-to-view';export const INSTANCE_COMMANDS = [AddViewFieldGroupIdIndexOnViewFieldFastInstanceCommand,@@ -222,4 +223,5 @@ export const INSTANCE_COMMANDS = [AddWorkflowVersionSyncableColumnsFastInstanceCommand,BackfillWorkspaceDatabaseSchemaSlowInstanceCommand,AddLogoFileIdToApplicationRegistrationFastInstanceCommand,+ AddCalendarEndFieldMetadataIdToViewFastInstanceCommand,];diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/__tests__/from-view-manifest-to-universal-flat-view.util.spec.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/__tests__/from-view-manifest-to-universal-flat-view.util.spec.tsindex 4971364fb4b..dfbf1470a97 100644--- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/__tests__/from-view-manifest-to-universal-flat-view.util.spec.ts+++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/__tests__/from-view-manifest-to-universal-flat-view.util.spec.ts@@ -114,6 +114,7 @@ describe('fromViewManifestToUniversalFlatView', () => {).toBeNull();expect(result.calendarLayout).toBeNull();expect(result.calendarFieldMetadataUniversalIdentifier).toBeNull();+ expect(result.calendarEndFieldMetadataUniversalIdentifier).toBeNull();expect(result.anyFieldFilterValue).toBeNull();});@@ -126,6 +127,7 @@ describe('fromViewManifestToUniversalFlatView', () => {type: ViewType.CALENDAR,calendarLayout: ViewCalendarLayout.WEEK,calendarFieldMetadataUniversalIdentifier: 'field-uuid-date',+ calendarEndFieldMetadataUniversalIdentifier: 'field-uuid-end-date',},applicationUniversalIdentifier,now,@@ -135,6 +137,9 @@ describe('fromViewManifestToUniversalFlatView', () => {expect(result.calendarFieldMetadataUniversalIdentifier).toBe('field-uuid-date',);+ expect(result.calendarEndFieldMetadataUniversalIdentifier).toBe(+ 'field-uuid-end-date',+ );});it('should preserve anyFieldFilterValue from the manifest', () => {diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-field-manifest-to-universal-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-field-manifest-to-universal-flat-field-metadata.util.tsindex 873b6108761..9ef02d35296 100644--- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-field-manifest-to-universal-flat-field-metadata.util.ts+++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-field-manifest-to-universal-flat-field-metadata.util.ts@@ -112,6 +112,7 @@ export const fromFieldManifestToUniversalFlatFieldMetadata = ({fieldPermissionUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],viewSortUniversalIdentifiers: [],searchFieldMetadataUniversalIdentifiers: [],diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-view-manifest-to-universal-flat-view.util.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-view-manifest-to-universal-flat-view.util.tsindex 6588b827b34..0ee7bad87bb 100644--- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-view-manifest-to-universal-flat-view.util.ts+++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-view-manifest-to-universal-flat-view.util.ts@@ -36,6 +36,8 @@ export const fromViewManifestToUniversalFlatView = ({calendarLayout: viewManifest.calendarLayout ?? null,calendarFieldMetadataUniversalIdentifier:viewManifest.calendarFieldMetadataUniversalIdentifier ?? null,+ calendarEndFieldMetadataUniversalIdentifier:+ viewManifest.calendarEndFieldMetadataUniversalIdentifier ?? null,mainGroupByFieldMetadataUniversalIdentifier:viewManifest.mainGroupByFieldMetadataUniversalIdentifier ?? null,shouldHideEmptyGroups: viewManifest.shouldHideEmptyGroups ?? false,diff --git a/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts b/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.tsindex 72a1f4380f1..f278a993e73 100644--- a/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts+++ b/packages/twenty-server/src/engine/core-modules/feature-flag/constants/public-feature-flag.const.ts@@ -12,6 +12,14 @@ export type PublicFeatureFlag = {};export const PUBLIC_FEATURE_FLAGS: PublicFeatureFlag[] = [+ {+ key: FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ metadata: {+ label: 'Calendar Week View',+ description:+ 'Display calendar records in a weekly layout with optional end dates',+ },+ },{key: FeatureFlagKey.IS_JUNCTION_RELATIONS_ENABLED,metadata: {diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.entity.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.entity.tsindex 1a2493eba45..aadf713ee34 100644--- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.entity.ts+++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.entity.ts@@ -249,6 +249,9 @@ export class FieldMetadataEntity<@OneToMany(() => ViewEntity, (view) => view.calendarFieldMetadata)calendarViews: Relation<ViewEntity[]>;+ @OneToMany(() => ViewEntity, (view) => view.calendarEndFieldMetadata)+ calendarEndViews: Relation<ViewEntity[]>;+@OneToMany(() => ViewEntity, (view) => view.mainGroupByFieldMetadata)mainGroupByFieldMetadataViews: Relation<ViewEntity[]>;diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snapindex 1494d91a225..986963deb7b 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap@@ -343,6 +343,7 @@ exports[`ALL_UNIVERSAL_FLAT_ENTITY_PROPERTIES_TO_COMPARE_AND_STRINGIFY should ma"anyFieldFilterValue","calendarLayout","calendarFieldMetadataUniversalIdentifier",+ "calendarEndFieldMetadataUniversalIdentifier","visibility","mainGroupByFieldMetadataUniversalIdentifier","shouldHideEmptyGroups",diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/overridable-and-translatable-properties.constant.spec.ts.snap b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/overridable-and-translatable-properties.constant.spec.ts.snapindex a643ff312bd..2945bb03d26 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/overridable-and-translatable-properties.constant.spec.ts.snap+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/overridable-and-translatable-properties.constant.spec.ts.snap@@ -69,6 +69,7 @@ exports[`registry-derived override property maps derives the overridable propert"anyFieldFilterValue","calendarLayout","calendarFieldMetadataId",+ "calendarEndFieldMetadataId","visibility","mainGroupByFieldMetadataId","shouldHideEmptyGroups",diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.tsindex 432b01e7ef9..a2a8e176587 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts@@ -381,6 +381,12 @@ export const ALL_ENTITY_PROPERTIES_CONFIGURATION_BY_METADATA_NAME = {universalProperty: 'calendarFieldMetadataUniversalIdentifier',isOverridable: true,},+ calendarEndFieldMetadataId: {+ toCompare: true,+ toStringify: false,+ universalProperty: 'calendarEndFieldMetadataUniversalIdentifier',+ isOverridable: true,+ },visibility: {toCompare: true,toStringify: false,diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-many-to-one-metadata-foreign-key.constant.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-many-to-one-metadata-foreign-key.constant.tsindex f88ec19d7a9..b757c39fb0c 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-many-to-one-metadata-foreign-key.constant.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-many-to-one-metadata-foreign-key.constant.ts@@ -98,6 +98,9 @@ export const ALL_MANY_TO_ONE_METADATA_FOREIGN_KEY = {calendarFieldMetadata: {foreignKey: 'calendarFieldMetadataId',},+ calendarEndFieldMetadata: {+ foreignKey: 'calendarEndFieldMetadataId',+ },kanbanAggregateOperationFieldMetadata: {foreignKey: 'kanbanAggregateOperationFieldMetadataId',},diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-many-to-one-metadata-relations.constant.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-many-to-one-metadata-relations.constant.tsindex 102a1fe5cb5..7b42c50c2ed 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-many-to-one-metadata-relations.constant.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-many-to-one-metadata-relations.constant.ts@@ -174,6 +174,13 @@ export const ALL_MANY_TO_ONE_METADATA_RELATIONS = {isNullable: true,universalForeignKey: 'calendarFieldMetadataUniversalIdentifier',},+ calendarEndFieldMetadata: {+ metadataName: 'fieldMetadata',+ foreignKey: 'calendarEndFieldMetadataId',+ inverseOneToManyProperty: 'calendarEndViews',+ isNullable: true,+ universalForeignKey: 'calendarEndFieldMetadataUniversalIdentifier',+ },kanbanAggregateOperationFieldMetadata: {metadataName: 'fieldMetadata',foreignKey: 'kanbanAggregateOperationFieldMetadataId',diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-one-to-many-metadata-relations.constant.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-one-to-many-metadata-relations.constant.tsindex 95da66565db..eda03a96a1c 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-one-to-many-metadata-relations.constant.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-one-to-many-metadata-relations.constant.ts@@ -71,6 +71,12 @@ export const ALL_ONE_TO_MANY_METADATA_RELATIONS = {universalFlatEntityForeignKeyAggregator:'calendarViewUniversalIdentifiers',},+ calendarEndViews: {+ metadataName: 'view',+ flatEntityForeignKeyAggregator: 'calendarEndViewIds',+ universalFlatEntityForeignKeyAggregator:+ 'calendarEndViewUniversalIdentifiers',+ },mainGroupByFieldMetadataViews: {metadataName: 'view',flatEntityForeignKeyAggregator: 'mainGroupByFieldMetadataViewIds',diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/types/__tests__/extract-entity-one-to-many-entity-relation-properties.type-test.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/types/__tests__/extract-entity-one-to-many-entity-relation-properties.type-test.tsindex e33d2060b65..34b60ef4abb 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/types/__tests__/extract-entity-one-to-many-entity-relation-properties.type-test.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/types/__tests__/extract-entity-one-to-many-entity-relation-properties.type-test.ts@@ -17,7 +17,7 @@ type FieldMetadataOneToManySyncableRelations =type Assertions = [// FieldMetadataEntity OneToMany relations (all targets):// - indexFieldMetadatas, fieldPermissions, viewFields, viewFilters,- // - kanbanAggregateOperationViews, calendarViews, mainGroupByFieldMetadataViews,+ // - kanbanAggregateOperationViews, calendarViews, calendarEndViews, mainGroupByFieldMetadataViews,// - viewSorts, searchFieldMetadatasExpect<Equal<@@ -28,6 +28,7 @@ type Assertions = [| 'viewFilters'| 'kanbanAggregateOperationViews'| 'calendarViews'+ | 'calendarEndViews'| 'mainGroupByFieldMetadataViews'| 'viewSorts'| 'searchFieldMetadatas'@@ -43,6 +44,7 @@ type Assertions = [| 'viewFilters'| 'kanbanAggregateOperationViews'| 'calendarViews'+ | 'calendarEndViews'| 'mainGroupByFieldMetadataViews'| 'viewSorts'| 'searchFieldMetadatas'diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/types/__tests__/extract-entity-related-entity-properties.type-test.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/types/__tests__/extract-entity-related-entity-properties.type-test.tsindex ef1dd4dd489..23452884d91 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/types/__tests__/extract-entity-related-entity-properties.type-test.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/types/__tests__/extract-entity-related-entity-properties.type-test.ts@@ -10,7 +10,7 @@ type FieldMetadataRelatedProperties =type Assertions = [// FieldMetadataEntity has both ManyToOne and OneToMany relations// ManyToOne: object, workspace, application, relationTargetFieldMetadata, relationTargetObjectMetadata- // OneToMany: indexFieldMetadatas, fieldPermissions, viewFields, viewFilters, kanbanAggregateOperationViews, calendarViews, mainGroupByFieldMetadataViews, viewSorts, searchFieldMetadatas+ // OneToMany: indexFieldMetadatas, fieldPermissions, viewFields, viewFilters, kanbanAggregateOperationViews, calendarViews, calendarEndViews, mainGroupByFieldMetadataViews, viewSorts, searchFieldMetadatasExpect<Equal<FieldMetadataRelatedProperties,@@ -25,6 +25,7 @@ type Assertions = [| 'viewFilters'| 'kanbanAggregateOperationViews'| 'calendarViews'+ | 'calendarEndViews'| 'mainGroupByFieldMetadataViews'| 'viewSorts'| 'searchFieldMetadatas'diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/utils/__tests__/add-flat-entity-to-flat-entity-and-related-entity-maps-through-mutation-or-throw.spec.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/utils/__tests__/add-flat-entity-to-flat-entity-and-related-entity-maps-through-mutation-or-throw.spec.tsindex ceed706265d..5e54195b534 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/utils/__tests__/add-flat-entity-to-flat-entity-and-related-entity-maps-through-mutation-or-throw.spec.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/utils/__tests__/add-flat-entity-to-flat-entity-and-related-entity-maps-through-mutation-or-throw.spec.ts@@ -57,6 +57,8 @@ describe('addFlatEntityToFlatEntityAndRelatedEntityMapsThroughMutationOrThrow',applicationId,calendarFieldMetadataId: mockFieldMetadata.id,calendarFieldMetadataUniversalIdentifier: fieldUniversalIdentifier,+ calendarEndFieldMetadataId: mockFieldMetadata.id,+ calendarEndFieldMetadataUniversalIdentifier: fieldUniversalIdentifier,};const flatEntityAndRelatedMapsToMutate: MetadataFlatEntityAndRelatedFlatEntityMaps<'view'> =@@ -103,6 +105,8 @@ describe('addFlatEntityToFlatEntityAndRelatedEntityMapsThroughMutationOrThrow',).toMatchObject<Partial<FlatFieldMetadata>>({calendarViewIds: [mockView.id],calendarViewUniversalIdentifiers: [viewUniversalIdentifier],+ calendarEndViewIds: [mockView.id],+ calendarEndViewUniversalIdentifiers: [viewUniversalIdentifier],});});});diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/utils/__tests__/delete-flat-entity-from-flat-entity-and-related-entity-maps-through-mutation-or-throw.spec.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/utils/__tests__/delete-flat-entity-from-flat-entity-and-related-entity-maps-through-mutation-or-throw.spec.tsindex 95443fc83c4..0bc5941250d 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/utils/__tests__/delete-flat-entity-from-flat-entity-and-related-entity-maps-through-mutation-or-throw.spec.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/utils/__tests__/delete-flat-entity-from-flat-entity-and-related-entity-maps-through-mutation-or-throw.spec.ts@@ -43,6 +43,8 @@ describe('deleteFlatEntityFromFlatEntityAndRelatedEntityMapsThroughMutationOrThrworkspaceId,calendarViewIds: [viewId],calendarViewUniversalIdentifiers: [viewUniversalIdentifier],+ calendarEndViewIds: [viewId],+ calendarEndViewUniversalIdentifiers: [viewUniversalIdentifier],mainGroupByFieldMetadataViewIds: [],applicationId,});@@ -58,6 +60,8 @@ describe('deleteFlatEntityFromFlatEntityAndRelatedEntityMapsThroughMutationOrThrworkspaceId,calendarFieldMetadataId: mockFieldMetadata.id,calendarFieldMetadataUniversalIdentifier: fieldUniversalIdentifier,+ calendarEndFieldMetadataId: mockFieldMetadata.id,+ calendarEndFieldMetadataUniversalIdentifier: fieldUniversalIdentifier,createdAt: new Date('2024-01-01').toISOString(),updatedAt: new Date('2024-01-01').toISOString(),icon: 'icon',@@ -114,6 +118,8 @@ describe('deleteFlatEntityFromFlatEntityAndRelatedEntityMapsThroughMutationOrThr).toMatchObject<Partial<FlatFieldMetadata>>({calendarViewIds: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewIds: [],+ calendarEndViewUniversalIdentifiers: [],});});});diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock.tsindex 9a67f4b5547..c4ae822bf10 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock.ts@@ -17,6 +17,7 @@ export const getFlatFieldMetadataMock = <T extends FieldMetadataType>(return {calendarViewIds: [],+ calendarEndViewIds: [],viewFilterIds: [],kanbanAggregateOperationViewIds: [],viewFieldIds: [],@@ -54,6 +55,7 @@ export const getFlatFieldMetadataMock = <T extends FieldMetadataType>(fieldPermissionUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],viewSortIds: [],viewSortUniversalIdentifiers: [],diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__tests__/__snapshots__/morph-relation-from-create-field-input-to-flat-field-metadatas-to-create.spec.ts.snap b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__tests__/__snapshots__/morph-relation-from-create-field-input-to-flat-field-metadatas-to-create.spec.ts.snapindex cb69359a2dd..ab77a0ee1dd 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__tests__/__snapshots__/morph-relation-from-create-field-input-to-flat-field-metadatas-to-create.spec.ts.snap+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/__tests__/__snapshots__/morph-relation-from-create-field-input-to-flat-field-metadatas-to-create.spec.ts.snap@@ -117,6 +117,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su"flatFieldMetadatas": [{"applicationUniversalIdentifier": Any<String>,+ "calendarEndViewUniversalIdentifiers": [],"calendarViewUniversalIdentifiers": [],"createdAt": Any<String>,"defaultValue": null,@@ -153,6 +154,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su},{"applicationUniversalIdentifier": Any<String>,+ "calendarEndViewUniversalIdentifiers": [],"calendarViewUniversalIdentifiers": [],"createdAt": Any<String>,"defaultValue": null,@@ -191,6 +193,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su},{"applicationUniversalIdentifier": Any<String>,+ "calendarEndViewUniversalIdentifiers": [],"calendarViewUniversalIdentifiers": [],"createdAt": Any<String>,"defaultValue": null,@@ -227,6 +230,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su},{"applicationUniversalIdentifier": Any<String>,+ "calendarEndViewUniversalIdentifiers": [],"calendarViewUniversalIdentifiers": [],"createdAt": Any<String>,"defaultValue": null,diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/services/workspace-flat-field-metadata-map-cache.service.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/services/workspace-flat-field-metadata-map-cache.service.tsindex 94e82c7fe22..704357cbdb6 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/services/workspace-flat-field-metadata-map-cache.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/services/workspace-flat-field-metadata-map-cache.service.ts@@ -108,6 +108,7 @@ export class WorkspaceFlatFieldMetadataMapCacheService extends WorkspaceCachePro'universalIdentifier','kanbanAggregateOperationFieldMetadataId','calendarFieldMetadataId',+ 'calendarEndFieldMetadataId','mainGroupByFieldMetadataId',],withDeleted: true,@@ -121,6 +122,7 @@ export class WorkspaceFlatFieldMetadataMapCacheService extends WorkspaceCacheProviewFieldsByFieldId,viewFiltersByFieldId,calendarViewsByFieldId,+ calendarEndViewsByFieldId,kanbanViewsByFieldId,mainGroupByFieldMetadataViewsByFieldId,viewSortsByFieldId,@@ -139,6 +141,10 @@ export class WorkspaceFlatFieldMetadataMapCacheService extends WorkspaceCacheProentities: views,foreignKey: 'calendarFieldMetadataId',},+ {+ entities: views,+ foreignKey: 'calendarEndFieldMetadataId',+ },{entities: views,foreignKey: 'kanbanAggregateOperationFieldMetadataId',@@ -180,6 +186,8 @@ export class WorkspaceFlatFieldMetadataMapCacheService extends WorkspaceCacheProkanbanViewsByFieldId.get(fieldMetadataEntity.id) || [],calendarViews:calendarViewsByFieldId.get(fieldMetadataEntity.id) || [],+ calendarEndViews:+ calendarEndViewsByFieldId.get(fieldMetadataEntity.id) || [],mainGroupByFieldMetadataViews:mainGroupByFieldMetadataViewsByFieldId.get(fieldMetadataEntity.id,diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/types/__tests__/flat-field-metadata.test-type.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/types/__tests__/flat-field-metadata.test-type.tsindex 21d9f53a8eb..24338e3793d 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/types/__tests__/flat-field-metadata.test-type.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/types/__tests__/flat-field-metadata.test-type.ts@@ -30,6 +30,7 @@ type OneToManyRelationIdArrays = {viewFilterIds: string[];kanbanAggregateOperationViewIds: string[];calendarViewIds: string[];+ calendarEndViewIds: string[];mainGroupByFieldMetadataViewIds: string[];};diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/__tests__/handle-field-metadata-deactivation-side-effects.spec.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/__tests__/handle-field-metadata-deactivation-side-effects.spec.tsnew file mode 100644index 00000000000..0345199dcae--- /dev/null+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/__tests__/handle-field-metadata-deactivation-side-effects.spec.ts@@ -0,0 +1,86 @@+import { FieldMetadataType } from 'twenty-shared/types';++import { createEmptyFlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/constant/create-empty-flat-entity-maps.constant';+import { addFlatEntityToFlatEntityMapsOrThrow } from 'src/engine/metadata-modules/flat-entity/utils/add-flat-entity-to-flat-entity-maps-or-throw.util';+import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';+import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type';+import { handleFieldMetadataDeactivationSideEffects } from 'src/engine/metadata-modules/flat-field-metadata/utils/handle-field-metadata-deactivation-side-effects.util';++const getFlatView = (id: string): FlatView =>+ ({+ id,+ universalIdentifier: `${id}-universal-identifier`,+ applicationId: 'application-id',+ calendarEndFieldMetadataId: 'calendar-end-field-id',+ calendarEndFieldMetadataUniversalIdentifier:+ 'calendar-end-field-universal-identifier',+ }) as FlatView;++describe('handleFieldMetadataDeactivationSideEffects', () => {+ const getEmptyRelatedMaps = () => ({+ flatViewFieldMaps: createEmptyFlatEntityMaps(),+ flatViewFilterMaps: createEmptyFlatEntityMaps(),+ flatViewGroupMaps: createEmptyFlatEntityMaps(),+ });++ it('clears an optional calendar end field without deleting the view', () => {+ const view = getFlatView('calendar-view-id');+ const fromFlatFieldMetadata = getFlatFieldMetadataMock({+ id: 'calendar-end-field-id',+ objectMetadataId: 'object-id',+ universalIdentifier: 'calendar-end-field-universal-identifier',+ type: FieldMetadataType.DATE_TIME,+ calendarEndViewIds: [view.id],+ });++ const result = handleFieldMetadataDeactivationSideEffects({+ fromFlatFieldMetadata,+ toFlatFieldMetadata: {+ ...fromFlatFieldMetadata,+ isActive: false,+ },+ flatViewMaps: addFlatEntityToFlatEntityMapsOrThrow({+ flatEntity: view,+ flatEntityMaps: createEmptyFlatEntityMaps(),+ }),+ ...getEmptyRelatedMaps(),+ });++ expect(result.flatViewsToDelete).toEqual([]);+ expect(result.flatViewsToUpdate).toEqual([+ expect.objectContaining({+ id: view.id,+ calendarEndFieldMetadataId: null,+ calendarEndFieldMetadataUniversalIdentifier: null,+ }),+ ]);+ });++ it('deletes the view when the deactivated field is both its start and end field', () => {+ const view = getFlatView('calendar-view-id');+ const fromFlatFieldMetadata = getFlatFieldMetadataMock({+ id: 'calendar-field-id',+ objectMetadataId: 'object-id',+ universalIdentifier: 'calendar-field-universal-identifier',+ type: FieldMetadataType.DATE,+ calendarViewIds: [view.id],+ calendarEndViewIds: [view.id],+ });++ const result = handleFieldMetadataDeactivationSideEffects({+ fromFlatFieldMetadata,+ toFlatFieldMetadata: {+ ...fromFlatFieldMetadata,+ isActive: false,+ },+ flatViewMaps: addFlatEntityToFlatEntityMapsOrThrow({+ flatEntity: view,+ flatEntityMaps: createEmptyFlatEntityMaps(),+ }),+ ...getEmptyRelatedMaps(),+ });++ expect(result.flatViewsToDelete).toEqual([view]);+ expect(result.flatViewsToUpdate).toEqual([]);+ });+});diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/from-field-metadata-entity-to-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/from-field-metadata-entity-to-flat-field-metadata.util.tsindex 9ed31688788..362d2236634 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/from-field-metadata-entity-to-flat-field-metadata.util.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/from-field-metadata-entity-to-flat-field-metadata.util.ts@@ -49,6 +49,9 @@ export const fromFieldMetadataEntityToFlatFieldMetadata = (kanbanAggregateOperationViewIds:fieldMetadataEntity.kanbanAggregateOperationViews.map(({ id }) => id),calendarViewIds: fieldMetadataEntity.calendarViews.map(({ id }) => id),+ calendarEndViewIds: fieldMetadataEntity.calendarEndViews.map(+ ({ id }) => id,+ ),mainGroupByFieldMetadataViewIds:fieldMetadataEntity.mainGroupByFieldMetadataViews?.map(({ id }) => id) ??[],@@ -69,6 +72,10 @@ export const fromFieldMetadataEntityToFlatFieldMetadata = (calendarViewUniversalIdentifiers: fieldMetadataEntity.calendarViews.map(({ universalIdentifier }) => universalIdentifier,),+ calendarEndViewUniversalIdentifiers:+ fieldMetadataEntity.calendarEndViews.map(+ ({ universalIdentifier }) => universalIdentifier,+ ),mainGroupByFieldMetadataViewUniversalIdentifiers:fieldMetadataEntity.mainGroupByFieldMetadataViews?.map(({ universalIdentifier }) => universalIdentifier,diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/get-default-flat-field-metadata-from-create-field-input.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/get-default-flat-field-metadata-from-create-field-input.util.tsindex 7cd3abd7358..e473bb011e2 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/get-default-flat-field-metadata-from-create-field-input.util.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/get-default-flat-field-metadata-from-create-field-input.util.ts@@ -74,6 +74,7 @@ export const getDefaultFlatFieldMetadata = ({fieldPermissionUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],universalSettings: settings ?? null,viewSortUniversalIdentifiers: [],diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/handle-field-metadata-deactivation-side-effects.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/handle-field-metadata-deactivation-side-effects.util.tsindex 3b3222702ca..a8c3f8892b9 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/handle-field-metadata-deactivation-side-effects.util.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/handle-field-metadata-deactivation-side-effects.util.ts@@ -85,19 +85,34 @@ export const handleFieldMetadataDeactivationSideEffects = ({flatEntityMaps: flatViewMaps,});- const viewIdsToUpdate =- fromFlatFieldMetadata.kanbanAggregateOperationViewIds.filter(- (viewId) => !viewIdsToDelete.includes(viewId),- );+ const kanbanAggregateOperationViewIds = new Set(+ fromFlatFieldMetadata.kanbanAggregateOperationViewIds,+ );+ const calendarEndViewIds = new Set(fromFlatFieldMetadata.calendarEndViewIds);+ const viewIdsToUpdate = [+ ...new Set([...kanbanAggregateOperationViewIds, ...calendarEndViewIds]),+ ].filter((viewId) => !viewIdsToDelete.includes(viewId));const flatViewsToUpdate = findManyFlatEntityByIdInFlatEntityMapsOrThrow({flatEntityIds: viewIdsToUpdate,flatEntityMaps: flatViewMaps,- }).map((flatView) => ({- ...flatView,- kanbanAggregateOperation: null,- kanbanAggregateOperationFieldMetadataId: null,- kanbanAggregateOperationFieldMetadataUniversalIdentifier: null,- }));+ }).map((flatView) => {+ const shouldClearKanbanAggregateOperation =+ kanbanAggregateOperationViewIds.has(flatView.id);+ const shouldClearCalendarEndField = calendarEndViewIds.has(flatView.id);++ return {+ ...flatView,+ ...(shouldClearKanbanAggregateOperation && {+ kanbanAggregateOperation: null,+ kanbanAggregateOperationFieldMetadataId: null,+ kanbanAggregateOperationFieldMetadataUniversalIdentifier: null,+ }),+ ...(shouldClearCalendarEndField && {+ calendarEndFieldMetadataId: null,+ calendarEndFieldMetadataUniversalIdentifier: null,+ }),+ };+ });return {flatViewsToUpdate,diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-view/constants/flat-view-editable-properties.constant.ts b/packages/twenty-server/src/engine/metadata-modules/flat-view/constants/flat-view-editable-properties.constant.tsindex be1f16d9a0d..27dad987df6 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-view/constants/flat-view-editable-properties.constant.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-view/constants/flat-view-editable-properties.constant.ts@@ -12,6 +12,7 @@ export const FLAT_VIEW_EDITABLE_PROPERTIES = ['anyFieldFilterValue','calendarLayout','calendarFieldMetadataId',+ 'calendarEndFieldMetadataId','visibility','mainGroupByFieldMetadataId','shouldHideEmptyGroups',diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-create-view-input-to-flat-view-to-create.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-create-view-input-to-flat-view-to-create.util.tsindex ab12bc5b2db..f52acd890f4 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-create-view-input-to-flat-view-to-create.util.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-create-view-input-to-flat-view-to-create.util.ts@@ -45,6 +45,7 @@ export const fromCreateViewInputToFlatViewToCreate = ({const {objectMetadataUniversalIdentifier,calendarFieldMetadataUniversalIdentifier,+ calendarEndFieldMetadataUniversalIdentifier,kanbanAggregateOperationFieldMetadataUniversalIdentifier,mainGroupByFieldMetadataUniversalIdentifier,} = resolveEntityRelationUniversalIdentifiers({@@ -52,6 +53,7 @@ export const fromCreateViewInputToFlatViewToCreate = ({foreignKeyValues: {objectMetadataId,calendarFieldMetadataId: createViewInput.calendarFieldMetadataId,+ calendarEndFieldMetadataId: createViewInput.calendarEndFieldMetadataId,kanbanAggregateOperationFieldMetadataId:createViewInput.kanbanAggregateOperationFieldMetadataId,mainGroupByFieldMetadataId: createViewInput.mainGroupByFieldMetadataId,@@ -72,6 +74,7 @@ export const fromCreateViewInputToFlatViewToCreate = ({isCustom: true,anyFieldFilterValue: createViewInput.anyFieldFilterValue ?? null,calendarFieldMetadataUniversalIdentifier,+ calendarEndFieldMetadataUniversalIdentifier,calendarLayout: createViewInput.calendarLayout ?? null,icon: createViewInput.icon,isCompact: createViewInput.isCompact ?? false,diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-update-view-input-to-flat-view-to-update-or-throw.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-update-view-input-to-flat-view-to-update-or-throw.util.tsindex 468b4a6be92..d4c02933180 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-update-view-input-to-flat-view-to-update-or-throw.util.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-update-view-input-to-flat-view-to-update-or-throw.util.ts@@ -129,6 +129,20 @@ export const fromUpdateViewInputToFlatViewToUpdateOrThrow = ({calendarFieldMetadataUniversalIdentifier;}+ if (updatedEditableProperties.calendarEndFieldMetadataId !== undefined) {+ const { calendarEndFieldMetadataUniversalIdentifier } =+ resolveEntityRelationUniversalIdentifiers({+ metadataName: 'view',+ foreignKeyValues: {+ calendarEndFieldMetadataId: mergedRecord.calendarEndFieldMetadataId,+ },+ flatEntityMaps: { flatFieldMetadataMaps },+ });++ flatViewToUpdate.calendarEndFieldMetadataUniversalIdentifier =+ calendarEndFieldMetadataUniversalIdentifier;+ }+if (updatedEditableProperties.mainGroupByFieldMetadataId !== undefined) {const { mainGroupByFieldMetadataUniversalIdentifier } =resolveEntityRelationUniversalIdentifiers({diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-view-overrides-to-universal-overrides.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-view-overrides-to-universal-overrides.util.tsindex 14aaa4d8d1b..8e77d45752e 100644--- a/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-view-overrides-to-universal-overrides.util.ts+++ b/packages/twenty-server/src/engine/metadata-modules/flat-view/utils/from-view-overrides-to-universal-overrides.util.ts@@ -13,6 +13,7 @@ type UniversalViewOverrides =const VIEW_OVERRIDES_FIELD_METADATA_FOREIGN_KEYS = ['kanbanAggregateOperationFieldMetadataId','calendarFieldMetadataId',+ 'calendarEndFieldMetadataId','mainGroupByFieldMetadataId',] as const;@@ -39,6 +40,7 @@ export const fromViewOverridesToUniversalOverrides = ({const {kanbanAggregateOperationFieldMetadataId: _kanban,calendarFieldMetadataId: _calendar,+ calendarEndFieldMetadataId: _calendarEnd,mainGroupByFieldMetadataId: _mainGroupBy,...scalarOverrides} = overrides;diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/constants/partial-system-flat-field-metadatas.constant.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/constants/partial-system-flat-field-metadatas.constant.tsindex 6f4b62afac6..ace2387df9c 100644--- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/constants/partial-system-flat-field-metadatas.constant.ts+++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/constants/partial-system-flat-field-metadatas.constant.ts@@ -37,6 +37,7 @@ const PARTIAL_ID_FIELD = {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortUniversalIdentifiers: [],@@ -67,6 +68,7 @@ const PARTIAL_CREATED_AT_FIELD = {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortUniversalIdentifiers: [],@@ -97,6 +99,7 @@ const PARTIAL_UPDATED_AT_FIELD = {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortUniversalIdentifiers: [],@@ -127,6 +130,7 @@ const PARTIAL_DELETED_AT_FIELD = {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortUniversalIdentifiers: [],@@ -157,6 +161,7 @@ const PARTIAL_CREATED_BY_FIELD = {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortUniversalIdentifiers: [],@@ -187,6 +192,7 @@ const PARTIAL_UPDATED_BY_FIELD = {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortUniversalIdentifiers: [],@@ -217,6 +223,7 @@ const PARTIAL_POSITION_FIELD = {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortUniversalIdentifiers: [],@@ -249,6 +256,7 @@ const PARTIAL_SEARCH_VECTOR_FIELD = {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortUniversalIdentifiers: [],diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.tsindex e8bb6c34bb9..9a2ca3db4c3 100644--- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.ts@@ -717,6 +717,7 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEntisCustom: true,anyFieldFilterValue: null,calendarFieldMetadataUniversalIdentifier: null,+ calendarEndFieldMetadataUniversalIdentifier: null,calendarLayout: null,isCompact: false,shouldHideEmptyGroups: false,diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-name-flat-field-metadata-for-custom-object.util.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-name-flat-field-metadata-for-custom-object.util.tsindex 016af839aef..9cea9663c1d 100644--- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-name-flat-field-metadata-for-custom-object.util.ts+++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-name-flat-field-metadata-for-custom-object.util.ts@@ -51,6 +51,7 @@ export const buildNameFlatFieldMetadataForCustomObject = ({viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],universalSettings: null,diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/compute-flat-record-page-fields-view-to-create.util.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/compute-flat-record-page-fields-view-to-create.util.tsindex 4ea594b8e69..d7bde82f908 100644--- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/compute-flat-record-page-fields-view-to-create.util.ts+++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/compute-flat-record-page-fields-view-to-create.util.ts@@ -31,6 +31,7 @@ export const computeFlatRecordPageFieldsViewToCreate = ({isCustom: true,anyFieldFilterValue: null,calendarFieldMetadataUniversalIdentifier: null,+ calendarEndFieldMetadataUniversalIdentifier: null,calendarLayout: null,isCompact: false,shouldHideEmptyGroups: false,diff --git a/packages/twenty-server/src/engine/metadata-modules/view/dtos/inputs/create-view.input.ts b/packages/twenty-server/src/engine/metadata-modules/view/dtos/inputs/create-view.input.tsindex bbafb070dc4..2d71fa488ab 100644--- a/packages/twenty-server/src/engine/metadata-modules/view/dtos/inputs/create-view.input.ts+++ b/packages/twenty-server/src/engine/metadata-modules/view/dtos/inputs/create-view.input.ts@@ -111,6 +111,11 @@ export class CreateViewInput {@Field(() => UUIDScalarType, { nullable: true })calendarFieldMetadataId?: string;+ @IsOptional()+ @IsUUID()+ @Field(() => UUIDScalarType, { nullable: true })+ calendarEndFieldMetadataId?: string;+@IsOptional()@IsUUID()@Field(() => UUIDScalarType, { nullable: true })diff --git a/packages/twenty-server/src/engine/metadata-modules/view/dtos/inputs/update-view.input.ts b/packages/twenty-server/src/engine/metadata-modules/view/dtos/inputs/update-view.input.tsindex eca97af6461..f3b873ba504 100644--- a/packages/twenty-server/src/engine/metadata-modules/view/dtos/inputs/update-view.input.ts+++ b/packages/twenty-server/src/engine/metadata-modules/view/dtos/inputs/update-view.input.ts@@ -88,7 +88,12 @@ export class UpdateViewInput {@IsOptional()@IsUUID()@Field(() => UUIDScalarType, { nullable: true })- calendarFieldMetadataId?: string;+ calendarFieldMetadataId?: string | null;++ @IsOptional()+ @IsUUID()+ @Field(() => UUIDScalarType, { nullable: true })+ calendarEndFieldMetadataId?: string | null;@IsOptional()@IsEnum(ViewVisibility)diff --git a/packages/twenty-server/src/engine/metadata-modules/view/dtos/view.dto.ts b/packages/twenty-server/src/engine/metadata-modules/view/dtos/view.dto.tsindex afe0d01e3f1..c493157b315 100644--- a/packages/twenty-server/src/engine/metadata-modules/view/dtos/view.dto.ts+++ b/packages/twenty-server/src/engine/metadata-modules/view/dtos/view.dto.ts@@ -82,6 +82,9 @@ export class ViewDTO {@Field(() => UUIDScalarType, { nullable: true })calendarFieldMetadataId?: string | null;+ @Field(() => UUIDScalarType, { nullable: true })+ calendarEndFieldMetadataId?: string | null;+@Field(() => UUIDScalarType, { nullable: false })workspaceId: string;diff --git a/packages/twenty-server/src/engine/metadata-modules/view/entities/view.entity.ts b/packages/twenty-server/src/engine/metadata-modules/view/entities/view.entity.tsindex 45aafdfcbe0..aaa43887edd 100644--- a/packages/twenty-server/src/engine/metadata-modules/view/entities/view.entity.ts+++ b/packages/twenty-server/src/engine/metadata-modules/view/entities/view.entity.ts@@ -26,6 +26,7 @@ import { WasIntroducedInUpgrade } from 'src/engine/core-modules/upgrade/decoratoimport { UserWorkspaceEntity } from 'src/engine/core-modules/user-workspace/user-workspace.entity';import { ADD_IS_SYSTEM_SIDE_EFFECT_UPGRADE_COMMAND_NAME } from 'src/database/commands/upgrade-version-command/2-15/is-system-side-effect-upgrade-command-name.constant';import { ADD_VIEW_KANBAN_COLUMN_WIDTH_UPGRADE_COMMAND_NAME } from 'src/database/commands/upgrade-version-command/2-15/add-view-kanban-column-width-upgrade-command-name.constant';+import { ADD_CALENDAR_END_FIELD_METADATA_ID_TO_VIEW_UPGRADE_COMMAND_NAME } from 'src/database/commands/upgrade-version-command/2-22/add-calendar-end-field-metadata-id-to-view-upgrade-command-name.constant';import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';import { ViewFieldGroupEntity } from 'src/engine/metadata-modules/view-field-group/entities/view-field-group.entity';@@ -48,6 +49,7 @@ export type ViewOverrides = {anyFieldFilterValue?: string | null;calendarLayout?: ViewCalendarLayout | null;calendarFieldMetadataId?: SerializedRelation | null;+ calendarEndFieldMetadataId?: SerializedRelation | null;visibility?: ViewVisibility;mainGroupByFieldMetadataId?: SerializedRelation | null;shouldHideEmptyGroups?: boolean;@@ -62,6 +64,7 @@ export type ViewOverrides = {])@Index('IDX_VIEW_VISIBILITY', ['visibility'])@Index('IDX_VIEW_CALENDAR_FIELD_METADATA', ['calendarFieldMetadataId'])+@Index('IDX_VIEW_CALENDAR_END_FIELD_METADATA', ['calendarEndFieldMetadataId'])@Index('IDX_VIEW_KANBAN_FIELD_METADATA', ['kanbanAggregateOperationFieldMetadataId',])@@ -170,6 +173,24 @@ export class ViewEntity@JoinColumn({ name: 'calendarFieldMetadataId' })calendarFieldMetadata: Relation<FieldMetadataEntity> | null;+ @WasIntroducedInUpgrade({+ upgradeCommandName:+ ADD_CALENDAR_END_FIELD_METADATA_ID_TO_VIEW_UPGRADE_COMMAND_NAME,+ })+ @Column({ nullable: true, type: 'uuid' })+ calendarEndFieldMetadataId: string | null;++ @ManyToOne(+ () => FieldMetadataEntity,+ (fieldMetadata) => fieldMetadata.calendarEndViews,+ {+ onDelete: 'SET NULL',+ nullable: true,+ },+ )+ @JoinColumn({ name: 'calendarEndFieldMetadataId' })+ calendarEndFieldMetadata: Relation<FieldMetadataEntity> | null;+@Column({ nullable: true, type: 'uuid' })mainGroupByFieldMetadataId: string | null;diff --git a/packages/twenty-server/src/engine/metadata-modules/view/tools/__tests__/view-tools.factory.spec.ts b/packages/twenty-server/src/engine/metadata-modules/view/tools/__tests__/view-tools.factory.spec.tsindex 0558c4243e9..18a5614f5b8 100644--- a/packages/twenty-server/src/engine/metadata-modules/view/tools/__tests__/view-tools.factory.spec.ts+++ b/packages/twenty-server/src/engine/metadata-modules/view/tools/__tests__/view-tools.factory.spec.ts@@ -30,6 +30,7 @@ describe('ViewToolsFactory', () => {const mockObjectMetadataId = 'object-metadata-id';const mockObjectNameSingular = 'company';const mockCalendarFieldMetadataId = 'calendar-field-metadata-id';+ const mockCalendarEndFieldMetadataId = 'calendar-end-field-metadata-id';const mockNameFieldMetadataId = 'name-field-metadata-id';const mockStageFieldMetadataId = 'stage-field-metadata-id';@@ -43,6 +44,13 @@ describe('ViewToolsFactory', () => {objectMetadataId: mockObjectMetadataId,universalIdentifier: 'field-universal-id',},+ 'end-field-universal-id': {+ id: mockCalendarEndFieldMetadataId,+ name: 'endsAt',+ type: FieldMetadataType.DATE_TIME,+ objectMetadataId: mockObjectMetadataId,+ universalIdentifier: 'end-field-universal-id',+ },'name-field-universal-id': {id: mockNameFieldMetadataId,name: 'name',@@ -783,6 +791,40 @@ describe('ViewToolsFactory', () => {expect(viewService.createOne).not.toHaveBeenCalled();});+ it('should resolve and update the calendar end field on an existing view', async () => {+ const existingView = {+ ...mockView,+ type: ViewType.CALENDAR,+ visibility: ViewVisibility.WORKSPACE,+ };++ viewService.findById.mockResolvedValue(existingView as any);+ completeViewUpsertService.upsertCompleteView.mockResolvedValue({+ ...existingView,+ calendarEndFieldMetadataId: mockCalendarEndFieldMetadataId,+ } as any);++ const tools = viewToolsFactory.generateWriteTools(+ mockWorkspaceId,+ mockUserWorkspaceId,+ );++ await callExecute(tools['upsert_complete_view'], {+ id: mockViewId,+ calendarEndFieldName: 'endsAt',+ });++ expect(+ completeViewUpsertService.upsertCompleteView,+ ).toHaveBeenCalledWith(+ expect.objectContaining({+ existingViewId: mockViewId,+ objectMetadataId: mockObjectMetadataId,+ calendarEndFieldMetadataId: mockCalendarEndFieldMetadataId,+ }),+ );+ });+it('should pass an empty sorts array through to upsertCompleteView on update', async () => {const existingView = {...mockView,diff --git a/packages/twenty-server/src/engine/metadata-modules/view/tools/services/complete-view-upsert.service.ts b/packages/twenty-server/src/engine/metadata-modules/view/tools/services/complete-view-upsert.service.tsindex 0aba980f142..5544c6ff1c9 100644--- a/packages/twenty-server/src/engine/metadata-modules/view/tools/services/complete-view-upsert.service.ts+++ b/packages/twenty-server/src/engine/metadata-modules/view/tools/services/complete-view-upsert.service.ts@@ -72,6 +72,7 @@ export class CompleteViewUpsertService {kanbanAggregateOperationFieldMetadataId,calendarLayout,calendarFieldMetadataId,+ calendarEndFieldMetadataId,fields,filters,sorts,@@ -89,6 +90,7 @@ export class CompleteViewUpsertService {kanbanAggregateOperationFieldMetadataId?: string;calendarLayout?: ViewCalendarLayout;calendarFieldMetadataId?: string;+ calendarEndFieldMetadataId?: string;fields?: CompleteViewFieldSpec[];filters?: CompleteViewFilterSpec[];sorts?: CompleteViewSortSpec[];@@ -138,6 +140,7 @@ export class CompleteViewUpsertService {existingViewId,name,icon,+ calendarEndFieldMetadataId,userWorkspaceId,applicationUniversalIdentifier,flatViewMaps,@@ -155,6 +158,7 @@ export class CompleteViewUpsertService {kanbanAggregateOperationFieldMetadataId,calendarLayout,calendarFieldMetadataId,+ calendarEndFieldMetadataId,userWorkspaceId,flatApplication: workspaceCustomFlatApplication,flatFieldMetadataMaps,@@ -251,6 +255,7 @@ export class CompleteViewUpsertService {kanbanAggregateOperationFieldMetadataId,calendarLayout,calendarFieldMetadataId,+ calendarEndFieldMetadataId,userWorkspaceId,flatApplication,flatFieldMetadataMaps,@@ -266,6 +271,7 @@ export class CompleteViewUpsertService {kanbanAggregateOperationFieldMetadataId?: string;calendarLayout?: ViewCalendarLayout;calendarFieldMetadataId?: string;+ calendarEndFieldMetadataId?: string;userWorkspaceId?: string;flatApplication: FlatApplication;flatFieldMetadataMaps: AllFlatEntityMaps['flatFieldMetadataMaps'];@@ -291,6 +297,7 @@ export class CompleteViewUpsertService {kanbanAggregateOperationFieldMetadataId,calendarLayout,calendarFieldMetadataId,+ calendarEndFieldMetadataId,},createdByUserWorkspaceId: userWorkspaceId,flatApplication,@@ -322,6 +329,7 @@ export class CompleteViewUpsertService {existingViewId,name,icon,+ calendarEndFieldMetadataId,userWorkspaceId,applicationUniversalIdentifier,flatViewMaps,@@ -331,19 +339,29 @@ export class CompleteViewUpsertService {existingViewId: string;name?: string;icon?: string;+ calendarEndFieldMetadataId?: string;userWorkspaceId?: string;applicationUniversalIdentifier: string;flatViewMaps: AllFlatEntityMaps['flatViewMaps'];flatViewGroupMaps: AllFlatEntityMaps['flatViewGroupMaps'];flatFieldMetadataMaps: AllFlatEntityMaps['flatFieldMetadataMaps'];}): ViewUpsertRootOperations {- if (!isDefined(name) && !isDefined(icon)) {+ if (+ !isDefined(name) &&+ !isDefined(icon) &&+ !isDefined(calendarEndFieldMetadataId)+ ) {return { viewId: existingViewId };}const { flatViewToUpdate, flatViewGroupsToDelete, flatViewGroupsToCreate } =fromUpdateViewInputToFlatViewToUpdateOrThrow({- updateViewInput: { id: existingViewId, name, icon },+ updateViewInput: {+ id: existingViewId,+ name,+ icon,+ calendarEndFieldMetadataId,+ },flatViewMaps,flatViewGroupMaps,flatFieldMetadataMaps,diff --git a/packages/twenty-server/src/engine/metadata-modules/view/tools/view-tools.factory.ts b/packages/twenty-server/src/engine/metadata-modules/view/tools/view-tools.factory.tsindex 8ffe45a5a5e..3437695b85f 100644--- a/packages/twenty-server/src/engine/metadata-modules/view/tools/view-tools.factory.ts+++ b/packages/twenty-server/src/engine/metadata-modules/view/tools/view-tools.factory.ts@@ -107,6 +107,12 @@ const CreateViewInputSchema = z.object({.describe('Date field name to use for the calendar (required for CALENDAR views, must be a DATE or DATE_TIME field, e.g., "createdAt", "dueAt")',),+ calendarEndFieldName: z+ .string()+ .optional()+ .describe(+ 'Optional end date field name for the calendar. It must have the same DATE or DATE_TIME type as calendarFieldName.',+ ),fieldNames: z.array(z.string()).optional()@@ -244,6 +250,12 @@ const UpsertCompleteViewInputSchema = z.object({.describe('Date field name for the calendar (required for CALENDAR, must be DATE or DATE_TIME).',),+ calendarEndFieldName: z+ .string()+ .optional()+ .describe(+ 'Optional end date field name for the calendar. It must match the type of calendarFieldName.',+ ),fields: z.array(UpsertCompleteViewFieldSchema).optional()@@ -272,6 +284,7 @@ type UpsertCompleteViewIdentifiers = {mainGroupByFieldMetadataId?: string;kanbanAggregateOperationFieldMetadataId?: string;calendarFieldMetadataId?: string;+ calendarEndFieldMetadataId?: string;};@Injectable()@@ -448,6 +461,7 @@ export class ViewToolsFactory {kanbanAggregateOperationFieldName?: string;calendarLayout?: ViewCalendarLayout;calendarFieldName?: string;+ calendarEndFieldName?: string;};workspaceId: string;userWorkspaceId?: string;@@ -469,9 +483,20 @@ export class ViewToolsFactory {throw new Error('You can only update your own unlisted views');}+ const calendarEndFieldMetadataId = isDefined(+ parameters.calendarEndFieldName,+ )+ ? await this.resolveCalendarFieldMetadataId(+ workspaceId,+ existingView.objectMetadataId,+ parameters.calendarEndFieldName,+ )+ : undefined;+return {existingViewId: existingView.id,objectMetadataId: existingView.objectMetadataId,+ calendarEndFieldMetadataId,};}@@ -537,11 +562,22 @@ export class ViewToolsFactory {): undefined;+ const calendarEndFieldMetadataId = isDefined(+ parameters.calendarEndFieldName,+ )+ ? await this.resolveCalendarFieldMetadataId(+ workspaceId,+ objectMetadataId,+ parameters.calendarEndFieldName,+ )+ : undefined;+return {objectMetadataId,mainGroupByFieldMetadataId,kanbanAggregateOperationFieldMetadataId,calendarFieldMetadataId,+ calendarEndFieldMetadataId,};}@@ -636,6 +672,7 @@ VIEW TYPES: TABLE (default), KANBAN (requires mainGroupByFieldName, a SELECT fiekanbanAggregateOperationFieldName?: string;calendarLayout?: ViewCalendarLayout;calendarFieldName?: string;+ calendarEndFieldName?: string;fields?: Array<FieldReference & { isVisible?: boolean; size?: number }>;@@ -655,6 +692,7 @@ VIEW TYPES: TABLE (default), KANBAN (requires mainGroupByFieldName, a SELECT fiemainGroupByFieldMetadataId,kanbanAggregateOperationFieldMetadataId,calendarFieldMetadataId,+ calendarEndFieldMetadataId,} = await this.resolveUpsertCompleteViewIdentifiersOrThrow({parameters,workspaceId,@@ -718,6 +756,7 @@ VIEW TYPES: TABLE (default), KANBAN (requires mainGroupByFieldName, a SELECT fiekanbanAggregateOperationFieldMetadataId,calendarLayout: parameters.calendarLayout,calendarFieldMetadataId,+ calendarEndFieldMetadataId,fields,filters,sorts,@@ -757,6 +796,7 @@ VIEW TYPES: TABLE (default), KANBAN (requires mainGroupByFieldName, a SELECT fiekanbanAggregateOperationFieldName?: string;calendarLayout?: ViewCalendarLayout;calendarFieldName?: string;+ calendarEndFieldName?: string;fieldNames?: string[];}) => {try {@@ -791,6 +831,7 @@ VIEW TYPES: TABLE (default), KANBAN (requires mainGroupByFieldName, a SELECT fielet mainGroupByFieldMetadataId: string | undefined;let kanbanAggregateOperationFieldMetadataId: string | undefined;let calendarFieldMetadataId: string | undefined;+ let calendarEndFieldMetadataId: string | undefined;if (parameters.mainGroupByFieldName) {mainGroupByFieldMetadataId =@@ -819,6 +860,15 @@ VIEW TYPES: TABLE (default), KANBAN (requires mainGroupByFieldName, a SELECT fie);}+ if (parameters.calendarEndFieldName) {+ calendarEndFieldMetadataId =+ await this.resolveCalendarFieldMetadataId(+ workspaceId,+ objectMetadataId,+ parameters.calendarEndFieldName,+ );+ }+const view = await this.viewService.createOne({createViewInput: {name: parameters.name,@@ -832,6 +882,7 @@ VIEW TYPES: TABLE (default), KANBAN (requires mainGroupByFieldName, a SELECT fiekanbanAggregateOperationFieldMetadataId,calendarLayout: parameters.calendarLayout,calendarFieldMetadataId,+ calendarEndFieldMetadataId,},workspaceId,createdByUserWorkspaceId: userWorkspaceId,diff --git a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.tsindex e4b4ec5db9a..83cc1e42de2 100644--- a/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts+++ b/packages/twenty-server/src/engine/twenty-orm/entity-manager/workspace-entity-manager.spec.ts@@ -169,6 +169,7 @@ describe('WorkspaceEntityManager', () => {fieldPermissionIds: [],kanbanAggregateOperationViewIds: [],calendarViewIds: [],+ calendarEndViewIds: [],mainGroupByFieldMetadataViewIds: [],relationTargetFieldMetadataId: null,relationTargetObjectMetadataId: null,@@ -182,6 +183,7 @@ describe('WorkspaceEntityManager', () => {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortIds: [],@@ -236,6 +238,7 @@ describe('WorkspaceEntityManager', () => {featureFlagsMap: {IS_UNIQUE_INDEXES_ENABLED: false,IS_JSON_FILTER_ENABLED: false,+ IS_CALENDAR_WEEK_VIEW_ENABLED: false,IS_EMAIL_GROUP_ENABLED: false,IS_JUNCTION_RELATIONS_ENABLED: false,IS_REST_METADATA_API_NEW_FORMAT_DIRECT: false,diff --git a/packages/twenty-server/src/engine/twenty-orm/repository/__tests__/workspace.repository.spec.ts b/packages/twenty-server/src/engine/twenty-orm/repository/__tests__/workspace.repository.spec.tsindex 7f64eb729cf..a207e8f0018 100644--- a/packages/twenty-server/src/engine/twenty-orm/repository/__tests__/workspace.repository.spec.ts+++ b/packages/twenty-server/src/engine/twenty-orm/repository/__tests__/workspace.repository.spec.ts@@ -92,6 +92,7 @@ describe('WorkspaceRepository', () => {relationTargetFieldMetadataId: null,relationTargetObjectMetadataId: null,calendarViewIds: [],+ calendarEndViewIds: [],viewFilterIds: [],fieldPermissionIds: [],kanbanAggregateOperationViewIds: [],@@ -105,6 +106,7 @@ describe('WorkspaceRepository', () => {viewFieldUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],fieldPermissionUniversalIdentifiers: [],viewSortIds: [],diff --git a/packages/twenty-server/src/engine/twenty-orm/upgrade-aware/__tests__/upgrade-aware-repository.proxy.spec.ts b/packages/twenty-server/src/engine/twenty-orm/upgrade-aware/__tests__/upgrade-aware-repository.proxy.spec.tsindex 9961f9a3f7a..dc4e8eaaec9 100644--- a/packages/twenty-server/src/engine/twenty-orm/upgrade-aware/__tests__/upgrade-aware-repository.proxy.spec.ts+++ b/packages/twenty-server/src/engine/twenty-orm/upgrade-aware/__tests__/upgrade-aware-repository.proxy.spec.ts@@ -18,6 +18,8 @@ const INTRODUCE_STEP = '2.7.0_Introduce_1800000000000';@WasIntroducedInUpgrade({ upgradeCommandName: INTRODUCE_STEP })class UnavailableEntity {}+class EntityWithHiddenColumn {}+describe('wrapRepositoryWithUpgradeAwareProxy', () => {it('short-circuits find() to an empty array when the entity is unavailable', async () => {const metadata = {@@ -71,4 +73,79 @@ describe('wrapRepositoryWithUpgradeAwareProxy', () => {await expect(wrapped.find()).resolves.toEqual([]);expect(find).not.toHaveBeenCalled();});++ it('strips hidden columns from an array select while preserving unknown keys', async () => {+ const find = jest.fn().mockResolvedValue([]);+ const repository = {+ find,+ metadata: {+ relations: [],+ targetName: EntityWithHiddenColumn.name,+ },+ } as unknown as Repository<EntityWithHiddenColumn>;+ const state = {+ getHiddenColumnPropertyNames: jest+ .fn()+ .mockReturnValue(new Set(['introducedColumn'])),+ isEntityAvailable: jest.fn().mockReturnValue(true),+ } as unknown as UpgradeAwareRepositoryState;+ const wrapped = wrapRepositoryWithUpgradeAwareProxy({+ repository,+ entityClass: EntityWithHiddenColumn,+ state,+ });++ await (+ wrapped.find as unknown as (options: {+ select: string[];+ }) => Promise<unknown>+ )({+ select: ['id', 'introducedColumn', 'unknownTypo'],+ });++ expect(find).toHaveBeenCalledWith({+ select: ['id', 'unknownTypo'],+ });+ });++ it('strips hidden columns from an object select while preserving unknown keys', async () => {+ const find = jest.fn().mockResolvedValue([]);+ const repository = {+ find,+ metadata: {+ relations: [],+ targetName: EntityWithHiddenColumn.name,+ },+ } as unknown as Repository<EntityWithHiddenColumn>;+ const state = {+ getHiddenColumnPropertyNames: jest+ .fn()+ .mockReturnValue(new Set(['introducedColumn'])),+ isEntityAvailable: jest.fn().mockReturnValue(true),+ } as unknown as UpgradeAwareRepositoryState;+ const wrapped = wrapRepositoryWithUpgradeAwareProxy({+ repository,+ entityClass: EntityWithHiddenColumn,+ state,+ });++ await (+ wrapped.find as unknown as (options: {+ select: Record<string, boolean>;+ }) => Promise<unknown>+ )({+ select: {+ id: true,+ introducedColumn: true,+ unknownTypo: true,+ },+ });++ expect(find).toHaveBeenCalledWith({+ select: {+ id: true,+ unknownTypo: true,+ },+ });+ });});diff --git a/packages/twenty-server/src/engine/twenty-orm/upgrade-aware/upgrade-aware-repository.proxy.ts b/packages/twenty-server/src/engine/twenty-orm/upgrade-aware/upgrade-aware-repository.proxy.tsindex 8f0de48bd4f..38a3b43127e 100644--- a/packages/twenty-server/src/engine/twenty-orm/upgrade-aware/upgrade-aware-repository.proxy.ts+++ b/packages/twenty-server/src/engine/twenty-orm/upgrade-aware/upgrade-aware-repository.proxy.ts@@ -109,6 +109,61 @@ const METHODS_THAT_ACCEPT_FIND_OPTIONS = new Set<string>(['existsBy',]);+const stripUnavailableSelect = (+ entityClass: Function,+ state: UpgradeAwareRepositoryState,+ options: unknown,+): unknown => {+ if (!isDefined(options) || typeof options !== 'object') {+ return options;+ }++ const withSelect = options as { select?: unknown };++ if (!isDefined(withSelect.select)) {+ return options;+ }++ const hiddenColumnPropertyNames =+ state.getHiddenColumnPropertyNames(entityClass);++ if (hiddenColumnPropertyNames.size === 0) {+ return options;+ }++ if (Array.isArray(withSelect.select)) {+ const filtered = withSelect.select.filter(+ (propertyName) =>+ typeof propertyName !== 'string' ||+ !hiddenColumnPropertyNames.has(propertyName),+ );++ if (filtered.length === withSelect.select.length) {+ return options;+ }++ return { ...withSelect, select: filtered };+ }++ if (typeof withSelect.select === 'object') {+ const filtered = Object.fromEntries(+ Object.entries(withSelect.select).filter(+ ([propertyName]) => !hiddenColumnPropertyNames.has(propertyName),+ ),+ );++ if (+ Object.keys(filtered).length === Object.keys(withSelect.select).length+ ) {+ return options;+ }++ return { ...withSelect, select: filtered };+ }++ return options;+};+const stripUnavailableRelations = (metadata: EntityMetadata,state: UpgradeAwareRepositoryState,@@ -262,7 +317,11 @@ const handleRepositoryMethodCall = <Entity extends object>({const rewrittenArgs =METHODS_THAT_ACCEPT_FIND_OPTIONS.has(methodName) && args.length > 0? [- stripUnavailableRelations(target.metadata, state, args[0]),+ stripUnavailableSelect(+ entityClass,+ state,+ stripUnavailableRelations(target.metadata, state, args[0]),+ ),...args.slice(1),]: args;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 be800462774..3ffa6bc109c 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@@ -25,6 +25,11 @@ export const seedFeatureFlags = async ({workspaceId: workspaceId,value: false,},+ {+ key: FeatureFlagKey.IS_CALENDAR_WEEK_VIEW_ENABLED,+ workspaceId: workspaceId,+ value: true,+ },{key: FeatureFlagKey.IS_EMAIL_GROUP_ENABLED,workspaceId: workspaceId,diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-field-flat-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-field-flat-metadata.util.tsindex d839c011301..c785293da86 100644--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-field-flat-metadata.util.ts+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-field-flat-metadata.util.ts@@ -100,6 +100,7 @@ export const createStandardFieldFlatMetadata = <fieldPermissionIds: [],kanbanAggregateOperationViewIds: [],calendarViewIds: [],+ calendarEndViewIds: [],mainGroupByFieldMetadataViewIds: [],createdAt: now,updatedAt: now,@@ -114,6 +115,7 @@ export const createStandardFieldFlatMetadata = <fieldPermissionUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],viewSortIds: [],viewSortUniversalIdentifiers: [],diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-relation-field-flat-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-relation-field-flat-metadata.util.tsindex 4267f6c29b0..db322958cd2 100644--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-relation-field-flat-metadata.util.ts+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-relation-field-flat-metadata.util.ts@@ -119,6 +119,7 @@ export const createStandardRelationFieldFlatMetadata = <fieldPermissionIds: [],kanbanAggregateOperationViewIds: [],calendarViewIds: [],+ calendarEndViewIds: [],mainGroupByFieldMetadataViewIds: [],createdAt: now,updatedAt: now,@@ -135,6 +136,7 @@ export const createStandardRelationFieldFlatMetadata = <fieldPermissionUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],viewSortIds: [],viewSortUniversalIdentifiers: [],diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util.tsindex d4030ff011a..3911cf6c2e9 100644--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util.ts+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util.ts@@ -29,6 +29,7 @@ export type CreateStandardViewOptions<O extends AllStandardObjectName> = {kanbanAggregateOperationFieldName?: AllStandardObjectFieldName<O>;mainGroupByFieldName?: AllStandardObjectFieldName<O>;calendarFieldName?: AllStandardObjectFieldName<O>;+ calendarEndFieldName?: AllStandardObjectFieldName<O>;};export type CreateStandardViewArgs<@@ -57,6 +58,7 @@ export const createStandardViewFlatMetadata = <kanbanAggregateOperationFieldName,mainGroupByFieldName,calendarFieldName,+ calendarEndFieldName,},standardObjectMetadataRelatedEntityIds,twentyStandardApplicationId,@@ -95,6 +97,12 @@ export const createStandardViewFlatMetadata = <].id: null;+ const calendarEndFieldMetadataId = calendarEndFieldName+ ? standardObjectMetadataRelatedEntityIds[objectName].fields[+ calendarEndFieldName+ ].id+ : null;+const kanbanAggregateOperationFieldMetadataUniversalIdentifier =kanbanAggregateOperationFieldName? // @ts-expect-error ignore@@ -113,8 +121,15 @@ export const createStandardViewFlatMetadata = <STANDARD_OBJECTS[objectName].fields[calendarFieldName].universalIdentifier: null;+ const calendarEndFieldMetadataUniversalIdentifier = calendarEndFieldName+ ? // @ts-expect-error ignore+ STANDARD_OBJECTS[objectName].fields[calendarEndFieldName]+ .universalIdentifier+ : null;+return {calendarFieldMetadataUniversalIdentifier,+ calendarEndFieldMetadataUniversalIdentifier,kanbanAggregateOperationFieldMetadataUniversalIdentifier,mainGroupByFieldMetadataUniversalIdentifier,objectMetadataUniversalIdentifier,@@ -140,6 +155,7 @@ export const createStandardViewFlatMetadata = <kanbanColumnWidth: null,calendarLayout: null,calendarFieldMetadataId,+ calendarEndFieldMetadataId,anyFieldFilterValue: null,visibility: ViewVisibility.WORKSPACE,createdByUserWorkspaceId: null,diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/constants/__tests__/__snapshots__/all-universal-flat-entity-foreign-key-aggregator-properties.constant.spec.ts.snap b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/constants/__tests__/__snapshots__/all-universal-flat-entity-foreign-key-aggregator-properties.constant.spec.ts.snapindex 27a4580941b..52fab0b9bb9 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/constants/__tests__/__snapshots__/all-universal-flat-entity-foreign-key-aggregator-properties.constant.spec.ts.snap+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/constants/__tests__/__snapshots__/all-universal-flat-entity-foreign-key-aggregator-properties.constant.spec.ts.snap@@ -13,6 +13,7 @@ exports[`ALL_UNIVERSAL_FLAT_ENTITY_FOREIGN_KEY_AGGREGATOR_PROPERTIES should matc"viewFilterUniversalIdentifiers","kanbanAggregateOperationViewUniversalIdentifiers","calendarViewUniversalIdentifiers",+ "calendarEndViewUniversalIdentifiers","mainGroupByFieldMetadataViewUniversalIdentifiers","searchFieldMetadataUniversalIdentifiers",],diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/__tests__/universal-flat-field-metadata.test-type.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/__tests__/universal-flat-field-metadata.test-type.tsindex f0a4c186b60..c2a4429c3b9 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/__tests__/universal-flat-field-metadata.test-type.ts+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/__tests__/universal-flat-field-metadata.test-type.ts@@ -39,6 +39,7 @@ type OneToManyUniversalIdentifierArrays = {viewFilterUniversalIdentifiers: string[];kanbanAggregateOperationViewUniversalIdentifiers: string[];calendarViewUniversalIdentifiers: string[];+ calendarEndViewUniversalIdentifiers: string[];mainGroupByFieldMetadataViewUniversalIdentifiers: string[];};diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/metadata-universal-flat-entity-properties-to-compare.type.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/metadata-universal-flat-entity-properties-to-compare.type.tsindex 575d1e26883..53dca31d87e 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/metadata-universal-flat-entity-properties-to-compare.type.ts+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/metadata-universal-flat-entity-properties-to-compare.type.ts@@ -61,6 +61,7 @@ type Assertions = [| 'kanbanAggregateOperationFieldMetadataUniversalIdentifier'| 'calendarLayout'| 'calendarFieldMetadataUniversalIdentifier'+ | 'calendarEndFieldMetadataUniversalIdentifier'| 'mainGroupByFieldMetadataUniversalIdentifier'| 'shouldHideEmptyGroups'| 'kanbanColumnWidth'diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/__snapshots__/universal-flat-entity-deleted-created-updated-matrix-dispatcher.util.spec.ts.snap b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/__snapshots__/universal-flat-entity-deleted-created-updated-matrix-dispatcher.util.spec.ts.snapindex 0802102e8d3..3afbcf725ec 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/__snapshots__/universal-flat-entity-deleted-created-updated-matrix-dispatcher.util.spec.ts.snap+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/__snapshots__/universal-flat-entity-deleted-created-updated-matrix-dispatcher.util.spec.ts.snap@@ -7,6 +7,8 @@ exports[`flatEntityDeletedCreatedUpdatedMatrixDispatcher It should detect a crea"universal-identifier-1": {"applicationId": "application-id-1","applicationUniversalIdentifier": "application-universal-identifier-1",+ "calendarEndViewIds": [],+ "calendarEndViewUniversalIdentifiers": [],"calendarViewIds": [],"calendarViewUniversalIdentifiers": [],"createdAt": "2024-01-01T00:00:00.000Z",@@ -74,6 +76,8 @@ exports[`flatEntityDeletedCreatedUpdatedMatrixDispatcher It should detect a dele"universal-identifier-1": {"applicationId": "application-id-1","applicationUniversalIdentifier": "application-universal-identifier-1",+ "calendarEndViewIds": [],+ "calendarEndViewUniversalIdentifiers": [],"calendarViewIds": [],"calendarViewUniversalIdentifiers": [],"createdAt": "2024-01-01T00:00:00.000Z",@@ -155,6 +159,8 @@ exports[`flatEntityDeletedCreatedUpdatedMatrixDispatcher It should detect create"universal-identifier-3": {"applicationId": "application-id-1","applicationUniversalIdentifier": "application-universal-identifier-1",+ "calendarEndViewIds": [],+ "calendarEndViewUniversalIdentifiers": [],"calendarViewIds": [],"calendarViewUniversalIdentifiers": [],"createdAt": "2024-01-01T00:00:00.000Z",@@ -208,6 +214,8 @@ exports[`flatEntityDeletedCreatedUpdatedMatrixDispatcher It should detect create"universal-identifier-2": {"applicationId": "application-id-1","applicationUniversalIdentifier": "application-universal-identifier-1",+ "calendarEndViewIds": [],+ "calendarEndViewUniversalIdentifiers": [],"calendarViewIds": [],"calendarViewUniversalIdentifiers": [],"createdAt": "2024-01-01T00:00:00.000Z",diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/add-universal-flat-entity-to-universal-flat-entity-and-related-entity-maps-through-mutation-or-throw.util.spec.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/add-universal-flat-entity-to-universal-flat-entity-and-related-entity-maps-through-mutation-or-throw.util.spec.tsindex 0c64b0288c6..f462002f994 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/add-universal-flat-entity-to-universal-flat-entity-and-related-entity-maps-through-mutation-or-throw.util.spec.ts+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/add-universal-flat-entity-to-universal-flat-entity-and-related-entity-maps-through-mutation-or-throw.util.spec.ts@@ -67,6 +67,7 @@ describe('addUniversalFlatEntityToUniversalFlatEntityAndRelatedEntityMapsThroughviewFieldUniversalIdentifiers: [],viewFilterUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],mainGroupByFieldMetadataViewUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],createdAt: '2024-01-01T00:00:00.000Z',@@ -100,6 +101,8 @@ describe('addUniversalFlatEntityToUniversalFlatEntityAndRelatedEntityMapsThroughapplicationUniversalIdentifier,calendarFieldMetadataUniversalIdentifier:fieldMetadataUniversalIdentifier,+ calendarEndFieldMetadataUniversalIdentifier:+ fieldMetadataUniversalIdentifier,createdAt: '2024-01-01T00:00:00.000Z',updatedAt: '2024-01-01T00:00:00.000Z',name: 'Test View',@@ -176,6 +179,7 @@ describe('addUniversalFlatEntityToUniversalFlatEntityAndRelatedEntityMapsThroughexpect(updatedFieldMetadata).toMatchObject({calendarViewUniversalIdentifiers: [viewUniversalIdentifier],+ calendarEndViewUniversalIdentifiers: [viewUniversalIdentifier],});});diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/delete-universal-flat-entity-from-universal-flat-entity-and-related-entity-maps-through-mutation-or-throw.util.spec.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/delete-universal-flat-entity-from-universal-flat-entity-and-related-entity-maps-through-mutation-or-throw.util.spec.tsindex 404e15b83b0..b38b29e0916 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/delete-universal-flat-entity-from-universal-flat-entity-and-related-entity-maps-through-mutation-or-throw.util.spec.ts+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/universal-flat-entity/utils/__tests__/delete-universal-flat-entity-from-universal-flat-entity-and-related-entity-maps-through-mutation-or-throw.util.spec.ts@@ -63,6 +63,7 @@ describe('deleteUniversalFlatEntityFromUniversalFlatEntityAndRelatedEntityMapsThviewFieldUniversalIdentifiers: [],viewFilterUniversalIdentifiers: [],calendarViewUniversalIdentifiers: [viewUniversalIdentifier],+ calendarEndViewUniversalIdentifiers: [viewUniversalIdentifier],mainGroupByFieldMetadataViewUniversalIdentifiers: [],kanbanAggregateOperationViewUniversalIdentifiers: [],createdAt: '2024-01-01T00:00:00.000Z',@@ -96,6 +97,8 @@ describe('deleteUniversalFlatEntityFromUniversalFlatEntityAndRelatedEntityMapsThapplicationUniversalIdentifier,calendarFieldMetadataUniversalIdentifier:fieldMetadataUniversalIdentifier,+ calendarEndFieldMetadataUniversalIdentifier:+ fieldMetadataUniversalIdentifier,createdAt: '2024-01-01T00:00:00.000Z',updatedAt: '2024-01-01T00:00:00.000Z',name: 'Test View',@@ -185,6 +188,7 @@ describe('deleteUniversalFlatEntityFromUniversalFlatEntityAndRelatedEntityMapsThexpect(updatedFieldMetadata).toMatchObject({calendarViewUniversalIdentifiers: [],+ calendarEndViewUniversalIdentifiers: [],});});});diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/services/flat-view-validator.service.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/services/flat-view-validator.service.tsindex 2fc4141f73a..c6094451ccb 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/services/flat-view-validator.service.ts+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-builder/validators/services/flat-view-validator.service.ts@@ -6,9 +6,13 @@ import { isDefined } from 'twenty-shared/utils';import { findFlatEntityByUniversalIdentifier } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-universal-identifier.util';import { isMorphOrRelationUniversalFlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/utils/is-morph-or-relation-flat-field-metadata.util';import { ViewExceptionCode } from 'src/engine/metadata-modules/view/exceptions/view.exception';+import { type AllUniversalFlatEntityMaps } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/all-universal-flat-entity-maps.type';import { type UniversalFlatFieldMetadata } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/universal-flat-field-metadata.type';import { type UniversalFlatView } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/universal-flat-view.type';-import { type FailedFlatEntityValidation } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/builders/types/failed-flat-entity-validation.type';+import {+ type FailedFlatEntityValidation,+ type FlatEntityValidationError,+} from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/builders/types/failed-flat-entity-validation.type';import { getEmptyFlatEntityValidationError } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/builders/utils/get-flat-entity-validation-error.util';import { type FlatEntityUpdateValidationArgs } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/types/universal-flat-entity-update-validation-args.type';import { type UniversalFlatEntityValidationArgs } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-builder/types/universal-flat-entity-validation-args.type';@@ -16,6 +20,142 @@ import { type UniversalFlatEntityValidationArgs } from 'src/engine/workspace-manexport class FlatViewValidatorService {constructor() {}+ private validateCalendarFields({+ flatView,+ flatFieldMetadataMaps,+ }: {+ flatView: UniversalFlatView;+ flatFieldMetadataMaps: AllUniversalFlatEntityMaps['flatFieldMetadataMaps'];+ }): FlatEntityValidationError[] {+ if (flatView.type !== ViewType.CALENDAR) {+ return [];+ }++ const errors: FlatEntityValidationError[] = [];++ if (!isDefined(flatView.calendarLayout)) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar view must have a calendar layout`,+ userFriendlyMessage: msg`Calendar view must have a calendar layout`,+ });+ }++ if (!isDefined(flatView.calendarFieldMetadataUniversalIdentifier)) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar view must have a calendar field`,+ userFriendlyMessage: msg`Calendar view must have a calendar field`,+ });++ return errors;+ }++ const calendarFieldMetadata = findFlatEntityByUniversalIdentifier({+ universalIdentifier: flatView.calendarFieldMetadataUniversalIdentifier,+ flatEntityMaps: flatFieldMetadataMaps,+ });++ if (!isDefined(calendarFieldMetadata)) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar field metadata not found`,+ userFriendlyMessage: msg`Calendar field not found`,+ });++ return errors;+ }++ if (+ calendarFieldMetadata.objectMetadataUniversalIdentifier !==+ flatView.objectMetadataUniversalIdentifier+ ) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar field must belong to the view object`,+ userFriendlyMessage: msg`Calendar field must belong to the view object`,+ });+ }++ const calendarFieldIsDateKind =+ calendarFieldMetadata.type === FieldMetadataType.DATE ||+ calendarFieldMetadata.type === FieldMetadataType.DATE_TIME;++ if (!calendarFieldIsDateKind) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar field must be a date or date time field`,+ userFriendlyMessage: msg`Calendar field must be a date or date time field`,+ });+ }++ if (!isDefined(flatView.calendarEndFieldMetadataUniversalIdentifier)) {+ return errors;+ }++ if (+ flatView.calendarEndFieldMetadataUniversalIdentifier ===+ flatView.calendarFieldMetadataUniversalIdentifier+ ) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar start and end fields must be different`,+ userFriendlyMessage: msg`Calendar start and end fields must be different`,+ });++ return errors;+ }++ const calendarEndFieldMetadata = findFlatEntityByUniversalIdentifier({+ universalIdentifier: flatView.calendarEndFieldMetadataUniversalIdentifier,+ flatEntityMaps: flatFieldMetadataMaps,+ });++ if (!isDefined(calendarEndFieldMetadata)) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar end field metadata not found`,+ userFriendlyMessage: msg`Calendar end field not found`,+ });++ return errors;+ }++ if (+ calendarEndFieldMetadata.objectMetadataUniversalIdentifier !==+ flatView.objectMetadataUniversalIdentifier+ ) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar end field must belong to the view object`,+ userFriendlyMessage: msg`Calendar end field must belong to the view object`,+ });+ }++ const calendarEndFieldIsDateKind =+ calendarEndFieldMetadata.type === FieldMetadataType.DATE ||+ calendarEndFieldMetadata.type === FieldMetadataType.DATE_TIME;++ if (!calendarEndFieldIsDateKind) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar end field must be a date or date time field`,+ userFriendlyMessage: msg`Calendar end field must be a date or date time field`,+ });+ } else if (+ calendarFieldIsDateKind &&+ calendarEndFieldMetadata.type !== calendarFieldMetadata.type+ ) {+ errors.push({+ code: ViewExceptionCode.INVALID_VIEW_DATA,+ message: t`Calendar start and end fields must have the same type`,+ userFriendlyMessage: msg`Calendar start and end fields must have the same type`,+ });+ }++ return errors;+ }+private isAllowedKanbanMainGroupByField({mainGroupByFieldMetadata,}: {@@ -174,6 +314,13 @@ export class FlatViewValidatorService {}}+ validationResult.errors.push(+ ...this.validateCalendarFields({+ flatView: updatedFlatView,+ flatFieldMetadataMaps,+ }),+ );+return validationResult;}@@ -345,6 +492,13 @@ export class FlatViewValidatorService {}}+ validationResult.errors.push(+ ...this.validateCalendarFields({+ flatView: flatViewToValidate,+ flatFieldMetadataMaps,+ }),+ );+return validationResult;}}diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/field/services/utils/from-universal-flat-field-metadata-to-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/field/services/utils/from-universal-flat-field-metadata-to-flat-field-metadata.util.tsindex 7f8b8b884c0..39ddf309747 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/field/services/utils/from-universal-flat-field-metadata-to-flat-field-metadata.util.ts+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/field/services/utils/from-universal-flat-field-metadata-to-flat-field-metadata.util.ts@@ -132,6 +132,7 @@ export const fromUniversalFlatFieldMetadataToFlatFieldMetadata = ({viewFilterIds: [],fieldPermissionIds: [],calendarViewIds: [],+ calendarEndViewIds: [],mainGroupByFieldMetadataViewIds: [],kanbanAggregateOperationViewIds: [],viewSortIds: [],diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/view/services/create-view-action-handler.service.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/view/services/create-view-action-handler.service.tsindex daab6c7251c..0316ed5bb9d 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/view/services/create-view-action-handler.service.ts+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/view/services/create-view-action-handler.service.ts@@ -34,6 +34,7 @@ export class CreateViewActionHandlerService extends WorkspaceMigrationRunnerActi}: WorkspaceMigrationActionRunnerArgs<UniversalCreateViewAction>): Promise<FlatCreateViewAction> {const {calendarFieldMetadataId,+ calendarEndFieldMetadataId,kanbanAggregateOperationFieldMetadataId,mainGroupByFieldMetadataId,objectMetadataId,@@ -60,6 +61,7 @@ export class CreateViewActionHandlerService extends WorkspaceMigrationRunnerActiflatEntity: {...action.flatEntity,calendarFieldMetadataId,+ calendarEndFieldMetadataId,kanbanAggregateOperationFieldMetadataId,mainGroupByFieldMetadataId,objectMetadataId,diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/view/services/utils/from-universal-overrides-to-view-overrides.util.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/view/services/utils/from-universal-overrides-to-view-overrides.util.tsindex e7760ed50e9..23f6878ba4a 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/view/services/utils/from-universal-overrides-to-view-overrides.util.ts+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/view/services/utils/from-universal-overrides-to-view-overrides.util.ts@@ -11,6 +11,7 @@ type UniversalViewOverrides =const VIEW_OVERRIDES_UNIVERSAL_FIELD_METADATA_PROPERTIES = ['kanbanAggregateOperationFieldMetadataUniversalIdentifier','calendarFieldMetadataUniversalIdentifier',+ 'calendarEndFieldMetadataUniversalIdentifier','mainGroupByFieldMetadataUniversalIdentifier',] as const;@@ -35,6 +36,7 @@ export const fromUniversalOverridesToViewOverrides = ({const {kanbanAggregateOperationFieldMetadataUniversalIdentifier: _kanban,calendarFieldMetadataUniversalIdentifier: _calendar,+ calendarEndFieldMetadataUniversalIdentifier: _calendarEnd,mainGroupByFieldMetadataUniversalIdentifier: _mainGroupBy,...scalarOverrides} = universalOverrides;diff --git a/packages/twenty-server/src/utils/__test__/get-field-metadata-entity.mock.ts b/packages/twenty-server/src/utils/__test__/get-field-metadata-entity.mock.tsindex e5cf66dd976..0594799be1e 100644--- a/packages/twenty-server/src/utils/__test__/get-field-metadata-entity.mock.ts+++ b/packages/twenty-server/src/utils/__test__/get-field-metadata-entity.mock.ts@@ -23,6 +23,7 @@ export const getMockFieldMetadataEntity = <isSystemSideEffect: false,workspace: {} as WorkspaceEntity,calendarViews: [],+ calendarEndViews: [],mainGroupByFieldMetadataViews: [],viewFilters: [],viewFields: [],diff --git a/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/successful-sync-application-workspace-migration.integration-spec.ts.snap b/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/successful-sync-application-workspace-migration.integration-spec.ts.snapindex 1464da1f2d4..8ce400122a5 100644--- a/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/successful-sync-application-workspace-migration.integration-spec.ts.snap+++ b/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/successful-sync-application-workspace-migration.integration-spec.ts.snap@@ -411,6 +411,8 @@ exports[`syncApplication should delete old field and create equivalent one when"flatEntity": {"applicationId": Any<String>,"applicationUniversalIdentifier": Any<String>,+ "calendarEndViewIds": [],+ "calendarEndViewUniversalIdentifiers": [],"calendarViewIds": [],"calendarViewUniversalIdentifiers": [],"createdAt": Any<String>,diff --git a/packages/twenty-shared/src/application/viewManifestType.ts b/packages/twenty-shared/src/application/viewManifestType.tsindex 834521579c0..e6b59d72b0c 100644--- a/packages/twenty-shared/src/application/viewManifestType.ts+++ b/packages/twenty-shared/src/application/viewManifestType.ts@@ -82,6 +82,7 @@ export type ViewManifest = SyncableEntityOptions & {kanbanAggregateOperationFieldMetadataUniversalIdentifier?: string;calendarLayout?: ViewCalendarLayout;calendarFieldMetadataUniversalIdentifier?: string;+ calendarEndFieldMetadataUniversalIdentifier?: string;fields?: ViewFieldManifest[];filters?: ViewFilterManifest[];filterGroups?: ViewFilterGroupManifest[];diff --git a/packages/twenty-shared/src/types/FeatureFlagKey.ts b/packages/twenty-shared/src/types/FeatureFlagKey.tsindex 7f1a0d66bdd..dcd09a43eea 100644--- a/packages/twenty-shared/src/types/FeatureFlagKey.ts+++ b/packages/twenty-shared/src/types/FeatureFlagKey.ts@@ -1,6 +1,7 @@export enum FeatureFlagKey {IS_UNIQUE_INDEXES_ENABLED = 'IS_UNIQUE_INDEXES_ENABLED',IS_JSON_FILTER_ENABLED = 'IS_JSON_FILTER_ENABLED',+ IS_CALENDAR_WEEK_VIEW_ENABLED = 'IS_CALENDAR_WEEK_VIEW_ENABLED',IS_EMAIL_GROUP_ENABLED = 'IS_EMAIL_GROUP_ENABLED',IS_JUNCTION_RELATIONS_ENABLED = 'IS_JUNCTION_RELATIONS_ENABLED',IS_REST_METADATA_API_NEW_FORMAT_DIRECT = 'IS_REST_METADATA_API_NEW_FORMAT_DIRECT',