@homebound/beam 4.47.1 → 4.47.3

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 CHANGED
@@ -7124,9 +7124,6 @@ function memoizedTableStyles() {
7124
7124
  color: ["color_var", {
7125
7125
  "--color": "var(--b-on-surface)"
7126
7126
  }],
7127
- backgroundColor: ["bgColor_var", {
7128
- "--backgroundColor": "var(--b-surface)"
7129
- }],
7130
7127
  alignItems: ["ai_var", {
7131
7128
  "--alignItems": (0, import_runtime10.maybeCssVar)(alignItems)
7132
7129
  }],
@@ -7145,11 +7142,17 @@ function memoizedTableStyles() {
7145
7142
  "--height": `${inlineEditing ? 48 : 36}px`
7146
7143
  }]
7147
7144
  },
7148
- ...cellHighlight ? {
7149
- backgroundColor: ["h_bgColor_var", {
7150
- "--h_backgroundColor": "var(--b-surface-hover)"
7151
- }]
7152
- } : {}
7145
+ ...{
7146
+ backgroundColor: ["bgColor_var", {
7147
+ "--backgroundColor": "var(--b-surface)"
7148
+ }],
7149
+ ...cellHighlight ? {
7150
+ backgroundColor: ["bgColor_var h_bgColor_var", {
7151
+ "--backgroundColor": "var(--b-surface)",
7152
+ "--h_backgroundColor": "var(--b-surface-hover)"
7153
+ }]
7154
+ } : {}
7155
+ }
7153
7156
  },
7154
7157
  firstCellCss: bordered ? {
7155
7158
  borderLeftStyle: "bls_solid",
@@ -15045,7 +15048,28 @@ function GridTable(props) {
15045
15048
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
15046
15049
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { ref: resizeRef, ...(0, import_runtime43.trussProps)(getTableRefWidthStyles(as === "virtual", columnMeasureWidth)), ...tid.probe }),
15047
15050
  loading && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { ...(0, import_runtime43.trussProps)(loadingOverlayCss), ...tid.loadingOverlay, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Loader, { ...tid.loadingSpinner, size: "md" }) }),
15048
- as === "card" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(VirtualGridTableView, { style: tableStyle, id, columns: layoutColumns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, persistScrollPosition, loading }) : renders[_as](tableStyle, id, layoutColumns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, loading, infiniteScroll, tableContainerRef, persistScrollPosition)
15051
+ as === "card" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
15052
+ VirtualGridTableView,
15053
+ {
15054
+ style,
15055
+ minWidthPx: tableStyle.minWidthPx,
15056
+ id,
15057
+ columns: layoutColumns,
15058
+ visibleDataRows,
15059
+ keptSelectedRows,
15060
+ pinnedRows,
15061
+ firstRowMessage,
15062
+ stickyHeader,
15063
+ xss,
15064
+ virtuosoRef,
15065
+ virtuosoRangeRef,
15066
+ tableHeadRows,
15067
+ stickyOffset,
15068
+ infiniteScroll,
15069
+ persistScrollPosition,
15070
+ loading
15071
+ }
15072
+ ) : renders[_as](tableStyle, id, layoutColumns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, loading, infiniteScroll, tableContainerRef, persistScrollPosition)
15049
15073
  ] }) });
15050
15074
  }
15051
15075
  var loadingOverlayCss = {
@@ -15169,6 +15193,7 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, pinn
15169
15193
  }
15170
15194
  function VirtualGridTableView({
15171
15195
  style,
15196
+ minWidthPx,
15172
15197
  id,
15173
15198
  columns,
15174
15199
  visibleDataRows,
@@ -15201,9 +15226,8 @@ function VirtualGridTableView({
15201
15226
  // the div/table render paths so virtualized tables pin below the global nav + page header.
15202
15227
  TopItemList: import_react51.default.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { ...props, ref, ...(0, import_runtime43.mergeProps)(void 0, {
15203
15228
  ...props.style,
15204
- ...style.minWidthPx !== void 0 ? {
15205
- minWidth: style.minWidthPx
15206
- } : {},
15229
+ // Read from a CSS variable so a width change doesn't recreate this component and remount every row
15230
+ minWidth: `var(${virtualTableMinWidthVar}, auto)`,
15207
15231
  zIndex: zIndices.tableStickyHeader,
15208
15232
  top: stickyTableHeaderOffset(stickyOffset)
15209
15233
  }, {
@@ -15228,6 +15252,9 @@ function VirtualGridTableView({
15228
15252
  overscan: 5,
15229
15253
  ref: virtuosoRef,
15230
15254
  ...loading ? (0, import_runtime43.trussProps)(loadingTableCss) : {},
15255
+ style: minWidthPx !== void 0 ? {
15256
+ [virtualTableMinWidthVar]: `${minWidthPx}px`
15257
+ } : void 0,
15231
15258
  ...customScrollParent ? {
15232
15259
  customScrollParent
15233
15260
  } : {},
@@ -15384,6 +15411,7 @@ function CardView({
15384
15411
  }
15385
15412
  } : {} }) });
15386
15413
  }
15414
+ var virtualTableMinWidthVar = "--beam-virtual-table-min-width";
15387
15415
  var VirtualRoot = (0, import_memoize_one.default)((gs, _columns, id, xss) => {
15388
15416
  return import_react51.default.forwardRef(function VirtualRoot2({
15389
15417
  style,