@turquoisehealth/pit-viper 2.211.5 → 2.212.1-dev.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.
@@ -7,6 +7,8 @@ export declare const histogramChartTypeConfig: MenuOption;
7
7
  export declare const mapChartTypeConfig: MenuOption;
8
8
  export declare const MAP_REGION_FIELD = "state";
9
9
  export declare const separatorValue = "--SEPARATOR--";
10
+ export declare const distributionRangeMinCategory = "--DISTRIBUTION-RANGE-MIN--";
11
+ export declare const distributionRangeMaxCategory = "--DISTRIBUTION-RANGE-MAX--";
10
12
  export declare const padStartValue = "--PAD-START--";
11
13
  export declare const padEndValue = "--PAD-END--";
12
14
  export declare const sortTotalSuffix = "_sort_total";
@@ -1,6 +1,6 @@
1
- import { AgChartOptions } from 'ag-charts-enterprise';
1
+ import { AgAxisLabelFormatterParams, AgChartOptions, Formatter } from 'ag-charts-enterprise';
2
2
  import { ColDef } from 'ag-grid-community';
3
- import { OptionWithFormatterAndDataType } from './types';
3
+ import { ChipSection, CrosslineOverlayGroup, OptionWithFormatterAndDataType, VerticalLineOverlay } from './types';
4
4
  export declare const isAvailableSecondarySeriesColDef: (colDef: ColDef) => boolean;
5
5
  export declare const getSecondarySeriesKey: (field: string, aggFunc: string | null | undefined, rowGroupFields: Set<string>) => string;
6
6
  /**
@@ -56,3 +56,28 @@ export declare const buildStackedChartData: (data: AgChartOptions["data"], categ
56
56
  export declare const padSingleCategoryBarData: (data: AgChartOptions["data"], categoryField: string) => AgChartOptions["data"];
57
57
  export declare const calculateMaxChartSeriesValue: (data: any[] | undefined, seriesField: string, isStacked: boolean) => number;
58
58
  export declare const calculateMinChartSeriesValue: (data: any[] | undefined, seriesField: string, isStacked: boolean) => number;
59
+ /**
60
+ * Builds the category axis's label formatter. Exactly one of three behaviors applies:
61
+ * - `hideLabel`: every label is blank (e.g. a chart type that doesn't show x-axis labels).
62
+ * - `showDistributionRangeLabels`: only the two blank pad categories flanking a histogram's
63
+ * real buckets (under `useDistributionV2Styling`) are labeled, with the overall lowest
64
+ * min / highest max bucket boundary; every other category (including the real buckets
65
+ * themselves) is blank.
66
+ * - Otherwise: normal category labels, formatted via `columnValueFormatter`, with the
67
+ * separator/single-bar-padding sentinel categories hidden, a focus suffix appended, and
68
+ * the result truncated to `MAX_LABEL_LENGTH`.
69
+ */
70
+ export declare const buildCategoryAxisLabelFormatter: ({ hideLabel, showDistributionRangeLabels, chartData, formatBucketBoundary, columnValueFormatter, enableFocusView, focuses, focusText, }: {
71
+ hideLabel: boolean;
72
+ showDistributionRangeLabels: boolean;
73
+ chartData: AgChartOptions["data"];
74
+ formatBucketBoundary: (value: number) => string;
75
+ columnValueFormatter: Formatter<AgAxisLabelFormatterParams> | undefined;
76
+ enableFocusView: boolean;
77
+ focuses: string[];
78
+ focusText: string;
79
+ }) => ((params: AgAxisLabelFormatterParams) => string);
80
+ export declare const DEFAULT_CROSSLINE_OVERLAY_COLOR = "#E7E2D9";
81
+ export declare const LEGACY_CROSSLINE_OVERLAY_COLOR = "#7C8AF4";
82
+ export declare const resolveCrosslineOverlays: (groups: CrosslineOverlayGroup[], activeGroupIds: Set<string>) => VerticalLineOverlay[];
83
+ export declare const computeChipSections: (groups: CrosslineOverlayGroup[], activeGroupIds: Set<string>, formatValue: (value: number) => string | number) => ChipSection[];
@@ -0,0 +1,7 @@
1
+ import { ChipSection } from '../types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = {
4
+ sections: ChipSection[];
5
+ };
6
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
7
+ export default _default;
@@ -51,6 +51,34 @@ export interface CrosslineOverlayGroup {
51
51
  /** If true, this group is grayed out from the selection dropdown. */
52
52
  disabled?: boolean;
53
53
  disabledReason?: string;
54
+ /**
55
+ * Name of the chip section this group's overlays are rendered under, beside the chart
56
+ * (e.g. "Benchmarks", "Percentiles"). Groups sharing the same `groupName` are chipped
57
+ * together under one section heading, in order of that name's first appearance across
58
+ * `crosslineOverlayGroups`. Groups without a `groupName` aren't rendered as chips.
59
+ */
60
+ groupName?: string;
61
+ /**
62
+ * Color (hex code) used for this group's chip and, when an overlay doesn't specify its
63
+ * own `color`, for that overlay's crossline.
64
+ */
65
+ color?: string;
66
+ /**
67
+ * If true, this group's `overlays` haven't loaded yet: its chip renders as a skeleton
68
+ * placeholder (one per group, regardless of `overlays`) instead of chip content.
69
+ */
70
+ loading?: boolean;
71
+ }
72
+ export interface BenchmarkChip {
73
+ key: string;
74
+ loading: boolean;
75
+ label?: string;
76
+ color?: string;
77
+ formattedValue?: string | number;
78
+ }
79
+ export interface ChipSection {
80
+ groupName: string;
81
+ chips: BenchmarkChip[];
54
82
  }
55
83
  export interface TableOverlayOption {
56
84
  title: string;
@@ -77,6 +105,12 @@ export interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
77
105
  showSeriesLabels?: boolean;
78
106
  /** When true, truncates long category labels on the chart axis. */
79
107
  truncateLabelValues?: boolean;
108
+ /**
109
+ * Gate for distribution/histogram chart styling changes that must ship together.
110
+ * When true, notates the x-axis of histogram charts with the overall lowest min
111
+ * (left) and highest max (right) bucket bounds.
112
+ */
113
+ useDistributionV2Styling?: boolean;
80
114
  /** Pre-populated chart data to render before any server-side fetch completes. */
81
115
  initialChartData?: AgChartOptions["data"];
82
116
  /** When true, wraps large charts in a native Pit Viper-styled scroll container. */
@@ -44,6 +44,7 @@ export declare const getChartScrollContentStyle: (params: {
44
44
  enableChartScrolling: boolean;
45
45
  isHorizontalScrollingChart: boolean;
46
46
  minContentWidth: number;
47
+ reserveWidth?: number;
47
48
  }) => Record<string, string> | undefined;
48
49
  /** Coerce to a plain object record, or `undefined` when the value is not one. */
49
50
  export declare const asObjectRecord: (value: unknown) => ChartRecord | undefined;