@turquoisehealth/pit-viper 2.231.0 → 2.232.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 +33 -1
- 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 +33 -1
- 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 +2390 -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 +33 -1
- 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 +2174 -2007
- package/pv-components/dist/web/components/pv-filter-panel/pv-filter-panel.js +2166 -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
|
@@ -324,10 +324,24 @@ export interface PvFilterPanelGroupOption {
|
|
|
324
324
|
isActive: boolean;
|
|
325
325
|
label: string;
|
|
326
326
|
}
|
|
327
|
-
export type PvFilterPanelOptionsHandlerReason = "open" | "search" | "load-more" | "child-load-more";
|
|
327
|
+
export type PvFilterPanelOptionsHandlerReason = "open" | "search" | "load-more" | "child-load-more" | "facet-change";
|
|
328
328
|
export interface PvFilterPanelOptionsHandlerParams {
|
|
329
329
|
field: string;
|
|
330
330
|
colDef: PvFilterPanelColDef;
|
|
331
|
+
/**
|
|
332
|
+
* Active secondary facet selections for this field, keyed by facet key (see
|
|
333
|
+
* `colDef.context.filterPanel`). Facets with nothing selected are omitted, so an empty object
|
|
334
|
+
* means "no narrowing".
|
|
335
|
+
*
|
|
336
|
+
* Sent on every request once a handler is in play, because a handler holding the list is the only
|
|
337
|
+
* thing that can narrow options it has not sent to the browser yet. Narrow by these *before*
|
|
338
|
+
* slicing a page, or a facet value whose matches sit past the first page reads as "no matches".
|
|
339
|
+
*
|
|
340
|
+
* Ignoring them is safe for a handler that returns the whole list at once: options carrying
|
|
341
|
+
* `metadata.filters[facetKey]` are still narrowed in the browser. Options that omit that metadata
|
|
342
|
+
* are taken as already narrowed, so a handler that applied the facets need not echo them back.
|
|
343
|
+
*/
|
|
344
|
+
facets?: Record<string, string[]>;
|
|
331
345
|
filterModel?: PvFilterPanelFilterModel;
|
|
332
346
|
limit?: number;
|
|
333
347
|
offset?: number;
|
|
@@ -364,11 +378,15 @@ export interface PvFilterStore {
|
|
|
364
378
|
filterTotalCountMap: Ref<Record<string, number | undefined>>;
|
|
365
379
|
filterChildHasMoreMap: Ref<Record<string, boolean | undefined>>;
|
|
366
380
|
filterChildTotalCountMap: Ref<Record<string, number | undefined>>;
|
|
381
|
+
/** Active facet selections per field, keyed by facet key. Sent with every fetch for that field. */
|
|
382
|
+
filterFacetSelectionMap: Ref<Record<string, Record<string, string[]>>>;
|
|
367
383
|
getFilterOptions: (field: string) => (PvFilterPanelOption | null)[];
|
|
368
384
|
getFilterSelectedValues: (field: string, staged?: boolean) => (string | null)[];
|
|
369
385
|
initStagedFilterSelections: () => void;
|
|
370
386
|
setFilterOptions: (field: string, options: (PvFilterPanelOption | null)[]) => void;
|
|
371
387
|
setFilterOptionsHandler: (handler?: PvFilterPanelOptionsHandler) => void;
|
|
388
|
+
/** Record a field's facet selections, so every later fetch for that field carries them. */
|
|
389
|
+
setFilterFacetSelections: (field: string, facets: Record<string, string[]>) => void;
|
|
372
390
|
setFilterSearchQuery: (field: string, query: string | null | undefined) => void;
|
|
373
391
|
setFilterSelectedValues: (field: string, values: (string | null)[], staged?: boolean) => void;
|
|
374
392
|
stagedFilterModel: Ref<PvFilterPanelFilterModel>;
|
|
@@ -436,6 +454,8 @@ export interface PvFilterPanelAppliedFiltersSectionProps {
|
|
|
436
454
|
readOnly?: boolean;
|
|
437
455
|
}
|
|
438
456
|
export interface PvFilterPanelCategoryButtonRowProps {
|
|
457
|
+
/** Label for the button that clears the category selection. */
|
|
458
|
+
allCategoriesLabel?: string;
|
|
439
459
|
categoryOrder?: PvFilterPanelCategory[];
|
|
440
460
|
filters?: PvFilterPanelResolvedFilter[];
|
|
441
461
|
}
|
|
@@ -465,6 +485,8 @@ export type PvFilterPanelEmits = {
|
|
|
465
485
|
cancel: [];
|
|
466
486
|
/** Emitted when a consumer-controlled value filter selection changes. */
|
|
467
487
|
"controlled-change": [filterKey: string, values: string[], colDef: PvFilterPanelColDef];
|
|
488
|
+
/** Emitted when a secondary facet selection changes (see `colDef.context.filterPanel`). */
|
|
489
|
+
"facet-change": [field: string, facets: Record<string, string[]>, colDef: PvFilterPanelColDef];
|
|
468
490
|
"filter-change": [event: PvFilterPanelFilterChangeEvent];
|
|
469
491
|
"focus-change": [field: string, value: string, option: PvFilterPanelOption];
|
|
470
492
|
"handle-settings-icon": [field: string, colDef: PvFilterPanelColDef];
|
|
@@ -475,6 +497,8 @@ export type PvFilterPanelEmits = {
|
|
|
475
497
|
};
|
|
476
498
|
export type PvFilterPanelEmitFn = <K extends keyof PvFilterPanelEmits>(event: K, ...args: PvFilterPanelEmits[K]) => void;
|
|
477
499
|
export interface PvFilterPanelProps {
|
|
500
|
+
/** Label for the category-row button that clears the category selection. */
|
|
501
|
+
allCategoriesLabel?: string;
|
|
478
502
|
applyLabel?: string;
|
|
479
503
|
ariaLabel?: string;
|
|
480
504
|
/** Auto-hide backing fields represented by aggregate filters and child fields represented by filter groups. */
|
|
@@ -492,6 +516,12 @@ export interface PvFilterPanelProps {
|
|
|
492
516
|
/** Whether dev-only filters should be shown. */
|
|
493
517
|
devMode?: boolean;
|
|
494
518
|
displayPreferencesIcon?: boolean;
|
|
519
|
+
/**
|
|
520
|
+
* Shows a search input under the category row that narrows the filter list by label.
|
|
521
|
+
* The search always spans every available filter: it ignores the selected category, which it
|
|
522
|
+
* resets to "All", and surfaces filters that are collapsed by default.
|
|
523
|
+
*/
|
|
524
|
+
enableFilterSearch?: boolean;
|
|
495
525
|
enableFocusView?: boolean;
|
|
496
526
|
/** @deprecated Prefer filterStore/filterOptionsHandler. Whether more value-filter options can be loaded, keyed by column key (`colId` when present, otherwise `field`). */
|
|
497
527
|
filterHasMoreMap?: Record<string, boolean | undefined>;
|
|
@@ -507,6 +537,8 @@ export interface PvFilterPanelProps {
|
|
|
507
537
|
filterOptions?: Record<string, PvFilterPanelOption[]>;
|
|
508
538
|
/** Fetches value-filter options. When provided without filterStore, PvFilterPanel creates an internal PvFilterStore. */
|
|
509
539
|
filterOptionsHandler?: PvFilterPanelOptionsHandler;
|
|
540
|
+
/** Placeholder for the filter search input shown when `enableFilterSearch` is true. */
|
|
541
|
+
filterSearchPlaceholder?: string;
|
|
510
542
|
/** @deprecated Prefer filterStore/filterOptionsHandler. Value-filter search queries keyed by column key (`colId` when present, otherwise `field`). */
|
|
511
543
|
filterSearchQueries?: Record<string, string | undefined>;
|
|
512
544
|
/** 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;
|
|
@@ -324,10 +324,24 @@ export interface PvFilterPanelGroupOption {
|
|
|
324
324
|
isActive: boolean;
|
|
325
325
|
label: string;
|
|
326
326
|
}
|
|
327
|
-
export type PvFilterPanelOptionsHandlerReason = "open" | "search" | "load-more" | "child-load-more";
|
|
327
|
+
export type PvFilterPanelOptionsHandlerReason = "open" | "search" | "load-more" | "child-load-more" | "facet-change";
|
|
328
328
|
export interface PvFilterPanelOptionsHandlerParams {
|
|
329
329
|
field: string;
|
|
330
330
|
colDef: PvFilterPanelColDef;
|
|
331
|
+
/**
|
|
332
|
+
* Active secondary facet selections for this field, keyed by facet key (see
|
|
333
|
+
* `colDef.context.filterPanel`). Facets with nothing selected are omitted, so an empty object
|
|
334
|
+
* means "no narrowing".
|
|
335
|
+
*
|
|
336
|
+
* Sent on every request once a handler is in play, because a handler holding the list is the only
|
|
337
|
+
* thing that can narrow options it has not sent to the browser yet. Narrow by these *before*
|
|
338
|
+
* slicing a page, or a facet value whose matches sit past the first page reads as "no matches".
|
|
339
|
+
*
|
|
340
|
+
* Ignoring them is safe for a handler that returns the whole list at once: options carrying
|
|
341
|
+
* `metadata.filters[facetKey]` are still narrowed in the browser. Options that omit that metadata
|
|
342
|
+
* are taken as already narrowed, so a handler that applied the facets need not echo them back.
|
|
343
|
+
*/
|
|
344
|
+
facets?: Record<string, string[]>;
|
|
331
345
|
filterModel?: PvFilterPanelFilterModel;
|
|
332
346
|
limit?: number;
|
|
333
347
|
offset?: number;
|
|
@@ -364,11 +378,15 @@ export interface PvFilterStore {
|
|
|
364
378
|
filterTotalCountMap: Ref<Record<string, number | undefined>>;
|
|
365
379
|
filterChildHasMoreMap: Ref<Record<string, boolean | undefined>>;
|
|
366
380
|
filterChildTotalCountMap: Ref<Record<string, number | undefined>>;
|
|
381
|
+
/** Active facet selections per field, keyed by facet key. Sent with every fetch for that field. */
|
|
382
|
+
filterFacetSelectionMap: Ref<Record<string, Record<string, string[]>>>;
|
|
367
383
|
getFilterOptions: (field: string) => (PvFilterPanelOption | null)[];
|
|
368
384
|
getFilterSelectedValues: (field: string, staged?: boolean) => (string | null)[];
|
|
369
385
|
initStagedFilterSelections: () => void;
|
|
370
386
|
setFilterOptions: (field: string, options: (PvFilterPanelOption | null)[]) => void;
|
|
371
387
|
setFilterOptionsHandler: (handler?: PvFilterPanelOptionsHandler) => void;
|
|
388
|
+
/** Record a field's facet selections, so every later fetch for that field carries them. */
|
|
389
|
+
setFilterFacetSelections: (field: string, facets: Record<string, string[]>) => void;
|
|
372
390
|
setFilterSearchQuery: (field: string, query: string | null | undefined) => void;
|
|
373
391
|
setFilterSelectedValues: (field: string, values: (string | null)[], staged?: boolean) => void;
|
|
374
392
|
stagedFilterModel: Ref<PvFilterPanelFilterModel>;
|
|
@@ -436,6 +454,8 @@ export interface PvFilterPanelAppliedFiltersSectionProps {
|
|
|
436
454
|
readOnly?: boolean;
|
|
437
455
|
}
|
|
438
456
|
export interface PvFilterPanelCategoryButtonRowProps {
|
|
457
|
+
/** Label for the button that clears the category selection. */
|
|
458
|
+
allCategoriesLabel?: string;
|
|
439
459
|
categoryOrder?: PvFilterPanelCategory[];
|
|
440
460
|
filters?: PvFilterPanelResolvedFilter[];
|
|
441
461
|
}
|
|
@@ -465,6 +485,8 @@ export type PvFilterPanelEmits = {
|
|
|
465
485
|
cancel: [];
|
|
466
486
|
/** Emitted when a consumer-controlled value filter selection changes. */
|
|
467
487
|
"controlled-change": [filterKey: string, values: string[], colDef: PvFilterPanelColDef];
|
|
488
|
+
/** Emitted when a secondary facet selection changes (see `colDef.context.filterPanel`). */
|
|
489
|
+
"facet-change": [field: string, facets: Record<string, string[]>, colDef: PvFilterPanelColDef];
|
|
468
490
|
"filter-change": [event: PvFilterPanelFilterChangeEvent];
|
|
469
491
|
"focus-change": [field: string, value: string, option: PvFilterPanelOption];
|
|
470
492
|
"handle-settings-icon": [field: string, colDef: PvFilterPanelColDef];
|
|
@@ -475,6 +497,8 @@ export type PvFilterPanelEmits = {
|
|
|
475
497
|
};
|
|
476
498
|
export type PvFilterPanelEmitFn = <K extends keyof PvFilterPanelEmits>(event: K, ...args: PvFilterPanelEmits[K]) => void;
|
|
477
499
|
export interface PvFilterPanelProps {
|
|
500
|
+
/** Label for the category-row button that clears the category selection. */
|
|
501
|
+
allCategoriesLabel?: string;
|
|
478
502
|
applyLabel?: string;
|
|
479
503
|
ariaLabel?: string;
|
|
480
504
|
/** Auto-hide backing fields represented by aggregate filters and child fields represented by filter groups. */
|
|
@@ -492,6 +516,12 @@ export interface PvFilterPanelProps {
|
|
|
492
516
|
/** Whether dev-only filters should be shown. */
|
|
493
517
|
devMode?: boolean;
|
|
494
518
|
displayPreferencesIcon?: boolean;
|
|
519
|
+
/**
|
|
520
|
+
* Shows a search input under the category row that narrows the filter list by label.
|
|
521
|
+
* The search always spans every available filter: it ignores the selected category, which it
|
|
522
|
+
* resets to "All", and surfaces filters that are collapsed by default.
|
|
523
|
+
*/
|
|
524
|
+
enableFilterSearch?: boolean;
|
|
495
525
|
enableFocusView?: boolean;
|
|
496
526
|
/** @deprecated Prefer filterStore/filterOptionsHandler. Whether more value-filter options can be loaded, keyed by column key (`colId` when present, otherwise `field`). */
|
|
497
527
|
filterHasMoreMap?: Record<string, boolean | undefined>;
|
|
@@ -507,6 +537,8 @@ export interface PvFilterPanelProps {
|
|
|
507
537
|
filterOptions?: Record<string, PvFilterPanelOption[]>;
|
|
508
538
|
/** Fetches value-filter options. When provided without filterStore, PvFilterPanel creates an internal PvFilterStore. */
|
|
509
539
|
filterOptionsHandler?: PvFilterPanelOptionsHandler;
|
|
540
|
+
/** Placeholder for the filter search input shown when `enableFilterSearch` is true. */
|
|
541
|
+
filterSearchPlaceholder?: string;
|
|
510
542
|
/** @deprecated Prefer filterStore/filterOptionsHandler. Value-filter search queries keyed by column key (`colId` when present, otherwise `field`). */
|
|
511
543
|
filterSearchQueries?: Record<string, string | undefined>;
|
|
512
544
|
/** 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;
|