Add twenty/folder-structure custom oxlint rule (#18467)
## 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 |
This commit is contained in:
@@ -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": [
|
||||
{
|
||||
|
||||
+1
-1
@@ -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';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AIChatErrorCode } from '@/ai/utils/AIChatErrorCode';
|
||||
import { AIChatErrorCode } from '@/ai/utils/aiChatErrorCode';
|
||||
import { isAIChatErrorOfType } from '@/ai/utils/isAIChatErrorOfType';
|
||||
|
||||
describe('isAIChatErrorOfType', () => {
|
||||
|
||||
@@ -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 = (
|
||||
|
||||
@@ -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 = (
|
||||
|
||||
@@ -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 = (
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
+1
-1
@@ -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';
|
||||
|
||||
+1
-1
@@ -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';
|
||||
|
||||
+1
-1
@@ -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';
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+2
-2
@@ -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,
|
||||
+5
-5
@@ -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 = (
|
||||
+1
-1
@@ -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';
|
||||
|
||||
+5
-5
@@ -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,
|
||||
})),
|
||||
|
||||
+1
-1
@@ -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<typeof GraphWidgetAggregateChart> = {
|
||||
|
||||
+1
-1
@@ -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';
|
||||
|
||||
|
||||
+1
-1
@@ -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<typeof GraphWidgetGaugeChart> = {
|
||||
|
||||
+1
-1
@@ -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<typeof GraphWidgetLineChart> = {
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
+1
-1
@@ -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';
|
||||
+1
-1
@@ -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,
|
||||
})),
|
||||
+1
-1
@@ -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 = {
|
||||
+1
-1
@@ -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', () => {
|
||||
+1
-1
@@ -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', () => {
|
||||
+1
-1
@@ -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 = (
|
||||
+1
-1
@@ -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 = ({
|
||||
+11
-11
@@ -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,
|
||||
+2
-2
@@ -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';
|
||||
+5
-5
@@ -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,
|
||||
+2
-2
@@ -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';
|
||||
+2
-2
@@ -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';
|
||||
+5
-5
@@ -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';
|
||||
+6
-6
@@ -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';
|
||||
+4
-4
@@ -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';
|
||||
+11
-11
@@ -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';
|
||||
+3
-3
@@ -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,
|
||||
})),
|
||||
+2
-2
@@ -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';
|
||||
|
||||
+2
-2
@@ -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';
|
||||
+4
-4
@@ -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';
|
||||
+3
-3
@@ -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';
|
||||
+4
-4
@@ -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';
|
||||
+1
-1
@@ -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';
|
||||
|
||||
+1
-1
@@ -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;
|
||||
+1
-1
@@ -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;
|
||||
+2
-2
@@ -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', () => {
|
||||
+2
-2
@@ -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', () => {
|
||||
+1
-1
@@ -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 };
|
||||
+2
-2
@@ -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> = {}): BarPosition => ({
|
||||
x: 0,
|
||||
+2
-2
@@ -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,
|
||||
+2
-2
@@ -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', () => {
|
||||
+2
-2
@@ -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> = {}): BarPosition => ({
|
||||
+3
-3
@@ -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<BarPositionContext> = {},
|
||||
+2
-2
@@ -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 };
|
||||
+3
-3
@@ -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<BarPositionContext> = {},
|
||||
+2
-2
@@ -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', () => {
|
||||
+2
-2
@@ -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', () => {
|
||||
+1
-1
@@ -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', () => {
|
||||
+2
-2
@@ -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<BarPositionContext> = {},
|
||||
+2
-2
@@ -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<BarPositionContext> = {},
|
||||
+1
-1
@@ -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', () => {
|
||||
+2
-2
@@ -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> = {}): BarPosition => ({
|
||||
+1
-1
@@ -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', () => {
|
||||
+4
-4
@@ -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 = {
|
||||
+1
-1
@@ -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[],
|
||||
+1
-1
@@ -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[],
|
||||
+4
-4
@@ -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';
|
||||
|
||||
+3
-3
@@ -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';
|
||||
+2
-2
@@ -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[],
|
||||
+2
-2
@@ -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 = (
|
||||
+2
-2
@@ -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 = {
|
||||
+2
-2
@@ -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,
|
||||
+5
-5
@@ -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';
|
||||
+6
-6
@@ -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 = {
|
||||
+1
-1
@@ -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;
|
||||
+6
-6
@@ -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;
|
||||
+1
-1
@@ -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,
|
||||
+1
-1
@@ -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,
|
||||
+1
-1
@@ -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;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user