@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.js CHANGED
@@ -16167,7 +16167,7 @@ function TableCardView(props) {
16167
16167
  paddingBottom: "pb3",
16168
16168
  paddingRight: "pr3",
16169
16169
  paddingLeft: "pl3",
16170
- width: "w_330px",
16170
+ width: "w100",
16171
16171
  height: "h100",
16172
16172
  boxShadow: "bshBasic",
16173
16173
  backgroundColor: ["bgColor_var", {
@@ -16240,6 +16240,7 @@ var runningInJest = false;
16240
16240
  function setRunningInJest() {
16241
16241
  runningInJest = true;
16242
16242
  }
16243
+ var CARD_MIN_WIDTH_PX = 280;
16243
16244
  var defaults = {
16244
16245
  style: defaultStyle,
16245
16246
  stickyHeader: false
@@ -16528,13 +16529,12 @@ function GridTable(props) {
16528
16529
  }, [contentWidth, inDocumentScrollLayout, style, tableWidth]);
16529
16530
  return /* @__PURE__ */ jsx87(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ jsxs51(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
16530
16531
  /* @__PURE__ */ jsx87("div", { ref: resizeRef, ...trussProps52(getTableRefWidthStyles(as === "virtual", inDocumentScrollLayout)) }),
16531
- as === "card" ? /* @__PURE__ */ jsx87(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)
16532
+ as === "card" ? /* @__PURE__ */ jsx87(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition }) : _as === "virtual" ? /* @__PURE__ */ jsx87(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)
16532
16533
  ] }) });
16533
16534
  }
16534
16535
  var renders = {
16535
16536
  table: renderTable,
16536
- div: renderDiv,
16537
- virtual: renderVirtual
16537
+ div: renderDiv
16538
16538
  };
16539
16539
  function renderDiv(style, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, _virtuosoRef, _virtuosoRangeRef, tableHeadRows, stickyOffset, _infiniteScroll, tableContainerRef, _persistScrollPosition) {
16540
16540
  return /* @__PURE__ */ jsxs51("div", { ref: tableContainerRef, ...trussProps52({
@@ -16629,7 +16629,23 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, pinn
16629
16629
  ] })
16630
16630
  ] });
16631
16631
  }
16632
- function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, _tableContainerRef, persistScrollPosition = infiniteScroll === void 0) {
16632
+ function VirtualGridTableView({
16633
+ style,
16634
+ id,
16635
+ columns,
16636
+ visibleDataRows,
16637
+ keptSelectedRows,
16638
+ pinnedRows,
16639
+ firstRowMessage,
16640
+ stickyHeader,
16641
+ xss,
16642
+ virtuosoRef,
16643
+ virtuosoRangeRef,
16644
+ tableHeadRows,
16645
+ stickyOffset,
16646
+ infiniteScroll,
16647
+ persistScrollPosition = infiniteScroll === void 0
16648
+ }) {
16633
16649
  const customScrollParent = useVirtualizedScrollParent();
16634
16650
  const inDocumentScrollLayout = useDocumentScrollLayout();
16635
16651
  const [fetchMoreInProgress, setFetchMoreInProgress] = useState33(false);
@@ -16757,7 +16773,18 @@ function CardView({
16757
16773
  const validatedScrollIndex = savedScrollIndex !== void 0 && savedScrollIndex > 0 && savedScrollIndex < cardRows.length ? savedScrollIndex : void 0;
16758
16774
  const virtuosoKey = !!validatedScrollIndex && cardRows.length > 0 ? "with-data" : "virtuoso";
16759
16775
  if (runningInJest) {
16760
- return /* @__PURE__ */ jsx87("div", { className: "pt2 pb2", children: /* @__PURE__ */ jsx87("div", { className: "dg gtc_repeat_auto_fill_330px jcc gap3 pt3 pb3 pr3 pl3", children: cardRows }) });
16776
+ return /* @__PURE__ */ jsx87("div", { className: "pt2 pb2", children: /* @__PURE__ */ jsx87("div", { ...trussProps52({
16777
+ display: "dg",
16778
+ gridTemplateColumns: ["gtc_var", {
16779
+ "--gridTemplateColumns": maybeCssVar31(`repeat(auto-fill, minmax(${CARD_MIN_WIDTH_PX}px, 1fr))`)
16780
+ }],
16781
+ justifyContent: "jcc",
16782
+ gap: "gap3",
16783
+ paddingTop: "pt3",
16784
+ paddingBottom: "pb3",
16785
+ paddingRight: "pr3",
16786
+ paddingLeft: "pl3"
16787
+ }), children: cardRows }) });
16761
16788
  }
16762
16789
  return /* @__PURE__ */ jsx87("div", { className: "pt2 pb2 h100", children: /* @__PURE__ */ createElement2(VirtuosoGrid, { useWindowScroll: inDocumentScrollLayout && !customScrollParent, ...customScrollParent ? {
16763
16790
  customScrollParent
@@ -16770,7 +16797,9 @@ function CardView({
16770
16797
  }, ref) {
16771
16798
  return /* @__PURE__ */ jsx87("div", { ref, ...mergeProps21(void 0, style, {
16772
16799
  display: "dg",
16773
- gridTemplateColumns: "gtc_repeat_auto_fill_330px",
16800
+ gridTemplateColumns: ["gtc_var", {
16801
+ "--gridTemplateColumns": maybeCssVar31(`repeat(auto-fill, minmax(${CARD_MIN_WIDTH_PX}px, 1fr))`)
16802
+ }],
16774
16803
  justifyContent: "jcc",
16775
16804
  gap: "gap3",
16776
16805
  paddingTop: "pt3",