@turquoisehealth/pit-viper 2.241.1-dev.0 → 2.243.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 (43) hide show
  1. package/_site/assets/css/pit-viper-a11y.css +5 -0
  2. package/_site/assets/css/pit-viper-consumer.css +5 -0
  3. package/_site/assets/css/pit-viper-v2-scoped.css +4 -0
  4. package/_site/assets/css/pit-viper-v2.css +5 -0
  5. package/_site/assets/css/pit-viper.css +5 -0
  6. package/_src/assets/sprite-v2.svg +1 -1
  7. package/_src/assets/sprite.svg +1 -1
  8. package/package.json +1 -1
  9. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  10. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  11. package/pv-components/dist/stats/web/pv-sidebar-v2-stats.html +1 -1
  12. package/pv-components/dist/vue/ai/components/base/PvContext/{PvContextFeedback.vue.d.ts → PvContextFeedback/PvContextFeedback.vue.d.ts} +10 -10
  13. package/pv-components/dist/vue/ai/components/base/PvContext/PvContextSurface/PvContextSurface.vue.d.ts +45 -0
  14. package/pv-components/dist/vue/ai/components/base/PvContext/PvSpinesEntityFields/PvSpinesEntityFields.vue.d.ts +12 -0
  15. package/pv-components/dist/vue/ai/components/base/PvContext/config.d.ts +27 -0
  16. package/pv-components/dist/vue/ai/components/base/PvEmptyState/types.d.ts +17 -0
  17. package/pv-components/dist/vue/ai/components/base/PvSidebarV2/types.d.ts +2 -0
  18. package/pv-components/dist/vue/ai/components/base/index.d.ts +6 -1
  19. package/pv-components/dist/vue/base/components/base/PvContext/{PvContextFeedback.vue.d.ts → PvContextFeedback/PvContextFeedback.vue.d.ts} +10 -10
  20. package/pv-components/dist/vue/base/components/base/PvContext/PvContextSurface/PvContextSurface.vue.d.ts +45 -0
  21. package/pv-components/dist/vue/base/components/base/PvContext/PvSpinesEntityFields/PvSpinesEntityFields.vue.d.ts +12 -0
  22. package/pv-components/dist/vue/base/components/base/PvContext/config.d.ts +27 -0
  23. package/pv-components/dist/vue/base/components/base/PvEmptyState/types.d.ts +17 -0
  24. package/pv-components/dist/vue/base/components/base/PvSidebarV2/types.d.ts +2 -0
  25. package/pv-components/dist/vue/base/components/base/index.d.ts +6 -1
  26. package/pv-components/dist/vue/base/pv-components-base.mjs +1779 -1572
  27. package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
  28. package/pv-components/dist/vue/visualizations/components/base/PvContext/{PvContextFeedback.vue.d.ts → PvContextFeedback/PvContextFeedback.vue.d.ts} +10 -10
  29. package/pv-components/dist/vue/visualizations/components/base/PvContext/PvContextSurface/PvContextSurface.vue.d.ts +45 -0
  30. package/pv-components/dist/vue/visualizations/components/base/PvContext/PvSpinesEntityFields/PvSpinesEntityFields.vue.d.ts +12 -0
  31. package/pv-components/dist/vue/visualizations/components/base/PvContext/config.d.ts +27 -0
  32. package/pv-components/dist/vue/visualizations/components/base/PvEmptyState/types.d.ts +17 -0
  33. package/pv-components/dist/vue/visualizations/components/base/PvSidebarV2/types.d.ts +2 -0
  34. package/pv-components/dist/vue/visualizations/components/base/PvSortableList/PvSortableList.vue.d.ts +0 -13
  35. package/pv-components/dist/vue/visualizations/components/base/index.d.ts +6 -1
  36. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/helpers.d.ts +0 -19
  37. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/table-chart-components/PvChartOptionsPanel.vue.d.ts +0 -9
  38. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/types.d.ts +0 -42
  39. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +1520 -1618
  40. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
  41. package/pv-components/dist/web/components/pv-sidebar-v2/pv-sidebar-v2.js +395 -383
  42. package/pv-components/dist/web/pv-components.iife.js +13 -13
  43. package/pv-components/dist/web/pv-components.iife.js.map +1 -1
