@goodhood-web/nebenan-base 3.4.0-development.10 → 3.4.0-development.11
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/index.js +1 -1
- package/index.mjs +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -887,4 +887,4 @@ and limitations under the License.
|
|
|
887
887
|
See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.
|
|
888
888
|
`),null)},i.onStart=function(r){i.lastScrollTop||(i.dragging=!0,r instanceof MouseEvent?i.startY=r.pageY:r instanceof TouchEvent&&(i.startY=r.touches[0].pageY),i.currentY=i.startY,i._infScroll&&(i._infScroll.style.willChange="transform",i._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},i.onMove=function(r){i.dragging&&(r instanceof MouseEvent?i.currentY=r.pageY:r instanceof TouchEvent&&(i.currentY=r.touches[0].pageY),!(i.currentY<i.startY)&&(i.currentY-i.startY>=Number(i.props.pullDownToRefreshThreshold)&&i.setState({pullToRefreshThresholdBreached:!0}),!(i.currentY-i.startY>i.maxPullDownDistance*1.5)&&i._infScroll&&(i._infScroll.style.overflow="visible",i._infScroll.style.transform="translate3d(0px, "+(i.currentY-i.startY)+"px, 0px)")))},i.onEnd=function(){i.startY=0,i.currentY=0,i.dragging=!1,i.state.pullToRefreshThresholdBreached&&(i.props.refreshFunction&&i.props.refreshFunction(),i.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){i._infScroll&&(i._infScroll.style.overflow="auto",i._infScroll.style.transform="none",i._infScroll.style.willChange="unset")})},i.onScrollListener=function(r){typeof i.props.onScroll=="function"&&setTimeout(function(){return i.props.onScroll&&i.props.onScroll(r)},0);var a=i.props.height||i._scrollableNode?r.target:document.documentElement.scrollTop?document.documentElement:document.body;if(!i.actionTriggered){var s=i.props.inverse?i.isElementAtTop(a,i.props.scrollThreshold):i.isElementAtBottom(a,i.props.scrollThreshold);s&&i.props.hasMore&&(i.actionTriggered=!0,i.setState({showLoader:!0}),i.props.next&&i.props.next()),i.lastScrollTop=a.scrollTop}},i.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},i.throttledOnScrollListener=jte(150,i.onScrollListener).bind(i),i.onStart=i.onStart.bind(i),i.onMove=i.onMove.bind(i),i.onEnd=i.onEnd.bind(i),i}return e.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),typeof this.props.initialScrollY=="number"&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),typeof this.props.refreshFunction!="function"))throw new Error(`Mandatory prop "refreshFunction" missing.
|
|
889
889
|
Pull Down To Refresh functionality will not work
|
|
890
|
-
as expected. Check README.md for usage'`)},e.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},e.prototype.componentDidUpdate=function(t){this.props.dataLength!==t.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},e.getDerivedStateFromProps=function(t,i){var r=t.dataLength!==i.prevDataLength;return r?qr(qr({},i),{prevDataLength:t.dataLength}):null},e.prototype.isElementAtTop=function(t,i){i===void 0&&(i=.8);var r=t===document.body||t===document.documentElement?window.screen.availHeight:t.clientHeight,a=Lh(i);return a.unit===Gi.Pixel?t.scrollTop<=a.value+r-t.scrollHeight+1:t.scrollTop<=a.value/100+r-t.scrollHeight+1},e.prototype.isElementAtBottom=function(t,i){i===void 0&&(i=.8);var r=t===document.body||t===document.documentElement?window.screen.availHeight:t.clientHeight,a=Lh(i);return a.unit===Gi.Pixel?t.scrollTop+r>=t.scrollHeight-a.value:t.scrollTop+r>=a.value/100*t.scrollHeight},e.prototype.render=function(){var t=this,i=qr({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),r=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),a=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return _.createElement("div",{style:a,className:"infinite-scroll-component__outerdiv"},_.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(s){return t._infScroll=s},style:i},this.props.pullDownToRefresh&&_.createElement("div",{style:{position:"relative"},ref:function(s){return t._pullDown=s}},_.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!r&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},e}(_.Component);const Hte="_cardHeader_1e3dg_141",Vte="_cardBody_1e3dg_152",Gte="_tabsList_1e3dg_161",Wte="_tab_1e3dg_161",qte="_selectedTab_1e3dg_199",Ute="_tabPanel_1e3dg_208",Kte="_profile_1e3dg_220",Ct={cardHeader:Hte,cardBody:Vte,tabsList:Gte,tab:Wte,selectedTab:qte,tabPanel:Ute,profile:Kte},Zte=(n,e,t)=>({id:n,object_type:"hood_message",page:e,reaction_type:t==="all"?void 0:t}),Yte=({closeText:n="Schließen",getPicturePlaceholder:e,getReactions:t,headerTitle:i="Reaktionen",open:r,postId:a,setOpen:s,userLink:l=!0})=>{const[o,u]=_.useState(null),[f,c]=_.useState("all"),[d,h]=_.useState(1),[m,w]=_.useState([]),k=!o||!!o.next_page,b=_.useCallback(async()=>{try{const B=Zte(a,d,f),x=await t(B);h(x.next_page||d),u(x),w(M=>[...M,...x.users])}catch(B){console.error("Error fetching reactions:",B)}},[a,d,f,t]);_.useEffect(()=>(r&&b(),()=>{w([])}),[r,f,b]);const S=(B,x)=>{typeof x=="string"&&(c(x),h(1),w([]))},y=()=>{s(),w([]),h(1),c("all")};if(!(o!=null&&o.live_data))return null;const F=o.live_data.counter.hood_message[a],E=p.jsx(P.CardHeader,{headline:i,type:Un()?"h4":"h3",leftElement:p.jsx(P.IconButton,{icon:"arrow_left",size:"medium",ariaLabelledBy:"back",onClick:y}),rightElement:p.jsx(P.IconButton,{ariaLabel:"close-sheet",onClick:y,icon:"cross_circle"}),className:Ct.cardHeader}),C=[];for(const[B,x]of Object.entries(F))$ne(B)&&x>0&&C.push({count:x,reaction:B});const R=Sv(C),D=[{count:0,reaction:"all"},...R],I=p.jsx(P.CardBody,{className:Ct.cardBody,children:p.jsxs(u2,{defaultValue:"all",onChange:S,children:[p.jsx(h2,{className:Ct.tabsList,children:D.map(({count:B,reaction:x})=>p.jsxs(m2,{value:x,"data-testid":`tab-${x}`,children:[p.jsxs("div",{className:Ct.tab,children:[x==="all"?p.jsx(P.Typography,{as:"span",type:"body-semibold",className:Ct.alle,children:"Alle"}):Cv(x),p.jsx("div",{className:Ct.selectedTab})]}),B>0&&p.jsx(P.Typography,{as:"span",type:"body-semibold",children:B})]},`${x}_${B}`))}),D.map(({reaction:B})=>p.jsx(f2,{value:B,className:Ct.tabPanel,id:"reactionTabPanel",children:p.jsx(Nte,{dataLength:m.length,next:b,hasMore:k,loader:p.jsx(P.Loader,{}),scrollableTarget:"reactionTabPanel",scrollThreshold:.7,children:m.map(x=>p.jsx("div",{className:Ct.profile,children:p.jsx(wv,{alt:"profile",link:x.hood_title,name:x.firstname,onClick:l?()=>window.open(`/profile/${x.id}`,"_self"):void 0,src:x.photo_medium_url||e(x)})},x.id))})},B))]})});return p.jsx(P.Sheet,{open:r,
|
|
890
|
+
as expected. Check README.md for usage'`)},e.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},e.prototype.componentDidUpdate=function(t){this.props.dataLength!==t.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},e.getDerivedStateFromProps=function(t,i){var r=t.dataLength!==i.prevDataLength;return r?qr(qr({},i),{prevDataLength:t.dataLength}):null},e.prototype.isElementAtTop=function(t,i){i===void 0&&(i=.8);var r=t===document.body||t===document.documentElement?window.screen.availHeight:t.clientHeight,a=Lh(i);return a.unit===Gi.Pixel?t.scrollTop<=a.value+r-t.scrollHeight+1:t.scrollTop<=a.value/100+r-t.scrollHeight+1},e.prototype.isElementAtBottom=function(t,i){i===void 0&&(i=.8);var r=t===document.body||t===document.documentElement?window.screen.availHeight:t.clientHeight,a=Lh(i);return a.unit===Gi.Pixel?t.scrollTop+r>=t.scrollHeight-a.value:t.scrollTop+r>=a.value/100*t.scrollHeight},e.prototype.render=function(){var t=this,i=qr({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),r=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),a=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return _.createElement("div",{style:a,className:"infinite-scroll-component__outerdiv"},_.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(s){return t._infScroll=s},style:i},this.props.pullDownToRefresh&&_.createElement("div",{style:{position:"relative"},ref:function(s){return t._pullDown=s}},_.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!r&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},e}(_.Component);const Hte="_cardHeader_1e3dg_141",Vte="_cardBody_1e3dg_152",Gte="_tabsList_1e3dg_161",Wte="_tab_1e3dg_161",qte="_selectedTab_1e3dg_199",Ute="_tabPanel_1e3dg_208",Kte="_profile_1e3dg_220",Ct={cardHeader:Hte,cardBody:Vte,tabsList:Gte,tab:Wte,selectedTab:qte,tabPanel:Ute,profile:Kte},Zte=(n,e,t)=>({id:n,object_type:"hood_message",page:e,reaction_type:t==="all"?void 0:t}),Yte=({closeText:n="Schließen",getPicturePlaceholder:e,getReactions:t,headerTitle:i="Reaktionen",open:r,postId:a,setOpen:s,userLink:l=!0})=>{const[o,u]=_.useState(null),[f,c]=_.useState("all"),[d,h]=_.useState(1),[m,w]=_.useState([]),k=!o||!!o.next_page,b=_.useCallback(async()=>{try{const B=Zte(a,d,f),x=await t(B);h(x.next_page||d),u(x),w(M=>[...M,...x.users])}catch(B){console.error("Error fetching reactions:",B)}},[a,d,f,t]);_.useEffect(()=>(r&&b(),()=>{w([])}),[r,f,b]);const S=(B,x)=>{typeof x=="string"&&(c(x),h(1),w([]))},y=()=>{s(),w([]),h(1),c("all")};if(!(o!=null&&o.live_data))return null;const F=o.live_data.counter.hood_message[a],E=p.jsx(P.CardHeader,{headline:i,type:Un()?"h4":"h3",leftElement:p.jsx(P.IconButton,{icon:"arrow_left",size:"medium",ariaLabelledBy:"back",onClick:y}),rightElement:p.jsx(P.IconButton,{ariaLabel:"close-sheet",onClick:y,icon:"cross_circle"}),className:Ct.cardHeader}),C=[];for(const[B,x]of Object.entries(F))$ne(B)&&x>0&&C.push({count:x,reaction:B});const R=Sv(C),D=[{count:0,reaction:"all"},...R],I=p.jsx(P.CardBody,{className:Ct.cardBody,children:p.jsxs(u2,{defaultValue:"all",onChange:S,children:[p.jsx(h2,{className:Ct.tabsList,children:D.map(({count:B,reaction:x})=>p.jsxs(m2,{value:x,"data-testid":`tab-${x}`,children:[p.jsxs("div",{className:Ct.tab,children:[x==="all"?p.jsx(P.Typography,{as:"span",type:"body-semibold",className:Ct.alle,children:"Alle"}):Cv(x),p.jsx("div",{className:Ct.selectedTab})]}),B>0&&p.jsx(P.Typography,{as:"span",type:"body-semibold",children:B})]},`${x}_${B}`))}),D.map(({reaction:B})=>p.jsx(f2,{value:B,className:Ct.tabPanel,id:"reactionTabPanel",children:p.jsx(Nte,{dataLength:m.length,next:b,hasMore:k,loader:p.jsx(P.Loader,{}),scrollableTarget:"reactionTabPanel",scrollThreshold:.7,children:m.map(x=>p.jsx("div",{className:Ct.profile,children:p.jsx(wv,{alt:"profile",link:x.hood_title,name:x.firstname,onClick:l?()=>window.open(`/profile/${x.id}`,"_self"):void 0,src:x.photo_medium_url||e(x)})},x.id))})},B))]})});return p.jsx(P.Sheet,{open:r,onDismiss:y,content:I,header:E,cancelButtonText:n})},Xte="_root_117wk_141",Qte="_root__title_117wk_150",Jte="_root__moreMenu_117wk_153",eie="_root__subtitle_117wk_158",nie="_root__helpersCluster_117wk_162",tie="_root__heartBubbleContainer_117wk_165",iie="_messageContainer_117wk_180",rie="_messageContainer__message_117wk_193",aie="_messageContainer__author_117wk_197",sie="_messageContainer__quotationLeft_117wk_200",oie="_messageContainer__quotationRight_117wk_205",Rn={root:Xte,root__title:Qte,root__moreMenu:Jte,root__subtitle:eie,root__helpersCluster:nie,root__heartBubbleContainer:tie,messageContainer:iie,messageContainer__message:rie,messageContainer__author:aie,messageContainer__quotationLeft:sie,messageContainer__quotationRight:oie},lie=6,uie=n=>({0:"Danke für eure Hilfe!",1:"Hilfe von nebenan!",2:"Danke für eure Hilfsbereitschaft!",3:"Eure Hilfsbereitschaft zählt!",4:"Hilfe gefunden!",5:"Wir helfen einander!"})[n],fie=()=>"Schreibe einen kurzen Text, um deinen Nachbarn für ihre Hilfsbereitschaft zu danken.",die=({authorFirstName:n,editMenuItems:e,helperUsers:t,message:i,onAvatarClick:r,onMoreClick:a,parentId:s})=>{const l=s%lie,o=uie(l),[u,f]=_.useState(null),c=!!u,d=h=>{f(u?null:h.currentTarget)};return p.jsx(P.Card,{withoutPadding:!0,borderRadius:!0,className:Rn.root,children:p.jsxs(P.CardBody,{withoutPadding:!0,children:[p.jsx("div",{className:Rn.root__heartBubbleContainer,children:p.jsx(P.Icon,{size:"32",name:"bubble_heart_coloured"})}),p.jsx("div",{className:Rn.root__moreMenu,children:e&&e.length&&p.jsxs(p.Fragment,{children:[p.jsx(P.IconButton,{icon:"more_dots",ariaLabel:"edit-thank-you",onClick:d}),p.jsx(P.Popup,{open:c,anchor:u,handleClickAway:()=>f(null),placement:"bottom-end",offset:{crossAxis:0,mainAxis:-32},children:p.jsx(P.DropdownCard,{onClose:()=>f(null),items:e,hasHeader:!0,headerProps:{text:"Scließen"}})})]})}),p.jsx(P.Typography,{type:"h3",className:Rn.root__title,children:o}),p.jsxs(P.Typography,{type:"detail-medium",className:Rn.root__subtitle,children:[n," hat Hilfe erhalten von:"]}),p.jsx("div",{className:Rn.root__helpersCluster,children:p.jsx(P.UserAvatarCluster,{users:t,size:"medium",onAvatarClick:r,onMoreClick:a})}),p.jsxs("div",{className:Rn.messageContainer,children:[p.jsx(P.Typography,{type:"detail-medium",className:Rn.messageContainer__message,children:i||fie()}),p.jsx(P.Typography,{type:"detail-bold",className:Rn.messageContainer__author,children:n}),p.jsx("div",{className:Rn.messageContainer__quotationLeft,children:p.jsx(P.Icon,{size:"32",name:"quotation_left_filled"})}),p.jsx("div",{className:Rn.messageContainer__quotationRight,children:p.jsx(P.Icon,{size:"32",name:"quotation_right_filled"})})]})]})})};exports.AccordionMenu=Iv;exports.AuthenticationForm=x4;exports.ChristmasGarland=E4;exports.ComparisonTable=V4;exports.ComplaintModal=X2;exports.ConfirmDialog=Q_;exports.ContentCreatorTrigger=ny;exports.DesktopLayout=oy;exports.DesktopNavbarSearchField=ly;exports.DesktopNavigationBar=gy;exports.DynamicForm=Gh;exports.EmojiPicker=v8;exports.EmojiSearch=b8;exports.FeedRouterProvider=$I;exports.Form=rf;exports.FormCheckboxInput=s4;exports.FormInputFieldSpecial=o4;exports.FormRadioButton=l4;exports.FormRadioButtonCluster=u4;exports.FormTextAreaInput=f4;exports.FormTextInput=xs;exports.FormToggleInput=d4;exports.Gallery=yj;exports.Grid=Vh;exports.GridFeed=nj;exports.GridFeedAggregator=Tp;exports.GridItem=Hh;exports.HtmlContent=Ej;exports.ImageAttachment=Fp;exports.ImageCropper=EN;exports.ImageGalleryTrigger=PN;exports.LayoutLoadingSpinner=Kp;exports.LinkAttachment=$h;exports.MainLayout=SH;exports.MarkdownRichText=ree;exports.MarketplaceAggregatorCard=em;exports.MarketplaceDetailPage=tM;exports.MarketplaceItemCardless=Jf;exports.MarketplaceMoreOptions=tm;exports.MenuLinkList=oee;exports.MobileHeaderBar=cee;exports.MobileLayout=Yp;exports.ModalGallery=Pp;exports.NPEAggregator=ene;exports.PointOfInterest=hne;exports.PostAuthor=im;exports.PostInfo=nm;exports.Profile=wv;exports.ProfileControls=Cne;exports.Quote=Lne;exports.ReactionPill=Ev;exports.ReactionSelection=Dte;exports.ReactionStack=Mv;exports.ReactionTabList=Yte;exports.ResponsiveModal=uo;exports.ThankYouCard=die;exports.Wizard=g4;
|
package/index.mjs
CHANGED
|
@@ -69437,10 +69437,10 @@ const Oie = "_cardHeader_1e3dg_141", Iie = "_cardBody_1e3dg_152", Nie = "_tabsLi
|
|
|
69437
69437
|
S6,
|
|
69438
69438
|
{
|
|
69439
69439
|
open: r,
|
|
69440
|
-
|
|
69441
|
-
|
|
69442
|
-
|
|
69443
|
-
|
|
69440
|
+
onDismiss: _,
|
|
69441
|
+
content: O,
|
|
69442
|
+
header: C,
|
|
69443
|
+
cancelButtonText: n
|
|
69444
69444
|
}
|
|
69445
69445
|
);
|
|
69446
69446
|
}, qie = "_root_117wk_141", Uie = "_root__title_117wk_150", Kie = "_root__moreMenu_117wk_153", Zie = "_root__subtitle_117wk_158", Yie = "_root__helpersCluster_117wk_162", Xie = "_root__heartBubbleContainer_117wk_165", Qie = "_messageContainer_117wk_180", Jie = "_messageContainer__message_117wk_193", ere = "_messageContainer__author_117wk_197", nre = "_messageContainer__quotationLeft_117wk_200", tre = "_messageContainer__quotationRight_117wk_205", Nn = {
|