@homebound/beam 3.21.0 → 3.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -6369,14 +6369,18 @@ declare function newMethodMissingProxy<T extends object, Y>(object: T, methodMis
6369
6369
  * Each filter is typically created by a factory function, i.e. `singleFilter`,
6370
6370
  * `multiFilter`, etc.
6371
6371
  */
6372
+ /** A set filter field value — null and undefined excluded (matches the `V` in `Filter<V>` for that field). */
6373
+ type DefinedFilterValue<F, K extends keyof F> = Exclude<F[K], null | undefined>;
6372
6374
  type FilterDefs<F> = {
6373
- [K in keyof F]: (key: string) => Filter<Exclude<F[K], null | undefined>>;
6375
+ [K in keyof F]: (key: string) => Filter<DefinedFilterValue<F, K>>;
6374
6376
  };
6375
6377
  type FilterImpls<F> = {
6376
- [K in keyof F]: Filter<Exclude<F[K], null | undefined>>;
6378
+ [K in keyof F]: Filter<DefinedFilterValue<F, K>>;
6377
6379
  };
6380
+ /** Value shape passed when resolving a display label for one active selection (array filters: a single element). */
6381
+ type SelectedFilterLabelValue<V> = V extends readonly (infer E)[] ? E : V;
6378
6382
  /** A filter instance that knows how to render itself within the `Filters` component. */
6379
- interface Filter<V> {
6383
+ type Filter<V> = {
6380
6384
  label: string;
6381
6385
  hideLabelInModal?: boolean;
6382
6386
  /** The default value to use in `usePersistedFilter` for creating the initial filter. */
@@ -6395,9 +6399,11 @@ interface Filter<V> {
6395
6399
  * backwards-compatible serialized formats when needed.
6396
6400
  */
6397
6401
  dehydrate?(value: V | undefined): unknown;
6402
+ /** Returns the human-readable label for an active filter value, or undefined when the value should not produce a chip. */
6403
+ formatSelectedFilterLabel(value: SelectedFilterLabelValue<V>): string | undefined;
6398
6404
  /** Renders the filter into either the page or the modal. */
6399
6405
  render(value: V | undefined, setValue: (value: V | undefined) => void, tid: TestIds, inModal: boolean, vertical: boolean): JSX.Element;
6400
- }
6406
+ };
6401
6407
 
6402
6408
  type TextFieldBaseProps<X> = {
6403
6409
  labelProps?: LabelHTMLAttributes<HTMLLabelElement>;
@@ -7160,11 +7166,11 @@ declare class BaseFilter<V, P extends {
7160
7166
  }
7161
7167
 
7162
7168
  type BooleanOption = [boolean | undefined, string];
7163
- interface BooleanFilterProps {
7169
+ type BooleanFilterProps = {
7164
7170
  options?: BooleanOption[];
7165
7171
  label?: string;
7166
7172
  defaultValue?: undefined | boolean;
7167
- }
7173
+ };
7168
7174
  declare function booleanFilter(props: BooleanFilterProps): (key: string) => Filter<boolean>;
7169
7175
 
7170
7176
  type CheckboxFilterProps<V> = {
@@ -7187,9 +7193,9 @@ type CheckboxFilterProps<V> = {
7187
7193
  declare function checkboxFilter<V = boolean>(props: CheckboxFilterProps<V>): (key: string) => Filter<V>;
7188
7194
 
7189
7195
  /** Props for the search box integrated into FilterDropdownMenu. */
7190
- interface SearchBoxProps {
7196
+ type SearchBoxProps = {
7191
7197
  onSearch: (filter: string) => void;
7192
- }
7198
+ };
7193
7199
  /**
7194
7200
  * FilterDropdownMenu is a newer filter UI pattern that shows a "Filter" button
7195
7201
  * which expands to reveal filter controls in a row below, with chips displayed
@@ -7203,7 +7209,7 @@ interface SearchBoxProps {
7203
7209
  * Note: We expect the existing `Filters` component to eventually become
7204
7210
  * `FilterDropdownMenu`, but it hasn't been rolled out everywhere yet.
7205
7211
  */
7206
- interface FilterDropdownMenuProps<F extends Record<string, unknown>, G extends Value = string> {
7212
+ type FilterDropdownMenuProps<F extends Record<string, unknown>, G extends Value = string> = {
7207
7213
  /** List of filters. When omitted, no filter UI is rendered. */
7208
7214
  filterDefs?: FilterDefs<F>;
7209
7215
  /** The current filter value. */
@@ -7223,7 +7229,7 @@ interface FilterDropdownMenuProps<F extends Record<string, unknown>, G extends V
7223
7229
  };
7224
7230
  /** When provided, renders a search box before the filter controls. */
7225
7231
  searchProps?: SearchBoxProps;
7226
- }
7232
+ };
7227
7233
  declare function FilterDropdownMenu<F extends Record<string, unknown>, G extends Value = string>(props: FilterDropdownMenuProps<F, G>): JSX.Element;
7228
7234
  declare const _FilterDropdownMenu: typeof FilterDropdownMenu;
7229
7235
 
@@ -8942,4 +8948,4 @@ declare const zIndices: {
8942
8948
  };
8943
8949
  type ZIndex = (typeof zIndices)[keyof typeof zIndices];
8944
8950
 
8945
- export { ASC, Accordion, AccordionList, type AccordionProps, type AccordionSize, type ActionButtonProps, type AppNavGroup, type AppNavItem, type AppNavLink, type AppNavSection, type AppNavSectionItem, AutoSaveIndicator, AutoSaveStatus, AutoSaveStatusContext, AutoSaveStatusProvider, Autocomplete, type AutocompleteProps, Avatar, AvatarButton, type AvatarButtonProps, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Banner, type BannerProps, type BannerTypes, BaseFilter, type BaseQueryTableProps, type BaseTableProps, type BeamButtonProps, type BeamColor, type BeamFocusableProps, BeamProvider, type BeamTextFieldProps, BoundCheckboxField, type BoundCheckboxFieldProps, BoundCheckboxGroupField, type BoundCheckboxGroupFieldProps, BoundChipSelectField, BoundDateField, type BoundDateFieldProps, BoundDateRangeField, type BoundDateRangeFieldProps, BoundForm, type BoundFormInputConfig, type BoundFormProps, type BoundFormRowInputs, BoundIconCardField, type BoundIconCardFieldProps, BoundIconCardGroupField, type BoundIconCardGroupFieldProps, BoundMultiLineSelectField, type BoundMultiLineSelectFieldProps, BoundMultiSelectField, type BoundMultiSelectFieldProps, BoundNumberField, type BoundNumberFieldProps, BoundRadioGroupField, type BoundRadioGroupFieldProps, BoundRichTextField, type BoundRichTextFieldProps, BoundSelectAndTextField, BoundSelectField, type BoundSelectFieldProps, BoundSwitchField, type BoundSwitchFieldProps, BoundTextAreaField, type BoundTextAreaFieldProps, BoundTextField, type BoundTextFieldProps, BoundToggleChipGroupField, type BoundToggleChipGroupFieldProps, BoundTreeSelectField, type BoundTreeSelectFieldProps, type Breakpoint, Breakpoints, type BuildtimeStyles, Button, ButtonDatePicker, ButtonGroup, type ButtonGroupButton, type ButtonGroupProps, ButtonMenu, type ButtonMenuProps, ButtonModal, type ButtonModalProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardTag, type CardType, type CheckFn, Checkbox, CheckboxGroup, type CheckboxGroupItemOption, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, ChipSelectField, type ChipSelectFieldProps, type ChipType, ChipTypes, type ChipValue, Chips, type ChipsProps, CollapseToggle, CollapsedContext, type ColumnLayoutResult, ConfirmCloseModal, type ContentStack, ContrastScope, Copy, CountBadge, type CountBadgeProps, Css, CssReset, type CssSetVarKeys, type CssSetVarScalar, type CssSetVarValue, DESC, DateField, type DateFieldFormat, type DateFieldMode, type DateFieldProps, type DateFilterValue, type DateMatcher, type DateRange, DateRangeField, type DateRangeFieldProps, type DateRangeFilterValue, type Direction, type DiscriminateUnion, type DividerMenuItemType, DnDGrid, DnDGridItemHandle, type DnDGridItemHandleProps, type DnDGridItemProps, type DnDGridProps, type DragData, EXPANDABLE_HEADER, EditColumnsButton, ErrorMessage, FieldGroup, type Filter, type FilterDefs, _FilterDropdownMenu as FilterDropdownMenu, type FilterImpls, FilterModal, _Filters as Filters, type Font, FormDivider, FormHeading, type FormHeadingProps, FormLines, type FormLinesProps, FormPageLayout, FormRow, type FormSectionConfig, type FormWidth, FullBleed, type GridCellAlignment, type GridCellContent, type GridColumn, type GridColumnBorder, type GridColumnWithId, type GridDataRow, type GridRowKind, type GridRowLookup, type GridSortConfig, type GridStyle, GridTable, type GridTableApi, type GridTableCollapseToggleProps, type GridTableDefaults, GridTableLayout, type GridTableLayoutProps, type GridTableProps, type GridTablePropsWithRows, type GridTableScrollOptions, type GridTableXss, type GroupByHook, HB_QUIPS_FLAVOR, HB_QUIPS_MISSION, HEADER, type HasIdAndName, HbLoadingSpinner, HbSpinnerProvider, HelperText, HomeboundLogo, Icon, IconButton, type IconButtonProps, type IconButtonVariant, IconCard, type IconCardProps, type IconKey, type IconMenuItemType, type IconProps, Icons, type IfAny, type ImageFitType, type ImageMenuItemType, type InfiniteScroll, type InlineStyle, type InputStylePalette, KEPT_GROUP, type Kinded, Loader, LoadingSkeleton, type LoadingSkeletonProps, type Margin, type Marker, MaxLines, type MaxLinesProps, type MaybeFn, type MenuItem, type MenuSection, ModalBody, ModalFilterItem, ModalFooter, ModalHeader, type ModalProps, type ModalSize, MultiLineSelectField, type MultiLineSelectFieldProps, MultiSelectField, type MultiSelectFieldProps, NavLink, type NavLinkProps, type NavLinkVariant, Navbar, NavbarLayout, type NavbarLayoutProps, type NavbarProps, type NavbarUser, type NestedOption, type NestedOptionsOrLoad, NumberField, type NumberFieldProps, type NumberFieldType, type OffsetAndLimit, type OnRowDragEvent, type OnRowSelect, type Only, type OpenDetailOpts, type OpenInDrawerOpts, OpenModal, type OpenRightPaneOpts, type Optional, type Padding, PageHeader, PageHeaderLayout, type PageHeaderLayoutProps, type PageHeaderProps, type PageNumberAndSize, type PageSettings, Pagination, type PaginationConfig, Palette, type Pin, type Placement, type PlainDate, type PresentationFieldProps, PresentationProvider, PreventBrowserScroll, type Properties, RIGHT_SIDEBAR_MIN_WIDTH, type RadioFieldOption, RadioGroupField, type RadioGroupFieldProps, type RenderAs, type RenderCellFn, ResponsiveGrid, type ResponsiveGridConfig, ResponsiveGridContext, ResponsiveGridItem, type ResponsiveGridItemProps, type ResponsiveGridProps, RichTextField, RichTextFieldImpl, type RichTextFieldProps, RightPaneContext, RightPaneLayout, type RightPaneLayoutContextProps, RightPaneProvider, RightSidebar, type RightSidebarProps, type RouteTab, type RouteTabWithContent, Row, type RowStyle, type RowStyles, RuntimeCss, type RuntimeStyles, SIDE_NAV_LAYOUT_STATE_STORAGE_KEY, ScrollShadows, ScrollableContent, ScrollableFooter, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedState, SideNav, SideNavLayout, type SideNavLayoutContextProps, type SideNavLayoutProps, SideNavLayoutProvider, type SideNavLayoutState, type SideNavProps, type SidePanelProps, type SidebarContentProps, type SimpleHeaderAndData, SortHeader, type SortOn, type SortState, StaticField, type Step, Stepper, type StepperProps, type StyleKind, SubmitButton, type SubmitButtonProps, SuperDrawerContent, SuperDrawerHeader, SuperDrawerWidth, type SupportedDateFormat, Switch, type SwitchProps, TOTALS, type Tab, TabContent, type TabWithContent, TableReviewLayout, type TableReviewLayoutProps, TableState, TableStateContext, type TableView, Tabs, TabsWithContent, Tag, type TagType, type TestIds, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldApi, type TextFieldInternalProps, type TextFieldProps, type TextFieldXss, Toast, ToggleButton, type ToggleButtonProps, ToggleChip, ToggleChipGroup, type ToggleChipGroupProps, type ToggleChipProps, ToggleChips, type ToggleChipsProps, Tokens, Tooltip, TreeSelectField, type TreeSelectFieldProps, type TriggerNoticeProps, type Typography, type UseModalHook, type UsePersistedFilterProps, type UseQueryState, type UseRightPaneHook, type UseSnackbarHook, type UseSuperDrawerHook, type UseToastProps, type Value, ViewToggleButton, type Xss, type ZIndex, actionColumn, applyRowFn, assignDefaultColumnIds, beamLayoutViewportHeightVar, beamLayoutViewportWidthVar, beamNavbarLayoutHeightVar, beamPageHeaderLayoutHeightVar, beamSideNavLayoutWidthVar, beamTableActionsHeightVar, booleanFilter, boundCheckboxField, boundCheckboxGroupField, boundDateField, boundDateRangeField, boundIconCardField, boundIconCardGroupField, boundMultiSelectField, boundMultilineSelectField, boundNumberField, boundRadioGroupField, boundRichTextField, boundSelectField, boundSwitchField, boundTextAreaField, boundTextField, boundToggleChipGroupField, boundTreeSelectField, calcColumnLayout, calcColumnSizes, cardStyle, checkboxFilter, chipBaseStyles, chipDisabledStyles, chipHoverOnlyStyles, chipHoverStyles, collapseColumn, column, condensedStyle, contrastDataTheme, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, documentScrollChromeLeft, documentScrollChromeWidth, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatPlainDate, formatValue, generateColumnId, getAlignment, getColumnBorderCss, getDateFormat, getFirstOrLastCellCss, getJustification, getNavLinkStyles, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isGridTableProps, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, marker, matchesFilter, maybeCssVar, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, parseWidthToPx, persistentItemPrefix, pressedOverlayCss, px, recursivelyGetContainingRow, reservedRowKinds, resolveTableContentWidth, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, selectColumn, selectedStyles, setDefaultStyle, setGridTableDefaults, setRunningInJest, shouldSkipScrollTo, simpleDataRows, simpleHeader, singleFilter, sortFn, sortRows, stickyNavAndHeaderOffset, stickyTableHeaderOffset, sumColumnSizesPx, switchFocusStyles, switchHoverStyles, switchSelectedHoverStyles, toContent, toLimitAndOffset, toPageNumberSize, toggleFilter, toggleFocusStyles, toggleHoverStyles, togglePressStyles, treeFilter, updateFilter, useAutoSaveStatus, useBreakpoint, useComputed, useContentOverflow, useContrastScope, useDnDGridItem, type useDnDGridItemProps, useFilter, useGridTableApi, useGridTableLayoutState, useGroupBy, useHasSideNavLayoutProvider, useHover, useModal, usePersistedFilter, useQueryState, useResponsiveGrid, useResponsiveGridItem, type useResponsiveGridProps, useRightPane, useRightPaneContext, useRuntimeStyle, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSideNavLayoutContext, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, useVirtualizedScrollParent, visit, zIndices };
8951
+ export { ASC, Accordion, AccordionList, type AccordionProps, type AccordionSize, type ActionButtonProps, type AppNavGroup, type AppNavItem, type AppNavLink, type AppNavSection, type AppNavSectionItem, AutoSaveIndicator, AutoSaveStatus, AutoSaveStatusContext, AutoSaveStatusProvider, Autocomplete, type AutocompleteProps, Avatar, AvatarButton, type AvatarButtonProps, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Banner, type BannerProps, type BannerTypes, BaseFilter, type BaseQueryTableProps, type BaseTableProps, type BeamButtonProps, type BeamColor, type BeamFocusableProps, BeamProvider, type BeamTextFieldProps, BoundCheckboxField, type BoundCheckboxFieldProps, BoundCheckboxGroupField, type BoundCheckboxGroupFieldProps, BoundChipSelectField, BoundDateField, type BoundDateFieldProps, BoundDateRangeField, type BoundDateRangeFieldProps, BoundForm, type BoundFormInputConfig, type BoundFormProps, type BoundFormRowInputs, BoundIconCardField, type BoundIconCardFieldProps, BoundIconCardGroupField, type BoundIconCardGroupFieldProps, BoundMultiLineSelectField, type BoundMultiLineSelectFieldProps, BoundMultiSelectField, type BoundMultiSelectFieldProps, BoundNumberField, type BoundNumberFieldProps, BoundRadioGroupField, type BoundRadioGroupFieldProps, BoundRichTextField, type BoundRichTextFieldProps, BoundSelectAndTextField, BoundSelectField, type BoundSelectFieldProps, BoundSwitchField, type BoundSwitchFieldProps, BoundTextAreaField, type BoundTextAreaFieldProps, BoundTextField, type BoundTextFieldProps, BoundToggleChipGroupField, type BoundToggleChipGroupFieldProps, BoundTreeSelectField, type BoundTreeSelectFieldProps, type Breakpoint, Breakpoints, type BuildtimeStyles, Button, ButtonDatePicker, ButtonGroup, type ButtonGroupButton, type ButtonGroupProps, ButtonMenu, type ButtonMenuProps, ButtonModal, type ButtonModalProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardTag, type CardType, type CheckFn, Checkbox, CheckboxGroup, type CheckboxGroupItemOption, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, ChipSelectField, type ChipSelectFieldProps, type ChipType, ChipTypes, type ChipValue, Chips, type ChipsProps, CollapseToggle, CollapsedContext, type ColumnLayoutResult, ConfirmCloseModal, type ContentStack, ContrastScope, Copy, CountBadge, type CountBadgeProps, Css, CssReset, type CssSetVarKeys, type CssSetVarScalar, type CssSetVarValue, DESC, DateField, type DateFieldFormat, type DateFieldMode, type DateFieldProps, type DateFilterValue, type DateMatcher, type DateRange, DateRangeField, type DateRangeFieldProps, type DateRangeFilterValue, type DefinedFilterValue, type Direction, type DiscriminateUnion, type DividerMenuItemType, DnDGrid, DnDGridItemHandle, type DnDGridItemHandleProps, type DnDGridItemProps, type DnDGridProps, type DragData, EXPANDABLE_HEADER, EditColumnsButton, ErrorMessage, FieldGroup, type Filter, type FilterDefs, _FilterDropdownMenu as FilterDropdownMenu, type FilterImpls, FilterModal, _Filters as Filters, type Font, FormDivider, FormHeading, type FormHeadingProps, FormLines, type FormLinesProps, FormPageLayout, FormRow, type FormSectionConfig, type FormWidth, FullBleed, type GridCellAlignment, type GridCellContent, type GridColumn, type GridColumnBorder, type GridColumnWithId, type GridDataRow, type GridRowKind, type GridRowLookup, type GridSortConfig, type GridStyle, GridTable, type GridTableApi, type GridTableCollapseToggleProps, type GridTableDefaults, GridTableLayout, type GridTableLayoutProps, type GridTableProps, type GridTablePropsWithRows, type GridTableScrollOptions, type GridTableXss, type GroupByHook, HB_QUIPS_FLAVOR, HB_QUIPS_MISSION, HEADER, type HasIdAndName, HbLoadingSpinner, HbSpinnerProvider, HelperText, HomeboundLogo, Icon, IconButton, type IconButtonProps, type IconButtonVariant, IconCard, type IconCardProps, type IconKey, type IconMenuItemType, type IconProps, Icons, type IfAny, type ImageFitType, type ImageMenuItemType, type InfiniteScroll, type InlineStyle, type InputStylePalette, KEPT_GROUP, type Kinded, Loader, LoadingSkeleton, type LoadingSkeletonProps, type Margin, type Marker, MaxLines, type MaxLinesProps, type MaybeFn, type MenuItem, type MenuSection, ModalBody, ModalFilterItem, ModalFooter, ModalHeader, type ModalProps, type ModalSize, MultiLineSelectField, type MultiLineSelectFieldProps, MultiSelectField, type MultiSelectFieldProps, NavLink, type NavLinkProps, type NavLinkVariant, Navbar, NavbarLayout, type NavbarLayoutProps, type NavbarProps, type NavbarUser, type NestedOption, type NestedOptionsOrLoad, NumberField, type NumberFieldProps, type NumberFieldType, type OffsetAndLimit, type OnRowDragEvent, type OnRowSelect, type Only, type OpenDetailOpts, type OpenInDrawerOpts, OpenModal, type OpenRightPaneOpts, type Optional, type Padding, PageHeader, PageHeaderLayout, type PageHeaderLayoutProps, type PageHeaderProps, type PageNumberAndSize, type PageSettings, Pagination, type PaginationConfig, Palette, type Pin, type Placement, type PlainDate, type PresentationFieldProps, PresentationProvider, PreventBrowserScroll, type Properties, RIGHT_SIDEBAR_MIN_WIDTH, type RadioFieldOption, RadioGroupField, type RadioGroupFieldProps, type RenderAs, type RenderCellFn, ResponsiveGrid, type ResponsiveGridConfig, ResponsiveGridContext, ResponsiveGridItem, type ResponsiveGridItemProps, type ResponsiveGridProps, RichTextField, RichTextFieldImpl, type RichTextFieldProps, RightPaneContext, RightPaneLayout, type RightPaneLayoutContextProps, RightPaneProvider, RightSidebar, type RightSidebarProps, type RouteTab, type RouteTabWithContent, Row, type RowStyle, type RowStyles, RuntimeCss, type RuntimeStyles, SIDE_NAV_LAYOUT_STATE_STORAGE_KEY, ScrollShadows, ScrollableContent, ScrollableFooter, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedFilterLabelValue, type SelectedState, SideNav, SideNavLayout, type SideNavLayoutContextProps, type SideNavLayoutProps, SideNavLayoutProvider, type SideNavLayoutState, type SideNavProps, type SidePanelProps, type SidebarContentProps, type SimpleHeaderAndData, SortHeader, type SortOn, type SortState, StaticField, type Step, Stepper, type StepperProps, type StyleKind, SubmitButton, type SubmitButtonProps, SuperDrawerContent, SuperDrawerHeader, SuperDrawerWidth, type SupportedDateFormat, Switch, type SwitchProps, TOTALS, type Tab, TabContent, type TabWithContent, TableReviewLayout, type TableReviewLayoutProps, TableState, TableStateContext, type TableView, Tabs, TabsWithContent, Tag, type TagType, type TestIds, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldApi, type TextFieldInternalProps, type TextFieldProps, type TextFieldXss, Toast, ToggleButton, type ToggleButtonProps, ToggleChip, ToggleChipGroup, type ToggleChipGroupProps, type ToggleChipProps, ToggleChips, type ToggleChipsProps, Tokens, Tooltip, TreeSelectField, type TreeSelectFieldProps, type TriggerNoticeProps, type Typography, type UseModalHook, type UsePersistedFilterProps, type UseQueryState, type UseRightPaneHook, type UseSnackbarHook, type UseSuperDrawerHook, type UseToastProps, type Value, ViewToggleButton, type Xss, type ZIndex, actionColumn, applyRowFn, assignDefaultColumnIds, beamLayoutViewportHeightVar, beamLayoutViewportWidthVar, beamNavbarLayoutHeightVar, beamPageHeaderLayoutHeightVar, beamSideNavLayoutWidthVar, beamTableActionsHeightVar, booleanFilter, boundCheckboxField, boundCheckboxGroupField, boundDateField, boundDateRangeField, boundIconCardField, boundIconCardGroupField, boundMultiSelectField, boundMultilineSelectField, boundNumberField, boundRadioGroupField, boundRichTextField, boundSelectField, boundSwitchField, boundTextAreaField, boundTextField, boundToggleChipGroupField, boundTreeSelectField, calcColumnLayout, calcColumnSizes, cardStyle, checkboxFilter, chipBaseStyles, chipDisabledStyles, chipHoverOnlyStyles, chipHoverStyles, collapseColumn, column, condensedStyle, contrastDataTheme, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, documentScrollChromeLeft, documentScrollChromeWidth, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatPlainDate, formatValue, generateColumnId, getAlignment, getColumnBorderCss, getDateFormat, getFirstOrLastCellCss, getJustification, getNavLinkStyles, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isGridTableProps, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, marker, matchesFilter, maybeCssVar, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, parseWidthToPx, persistentItemPrefix, pressedOverlayCss, px, recursivelyGetContainingRow, reservedRowKinds, resolveTableContentWidth, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, selectColumn, selectedStyles, setDefaultStyle, setGridTableDefaults, setRunningInJest, shouldSkipScrollTo, simpleDataRows, simpleHeader, singleFilter, sortFn, sortRows, stickyNavAndHeaderOffset, stickyTableHeaderOffset, sumColumnSizesPx, switchFocusStyles, switchHoverStyles, switchSelectedHoverStyles, toContent, toLimitAndOffset, toPageNumberSize, toggleFilter, toggleFocusStyles, toggleHoverStyles, togglePressStyles, treeFilter, updateFilter, useAutoSaveStatus, useBreakpoint, useComputed, useContentOverflow, useContrastScope, useDnDGridItem, type useDnDGridItemProps, useFilter, useGridTableApi, useGridTableLayoutState, useGroupBy, useHasSideNavLayoutProvider, useHover, useModal, usePersistedFilter, useQueryState, useResponsiveGrid, useResponsiveGridItem, type useResponsiveGridProps, useRightPane, useRightPaneContext, useRuntimeStyle, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSideNavLayoutContext, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, useVirtualizedScrollParent, visit, zIndices };
package/dist/index.d.ts CHANGED
@@ -6369,14 +6369,18 @@ declare function newMethodMissingProxy<T extends object, Y>(object: T, methodMis
6369
6369
  * Each filter is typically created by a factory function, i.e. `singleFilter`,
6370
6370
  * `multiFilter`, etc.
6371
6371
  */
6372
+ /** A set filter field value — null and undefined excluded (matches the `V` in `Filter<V>` for that field). */
6373
+ type DefinedFilterValue<F, K extends keyof F> = Exclude<F[K], null | undefined>;
6372
6374
  type FilterDefs<F> = {
6373
- [K in keyof F]: (key: string) => Filter<Exclude<F[K], null | undefined>>;
6375
+ [K in keyof F]: (key: string) => Filter<DefinedFilterValue<F, K>>;
6374
6376
  };
6375
6377
  type FilterImpls<F> = {
6376
- [K in keyof F]: Filter<Exclude<F[K], null | undefined>>;
6378
+ [K in keyof F]: Filter<DefinedFilterValue<F, K>>;
6377
6379
  };
6380
+ /** Value shape passed when resolving a display label for one active selection (array filters: a single element). */
6381
+ type SelectedFilterLabelValue<V> = V extends readonly (infer E)[] ? E : V;
6378
6382
  /** A filter instance that knows how to render itself within the `Filters` component. */
6379
- interface Filter<V> {
6383
+ type Filter<V> = {
6380
6384
  label: string;
6381
6385
  hideLabelInModal?: boolean;
6382
6386
  /** The default value to use in `usePersistedFilter` for creating the initial filter. */
@@ -6395,9 +6399,11 @@ interface Filter<V> {
6395
6399
  * backwards-compatible serialized formats when needed.
6396
6400
  */
6397
6401
  dehydrate?(value: V | undefined): unknown;
6402
+ /** Returns the human-readable label for an active filter value, or undefined when the value should not produce a chip. */
6403
+ formatSelectedFilterLabel(value: SelectedFilterLabelValue<V>): string | undefined;
6398
6404
  /** Renders the filter into either the page or the modal. */
6399
6405
  render(value: V | undefined, setValue: (value: V | undefined) => void, tid: TestIds, inModal: boolean, vertical: boolean): JSX.Element;
6400
- }
6406
+ };
6401
6407
 
6402
6408
  type TextFieldBaseProps<X> = {
6403
6409
  labelProps?: LabelHTMLAttributes<HTMLLabelElement>;
@@ -7160,11 +7166,11 @@ declare class BaseFilter<V, P extends {
7160
7166
  }
7161
7167
 
7162
7168
  type BooleanOption = [boolean | undefined, string];
7163
- interface BooleanFilterProps {
7169
+ type BooleanFilterProps = {
7164
7170
  options?: BooleanOption[];
7165
7171
  label?: string;
7166
7172
  defaultValue?: undefined | boolean;
7167
- }
7173
+ };
7168
7174
  declare function booleanFilter(props: BooleanFilterProps): (key: string) => Filter<boolean>;
7169
7175
 
7170
7176
  type CheckboxFilterProps<V> = {
@@ -7187,9 +7193,9 @@ type CheckboxFilterProps<V> = {
7187
7193
  declare function checkboxFilter<V = boolean>(props: CheckboxFilterProps<V>): (key: string) => Filter<V>;
7188
7194
 
7189
7195
  /** Props for the search box integrated into FilterDropdownMenu. */
7190
- interface SearchBoxProps {
7196
+ type SearchBoxProps = {
7191
7197
  onSearch: (filter: string) => void;
7192
- }
7198
+ };
7193
7199
  /**
7194
7200
  * FilterDropdownMenu is a newer filter UI pattern that shows a "Filter" button
7195
7201
  * which expands to reveal filter controls in a row below, with chips displayed
@@ -7203,7 +7209,7 @@ interface SearchBoxProps {
7203
7209
  * Note: We expect the existing `Filters` component to eventually become
7204
7210
  * `FilterDropdownMenu`, but it hasn't been rolled out everywhere yet.
7205
7211
  */
7206
- interface FilterDropdownMenuProps<F extends Record<string, unknown>, G extends Value = string> {
7212
+ type FilterDropdownMenuProps<F extends Record<string, unknown>, G extends Value = string> = {
7207
7213
  /** List of filters. When omitted, no filter UI is rendered. */
7208
7214
  filterDefs?: FilterDefs<F>;
7209
7215
  /** The current filter value. */
@@ -7223,7 +7229,7 @@ interface FilterDropdownMenuProps<F extends Record<string, unknown>, G extends V
7223
7229
  };
7224
7230
  /** When provided, renders a search box before the filter controls. */
7225
7231
  searchProps?: SearchBoxProps;
7226
- }
7232
+ };
7227
7233
  declare function FilterDropdownMenu<F extends Record<string, unknown>, G extends Value = string>(props: FilterDropdownMenuProps<F, G>): JSX.Element;
7228
7234
  declare const _FilterDropdownMenu: typeof FilterDropdownMenu;
7229
7235
 
@@ -8942,4 +8948,4 @@ declare const zIndices: {
8942
8948
  };
8943
8949
  type ZIndex = (typeof zIndices)[keyof typeof zIndices];
8944
8950
 
8945
- export { ASC, Accordion, AccordionList, type AccordionProps, type AccordionSize, type ActionButtonProps, type AppNavGroup, type AppNavItem, type AppNavLink, type AppNavSection, type AppNavSectionItem, AutoSaveIndicator, AutoSaveStatus, AutoSaveStatusContext, AutoSaveStatusProvider, Autocomplete, type AutocompleteProps, Avatar, AvatarButton, type AvatarButtonProps, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Banner, type BannerProps, type BannerTypes, BaseFilter, type BaseQueryTableProps, type BaseTableProps, type BeamButtonProps, type BeamColor, type BeamFocusableProps, BeamProvider, type BeamTextFieldProps, BoundCheckboxField, type BoundCheckboxFieldProps, BoundCheckboxGroupField, type BoundCheckboxGroupFieldProps, BoundChipSelectField, BoundDateField, type BoundDateFieldProps, BoundDateRangeField, type BoundDateRangeFieldProps, BoundForm, type BoundFormInputConfig, type BoundFormProps, type BoundFormRowInputs, BoundIconCardField, type BoundIconCardFieldProps, BoundIconCardGroupField, type BoundIconCardGroupFieldProps, BoundMultiLineSelectField, type BoundMultiLineSelectFieldProps, BoundMultiSelectField, type BoundMultiSelectFieldProps, BoundNumberField, type BoundNumberFieldProps, BoundRadioGroupField, type BoundRadioGroupFieldProps, BoundRichTextField, type BoundRichTextFieldProps, BoundSelectAndTextField, BoundSelectField, type BoundSelectFieldProps, BoundSwitchField, type BoundSwitchFieldProps, BoundTextAreaField, type BoundTextAreaFieldProps, BoundTextField, type BoundTextFieldProps, BoundToggleChipGroupField, type BoundToggleChipGroupFieldProps, BoundTreeSelectField, type BoundTreeSelectFieldProps, type Breakpoint, Breakpoints, type BuildtimeStyles, Button, ButtonDatePicker, ButtonGroup, type ButtonGroupButton, type ButtonGroupProps, ButtonMenu, type ButtonMenuProps, ButtonModal, type ButtonModalProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardTag, type CardType, type CheckFn, Checkbox, CheckboxGroup, type CheckboxGroupItemOption, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, ChipSelectField, type ChipSelectFieldProps, type ChipType, ChipTypes, type ChipValue, Chips, type ChipsProps, CollapseToggle, CollapsedContext, type ColumnLayoutResult, ConfirmCloseModal, type ContentStack, ContrastScope, Copy, CountBadge, type CountBadgeProps, Css, CssReset, type CssSetVarKeys, type CssSetVarScalar, type CssSetVarValue, DESC, DateField, type DateFieldFormat, type DateFieldMode, type DateFieldProps, type DateFilterValue, type DateMatcher, type DateRange, DateRangeField, type DateRangeFieldProps, type DateRangeFilterValue, type Direction, type DiscriminateUnion, type DividerMenuItemType, DnDGrid, DnDGridItemHandle, type DnDGridItemHandleProps, type DnDGridItemProps, type DnDGridProps, type DragData, EXPANDABLE_HEADER, EditColumnsButton, ErrorMessage, FieldGroup, type Filter, type FilterDefs, _FilterDropdownMenu as FilterDropdownMenu, type FilterImpls, FilterModal, _Filters as Filters, type Font, FormDivider, FormHeading, type FormHeadingProps, FormLines, type FormLinesProps, FormPageLayout, FormRow, type FormSectionConfig, type FormWidth, FullBleed, type GridCellAlignment, type GridCellContent, type GridColumn, type GridColumnBorder, type GridColumnWithId, type GridDataRow, type GridRowKind, type GridRowLookup, type GridSortConfig, type GridStyle, GridTable, type GridTableApi, type GridTableCollapseToggleProps, type GridTableDefaults, GridTableLayout, type GridTableLayoutProps, type GridTableProps, type GridTablePropsWithRows, type GridTableScrollOptions, type GridTableXss, type GroupByHook, HB_QUIPS_FLAVOR, HB_QUIPS_MISSION, HEADER, type HasIdAndName, HbLoadingSpinner, HbSpinnerProvider, HelperText, HomeboundLogo, Icon, IconButton, type IconButtonProps, type IconButtonVariant, IconCard, type IconCardProps, type IconKey, type IconMenuItemType, type IconProps, Icons, type IfAny, type ImageFitType, type ImageMenuItemType, type InfiniteScroll, type InlineStyle, type InputStylePalette, KEPT_GROUP, type Kinded, Loader, LoadingSkeleton, type LoadingSkeletonProps, type Margin, type Marker, MaxLines, type MaxLinesProps, type MaybeFn, type MenuItem, type MenuSection, ModalBody, ModalFilterItem, ModalFooter, ModalHeader, type ModalProps, type ModalSize, MultiLineSelectField, type MultiLineSelectFieldProps, MultiSelectField, type MultiSelectFieldProps, NavLink, type NavLinkProps, type NavLinkVariant, Navbar, NavbarLayout, type NavbarLayoutProps, type NavbarProps, type NavbarUser, type NestedOption, type NestedOptionsOrLoad, NumberField, type NumberFieldProps, type NumberFieldType, type OffsetAndLimit, type OnRowDragEvent, type OnRowSelect, type Only, type OpenDetailOpts, type OpenInDrawerOpts, OpenModal, type OpenRightPaneOpts, type Optional, type Padding, PageHeader, PageHeaderLayout, type PageHeaderLayoutProps, type PageHeaderProps, type PageNumberAndSize, type PageSettings, Pagination, type PaginationConfig, Palette, type Pin, type Placement, type PlainDate, type PresentationFieldProps, PresentationProvider, PreventBrowserScroll, type Properties, RIGHT_SIDEBAR_MIN_WIDTH, type RadioFieldOption, RadioGroupField, type RadioGroupFieldProps, type RenderAs, type RenderCellFn, ResponsiveGrid, type ResponsiveGridConfig, ResponsiveGridContext, ResponsiveGridItem, type ResponsiveGridItemProps, type ResponsiveGridProps, RichTextField, RichTextFieldImpl, type RichTextFieldProps, RightPaneContext, RightPaneLayout, type RightPaneLayoutContextProps, RightPaneProvider, RightSidebar, type RightSidebarProps, type RouteTab, type RouteTabWithContent, Row, type RowStyle, type RowStyles, RuntimeCss, type RuntimeStyles, SIDE_NAV_LAYOUT_STATE_STORAGE_KEY, ScrollShadows, ScrollableContent, ScrollableFooter, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedState, SideNav, SideNavLayout, type SideNavLayoutContextProps, type SideNavLayoutProps, SideNavLayoutProvider, type SideNavLayoutState, type SideNavProps, type SidePanelProps, type SidebarContentProps, type SimpleHeaderAndData, SortHeader, type SortOn, type SortState, StaticField, type Step, Stepper, type StepperProps, type StyleKind, SubmitButton, type SubmitButtonProps, SuperDrawerContent, SuperDrawerHeader, SuperDrawerWidth, type SupportedDateFormat, Switch, type SwitchProps, TOTALS, type Tab, TabContent, type TabWithContent, TableReviewLayout, type TableReviewLayoutProps, TableState, TableStateContext, type TableView, Tabs, TabsWithContent, Tag, type TagType, type TestIds, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldApi, type TextFieldInternalProps, type TextFieldProps, type TextFieldXss, Toast, ToggleButton, type ToggleButtonProps, ToggleChip, ToggleChipGroup, type ToggleChipGroupProps, type ToggleChipProps, ToggleChips, type ToggleChipsProps, Tokens, Tooltip, TreeSelectField, type TreeSelectFieldProps, type TriggerNoticeProps, type Typography, type UseModalHook, type UsePersistedFilterProps, type UseQueryState, type UseRightPaneHook, type UseSnackbarHook, type UseSuperDrawerHook, type UseToastProps, type Value, ViewToggleButton, type Xss, type ZIndex, actionColumn, applyRowFn, assignDefaultColumnIds, beamLayoutViewportHeightVar, beamLayoutViewportWidthVar, beamNavbarLayoutHeightVar, beamPageHeaderLayoutHeightVar, beamSideNavLayoutWidthVar, beamTableActionsHeightVar, booleanFilter, boundCheckboxField, boundCheckboxGroupField, boundDateField, boundDateRangeField, boundIconCardField, boundIconCardGroupField, boundMultiSelectField, boundMultilineSelectField, boundNumberField, boundRadioGroupField, boundRichTextField, boundSelectField, boundSwitchField, boundTextAreaField, boundTextField, boundToggleChipGroupField, boundTreeSelectField, calcColumnLayout, calcColumnSizes, cardStyle, checkboxFilter, chipBaseStyles, chipDisabledStyles, chipHoverOnlyStyles, chipHoverStyles, collapseColumn, column, condensedStyle, contrastDataTheme, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, documentScrollChromeLeft, documentScrollChromeWidth, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatPlainDate, formatValue, generateColumnId, getAlignment, getColumnBorderCss, getDateFormat, getFirstOrLastCellCss, getJustification, getNavLinkStyles, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isGridTableProps, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, marker, matchesFilter, maybeCssVar, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, parseWidthToPx, persistentItemPrefix, pressedOverlayCss, px, recursivelyGetContainingRow, reservedRowKinds, resolveTableContentWidth, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, selectColumn, selectedStyles, setDefaultStyle, setGridTableDefaults, setRunningInJest, shouldSkipScrollTo, simpleDataRows, simpleHeader, singleFilter, sortFn, sortRows, stickyNavAndHeaderOffset, stickyTableHeaderOffset, sumColumnSizesPx, switchFocusStyles, switchHoverStyles, switchSelectedHoverStyles, toContent, toLimitAndOffset, toPageNumberSize, toggleFilter, toggleFocusStyles, toggleHoverStyles, togglePressStyles, treeFilter, updateFilter, useAutoSaveStatus, useBreakpoint, useComputed, useContentOverflow, useContrastScope, useDnDGridItem, type useDnDGridItemProps, useFilter, useGridTableApi, useGridTableLayoutState, useGroupBy, useHasSideNavLayoutProvider, useHover, useModal, usePersistedFilter, useQueryState, useResponsiveGrid, useResponsiveGridItem, type useResponsiveGridProps, useRightPane, useRightPaneContext, useRuntimeStyle, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSideNavLayoutContext, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, useVirtualizedScrollParent, visit, zIndices };
8951
+ export { ASC, Accordion, AccordionList, type AccordionProps, type AccordionSize, type ActionButtonProps, type AppNavGroup, type AppNavItem, type AppNavLink, type AppNavSection, type AppNavSectionItem, AutoSaveIndicator, AutoSaveStatus, AutoSaveStatusContext, AutoSaveStatusProvider, Autocomplete, type AutocompleteProps, Avatar, AvatarButton, type AvatarButtonProps, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Banner, type BannerProps, type BannerTypes, BaseFilter, type BaseQueryTableProps, type BaseTableProps, type BeamButtonProps, type BeamColor, type BeamFocusableProps, BeamProvider, type BeamTextFieldProps, BoundCheckboxField, type BoundCheckboxFieldProps, BoundCheckboxGroupField, type BoundCheckboxGroupFieldProps, BoundChipSelectField, BoundDateField, type BoundDateFieldProps, BoundDateRangeField, type BoundDateRangeFieldProps, BoundForm, type BoundFormInputConfig, type BoundFormProps, type BoundFormRowInputs, BoundIconCardField, type BoundIconCardFieldProps, BoundIconCardGroupField, type BoundIconCardGroupFieldProps, BoundMultiLineSelectField, type BoundMultiLineSelectFieldProps, BoundMultiSelectField, type BoundMultiSelectFieldProps, BoundNumberField, type BoundNumberFieldProps, BoundRadioGroupField, type BoundRadioGroupFieldProps, BoundRichTextField, type BoundRichTextFieldProps, BoundSelectAndTextField, BoundSelectField, type BoundSelectFieldProps, BoundSwitchField, type BoundSwitchFieldProps, BoundTextAreaField, type BoundTextAreaFieldProps, BoundTextField, type BoundTextFieldProps, BoundToggleChipGroupField, type BoundToggleChipGroupFieldProps, BoundTreeSelectField, type BoundTreeSelectFieldProps, type Breakpoint, Breakpoints, type BuildtimeStyles, Button, ButtonDatePicker, ButtonGroup, type ButtonGroupButton, type ButtonGroupProps, ButtonMenu, type ButtonMenuProps, ButtonModal, type ButtonModalProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardTag, type CardType, type CheckFn, Checkbox, CheckboxGroup, type CheckboxGroupItemOption, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, ChipSelectField, type ChipSelectFieldProps, type ChipType, ChipTypes, type ChipValue, Chips, type ChipsProps, CollapseToggle, CollapsedContext, type ColumnLayoutResult, ConfirmCloseModal, type ContentStack, ContrastScope, Copy, CountBadge, type CountBadgeProps, Css, CssReset, type CssSetVarKeys, type CssSetVarScalar, type CssSetVarValue, DESC, DateField, type DateFieldFormat, type DateFieldMode, type DateFieldProps, type DateFilterValue, type DateMatcher, type DateRange, DateRangeField, type DateRangeFieldProps, type DateRangeFilterValue, type DefinedFilterValue, type Direction, type DiscriminateUnion, type DividerMenuItemType, DnDGrid, DnDGridItemHandle, type DnDGridItemHandleProps, type DnDGridItemProps, type DnDGridProps, type DragData, EXPANDABLE_HEADER, EditColumnsButton, ErrorMessage, FieldGroup, type Filter, type FilterDefs, _FilterDropdownMenu as FilterDropdownMenu, type FilterImpls, FilterModal, _Filters as Filters, type Font, FormDivider, FormHeading, type FormHeadingProps, FormLines, type FormLinesProps, FormPageLayout, FormRow, type FormSectionConfig, type FormWidth, FullBleed, type GridCellAlignment, type GridCellContent, type GridColumn, type GridColumnBorder, type GridColumnWithId, type GridDataRow, type GridRowKind, type GridRowLookup, type GridSortConfig, type GridStyle, GridTable, type GridTableApi, type GridTableCollapseToggleProps, type GridTableDefaults, GridTableLayout, type GridTableLayoutProps, type GridTableProps, type GridTablePropsWithRows, type GridTableScrollOptions, type GridTableXss, type GroupByHook, HB_QUIPS_FLAVOR, HB_QUIPS_MISSION, HEADER, type HasIdAndName, HbLoadingSpinner, HbSpinnerProvider, HelperText, HomeboundLogo, Icon, IconButton, type IconButtonProps, type IconButtonVariant, IconCard, type IconCardProps, type IconKey, type IconMenuItemType, type IconProps, Icons, type IfAny, type ImageFitType, type ImageMenuItemType, type InfiniteScroll, type InlineStyle, type InputStylePalette, KEPT_GROUP, type Kinded, Loader, LoadingSkeleton, type LoadingSkeletonProps, type Margin, type Marker, MaxLines, type MaxLinesProps, type MaybeFn, type MenuItem, type MenuSection, ModalBody, ModalFilterItem, ModalFooter, ModalHeader, type ModalProps, type ModalSize, MultiLineSelectField, type MultiLineSelectFieldProps, MultiSelectField, type MultiSelectFieldProps, NavLink, type NavLinkProps, type NavLinkVariant, Navbar, NavbarLayout, type NavbarLayoutProps, type NavbarProps, type NavbarUser, type NestedOption, type NestedOptionsOrLoad, NumberField, type NumberFieldProps, type NumberFieldType, type OffsetAndLimit, type OnRowDragEvent, type OnRowSelect, type Only, type OpenDetailOpts, type OpenInDrawerOpts, OpenModal, type OpenRightPaneOpts, type Optional, type Padding, PageHeader, PageHeaderLayout, type PageHeaderLayoutProps, type PageHeaderProps, type PageNumberAndSize, type PageSettings, Pagination, type PaginationConfig, Palette, type Pin, type Placement, type PlainDate, type PresentationFieldProps, PresentationProvider, PreventBrowserScroll, type Properties, RIGHT_SIDEBAR_MIN_WIDTH, type RadioFieldOption, RadioGroupField, type RadioGroupFieldProps, type RenderAs, type RenderCellFn, ResponsiveGrid, type ResponsiveGridConfig, ResponsiveGridContext, ResponsiveGridItem, type ResponsiveGridItemProps, type ResponsiveGridProps, RichTextField, RichTextFieldImpl, type RichTextFieldProps, RightPaneContext, RightPaneLayout, type RightPaneLayoutContextProps, RightPaneProvider, RightSidebar, type RightSidebarProps, type RouteTab, type RouteTabWithContent, Row, type RowStyle, type RowStyles, RuntimeCss, type RuntimeStyles, SIDE_NAV_LAYOUT_STATE_STORAGE_KEY, ScrollShadows, ScrollableContent, ScrollableFooter, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedFilterLabelValue, type SelectedState, SideNav, SideNavLayout, type SideNavLayoutContextProps, type SideNavLayoutProps, SideNavLayoutProvider, type SideNavLayoutState, type SideNavProps, type SidePanelProps, type SidebarContentProps, type SimpleHeaderAndData, SortHeader, type SortOn, type SortState, StaticField, type Step, Stepper, type StepperProps, type StyleKind, SubmitButton, type SubmitButtonProps, SuperDrawerContent, SuperDrawerHeader, SuperDrawerWidth, type SupportedDateFormat, Switch, type SwitchProps, TOTALS, type Tab, TabContent, type TabWithContent, TableReviewLayout, type TableReviewLayoutProps, TableState, TableStateContext, type TableView, Tabs, TabsWithContent, Tag, type TagType, type TestIds, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldApi, type TextFieldInternalProps, type TextFieldProps, type TextFieldXss, Toast, ToggleButton, type ToggleButtonProps, ToggleChip, ToggleChipGroup, type ToggleChipGroupProps, type ToggleChipProps, ToggleChips, type ToggleChipsProps, Tokens, Tooltip, TreeSelectField, type TreeSelectFieldProps, type TriggerNoticeProps, type Typography, type UseModalHook, type UsePersistedFilterProps, type UseQueryState, type UseRightPaneHook, type UseSnackbarHook, type UseSuperDrawerHook, type UseToastProps, type Value, ViewToggleButton, type Xss, type ZIndex, actionColumn, applyRowFn, assignDefaultColumnIds, beamLayoutViewportHeightVar, beamLayoutViewportWidthVar, beamNavbarLayoutHeightVar, beamPageHeaderLayoutHeightVar, beamSideNavLayoutWidthVar, beamTableActionsHeightVar, booleanFilter, boundCheckboxField, boundCheckboxGroupField, boundDateField, boundDateRangeField, boundIconCardField, boundIconCardGroupField, boundMultiSelectField, boundMultilineSelectField, boundNumberField, boundRadioGroupField, boundRichTextField, boundSelectField, boundSwitchField, boundTextAreaField, boundTextField, boundToggleChipGroupField, boundTreeSelectField, calcColumnLayout, calcColumnSizes, cardStyle, checkboxFilter, chipBaseStyles, chipDisabledStyles, chipHoverOnlyStyles, chipHoverStyles, collapseColumn, column, condensedStyle, contrastDataTheme, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, documentScrollChromeLeft, documentScrollChromeWidth, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatPlainDate, formatValue, generateColumnId, getAlignment, getColumnBorderCss, getDateFormat, getFirstOrLastCellCss, getJustification, getNavLinkStyles, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isGridTableProps, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, marker, matchesFilter, maybeCssVar, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, parseWidthToPx, persistentItemPrefix, pressedOverlayCss, px, recursivelyGetContainingRow, reservedRowKinds, resolveTableContentWidth, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, selectColumn, selectedStyles, setDefaultStyle, setGridTableDefaults, setRunningInJest, shouldSkipScrollTo, simpleDataRows, simpleHeader, singleFilter, sortFn, sortRows, stickyNavAndHeaderOffset, stickyTableHeaderOffset, sumColumnSizesPx, switchFocusStyles, switchHoverStyles, switchSelectedHoverStyles, toContent, toLimitAndOffset, toPageNumberSize, toggleFilter, toggleFocusStyles, toggleHoverStyles, togglePressStyles, treeFilter, updateFilter, useAutoSaveStatus, useBreakpoint, useComputed, useContentOverflow, useContrastScope, useDnDGridItem, type useDnDGridItemProps, useFilter, useGridTableApi, useGridTableLayoutState, useGroupBy, useHasSideNavLayoutProvider, useHover, useModal, usePersistedFilter, useQueryState, useResponsiveGrid, useResponsiveGridItem, type useResponsiveGridProps, useRightPane, useRightPaneContext, useRuntimeStyle, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSideNavLayoutContext, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, useVirtualizedScrollParent, visit, zIndices };
package/dist/index.js CHANGED
@@ -19008,6 +19008,12 @@ var DateFilter = class extends BaseFilter {
19008
19008
  dehydrate(value) {
19009
19009
  return value ? { op: value.op, value: dehydratePlainDate(value.value) } : void 0;
19010
19010
  }
19011
+ formatSelectedFilterLabel(value) {
19012
+ const { operations, getOperationValue, getOperationLabel } = this.props;
19013
+ const operation = operations.find((o) => getOperationValue(o) === value.op);
19014
+ const opLabel = operation ? getOperationLabel(operation) : String(value.op);
19015
+ return `${opLabel} ${formatDate(value.value, "date")}`;
19016
+ }
19011
19017
  render(value, setValue, tid, inModal, vertical) {
19012
19018
  const { label, operations, getOperationValue, getOperationLabel, defaultValue } = this.props;
19013
19019
  return /* @__PURE__ */ jsxs65(Fragment29, { children: [
@@ -19075,6 +19081,10 @@ var DateRangeFilter = class extends BaseFilter {
19075
19081
  value: value.value ? { from: dehydratePlainDate(value.value.from), to: dehydratePlainDate(value.value.to) } : void 0
19076
19082
  } : void 0;
19077
19083
  }
19084
+ formatSelectedFilterLabel(value) {
19085
+ const formatted = formatDateRange(value.value, "date");
19086
+ return formatted ? formatted : void 0;
19087
+ }
19078
19088
  render(value, setValue, tid, inModal, vertical) {
19079
19089
  const { label, placeholderText, disabledDays, testFieldLabel, defaultValue } = this.props;
19080
19090
  return /* @__PURE__ */ jsxs66(Fragment30, { children: [
@@ -19116,12 +19126,34 @@ function hydrateDateRange(value) {
19116
19126
  return { from: hydratedFrom, to: hydratedTo };
19117
19127
  }
19118
19128
 
19129
+ // src/components/Filters/selectedFilterLabelUtils.ts
19130
+ function resolveOptionSelectedFilterLabel(optionsOrLoad, getOptionValue, getOptionLabel, value) {
19131
+ const options = initializeOptions(optionsOrLoad, getOptionValue, getOptionLabel, void 0, false, false);
19132
+ const match = options.find((o) => getOptionValue(o) === value);
19133
+ return match ? getOptionLabel(match) : String(value);
19134
+ }
19135
+ function resolveTreeSelectedFilterLabel(optionsOrLoad, getOptionValue, getOptionLabel, value) {
19136
+ const options = resolveNestedOptions(optionsOrLoad);
19137
+ const match = options.flatMap(flattenOptions).find((o) => getOptionValue(o) === value);
19138
+ return match ? getOptionLabel(match) : String(value);
19139
+ }
19140
+ function resolveNestedOptions(optionsOrLoad) {
19141
+ if (Array.isArray(optionsOrLoad)) {
19142
+ return optionsOrLoad;
19143
+ }
19144
+ return optionsOrLoad.current ?? [];
19145
+ }
19146
+
19119
19147
  // src/components/Filters/MultiFilter.tsx
19120
19148
  import { jsx as jsx131 } from "react/jsx-runtime";
19121
19149
  function multiFilter(props) {
19122
19150
  return (key) => new MultiFilter(key, props);
19123
19151
  }
19124
19152
  var MultiFilter = class extends BaseFilter {
19153
+ formatSelectedFilterLabel(value) {
19154
+ const { options, getOptionValue, getOptionLabel } = this.props;
19155
+ return resolveOptionSelectedFilterLabel(options, getOptionValue, getOptionLabel, value);
19156
+ }
19125
19157
  render(value, setValue, tid, inModal, vertical) {
19126
19158
  if (inModal && Array.isArray(this.props.options) && this.props.options.length > 0 && this.props.options.length <= 8) {
19127
19159
  const { disabledOptions } = this.props;
@@ -19175,6 +19207,10 @@ function numberRangeFilter(props) {
19175
19207
  return (key) => new NumberRangeFilter(key, props);
19176
19208
  }
19177
19209
  var NumberRangeFilter = class extends BaseFilter {
19210
+ formatSelectedFilterLabel(value) {
19211
+ const parts = [value.min, value.max].filter((n) => n !== void 0);
19212
+ return parts.length > 0 ? parts.join(" \u2013 ") : void 0;
19213
+ }
19178
19214
  render(value, setValue, tid, inModal, vertical) {
19179
19215
  const {
19180
19216
  label,
@@ -19249,6 +19285,10 @@ function singleFilter(props) {
19249
19285
  }
19250
19286
  var allOption = {};
19251
19287
  var SingleFilter = class extends BaseFilter {
19288
+ formatSelectedFilterLabel(value) {
19289
+ const { options, getOptionValue, getOptionLabel } = this.props;
19290
+ return resolveOptionSelectedFilterLabel(options, getOptionValue, getOptionLabel, value);
19291
+ }
19252
19292
  render(value, setValue, tid, inModal, vertical) {
19253
19293
  const {
19254
19294
  label,
@@ -19285,6 +19325,10 @@ function treeFilter(props) {
19285
19325
  return (key) => new TreeFilter(key, props);
19286
19326
  }
19287
19327
  var TreeFilter = class extends BaseFilter {
19328
+ formatSelectedFilterLabel(value) {
19329
+ const { options, getOptionValue, getOptionLabel } = this.props;
19330
+ return resolveTreeSelectedFilterLabel(options, getOptionValue, getOptionLabel, value);
19331
+ }
19288
19332
  render(value, setValue, tid, inModal, vertical) {
19289
19333
  const { defaultValue, nothingSelectedText, filterBy = "root", ...props } = this.props;
19290
19334
  return /* @__PURE__ */ jsx134(
@@ -19312,6 +19356,11 @@ function booleanFilter(props) {
19312
19356
  return (key) => new BooleanFilter(key, props);
19313
19357
  }
19314
19358
  var BooleanFilter = class extends BaseFilter {
19359
+ formatSelectedFilterLabel(value) {
19360
+ const { options = defaultBooleanOptions } = this.props;
19361
+ const match = options.find(([optionValue]) => optionValue === value);
19362
+ return match ? match[1] : String(value);
19363
+ }
19315
19364
  render(value, setValue, tid, inModal, vertical) {
19316
19365
  const { options = defaultBooleanOptions, label, defaultValue, ...props } = this.props;
19317
19366
  return /* @__PURE__ */ jsx135(
@@ -19350,6 +19399,10 @@ function checkboxFilter(props) {
19350
19399
  });
19351
19400
  }
19352
19401
  var CheckboxFilter = class extends BaseFilter {
19402
+ formatSelectedFilterLabel(value) {
19403
+ const { onValue = true } = this.props;
19404
+ return value === onValue ? this.label : void 0;
19405
+ }
19353
19406
  render(value, setValue, tid, inModal, vertical) {
19354
19407
  const { defaultValue, onValue = true, offValue = void 0, ...props } = this.props;
19355
19408
  return /* @__PURE__ */ jsx136(
@@ -19504,6 +19557,10 @@ function toggleFilter(props) {
19504
19557
  });
19505
19558
  }
19506
19559
  var ToggleFilter = class extends BaseFilter {
19560
+ formatSelectedFilterLabel(value) {
19561
+ const { onValue = true } = this.props;
19562
+ return value === onValue ? this.label : void 0;
19563
+ }
19507
19564
  render(value, setValue, tid, inModal, vertical) {
19508
19565
  const { defaultValue, onValue = true, offValue = void 0, ...props } = this.props;
19509
19566
  return /* @__PURE__ */ jsx140(
@@ -19635,30 +19692,32 @@ function FilterChips({
19635
19692
  onClear,
19636
19693
  testId
19637
19694
  }) {
19638
- const chips = safeEntries(filterImpls).flatMap(([key]) => {
19639
- const value = filter[key];
19640
- if (!isDefined(value)) return [];
19641
- if (Array.isArray(value)) {
19642
- return value.map((item) => {
19643
- const chipKey = `${String(key)}_${item}`;
19644
- const newArray = value.filter((v) => v !== item);
19645
- return /* @__PURE__ */ jsx141(ToggleChip, { text: titleCase(String(item)), onClick: () => onChange(updateFilter(filter, key, newArray.length > 0 ? newArray : void 0)), ...testId[`chip_${chipKey}`] }, chipKey);
19646
- });
19647
- }
19648
- return /* @__PURE__ */ jsx141(ToggleChip, { text: titleCase(String(value)), onClick: () => onChange(updateFilter(filter, key, void 0)), ...testId[`chip_${String(key)}`] }, String(key));
19649
- });
19695
+ const chips = safeEntries(filterImpls).flatMap(([key, f]) => chipsForFilterKey(key, f, filter, onChange, testId));
19650
19696
  if (chips.length === 0) return null;
19651
19697
  return /* @__PURE__ */ jsxs70("div", { className: "df gap1 fww aic order_1", children: [
19652
19698
  chips,
19653
19699
  /* @__PURE__ */ jsx141(Button, { label: "Clear", variant: "tertiary", onClick: onClear, ...testId.clearBtn })
19654
19700
  ] });
19655
19701
  }
19702
+ function chipsForFilterKey(key, f, filter, onChange, testId) {
19703
+ const value = filter[key];
19704
+ if (!isDefined(value)) return [];
19705
+ if (Array.isArray(value)) {
19706
+ return value.flatMap((item) => {
19707
+ const label2 = f.formatSelectedFilterLabel(item);
19708
+ if (!isDefined(label2)) return [];
19709
+ const chipKey = `${String(key)}_${item}`;
19710
+ const newArray = value.filter((v) => v !== item);
19711
+ return /* @__PURE__ */ jsx141(ToggleChip, { text: label2, onClick: () => onChange(updateFilter(filter, key, newArray.length > 0 ? newArray : void 0)), ...testId[`chip_${chipKey}`] }, chipKey);
19712
+ });
19713
+ }
19714
+ const label = f.formatSelectedFilterLabel(value);
19715
+ if (!isDefined(label)) return [];
19716
+ return /* @__PURE__ */ jsx141(ToggleChip, { text: label, onClick: () => onChange(updateFilter(filter, key, void 0)), ...testId[`chip_${String(key)}`] }, String(key));
19717
+ }
19656
19718
  function buildFilterImpls(filterDefs) {
19657
19719
  return Object.fromEntries(safeEntries(filterDefs).map(([key, fn]) => [key, fn(key)]));
19658
19720
  }
19659
- function titleCase(str) {
19660
- return str.split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
19661
- }
19662
19721
  function getActiveFilterCount(filter) {
19663
19722
  return safeKeys(filter).filter((key) => filter[key] !== void 0).length;
19664
19723
  }