From fea47aa9f830f6ed671483dfb6be27cd53f4ced4 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 6 Mar 2026 18:02:46 +0100 Subject: [PATCH] Add twenty/folder-structure custom oxlint rule (#18467) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Re-implements `eslint-plugin-project-structure`'s folder structure enforcement as a custom oxlint rule (`twenty/folder-structure`), recovering functionality lost during the ESLint → Oxlint migration - Validates `src/modules/` structure: kebab-case module folder names, allowed subdirectories (hooks, utils, components, states, types, graphql, etc.), hook file naming (`use{PascalCase}.(ts|tsx)`), util file naming (`{camelCase}.(ts|tsx)`), and module nesting depth (max 4 levels) - Enabled as `"warn"` in twenty-front with 403 pre-existing violations to address incrementally ## What the rule checks | Check | Example valid | Example invalid | |-------|-------------|-----------------| | Module names kebab-case | `object-record/` | `graphWidgetBarChart/` | | Allowed subdirs only | `hooks/`, `components/`, `utils/` | `random-stuff/` | | Hook file naming | `useMyHook.ts` | `badName.ts` | | Util file naming | `buildQuery.ts` | `build-query.ts` | | Max nesting depth 4 | `a/b/c/d/hooks/` | `a/b/c/d/e/hooks/` | | Utils kebab-case subfolders | `utils/cron-to-human/` | `utils/camelCase/` | ## Pre-existing violations (403 total) | Category | Count | Examples | |----------|-------|---------| | Non-kebab-case module names | 160 | `graphWidgetBarChart`, `AIChatThreads` | | Module depth > 4 | 215 | `settings/roles/role-permissions/object-level-permissions/field-permissions` | | Util file naming | 22 | `.util.ts` suffix, kebab-case, PascalCase filenames | | Misc (hooks, tests) | 6 | Non-hook files in hooks/, folders in test dirs | --- packages/twenty-front/.oxlintrc.json | 1 + .../hooks/useUploadWorkflowFile.ts | 2 +- ...AttachmentSize.ts => maxAttachmentSize.ts} | 0 .../__tests__/isAIChatErrorOfType.test.ts | 2 +- ...{AIChatErrorCode.ts => aiChatErrorCode.ts} | 0 .../modules/ai/utils/isAIChatErrorOfType.ts | 2 +- .../ai/utils/isApiKeyNotConfiguredError.ts | 2 +- .../utils/isBillingCreditsExhaustedError.ts | 2 +- .../hooks/useMetadataErrorHandler.ts | 2 +- ...error.util.ts => classifyMetadataError.ts} | 0 .../UserMetadataProviderInitialEffect.tsx | 2 +- .../components/NavigationMenuItemIcon.tsx | 2 +- .../NavigationMenuItemStyleIcon.tsx | 2 +- .../components/ObjectIconWithViewOverlay.tsx | 2 +- ...rom-theme.util.ts => getColorFromTheme.ts} | 0 ...> getNavigationMenuItemIconBorderColor.ts} | 4 +- ...etNavigationMenuItemIconStyleFromColor.ts} | 10 +- ...gationMenuItemIconColorShadeBackground.ts} | 0 ...navigationMenuItemIconColorShadeBorder.ts} | 0 ...> navigationMenuItemIconColorShadeIcon.ts} | 0 ...type.ts => navigationMenuItemIconStyle.ts} | 0 .../components/RecordTableHeaderFirstCell.tsx | 2 +- ...s => getVisibleFieldWithLowestPosition.ts} | 0 .../widgets/graph/components/GraphWidget.tsx | 10 +- .../GraphWidgetAggregateChart.stories.tsx | 2 +- .../GraphWidgetBarChart.stories.tsx | 2 +- .../GraphWidgetGaugeChart.stories.tsx | 2 +- .../GraphWidgetLineChart.stories.tsx | 2 +- .../GraphWidgetPieChart.stories.tsx | 2 +- .../components/GraphWidgetAggregateChart.tsx | 2 +- .../GraphWidgetAggregateChartRenderer.tsx | 2 +- .../types/AggregateChartOperation.ts | 0 .../buildRatioNumeratorFilter.test.ts | 2 +- .../computeRatioDisplayValue.test.ts | 2 +- ...gregateOperationsForAggregateChart.test.ts | 2 +- .../utils/buildRatioNumeratorFilter.ts | 0 .../utils/computeRatioDisplayValue.ts | 0 .../utils/formatNumberChartTrend.ts | 0 .../utils/getAggregateChartOperationLabel.ts | 2 +- ...bleAggregateOperationsForAggregateChart.ts | 2 +- .../components/BarChart.tsx | 22 +- .../components/BarChartBaseLayer.tsx | 4 +- .../components/BarChartBaseLayerEffect.tsx | 10 +- .../components/BarChartHoverLayer.tsx | 4 +- .../components/BarChartHoverLayerEffect.tsx | 4 +- .../components/BarChartLayers.tsx | 10 +- .../components/BarChartTooltip.tsx | 12 +- .../components/BarChartTotalsLayer.tsx | 8 +- .../components/GraphWidgetBarChart.tsx | 22 +- .../GraphWidgetBarChartRenderer.tsx | 6 +- .../constants/BarChartConstants.ts | 0 .../hooks/__tests__/useBarChartData.test.ts | 4 +- .../hooks/useBarChartData.ts | 4 +- .../hooks/useBarChartLayout.ts | 8 +- .../hooks/useBarChartTheme.ts | 0 .../hooks/useGraphBarChartWidgetData.ts | 6 +- .../hooks/useMemoizedBarPositions.ts | 8 +- .../graphWidgetBarTooltipComponentState.ts | 2 +- ...phWidgetHoveredSliceIndexComponentState.ts | 0 .../types/BarChartDatum.ts | 0 .../types/BarChartEnrichedKey.ts | 0 .../types/BarChartLabelData.ts | 0 .../types/BarChartSeries.ts | 0 .../types/BarChartSlice.ts | 2 +- .../types/BarChartSliceHoverData.ts | 2 +- .../types/BarPosition.ts | 0 .../calculateBarChartValueRange.test.ts | 4 +- ...calculateStackedBarChartValueRange.test.ts | 4 +- .../computeAllCategorySlices.test.ts | 2 +- .../computeBarChartGroupedLabels.test.ts | 4 +- .../computeBarChartStackedLabels.test.ts | 4 +- .../__tests__/computeBarPositions.test.ts | 4 +- .../__tests__/computeBaselineBar.test.ts | 4 +- .../__tests__/computeGroupedBarLayout.test.ts | 6 +- .../computeSliceTooltipPosition.test.ts | 4 +- .../__tests__/computeStackedBarLayout.test.ts | 6 +- .../__tests__/getBarChartInnerPadding.test.ts | 4 +- .../utils/__tests__/getBarChartLayout.test.ts | 4 +- .../__tests__/getEffectiveGroupMode.test.ts | 2 +- .../__tests__/getGroupedBarDimensions.test.ts | 4 +- .../__tests__/getStackedBarDimensions.test.ts | 4 +- .../__tests__/hasNegativeValuesInData.test.ts | 2 +- .../utils/__tests__/interpolateBars.test.ts | 4 +- .../utils/__tests__/truncateTickLabel.test.ts | 2 +- .../utils/buildBars.ts | 8 +- .../calculateStackedBarChartValueRange.ts | 2 +- .../calculateValueRangeFromBarChartKeys.ts | 2 +- .../utils/computeAllCategorySlices.ts | 8 +- .../computeBarChartCategoryTickValues.ts | 6 +- .../utils/computeBarChartGroupedLabels.ts | 4 +- .../utils/computeBarChartStackedLabels.ts | 4 +- .../utils/computeBarChartValueTickCount.ts | 4 +- .../utils/computeBarPositionContext.ts | 4 +- .../utils/computeBarPositions.ts | 10 +- .../utils/computeBarPositionsByGroupMode.ts | 12 +- .../utils/computeBaselineBar.ts | 2 +- .../utils/computeGroupedBarPositions.ts | 12 +- .../utils/computeMinHeightPerTick.ts | 2 +- .../utils/computeShouldRoundFreeEndMap.ts | 2 +- .../utils/computeSliceHighlightPosition.ts | 2 +- .../utils/computeSliceTooltipPosition.ts | 4 +- .../utils/computeStackedBarPositions.ts | 12 +- .../utils/drawRoundedRect.ts | 0 .../utils/findAnchorBarInSlice.ts | 2 +- .../utils/findSliceAtPosition.ts | 2 +- .../utils/getBarChartAxisConfigs.ts | 6 +- .../utils/getBarChartInnerPadding.ts | 2 +- .../utils/getBarChartLayout.ts | 10 +- .../utils/getBarChartTickConfig.ts | 8 +- .../utils/getBarChartTooltipData.ts | 6 +- .../utils/getEffectiveGroupMode.ts | 0 .../utils/getGroupedBarDimensions.ts | 4 +- .../utils/getSliceHoverDataFromMouseEvent.ts | 6 +- .../getSliceHoverDataFromPointerPosition.ts | 8 +- .../utils/getStackedBarDimensions.ts | 4 +- .../utils/hasNegativeValuesInData.ts | 2 +- .../utils/interpolateBars.ts | 4 +- .../utils/renderBars.ts | 4 +- .../utils/renderSliceHighlight.ts | 4 +- .../utils/truncateTickLabel.ts | 0 .../components/GaugeChartEndLine.tsx | 2 +- .../components/GraphWidgetGaugeChart.tsx | 8 +- .../hooks/__tests__/useGaugeChartData.test.ts | 4 +- .../hooks/useGaugeChartData.ts | 2 +- .../hooks/useGaugeChartTooltip.ts | 0 .../types/GaugeChartData.ts | 0 ...culateGaugeChartEndLineCoordinates.test.ts | 2 +- .../calculateGaugeChartEndLineCoordinates.ts | 0 .../components/CustomCrosshairLayer.tsx | 4 +- .../components/CustomLinesLayer.tsx | 0 .../components/CustomPointLabelsLayer.tsx | 4 +- .../components/CustomStackedAreasLayer.tsx | 8 +- .../components/GraphLineChartTooltip.tsx | 8 +- .../components/GraphWidgetLineChart.tsx | 24 +- .../GraphWidgetLineChartRenderer.tsx | 6 +- .../components/LineAnimatedAreaPath.tsx | 0 .../components/LineAreaGradientDefs.tsx | 4 +- .../constants/LineChartConstants.ts | 0 .../hooks/__tests__/useLineChartData.test.ts | 4 +- .../hooks/useGraphLineChartWidgetData.ts | 2 +- .../hooks/useLineChartData.ts | 4 +- .../hooks/useLineChartTheme.ts | 0 ...graphWidgetLineCrosshairXComponentState.ts | 0 .../graphWidgetLineTooltipComponentState.ts | 0 .../types/LineChartDataPoint.ts | 0 .../types/LineChartEnrichedSeries.ts | 2 +- .../types/LineChartSeriesWithColor.ts | 2 +- ...ulateValueRangeFromLineChartSeries.test.ts | 4 +- .../__tests__/computeLineAreaPath.test.ts | 2 +- .../computeLineChartGroupedLabels.test.ts | 2 +- .../computeLineChartStackedLabels.test.ts | 2 +- .../utils/__tests__/createAreaFillDef.test.ts | 4 +- .../__tests__/getLineChartLayout.test.ts | 4 +- .../__tests__/getLineChartTooltipData.test.ts | 4 +- .../calculateValueRangeFromLineChartSeries.ts | 2 +- .../utils/computeLineAreaPath.ts | 0 .../computeLineChartCategoryTickValues.ts | 4 +- .../utils/computeLineChartGroupedLabels.ts | 0 .../utils/computeLineChartStackedLabels.ts | 0 .../utils/createAreaFillDef.ts | 2 +- .../utils/getLineChartAxisBottomConfig.ts | 6 +- .../utils/getLineChartAxisLeftConfig.ts | 0 .../utils/getLineChartLayout.ts | 8 +- .../utils/getLineChartTooltipData.ts | 2 +- .../components/CustomArcsLayer.tsx | 2 +- .../components/GraphPieChartTooltip.tsx | 10 +- .../components/GraphWidgetPieChart.tsx | 18 +- .../GraphWidgetPieChartRenderer.tsx | 6 +- .../components/PieChartCenterMetricLayer.tsx | 2 +- .../constants/PieChartCenterMetricMinSizes.ts | 0 .../constants/PieChartCenterMetricRatios.ts | 0 .../constants/PieChartHoverBrightness.ts | 0 .../constants/PieChartMargins.ts | 0 .../PieChartMaximumNumberOfSlices.constant.ts | 0 .../constants/PieChartTooltipOffsetPx.ts | 0 .../hooks/__tests__/usePieChartData.test.ts | 4 +- .../hooks/useGraphPieChartWidgetData.ts | 2 +- .../hooks/usePieChartCenterMetricData.ts | 0 .../hooks/usePieChartData.ts | 6 +- .../graphWidgetPieTooltipComponentState.ts | 2 +- .../types/PieChartDataItem.ts | 0 .../types/PieChartEnrichedData.ts | 2 +- .../calculatePieChartPercentage.test.ts | 2 +- .../getPieChartFormattedValue.test.ts | 6 +- .../__tests__/getPieChartTooltipData.test.ts | 6 +- .../utils/calculatePieChartPercentage.ts | 0 .../utils/getPieChartFormattedValue.ts | 4 +- .../utils/getPieChartTooltipData.ts | 4 +- .../hooks/useGraphWidgetAggregateQuery.ts | 4 +- .../SettingsAdminWorkspaceContent.tsx | 2 +- ...name.util.ts => getWorkspaceSchemaName.ts} | 0 .../SettingsDataModelFieldIsUniqueForm.tsx | 2 +- ...ettingsDataModelFieldOnClickActionForm.tsx | 2 +- ...SettingsDataModelFieldSettingsFormCard.tsx | 2 +- .../SettingsDataModelFieldPhonesForm.tsx | 2 +- .../{canBeUnique.util.ts => canBeUnique.ts} | 0 ...DataModelFieldOnClickActionDescription.ts} | 0 ...sSchema.util.ts => mergeSettingsSchema.ts} | 0 ...SettingsUpdateDataModelObjectAboutForm.tsx | 2 +- ...emorizedUrlAfterObjectNamePluralChange.ts} | 0 .../components/SettingPublicDomain.tsx | 2 +- ...schema.ts => getDomainValidationSchema.ts} | 0 ...ema.ts => getSubdomainValidationSchema.ts} | 0 .../components/SettingsRoleAssignment.tsx | 2 +- ...ole-maps.test.ts => buildRoleMaps.test.ts} | 2 +- .../{build-role-maps.ts => buildRoleMaps.ts} | 0 ...seGetObjectPermissionDerivedStates.test.ts | 0 .../useUpsertObjectPermissionInDraftRole.ts | 2 +- .../getRoleWithUpsertedObjectPermission.ts | 0 .../roles/role/hooks/useSaveDraftRoleToDB.ts | 2 +- .../newFieldPermissionsFilter.ts} | 0 .../constants/SidePanelPagesConfig.tsx | 2 +- .../components/SidePanelAIChatThreadsPage.tsx | 0 ...rtAggregateOperationSelectableListItem.tsx | 2 +- ...egateOperationSelectionDropdownContent.tsx | 6 +- .../page-layout/utils/getChartLimitMessage.ts | 6 +- .../snack-bar-manager/hooks/useSnackBar.ts | 2 +- ...ror-action.util.ts => buildErrorAction.ts} | 0 ...eFnsLocale.util.ts => getDateFnsLocale.ts} | 0 .../ui/input/components/IconPicker.tsx | 2 +- .../IconPickerScrollEffect.tsx | 0 .../pages/settings/domains/SettingsDomain.tsx | 4 +- .../appearance/components/LocalePicker.tsx | 2 +- .../OXLINT_MIGRATION_TODO.md | 8 +- packages/twenty-oxlint-rules/oxlint-plugin.ts | 5 + .../rules/folder-structure.spec.ts | 361 ++++++++++++++++++ .../rules/folder-structure.ts | 269 +++++++++++++ 227 files changed, 998 insertions(+), 358 deletions(-) rename packages/twenty-front/src/modules/advanced-text-editor/utils/{MaxAttachmentSize.ts => maxAttachmentSize.ts} (100%) rename packages/twenty-front/src/modules/ai/utils/{AIChatErrorCode.ts => aiChatErrorCode.ts} (100%) rename packages/twenty-front/src/modules/metadata-error-handler/utils/{classify-metadata-error.util.ts => classifyMetadataError.ts} (100%) rename packages/twenty-front/src/modules/navigation-menu-item/utils/{get-color-from-theme.util.ts => getColorFromTheme.ts} (100%) rename packages/twenty-front/src/modules/navigation-menu-item/utils/{get-navigation-menu-item-icon-border-color.ts => getNavigationMenuItemIconBorderColor.ts} (80%) rename packages/twenty-front/src/modules/navigation-menu-item/utils/{get-navigation-menu-item-icon-style-from-color.ts => getNavigationMenuItemIconStyleFromColor.ts} (74%) rename packages/twenty-front/src/modules/navigation-menu-item/utils/{NavigationMenuItemIconColorShadeBackground.constant.ts => navigationMenuItemIconColorShadeBackground.ts} (100%) rename packages/twenty-front/src/modules/navigation-menu-item/utils/{NavigationMenuItemIconColorShadeBorder.constant.ts => navigationMenuItemIconColorShadeBorder.ts} (100%) rename packages/twenty-front/src/modules/navigation-menu-item/utils/{NavigationMenuItemIconColorShadeIcon.constant.ts => navigationMenuItemIconColorShadeIcon.ts} (100%) rename packages/twenty-front/src/modules/navigation-menu-item/utils/{navigation-menu-item-icon-style.type.ts => navigationMenuItemIconStyle.ts} (100%) rename packages/twenty-front/src/modules/object-record/record-table/record-table-header/utils/{getVisibleFieldWithLowestPosition.util.ts => getVisibleFieldWithLowestPosition.ts} (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/components/GraphWidgetAggregateChart.tsx (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/components/GraphWidgetAggregateChartRenderer.tsx (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/types/AggregateChartOperation.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/utils/__tests__/buildRatioNumeratorFilter.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/utils/__tests__/computeRatioDisplayValue.test.ts (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/utils/__tests__/getAvailableAggregateOperationsForAggregateChart.test.ts (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/utils/buildRatioNumeratorFilter.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/utils/computeRatioDisplayValue.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/utils/formatNumberChartTrend.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/utils/getAggregateChartOperationLabel.ts (89%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetAggregateChart => graph-widget-aggregate-chart}/utils/getAvailableAggregateOperationsForAggregateChart.ts (93%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/BarChart.tsx (91%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/BarChartBaseLayer.tsx (93%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/BarChartBaseLayerEffect.tsx (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/BarChartHoverLayer.tsx (90%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/BarChartHoverLayerEffect.tsx (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/BarChartLayers.tsx (94%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/BarChartTooltip.tsx (88%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/BarChartTotalsLayer.tsx (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/GraphWidgetBarChart.tsx (91%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/components/GraphWidgetBarChartRenderer.tsx (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/constants/BarChartConstants.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/hooks/__tests__/useBarChartData.test.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/hooks/useBarChartData.ts (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/hooks/useBarChartLayout.ts (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/hooks/useBarChartTheme.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/hooks/useGraphBarChartWidgetData.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/hooks/useMemoizedBarPositions.ts (89%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/states/graphWidgetBarTooltipComponentState.ts (89%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/states/graphWidgetHoveredSliceIndexComponentState.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/types/BarChartDatum.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/types/BarChartEnrichedKey.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/types/BarChartLabelData.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/types/BarChartSeries.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/types/BarChartSlice.ts (83%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/types/BarChartSliceHoverData.ts (79%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/types/BarPosition.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/calculateBarChartValueRange.test.ts (94%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/calculateStackedBarChartValueRange.test.ts (94%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/computeAllCategorySlices.test.ts (99%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/computeBarChartGroupedLabels.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/computeBarChartStackedLabels.test.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/computeBarPositions.test.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/computeBaselineBar.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/computeGroupedBarLayout.test.ts (91%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/computeSliceTooltipPosition.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/computeStackedBarLayout.test.ts (85%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/getBarChartInnerPadding.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/getBarChartLayout.test.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/getEffectiveGroupMode.test.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/getGroupedBarDimensions.test.ts (89%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/getStackedBarDimensions.test.ts (94%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/hasNegativeValuesInData.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/interpolateBars.test.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/__tests__/truncateTickLabel.test.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/buildBars.ts (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/calculateStackedBarChartValueRange.ts (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/calculateValueRangeFromBarChartKeys.ts (93%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeAllCategorySlices.ts (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeBarChartCategoryTickValues.ts (90%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeBarChartGroupedLabels.ts (88%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeBarChartStackedLabels.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeBarChartValueTickCount.ts (85%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeBarPositionContext.ts (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeBarPositions.ts (86%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeBarPositionsByGroupMode.ts (83%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeBaselineBar.ts (93%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeGroupedBarPositions.ts (77%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeMinHeightPerTick.ts (82%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeShouldRoundFreeEndMap.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeSliceHighlightPosition.ts (94%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeSliceTooltipPosition.ts (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/computeStackedBarPositions.ts (80%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/drawRoundedRect.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/findAnchorBarInSlice.ts (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/findSliceAtPosition.ts (94%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getBarChartAxisConfigs.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getBarChartInnerPadding.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getBarChartLayout.ts (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getBarChartTickConfig.ts (91%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getBarChartTooltipData.ts (90%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getEffectiveGroupMode.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getGroupedBarDimensions.ts (94%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getSliceHoverDataFromMouseEvent.ts (85%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getSliceHoverDataFromPointerPosition.ts (87%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/getStackedBarDimensions.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/hasNegativeValuesInData.ts (89%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/interpolateBars.ts (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/renderBars.ts (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/renderSliceHighlight.ts (89%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetBarChart => graph-widget-bar-chart}/utils/truncateTickLabel.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetGaugeChart => graph-widget-gauge-chart}/components/GaugeChartEndLine.tsx (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetGaugeChart => graph-widget-gauge-chart}/components/GraphWidgetGaugeChart.tsx (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetGaugeChart => graph-widget-gauge-chart}/hooks/__tests__/useGaugeChartData.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetGaugeChart => graph-widget-gauge-chart}/hooks/useGaugeChartData.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetGaugeChart => graph-widget-gauge-chart}/hooks/useGaugeChartTooltip.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetGaugeChart => graph-widget-gauge-chart}/types/GaugeChartData.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetGaugeChart => graph-widget-gauge-chart}/utils/__tests__/calculateGaugeChartEndLineCoordinates.test.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetGaugeChart => graph-widget-gauge-chart}/utils/calculateGaugeChartEndLineCoordinates.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/components/CustomCrosshairLayer.tsx (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/components/CustomLinesLayer.tsx (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/components/CustomPointLabelsLayer.tsx (90%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/components/CustomStackedAreasLayer.tsx (91%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/components/GraphLineChartTooltip.tsx (91%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/components/GraphWidgetLineChart.tsx (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/components/GraphWidgetLineChartRenderer.tsx (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/components/LineAnimatedAreaPath.tsx (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/components/LineAreaGradientDefs.tsx (89%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/constants/LineChartConstants.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/hooks/__tests__/useLineChartData.test.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/hooks/useGraphLineChartWidgetData.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/hooks/useLineChartData.ts (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/hooks/useLineChartTheme.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/states/graphWidgetLineCrosshairXComponentState.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/states/graphWidgetLineTooltipComponentState.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/types/LineChartDataPoint.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/types/LineChartEnrichedSeries.ts (81%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/types/LineChartSeriesWithColor.ts (82%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/__tests__/calculateValueRangeFromLineChartSeries.test.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/__tests__/computeLineAreaPath.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/__tests__/computeLineChartGroupedLabels.test.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/__tests__/computeLineChartStackedLabels.test.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/__tests__/createAreaFillDef.test.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/__tests__/getLineChartLayout.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/__tests__/getLineChartTooltipData.test.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/calculateValueRangeFromLineChartSeries.ts (89%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/computeLineAreaPath.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/computeLineChartCategoryTickValues.ts (90%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/computeLineChartGroupedLabels.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/computeLineChartStackedLabels.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/createAreaFillDef.ts (91%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/getLineChartAxisBottomConfig.ts (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/getLineChartAxisLeftConfig.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/getLineChartLayout.ts (94%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetLineChart => graph-widget-line-chart}/utils/getLineChartTooltipData.ts (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/components/CustomArcsLayer.tsx (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/components/GraphPieChartTooltip.tsx (88%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/components/GraphWidgetPieChart.tsx (93%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/components/GraphWidgetPieChartRenderer.tsx (95%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/components/PieChartCenterMetricLayer.tsx (97%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/constants/PieChartCenterMetricMinSizes.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/constants/PieChartCenterMetricRatios.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/constants/PieChartHoverBrightness.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/constants/PieChartMargins.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/constants/PieChartMaximumNumberOfSlices.constant.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/constants/PieChartTooltipOffsetPx.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/hooks/__tests__/usePieChartData.test.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/hooks/useGraphPieChartWidgetData.ts (98%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/hooks/usePieChartCenterMetricData.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/hooks/usePieChartData.ts (92%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/states/graphWidgetPieTooltipComponentState.ts (91%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/types/PieChartDataItem.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/types/PieChartEnrichedData.ts (82%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/utils/__tests__/calculatePieChartPercentage.test.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/utils/__tests__/getPieChartFormattedValue.test.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/utils/__tests__/getPieChartTooltipData.test.ts (96%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/utils/calculatePieChartPercentage.ts (100%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/utils/getPieChartFormattedValue.ts (89%) rename packages/twenty-front/src/modules/page-layout/widgets/graph/{graphWidgetPieChart => graph-widget-pie-chart}/utils/getPieChartTooltipData.ts (92%) rename packages/twenty-front/src/modules/settings/admin-panel/utils/{get-workspace-schema-name.util.ts => getWorkspaceSchemaName.ts} (100%) rename packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/{canBeUnique.util.ts => canBeUnique.ts} (100%) rename packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/{getSettingsDataModelFieldOnClickActionDescription.util.ts => getSettingsDataModelFieldOnClickActionDescription.ts} (100%) rename packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/{mergeSettingsSchema.util.ts => mergeSettingsSchema.ts} (100%) rename packages/twenty-front/src/modules/settings/data-model/object-details/utils/{computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange.util.ts => computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange.ts} (100%) rename packages/twenty-front/src/modules/settings/domains/utils/{get-domain-validation-schema.ts => getDomainValidationSchema.ts} (100%) rename packages/twenty-front/src/modules/settings/domains/utils/{get-subdomain-validation-schema.ts => getSubdomainValidationSchema.ts} (100%) rename packages/twenty-front/src/modules/settings/roles/role-assignment/utils/__tests__/{build-role-maps.test.ts => buildRoleMaps.test.ts} (98%) rename packages/twenty-front/src/modules/settings/roles/role-assignment/utils/{build-role-maps.ts => buildRoleMaps.ts} (100%) rename packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/hooks/{tests => __tests__}/useGetObjectPermissionDerivedStates.test.ts (100%) rename packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/{hooks => utils}/getRoleWithUpsertedObjectPermission.ts (100%) rename packages/twenty-front/src/modules/settings/roles/role/{hooks/utils/newFieldPermissionsFilter.util.ts => utils/newFieldPermissionsFilter.ts} (100%) rename packages/twenty-front/src/modules/side-panel/pages/{AIChatThreads => ai-chat-threads}/components/SidePanelAIChatThreadsPage.tsx (100%) rename packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/utils/{build-error-action.util.ts => buildErrorAction.ts} (100%) rename packages/twenty-front/src/modules/ui/field/display/utils/{getDateFnsLocale.util.ts => getDateFnsLocale.ts} (100%) rename packages/twenty-front/src/modules/ui/input/{hooks => effect-components}/IconPickerScrollEffect.tsx (100%) create mode 100644 packages/twenty-oxlint-rules/rules/folder-structure.spec.ts create mode 100644 packages/twenty-oxlint-rules/rules/folder-structure.ts diff --git a/packages/twenty-front/.oxlintrc.json b/packages/twenty-front/.oxlintrc.json index dc2ceb361b..5b84f3ee97 100644 --- a/packages/twenty-front/.oxlintrc.json +++ b/packages/twenty-front/.oxlintrc.json @@ -104,6 +104,7 @@ "twenty/no-navigate-prefer-link": "error", "twenty/no-jotai-store-in-selector": "error", "twenty/no-direct-atom-family-in-selector": "error", + "twenty/folder-structure": "error", "twenty/enforce-module-boundaries": ["error", { "depConstraints": [ { diff --git a/packages/twenty-front/src/modules/advanced-text-editor/hooks/useUploadWorkflowFile.ts b/packages/twenty-front/src/modules/advanced-text-editor/hooks/useUploadWorkflowFile.ts index 81a073c538..06d075008f 100644 --- a/packages/twenty-front/src/modules/advanced-text-editor/hooks/useUploadWorkflowFile.ts +++ b/packages/twenty-front/src/modules/advanced-text-editor/hooks/useUploadWorkflowFile.ts @@ -1,4 +1,4 @@ -import { MAX_ATTACHMENT_SIZE } from '@/advanced-text-editor/utils/MaxAttachmentSize'; +import { MAX_ATTACHMENT_SIZE } from '@/advanced-text-editor/utils/maxAttachmentSize'; import { formatFileSize } from '@/file/utils/formatFileSize'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; import { t } from '@lingui/core/macro'; diff --git a/packages/twenty-front/src/modules/advanced-text-editor/utils/MaxAttachmentSize.ts b/packages/twenty-front/src/modules/advanced-text-editor/utils/maxAttachmentSize.ts similarity index 100% rename from packages/twenty-front/src/modules/advanced-text-editor/utils/MaxAttachmentSize.ts rename to packages/twenty-front/src/modules/advanced-text-editor/utils/maxAttachmentSize.ts diff --git a/packages/twenty-front/src/modules/ai/utils/__tests__/isAIChatErrorOfType.test.ts b/packages/twenty-front/src/modules/ai/utils/__tests__/isAIChatErrorOfType.test.ts index c64d5739e0..bf16d4b864 100644 --- a/packages/twenty-front/src/modules/ai/utils/__tests__/isAIChatErrorOfType.test.ts +++ b/packages/twenty-front/src/modules/ai/utils/__tests__/isAIChatErrorOfType.test.ts @@ -1,4 +1,4 @@ -import { AIChatErrorCode } from '@/ai/utils/AIChatErrorCode'; +import { AIChatErrorCode } from '@/ai/utils/aiChatErrorCode'; import { isAIChatErrorOfType } from '@/ai/utils/isAIChatErrorOfType'; describe('isAIChatErrorOfType', () => { diff --git a/packages/twenty-front/src/modules/ai/utils/AIChatErrorCode.ts b/packages/twenty-front/src/modules/ai/utils/aiChatErrorCode.ts similarity index 100% rename from packages/twenty-front/src/modules/ai/utils/AIChatErrorCode.ts rename to packages/twenty-front/src/modules/ai/utils/aiChatErrorCode.ts diff --git a/packages/twenty-front/src/modules/ai/utils/isAIChatErrorOfType.ts b/packages/twenty-front/src/modules/ai/utils/isAIChatErrorOfType.ts index a57a871422..ac4c7038ab 100644 --- a/packages/twenty-front/src/modules/ai/utils/isAIChatErrorOfType.ts +++ b/packages/twenty-front/src/modules/ai/utils/isAIChatErrorOfType.ts @@ -1,6 +1,6 @@ import { isDefined } from 'twenty-shared/utils'; -import { type AIChatErrorCodeType } from '@/ai/utils/AIChatErrorCode'; +import { type AIChatErrorCodeType } from '@/ai/utils/aiChatErrorCode'; import { extractErrorCode } from '@/ai/utils/extractErrorCode'; export const isAIChatErrorOfType = ( diff --git a/packages/twenty-front/src/modules/ai/utils/isApiKeyNotConfiguredError.ts b/packages/twenty-front/src/modules/ai/utils/isApiKeyNotConfiguredError.ts index 6ff60fa618..b6b8ebd6f4 100644 --- a/packages/twenty-front/src/modules/ai/utils/isApiKeyNotConfiguredError.ts +++ b/packages/twenty-front/src/modules/ai/utils/isApiKeyNotConfiguredError.ts @@ -1,4 +1,4 @@ -import { AIChatErrorCode } from '@/ai/utils/AIChatErrorCode'; +import { AIChatErrorCode } from '@/ai/utils/aiChatErrorCode'; import { isAIChatErrorOfType } from '@/ai/utils/isAIChatErrorOfType'; export const isApiKeyNotConfiguredError = ( diff --git a/packages/twenty-front/src/modules/ai/utils/isBillingCreditsExhaustedError.ts b/packages/twenty-front/src/modules/ai/utils/isBillingCreditsExhaustedError.ts index 11ed65d9f0..cb628e449a 100644 --- a/packages/twenty-front/src/modules/ai/utils/isBillingCreditsExhaustedError.ts +++ b/packages/twenty-front/src/modules/ai/utils/isBillingCreditsExhaustedError.ts @@ -1,4 +1,4 @@ -import { AIChatErrorCode } from '@/ai/utils/AIChatErrorCode'; +import { AIChatErrorCode } from '@/ai/utils/aiChatErrorCode'; import { isAIChatErrorOfType } from '@/ai/utils/isAIChatErrorOfType'; export const isBillingCreditsExhaustedError = ( diff --git a/packages/twenty-front/src/modules/metadata-error-handler/hooks/useMetadataErrorHandler.ts b/packages/twenty-front/src/modules/metadata-error-handler/hooks/useMetadataErrorHandler.ts index e32c324647..8ca3592f14 100644 --- a/packages/twenty-front/src/modules/metadata-error-handler/hooks/useMetadataErrorHandler.ts +++ b/packages/twenty-front/src/modules/metadata-error-handler/hooks/useMetadataErrorHandler.ts @@ -1,7 +1,7 @@ import { type ApolloError } from '@apollo/client'; import { t } from '@lingui/core/macro'; -import { classifyMetadataError } from '@/metadata-error-handler/utils/classify-metadata-error.util'; +import { classifyMetadataError } from '@/metadata-error-handler/utils/classifyMetadataError'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; import { type AllMetadataName, diff --git a/packages/twenty-front/src/modules/metadata-error-handler/utils/classify-metadata-error.util.ts b/packages/twenty-front/src/modules/metadata-error-handler/utils/classifyMetadataError.ts similarity index 100% rename from packages/twenty-front/src/modules/metadata-error-handler/utils/classify-metadata-error.util.ts rename to packages/twenty-front/src/modules/metadata-error-handler/utils/classifyMetadataError.ts diff --git a/packages/twenty-front/src/modules/metadata-store/effect-components/UserMetadataProviderInitialEffect.tsx b/packages/twenty-front/src/modules/metadata-store/effect-components/UserMetadataProviderInitialEffect.tsx index 750c88672e..92e56afec3 100644 --- a/packages/twenty-front/src/modules/metadata-store/effect-components/UserMetadataProviderInitialEffect.tsx +++ b/packages/twenty-front/src/modules/metadata-store/effect-components/UserMetadataProviderInitialEffect.tsx @@ -8,7 +8,7 @@ import { currentWorkspaceMembersState } from '@/auth/states/currentWorkspaceMemb import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState'; import { isCurrentUserLoadedState } from '@/auth/states/isCurrentUserLoadedState'; import { useInitializeFormatPreferences } from '@/localization/hooks/useInitializeFormatPreferences'; -import { getDateFnsLocale } from '@/ui/field/display/utils/getDateFnsLocale.util'; +import { getDateFnsLocale } from '@/ui/field/display/utils/getDateFnsLocale'; import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; import { useSetAtomState } from '@/ui/utilities/state/jotai/hooks/useSetAtomState'; import { type ColorScheme } from '@/workspace-member/types/WorkspaceMember'; diff --git a/packages/twenty-front/src/modules/navigation-menu-item/components/NavigationMenuItemIcon.tsx b/packages/twenty-front/src/modules/navigation-menu-item/components/NavigationMenuItemIcon.tsx index 006e0a9c0f..0db197a2ed 100644 --- a/packages/twenty-front/src/modules/navigation-menu-item/components/NavigationMenuItemIcon.tsx +++ b/packages/twenty-front/src/modules/navigation-menu-item/components/NavigationMenuItemIcon.tsx @@ -8,7 +8,7 @@ import { StyledNavigationMenuItemIconContainer } from '@/navigation-menu-item/co import { ObjectIconWithViewOverlay } from '@/navigation-menu-item/components/ObjectIconWithViewOverlay'; import { NavigationMenuItemType } from '@/navigation-menu-item/constants/NavigationMenuItemType'; import { useObjectNavItemColor } from '@/navigation-menu-item/hooks/useObjectNavItemColor'; -import { getNavigationMenuItemIconStyleFromColor } from '@/navigation-menu-item/utils/get-navigation-menu-item-icon-style-from-color'; +import { getNavigationMenuItemIconStyleFromColor } from '@/navigation-menu-item/utils/getNavigationMenuItemIconStyleFromColor'; import { getEffectiveNavigationMenuItemColor } from '@/navigation-menu-item/utils/getEffectiveNavigationMenuItemColor'; import { type ProcessedNavigationMenuItem } from '@/navigation-menu-item/utils/sortNavigationMenuItems'; import { useGetStandardObjectIcon } from '@/object-metadata/hooks/useGetStandardObjectIcon'; diff --git a/packages/twenty-front/src/modules/navigation-menu-item/components/NavigationMenuItemStyleIcon.tsx b/packages/twenty-front/src/modules/navigation-menu-item/components/NavigationMenuItemStyleIcon.tsx index 31bb1d952d..59b2d3dbb1 100644 --- a/packages/twenty-front/src/modules/navigation-menu-item/components/NavigationMenuItemStyleIcon.tsx +++ b/packages/twenty-front/src/modules/navigation-menu-item/components/NavigationMenuItemStyleIcon.tsx @@ -1,6 +1,6 @@ import type { IconComponent } from 'twenty-ui/display'; import { StyledNavigationMenuItemIconContainer } from '@/navigation-menu-item/components/NavigationMenuItemIconContainer'; -import { getNavigationMenuItemIconStyleFromColor } from '@/navigation-menu-item/utils/get-navigation-menu-item-icon-style-from-color'; +import { getNavigationMenuItemIconStyleFromColor } from '@/navigation-menu-item/utils/getNavigationMenuItemIconStyleFromColor'; import { useContext } from 'react'; import { ThemeContext } from 'twenty-ui/theme-constants'; diff --git a/packages/twenty-front/src/modules/navigation-menu-item/components/ObjectIconWithViewOverlay.tsx b/packages/twenty-front/src/modules/navigation-menu-item/components/ObjectIconWithViewOverlay.tsx index 676dda5f82..d7b8a27e75 100644 --- a/packages/twenty-front/src/modules/navigation-menu-item/components/ObjectIconWithViewOverlay.tsx +++ b/packages/twenty-front/src/modules/navigation-menu-item/components/ObjectIconWithViewOverlay.tsx @@ -3,7 +3,7 @@ import type { IconComponent } from 'twenty-ui/display'; import { useContext } from 'react'; import { ThemeContext, themeCssVariables } from 'twenty-ui/theme-constants'; -import { getNavigationMenuItemIconStyleFromColor } from '@/navigation-menu-item/utils/get-navigation-menu-item-icon-style-from-color'; +import { getNavigationMenuItemIconStyleFromColor } from '@/navigation-menu-item/utils/getNavigationMenuItemIconStyleFromColor'; const StyledCompositeContainer = styled.div` align-items: center; diff --git a/packages/twenty-front/src/modules/navigation-menu-item/utils/get-color-from-theme.util.ts b/packages/twenty-front/src/modules/navigation-menu-item/utils/getColorFromTheme.ts similarity index 100% rename from packages/twenty-front/src/modules/navigation-menu-item/utils/get-color-from-theme.util.ts rename to packages/twenty-front/src/modules/navigation-menu-item/utils/getColorFromTheme.ts diff --git a/packages/twenty-front/src/modules/navigation-menu-item/utils/get-navigation-menu-item-icon-border-color.ts b/packages/twenty-front/src/modules/navigation-menu-item/utils/getNavigationMenuItemIconBorderColor.ts similarity index 80% rename from packages/twenty-front/src/modules/navigation-menu-item/utils/get-navigation-menu-item-icon-border-color.ts rename to packages/twenty-front/src/modules/navigation-menu-item/utils/getNavigationMenuItemIconBorderColor.ts index 104501991a..4a982680c5 100644 --- a/packages/twenty-front/src/modules/navigation-menu-item/utils/get-navigation-menu-item-icon-border-color.ts +++ b/packages/twenty-front/src/modules/navigation-menu-item/utils/getNavigationMenuItemIconBorderColor.ts @@ -1,7 +1,7 @@ import type { ThemeColor } from 'twenty-ui/theme'; -import { getColorFromTheme } from '@/navigation-menu-item/utils/get-color-from-theme.util'; -import { COLOR_SHADE_BORDER } from '@/navigation-menu-item/utils/NavigationMenuItemIconColorShadeBorder.constant'; +import { getColorFromTheme } from '@/navigation-menu-item/utils/getColorFromTheme'; +import { COLOR_SHADE_BORDER } from '@/navigation-menu-item/utils/navigationMenuItemIconColorShadeBorder'; export const getNavigationMenuItemIconBorderColor = ( themeColor: ThemeColor, diff --git a/packages/twenty-front/src/modules/navigation-menu-item/utils/get-navigation-menu-item-icon-style-from-color.ts b/packages/twenty-front/src/modules/navigation-menu-item/utils/getNavigationMenuItemIconStyleFromColor.ts similarity index 74% rename from packages/twenty-front/src/modules/navigation-menu-item/utils/get-navigation-menu-item-icon-style-from-color.ts rename to packages/twenty-front/src/modules/navigation-menu-item/utils/getNavigationMenuItemIconStyleFromColor.ts index 6a1ba19e15..0ad0ea5624 100644 --- a/packages/twenty-front/src/modules/navigation-menu-item/utils/get-navigation-menu-item-icon-style-from-color.ts +++ b/packages/twenty-front/src/modules/navigation-menu-item/utils/getNavigationMenuItemIconStyleFromColor.ts @@ -1,9 +1,9 @@ import { DEFAULT_NAV_ITEM_ICON_COLOR } from '@/navigation-menu-item/constants/NavigationMenuItemDefaultIconColor.constant'; -import { getColorFromTheme } from '@/navigation-menu-item/utils/get-color-from-theme.util'; -import { COLOR_SHADE_BACKGROUND } from '@/navigation-menu-item/utils/NavigationMenuItemIconColorShadeBackground.constant'; -import { COLOR_SHADE_BORDER } from '@/navigation-menu-item/utils/NavigationMenuItemIconColorShadeBorder.constant'; -import { COLOR_SHADE_ICON } from '@/navigation-menu-item/utils/NavigationMenuItemIconColorShadeIcon.constant'; -import { type NavigationMenuItemIconStyle } from '@/navigation-menu-item/utils/navigation-menu-item-icon-style.type'; +import { getColorFromTheme } from '@/navigation-menu-item/utils/getColorFromTheme'; +import { COLOR_SHADE_BACKGROUND } from '@/navigation-menu-item/utils/navigationMenuItemIconColorShadeBackground'; +import { COLOR_SHADE_BORDER } from '@/navigation-menu-item/utils/navigationMenuItemIconColorShadeBorder'; +import { COLOR_SHADE_ICON } from '@/navigation-menu-item/utils/navigationMenuItemIconColorShadeIcon'; +import { type NavigationMenuItemIconStyle } from '@/navigation-menu-item/utils/navigationMenuItemIconStyle'; import { parseThemeColor } from '@/navigation-menu-item/utils/parseThemeColor'; export const getNavigationMenuItemIconStyleFromColor = ( diff --git a/packages/twenty-front/src/modules/navigation-menu-item/utils/NavigationMenuItemIconColorShadeBackground.constant.ts b/packages/twenty-front/src/modules/navigation-menu-item/utils/navigationMenuItemIconColorShadeBackground.ts similarity index 100% rename from packages/twenty-front/src/modules/navigation-menu-item/utils/NavigationMenuItemIconColorShadeBackground.constant.ts rename to packages/twenty-front/src/modules/navigation-menu-item/utils/navigationMenuItemIconColorShadeBackground.ts diff --git a/packages/twenty-front/src/modules/navigation-menu-item/utils/NavigationMenuItemIconColorShadeBorder.constant.ts b/packages/twenty-front/src/modules/navigation-menu-item/utils/navigationMenuItemIconColorShadeBorder.ts similarity index 100% rename from packages/twenty-front/src/modules/navigation-menu-item/utils/NavigationMenuItemIconColorShadeBorder.constant.ts rename to packages/twenty-front/src/modules/navigation-menu-item/utils/navigationMenuItemIconColorShadeBorder.ts diff --git a/packages/twenty-front/src/modules/navigation-menu-item/utils/NavigationMenuItemIconColorShadeIcon.constant.ts b/packages/twenty-front/src/modules/navigation-menu-item/utils/navigationMenuItemIconColorShadeIcon.ts similarity index 100% rename from packages/twenty-front/src/modules/navigation-menu-item/utils/NavigationMenuItemIconColorShadeIcon.constant.ts rename to packages/twenty-front/src/modules/navigation-menu-item/utils/navigationMenuItemIconColorShadeIcon.ts diff --git a/packages/twenty-front/src/modules/navigation-menu-item/utils/navigation-menu-item-icon-style.type.ts b/packages/twenty-front/src/modules/navigation-menu-item/utils/navigationMenuItemIconStyle.ts similarity index 100% rename from packages/twenty-front/src/modules/navigation-menu-item/utils/navigation-menu-item-icon-style.type.ts rename to packages/twenty-front/src/modules/navigation-menu-item/utils/navigationMenuItemIconStyle.ts diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderFirstCell.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderFirstCell.tsx index 931430b866..7cf8cc8b7c 100644 --- a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderFirstCell.tsx +++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/components/RecordTableHeaderFirstCell.tsx @@ -9,7 +9,7 @@ import { RecordTableHeaderCellContainer } from '@/object-record/record-table/rec import { hasRecordGroupsComponentSelector } from '@/object-record/record-group/states/selectors/hasRecordGroupsComponentSelector'; import { TABLE_Z_INDEX } from '@/object-record/record-table/constants/TableZIndex'; import { RecordTableHeaderLabelIdentifierCellPlusButton } from '@/object-record/record-table/record-table-header/components/RecordTableHeaderLabelIdentifierCellPlusButton'; -import { getVisibleFieldWithLowestPosition } from '@/object-record/record-table/record-table-header/utils/getVisibleFieldWithLowestPosition.util'; +import { getVisibleFieldWithLowestPosition } from '@/object-record/record-table/record-table-header/utils/getVisibleFieldWithLowestPosition'; import { isRecordTableRowActiveComponentFamilyState } from '@/object-record/record-table/states/isRecordTableRowActiveComponentFamilyState'; import { isRecordTableRowFocusActiveComponentState } from '@/object-record/record-table/states/isRecordTableRowFocusActiveComponentState'; import { isRecordTableRowFocusedComponentFamilyState } from '@/object-record/record-table/states/isRecordTableRowFocusedComponentFamilyState'; diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-header/utils/getVisibleFieldWithLowestPosition.util.ts b/packages/twenty-front/src/modules/object-record/record-table/record-table-header/utils/getVisibleFieldWithLowestPosition.ts similarity index 100% rename from packages/twenty-front/src/modules/object-record/record-table/record-table-header/utils/getVisibleFieldWithLowestPosition.util.ts rename to packages/twenty-front/src/modules/object-record/record-table/record-table-header/utils/getVisibleFieldWithLowestPosition.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidget.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidget.tsx index dd8d8334c2..aa801e675d 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidget.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/GraphWidget.tsx @@ -1,15 +1,15 @@ import { WidgetSkeletonLoader } from '@/page-layout/widgets/components/WidgetSkeletonLoader'; -import { GraphWidgetAggregateChartRenderer } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/components/GraphWidgetAggregateChartRenderer'; -import { GraphWidgetBarChartRenderer } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChartRenderer'; -import { GraphWidgetLineChartRenderer } from '@/page-layout/widgets/graph/graphWidgetLineChart/components/GraphWidgetLineChartRenderer'; -import { GraphWidgetPieChartRenderer } from '@/page-layout/widgets/graph/graphWidgetPieChart/components/GraphWidgetPieChartRenderer'; +import { GraphWidgetAggregateChartRenderer } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChartRenderer'; +import { GraphWidgetBarChartRenderer } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChartRenderer'; +import { GraphWidgetLineChartRenderer } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChartRenderer'; +import { GraphWidgetPieChartRenderer } from '@/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChartRenderer'; import { useCurrentWidget } from '@/page-layout/widgets/hooks/useCurrentWidget'; import { lazy, Suspense } from 'react'; import { WidgetConfigurationType } from '~/generated-metadata/graphql'; const GraphWidgetGaugeChart = lazy(() => import( - '@/page-layout/widgets/graph/graphWidgetGaugeChart/components/GraphWidgetGaugeChart' + '@/page-layout/widgets/graph/graph-widget-gauge-chart/components/GraphWidgetGaugeChart' ).then((module) => ({ default: module.GraphWidgetGaugeChart, })), diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetAggregateChart.stories.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetAggregateChart.stories.tsx index 05d8af61e2..57414f1046 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetAggregateChart.stories.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetAggregateChart.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; -import { GraphWidgetAggregateChart } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/components/GraphWidgetAggregateChart'; +import { GraphWidgetAggregateChart } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart'; import { ComponentDecorator } from 'twenty-ui/testing'; const meta: Meta = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetBarChart.stories.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetBarChart.stories.tsx index 27626cc1f7..abdd6ce426 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetBarChart.stories.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetBarChart.stories.tsx @@ -1,7 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { GraphWidgetTestWrapper } from '@/page-layout/widgets/graph/__tests__/GraphWidgetTestWrapper'; -import { GraphWidgetBarChart } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart'; +import { GraphWidgetBarChart } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart'; import { CatalogDecorator, ComponentDecorator } from 'twenty-ui/testing'; import { BarChartLayout } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetGaugeChart.stories.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetGaugeChart.stories.tsx index 3d4d126df2..e42ae269af 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetGaugeChart.stories.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetGaugeChart.stories.tsx @@ -1,7 +1,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { GraphWidgetTestWrapper } from '@/page-layout/widgets/graph/__tests__/GraphWidgetTestWrapper'; -import { GraphWidgetGaugeChart } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/components/GraphWidgetGaugeChart'; +import { GraphWidgetGaugeChart } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/components/GraphWidgetGaugeChart'; import { CatalogDecorator, ComponentDecorator } from 'twenty-ui/testing'; const meta: Meta = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetLineChart.stories.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetLineChart.stories.tsx index 74e8f2f168..385036b951 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetLineChart.stories.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetLineChart.stories.tsx @@ -2,7 +2,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { type ComponentProps } from 'react'; import { GraphWidgetTestWrapper } from '@/page-layout/widgets/graph/__tests__/GraphWidgetTestWrapper'; -import { GraphWidgetLineChart } from '@/page-layout/widgets/graph/graphWidgetLineChart/components/GraphWidgetLineChart'; +import { GraphWidgetLineChart } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart'; import { CatalogDecorator, ComponentDecorator } from 'twenty-ui/testing'; const meta: Meta = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetPieChart.stories.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetPieChart.stories.tsx index 254ce9265b..570c5c6883 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetPieChart.stories.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/components/__stories__/GraphWidgetPieChart.stories.tsx @@ -2,7 +2,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite'; import { CoreObjectNameSingular } from 'twenty-shared/types'; import { GraphWidgetTestWrapper } from '@/page-layout/widgets/graph/__tests__/GraphWidgetTestWrapper'; -import { GraphWidgetPieChart } from '@/page-layout/widgets/graph/graphWidgetPieChart/components/GraphWidgetPieChart'; +import { GraphWidgetPieChart } from '@/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart'; import { CatalogDecorator, ComponentDecorator } from 'twenty-ui/testing'; import { AggregateOperations, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/components/GraphWidgetAggregateChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart.tsx similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/components/GraphWidgetAggregateChart.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart.tsx index d6062355b2..87297646f0 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/components/GraphWidgetAggregateChart.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart.tsx @@ -1,4 +1,4 @@ -import { formatNumberChartTrend } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/utils/formatNumberChartTrend'; +import { formatNumberChartTrend } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/formatNumberChartTrend'; import { styled } from '@linaria/react'; import { useContext } from 'react'; import { isDefined } from 'twenty-shared/utils'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/components/GraphWidgetAggregateChartRenderer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChartRenderer.tsx similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/components/GraphWidgetAggregateChartRenderer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChartRenderer.tsx index 2f4c4f9ee1..c642e5fa6b 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/components/GraphWidgetAggregateChartRenderer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChartRenderer.tsx @@ -6,7 +6,7 @@ import { lazy, Suspense } from 'react'; const GraphWidgetAggregateChart = lazy(() => import( - '@/page-layout/widgets/graph/graphWidgetAggregateChart/components/GraphWidgetAggregateChart' + '@/page-layout/widgets/graph/graph-widget-aggregate-chart/components/GraphWidgetAggregateChart' ).then((module) => ({ default: module.GraphWidgetAggregateChart, })), diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/types/AggregateChartOperation.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/types/AggregateChartOperation.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/types/AggregateChartOperation.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/types/AggregateChartOperation.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/__tests__/buildRatioNumeratorFilter.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/__tests__/buildRatioNumeratorFilter.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/__tests__/buildRatioNumeratorFilter.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/__tests__/buildRatioNumeratorFilter.test.ts index 0442bd2475..1010c8e79e 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/__tests__/buildRatioNumeratorFilter.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/__tests__/buildRatioNumeratorFilter.test.ts @@ -4,7 +4,7 @@ import { type RatioAggregateConfig, } from '~/generated-metadata/graphql'; -import { buildRatioNumeratorFilter } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/utils/buildRatioNumeratorFilter'; +import { buildRatioNumeratorFilter } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/buildRatioNumeratorFilter'; describe('buildRatioNumeratorFilter', () => { const mockBooleanField = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/__tests__/computeRatioDisplayValue.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/__tests__/computeRatioDisplayValue.test.ts similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/__tests__/computeRatioDisplayValue.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/__tests__/computeRatioDisplayValue.test.ts index 333ac3a52d..837c3d56ba 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/__tests__/computeRatioDisplayValue.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/__tests__/computeRatioDisplayValue.test.ts @@ -1,4 +1,4 @@ -import { computeRatioDisplayValue } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/utils/computeRatioDisplayValue'; +import { computeRatioDisplayValue } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/computeRatioDisplayValue'; describe('computeRatioDisplayValue', () => { it('should return "0%" when denominator is 0', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/__tests__/getAvailableAggregateOperationsForAggregateChart.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/__tests__/getAvailableAggregateOperationsForAggregateChart.test.ts similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/__tests__/getAvailableAggregateOperationsForAggregateChart.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/__tests__/getAvailableAggregateOperationsForAggregateChart.test.ts index 5f4e51b369..9e782ea529 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/__tests__/getAvailableAggregateOperationsForAggregateChart.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/__tests__/getAvailableAggregateOperationsForAggregateChart.test.ts @@ -1,7 +1,7 @@ import { DASHBOARD_AGGREGATE_OPERATION_RATIO } from '@/page-layout/widgets/graph/constants/DashboardAggregateOperationRatio'; import { FieldMetadataType } from '~/generated-metadata/graphql'; -import { getAvailableAggregateOperationsForAggregateChart } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/utils/getAvailableAggregateOperationsForAggregateChart'; +import { getAvailableAggregateOperationsForAggregateChart } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/getAvailableAggregateOperationsForAggregateChart'; describe('getAvailableAggregateOperationsForAggregateChart', () => { it('should include RATIO for BOOLEAN field', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/buildRatioNumeratorFilter.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/buildRatioNumeratorFilter.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/buildRatioNumeratorFilter.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/buildRatioNumeratorFilter.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/computeRatioDisplayValue.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/computeRatioDisplayValue.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/computeRatioDisplayValue.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/computeRatioDisplayValue.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/formatNumberChartTrend.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/formatNumberChartTrend.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/formatNumberChartTrend.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/formatNumberChartTrend.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/getAggregateChartOperationLabel.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/getAggregateChartOperationLabel.ts similarity index 89% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/getAggregateChartOperationLabel.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/getAggregateChartOperationLabel.ts index 4d1e26eb4b..73ac8747b9 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/getAggregateChartOperationLabel.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/getAggregateChartOperationLabel.ts @@ -1,6 +1,6 @@ import { getAggregateOperationLabel } from '@/object-record/record-board/record-board-column/utils/getAggregateOperationLabel'; import { DASHBOARD_AGGREGATE_OPERATION_RATIO } from '@/page-layout/widgets/graph/constants/DashboardAggregateOperationRatio'; -import { type AggregateChartOperation } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/types/AggregateChartOperation'; +import { type AggregateChartOperation } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/types/AggregateChartOperation'; import { t } from '@lingui/core/macro'; export const getAggregateChartOperationLabel = ( diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/getAvailableAggregateOperationsForAggregateChart.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/getAvailableAggregateOperationsForAggregateChart.ts similarity index 93% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/getAvailableAggregateOperationsForAggregateChart.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/getAvailableAggregateOperationsForAggregateChart.ts index fd687da3b4..b1c24c6e82 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetAggregateChart/utils/getAvailableAggregateOperationsForAggregateChart.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/getAvailableAggregateOperationsForAggregateChart.ts @@ -1,6 +1,6 @@ import { getAvailableAggregateOperationsForFieldMetadataType } from '@/object-record/record-table/record-table-footer/utils/getAvailableAggregateOperationsForFieldMetadataType'; import { DASHBOARD_AGGREGATE_OPERATION_RATIO } from '@/page-layout/widgets/graph/constants/DashboardAggregateOperationRatio'; -import { type AggregateChartOperation } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/types/AggregateChartOperation'; +import { type AggregateChartOperation } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/types/AggregateChartOperation'; import { FieldMetadataType } from '~/generated-metadata/graphql'; export const getAvailableAggregateOperationsForAggregateChart = ({ diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChart.tsx similarity index 91% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChart.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChart.tsx index 255dc4662e..3145ff45ab 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChart.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChart.tsx @@ -1,14 +1,14 @@ -import { BarChartLayers } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartLayers'; -import { useBarChartTheme } from '@/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartTheme'; -import { useMemoizedBarPositions } from '@/page-layout/widgets/graph/graphWidgetBarChart/hooks/useMemoizedBarPositions'; -import { useBarChartLayout } from '@/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartLayout'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; -import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSliceHoverData'; -import { computeAllCategorySlices } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeAllCategorySlices'; -import { getSliceHoverDataFromMouseEvent } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getSliceHoverDataFromMouseEvent'; -import { hasNegativeValuesInData } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/hasNegativeValuesInData'; +import { BarChartLayers } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartLayers'; +import { useBarChartTheme } from '@/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartTheme'; +import { useMemoizedBarPositions } from '@/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useMemoizedBarPositions'; +import { useBarChartLayout } from '@/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartLayout'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; +import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSliceHoverData'; +import { computeAllCategorySlices } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeAllCategorySlices'; +import { getSliceHoverDataFromMouseEvent } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getSliceHoverDataFromMouseEvent'; +import { hasNegativeValuesInData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/hasNegativeValuesInData'; import { graphWidgetHighlightedLegendIdComponentState } from '@/page-layout/widgets/graph/states/graphWidgetHighlightedLegendIdComponentState'; import { formatGraphValue, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartBaseLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayer.tsx similarity index 93% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartBaseLayer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayer.tsx index ea33b1fb32..892d284af0 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartBaseLayer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayer.tsx @@ -1,5 +1,5 @@ -import { BarChartBaseLayerEffect } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartBaseLayerEffect'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { BarChartBaseLayerEffect } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayerEffect'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { styled } from '@linaria/react'; import { useRef } from 'react'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartBaseLayerEffect.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayerEffect.tsx similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartBaseLayerEffect.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayerEffect.tsx index 79e58a745f..35696d2cce 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartBaseLayerEffect.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayerEffect.tsx @@ -1,11 +1,11 @@ import { CHART_CORE_CONSTANTS } from '@/page-layout/widgets/graph/chart-core/constants/ChartCoreConstants'; import { computeValueScale } from '@/page-layout/widgets/graph/chart-core/utils/computeValueScale'; import { renderGridLayer } from '@/page-layout/widgets/graph/chart-core/utils/renderGridLayer'; -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { computeBaselineBar } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBaselineBar'; -import { interpolateBars } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/interpolateBars'; -import { renderBars } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/renderBars'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { computeBaselineBar } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBaselineBar'; +import { interpolateBars } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/interpolateBars'; +import { renderBars } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderBars'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { type RefObject, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartHoverLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayer.tsx similarity index 90% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartHoverLayer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayer.tsx index 0e7d0e2c63..2743face84 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartHoverLayer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayer.tsx @@ -1,5 +1,5 @@ -import { BarChartHoverLayerEffect } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartHoverLayerEffect'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; +import { BarChartHoverLayerEffect } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayerEffect'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { styled } from '@linaria/react'; import { useRef } from 'react'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartHoverLayerEffect.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayerEffect.tsx similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartHoverLayerEffect.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayerEffect.tsx index feb7a3d33b..d31d5c01f8 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartHoverLayerEffect.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayerEffect.tsx @@ -1,6 +1,6 @@ import { CHART_CORE_CONSTANTS } from '@/page-layout/widgets/graph/chart-core/constants/ChartCoreConstants'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; -import { renderSliceHighlight } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/renderSliceHighlight'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; +import { renderSliceHighlight } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderSliceHighlight'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { type RefObject, useContext, useEffect, useState } from 'react'; import { BarChartLayout } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartLayers.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartLayers.tsx similarity index 94% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartLayers.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartLayers.tsx index d75b9534a4..d569afcddb 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartLayers.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartLayers.tsx @@ -1,11 +1,11 @@ import { AxisLayer } from '@/page-layout/widgets/graph/chart-core/layers/AxisLayer'; import { type AxisLayerConfig } from '@/page-layout/widgets/graph/chart-core/types/AxisLayerConfig'; import { NoDataLayer } from '@/page-layout/widgets/graph/components/NoDataLayer'; -import { BarChartBaseLayer } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartBaseLayer'; -import { BarChartHoverLayer } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartHoverLayer'; -import { BarChartTotalsLayer } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartTotalsLayer'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { BarChartBaseLayer } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartBaseLayer'; +import { BarChartHoverLayer } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartHoverLayer'; +import { BarChartTotalsLayer } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartTotalsLayer'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { styled } from '@linaria/react'; import { BarChartLayout } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartTooltip.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartTooltip.tsx similarity index 88% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartTooltip.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartTooltip.tsx index a6589ffe6b..1d806f5c02 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartTooltip.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartTooltip.tsx @@ -1,11 +1,11 @@ import { GraphWidgetFloatingTooltip } from '@/page-layout/widgets/graph/components/GraphWidgetFloatingTooltip'; import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue'; -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { graphWidgetBarTooltipComponentState } from '@/page-layout/widgets/graph/graphWidgetBarChart/states/graphWidgetBarTooltipComponentState'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; -import { getBarChartTooltipData } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTooltipData'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { graphWidgetBarTooltipComponentState } from '@/page-layout/widgets/graph/graph-widget-bar-chart/states/graphWidgetBarTooltipComponentState'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; +import { getBarChartTooltipData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartTooltipData'; import { createVirtualElementFromContainerOffset } from '@/page-layout/widgets/graph/utils/createVirtualElementFromContainerOffset'; import { type GraphValueFormatOptions } from '@/page-layout/widgets/graph/utils/graphFormatters'; import { type RefObject } from 'react'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartTotalsLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartTotalsLayer.tsx similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartTotalsLayer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartTotalsLayer.tsx index c0a9673e54..844c665d28 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartTotalsLayer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartTotalsLayer.tsx @@ -1,8 +1,8 @@ import { GraphDataLabel } from '@/page-layout/widgets/graph/components/GraphDataLabel'; -import { type BarChartLabelData } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartLabelData'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { computeBarChartGroupedLabels } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartGroupedLabels'; -import { computeBarChartStackedLabels } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartStackedLabels'; +import { type BarChartLabelData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartLabelData'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { computeBarChartGroupedLabels } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartGroupedLabels'; +import { computeBarChartStackedLabels } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartStackedLabels'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { type GraphLabelData } from '@/page-layout/widgets/graph/types/GraphLabelData'; import { styled } from '@linaria/react'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart.tsx similarity index 91% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart.tsx index 9253ec5446..15de9dab83 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart.tsx @@ -3,17 +3,17 @@ import { pageLayoutDraggingWidgetIdComponentState } from '@/page-layout/states/p import { pageLayoutResizingWidgetIdComponentState } from '@/page-layout/states/pageLayoutResizingWidgetIdComponentState'; import { GraphWidgetChartContainer } from '@/page-layout/widgets/graph/components/GraphWidgetChartContainer'; import { GraphWidgetLegend } from '@/page-layout/widgets/graph/components/GraphWidgetLegend'; -import { BarChart } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/BarChart'; -import { BarChartTooltip } from '@/page-layout/widgets/graph/graphWidgetBarChart/components/BarChartTooltip'; -import { useBarChartData } from '@/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartData'; -import { graphWidgetBarTooltipComponentState } from '@/page-layout/widgets/graph/graphWidgetBarChart/states/graphWidgetBarTooltipComponentState'; -import { graphWidgetHoveredSliceIndexComponentState } from '@/page-layout/widgets/graph/graphWidgetBarChart/states/graphWidgetHoveredSliceIndexComponentState'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSeries'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; -import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSliceHoverData'; -import { calculateStackedBarChartValueRange } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateStackedBarChartValueRange'; -import { calculateValueRangeFromBarChartKeys } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateValueRangeFromBarChartKeys'; +import { BarChart } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChart'; +import { BarChartTooltip } from '@/page-layout/widgets/graph/graph-widget-bar-chart/components/BarChartTooltip'; +import { useBarChartData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartData'; +import { graphWidgetBarTooltipComponentState } from '@/page-layout/widgets/graph/graph-widget-bar-chart/states/graphWidgetBarTooltipComponentState'; +import { graphWidgetHoveredSliceIndexComponentState } from '@/page-layout/widgets/graph/graph-widget-bar-chart/states/graphWidgetHoveredSliceIndexComponentState'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSeries'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; +import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSliceHoverData'; +import { calculateStackedBarChartValueRange } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateStackedBarChartValueRange'; +import { calculateValueRangeFromBarChartKeys } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateValueRangeFromBarChartKeys'; import { type GraphColorMode } from '@/page-layout/widgets/graph/types/GraphColorMode'; import { computeEffectiveValueRange } from '@/page-layout/widgets/graph/utils/computeEffectiveValueRange'; import { createGraphColorRegistry } from '@/page-layout/widgets/graph/utils/createGraphColorRegistry'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChartRenderer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChartRenderer.tsx similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChartRenderer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChartRenderer.tsx index c30af3ba8a..8faff66408 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChartRenderer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChartRenderer.tsx @@ -1,8 +1,8 @@ import { isPageLayoutInEditModeComponentState } from '@/page-layout/states/isPageLayoutInEditModeComponentState'; import { WidgetSkeletonLoader } from '@/page-layout/widgets/components/WidgetSkeletonLoader'; import { GraphWidgetChartHasTooManyGroupsEffect } from '@/page-layout/widgets/graph/components/GraphWidgetChartHasTooManyGroupsEffect'; -import { useGraphBarChartWidgetData } from '@/page-layout/widgets/graph/graphWidgetBarChart/hooks/useGraphBarChartWidgetData'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; +import { useGraphBarChartWidgetData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useGraphBarChartWidgetData'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; import { assertBarChartWidgetOrThrow } from '@/page-layout/widgets/graph/utils/assertBarChartWidget'; import { buildChartDrilldownQueryParams } from '@/page-layout/widgets/graph/utils/buildChartDrilldownQueryParams'; import { generateChartAggregateFilterKey } from '@/page-layout/widgets/graph/utils/generateChartAggregateFilterKey'; @@ -21,7 +21,7 @@ import { AxisNameDisplay } from '~/generated-metadata/graphql'; const GraphWidgetBarChart = lazy(() => import( - '@/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart' + '@/page-layout/widgets/graph/graph-widget-bar-chart/components/GraphWidgetBarChart' ).then((module) => ({ default: module.GraphWidgetBarChart, })), diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/__tests__/useBarChartData.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/__tests__/useBarChartData.test.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/__tests__/useBarChartData.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/__tests__/useBarChartData.test.ts index ecea2a77c6..d9656ae73c 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/__tests__/useBarChartData.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/__tests__/useBarChartData.test.ts @@ -1,5 +1,5 @@ -import { useBarChartData } from '@/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartData'; -import { type BarChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSeries'; +import { useBarChartData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartData'; +import { type BarChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSeries'; import { type GraphColorRegistry } from '@/page-layout/widgets/graph/types/GraphColorRegistry'; import { renderHook } from '@testing-library/react'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartData.ts similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartData.ts index 90d5e06cef..2dc30798d2 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartData.ts @@ -1,6 +1,6 @@ import { type GraphWidgetLegendItem } from '@/page-layout/widgets/graph/components/GraphWidgetLegend'; -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSeries'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSeries'; import { graphWidgetHiddenLegendIdsComponentState } from '@/page-layout/widgets/graph/states/graphWidgetHiddenLegendIdsComponentState'; import { type GraphColorMode } from '@/page-layout/widgets/graph/types/GraphColorMode'; import { type GraphColorRegistry } from '@/page-layout/widgets/graph/types/GraphColorRegistry'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartLayout.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartLayout.ts similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartLayout.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartLayout.ts index 9f24c93ef0..c24c4ee71a 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartLayout.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartLayout.ts @@ -1,10 +1,10 @@ import { type AxisLayerConfig } from '@/page-layout/widgets/graph/chart-core/types/AxisLayerConfig'; import { getChartInnerDimensions } from '@/page-layout/widgets/graph/chart-core/utils/getChartInnerDimensions'; import { COMMON_CHART_CONSTANTS } from '@/page-layout/widgets/graph/constants/CommonChartConstants'; -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { getBarChartInnerPadding } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartInnerPadding'; -import { getBarChartLayout } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartLayout'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { getBarChartInnerPadding } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartInnerPadding'; +import { getBarChartLayout } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartLayout'; import { type ChartAxisTheme } from '@/page-layout/widgets/graph/types/ChartAxisTheme'; import { type GraphValueFormatOptions } from '@/page-layout/widgets/graph/utils/graphFormatters'; import { resolveAxisFontSizes } from '@/page-layout/widgets/graph/utils/resolveAxisFontSizes'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartTheme.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartTheme.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useBarChartTheme.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useBarChartTheme.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useGraphBarChartWidgetData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useGraphBarChartWidgetData.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useGraphBarChartWidgetData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useGraphBarChartWidgetData.ts index 09861cf2a2..bf6fae7ceb 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useGraphBarChartWidgetData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useGraphBarChartWidgetData.ts @@ -1,9 +1,9 @@ import { useObjectMetadataItemById } from '@/object-metadata/hooks/useObjectMetadataItemById'; import { type FieldMetadataItemOption } from '@/object-metadata/types/FieldMetadataItem'; import { BAR_CHART_DATA } from '@/page-layout/widgets/graph/graphql/queries/barChartData'; -import { type BarChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSeries'; -import { getEffectiveGroupMode } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getEffectiveGroupMode'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; +import { type BarChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSeries'; +import { getEffectiveGroupMode } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getEffectiveGroupMode'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; import { type GraphColorMode } from '@/page-layout/widgets/graph/types/GraphColorMode'; import { type RawDimensionValue } from '@/page-layout/widgets/graph/types/RawDimensionValue'; import { determineChartItemColor } from '@/page-layout/widgets/graph/utils/determineChartItemColor'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useMemoizedBarPositions.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useMemoizedBarPositions.ts similarity index 89% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useMemoizedBarPositions.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useMemoizedBarPositions.ts index 1e72f626b8..03953a5cf9 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/hooks/useMemoizedBarPositions.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/hooks/useMemoizedBarPositions.ts @@ -1,7 +1,7 @@ -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { computeBarPositions } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositions'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { computeBarPositions } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositions'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { useMemo } from 'react'; import { type BarChartLayout } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/states/graphWidgetBarTooltipComponentState.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/states/graphWidgetBarTooltipComponentState.ts similarity index 89% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/states/graphWidgetBarTooltipComponentState.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/states/graphWidgetBarTooltipComponentState.ts index 21578fadd8..bf3517e270 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/states/graphWidgetBarTooltipComponentState.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/states/graphWidgetBarTooltipComponentState.ts @@ -1,4 +1,4 @@ -import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSliceHoverData'; +import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSliceHoverData'; import { WidgetComponentInstanceContext } from '@/page-layout/widgets/states/contexts/WidgetComponentInstanceContext'; import { createAtomComponentState } from '@/ui/utilities/state/jotai/utils/createAtomComponentState'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/states/graphWidgetHoveredSliceIndexComponentState.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/states/graphWidgetHoveredSliceIndexComponentState.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/states/graphWidgetHoveredSliceIndexComponentState.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/states/graphWidgetHoveredSliceIndexComponentState.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartLabelData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartLabelData.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartLabelData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartLabelData.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSeries.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSeries.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSeries.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSeries.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice.ts similarity index 83% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice.ts index 6c99470f01..7c0621d968 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice.ts @@ -1,4 +1,4 @@ -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; export type BarChartSlice = { indexValue: string; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSliceHoverData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSliceHoverData.ts similarity index 79% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSliceHoverData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSliceHoverData.ts index 48696716bc..5341957462 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSliceHoverData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSliceHoverData.ts @@ -1,4 +1,4 @@ -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; export type BarChartSliceHoverData = { slice: BarChartSlice; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/calculateBarChartValueRange.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/calculateBarChartValueRange.test.ts similarity index 94% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/calculateBarChartValueRange.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/calculateBarChartValueRange.test.ts index 50862950d6..9c31a08fe7 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/calculateBarChartValueRange.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/calculateBarChartValueRange.test.ts @@ -1,5 +1,5 @@ -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { calculateValueRangeFromBarChartKeys } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateValueRangeFromBarChartKeys'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { calculateValueRangeFromBarChartKeys } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateValueRangeFromBarChartKeys'; describe('calculateValueRangeFromBarChartKeys (essential cases)', () => { it('returns minimum=0 and maximum=highest value for all positive values', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/calculateStackedBarChartValueRange.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/calculateStackedBarChartValueRange.test.ts similarity index 94% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/calculateStackedBarChartValueRange.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/calculateStackedBarChartValueRange.test.ts index c629617cb9..203e8fc04b 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/calculateStackedBarChartValueRange.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/calculateStackedBarChartValueRange.test.ts @@ -1,5 +1,5 @@ -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { calculateStackedBarChartValueRange } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateStackedBarChartValueRange'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { calculateStackedBarChartValueRange } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateStackedBarChartValueRange'; describe('calculateStackedBarChartValueRange (essential cases)', () => { it('returns minimum=0 and maximum=largest positive stack', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeAllCategorySlices.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeAllCategorySlices.test.ts similarity index 99% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeAllCategorySlices.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeAllCategorySlices.test.ts index d75144f496..eef2dc8113 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeAllCategorySlices.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeAllCategorySlices.test.ts @@ -1,4 +1,4 @@ -import { computeAllCategorySlices } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeAllCategorySlices'; +import { computeAllCategorySlices } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeAllCategorySlices'; describe('computeAllCategorySlices', () => { const defaultMargins = { top: 20, right: 20, bottom: 40, left: 60 }; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBarChartGroupedLabels.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBarChartGroupedLabels.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBarChartGroupedLabels.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBarChartGroupedLabels.test.ts index ae4bcd6652..3cdb4cde62 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBarChartGroupedLabels.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBarChartGroupedLabels.test.ts @@ -1,5 +1,5 @@ -import { computeBarChartGroupedLabels } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartGroupedLabels'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { computeBarChartGroupedLabels } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartGroupedLabels'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; const createMockBar = (overrides: Partial = {}): BarPosition => ({ x: 0, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBarChartStackedLabels.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBarChartStackedLabels.test.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBarChartStackedLabels.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBarChartStackedLabels.test.ts index b5a3e1a48c..7139f2c4ac 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBarChartStackedLabels.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBarChartStackedLabels.test.ts @@ -1,5 +1,5 @@ -import { computeBarChartStackedLabels } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartStackedLabels'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { computeBarChartStackedLabels } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartStackedLabels'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; const createMockBar = ( seriesId: string, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBarPositions.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBarPositions.test.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBarPositions.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBarPositions.test.ts index 27d2e8d1dc..015262387c 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBarPositions.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBarPositions.test.ts @@ -1,5 +1,5 @@ -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { computeBarPositions } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositions'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { computeBarPositions } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositions'; import { BarChartLayout } from '~/generated-metadata/graphql'; describe('computeBarPositions', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBaselineBar.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBaselineBar.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBaselineBar.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBaselineBar.test.ts index 37b1cc994a..20335da2cc 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeBaselineBar.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeBaselineBar.test.ts @@ -1,5 +1,5 @@ -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { computeBaselineBar } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBaselineBar'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { computeBaselineBar } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBaselineBar'; describe('computeBaselineBar', () => { const createBar = (overrides: Partial = {}): BarPosition => ({ diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeGroupedBarLayout.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeGroupedBarLayout.test.ts similarity index 91% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeGroupedBarLayout.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeGroupedBarLayout.test.ts index 79a60d2ab4..1a6e59a322 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeGroupedBarLayout.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeGroupedBarLayout.test.ts @@ -1,6 +1,6 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; -import { computeGroupedBarLayout } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getGroupedBarDimensions'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; +import { computeGroupedBarLayout } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getGroupedBarDimensions'; const createContext = ( overrides: Partial = {}, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeSliceTooltipPosition.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeSliceTooltipPosition.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeSliceTooltipPosition.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeSliceTooltipPosition.test.ts index a6d69cc0ab..46fd29cdd7 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeSliceTooltipPosition.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeSliceTooltipPosition.test.ts @@ -1,5 +1,5 @@ -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; -import { computeSliceTooltipPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeSliceTooltipPosition'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; +import { computeSliceTooltipPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeSliceTooltipPosition'; describe('computeSliceTooltipPosition', () => { const defaultMargins = { top: 20, right: 20, bottom: 40, left: 60 }; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeStackedBarLayout.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeStackedBarLayout.test.ts similarity index 85% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeStackedBarLayout.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeStackedBarLayout.test.ts index 1c3b4e2083..d7d0e72f49 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/computeStackedBarLayout.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/computeStackedBarLayout.test.ts @@ -1,6 +1,6 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; -import { computeStackedBarLayout } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getStackedBarDimensions'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; +import { computeStackedBarLayout } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getStackedBarDimensions'; const createContext = ( overrides: Partial = {}, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getBarChartInnerPadding.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getBarChartInnerPadding.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getBarChartInnerPadding.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getBarChartInnerPadding.test.ts index a1d3ab1434..b20c207bea 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getBarChartInnerPadding.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getBarChartInnerPadding.test.ts @@ -1,5 +1,5 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { getBarChartInnerPadding } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartInnerPadding'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { getBarChartInnerPadding } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartInnerPadding'; import { BarChartLayout } from '~/generated-metadata/graphql'; describe('getBarChartInnerPadding', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getBarChartLayout.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getBarChartLayout.test.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getBarChartLayout.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getBarChartLayout.test.ts index 5987a9cbb4..a76d6e9bad 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getBarChartLayout.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getBarChartLayout.test.ts @@ -1,8 +1,8 @@ import { TEXT_MARGIN_LIMITS } from '@/page-layout/widgets/graph/constants/TextMarginLimits'; -import { getBarChartLayout } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartLayout'; +import { getBarChartLayout } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartLayout'; import { type ChartAxisTheme } from '@/page-layout/widgets/graph/types/ChartAxisTheme'; import { type GraphValueFormatOptions } from '@/page-layout/widgets/graph/utils/graphFormatters'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; import { BarChartLayout } from '~/generated-metadata/graphql'; describe('getBarChartLayout', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getEffectiveGroupMode.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getEffectiveGroupMode.test.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getEffectiveGroupMode.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getEffectiveGroupMode.test.ts index be8fe6d2c3..8f59317155 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getEffectiveGroupMode.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getEffectiveGroupMode.test.ts @@ -1,4 +1,4 @@ -import { getEffectiveGroupMode } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getEffectiveGroupMode'; +import { getEffectiveGroupMode } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getEffectiveGroupMode'; import { BarChartGroupMode } from '~/generated-metadata/graphql'; describe('getEffectiveGroupMode', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getGroupedBarDimensions.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getGroupedBarDimensions.test.ts similarity index 89% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getGroupedBarDimensions.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getGroupedBarDimensions.test.ts index cecf15fb03..a862ec2557 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getGroupedBarDimensions.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getGroupedBarDimensions.test.ts @@ -1,8 +1,8 @@ import { computeGroupedBarLayout, getGroupedBarDimensions, -} from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getGroupedBarDimensions'; -import { type BarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; +} from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getGroupedBarDimensions'; +import { type BarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; const createContext = ( overrides: Partial = {}, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getStackedBarDimensions.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getStackedBarDimensions.test.ts similarity index 94% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getStackedBarDimensions.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getStackedBarDimensions.test.ts index 69cdac2943..8816bb79e3 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/getStackedBarDimensions.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/getStackedBarDimensions.test.ts @@ -1,8 +1,8 @@ import { getStackedBarDimensions, type StackedBarLayout, -} from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getStackedBarDimensions'; -import { type BarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; +} from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getStackedBarDimensions'; +import { type BarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; const createContext = ( overrides: Partial = {}, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/hasNegativeValuesInData.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/hasNegativeValuesInData.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/hasNegativeValuesInData.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/hasNegativeValuesInData.test.ts index 89237c03c0..9c590b6b5e 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/hasNegativeValuesInData.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/hasNegativeValuesInData.test.ts @@ -1,4 +1,4 @@ -import { hasNegativeValuesInData } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/hasNegativeValuesInData'; +import { hasNegativeValuesInData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/hasNegativeValuesInData'; describe('hasNegativeValuesInData', () => { describe('positive values only', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/interpolateBars.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/interpolateBars.test.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/interpolateBars.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/interpolateBars.test.ts index 38834db55e..52e89ba01d 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/interpolateBars.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/interpolateBars.test.ts @@ -1,5 +1,5 @@ -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { interpolateBars } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/interpolateBars'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { interpolateBars } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/interpolateBars'; describe('interpolateBars', () => { const createBar = (overrides: Partial = {}): BarPosition => ({ diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/truncateTickLabel.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/truncateTickLabel.test.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/truncateTickLabel.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/truncateTickLabel.test.ts index e67fbff56b..c6edbac56c 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/__tests__/truncateTickLabel.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/__tests__/truncateTickLabel.test.ts @@ -1,4 +1,4 @@ -import { truncateTickLabel } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/truncateTickLabel'; +import { truncateTickLabel } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/truncateTickLabel'; describe('truncateTickLabel', () => { it('should return the original string when it fits within maxLength', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/buildBars.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/buildBars.ts similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/buildBars.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/buildBars.ts index 604d13a75d..a2ae9c95f0 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/buildBars.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/buildBars.ts @@ -1,7 +1,7 @@ -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { type BarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { type BarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; import { isNumber } from '@sniptt/guards'; type StackState = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateStackedBarChartValueRange.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateStackedBarChartValueRange.ts similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateStackedBarChartValueRange.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateStackedBarChartValueRange.ts index 51cb8442d8..1d99306063 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateStackedBarChartValueRange.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateStackedBarChartValueRange.ts @@ -1,6 +1,6 @@ import { type ChartValueRange } from '@/page-layout/widgets/graph/types/ChartValueRange'; import { calculateValueRangeFromValues } from '@/page-layout/widgets/graph/utils/calculateValueRangeFromValues'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; export const calculateStackedBarChartValueRange = ( data: BarChartDatum[], diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateValueRangeFromBarChartKeys.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateValueRangeFromBarChartKeys.ts similarity index 93% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateValueRangeFromBarChartKeys.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateValueRangeFromBarChartKeys.ts index c2153d1373..a4384886b2 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/calculateValueRangeFromBarChartKeys.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/calculateValueRangeFromBarChartKeys.ts @@ -1,6 +1,6 @@ import { type ChartValueRange } from '@/page-layout/widgets/graph/types/ChartValueRange'; import { calculateValueRangeFromValues } from '@/page-layout/widgets/graph/utils/calculateValueRangeFromValues'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; export const calculateValueRangeFromBarChartKeys = ( data: BarChartDatum[], diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeAllCategorySlices.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeAllCategorySlices.ts similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeAllCategorySlices.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeAllCategorySlices.ts index b85f377870..0e4b319706 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeAllCategorySlices.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeAllCategorySlices.ts @@ -1,8 +1,8 @@ import { computeBandScale } from '@/page-layout/widgets/graph/chart-core/utils/computeBandScale'; -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { isDefined } from 'twenty-shared/utils'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartCategoryTickValues.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartCategoryTickValues.ts similarity index 90% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartCategoryTickValues.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartCategoryTickValues.ts index da51663eda..98247dffde 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartCategoryTickValues.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartCategoryTickValues.ts @@ -1,6 +1,6 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { computeMinHeightPerTick } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeMinHeightPerTick'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { computeMinHeightPerTick } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeMinHeightPerTick'; import { computeChartCategoryTickValues } from '@/page-layout/widgets/graph/utils/computeChartCategoryTickValues'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { BarChartLayout } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartGroupedLabels.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartGroupedLabels.ts similarity index 88% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartGroupedLabels.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartGroupedLabels.ts index 3c37a848ea..f794a5e91f 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartGroupedLabels.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartGroupedLabels.ts @@ -1,5 +1,5 @@ -import { type BarChartLabelData } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartLabelData'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { type BarChartLabelData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartLabelData'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; export const computeBarChartGroupedLabels = ( bars: BarPosition[], diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartStackedLabels.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartStackedLabels.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartStackedLabels.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartStackedLabels.ts index e03d9607cc..5fe45f5ed9 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartStackedLabels.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartStackedLabels.ts @@ -1,5 +1,5 @@ -import { type BarChartLabelData } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartLabelData'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { type BarChartLabelData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartLabelData'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; import { isDefined } from 'twenty-shared/utils'; export const computeBarChartStackedLabels = ( diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartValueTickCount.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartValueTickCount.ts similarity index 85% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartValueTickCount.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartValueTickCount.ts index 205c3d680e..bf256c46c9 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartValueTickCount.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartValueTickCount.ts @@ -1,5 +1,5 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { computeMinHeightPerTick } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeMinHeightPerTick'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { computeMinHeightPerTick } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeMinHeightPerTick'; import { BarChartLayout } from '~/generated-metadata/graphql'; type ComputeBarChartValueTickCountProps = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext.ts similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext.ts index 0e40d54903..95af88863c 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext.ts @@ -1,7 +1,7 @@ import { computeBandScale } from '@/page-layout/widgets/graph/chart-core/utils/computeBandScale'; import { computeValueScale } from '@/page-layout/widgets/graph/chart-core/utils/computeValueScale'; -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; import { type BarChartLayout, BarChartLayout as BarChartLayoutEnum, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositions.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositions.ts similarity index 86% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositions.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositions.ts index 1daeb1afd4..d52aa6823d 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositions.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositions.ts @@ -1,8 +1,8 @@ -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { computeBarPositionsByGroupMode } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionsByGroupMode'; -import { computeShouldRoundFreeEndMap } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeShouldRoundFreeEndMap'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { computeBarPositionsByGroupMode } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionsByGroupMode'; +import { computeShouldRoundFreeEndMap } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeShouldRoundFreeEndMap'; import { getChartInnerDimensions } from '@/page-layout/widgets/graph/chart-core/utils/getChartInnerDimensions'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { type BarChartLayout } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionsByGroupMode.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionsByGroupMode.ts similarity index 83% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionsByGroupMode.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionsByGroupMode.ts index 243e0726e1..b8103d3151 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionsByGroupMode.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionsByGroupMode.ts @@ -1,9 +1,9 @@ -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { computeBarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; -import { computeGroupedBarPositions } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeGroupedBarPositions'; -import { computeStackedBarPositions } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeStackedBarPositions'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { computeBarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; +import { computeGroupedBarPositions } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeGroupedBarPositions'; +import { computeStackedBarPositions } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeStackedBarPositions'; import { type BarChartLayout } from '~/generated-metadata/graphql'; type ComputeBarPositionsByGroupModeParams = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBaselineBar.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBaselineBar.ts similarity index 93% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBaselineBar.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBaselineBar.ts index 14a5b6e293..f7bec866b2 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBaselineBar.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBaselineBar.ts @@ -1,4 +1,4 @@ -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; type ComputeBaselineBarParams = { bar: BarPosition; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeGroupedBarPositions.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeGroupedBarPositions.ts similarity index 77% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeGroupedBarPositions.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeGroupedBarPositions.ts index fd55c4ebbe..723247263c 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeGroupedBarPositions.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeGroupedBarPositions.ts @@ -1,12 +1,12 @@ -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { type BarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; -import { buildBars } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/buildBars'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { type BarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; +import { buildBars } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/buildBars'; import { computeGroupedBarLayout, getGroupedBarDimensions, -} from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getGroupedBarDimensions'; +} from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getGroupedBarDimensions'; type ComputeGroupedBarPositionsParams = { ctx: BarPositionContext; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeMinHeightPerTick.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeMinHeightPerTick.ts similarity index 82% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeMinHeightPerTick.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeMinHeightPerTick.ts index 26f05a5eda..d9457d5923 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeMinHeightPerTick.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeMinHeightPerTick.ts @@ -1,4 +1,4 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; export const computeMinHeightPerTick = ({ axisFontSize, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeShouldRoundFreeEndMap.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeShouldRoundFreeEndMap.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeShouldRoundFreeEndMap.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeShouldRoundFreeEndMap.ts index fb6020bb7c..abe407196d 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeShouldRoundFreeEndMap.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeShouldRoundFreeEndMap.ts @@ -1,6 +1,6 @@ import { isNumber } from '@sniptt/guards'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; export const computeShouldRoundFreeEndMap = ({ data, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeSliceHighlightPosition.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeSliceHighlightPosition.ts similarity index 94% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeSliceHighlightPosition.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeSliceHighlightPosition.ts index 602a9b4052..bd4b83c94f 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeSliceHighlightPosition.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeSliceHighlightPosition.ts @@ -1,4 +1,4 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; type ComputeSliceHighlightPositionParams = { sliceCenter: number | null; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeSliceTooltipPosition.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeSliceTooltipPosition.ts similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeSliceTooltipPosition.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeSliceTooltipPosition.ts index db3a244418..a2a1babf93 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeSliceTooltipPosition.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeSliceTooltipPosition.ts @@ -1,6 +1,6 @@ -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; -import { findAnchorBarInSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/findAnchorBarInSlice'; +import { findAnchorBarInSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/findAnchorBarInSlice'; type ComputeSliceTooltipPositionParams = { slice: BarChartSlice; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeStackedBarPositions.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeStackedBarPositions.ts similarity index 80% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeStackedBarPositions.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeStackedBarPositions.ts index c72b4cdc66..d23ab10798 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/computeStackedBarPositions.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeStackedBarPositions.ts @@ -1,12 +1,12 @@ -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; -import { type BarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; -import { buildBars } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/buildBars'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; +import { type BarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; +import { buildBars } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/buildBars'; import { computeStackedBarLayout, getStackedBarDimensions, -} from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getStackedBarDimensions'; +} from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getStackedBarDimensions'; type ComputeStackedBarPositionsParams = { ctx: BarPositionContext; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/drawRoundedRect.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/drawRoundedRect.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/drawRoundedRect.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/drawRoundedRect.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/findAnchorBarInSlice.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findAnchorBarInSlice.ts similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/findAnchorBarInSlice.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findAnchorBarInSlice.ts index 8bf04d8244..adcac5ca71 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/findAnchorBarInSlice.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findAnchorBarInSlice.ts @@ -1,4 +1,4 @@ -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; export const findAnchorBarInSlice = ({ bars, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/findSliceAtPosition.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findSliceAtPosition.ts similarity index 94% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/findSliceAtPosition.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findSliceAtPosition.ts index f9a1c47e03..64f5680fec 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/findSliceAtPosition.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/findSliceAtPosition.ts @@ -1,4 +1,4 @@ -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; export const findSliceAtPosition = ({ mouseX, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartAxisConfigs.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartAxisConfigs.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartAxisConfigs.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartAxisConfigs.ts index c7d393e54a..5ded3ac5ea 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartAxisConfigs.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartAxisConfigs.ts @@ -1,12 +1,12 @@ -import { truncateTickLabel } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/truncateTickLabel'; +import { truncateTickLabel } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/truncateTickLabel'; import { formatGraphValue, type GraphValueFormatOptions, } from '@/page-layout/widgets/graph/utils/graphFormatters'; import { COMMON_CHART_CONSTANTS } from '@/page-layout/widgets/graph/constants/CommonChartConstants'; -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarChartTickConfig } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTickConfig'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarChartTickConfig } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartTickConfig'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { BarChartLayout } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartInnerPadding.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartInnerPadding.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartInnerPadding.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartInnerPadding.ts index 47e43f112c..3bd9d37e4b 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartInnerPadding.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartInnerPadding.ts @@ -1,4 +1,4 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; import { computeBandScale } from '@/page-layout/widgets/graph/chart-core/utils/computeBandScale'; import { BarChartLayout } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartLayout.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartLayout.ts similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartLayout.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartLayout.ts index 8b3e2758b0..8525fa02d5 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartLayout.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartLayout.ts @@ -1,12 +1,12 @@ import { COMMON_CHART_CONSTANTS } from '@/page-layout/widgets/graph/constants/CommonChartConstants'; -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { getBarChartAxisConfigs } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartAxisConfigs'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { getBarChartAxisConfigs } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartAxisConfigs'; import { getBarChartTickConfig, type BarChartTickConfig, -} from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTickConfig'; -import { truncateTickLabel } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/truncateTickLabel'; +} from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartTickConfig'; +import { truncateTickLabel } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/truncateTickLabel'; import { type ChartAxisTheme } from '@/page-layout/widgets/graph/types/ChartAxisTheme'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { computeBottomLegendOffsetFromText } from '@/page-layout/widgets/graph/utils/computeBottomLegendOffsetFromText'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTickConfig.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartTickConfig.ts similarity index 91% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTickConfig.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartTickConfig.ts index 17eff5fb08..bba0f9a637 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTickConfig.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartTickConfig.ts @@ -1,7 +1,7 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { computeBarChartCategoryTickValues } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartCategoryTickValues'; -import { computeBarChartValueTickCount } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarChartValueTickCount'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { computeBarChartCategoryTickValues } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartCategoryTickValues'; +import { computeBarChartValueTickCount } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarChartValueTickCount'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { computeMaxLabelLengthForMargin } from '@/page-layout/widgets/graph/utils/computeMaxLabelLengthForMargin'; import { getTickRotationConfig } from '@/page-layout/widgets/graph/utils/getTickRotationConfig'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTooltipData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartTooltipData.ts similarity index 90% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTooltipData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartTooltipData.ts index 32ce4b1f01..7baf9d0012 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTooltipData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getBarChartTooltipData.ts @@ -1,7 +1,7 @@ import { type GraphWidgetTooltipItem } from '@/page-layout/widgets/graph/components/GraphWidgetTooltip'; -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; -import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartEnrichedKey'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; +import { type BarChartEnrichedKey } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartEnrichedKey'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; import { formatGraphValue, type GraphValueFormatOptions, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getEffectiveGroupMode.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getEffectiveGroupMode.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getEffectiveGroupMode.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getEffectiveGroupMode.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getGroupedBarDimensions.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getGroupedBarDimensions.ts similarity index 94% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getGroupedBarDimensions.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getGroupedBarDimensions.ts index 279ea7c49d..7b6b5400ee 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getGroupedBarDimensions.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getGroupedBarDimensions.ts @@ -1,5 +1,5 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; type GetGroupedBarDimensionsParams = { ctx: BarPositionContext; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getSliceHoverDataFromMouseEvent.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getSliceHoverDataFromMouseEvent.ts similarity index 85% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getSliceHoverDataFromMouseEvent.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getSliceHoverDataFromMouseEvent.ts index 6fa61ff5d3..e43543fd60 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getSliceHoverDataFromMouseEvent.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getSliceHoverDataFromMouseEvent.ts @@ -1,7 +1,7 @@ import { getPointerPosition } from '@/page-layout/widgets/graph/chart-core/utils/getPointerPosition'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; -import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSliceHoverData'; -import { getSliceHoverDataFromPointerPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/getSliceHoverDataFromPointerPosition'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; +import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSliceHoverData'; +import { getSliceHoverDataFromPointerPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/getSliceHoverDataFromPointerPosition'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { type MouseEvent } from 'react'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getSliceHoverDataFromPointerPosition.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getSliceHoverDataFromPointerPosition.ts similarity index 87% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getSliceHoverDataFromPointerPosition.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getSliceHoverDataFromPointerPosition.ts index 2ad6a2c0ab..19441ca2e1 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getSliceHoverDataFromPointerPosition.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getSliceHoverDataFromPointerPosition.ts @@ -1,8 +1,8 @@ import { isPointInChartArea } from '@/page-layout/widgets/graph/chart-core/utils/isPointInChartArea'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; -import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSliceHoverData'; -import { computeSliceTooltipPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeSliceTooltipPosition'; -import { findSliceAtPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/findSliceAtPosition'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; +import { type BarChartSliceHoverData } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSliceHoverData'; +import { computeSliceTooltipPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeSliceTooltipPosition'; +import { findSliceAtPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/findSliceAtPosition'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; type GetSliceHoverDataFromPointerPositionParams = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getStackedBarDimensions.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getStackedBarDimensions.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getStackedBarDimensions.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getStackedBarDimensions.ts index 13e726b14a..32c164ae85 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getStackedBarDimensions.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/getStackedBarDimensions.ts @@ -1,6 +1,6 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; import { computeValueScale } from '@/page-layout/widgets/graph/chart-core/utils/computeValueScale'; -import { type BarPositionContext } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/computeBarPositionContext'; +import { type BarPositionContext } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/computeBarPositionContext'; type GetStackedBarDimensionsParams = { ctx: BarPositionContext; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/hasNegativeValuesInData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/hasNegativeValuesInData.ts similarity index 89% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/hasNegativeValuesInData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/hasNegativeValuesInData.ts index b6fdbfaa9f..65081a86e5 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/hasNegativeValuesInData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/hasNegativeValuesInData.ts @@ -1,4 +1,4 @@ -import { type BarChartDatum } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartDatum'; +import { type BarChartDatum } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartDatum'; import { isNumber } from '@sniptt/guards'; export const hasNegativeValuesInData = ( diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/interpolateBars.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/interpolateBars.ts similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/interpolateBars.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/interpolateBars.ts index 516e803004..4de32d2452 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/interpolateBars.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/interpolateBars.ts @@ -1,5 +1,5 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; const getBarKey = (bar: BarPosition) => `${bar.indexValue}::${bar.seriesId}`; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/renderBars.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderBars.ts similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/renderBars.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderBars.ts index 978c9a9fdf..ab7c1754e1 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/renderBars.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderBars.ts @@ -1,9 +1,9 @@ import { LEGEND_HIGHLIGHT_DIMMED_OPACITY } from '@/page-layout/widgets/graph/constants/LegendHighlightDimmedOpacity.constant'; -import { type BarPosition } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarPosition'; +import { type BarPosition } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarPosition'; import { drawHorizontalRoundedRect, drawRoundedRect, -} from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/drawRoundedRect'; +} from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/drawRoundedRect'; export const renderBars = ({ ctx, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/renderSliceHighlight.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderSliceHighlight.ts similarity index 89% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/renderSliceHighlight.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderSliceHighlight.ts index a051ecd3c6..a463145280 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/renderSliceHighlight.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/renderSliceHighlight.ts @@ -1,5 +1,5 @@ -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { type BarChartSlice } from '@/page-layout/widgets/graph/graphWidgetBarChart/types/BarChartSlice'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { type BarChartSlice } from '@/page-layout/widgets/graph/graph-widget-bar-chart/types/BarChartSlice'; export const renderSliceHighlight = ({ ctx, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/truncateTickLabel.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/truncateTickLabel.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/truncateTickLabel.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-bar-chart/utils/truncateTickLabel.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/components/GaugeChartEndLine.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/components/GaugeChartEndLine.tsx similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/components/GaugeChartEndLine.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/components/GaugeChartEndLine.tsx index 296f626614..21c0158949 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/components/GaugeChartEndLine.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/components/GaugeChartEndLine.tsx @@ -1,5 +1,5 @@ import { type GraphColorScheme } from '@/page-layout/widgets/graph/types/GraphColorScheme'; -import { calculateGaugeChartEndLineCoordinates } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/utils/calculateGaugeChartEndLineCoordinates'; +import { calculateGaugeChartEndLineCoordinates } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/utils/calculateGaugeChartEndLineCoordinates'; import { type RadialBarCustomLayerProps } from '@nivo/radial-bar'; import { isDefined } from 'twenty-shared/utils'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/components/GraphWidgetGaugeChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/components/GraphWidgetGaugeChart.tsx similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/components/GraphWidgetGaugeChart.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/components/GraphWidgetGaugeChart.tsx index d13aea347a..ffe0727b32 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/components/GraphWidgetGaugeChart.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/components/GraphWidgetGaugeChart.tsx @@ -1,10 +1,10 @@ import { CHART_MOTION_CONFIG } from '@/page-layout/widgets/graph/constants/ChartMotionConfig'; import { GraphWidgetLegend } from '@/page-layout/widgets/graph/components/GraphWidgetLegend'; import { GraphWidgetTooltip } from '@/page-layout/widgets/graph/components/GraphWidgetTooltip'; -import { GaugeChartEndLine } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/components/GaugeChartEndLine'; -import { useGaugeChartData } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/useGaugeChartData'; -import { useGaugeChartTooltip } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/useGaugeChartTooltip'; -import { type GaugeChartData } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/types/GaugeChartData'; +import { GaugeChartEndLine } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/components/GaugeChartEndLine'; +import { useGaugeChartData } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/useGaugeChartData'; +import { useGaugeChartTooltip } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/useGaugeChartTooltip'; +import { type GaugeChartData } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/types/GaugeChartData'; import { createGraphColorRegistry } from '@/page-layout/widgets/graph/utils/createGraphColorRegistry'; import { formatGraphValue, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/__tests__/useGaugeChartData.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/__tests__/useGaugeChartData.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/__tests__/useGaugeChartData.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/__tests__/useGaugeChartData.test.ts index 471db5b2c4..121d7ed74d 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/__tests__/useGaugeChartData.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/__tests__/useGaugeChartData.test.ts @@ -1,7 +1,7 @@ -import { type GaugeChartData } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/types/GaugeChartData'; +import { type GaugeChartData } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/types/GaugeChartData'; import { type GraphColorRegistry } from '@/page-layout/widgets/graph/types/GraphColorRegistry'; import { renderHook } from '@testing-library/react'; -import { useGaugeChartData } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/useGaugeChartData'; +import { useGaugeChartData } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/useGaugeChartData'; describe('useGaugeChartData', () => { const mockColorRegistry: GraphColorRegistry = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/useGaugeChartData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/useGaugeChartData.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/useGaugeChartData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/useGaugeChartData.ts index 2746f8b1fa..eb8d3ee74f 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/useGaugeChartData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/useGaugeChartData.ts @@ -1,4 +1,4 @@ -import { type GaugeChartData } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/types/GaugeChartData'; +import { type GaugeChartData } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/types/GaugeChartData'; import { type GraphColorRegistry } from '@/page-layout/widgets/graph/types/GraphColorRegistry'; import { getColorScheme } from '@/page-layout/widgets/graph/utils/getColorScheme'; import { useMemo } from 'react'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/useGaugeChartTooltip.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/useGaugeChartTooltip.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/hooks/useGaugeChartTooltip.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/hooks/useGaugeChartTooltip.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/types/GaugeChartData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/types/GaugeChartData.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/types/GaugeChartData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/types/GaugeChartData.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/utils/__tests__/calculateGaugeChartEndLineCoordinates.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/utils/__tests__/calculateGaugeChartEndLineCoordinates.test.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/utils/__tests__/calculateGaugeChartEndLineCoordinates.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/utils/__tests__/calculateGaugeChartEndLineCoordinates.test.ts index cfcc609cfe..fb32df7119 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/utils/__tests__/calculateGaugeChartEndLineCoordinates.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/utils/__tests__/calculateGaugeChartEndLineCoordinates.test.ts @@ -1,4 +1,4 @@ -import { calculateGaugeChartEndLineCoordinates } from '@/page-layout/widgets/graph/graphWidgetGaugeChart/utils/calculateGaugeChartEndLineCoordinates'; +import { calculateGaugeChartEndLineCoordinates } from '@/page-layout/widgets/graph/graph-widget-gauge-chart/utils/calculateGaugeChartEndLineCoordinates'; describe('calculateGaugeChartEndLineCoordinates', () => { it('should calculate coordinates for angle π/2 (after adjustment points right)', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/utils/calculateGaugeChartEndLineCoordinates.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/utils/calculateGaugeChartEndLineCoordinates.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetGaugeChart/utils/calculateGaugeChartEndLineCoordinates.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-gauge-chart/utils/calculateGaugeChartEndLineCoordinates.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomCrosshairLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomCrosshairLayer.tsx similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomCrosshairLayer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomCrosshairLayer.tsx index b18c6e09a7..d92146d2e3 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomCrosshairLayer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomCrosshairLayer.tsx @@ -1,5 +1,5 @@ -import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants'; -import { graphWidgetLineCrosshairXComponentState } from '@/page-layout/widgets/graph/graphWidgetLineChart/states/graphWidgetLineCrosshairXComponentState'; +import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants'; +import { graphWidgetLineCrosshairXComponentState } from '@/page-layout/widgets/graph/graph-widget-line-chart/states/graphWidgetLineCrosshairXComponentState'; import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue'; import { type LineSeries, type Point } from '@nivo/line'; import { motion } from 'framer-motion'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomLinesLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomLinesLayer.tsx similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomLinesLayer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomLinesLayer.tsx diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomPointLabelsLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomPointLabelsLayer.tsx similarity index 90% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomPointLabelsLayer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomPointLabelsLayer.tsx index 296217532d..6f9b0027a5 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomPointLabelsLayer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomPointLabelsLayer.tsx @@ -1,6 +1,6 @@ import { GraphDataLabel } from '@/page-layout/widgets/graph/components/GraphDataLabel'; -import { computeLineChartGroupedLabels } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartGroupedLabels'; -import { computeLineChartStackedLabels } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartStackedLabels'; +import { computeLineChartGroupedLabels } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartGroupedLabels'; +import { computeLineChartStackedLabels } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartStackedLabels'; import { type LineCustomSvgLayerProps, type LineSeries } from '@nivo/line'; type CustomPointLabelsLayerProps = Pick< diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomStackedAreasLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomStackedAreasLayer.tsx similarity index 91% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomStackedAreasLayer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomStackedAreasLayer.tsx index 6c25968af4..200824a3e6 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/CustomStackedAreasLayer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/CustomStackedAreasLayer.tsx @@ -1,7 +1,7 @@ -import { LineAnimatedAreaPath } from '@/page-layout/widgets/graph/graphWidgetLineChart/components/LineAnimatedAreaPath'; -import { LineAreaGradientDefs } from '@/page-layout/widgets/graph/graphWidgetLineChart/components/LineAreaGradientDefs'; -import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartEnrichedSeries'; -import { computeLineAreaPath } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineAreaPath'; +import { LineAnimatedAreaPath } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/LineAnimatedAreaPath'; +import { LineAreaGradientDefs } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/LineAreaGradientDefs'; +import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartEnrichedSeries'; +import { computeLineAreaPath } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineAreaPath'; import { type ComputedSeries, type LineCustomSvgLayerProps, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/GraphLineChartTooltip.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphLineChartTooltip.tsx similarity index 91% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/GraphLineChartTooltip.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphLineChartTooltip.tsx index 0a8835147b..9ca36b3262 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/GraphLineChartTooltip.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphLineChartTooltip.tsx @@ -1,8 +1,8 @@ import { GraphWidgetFloatingTooltip } from '@/page-layout/widgets/graph/components/GraphWidgetFloatingTooltip'; -import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants'; -import { graphWidgetLineTooltipComponentState } from '@/page-layout/widgets/graph/graphWidgetLineChart/states/graphWidgetLineTooltipComponentState'; -import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartEnrichedSeries'; -import { getLineChartTooltipData } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartTooltipData'; +import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants'; +import { graphWidgetLineTooltipComponentState } from '@/page-layout/widgets/graph/graph-widget-line-chart/states/graphWidgetLineTooltipComponentState'; +import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartEnrichedSeries'; +import { getLineChartTooltipData } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartTooltipData'; import { createVirtualElementFromContainerOffset } from '@/page-layout/widgets/graph/utils/createVirtualElementFromContainerOffset'; import { type GraphValueFormatOptions } from '@/page-layout/widgets/graph/utils/graphFormatters'; import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/GraphWidgetLineChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart.tsx similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/GraphWidgetLineChart.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart.tsx index 7beedc285a..7ff92e5651 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/GraphWidgetLineChart.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart.tsx @@ -5,18 +5,18 @@ import { NoDataLayer } from '@/page-layout/widgets/graph/components/NoDataLayer' import { CustomCrosshairLayer, type SliceHoverData, -} from '@/page-layout/widgets/graph/graphWidgetLineChart/components/CustomCrosshairLayer'; -import { CustomLinesLayer } from '@/page-layout/widgets/graph/graphWidgetLineChart/components/CustomLinesLayer'; -import { CustomPointLabelsLayer } from '@/page-layout/widgets/graph/graphWidgetLineChart/components/CustomPointLabelsLayer'; -import { CustomStackedAreasLayer } from '@/page-layout/widgets/graph/graphWidgetLineChart/components/CustomStackedAreasLayer'; -import { GraphLineChartTooltip } from '@/page-layout/widgets/graph/graphWidgetLineChart/components/GraphLineChartTooltip'; -import { useLineChartData } from '@/page-layout/widgets/graph/graphWidgetLineChart/hooks/useLineChartData'; -import { useLineChartTheme } from '@/page-layout/widgets/graph/graphWidgetLineChart/hooks/useLineChartTheme'; -import { graphWidgetLineCrosshairXComponentState } from '@/page-layout/widgets/graph/graphWidgetLineChart/states/graphWidgetLineCrosshairXComponentState'; -import { graphWidgetLineTooltipComponentState } from '@/page-layout/widgets/graph/graphWidgetLineChart/states/graphWidgetLineTooltipComponentState'; -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; -import { calculateValueRangeFromLineChartSeries } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/calculateValueRangeFromLineChartSeries'; -import { getLineChartLayout } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartLayout'; +} from '@/page-layout/widgets/graph/graph-widget-line-chart/components/CustomCrosshairLayer'; +import { CustomLinesLayer } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/CustomLinesLayer'; +import { CustomPointLabelsLayer } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/CustomPointLabelsLayer'; +import { CustomStackedAreasLayer } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/CustomStackedAreasLayer'; +import { GraphLineChartTooltip } from '@/page-layout/widgets/graph/graph-widget-line-chart/components/GraphLineChartTooltip'; +import { useLineChartData } from '@/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartData'; +import { useLineChartTheme } from '@/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartTheme'; +import { graphWidgetLineCrosshairXComponentState } from '@/page-layout/widgets/graph/graph-widget-line-chart/states/graphWidgetLineCrosshairXComponentState'; +import { graphWidgetLineTooltipComponentState } from '@/page-layout/widgets/graph/graph-widget-line-chart/states/graphWidgetLineTooltipComponentState'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; +import { calculateValueRangeFromLineChartSeries } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/calculateValueRangeFromLineChartSeries'; +import { getLineChartLayout } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartLayout'; import { type GraphColorMode } from '@/page-layout/widgets/graph/types/GraphColorMode'; import { computeEffectiveValueRange } from '@/page-layout/widgets/graph/utils/computeEffectiveValueRange'; import { createGraphColorRegistry } from '@/page-layout/widgets/graph/utils/createGraphColorRegistry'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/GraphWidgetLineChartRenderer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChartRenderer.tsx similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/GraphWidgetLineChartRenderer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChartRenderer.tsx index 600dc41d95..49b15c217d 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/GraphWidgetLineChartRenderer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChartRenderer.tsx @@ -1,8 +1,8 @@ import { isPageLayoutInEditModeComponentState } from '@/page-layout/states/isPageLayoutInEditModeComponentState'; import { WidgetSkeletonLoader } from '@/page-layout/widgets/components/WidgetSkeletonLoader'; import { GraphWidgetChartHasTooManyGroupsEffect } from '@/page-layout/widgets/graph/components/GraphWidgetChartHasTooManyGroupsEffect'; -import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants'; -import { useGraphLineChartWidgetData } from '@/page-layout/widgets/graph/graphWidgetLineChart/hooks/useGraphLineChartWidgetData'; +import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants'; +import { useGraphLineChartWidgetData } from '@/page-layout/widgets/graph/graph-widget-line-chart/hooks/useGraphLineChartWidgetData'; import { assertLineChartWidgetOrThrow } from '@/page-layout/widgets/graph/utils/assertLineChartWidget'; import { buildChartDrilldownQueryParams } from '@/page-layout/widgets/graph/utils/buildChartDrilldownQueryParams'; import { generateChartAggregateFilterKey } from '@/page-layout/widgets/graph/utils/generateChartAggregateFilterKey'; @@ -25,7 +25,7 @@ import { const GraphWidgetLineChart = lazy(() => import( - '@/page-layout/widgets/graph/graphWidgetLineChart/components/GraphWidgetLineChart' + '@/page-layout/widgets/graph/graph-widget-line-chart/components/GraphWidgetLineChart' ).then((module) => ({ default: module.GraphWidgetLineChart, })), diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/LineAnimatedAreaPath.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/LineAnimatedAreaPath.tsx similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/LineAnimatedAreaPath.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/LineAnimatedAreaPath.tsx diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/LineAreaGradientDefs.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/LineAreaGradientDefs.tsx similarity index 89% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/LineAreaGradientDefs.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/LineAreaGradientDefs.tsx index 5c1aa9d566..d9397ddbff 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/components/LineAreaGradientDefs.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/components/LineAreaGradientDefs.tsx @@ -1,5 +1,5 @@ -import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartEnrichedSeries'; -import { createAreaFillDef } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/createAreaFillDef'; +import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartEnrichedSeries'; +import { createAreaFillDef } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/createAreaFillDef'; type LineAreaGradientDefsProps = { enrichedSeries: LineChartEnrichedSeries[]; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/__tests__/useLineChartData.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/__tests__/useLineChartData.test.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/__tests__/useLineChartData.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/__tests__/useLineChartData.test.ts index eb4d100cfe..e2daf45080 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/__tests__/useLineChartData.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/__tests__/useLineChartData.test.ts @@ -1,8 +1,8 @@ -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; import { type GraphColorRegistry } from '@/page-layout/widgets/graph/types/GraphColorRegistry'; import { renderHook } from '@testing-library/react'; -import { useLineChartData } from '@/page-layout/widgets/graph/graphWidgetLineChart/hooks/useLineChartData'; +import { useLineChartData } from '@/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartData'; import { type LineChartSeries } from '~/generated-metadata/graphql'; const mockUseAtomComponentStateValue = jest.fn(); diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useGraphLineChartWidgetData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useGraphLineChartWidgetData.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useGraphLineChartWidgetData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useGraphLineChartWidgetData.ts index 04dc287ff5..45346e52cf 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useGraphLineChartWidgetData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useGraphLineChartWidgetData.ts @@ -1,7 +1,7 @@ import { useObjectMetadataItemById } from '@/object-metadata/hooks/useObjectMetadataItemById'; import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; import { LINE_CHART_DATA } from '@/page-layout/widgets/graph/graphql/queries/lineChartData'; -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; import { type GraphColorMode } from '@/page-layout/widgets/graph/types/GraphColorMode'; import { type RawDimensionValue } from '@/page-layout/widgets/graph/types/RawDimensionValue'; import { determineChartItemColor } from '@/page-layout/widgets/graph/utils/determineChartItemColor'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useLineChartData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartData.ts similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useLineChartData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartData.ts index 43d19b160e..d09f656a89 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useLineChartData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartData.ts @@ -1,6 +1,6 @@ import { type GraphWidgetLegendItem } from '@/page-layout/widgets/graph/components/GraphWidgetLegend'; -import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartEnrichedSeries'; -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; +import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartEnrichedSeries'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; import { graphWidgetHiddenLegendIdsComponentState } from '@/page-layout/widgets/graph/states/graphWidgetHiddenLegendIdsComponentState'; import { type GraphColorMode } from '@/page-layout/widgets/graph/types/GraphColorMode'; import { type GraphColorRegistry } from '@/page-layout/widgets/graph/types/GraphColorRegistry'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useLineChartTheme.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartTheme.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/hooks/useLineChartTheme.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/hooks/useLineChartTheme.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/states/graphWidgetLineCrosshairXComponentState.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/states/graphWidgetLineCrosshairXComponentState.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/states/graphWidgetLineCrosshairXComponentState.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/states/graphWidgetLineCrosshairXComponentState.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/states/graphWidgetLineTooltipComponentState.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/states/graphWidgetLineTooltipComponentState.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/states/graphWidgetLineTooltipComponentState.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/states/graphWidgetLineTooltipComponentState.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartDataPoint.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartDataPoint.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartDataPoint.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartDataPoint.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartEnrichedSeries.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartEnrichedSeries.ts similarity index 81% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartEnrichedSeries.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartEnrichedSeries.ts index 72b7740ab5..f6c3510092 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartEnrichedSeries.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartEnrichedSeries.ts @@ -1,4 +1,4 @@ -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; import { type GraphColorScheme } from '@/page-layout/widgets/graph/types/GraphColorScheme'; export type LineChartEnrichedSeries = LineChartSeriesWithColor & { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor.ts similarity index 82% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor.ts index cb538a0b9e..e1eac6850a 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor.ts @@ -1,4 +1,4 @@ -import { type LineChartDataPoint } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartDataPoint'; +import { type LineChartDataPoint } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartDataPoint'; import { type GraphColor } from '@/page-layout/widgets/graph/types/GraphColor'; export type LineChartSeriesWithColor = { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/calculateValueRangeFromLineChartSeries.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/calculateValueRangeFromLineChartSeries.test.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/calculateValueRangeFromLineChartSeries.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/calculateValueRangeFromLineChartSeries.test.ts index fc226dc2c2..7cb7cdbc9a 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/calculateValueRangeFromLineChartSeries.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/calculateValueRangeFromLineChartSeries.test.ts @@ -1,5 +1,5 @@ -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; -import { calculateValueRangeFromLineChartSeries } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/calculateValueRangeFromLineChartSeries'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; +import { calculateValueRangeFromLineChartSeries } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/calculateValueRangeFromLineChartSeries'; import { type LineChartSeries } from '~/generated-metadata/graphql'; describe('calculateValueRangeFromLineChartSeries', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/computeLineAreaPath.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/computeLineAreaPath.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/computeLineAreaPath.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/computeLineAreaPath.test.ts index 6f25b54b12..296684b312 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/computeLineAreaPath.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/computeLineAreaPath.test.ts @@ -27,7 +27,7 @@ jest.mock('d3-shape', () => { }; }); -import { computeLineAreaPath } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineAreaPath'; +import { computeLineAreaPath } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineAreaPath'; const buildComputedSeries = ( points: { x: number; y: number }[], diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/computeLineChartGroupedLabels.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/computeLineChartGroupedLabels.test.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/computeLineChartGroupedLabels.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/computeLineChartGroupedLabels.test.ts index 8718a08f63..4351803702 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/computeLineChartGroupedLabels.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/computeLineChartGroupedLabels.test.ts @@ -1,4 +1,4 @@ -import { computeLineChartGroupedLabels } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartGroupedLabels'; +import { computeLineChartGroupedLabels } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartGroupedLabels'; import { type LineSeries, type Point } from '@nivo/line'; type MockPointOverrides = Omit>, 'data'> & { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/computeLineChartStackedLabels.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/computeLineChartStackedLabels.test.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/computeLineChartStackedLabels.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/computeLineChartStackedLabels.test.ts index a8ff158feb..486a4c4bdb 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/computeLineChartStackedLabels.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/computeLineChartStackedLabels.test.ts @@ -1,5 +1,5 @@ import { type LineSeries, type Point } from '@nivo/line'; -import { computeLineChartStackedLabels } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartStackedLabels'; +import { computeLineChartStackedLabels } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartStackedLabels'; const createMockPoint = ( seriesId: string, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/createAreaFillDef.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/createAreaFillDef.test.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/createAreaFillDef.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/createAreaFillDef.test.ts index 61d66d5c23..b4092afb92 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/createAreaFillDef.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/createAreaFillDef.test.ts @@ -1,5 +1,5 @@ -import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants'; -import { createAreaFillDef } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/createAreaFillDef'; +import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants'; +import { createAreaFillDef } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/createAreaFillDef'; import { type GraphColorScheme } from '@/page-layout/widgets/graph/types/GraphColorScheme'; describe('createAreaFillDef', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/getLineChartLayout.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/getLineChartLayout.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/getLineChartLayout.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/getLineChartLayout.test.ts index 96d308ce0c..cd0d3558a9 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/getLineChartLayout.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/getLineChartLayout.test.ts @@ -1,7 +1,7 @@ import { COMMON_CHART_CONSTANTS } from '@/page-layout/widgets/graph/constants/CommonChartConstants'; import { TEXT_MARGIN_LIMITS } from '@/page-layout/widgets/graph/constants/TextMarginLimits'; -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; -import { getLineChartLayout } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartLayout'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; +import { getLineChartLayout } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartLayout'; import { type ChartAxisTheme } from '@/page-layout/widgets/graph/types/ChartAxisTheme'; import { type GraphValueFormatOptions } from '@/page-layout/widgets/graph/utils/graphFormatters'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/getLineChartTooltipData.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/getLineChartTooltipData.test.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/getLineChartTooltipData.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/getLineChartTooltipData.test.ts index 3c591d262e..ac54d265c8 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/__tests__/getLineChartTooltipData.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/__tests__/getLineChartTooltipData.test.ts @@ -1,5 +1,5 @@ -import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartEnrichedSeries'; -import { getLineChartTooltipData } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartTooltipData'; +import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartEnrichedSeries'; +import { getLineChartTooltipData } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartTooltipData'; import { type GraphValueFormatOptions } from '@/page-layout/widgets/graph/utils/graphFormatters'; import { type LineSeries, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/calculateValueRangeFromLineChartSeries.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/calculateValueRangeFromLineChartSeries.ts similarity index 89% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/calculateValueRangeFromLineChartSeries.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/calculateValueRangeFromLineChartSeries.ts index f070e913a6..c4eac0357a 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/calculateValueRangeFromLineChartSeries.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/calculateValueRangeFromLineChartSeries.ts @@ -1,4 +1,4 @@ -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; import { type ChartValueRange } from '@/page-layout/widgets/graph/types/ChartValueRange'; import { calculateValueRangeFromValues } from '@/page-layout/widgets/graph/utils/calculateValueRangeFromValues'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineAreaPath.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineAreaPath.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineAreaPath.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineAreaPath.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartCategoryTickValues.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartCategoryTickValues.ts similarity index 90% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartCategoryTickValues.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartCategoryTickValues.ts index 43a7dc6964..339b4ed96c 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartCategoryTickValues.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartCategoryTickValues.ts @@ -1,7 +1,7 @@ import { isNumber, isString } from '@sniptt/guards'; -import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants'; -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; +import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; import { computeChartCategoryTickValues } from '@/page-layout/widgets/graph/utils/computeChartCategoryTickValues'; export const computeLineChartCategoryTickValues = ({ diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartGroupedLabels.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartGroupedLabels.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartGroupedLabels.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartGroupedLabels.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartStackedLabels.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartStackedLabels.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartStackedLabels.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartStackedLabels.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/createAreaFillDef.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/createAreaFillDef.ts similarity index 91% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/createAreaFillDef.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/createAreaFillDef.ts index 89e918a77b..af23848508 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/createAreaFillDef.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/createAreaFillDef.ts @@ -1,4 +1,4 @@ -import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants'; +import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants'; import { type GraphColorScheme } from '@/page-layout/widgets/graph/types/GraphColorScheme'; export const createAreaFillDef = ( diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartAxisBottomConfig.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartAxisBottomConfig.ts similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartAxisBottomConfig.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartAxisBottomConfig.ts index 610f1225b4..23090982ff 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartAxisBottomConfig.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartAxisBottomConfig.ts @@ -1,7 +1,7 @@ import { COMMON_CHART_CONSTANTS } from '@/page-layout/widgets/graph/constants/CommonChartConstants'; -import { truncateTickLabel } from '@/page-layout/widgets/graph/graphWidgetBarChart/utils/truncateTickLabel'; -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; -import { computeLineChartCategoryTickValues } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/computeLineChartCategoryTickValues'; +import { truncateTickLabel } from '@/page-layout/widgets/graph/graph-widget-bar-chart/utils/truncateTickLabel'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; +import { computeLineChartCategoryTickValues } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/computeLineChartCategoryTickValues'; import { getTickRotationConfig } from '@/page-layout/widgets/graph/utils/getTickRotationConfig'; import { isNonEmptyArray } from '@sniptt/guards'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartAxisLeftConfig.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartAxisLeftConfig.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartAxisLeftConfig.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartAxisLeftConfig.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartLayout.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartLayout.ts similarity index 94% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartLayout.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartLayout.ts index 96d63228a9..0cbfbd7d18 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartLayout.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartLayout.ts @@ -1,8 +1,8 @@ import { COMMON_CHART_CONSTANTS } from '@/page-layout/widgets/graph/constants/CommonChartConstants'; -import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants'; -import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartSeriesWithColor'; -import { getLineChartAxisBottomConfig } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartAxisBottomConfig'; -import { getLineChartAxisLeftConfig } from '@/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartAxisLeftConfig'; +import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants'; +import { type LineChartSeriesWithColor } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartSeriesWithColor'; +import { getLineChartAxisBottomConfig } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartAxisBottomConfig'; +import { getLineChartAxisLeftConfig } from '@/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartAxisLeftConfig'; import { type ChartAxisTheme } from '@/page-layout/widgets/graph/types/ChartAxisTheme'; import { type ChartMargins } from '@/page-layout/widgets/graph/types/ChartMargins'; import { computeBottomLegendOffsetFromText } from '@/page-layout/widgets/graph/utils/computeBottomLegendOffsetFromText'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartTooltipData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartTooltipData.ts similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartTooltipData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartTooltipData.ts index 2c3c107bad..e724bce53a 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/getLineChartTooltipData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-line-chart/utils/getLineChartTooltipData.ts @@ -1,5 +1,5 @@ import { type GraphWidgetTooltipItem } from '@/page-layout/widgets/graph/components/GraphWidgetTooltip'; -import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graphWidgetLineChart/types/LineChartEnrichedSeries'; +import { type LineChartEnrichedSeries } from '@/page-layout/widgets/graph/graph-widget-line-chart/types/LineChartEnrichedSeries'; import { formatGraphValue, type GraphValueFormatOptions, diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/CustomArcsLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/CustomArcsLayer.tsx similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/CustomArcsLayer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/CustomArcsLayer.tsx index 4cb5703315..3904337b9c 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/CustomArcsLayer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/CustomArcsLayer.tsx @@ -1,5 +1,5 @@ import { LEGEND_HIGHLIGHT_DIMMED_OPACITY } from '@/page-layout/widgets/graph/constants/LegendHighlightDimmedOpacity.constant'; -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; import { graphWidgetHighlightedLegendIdComponentState } from '@/page-layout/widgets/graph/states/graphWidgetHighlightedLegendIdComponentState'; import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue'; import { useArcsTransition } from '@nivo/arcs'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/GraphPieChartTooltip.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphPieChartTooltip.tsx similarity index 88% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/GraphPieChartTooltip.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphPieChartTooltip.tsx index 8e25629474..43c8b5cb89 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/GraphPieChartTooltip.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphPieChartTooltip.tsx @@ -1,9 +1,9 @@ import { GraphWidgetFloatingTooltip } from '@/page-layout/widgets/graph/components/GraphWidgetFloatingTooltip'; -import { PIE_CHART_TOOLTIP_OFFSET_PX } from '@/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartTooltipOffsetPx'; -import { graphWidgetPieTooltipComponentState } from '@/page-layout/widgets/graph/graphWidgetPieChart/states/graphWidgetPieTooltipComponentState'; -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; -import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartEnrichedData'; -import { getPieChartTooltipData } from '@/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartTooltipData'; +import { PIE_CHART_TOOLTIP_OFFSET_PX } from '@/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartTooltipOffsetPx'; +import { graphWidgetPieTooltipComponentState } from '@/page-layout/widgets/graph/graph-widget-pie-chart/states/graphWidgetPieTooltipComponentState'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; +import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartEnrichedData'; +import { getPieChartTooltipData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartTooltipData'; import { createVirtualElementFromContainerOffset } from '@/page-layout/widgets/graph/utils/createVirtualElementFromContainerOffset'; import { type GraphValueFormatOptions } from '@/page-layout/widgets/graph/utils/graphFormatters'; import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/GraphWidgetPieChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx similarity index 93% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/GraphWidgetPieChart.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx index 20e92c8cf7..3aa37a93da 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/GraphWidgetPieChart.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart.tsx @@ -2,15 +2,15 @@ import { GraphWidgetChartContainer } from '@/page-layout/widgets/graph/component import { themeCssVariables } from 'twenty-ui/theme-constants'; import { GraphWidgetLegend } from '@/page-layout/widgets/graph/components/GraphWidgetLegend'; import { CHART_MOTION_CONFIG } from '@/page-layout/widgets/graph/constants/ChartMotionConfig'; -import { CustomArcsLayer } from '@/page-layout/widgets/graph/graphWidgetPieChart/components/CustomArcsLayer'; -import { GraphPieChartTooltip } from '@/page-layout/widgets/graph/graphWidgetPieChart/components/GraphPieChartTooltip'; -import { PieChartCenterMetric } from '@/page-layout/widgets/graph/graphWidgetPieChart/components/PieChartCenterMetricLayer'; -import { PIE_CHART_HOVER_BRIGHTNESS } from '@/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartHoverBrightness'; -import { PIE_CHART_MARGINS } from '@/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartMargins'; -import { usePieChartData } from '@/page-layout/widgets/graph/graphWidgetPieChart/hooks/usePieChartData'; -import { graphWidgetPieTooltipComponentState } from '@/page-layout/widgets/graph/graphWidgetPieChart/states/graphWidgetPieTooltipComponentState'; -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; -import { getPieChartFormattedValue } from '@/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartFormattedValue'; +import { CustomArcsLayer } from '@/page-layout/widgets/graph/graph-widget-pie-chart/components/CustomArcsLayer'; +import { GraphPieChartTooltip } from '@/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphPieChartTooltip'; +import { PieChartCenterMetric } from '@/page-layout/widgets/graph/graph-widget-pie-chart/components/PieChartCenterMetricLayer'; +import { PIE_CHART_HOVER_BRIGHTNESS } from '@/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartHoverBrightness'; +import { PIE_CHART_MARGINS } from '@/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartMargins'; +import { usePieChartData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/hooks/usePieChartData'; +import { graphWidgetPieTooltipComponentState } from '@/page-layout/widgets/graph/graph-widget-pie-chart/states/graphWidgetPieTooltipComponentState'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; +import { getPieChartFormattedValue } from '@/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartFormattedValue'; import { type GraphColorMode } from '@/page-layout/widgets/graph/types/GraphColorMode'; import { createGraphColorRegistry } from '@/page-layout/widgets/graph/utils/createGraphColorRegistry'; import { type GraphValueFormatOptions } from '@/page-layout/widgets/graph/utils/graphFormatters'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/GraphWidgetPieChartRenderer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChartRenderer.tsx similarity index 95% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/GraphWidgetPieChartRenderer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChartRenderer.tsx index 96991b2f58..0cc94d6af3 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/GraphWidgetPieChartRenderer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChartRenderer.tsx @@ -1,8 +1,8 @@ import { isPageLayoutInEditModeComponentState } from '@/page-layout/states/isPageLayoutInEditModeComponentState'; import { WidgetSkeletonLoader } from '@/page-layout/widgets/components/WidgetSkeletonLoader'; import { GraphWidgetChartHasTooManyGroupsEffect } from '@/page-layout/widgets/graph/components/GraphWidgetChartHasTooManyGroupsEffect'; -import { useGraphPieChartWidgetData } from '@/page-layout/widgets/graph/graphWidgetPieChart/hooks/useGraphPieChartWidgetData'; -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; +import { useGraphPieChartWidgetData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/hooks/useGraphPieChartWidgetData'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; import { assertPieChartWidgetOrThrow } from '@/page-layout/widgets/graph/utils/assertPieChartWidget'; import { buildChartDrilldownQueryParams } from '@/page-layout/widgets/graph/utils/buildChartDrilldownQueryParams'; import { isFilteredViewRedirectionSupported } from '@/page-layout/widgets/graph/utils/isFilteredViewRedirectionSupported'; @@ -19,7 +19,7 @@ import { getAppPath } from 'twenty-shared/utils'; const GraphWidgetPieChart = lazy(() => import( - '@/page-layout/widgets/graph/graphWidgetPieChart/components/GraphWidgetPieChart' + '@/page-layout/widgets/graph/graph-widget-pie-chart/components/GraphWidgetPieChart' ).then((module) => ({ default: module.GraphWidgetPieChart, })), diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/PieChartCenterMetricLayer.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/PieChartCenterMetricLayer.tsx similarity index 97% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/PieChartCenterMetricLayer.tsx rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/PieChartCenterMetricLayer.tsx index 3ae31905a4..2c63e03309 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/components/PieChartCenterMetricLayer.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/components/PieChartCenterMetricLayer.tsx @@ -1,4 +1,4 @@ -import { usePieChartCenterMetricData } from '@/page-layout/widgets/graph/graphWidgetPieChart/hooks/usePieChartCenterMetricData'; +import { usePieChartCenterMetricData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/hooks/usePieChartCenterMetricData'; import { styled } from '@linaria/react'; import { useLingui } from '@lingui/react/macro'; import { AnimatePresence, motion } from 'framer-motion'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartCenterMetricMinSizes.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartCenterMetricMinSizes.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartCenterMetricMinSizes.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartCenterMetricMinSizes.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartCenterMetricRatios.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartCenterMetricRatios.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartCenterMetricRatios.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartCenterMetricRatios.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartHoverBrightness.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartHoverBrightness.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartHoverBrightness.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartHoverBrightness.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartMargins.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartMargins.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartMargins.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartMargins.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartMaximumNumberOfSlices.constant.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartMaximumNumberOfSlices.constant.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartMaximumNumberOfSlices.constant.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartMaximumNumberOfSlices.constant.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartTooltipOffsetPx.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartTooltipOffsetPx.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartTooltipOffsetPx.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartTooltipOffsetPx.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/__tests__/usePieChartData.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/__tests__/usePieChartData.test.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/__tests__/usePieChartData.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/__tests__/usePieChartData.test.ts index 90b1d675c4..e6282ba8cb 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/__tests__/usePieChartData.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/__tests__/usePieChartData.test.ts @@ -1,5 +1,5 @@ -import { usePieChartData } from '@/page-layout/widgets/graph/graphWidgetPieChart/hooks/usePieChartData'; -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; +import { usePieChartData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/hooks/usePieChartData'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; import { type GraphColorRegistry } from '@/page-layout/widgets/graph/types/GraphColorRegistry'; import { renderHook } from '@testing-library/react'; import { type PieChartDataItem } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/useGraphPieChartWidgetData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/useGraphPieChartWidgetData.ts similarity index 98% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/useGraphPieChartWidgetData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/useGraphPieChartWidgetData.ts index 6c676fa0a5..baa1f83765 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/useGraphPieChartWidgetData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/useGraphPieChartWidgetData.ts @@ -1,7 +1,7 @@ import { useObjectMetadataItemById } from '@/object-metadata/hooks/useObjectMetadataItemById'; import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; import { PIE_CHART_DATA } from '@/page-layout/widgets/graph/graphql/queries/pieChartData'; -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; import { type GraphColorMode } from '@/page-layout/widgets/graph/types/GraphColorMode'; import { type RawDimensionValue } from '@/page-layout/widgets/graph/types/RawDimensionValue'; import { determineChartItemColor } from '@/page-layout/widgets/graph/utils/determineChartItemColor'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/usePieChartCenterMetricData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/usePieChartCenterMetricData.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/usePieChartCenterMetricData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/usePieChartCenterMetricData.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/usePieChartData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/usePieChartData.ts similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/usePieChartData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/usePieChartData.ts index cfc776ad46..282d94b8be 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/hooks/usePieChartData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/hooks/usePieChartData.ts @@ -1,7 +1,7 @@ import { type GraphWidgetLegendItem } from '@/page-layout/widgets/graph/components/GraphWidgetLegend'; -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; -import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartEnrichedData'; -import { calculatePieChartPercentage } from '@/page-layout/widgets/graph/graphWidgetPieChart/utils/calculatePieChartPercentage'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; +import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartEnrichedData'; +import { calculatePieChartPercentage } from '@/page-layout/widgets/graph/graph-widget-pie-chart/utils/calculatePieChartPercentage'; import { graphWidgetHiddenLegendIdsComponentState } from '@/page-layout/widgets/graph/states/graphWidgetHiddenLegendIdsComponentState'; import { type GraphColorMode } from '@/page-layout/widgets/graph/types/GraphColorMode'; import { type GraphColorRegistry } from '@/page-layout/widgets/graph/types/GraphColorRegistry'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/states/graphWidgetPieTooltipComponentState.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/states/graphWidgetPieTooltipComponentState.ts similarity index 91% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/states/graphWidgetPieTooltipComponentState.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/states/graphWidgetPieTooltipComponentState.ts index e6ec652c8d..edcb5ab8bc 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/states/graphWidgetPieTooltipComponentState.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/states/graphWidgetPieTooltipComponentState.ts @@ -1,4 +1,4 @@ -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; import { WidgetComponentInstanceContext } from '@/page-layout/widgets/states/contexts/WidgetComponentInstanceContext'; import { createAtomComponentState } from '@/ui/utilities/state/jotai/utils/createAtomComponentState'; import { type ComputedDatum } from '@nivo/pie'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartEnrichedData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartEnrichedData.ts similarity index 82% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartEnrichedData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartEnrichedData.ts index f8b3d3df7d..d9d74a4ef0 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartEnrichedData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartEnrichedData.ts @@ -1,4 +1,4 @@ -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; import { type GraphColorScheme } from '@/page-layout/widgets/graph/types/GraphColorScheme'; export type PieChartEnrichedData = PieChartDataItemWithColor & { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/__tests__/calculatePieChartPercentage.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/__tests__/calculatePieChartPercentage.test.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/__tests__/calculatePieChartPercentage.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/__tests__/calculatePieChartPercentage.test.ts index 1651f52697..d41e2072db 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/__tests__/calculatePieChartPercentage.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/__tests__/calculatePieChartPercentage.test.ts @@ -1,4 +1,4 @@ -import { calculatePieChartPercentage } from '@/page-layout/widgets/graph/graphWidgetPieChart/utils/calculatePieChartPercentage'; +import { calculatePieChartPercentage } from '@/page-layout/widgets/graph/graph-widget-pie-chart/utils/calculatePieChartPercentage'; describe('calculatePieChartPercentage', () => { describe('valid calculations', () => { diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/__tests__/getPieChartFormattedValue.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/__tests__/getPieChartFormattedValue.test.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/__tests__/getPieChartFormattedValue.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/__tests__/getPieChartFormattedValue.test.ts index 6ad9236f39..fa95c436a7 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/__tests__/getPieChartFormattedValue.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/__tests__/getPieChartFormattedValue.test.ts @@ -1,6 +1,6 @@ -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; -import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartEnrichedData'; -import { getPieChartFormattedValue } from '@/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartFormattedValue'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; +import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartEnrichedData'; +import { getPieChartFormattedValue } from '@/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartFormattedValue'; import { type GraphColorScheme } from '@/page-layout/widgets/graph/types/GraphColorScheme'; import { type ComputedDatum } from '@nivo/pie'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/__tests__/getPieChartTooltipData.test.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/__tests__/getPieChartTooltipData.test.ts similarity index 96% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/__tests__/getPieChartTooltipData.test.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/__tests__/getPieChartTooltipData.test.ts index 467119d767..1f4f0fd171 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/__tests__/getPieChartTooltipData.test.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/__tests__/getPieChartTooltipData.test.ts @@ -1,6 +1,6 @@ -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; -import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartEnrichedData'; -import { getPieChartTooltipData } from '@/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartTooltipData'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; +import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartEnrichedData'; +import { getPieChartTooltipData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartTooltipData'; import { type GraphColorScheme } from '@/page-layout/widgets/graph/types/GraphColorScheme'; import { type ComputedDatum } from '@nivo/pie'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/calculatePieChartPercentage.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/calculatePieChartPercentage.ts similarity index 100% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/calculatePieChartPercentage.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/calculatePieChartPercentage.ts diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartFormattedValue.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartFormattedValue.ts similarity index 89% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartFormattedValue.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartFormattedValue.ts index 545b99ebb0..54396a012a 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartFormattedValue.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartFormattedValue.ts @@ -5,8 +5,8 @@ import { import { type ComputedDatum } from '@nivo/pie'; import { isDefined } from 'twenty-shared/utils'; -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; -import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartEnrichedData'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; +import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartEnrichedData'; type GetPieChartFormattedValueParams = { datum: ComputedDatum; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartTooltipData.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartTooltipData.ts similarity index 92% rename from packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartTooltipData.ts rename to packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartTooltipData.ts index 72c5376d3d..5cceed4724 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetPieChart/utils/getPieChartTooltipData.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graph-widget-pie-chart/utils/getPieChartTooltipData.ts @@ -1,6 +1,6 @@ import { type GraphWidgetTooltipItem } from '@/page-layout/widgets/graph/components/GraphWidgetTooltip'; -import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartDataItem'; -import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graphWidgetPieChart/types/PieChartEnrichedData'; +import { type PieChartDataItemWithColor } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartDataItem'; +import { type PieChartEnrichedData } from '@/page-layout/widgets/graph/graph-widget-pie-chart/types/PieChartEnrichedData'; import { type GraphValueFormatOptions } from '@/page-layout/widgets/graph/utils/graphFormatters'; import { type ComputedDatum } from '@nivo/pie'; import { isDefined } from 'twenty-shared/utils'; diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/hooks/useGraphWidgetAggregateQuery.ts b/packages/twenty-front/src/modules/page-layout/widgets/graph/hooks/useGraphWidgetAggregateQuery.ts index eed5c3d53d..debbe07982 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/hooks/useGraphWidgetAggregateQuery.ts +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/hooks/useGraphWidgetAggregateQuery.ts @@ -5,8 +5,8 @@ import { AggregateOperations } from '@/object-record/record-table/constants/Aggr import { getRecordAggregateDisplayLabel } from '@/object-record/record-index/utils/getRecordndexAggregateDisplayLabel'; import { convertAggregateOperationToExtendedAggregateOperation } from '@/object-record/utils/convertAggregateOperationToExtendedAggregateOperation'; -import { buildRatioNumeratorFilter } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/utils/buildRatioNumeratorFilter'; -import { computeRatioDisplayValue } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/utils/computeRatioDisplayValue'; +import { buildRatioNumeratorFilter } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/buildRatioNumeratorFilter'; +import { computeRatioDisplayValue } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/computeRatioDisplayValue'; import { useGraphWidgetQueryCommon } from '@/page-layout/widgets/graph/hooks/useGraphWidgetQueryCommon'; import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue'; import { UserContext } from '@/users/contexts/UserContext'; diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx index bcddd31bb1..b791a9cd37 100644 --- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx +++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceContent.tsx @@ -7,7 +7,7 @@ import { useImpersonationAuth } from '@/settings/admin-panel/hooks/useImpersonat import { useImpersonationRedirect } from '@/settings/admin-panel/hooks/useImpersonationRedirect'; import { userLookupResultState } from '@/settings/admin-panel/states/userLookupResultState'; import { type WorkspaceInfo } from '@/settings/admin-panel/types/WorkspaceInfo'; -import { getWorkspaceSchemaName } from '@/settings/admin-panel/utils/get-workspace-schema-name.util'; +import { getWorkspaceSchemaName } from '@/settings/admin-panel/utils/getWorkspaceSchemaName'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; import { Table } from '@/ui/layout/table/components/Table'; import { TableBody } from '@/ui/layout/table/components/TableBody'; diff --git a/packages/twenty-front/src/modules/settings/admin-panel/utils/get-workspace-schema-name.util.ts b/packages/twenty-front/src/modules/settings/admin-panel/utils/getWorkspaceSchemaName.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/admin-panel/utils/get-workspace-schema-name.util.ts rename to packages/twenty-front/src/modules/settings/admin-panel/utils/getWorkspaceSchemaName.ts diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIsUniqueForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIsUniqueForm.tsx index 38971064e8..95041b0536 100644 --- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIsUniqueForm.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIsUniqueForm.tsx @@ -3,7 +3,7 @@ import { Controller, useFormContext } from 'react-hook-form'; import { useFieldMetadataItemById } from '@/object-metadata/hooks/useFieldMetadataItemById'; import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem'; import { SettingsOptionCardContentSelect } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSelect'; -import { canBeUnique } from '@/settings/data-model/fields/forms/utils/canBeUnique.util'; +import { canBeUnique } from '@/settings/data-model/fields/forms/utils/canBeUnique'; import { t } from '@lingui/core/macro'; import { type FieldMetadataType } from 'twenty-shared/types'; import { IconKey } from 'twenty-ui/display'; diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldOnClickActionForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldOnClickActionForm.tsx index 8b76ade412..ec3fef13e2 100644 --- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldOnClickActionForm.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldOnClickActionForm.tsx @@ -2,7 +2,7 @@ import { Controller, useFormContext } from 'react-hook-form'; import { useFieldMetadataItemById } from '@/object-metadata/hooks/useFieldMetadataItemById'; import { SettingsOptionCardContentSelect } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSelect'; -import { getSettingsDataModelFieldOnClickActionDescription } from '@/settings/data-model/fields/forms/utils/getSettingsDataModelFieldOnClickActionDescription.util'; +import { getSettingsDataModelFieldOnClickActionDescription } from '@/settings/data-model/fields/forms/utils/getSettingsDataModelFieldOnClickActionDescription'; import { type SettingsDataModelFieldOnClickActionFormValues } from '@/settings/data-model/fields/forms/utils/settingsDataModelFieldOnClickActionSchema'; import { Select } from '@/ui/input/components/Select'; import { useLingui } from '@lingui/react/macro'; diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldSettingsFormCard.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldSettingsFormCard.tsx index b1b7c89deb..fbf4e2b49b 100644 --- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldSettingsFormCard.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldSettingsFormCard.tsx @@ -30,7 +30,7 @@ import { SettingsDataModelFieldPreviewWidget } from '@/settings/data-model/field import { Separator } from '@/settings/components/Separator'; import { SettingsDataModelFieldOnClickActionForm } from '@/settings/data-model/fields/forms/components/SettingsDataModelFieldOnClickActionForm'; import { SettingsDataModelFieldRelationFormCard } from '@/settings/data-model/fields/forms/morph-relation/components/SettingsDataModelFieldRelationFormCard'; -import { mergeSettingsSchemas } from '@/settings/data-model/fields/forms/utils/mergeSettingsSchema.util'; +import { mergeSettingsSchemas } from '@/settings/data-model/fields/forms/utils/mergeSettingsSchema'; import { settingsDataModelFieldMaxValuesSchema } from '@/settings/data-model/fields/forms/utils/settingsDataModelFieldMaxValuesSchema'; import { settingsDataModelFieldOnClickActionSchema } from '@/settings/data-model/fields/forms/utils/settingsDataModelFieldOnClickActionSchema'; import { useFormContext } from 'react-hook-form'; diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/phones/components/SettingsDataModelFieldPhonesForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/phones/components/SettingsDataModelFieldPhonesForm.tsx index ee5d0bdbdb..a6b197f986 100644 --- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/phones/components/SettingsDataModelFieldPhonesForm.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/phones/components/SettingsDataModelFieldPhonesForm.tsx @@ -3,7 +3,7 @@ import { Controller, useFormContext } from 'react-hook-form'; import { useFieldMetadataItemById } from '@/object-metadata/hooks/useFieldMetadataItemById'; import { phonesSchema as phonesFieldDefaultValueSchema } from '@/object-record/record-field/ui/types/guards/isFieldPhonesValue'; import { SettingsOptionCardContentSelect } from '@/settings/components/SettingsOptions/SettingsOptionCardContentSelect'; -import { mergeSettingsSchemas } from '@/settings/data-model/fields/forms/utils/mergeSettingsSchema.util'; +import { mergeSettingsSchemas } from '@/settings/data-model/fields/forms/utils/mergeSettingsSchema'; import { settingsDataModelFieldMaxValuesSchema } from '@/settings/data-model/fields/forms/utils/settingsDataModelFieldMaxValuesSchema'; import { settingsDataModelFieldOnClickActionSchema } from '@/settings/data-model/fields/forms/utils/settingsDataModelFieldOnClickActionSchema'; import { countryCodeToCallingCode } from '@/settings/data-model/fields/preview/utils/getPhonesFieldPreviewValue'; diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/canBeUnique.util.ts b/packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/canBeUnique.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/canBeUnique.util.ts rename to packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/canBeUnique.ts diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/getSettingsDataModelFieldOnClickActionDescription.util.ts b/packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/getSettingsDataModelFieldOnClickActionDescription.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/getSettingsDataModelFieldOnClickActionDescription.util.ts rename to packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/getSettingsDataModelFieldOnClickActionDescription.ts diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/mergeSettingsSchema.util.ts b/packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/mergeSettingsSchema.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/mergeSettingsSchema.util.ts rename to packages/twenty-front/src/modules/settings/data-model/fields/forms/utils/mergeSettingsSchema.ts diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsUpdateDataModelObjectAboutForm.tsx b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsUpdateDataModelObjectAboutForm.tsx index 5f6a4fc0ea..52b860532c 100644 --- a/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsUpdateDataModelObjectAboutForm.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/object-details/components/SettingsUpdateDataModelObjectAboutForm.tsx @@ -1,7 +1,7 @@ import { useUpdateOneObjectMetadataItem } from '@/object-metadata/hooks/useUpdateOneObjectMetadataItem'; import { type ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; import { isObjectMetadataReadOnly } from '@/object-record/read-only/utils/isObjectMetadataReadOnly'; -import { computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange } from '@/settings/data-model/object-details/utils/computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange.util'; +import { computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange } from '@/settings/data-model/object-details/utils/computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange'; import { SettingsDataModelObjectAboutForm } from '@/settings/data-model/objects/forms/components/SettingsDataModelObjectAboutForm'; import { type SettingsDataModelObjectAboutFormValues, diff --git a/packages/twenty-front/src/modules/settings/data-model/object-details/utils/computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange.util.ts b/packages/twenty-front/src/modules/settings/data-model/object-details/utils/computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/data-model/object-details/utils/computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange.util.ts rename to packages/twenty-front/src/modules/settings/data-model/object-details/utils/computeUpdatedNavigationMemorizedUrlAfterObjectNamePluralChange.ts diff --git a/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx b/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx index 29e96c9994..27f4a0af56 100644 --- a/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx +++ b/packages/twenty-front/src/modules/settings/domains/components/SettingPublicDomain.tsx @@ -22,7 +22,7 @@ import { selectedPublicDomainState } from '@/settings/domains/states/selectedPub import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState'; import { useState } from 'react'; import { SaveAndCancelButtons } from '@/settings/components/SaveAndCancelButtons/SaveAndCancelButtons'; -import { getDomainValidationSchema } from '@/settings/domains/utils/get-domain-validation-schema'; +import { getDomainValidationSchema } from '@/settings/domains/utils/getDomainValidationSchema'; import { themeCssVariables } from 'twenty-ui/theme-constants'; const StyledButtonGroupContainer = styled.div` diff --git a/packages/twenty-front/src/modules/settings/domains/utils/get-domain-validation-schema.ts b/packages/twenty-front/src/modules/settings/domains/utils/getDomainValidationSchema.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/domains/utils/get-domain-validation-schema.ts rename to packages/twenty-front/src/modules/settings/domains/utils/getDomainValidationSchema.ts diff --git a/packages/twenty-front/src/modules/settings/domains/utils/get-subdomain-validation-schema.ts b/packages/twenty-front/src/modules/settings/domains/utils/getSubdomainValidationSchema.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/domains/utils/get-subdomain-validation-schema.ts rename to packages/twenty-front/src/modules/settings/domains/utils/getSubdomainValidationSchema.ts diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignment.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignment.tsx index 1ff16a7f90..3095bda9d2 100644 --- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignment.tsx +++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignment.tsx @@ -28,7 +28,7 @@ import { useNavigateSettings } from '~/hooks/useNavigateSettings'; import { type PartialWorkspaceMember } from '@/settings/roles/types/RoleWithPartialMembers'; import { ROLE_ASSIGNMENT_CONFIRMATION_MODAL_ID } from '@/settings/roles/role-assignment/constants/RoleAssignmentConfirmationModalId'; import { ROLE_TARGET_CONFIG } from '@/settings/roles/role-assignment/constants/RoleTargetConfig'; -import { buildRoleMaps } from '@/settings/roles/role-assignment/utils/build-role-maps'; +import { buildRoleMaps } from '@/settings/roles/role-assignment/utils/buildRoleMaps'; type SettingsRoleAssignmentProps = { roleId: string; diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/utils/__tests__/build-role-maps.test.ts b/packages/twenty-front/src/modules/settings/roles/role-assignment/utils/__tests__/buildRoleMaps.test.ts similarity index 98% rename from packages/twenty-front/src/modules/settings/roles/role-assignment/utils/__tests__/build-role-maps.test.ts rename to packages/twenty-front/src/modules/settings/roles/role-assignment/utils/__tests__/buildRoleMaps.test.ts index 430f7f2fa0..2b2401971d 100644 --- a/packages/twenty-front/src/modules/settings/roles/role-assignment/utils/__tests__/build-role-maps.test.ts +++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/utils/__tests__/buildRoleMaps.test.ts @@ -1,4 +1,4 @@ -import { buildRoleMaps } from '@/settings/roles/role-assignment/utils/build-role-maps'; +import { buildRoleMaps } from '@/settings/roles/role-assignment/utils/buildRoleMaps'; describe('buildRoleMaps', () => { it('should build member map from roles', () => { diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/utils/build-role-maps.ts b/packages/twenty-front/src/modules/settings/roles/role-assignment/utils/buildRoleMaps.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/roles/role-assignment/utils/build-role-maps.ts rename to packages/twenty-front/src/modules/settings/roles/role-assignment/utils/buildRoleMaps.ts diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/hooks/tests/useGetObjectPermissionDerivedStates.test.ts b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/hooks/__tests__/useGetObjectPermissionDerivedStates.test.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/hooks/tests/useGetObjectPermissionDerivedStates.test.ts rename to packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/field-permissions/hooks/__tests__/useGetObjectPermissionDerivedStates.test.ts diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/hooks/useUpsertObjectPermissionInDraftRole.ts b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/hooks/useUpsertObjectPermissionInDraftRole.ts index e2c49c3fdf..d54e0223c6 100644 --- a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/hooks/useUpsertObjectPermissionInDraftRole.ts +++ b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/hooks/useUpsertObjectPermissionInDraftRole.ts @@ -1,4 +1,4 @@ -import { getRoleWithUpsertedObjectPermission } from '@/settings/roles/role-permissions/object-level-permissions/hooks/getRoleWithUpsertedObjectPermission'; +import { getRoleWithUpsertedObjectPermission } from '@/settings/roles/role-permissions/object-level-permissions/utils/getRoleWithUpsertedObjectPermission'; import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState'; import { useSetAtomFamilyState } from '@/ui/utilities/state/jotai/hooks/useSetAtomFamilyState'; import { type ObjectPermission } from '~/generated-metadata/graphql'; diff --git a/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/hooks/getRoleWithUpsertedObjectPermission.ts b/packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/utils/getRoleWithUpsertedObjectPermission.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/hooks/getRoleWithUpsertedObjectPermission.ts rename to packages/twenty-front/src/modules/settings/roles/role-permissions/object-level-permissions/utils/getRoleWithUpsertedObjectPermission.ts diff --git a/packages/twenty-front/src/modules/settings/roles/role/hooks/useSaveDraftRoleToDB.ts b/packages/twenty-front/src/modules/settings/roles/role/hooks/useSaveDraftRoleToDB.ts index bdd549d205..6059b9aee9 100644 --- a/packages/twenty-front/src/modules/settings/roles/role/hooks/useSaveDraftRoleToDB.ts +++ b/packages/twenty-front/src/modules/settings/roles/role/hooks/useSaveDraftRoleToDB.ts @@ -4,7 +4,7 @@ import { useUpdateAgentRole } from '@/settings/roles/hooks/useUpdateAgentRole'; import { useUpdateApiKeyRole } from '@/settings/roles/hooks/useUpdateApiKeyRole'; import { useUpdateWorkspaceMemberRole } from '@/settings/roles/hooks/useUpdateWorkspaceMemberRole'; import { useRemoveFieldPermissionInDraftRole } from '@/settings/roles/role-permissions/object-level-permissions/field-permissions/hooks/useRemoveFieldPermissionInDraftRole'; -import { newFieldPermissionsFilter } from '@/settings/roles/role/hooks/utils/newFieldPermissionsFilter.util'; +import { newFieldPermissionsFilter } from '@/settings/roles/role/utils/newFieldPermissionsFilter'; import { settingsDraftRoleFamilyState } from '@/settings/roles/states/settingsDraftRoleFamilyState'; import { settingsPersistedRoleFamilyState } from '@/settings/roles/states/settingsPersistedRoleFamilyState'; import { useAtomFamilyStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomFamilyStateValue'; diff --git a/packages/twenty-front/src/modules/settings/roles/role/hooks/utils/newFieldPermissionsFilter.util.ts b/packages/twenty-front/src/modules/settings/roles/role/utils/newFieldPermissionsFilter.ts similarity index 100% rename from packages/twenty-front/src/modules/settings/roles/role/hooks/utils/newFieldPermissionsFilter.util.ts rename to packages/twenty-front/src/modules/settings/roles/role/utils/newFieldPermissionsFilter.ts diff --git a/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx b/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx index d8f84e0c29..cde564b268 100644 --- a/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx +++ b/packages/twenty-front/src/modules/side-panel/constants/SidePanelPagesConfig.tsx @@ -1,4 +1,4 @@ -import { SidePanelAIChatThreadsPage } from '@/side-panel/pages/AIChatThreads/components/SidePanelAIChatThreadsPage'; +import { SidePanelAIChatThreadsPage } from '@/side-panel/pages/ai-chat-threads/components/SidePanelAIChatThreadsPage'; import { SidePanelAskAIPage } from '@/side-panel/pages/ask-ai/components/SidePanelAskAIPage'; import { SidePanelCalendarEventPage } from '@/side-panel/pages/calendar-event/components/SidePanelCalendarEventPage'; import { SidePanelFrontComponentPage } from '@/side-panel/pages/front-component/components/SidePanelFrontComponentPage'; diff --git a/packages/twenty-front/src/modules/side-panel/pages/AIChatThreads/components/SidePanelAIChatThreadsPage.tsx b/packages/twenty-front/src/modules/side-panel/pages/ai-chat-threads/components/SidePanelAIChatThreadsPage.tsx similarity index 100% rename from packages/twenty-front/src/modules/side-panel/pages/AIChatThreads/components/SidePanelAIChatThreadsPage.tsx rename to packages/twenty-front/src/modules/side-panel/pages/ai-chat-threads/components/SidePanelAIChatThreadsPage.tsx diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectableListItem.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectableListItem.tsx index a399214242..4faf23ce3e 100644 --- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectableListItem.tsx +++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectableListItem.tsx @@ -5,7 +5,7 @@ import { isWidgetConfigurationOfType } from '@/side-panel/pages/page-layout/util import { type ExtendedAggregateOperations } from '@/object-record/record-table/types/ExtendedAggregateOperations'; import { convertExtendedAggregateOperationToAggregateOperation } from '@/object-record/utils/convertExtendedAggregateOperationToAggregateOperation'; import { DASHBOARD_AGGREGATE_OPERATION_RATIO } from '@/page-layout/widgets/graph/constants/DashboardAggregateOperationRatio'; -import { type AggregateChartOperation } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/types/AggregateChartOperation'; +import { type AggregateChartOperation } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/types/AggregateChartOperation'; import { DropdownComponentInstanceContext } from '@/ui/layout/dropdown/contexts/DropdownComponentInstanceContext'; import { useCloseDropdown } from '@/ui/layout/dropdown/hooks/useCloseDropdown'; import { SelectableListItem } from '@/ui/layout/selectable-list/components/SelectableListItem'; diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectionDropdownContent.tsx b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectionDropdownContent.tsx index c7a722dc30..eec18f2733 100644 --- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectionDropdownContent.tsx +++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/components/dropdown-content/ChartAggregateOperationSelectionDropdownContent.tsx @@ -8,9 +8,9 @@ import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadat import { DateAggregateOperations } from '@/object-record/record-table/constants/DateAggregateOperations'; import { getAvailableAggregateOperationsForFieldMetadataType } from '@/object-record/record-table/record-table-footer/utils/getAvailableAggregateOperationsForFieldMetadataType'; import { DASHBOARD_AGGREGATE_OPERATION_RATIO } from '@/page-layout/widgets/graph/constants/DashboardAggregateOperationRatio'; -import { type AggregateChartOperation } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/types/AggregateChartOperation'; -import { getAggregateChartOperationLabel } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/utils/getAggregateChartOperationLabel'; -import { getAvailableAggregateOperationsForAggregateChart } from '@/page-layout/widgets/graph/graphWidgetAggregateChart/utils/getAvailableAggregateOperationsForAggregateChart'; +import { type AggregateChartOperation } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/types/AggregateChartOperation'; +import { getAggregateChartOperationLabel } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/getAggregateChartOperationLabel'; +import { getAvailableAggregateOperationsForAggregateChart } from '@/page-layout/widgets/graph/graph-widget-aggregate-chart/utils/getAvailableAggregateOperationsForAggregateChart'; 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'; diff --git a/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/getChartLimitMessage.ts b/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/getChartLimitMessage.ts index 906c86d666..b12d4998e9 100644 --- a/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/getChartLimitMessage.ts +++ b/packages/twenty-front/src/modules/side-panel/pages/page-layout/utils/getChartLimitMessage.ts @@ -1,7 +1,7 @@ import { getDateGranularityPluralLabel } from '@/side-panel/pages/page-layout/utils/getDateGranularityPluralLabel'; -import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetBarChart/constants/BarChartConstants'; -import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graphWidgetLineChart/constants/LineChartConstants'; -import { PIE_CHART_MAXIMUM_NUMBER_OF_SLICES } from '@/page-layout/widgets/graph/graphWidgetPieChart/constants/PieChartMaximumNumberOfSlices.constant'; +import { BAR_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-bar-chart/constants/BarChartConstants'; +import { LINE_CHART_CONSTANTS } from '@/page-layout/widgets/graph/graph-widget-line-chart/constants/LineChartConstants'; +import { PIE_CHART_MAXIMUM_NUMBER_OF_SLICES } from '@/page-layout/widgets/graph/graph-widget-pie-chart/constants/PieChartMaximumNumberOfSlices.constant'; import { t } from '@lingui/core/macro'; import { type ObjectRecordGroupByDateGranularity } from 'twenty-shared/types'; import { isDefined } from 'twenty-shared/utils'; diff --git a/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/hooks/useSnackBar.ts b/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/hooks/useSnackBar.ts index 6ff29bdadc..e08bb63ed2 100644 --- a/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/hooks/useSnackBar.ts +++ b/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/hooks/useSnackBar.ts @@ -7,7 +7,7 @@ import { snackBarInternalComponentState, type SnackBarOptions, } from '@/ui/feedback/snack-bar-manager/states/snackBarInternalComponentState'; -import { buildErrorAction } from '@/ui/feedback/snack-bar-manager/utils/build-error-action.util'; +import { buildErrorAction } from '@/ui/feedback/snack-bar-manager/utils/buildErrorAction'; import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow'; import { type ApolloError } from '@apollo/client'; import { t } from '@lingui/core/macro'; diff --git a/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/utils/build-error-action.util.ts b/packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/utils/buildErrorAction.ts similarity index 100% rename from packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/utils/build-error-action.util.ts rename to packages/twenty-front/src/modules/ui/feedback/snack-bar-manager/utils/buildErrorAction.ts diff --git a/packages/twenty-front/src/modules/ui/field/display/utils/getDateFnsLocale.util.ts b/packages/twenty-front/src/modules/ui/field/display/utils/getDateFnsLocale.ts similarity index 100% rename from packages/twenty-front/src/modules/ui/field/display/utils/getDateFnsLocale.util.ts rename to packages/twenty-front/src/modules/ui/field/display/utils/getDateFnsLocale.ts diff --git a/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx b/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx index ce5c46e7ca..37850c18ff 100644 --- a/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx +++ b/packages/twenty-front/src/modules/ui/input/components/IconPicker.tsx @@ -11,7 +11,7 @@ import { SelectableList } from '@/ui/layout/selectable-list/components/Selectabl import { arrayToChunks } from '~/utils/array/arrayToChunks'; import { ICON_PICKER_DROPDOWN_CONTENT_WIDTH } from '@/ui/input/components/constants/IconPickerDropdownContentWidth'; -import { IconPickerScrollEffect } from '@/ui/input/hooks/IconPickerScrollEffect'; +import { IconPickerScrollEffect } from '@/ui/input/effect-components/IconPickerScrollEffect'; import { ICON_PICKER_DEFAULT_VISIBLE_COUNT, iconPickerVisibleCountState, diff --git a/packages/twenty-front/src/modules/ui/input/hooks/IconPickerScrollEffect.tsx b/packages/twenty-front/src/modules/ui/input/effect-components/IconPickerScrollEffect.tsx similarity index 100% rename from packages/twenty-front/src/modules/ui/input/hooks/IconPickerScrollEffect.tsx rename to packages/twenty-front/src/modules/ui/input/effect-components/IconPickerScrollEffect.tsx diff --git a/packages/twenty-front/src/pages/settings/domains/SettingsDomain.tsx b/packages/twenty-front/src/pages/settings/domains/SettingsDomain.tsx index 1a0d318186..1e5125eb4d 100644 --- a/packages/twenty-front/src/pages/settings/domains/SettingsDomain.tsx +++ b/packages/twenty-front/src/pages/settings/domains/SettingsDomain.tsx @@ -23,8 +23,8 @@ import { useNavigateSettings } from '~/hooks/useNavigateSettings'; import { SettingsCustomDomain } from '@/settings/domains/components/SettingsCustomDomain'; import { SettingsSubdomain } from '@/settings/domains/components/SettingsSubdomain'; import { useState } from 'react'; -import { getSubdomainValidationSchema } from '@/settings/domains/utils/get-subdomain-validation-schema'; -import { getDomainValidationSchema } from '@/settings/domains/utils/get-domain-validation-schema'; +import { getSubdomainValidationSchema } from '@/settings/domains/utils/getSubdomainValidationSchema'; +import { getDomainValidationSchema } from '@/settings/domains/utils/getDomainValidationSchema'; import { useCheckCustomDomainValidRecords } from '@/settings/domains/hooks/useCheckCustomDomainValidRecords'; import { isCloudflareIntegrationEnabledState } from '@/client-config/states/isCloudflareIntegrationEnabledState'; diff --git a/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx b/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx index f89c8e6412..be6cde0ed0 100644 --- a/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx +++ b/packages/twenty-front/src/pages/settings/profile/appearance/components/LocalePicker.tsx @@ -4,7 +4,7 @@ import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMembe import { useAtomState } from '@/ui/utilities/state/jotai/hooks/useAtomState'; import { CoreObjectNameSingular } from 'twenty-shared/types'; import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord'; -import { getDateFnsLocale } from '@/ui/field/display/utils/getDateFnsLocale.util'; +import { getDateFnsLocale } from '@/ui/field/display/utils/getDateFnsLocale'; import { Select } from '@/ui/input/components/Select'; import { useRefreshObjectMetadataItems } from '@/object-metadata/hooks/useRefreshObjectMetadataItems'; diff --git a/packages/twenty-oxlint-rules/OXLINT_MIGRATION_TODO.md b/packages/twenty-oxlint-rules/OXLINT_MIGRATION_TODO.md index f7db2432ad..a1bb450f04 100644 --- a/packages/twenty-oxlint-rules/OXLINT_MIGRATION_TODO.md +++ b/packages/twenty-oxlint-rules/OXLINT_MIGRATION_TODO.md @@ -25,7 +25,7 @@ These plugins were in use but have no oxlint equivalent. Consider whether altern | Plugin | Where Used | What It Did | Replacement / Status | |--------|-----------|-------------|---------------------| -| `eslint-plugin-project-structure` | Frontend | Enforced folder naming and structure conventions for `src/modules/` (kebab-case dirs, allowed subdirs like hooks/utils/components, file naming for hooks/utils). Config still in `folderStructure.json`. | No equivalent. Could be implemented as a custom oxlint rule or a standalone CI script. | +| `eslint-plugin-project-structure` | Frontend | Enforced folder naming and structure conventions for `src/modules/` (kebab-case dirs, allowed subdirs like hooks/utils/components, file naming for hooks/utils). Config still in `folderStructure.json`. | Re-implemented as `twenty/folder-structure` custom oxlint rule. Enabled as `"warn"` — 403 pre-existing violations (160 non-kebab-case names, 215 depth > 4, 28 naming). | | `lingui/*` | Frontend, emails | i18n extraction and consistency rules | No equivalent | | `@stylistic/*` | Server | Formatting rules (indentation, spacing) | Use Prettier instead | | `import/order`, `simple-import-sort/imports` | Server | Import sorting and ordering | No equivalent | @@ -48,4 +48,8 @@ The `oxc.oxc-vscode` extension provides inline diagnostics for built-in oxlint r - Enable TypeScript's `verbatimModuleSyntax` (major migration) - Keep disabled until oxlint supports decorator-aware type import analysis 2. **Max consts per file** (`twenty-server`): Manually split 24 constant files to have at most 1 exported const each, then re-enable the rule. -3. **Folder structure enforcement** (`twenty-front`): Implement as a custom oxlint rule or a standalone CI check script that validates `src/modules/` against `folderStructure.json`. +3. **Folder structure enforcement** (`twenty-front`): Re-implemented as `twenty/folder-structure` custom oxlint rule (enabled as `"warn"`). 403 pre-existing violations to address: + - 160 non-kebab-case module folder names (e.g. `graphWidgetBarChart` → `graph-widget-bar-chart`) + - 215 modules nested deeper than 4 levels + - 28 util/hook file naming violations (`.util.ts` suffixes, kebab-case filenames, PascalCase) + - Promote to `"error"` once violations are resolved diff --git a/packages/twenty-oxlint-rules/oxlint-plugin.ts b/packages/twenty-oxlint-rules/oxlint-plugin.ts index cc17e3b253..973f9cf3f8 100644 --- a/packages/twenty-oxlint-rules/oxlint-plugin.ts +++ b/packages/twenty-oxlint-rules/oxlint-plugin.ts @@ -12,6 +12,10 @@ import { rule as enforceModuleBoundaries, RULE_NAME as enforceModuleBoundariesName, } from './rules/enforce-module-boundaries'; +import { + rule as folderStructure, + RULE_NAME as folderStructureName, +} from './rules/folder-structure'; import { rule as graphqlResolversShouldBeGuarded, RULE_NAME as graphqlResolversShouldBeGuardedName, @@ -67,6 +71,7 @@ export default definePlugin({ [componentPropsNamingName]: componentPropsNaming, [effectComponentsName]: effectComponents, [enforceModuleBoundariesName]: enforceModuleBoundaries, + [folderStructureName]: folderStructure, [graphqlResolversShouldBeGuardedName]: graphqlResolversShouldBeGuarded, [injectWorkspaceRepositoryName]: injectWorkspaceRepository, [matchingStateVariableName]: matchingStateVariable, diff --git a/packages/twenty-oxlint-rules/rules/folder-structure.spec.ts b/packages/twenty-oxlint-rules/rules/folder-structure.spec.ts new file mode 100644 index 0000000000..75b9b5a138 --- /dev/null +++ b/packages/twenty-oxlint-rules/rules/folder-structure.spec.ts @@ -0,0 +1,361 @@ +import { RuleTester } from 'oxlint/plugins-dev'; + +import { rule, RULE_NAME } from './folder-structure'; + +const ruleTester = new RuleTester(); + +const DUMMY_CODE = 'const x = 1;'; +const PROJECT = '/project/packages/twenty-front'; + +const filename = (path: string) => `${PROJECT}/${path}`; + +ruleTester.run(RULE_NAME, rule, { + valid: [ + // Files outside src/modules/ are ignored + { + code: DUMMY_CODE, + filename: filename('src/utils/helper.ts'), + }, + { + code: DUMMY_CODE, + filename: filename('src/components/Button.tsx'), + }, + + // types/ root folder allows anything + { + code: DUMMY_CODE, + filename: filename('src/modules/types/global.d.ts'), + }, + { + code: DUMMY_CODE, + filename: filename('src/modules/types/nested/deep.ts'), + }, + + // Hooks: use{PascalCase}.(ts|tsx) + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/hooks/useCreateOneRecord.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/hooks/useMyHook.tsx', + ), + }, + + // Hook tests: use{PascalCase}.(test|spec).(ts|tsx) + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/hooks/__tests__/useCreateOneRecord.test.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/hooks/__tests__/useMyHook.test.tsx', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/hooks/__tests__/useMyHook.spec.tsx', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/hooks/__tests__/__snapshots__/snap.ts', + ), + }, + + // Hooks internal + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/hooks/internal/useInternalHook.ts', + ), + }, + + // Hooks __mocks__ + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/hooks/__mocks__/useMyHook.ts', + ), + }, + + // Utils: {camelCase}.(ts|tsx) + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/utils/buildQuery.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/utils/getCardComponent.tsx', + ), + }, + + // Util tests: {camelCase}.(test|spec).(ts|tsx) + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/utils/__tests__/buildQuery.test.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/utils/__tests__/buildQuery.spec.ts', + ), + }, + + // Utils kebab-case subfolders (leaf directories) + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/workflow/utils/cron-to-human/parseCron.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/workflow/utils/cron-to-human/types/CronParts.ts', + ), + }, + + // Standard allowed subdirs + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/components/RecordTable.tsx', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/states/someState.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/constants/DEFAULT_VALUE.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/graphql/queries.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/effect-components/MyEffect.tsx', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/validation-schemas/schema.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/contexts/MyContext.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/scopes/MyScope.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/services/recordService.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/errors/NotFoundError.ts', + ), + }, + + // Nested modules up to depth 4 + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/sub-module/components/Widget.tsx', + ), + }, + { + code: DUMMY_CODE, + filename: filename('src/modules/a/b/c/d/hooks/useDeep.ts'), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/a/b/c/d/e/hooks/useDeep.ts', + ), + }, + + // Files directly in module folders + { + code: DUMMY_CODE, + filename: filename('src/modules/my-feature/index.ts'), + }, + + // __tests__ inside module + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/object-record/__tests__/integration.test.ts', + ), + }, + + // Test helpers and non-standard files in __tests__/ are allowed (leaf context) + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/hooks/__tests__/TestWrapper.tsx', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/hooks/__tests__/constants/mockData.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/utils/__tests__/helpers/setup.ts', + ), + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/utils/__tests__/kebab-name.test.js', + ), + }, + ], + + invalid: [ + // Files directly in modules root + { + code: DUMMY_CODE, + filename: filename('src/modules/loose-file.ts'), + errors: [{ messageId: 'noFilesInModulesRoot' }], + }, + + // Non-kebab-case module names + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/MyModule/hooks/useHook.ts', + ), + errors: [{ messageId: 'moduleNameNotKebabCase' }], + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/camelCase/hooks/useHook.ts', + ), + errors: [{ messageId: 'moduleNameNotKebabCase' }], + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/graphWidgetChart/file.ts', + ), + errors: [{ messageId: 'moduleNameNotKebabCase' }], + }, + + // Module nesting too deep (depth > 5) + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/a/b/c/d/e/f/hooks/useDeep.ts', + ), + errors: [{ messageId: 'moduleTooDeep' }], + }, + // Depth check fires before kebab-case check at max depth + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/a/b/c/d/e/camelCaseDir/file.ts', + ), + errors: [{ messageId: 'moduleTooDeep' }], + }, + + // Bad hook file naming + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/hooks/badName.ts', + ), + errors: [{ messageId: 'hookFileNaming' }], + }, + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/hooks/helper.ts', + ), + errors: [{ messageId: 'hookFileNaming' }], + }, + + // Invalid hooks folder entry + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/hooks/random-folder/file.ts', + ), + errors: [{ messageId: 'invalidHooksEntry' }], + }, + + // Bad util file naming (PascalCase not allowed) + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/utils/BadName.ts', + ), + errors: [{ messageId: 'utilFileNaming' }], + }, + // Bad util file naming (kebab-case files not allowed) + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/utils/kebab-name.ts', + ), + errors: [{ messageId: 'utilFileNaming' }], + }, + + // Non-kebab-case subfolder in utils + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/utils/camelCase/file.ts', + ), + errors: [{ messageId: 'invalidUtilsEntry' }], + }, + + // hooks/internal/ too deep + { + code: DUMMY_CODE, + filename: filename( + 'src/modules/my-feature/hooks/internal/internal/internal/useHook.ts', + ), + errors: [{ messageId: 'hooksInternalTooDeep' }], + }, + ], +}); diff --git a/packages/twenty-oxlint-rules/rules/folder-structure.ts b/packages/twenty-oxlint-rules/rules/folder-structure.ts new file mode 100644 index 0000000000..2e1c346b3d --- /dev/null +++ b/packages/twenty-oxlint-rules/rules/folder-structure.ts @@ -0,0 +1,269 @@ +import { defineRule } from '@oxlint/plugins'; + +export const RULE_NAME = 'folder-structure'; + +const KEBAB_CASE_REGEX = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/; +const USE_PASCAL_CASE_FILE_REGEX = /^use[A-Z][a-zA-Z0-9]*\.(ts|tsx)$/; +const CAMEL_CASE_UTIL_FILE_REGEX = /^[a-z][a-zA-Z0-9]*\.(ts|tsx)$/; + +const LEAF_SUBDIRS_WITHOUT_FILE_NAMING_CONSTRAINT = new Set([ + 'states', + 'types', + 'graphql', + 'components', + 'effect-components', + 'constants', + 'validation-schemas', + 'contexts', + 'scopes', + 'services', + 'errors', +]); + +const TESTING_DIRS = new Set(['__tests__', '__mocks__', '__snapshots__']); + +const MAX_MODULE_DEPTH = 5; +const MAX_HOOKS_INTERNAL_DEPTH = 2; + +type PathContext = + | { type: 'modules_root' } + | { type: 'module'; depth: number } + | { type: 'hooks'; internalDepth: number } + | { type: 'utils' } + | { type: 'leaf' }; + +type ValidationError = { + messageId: string; + data: Record; +}; + +const isFile = (segment: string, isLastSegment: boolean): boolean => + isLastSegment; + +const validateSegment = ( + segment: string, + context: PathContext, + isLastSegment: boolean, +): + | { nextContext: PathContext; error?: undefined } + | { error: ValidationError } => { + switch (context.type) { + case 'modules_root': { + if (isFile(segment, isLastSegment)) { + return { + error: { + messageId: 'noFilesInModulesRoot', + data: { name: segment }, + }, + }; + } + if (segment === 'types') { + return { nextContext: { type: 'leaf' } }; + } + if (!KEBAB_CASE_REGEX.test(segment)) { + return { + error: { + messageId: 'moduleNameNotKebabCase', + data: { name: segment }, + }, + }; + } + return { nextContext: { type: 'module', depth: 1 } }; + } + + case 'module': { + if (isFile(segment, isLastSegment)) { + return { nextContext: context }; + } + if (TESTING_DIRS.has(segment)) { + return { nextContext: { type: 'leaf' } }; + } + if (segment === 'hooks') { + return { + nextContext: { type: 'hooks', internalDepth: 0 }, + }; + } + if (segment === 'utils') { + return { nextContext: { type: 'utils' } }; + } + if (LEAF_SUBDIRS_WITHOUT_FILE_NAMING_CONSTRAINT.has(segment)) { + return { nextContext: { type: 'leaf' } }; + } + if (context.depth >= MAX_MODULE_DEPTH) { + return { + error: { + messageId: 'moduleTooDeep', + data: { max: MAX_MODULE_DEPTH, name: segment }, + }, + }; + } + if (!KEBAB_CASE_REGEX.test(segment)) { + return { + error: { + messageId: 'moduleNameNotKebabCase', + data: { name: segment }, + }, + }; + } + return { + nextContext: { type: 'module', depth: context.depth + 1 }, + }; + } + + case 'hooks': { + if (isFile(segment, isLastSegment)) { + if (!USE_PASCAL_CASE_FILE_REGEX.test(segment)) { + return { + error: { + messageId: 'hookFileNaming', + data: { name: segment }, + }, + }; + } + return { nextContext: context }; + } + if (TESTING_DIRS.has(segment)) { + return { nextContext: { type: 'leaf' } }; + } + if (segment === 'internal') { + if (context.internalDepth >= MAX_HOOKS_INTERNAL_DEPTH) { + return { + error: { + messageId: 'hooksInternalTooDeep', + data: { max: MAX_HOOKS_INTERNAL_DEPTH }, + }, + }; + } + return { + nextContext: { + type: 'hooks', + internalDepth: context.internalDepth + 1, + }, + }; + } + return { + error: { + messageId: 'invalidHooksEntry', + data: { name: segment }, + }, + }; + } + + case 'utils': { + if (isFile(segment, isLastSegment)) { + if (!CAMEL_CASE_UTIL_FILE_REGEX.test(segment)) { + return { + error: { + messageId: 'utilFileNaming', + data: { name: segment }, + }, + }; + } + return { nextContext: context }; + } + if (TESTING_DIRS.has(segment)) { + return { nextContext: { type: 'leaf' } }; + } + // Intentionally treated as leaf — files inside these subfolders + // skip camelCase enforcement to allow flexible organization + // (e.g. utils/cron-to-human/types/CronParts.ts is valid). + if (KEBAB_CASE_REGEX.test(segment)) { + return { nextContext: { type: 'leaf' } }; + } + return { + error: { + messageId: 'invalidUtilsEntry', + data: { name: segment }, + }, + }; + } + + case 'leaf': { + return { nextContext: { type: 'leaf' } }; + } + } +}; + +const extractModulesRelativePath = ( + filename: string, +): string | null => { + const marker = '/src/modules/'; + const index = filename.indexOf(marker); + + if (index === -1) { + return null; + } + + return filename.slice(index + marker.length); +}; + +export const rule = defineRule({ + meta: { + type: 'problem', + docs: { + description: + 'Enforce folder structure conventions inside src/modules/ (kebab-case module dirs, allowed subdirs, hook/util file naming)', + }, + schema: [], + messages: { + noFilesInModulesRoot: + "Files are not allowed directly in src/modules/. Found '{{ name }}'.", + moduleNameNotKebabCase: + "Module folder '{{ name }}' must be kebab-case (e.g. 'my-module').", + moduleTooDeep: + "Module folder '{{ name }}' exceeds maximum nesting depth of {{ max }}.", + hookFileNaming: + "Hook file '{{ name }}' must match use{PascalCase}.(ts|tsx) (e.g. 'useMyHook.ts').", + hooksInternalTooDeep: + 'hooks/internal/ nesting exceeds maximum depth of {{ max }}.', + invalidHooksEntry: + "Unexpected entry '{{ name }}' in hooks/. Only hook files, __tests__/, __mocks__/, and internal/ are allowed.", + utilFileNaming: + "Util file '{{ name }}' must match {camelCase}.(ts|tsx) (e.g. 'myUtil.ts').", + invalidUtilsEntry: + "Unexpected entry '{{ name }}' in utils/. Only util files, __tests__/, and kebab-case subfolders are allowed.", + }, + }, + create: (context) => { + return { + Program: (node: any) => { + const relativePath = extractModulesRelativePath( + context.filename, + ); + + if (!relativePath) { + return; + } + + const segments = relativePath.split('/').filter(Boolean); + + if (segments.length === 0) { + return; + } + + let currentContext: PathContext = { type: 'modules_root' }; + + for (let i = 0; i < segments.length; i++) { + const segment = segments[i]; + const isLastSegment = i === segments.length - 1; + const result = validateSegment( + segment, + currentContext, + isLastSegment, + ); + + if ('error' in result) { + context.report({ + node, + messageId: result.error.messageId, + data: result.error.data, + }); + return; + } + + currentContext = result.nextContext; + } + }, + }; + }, +});