@homebound/beam 3.20.1 → 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.cjs +97 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -11
- package/dist/index.d.ts +17 -11
- package/dist/index.js +84 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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<
|
|
6375
|
+
[K in keyof F]: (key: string) => Filter<DefinedFilterValue<F, K>>;
|
|
6374
6376
|
};
|
|
6375
6377
|
type FilterImpls<F> = {
|
|
6376
|
-
[K in keyof F]: Filter<
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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<
|
|
6375
|
+
[K in keyof F]: (key: string) => Filter<DefinedFilterValue<F, K>>;
|
|
6374
6376
|
};
|
|
6375
6377
|
type FilterImpls<F> = {
|
|
6376
|
-
[K in keyof F]: Filter<
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
@@ -5447,7 +5447,12 @@ var iconButtonOutline = {
|
|
|
5447
5447
|
borderRadius: "br8",
|
|
5448
5448
|
width: "w_48px",
|
|
5449
5449
|
height: "h_40px",
|
|
5450
|
-
|
|
5450
|
+
backgroundColor: ["bgColor_var", {
|
|
5451
|
+
"--backgroundColor": "var(--b-surface)"
|
|
5452
|
+
}],
|
|
5453
|
+
borderColor: ["bc_var", {
|
|
5454
|
+
"--borderColor": "var(--b-surface-separator)"
|
|
5455
|
+
}],
|
|
5451
5456
|
borderStyle: "bss",
|
|
5452
5457
|
borderWidth: "bw1",
|
|
5453
5458
|
display: "df",
|
|
@@ -19003,6 +19008,12 @@ var DateFilter = class extends BaseFilter {
|
|
|
19003
19008
|
dehydrate(value) {
|
|
19004
19009
|
return value ? { op: value.op, value: dehydratePlainDate(value.value) } : void 0;
|
|
19005
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
|
+
}
|
|
19006
19017
|
render(value, setValue, tid, inModal, vertical) {
|
|
19007
19018
|
const { label, operations, getOperationValue, getOperationLabel, defaultValue } = this.props;
|
|
19008
19019
|
return /* @__PURE__ */ jsxs65(Fragment29, { children: [
|
|
@@ -19070,6 +19081,10 @@ var DateRangeFilter = class extends BaseFilter {
|
|
|
19070
19081
|
value: value.value ? { from: dehydratePlainDate(value.value.from), to: dehydratePlainDate(value.value.to) } : void 0
|
|
19071
19082
|
} : void 0;
|
|
19072
19083
|
}
|
|
19084
|
+
formatSelectedFilterLabel(value) {
|
|
19085
|
+
const formatted = formatDateRange(value.value, "date");
|
|
19086
|
+
return formatted ? formatted : void 0;
|
|
19087
|
+
}
|
|
19073
19088
|
render(value, setValue, tid, inModal, vertical) {
|
|
19074
19089
|
const { label, placeholderText, disabledDays, testFieldLabel, defaultValue } = this.props;
|
|
19075
19090
|
return /* @__PURE__ */ jsxs66(Fragment30, { children: [
|
|
@@ -19111,12 +19126,34 @@ function hydrateDateRange(value) {
|
|
|
19111
19126
|
return { from: hydratedFrom, to: hydratedTo };
|
|
19112
19127
|
}
|
|
19113
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
|
+
|
|
19114
19147
|
// src/components/Filters/MultiFilter.tsx
|
|
19115
19148
|
import { jsx as jsx131 } from "react/jsx-runtime";
|
|
19116
19149
|
function multiFilter(props) {
|
|
19117
19150
|
return (key) => new MultiFilter(key, props);
|
|
19118
19151
|
}
|
|
19119
19152
|
var MultiFilter = class extends BaseFilter {
|
|
19153
|
+
formatSelectedFilterLabel(value) {
|
|
19154
|
+
const { options, getOptionValue, getOptionLabel } = this.props;
|
|
19155
|
+
return resolveOptionSelectedFilterLabel(options, getOptionValue, getOptionLabel, value);
|
|
19156
|
+
}
|
|
19120
19157
|
render(value, setValue, tid, inModal, vertical) {
|
|
19121
19158
|
if (inModal && Array.isArray(this.props.options) && this.props.options.length > 0 && this.props.options.length <= 8) {
|
|
19122
19159
|
const { disabledOptions } = this.props;
|
|
@@ -19170,6 +19207,10 @@ function numberRangeFilter(props) {
|
|
|
19170
19207
|
return (key) => new NumberRangeFilter(key, props);
|
|
19171
19208
|
}
|
|
19172
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
|
+
}
|
|
19173
19214
|
render(value, setValue, tid, inModal, vertical) {
|
|
19174
19215
|
const {
|
|
19175
19216
|
label,
|
|
@@ -19244,6 +19285,10 @@ function singleFilter(props) {
|
|
|
19244
19285
|
}
|
|
19245
19286
|
var allOption = {};
|
|
19246
19287
|
var SingleFilter = class extends BaseFilter {
|
|
19288
|
+
formatSelectedFilterLabel(value) {
|
|
19289
|
+
const { options, getOptionValue, getOptionLabel } = this.props;
|
|
19290
|
+
return resolveOptionSelectedFilterLabel(options, getOptionValue, getOptionLabel, value);
|
|
19291
|
+
}
|
|
19247
19292
|
render(value, setValue, tid, inModal, vertical) {
|
|
19248
19293
|
const {
|
|
19249
19294
|
label,
|
|
@@ -19280,6 +19325,10 @@ function treeFilter(props) {
|
|
|
19280
19325
|
return (key) => new TreeFilter(key, props);
|
|
19281
19326
|
}
|
|
19282
19327
|
var TreeFilter = class extends BaseFilter {
|
|
19328
|
+
formatSelectedFilterLabel(value) {
|
|
19329
|
+
const { options, getOptionValue, getOptionLabel } = this.props;
|
|
19330
|
+
return resolveTreeSelectedFilterLabel(options, getOptionValue, getOptionLabel, value);
|
|
19331
|
+
}
|
|
19283
19332
|
render(value, setValue, tid, inModal, vertical) {
|
|
19284
19333
|
const { defaultValue, nothingSelectedText, filterBy = "root", ...props } = this.props;
|
|
19285
19334
|
return /* @__PURE__ */ jsx134(
|
|
@@ -19307,6 +19356,11 @@ function booleanFilter(props) {
|
|
|
19307
19356
|
return (key) => new BooleanFilter(key, props);
|
|
19308
19357
|
}
|
|
19309
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
|
+
}
|
|
19310
19364
|
render(value, setValue, tid, inModal, vertical) {
|
|
19311
19365
|
const { options = defaultBooleanOptions, label, defaultValue, ...props } = this.props;
|
|
19312
19366
|
return /* @__PURE__ */ jsx135(
|
|
@@ -19345,6 +19399,10 @@ function checkboxFilter(props) {
|
|
|
19345
19399
|
});
|
|
19346
19400
|
}
|
|
19347
19401
|
var CheckboxFilter = class extends BaseFilter {
|
|
19402
|
+
formatSelectedFilterLabel(value) {
|
|
19403
|
+
const { onValue = true } = this.props;
|
|
19404
|
+
return value === onValue ? this.label : void 0;
|
|
19405
|
+
}
|
|
19348
19406
|
render(value, setValue, tid, inModal, vertical) {
|
|
19349
19407
|
const { defaultValue, onValue = true, offValue = void 0, ...props } = this.props;
|
|
19350
19408
|
return /* @__PURE__ */ jsx136(
|
|
@@ -19499,6 +19557,10 @@ function toggleFilter(props) {
|
|
|
19499
19557
|
});
|
|
19500
19558
|
}
|
|
19501
19559
|
var ToggleFilter = class extends BaseFilter {
|
|
19560
|
+
formatSelectedFilterLabel(value) {
|
|
19561
|
+
const { onValue = true } = this.props;
|
|
19562
|
+
return value === onValue ? this.label : void 0;
|
|
19563
|
+
}
|
|
19502
19564
|
render(value, setValue, tid, inModal, vertical) {
|
|
19503
19565
|
const { defaultValue, onValue = true, offValue = void 0, ...props } = this.props;
|
|
19504
19566
|
return /* @__PURE__ */ jsx140(
|
|
@@ -19593,24 +19655,11 @@ function FilterDropdownMenu(props) {
|
|
|
19593
19655
|
opacity: "o0"
|
|
19594
19656
|
} : {}
|
|
19595
19657
|
}), children: searchTextField }),
|
|
19596
|
-
sm && hasSearch && /* @__PURE__ */ jsx141(
|
|
19597
|
-
hasFilters && /* @__PURE__ */ jsx141(
|
|
19658
|
+
sm && hasSearch && /* @__PURE__ */ jsx141(IconButton, { variant: "outline", icon: "search", label: "Search", onClick: () => setSearchIsOpen(!searchIsOpen), active: searchIsOpen, ...testId.searchButton }),
|
|
19659
|
+
sm && hasFilters && /* @__PURE__ */ jsx141(IconButton, { variant: "outline", icon: "filter", label: "Filter", active: isOpen, onClick: () => setIsOpen(!isOpen), ...testId.button }),
|
|
19660
|
+
!sm && hasFilters && /* @__PURE__ */ jsx141(Button, { label: "Filter", icon: "filter", size: "md", endAdornment: /* @__PURE__ */ jsxs70("div", { className: "df aic gap1", children: [
|
|
19598
19661
|
activeFilterCount > 0 && /* @__PURE__ */ jsx141(CountBadge, { count: activeFilterCount }),
|
|
19599
|
-
/* @__PURE__ */ jsx141(Icon, {
|
|
19600
|
-
...sm ? {
|
|
19601
|
-
position: "absolute",
|
|
19602
|
-
overflow: "oh",
|
|
19603
|
-
clip: "cli_inset_50",
|
|
19604
|
-
clipPath: "clp_none",
|
|
19605
|
-
border: "bd_0",
|
|
19606
|
-
height: "h_1px",
|
|
19607
|
-
margin: "m_neg1px",
|
|
19608
|
-
width: "w_1px",
|
|
19609
|
-
padding: "p_0",
|
|
19610
|
-
whiteSpace: "wsnw",
|
|
19611
|
-
opacity: "o0"
|
|
19612
|
-
} : {}
|
|
19613
|
-
}, icon: isOpen ? "chevronUp" : "chevronDown" })
|
|
19662
|
+
/* @__PURE__ */ jsx141(Icon, { icon: isOpen ? "chevronUp" : "chevronDown" })
|
|
19614
19663
|
] }), variant: "secondaryBlack", onClick: () => setIsOpen(!isOpen), active: isOpen, ...testId.button }),
|
|
19615
19664
|
searchIsOpen && /* @__PURE__ */ jsx141("div", { ...trussProps69({
|
|
19616
19665
|
width: "w100",
|
|
@@ -19643,30 +19692,32 @@ function FilterChips({
|
|
|
19643
19692
|
onClear,
|
|
19644
19693
|
testId
|
|
19645
19694
|
}) {
|
|
19646
|
-
const chips = safeEntries(filterImpls).flatMap(([key]) =>
|
|
19647
|
-
const value = filter[key];
|
|
19648
|
-
if (!isDefined(value)) return [];
|
|
19649
|
-
if (Array.isArray(value)) {
|
|
19650
|
-
return value.map((item) => {
|
|
19651
|
-
const chipKey = `${String(key)}_${item}`;
|
|
19652
|
-
const newArray = value.filter((v) => v !== item);
|
|
19653
|
-
return /* @__PURE__ */ jsx141(ToggleChip, { text: titleCase(String(item)), onClick: () => onChange(updateFilter(filter, key, newArray.length > 0 ? newArray : void 0)), ...testId[`chip_${chipKey}`] }, chipKey);
|
|
19654
|
-
});
|
|
19655
|
-
}
|
|
19656
|
-
return /* @__PURE__ */ jsx141(ToggleChip, { text: titleCase(String(value)), onClick: () => onChange(updateFilter(filter, key, void 0)), ...testId[`chip_${String(key)}`] }, String(key));
|
|
19657
|
-
});
|
|
19695
|
+
const chips = safeEntries(filterImpls).flatMap(([key, f]) => chipsForFilterKey(key, f, filter, onChange, testId));
|
|
19658
19696
|
if (chips.length === 0) return null;
|
|
19659
19697
|
return /* @__PURE__ */ jsxs70("div", { className: "df gap1 fww aic order_1", children: [
|
|
19660
19698
|
chips,
|
|
19661
19699
|
/* @__PURE__ */ jsx141(Button, { label: "Clear", variant: "tertiary", onClick: onClear, ...testId.clearBtn })
|
|
19662
19700
|
] });
|
|
19663
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
|
+
}
|
|
19664
19718
|
function buildFilterImpls(filterDefs) {
|
|
19665
19719
|
return Object.fromEntries(safeEntries(filterDefs).map(([key, fn]) => [key, fn(key)]));
|
|
19666
19720
|
}
|
|
19667
|
-
function titleCase(str) {
|
|
19668
|
-
return str.split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
19669
|
-
}
|
|
19670
19721
|
function getActiveFilterCount(filter) {
|
|
19671
19722
|
return safeKeys(filter).filter((key) => filter[key] !== void 0).length;
|
|
19672
19723
|
}
|