@@ -1,23 +1,23 @@
1
- import { ContextCardItem } from './types.ts';
2
- import { ContextFeedbackPayload } from './config.ts';
1
+ import { ContextEntityField, ContextFeedbackPayload } from '../config.ts';
3
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
4
3
  interface PvContextFeedbackProps {
5
- item: ContextCardItem;
4
+ /** The field labels to offer for feedback selection. */
5
+ fields?: ContextEntityField[];
6
6
  /**
7
7
  * Handles the submitted feedback. Resolve `true` when the feedback was
8
- * accepted (a persistent success message replaces the form and blocks further
9
- * submissions) or `false` when it failed (a persistent error message appears
10
- * and the form stays open so the user can retry). The submit button shows a
11
- * spinner while the returned promise is pending.
8
+ * accepted (the form resets and a success toast appears) or `false` when it
9
+ * failed (an error toast appears and the form stays open so the user can
10
+ * retry). The submit button shows a spinner while the returned promise is
11
+ * pending.
12
12
  */
13
13
  onSubmitFeedback?: (payload: ContextFeedbackPayload) => Promise<boolean>;
14
- /** Message shown in place of the form after feedback is accepted. */
14
+ /** Toast message shown after feedback is accepted. */
15
15
  successMessage?: string;
16
- /** Message shown when feedback submission fails. */
16
+ /** Toast message shown when feedback submission fails. */
17
17
  errorMessage?: string;
18
18
  }
