@homebound/beam 3.43.0 → 3.45.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 +30 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7843,7 +7843,7 @@ function PinToggle({ rowId }) {
|
|
|
7843
7843
|
{
|
|
7844
7844
|
...tid[rowId],
|
|
7845
7845
|
icon: "pin",
|
|
7846
|
-
|
|
7846
|
+
color: isPinned ? "rgba(37, 99, 235, 1)" /* Blue600 */ : void 0,
|
|
7847
7847
|
label: isPinned ? "Unpin row" : "Pin row",
|
|
7848
7848
|
onClick: () => tableState.togglePinned(rowId)
|
|
7849
7849
|
}
|
|
@@ -8975,11 +8975,11 @@ function memoizedTableStyles() {
|
|
|
8975
8975
|
keptLastRowCss: {
|
|
8976
8976
|
boxShadow: "boxShadow_inset_0px_14px_8px_11px_rgba_63_63_63_18"
|
|
8977
8977
|
},
|
|
8978
|
-
// Pinned rows get a
|
|
8978
|
+
// Pinned rows get a blue highlight; the standard `betweenRowsCss` bottom border (not a
|
|
8979
8979
|
// shadow) already separates the pinned section from the body.
|
|
8980
8980
|
pinnedRowCss: {
|
|
8981
8981
|
backgroundColor: ["bgColor_var", {
|
|
8982
|
-
"--backgroundColor": (0, import_runtime20.maybeCssVar)("rgba(
|
|
8982
|
+
"--backgroundColor": (0, import_runtime20.maybeCssVar)("rgba(239, 246, 255, 1)" /* Blue50 */)
|
|
8983
8983
|
}]
|
|
8984
8984
|
}
|
|
8985
8985
|
};
|
|
@@ -9395,7 +9395,7 @@ function RowImpl(props) {
|
|
|
9395
9395
|
...isGridCellContent(maybeContent) && maybeContent.css ? maybeContent.css : {},
|
|
9396
9396
|
// Apply kept last row styling per-cell
|
|
9397
9397
|
...isLastKeptRow && style.keptLastRowCss,
|
|
9398
|
-
// Apply the
|
|
9398
|
+
// Apply the blue highlight to every runtime-pinned row's cells (wins over `isActive`)
|
|
9399
9399
|
...pinned && style.pinnedRowCss,
|
|
9400
9400
|
// Apply cell highlight styles to active cell and hover
|
|
9401
9401
|
...{
|
|
@@ -21002,7 +21002,7 @@ function FilterPanelOpen({
|
|
|
21002
21002
|
}), children: [
|
|
21003
21003
|
groupBy && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(SelectField, { label: "Group by", labelStyle: "inline", sizeToContent: true, options: groupBy.options, getOptionValue: (o) => o.id, getOptionLabel: (o) => o.name, value: groupBy.value, onSelect: (g) => g && groupBy.setValue(g) }),
|
|
21004
21004
|
filterControls,
|
|
21005
|
-
activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(Button, { label: "Clear", variant: "tertiary", onClick: onClear, ...tid.clearBtn })
|
|
21005
|
+
activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(Button, { label: "Clear", variant: "tertiary", onClick: () => maybeCall(onClear), ...tid.clearBtn })
|
|
21006
21006
|
] });
|
|
21007
21007
|
}
|
|
21008
21008
|
function FilterPanelClosed({
|
|
@@ -21027,7 +21027,7 @@ function FilterPanelClosed({
|
|
|
21027
21027
|
} : {}
|
|
21028
21028
|
}), children: [
|
|
21029
21029
|
chips,
|
|
21030
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(Button, { label: "Clear", variant: "tertiary", onClick: onClear, ...tid.clearBtn })
|
|
21030
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(Button, { label: "Clear", variant: "tertiary", onClick: () => maybeCall(onClear), ...tid.clearBtn })
|
|
21031
21031
|
] });
|
|
21032
21032
|
}
|
|
21033
21033
|
function buildFilterControls(filterImpls, filter, setFilter, testId) {
|
|
@@ -21071,7 +21071,9 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
21071
21071
|
api,
|
|
21072
21072
|
withCardView,
|
|
21073
21073
|
view,
|
|
21074
|
-
setView
|
|
21074
|
+
setView,
|
|
21075
|
+
clearFilters,
|
|
21076
|
+
searchApi
|
|
21075
21077
|
} = props;
|
|
21076
21078
|
const testId = useTestIds(props, "gridTableLayoutActions");
|
|
21077
21079
|
const {
|
|
@@ -21102,6 +21104,17 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
21102
21104
|
setSearchValue(v ?? "");
|
|
21103
21105
|
handleSearchDebounced(v ?? "");
|
|
21104
21106
|
}, placeholder: "Search", clearable: true, fullWidth: true, startAdornment: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Icon, { icon: "search", color: "rgba(100, 100, 100, 1)" /* Gray700 */ }) });
|
|
21107
|
+
if (searchApi) {
|
|
21108
|
+
searchApi.current = {
|
|
21109
|
+
clear: () => {
|
|
21110
|
+
handleSearchDebounced.cancel();
|
|
21111
|
+
setSearchValue("");
|
|
21112
|
+
setQueryParams({
|
|
21113
|
+
search: void 0
|
|
21114
|
+
}, "replaceIn");
|
|
21115
|
+
}
|
|
21116
|
+
};
|
|
21117
|
+
}
|
|
21105
21118
|
return /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", { className: "df fdc gap1 pb2", children: [
|
|
21106
21119
|
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", { ...(0, import_runtime79.trussProps)({
|
|
21107
21120
|
display: "df",
|
|
@@ -21128,7 +21141,7 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
21128
21141
|
] })
|
|
21129
21142
|
] }),
|
|
21130
21143
|
sm && showSearch && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { className: "pl3 pr3", children: searchTextField }),
|
|
21131
|
-
hasFilters && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(FilterPanel, { isOpen: showFilters, groupBy, filterImpls, filter, setFilter, onClear:
|
|
21144
|
+
hasFilters && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(FilterPanel, { isOpen: showFilters, groupBy, filterImpls, filter, setFilter, onClear: clearFilters })
|
|
21132
21145
|
] });
|
|
21133
21146
|
}
|
|
21134
21147
|
var _GridTableLayoutActions = (0, import_react107.memo)(GridTableLayoutActionsComponent);
|
|
@@ -21292,8 +21305,13 @@ function GridTableLayoutComponent(props) {
|
|
|
21292
21305
|
const filterSearchProps = (0, import_react110.useMemo)(() => layoutState?.search ? {
|
|
21293
21306
|
onSearch: layoutState.setSearchString
|
|
21294
21307
|
} : void 0, [layoutState?.search, layoutState?.setSearchString]);
|
|
21295
|
-
const
|
|
21296
|
-
const
|
|
21308
|
+
const searchApiRef = (0, import_react110.useRef)();
|
|
21309
|
+
const clearFilters = (0, import_react110.useCallback)(() => {
|
|
21310
|
+
layoutState?.clearFilters();
|
|
21311
|
+
searchApiRef.current?.clear();
|
|
21312
|
+
}, [layoutState]);
|
|
21313
|
+
const emptyState = (0, import_react110.useMemo)(() => composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFilters), [layoutEmptyFallback, layoutState, tableProps, clearFilters]);
|
|
21314
|
+
const tableActionsEl = /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(_GridTableLayoutActions, { filterDefs: layoutState?.filterDefs, filter: layoutState?.filter, setFilter: layoutState?.setFilter, groupBy: layoutState?.groupBy, searchProps: filterSearchProps, hasHideableColumns, columns, api, withCardView, view, setView, clearFilters, searchApi: searchApiRef });
|
|
21297
21315
|
const cardAs = withCardView && view === "card" ? "card" : void 0;
|
|
21298
21316
|
const tableBody = /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_jsx_runtime152.Fragment, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(GridTable, { ...tableProps, ...cardAs ? {
|
|
21299
21317
|
as: cardAs
|
|
@@ -21383,7 +21401,7 @@ function useGridTableLayoutState({
|
|
|
21383
21401
|
clearFilters
|
|
21384
21402
|
};
|
|
21385
21403
|
}
|
|
21386
|
-
function composeEmptyState(tableProps, layoutState, layoutEmptyFallback) {
|
|
21404
|
+
function composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFilters) {
|
|
21387
21405
|
const tableEmptyState = "emptyState" in tableProps ? tableProps.emptyState : void 0;
|
|
21388
21406
|
const tableEmptyFallback = "emptyFallback" in tableProps ? tableProps.emptyFallback : void 0;
|
|
21389
21407
|
const filteringActive = layoutState?.filteringActive ?? false;
|
|
@@ -21391,7 +21409,7 @@ function composeEmptyState(tableProps, layoutState, layoutEmptyFallback) {
|
|
|
21391
21409
|
return {
|
|
21392
21410
|
title: tableEmptyState?.title ?? tableEmptyFallback ?? layoutEmptyFallback,
|
|
21393
21411
|
description: tableEmptyState?.description ?? (filteringActive ? filterEmptyDescription : void 0),
|
|
21394
|
-
actions: tableEmptyState?.actions ?? (filteringActive && layoutState ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Button, { label: "Clear Filters", variant: "tertiary", onClick:
|
|
21412
|
+
actions: tableEmptyState?.actions ?? (filteringActive && layoutState ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Button, { label: "Clear Filters", variant: "tertiary", onClick: clearFilters, "data-testid": "clearFilters" }) : void 0)
|
|
21395
21413
|
};
|
|
21396
21414
|
}
|
|
21397
21415
|
function useSetTableActionsHeight(tableWrapperRef, tableActionsRef, enabled) {
|