@gem-sdk/analytics 1.0.0 → 1.0.2-dev.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/esm/index.js CHANGED
@@ -24784,6 +24784,7 @@ function JourneyEventRenderer({ event }) {
24784
24784
 
24785
24785
  const JourneyContainer = ({ orderId, eventsByDate, hasMoreSteps, isFetchingMoreSteps, onLoadMore, }) => {
24786
24786
  const firstEventsByDate = eventsByDate[0];
24787
+ const { isMobileView } = useWindowSize();
24787
24788
  const [currentDate, setCurrentDate] = useState(firstEventsByDate?.date || '');
24788
24789
  const [showShadow, setShowShadow] = useState(false);
24789
24790
  const scrollContainerRef = useRef(null);
@@ -24846,7 +24847,7 @@ const JourneyContainer = ({ orderId, eventsByDate, hasMoreSteps, isFetchingMoreS
24846
24847
  // Update ref for next render
24847
24848
  prevIsFetchingRef.current = isFetchingMoreSteps;
24848
24849
  }, [isFetchingMoreSteps]);
24849
- return (jsxs(Scrollable, { scrollbarWidth: "thin", vertical: true, horizontal: true, className: "max-h-[100vh] md:max-h-[calc(100vh-120px)] pb-5", children: [jsx(GBox, { ariaShadow: showShadow ? 'shadow-outset-200' : undefined, position: "sticky", insetBlockStart: "0", zIndex: "10", background: "bg-fill", children: jsx(JourneyTitle, { content: currentDate, id: orderId, hasMoreSteps: hasMoreSteps, isFetching: isFetchingMoreSteps, onLoadMode: () => {
24850
+ return (jsxs(Scrollable, { scrollbarWidth: "thin", vertical: true, horizontal: true, className: "pb-5", style: { maxHeight: isMobileView ? '100vh' : 'calc(100vh - 120px)' }, children: [jsx(GBox, { ariaShadow: showShadow ? 'shadow-outset-200' : undefined, position: "sticky", insetBlockStart: "0", zIndex: "10", background: "bg-fill", children: jsx(JourneyTitle, { content: currentDate, id: orderId, hasMoreSteps: hasMoreSteps, isFetching: isFetchingMoreSteps, onLoadMode: () => {
24850
24851
  onLoadMore();
24851
24852
  handleScrollToTop();
24852
24853
  } }) }), jsx("div", { ref: scrollContainerRef, className: "min-h-[100vh] md:min-h-[calc(100vh-192px)]", children: jsx(JourneyGroup, { eventsByDate: eventsByDate, sectionRefs: sectionRefs }) })] }));
@@ -24784,6 +24784,7 @@ function JourneyEventRenderer({ event }) {
24784
24784
 
24785
24785
  const JourneyContainer = ({ orderId, eventsByDate, hasMoreSteps, isFetchingMoreSteps, onLoadMore, }) => {
24786
24786
  const firstEventsByDate = eventsByDate[0];
24787
+ const { isMobileView } = useWindowSize();
24787
24788
  const [currentDate, setCurrentDate] = useState(firstEventsByDate?.date || '');
24788
24789
  const [showShadow, setShowShadow] = useState(false);
24789
24790
  const scrollContainerRef = useRef(null);
@@ -24846,7 +24847,7 @@ const JourneyContainer = ({ orderId, eventsByDate, hasMoreSteps, isFetchingMoreS
24846
24847
  // Update ref for next render
24847
24848
  prevIsFetchingRef.current = isFetchingMoreSteps;
24848
24849
  }, [isFetchingMoreSteps]);
24849
- return (jsxs(Scrollable, { scrollbarWidth: "thin", vertical: true, horizontal: true, className: "max-h-[100vh] md:max-h-[calc(100vh-120px)] pb-5", children: [jsx(GBox, { ariaShadow: showShadow ? 'shadow-outset-200' : undefined, position: "sticky", insetBlockStart: "0", zIndex: "10", background: "bg-fill", children: jsx(JourneyTitle, { content: currentDate, id: orderId, hasMoreSteps: hasMoreSteps, isFetching: isFetchingMoreSteps, onLoadMode: () => {
24850
+ return (jsxs(Scrollable, { scrollbarWidth: "thin", vertical: true, horizontal: true, className: "pb-5", style: { maxHeight: isMobileView ? '100vh' : 'calc(100vh - 120px)' }, children: [jsx(GBox, { ariaShadow: showShadow ? 'shadow-outset-200' : undefined, position: "sticky", insetBlockStart: "0", zIndex: "10", background: "bg-fill", children: jsx(JourneyTitle, { content: currentDate, id: orderId, hasMoreSteps: hasMoreSteps, isFetching: isFetchingMoreSteps, onLoadMode: () => {
24850
24851
  onLoadMore();
24851
24852
  handleScrollToTop();
24852
24853
  } }) }), jsx("div", { ref: scrollContainerRef, className: "min-h-[100vh] md:min-h-[calc(100vh-192px)]", children: jsx(JourneyGroup, { eventsByDate: eventsByDate, sectionRefs: sectionRefs }) })] }));