19
19
  declare const _default: DefineComponent<PvContextFeedbackProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PvContextFeedbackProps> & Readonly<{}>, {
20
20
  successMessage: string;
21
21
  errorMessage: string;
22
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
22
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
23
23
  export default _default;
@@ -0,0 +1,45 @@
1
+ import { ShowContextPayload } from '../config.ts';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ interface PvContextSurfaceProps {
4
+ /** Controls the outer surface: `pv-card` or `pv-drawer pv-surface`. */
5
+ variant: "card" | "drawer";
6
+ /** Tag shown in the header row. Omit to hide the tag. Payer/Provider (case-insensitive) also swap in PvCompanyLogo next to the default title. */
7
+ contextType?: string;
8
+ /** Used by the default title when the `title` slot isn't provided. */
9
+ header: string;
10
+ /** Hides the close button. */
11
+ disableClose?: boolean;
12
+ /** Shows a back arrow in the header row, for callers that support drilling back up a navigation stack. */
13
+ showBack?: boolean;
14
+ }
15
+ declare function __VLS_template(): {
16
+ attrs: Partial<{}>;
17
+ slots: {
18
+ title?(_: {}): any;
19
+ default?(_: {}): any;
20
+ footer?(_: {}): any;
21
+ };
22
+ refs: {
23
+ panel: HTMLDivElement;
24
+ };
25
+ rootEl: any;
26
+ };
27
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
+ declare const __VLS_component: DefineComponent<PvContextSurfaceProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
29
+ close: () => any;
30
+ back: () => any;
31
+ "show-context": (payload: ShowContextPayload) => any;
32
+ }, string, PublicProps, Readonly<PvContextSurfaceProps> & Readonly<{
33
+ onClose?: (() => any) | undefined;
34
+ onBack?: (() => any) | undefined;
35
+ "onShow-context"?: ((payload: ShowContextPayload) => any) | undefined;
36
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
37
+ panel: HTMLDivElement;
38
+ }, any>;
39
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
40
+ export default _default;
41
+ type __VLS_WithTemplateSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,12 @@
1
+ import { ShowContextPayload, ContextEntityField } from '../config.ts';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ interface PvSpinesEntityFieldsProps {
4
+ /** The label/value rows to render. */
5
+ entityFields: ContextEntityField[];
6
+ }
7
+ declare const _default: DefineComponent<PvSpinesEntityFieldsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
8
+ "show-context": (payload: ShowContextPayload) => any;
9
+ }, string, PublicProps, Readonly<PvSpinesEntityFieldsProps> & Readonly<{
10
+ "onShow-context"?: ((payload: ShowContextPayload) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -1,3 +1,4 @@
1
+ import { InjectionKey } from 'vue';
1
2
  import { ContextCardEnum, ContextCardFieldConfig, ContextCardItem } from './types';
2
3
  export declare const CONTEXT_TAG_LABELS: Record<ContextCardEnum, string>;
3
4
  /**
@@ -20,7 +21,33 @@ export interface ContextLabelClickPayload {
20
21
  value: string[];
21
22
  };
22
23
  }
24
+ /** A single value within a `ContextEntityField`. Set `isClickable` to render it as interactive. */
25
+ export interface ContextEntityFieldValue {
26
+ name: string;
27
+ isClickable?: boolean;
28
+ /** Opaque identifier for this value (e.g. a knowledge-graph id). Not read internally; consumers resolve it themselves in their `show-context` handler. */
29
+ contextIdentifier?: string;
30
+ }
31
+ /** A pre-built label/value entry for PvSpinesEntityFields and PvContextFeedback. */
32
+ export interface ContextEntityField {
33
+ label: string;
34
+ value: ContextEntityFieldValue | ContextEntityFieldValue[];
35
+ }
23
36
  export interface ContextFeedbackPayload {
24
37
  fields: string[];
25
38
  comment: string;
26
39
  }
40
+ /** Emitted as PvContextSurface's `show-context` event when a clickable value is activated. */
41
+ export interface ShowContextPayload {
42
+ contextIdentifier: string;
43
+ }
44
+ /**
45
+ * Lets content slotted into PvContextSurface (e.g. PvSpinesEntityFields) request a context
46
+ * change without the consumer manually relaying an intermediate event. PvContextSurface
47
+ * provides this; slotted content injects it and calls `showContext` directly, and
48
+ * PvContextSurface re-emits it as its own `show-context` event.
49
+ */
50
+ export interface PvContextSurfaceContext {
51
+ showContext: (payload: ShowContextPayload) => void;
52
+ }
53
+ export declare const PvContextSurfaceKey: InjectionKey<PvContextSurfaceContext>;
@@ -0,0 +1,17 @@
1
+ export interface PvEmptyStateProps {
2
+ /** Alt text for the image */
3
+ alt?: string;
4
+ description?: string;
5
+ /** Primary text displayed in the empty/error state */
6
+ header?: string;
7
+ /** Label for the primary action button. Button is only rendered when set */
8
+ primaryLabel?: string;
9
+ /** Label for the secondary action button. Button is only rendered when set */
10
+ secondaryLabel?: string;
11
+ /** Source URL for the image displayed above the header */
12
+ src?: string;
13
+ }
14
+ export interface PvEmptyStateEmits {
15
+ (e: "handle-primary-click"): void;
16
+ (e: "handle-secondary-click"): void;
17
+ }
@@ -1,4 +1,6 @@
1
1
  export interface PvSidebarV2Props {
2
+ /** @deprecated Organization and profile menus are always click-only. This prop has no effect. */
3
+ disableOrgProfileHover?: boolean;
2
4
  disableToggle?: boolean;
3
5
  /** Top-level nav items, with optional nested children rendered as an accordion / hover flyout. */
4
6
  navItems?: PvSidebarNavItem[];
@@ -13,18 +13,6 @@ export type PvSortableMenuListProps = {
13
13
  * Whether to render placeholder drop zones for unfilled active slots.
14
14
  */
15
15
  showPlaceholders?: boolean;
16
- /**
17
- * Options that cannot be removed or reordered: they render with a lock icon, stay pinned
18
- * at the top of the active list, and every mutation (click, drag, placeholder drop)
19
- * re-asserts them. Ids must refer to options that are already active.
20
- */
21
- lockedOptionIds?: string[];
22
- /**
23
- * Optional per-option explanation for WHY an option is locked, keyed by option id. A locked
24
- * option with an entry renders an info icon whose tooltip shows the text (e.g. "Select a
25
- * single drug to unlock"). Ignored for options that aren't locked.
26
- */
27
- lockedOptionTooltips?: Record<string, string>;
28
16
  };
29
17
  type __VLS_Props = PvSortableMenuListProps;
30
18
  type __VLS_PublicProps = {
@@ -38,7 +26,6 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
38
26
  options: MenuOption[];
39
27
  placeholderText: string;
40
28
  showPlaceholders: boolean;
41
- lockedOptionIds: string[];
42
29
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
43
30
  containerRef: HTMLDivElement;
44
31
  sortableListRef: HTMLUListElement;
@@ -27,6 +27,9 @@ export { default as PvDateTime } from './PvDateTime/PvDateTime.vue';
27
27
  export { default as PvDrawer } from './PvDrawer/PvDrawer.vue';
28
28
  export { default as PvSpinesContextCard } from './PvContext/PvSpinesContextCard/PvSpinesContextCard.vue';
29
29
  export { default as PvSpinesContextDrawer } from './PvContext/PvSpinesContextDrawer/PvSpinesContextDrawer.vue';
30
+ export { default as PvContextSurface } from './PvContext/PvContextSurface/PvContextSurface.vue';
31
+ export { default as PvSpinesEntityFields } from './PvContext/PvSpinesEntityFields/PvSpinesEntityFields.vue';
32
+ export { default as PvContextFeedback } from './PvContext/PvContextFeedback/PvContextFeedback.vue';
30
33
  export { default as PvTooltip } from './PvTooltip/PvTooltip.vue';
31
34
  export { default as PvTooltipV2 } from './PvTooltipV2/PvTooltipV2.vue';
32
35
  export { default as PvTabs } from './PvTabs/PvTabs.vue';
@@ -94,6 +97,8 @@ export { createPvFilterStore, providePvFilterStore, useOptionalPvFilterStore, us
94
97
  export type { PvRangeColor, PvRangeMode, PvRangeProps, PvRangeSize, PvRangeValue, } from './PvRange/types';
95
98
  export { ContextCardEnum } from './PvContext/types';
96
99
  export type { ContextCardItem, ContextCardVariants, ProviderContextCard, PayerContextCard, LineOfBusinessContextCard, PlanTypeContextCard, ProductContextCard, CSBAContextCard, StateContextCard, ServiceContextCard, ServiceCodeContextCard, } from './PvContext/types';
97
- export type { ContextFeedbackPayload, ContextLabelClickPayload } from './PvContext/config';
100
+ export type { ContextLabelClickPayload } from './PvContext/config';
101
+ export type { ShowContextPayload, ContextEntityField, ContextEntityFieldValue, ContextFeedbackPayload, PvContextSurfaceContext, } from './PvContext/config';
102
+ export { PvContextSurfaceKey } from './PvContext/config';
98
103
  export { RumContextKey, useRumContext, addRumAction, deferRumTask } from '../../functions/rum';
99
104
  export type { PvRumContext } from '../../functions/rum';
@@ -16,25 +16,6 @@ export declare const getSecondarySeriesKey: (field: string, aggFunc: string | nu
16
16
  * back to AG Charts' automatic scaling rather than building a degenerate axis.
17
17
  */
18
18
  export declare const niceAxisCeiling: (rawMax: number, intervals: number) => number;
19
- /**
20
- * A "nice" fitted axis window: floor and ceiling on multiples of a nice step
21
- * (1 / 2 / 2.5 / 5 x 10^k) spanning exactly `intervals` equal steps, with
22
- * floor <= rawMin and ceiling >= rawMax.
23
- *
24
- * Used for a line chart's primary value axis when it is grid-aligned against a
25
- * secondary axis: lines don't encode value by length from a baseline, so the
26
- * axis can hug the data (e.g. percentages clustered around 100%) instead of
27
- * stretching to zero — and because the window keeps the shared interval count,
28
- * both axes' gridlines still coincide. Data near zero floors to zero naturally.
29
- *
30
- * Returns null for non-finite, negative-min, or degenerate (max <= min) input,
31
- * signalling the caller to fall back to the zero-based window.
32
- */
33
- export declare const niceAxisRange: (rawMin: number, rawMax: number, intervals: number) => {
34
- min: number;
35
- max: number;
36
- step: number;
37
- } | null;
38
19
  export declare const computeNoDataOverlayText: ({ currentRowGroupColumnsLength, shouldShowFocusOverlayText, chartDataEmpty, missingFocusText, displayGroupByName, yAxisName, yAxisOptionCount, }: {
39
20
  currentRowGroupColumnsLength: number;
40
21
  shouldShowFocusOverlayText: boolean;
@@ -7,15 +7,6 @@ export interface PvChartOptionsPanelProps {
7
7
  useCombinedButton?: boolean;
8
8
  useNestedMenu?: boolean;
9
9
  chartConfigOptions?: ChartConfigPanelType[];
10
- /** Row-group colIds that are pinned in the sortable X Axis list: locked options can't be
11
- * removed or reordered (see PvSortableList's lockedOptionIds). */
12
- lockedRowGroupColIds?: string[];
13
- /** Per-colId explanation for why an X Axis option is locked, shown as an info tooltip on the
14
- * locked list entry (see PvSortableList's lockedOptionTooltips). */
15
- lockedRowGroupTooltips?: Record<string, string>;
16
- /** Keep the Metric Overlay picker enabled when a secondary row group splits a non-stacked
17
- * chart into per-group series (see PvDataTableWithChart's metricOverlayWithRowGroups). */
18
- metricOverlayWithRowGroups?: boolean;
19
10
  /** When true, the panel's controls are visible but disabled (view-only). */
20
11
  readOnly?: boolean;
21
12
  /** Column field used for the "% of focus" chart view; its Y-axis option is disabled on line charts. */
@@ -180,48 +180,6 @@ export interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
180
180
  * when `multiSelectMetricOverlay` is true; unknown fields are ignored.
181
181
  */
182
182
  initialSecondaryYKeys?: string[];
183
- /**
184
- * Keep Metric Overlays available when a secondary row group splits a non-stacked chart into
185
- * one series per group value (they are normally disabled and cleared there). The overlay
186
- * plots the field's plain per-category value, so it is only meaningful when that value is
187
- * constant within a category — e.g. drug-level benchmarks (WAC/ASP) on a report already
188
- * filtered to a single drug.
189
- */
190
- metricOverlayWithRowGroups?: boolean;
191
- /**
192
- * Row-group colIds pinned in the sortable X Axis picker: locked options render with a lock
193
- * icon and cannot be removed or reordered (see PvSortableList's `lockedOptionIds`). Use for
194
- * charts whose first dimension is structural (e.g. a time axis on a trends template).
195
- * Locked ids are also enforced as active: any locked id missing from the current row groups
196
- * is prepended (in locked order), so a caller can drive a structural breakout reactively
197
- * (e.g. force a per-drug split while multiple drugs are selected).
198
- */
199
- lockedRowGroupColIds?: string[];
200
- /**
201
- * Per-colId explanation for why an X Axis option is locked, keyed by colId. Shown as an
202
- * info tooltip on the locked entry in the X Axis picker.
203
- */
204
- lockedRowGroupTooltips?: Record<string, string>;
205
- /**
206
- * Explicit display order for the X Axis picker's options, as colIds. Options listed here
207
- * sort by their position; unlisted options keep their existing relative order after them.
208
- * Lets the picker order diverge from the table's column order (which otherwise drives it).
209
- */
210
- rowGroupOptionOrder?: string[];
211
- /**
212
- * When true and the chart is a line chart grid-aligned against a secondary axis, the primary
213
- * value axis uses a "nice" fitted window (floor near the data minimum) instead of a zero
214
- * baseline, so series clustered far from zero stay readable. Opt-in per consumer: bar charts
215
- * and consumers that don't set it keep the zero-based window.
216
- */
217
- fitPrimaryAxisToLineData?: boolean;
218
- /**
219
- * When true, metric overlays are withheld from the chart (no overlay series, no secondary
220
- * axis) while the picker selections are preserved, so overlays reappear when the flag drops.
221
- * Use when the overlay would be misleading for the current view (e.g. a blended WAC/ASP
222
- * benchmark line across a multi-drug comparison).
223
- */
224
- suppressMetricOverlays?: boolean;
225
183
  /** Filter configuration that adds a dropdown above the chart to slice data by a category column. */
226
184
  chartFilter?: ChartFilter;
227
185
  /** The initial chart type to render. */