@homebound/beam 3.5.1 → 3.6.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 +359 -228
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +210 -174
- package/dist/index.d.ts +210 -174
- package/dist/index.js +274 -145
- package/dist/index.js.map +1 -1
- package/dist/truss.css +2 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -7668,173 +7668,6 @@ type HeaderBreadcrumb = {
|
|
|
7668
7668
|
right?: ReactNode;
|
|
7669
7669
|
};
|
|
7670
7670
|
|
|
7671
|
-
type FormSection<F> = {
|
|
7672
|
-
title?: string;
|
|
7673
|
-
icon?: IconKey;
|
|
7674
|
-
rows: BoundFormInputConfig<F>;
|
|
7675
|
-
};
|
|
7676
|
-
type FormSectionConfig<F> = FormSection<F>[];
|
|
7677
|
-
type ActionButtonProps$1 = Pick<ButtonProps, "onClick" | "label" | "disabled" | "tooltip">;
|
|
7678
|
-
type FormPageLayoutProps<F> = {
|
|
7679
|
-
pageTitle: string;
|
|
7680
|
-
breadCrumb?: HeaderBreadcrumb | HeaderBreadcrumb[];
|
|
7681
|
-
formState: ObjectState<F>;
|
|
7682
|
-
formSections: FormSectionConfig<F>;
|
|
7683
|
-
submitAction: ActionButtonProps$1;
|
|
7684
|
-
cancelAction?: ActionButtonProps$1;
|
|
7685
|
-
tertiaryAction?: ActionButtonProps$1;
|
|
7686
|
-
rightSideBar?: SidebarContentProps[];
|
|
7687
|
-
};
|
|
7688
|
-
declare function FormPageLayoutComponent<F>(props: FormPageLayoutProps<F>): JSX.Element;
|
|
7689
|
-
declare const FormPageLayout: typeof FormPageLayoutComponent;
|
|
7690
|
-
|
|
7691
|
-
/** Provides a way to extend the full width of the ScrollableParent */
|
|
7692
|
-
declare function FullBleed({ children, omitPadding }: {
|
|
7693
|
-
children: ReactElement;
|
|
7694
|
-
omitPadding?: boolean;
|
|
7695
|
-
}): ReactElement<any, string | React$1.JSXElementConstructor<any>>;
|
|
7696
|
-
|
|
7697
|
-
type BreakpointsType = Record<Breakpoint, boolean>;
|
|
7698
|
-
/**
|
|
7699
|
-
* A React hook to return a record of responsive breakpoints that updates on resize.
|
|
7700
|
-
*
|
|
7701
|
-
* @example
|
|
7702
|
-
* const breakpoints = useBreakpoint();
|
|
7703
|
-
* if (breakpoints.mdAndDown) { ...do something cool }
|
|
7704
|
-
*/
|
|
7705
|
-
declare function useBreakpoint(): BreakpointsType;
|
|
7706
|
-
|
|
7707
|
-
/**
|
|
7708
|
-
* Evaluates a computed function `fn` to a regular value and triggers a re-render whenever it changes.
|
|
7709
|
-
*
|
|
7710
|
-
* Some examples:
|
|
7711
|
-
*
|
|
7712
|
-
* ```ts
|
|
7713
|
-
* // Good, watching a single value
|
|
7714
|
-
* const firstName = useComputed(() => author.firstName, [author]);
|
|
7715
|
-
*
|
|
7716
|
-
* // Good, watching multiple values in a single `useComputed`
|
|
7717
|
-
* const { firstName, lastName } = useComputed(() => {
|
|
7718
|
-
* // Make sure to read the values
|
|
7719
|
-
* const { firstName, lastName } = author;
|
|
7720
|
-
* return { firstName, lastName };
|
|
7721
|
-
* }, [author]);
|
|
7722
|
-
*
|
|
7723
|
-
* // Good, watching a form-state field
|
|
7724
|
-
* const firstName = useComputed(() => {
|
|
7725
|
-
* return formState.firstName.value;
|
|
7726
|
-
* }, [formState]);
|
|
7727
|
-
*
|
|
7728
|
-
* // Good, watching an observable `formState` + a POJO/immutable `items` which is not an observable
|
|
7729
|
-
* const item = useComputed(() => {
|
|
7730
|
-
* return items.find((i) => i.id === formState.itemId.value);
|
|
7731
|
-
* }, [formState, items]);
|
|
7732
|
-
*
|
|
7733
|
-
* // Bad, fn and deps are "watching the same thing".
|
|
7734
|
-
* const firstName = useComputed(() => {
|
|
7735
|
-
* return formState.firstName.value;
|
|
7736
|
-
* }, [formState.firstName.value]);
|
|
7737
|
-
* ```
|
|
7738
|
-
*
|
|
7739
|
-
* Note that the difference between the `fn` and the `deps` is:
|
|
7740
|
-
*
|
|
7741
|
-
* - `fn` is "which values we are watching in the observable" (i.e. store or `formState`), and
|
|
7742
|
-
* - `deps` is "which observable we're watching" (i.e. store or `formState`)
|
|
7743
|
-
*
|
|
7744
|
-
* So the `deps` array shouldn't overlap with any of the "watched values" of the `fn` lambda,
|
|
7745
|
-
* other than the root observer itself (which admittedly should rarely change, i.e. our stores
|
|
7746
|
-
* are generally global-ish/very stable, but can change if the user switches pages i.e. "from
|
|
7747
|
-
* editing author:1 t editing author:2").
|
|
7748
|
-
*/
|
|
7749
|
-
declare function useComputed<T>(fn: (prev: T | undefined) => T, deps: readonly any[]): T;
|
|
7750
|
-
|
|
7751
|
-
interface UsePersistedFilterProps$1<F> {
|
|
7752
|
-
filterDefs: FilterDefs<F>;
|
|
7753
|
-
}
|
|
7754
|
-
interface FilterHook<F> {
|
|
7755
|
-
filter: F;
|
|
7756
|
-
setFilter: (filter: F) => void;
|
|
7757
|
-
}
|
|
7758
|
-
declare function useFilter<F>({ filterDefs }: UsePersistedFilterProps$1<F>): FilterHook<F>;
|
|
7759
|
-
|
|
7760
|
-
interface GroupByHook<G extends string> {
|
|
7761
|
-
/** The current group by value. */
|
|
7762
|
-
value: G;
|
|
7763
|
-
/** Called when the group by have changed. */
|
|
7764
|
-
setValue: (groupBy: G) => void;
|
|
7765
|
-
/** The list of group by options. */
|
|
7766
|
-
options: Array<{
|
|
7767
|
-
id: G;
|
|
7768
|
-
name: string;
|
|
7769
|
-
}>;
|
|
7770
|
-
}
|
|
7771
|
-
declare function useGroupBy<G extends string>(opts: Record<G, string>): GroupByHook<G>;
|
|
7772
|
-
|
|
7773
|
-
interface useHoverProps {
|
|
7774
|
-
onHoverStart?: VoidFunction;
|
|
7775
|
-
onHoverEnd?: VoidFunction;
|
|
7776
|
-
onHoverChange?: (isHovering: boolean) => void;
|
|
7777
|
-
disabled?: boolean;
|
|
7778
|
-
}
|
|
7779
|
-
declare function useHover(props: useHoverProps): {
|
|
7780
|
-
hoverProps: HTMLAttributes<HTMLElement>;
|
|
7781
|
-
isHovered: boolean;
|
|
7782
|
-
};
|
|
7783
|
-
|
|
7784
|
-
type UsePersistedFilterProps<F> = {
|
|
7785
|
-
filterDefs: FilterDefs<F>;
|
|
7786
|
-
storageKey: string;
|
|
7787
|
-
};
|
|
7788
|
-
type PersistedFilterHook<F> = {
|
|
7789
|
-
filter: F;
|
|
7790
|
-
setFilter: (filter: F) => void;
|
|
7791
|
-
};
|
|
7792
|
-
/**
|
|
7793
|
-
* Persists filter details in both browser storage and query parameters.
|
|
7794
|
-
* If a valid filter is present in the query params, then that will be used.
|
|
7795
|
-
* Otherwise it looks at browser storage, and finally the defaultFilter prop.
|
|
7796
|
-
*/
|
|
7797
|
-
declare function usePersistedFilter<F>({ storageKey, filterDefs }: UsePersistedFilterProps<F>): PersistedFilterHook<F>;
|
|
7798
|
-
|
|
7799
|
-
type UseQueryState<V> = [V, (value: V) => void];
|
|
7800
|
-
/**
|
|
7801
|
-
* Very similar to `useState` but persists in the query string.
|
|
7802
|
-
*
|
|
7803
|
-
* It currently doesn't fallback on session storage, which maybe it should if
|
|
7804
|
-
* this is used for group bys, b/c that is what usePersistedFilter does.
|
|
7805
|
-
*
|
|
7806
|
-
* Also only supports string values right now.
|
|
7807
|
-
*/
|
|
7808
|
-
declare function useQueryState<V extends string = string>(name: string, initialValue: V): UseQueryState<V>;
|
|
7809
|
-
|
|
7810
|
-
type UseSessionStorage<T> = [T, (value: T) => void];
|
|
7811
|
-
declare function useSessionStorage<T>(key: string, defaultValue: T): UseSessionStorage<T>;
|
|
7812
|
-
|
|
7813
|
-
/**
|
|
7814
|
-
* Page settings, either a pageNumber+pageSize or offset+limit.
|
|
7815
|
-
*
|
|
7816
|
-
* This component is implemented in terms of "page number + page size",
|
|
7817
|
-
* but our backend wants offset+limit, so we accept both and translate.
|
|
7818
|
-
*/
|
|
7819
|
-
type PageSettings = PageNumberAndSize | OffsetAndLimit;
|
|
7820
|
-
type PageNumberAndSize = {
|
|
7821
|
-
pageNumber: number;
|
|
7822
|
-
pageSize: number;
|
|
7823
|
-
};
|
|
7824
|
-
type OffsetAndLimit = {
|
|
7825
|
-
offset: number;
|
|
7826
|
-
limit: number;
|
|
7827
|
-
};
|
|
7828
|
-
declare const defaultPage: OffsetAndLimit;
|
|
7829
|
-
interface PaginationProps {
|
|
7830
|
-
page: readonly [PageNumberAndSize, Dispatch<PageNumberAndSize>] | readonly [OffsetAndLimit, Dispatch<OffsetAndLimit>];
|
|
7831
|
-
totalCount: number;
|
|
7832
|
-
pageSizes?: number[];
|
|
7833
|
-
}
|
|
7834
|
-
declare function Pagination(props: PaginationProps): JSX.Element;
|
|
7835
|
-
declare function toLimitAndOffset(page: PageSettings): OffsetAndLimit;
|
|
7836
|
-
declare function toPageNumberSize(page: PageSettings): PageNumberAndSize;
|
|
7837
|
-
|
|
7838
7671
|
interface GridTableCollapseToggleProps extends Pick<IconButtonProps, "compact"> {
|
|
7839
7672
|
row: GridDataRow<any>;
|
|
7840
7673
|
}
|
|
@@ -8042,8 +7875,8 @@ type QueryResult<QData> = {
|
|
|
8042
7875
|
data?: QData;
|
|
8043
7876
|
};
|
|
8044
7877
|
|
|
8045
|
-
|
|
8046
|
-
type ActionButtonProps = Pick<ButtonProps, "onClick" | "label" | "disabled" | "tooltip">;
|
|
7878
|
+
/** Shared action button props used across layout header and panel components. */
|
|
7879
|
+
type ActionButtonProps = Pick<ButtonProps, "onClick" | "label" | "disabled" | "tooltip" | "icon">;
|
|
8047
7880
|
type OmittedTableProps = "filter" | "stickyHeader" | "style" | "rows";
|
|
8048
7881
|
type BaseTableProps<R extends Kinded, X extends Only<GridTableXss, X>> = Omit<GridTableProps<R, X>, OmittedTableProps>;
|
|
8049
7882
|
type GridTablePropsWithRows<R extends Kinded, X extends Only<GridTableXss, X>> = BaseTableProps<R, X> & {
|
|
@@ -8051,20 +7884,193 @@ type GridTablePropsWithRows<R extends Kinded, X extends Only<GridTableXss, X>> =
|
|
|
8051
7884
|
query?: never;
|
|
8052
7885
|
createRows?: never;
|
|
8053
7886
|
};
|
|
8054
|
-
type
|
|
7887
|
+
type BaseQueryTableProps<R extends Kinded, X extends Only<GridTableXss, X>, QData> = BaseTableProps<R, X> & {
|
|
8055
7888
|
query: QueryResult<QData>;
|
|
8056
7889
|
createRows: (data: QData | undefined) => GridDataRow<R>[];
|
|
7890
|
+
rows?: never;
|
|
7891
|
+
};
|
|
7892
|
+
declare function isGridTableProps<R extends Kinded, X extends Only<GridTableXss, X>, Q extends {
|
|
7893
|
+
rows?: never;
|
|
7894
|
+
}>(props: GridTablePropsWithRows<R, X> | Q): props is GridTablePropsWithRows<R, X>;
|
|
7895
|
+
|
|
7896
|
+
type FormSection<F> = {
|
|
7897
|
+
title?: string;
|
|
7898
|
+
icon?: IconKey;
|
|
7899
|
+
rows: BoundFormInputConfig<F>;
|
|
7900
|
+
};
|
|
7901
|
+
type FormSectionConfig<F> = FormSection<F>[];
|
|
7902
|
+
type FormPageLayoutProps<F> = {
|
|
7903
|
+
pageTitle: ReactNode;
|
|
7904
|
+
breadCrumb?: HeaderBreadcrumb | HeaderBreadcrumb[];
|
|
7905
|
+
formState: ObjectState<F>;
|
|
7906
|
+
formSections: FormSectionConfig<F>;
|
|
7907
|
+
submitAction: ActionButtonProps;
|
|
7908
|
+
cancelAction?: ActionButtonProps;
|
|
7909
|
+
tertiaryAction?: ActionButtonProps;
|
|
7910
|
+
rightSideBar?: SidebarContentProps[];
|
|
7911
|
+
};
|
|
7912
|
+
declare function FormPageLayoutComponent<F>(props: FormPageLayoutProps<F>): JSX.Element;
|
|
7913
|
+
declare const FormPageLayout: typeof FormPageLayoutComponent;
|
|
7914
|
+
|
|
7915
|
+
/** Provides a way to extend the full width of the ScrollableParent */
|
|
7916
|
+
declare function FullBleed({ children, omitPadding }: {
|
|
7917
|
+
children: ReactElement;
|
|
7918
|
+
omitPadding?: boolean;
|
|
7919
|
+
}): ReactElement<any, string | React$1.JSXElementConstructor<any>>;
|
|
7920
|
+
|
|
7921
|
+
type BreakpointsType = Record<Breakpoint, boolean>;
|
|
7922
|
+
/**
|
|
7923
|
+
* A React hook to return a record of responsive breakpoints that updates on resize.
|
|
7924
|
+
*
|
|
7925
|
+
* @example
|
|
7926
|
+
* const breakpoints = useBreakpoint();
|
|
7927
|
+
* if (breakpoints.mdAndDown) { ...do something cool }
|
|
7928
|
+
*/
|
|
7929
|
+
declare function useBreakpoint(): BreakpointsType;
|
|
7930
|
+
|
|
7931
|
+
/**
|
|
7932
|
+
* Evaluates a computed function `fn` to a regular value and triggers a re-render whenever it changes.
|
|
7933
|
+
*
|
|
7934
|
+
* Some examples:
|
|
7935
|
+
*
|
|
7936
|
+
* ```ts
|
|
7937
|
+
* // Good, watching a single value
|
|
7938
|
+
* const firstName = useComputed(() => author.firstName, [author]);
|
|
7939
|
+
*
|
|
7940
|
+
* // Good, watching multiple values in a single `useComputed`
|
|
7941
|
+
* const { firstName, lastName } = useComputed(() => {
|
|
7942
|
+
* // Make sure to read the values
|
|
7943
|
+
* const { firstName, lastName } = author;
|
|
7944
|
+
* return { firstName, lastName };
|
|
7945
|
+
* }, [author]);
|
|
7946
|
+
*
|
|
7947
|
+
* // Good, watching a form-state field
|
|
7948
|
+
* const firstName = useComputed(() => {
|
|
7949
|
+
* return formState.firstName.value;
|
|
7950
|
+
* }, [formState]);
|
|
7951
|
+
*
|
|
7952
|
+
* // Good, watching an observable `formState` + a POJO/immutable `items` which is not an observable
|
|
7953
|
+
* const item = useComputed(() => {
|
|
7954
|
+
* return items.find((i) => i.id === formState.itemId.value);
|
|
7955
|
+
* }, [formState, items]);
|
|
7956
|
+
*
|
|
7957
|
+
* // Bad, fn and deps are "watching the same thing".
|
|
7958
|
+
* const firstName = useComputed(() => {
|
|
7959
|
+
* return formState.firstName.value;
|
|
7960
|
+
* }, [formState.firstName.value]);
|
|
7961
|
+
* ```
|
|
7962
|
+
*
|
|
7963
|
+
* Note that the difference between the `fn` and the `deps` is:
|
|
7964
|
+
*
|
|
7965
|
+
* - `fn` is "which values we are watching in the observable" (i.e. store or `formState`), and
|
|
7966
|
+
* - `deps` is "which observable we're watching" (i.e. store or `formState`)
|
|
7967
|
+
*
|
|
7968
|
+
* So the `deps` array shouldn't overlap with any of the "watched values" of the `fn` lambda,
|
|
7969
|
+
* other than the root observer itself (which admittedly should rarely change, i.e. our stores
|
|
7970
|
+
* are generally global-ish/very stable, but can change if the user switches pages i.e. "from
|
|
7971
|
+
* editing author:1 t editing author:2").
|
|
7972
|
+
*/
|
|
7973
|
+
declare function useComputed<T>(fn: (prev: T | undefined) => T, deps: readonly any[]): T;
|
|
7974
|
+
|
|
7975
|
+
interface UsePersistedFilterProps$1<F> {
|
|
7976
|
+
filterDefs: FilterDefs<F>;
|
|
7977
|
+
}
|
|
7978
|
+
interface FilterHook<F> {
|
|
7979
|
+
filter: F;
|
|
7980
|
+
setFilter: (filter: F) => void;
|
|
7981
|
+
}
|
|
7982
|
+
declare function useFilter<F>({ filterDefs }: UsePersistedFilterProps$1<F>): FilterHook<F>;
|
|
7983
|
+
|
|
7984
|
+
interface GroupByHook<G extends string> {
|
|
7985
|
+
/** The current group by value. */
|
|
7986
|
+
value: G;
|
|
7987
|
+
/** Called when the group by have changed. */
|
|
7988
|
+
setValue: (groupBy: G) => void;
|
|
7989
|
+
/** The list of group by options. */
|
|
7990
|
+
options: Array<{
|
|
7991
|
+
id: G;
|
|
7992
|
+
name: string;
|
|
7993
|
+
}>;
|
|
7994
|
+
}
|
|
7995
|
+
declare function useGroupBy<G extends string>(opts: Record<G, string>): GroupByHook<G>;
|
|
7996
|
+
|
|
7997
|
+
interface useHoverProps {
|
|
7998
|
+
onHoverStart?: VoidFunction;
|
|
7999
|
+
onHoverEnd?: VoidFunction;
|
|
8000
|
+
onHoverChange?: (isHovering: boolean) => void;
|
|
8001
|
+
disabled?: boolean;
|
|
8002
|
+
}
|
|
8003
|
+
declare function useHover(props: useHoverProps): {
|
|
8004
|
+
hoverProps: HTMLAttributes<HTMLElement>;
|
|
8005
|
+
isHovered: boolean;
|
|
8006
|
+
};
|
|
8007
|
+
|
|
8008
|
+
type UsePersistedFilterProps<F> = {
|
|
8009
|
+
filterDefs: FilterDefs<F>;
|
|
8010
|
+
storageKey: string;
|
|
8011
|
+
};
|
|
8012
|
+
type PersistedFilterHook<F> = {
|
|
8013
|
+
filter: F;
|
|
8014
|
+
setFilter: (filter: F) => void;
|
|
8015
|
+
};
|
|
8016
|
+
/**
|
|
8017
|
+
* Persists filter details in both browser storage and query parameters.
|
|
8018
|
+
* If a valid filter is present in the query params, then that will be used.
|
|
8019
|
+
* Otherwise it looks at browser storage, and finally the defaultFilter prop.
|
|
8020
|
+
*/
|
|
8021
|
+
declare function usePersistedFilter<F>({ storageKey, filterDefs }: UsePersistedFilterProps<F>): PersistedFilterHook<F>;
|
|
8022
|
+
|
|
8023
|
+
type UseQueryState<V> = [V, (value: V) => void];
|
|
8024
|
+
/**
|
|
8025
|
+
* Very similar to `useState` but persists in the query string.
|
|
8026
|
+
*
|
|
8027
|
+
* It currently doesn't fallback on session storage, which maybe it should if
|
|
8028
|
+
* this is used for group bys, b/c that is what usePersistedFilter does.
|
|
8029
|
+
*
|
|
8030
|
+
* Also only supports string values right now.
|
|
8031
|
+
*/
|
|
8032
|
+
declare function useQueryState<V extends string = string>(name: string, initialValue: V): UseQueryState<V>;
|
|
8033
|
+
|
|
8034
|
+
type UseSessionStorage<T> = [T, (value: T) => void];
|
|
8035
|
+
declare function useSessionStorage<T>(key: string, defaultValue: T): UseSessionStorage<T>;
|
|
8036
|
+
|
|
8037
|
+
/**
|
|
8038
|
+
* Page settings, either a pageNumber+pageSize or offset+limit.
|
|
8039
|
+
*
|
|
8040
|
+
* This component is implemented in terms of "page number + page size",
|
|
8041
|
+
* but our backend wants offset+limit, so we accept both and translate.
|
|
8042
|
+
*/
|
|
8043
|
+
type PageSettings = PageNumberAndSize | OffsetAndLimit;
|
|
8044
|
+
type PageNumberAndSize = {
|
|
8045
|
+
pageNumber: number;
|
|
8046
|
+
pageSize: number;
|
|
8047
|
+
};
|
|
8048
|
+
type OffsetAndLimit = {
|
|
8049
|
+
offset: number;
|
|
8050
|
+
limit: number;
|
|
8051
|
+
};
|
|
8052
|
+
declare const defaultPage: OffsetAndLimit;
|
|
8053
|
+
interface PaginationProps {
|
|
8054
|
+
page: readonly [PageNumberAndSize, Dispatch<PageNumberAndSize>] | readonly [OffsetAndLimit, Dispatch<OffsetAndLimit>];
|
|
8055
|
+
totalCount: number;
|
|
8056
|
+
pageSizes?: number[];
|
|
8057
|
+
}
|
|
8058
|
+
declare function Pagination(props: PaginationProps): JSX.Element;
|
|
8059
|
+
declare function toLimitAndOffset(page: PageSettings): OffsetAndLimit;
|
|
8060
|
+
declare function toPageNumberSize(page: PageSettings): PageNumberAndSize;
|
|
8061
|
+
|
|
8062
|
+
type ActionButtonMenuProps = Omit<ButtonMenuProps, "trigger">;
|
|
8063
|
+
type QueryTablePropsWithQuery<R extends Kinded, X extends Only<GridTableXss, X>, QData> = BaseQueryTableProps<R, X, QData> & {
|
|
8057
8064
|
getPageInfo?: (data: QData) => {
|
|
8058
8065
|
hasNextPage: boolean;
|
|
8059
8066
|
};
|
|
8060
8067
|
emptyFallback?: string;
|
|
8061
8068
|
keepHeaderWhenLoading?: boolean;
|
|
8062
|
-
rows?: never;
|
|
8063
8069
|
};
|
|
8064
8070
|
type GridTableLayoutProps<F extends Record<string, unknown>, R extends Kinded, X extends Only<GridTableXss, X>, QData> = {
|
|
8065
|
-
pageTitle:
|
|
8071
|
+
pageTitle: ReactNode;
|
|
8066
8072
|
tableProps: GridTablePropsWithRows<R, X> | QueryTablePropsWithQuery<R, X, QData>;
|
|
8067
|
-
|
|
8073
|
+
breadCrumb?: HeaderBreadcrumb | HeaderBreadcrumb[];
|
|
8068
8074
|
layoutState?: ReturnType<typeof useGridTableLayoutState<F>>;
|
|
8069
8075
|
/** Renders a ButtonMenu with "verticalDots" icon as trigger */
|
|
8070
8076
|
actionMenu?: ActionButtonMenuProps;
|
|
@@ -8305,6 +8311,36 @@ interface ScrollableParentContextProviderProps {
|
|
|
8305
8311
|
declare function ScrollableParent(props: PropsWithChildren<ScrollableParentContextProviderProps>): JSX.Element;
|
|
8306
8312
|
declare function useScrollableParent(): ScrollableParentContextProps;
|
|
8307
8313
|
|
|
8314
|
+
type SidePanelProps = {
|
|
8315
|
+
title: ReactNode;
|
|
8316
|
+
content: ReactNode;
|
|
8317
|
+
primaryAction?: ActionButtonProps;
|
|
8318
|
+
secondaryAction?: ActionButtonProps;
|
|
8319
|
+
};
|
|
8320
|
+
type TableReviewLayoutProps<R extends Kinded, X extends Only<GridTableXss, X>, QData> = {
|
|
8321
|
+
pageTitle: ReactNode;
|
|
8322
|
+
breadCrumb?: HeaderBreadcrumb | HeaderBreadcrumb[];
|
|
8323
|
+
/** Instructional text rendered below the title, above the table. */
|
|
8324
|
+
description: ReactNode;
|
|
8325
|
+
closeAction: VoidFunction;
|
|
8326
|
+
tableProps: GridTablePropsWithRows<R, X> | BaseQueryTableProps<R, X, QData>;
|
|
8327
|
+
/**
|
|
8328
|
+
* Replaces the table region with centered content.
|
|
8329
|
+
*
|
|
8330
|
+
* For rows-based tables: shown automatically when `tableProps.rows` contains no data rows.
|
|
8331
|
+
* For query-based tables: shown when prop is defined; TableReviewLayout does not peek into query results to determine if empty.
|
|
8332
|
+
*/
|
|
8333
|
+
emptyState?: ReactNode;
|
|
8334
|
+
/**
|
|
8335
|
+
* When set, slides open the panel column and renders a `SidePanel` with the given props.
|
|
8336
|
+
*/
|
|
8337
|
+
panelContent?: SidePanelProps;
|
|
8338
|
+
onPanelClose?: VoidFunction;
|
|
8339
|
+
/** Defaults to 450. */
|
|
8340
|
+
rightPaneWidth?: number;
|
|
8341
|
+
};
|
|
8342
|
+
declare function TableReviewLayout<R extends Kinded, X extends Only<GridTableXss, X>, QData>(props: TableReviewLayoutProps<R, X, QData>): JSX.Element;
|
|
8343
|
+
|
|
8308
8344
|
interface LoaderProps {
|
|
8309
8345
|
size?: "xs" | "sm" | "md" | "lg";
|
|
8310
8346
|
contrast?: boolean;
|
|
@@ -8559,4 +8595,4 @@ declare function resolveTooltip(disabled?: boolean | ReactNode, tooltip?: ReactN
|
|
|
8559
8595
|
*/
|
|
8560
8596
|
declare function defaultTestId(label: string): string;
|
|
8561
8597
|
|
|
8562
|
-
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, 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, ConfirmCloseModal, type ContentStack, Copy, CountBadge, type CountBadgeProps, Css, CssReset, 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 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 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 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, 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, ScrollShadows, ScrollableContent, ScrollableFooter, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedState, 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, 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, chipHoverOnlyStyles, chipHoverStyles, collapseColumn, column, condensedStyle, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatPlainDate, formatValue, generateColumnId, getAlignment, getColumnBorderCss, getDateFormat, getFirstOrLastCellCss, getJustification, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, marker, matchesFilter, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, parseWidthToPx, persistentItemPrefix, pressedOverlayCss, px, recursivelyGetContainingRow, reservedRowKinds, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, 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, useRuntimeStyle, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, useVirtualizedScrollParent, visit, zIndices };
|
|
8598
|
+
export { ASC, Accordion, AccordionList, type AccordionProps, type AccordionSize, type ActionButtonProps, 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 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, ConfirmCloseModal, type ContentStack, Copy, CountBadge, type CountBadgeProps, Css, CssReset, 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, Icon, IconButton, type IconButtonProps, 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 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, 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, ScrollShadows, ScrollableContent, ScrollableFooter, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedState, 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, 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, chipHoverOnlyStyles, chipHoverStyles, collapseColumn, column, condensedStyle, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatPlainDate, formatValue, generateColumnId, getAlignment, getColumnBorderCss, getDateFormat, getFirstOrLastCellCss, getJustification, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isGridTableProps, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, marker, matchesFilter, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, parseWidthToPx, persistentItemPrefix, pressedOverlayCss, px, recursivelyGetContainingRow, reservedRowKinds, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, 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, useRuntimeStyle, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, useVirtualizedScrollParent, visit, zIndices };
|