@turquoisehealth/pit-viper 2.152.2 → 2.154.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 (39) hide show
  1. package/_site/assets/css/pit-viper-consumer.css +8 -3
  2. package/_src/assets/sprite-v2.svg +1 -1
  3. package/_src/assets/sprite.svg +1 -1
  4. package/package.json +1 -1
  5. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  6. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  7. package/pv-components/dist/stats/web/pv-menu-stats.html +1 -1
  8. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
  9. package/pv-components/dist/stats/web/pv-query-builder-input-stats.html +1 -1
  10. package/pv-components/dist/stats/web/pv-segmented-control-stats.html +1 -1
  11. package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
  12. package/pv-components/dist/stats/web/pv-toggle-group-stats.html +1 -1
  13. package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +1 -1
  14. package/pv-components/dist/vue/base/components/base/PvMenu/cascadeUtils.d.ts +14 -0
  15. package/pv-components/dist/vue/base/components/base/PvMenu/items/PvMenuItemVariant.vue.d.ts +4 -1
  16. package/pv-components/dist/vue/base/components/base/PvMenu/types.d.ts +1 -0
  17. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -0
  18. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/mocks.d.ts +1 -0
  19. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +4 -0
  20. package/pv-components/dist/vue/base/pv-components-base.mjs +2165 -2122
  21. package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
  22. package/pv-components/dist/vue/visualizations/components/base/PvMenu/cascadeUtils.d.ts +14 -0
  23. package/pv-components/dist/vue/visualizations/components/base/PvMenu/items/PvMenuItemVariant.vue.d.ts +4 -1
  24. package/pv-components/dist/vue/visualizations/components/base/PvMenu/types.d.ts +1 -0
  25. package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -0
  26. package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/mocks.d.ts +1 -0
  27. package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/types.d.ts +4 -0
  28. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/chartTypeRegistry.d.ts +27 -0
  29. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/constants.d.ts +3 -0
  30. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/types.d.ts +1 -1
  31. package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/helpers.d.ts +1 -0
  32. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +3626 -3357
  33. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
  34. package/pv-components/dist/web/components/pv-menu/pv-menu.js +537 -509
  35. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +1107 -1064
  36. package/pv-components/dist/web/components/pv-query-builder-input/pv-query-builder-input.js +1110 -1089
  37. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +1118 -1089
  38. package/pv-components/dist/web/pv-components.iife.js +49 -49
  39. package/pv-components/dist/web/pv-components.iife.js.map +1 -1
@@ -0,0 +1,14 @@
1
+ import { MenuOption } from '../../../types';
2
+ /** Recursively collect all leaf (childless) options from a tree. */
3
+ export declare function collectLeafOptions<T>(options: MenuOption<T>[]): MenuOption<T>[];
4
+ /**
5
+ * Recursively filter a tree for a search value.
6
+ *
7
+ * - If a node's own text matches, it is kept with all its children intact.
8
+ * - If a node's own text does NOT match but one or more of its descendants do,
9
+ * the node is kept as a container showing only the matching descendants.
10
+ * This means a search term that matches a child will surface that child even
11
+ * when the parent label itself doesn't contain the search term.
12
+ * - Nodes with no match anywhere in their subtree are removed entirely.
13
+ */
14
+ export declare function filterOptionsRecursive<T>(options: MenuOption<T>[], searchValue: string): MenuOption<T>[];
@@ -2,6 +2,7 @@ import { MenuOption, MenuOptionConfig, MenuOptionSelectedEvent } from '../../../
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  export interface PvMenuItemVariantProps extends MenuOption {
4
4
  selected?: boolean;
5
+ indeterminate?: boolean;
5
6
  queryText?: string | null;
6
7
  highlightSearchText?: boolean;
7
8
  menuOptionConfig?: MenuOptionConfig;
@@ -10,5 +11,7 @@ declare const _default: DefineComponent<PvMenuItemVariantProps, {}, {}, {}, {},
10
11
  "handle-selected": (payload: MenuOptionSelectedEvent) => any;
11
12
  }, string, PublicProps, Readonly<PvMenuItemVariantProps> & Readonly<{
12
13
  "onHandle-selected"?: ((payload: MenuOptionSelectedEvent) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLLabelElement>;
14
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
15
+ inputRef: HTMLInputElement;
16
+ }, HTMLLabelElement>;
14
17
  export default _default;
@@ -7,4 +7,5 @@ export interface PvMenuProps {
7
7
  itemClass?: string;
8
8
  isLoading?: boolean;
9
9
  singleSelect?: boolean;
10
+ enableCascadeSelection?: boolean;
10
11
  }
@@ -47,6 +47,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
47
47
  options: MenuOption<T>[];
48
48
  menuActionsVariant: MenuActionsVariant | null;
49
49
  highlightSearchText: boolean;
50
+ enableCascadeSelection: boolean;
50
51
  }): any;
51
52
  'no-results'?(_: {
52
53
  selectedItems: MenuOption<T>[];
@@ -79,6 +80,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
79
80
  options: MenuOption<T>[];
80
81
  menuActionsVariant: MenuActionsVariant | null;
81
82
  highlightSearchText: boolean;
83
+ enableCascadeSelection: boolean;
82
84
  }): any;
83
85
  footer?(_: {
84
86
  selectedItems: MenuOption<T>[];
@@ -111,6 +113,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
111
113
  options: MenuOption<T>[];
112
114
  menuActionsVariant: MenuActionsVariant | null;
113
115
  highlightSearchText: boolean;
116
+ enableCascadeSelection: boolean;
114
117
  }): any;
115
118
  };
116
119
  emit: {
@@ -12,4 +12,5 @@ export declare const checkboxOptions: {
12
12
  id: string;
13
13
  text: string;
14
14
  }[];
15
+ export declare const nestedOptions: MenuOption[];
15
16
  export declare const checkboxOptionsWithGroups: MenuOption[];
@@ -37,6 +37,10 @@ export interface PvMultiSelectButtonProps<T = unknown, SlotContext extends Recor
37
37
  slotContext?: SlotContext;
38
38
  /** Whether to highlight the search text in the options list */
39
39
  highlightSearchText?: boolean;
40
+ /** Enable cascade (parent/child) selection. When true, clicking a parent option
41
+ * toggles all its leaf descendants, and parent checkboxes show indeterminate state
42
+ * when partially selected. All existing behavior is unchanged when false (default). */
43
+ enableCascadeSelection?: boolean;
40
44
  }
41
45
  export interface PvMultiSelectButtonSlotProps<T = unknown, SlotContext = Record<string, unknown>> extends Omit<PvMultiSelectButtonProps, "slotContext"> {
42
46
  searchInput?: string;