@homebound/beam 2.391.0 → 2.393.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1513 -1362
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +215 -132
- package/dist/index.d.ts +215 -132
- package/dist/index.js +1492 -1343
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as csstype from 'csstype';
|
|
2
2
|
import { Properties as Properties$1 } from 'csstype';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, { PropsWithChildren, AriaAttributes, ReactNode, RefObject, ButtonHTMLAttributes, ReactElement, MutableRefObject, Dispatch, SetStateAction, KeyboardEvent, LabelHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, Key,
|
|
4
|
+
import React__default, { PropsWithChildren, AriaAttributes, ReactNode, RefObject, ButtonHTMLAttributes, ReactElement, MutableRefObject, Dispatch, SetStateAction, KeyboardEvent, LabelHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, Key, HTMLAttributes, ReactPortal } from 'react';
|
|
5
5
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
6
6
|
import { DOMProps, PressEvent } from '@react-types/shared';
|
|
7
7
|
import { VirtuosoHandle, ListRange } from 'react-virtuoso';
|
|
@@ -4622,6 +4622,7 @@ declare const Icons: {
|
|
|
4622
4622
|
car: _emotion_react_jsx_runtime.JSX.Element;
|
|
4623
4623
|
basement: _emotion_react_jsx_runtime.JSX.Element;
|
|
4624
4624
|
cube: _emotion_react_jsx_runtime.JSX.Element;
|
|
4625
|
+
history: _emotion_react_jsx_runtime.JSX.Element;
|
|
4625
4626
|
projects: _emotion_react_jsx_runtime.JSX.Element;
|
|
4626
4627
|
tasks: _emotion_react_jsx_runtime.JSX.Element;
|
|
4627
4628
|
finances: _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -7732,15 +7733,15 @@ type FormSection<F> = {
|
|
|
7732
7733
|
rows: BoundFormInputConfig<F>;
|
|
7733
7734
|
};
|
|
7734
7735
|
type FormSectionConfig<F> = FormSection<F>[];
|
|
7735
|
-
type ActionButtonProps = Pick<ButtonProps, "onClick" | "label" | "disabled" | "tooltip">;
|
|
7736
|
+
type ActionButtonProps$1 = Pick<ButtonProps, "onClick" | "label" | "disabled" | "tooltip">;
|
|
7736
7737
|
type FormPageLayoutProps<F> = {
|
|
7737
7738
|
pageTitle: string;
|
|
7738
7739
|
breadCrumb?: HeaderBreadcrumb | HeaderBreadcrumb[];
|
|
7739
7740
|
formState: ObjectState<F>;
|
|
7740
7741
|
formSections: FormSectionConfig<F>;
|
|
7741
|
-
submitAction: ActionButtonProps;
|
|
7742
|
-
cancelAction?: ActionButtonProps;
|
|
7743
|
-
tertiaryAction?: ActionButtonProps;
|
|
7742
|
+
submitAction: ActionButtonProps$1;
|
|
7743
|
+
cancelAction?: ActionButtonProps$1;
|
|
7744
|
+
tertiaryAction?: ActionButtonProps$1;
|
|
7744
7745
|
rightSideBar?: SidebarContentProps[];
|
|
7745
7746
|
};
|
|
7746
7747
|
declare function FormPageLayoutComponent<F>(props: FormPageLayoutProps<F>): _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -7752,6 +7753,214 @@ declare function FullBleed({ children, omitPadding }: {
|
|
|
7752
7753
|
omitPadding?: boolean;
|
|
7753
7754
|
}): ReactElement<any, string | React$1.JSXElementConstructor<any>>;
|
|
7754
7755
|
|
|
7756
|
+
type BreakpointsType = Record<Breakpoint, boolean>;
|
|
7757
|
+
/**
|
|
7758
|
+
* A React hook to return a record of responsive breakpoints that updates on resize.
|
|
7759
|
+
*
|
|
7760
|
+
* @example
|
|
7761
|
+
* const breakpoints = useBreakpoint();
|
|
7762
|
+
* if (breakpoints.mdAndDown) { ...do something cool }
|
|
7763
|
+
*/
|
|
7764
|
+
declare function useBreakpoint(): BreakpointsType;
|
|
7765
|
+
|
|
7766
|
+
/**
|
|
7767
|
+
* Evaluates a computed function `fn` to a regular value and triggers a re-render whenever it changes.
|
|
7768
|
+
*
|
|
7769
|
+
* Some examples:
|
|
7770
|
+
*
|
|
7771
|
+
* ```ts
|
|
7772
|
+
* // Good, watching a single value
|
|
7773
|
+
* const firstName = useComputed(() => author.firstName, [author]);
|
|
7774
|
+
*
|
|
7775
|
+
* // Good, watching multiple values in a single `useComputed`
|
|
7776
|
+
* const { firstName, lastName } = useComputed(() => {
|
|
7777
|
+
* // Make sure to read the values
|
|
7778
|
+
* const { firstName, lastName } = author;
|
|
7779
|
+
* return { firstName, lastName };
|
|
7780
|
+
* }, [author]);
|
|
7781
|
+
*
|
|
7782
|
+
* // Good, watching a form-state field
|
|
7783
|
+
* const firstName = useComputed(() => {
|
|
7784
|
+
* return formState.firstName.value;
|
|
7785
|
+
* }, [formState]);
|
|
7786
|
+
*
|
|
7787
|
+
* // Good, watching an observable `formState` + a POJO/immutable `items` which is not an observable
|
|
7788
|
+
* const item = useComputed(() => {
|
|
7789
|
+
* return items.find((i) => i.id === formState.itemId.value);
|
|
7790
|
+
* }, [formState, items]);
|
|
7791
|
+
*
|
|
7792
|
+
* // Bad, fn and deps are "watching the same thing".
|
|
7793
|
+
* const firstName = useComputed(() => {
|
|
7794
|
+
* return formState.firstName.value;
|
|
7795
|
+
* }, [formState.firstName.value]);
|
|
7796
|
+
* ```
|
|
7797
|
+
*
|
|
7798
|
+
* Note that the difference between the `fn` and the `deps` is:
|
|
7799
|
+
*
|
|
7800
|
+
* - `fn` is "which values we are watching in the observable" (i.e. store or `formState`), and
|
|
7801
|
+
* - `deps` is "which observable we're watching" (i.e. store or `formState`)
|
|
7802
|
+
*
|
|
7803
|
+
* So the `deps` array shouldn't overlap with any of the "watched values" of the `fn` lambda,
|
|
7804
|
+
* other than the root observer itself (which admittedly should rarely change, i.e. our stores
|
|
7805
|
+
* are generally global-ish/very stable, but can change if the user switches pages i.e. "from
|
|
7806
|
+
* editing author:1 t editing author:2").
|
|
7807
|
+
*/
|
|
7808
|
+
declare function useComputed<T>(fn: (prev: T | undefined) => T, deps: readonly any[]): T;
|
|
7809
|
+
|
|
7810
|
+
interface UsePersistedFilterProps$1<F> {
|
|
7811
|
+
filterDefs: FilterDefs<F>;
|
|
7812
|
+
}
|
|
7813
|
+
interface FilterHook<F> {
|
|
7814
|
+
filter: F;
|
|
7815
|
+
setFilter: (filter: F) => void;
|
|
7816
|
+
}
|
|
7817
|
+
declare function useFilter<F>({ filterDefs }: UsePersistedFilterProps$1<F>): FilterHook<F>;
|
|
7818
|
+
|
|
7819
|
+
interface GroupByHook<G extends string> {
|
|
7820
|
+
/** The current group by value. */
|
|
7821
|
+
value: G;
|
|
7822
|
+
/** Called when the group by have changed. */
|
|
7823
|
+
setValue: (groupBy: G) => void;
|
|
7824
|
+
/** The list of group by options. */
|
|
7825
|
+
options: Array<{
|
|
7826
|
+
id: G;
|
|
7827
|
+
name: string;
|
|
7828
|
+
}>;
|
|
7829
|
+
}
|
|
7830
|
+
declare function useGroupBy<G extends string>(opts: Record<G, string>): GroupByHook<G>;
|
|
7831
|
+
|
|
7832
|
+
interface useHoverProps {
|
|
7833
|
+
onHoverStart?: VoidFunction;
|
|
7834
|
+
onHoverEnd?: VoidFunction;
|
|
7835
|
+
onHoverChange?: (isHovering: boolean) => void;
|
|
7836
|
+
disabled?: boolean;
|
|
7837
|
+
}
|
|
7838
|
+
declare function useHover(props: useHoverProps): {
|
|
7839
|
+
hoverProps: HTMLAttributes<HTMLElement>;
|
|
7840
|
+
isHovered: boolean;
|
|
7841
|
+
};
|
|
7842
|
+
|
|
7843
|
+
interface UsePersistedFilterProps<F> {
|
|
7844
|
+
filterDefs: FilterDefs<F>;
|
|
7845
|
+
storageKey: string;
|
|
7846
|
+
}
|
|
7847
|
+
interface PersistedFilterHook<F> {
|
|
7848
|
+
filter: F;
|
|
7849
|
+
setFilter: (filter: F) => void;
|
|
7850
|
+
}
|
|
7851
|
+
/**
|
|
7852
|
+
* Persists filter details in both browser storage and query parameters.
|
|
7853
|
+
* If a valid filter is present in the query params, then that will be used.
|
|
7854
|
+
* Otherwise it looks at browser storage, and finally the defaultFilter prop.
|
|
7855
|
+
*/
|
|
7856
|
+
declare function usePersistedFilter<F>({ storageKey, filterDefs }: UsePersistedFilterProps<F>): PersistedFilterHook<F>;
|
|
7857
|
+
|
|
7858
|
+
type UseQueryState<V> = [V, (value: V) => void];
|
|
7859
|
+
/**
|
|
7860
|
+
* Very similar to `useState` but persists in the query string.
|
|
7861
|
+
*
|
|
7862
|
+
* It currently doesn't fallback on session storage, which maybe it should if
|
|
7863
|
+
* this is used for group bys, b/c that is what usePersistedFilter does.
|
|
7864
|
+
*
|
|
7865
|
+
* Also only supports string values right now.
|
|
7866
|
+
*/
|
|
7867
|
+
declare function useQueryState<V extends string = string>(name: string, initialValue: V): UseQueryState<V>;
|
|
7868
|
+
|
|
7869
|
+
type UseSessionStorage<T> = [T, (value: T) => void];
|
|
7870
|
+
declare function useSessionStorage<T>(key: string, defaultValue: T): UseSessionStorage<T>;
|
|
7871
|
+
|
|
7872
|
+
type Sizes = "sm" | "md" | "lg";
|
|
7873
|
+
type LoadingSkeletonProps = {
|
|
7874
|
+
rows?: number;
|
|
7875
|
+
columns?: number;
|
|
7876
|
+
size?: Sizes;
|
|
7877
|
+
randomizeWidths?: boolean;
|
|
7878
|
+
contrast?: boolean;
|
|
7879
|
+
};
|
|
7880
|
+
declare function LoadingSkeleton({ rows, columns, size, randomizeWidths, contrast, }: LoadingSkeletonProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
7881
|
+
|
|
7882
|
+
type QueryResult<QData> = {
|
|
7883
|
+
loading: boolean;
|
|
7884
|
+
error?: {
|
|
7885
|
+
message: string;
|
|
7886
|
+
};
|
|
7887
|
+
data?: QData;
|
|
7888
|
+
};
|
|
7889
|
+
|
|
7890
|
+
type ActionButtonProps = Pick<ButtonProps, "onClick" | "label" | "disabled" | "tooltip">;
|
|
7891
|
+
type OmittedTableProps = "filter" | "stickyHeader" | "style" | "rows";
|
|
7892
|
+
type BaseTableProps<R extends Kinded, X extends Only<GridTableXss, X>> = Omit<GridTableProps<R, X>, OmittedTableProps>;
|
|
7893
|
+
type GridTablePropsWithRows<R extends Kinded, X extends Only<GridTableXss, X>> = BaseTableProps<R, X> & {
|
|
7894
|
+
rows: GridTableProps<R, X>["rows"];
|
|
7895
|
+
query?: never;
|
|
7896
|
+
createRows?: never;
|
|
7897
|
+
};
|
|
7898
|
+
type QueryTablePropsWithQuery<R extends Kinded, X extends Only<GridTableXss, X>, QData> = BaseTableProps<R, X> & {
|
|
7899
|
+
query: QueryResult<QData>;
|
|
7900
|
+
createRows: (data: QData | undefined) => GridDataRow<R>[];
|
|
7901
|
+
getPageInfo?: (data: QData) => {
|
|
7902
|
+
hasNextPage: boolean;
|
|
7903
|
+
};
|
|
7904
|
+
emptyFallback?: string;
|
|
7905
|
+
keepHeaderWhenLoading?: boolean;
|
|
7906
|
+
rows?: never;
|
|
7907
|
+
};
|
|
7908
|
+
type GridTableLayoutProps<F extends Record<string, unknown>, R extends Kinded, X extends Only<GridTableXss, X>, QData> = {
|
|
7909
|
+
pageTitle: string;
|
|
7910
|
+
tableProps: GridTablePropsWithRows<R, X> | QueryTablePropsWithQuery<R, X, QData>;
|
|
7911
|
+
breadcrumb?: HeaderBreadcrumb | HeaderBreadcrumb[];
|
|
7912
|
+
layoutState?: ReturnType<typeof useGridTableLayoutState<F>>;
|
|
7913
|
+
primaryAction?: ActionButtonProps;
|
|
7914
|
+
secondaryAction?: ActionButtonProps;
|
|
7915
|
+
tertiaryAction?: ActionButtonProps;
|
|
7916
|
+
};
|
|
7917
|
+
/**
|
|
7918
|
+
* A layout component that combines a table with a header, actions buttons and filters.
|
|
7919
|
+
*
|
|
7920
|
+
* This component can render either a `GridTable` or wrapped `QueryTable` based on the provided props:
|
|
7921
|
+
*
|
|
7922
|
+
* - For static data or custom handled loading states, use `rows` to pass in the data directly:
|
|
7923
|
+
* ```tsx
|
|
7924
|
+
* <GridTableLayout
|
|
7925
|
+
* tableProps={{
|
|
7926
|
+
* rows: [...],
|
|
7927
|
+
* columns: [...],
|
|
7928
|
+
* }}
|
|
7929
|
+
* />
|
|
7930
|
+
* ```
|
|
7931
|
+
*
|
|
7932
|
+
* - To take advantage of data/loading/error states directly from an Apollo query, use `query` and `createRows`:
|
|
7933
|
+
* ```tsx
|
|
7934
|
+
* <GridTableLayout
|
|
7935
|
+
* tableProps={{
|
|
7936
|
+
* query,
|
|
7937
|
+
* createRows: (data) => [...],
|
|
7938
|
+
* columns: [...],
|
|
7939
|
+
* }}
|
|
7940
|
+
* />
|
|
7941
|
+
* ```
|
|
7942
|
+
*/
|
|
7943
|
+
declare function GridTableLayoutComponent<F extends Record<string, unknown>, R extends Kinded, X extends Only<GridTableXss, X>, QData>(props: GridTableLayoutProps<F, R, X, QData>): _emotion_react_jsx_runtime.JSX.Element;
|
|
7944
|
+
declare const GridTableLayout: typeof GridTableLayoutComponent;
|
|
7945
|
+
/**
|
|
7946
|
+
* A wrapper around standard filter, grouping and search state hooks.
|
|
7947
|
+
* * `client` search will use the built-in grid table search functionality.
|
|
7948
|
+
* * `server` search will return `searchString` as a debounced search string to query the server.
|
|
7949
|
+
*/
|
|
7950
|
+
declare function useGridTableLayoutState<F extends Record<string, unknown>>({ persistedFilter, search, groupBy: maybeGroupBy, }: {
|
|
7951
|
+
persistedFilter?: UsePersistedFilterProps<F>;
|
|
7952
|
+
search?: "client" | "server";
|
|
7953
|
+
groupBy?: Record<string, string>;
|
|
7954
|
+
}): {
|
|
7955
|
+
filter: F;
|
|
7956
|
+
setFilter: (filter: F) => void;
|
|
7957
|
+
filterDefs: FilterDefs<F> | undefined;
|
|
7958
|
+
searchString: string | undefined;
|
|
7959
|
+
setSearchString: React__default.Dispatch<React__default.SetStateAction<string | undefined>>;
|
|
7960
|
+
search: "client" | "server" | undefined;
|
|
7961
|
+
groupBy: GroupByHook<string> | undefined;
|
|
7962
|
+
};
|
|
7963
|
+
|
|
7755
7964
|
/** Intended to wrap the whole application to prevent the browser's native scrolling behavior while also taking the full height of the viewport */
|
|
7756
7965
|
declare function PreventBrowserScroll({ children }: ChildrenOnly): _emotion_react_jsx_runtime.JSX.Element;
|
|
7757
7966
|
|
|
@@ -7853,16 +8062,6 @@ interface LoaderProps {
|
|
|
7853
8062
|
}
|
|
7854
8063
|
declare function Loader({ size, contrast }: LoaderProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
7855
8064
|
|
|
7856
|
-
type Sizes = "sm" | "md" | "lg";
|
|
7857
|
-
type LoadingSkeletonProps = {
|
|
7858
|
-
rows?: number;
|
|
7859
|
-
columns?: number;
|
|
7860
|
-
size?: Sizes;
|
|
7861
|
-
randomizeWidths?: boolean;
|
|
7862
|
-
contrast?: boolean;
|
|
7863
|
-
};
|
|
7864
|
-
declare function LoadingSkeleton({ rows, columns, size, randomizeWidths, contrast, }: LoadingSkeletonProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
7865
|
-
|
|
7866
8065
|
type MaxLinesProps = PropsWithChildren<{
|
|
7867
8066
|
maxLines: number;
|
|
7868
8067
|
}>;
|
|
@@ -8114,122 +8313,6 @@ declare function maybeTooltip(props: Omit<TooltipProps, "children"> & {
|
|
|
8114
8313
|
}): _emotion_react_jsx_runtime.JSX.Element;
|
|
8115
8314
|
declare function resolveTooltip(disabled?: boolean | ReactNode, tooltip?: ReactNode, readOnly?: boolean | ReactNode): ReactNode | undefined;
|
|
8116
8315
|
|
|
8117
|
-
type BreakpointsType = Record<Breakpoint, boolean>;
|
|
8118
|
-
/**
|
|
8119
|
-
* A React hook to return a record of responsive breakpoints that updates on resize.
|
|
8120
|
-
*
|
|
8121
|
-
* @example
|
|
8122
|
-
* const breakpoints = useBreakpoint();
|
|
8123
|
-
* if (breakpoints.mdAndDown) { ...do something cool }
|
|
8124
|
-
*/
|
|
8125
|
-
declare function useBreakpoint(): BreakpointsType;
|
|
8126
|
-
|
|
8127
|
-
/**
|
|
8128
|
-
* Evaluates a computed function `fn` to a regular value and triggers a re-render whenever it changes.
|
|
8129
|
-
*
|
|
8130
|
-
* Some examples:
|
|
8131
|
-
*
|
|
8132
|
-
* ```ts
|
|
8133
|
-
* // Good, watching a single value
|
|
8134
|
-
* const firstName = useComputed(() => author.firstName, [author]);
|
|
8135
|
-
*
|
|
8136
|
-
* // Good, watching multiple values in a single `useComputed`
|
|
8137
|
-
* const { firstName, lastName } = useComputed(() => {
|
|
8138
|
-
* // Make sure to read the values
|
|
8139
|
-
* const { firstName, lastName } = author;
|
|
8140
|
-
* return { firstName, lastName };
|
|
8141
|
-
* }, [author]);
|
|
8142
|
-
*
|
|
8143
|
-
* // Good, watching a form-state field
|
|
8144
|
-
* const firstName = useComputed(() => {
|
|
8145
|
-
* return formState.firstName.value;
|
|
8146
|
-
* }, [formState]);
|
|
8147
|
-
*
|
|
8148
|
-
* // Good, watching an observable `formState` + a POJO/immutable `items` which is not an observable
|
|
8149
|
-
* const item = useComputed(() => {
|
|
8150
|
-
* return items.find((i) => i.id === formState.itemId.value);
|
|
8151
|
-
* }, [formState, items]);
|
|
8152
|
-
*
|
|
8153
|
-
* // Bad, fn and deps are "watching the same thing".
|
|
8154
|
-
* const firstName = useComputed(() => {
|
|
8155
|
-
* return formState.firstName.value;
|
|
8156
|
-
* }, [formState.firstName.value]);
|
|
8157
|
-
* ```
|
|
8158
|
-
*
|
|
8159
|
-
* Note that the difference between the `fn` and the `deps` is:
|
|
8160
|
-
*
|
|
8161
|
-
* - `fn` is "which values we are watching in the observable" (i.e. store or `formState`), and
|
|
8162
|
-
* - `deps` is "which observable we're watching" (i.e. store or `formState`)
|
|
8163
|
-
*
|
|
8164
|
-
* So the `deps` array shouldn't overlap with any of the "watched values" of the `fn` lambda,
|
|
8165
|
-
* other than the root observer itself (which admittedly should rarely change, i.e. our stores
|
|
8166
|
-
* are generally global-ish/very stable, but can change if the user switches pages i.e. "from
|
|
8167
|
-
* editing author:1 t editing author:2").
|
|
8168
|
-
*/
|
|
8169
|
-
declare function useComputed<T>(fn: (prev: T | undefined) => T, deps: readonly any[]): T;
|
|
8170
|
-
|
|
8171
|
-
interface UsePersistedFilterProps$1<F> {
|
|
8172
|
-
filterDefs: FilterDefs<F>;
|
|
8173
|
-
}
|
|
8174
|
-
interface FilterHook<F> {
|
|
8175
|
-
filter: F;
|
|
8176
|
-
setFilter: (filter: F) => void;
|
|
8177
|
-
}
|
|
8178
|
-
declare function useFilter<F>({ filterDefs }: UsePersistedFilterProps$1<F>): FilterHook<F>;
|
|
8179
|
-
|
|
8180
|
-
interface GroupByHook<G extends string> {
|
|
8181
|
-
/** The current group by value. */
|
|
8182
|
-
value: G;
|
|
8183
|
-
/** Called when the group by have changed. */
|
|
8184
|
-
setValue: (groupBy: G) => void;
|
|
8185
|
-
/** The list of group by options. */
|
|
8186
|
-
options: Array<{
|
|
8187
|
-
id: G;
|
|
8188
|
-
name: string;
|
|
8189
|
-
}>;
|
|
8190
|
-
}
|
|
8191
|
-
declare function useGroupBy<G extends string>(opts: Record<G, string>): GroupByHook<G>;
|
|
8192
|
-
|
|
8193
|
-
interface useHoverProps {
|
|
8194
|
-
onHoverStart?: VoidFunction;
|
|
8195
|
-
onHoverEnd?: VoidFunction;
|
|
8196
|
-
onHoverChange?: (isHovering: boolean) => void;
|
|
8197
|
-
disabled?: boolean;
|
|
8198
|
-
}
|
|
8199
|
-
declare function useHover(props: useHoverProps): {
|
|
8200
|
-
hoverProps: HTMLAttributes<HTMLElement>;
|
|
8201
|
-
isHovered: boolean;
|
|
8202
|
-
};
|
|
8203
|
-
|
|
8204
|
-
interface UsePersistedFilterProps<F> {
|
|
8205
|
-
filterDefs: FilterDefs<F>;
|
|
8206
|
-
storageKey: string;
|
|
8207
|
-
}
|
|
8208
|
-
interface PersistedFilterHook<F> {
|
|
8209
|
-
filter: F;
|
|
8210
|
-
setFilter: (filter: F) => void;
|
|
8211
|
-
}
|
|
8212
|
-
/**
|
|
8213
|
-
* Persists filter details in both browser storage and query parameters.
|
|
8214
|
-
* If a valid filter is present in the query params, then that will be used.
|
|
8215
|
-
* Otherwise it looks at browser storage, and finally the defaultFilter prop.
|
|
8216
|
-
*/
|
|
8217
|
-
declare function usePersistedFilter<F>({ storageKey, filterDefs }: UsePersistedFilterProps<F>): PersistedFilterHook<F>;
|
|
8218
|
-
|
|
8219
|
-
type UseQueryState<V> = [V, (value: V) => void];
|
|
8220
|
-
/**
|
|
8221
|
-
* Very similar to `useState` but persists in the query string.
|
|
8222
|
-
*
|
|
8223
|
-
* It currently doesn't fallback on session storage, which maybe it should if
|
|
8224
|
-
* this is used for group bys, b/c that is what usePersistedFilter does.
|
|
8225
|
-
*
|
|
8226
|
-
* Also only supports string values right now.
|
|
8227
|
-
*/
|
|
8228
|
-
declare function useQueryState<V extends string = string>(name: string, initialValue: V): UseQueryState<V>;
|
|
8229
|
-
|
|
8230
|
-
type UseSessionStorage<T> = [T, (value: T) => void];
|
|
8231
|
-
declare function useSessionStorage<T>(key: string, defaultValue: T): UseSessionStorage<T>;
|
|
8232
|
-
|
|
8233
8316
|
/**
|
|
8234
8317
|
* Guesses an id based on a label string, i.e. given `Homeowner Contract`,
|
|
8235
8318
|
* returns `homeownerContract`.
|
|
@@ -8241,4 +8324,4 @@ declare function useSessionStorage<T>(key: string, defaultValue: T): UseSessionS
|
|
|
8241
8324
|
*/
|
|
8242
8325
|
declare function defaultTestId(label: string): string;
|
|
8243
8326
|
|
|
8244
|
-
export { ASC, Accordion, AccordionList, type AccordionProps, type AccordionSize, 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 BeamButtonProps, 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, Button, ButtonDatePicker, ButtonGroup, type ButtonGroupButton, type ButtonGroupProps, ButtonMenu, 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, ConfirmCloseModal, Container, type ContentStack, Copy, Css, CssReset, DESC, DateField, type DateFieldMode, type DateFieldModeTuple, type DateFieldProps, type DateFilterValue, 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, 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 GridColumnWithId, type GridDataRow, type GridRowKind, type GridRowLookup, type GridSortConfig, type GridStyle, GridTable, type GridTableApi, type GridTableCollapseToggleProps, type GridTableDefaults, type GridTableProps, type GridTableScrollOptions, type GridTableXss, type GroupByHook, HB_QUIPS_FLAVOR, HB_QUIPS_MISSION, HEADER, type HasIdAndName, HbLoadingSpinner, HbSpinnerProvider, HelperText, Icon, IconButton, type IconButtonProps, IconCard, type IconCardProps, type IconKey, type IconMenuItemType, type IconProps, Icons, type IfAny, type ImageFitType, type ImageMenuItemType, type InfiniteScroll, type InputStylePalette, KEPT_GROUP, type Kinded, Loader, LoadingSkeleton, type LoadingSkeletonProps, type Margin, 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 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, type PageNumberAndSize, type PageSettings, Pagination, Palette, type Pin, type Placement, type PresentationFieldProps, PresentationProvider, PreventBrowserScroll, type Properties, RIGHT_SIDEBAR_MIN_WIDTH, type RadioFieldOption, RadioGroupField, type RadioGroupFieldProps, type RenderAs, type RenderCellFn, ResponsiveGrid, 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, ScrollShadows, ScrollableContent, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedState, type SidebarContentProps, type SimpleHeaderAndData, SortHeader, type SortOn, type SortState, StaticField, type Step, Stepper, type StepperProps, SubmitButton, type SubmitButtonProps, SuperDrawerContent, SuperDrawerHeader, SuperDrawerWidth, Switch, type SwitchProps, TOTALS, type Tab, TabContent, type TabWithContent, TableState, TableStateContext, 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, Tooltip, TreeSelectField, type TreeSelectFieldProps, type TriggerNoticeProps, type Typography, type UseModalHook, type UseQueryState, type UseRightPaneHook, type UseSnackbarHook, type UseSuperDrawerHook, type UseToastProps, type Value, type Xss, actionColumn, applyRowFn, assignDefaultColumnIds, booleanFilter, boundCheckboxField, boundCheckboxGroupField, boundDateField, boundDateRangeField, boundIconCardField, boundIconCardGroupField, boundMultiSelectField, boundMultilineSelectField, boundNumberField, boundRadioGroupField, boundRichTextField, boundSelectField, boundSwitchField, boundTextAreaField, boundTextField, boundToggleChipGroupField, boundTreeSelectField, calcColumnSizes, cardStyle, checkboxFilter, chipBaseStyles, chipDisabledStyles, chipHoverStyles, collapseColumn, column, condensedStyle, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatValue, generateColumnId, getAlignment, getDateFormat, getFirstOrLastCellCss, getJustification, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, matchesFilter, maybeApplyFunction, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, persistentItemPrefix, pressedStyles, px, recursivelyGetContainingRow, reservedRowKinds, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, scrollContainerBottomPadding, selectColumn, selectedStyles, setDefaultStyle, setGridTableDefaults, setRunningInJest, shouldSkipScrollTo, simpleDataRows, simpleHeader, singleFilter, sortFn, sortRows, switchFocusStyles, switchHoverStyles, switchSelectedHoverStyles, toContent, toLimitAndOffset, toPageNumberSize, toggleFilter, toggleFocusStyles, toggleHoverStyles, togglePressStyles, treeFilter, updateFilter, useAutoSaveStatus, useBreakpoint, useComputed, useDnDGridItem, type useDnDGridItemProps, useFilter, useGridTableApi, useGroupBy, useHover, useModal, usePersistedFilter, useQueryState, useResponsiveGrid, useResponsiveGridItem, type useResponsiveGridProps, useRightPane, useRightPaneContext, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, visit, zIndices };
|
|
8327
|
+
export { ASC, Accordion, AccordionList, type AccordionProps, type AccordionSize, 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 BeamButtonProps, 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, Button, ButtonDatePicker, ButtonGroup, type ButtonGroupButton, type ButtonGroupProps, ButtonMenu, 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, ConfirmCloseModal, Container, type ContentStack, Copy, Css, CssReset, DESC, DateField, type DateFieldMode, type DateFieldModeTuple, type DateFieldProps, type DateFilterValue, 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, 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 GridColumnWithId, type GridDataRow, type GridRowKind, type GridRowLookup, type GridSortConfig, type GridStyle, GridTable, type GridTableApi, type GridTableCollapseToggleProps, type GridTableDefaults, GridTableLayout, type GridTableLayoutProps, type GridTableProps, type GridTableScrollOptions, type GridTableXss, type GroupByHook, HB_QUIPS_FLAVOR, HB_QUIPS_MISSION, HEADER, type HasIdAndName, HbLoadingSpinner, HbSpinnerProvider, HelperText, Icon, IconButton, type IconButtonProps, IconCard, type IconCardProps, type IconKey, type IconMenuItemType, type IconProps, Icons, type IfAny, type ImageFitType, type ImageMenuItemType, type InfiniteScroll, type InputStylePalette, KEPT_GROUP, type Kinded, Loader, LoadingSkeleton, type LoadingSkeletonProps, type Margin, 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 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, type PageNumberAndSize, type PageSettings, Pagination, Palette, type Pin, type Placement, type PresentationFieldProps, PresentationProvider, PreventBrowserScroll, type Properties, RIGHT_SIDEBAR_MIN_WIDTH, type RadioFieldOption, RadioGroupField, type RadioGroupFieldProps, type RenderAs, type RenderCellFn, ResponsiveGrid, 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, ScrollShadows, ScrollableContent, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedState, type SidebarContentProps, type SimpleHeaderAndData, SortHeader, type SortOn, type SortState, StaticField, type Step, Stepper, type StepperProps, SubmitButton, type SubmitButtonProps, SuperDrawerContent, SuperDrawerHeader, SuperDrawerWidth, Switch, type SwitchProps, TOTALS, type Tab, TabContent, type TabWithContent, TableState, TableStateContext, 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, Tooltip, TreeSelectField, type TreeSelectFieldProps, type TriggerNoticeProps, type Typography, type UseModalHook, type UsePersistedFilterProps, type UseQueryState, type UseRightPaneHook, type UseSnackbarHook, type UseSuperDrawerHook, type UseToastProps, type Value, type Xss, actionColumn, applyRowFn, assignDefaultColumnIds, booleanFilter, boundCheckboxField, boundCheckboxGroupField, boundDateField, boundDateRangeField, boundIconCardField, boundIconCardGroupField, boundMultiSelectField, boundMultilineSelectField, boundNumberField, boundRadioGroupField, boundRichTextField, boundSelectField, boundSwitchField, boundTextAreaField, boundTextField, boundToggleChipGroupField, boundTreeSelectField, calcColumnSizes, cardStyle, checkboxFilter, chipBaseStyles, chipDisabledStyles, chipHoverStyles, collapseColumn, column, condensedStyle, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatValue, generateColumnId, getAlignment, getDateFormat, getFirstOrLastCellCss, getJustification, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, matchesFilter, maybeApplyFunction, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, persistentItemPrefix, pressedStyles, px, recursivelyGetContainingRow, reservedRowKinds, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, scrollContainerBottomPadding, selectColumn, selectedStyles, setDefaultStyle, setGridTableDefaults, setRunningInJest, shouldSkipScrollTo, simpleDataRows, simpleHeader, singleFilter, sortFn, sortRows, switchFocusStyles, switchHoverStyles, switchSelectedHoverStyles, toContent, toLimitAndOffset, toPageNumberSize, toggleFilter, toggleFocusStyles, toggleHoverStyles, togglePressStyles, treeFilter, updateFilter, useAutoSaveStatus, useBreakpoint, useComputed, useDnDGridItem, type useDnDGridItemProps, useFilter, useGridTableApi, useGridTableLayoutState, useGroupBy, useHover, useModal, usePersistedFilter, useQueryState, useResponsiveGrid, useResponsiveGridItem, type useResponsiveGridProps, useRightPane, useRightPaneContext, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, visit, zIndices };
|