@turquoisehealth/pit-viper 2.246.1 → 2.248.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/_site/assets/css/pit-viper-a11y.css +7 -0
- package/_site/assets/css/pit-viper-consumer.css +7 -0
- package/_site/assets/css/pit-viper-v2-scoped.css +6 -0
- package/_site/assets/css/pit-viper-v2.css +7 -0
- package/_site/assets/css/pit-viper.css +7 -0
- package/package.json +1 -1
- package/pv-components/dist/stats/vue/base/stats.html +1 -1
- package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
- package/pv-components/dist/stats/web/pv-empty-state-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-toast-stats.html +1 -1
- package/pv-components/dist/vue/ai/components/base/PvToast/PvToast.vue.d.ts +1 -0
- package/pv-components/dist/vue/ai/components/base/PvToast/types.d.ts +1 -1
- package/pv-components/dist/vue/base/components/base/PvToast/PvToast.vue.d.ts +1 -0
- package/pv-components/dist/vue/base/components/base/PvToast/types.d.ts +1 -1
- package/pv-components/dist/vue/base/pv-components-base.mjs +849 -844
- package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
- package/pv-components/dist/vue/visualizations/components/base/PvToast/PvToast.vue.d.ts +1 -0
- package/pv-components/dist/vue/visualizations/components/base/PvToast/types.d.ts +1 -1
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/PvDataTable.vue.d.ts +4 -2
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/table-components/AutoGroupColDefRenderer.vue.d.ts +4 -0
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/table-components/PvPivotGroupHeader.vue.d.ts +19 -0
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/types.d.ts +65 -1
- package/pv-components/dist/vue/visualizations/components/visualizations/index.d.ts +1 -1
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +2963 -2770
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
- package/pv-components/dist/web/components/pv-empty-state/pv-empty-state.js +5 -2
- package/pv-components/dist/web/components/pv-toast/pv-toast.js +153 -151
- package/pv-components/dist/web/pv-components.iife.js +13 -13
- package/pv-components/dist/web/pv-components.iife.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export type PvToastVariants = "info" | "success" | "error" | "dark";
|
|
1
|
+
export type PvToastVariants = "info" | "success" | "error" | "warning" | "dark";
|
package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/PvDataTable.vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SortChangedEvent, SelectionChangedEvent, RowSelectedEvent, RowDataUpdatedEvent, CellValueChangedEvent, ColumnValueChangedEvent, UndoStartedEvent, UndoEndedEvent, RedoStartedEvent, RedoEndedEvent, RowClickedEvent, FirstDataRenderedEvent, GridReadyEvent } from 'ag-grid-community';
|
|
2
|
-
import { ColumnMovedEvent, ColumnResizedEvent, ColumnRowGroupChangedEvent, FilterChangedEvent } from 'ag-grid-enterprise';
|
|
2
|
+
import { ColumnMovedEvent, ColumnResizedEvent, ColumnRowGroupChangedEvent, FilterChangedEvent, PivotMaxColumnsExceededEvent } from 'ag-grid-enterprise';
|
|
3
3
|
import { FilterValueResponseOption, PvDataTableProps, PvDataTablePublicInterface, FocusUpdateEvent } from './types';
|
|
4
4
|
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
5
5
|
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
@@ -24,11 +24,12 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
24
24
|
readonly "onRedo-started"?: ((event: RedoStartedEvent<any, any>) => any) | undefined;
|
|
25
25
|
readonly "onRedo-ended"?: ((event: RedoEndedEvent<any, any>) => any) | undefined;
|
|
26
26
|
readonly "onRow-clicked"?: ((event: RowClickedEvent<T, any>) => any) | undefined;
|
|
27
|
+
readonly "onPivot-max-columns-exceeded"?: ((event: PivotMaxColumnsExceededEvent<T, any>) => any) | undefined;
|
|
27
28
|
readonly "onFilter-metadata-changed"?: ((payload: {
|
|
28
29
|
filterValueMap: Record<string, (FilterValueResponseOption | null)[]>;
|
|
29
30
|
filterValueSelectedMetadataMap: Record<string, (FilterValueResponseOption | null)[]>;
|
|
30
31
|
}) => any) | undefined;
|
|
31
|
-
} & 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" | "onSelection-changed" | "onRow-selected" | "onRow-data-updated" | "onCell-value-changed" | "onUndo-started" | "onUndo-ended" | "onRedo-started" | "onRedo-ended" | "onRow-clicked" | "onFilter-metadata-changed"> & PvDataTableProps<T> & Partial<{}>> & PublicProps;
|
|
32
|
+
} & 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" | "onSelection-changed" | "onRow-selected" | "onRow-data-updated" | "onCell-value-changed" | "onUndo-started" | "onUndo-ended" | "onRedo-started" | "onRedo-ended" | "onRow-clicked" | "onPivot-max-columns-exceeded" | "onFilter-metadata-changed"> & PvDataTableProps<T> & Partial<{}>> & PublicProps;
|
|
32
33
|
expose(exposed: ShallowUnwrapRef<PvDataTablePublicInterface>): void;
|
|
33
34
|
attrs: any;
|
|
34
35
|
slots: {
|
|
@@ -56,6 +57,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
56
57
|
(e: "redo-started", event: RedoStartedEvent): void;
|
|
57
58
|
(e: "redo-ended", event: RedoEndedEvent): void;
|
|
58
59
|
(e: "row-clicked", event: RowClickedEvent<T>): void;
|
|
60
|
+
(e: "pivot-max-columns-exceeded", event: PivotMaxColumnsExceededEvent<T>): void;
|
|
59
61
|
(e: "filter-metadata-changed", payload: {
|
|
60
62
|
filterValueMap: Record<string, (FilterValueResponseOption | null)[]>;
|
|
61
63
|
filterValueSelectedMetadataMap: Record<string, (FilterValueResponseOption | null)[]>;
|
|
@@ -2,6 +2,10 @@ import { GridApi } from 'ag-grid-community';
|
|
|
2
2
|
import { ICellRendererParams, RowNode } from 'ag-grid-enterprise';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
interface AutoGroupColDefRendererParams {
|
|
5
|
+
/** Pivot tables show row labels as plain text, without the grouped-row chrome. */
|
|
6
|
+
plainLabel?: boolean;
|
|
7
|
+
/** Bolds the plain label, e.g. the "Total" row of a pivot with no row groups. */
|
|
8
|
+
boldLabel?: boolean;
|
|
5
9
|
displayBaseAggregationsOnly: boolean;
|
|
6
10
|
displayCount: boolean;
|
|
7
11
|
displayRowNumber: boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IHeaderGroupParams } from 'ag-grid-enterprise';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
export interface PvPivotGroupHeaderParams {
|
|
4
|
+
/** Secondary line under the group label, e.g. "(Incumbent)". */
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
/** Hover text; defaults to the label. Useful when the label is shortened. */
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
/** Position of the group, left to right; picks the bar color from the chart palette. */
|
|
9
|
+
colorIndex?: number;
|
|
10
|
+
/** Overrides the palette color for the bar. */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** Shades the group header, e.g. for the incumbent. */
|
|
13
|
+
highlight?: boolean;
|
|
14
|
+
}
|
|
15
|
+
type __VLS_Props = {
|
|
16
|
+
params: IHeaderGroupParams & PvPivotGroupHeaderParams;
|
|
17
|
+
};
|
|
18
|
+
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
export default _default;
|
|
@@ -4,7 +4,7 @@ import { Component, ComputedRef, CSSProperties, Ref } from 'vue';
|
|
|
4
4
|
import { AdvancedFilterModel, CellSelectionOptions, FilterModel, GetContextMenuItemsParams, GridState, IServerSideGetRowsParams, ProcessCellForExportParams, ProcessDataFromClipboardParams, RowSelectionOptions, Theme, ValueFormatterFunc } from 'ag-grid-enterprise';
|
|
5
5
|
import { PvDataTableTheme } from '../themes';
|
|
6
6
|
import { PvDataTableFilterStore } from './useFilterStore';
|
|
7
|
-
import { ColDef, GridApi, IsFullWidthRowParams, IsGroupOpenByDefaultParams, IsServerSideGroupOpenByDefaultParams, RefreshServerSideParams } from 'ag-grid-community';
|
|
7
|
+
import { ColDef, ColumnVO, GridApi, IsFullWidthRowParams, IsGroupOpenByDefaultParams, IsServerSideGroupOpenByDefaultParams, RefreshServerSideParams } from 'ag-grid-community';
|
|
8
8
|
import { QueryBuilderSuggestionMenuOption } from '../../base/PvQueryBuilderInput/useQueryBuilder';
|
|
9
9
|
import { MenuOption, PvMultiSelectButtonSlotProps } from '../../base';
|
|
10
10
|
import { PvFilterPanelAggregateFieldHierarchy, PvFilterPanelColDefContext, PvFilterPanelOption, PvFilterPanelOptionsHandlerParams, PvFilterPanelOptionsHandlerReason, PvFilterPanelOptionsResponse } from '../../base/PvFilterPanel/types';
|
|
@@ -56,6 +56,12 @@ export interface TooltipDatum {
|
|
|
56
56
|
export type ChartTooltipRenderer = (params: AgCartesianSeriesTooltipRendererParams<TooltipDatum>) => string;
|
|
57
57
|
export type AggregateFieldHierarchy = PvFilterPanelAggregateFieldHierarchy;
|
|
58
58
|
export interface ColDefContextProps<T> extends Omit<PvFilterPanelColDefContext, "dataType" | "filterValueFormatter" | "valueDecimals"> {
|
|
59
|
+
/** PvDataTableWithChart only: always shown as a measure in each pivot group, next to the chart's y-axis. */
|
|
60
|
+
pivotValue?: boolean;
|
|
61
|
+
/** Pivot columns: the header for each of the column's values, e.g. a display name for an id. */
|
|
62
|
+
pivotGroupHeader?: (value: string) => PvPivotGroupHeaderConfig | undefined;
|
|
63
|
+
/** Measures: overrides for the measure's column in every pivot group, e.g. `headerName` or `valueFormatter`. */
|
|
64
|
+
pivotColDef?: Partial<ColDef<T>>;
|
|
59
65
|
/**
|
|
60
66
|
* Display name for the aggregation function (e.g. "Sum", "Average", etc.) to show in the UI, if different from the aggFunc name
|
|
61
67
|
*/
|
|
@@ -166,6 +172,44 @@ export interface FilterValueResponseOption extends Omit<PvFilterPanelOption, "ch
|
|
|
166
172
|
/** Nested child options for hierarchical/cascade filtering */
|
|
167
173
|
children?: FilterValueResponseOption[];
|
|
168
174
|
}
|
|
175
|
+
/** A pivot header group's label and styling, from the pivot column's `context.pivotGroupHeader`. */
|
|
176
|
+
export interface PvPivotGroupHeaderConfig {
|
|
177
|
+
headerName?: string;
|
|
178
|
+
/** Second line, e.g. "(Incumbent)". */
|
|
179
|
+
subtitle?: string;
|
|
180
|
+
/** Hover text, e.g. the full name when the label is shortened. */
|
|
181
|
+
tooltip?: string;
|
|
182
|
+
/** Shades the header. */
|
|
183
|
+
highlight?: boolean;
|
|
184
|
+
/** Overrides the palette color for the group's tab. */
|
|
185
|
+
color?: string;
|
|
186
|
+
}
|
|
187
|
+
/** The pivot layout PvDataTable resolves from the colDefs' `rowGroup`, `pivot`, and `aggFunc`. */
|
|
188
|
+
export interface PvDataTablePivot {
|
|
189
|
+
/** Fields shown down the side, one row per value (e.g. service line). May be empty for a single totals row. */
|
|
190
|
+
rowGroupCols: string[];
|
|
191
|
+
/** Fields whose values become header groups across the top (e.g. payer network). */
|
|
192
|
+
pivotCols: string[];
|
|
193
|
+
/** Measures shown inside each header group (e.g. total cost, rate score). */
|
|
194
|
+
valueCols: string[];
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Request for the flat rows behind a pivot: one row per combination of the row group and pivot columns, each
|
|
198
|
+
* with its measures already aggregated by the server. Same shape as the chart's data request.
|
|
199
|
+
*/
|
|
200
|
+
export interface ServerSidePivotHandlerParams {
|
|
201
|
+
/** Row group columns followed by pivot columns. `id` is the column id and `field` the row field to return. */
|
|
202
|
+
rowGroupCols: ColumnVO[];
|
|
203
|
+
/** Measures, with the aggregation the server should apply. */
|
|
204
|
+
valueCols: ColumnVO[];
|
|
205
|
+
filterModel: FilterModel | AdvancedFilterModel | null;
|
|
206
|
+
/** Maximum number of rows to return. */
|
|
207
|
+
endRow: number;
|
|
208
|
+
}
|
|
209
|
+
export interface ServerSidePivotHandlerResponse<T> {
|
|
210
|
+
/** Aggregated rows: only the row group, pivot, and measure fields, not full rows. */
|
|
211
|
+
data: Partial<T>[];
|
|
212
|
+
}
|
|
169
213
|
export interface PvDataTableProps<T> {
|
|
170
214
|
/**
|
|
171
215
|
* Boolean flag denoting whether all fields are focusable, meaning their filter options can be selected as focus in
|
|
@@ -188,6 +232,26 @@ export interface PvDataTableProps<T> {
|
|
|
188
232
|
* Handler to fetch server-side data. Only used for server-side row model.
|
|
189
233
|
*/
|
|
190
234
|
serverSideRowHandler?: (params: IServerSideGetRowsParams<T>, isCsvExport?: boolean) => void;
|
|
235
|
+
/**
|
|
236
|
+
* Shows the table as a pivot, laid out by the colDefs' own AG Grid props: `rowGroup` columns down the side (by
|
|
237
|
+
* `rowGroupIndex`), `pivot` columns across the top (by `pivotIndex`), and the columns with an `aggFunc` as the
|
|
238
|
+
* measures in each group (`enableValue: false` leaves one out). The grid uses the client-side row model: rows come
|
|
239
|
+
* pre-aggregated from `serverSidePivotHandler`, or raw from `rowData` and aggregated in the browser. Fixed at
|
|
240
|
+
* mount; changing the layout requires a remount.
|
|
241
|
+
*/
|
|
242
|
+
pivot?: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Fetches the flat rows for `pivot`. Called on mount and whenever the filters change. The filters are applied by
|
|
245
|
+
* the handler only; the grid doesn't re-apply them to the returned rows.
|
|
246
|
+
* If it rejects, the error is logged and the table shows no rows.
|
|
247
|
+
*/
|
|
248
|
+
serverSidePivotHandler?: (params: ServerSidePivotHandlerParams) => Promise<ServerSidePivotHandlerResponse<T>>;
|
|
249
|
+
/** Maximum rows requested from `serverSidePivotHandler`. Defaults to 200. */
|
|
250
|
+
pivotRowLimit?: number;
|
|
251
|
+
/** Maximum generated pivot columns before the grid stops and emits `pivot-max-columns-exceeded`. Defaults to 50. */
|
|
252
|
+
pivotMaxGeneratedColumns?: number;
|
|
253
|
+
/** Row label when there are no `rowGroup` columns, so the single row still has a label. Defaults to "Total". */
|
|
254
|
+
pivotTotalLabel?: string;
|
|
191
255
|
/**
|
|
192
256
|
* Handler to fetch filter values for server-side filtering. Only used for server-side row model.
|
|
193
257
|
*/
|
|
@@ -8,7 +8,7 @@ export { preloadAgCharts } from '../../functions/loadAgCharts';
|
|
|
8
8
|
export { default as PvDataTable } from '../tables/PvDataTable/PvDataTable.vue';
|
|
9
9
|
export { createPvDataTableFilterStore, providePvDataTableFilterStore, usePvDataTableFilterStore, } from '../tables/PvDataTable/useFilterStore';
|
|
10
10
|
export type { PvDataTableFilterController, PvDataTableFilterModel, PvDataTableFilterStore, } from '../tables/PvDataTable/useFilterStore';
|
|
11
|
-
export type { FocusUpdateEvent, FilterValueResponseOption, FilterRendererProps } from '../tables/PvDataTable/types';
|
|
11
|
+
export type { FocusUpdateEvent, FilterValueResponseOption, FilterRendererProps, PvPivotGroupHeaderConfig, ServerSidePivotHandlerParams, ServerSidePivotHandlerResponse, } from '../tables/PvDataTable/types';
|
|
12
12
|
export type { PvChartWidgetMiniChartMode, PvChartWidgetProps, PvChartWidgetSlotProps, } from '../charts/PvChartWidget/types';
|
|
13
13
|
export type { PvDataWidgetChartType, PvDataWidgetChartTypeOption, PvDataWidgetColumnDefinition, PvDataWidgetDataRow, PvDataWidgetProps, PvDataWidgetViewType, } from '../charts/PvDataWidget/types';
|
|
14
14
|
export { DEFAULT_DATA_WIDGET_ERROR_TEXT, usePvDataWidgetData } from '../charts/PvDataWidget/usePvDataWidgetData';
|