@turquoisehealth/pit-viper 2.219.1-dev.0 → 2.220.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.
@@ -19,8 +19,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
19
19
  readonly "onTable-overlay-change"?: ((selectedIds: string[]) => any) | undefined;
20
20
  readonly "onChart-state-changed"?: ((event: ChartStateChangedEvent) => any) | undefined;
21
21
  readonly "onChart-collapsed"?: ((collapsed: boolean) => any) | undefined;
22
- readonly "onActive-overlay-group-ids-change"?: ((ids: string[]) => any) | undefined;
23
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onHandle-settings-icon" | "onColumn-moved" | "onColumn-resized" | "onColumn-row-group-changed" | "onColumn-value-changed" | "onGrid-ready" | "onFilter-changed" | "onSort-changed" | "onFilter-opened" | "onFirst-data-rendered" | "onFocus-update" | "onTable-overlay-change" | "onChart-state-changed" | "onChart-collapsed" | "onActive-overlay-group-ids-change"> & PvDataTableWithChartProps<T> & Partial<{}>> & PublicProps;
22
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onHandle-settings-icon" | "onColumn-moved" | "onColumn-resized" | "onColumn-row-group-changed" | "onColumn-value-changed" | "onGrid-ready" | "onFilter-changed" | "onSort-changed" | "onFilter-opened" | "onFirst-data-rendered" | "onFocus-update" | "onTable-overlay-change" | "onChart-state-changed" | "onChart-collapsed"> & PvDataTableWithChartProps<T> & Partial<{}>> & PublicProps;
24
23
  expose(exposed: ShallowUnwrapRef<{
25
24
  getChartImageDataURL: (dimensions?: {
26
25
  width?: number;
@@ -57,7 +56,6 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
57
56
  (e: "focus-update", event: FocusUpdateEvent): void;
58
57
  (e: "chart-collapsed", collapsed: boolean): void;
59
58
  (e: "table-overlay-change", selectedIds: string[]): void;
60
- (e: "active-overlay-group-ids-change", ids: string[]): void;
61
59
  };
62
60
  }>) => VNode & {
63
61
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -1,4 +1,4 @@
1
- import { TableConfigOptions } from '../types';
1
+ import { ColumnConfigurationChangeEvent, TableConfigOptions } from '../types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, Slot, ComponentPublicInstance, ComponentOptionsBase, Ref, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ComponentCustomProperties } from 'vue';
3
3
  import { PvPopoverProps } from '../../../base/PvPopover/PvPopover.vue';
4
4
  import { OnCleanup } from '@vue/reactivity';
@@ -9,9 +9,11 @@ type __VLS_Props = {
9
9
  declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
10
10
  "toggle-group": (enableGrouping: boolean) => any;
11
11
  "table-overlay-change": (selectedIds: string[]) => any;
12
+ "column-config-change": (event: ColumnConfigurationChangeEvent) => any;
12
13
  }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
13
14
  "onToggle-group"?: ((enableGrouping: boolean) => any) | undefined;
14
15
  "onTable-overlay-change"?: ((selectedIds: string[]) => any) | undefined;
16
+ "onColumn-config-change"?: ((event: ColumnConfigurationChangeEvent) => any) | undefined;
15
17
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
16
18
  nestedMenuPopoverRef: ({
17
19
  $: ComponentInternalInstance;
@@ -111,6 +111,22 @@ export interface TableOverlayOption {
111
111
  export interface TableConfigOptions {
112
112
  /** Overlay options that appear as expandable checkboxes under "Table Overlay". */
113
113
  tableOverlayOptions?: TableOverlayOption[];
114
+ /**
115
+ * When true, shows a "Columns" item that lets users show/hide and reorder the columns
116
+ * that do not have a `context.visibilityState` on their column definitions.
117
+ */
118
+ enableColumnConfiguration?: boolean;
119
+ }
120
+ /** Payload emitted when the user changes column visibility/order via the "Columns" configuration panel. */
121
+ export interface ColumnConfigurationChangeEvent {
122
+ /** All grid column ids (visible and hidden) in display order. */
123
+ orderedColIds: string[];
124
+ /** Ids of the columns that are currently hidden. */
125
+ hiddenColIds: string[];
126
+ /** Display order before this change was applied. */
127
+ previousOrderedColIds: string[];
128
+ /** Hidden column ids before this change was applied. */
129
+ previousHiddenColIds: string[];
114
130
  }
115
131
  export interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
116
132
  /**
@@ -205,14 +221,6 @@ export interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
205
221
  * options panel.
206
222
  */
207
223
  crosslineOverlayGroups?: CrosslineOverlayGroup[];
208
- /**
209
- * Seeds which `crosslineOverlayGroups` are toggled on when the chart first renders, overriding
210
- * each group's own `visible` flag. Pass a consumer-persisted selection (e.g. from a saved
211
- * report) to restore it across navigation/reload; omit to fall back to `visible: true` groups.
212
- * Emits `active-overlay-group-ids-change` whenever the active selection changes (including
213
- * automatic activation of a newly-enabled group), so the consumer can persist it.
214
- */
215
- initialActiveOverlayGroupIds?: string[];
216
224
  }
217
225
  export interface ChartSeriesAggFuncSelectedEvent {
218
226
  aggFunc: string;
@@ -19,11 +19,6 @@ interface UseBenchmarkOverlaysOptions {
19
19
  }[] | undefined>;
20
20
  pvChartRef: Ref<InstanceType<typeof PvChart> | null>;
21
21
  formatValue: (value: number) => string | number;
22
- /**
23
- * Seeds the active set on first render, overriding each group's own `visible` flag. Use this to
24
- * restore a consumer-persisted toggle selection (e.g. from a saved report).
25
- */
26
- initialActiveOverlayGroupIds?: ComputedRef<string[] | undefined>;
27
22
  }
28
23
  export declare function useBenchmarkOverlays(options: UseBenchmarkOverlaysOptions): {
29
24
  activeCrosslineOverlayGroups: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
@@ -36,6 +36,8 @@ export interface ChartState {
36
36
  chartSort?: string | null;
37
37
  chartCategoryFields?: string[] | null;
38
38
  tableGrouped?: boolean | null;
39
+ orderedColIds?: string[] | null;
40
+ hiddenColIds?: string[] | null;
39
41
  }
40
42
  export interface ChartStateChangedEvent {
41
43
  api: GridApi | null;
@@ -113,7 +115,10 @@ export interface ColDefContextProps<T> extends Omit<PvFilterPanelColDefContext,
113
115
  */
114
116
  valueDecimals?: number;
115
117
  /**
116
- * Whether to force the column to always be visible or always be hidden, regardless of user selection
118
+ * Locks this column out of the "Columns" table-configuration panel: users cannot toggle its
119
+ * visibility or reorder it (it keeps its position). Columns without a visibilityState are
120
+ * user-configurable when the table enables column configuration. Pit Viper does not apply
121
+ * the visibility itself - consumers control that via the colDef's `hide` property.
117
122
  */
118
123
  visibilityState?: "alwaysShow" | "alwaysHide";
119
124
  }
@@ -12,7 +12,7 @@ export type { PvChartWidgetMiniChartMode, PvChartWidgetProps, PvChartWidgetSlotP
12
12
  export type { PvDataWidgetChartType, PvDataWidgetChartTypeOption, PvDataWidgetColumnDefinition, PvDataWidgetDataRow, PvDataWidgetProps, PvDataWidgetViewType, } from '../charts/PvDataWidget/types';
13
13
  export { DEFAULT_DATA_WIDGET_ERROR_TEXT, usePvDataWidgetData } from '../charts/PvDataWidget/usePvDataWidgetData';
14
14
  export type { PvDataWidgetDataHandler, UsePvDataWidgetDataOptions, UsePvDataWidgetDataReturn, } from '../charts/PvDataWidget/usePvDataWidgetData';
15
- export type { BenchmarkChip, ChipSection, CrosslineOverlayGroup, VerticalLineOverlay, } from '../charts/PvDataTableWithChart/types';
15
+ export type { BenchmarkChip, ChipSection, CrosslineOverlayGroup, TableConfigOptions, VerticalLineOverlay, } from '../charts/PvDataTableWithChart/types';
16
16
  export { constructAdvancedFilterCondition, convertFilterModelToAdvanced, filterModelContainsColId, mergeFilterModels, getSelectedValuesFromFilterModel, filterModelsEqual, mergeAdvancedFilterCondition, removeColumnFromAdvancedFilter, getSelectedValuesFromAdvancedFilterModel, isAdvancedFilterModel, isFilterModelEmpty, getSelectedValues, getSelectedValuesFromFilterModelByColId, updateSetFilter, updateMultiOrSetFilter, removeColumnFilter, excludeValueFromSetFilter, } from '../tables/PvDataTable/filters/filterHelpers';
17
17
  export type { AnyFilterModel } from '../tables/PvDataTable/filters/filterHelpers';
18
18
  export { RumContextKey, useRumContext, addRumAction, deferRumTask } from '../../functions/rum';