groundfloor-react-ui 1.2.83 → 1.2.85
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 +3 -3
- package/dist/index.js +76 -76
- package/package.json +1 -1
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
|
|
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) {
|
|
@@ -2922,7 +2922,7 @@ svg {
|
|
|
2922
2922
|
${({customModalFooterStyle:e})=>e}
|
|
2923
2923
|
`,ai=m.div`
|
|
2924
2924
|
cursor: pointer;
|
|
2925
|
-
`;try{V.setAppElement("#root")}catch(e){V.setAppElement("#__next")}const ni=({modalIsOpen:e,toggleModal:l,closeOnOutsideClick:o,headerContent:r,bodyContent:i,footerContent:a,customModalHeaderStyle:n,customModalBodyStyle:c,customModalFooterStyle:s,customWidth:d,customMinWidth:p,customMaxWidth:m,contentStyle:b,contentWrapperStyle:g,customZIndex:f,hideCrossIcon:h,...y})=>{const x={overlay:{zIndex:f,backgroundColor:"rgb(51 51 51 / 30%)"},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",borderRadius:"8px",padding:"0px",minWidth:p,overflow:"hidden",border:`1px solid ${(u()||H).border}`,boxShadow:"0px 15px 40px 11px rgba(26, 36, 107, 0.132867)",width:d&&d,maxWidth:m&&m,...b}};return t.createElement("div",null,t.createElement(V,z({closeTimeoutMS:500,isOpen:e,onRequestClose:o?l:void 0,style:x,contentLabel:"Modal"},y),r&&t.createElement(li,{style:n},
|
|
2925
|
+
`;try{V.setAppElement("#root")}catch(e){V.setAppElement("#__next")}const ni=({modalIsOpen:e,toggleModal:l,closeOnOutsideClick:o,headerContent:r,bodyContent:i,footerContent:a,customModalHeaderStyle:n,customModalBodyStyle:c,customModalFooterStyle:s,customWidth:d,customMinWidth:p,customMaxWidth:m,contentStyle:b,contentWrapperStyle:g,customZIndex:f,hideCrossIcon:h,...y})=>{const x={overlay:{zIndex:f,backgroundColor:"rgb(51 51 51 / 30%)"},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",borderRadius:"8px",padding:"0px",minWidth:p,overflow:"hidden",border:`1px solid ${(u()||H).border}`,boxShadow:"0px 15px 40px 11px rgba(26, 36, 107, 0.132867)",width:d&&d,maxWidth:m&&m,...b}};return t.createElement("div",null,t.createElement(V,z({closeTimeoutMS:500,isOpen:e,onRequestClose:o?l:void 0,style:x,contentLabel:"Modal"},y),r&&t.createElement(li,{style:n},r,!h&&t.createElement(ai,{onClick:l},t.createElement($,{icon:"close-icon",size:18}))),!r&&!h&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginRight:"24px",paddingTop:"24px"}},t.createElement("div",null),t.createElement(ai,{onClick:l},t.createElement($,{icon:"close-icon",size:18}))),t.createElement(ri,{contentWrapperStyle:g},t.createElement(oi,{inBuiltCss:T,style:c},i),a&&t.createElement(ii,{inBuiltCss:T,style:s},a))),t.createElement(ti,null))};ni.propTypes={modalIsOpen:e.bool,toggleModal:e.func,closeOnOutsideClick:e.bool,headerContent:e.any,hideCrossIcon:e.bool,bodyContent:e.any,footerContent:e.any,customModalHeaderStyle:e.object,customModalBodyStyle:e.object,customModalFooterStyle:e.object,customMinWidth:e.string,contentStyle:e.object,contentWrapperStyle:e.object,customZIndex:e.number},ni.defaultProps={modalIsOpen:!1,toggleModal:()=>{},closeOnOutsideClick:!1,headerContent:"",bodyContent:"",footerContent:"",customModalHeaderStyle:{},customModalBodyStyle:{},customModalFooterStyle:{},customMinWidth:"40vw",customWidth:"",customMaxWidth:"",contentStyle:{},contentWrapperStyle:{},customZIndex:9999999,hideCrossIcon:!1};const ci=m.div`
|
|
2926
2926
|
${({theme:e,type:t,customStyles:l})=>{if(e){let o={};if(e[t]){for(const t in e.common)o[t]=e.common[t];for(const l in e[t])o[l]=e[t][l],delete e.common[l]}return{...o,...l}}}}
|
|
2927
2927
|
}
|
|
2928
2928
|
`,si=({theme:e,toggleSimple:l,contentTrigger:o,contentOverlay:r,popperOptionsP:i,settingsP:a,customStyles:n,...c})=>{let s={},d={};l?(s={...s,modifiers:[{name:"offset",options:{offset:[0,5]}}],strategy:"absolute"},d={...d}):(s={...s,modifiers:[{name:"offset",options:{offset:[0,5]}}],strategy:"absolute"},d={...d,trigger:"click",closeOnOutsideClick:!0,interactive:!0}),s={...s,...i},d={...d,...a};const{getArrowProps:p,getTooltipProps:m,setTooltipRef:u,setTriggerRef:b,visible:g}=y({...d},s);return t.createElement(t.Fragment,null,t.createElement("div",{ref:b,style:{width:"fit-content",height:"fit-content"}},o),g&&t.createElement(ci,z({type:l?"simple-overlay":"overlay",theme:e,ref:u},m({className:"tooltip-container"}),{customStyles:n}),r))};si.propTypes={theme:e.object,contentTrigger:e.any,contentOverlay:e.any,popperOptionsP:e.object,settingsP:e.object,customStyles:e.object,toggleSimple:e.bool},si.defaultProps={theme:T,contentTrigger:t.createElement("div",null,"Trigger"),contentOverlay:t.createElement("div",null,"I am the Overlay")};const di=m.div`
|
|
@@ -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;
|
|
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;
|