@homebound/beam 3.98.0 → 3.99.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 +6 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -9746,8 +9746,6 @@ declare function useQueryState<V extends string = string>(name: string, initialV
|
|
|
9746
9746
|
type UseSessionStorage<T> = [T, (value: T) => void];
|
|
9747
9747
|
declare function useSessionStorage<T>(key: string, defaultValue: T): UseSessionStorage<T>;
|
|
9748
9748
|
|
|
9749
|
-
type ActionButtonMenuProps = Omit<ButtonMenuProps, "trigger">;
|
|
9750
|
-
|
|
9751
9749
|
type QueryTablePropsWithQuery<R extends Kinded, X extends Only<GridTableXss, X>, QData> = BaseQueryTableProps<R, X, QData> & {
|
|
9752
9750
|
emptyFallback?: string;
|
|
9753
9751
|
keepHeaderWhenLoading?: boolean;
|
|
@@ -9757,8 +9755,8 @@ type GridTableLayoutProps<F extends Record<string, unknown>, R extends Kinded, X
|
|
|
9757
9755
|
layoutState?: ReturnType<typeof useGridTableLayoutState<F>>;
|
|
9758
9756
|
/** Title for the empty state when the table has no data rows. */
|
|
9759
9757
|
emptyFallback?: string;
|
|
9760
|
-
/**
|
|
9761
|
-
|
|
9758
|
+
/** Inline buttons, icon buttons, and an optional overflow menu (`kind: "menu"`). */
|
|
9759
|
+
actions?: HeaderAction[];
|
|
9762
9760
|
hideEditColumns?: boolean;
|
|
9763
9761
|
totalCount?: number;
|
|
9764
9762
|
/** When true, shows a view toggle button and renders the table with `as="card"` when in card view. */
|
package/dist/index.d.ts
CHANGED
|
@@ -9746,8 +9746,6 @@ declare function useQueryState<V extends string = string>(name: string, initialV
|
|
|
9746
9746
|
type UseSessionStorage<T> = [T, (value: T) => void];
|
|
9747
9747
|
declare function useSessionStorage<T>(key: string, defaultValue: T): UseSessionStorage<T>;
|
|
9748
9748
|
|
|
9749
|
-
type ActionButtonMenuProps = Omit<ButtonMenuProps, "trigger">;
|
|
9750
|
-
|
|
9751
9749
|
type QueryTablePropsWithQuery<R extends Kinded, X extends Only<GridTableXss, X>, QData> = BaseQueryTableProps<R, X, QData> & {
|
|
9752
9750
|
emptyFallback?: string;
|
|
9753
9751
|
keepHeaderWhenLoading?: boolean;
|
|
@@ -9757,8 +9755,8 @@ type GridTableLayoutProps<F extends Record<string, unknown>, R extends Kinded, X
|
|
|
9757
9755
|
layoutState?: ReturnType<typeof useGridTableLayoutState<F>>;
|
|
9758
9756
|
/** Title for the empty state when the table has no data rows. */
|
|
9759
9757
|
emptyFallback?: string;
|
|
9760
|
-
/**
|
|
9761
|
-
|
|
9758
|
+
/** Inline buttons, icon buttons, and an optional overflow menu (`kind: "menu"`). */
|
|
9759
|
+
actions?: HeaderAction[];
|
|
9762
9760
|
hideEditColumns?: boolean;
|
|
9763
9761
|
totalCount?: number;
|
|
9764
9762
|
/** When true, shows a view toggle button and renders the table with `as="card"` when in card view. */
|
package/dist/index.js
CHANGED
|
@@ -23566,7 +23566,7 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
23566
23566
|
setView,
|
|
23567
23567
|
clearFilters,
|
|
23568
23568
|
searchApi,
|
|
23569
|
-
|
|
23569
|
+
actions
|
|
23570
23570
|
} = props;
|
|
23571
23571
|
const testId = useTestIds(props, "gridTableLayoutActions");
|
|
23572
23572
|
const filterTid = useTestIds({}, filterTestIdPrefix);
|
|
@@ -23641,12 +23641,10 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
23641
23641
|
/* @__PURE__ */ jsx183(Icon, { icon: showFilters ? "chevronUp" : "chevronDown" })
|
|
23642
23642
|
] }), variant: "secondaryBlack", onClick: () => setShowFilters(!showFilters), active: showFilters, ...testId.filterButton })
|
|
23643
23643
|
] }),
|
|
23644
|
-
(hasHideableColumns || withCardView ||
|
|
23644
|
+
(hasHideableColumns || withCardView || !!actions?.length) && /* @__PURE__ */ jsxs89("div", { className: "df aic gap_12px", children: [
|
|
23645
23645
|
hasHideableColumns && view === "list" && columns && api && /* @__PURE__ */ jsx183(EditColumnsButton, { columns, api, tooltip: "Display columns" }),
|
|
23646
23646
|
withCardView && view !== void 0 && setView && /* @__PURE__ */ jsx183(ViewToggleButton, { view, onChange: setView }),
|
|
23647
|
-
|
|
23648
|
-
icon: "verticalDots"
|
|
23649
|
-
} })
|
|
23647
|
+
!!actions?.length && /* @__PURE__ */ jsx183(HeaderActions, { actions, ...testId.actions })
|
|
23650
23648
|
] })
|
|
23651
23649
|
] }),
|
|
23652
23650
|
sm && showSearch && /* @__PURE__ */ jsx183("div", { ...trussProps102(pageContentPaddingX), children: searchTextField }),
|
|
@@ -23777,7 +23775,7 @@ function GridTableLayoutComponent(props) {
|
|
|
23777
23775
|
const {
|
|
23778
23776
|
tableProps,
|
|
23779
23777
|
layoutState,
|
|
23780
|
-
|
|
23778
|
+
actions,
|
|
23781
23779
|
hideEditColumns = false,
|
|
23782
23780
|
withCardView,
|
|
23783
23781
|
defaultView = "list",
|
|
@@ -23795,7 +23793,7 @@ function GridTableLayoutComponent(props) {
|
|
|
23795
23793
|
const api = useMemo43(() => tableProps.api ?? new GridTableApiImpl(), [tableProps.api]);
|
|
23796
23794
|
const [view, setView] = usePersistedTableView(defaultView, !!withCardView);
|
|
23797
23795
|
const clientSearch = layoutState?.search === "client" ? layoutState.searchString : void 0;
|
|
23798
|
-
const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView ||
|
|
23796
|
+
const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView || actions?.length);
|
|
23799
23797
|
const isVirtualized = tableProps.as === "virtual" || view === "card";
|
|
23800
23798
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
23801
23799
|
const tableActionsRef = useRef55(null);
|
|
@@ -23817,7 +23815,7 @@ function GridTableLayoutComponent(props) {
|
|
|
23817
23815
|
searchApiRef.current?.clear();
|
|
23818
23816
|
}, [layoutState]);
|
|
23819
23817
|
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,
|
|
23818
|
+
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
23819
|
const cardAs = view === "card" ? "card" : void 0;
|
|
23822
23820
|
const tableStyle = resolveGridTableLayoutStyle(tableProps.style, inDocumentScrollLayout);
|
|
23823
23821
|
const tableBody = /* @__PURE__ */ jsx186(Fragment40, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ jsx186(GridTable, { ...tableProps, ...cardAs ? {
|