groundfloor-react-ui 1.2.84 → 1.2.86

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.es.js CHANGED
@@ -2009,7 +2009,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
2009
2009
  `,ho=m.div`
2010
2010
  width: 100%;
2011
2011
  margin-left: 16px;
2012
- `,yo=({commentsArray:e,customStyles:l,myInfoAvatarProps:o,loading:i,viewOnly:a,textInputProps:n,saveBtnProps:c,cancelBtnProps:s,loadMore:d,avatarProps:p,message:m})=>{const b=u()||H,[g,f]=r(!1),[h,y]=r(e||[]),x=async e=>{let t;t="post"===e?await c.callback():await d.callback(),y((e=>[...e,...t]))};return console.log(n),t.createElement(so,{commentWrapperStyle:l?.commentWrapperStyle,theme:b},h.map(((e,o)=>{const{name:r,date:i,comment:a,image:n}=e;return t.createElement(po,{key:o,commentBodyStyle:l?.commentBodyStyle,theme:b},t.createElement(mo,{commentHeadStyle:l?.commentHeadStyle},t.createElement(be,z({user:{fullName:r,userName:r,url:n},toggleName:!0,size:"LG",customStylesName:{color:b.additional["text-color"]}},p)),t.createElement(uo,{dateTimeStyle:l?.dateTimeStyle,theme:b},i)),t.createElement(bo,{commentDivStyle:l?.commentDivStyle},a))})),!i&&0===h.length&&m,i&&t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"24px"}},t.createElement(Le,{size:25})),!i&&d.showLoadMore&&t.createElement("div",{className:"load-more"},t.createElement(Re,{onClick:()=>x("load")},"Load more")),!a&&t.createElement(go,{theme:b,inputWrapperStyle:l?.inputWrapperStyle},t.createElement(be,z({toggleName:!1,customStylesImage:{height:"36px",width:"36px"},customStylesContainer:{marginTop:"7px"}},o)),t.createElement(ho,null,t.createElement(Hl,z({inputStyle:{height:"23px"},isValid:!0,onFocus:e=>f(!0)},n,{onChange:e=>{n.setInputValue(e.target.value)}})),g&&t.createElement(fo,null,t.createElement(Te,z({onClick:e=>{x("post"),n.setInputValue(e.target.value)}},c),c.text),t.createElement(Re,z({disabled:!(!s?.isLoading&&!c?.isLoading),onClick:()=>{f(!1),n.setInputValue(""),n.setValidValue(!0)},btnStyle:{color:b.variant["neutral-1"]}},s),s.text)))))};yo.propTypes={commentsArray:e.array,customStyles:e.object,myInfoAvatarProps:e.bool,viewOnly:e.bool,textInputProps:e.object,saveBtnProps:e.object,cancelBtnProps:e.object,loadMore:e.object,avatarProps:e.object,message:e.element},yo.defaultProps={commentsArray:[],customStyles:{commentBodyStyle:{},commentWrapperStyle:{},commentHeadStyle:{},dateTimeStyle:{},commentDivStyle:{},inputWrapperStyle:{}},myInfoAvatarProps:{},loading:!1,viewOnly:!1,textInputProps:{},saveBtnProps:{size:"sm",text:"Save"},cancelBtnProps:{size:"sm",text:"Cancel"},loadMore:{showLoadMore:!1,callback:()=>{}},avatarProps:{},message:t.createElement("span",{style:{textAlign:"center",display:"block",marginBottom:"16px"}},"No comments yet")};const xo=m.div`
2012
+ `,yo=({commentsArray:e,customStyles:l,myInfoAvatarProps:o,loading:i,viewOnly:a,textInputProps:n,saveBtnProps:c,cancelBtnProps:s,loadMore:d,avatarProps:p,message:m})=>{const b=u()||H,[g,f]=r(!1),[h,y]=r(e||[]),x=async e=>{let t;t="post"===e?await c.callback():await d.callback(),y((e=>[...e,...t]))};return t.createElement(so,{commentWrapperStyle:l?.commentWrapperStyle,theme:b},h.map(((e,o)=>{const{name:r,date:i,comment:a,image:n}=e;return t.createElement(po,{key:o,commentBodyStyle:l?.commentBodyStyle,theme:b},t.createElement(mo,{commentHeadStyle:l?.commentHeadStyle},t.createElement(be,z({user:{fullName:r,userName:r,url:n},toggleName:!0,size:"LG",customStylesName:{color:b.additional["text-color"]}},p)),t.createElement(uo,{dateTimeStyle:l?.dateTimeStyle,theme:b},i)),t.createElement(bo,{commentDivStyle:l?.commentDivStyle},a))})),!i&&0===h.length&&m,i&&t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"24px"}},t.createElement(Le,{size:25})),!i&&d.showLoadMore&&t.createElement("div",{className:"load-more"},t.createElement(Re,{onClick:()=>x("load")},"Load more")),!a&&t.createElement(go,{theme:b,inputWrapperStyle:l?.inputWrapperStyle},t.createElement(be,z({toggleName:!1,customStylesImage:{height:"36px",width:"36px"},customStylesContainer:{marginTop:"7px"}},o)),t.createElement(ho,null,t.createElement(Hl,z({inputStyle:{height:"23px"},isValid:!0,onFocus:e=>f(!0)},n,{onChange:e=>{n.setInputValue(e.target.value)}})),g&&t.createElement(fo,null,t.createElement(Te,z({onClick:e=>{x("post"),n.setInputValue(e.target.value)}},c),c.text),t.createElement(Re,z({disabled:!(!s?.isLoading&&!c?.isLoading),onClick:()=>{f(!1),n.setInputValue(""),n.setValidValue({isValid:!0,errMsg:""})},btnStyle:{color:b.variant["neutral-1"]}},s),s.text)))))};yo.propTypes={commentsArray:e.array,customStyles:e.object,myInfoAvatarProps:e.object,viewOnly:e.bool,textInputProps:e.object,saveBtnProps:e.object,cancelBtnProps:e.object,loadMore:e.object,avatarProps:e.object,message:e.element},yo.defaultProps={commentsArray:[],customStyles:{commentBodyStyle:{},commentWrapperStyle:{},commentHeadStyle:{},dateTimeStyle:{},commentDivStyle:{},inputWrapperStyle:{}},myInfoAvatarProps:{},loading:!1,viewOnly:!1,textInputProps:{},saveBtnProps:{size:"sm",text:"Save"},cancelBtnProps:{size:"sm",text:"Cancel"},loadMore:{showLoadMore:!1,callback:()=>{}},avatarProps:{},message:t.createElement("span",{style:{textAlign:"center",display:"block",marginBottom:"16px"}},"No comments yet")};const xo=m.div`
2013
2013
  //Set the styles from the default styles object
