@turquoisehealth/pit-viper 2.219.1-dev.0 → 2.219.1

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.
@@ -19,8 +19,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
19
19
  readonly "onTable-overlay-change"?: ((selectedIds: string[]) => any) | undefined;
20
20
  readonly "onChart-state-changed"?: ((event: ChartStateChangedEvent) => any) | undefined;
21
21
  readonly "onChart-collapsed"?: ((collapsed: boolean) => any) | undefined;
22
- readonly "onActive-overlay-group-ids-change"?: ((ids: string[]) => any) | undefined;
23
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onHandle-settings-icon" | "onColumn-moved" | "onColumn-resized" | "onColumn-row-group-changed" | "onColumn-value-changed" | "onGrid-ready" | "onFilter-changed" | "onSort-changed" | "onFilter-opened" | "onFirst-data-rendered" | "onFocus-update" | "onTable-overlay-change" | "onChart-state-changed" | "onChart-collapsed" | "onActive-overlay-group-ids-change"> & PvDataTableWithChartProps<T> & Partial<{}>> & PublicProps;
22
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onHandle-settings-icon" | "onColumn-moved" | "onColumn-resized" | "onColumn-row-group-changed" | "onColumn-value-changed" | "onGrid-ready" | "onFilter-changed" | "onSort-changed" | "onFilter-opened" | "onFirst-data-rendered" | "onFocus-update" | "onTable-overlay-change" | "onChart-state-changed" | "onChart-collapsed"> & PvDataTableWithChartProps<T> & Partial<{}>> & PublicProps;
24
23
  expose(exposed: ShallowUnwrapRef<{
25
24
  getChartImageDataURL: (dimensions?: {
26
25
  width?: number;
@@ -57,7 +56,6 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
57
56
  (e: "focus-update", event: FocusUpdateEvent): void;
58
57
  (e: "chart-collapsed", collapsed: boolean): void;
59
58
  (e: "table-overlay-change", selectedIds: string[]): void;
60
- (e: "active-overlay-group-ids-change", ids: string[]): void;
61
59
  };
62
60
  }>) => VNode & {
63
61
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -205,14 +205,6 @@ export interface PvDataTableWithChartProps<T> extends PvDataTableProps<T> {
205
205
  * options panel.
206
206
  */
207
207
  crosslineOverlayGroups?: CrosslineOverlayGroup[];
208
- /**
209
- * Seeds which `crosslineOverlayGroups` are toggled on when the chart first renders, overriding
210
- * each group's own `visible` flag. Pass a consumer-persisted selection (e.g. from a saved
211
- * report) to restore it across navigation/reload; omit to fall back to `visible: true` groups.
212
- * Emits `active-overlay-group-ids-change` whenever the active selection changes (including
213
- * automatic activation of a newly-enabled group), so the consumer can persist it.
214
- */
215
- initialActiveOverlayGroupIds?: string[];
216
208
  }
217
209
  export interface ChartSeriesAggFuncSelectedEvent {
218
210
  aggFunc: string;
@@ -19,11 +19,6 @@ interface UseBenchmarkOverlaysOptions {
19
19
  }[] | undefined>;
20
20
  pvChartRef: Ref<InstanceType<typeof PvChart> | null>;
21
21
  formatValue: (value: number) => string | number;
22
- /**
23
- * Seeds the active set on first render, overriding each group's own `visible` flag. Use this to
24
- * restore a consumer-persisted toggle selection (e.g. from a saved report).
25
- */
26
- initialActiveOverlayGroupIds?: ComputedRef<string[] | undefined>;
27
22
  }
28
23
  export declare function useBenchmarkOverlays(options: UseBenchmarkOverlaysOptions): {
29
24
  activeCrosslineOverlayGroups: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
@@ -13651,32 +13651,28 @@ var Op = (e, t) => {
13651
13651
  });
13652
13652
  }), r.set(e.groupName, t);
13653
13653
  }), [...r.values()];
