@turquoisehealth/pit-viper 2.197.3-dev.2 → 2.198.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 +2 -0
- package/_site/assets/css/pit-viper-consumer.css +2 -0
- package/_site/assets/css/pit-viper-v2-scoped.css +2 -0
- package/_site/assets/css/pit-viper-v2.css +2 -0
- package/_site/assets/css/pit-viper.css +2 -0
- package/package.json +1 -1
- package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
- package/pv-components/dist/vue/visualizations/components/base/PvDrawer/PvDrawer.vue.d.ts +1 -1
- package/pv-components/dist/vue/visualizations/components/base/PvDropdown/PvDropdown.vue.d.ts +5 -5
- package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/PvFilterPanel.vue.d.ts +2 -2
- package/pv-components/dist/vue/visualizations/components/base/PvInsightCard/PvInsightCard.vue.d.ts +1 -1
- package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +7 -7
- package/pv-components/dist/vue/visualizations/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +2 -2
- package/pv-components/dist/vue/visualizations/components/base/PvRange/PvRange.vue.d.ts +2 -2
- package/pv-components/dist/vue/visualizations/components/base/PvSelectButton/PvSelectButton.vue.d.ts +3 -3
- package/pv-components/dist/vue/visualizations/components/charts/PvChartWidget/PvChartWidget.vue.d.ts +180 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvChartWidget/constants.d.ts +4 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvChartWidget/types.d.ts +31 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/PvDataWidget.vue.d.ts +43 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/PvDataWidgetTable.vue.d.ts +4 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/constants.d.ts +9 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/helpers.d.ts +63 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/types.d.ts +130 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/usePvDataWidgetData.d.ts +40 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvMapChart/PvMapChart.vue.d.ts +3 -8
- package/pv-components/dist/vue/visualizations/components/charts/widgetOptions.d.ts +58 -0
- package/pv-components/dist/vue/visualizations/components/visualizations/index.d.ts +6 -0
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +11524 -10745
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ComputedRef, Ref, WatchSource } from 'vue';
|
|
2
|
+
import { PvDataWidgetDataRow, PvDataWidgetProps } from './types';
|
|
3
|
+
/** Overlay text shown when a data handler fails and no `errorText` option is provided. */
|
|
4
|
+
export declare const DEFAULT_DATA_WIDGET_ERROR_TEXT = "Unable to load data";
|
|
5
|
+
/** Fetches the data rows for a PvDataWidget, e.g. from an API. */
|
|
6
|
+
export type PvDataWidgetDataHandler = () => PvDataWidgetDataRow[] | Promise<PvDataWidgetDataRow[]>;
|
|
7
|
+
export interface UsePvDataWidgetDataOptions {
|
|
8
|
+
/** Overlay text shown on the widget when the handler fails. */
|
|
9
|
+
errorText?: string;
|
|
10
|
+
/** When false, data is not fetched until `refresh` is called. Defaults to true. */
|
|
11
|
+
immediate?: boolean;
|
|
12
|
+
/** Reactive sources (e.g. filter state) that trigger a refetch when changed. */
|
|
13
|
+
watch?: WatchSource | WatchSource[];
|
|
14
|
+
}
|
|
15
|
+
export interface UsePvDataWidgetDataReturn {
|
|
16
|
+
/** Rows returned by the most recent successful handler call. */
|
|
17
|
+
chartData: Ref<PvDataWidgetDataRow[]>;
|
|
18
|
+
/** True while a handler call is pending. */
|
|
19
|
+
chartLoading: Ref<boolean>;
|
|
20
|
+
/** Error from the most recent handler call, cleared on the next successful call. */
|
|
21
|
+
error: Ref<Error | undefined>;
|
|
22
|
+
/** Re-invokes the handler. Resolves when the call settles. */
|
|
23
|
+
refresh: () => Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Spreadable PvDataWidget props: `chartData`, `chartLoading`, and — only while in an
|
|
26
|
+
* error state — `noDataOverlayText`. Place `v-bind="widgetProps"` after your own
|
|
27
|
+
* bindings: your `noDataOverlayText` then applies to genuinely empty data, while the
|
|
28
|
+
* error text takes precedence when a fetch fails.
|
|
29
|
+
*/
|
|
30
|
+
widgetProps: ComputedRef<Pick<PvDataWidgetProps, "chartData" | "chartLoading" | "noDataOverlayText">>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Manages the fetch lifecycle for a PvDataWidget whose rows come from an async
|
|
34
|
+
* source: loading state, error-to-overlay mapping, stale-response protection,
|
|
35
|
+
* and refetching on demand or when watched sources change.
|
|
36
|
+
*
|
|
37
|
+
* Entirely optional — PvDataWidget itself stays a pure presentational component
|
|
38
|
+
* and can be fed `chartData` directly.
|
|
39
|
+
*/
|
|
40
|
+
export declare const usePvDataWidgetData: (handler: PvDataWidgetDataHandler, options?: UsePvDataWidgetDataOptions) => UsePvDataWidgetDataReturn;
|
package/pv-components/dist/vue/visualizations/components/charts/PvMapChart/PvMapChart.vue.d.ts
CHANGED
|
@@ -12,15 +12,9 @@ export interface PvMapChartProps {
|
|
|
12
12
|
seriesKey: string;
|
|
13
13
|
/** The geographic granularity of the map. Currently only `"state"` is fully supported. */
|
|
14
14
|
mapType?: MapTopologyType;
|
|
15
|
-
/**
|
|
16
|
-
* Reserved for future use. Currently has no effect on rendering; the color gradient legend
|
|
17
|
-
* below the map is always rendered.
|
|
18
|
-
*/
|
|
15
|
+
/** When true, renders the color gradient legend above the map. */
|
|
19
16
|
displayGradientLegend?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Reserved for future use. Currently has no effect on rendering; the region selector dropdown
|
|
22
|
-
* is always rendered.
|
|
23
|
-
*/
|
|
17
|
+
/** When true, renders the region selector dropdown above the map. */
|
|
24
18
|
displayRegionSelector?: boolean;
|
|
25
19
|
/** Minimum value for the gradient legend scale. */
|
|
26
20
|
gradientLegendMin?: number;
|
|
@@ -54,6 +48,7 @@ declare const _default: DefineComponent<{
|
|
|
54
48
|
isLoading: boolean;
|
|
55
49
|
mapType: MapTopologyType;
|
|
56
50
|
displayGradientLegend: boolean;
|
|
51
|
+
displayRegionSelector: boolean;
|
|
57
52
|
gradientLegendMin: number;
|
|
58
53
|
gradientLegendMax: number;
|
|
59
54
|
seriesValueFormatter: (value: number) => string;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AgChartOptions } from 'ag-charts-types';
|
|
2
|
+
type ChartRecord = Record<string, unknown>;
|
|
3
|
+
/** Pixels of horizontal width allotted per data point when a chart scrolls horizontally. */
|
|
4
|
+
export declare const CHART_SCROLL_ITEM_WIDTH_PX = 56;
|
|
5
|
+
/** Pixels of vertical height allotted per data point when a horizontal-bar chart scrolls. */
|
|
6
|
+
export declare const CHART_SCROLL_ITEM_HEIGHT_PX = 32;
|
|
7
|
+
/** Coerce a numeric (pixel) or string CSS size into a CSS length, or `undefined` when unset. */
|
|
8
|
+
export declare const getCssSize: (value: number | string | undefined) => string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Build the explicit `height`/`width` (and matching `max-*`) style for a widget shell.
|
|
11
|
+
* An explicit dimension also caps its `max-*` so the widget never grows past it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const buildWidgetStyle: (dimensions: {
|
|
14
|
+
height?: number | string;
|
|
15
|
+
maxHeight?: number | string;
|
|
16
|
+
maxWidth?: number | string;
|
|
17
|
+
width?: number | string;
|
|
18
|
+
}) => Record<string, string>;
|
|
19
|
+
/** Whether any explicit dimension bounds the widget shell (switching it to constrained flex layout). */
|
|
20
|
+
export declare const getIsWidgetConstrained: (dimensions: {
|
|
21
|
+
height?: number | string;
|
|
22
|
+
maxHeight?: number | string;
|
|
23
|
+
maxWidth?: number | string;
|
|
24
|
+
width?: number | string;
|
|
25
|
+
}) => boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Minimum chart height for a widget: when a horizontal-bar chart scrolls vertically,
|
|
28
|
+
* grow past the base height so every data point keeps its allotted row height.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getScrollableChartMinHeight: (params: {
|
|
31
|
+
baseMinHeight: number;
|
|
32
|
+
dataCount: number;
|
|
33
|
+
enableChartScrolling: boolean;
|
|
34
|
+
isHorizontalScrollingChart: boolean;
|
|
35
|
+
}) => number;
|
|
36
|
+
/**
|
|
37
|
+
* Inline style for the scrollable chart content: horizontal-bar charts grow vertically
|
|
38
|
+
* per data point; all other charts grow horizontally, never below `minContentWidth`.
|
|
39
|
+
*/
|
|
40
|
+
export declare const getChartScrollContentStyle: (params: {
|
|
41
|
+
chartMinHeight: number;
|
|
42
|
+
dataCount: number;
|
|
43
|
+
enableChartScrolling: boolean;
|
|
44
|
+
isHorizontalScrollingChart: boolean;
|
|
45
|
+
minContentWidth: number;
|
|
46
|
+
}) => Record<string, string> | undefined;
|
|
47
|
+
/** Coerce to a plain object record, or `undefined` when the value is not one. */
|
|
48
|
+
export declare const asObjectRecord: (value: unknown) => ChartRecord | undefined;
|
|
49
|
+
export declare const limitDataRows: <T>(data: T[], dataLimit: number | undefined) => T[];
|
|
50
|
+
export declare const getChartDataLength: (options: AgChartOptions) => number;
|
|
51
|
+
export declare const getIsHorizontalBarChart: (options: AgChartOptions) => boolean;
|
|
52
|
+
export declare const applyChartWidgetOptions: (options: AgChartOptions, config: {
|
|
53
|
+
dataLimit?: number;
|
|
54
|
+
hideAxisTitles?: boolean;
|
|
55
|
+
hideValueAxis?: boolean;
|
|
56
|
+
showAxes?: boolean;
|
|
57
|
+
}) => AgChartOptions;
|
|
58
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { default as PvChart } from '../charts/PvChart/PvChart.vue';
|
|
2
|
+
export { default as PvChartWidget } from '../charts/PvChartWidget/PvChartWidget.vue';
|
|
3
|
+
export { default as PvDataWidget } from '../charts/PvDataWidget/PvDataWidget.vue';
|
|
2
4
|
export { default as PvDataTableWithChart } from '../charts/PvDataTableWithChart/PvDataTableWithChart.vue';
|
|
3
5
|
export { default as PvMapChart } from '../charts/PvMapChart/PvMapChart.vue';
|
|
4
6
|
export { SCATTER_MARKER_STROKE, PitViperAGChartsMonochromeTheme, PitViperAGChartsMonochromeThemeName, PitViperAGChartsMulticolorTheme, PitViperAGChartsMulticolorThemeName, } from '../charts/themes';
|
|
@@ -6,6 +8,10 @@ export { default as PvDataTable } from '../tables/PvDataTable/PvDataTable.vue';
|
|
|
6
8
|
export { createPvDataTableFilterStore, providePvDataTableFilterStore, usePvDataTableFilterStore, } from '../tables/PvDataTable/useFilterStore';
|
|
7
9
|
export type { PvDataTableFilterController, PvDataTableFilterModel, PvDataTableFilterStore, } from '../tables/PvDataTable/useFilterStore';
|
|
8
10
|
export type { FocusUpdateEvent, FilterValueResponseOption, FilterRendererProps } from '../tables/PvDataTable/types';
|
|
11
|
+
export type { PvChartWidgetMiniChartMode, PvChartWidgetProps, PvChartWidgetSlotProps, } from '../charts/PvChartWidget/types';
|
|
12
|
+
export type { PvDataWidgetChartType, PvDataWidgetChartTypeOption, PvDataWidgetColumnDefinition, PvDataWidgetDataRow, PvDataWidgetProps, PvDataWidgetViewType, } from '../charts/PvDataWidget/types';
|
|
13
|
+
export { DEFAULT_DATA_WIDGET_ERROR_TEXT, usePvDataWidgetData } from '../charts/PvDataWidget/usePvDataWidgetData';
|
|
14
|
+
export type { PvDataWidgetDataHandler, UsePvDataWidgetDataOptions, UsePvDataWidgetDataReturn, } from '../charts/PvDataWidget/usePvDataWidgetData';
|
|
9
15
|
export type { CrosslineOverlayGroup, VerticalLineOverlay } from '../charts/PvDataTableWithChart/types';
|
|
10
16
|
export { constructAdvancedFilterCondition, convertFilterModelToAdvanced, filterModelContainsColId, mergeFilterModels, getSelectedValuesFromFilterModel, filterModelsEqual, mergeAdvancedFilterCondition, removeColumnFromAdvancedFilter, getSelectedValuesFromAdvancedFilterModel, isAdvancedFilterModel, isFilterModelEmpty, getSelectedValues, getSelectedValuesFromFilterModelByColId, updateSetFilter, updateMultiOrSetFilter, removeColumnFilter, excludeValueFromSetFilter, } from '../tables/PvDataTable/filters/filterHelpers';
|
|
11
17
|
export type { AnyFilterModel } from '../tables/PvDataTable/filters/filterHelpers';
|