@turquoisehealth/pit-viper 2.197.3-dev.2 → 2.199.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.
Files changed (80) hide show
  1. package/_site/assets/css/pit-viper-a11y.css +2 -0
  2. package/_site/assets/css/pit-viper-consumer.css +2 -0
  3. package/_site/assets/css/pit-viper-v2-scoped.css +2 -0
  4. package/_site/assets/css/pit-viper-v2.css +2 -0
  5. package/_site/assets/css/pit-viper.css +2 -0
  6. package/package.json +3 -3
  7. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  8. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  9. package/pv-components/dist/stats/web/pv-filter-modal-stats.html +4950 -0
  10. package/pv-components/dist/stats/web/pv-filter-panel-stats.html +1 -1
  11. package/pv-components/dist/stats/web/pv-input-stats.html +1 -1
  12. package/pv-components/dist/stats/web/pv-menu-stats.html +1 -1
  13. package/pv-components/dist/stats/web/pv-modal-stats.html +1 -1
  14. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
  15. package/pv-components/dist/stats/web/pv-query-builder-input-stats.html +1 -1
  16. package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
  17. package/pv-components/dist/vue/base/components/base/PvFilterModal/PvFilterModal.vue.d.ts +77 -0
  18. package/pv-components/dist/vue/base/components/base/PvFilterModal/PvFilterModalSelectItem.vue.d.ts +33 -0
  19. package/pv-components/dist/vue/base/components/base/PvFilterModal/types.d.ts +11 -0
  20. package/pv-components/dist/vue/base/components/base/PvFilterPanel/PvFilterPanel.vue.d.ts +14 -14
  21. package/pv-components/dist/vue/base/components/base/PvFilterPanel/PvFilterPanelAccordion.vue.d.ts +2 -2
  22. package/pv-components/dist/vue/base/components/base/PvFilterPanel/PvFilterPanelOptionRow.vue.d.ts +2 -2
  23. package/pv-components/dist/vue/base/components/base/PvFilterPanel/types.d.ts +35 -0
  24. package/pv-components/dist/vue/base/components/base/PvFilterPanel/usePvFilterPanel.d.ts +30 -0
  25. package/pv-components/dist/vue/base/components/base/PvInput/PvInput.vue.d.ts +6 -0
  26. package/pv-components/dist/vue/base/components/base/PvModal/PvModal.vue.d.ts +1 -0
  27. package/pv-components/dist/vue/base/components/base/index.d.ts +2 -0
  28. package/pv-components/dist/vue/base/pv-components-base.mjs +3137 -2714
  29. package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
  30. package/pv-components/dist/vue/visualizations/components/base/PvDrawer/PvDrawer.vue.d.ts +1 -1
  31. package/pv-components/dist/vue/visualizations/components/base/PvDropdown/PvDropdown.vue.d.ts +5 -5
  32. package/pv-components/dist/vue/visualizations/components/base/PvFilterModal/PvFilterModal.vue.d.ts +77 -0
  33. package/pv-components/dist/vue/visualizations/components/base/PvFilterModal/PvFilterModalSelectItem.vue.d.ts +33 -0
  34. package/pv-components/dist/vue/visualizations/components/base/PvFilterModal/types.d.ts +11 -0
  35. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/PvFilterPanel.vue.d.ts +14 -14
  36. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/PvFilterPanelAccordion.vue.d.ts +2 -2
  37. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/PvFilterPanelOptionRow.vue.d.ts +1 -1
  38. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/types.d.ts +35 -0
  39. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/usePvFilterPanel.d.ts +30 -0
  40. package/pv-components/dist/vue/visualizations/components/base/PvInput/PvInput.vue.d.ts +6 -0
  41. package/pv-components/dist/vue/visualizations/components/base/PvInsightCard/PvInsightCard.vue.d.ts +1 -1
  42. package/pv-components/dist/vue/visualizations/components/base/PvModal/PvModal.vue.d.ts +1 -0
  43. package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +7 -7
  44. package/pv-components/dist/vue/visualizations/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +2 -2
  45. package/pv-components/dist/vue/visualizations/components/base/PvRange/PvRange.vue.d.ts +2 -2
  46. package/pv-components/dist/vue/visualizations/components/base/PvSelectButton/PvSelectButton.vue.d.ts +3 -3
  47. package/pv-components/dist/vue/visualizations/components/base/index.d.ts +2 -0
  48. package/pv-components/dist/vue/visualizations/components/charts/PvChartWidget/PvChartWidget.vue.d.ts +180 -0
  49. package/pv-components/dist/vue/visualizations/components/charts/PvChartWidget/constants.d.ts +4 -0
  50. package/pv-components/dist/vue/visualizations/components/charts/PvChartWidget/types.d.ts +31 -0
  51. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/table-chart-components/PvChartOptionsPanel.vue.d.ts +2 -0
  52. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/types.d.ts +2 -0
  53. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/PvDataWidget.vue.d.ts +43 -0
  54. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/PvDataWidgetTable.vue.d.ts +4 -0
  55. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/constants.d.ts +9 -0
  56. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/helpers.d.ts +63 -0
  57. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/types.d.ts +130 -0
  58. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/usePvDataWidgetData.d.ts +40 -0
  59. package/pv-components/dist/vue/visualizations/components/charts/PvMapChart/PvMapChart.vue.d.ts +3 -8
  60. package/pv-components/dist/vue/visualizations/components/charts/widgetOptions.d.ts +58 -0
  61. package/pv-components/dist/vue/visualizations/components/visualizations/index.d.ts +6 -0
  62. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +11534 -10746
  63. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
  64. package/pv-components/dist/web/components/pv-filter-modal/pv-filter-modal.js +9603 -0
  65. package/pv-components/dist/web/components/pv-filter-panel/pv-filter-panel.js +2425 -2391
  66. package/pv-components/dist/web/components/pv-input/pv-input.js +517 -470
  67. package/pv-components/dist/web/components/pv-menu/pv-menu.js +360 -357
  68. package/pv-components/dist/web/components/pv-modal/pv-modal.js +4 -2
  69. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +438 -435
  70. package/pv-components/dist/web/components/pv-query-builder-input/pv-query-builder-input.js +431 -428
  71. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +732 -729
  72. package/pv-components/dist/web/pv-components.iife.js +19 -19
  73. package/pv-components/dist/web/pv-components.iife.js.map +1 -1
  74. package/claude-plugin/.claude-plugin/plugin.json +0 -11
  75. package/claude-plugin/.mcp.json +0 -8
  76. package/claude-plugin/CLAUDE.md +0 -107
  77. package/claude-plugin/README.md +0 -173
  78. package/claude-plugin/skills/pit-viper/SKILL.md +0 -182
  79. package/claude-plugin/skills/pit-viper/assets/pv-html-starter.html +0 -77
  80. package/claude-plugin/skills/pit-viper/examples/pv-html-example.html +0 -229
