@turquoisehealth/pit-viper 2.182.1-dev.2 → 2.182.1-dev.4

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 (24) hide show
  1. package/package.json +1 -1
  2. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  3. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  4. package/pv-components/dist/stats/web/pv-menu-stats.html +1 -1
  5. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
  6. package/pv-components/dist/stats/web/pv-query-builder-input-stats.html +1 -1
  7. package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
  8. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -0
  9. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +3 -1
  10. package/pv-components/dist/vue/base/pv-components-base.mjs +41 -37
  11. package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
  12. package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -0
  13. package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/types.d.ts +3 -1
  14. package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/types.d.ts +2 -0
  15. package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/useFilterStore.d.ts +2 -0
  16. package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/useSetFilter.d.ts +1 -0
  17. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +1595 -1588
  18. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
  19. package/pv-components/dist/web/components/pv-menu/pv-menu.js +39 -36
  20. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +41 -37
  21. package/pv-components/dist/web/components/pv-query-builder-input/pv-query-builder-input.js +63 -60
  22. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +39 -36
  23. package/pv-components/dist/web/pv-components.iife.js +1 -1
  24. package/pv-components/dist/web/pv-components.iife.js.map +1 -1
@@ -34,6 +34,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
34
34
  groupings: string[];
35
35
  hideParentOnChildQueryMatch: boolean;
36
36
  icon: string;
37
+ hasMoreOptions: boolean;
37
38
  optionsAction: MenuAction<T> | undefined;
38
39
  optionsRenderer: Component;
39
40
  overlayTrigger: boolean;
@@ -72,6 +73,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
72
73
  groupings: string[];
73
74
  hideParentOnChildQueryMatch: boolean;
74
75
  icon: string;
76
+ hasMoreOptions: boolean;
75
77
  optionsAction: MenuAction<T> | undefined;
76
78
  optionsRenderer: Component;
77
79
  overlayTrigger: boolean;
@@ -110,6 +112,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
110
112
  groupings: string[];
111
113
  hideParentOnChildQueryMatch: boolean;
112
114
  icon: string;
115
+ hasMoreOptions: boolean;
113
116
  optionsAction: MenuAction<T> | undefined;
114
117
  optionsRenderer: Component;
115
118
  overlayTrigger: boolean;
@@ -47,6 +47,8 @@ export interface PvMultiSelectButtonProps<T = unknown, SlotContext extends Recor
47
47
  icon?: string;
48
48
  /** Show a loading spinner inside the dropdown */
49
49
  isLoading?: boolean;
50
+ /** Whether more top-level options are available after the loaded options */
51
+ hasMoreOptions?: boolean;
50
52
  /** Text label on the trigger button */
51
53
  label?: string;
52
54
  /** Style of the footer action panel. "select-clear" shows select/clear all; "cancel-confirm" requires explicit confirmation. */
@@ -82,7 +84,7 @@ export interface PvMultiSelectButtonProps<T = unknown, SlotContext extends Recor
82
84
  /** CSS selector for teleporting the popover dropdown */
83
85
  teleportLocation?: string;
84
86
  /** Total available top-level options (may exceed options.length when paginating).
85
- * When totalOptionCount > options.length, a "See more" button appears. */
87
+ * Used as a fallback to show "See more" when hasMoreOptions is not provided. */
86
88
  totalOptionCount?: number;
87
89
  /** Visual style of the trigger button */
88
90
  variant?: PvSelectButtonVariant;
@@ -2709,26 +2709,26 @@ var wi = Symbol("SelectedItemsKey"), Ti = Symbol("EnableCascadeSelectionKey"), E
2709
2709
  }),
2710
2710
  emits: /* @__PURE__ */ g(["handle-selected", "see-more"], ["update:selectedIds"]),
