@turquoisehealth/pit-viper 2.231.0 → 2.233.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.
- package/_site/assets/css/pit-viper-a11y.css +29 -1
- package/_site/assets/css/pit-viper-consumer.css +29 -1
- package/_site/assets/css/pit-viper-v2-scoped.css +25 -1
- package/_site/assets/css/pit-viper-v2.css +29 -1
- package/_site/assets/css/pit-viper.css +29 -1
- package/package.json +1 -1
- package/pv-components/dist/stats/vue/base/stats.html +1 -1
- package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
- package/pv-components/dist/stats/web/pv-action-button-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-filter-modal-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-filter-panel-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-hover-action-menu-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-menu-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-popover-v2-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-query-builder-input-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-range-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-segmented-control-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-sidebar-v2-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-split-button-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-toggle-group-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +1 -1
- package/pv-components/dist/vue/ai/components/base/PvFilterModal/PvFilterModal.vue.d.ts +2 -0
- package/pv-components/dist/vue/ai/components/base/PvFilterPanel/PvFilterPanel.vue.d.ts +5 -0
- package/pv-components/dist/vue/ai/components/base/PvFilterPanel/PvFilterPanelCategoryButtonRow.vue.d.ts +1 -0
- package/pv-components/dist/vue/ai/components/base/PvFilterPanel/types.d.ts +45 -2
- package/pv-components/dist/vue/ai/components/base/PvFilterPanel/usePvFilterPanel.d.ts +3 -0
- package/pv-components/dist/vue/ai/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -0
- package/pv-components/dist/vue/ai/components/base/PvMultiSelectButton/types.d.ts +4 -0
- package/pv-components/dist/vue/ai/components/base/PvRange/PvRange.vue.d.ts +3 -1
- package/pv-components/dist/vue/ai/components/base/PvRange/types.d.ts +9 -1
- package/pv-components/dist/vue/base/components/base/PvFilterModal/PvFilterModal.vue.d.ts +2 -0
- package/pv-components/dist/vue/base/components/base/PvFilterPanel/PvFilterPanel.vue.d.ts +5 -0
- package/pv-components/dist/vue/base/components/base/PvFilterPanel/PvFilterPanelCategoryButtonRow.vue.d.ts +1 -0
- package/pv-components/dist/vue/base/components/base/PvFilterPanel/types.d.ts +45 -2
- package/pv-components/dist/vue/base/components/base/PvFilterPanel/usePvFilterPanel.d.ts +3 -0
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -0
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +4 -0
- package/pv-components/dist/vue/base/components/base/PvRange/PvRange.vue.d.ts +3 -1
- package/pv-components/dist/vue/base/components/base/PvRange/types.d.ts +9 -1
- package/pv-components/dist/vue/base/pv-components-base.mjs +2396 -2283
- package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
- package/pv-components/dist/vue/visualizations/components/base/PvFilterModal/PvFilterModal.vue.d.ts +2 -0
- package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/PvFilterPanel.vue.d.ts +5 -0
- package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/PvFilterPanelCategoryButtonRow.vue.d.ts +1 -0
- package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/types.d.ts +45 -2
- package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/usePvFilterPanel.d.ts +3 -0
- package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -0
- package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/types.d.ts +4 -0
- package/pv-components/dist/vue/visualizations/components/base/PvRange/PvRange.vue.d.ts +3 -1
- package/pv-components/dist/vue/visualizations/components/base/PvRange/types.d.ts +9 -1
- package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/types.d.ts +18 -1
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/types.d.ts +14 -0
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/useFilterStore.d.ts +8 -0
- package/pv-components/dist/vue/visualizations/components/tables/symbols.d.ts +4 -0
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +991 -925
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
- package/pv-components/dist/web/components/pv-action-button/pv-action-button.js +395 -395
- package/pv-components/dist/web/components/pv-filter-modal/pv-filter-modal.js +2176 -2007
- package/pv-components/dist/web/components/pv-filter-panel/pv-filter-panel.js +2172 -1946
- package/pv-components/dist/web/components/pv-hover-action-menu/pv-hover-action-menu.js +633 -633
- package/pv-components/dist/web/components/pv-menu/pv-menu.js +19 -19
- package/pv-components/dist/web/components/pv-modal/pv-modal.js +2 -2
- package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +27 -19
- package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +19 -19
- package/pv-components/dist/web/components/pv-query-builder-input/pv-query-builder-input.js +573 -573
- package/pv-components/dist/web/components/pv-range/pv-range.js +720 -675
- package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +208 -208
- package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +19 -19
- package/pv-components/dist/web/components/pv-sidebar-v2/pv-sidebar-v2.js +267 -267
- package/pv-components/dist/web/components/pv-split-button/pv-split-button.js +19 -19
- package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +307 -307
- package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +19 -19
- package/pv-components/dist/web/pv-components.iife.js +14 -14
- package/pv-components/dist/web/pv-components.iife.js.map +1 -1
|
@@ -2,7 +2,7 @@ import { Component, Ref } from 'vue';
|
|
|
2
2
|
import { AdvancedFilterModel, FilterModel } from 'ag-grid-enterprise';
|
|
3
3
|
import { MenuOption, MultiSelectState } from '../../../types';
|
|
4
4
|
import { ColDef, ValueFormatterFunc } from 'ag-grid-community';
|
|
5
|
-
import { PvRangeValue } from '../PvRange/types';
|
|
5
|
+
import { PvRangeScale, PvRangeValue } from '../PvRange/types';
|
|
6
6
|
export type PvFilterPanelCategory = string;
|
|
7
7
|
export type PvFilterPanelFilterType = "value" | "range" | "boolean" | "exists";
|
|
8
8
|
export type PvFilterPanelFilterModelType = "advanced" | "regular";
|
|
@@ -79,6 +79,13 @@ export interface PvFilterPanelRangeConfig {
|
|
|
79
79
|
max?: number | null;
|
|
80
80
|
/** Step increment for range controls in reusable filter panel UIs. */
|
|
81
81
|
step?: number | null;
|
|
82
|
+
/**
|
|
83
|
+
* Track mapping for range controls in reusable filter panel UIs. `linear` spreads values evenly,
|
|
84
|
+
* `log` gives small values proportionally more track. Defaults to `linear` when unset.
|
|
85
|
+
*/
|
|
86
|
+
scale?: PvRangeScale;
|
|
87
|
+
/** Icon rendered inside the leading edge of both range inputs. Accepts any Pit Viper icon name. */
|
|
88
|
+
inputIcon?: string | null;
|
|
82
89
|
}
|
|
83
90
|
export interface PvFilterPanelColDefContext {
|
|
84
91
|
/**
|
|
@@ -324,10 +331,24 @@ export interface PvFilterPanelGroupOption {
|
|
|
324
331
|
isActive: boolean;
|
|
325
332
|
label: string;
|
|
326
333
|
}
|
|
327
|
-
export type PvFilterPanelOptionsHandlerReason = "open" | "search" | "load-more" | "child-load-more";
|
|
334
|
+
export type PvFilterPanelOptionsHandlerReason = "open" | "search" | "load-more" | "child-load-more" | "facet-change";
|
|
328
335
|
export interface PvFilterPanelOptionsHandlerParams {
|
|
329
336
|
field: string;
|
|
330
337
|
colDef: PvFilterPanelColDef;
|
|
338
|
+
/**
|
|
339
|
+
* Active secondary facet selections for this field, keyed by facet key (see
|
|
340
|
+
* `colDef.context.filterPanel`). Facets with nothing selected are omitted, so an empty object
|
|
341
|
+
* means "no narrowing".
|
|
342
|
+
*
|
|
343
|
+
* Sent on every request once a handler is in play, because a handler holding the list is the only
|
|
344
|
+
* thing that can narrow options it has not sent to the browser yet. Narrow by these *before*
|
|
345
|
+
* slicing a page, or a facet value whose matches sit past the first page reads as "no matches".
|
|
346
|
+
*
|
|
347
|
+
* Ignoring them is safe for a handler that returns the whole list at once: options carrying
|
|
348
|
+
* `metadata.filters[facetKey]` are still narrowed in the browser. Options that omit that metadata
|
|
349
|
+
* are taken as already narrowed, so a handler that applied the facets need not echo them back.
|
|
350
|
+
*/
|
|
351
|
+
facets?: Record<string, string[]>;
|
|
331
352
|
filterModel?: PvFilterPanelFilterModel;
|
|
332
353
|
limit?: number;
|
|
333
354
|
offset?: number;
|
|
@@ -364,11 +385,15 @@ export interface PvFilterStore {
|
|
|
364
385
|
filterTotalCountMap: Ref<Record<string, number | undefined>>;
|
|
365
386
|
filterChildHasMoreMap: Ref<Record<string, boolean | undefined>>;
|
|
366
387
|
filterChildTotalCountMap: Ref<Record<string, number | undefined>>;
|
|
388
|
+
/** Active facet selections per field, keyed by facet key. Sent with every fetch for that field. */
|
|
389
|
+
filterFacetSelectionMap: Ref<Record<string, Record<string, string[]>>>;
|
|
367
390
|
getFilterOptions: (field: string) => (PvFilterPanelOption | null)[];
|
|
368
391
|
getFilterSelectedValues: (field: string, staged?: boolean) => (string | null)[];
|
|
369
392
|
initStagedFilterSelections: () => void;
|
|
370
393
|
setFilterOptions: (field: string, options: (PvFilterPanelOption | null)[]) => void;
|
|
371
394
|
setFilterOptionsHandler: (handler?: PvFilterPanelOptionsHandler) => void;
|
|
395
|
+
/** Record a field's facet selections, so every later fetch for that field carries them. */
|
|
396
|
+
setFilterFacetSelections: (field: string, facets: Record<string, string[]>) => void;
|
|
372
397
|
setFilterSearchQuery: (field: string, query: string | null | undefined) => void;
|
|
373
398
|
setFilterSelectedValues: (field: string, values: (string | null)[], staged?: boolean) => void;
|
|
374
399
|
stagedFilterModel: Ref<PvFilterPanelFilterModel>;
|
|
@@ -413,8 +438,12 @@ export interface PvFilterPanelResolvedFilter {
|
|
|
413
438
|
label: string;
|
|
414
439
|
loadingText?: string;
|
|
415
440
|
options?: PvFilterPanelOption[];
|
|
441
|
+
/** See `filterPanelRange.inputIcon`. */
|
|
442
|
+
rangeInputIcon?: string | null;
|
|
416
443
|
rangeMax?: number | null;
|
|
417
444
|
rangeMin?: number | null;
|
|
445
|
+
/** See `filterPanelRange.scale`. */
|
|
446
|
+
rangeScale?: PvRangeScale;
|
|
418
447
|
rangeStep?: number | null;
|
|
419
448
|
rangeValue?: PvRangeValue;
|
|
420
449
|
searchPlaceholder?: string;
|
|
@@ -436,6 +465,8 @@ export interface PvFilterPanelAppliedFiltersSectionProps {
|
|
|
436
465
|
readOnly?: boolean;
|
|
437
466
|
}
|
|
438
467
|
export interface PvFilterPanelCategoryButtonRowProps {
|
|
468
|
+
/** Label for the button that clears the category selection. */
|
|
469
|
+
allCategoriesLabel?: string;
|
|
439
470
|
categoryOrder?: PvFilterPanelCategory[];
|
|
440
471
|
filters?: PvFilterPanelResolvedFilter[];
|
|
441
472
|
}
|
|
@@ -465,6 +496,8 @@ export type PvFilterPanelEmits = {
|
|
|
465
496
|
cancel: [];
|
|
466
497
|
/** Emitted when a consumer-controlled value filter selection changes. */
|
|
467
498
|
"controlled-change": [filterKey: string, values: string[], colDef: PvFilterPanelColDef];
|
|
499
|
+
/** Emitted when a secondary facet selection changes (see `colDef.context.filterPanel`). */
|
|
500
|
+
"facet-change": [field: string, facets: Record<string, string[]>, colDef: PvFilterPanelColDef];
|
|
468
501
|
"filter-change": [event: PvFilterPanelFilterChangeEvent];
|
|
469
502
|
"focus-change": [field: string, value: string, option: PvFilterPanelOption];
|
|
470
503
|
"handle-settings-icon": [field: string, colDef: PvFilterPanelColDef];
|
|
@@ -475,6 +508,8 @@ export type PvFilterPanelEmits = {
|
|
|
475
508
|
};
|
|
476
509
|
export type PvFilterPanelEmitFn = <K extends keyof PvFilterPanelEmits>(event: K, ...args: PvFilterPanelEmits[K]) => void;
|
|
477
510
|
export interface PvFilterPanelProps {
|
|
511
|
+
/** Label for the category-row button that clears the category selection. */
|
|
512
|
+
allCategoriesLabel?: string;
|
|
478
513
|
applyLabel?: string;
|
|
479
514
|
ariaLabel?: string;
|
|
480
515
|
/** Auto-hide backing fields represented by aggregate filters and child fields represented by filter groups. */
|
|
@@ -492,6 +527,12 @@ export interface PvFilterPanelProps {
|
|
|
492
527
|
/** Whether dev-only filters should be shown. */
|
|
493
528
|
devMode?: boolean;
|
|
494
529
|
displayPreferencesIcon?: boolean;
|
|
530
|
+
/**
|
|
531
|
+
* Shows a search input under the category row that narrows the filter list by label.
|
|
532
|
+
* The search always spans every available filter: it ignores the selected category, which it
|
|
533
|
+
* resets to "All", and surfaces filters that are collapsed by default.
|
|
534
|
+
*/
|
|
535
|
+
enableFilterSearch?: boolean;
|
|
495
536
|
enableFocusView?: boolean;
|
|
496
537
|
/** @deprecated Prefer filterStore/filterOptionsHandler. Whether more value-filter options can be loaded, keyed by column key (`colId` when present, otherwise `field`). */
|
|
497
538
|
filterHasMoreMap?: Record<string, boolean | undefined>;
|
|
@@ -507,6 +548,8 @@ export interface PvFilterPanelProps {
|
|
|
507
548
|
filterOptions?: Record<string, PvFilterPanelOption[]>;
|
|
508
549
|
/** Fetches value-filter options. When provided without filterStore, PvFilterPanel creates an internal PvFilterStore. */
|
|
509
550
|
filterOptionsHandler?: PvFilterPanelOptionsHandler;
|
|
551
|
+
/** Placeholder for the filter search input shown when `enableFilterSearch` is true. */
|
|
552
|
+
filterSearchPlaceholder?: string;
|
|
510
553
|
/** @deprecated Prefer filterStore/filterOptionsHandler. Value-filter search queries keyed by column key (`colId` when present, otherwise `field`). */
|
|
511
554
|
filterSearchQueries?: Record<string, string | undefined>;
|
|
512
555
|
/** Suggested filter shortcuts shown above the category carousel. Active suggestions are hidden automatically. */
|
|
@@ -23,8 +23,11 @@ export declare function usePvFilterPanel(props: PvFilterPanelCoreProps, filterMo
|
|
|
23
23
|
clearAllFilters: () => void;
|
|
24
24
|
getSuggestionKey: (suggestion: PvFilterPanelSuggestion) => string;
|
|
25
25
|
handleControlChange: (field: string, change: PvFilterPanelControlChange) => void;
|
|
26
|
+
handleFacetChange: (filter: PvFilterPanelResolvedFilter, facets: Record<string, string[]>, query?: string) => void;
|
|
26
27
|
handleLoadMore: (filter: PvFilterPanelResolvedFilter, query: string, parentId?: string) => void;
|
|
27
28
|
handleSearchChange: (filter: PvFilterPanelResolvedFilter, query: string) => void;
|
|
28
29
|
handleSuggestionClick: (suggestion: PvFilterPanelSuggestion) => void;
|
|
29
30
|
removeAppliedFilter: (field: string, value: string, type?: PvFilterPanelFilterType) => void;
|
|
31
|
+
setFacetSelections: (field: string, facets: Record<string, string[]>) => void;
|
|
32
|
+
usesHandlerFacets: ComputedRef<boolean>;
|
|
30
33
|
};
|
package/pv-components/dist/vue/ai/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
62
62
|
optionsVariant: "checkbox" | "icon" | "toggle" | "simple" | "company" | "avatar" | "checkmark";
|
|
63
63
|
options: MenuOption<T>[];
|
|
64
64
|
menuActionsVariant: MenuActionsVariant | null;
|
|
65
|
+
singleSelect: boolean;
|
|
65
66
|
highlightSearchText: boolean;
|
|
66
67
|
enableCascadeSelection: boolean;
|
|
67
68
|
counterStyle: "primary" | "secondary";
|
|
@@ -107,6 +108,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
107
108
|
optionsVariant: "checkbox" | "icon" | "toggle" | "simple" | "company" | "avatar" | "checkmark";
|
|
108
109
|
options: MenuOption<T>[];
|
|
109
110
|
menuActionsVariant: MenuActionsVariant | null;
|
|
111
|
+
singleSelect: boolean;
|
|
110
112
|
highlightSearchText: boolean;
|
|
111
113
|
enableCascadeSelection: boolean;
|
|
112
114
|
counterStyle: "primary" | "secondary";
|
|
@@ -152,6 +154,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
152
154
|
optionsVariant: "checkbox" | "icon" | "toggle" | "simple" | "company" | "avatar" | "checkmark";
|
|
153
155
|
options: MenuOption<T>[];
|
|
154
156
|
menuActionsVariant: MenuActionsVariant | null;
|
|
157
|
+
singleSelect: boolean;
|
|
155
158
|
highlightSearchText: boolean;
|
|
156
159
|
enableCascadeSelection: boolean;
|
|
157
160
|
counterStyle: "primary" | "secondary";
|
|
@@ -71,6 +71,10 @@ export interface PvMultiSelectButtonProps<T = unknown, SlotContext extends Recor
|
|
|
71
71
|
optionsVariant?: Exclude<MenuOptionsVariant, "radio">;
|
|
72
72
|
/** Use an overlay-style trigger (auto-focuses search on open) */
|
|
73
73
|
overlayTrigger?: boolean;
|
|
74
|
+
/** Render options as radios: selecting an option replaces the current selection
|
|
75
|
+
* (clicking the selected option again deselects it). Ignored for cascade selection.
|
|
76
|
+
*/
|
|
77
|
+
singleSelect?: boolean;
|
|
74
78
|
/** When enableCascadeSelection is true, selecting a parent will select all children
|
|
75
79
|
* regardless of whether they are filtered by a search query. When false (default),
|
|
76
80
|
* selecting a parent will only select the children that are currently shown in the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PvRangeProps, PvRangeValue, PvRangeSize, PvRangeColor, PvRangeMode } from './types';
|
|
1
|
+
import { PvRangeProps, PvRangeValue, PvRangeSize, PvRangeColor, PvRangeScale, PvRangeMode } from './types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = PvRangeProps;
|
|
4
4
|
type __VLS_PublicProps = {
|
|
@@ -16,7 +16,9 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
|
|
|
16
16
|
label: string;
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
step: number | null;
|
|
19
|
+
inputIcon: string | null;
|
|
19
20
|
color: PvRangeColor;
|
|
21
|
+
scale: PvRangeScale;
|
|
20
22
|
mode: PvRangeMode;
|
|
21
23
|
showClear: boolean;
|
|
22
24
|
min: number | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type PvRangeColor = "single" | "multiple";
|
|
2
2
|
export type PvRangeMode = "single" | "dual";
|
|
3
|
+
export type PvRangeScale = "linear" | "log";
|
|
3
4
|
export type PvRangeSize = "sm" | "md" | "lg";
|
|
4
5
|
export interface PvRangeProps {
|
|
5
6
|
/** When true, min and max handles may have the same value in dual mode. */
|
|
@@ -13,6 +14,8 @@ export interface PvRangeProps {
|
|
|
13
14
|
/** Value display type for dual-mode inputs, tooltips, and bound labels. */
|
|
14
15
|
dataType?: string | null;
|
|
15
16
|
disabled?: boolean;
|
|
17
|
+
/** Icon rendered inside the leading edge of both dual-mode inputs. Accepts any Pit Viper icon name. */
|
|
18
|
+
inputIcon?: string | null;
|
|
16
19
|
/** Accessible group label in dual mode. */
|
|
17
20
|
label?: string;
|
|
18
21
|
/** Upper slider bound. */
|
|
@@ -23,6 +26,11 @@ export interface PvRangeProps {
|
|
|
23
26
|
minLabel?: string;
|
|
24
27
|
/** Slider interaction mode. `single` uses the default v-model; `dual` ignores modelValue and uses v-model:rangeValue. */
|
|
25
28
|
mode?: PvRangeMode;
|
|
29
|
+
/**
|
|
30
|
+
* Track mapping. `linear` spreads values evenly. `log` gives small values proportionally more track,
|
|
31
|
+
* which keeps very wide bounds (for example 0 to 240,000) selectable down to single digits.
|
|
32
|
+
*/
|
|
33
|
+
scale?: PvRangeScale;
|
|
26
34
|
/** Whether to show min/max bound values above the slider in dual mode. */
|
|
27
35
|
showBoundLabels?: boolean;
|
|
28
36
|
/** Whether to show the Clear range action when a dual-mode value is active. */
|
|
@@ -33,7 +41,7 @@ export interface PvRangeProps {
|
|
|
33
41
|
showValueTooltips?: boolean;
|
|
34
42
|
/** Visual size. */
|
|
35
43
|
size?: PvRangeSize;
|
|
36
|
-
/** Slider/input step. Use 0 for continuous values. */
|
|
44
|
+
/** Slider/input step. Use 0 for continuous values. Acts as a minimum increment on a `log` scale. */
|
|
37
45
|
step?: number | null;
|
|
38
46
|
/** Decimal places for dual-mode display values. */
|
|
39
47
|
valueDecimals?: number | null;
|
|
@@ -18,6 +18,7 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
18
18
|
declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
19
19
|
cancel: () => any;
|
|
20
20
|
"load-more": (field: string, colDef: PvFilterPanelColDef, query: string, parentId?: string | undefined) => any;
|
|
21
|
+
"facet-change": (field: string, facets: Record<string, string[]>, colDef: PvFilterPanelColDef) => any;
|
|
21
22
|
apply: (filterModel: PvFilterPanelFilterModel) => any;
|
|
22
23
|
"controlled-change": (filterKey: string, values: string[], colDef: PvFilterPanelColDef) => any;
|
|
23
24
|
"filter-change": (event: PvFilterPanelFilterChangeEvent) => any;
|
|
@@ -31,6 +32,7 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
|
|
|
31
32
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
33
|
onCancel?: (() => any) | undefined;
|
|
33
34
|
"onLoad-more"?: ((field: string, colDef: PvFilterPanelColDef, query: string, parentId?: string | undefined) => any) | undefined;
|
|
35
|
+
"onFacet-change"?: ((field: string, facets: Record<string, string[]>, colDef: PvFilterPanelColDef) => any) | undefined;
|
|
34
36
|
onApply?: ((filterModel: PvFilterPanelFilterModel) => any) | undefined;
|
|
35
37
|
"onControlled-change"?: ((filterKey: string, values: string[], colDef: PvFilterPanelColDef) => any) | undefined;
|
|
36
38
|
"onFilter-change"?: ((event: PvFilterPanelFilterChangeEvent) => any) | undefined;
|
|
@@ -17,6 +17,7 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
17
17
|
declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
18
18
|
cancel: () => any;
|
|
19
19
|
"load-more": (field: string, colDef: PvFilterPanelColDef, query: string, parentId?: string | undefined) => any;
|
|
20
|
+
"facet-change": (field: string, facets: Record<string, string[]>, colDef: PvFilterPanelColDef) => any;
|
|
20
21
|
apply: (filterModel: PvFilterPanelFilterModel) => any;
|
|
21
22
|
"controlled-change": (filterKey: string, values: string[], colDef: PvFilterPanelColDef) => any;
|
|
22
23
|
"filter-change": (event: PvFilterPanelFilterChangeEvent) => any;
|
|
@@ -30,6 +31,7 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
|
|
|
30
31
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
32
|
onCancel?: (() => any) | undefined;
|
|
32
33
|
"onLoad-more"?: ((field: string, colDef: PvFilterPanelColDef, query: string, parentId?: string | undefined) => any) | undefined;
|
|
34
|
+
"onFacet-change"?: ((field: string, facets: Record<string, string[]>, colDef: PvFilterPanelColDef) => any) | undefined;
|
|
33
35
|
onApply?: ((filterModel: PvFilterPanelFilterModel) => any) | undefined;
|
|
34
36
|
"onControlled-change"?: ((filterKey: string, values: string[], colDef: PvFilterPanelColDef) => any) | undefined;
|
|
35
37
|
"onFilter-change"?: ((event: PvFilterPanelFilterChangeEvent) => any) | undefined;
|
|
@@ -60,6 +62,7 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
|
|
|
60
62
|
focusText: string;
|
|
61
63
|
rangeDebounceMs: number;
|
|
62
64
|
staged: boolean;
|
|
65
|
+
allCategoriesLabel: string;
|
|
63
66
|
applyLabel: string;
|
|
64
67
|
autoHideRelatedFilterFields: boolean;
|
|
65
68
|
cancelLabel: string;
|
|
@@ -67,6 +70,8 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
|
|
|
67
70
|
clearAllBody: string;
|
|
68
71
|
clearAllHeader: string;
|
|
69
72
|
clearAllLabel: string;
|
|
73
|
+
enableFilterSearch: boolean;
|
|
74
|
+
filterSearchPlaceholder: string;
|
|
70
75
|
hideCollapseButton: boolean;
|
|
71
76
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
72
77
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -10,5 +10,6 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
|
|
|
10
10
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
11
11
|
}>, {
|
|
12
12
|
filters: PvFilterPanelResolvedFilter[];
|
|
13
|
+
allCategoriesLabel: string;
|
|
13
14
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
14
15
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import { Component, Ref } from 'vue';
|
|
|
2
2
|
import { AdvancedFilterModel, FilterModel } from 'ag-grid-enterprise';
|
|
3
3
|
import { MenuOption, MultiSelectState } from '../../../types';
|
|
4
4
|
import { ColDef, ValueFormatterFunc } from 'ag-grid-community';
|
|
5
|
-
import { PvRangeValue } from '../PvRange/types';
|
|
5
|
+
import { PvRangeScale, PvRangeValue } from '../PvRange/types';
|
|
6
6
|
export type PvFilterPanelCategory = string;
|
|
7
7
|
export type PvFilterPanelFilterType = "value" | "range" | "boolean" | "exists";
|
|
8
8
|
export type PvFilterPanelFilterModelType = "advanced" | "regular";
|
|
@@ -79,6 +79,13 @@ export interface PvFilterPanelRangeConfig {
|
|
|
79
79
|
max?: number | null;
|
|
80
80
|
/** Step increment for range controls in reusable filter panel UIs. */
|
|
81
81
|
step?: number | null;
|
|
82
|
+
/**
|
|
83
|
+
* Track mapping for range controls in reusable filter panel UIs. `linear` spreads values evenly,
|
|
84
|
+
* `log` gives small values proportionally more track. Defaults to `linear` when unset.
|
|
85
|
+
*/
|
|
86
|
+
scale?: PvRangeScale;
|
|
87
|
+
/** Icon rendered inside the leading edge of both range inputs. Accepts any Pit Viper icon name. */
|
|
88
|
+
inputIcon?: string | null;
|
|
82
89
|
}
|
|
83
90
|
export interface PvFilterPanelColDefContext {
|
|
84
91
|
/**
|
|
@@ -324,10 +331,24 @@ export interface PvFilterPanelGroupOption {
|
|
|
324
331
|
isActive: boolean;
|
|
325
332
|
label: string;
|
|
326
333
|
}
|
|
327
|
-
export type PvFilterPanelOptionsHandlerReason = "open" | "search" | "load-more" | "child-load-more";
|
|
334
|
+
export type PvFilterPanelOptionsHandlerReason = "open" | "search" | "load-more" | "child-load-more" | "facet-change";
|
|
328
335
|
export interface PvFilterPanelOptionsHandlerParams {
|
|
329
336
|
field: string;
|
|
330
337
|
colDef: PvFilterPanelColDef;
|
|
338
|
+
/**
|
|
339
|
+
* Active secondary facet selections for this field, keyed by facet key (see
|
|
340
|
+
* `colDef.context.filterPanel`). Facets with nothing selected are omitted, so an empty object
|
|
341
|
+
* means "no narrowing".
|
|
342
|
+
*
|
|
343
|
+
* Sent on every request once a handler is in play, because a handler holding the list is the only
|
|
344
|
+
* thing that can narrow options it has not sent to the browser yet. Narrow by these *before*
|
|
345
|
+
* slicing a page, or a facet value whose matches sit past the first page reads as "no matches".
|
|
346
|
+
*
|
|
347
|
+
* Ignoring them is safe for a handler that returns the whole list at once: options carrying
|
|
348
|
+
* `metadata.filters[facetKey]` are still narrowed in the browser. Options that omit that metadata
|
|
349
|
+
* are taken as already narrowed, so a handler that applied the facets need not echo them back.
|
|
350
|
+
*/
|
|
351
|
+
facets?: Record<string, string[]>;
|
|
331
352
|
filterModel?: PvFilterPanelFilterModel;
|
|
332
353
|
limit?: number;
|
|
333
354
|
offset?: number;
|
|
@@ -364,11 +385,15 @@ export interface PvFilterStore {
|
|
|
364
385
|
filterTotalCountMap: Ref<Record<string, number | undefined>>;
|
|
365
386
|
filterChildHasMoreMap: Ref<Record<string, boolean | undefined>>;
|
|
366
387
|
filterChildTotalCountMap: Ref<Record<string, number | undefined>>;
|
|
388
|
+
/** Active facet selections per field, keyed by facet key. Sent with every fetch for that field. */
|
|
389
|
+
filterFacetSelectionMap: Ref<Record<string, Record<string, string[]>>>;
|
|
367
390
|
getFilterOptions: (field: string) => (PvFilterPanelOption | null)[];
|
|
368
391
|
getFilterSelectedValues: (field: string, staged?: boolean) => (string | null)[];
|
|
369
392
|
initStagedFilterSelections: () => void;
|
|
370
393
|
setFilterOptions: (field: string, options: (PvFilterPanelOption | null)[]) => void;
|
|
371
394
|
setFilterOptionsHandler: (handler?: PvFilterPanelOptionsHandler) => void;
|
|
395
|
+
/** Record a field's facet selections, so every later fetch for that field carries them. */
|
|
396
|
+
setFilterFacetSelections: (field: string, facets: Record<string, string[]>) => void;
|
|
372
397
|
setFilterSearchQuery: (field: string, query: string | null | undefined) => void;
|
|
373
398
|
setFilterSelectedValues: (field: string, values: (string | null)[], staged?: boolean) => void;
|
|
374
399
|
stagedFilterModel: Ref<PvFilterPanelFilterModel>;
|
|
@@ -413,8 +438,12 @@ export interface PvFilterPanelResolvedFilter {
|
|
|
413
438
|
label: string;
|
|
414
439
|
loadingText?: string;
|
|
415
440
|
options?: PvFilterPanelOption[];
|
|
441
|
+
/** See `filterPanelRange.inputIcon`. */
|
|
442
|
+
rangeInputIcon?: string | null;
|
|
416
443
|
rangeMax?: number | null;
|
|
417
444
|
rangeMin?: number | null;
|
|
445
|
+
/** See `filterPanelRange.scale`. */
|
|
446
|
+
rangeScale?: PvRangeScale;
|
|
418
447
|
rangeStep?: number | null;
|
|
419
448
|
rangeValue?: PvRangeValue;
|
|
420
449
|
searchPlaceholder?: string;
|
|
@@ -436,6 +465,8 @@ export interface PvFilterPanelAppliedFiltersSectionProps {
|
|
|
436
465
|
readOnly?: boolean;
|
|
437
466
|
}
|
|
438
467
|
export interface PvFilterPanelCategoryButtonRowProps {
|
|
468
|
+
/** Label for the button that clears the category selection. */
|
|
469
|
+
allCategoriesLabel?: string;
|
|
439
470
|
categoryOrder?: PvFilterPanelCategory[];
|
|
440
471
|
filters?: PvFilterPanelResolvedFilter[];
|
|
441
472
|
}
|
|
@@ -465,6 +496,8 @@ export type PvFilterPanelEmits = {
|
|
|
465
496
|
cancel: [];
|
|
466
497
|
/** Emitted when a consumer-controlled value filter selection changes. */
|
|
467
498
|
"controlled-change": [filterKey: string, values: string[], colDef: PvFilterPanelColDef];
|
|
499
|
+
/** Emitted when a secondary facet selection changes (see `colDef.context.filterPanel`). */
|
|
500
|
+
"facet-change": [field: string, facets: Record<string, string[]>, colDef: PvFilterPanelColDef];
|
|
468
501
|
"filter-change": [event: PvFilterPanelFilterChangeEvent];
|
|
469
502
|
"focus-change": [field: string, value: string, option: PvFilterPanelOption];
|
|
470
503
|
"handle-settings-icon": [field: string, colDef: PvFilterPanelColDef];
|
|
@@ -475,6 +508,8 @@ export type PvFilterPanelEmits = {
|
|
|
475
508
|
};
|
|
476
509
|
export type PvFilterPanelEmitFn = <K extends keyof PvFilterPanelEmits>(event: K, ...args: PvFilterPanelEmits[K]) => void;
|
|
477
510
|
export interface PvFilterPanelProps {
|
|
511
|
+
/** Label for the category-row button that clears the category selection. */
|
|
512
|
+
allCategoriesLabel?: string;
|
|
478
513
|
applyLabel?: string;
|
|
479
514
|
ariaLabel?: string;
|
|
480
515
|
/** Auto-hide backing fields represented by aggregate filters and child fields represented by filter groups. */
|
|
@@ -492,6 +527,12 @@ export interface PvFilterPanelProps {
|
|
|
492
527
|
/** Whether dev-only filters should be shown. */
|
|
493
528
|
devMode?: boolean;
|
|
494
529
|
displayPreferencesIcon?: boolean;
|
|
530
|
+
/**
|
|
531
|
+
* Shows a search input under the category row that narrows the filter list by label.
|
|
532
|
+
* The search always spans every available filter: it ignores the selected category, which it
|
|
533
|
+
* resets to "All", and surfaces filters that are collapsed by default.
|
|
534
|
+
*/
|
|
535
|
+
enableFilterSearch?: boolean;
|
|
495
536
|
enableFocusView?: boolean;
|
|
496
537
|
/** @deprecated Prefer filterStore/filterOptionsHandler. Whether more value-filter options can be loaded, keyed by column key (`colId` when present, otherwise `field`). */
|
|
497
538
|
filterHasMoreMap?: Record<string, boolean | undefined>;
|
|
@@ -507,6 +548,8 @@ export interface PvFilterPanelProps {
|
|
|
507
548
|
filterOptions?: Record<string, PvFilterPanelOption[]>;
|
|
508
549
|
/** Fetches value-filter options. When provided without filterStore, PvFilterPanel creates an internal PvFilterStore. */
|
|
509
550
|
filterOptionsHandler?: PvFilterPanelOptionsHandler;
|
|
551
|
+
/** Placeholder for the filter search input shown when `enableFilterSearch` is true. */
|
|
552
|
+
filterSearchPlaceholder?: string;
|
|
510
553
|
/** @deprecated Prefer filterStore/filterOptionsHandler. Value-filter search queries keyed by column key (`colId` when present, otherwise `field`). */
|
|
511
554
|
filterSearchQueries?: Record<string, string | undefined>;
|
|
512
555
|
/** Suggested filter shortcuts shown above the category carousel. Active suggestions are hidden automatically. */
|
|
@@ -23,8 +23,11 @@ export declare function usePvFilterPanel(props: PvFilterPanelCoreProps, filterMo
|
|
|
23
23
|
clearAllFilters: () => void;
|
|
24
24
|
getSuggestionKey: (suggestion: PvFilterPanelSuggestion) => string;
|
|
25
25
|
handleControlChange: (field: string, change: PvFilterPanelControlChange) => void;
|
|
26
|
+
handleFacetChange: (filter: PvFilterPanelResolvedFilter, facets: Record<string, string[]>, query?: string) => void;
|
|
26
27
|
handleLoadMore: (filter: PvFilterPanelResolvedFilter, query: string, parentId?: string) => void;
|
|
27
28
|
handleSearchChange: (filter: PvFilterPanelResolvedFilter, query: string) => void;
|
|
28
29
|
handleSuggestionClick: (suggestion: PvFilterPanelSuggestion) => void;
|
|
29
30
|
removeAppliedFilter: (field: string, value: string, type?: PvFilterPanelFilterType) => void;
|
|
31
|
+
setFacetSelections: (field: string, facets: Record<string, string[]>) => void;
|
|
32
|
+
usesHandlerFacets: ComputedRef<boolean>;
|
|
30
33
|
};
|
package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
62
62
|
optionsVariant: "toggle" | "checkbox" | "icon" | "simple" | "company" | "avatar" | "checkmark";
|
|
63
63
|
options: MenuOption<T>[];
|
|
64
64
|
menuActionsVariant: MenuActionsVariant | null;
|
|
65
|
+
singleSelect: boolean;
|
|
65
66
|
highlightSearchText: boolean;
|
|
66
67
|
enableCascadeSelection: boolean;
|
|
67
68
|
counterStyle: "primary" | "secondary";
|
|
@@ -107,6 +108,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
107
108
|
optionsVariant: "toggle" | "checkbox" | "icon" | "simple" | "company" | "avatar" | "checkmark";
|
|
108
109
|
options: MenuOption<T>[];
|
|
109
110
|
menuActionsVariant: MenuActionsVariant | null;
|
|
111
|
+
singleSelect: boolean;
|
|
110
112
|
highlightSearchText: boolean;
|
|
111
113
|
enableCascadeSelection: boolean;
|
|
112
114
|
counterStyle: "primary" | "secondary";
|
|
@@ -152,6 +154,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
152
154
|
optionsVariant: "toggle" | "checkbox" | "icon" | "simple" | "company" | "avatar" | "checkmark";
|
|
153
155
|
options: MenuOption<T>[];
|
|
154
156
|
menuActionsVariant: MenuActionsVariant | null;
|
|
157
|
+
singleSelect: boolean;
|
|
155
158
|
highlightSearchText: boolean;
|
|
156
159
|
enableCascadeSelection: boolean;
|
|
157
160
|
counterStyle: "primary" | "secondary";
|
|
@@ -71,6 +71,10 @@ export interface PvMultiSelectButtonProps<T = unknown, SlotContext extends Recor
|
|
|
71
71
|
optionsVariant?: Exclude<MenuOptionsVariant, "radio">;
|
|
72
72
|
/** Use an overlay-style trigger (auto-focuses search on open) */
|
|
73
73
|
overlayTrigger?: boolean;
|
|
74
|
+
/** Render options as radios: selecting an option replaces the current selection
|
|
75
|
+
* (clicking the selected option again deselects it). Ignored for cascade selection.
|
|
76
|
+
*/
|
|
77
|
+
singleSelect?: boolean;
|
|
74
78
|
/** When enableCascadeSelection is true, selecting a parent will select all children
|
|
75
79
|
* regardless of whether they are filtered by a search query. When false (default),
|
|
76
80
|
* selecting a parent will only select the children that are currently shown in the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PvRangeProps, PvRangeValue, PvRangeSize, PvRangeColor, PvRangeMode } from './types';
|
|
1
|
+
import { PvRangeProps, PvRangeValue, PvRangeSize, PvRangeColor, PvRangeScale, PvRangeMode } from './types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = PvRangeProps;
|
|
4
4
|
type __VLS_PublicProps = {
|
|
@@ -16,9 +16,11 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
|
|
|
16
16
|
label: string;
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
color: PvRangeColor;
|
|
19
|
+
scale: PvRangeScale;
|
|
19
20
|
mode: PvRangeMode;
|
|
20
21
|
showClear: boolean;
|
|
21
22
|
step: number | null;
|
|
23
|
+
inputIcon: string | null;
|
|
22
24
|
min: number | null;
|
|
23
25
|
max: number | null;
|
|
24
26
|
allowMinMaxEqual: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type PvRangeColor = "single" | "multiple";
|
|
2
2
|
export type PvRangeMode = "single" | "dual";
|
|
3
|
+
export type PvRangeScale = "linear" | "log";
|
|
3
4
|
export type PvRangeSize = "sm" | "md" | "lg";
|
|
4
5
|
export interface PvRangeProps {
|
|
5
6
|
/** When true, min and max handles may have the same value in dual mode. */
|
|
@@ -13,6 +14,8 @@ export interface PvRangeProps {
|
|
|
13
14
|
/** Value display type for dual-mode inputs, tooltips, and bound labels. */
|
|
14
15
|
dataType?: string | null;
|
|
15
16
|
disabled?: boolean;
|
|
17
|
+
/** Icon rendered inside the leading edge of both dual-mode inputs. Accepts any Pit Viper icon name. */
|
|
18
|
+
inputIcon?: string | null;
|
|
16
19
|
/** Accessible group label in dual mode. */
|
|
17
20
|
label?: string;
|
|
18
21
|
/** Upper slider bound. */
|
|
@@ -23,6 +26,11 @@ export interface PvRangeProps {
|
|
|
23
26
|
minLabel?: string;
|
|
24
27
|
/** Slider interaction mode. `single` uses the default v-model; `dual` ignores modelValue and uses v-model:rangeValue. */
|
|
25
28
|
mode?: PvRangeMode;
|
|
29
|
+
/**
|
|
30
|
+
* Track mapping. `linear` spreads values evenly. `log` gives small values proportionally more track,
|
|
31
|
+
* which keeps very wide bounds (for example 0 to 240,000) selectable down to single digits.
|
|
32
|
+
*/
|
|
33
|
+
scale?: PvRangeScale;
|
|
26
34
|
/** Whether to show min/max bound values above the slider in dual mode. */
|
|
27
35
|
showBoundLabels?: boolean;
|
|
28
36
|
/** Whether to show the Clear range action when a dual-mode value is active. */
|
|
@@ -33,7 +41,7 @@ export interface PvRangeProps {
|
|
|
33
41
|
showValueTooltips?: boolean;
|
|
34
42
|
/** Visual size. */
|
|
35
43
|
size?: PvRangeSize;
|
|
36
|
-
/** Slider/input step. Use 0 for continuous values. */
|
|
44
|
+
/** Slider/input step. Use 0 for continuous values. Acts as a minimum increment on a `log` scale. */
|
|
37
45
|
step?: number | null;
|
|
38
46
|
/** Decimal places for dual-mode display values. */
|
|
39
47
|
valueDecimals?: number | null;
|