@turquoisehealth/pit-viper 2.70.0 → 2.71.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.
@@ -1,3 +1,4 @@
1
+ import { AdvancedFilterModel } from 'ag-grid-community/dist/types/src/interfaces/advancedFilterModel';
1
2
  import { AgChartInstance } from 'ag-charts-enterprise';
2
3
  import { AgChartOptions } from 'ag-charts-types';
3
4
  import { AgChartOptions as AgChartOptions_2 } from 'ag-charts-enterprise';
@@ -8,6 +9,8 @@ import { Column } from 'ag-grid-enterprise';
8
9
  import { ColumnMovedEvent } from 'ag-grid-enterprise';
9
10
  import { ColumnResizedEvent } from 'ag-grid-enterprise';
10
11
  import { ColumnRowGroupChangedEvent } from 'ag-grid-enterprise';
12
+ import { ColumnVO } from 'ag-grid-community/dist/types/src/interfaces/iColumnVO';
13
+ import { Component } from 'vue';
11
14
  import { ComponentOptionsMixin } from 'vue';
12
15
  import { ComponentProvideOptions } from 'vue';
13
16
  import { CreateComponentPublicInstanceWithMixins } from 'vue';
@@ -15,6 +18,7 @@ import { DefineComponent } from 'vue';
15
18
  import { ExtractPropTypes } from 'vue';
16
19
  import { FilterChangedEvent } from 'ag-grid-enterprise';
17
20
  import { FilterModel } from 'ag-grid-enterprise';
21
+ import { FilterModel as FilterModel_2 } from 'ag-grid-community/dist/types/src/interfaces/iFilter';
18
22
  import { FirstDataRenderedEvent } from 'ag-grid-community';
19
23
  import { GlobalComponents } from 'vue';
20
24
  import { GlobalDirectives } from 'vue';
@@ -49,6 +53,14 @@ declare type ChartFilterOption = {
49
53
  filterValues: string[];
50
54
  };
51
55
 
