@homebound/beam 3.36.0 → 3.37.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 CHANGED
@@ -16627,7 +16627,7 @@ function TableCardView(props) {
16627
16627
  paddingBottom: "pb3",
16628
16628
  paddingRight: "pr3",
16629
16629
  paddingLeft: "pl3",
16630
- width: "w_330px",
16630
+ width: "w100",
16631
16631
  height: "h100",
16632
16632
  boxShadow: "bshBasic",
16633
16633
  backgroundColor: ["bgColor_var", {
@@ -16700,6 +16700,7 @@ var runningInJest = false;
16700
16700
  function setRunningInJest() {
16701
16701
  runningInJest = true;
16702
16702
  }
16703
+ var CARD_MIN_WIDTH_PX = 280;
16703
16704
  var defaults = {
16704
16705
  style: defaultStyle,
16705
16706
  stickyHeader: false
@@ -16988,13 +16989,12 @@ function GridTable(props) {
16988
16989
  }, [contentWidth, inDocumentScrollLayout, style, tableWidth]);
16989
16990
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
16990
16991
  /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ref: resizeRef, ...(0, import_runtime56.trussProps)(getTableRefWidthStyles(as === "virtual", inDocumentScrollLayout)) }),
16991
- as === "card" ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition }) : renders[_as](tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, tableContainerRef, persistScrollPosition)
16992
+ as === "card" ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition }) : _as === "virtual" ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(VirtualGridTableView, { style: tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, persistScrollPosition }) : renders[_as](tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, tableContainerRef, persistScrollPosition)
16992
16993
  ] }) });
16993
16994
  }
16994
16995
  var renders = {
16995
16996
  table: renderTable,
16996
- div: renderDiv,
16997
- virtual: renderVirtual
16997
+ div: renderDiv
16998
16998
  };
16999
16999
  function renderDiv(style, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, _virtuosoRef, _virtuosoRangeRef, tableHeadRows, stickyOffset, _infiniteScroll, tableContainerRef, _persistScrollPosition) {
17000
17000
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { ref: tableContainerRef, ...(0, import_runtime56.trussProps)({
@@ -17089,7 +17089,23 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, pinn
17089
17089
  ] })
17090
17090
  ] });
17091
17091
  }
17092
- function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, _tableContainerRef, persistScrollPosition = infiniteScroll === void 0) {
17092
+ function VirtualGridTableView({
17093
+ style,
17094
+ id,
17095
+ columns,
17096
+ visibleDataRows,
17097
+ keptSelectedRows,
17098
+ pinnedRows,
17099
+ firstRowMessage,
17100
+ stickyHeader,
17101
+ xss,
17102
+ virtuosoRef,
17103
+ virtuosoRangeRef,
17104
+ tableHeadRows,
17105
+ stickyOffset,
17106
+ infiniteScroll,
17107
+ persistScrollPosition = infiniteScroll === void 0
17108
+ }) {
17093
17109
  const customScrollParent = useVirtualizedScrollParent();
17094
17110
  const inDocumentScrollLayout = useDocumentScrollLayout();
17095
17111
  const [fetchMoreInProgress, setFetchMoreInProgress] = (0, import_react81.useState)(false);
@@ -17217,7 +17233,18 @@ function CardView({
17217
17233
  const validatedScrollIndex = savedScrollIndex !== void 0 && savedScrollIndex > 0 && savedScrollIndex < cardRows.length ? savedScrollIndex : void 0;
17218
17234
  const virtuosoKey = !!validatedScrollIndex && cardRows.length > 0 ? "with-data" : "virtuoso";
17219
17235
  if (runningInJest) {
17220
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "pt2 pb2", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "dg gtc_repeat_auto_fill_330px jcc gap3 pt3 pb3 pr3 pl3", children: cardRows }) });
17236
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "pt2 pb2", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ...(0, import_runtime56.trussProps)({
17237
+ display: "dg",
17238
+ gridTemplateColumns: ["gtc_var", {
17239
+ "--gridTemplateColumns": (0, import_runtime56.maybeCssVar)(`repeat(auto-fill, minmax(${CARD_MIN_WIDTH_PX}px, 1fr))`)
17240
+ }],
17241
+ justifyContent: "jcc",
17242
+ gap: "gap3",
17243
+ paddingTop: "pt3",
17244
+ paddingBottom: "pb3",
17245
+ paddingRight: "pr3",
17246
+ paddingLeft: "pl3"
17247
+ }), children: cardRows }) });
17221
17248
  }
17222
17249
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "pt2 pb2 h100", children: /* @__PURE__ */ (0, import_react82.createElement)(import_react_virtuoso2.VirtuosoGrid, { useWindowScroll: inDocumentScrollLayout && !customScrollParent, ...customScrollParent ? {
17223
17250
  customScrollParent
@@ -17230,7 +17257,9 @@ function CardView({
17230
17257
  }, ref) {
17231
17258
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ref, ...(0, import_runtime56.mergeProps)(void 0, style, {
17232
17259
  display: "dg",
17233
- gridTemplateColumns: "gtc_repeat_auto_fill_330px",
17260
+ gridTemplateColumns: ["gtc_var", {
17261
+ "--gridTemplateColumns": (0, import_runtime56.maybeCssVar)(`repeat(auto-fill, minmax(${CARD_MIN_WIDTH_PX}px, 1fr))`)
17262
+ }],
17234
17263
  justifyContent: "jcc",
17235
17264
  gap: "gap3",
17236
17265
  paddingTop: "pt3",