@@ -0,0 +1,180 @@
1
+ import { AgSeriesVisibilityChange } from 'ag-charts-enterprise';
2
+ import { PvChartWidgetProps, PvChartWidgetMiniChartMode } from './types';
3
+ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ExtractPropTypes, PropType, ComponentProvideOptions, DefineComponent, ComputedRef } from 'vue';
4
+ import { PvChartProps } from '../PvChart/types';
5
+ import { AgChartOptions, AgChartInstance } from 'ag-charts-types';
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ header?(_: {
10
+ isMiniChart: false;
11
+ effectiveContainerWidth: number;
12
+ }): any;
13
+ footer?(_: {
14
+ isMiniChart: boolean;
15
+ effectiveContainerWidth: number;
16
+ }): any;
17
+ };
18
+ refs: {
19
+ widgetRef: HTMLDivElement;
20
+ chartAreaRef: HTMLDivElement;
21
+ pvChartRef: CreateComponentPublicInstanceWithMixins<Readonly< PvChartProps> & Readonly<{
22
+ "onSeries-visibility-change"?: ((event: AgSeriesVisibilityChange<unknown>) => any) | undefined;
23
+ }>, {
24
+ getChartImageDataURL: (dimensions?: {
25
+ width?: number;
26
+ height?: number;
27
+ }) => Promise<string> | undefined;
28
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
29
+ "series-visibility-change": (event: AgSeriesVisibilityChange<unknown>) => any;
30
+ }, PublicProps, {
31
+ seriesFormatType: "none" | "currency" | "percent";
32
+ isLoading: boolean;
33
+ enableFocusView: boolean;
34
+ minHeight: number;
35
+ translateNullValues: boolean;
36
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
37
+ chartRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
38
+ options: {
39
+ type: PropType<AgChartOptions>;
40
+ default: () => AgChartOptions;
41
+ };
42
+ }>> & Readonly<{}>, {
43
+ chart: AgChartInstance | undefined;
44
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
45
+ options: AgChartOptions;
46
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
47
+ P: {};
48
+ B: {};
49
+ D: {};
50
+ C: {};
51
+ M: {};
52
+ Defaults: {};
53
+ }, Readonly< ExtractPropTypes<{
54
+ options: {
55
+ type: PropType<AgChartOptions>;
56
+ default: () => AgChartOptions;
57
+ };
58
+ }>> & Readonly<{}>, {
59
+ chart: AgChartInstance | undefined;
60
+ }, {}, {}, {}, {
61
+ options: AgChartOptions;
62
+ }> | null;
63
+ }, HTMLDivElement, ComponentProvideOptions, {
64
+ P: {};
65
+ B: {};
66
+ D: {};
67
+ C: {};
68
+ M: {};
69
+ Defaults: {};
70
+ }, Readonly< PvChartProps> & Readonly<{
71
+ "onSeries-visibility-change"?: ((event: AgSeriesVisibilityChange<unknown>) => any) | undefined;
72
+ }>, {
73
+ getChartImageDataURL: (dimensions?: {
74
+ width?: number;
75
+ height?: number;
76
+ }) => Promise<string> | undefined;
77
+ }, {}, {}, {}, {
78
+ seriesFormatType: "none" | "currency" | "percent";
79
+ isLoading: boolean;
80
+ enableFocusView: boolean;
81
+ minHeight: number;
82
+ translateNullValues: boolean;
83
+ }> | null;
84
+ };
85
+ rootEl: HTMLDivElement;
86
+ };
87
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
88
+ declare const __VLS_component: DefineComponent<PvChartWidgetProps, {
89
+ isMiniChart: ComputedRef<boolean>;
90
+ effectiveContainerWidth: ComputedRef<number>;
91
+ getChartImageDataURL: (dimensions?: {
92
+ width?: number;
93
+ height?: number;
94
+ }) => Promise<string> | undefined;
95
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
96
+ "series-visibility-change": (event: AgSeriesVisibilityChange<unknown>) => any;
97
+ }, string, PublicProps, Readonly<PvChartWidgetProps> & Readonly<{
98
+ "onSeries-visibility-change"?: ((event: AgSeriesVisibilityChange<unknown>) => any) | undefined;
99
+ }>, {
100
+ seriesFormatType: "none" | "currency" | "percent";
101
+ isLoading: boolean;
102
+ enableFocusView: boolean;
103
+ translateNullValues: boolean;
104
+ enableChartScrolling: boolean;
105
+ miniChart: PvChartWidgetMiniChartMode;
106
+ showAxes: boolean;
107
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
108
+ widgetRef: HTMLDivElement;
109
+ chartAreaRef: HTMLDivElement;
110
+ pvChartRef: CreateComponentPublicInstanceWithMixins<Readonly< PvChartProps> & Readonly<{
111
+ "onSeries-visibility-change"?: ((event: AgSeriesVisibilityChange<unknown>) => any) | undefined;
112
+ }>, {
113
+ getChartImageDataURL: (dimensions?: {
114
+ width?: number;
115
+ height?: number;
116
+ }) => Promise<string> | undefined;
117
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
118
+ "series-visibility-change": (event: AgSeriesVisibilityChange<unknown>) => any;
119
+ }, PublicProps, {
120
+ seriesFormatType: "none" | "currency" | "percent";
121
+ isLoading: boolean;
122
+ enableFocusView: boolean;
123
+ minHeight: number;
124
+ translateNullValues: boolean;
125
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
126
+ chartRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
127
+ options: {
128
+ type: PropType<AgChartOptions>;
129
+ default: () => AgChartOptions;
130
+ };
131
+ }>> & Readonly<{}>, {
132
+ chart: AgChartInstance | undefined;
133
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
134
+ options: AgChartOptions;
135
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
136
+ P: {};
137
+ B: {};
138
+ D: {};
139
+ C: {};
140
+ M: {};
141
+ Defaults: {};
142
+ }, Readonly< ExtractPropTypes<{
143
+ options: {
144
+ type: PropType<AgChartOptions>;
145
+ default: () => AgChartOptions;
146
+ };
147
+ }>> & Readonly<{}>, {
148
+ chart: AgChartInstance | undefined;
149
+ }, {}, {}, {}, {
150
+ options: AgChartOptions;
151
+ }> | null;
152
+ }, HTMLDivElement, ComponentProvideOptions, {
153
+ P: {};
154
+ B: {};
155
+ D: {};
156
+ C: {};
157
+ M: {};
158
+ Defaults: {};
159
+ }, Readonly< PvChartProps> & Readonly<{
160
+ "onSeries-visibility-change"?: ((event: AgSeriesVisibilityChange<unknown>) => any) | undefined;
161
+ }>, {
162
+ getChartImageDataURL: (dimensions?: {
163
+ width?: number;
164
+ height?: number;
165
+ }) => Promise<string> | undefined;
166
+ }, {}, {}, {}, {
167
+ seriesFormatType: "none" | "currency" | "percent";
168
+ isLoading: boolean;
169
+ enableFocusView: boolean;
170
+ minHeight: number;
171
+ translateNullValues: boolean;
172
+ }> | null;
173
+ }, HTMLDivElement>;
174
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
175
+ export default _default;
176
+ type __VLS_WithTemplateSlots<T, S> = T & {
177
+ new (): {
178
+ $slots: S;
179
+ };
180
+ };
@@ -0,0 +1,4 @@
1
+ export declare const DEFAULT_CONTAINER_WIDTH = 800;
2
+ export declare const MINI_AUTO_BREAKPOINT_PX = 400;
3
+ export declare const MINI_FORCED_BREAKPOINT_PX = 250;
4
+ export declare const CHART_MIN_HEIGHT_PX = 200;
@@ -0,0 +1,31 @@
1
+ import { PvChartProps } from '../PvChart/types';
2
+ export type PvChartWidgetMiniChartMode = "disabled" | "auto" | "always";
3
+ export interface PvChartWidgetProps extends Omit<PvChartProps, "minHeight"> {
4
+ /** Maximum number of data rows rendered from `options.data`. Set to `0` to render no rows. */
5
+ dataLimit?: number;
6
+ /** When true, wraps large charts in a native Pit Viper-styled scroll container. */
7
+ enableChartScrolling?: boolean;
8
+ /** Widget height. Numbers are treated as pixel values; strings are passed through as CSS values. */
9
+ height?: number | string;
10
+ /** Maximum widget height. Numbers are treated as pixel values; strings are passed through as CSS values. */
11
+ maxHeight?: number | string;
12
+ /** Maximum widget width. Numbers are treated as pixel values; strings are passed through as CSS values. */
13
+ maxWidth?: number | string;
14
+ /**
15
+ * Controls mini-chart mode based on the widget's observed container width.
16
+ * - `"disabled"` (default): mini mode never engages from width alone.
17
+ * - `"auto"`: mini mode engages when container width < 400px.
18
+ * - `"always"`: mini mode is always on.
19
+ *
20
+ * Regardless of this prop, mini mode is also forced when container width < 250px.
21
+ */
22
+ miniChart?: PvChartWidgetMiniChartMode;
23
+ /** When false, hides cartesian axis labels, ticks, lines, titles, and grid lines. */
24
+ showAxes?: boolean;
25
+ /** Widget width. Numbers are treated as pixel values; strings are passed through as CSS values. */
26
+ width?: number | string;
27
+ }
28
+ export interface PvChartWidgetSlotProps {
29
+ isMiniChart: boolean;
30
+ effectiveContainerWidth: number;
31
+ }
@@ -6,6 +6,8 @@ export interface PvChartOptionsPanelProps {
6
6
  rowGroupLimit?: number;
7
7
  useCombinedButton?: boolean;
8
8
  chartConfigOptions?: ChartConfigPanelType[];
9
+ /** When true, the panel's controls are visible but disabled (view-only). */
10
+ readOnly?: boolean;
9
11
  }
