Skip to content

Commit

Permalink
react: re-generate without rename rule to avoid conflict (error TS230…
Browse files Browse the repository at this point in the history
…0: Duplicate identifier 'LocalizationTypes') (21)
  • Loading branch information
mpreyskurantov committed Oct 2, 2024
1 parent eaf9ecc commit 15c7dd7
Show file tree
Hide file tree
Showing 21 changed files with 161 additions and 194 deletions.
16 changes: 7 additions & 9 deletions packages/devextreme-react/src/bar-gauge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ import NestedOption from "./core/nested-option";

import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, TooltipHiddenEvent, TooltipShownEvent, BarGaugeBarInfo, BarGaugeLegendItem } from "devextreme/viz/bar_gauge";
import type { AnimationEaseMode, Font as ChartsFont, TextOverflow, WordWrap, DashStyle } from "devextreme/common/charts";
import type { HorizontalAlignment, VerticalEdge, ExportFormat, Position, Orientation } from "devextreme/common";
import type { HorizontalAlignment, VerticalEdge, ExportFormat, Format as CommonFormat, Position, Orientation } from "devextreme/common";
import type { Format as LocalizationFormat } from "devextreme/localization";
import type { template } from "devextreme/core/templates/template";

import type * as LocalizationTypes from "devextreme/common";
import type * as LocalizationTypes from "devextreme/localization";

