Files
twenty/packages/twenty-front/src/modules/page-layout/graphql/fragments/pageLayoutWidgetFragment.ts
T
Weiko 238018dc7b Reset Tab Page Layout (#19453)
## Context
- Add "Reset to default" for page layout tabs and widgets — backend
mutation resets overrides, reactivates deactivated children, and deletes
custom children
- Fix override write bug where mutating an overridable property (e.g.
widget title) on a standard-app entity incorrectly overwrote the base
column instead of writing to the overrides JSONB —
PageLayoutUpdateService now uses resolveFlatEntityOverridableProperties
for accurate diffing and routes properties through
sanitizeOverridableEntityInput
- Deprecate isOverridden - We need more time to think about this
feature. Currently this adds too much complexity for a very small
benefit



https://github.com/user-attachments/assets/a84546c8-1e15-4d9e-a489-0825cf8b8ed2
2026-04-08 18:43:57 +02:00

214 lines
4.9 KiB
TypeScript

import { gql } from '@apollo/client';
export const PAGE_LAYOUT_WIDGET_FRAGMENT = gql`
fragment PageLayoutWidgetFragment on PageLayoutWidget {
id
title
type
objectMetadataId
createdAt
updatedAt
deletedAt
conditionalDisplay
gridPosition {
column
columnSpan
row
rowSpan
}
position {
... on PageLayoutWidgetGridPosition {
layoutMode
row
column
rowSpan
columnSpan
}
... on PageLayoutWidgetVerticalListPosition {
layoutMode
index
}
... on PageLayoutWidgetCanvasPosition {
layoutMode
}
}
configuration {
... on BarChartConfiguration {
configurationType
aggregateFieldMetadataId
aggregateOperation
primaryAxisGroupByFieldMetadataId
primaryAxisGroupBySubFieldName
primaryAxisDateGranularity
primaryAxisOrderBy
primaryAxisManualSortOrder
secondaryAxisGroupByFieldMetadataId
secondaryAxisGroupBySubFieldName
secondaryAxisGroupByDateGranularity
secondaryAxisOrderBy
secondaryAxisManualSortOrder
omitNullValues
axisNameDisplay
displayDataLabel
displayLegend
rangeMin
rangeMax
color
description
filter
groupMode
layout
isCumulative
splitMultiValueFields
timezone
firstDayOfTheWeek
}
... on LineChartConfiguration {
configurationType
aggregateFieldMetadataId
aggregateOperation
primaryAxisGroupByFieldMetadataId
primaryAxisGroupBySubFieldName
primaryAxisDateGranularity
primaryAxisOrderBy
primaryAxisManualSortOrder
secondaryAxisGroupByFieldMetadataId
secondaryAxisGroupBySubFieldName
secondaryAxisGroupByDateGranularity
secondaryAxisOrderBy
secondaryAxisManualSortOrder
omitNullValues
axisNameDisplay
displayDataLabel
displayLegend
rangeMin
rangeMax
color
description
filter
isStacked
isCumulative
splitMultiValueFields
timezone
firstDayOfTheWeek
}
... on PieChartConfiguration {
configurationType
groupByFieldMetadataId
aggregateFieldMetadataId
aggregateOperation
groupBySubFieldName
dateGranularity
orderBy
manualSortOrder
displayDataLabel
showCenterMetric
displayLegend
hideEmptyCategory
splitMultiValueFields
color
description
filter
timezone
firstDayOfTheWeek
}
... on AggregateChartConfiguration {
configurationType
aggregateFieldMetadataId
aggregateOperation
label
displayDataLabel
format
description
filter
prefix
suffix
timezone
firstDayOfTheWeek
ratioAggregateConfig {
fieldMetadataId
optionValue
}
}
... on GaugeChartConfiguration {
configurationType
aggregateFieldMetadataId
aggregateOperation
displayDataLabel
color
description
filter
timezone
firstDayOfTheWeek
}
... on IframeConfiguration {
configurationType
url
}
... on StandaloneRichTextConfiguration {
configurationType
body {
blocknote
markdown
}
}
... on CalendarConfiguration {
configurationType
}
... on EmailsConfiguration {
configurationType
}
... on EmailThreadConfiguration {
configurationType
}
... on FieldConfiguration {
configurationType
fieldDisplayMode
fieldMetadataId
}
... on FieldRichTextConfiguration {
configurationType
}
... on FieldsConfiguration {
configurationType
viewId
newFieldDefaultVisibility
shouldAllowUserToSeeHiddenFields
}
... on FilesConfiguration {
configurationType
}
... on NotesConfiguration {
configurationType
}
... on TasksConfiguration {
configurationType
}
... on TimelineConfiguration {
configurationType
}
... on ViewConfiguration {
configurationType
}
... on RecordTableConfiguration {
configurationType
viewId
}
... on WorkflowConfiguration {
configurationType
}
... on WorkflowRunConfiguration {
configurationType
}
... on WorkflowVersionConfiguration {
configurationType
}
... on FrontComponentConfiguration {
configurationType
frontComponentId
}
}
pageLayoutTabId
}
`;