@turquoisehealth/pit-viper 2.66.1-dev.1 → 2.66.1-dev.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turquoisehealth/pit-viper",
3
- "version": "2.66.1-dev.1",
3
+ "version": "2.66.1-dev.3",
4
4
  "description": "Turquoise Health's design system.",
5
5
  "main": "README.md",
6
6
  "publishConfig": {
@@ -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,7 @@ 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';
11
13
  import { Component } from 'vue';
12
14
  import { ComponentOptionsMixin } from 'vue';
13
15
  import { ComponentProvideOptions } from 'vue';
@@ -16,6 +18,7 @@ import { DefineComponent } from 'vue';
16
18
  import { ExtractPropTypes } from 'vue';
17
19
  import { FilterChangedEvent } from 'ag-grid-enterprise';
18
20
  import { FilterModel } from 'ag-grid-enterprise';
21
+ import { FilterModel as FilterModel_2 } from 'ag-grid-community/dist/types/src/interfaces/iFilter';
19
22
  import { FirstDataRenderedEvent } from 'ag-grid-community';
20
23
  import { GlobalComponents } from 'vue';
21
24
  import { GlobalDirectives } from 'vue';
@@ -50,6 +53,14 @@ declare type ChartFilterOption = {
50
53
  filterValues: string[];
51
54
  };
52
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
+
53
64
  declare interface FilterValueResponseOption {
54
65
  value: string;
55
66
  label?: string;
@@ -209,6 +220,10 @@ declare interface PvDataTableProps<T> {
209
220
  * Display input to search within the table
210
221
  */
211
222
  enableTableSearch?: boolean;
223
+ /**
224
+ * Allows for slot content to be placed above the chart
225
+ */
226
+ enableTopSlot?: boolean;
212
227
  /**
213
228
  * Display button to open the vertical filter drawer
214
229
  */
@@ -312,7 +327,6 @@ declare interface PvDataTableProps<T> {
312
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<{
313
328
  props: __VLS_PrettifyLocal<any & PvDataTableWithChartProps<T> & Partial<{}>> & PublicProps;
314
329
  expose(exposed: ShallowUnwrapRef< {
315
- provideChartData: (data: AgChartOptions["data"], stackField: string) => void;
316
330
  getChartImageDataURL: (dimensions?: {
317
331
  width?: number;
318
332
  height?: number;
@@ -328,10 +342,7 @@ export declare const PvDataTableWithChart: <T>(__VLS_props: NonNullable<Awaited<
328
342
  attrs: any;
329
343
  slots: {};
330
344
  emit: {
331
- (e: "chart-series-changed", event: {
332
- api: GridApi | null;
333
- seriesField: string | null;
334
- }): void;
345
+ (e: "chart-state-changed", event: ChartStateChangedEvent): void;
335
346
  (e: "column-moved", event: ColumnMovedEvent<T>): void;
336
347
  (e: "column-resized", event: ColumnResizedEvent<T>): void;
337
348
  (e: "column-row-group-changed", event: ColumnRowGroupChangedEvent<T>): void;
@@ -350,16 +361,16 @@ export declare const PvDataTableWithChart: <T>(__VLS_props: NonNullable<Awaited<
350
361
 
351
362
  declare interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
352
363
  enabledChartTypes?: supportedChartType[];
353
- overrideChartData?: boolean;
364
+ serverSideChartHandler?: (params: ServerSideChartDataHandlerParams) => Promise<ServerSideChartDataHandlerResponse>;
354
365
  showSeriesLabels?: boolean;
355
366
  truncateLabelValues?: boolean;
356
367
  initialChartData?: AgChartOptions_2["data"];
357
- displayChartLoading?: boolean;
358
368
  enableCombinedChartConfigPanel?: boolean;
359
369
  chartConfigPanelOptions?: ChartConfigPanelType[];
360
370
  chartFilter?: ChartFilter;
361
371
  chartType?: supportedChartType;
362
372
  yKey?: string;
373
+ initialSort?: string;
363
374
  hideChart?: boolean;
364
375
  hideTable?: boolean;
365
376
  filterPanelAboveChart?: boolean;
@@ -370,6 +381,10 @@ declare interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
370
381
  };
371
382
  percentOfFocusViewYKey?: string;
372
383
  focusableColumns?: string[];
384
+ /**
385
+ * Enable toggle to group or ungroup
386
+ */
387
+ enableGroupingToggle?: boolean;
373
388
  }
374
389
 
375
390
  export declare const PvMapChart: DefineComponent< {
@@ -428,6 +443,23 @@ declare interface RegionSelectionChangedEvent {
428
443
  region: string | null | undefined;
429
444
  }
430
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
+
431
463
  declare type supportedChartType = "column" | "bar" | "column_stacked" | "bar_stacked" | "line" | "area" | "pie";
432
464
 
433
465
  declare interface TableSearchHandlerParams<T> {