type ReplaceFieldTypes<TSource, TReplacement> = {
[P in keyof TSource]: P extends keyof TReplacement ? TReplacement[P] : TSource[P];
}
Expand Down Expand Up @@ -260,7 +258,7 @@ type IFormatProps = React.PropsWithChildren<{
formatter?: ((value: number | Date) => string);
parser?: ((value: string) => number | Date);
precision?: number;
type?: LocalizationTypes.Format | string;
type?: CommonFormat | string;
useCurrencyAccountingStyle?: boolean;
}>
const _componentFormat = memo(
Expand Down Expand Up @@ -296,7 +294,7 @@ type IItemTextFormatProps = React.PropsWithChildren<{
formatter?: ((value: number | Date) => string);
parser?: ((value: string) => number | Date);
precision?: number;
type?: LocalizationTypes.Format | string;
type?: CommonFormat | string;
useCurrencyAccountingStyle?: boolean;
}>
const _componentItemTextFormat = memo(
Expand All @@ -316,7 +314,7 @@ type ILabelProps = React.PropsWithChildren<{
connectorWidth?: number;
customizeText?: ((barValue: { value: number, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
indent?: number;
visible?: boolean;
}>
Expand Down Expand Up @@ -354,7 +352,7 @@ type ILegendProps = React.PropsWithChildren<{
font?: ChartsFont;
horizontalAlignment?: HorizontalAlignment;
itemsAlignment?: HorizontalAlignment;
itemTextFormat?: LocalizationTypes.Format;
itemTextFormat?: LocalizationFormat;
itemTextPosition?: Position;
margin?: number | Record<string, any> | {
bottom?: number;
Expand Down Expand Up @@ -647,7 +645,7 @@ type ITooltipProps = React.PropsWithChildren<{
customizeTooltip?: ((scaleValue: { index: number, value: number, valueText: string }) => Record<string, any>);
enabled?: boolean;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
interactive?: boolean;
opacity?: number;
paddingLeftRight?: number;
Expand Down
9 changes: 4 additions & 5 deletions packages/devextreme-react/src/bullet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import NestedOption from "./core/nested-option";

import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, TooltipHiddenEvent, TooltipShownEvent } from "devextreme/viz/bullet";
import type { DashStyle, Font as ChartsFont } from "devextreme/common/charts";
import type { Format as CommonFormat } from "devextreme/common";
import type { Format as LocalizationFormat } from "devextreme/localization";
import type { template } from "devextreme/core/templates/template";

import type * as LocalizationTypes from "devextreme/common";
import type * as LocalizationTypes from "devextreme/localization";

type ReplaceFieldTypes<TSource, TReplacement> = {
[P in keyof TSource]: P extends keyof TReplacement ? TReplacement[P] : TSource[P];
}
Expand Down Expand Up @@ -117,7 +116,7 @@ type IFormatProps = React.PropsWithChildren<{
formatter?: ((value: number | Date) => string);
parser?: ((value: string) => number | Date);
precision?: number;
type?: LocalizationTypes.Format | string;
type?: CommonFormat | string;
useCurrencyAccountingStyle?: boolean;
}>
const _componentFormat = memo(
Expand Down Expand Up @@ -201,7 +200,7 @@ type ITooltipProps = React.PropsWithChildren<{
customizeTooltip?: ((pointsInfo: any) => Record<string, any>);
enabled?: boolean;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
interactive?: boolean;
opacity?: number;
paddingLeftRight?: number;
Expand Down
47 changes: 23 additions & 24 deletions packages/devextreme-react/src/chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ import NestedOption from "./core/nested-option";
import type { ArgumentAxisClickEvent, DisposingEvent, DoneEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, LegendClickEvent, PointClickEvent, SeriesClickEvent, TooltipHiddenEvent, TooltipShownEvent, ZoomEndEvent, ZoomStartEvent, chartPointAggregationInfoObject, chartSeriesObject, ChartSeriesAggregationMethod, dxChartAnnotationConfig, AggregatedPointsPosition, ChartLabelDisplayMode, FinancialChartReductionLevel, chartPointObject, ChartTooltipLocation, ChartZoomAndPanMode, EventKeyModifier } from "devextreme/viz/chart";
import type { AnimationEaseMode, DashStyle, Font as ChartsFont, TextOverflow, AnnotationType, WordWrap, TimeInterval, ChartsDataType, ScaleBreak, ScaleBreakLineStyle, RelativePosition, DiscreteAxisDivisionMode, ArgumentAxisHoverMode, ChartsAxisLabelOverlap, AxisScaleType, VisualRangeUpdateMode, ChartsColor, SeriesHoverMode, HatchDirection, PointInteractionMode, PointSymbol, SeriesSelectionMode, SeriesType, ValueErrorBarDisplayMode, ValueErrorBarType, LegendItem, LegendHoverMode } from "devextreme/common/charts";
import type { template } from "devextreme/core/templates/template";
import type { HorizontalAlignment, VerticalAlignment, Position, VerticalEdge, ExportFormat, Orientation } from "devextreme/common";
import type { HorizontalAlignment, VerticalAlignment, Format as CommonFormat, Position, VerticalEdge, ExportFormat, Orientation } from "devextreme/common";
import type { Format as LocalizationFormat } from "devextreme/localization";
import type { ChartSeries } from "devextreme/viz/common";

import type * as CommonChartTypes from "devextreme/common/charts";
import type * as LocalizationTypes from "devextreme/localization";
import type * as LocalizationTypes from "devextreme/common";

type ReplaceFieldTypes<TSource, TReplacement> = {
[P in keyof TSource]: P extends keyof TReplacement ? TReplacement[P] : TSource[P];
Expand Down Expand Up @@ -400,7 +399,7 @@ type IArgumentAxisProps = React.PropsWithChildren<{
customizeText?: ((argument: { value: Date | number | string, valueText: string }) => string);
displayMode?: ChartLabelDisplayMode;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
indentFromAxis?: number;
overlappingBehavior?: ChartsAxisLabelOverlap;
position?: Position | RelativePosition;
Expand Down Expand Up @@ -565,7 +564,7 @@ type IArgumentFormatProps = React.PropsWithChildren<{
formatter?: ((value: number | Date) => string);
parser?: ((value: string) => number | Date);
precision?: number;
type?: LocalizationTypes.Format | string;
type?: CommonFormat | string;
useCurrencyAccountingStyle?: boolean;
}>
const _componentArgumentFormat = memo(
Expand Down Expand Up @@ -634,7 +633,7 @@ type IAxisLabelProps = React.PropsWithChildren<{
customizeText?: ((argument: { value: Date | number | string, valueText: string }) => string);
displayMode?: ChartLabelDisplayMode;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
indentFromAxis?: number;
overlappingBehavior?: ChartsAxisLabelOverlap;
position?: Position | RelativePosition;
Expand Down Expand Up @@ -1220,7 +1219,7 @@ type ICommonSeriesSettingsProps = React.PropsWithChildren<{
innerColor?: string;
label?: Record<string, any> | {
alignment?: HorizontalAlignment;
argumentFormat?: LocalizationTypes.Format;
argumentFormat?: LocalizationFormat;
backgroundColor?: string;
border?: Record<string, any> | {
color?: string;
Expand All @@ -1236,7 +1235,7 @@ type ICommonSeriesSettingsProps = React.PropsWithChildren<{
customizeText?: ((pointInfo: any) => string);
displayFormat?: string;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
horizontalOffset?: number;
position?: RelativePosition;
rotationAngle?: number;
Expand Down Expand Up @@ -1419,7 +1418,7 @@ const CommonSeriesSettingsHoverStyle: typeof _componentCommonSeriesSettingsHover
// CommonSeriesSettings
type ICommonSeriesSettingsLabelProps = React.PropsWithChildren<{
alignment?: HorizontalAlignment;
argumentFormat?: LocalizationTypes.Format;
argumentFormat?: LocalizationFormat;
backgroundColor?: string;
border?: Record<string, any> | {
color?: string;
Expand All @@ -1435,7 +1434,7 @@ type ICommonSeriesSettingsLabelProps = React.PropsWithChildren<{
customizeText?: ((pointInfo: any) => string);
displayFormat?: string;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
horizontalOffset?: number;
position?: RelativePosition;
rotationAngle?: number;
Expand Down Expand Up @@ -1608,7 +1607,7 @@ type ICrosshairProps = React.PropsWithChildren<{
backgroundColor?: string;
customizeText?: ((info: { point: chartPointObject, value: Date | number | string, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
visible?: boolean;
};
opacity?: number;
Expand All @@ -1619,7 +1618,7 @@ type ICrosshairProps = React.PropsWithChildren<{
backgroundColor?: string;
customizeText?: ((info: { point: chartPointObject, value: Date | number | string, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
visible?: boolean;
};
opacity?: number;
Expand All @@ -1630,7 +1629,7 @@ type ICrosshairProps = React.PropsWithChildren<{
backgroundColor?: string;
customizeText?: ((info: { point: chartPointObject, value: Date | number | string, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
visible?: boolean;
};
opacity?: number;
Expand Down Expand Up @@ -1756,7 +1755,7 @@ type IFormatProps = React.PropsWithChildren<{
formatter?: ((value: number | Date) => string);
parser?: ((value: string) => number | Date);
precision?: number;
type?: LocalizationTypes.Format | string;
type?: CommonFormat | string;
useCurrencyAccountingStyle?: boolean;
}>
const _componentFormat = memo(
Expand Down Expand Up @@ -1831,7 +1830,7 @@ type IHorizontalLineProps = React.PropsWithChildren<{
backgroundColor?: string;
customizeText?: ((info: { point: chartPointObject, value: Date | number | string, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
visible?: boolean;
};
opacity?: number;
Expand Down Expand Up @@ -1860,7 +1859,7 @@ type IHorizontalLineLabelProps = React.PropsWithChildren<{
backgroundColor?: string;
customizeText?: ((info: { point: chartPointObject, value: Date | number | string, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
visible?: boolean;
}>
const _componentHorizontalLineLabel = memo(
Expand Down Expand Up @@ -1959,15 +1958,15 @@ type ILabelProps = React.PropsWithChildren<{
customizeHint?: ((argument: { value: Date | number | string, valueText: string }) => string);
customizeText?: ((argument: { value: Date | number | string, valueText: string }) => string);
displayMode?: ChartLabelDisplayMode;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
indentFromAxis?: number;
overlappingBehavior?: ChartsAxisLabelOverlap;
rotationAngle?: number;
staggeringSpacing?: number;
template?: ((data: { value: Date | number | string, valueText: string }, element: any) => string | any) | template;
textOverflow?: TextOverflow;
wordWrap?: WordWrap;
argumentFormat?: LocalizationTypes.Format;
argumentFormat?: LocalizationFormat;
backgroundColor?: string;
border?: Record<string, any> | {
color?: string;
Expand Down Expand Up @@ -2634,7 +2633,7 @@ type ISeriesProps = React.PropsWithChildren<{
innerColor?: string;
label?: Record<string, any> | {
alignment?: HorizontalAlignment;
argumentFormat?: LocalizationTypes.Format;
argumentFormat?: LocalizationFormat;
backgroundColor?: string;
border?: Record<string, any> | {
color?: string;
Expand All @@ -2650,7 +2649,7 @@ type ISeriesProps = React.PropsWithChildren<{
customizeText?: ((pointInfo: any) => string);
displayFormat?: string;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
horizontalOffset?: number;
position?: RelativePosition;
rotationAngle?: number;
Expand Down Expand Up @@ -3034,7 +3033,7 @@ const Title: typeof _componentTitle & IElementDescriptor = Object.assign(_compon
// owners:
// Chart
type ITooltipProps = React.PropsWithChildren<{
argumentFormat?: LocalizationTypes.Format;
argumentFormat?: LocalizationFormat;
arrowLength?: number;
border?: Record<string, any> | {
color?: string;
Expand All @@ -3050,7 +3049,7 @@ type ITooltipProps = React.PropsWithChildren<{
customizeTooltip?: ((pointInfo: any) => Record<string, any>);
enabled?: boolean;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
interactive?: boolean;
location?: ChartTooltipLocation;
opacity?: number;
Expand Down Expand Up @@ -3192,7 +3191,7 @@ type IValueAxisProps = React.PropsWithChildren<{
customizeText?: ((axisValue: { value: Date | number | string, valueText: string }) => string);
displayMode?: ChartLabelDisplayMode;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
indentFromAxis?: number;
overlappingBehavior?: ChartsAxisLabelOverlap;
position?: Position | RelativePosition;
Expand Down Expand Up @@ -3379,7 +3378,7 @@ type IVerticalLineProps = React.PropsWithChildren<{
backgroundColor?: string;
customizeText?: ((info: { point: chartPointObject, value: Date | number | string, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
visible?: boolean;
};
opacity?: number;
Expand Down
20 changes: 9 additions & 11 deletions packages/devextreme-react/src/circular-gauge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ import NestedOption from "./core/nested-option";

import type { DisposingEvent, DrawnEvent, ExportedEvent, ExportingEvent, FileSavingEvent, IncidentOccurredEvent, InitializedEvent, TooltipHiddenEvent, TooltipShownEvent, CircularGaugeLabelOverlap, CircularGaugeElementOrientation } from "devextreme/viz/circular_gauge";
import type { AnimationEaseMode, DashStyle, Font as ChartsFont, LabelOverlap, ChartsColor, Palette, PaletteExtensionMode, TextOverflow, WordWrap } from "devextreme/common/charts";
import type { ExportFormat, HorizontalEdge, VerticalEdge, HorizontalAlignment } from "devextreme/common";
import type { ExportFormat, Format as CommonFormat, HorizontalEdge, VerticalEdge, HorizontalAlignment } from "devextreme/common";
import type { Format as LocalizationFormat } from "devextreme/localization";
import type { template } from "devextreme/core/templates/template";

import type * as LocalizationTypes from "devextreme/common";
import type * as LocalizationTypes from "devextreme/localization";

type ReplaceFieldTypes<TSource, TReplacement> = {
[P in keyof TSource]: P extends keyof TReplacement ? TReplacement[P] : TSource[P];
}
Expand Down Expand Up @@ -232,7 +230,7 @@ type IFormatProps = React.PropsWithChildren<{
formatter?: ((value: number | Date) => string);
parser?: ((value: string) => number | Date);
precision?: number;
type?: LocalizationTypes.Format | string;
type?: CommonFormat | string;
useCurrencyAccountingStyle?: boolean;
}>
const _componentFormat = memo(
Expand Down Expand Up @@ -266,7 +264,7 @@ const Geometry: typeof _componentGeometry & IElementDescriptor = Object.assign(_
type ILabelProps = React.PropsWithChildren<{
customizeText?: ((scaleValue: { value: number, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
hideFirstOrLast?: CircularGaugeLabelOverlap;
indentFromTick?: number;
overlappingBehavior?: LabelOverlap;
Expand Down Expand Up @@ -411,7 +409,7 @@ type IScaleProps = React.PropsWithChildren<{
label?: Record<string, any> | {
customizeText?: ((scaleValue: { value: number, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
hideFirstOrLast?: CircularGaugeLabelOverlap;
indentFromTick?: number;
overlappingBehavior?: LabelOverlap;
Expand Down Expand Up @@ -531,7 +529,7 @@ type ISubvalueIndicatorProps = React.PropsWithChildren<{
text?: Record<string, any> | {
customizeText?: ((indicatedValue: { value: number, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
indent?: number;
};
type?: "circle" | "rangeBar" | "rectangle" | "rectangleNeedle" | "rhombus" | "textCloud" | "triangleMarker" | "triangleNeedle" | "twoColorNeedle";
Expand All @@ -557,7 +555,7 @@ const SubvalueIndicator: typeof _componentSubvalueIndicator & IElementDescriptor
type ITextProps = React.PropsWithChildren<{
customizeText?: ((indicatedValue: { value: number, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
indent?: number;
}>
const _componentText = memo(
Expand Down Expand Up @@ -650,7 +648,7 @@ type ITooltipProps = React.PropsWithChildren<{
customizeTooltip?: ((scaleValue: { value: number, valueText: string }) => Record<string, any>);
enabled?: boolean;
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
interactive?: boolean;
opacity?: number;
paddingLeftRight?: number;
Expand Down Expand Up @@ -708,7 +706,7 @@ type IValueIndicatorProps = React.PropsWithChildren<{
text?: Record<string, any> | {
customizeText?: ((indicatedValue: { value: number, valueText: string }) => string);
font?: ChartsFont;
format?: LocalizationTypes.Format;
format?: LocalizationFormat;
indent?: number;
};
type?: "circle" | "rangeBar" | "rectangle" | "rectangleNeedle" | "rhombus" | "textCloud" | "triangleMarker" | "triangleNeedle" | "twoColorNeedle";
Expand Down
Loading

0 comments on commit 15c7dd7

Please sign in to comment.