2014
2014
  ${({theme:e,type:t})=>j(e,t)}
2015
2015
  @media (max-width: 980px) {
@@ -3119,7 +3119,7 @@ ${({theme:e,type:t,customStyles:l})=>{if(e){let o={};if(e[t]){for(const t in e.c
3119
3119
  p {
3120
3120
  margin: 0;
3121
3121
  }
3122
- `,Pi=({headerContent:e,bodyContent:l,toggleSideBarOpen:o,headerStyles:a,selectedStyle:n,notSelectedStyle:c,customStylesNameHover:s,listElementStyle:d,customSelectCardColor:p,selectedAppPath:m,setSelectedAppPath:b,setSelectedAppPageId:g,setParentId:f,setRouterObject:h,notificationCircleStyles:y})=>{const x=u()||H,[v,C]=r(null),[A,w]=r(!1),[S,k]=r([]);i((()=>{k(m.split("/"));let e=m.split("/"),t=l&&l.find((t=>e[1]===t.path.split("/")[1]));E(t),f(t?.id||null)}),[m]),i((()=>{!o&&w(!1),!o&&C(null)}),[o]);const E=e=>{if(e?.routes&&e?.routes.length>0)e.routes.forEach((e=>E(e)));else if(e?.path===m)return g(e?.id||null),h(e||null),null},V=(e,l,o)=>{let r=e?.path.split("/"),i=r.length;return e.routes&&e.routes.length>0?t.createElement(te,{key:e?.id+l,showIcon:e.routes.filter((e=>!0===e.visibleAsMenu)).length>0,contentToggle:t.createElement("div",{style:{display:"flex",justifyContent:"start",alignItems:"center",marginLeft:`${o}px`}},t.createElement("span",{style:{visibility:3===i&&S[2]===r[2]?"visible":"hidden",marginRight:"16px",width:"7px",height:"7px",borderRadius:"50%",backgroundColor:x.additional.white,flexShrink:0}}),t.createElement("span",{style:{fontWeight:3===i&&S[2]===r[2]?"bold":"normal"}}," ",e?.link)),isAccordionOpen:m.includes(e.path),setContentIsOpen:()=>{},toggleIconAnimation:!0,content:t.createElement("div",null,e.routes.filter((e=>!0===e.visibleAsMenu)).map(((e,t)=>V(e,t,o+8)))),customStylesAccordionContainer:Ai,customStylesAccordionToggle:wi,customStylesAccordionContent:Si,showIconInfo:!1,customWrapperStyles:ki}):t.createElement(Ri,{listElementStyle:d,key:e?.id+l,onClick:()=>{b(e.path)},theme:x},t.createElement("span",{className:"selected-disk",style:{visibility:i<=3&&S[S.length-1]?.toLowerCase()===r[i-1]?.toLowerCase()?"visible":"hidden",marginRight:"16px"}}),t.createElement("span",{className:"link",style:{marginLeft:o-8+"px",padding:"4px 8px",borderRadius:"4px",backgroundColor:i>3&&m===e?.path?d?.selectedChildBG||x.additional.white:"transparent",fontWeight:i<=3&&S[S.length-1]?.toLowerCase()===r[i-1]?.toLowerCase()?"bold":"normal",color:x.variant.white}}," ",e?.link))};return t.createElement(Li,{onClick:()=>w(!0),onMouseEnter:()=>w(!0),onMouseLeave:()=>{C(null),w(!1)},toggleSideBarOpen:o},t.createElement(Ii,{theme:x,headerStyles:a,toggleSideBarOpen:o},e),t.createElement(Wi,{toggleSideBarOpen:o},l&&l?.filter((e=>!0===e.visibleAsMenu))?.map(((e,l,r)=>(r.length,t.createElement("div",{className:"service-layer",key:e?.value+l,onClick:()=>{C(l)},style:{backgroundColor:e?.value?.toLowerCase()===S[1]?.toLowerCase()?p:"transparent"}},t.createElement(te,{index:l,isAccordionOpen:l===v||A&&e?.value?.toLowerCase()===S[1]?.toLowerCase(),isSelected:e?.value?.toLowerCase()===S[1]?.toLowerCase(),customSelectCardColor:p,customStylesAccordionContainer:{...Ei,padding:"0px 0px 0px 0px"},customStylesAccordionToggle:Vi,customStylesAccordionContent:Mi,contentToggle:t.createElement(xe,{selectedStyle:{minWidth:"36px",minHeight:"36px",...n},notSelectedStyle:{minWidth:"36px",minHeight:"36px",...c},toggleName:o,customStylesName:zi,customStylesNameHover:s,size:"MD",user:{userName:e?.label,url:e?.logo,fullName:e?.label},notificationCircleStyles:y,icon:e?.icon?e?.icon:e?.maintenance?t.createElement($,{icon:"maintenance",size:22,color:"white"}):null,isSelected:e?.value?.toLowerCase()===S[1]?.toLowerCase(),notificationCount:e?.notificationCount}),content:t.createElement("div",{style:Bi},e.routes&&e?.routes.length>0&&e?.routes.filter((e=>!0===e.visibleAsMenu)).map(((e,t)=>V(e,t,0))))})))))))},Hi=m.div`
3122
+ `,Pi=({headerContent:e,bodyContent:l,toggleSideBarOpen:o,headerStyles:a,selectedStyle:n,notSelectedStyle:c,customStylesNameHover:s,listElementStyle:d,customSelectCardColor:p,selectedAppPath:m,setSelectedAppPath:b,setSelectedAppPageId:g,setParentId:f,setRouterObject:h,notificationCircleStyles:y})=>{const x=u()||H,[v,C]=r(null),[A,w]=r(!1),[S,k]=r([]);i((()=>{k(m.split("/"));let e=m.split("/"),t=l&&l.find((t=>e[1]===t.path.split("/")[1]));E(t),f(t?.id||null)}),[m]),i((()=>{!o&&w(!1),!o&&C(null)}),[o]);const E=e=>{if(e?.routes&&e?.routes.length>0)e.routes.forEach((e=>E(e)));else if(e?.path===m)return g(e?.id||null),h(e||null),null},V=(e,l,o)=>{let r=e?.path.split("/"),i=r.length;if(e.routes&&e.routes.length>0){let a=e.routes.filter((e=>!0===e.visibleAsMenu)).length>0;return t.createElement(te,{key:e?.id+l,showIcon:!!a,contentToggle:t.createElement("div",{style:{display:"flex",justifyContent:"start",alignItems:"center",marginLeft:`${o}px`},onClick:()=>{!a&&b(e.path)}},t.createElement("span",{style:{visibility:3===i&&S[2]===r[2]?"visible":"hidden",marginRight:"16px",width:"7px",height:"7px",borderRadius:"50%",backgroundColor:x.additional.white,flexShrink:0}}),t.createElement("span",{style:{fontWeight:3===i&&S[2]===r[2]?"bold":"normal"}}," ",e?.link)),isAccordionOpen:m.includes(e.path),setContentIsOpen:()=>{},toggleIconAnimation:!0,content:t.createElement("div",null,e.routes.filter((e=>!0===e.visibleAsMenu)).map(((e,t)=>V(e,t,o+8)))),customStylesAccordionContainer:Ai,customStylesAccordionToggle:wi,customStylesAccordionContent:Si,showIconInfo:!1,customWrapperStyles:ki})}return t.createElement(Ri,{listElementStyle:d,key:e?.id+l,onClick:()=>{b(e.path)},theme:x},t.createElement("span",{className:"selected-disk",style:{visibility:i<=3&&S[S.length-1]?.toLowerCase()===r[i-1]?.toLowerCase()?"visible":"hidden",marginRight:"16px"}}),t.createElement("span",{className:"link",style:{marginLeft:o-8+"px",padding:"4px 8px",borderRadius:"4px",backgroundColor:i>3&&m===e?.path?d?.selectedChildBG||x.additional.white:"transparent",fontWeight:i<=3&&S[S.length-1]?.toLowerCase()===r[i-1]?.toLowerCase()?"bold":"normal",color:x.variant.white}}," ",e?.link))};return t.createElement(Li,{onClick:()=>w(!0),onMouseEnter:()=>w(!0),onMouseLeave:()=>{C(null),w(!1)},toggleSideBarOpen:o},t.createElement(Ii,{theme:x,headerStyles:a,toggleSideBarOpen:o},e),t.createElement(Wi,{toggleSideBarOpen:o},l&&l?.filter((e=>!0===e.visibleAsMenu))?.map(((e,l,r)=>(r.length,t.createElement("div",{className:"service-layer",key:e?.value+l,onClick:()=>{C(l)},style:{backgroundColor:e?.value?.toLowerCase()===S[1]?.toLowerCase()?p:"transparent"}},t.createElement(te,{index:l,isAccordionOpen:l===v||A&&e?.value?.toLowerCase()===S[1]?.toLowerCase(),isSelected:e?.value?.toLowerCase()===S[1]?.toLowerCase(),customSelectCardColor:p,customStylesAccordionContainer:{...Ei,padding:"0px 0px 0px 0px"},customStylesAccordionToggle:Vi,customStylesAccordionContent:Mi,contentToggle:t.createElement(xe,{selectedStyle:{minWidth:"36px",minHeight:"36px",...n},notSelectedStyle:{minWidth:"36px",minHeight:"36px",...c},toggleName:o,customStylesName:zi,customStylesNameHover:s,size:"MD",user:{userName:e?.label,url:e?.logo,fullName:e?.label},notificationCircleStyles:y,icon:e?.icon?e?.icon:e?.maintenance?t.createElement($,{icon:"maintenance",size:22,color:"white"}):null,isSelected:e?.value?.toLowerCase()===S[1]?.toLowerCase(),notificationCount:e?.notificationCount}),content:t.createElement("div",{style:Bi},e.routes&&e?.routes.length>0&&e?.routes.filter((e=>!0===e.visibleAsMenu)).map(((e,t)=>V(e,t,0))))})))))))},Hi=m.div`
3123
3123
  background-color: ${({theme:e})=>e.variant["primary-1"]} !important;
3124
3124
  color: ${({theme:e})=>e.additional.white};
3125
3125
  overflow-y: hidden;