2711
2711
  setup(e, { emit: n }) {
2712
- let i = e, s = m(wi, void 0), c = I(e, "selectedIds"), l = m(Ai, D(!1)), d = m(ki, D(!1)), f = m(Di, void 0), p = m(Oi, void 0), h = D(i.defaultExpanded ?? !1), g = D(!1), v = D(i.children ?? []), b = D(/* @__PURE__ */ new Set());
2712
+ let i = e, s = m(wi, void 0), c = I(e, "selectedIds"), l = m(Ai, D(!1)), d = m(ki, D(!1)), f = m(Di, void 0), p = m(Oi, void 0), h = D(i.defaultExpanded ?? !1), g = D(!1), v = D(!1), b = D(i.children ?? []), S = D(/* @__PURE__ */ new Set());
2713
2713
  V(() => i.children, (e) => {
2714
2714
  if (!e) {
2715
- v.value = [];
2715
+ b.value = [];
2716
2716
  return;
2717
2717
  }
2718
- let t = v.value.filter((e) => b.value.has(e.id)), n = new Set(e.map((e) => e.id)), r = t.filter((e) => !n.has(e.id));
2719
- v.value = [...e, ...r];
2718
+ let t = b.value.filter((e) => S.value.has(e.id)), n = new Set(e.map((e) => e.id)), r = t.filter((e) => !n.has(e.id));
2719
+ b.value = [...e, ...r], v.value = !1;
2720
2720
  });
2721
- let S = () => {
2721
+ let C = () => {
2722
2722
  h.value = !h.value;
2723
- }, C = r(() => ({ paddingLeft: `${i.level * 12 + 12}px` })), w = r(() => {
2723
+ }, w = r(() => ({ paddingLeft: `${i.level * 12 + 12}px` })), E = r(() => {
2724
2724
  let { level: e, config: t, itemClass: n, ...r } = i;
2725
2725
  return r;
2726
- }), E = r(() => v.value.length > 0 && i.level < Li), k = r(() => E.value ? l.value ? h.value : !0 : !1), j = r(() => h.value ? "chevron-down" : "chevron-right"), M = (e) => s && Array.isArray(s.value) ? s.value.some((t) => t.id === e.id) : c.value.includes(e.id), N = n, F = r(() => i.totalChildCount == null ? !1 : i.totalChildCount > v.value.length), ee = async () => {
2726
+ }), k = r(() => (b.value.length > 0 || (i.totalChildCount ?? 0) > 0) && i.level < Li), j = r(() => k.value ? l.value ? h.value : !0 : !1), M = r(() => h.value ? "chevron-down" : "chevron-right"), N = (e) => s && Array.isArray(s.value) ? s.value.some((t) => t.id === e.id) : c.value.includes(e.id), F = n, ee = r(() => v.value || i.totalChildCount == null ? !1 : i.totalChildCount > b.value.length), L = async () => {
2727
2727
  if (g.value) return;
2728
2728
  if (!i.handleSeeMore) {
2729
- N("see-more", {
2729
+ F("see-more", {
2730
2730
  parentId: i.id,
2731
- offset: v.value.length
2731
+ offset: b.value.length
2732
2732
  });
2733
2733
  return;
2734
2734
  }
@@ -2737,50 +2737,53 @@ var wi = Symbol("SelectedItemsKey"), Ti = Symbol("EnableCascadeSelectionKey"), E
2737
2737
  try {
2738
2738
  let t = await i.handleSeeMore({
2739
2739
  parentId: i.id,
2740
- offset: v.value.length
2740
+ offset: b.value.length
2741
2741
  });
2742
2742
  if (Array.isArray(t) && t.length > 0) {
2743
- let n = new Set(v.value.map((e) => e.id)), r = t.filter((e) => !n.has(e.id));
2744
- if (r.length === 0) return;
2745
- let a = new Set(b.value);
2743
+ let n = new Set(b.value.map((e) => e.id)), r = t.filter((e) => !n.has(e.id));
2744
+ if (r.length === 0) {
2745
+ v.value = !0;
2746
+ return;
2747
+ }
2748
+ let a = new Set(S.value);
2746
2749
  for (let e of r) a.add(e.id);
2747
- if (b.value = a, v.value = [...v.value, ...r], e && s?.value) {
2750
+ if (S.value = a, b.value = [...b.value, ...r], e && s?.value) {
2748
2751
  let e = p?.value?.get(i.id), t = e ? r.filter((t) => !e.has(t.id)) : r;
2749
2752
  if (t.length > 0) {
2750
2753
  let e = new Set(s.value.map((e) => e.id)), n = t.filter((t) => !e.has(t.id));
2751
2754
  n.length > 0 && (s.value = [...s.value, ...n]);
2752
2755
  }
2753
2756
  }
2754
- }
2757
+ } else Array.isArray(t) && (v.value = !0);
2755
2758
  } finally {
2756
2759
  g.value = !1;
2757
2760
  }
2758
- }, L = (e) => {
2759
- if (l.value && E.value && e.option.id === i.id && !d.value) {
2760
- S();
2761
+ }, R = (e) => {
2762
+ if (l.value && k.value && e.option.id === i.id && !d.value) {
2763
+ C();
2761
2764
  return;
2762
2765
  }
2763
2766
  if (!s) {
2764
2767
  let t = c.value.indexOf(e.option.id);
2765
2768
  t > -1 ? c.value = [...c.value.slice(0, t), ...c.value.slice(t + 1)] : c.value = [...c.value, e.option.id];
2766
2769
  }
2767
- N("handle-selected", e);
2768
- }, R = (e) => {
2769
- N("handle-selected", e);
2770
+ F("handle-selected", e);
2771
+ }, z = (e) => {
2772
+ F("handle-selected", e);
2770
2773
  };
2771
2774
  return (n, r) => {
2772
2775
  let s = A("PvMenuItem", !0);
2773
- return T(), o(t, null, [u(Pi, _(w.value, {
2774
- children: v.value,
2776
+ return T(), o(t, null, [u(Pi, _(E.value, {
2777
+ children: b.value,
2775
2778
  menuOptionConfig: e.config,
2776
2779
  queryText: e.queryText,
2777
2780
  highlightSearchText: e.highlightSearchText,
2778
- showChevron: P(l) && E.value,
2779
- chevronIcon: j.value,
2781
+ showChevron: P(l) && k.value,
2782
+ chevronIcon: M.value,
2780
2783
  expanded: h.value,
2781
- onHandleSelected: L,
2782
- onToggleExpanded: S,
2783
- selected: M(i)
2784
+ onHandleSelected: R,
2785
+ onToggleExpanded: C,
2786
+ selected: N(i)
2784
2787
  }), null, 16, [
2785
2788
  "children",
2786
2789
  "menuOptionConfig",
@@ -2790,13 +2793,13 @@ var wi = Symbol("SelectedItemsKey"), Ti = Symbol("EnableCascadeSelectionKey"), E
2790
2793
  "chevronIcon",
2791
2794
  "expanded",
2792
2795
  "selected"
2793
- ]), k.value ? (T(), o("ul", {
2796
+ ]), j.value ? (T(), o("ul", {
2794
2797
  key: 0,
2795
2798
  role: "list",
2796
- style: x(C.value)
2797
- }, [(T(!0), o(t, null, O(v.value, (t) => (T(), o("li", {
2799
+ style: x(w.value)
2800
+ }, [(T(!0), o(t, null, O(b.value, (t) => (T(), o("li", {
2798
2801
  key: t.id,
2799
- "data-active": M(t) ? "true" : null,
2802
+ "data-active": N(t) ? "true" : null,
2800
2803
  class: y(e.itemClass)
2801
2804
  }, [u(s, _({ ref_for: !0 }, t, {
2802
2805
  selectedIds: c.value,
@@ -2805,21 +2808,21 @@ var wi = Symbol("SelectedItemsKey"), Ti = Symbol("EnableCascadeSelectionKey"), E
2805
2808
  queryText: e.queryText,
2806
2809
  highlightSearchText: e.highlightSearchText,
2807
2810
  level: e.level + 1,
2808
- onHandleSelected: R,
2809
- onSeeMore: r[1] ||= (e) => N("see-more", e)
2811
+ onHandleSelected: z,
2812
+ onSeeMore: r[1] ||= (e) => F("see-more", e)
2810
2813
  }), null, 16, [
2811
2814
  "selectedIds",
2812
2815
  "config",
2813
2816
  "queryText",
2814
2817
  "highlightSearchText",
2815
2818
  "level"
2816
- ])], 10, Fi))), 128)), F.value ? (T(), o("li", Ii, [u(J, {
2819
+ ])], 10, Fi))), 128)), ee.value ? (T(), o("li", Ii, [u(J, {
2817
2820
  class: "pv-text-brand",
2818
2821
  variant: "ghost",
2819
2822
  label: "See more",
2820
2823
  loading: g.value,
2821
2824
  "data-testid": "pv-menu-item-see-more",
2822
- onClick: ee
2825
+ onClick: L
2823
2826
  }, null, 8, ["loading"])])) : a("", !0)], 4)) : a("", !0)], 64);
2824
2827
  };
2825
2828
  }
@@ -2970,6 +2973,7 @@ var wi = Symbol("SelectedItemsKey"), Ti = Symbol("EnableCascadeSelectionKey"), E
2970
2973
  },
2971
2974
  icon: {},
2972
2975
  isLoading: { type: Boolean },
2976
+ hasMoreOptions: { type: Boolean },
2973
2977
  label: { default: "Select" },
2974
2978
  menuActionsVariant: { default: "select-clear" },
2975
2979
  options: { default: () => [] },
@@ -3049,7 +3053,7 @@ var wi = Symbol("SelectedItemsKey"), Ti = Symbol("EnableCascadeSelectionKey"), E
3049
3053
  state: "selected"
3050
3054
  });
3051
3055
  return t;
3052
- }, C = r(() => c.totalOptionCount == null ? !1 : c.totalOptionCount > c.options.length), w = r(() => {
3056
+ }, C = r(() => c.hasMoreOptions == null ? c.totalOptionCount == null ? !1 : c.totalOptionCount > c.options.length : c.hasMoreOptions), w = r(() => {
3053
3057
  if (c.enableCascadeSelection && c.countSelectedParents && z.value?.length) return Si(z.value);
3054
3058
  if (!c.countSelectedParents || !c.enableCascadeSelection) return G.value.length;
3055
3059
  let e = new Set(G.value.map((e) => e.id));