@factorialco/f0-react 8.25.0 → 8.27.0

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.
package/dist/f0.d.ts CHANGED
@@ -5407,6 +5407,9 @@ export declare const defaultTranslations: {
5407
5407
  readonly language: "Language";
5408
5408
  readonly audio: "Audio";
5409
5409
  };
5410
+ readonly swipeDeck: {
5411
+ readonly label: "Swipe deck";
5412
+ };
5410
5413
  readonly meetingCard: {
5411
5414
  readonly today: "Today";
5412
5415
  readonly yesterday: "Yesterday";
@@ -6130,6 +6133,7 @@ export declare const defaultTranslations: {
6130
6133
  readonly description: "Try a different date or fewer filters";
6131
6134
  };
6132
6135
  readonly windowedCategories: "Showing {{count}} of {{total}} categories";
6136
+ readonly noData: "No data";
6133
6137
  readonly tooltip: {
6134
6138
  readonly ofTotal: "of total";
6135
6139
  readonly total: "total";
@@ -10097,7 +10101,7 @@ declare interface F0DataChartBaseProps extends F0DataChartCommonProps, F0DataCha
10097
10101
  /**
10098
10102
  * Props shared by every `F0DataChart` variant.
10099
10103
  */
10100
- declare interface F0DataChartCommonProps {
10104
+ declare interface F0DataChartCommonProps<Point extends F0DataChartPointClick = F0DataChartMarkPointClick> {
10101
10105
  /** Customize or opt out of the empty state shown when data is empty. */
10102
10106
  emptyState?: F0DataChartEmptyStateProps;
10103
10107
  /**
@@ -10107,9 +10111,10 @@ declare interface F0DataChartCommonProps {
10107
10111
  * Line charts accept a click anywhere in the plot area, since a line is too
10108
10112
  * thin to hit — the same allowance their axis-triggered tooltip already
10109
10113
  * makes — and answer with the whole category in
10110
- * {@link F0DataChartPointClick.series}, matching what the tooltip showed.
10114
+ * {@link F0DataChartPointClickBase.series}, matching what the tooltip
10115
+ * showed.
10111
10116
  */
10112
- onPointClick?: (point: F0DataChartPointClick) => void;
10117
+ onPointClick?: (point: Point) => void;
10113
10118
  }
10114
10119
 
10115
10120
  /**
@@ -10343,6 +10348,21 @@ export declare interface F0DataChartLineSeries {
10343
10348
  /** Line interpolation type */
10344
10349
  export declare type F0DataChartLineType = "linear" | "smooth" | "step";
10345
10350
 
10351
+ /** A click on any chart except a radar. */
10352
+ export declare interface F0DataChartMarkPointClick extends F0DataChartPointClickBase {
10353
+ /**
10354
+ * Every number the mark carries, in series order: `[42]` for a bar or a
10355
+ * slice, `[x, y]` for a scatter point, `[xIndex, yIndex, value]` for a
10356
+ * heatmap cell.
10357
+ *
10358
+ * {@link value} is the last entry, which is the measure for every type
10359
+ * except scatter — there both entries are measures, and quoting only the
10360
+ * last one drops half the point. Read this when the chart type has more
10361
+ * than one number to say.
10362
+ */
10363
+ values: number[];
10364
+ }
10365
+
10346
10366
  /**
10347
10367
  * A single data point in a pie chart.
10348
10368
  */
@@ -10399,38 +10419,43 @@ export declare interface F0DataChartPieSeries {
10399
10419
  color?: ChartColorToken;
10400
10420
  }
10401
10421
 
10422
+ /** What a click on any chart type resolved to. */
10423
+ export declare type F0DataChartPointClick = F0DataChartMarkPointClick | F0DataChartRadarPointClick;
10424
+
10402
10425
  /**
10403
10426
  * What a click resolved to — one bar segment, one slice, one point, or (for a
10404
10427
  * line, where the click can land anywhere in the plot area) a whole category.
10405
10428
  *
10406
10429
  * The top-level fields always name a single series, so a consumer that wants
10407
- * one number has one. {@link F0DataChartPointClick.series} carries everything
10408
- * the click resolved, which for a line is every series at that category — the
10409
- * same rows its tooltip shows.
10430
+ * one number has one. {@link F0DataChartPointClickBase.series} carries
10431
+ * everything the click resolved, which for a line is every series at that
10432
+ * category — the same rows its tooltip shows.
10410
10433
  */
10411
- export declare interface F0DataChartPointClick {
10434
+ declare interface F0DataChartPointClickBase {
10412
10435
  /** Interaction surface that resolved the point. */
10413
10436
  source: "pointer";
10414
- /** Configured series name for the mark. Empty when ECharts does not report one. */
10437
+ /**
10438
+ * Configured series name for the mark. Empty when ECharts does not report one.
10439
+ *
10440
+ * For a radar it is the clicked polygon's name: a click picks a whole
10441
+ * polygon, never one spoke. For a heatmap it is the cell's y-axis category,
10442
+ * so a row reads like a series.
10443
+ */
10415
10444
  seriesName: string;
10416
10445
  /**
10417
10446
  * Mark name reported by ECharts: an axis category, pie slice, funnel stage,
10418
- * scatter label, or gauge/radar item name. Empty when the mark has no name.
10447
+ * scatter label, or gauge item name. For a heatmap it is the cell's x-axis
10448
+ * category. Empty for a radar, whose polygon spans every indicator, and
10449
+ * whenever the mark has no name.
10419
10450
  */
10420
10451
  category: string;
10421
- /** Raw, unformatted value. Consumers apply their own formatting. */
10422
- value: number;
10423
10452
  /**
10424
- * Every number the mark carries, in series order: `[42]` for a bar or a
10425
- * slice, `[x, y]` for a scatter point, `[xIndex, yIndex, value]` for a
10426
- * heatmap cell.
10453
+ * Raw, unformatted value. Consumers apply their own formatting.
10427
10454
  *
10428
- * {@link value} is the last entry, which is the measure for every type
10429
- * except scatter — there both entries are measures, and quoting only the
10430
- * last one drops half the point. Read this when the chart type has more
10431
- * than one number to say.
10455
+ * For a radar this is the last indicator that has data, not a single
10456
+ * observation — read {@link values} instead.
10432
10457
  */
10433
- values: number[];
10458
+ value: number;
10434
10459
  /**
10435
10460
  * Every series the click resolved, in the order they are configured.
10436
10461
  *
@@ -10484,12 +10509,21 @@ export declare interface F0DataChartRadarIndicator {
10484
10509
  max?: number;
10485
10510
  }
10486
10511
 
10512
+ /** A click on a radar, which picks a whole polygon. */
10513
+ export declare interface F0DataChartRadarPointClick extends F0DataChartPointClickBase {
10514
+ /**
10515
+ * One entry per indicator, in indicator order. `null` is an indicator with
10516
+ * no data; {@link value} is then the last indicator that has one.
10517
+ */
10518
+ values: (number | null)[];
10519
+ }
10520
+
10487
10521
  /**
10488
10522
  * Radar chart variant props.
10489
10523
  *
10490
10524
  * Radar charts use a polar coordinate system — no cartesian axes.
10491
10525
  */
10492
- export declare interface F0DataChartRadarProps extends F0DataChartCommonProps, F0DataChartLegendInteractionProps {
10526
+ export declare interface F0DataChartRadarProps extends F0DataChartCommonProps<F0DataChartRadarPointClick>, F0DataChartLegendInteractionProps {
10493
10527
  /** Chart type */
10494
10528
  type: "radar";
10495
10529
  /** Axes of the radar — defines the dimensions to compare */
@@ -10521,8 +10555,12 @@ export declare interface F0DataChartRadarProps extends F0DataChartCommonProps, F
10521
10555
  export declare interface F0DataChartRadarSeries {
10522
10556
  /** Display name used in legend and tooltip (e.g. "Team A", "Team B") */
10523
10557
  name: string;
10524
- /** Values — one per indicator, in the same order */
10525
- data: number[];
10558
+ /**
10559
+ * Values — one per indicator, in the same order. `null` marks an indicator
10560
+ * with no data: the tooltip reads "No data" and no vertex label is drawn.
10561
+ * ECharts still draws that vertex at the centre, the same place as `0`.
10562
+ */
10563
+ data: (number | null)[];
10526
10564
  /** Override color for this series. Must be an F0 design token name. */
10527
10565
  color?: ChartColorToken;
10528
10566
  }