@homebound/beam 3.98.0 → 3.99.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 +7 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -7
- package/dist/index.d.ts +3 -7
- package/dist/index.js +7 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -9086,8 +9086,6 @@ interface HbSpinnerProviderProps {
|
|
|
9086
9086
|
}
|
|
9087
9087
|
declare function HbSpinnerProvider({ quips, children }: HbSpinnerProviderProps): JSX.Element;
|
|
9088
9088
|
|
|
9089
|
-
/** Overflow `ButtonMenu` props; the trigger is always a `verticalDots` IconButton. */
|
|
9090
|
-
type HeaderMenuAction = Omit<ButtonMenuProps, "trigger">;
|
|
9091
9089
|
/**
|
|
9092
9090
|
* A single action rendered by `HeaderActions` — a `Button`, an icon-only `IconButton`, or a
|
|
9093
9091
|
* `ButtonMenu` (typically the overflow / more-actions menu).
|
|
@@ -9104,7 +9102,7 @@ type HeaderAction = ({
|
|
|
9104
9102
|
kind: "icon";
|
|
9105
9103
|
} & Omit<IconButtonProps, "variant">) | ({
|
|
9106
9104
|
kind: "menu";
|
|
9107
|
-
} &
|
|
9105
|
+
} & ButtonMenuProps);
|
|
9108
9106
|
|
|
9109
9107
|
type ContentHeaderXss = Xss<Padding>;
|
|
9110
9108
|
type ContentHeaderLevel = 2 | 3 | 4;
|
|
@@ -9746,8 +9744,6 @@ declare function useQueryState<V extends string = string>(name: string, initialV
|
|
|
9746
9744
|
type UseSessionStorage<T> = [T, (value: T) => void];
|
|
9747
9745
|
declare function useSessionStorage<T>(key: string, defaultValue: T): UseSessionStorage<T>;
|
|
9748
9746
|
|
|
9749
|
-
type ActionButtonMenuProps = Omit<ButtonMenuProps, "trigger">;
|
|
9750
|
-
|
|
9751
9747
|
type QueryTablePropsWithQuery<R extends Kinded, X extends Only<GridTableXss, X>, QData> = BaseQueryTableProps<R, X, QData> & {
|
|
9752
9748
|
emptyFallback?: string;
|
|
9753
9749
|
keepHeaderWhenLoading?: boolean;
|
|
@@ -9757,8 +9753,8 @@ type GridTableLayoutProps<F extends Record<string, unknown>, R extends Kinded, X
|
|
|
9757
9753
|
layoutState?: ReturnType<typeof useGridTableLayoutState<F>>;
|
|
9758
9754
|
/** Title for the empty state when the table has no data rows. */
|
|
9759
9755
|
emptyFallback?: string;
|
|
9760
|
-
/**
|
|
9761
|
-
|
|
9756
|
+
/** Inline buttons, icon buttons, and an optional overflow menu (`kind: "menu"`). */
|
|
9757
|
+
actions?: HeaderAction[];
|
|
9762
9758
|
hideEditColumns?: boolean;
|
|
9763
9759
|
totalCount?: number;
|
|
9764
9760
|
/** When true, shows a view toggle button and renders the table with `as="card"` when in card view. */
|
package/dist/index.d.ts
CHANGED
|
@@ -9086,8 +9086,6 @@ interface HbSpinnerProviderProps {
|
|
|
9086
9086
|
}
|
|
9087
9087
|
declare function HbSpinnerProvider({ quips, children }: HbSpinnerProviderProps): JSX.Element;
|
|
9088
9088
|
|
|
9089
|
-
/** Overflow `ButtonMenu` props; the trigger is always a `verticalDots` IconButton. */
|
|
9090
|
-
type HeaderMenuAction = Omit<ButtonMenuProps, "trigger">;
|
|
9091
9089
|
/**
|
|
9092
9090
|
* A single action rendered by `HeaderActions` — a `Button`, an icon-only `IconButton`, or a
|
|
9093
9091
|
* `ButtonMenu` (typically the overflow / more-actions menu).
|
|
@@ -9104,7 +9102,7 @@ type HeaderAction = ({
|
|
|
9104
9102
|
kind: "icon";
|
|
9105
9103
|
} & Omit<IconButtonProps, "variant">) | ({
|
|
9106
9104
|
kind: "menu";
|
|
9107
|
-
} &
|
|
9105
|
+
} & ButtonMenuProps);
|
|
9108
9106
|
|
|
9109
9107
|
type ContentHeaderXss = Xss<Padding>;
|
|
9110
9108
|
type ContentHeaderLevel = 2 | 3 | 4;
|
|
@@ -9746,8 +9744,6 @@ declare function useQueryState<V extends string = string>(name: string, initialV
|
|
|
9746
9744
|
type UseSessionStorage<T> = [T, (value: T) => void];
|
|
9747
9745
|
declare function useSessionStorage<T>(key: string, defaultValue: T): UseSessionStorage<T>;
|
|
9748
9746
|
|
|
9749
|
-
type ActionButtonMenuProps = Omit<ButtonMenuProps, "trigger">;
|
|
9750
|
-
|
|
9751
9747
|
type QueryTablePropsWithQuery<R extends Kinded, X extends Only<GridTableXss, X>, QData> = BaseQueryTableProps<R, X, QData> & {
|
|
9752
9748
|
emptyFallback?: string;
|
|
9753
9749
|
keepHeaderWhenLoading?: boolean;
|
|
@@ -9757,8 +9753,8 @@ type GridTableLayoutProps<F extends Record<string, unknown>, R extends Kinded, X
|
|
|
9757
9753
|
layoutState?: ReturnType<typeof useGridTableLayoutState<F>>;
|
|
9758
9754
|
/** Title for the empty state when the table has no data rows. */
|
|
9759
9755
|
emptyFallback?: string;
|
|
9760
|
-
/**
|
|
9761
|
-
|
|
9756
|
+
/** Inline buttons, icon buttons, and an optional overflow menu (`kind: "menu"`). */
|
|
9757
|
+
actions?: HeaderAction[];
|
|
9762
9758
|
hideEditColumns?: boolean;
|
|
9763
9759
|
totalCount?: number;
|
|
9764
9760
|
/** When true, shows a view toggle button and renders the table with `as="card"` when in card view. */
|
package/dist/index.js
CHANGED
|
@@ -21471,9 +21471,7 @@ function HeaderActions(props) {
|
|
|
21471
21471
|
...menuProps
|
|
21472
21472
|
} = action;
|
|
21473
21473
|
void kind;
|
|
21474
|
-
return /* @__PURE__ */ jsx149(ButtonMenu, { ...menuProps,
|
|
21475
|
-
icon: "verticalDots"
|
|
21476
|
-
} }, key);
|
|
21474
|
+
return /* @__PURE__ */ jsx149(ButtonMenu, { ...menuProps }, key);
|
|
21477
21475
|
}
|
|
21478
21476
|
return /* @__PURE__ */ jsx149(Button, { ...action }, key);
|
|
21479
21477
|
}) });
|
|
@@ -23566,7 +23564,7 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
23566
23564
|
setView,
|
|
23567
23565
|
clearFilters,
|
|
23568
23566
|
searchApi,
|
|
23569
|
-
|
|
23567
|
+
actions
|
|
23570
23568
|
} = props;
|
|
23571
23569
|
const testId = useTestIds(props, "gridTableLayoutActions");
|
|
23572
23570
|
const filterTid = useTestIds({}, filterTestIdPrefix);
|
|
@@ -23641,12 +23639,10 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
23641
23639
|
/* @__PURE__ */ jsx183(Icon, { icon: showFilters ? "chevronUp" : "chevronDown" })
|
|
23642
23640
|
] }), variant: "secondaryBlack", onClick: () => setShowFilters(!showFilters), active: showFilters, ...testId.filterButton })
|
|
23643
23641
|
] }),
|
|
23644
|
-
(hasHideableColumns || withCardView ||
|
|
23642
|
+
(hasHideableColumns || withCardView || !!actions?.length) && /* @__PURE__ */ jsxs89("div", { className: "df aic gap_12px", children: [
|
|
23645
23643
|
hasHideableColumns && view === "list" && columns && api && /* @__PURE__ */ jsx183(EditColumnsButton, { columns, api, tooltip: "Display columns" }),
|
|
23646
23644
|
withCardView && view !== void 0 && setView && /* @__PURE__ */ jsx183(ViewToggleButton, { view, onChange: setView }),
|
|
23647
|
-
|
|
23648
|
-
icon: "verticalDots"
|
|
23649
|
-
} })
|
|
23645
|
+
!!actions?.length && /* @__PURE__ */ jsx183(HeaderActions, { actions, ...testId.actions })
|
|
23650
23646
|
] })
|
|
23651
23647
|
] }),
|
|
23652
23648
|
sm && showSearch && /* @__PURE__ */ jsx183("div", { ...trussProps102(pageContentPaddingX), children: searchTextField }),
|
|
@@ -23777,7 +23773,7 @@ function GridTableLayoutComponent(props) {
|
|
|
23777
23773
|
const {
|
|
23778
23774
|
tableProps,
|
|
23779
23775
|
layoutState,
|
|
23780
|
-
|
|
23776
|
+
actions,
|
|
23781
23777
|
hideEditColumns = false,
|
|
23782
23778
|
withCardView,
|
|
23783
23779
|
defaultView = "list",
|
|
@@ -23795,7 +23791,7 @@ function GridTableLayoutComponent(props) {
|
|
|
23795
23791
|
const api = useMemo43(() => tableProps.api ?? new GridTableApiImpl(), [tableProps.api]);
|
|
23796
23792
|
const [view, setView] = usePersistedTableView(defaultView, !!withCardView);
|
|
23797
23793
|
const clientSearch = layoutState?.search === "client" ? layoutState.searchString : void 0;
|
|
23798
|
-
const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView ||
|
|
23794
|
+
const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView || actions?.length);
|
|
23799
23795
|
const isVirtualized = tableProps.as === "virtual" || view === "card";
|
|
23800
23796
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
23801
23797
|
const tableActionsRef = useRef55(null);
|
|
@@ -23817,7 +23813,7 @@ function GridTableLayoutComponent(props) {
|
|
|
23817
23813
|
searchApiRef.current?.clear();
|
|
23818
23814
|
}, [layoutState]);
|
|
23819
23815
|
const emptyState = useMemo43(() => composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFilters), [layoutEmptyFallback, layoutState, tableProps, clearFilters]);
|
|
23820
|
-
const tableActionsEl = /* @__PURE__ */ jsx186(_GridTableLayoutActions, { filterDefs: layoutState?.filterDefs, filter: layoutState?.filter, setFilter: layoutState?.setFilter, groupBy: layoutState?.groupBy, searchProps: filterSearchProps, hasHideableColumns, columns, api, withCardView, view, setView, clearFilters, searchApi: searchApiRef,
|
|
23816
|
+
const tableActionsEl = /* @__PURE__ */ jsx186(_GridTableLayoutActions, { filterDefs: layoutState?.filterDefs, filter: layoutState?.filter, setFilter: layoutState?.setFilter, groupBy: layoutState?.groupBy, searchProps: filterSearchProps, hasHideableColumns, columns, api, withCardView, view, setView, clearFilters, searchApi: searchApiRef, actions });
|
|
23821
23817
|
const cardAs = view === "card" ? "card" : void 0;
|
|
23822
23818
|
const tableStyle = resolveGridTableLayoutStyle(tableProps.style, inDocumentScrollLayout);
|
|
23823
23819
|
const tableBody = /* @__PURE__ */ jsx186(Fragment40, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ jsx186(GridTable, { ...tableProps, ...cardAs ? {
|