@sybilion/uilib 1.3.9 → 1.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ import { ThresholdsOverlay } from './overlays/ThresholdsOverlay/ThresholdsOverla
16
16
  const chartConfig = {
17
17
  // Chart now supports light/dark themes with dynamic colors
18
18
  };
19
- function ChartAreaInteractive({ className, chartContainerClassName, legendClassName, xAxisClassName, yAxisClassName, timeRange, onTimeRangeChange, pinMonth, onPinMonthChange, onPreviewMonthChange, chartData, forecastData, error, loading = false, isDarkTheme = false, footerActions, mode, selectedForecast, upperQuantiles, lowerQuantiles, selectedLowerQuantile, selectedUpperQuantile, onLowerQuantileChange, onUpperQuantileChange, lowerThreshold, upperThreshold, onLowerThresholdChange, onUpperThresholdChange, discreteThresholdValues, headerActions, excludeLegendIds, loadingAnalyses, onLegendClick, onAnalysisSelect, disableTimeRangeSelector, forecastLineStyle = 'dashed', selectedAnalysisId, chartRenderId, toggleLegendSeries, ensureAnalysisSeriesVisible, overlayForecastData = {}, hiddenSeries, disableForecastHistoricalBridge, overlayElements: overlayElementsProp, ...restProps }) {
19
+ function ChartAreaInteractive({ className, chartContainerClassName, legendClassName, xAxisClassName, yAxisClassName, timeRange, onTimeRangeChange, pinMonth, onPinMonthChange, onPreviewMonthChange, chartData, forecastData, error, loading = false, isDarkTheme = false, footerActions, mode, selectedForecast, upperQuantiles, lowerQuantiles, selectedLowerQuantile, selectedUpperQuantile, onLowerQuantileChange, onUpperQuantileChange, lowerThreshold, upperThreshold, onLowerThresholdChange, onUpperThresholdChange, discreteThresholdValues, headerActions, excludeLegendIds, loadingAnalyses, onLegendClick, onAnalysisSelect, disableTimeRangeSelector, enableTimeRangeBrush = false, forecastLineStyle = 'dashed', selectedAnalysisId, chartRenderId, toggleLegendSeries, ensureAnalysisSeriesVisible, overlayForecastData = {}, hiddenSeries, disableForecastHistoricalBridge, overlayElements: overlayElementsProp, ...restProps }) {
20
20
  const seriesHidden = hiddenSeries ?? new Set();
21
21
  const hiddenSeriesRef = useRef(seriesHidden);
22
22
  const prevSelectedAnalysisIdRef = useRef(selectedAnalysisId);
@@ -95,7 +95,9 @@ function ChartAreaInteractive({ className, chartContainerClassName, legendClassN
95
95
  // loadingAnalyses,
96
96
  ...restProps,
97
97
  };
98
- const brushEnabled = !disableTimeRangeSelector && !loading && bridgedChartData.length > 1;
98
+ const brushEnabled = (!disableTimeRangeSelector || enableTimeRangeBrush) &&
99
+ !loading &&
100
+ bridgedChartData.length > 1;
99
101
  const renderChart = () => {
100
102
  const overlayClassName = cn(chartContainerClassName);
101
103
  switch (mode) {
@@ -1,3 +1,3 @@
1
1
  import { ChartAreaInteractiveProps } from './ChartAreaInteractive.types';
2
2
  export declare const chartConfig: {};
3
- export declare function ChartAreaInteractive({ className, chartContainerClassName, legendClassName, xAxisClassName, yAxisClassName, timeRange, onTimeRangeChange, pinMonth, onPinMonthChange, onPreviewMonthChange, chartData, forecastData, error, loading, isDarkTheme, footerActions, mode, selectedForecast, upperQuantiles, lowerQuantiles, selectedLowerQuantile, selectedUpperQuantile, onLowerQuantileChange, onUpperQuantileChange, lowerThreshold, upperThreshold, onLowerThresholdChange, onUpperThresholdChange, discreteThresholdValues, headerActions, excludeLegendIds, loadingAnalyses, onLegendClick, onAnalysisSelect, disableTimeRangeSelector, forecastLineStyle, selectedAnalysisId, chartRenderId, toggleLegendSeries, ensureAnalysisSeriesVisible, overlayForecastData, hiddenSeries, disableForecastHistoricalBridge, overlayElements: overlayElementsProp, ...restProps }: ChartAreaInteractiveProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function ChartAreaInteractive({ className, chartContainerClassName, legendClassName, xAxisClassName, yAxisClassName, timeRange, onTimeRangeChange, pinMonth, onPinMonthChange, onPreviewMonthChange, chartData, forecastData, error, loading, isDarkTheme, footerActions, mode, selectedForecast, upperQuantiles, lowerQuantiles, selectedLowerQuantile, selectedUpperQuantile, onLowerQuantileChange, onUpperQuantileChange, lowerThreshold, upperThreshold, onLowerThresholdChange, onUpperThresholdChange, discreteThresholdValues, headerActions, excludeLegendIds, loadingAnalyses, onLegendClick, onAnalysisSelect, disableTimeRangeSelector, enableTimeRangeBrush, forecastLineStyle, selectedAnalysisId, chartRenderId, toggleLegendSeries, ensureAnalysisSeriesVisible, overlayForecastData, hiddenSeries, disableForecastHistoricalBridge, overlayElements: overlayElementsProp, ...restProps }: ChartAreaInteractiveProps): import("react/jsx-runtime").JSX.Element;
@@ -47,6 +47,8 @@ export interface ChartAreaInteractiveProps extends BaseChartWrapperProps {
47
47
  loadingAnalyses?: Set<string>;
48
48
  onLegendClick?: (data: LegendPayload) => undefined | boolean;
49
49
  disableTimeRangeSelector?: boolean;
50
+ /** When selector hidden (`disableTimeRangeSelector`), still allow drag brush on chart (defaults false). */
51
+ enableTimeRangeBrush?: boolean;
50
52
  forecastLineStyle?: 'dashed' | 'solid';
51
53
  /** When set, ensures this analysis is visible (selected) in chart legend */
52
54
  selectedAnalysisId?: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sybilion/uilib",
3
- "version": "1.3.9",
3
+ "version": "1.3.10",
4
4
  "description": "Sybilion Design System — React UI components (Webpack + Stylus)",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -61,6 +61,7 @@ export function ChartAreaInteractive({
61
61
  onLegendClick,
62
62
  onAnalysisSelect,
63
63
  disableTimeRangeSelector,
64
+ enableTimeRangeBrush = false,
64
65
  forecastLineStyle = 'dashed',
65
66
  selectedAnalysisId,
66
67
  chartRenderId,
@@ -169,7 +170,9 @@ export function ChartAreaInteractive({
169
170
  };
170
171
 
171
172
  const brushEnabled =
172
- !disableTimeRangeSelector && !loading && bridgedChartData.length > 1;
173
+ (!disableTimeRangeSelector || enableTimeRangeBrush) &&
174
+ !loading &&
175
+ bridgedChartData.length > 1;
173
176
 
174
177
  const renderChart = () => {
175
178
  const overlayClassName = cn(chartContainerClassName);
@@ -51,6 +51,8 @@ export interface ChartAreaInteractiveProps extends BaseChartWrapperProps {
51
51
  loadingAnalyses?: Set<string>;
52
52
  onLegendClick?: (data: LegendPayload) => undefined | boolean;
53
53
  disableTimeRangeSelector?: boolean;
54
+ /** When selector hidden (`disableTimeRangeSelector`), still allow drag brush on chart (defaults false). */
55
+ enableTimeRangeBrush?: boolean;
54
56
  forecastLineStyle?: 'dashed' | 'solid';
55
57
  /** When set, ensures this analysis is visible (selected) in chart legend */
56
58
  selectedAnalysisId?: number | null;