13654
- }, Np = (e) => !!(e.visible && !e.disabled);
13655
- function Pp(e) {
13656
- let { crosslineOverlayGroups: t, useDistributionV2Styling: n, isHistogramWithBuckets: i, isHorizontalBarChart: a, computedChartData: o, pvChartRef: s, formatValue: c, initialActiveOverlayGroupIds: l } = e, u = k(new Set(l?.value ?? t.value.filter((e) => Np(e)).map((e) => e.id))), d = new Map(t.value.map((e) => [e.id, Np(e)]));
13657
- U(t, (e) => {
13658
- let t = new Set(u.value), n = !1;
13659
- for (let r of e) Np(r) && !d.get(r.id) && (t.add(r.id), n = !0);
13660
- d = new Map(e.map((e) => [e.id, Np(e)])), n && (u.value = t);
13661
- });
13662
- let f = r(() => jp(t.value, u.value)), p = r(() => n.value ? Mp(t.value, u.value, c) : []), m = k(null);
13654
+ };
13655
+ //#endregion
13656
+ //#region src/components/charts/PvDataTableWithChart/useBenchmarkOverlays.ts
13657
+ function Np(e) {
13658
+ let { crosslineOverlayGroups: t, useDistributionV2Styling: n, isHistogramWithBuckets: i, isHorizontalBarChart: a, computedChartData: o, pvChartRef: s, formatValue: c } = e, l = k(new Set(t.value.filter((e) => e.visible && !e.disabled).map((e) => e.id))), u = r(() => jp(t.value, l.value)), d = r(() => n.value ? Mp(t.value, l.value, c) : []), f = k(null);
13663
13659
  return {
13664
- activeCrosslineOverlayGroups: u,
13665
- resolvedCrosslineOverlays: f,
13666
- chipSections: p,
13667
- hoveredBenchmarkKey: m,
13660
+ activeCrosslineOverlayGroups: l,
13661
+ resolvedCrosslineOverlays: u,
13662
+ chipSections: d,
13663
+ hoveredBenchmarkKey: f,
13668
13664
  hoveredCrosslineTooltip: r(() => {
13669
- if (!m.value || !o.value) return null;
13670
- let e = f.value.find((e) => e.key === m.value);
13665
+ if (!f.value || !o.value) return null;
13666
+ let e = u.value.find((e) => e.key === f.value);
13671
13667
  if (!e) return null;
13672
13668
  let t = Op(e.value, o.value);
13673
13669
  if (t == null) return null;
13674
13670
  let r = (s.value?.$el)?.querySelector(".ag-charts-series-area")?.getBoundingClientRect();
13675
13671
  if (!r) return null;
13676
- let l = Ap(t, kp(o.value.length || 1, i.value && n.value)), u = e.formatValue ? e.formatValue(e.value) : c(e.value);
13672
+ let l = Ap(t, kp(o.value.length || 1, i.value && n.value)), d = e.formatValue ? e.formatValue(e.value) : c(e.value);
13677
13673
  return a.value ? {
13678
13674
  label: e.label,
13679
- value: u,
13675
+ value: d,
13680
13676
  arrowClass: "ag-charts-tooltip--arrow-left",
13681
13677
  style: {
13682
13678
  "--left": `${r.left + 8}px`,
@@ -13686,7 +13682,7 @@ function Pp(e) {
13686
13682
  }
13687
13683
  } : {
13688
13684
  label: e.label,
13689
- value: u,
13685
+ value: d,
13690
13686
  arrowClass: "ag-charts-tooltip--arrow-bottom",
13691
13687
  style: {
13692
13688
  "--left": `${r.left + l * r.width}px`,
@@ -13700,22 +13696,22 @@ function Pp(e) {
13700
13696
  }
13701
13697
  //#endregion
13702
13698
  //#region src/components/charts/PvDataTableWithChart/PvDataTableWithChart.vue?vue&type=script&setup=true&lang.ts
13703
- var Fp = { style: {
13699
+ var Pp = { style: {
13704
13700
  height: "100%",
13705
13701
  width: "100%"
13706
- } }, Ip = {
13702
+ } }, Fp = {
13707
13703
  key: 0,
13708
13704
  class: "pv-bordered pv-radius-lg pv-inset-square-12 pv-stack-16"
13709
- }, Lp = { class: "pv-flex" }, Rp = {
13705
+ }, Ip = { class: "pv-flex" }, Lp = {
13710
13706
  class: "pv-flex",
13711
13707
  style: { "align-items": "stretch" }
13712
- }, zp = { class: "pv-flex pv-space-between" }, Bp = { class: "pv-chart-tooltip-label" }, Vp = { class: "pv-chart-tooltip-value" }, Hp = {
13708
+ }, Rp = { class: "pv-flex pv-space-between" }, zp = { class: "pv-chart-tooltip-label" }, Bp = { class: "pv-chart-tooltip-value" }, Vp = {
13713
13709
  key: 2,
13714
13710
  class: "pv-chart-overlay pv-flex pv-align-center"
13715
- }, Up = { key: 0 }, Wp = {
13711
+ }, Hp = { key: 0 }, Up = {
13716
13712
  key: 1,
13717
13713
  class: "pv-text-body-xs"
13718
- }, Gp = /* @__PURE__ */ d({
13714
+ }, Wp = /* @__PURE__ */ d({
13719
13715
  __name: "PvDataTableWithChart",
13720
13716
  props: {
13721
13717
  allFieldsAreFocusable: { type: Boolean },
@@ -13795,7 +13791,6 @@ var Fp = { style: {
13795
13791
  tableConfigOptions: {},
13796
13792
  customCssProperties: {},
13797
13793
  crosslineOverlayGroups: {},
13798
- initialActiveOverlayGroupIds: {},
13799
13794
  colDefs: {},
13800
13795
  rowData: {},
13801
13796
  filterStore: {},
@@ -13924,8 +13919,7 @@ var Fp = { style: {
13924
13919
  "handle-settings-icon",
13925
13920
  "focus-update",
13926
13921
  "chart-collapsed",
13927
- "table-overlay-change",
13928
- "active-overlay-group-ids-change"
13922
+ "table-overlay-change"
13929
13923
  ],
13930
13924
  setup(e, { expose: n, emit: c }) {
13931
13925
  let l = e, d = c, p = k(null), m = k(null), h = k(null), g = k(null), b = k(l.initialChartCollapsed ?? !1), C = "filter-panel-" + f()?.uid, w = k(!1), E = k(!1), A = k(0), M = r(() => m.value?.availableRowGroupColumns || []), P = k([]), I = r(() => P.value.length > 0 ? P.value[0] : ""), L = (e) => $(e).chartSeriesDisplayName || e.headerName || e.field || "", z = k({}), B = (e) => {
@@ -14423,7 +14417,7 @@ var Fp = { style: {
14423
14417
  ];
14424
14418
  }
14425
14419
  return e;
14426
- }), { activeCrosslineOverlayGroups: rt, resolvedCrosslineOverlays: it, chipSections: at, hoveredBenchmarkKey: st, hoveredCrosslineTooltip: ct } = Pp({
14420
+ }), { activeCrosslineOverlayGroups: rt, resolvedCrosslineOverlays: it, chipSections: at, hoveredBenchmarkKey: st, hoveredCrosslineTooltip: ct } = Np({
14427
14421
  crosslineOverlayGroups: je,
14428
14422
  useDistributionV2Styling: r(() => l.useDistributionV2Styling),
14429
14423
  isHistogramWithBuckets: qe,
@@ -14433,10 +14427,9 @@ var Fp = { style: {
14433
14427
  formatValue: (e) => {
14434
14428
  let t = me(P.value?.[0]);
14435
14429
  return typeof t == "function" ? t({ value: e }) : e;
14436
- },
14437
- initialActiveOverlayGroupIds: r(() => l.initialActiveOverlayGroupIds)
14430
+ }
14438
14431
  });
14439
- O(eu, rt), U(rt, (e) => d("active-overlay-group-ids-change", [...e]), { deep: !0 });
14432
+ O(eu, rt);
14440
14433
  let lt = new Set([qo, Jo]), ut = k(void 0), dt = r(() => be.value?.id === "map"), ft = r(() => ke.value || H.value[0]?.value || "value"), pt = r(() => "600px"), mt = r(() => {
14441
14434
  let e = I.value, t = ft.value;
14442
14435
  return !e || !t ? [] : (nt.value ?? []).filter((t) => {
@@ -14682,12 +14675,12 @@ var Fp = { style: {
14682
14675
  }
14683
14676
  }), T(async () => {
14684
14677
  await v(), w.value = l.filterPanelAboveChart;
14685
- }), (n, r) => (D(), o("div", Fp, [
14678
+ }), (n, r) => (D(), o("div", Pp, [
14686
14679
  s("div", {
14687
14680
  class: "pv-stack-16",
14688
14681
  id: C
14689
14682
  }),
14690
- e.hideChart ? a("", !0) : (D(), o("div", Ip, [
14683
+ e.hideChart ? a("", !0) : (D(), o("div", Fp, [
14691
14684
  u(Ln, {
14692
14685
  rightIcon: "chevrons-down-up",
14693
14686
  label: "Collapse",
@@ -14699,7 +14692,7 @@ var Fp = { style: {
14699
14692
  onClick: r[0] ||= (e) => Bt(!b.value),
14700
14693
  class: y(e.hideChart || b.value ? "pv-hide" : "")
14701
14694
  }, null, 8, ["class"]),
14702
- s("div", { class: y(e.hideChart || !b.value ? "pv-hide" : "pv-space-between") }, [s("div", Lp, [u(Nn, {
14695
+ s("div", { class: y(e.hideChart || !b.value ? "pv-hide" : "pv-space-between") }, [s("div", Ip, [u(Nn, {
14703
14696
  name: "chart-line",
14704
14697
  size: 20,
14705
14698
  class: "pv-text-subdued"
@@ -14731,7 +14724,7 @@ var Fp = { style: {
14731
14724
  "chart-config-options",
14732
14725
  "read-only",
14733
14726
  "percent-of-focus-view-y-key"
14734
- ]), s("div", Rp, [R(at).length > 0 ? (D(), i(Bf, {
14727
+ ]), s("div", Lp, [R(at).length > 0 ? (D(), i(Bf, {
14735
14728
  key: 0,
14736
14729
  sections: R(at),
14737
14730
  onChipHover: r[2] ||= (e) => st.value = e
@@ -14788,7 +14781,7 @@ var Fp = { style: {
14788
14781
  class: y(["ag-charts-tooltip pv-data-table-with-chart__crossline-tooltip pv-tooltip-v2-content", R(ct).arrowClass]),
14789
14782
  "data-variant": "white",
14790
14783
  style: x(R(ct).style)
14791
- }, [s("div", zp, [s("div", Bp, F(R(ct).label), 1), s("div", Vp, F(R(ct).value), 1)])], 6)) : a("", !0)], 4)], 6)), dt.value ? a("", !0) : (D(), o("div", Hp, [J.value ? (D(), o("div", Up, [(D(), i(N(e.emptyChartFilterRenderer)))])) : zt.value ? (D(), o("p", Wp, F(Ft.value), 1)) : a("", !0)]))], 4)])], 2)
14784
+ }, [s("div", Rp, [s("div", zp, F(R(ct).label), 1), s("div", Bp, F(R(ct).value), 1)])], 6)) : a("", !0)], 4)], 6)), dt.value ? a("", !0) : (D(), o("div", Vp, [J.value ? (D(), o("div", Hp, [(D(), i(N(e.emptyChartFilterRenderer)))])) : zt.value ? (D(), o("p", Up, F(Ft.value), 1)) : a("", !0)]))], 4)])], 2)
14792
14785
  ])),
14793
14786
  u(wf, _({
14794
14787
  ref_key: "pvDataTableRef",
@@ -14826,7 +14819,7 @@ var Fp = { style: {
14826
14819
  }, 16, ["filterTeleportLocation", "pagination"])
14827
14820
  ]));
14828
14821
  }
14829
- }), Kp = "Unable to load data", qp = (e, t = {}) => {
14822
+ }), Gp = "Unable to load data", Kp = (e, t = {}) => {
14830
14823
  let n = k([]), i = k(!1), a = k(), o = 0, s = async () => {
14831
14824
  let t = ++o;
14832
14825
  i.value = !0;
@@ -14856,6 +14849,6 @@ var Fp = { style: {
14856
14849
  };
14857
14850
  };
14858
14851
  //#endregion
14859
- export { Kp as DEFAULT_DATA_WIDGET_ERROR_TEXT, wt as PitViperAGChartsMonochromeTheme, Ct as PitViperAGChartsMonochromeThemeName, Et as PitViperAGChartsMulticolorTheme, Tt as PitViperAGChartsMulticolorThemeName, nn as PvChart, wn as PvChartWidget, wf as PvDataTable, Gp as PvDataTableWithChart, Js as PvDataWidget, Ao as PvMapChart, wl as RumContextKey, _t as SCATTER_MARKER_STROKE, El as addRumAction, Ru as constructAdvancedFilterCondition, zu as convertFilterModelToAdvanced, _d as createPvDataTableFilterStore, Dl as deferRumTask, fd as excludeValueFromSetFilter, Gu as filterModelContainsColId, rd as filterModelsEqual, cd as getSelectedValues, od as getSelectedValuesFromAdvancedFilterModel, Zu as getSelectedValuesFromFilterModel, sd as getSelectedValuesFromFilterModelByColId, Qu as isAdvancedFilterModel, ed as isFilterModelEmpty, id as mergeAdvancedFilterCondition, Ku as mergeFilterModels, vd as providePvDataTableFilterStore, ld as removeColumnFilter, ad as removeColumnFromAdvancedFilter, dd as updateMultiOrSetFilter, ud as updateSetFilter, bd as usePvDataTableFilterStore, qp as usePvDataWidgetData, Tl as useRumContext };
14852
+ export { Gp as DEFAULT_DATA_WIDGET_ERROR_TEXT, wt as PitViperAGChartsMonochromeTheme, Ct as PitViperAGChartsMonochromeThemeName, Et as PitViperAGChartsMulticolorTheme, Tt as PitViperAGChartsMulticolorThemeName, nn as PvChart, wn as PvChartWidget, wf as PvDataTable, Wp as PvDataTableWithChart, Js as PvDataWidget, Ao as PvMapChart, wl as RumContextKey, _t as SCATTER_MARKER_STROKE, El as addRumAction, Ru as constructAdvancedFilterCondition, zu as convertFilterModelToAdvanced, _d as createPvDataTableFilterStore, Dl as deferRumTask, fd as excludeValueFromSetFilter, Gu as filterModelContainsColId, rd as filterModelsEqual, cd as getSelectedValues, od as getSelectedValuesFromAdvancedFilterModel, Zu as getSelectedValuesFromFilterModel, sd as getSelectedValuesFromFilterModelByColId, Qu as isAdvancedFilterModel, ed as isFilterModelEmpty, id as mergeAdvancedFilterCondition, Ku as mergeFilterModels, vd as providePvDataTableFilterStore, ld as removeColumnFilter, ad as removeColumnFromAdvancedFilter, dd as updateMultiOrSetFilter, ud as updateSetFilter, bd as usePvDataTableFilterStore, Kp as usePvDataWidgetData, Tl as useRumContext };
14860
14853
 
14861
14854
  //# sourceMappingURL=pv-components-visualizations.mjs.map