56
+ declare interface ChartStateChangedEvent {
57
+ api: GridApi | null;
58
+ seriesField?: string | null;
59
+ chartType?: string | null;
60
+ chartSort?: string | null;
61
+ chartCategoryFields?: string[] | null;
62
+ }
63
+
52
64
  declare interface FilterValueResponseOption {
53
65
  value: string;
54
66
  label?: string;
@@ -72,6 +84,26 @@ declare interface FocusUpdateEvent {
72
84
 
73
85
  declare type MapTopologyType = "state" | "city" | "county" | "cbsa" | "zip_code";
74
86
 
87
+ declare interface MenuOption {
88
+ id: string;
89
+ text: string;
90
+ subText?: string;
91
+ secondaryText?: string | number;
92
+ icon?: string;
93
+ companyName?: string;
94
+ avatar?: {
95
+ initials?: string;
96
+ image?: string;
97
+ icon?: boolean;
98
+ };
99
+ groupingLabel?: string;
100
+ disabled?: boolean;
101
+ renderer?: Component;
102
+ rendererProps?: any;
103
+ classList?: string[];
104
+ searchText?: string;
105
+ }
106
+
75
107
  export declare const PvChart: DefineComponent<PvChartProps, {
76
108
  getChartImageDataURL: (dimensions?: {
77
109
  width?: number;
@@ -82,10 +114,10 @@ height?: number;
82
114
  }, string, PublicProps, Readonly<PvChartProps> & Readonly<{
83
115
  "onSeries-visibility-change"?: ((event: AgSeriesVisibilityChange<unknown>) => any) | undefined;
84
116
  }>, {
117
+ seriesFormatType: "none" | "currency" | "percent";
85
118
  isLoading: boolean;
86
- minHeight: number;
87
119
  enableFocusView: boolean;
88
- seriesFormatType: "none" | "currency" | "percent";
120
+ minHeight: number;
89
121
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
90
122
  chartRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
91
123
  options: {
@@ -140,6 +172,10 @@ declare interface PvDataTableProps<T> {
140
172
  * Handler to fetch filter values for server-side filtering. Only used for server-side row model.
141
173
  */
142
174
  filterValuesSetHandler?: (params: FilterValuesSetHandlerParams<T>) => Promise<(FilterValueResponseOption | null)[]>;
175
+ /**
176
+ * Handler to return suggestions for applying search terms to the table.
177
+ */
178
+ tableSearchHandler?: (params: TableSearchHandlerParams<T>) => Promise<(QueryBuilderSuggestionMenuOption | null)[]>;
143
179
  /**
144
180
  * Specifies an initial set of filters/groups/sort/etc. to be applied to the table.
145
181
  */
@@ -180,6 +216,14 @@ declare interface PvDataTableProps<T> {
180
216
  * Display button to group by columns
181
217
  */
182
218
  enableGroupBySelector?: boolean;
219
+ /**
220
+ * Display input to search within the table
221
+ */
222
+ enableTableSearch?: boolean;
223
+ /**
224
+ * Allows for slot content to be placed above the chart
225
+ */
226
+ enableTopSlot?: boolean;
183
227
  /**
184
228
  * Display button to open the vertical filter drawer
185
229
  */
@@ -276,12 +320,13 @@ declare interface PvDataTableProps<T> {
276
320
  * List of column fields that can be focused
277
321
  */
278
322
  focusableColumns?: string[];
323
+ tableSearchPlaceholder?: string;
324
+ tableSearchStyle?: TableSearchStyle;
279
325
  }
280
326
 
281
327
  export declare const PvDataTableWithChart: <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<{
282
328
  props: __VLS_PrettifyLocal<any & PvDataTableWithChartProps<T> & Partial<{}>> & PublicProps;
283
329
  expose(exposed: ShallowUnwrapRef< {
284
- provideChartData: (data: AgChartOptions["data"], stackField: string) => void;
285
330
  getChartImageDataURL: (dimensions?: {
286
331
  width?: number;
287
332
  height?: number;
@@ -297,10 +342,7 @@ export declare const PvDataTableWithChart: <T>(__VLS_props: NonNullable<Awaited<
297
342
  attrs: any;
298
343
  slots: {};
299
344
  emit: {
300
- (e: "chart-series-changed", event: {
301
- api: GridApi | null;
302
- seriesField: string | null;
303
- }): void;
345
+ (e: "chart-state-changed", event: ChartStateChangedEvent): void;
304
346
  (e: "column-moved", event: ColumnMovedEvent<T>): void;
305
347
  (e: "column-resized", event: ColumnResizedEvent<T>): void;
306
348
  (e: "column-row-group-changed", event: ColumnRowGroupChangedEvent<T>): void;
@@ -319,16 +361,16 @@ export declare const PvDataTableWithChart: <T>(__VLS_props: NonNullable<Awaited<
319
361
 
320
362
  declare interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
321
363
  enabledChartTypes?: supportedChartType[];
322
- overrideChartData?: boolean;
364
+ serverSideChartHandler?: (params: ServerSideChartDataHandlerParams) => Promise<ServerSideChartDataHandlerResponse>;
323
365
  showSeriesLabels?: boolean;
324
366
  truncateLabelValues?: boolean;
325
367
  initialChartData?: AgChartOptions_2["data"];
326
- displayChartLoading?: boolean;
327
368
  enableCombinedChartConfigPanel?: boolean;
328
369
  chartConfigPanelOptions?: ChartConfigPanelType[];
329
370
  chartFilter?: ChartFilter;
330
371
  chartType?: supportedChartType;
331
372
  yKey?: string;
373
+ initialSort?: string;
332
374
  hideChart?: boolean;
333
375
  hideTable?: boolean;
334
376
  filterPanelAboveChart?: boolean;
@@ -339,6 +381,10 @@ declare interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
339
381
  };
340
382
  percentOfFocusViewYKey?: string;
341
383
  focusableColumns?: string[];
384
+ /**
385
+ * Enable toggle to group or ungroup
386
+ */
387
+ enableGroupingToggle?: boolean;
342
388
  }
343
389
 
344
390
  export declare const PvMapChart: DefineComponent< {
@@ -382,10 +428,46 @@ declare interface PvMapChartProps {
382
428
  tooltipRenderer?: (params: AgMapLineSeriesTooltipRendererParams<PvMapChartData>) => string | HTMLElement;
383
429
  }
384
430
 
431
+ declare interface QueryBuilderSuggestionMenuOption extends MenuOption {
432
+ queryTerm?: QueryTerm;
433
+ }
434
+
435
+ declare interface QueryTerm {
436
+ queryField?: string;
437
+ queryDisplayField?: string;
438
+ exactMatch?: boolean;
439
+ queryText?: string;
440
+ }
441
+
385
442
  declare interface RegionSelectionChangedEvent {
386
443
  region: string | null | undefined;
387
444
  }
388
445
 
446
+ declare interface ServerSideChartDataHandlerParams {
447
+ rowGroupCols: ColumnVO[];
448
+ /** Columns that have aggregations on them. */
449
+ valueCols: ColumnVO[];
450
+ /**
451
+ * If filtering, what the filter model is.
452
+ * If Advanced Filter is enabled, will be of type `AdvancedFilterModel | null`.
453
+ * If Advanced Filter is disabled, will be of type `FilterModel`.
454
+ */
455
+ filterModel: FilterModel_2 | AdvancedFilterModel | null;
456
+ }
457
+
458
+ declare interface ServerSideChartDataHandlerResponse {
459
+ data: AgChartOptions_2["data"];
460
+ stackField: string;
461
+ }
462
+
389
463
  declare type supportedChartType = "column" | "bar" | "column_stacked" | "bar_stacked" | "line" | "area" | "pie";
390
464
 
465
+ declare interface TableSearchHandlerParams<T> {
466
+ api: GridApi<T>;
467
+ filterModel?: FilterModel | null;
468
+ query?: string;
469
+ }
470
+
471
+ declare type TableSearchStyle = "query-builder" | "text";
472
+
391
473
  export { }