10
12
  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<{
11
13
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & PvChartOptionsPanelProps & Partial<{}>> & PublicProps;
@@ -101,6 +101,8 @@ export interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
101
101
  filterPanelAboveChart?: boolean;
102
102
  /** If true, the filter panel is view-only: filters are visible but cannot be changed */
103
103
  filterPanelReadOnly?: boolean;
104
+ /** If true, the chart configuration panel is view-only: its controls are visible but disabled */
105
+ chartConfigPanelReadOnly?: boolean;
104
106
  /** When true, the chart section starts in a collapsed state. */
105
107
  initialChartCollapsed?: boolean;
106
108
  /** Initial focus data (focuses and focus type) to apply when the component mounts. */
@@ -0,0 +1,43 @@
1
+ import { PvDataWidgetColumnDefinition, PvDataWidgetProps, PvDataWidgetViewType, PvDataWidgetChartTypeOption } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = PvDataWidgetProps;
4
+ type __VLS_PublicProps = {
5
+ "chartType"?: PvDataWidgetViewType;
6
+ } & __VLS_Props;
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ footer?(_: {}): any;
12
+ };
13
+ refs: {};
14
+ rootEl: any;
15
+ };
16
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
+ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
18
+ "update:chartType": (value: PvDataWidgetViewType) => any;
19
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
20
+ "onUpdate:chartType"?: ((value: PvDataWidgetViewType) => any) | undefined;
21
+ }>, {
22
+ minHeight: number;
23
+ enableChartScrolling: boolean;
24
+ colDefs: PvDataWidgetColumnDefinition[];
25
+ showSeriesLabels: boolean;
26
+ hideAxes: boolean;
27
+ hideAxisTitles: boolean;
28
+ hideLegend: boolean;
29
+ hideValueAxis: boolean;
30
+ appliedFilters: string[];
31
+ chartLoading: boolean;
32
+ chartTypes: (PvDataWidgetViewType | PvDataWidgetChartTypeOption)[];
33
+ enableTableScrolling: boolean;
34
+ showTableBelowChart: boolean;
35
+ showWidgetTypeToggle: boolean;
36
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
37
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
38
+ export default _default;
39
+ type __VLS_WithTemplateSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,4 @@
1
+ import { PvDataWidgetTableProps } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<PvDataWidgetTableProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PvDataWidgetTableProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLTableElement>;
4
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { PvDataWidgetChartTypeOption, PvDataWidgetViewType } from './types';
2
+ export declare const DEFAULT_CHART_TYPE_OPTIONS: Required<Pick<PvDataWidgetChartTypeOption, "icon" | "label" | "value">>[];
3
+ export declare const DEFAULT_ENABLED_CHART_TYPES: PvDataWidgetViewType[];
4
+ export declare const DEFAULT_FALLBACK_CHART_TYPE: PvDataWidgetViewType;
5
+ export declare const TABLE_VIEW_TYPE: PvDataWidgetViewType;
6
+ export declare const NUMERIC_DATA_TYPES: Set<string>;
7
+ export declare const DEFAULT_MAP_REGION_FIELD = "state";
8
+ export declare const DEFAULT_MIN_HEIGHT_PX = 320;
9
+ export declare const CHART_SCROLL_MIN_WIDTH_PX = 320;
@@ -0,0 +1,63 @@
1
+ import { PvSegmentedControlOption } from '../../base/PvSegmentedControl/types';
2
+ import { AgChartOptions } from 'ag-charts-types';
3
+ import { PvDataWidgetChartTypeOption, PvDataWidgetColumnDefinition, PvDataWidgetDataRow, PvDataWidgetViewType } from './types';
4
+ export interface DataWidgetChartOptionConfig {
5
+ dataLimit?: number;
6
+ hideAxes?: boolean;
7
+ hideAxisTitles?: boolean;
8
+ hideLegend?: boolean;
9
+ hideValueAxis?: boolean;
10
+ noDataOverlayText?: string;
11
+ }
12
+ export interface PvDataWidgetStackedChartData {
13
+ data: PvDataWidgetDataRow[];
14
+ stackValues: string[];
15
+ }
16
+ export interface GenerateDataWidgetChartOptionsParams extends DataWidgetChartOptionConfig {
17
+ aggregatedCategoryChartData: PvDataWidgetDataRow[];
18
+ categoryColumn?: PvDataWidgetColumnDefinition;
19
+ displayDataRows: PvDataWidgetDataRow[];
20
+ numericColumns: PvDataWidgetColumnDefinition[];
21
+ providedChartOptions?: AgChartOptions;
22
+ secondarySeriesColumn?: PvDataWidgetColumnDefinition;
23
+ selectedChartType: PvDataWidgetViewType;
24
+ seriesColumn?: PvDataWidgetColumnDefinition;
25
+ showSeriesLabels?: boolean;
26
+ stackColumn?: PvDataWidgetColumnDefinition;
27
+ stackedChartData: PvDataWidgetStackedChartData;
28
+ /** Use the widget-resolved rows instead of providedChartOptions.data. */
29
+ useDisplayDataRows?: boolean;
30
+ xKey?: string;
31
+ yKey?: string;
32
+ }
33
+ export declare const normalizeChartTypeOption: (option: PvDataWidgetViewType | PvDataWidgetChartTypeOption) => PvSegmentedControlOption | null;
34
+ export declare const buildChartTypeOptions: (chartTypes?: (PvDataWidgetViewType | PvDataWidgetChartTypeOption)[]) => PvSegmentedControlOption[];
35
+ export declare const getSelectedChartType: (requestedChartType: PvDataWidgetViewType | undefined, chartTypeOptions: PvSegmentedControlOption[]) => PvDataWidgetViewType;
36
+ export declare const getInferredColumns: (dataRows: PvDataWidgetDataRow[], colDefs?: PvDataWidgetColumnDefinition[]) => PvDataWidgetColumnDefinition[];
37
+ export declare const getColumnLabel: (column: PvDataWidgetColumnDefinition | undefined, fallback?: string) => string;
38
+ export declare const getColumnDataType: (column: PvDataWidgetColumnDefinition | undefined) => string;
39
+ export declare const getIsNumericColumn: (column: PvDataWidgetColumnDefinition | undefined, dataRows: PvDataWidgetDataRow[]) => boolean;
40
+ export declare const getTableCellValue: (row: PvDataWidgetDataRow, field: string) => string;
41
+ export declare const applyDataWidgetChartOptions: (options: AgChartOptions, config: DataWidgetChartOptionConfig) => AgChartOptions;
42
+ export declare const getStackedChartData: ({ dataRows, categoryColumn, seriesColumn, stackColumn, }: {
43
+ dataRows: PvDataWidgetDataRow[];
44
+ categoryColumn?: PvDataWidgetColumnDefinition;
45
+ seriesColumn?: PvDataWidgetColumnDefinition;
46
+ stackColumn?: PvDataWidgetColumnDefinition;
47
+ }) => PvDataWidgetStackedChartData;
48
+ export declare const getAggregatedCategoryChartData: ({ dataRows, categoryColumn, seriesColumn, }: {
49
+ dataRows: PvDataWidgetDataRow[];
50
+ categoryColumn?: PvDataWidgetColumnDefinition;
51
+ seriesColumn?: PvDataWidgetColumnDefinition;
52
+ }) => PvDataWidgetDataRow[];
53
+ export declare const getMapChartData: ({ dataRows, mapColumn, seriesColumn, }: {
54
+ dataRows: PvDataWidgetDataRow[];
55
+ mapColumn?: PvDataWidgetColumnDefinition;
56
+ seriesColumn?: PvDataWidgetColumnDefinition;
57
+ }) => Record<string, string | number>[];
58
+ export declare const getMapGradientRange: (mapData: Record<string, string | number>[], seriesField: string | undefined) => {
59
+ min: number;
60
+ max: number;
61
+ };
62
+ export declare const getMapSeriesValueFormatter: (seriesColumn: PvDataWidgetColumnDefinition | undefined) => (value: number) => string;
63
+ export declare const generateDataWidgetChartOptions: ({ aggregatedCategoryChartData, categoryColumn, dataLimit, displayDataRows, hideAxes, hideAxisTitles, hideLegend, hideValueAxis, noDataOverlayText, numericColumns, providedChartOptions, secondarySeriesColumn, selectedChartType, seriesColumn, showSeriesLabels, stackColumn, stackedChartData, useDisplayDataRows, xKey: explicitXKey, yKey: explicitYKey, }: GenerateDataWidgetChartOptionsParams) => AgChartOptions;
@@ -0,0 +1,130 @@
1
+ import { AgChartOptions } from 'ag-charts-types';
2
+ export type PvDataWidgetChartType = "area" | "bar" | "bar_stacked" | "column" | "column_stacked" | "histogram" | "line" | "map" | "pie" | "scatter";
3
+ export type PvDataWidgetViewType = PvDataWidgetChartType | "table" | (string & {});
4
+ export type PvDataWidgetDataRow = Record<string, unknown>;
5
+ export interface PvDataWidgetTableHeader {
6
+ /** Field identifier for this table column. */
7
+ field: string;
8
+ /** Resolved display label for this table column. */
9
+ label: string;
10
+ }
11
+ export interface PvDataWidgetTableProps {
12
+ /** Header cells rendered in the table head. */
13
+ headers: PvDataWidgetTableHeader[];
14
+ /** Pre-resolved string cells, one inner array per row. */
15
+ rows: string[][];
16
+ }
17
+ export interface PvDataWidgetColumnDefinition {
18
+ /**
19
+ * Optional context compatible with AG Grid ColDef context for simple data definitions.
20
+ * `context.dataType` takes precedence over the top-level `dataType` and `type` hints.
21
+ */
22
+ context?: {
23
+ [key: string]: unknown;
24
+ chartOnSecondaryAxes?: boolean;
25
+ chartSeriesDescription?: string;
26
+ chartSeriesDisplayName?: string;
27
+ dataType?: string;
28
+ hideFromCharting?: boolean;
29
+ };
30
+ /** Data type hint used to infer categories and series without formatter functions. Falls back to `type` and is superseded by `context.dataType`. */
31
+ dataType?: string;
32
+ /** Field name in each data row. */
33
+ field: string;
34
+ /** Display label for table headers, axes, and series names. */
35
+ headerName?: string;
36
+ /** Hide this column from generated charts and tables. */
37
+ hide?: boolean;
38
+ /** Data type hint alias for A2UI-style definitions. */
39
+ type?: string;
40
+ /** Allow simple AG Grid ColDef-style objects without requiring JS formatter support. */
41
+ [key: string]: unknown;
42
+ }
43
+ export interface PvDataWidgetChartTypeOption {
44
+ /** Accessible label for icon-only segmented controls. */
45
+ ariaLabel?: string;
46
+ /** Icon displayed in the segmented control. */
47
+ icon?: string;
48
+ /** Visible label displayed in the segmented control. */
49
+ label?: string;
50
+ /** Stable chart/view type value. */
51
+ value?: PvDataWidgetViewType;
52
+ }
53
+ export interface PvDataWidgetProps {
54
+ /** Applied filter labels rendered in the header area. */
55
+ appliedFilters?: string[];
56
+ /** Data rows used for generated chart and table views. */
57
+ chartData?: PvDataWidgetDataRow[];
58
+ /** Loading state passed to generated charts. */
59
+ chartLoading?: boolean;
60
+ /** AG Charts options. When supplied, these are used for chart rendering. */
61
+ chartOptions?: AgChartOptions;
62
+ /**
63
+ * Chart/view types available in the header segmented control. Accepts simple
64
+ * string values (e.g. `["column", "table"]`) or full option objects with custom
65
+ * labels and icons. At least one non-table chart type is always guaranteed.
66
+ */
67
+ chartTypes?: (PvDataWidgetViewType | PvDataWidgetChartTypeOption)[];
68
+ /** Column definitions used to infer labels and numeric/category fields. Compatible with simple AG Grid ColDefs. */
69
+ colDefs?: PvDataWidgetColumnDefinition[];
70
+ /** Maximum number of data rows rendered in generated chart and table views. Set to `0` to render no rows. */
71
+ dataLimit?: number;
72
+ /** When true, wraps large generated charts in a native Pit Viper-styled scroll container. */
73
+ enableChartScrolling?: boolean;
74
+ /**
75
+ * When true, scrolls table overflow. The body is capped by `tableMaxHeight` when set,
76
+ * otherwise by the constrained flex layout (i.e. a bounded widget `height`/`maxHeight`).
77
+ */
78
+ enableTableScrolling?: boolean;
79
+ /** Widget height. Numbers are treated as pixel values; strings are passed through as CSS values. */
80
+ height?: number | string;
81
+ /**
82
+ * When true, hides cartesian axis labels, ticks, lines, titles, and grid lines.
83
+ * Supersedes `hideAxisTitles` and `hideValueAxis` — the whole axis is hidden.
84
+ */
85
+ hideAxes?: boolean;
86
+ /** When true, hides axis titles (e.g. "Plan Type") while keeping tick labels. */
87
+ hideAxisTitles?: boolean;
88
+ /** When true, hides the chart legend on generated charts. */
89
+ hideLegend?: boolean;
90
+ /** When true, hides the numeric value axis while keeping the category (x) axis labels. */
91
+ hideValueAxis?: boolean;
92
+ /** Data field containing map region values. Defaults to `state` when present. */
93
+ mapKey?: string;
94
+ /** Maximum widget height. Numbers are treated as pixel values; strings are passed through as CSS values. */
95
+ maxHeight?: number | string;
96
+ /** Maximum widget width. Numbers are treated as pixel values; strings are passed through as CSS values. */
97
+ maxWidth?: number | string;
98
+ /**
99
+ * Minimum pixel height for generated charts. Required as a number because ag-charts
100
+ * sizes its canvas from an explicit height rather than CSS alone.
101
+ */
102
+ minHeight?: number;
103
+ /**
104
+ * Overlay text shown when a generated chart has no data. When omitted, the chart's
105
+ * own default overlay text is used.
106
+ */
107
+ noDataOverlayText?: string;
108
+ /** When true, renders value labels on generated cartesian series (e.g. above bars). */
109
+ showSeriesLabels?: boolean;
110
+ /**
111
+ * When true, renders the data table beneath the chart for non-table view types.
112
+ * Independent of whether `table` appears in the view toggle. The below-table is
113
+ * hidden when `table` is the selected view (a table is never stacked under a table).
114
+ */
115
+ showTableBelowChart?: boolean;
116
+ /** When true (default), shows the chart/table type toggle in the header. */
117
+ showWidgetTypeToggle?: boolean;
118
+ /** Field used as the generated stacked chart grouping key. Defaults to the second category-like column. */
119
+ stackKey?: string;
120
+ /** Maximum table container height when table scrolling is enabled. Numbers are treated as pixel values. */
121
+ tableMaxHeight?: number | string;
122
+ /** Title displayed in the widget header. */
123
+ title?: string;
124
+ /** Widget width. Numbers are treated as pixel values; strings are passed through as CSS values. */
125
+ width?: number | string;
126
+ /** Field used as the generated chart category/x-axis. */
127
+ xKey?: string;
128
+ /** Field used as the generated chart series/y-axis. */
129
+ yKey?: string;
130
+ }
@@ -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;
@@ -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';