groundfloor-react-ui 1.2.73 → 1.2.74

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
@@ -261,7 +261,7 @@ ${({inBuiltCss:e,type:t,customStyles:l})=>{if(e){let o={};if(e[t]){for(const t i
261
261
  color:${({theme:e})=>e.textColor};
262
262
 
263
263
  ${({inBuiltCss:e,type:t,size:l,customStyles:o})=>{if(e){let r={};if(e[t]){for(const t in e.common)r[t]=e.common[t];for(const l in e[t])delete e.common[l],r[l]=e[t][l];for(const o in e[`${t}${l}`])r[o]=e[`${t}${l}`][o],delete e.common[o]}return{...r,...o}}}}
264
- `,ge=({customStylesContainer:e,customStylesImage:l,customStylesCircle:o,customStylesName:r,size:i,toggleName:n,user:a,...c})=>{const s=u()||H;return t.createElement(me,M({inBuiltCss:T,theme:s,customStyles:e,type:"avatarContainer"},c),a?.url&&t.createElement(pe,M({},c,{customStyles:l,type:"imageAvatar",size:i,alt:"user-picture",src:a.url})),t.createElement(ue,M({},c,{theme:s,inBuiltCss:T,type:"avatarCircle",customStyles:o,size:i}),a?.userName&&a?.userName.split(" ").length>=2?a?.userName.split(" ")[0].charAt(0).toUpperCase()+a?.userName.split(" ")[1].charAt(0).toUpperCase():a?.userName&&1===a?.userName.split(" ").length&&a?.userName.split(" ")[0].charAt(0).toUpperCase()),n&&t.createElement(be,M({inBuiltCss:T},c,{theme:s,type:"avatarName",customStyles:r,size:i}),a.userName," "))};ge.propTypes={customStylesCircle:e.object,customStylesName:e.object,customStylesContainer:e.object,customStylesImage:e.object,toggleName:e.bool,size:e.oneOf(["SM","MD","LG"]),user:e.object},ge.defaultProps={block:!1,size:"MD",toggleName:!1,user:null,customStylesContainer:null,customStylesImage:null,customStylesCircle:null,customStylesName:null};const fe=m.span`
264
+ `,ge=({customStylesContainer:e,customStylesImage:l,customStylesCircle:o,customStylesName:r,size:i,toggleName:n,user:a,...c})=>{const s=u()||H;return console.log("user",a),t.createElement(me,M({inBuiltCss:T,theme:s,customStyles:e,type:"avatarContainer"},c),a?.url&&t.createElement(pe,M({},c,{customStyles:l,type:"imageAvatar",size:i,alt:"user-picture",src:a.url})),t.createElement(ue,M({},c,{theme:s,inBuiltCss:T,type:"avatarCircle",customStyles:o,size:i,style:{visibility:void 0===a?.url?"visible":"hidden"}}),a?.userName&&a?.userName.split(" ").length>=2?a?.userName.split(" ")[0].charAt(0).toUpperCase()+a?.userName.split(" ")[1].charAt(0).toUpperCase():a?.userName&&1===a?.userName.split(" ").length&&a?.userName.split(" ")[0].charAt(0).toUpperCase()),n&&t.createElement(be,M({inBuiltCss:T},c,{theme:s,type:"avatarName",customStyles:r,size:i}),a.userName," "))};ge.propTypes={customStylesCircle:e.object,customStylesName:e.object,customStylesContainer:e.object,customStylesImage:e.object,toggleName:e.bool,size:e.oneOf(["SM","MD","LG"]),user:e.object},ge.defaultProps={block:!1,size:"MD",toggleName:!1,user:null,customStylesContainer:null,customStylesImage:null,customStylesCircle:null,customStylesName:null};const fe=m.span`
265
265
  ${({inBuiltCss: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}}}}
266
266
  width: auto;
267
267
  `,he=m.div`
@@ -1231,7 +1231,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1231
1231
  outline: none;
1232
1232
 
1233
1233
  .input-icon svg path {
1234
- fill: ${({theme:e,disabled:t})=>!t&&e.variant["primary-1"]};
1234
+ fill: ${({theme:e,disabled:t})=>!t&&e.variant["neutral-3"]};
1235
1235
  }
1236
1236
  }
1237
1237
  }
@@ -1308,6 +1308,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1308
1308
 
1309
1309
  // custom styles
1310
1310
  ${({customIconContainerStyle:e})=>e};
1311
+
1311
1312
  `,jt=b`
1312
1313
  display: flex;
1313
1314
  gap: 7px;
@@ -1320,7 +1321,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1320
1321
  margin-top: 5px;
1321
1322
  font-size: 10px;
1322
1323
  }
1323
- `,qt=({defaultValue:e,onChange:l,inputType:o,onClick:i,placeHolder:n,value:a,disabled:c,startYear:s,endYearRange:d,iconProps:p,customHeaderStyle:m,timeBtnStyle:b,wrapperStyle:g,customIconContainerStyle:f,label:h,labelInline:y,labelStyle:x,required:A,errMsg:w,errMsgColor:S,isValid:E,...k})=>{const[V,z]=r(e);let B=V?new Date(V):null;for(var I=[],L=d||10,W=s||(new Date).getFullYear();W<=(new Date).getFullYear()+L;W++)I.push(W);let R={};switch(o){case"date":default:R.dateFormat="dd MMM, yyyy";break;case"month":R.dateFormat="MMMM yyyy",R.showMonthYearPicker=!0;break;case"year":R.dateFormat="yyyy",R.showYearPicker=!0;break;case"datetime-local":R.dateFormat="dd MMM yyyy, hh:mm a",R.showTimeSelect=!0,R.timeFormat="hh:mm a",R.timeIntervals=15,R.timeCaption="Time";break;case"time":R.showTimeSelect=!0,R.showTimeSelectOnly=!0,R.dateFormat="hh:mm a"}const P=u()||H,T={icon:"calender",color:"black",size:"16",...p};return t.createElement(Ft,M({labelInline:y,errMsgColor:S,theme:P},k),t.createElement("div",{style:{display:"flex"}},t.createElement(ct,M({customStyles:x,type:"label-text",labelInline:y,errMsg:w,text:h,style:{display:"flex",marginBottom:""+(y?"":"7px"),paddingBottom:"0px"}},k)),A&&t.createElement("div",{style:{marginLeft:"4px",color:`${P.variant.error}`}},"*")),t.createElement(Wt,M({theme:P},k,{wrapperStyle:g,isValid:E,disabled:c}),t.createElement(C,M({selected:B,disabled:c,customInput:t.createElement(Rt,{value:a,onClick:i,placeholder:n,theme:P},t.createElement(Pt,M({theme:P,value:a,onClick:i,timeBtnStyle:b,disabled:c},k),t.createElement("div",null,a||(n||"-- : -- --")),t.createElement(Tt,M({theme:P},k,{customIconContainerStyle:f,className:"input-icon"}),T.icon?t.createElement($,T):null))),onChange:e=>{z(e);var t=null;t="datetime-local"==o?v(e).format("DD MMM YYYY, hh:mm A"):"date"==o?v(e).format("DD MMM, YYYY"):"year"==o?v(e).format("YYYY"):"month"==o?v(e).format("MMMM YYYY"):"time"==o?v(e).format("hh:mm A"):v(e).format("DD MMM, YYYY"),l(t)},showYearDropdown:!0,yearDropdownItemNumber:5,dropdownMode:"select",placeholderText:n},R,{renderCustomHeader:({date:e,changeYear:l,decreaseMonth:r,increaseMonth:i})=>{let n=v(e).format("MMMM");return t.createElement(Ht,M({theme:P},k,{inputType:o,customHeaderStyle:m}),"year"!==o?t.createElement("span",{style:{paddingLeft:"10px"},onClick:r},t.createElement($,{icon:"chevron-left",color:"white",size:16})):null,t.createElement("b",null,"year"!==o?t.createElement("span",{style:{paddingRight:"5px"}},n):null," ",t.createElement("span",{className:"calender-year"},t.createElement("select",{value:e.getFullYear(),onChange:({target:{value:e}})=>l(e)},I.map((e=>t.createElement("option",{key:e,value:e},e)))))),"year"!==o?t.createElement("span",{style:{paddingRight:"10px"},onClick:i},t.createElement($,{icon:"chevron-right",color:"white",size:16})):null)}}))),w.length>0&&t.createElement("div",{className:"err-text"},w))};qt.propTypes={defaultValue:e.string,onChange:e.func,inputType:e.string,onClick:e.func,placeHolder:e.string,value:e.string,disabled:e.bool,startYear:e.number,endYearRange:e.number,iconProps:e.object,customHeaderStyle:e.object,timeBtnStyle:e.object,wrapperStyle:e.object,customIconContainerStyle:e.object,label:e.string,labelStyle:e.object,labelInline:e.bool,errMsg:e.string,errMsgColor:e.string,isValid:e.bool},qt.defaultProps={disabled:!1,startYear:new Date,endYearRange:10,value:"",defaultValue:"",onChange:()=>{},label:"",required:!1,labelInline:!1,errMsg:"",isValid:!0};const Zt=m.div`
1324
+ `,qt=({defaultValue:e,onChange:l,inputType:o,onClick:i,placeHolder:n,value:a,disabled:c,startYear:s,endYearRange:d,iconProps:p,customHeaderStyle:m,timeBtnStyle:b,wrapperStyle:g,customIconContainerStyle:f,label:h,labelInline:y,labelStyle:x,required:A,errMsg:w,errMsgColor:S,isValid:E,...k})=>{const[V,z]=r(e);let B=V?new Date(V):null;for(var I=[],L=d||10,W=s||(new Date).getFullYear();W<=(new Date).getFullYear()+L;W++)I.push(W);let R={};switch(o){case"date":default:R.dateFormat="dd MMM, yyyy";break;case"month":R.dateFormat="MMMM yyyy",R.showMonthYearPicker=!0;break;case"year":R.dateFormat="yyyy",R.showYearPicker=!0;break;case"datetime-local":R.dateFormat="dd MMM yyyy, hh:mm a",R.showTimeSelect=!0,R.timeFormat="hh:mm a",R.timeIntervals=15,R.timeCaption="Time";break;case"time":R.showTimeSelect=!0,R.showTimeSelectOnly=!0,R.dateFormat="hh:mm a"}const P=u()||H,T={icon:"calender",size:"16",...p};return t.createElement(Ft,M({labelInline:y,errMsgColor:S,theme:P},k),t.createElement("div",{style:{display:"flex"}},t.createElement(ct,M({customStyles:x,type:"label-text",labelInline:y,errMsg:w,text:h,style:{display:"flex",marginBottom:""+(y?"":"7px"),paddingBottom:"0px"}},k)),A&&t.createElement("div",{style:{marginLeft:"4px",color:`${P.variant.error}`}},"*")),t.createElement(Wt,M({theme:P},k,{wrapperStyle:g,isValid:E,disabled:c}),t.createElement(C,M({selected:B,disabled:c,customInput:t.createElement(Rt,{value:a,onClick:i,placeholder:n,theme:P},t.createElement(Pt,M({theme:P,value:a,onClick:i,timeBtnStyle:b,disabled:c},k),t.createElement("div",null,a||(n||"-- : -- --")),t.createElement(Tt,M({theme:P},k,{customIconContainerStyle:f,className:"input-icon"}),T.icon?t.createElement($,T):null))),onChange:e=>{z(e);var t=null;t="datetime-local"==o?v(e).format("DD MMM YYYY, hh:mm A"):"date"==o?v(e).format("DD MMM, YYYY"):"year"==o?v(e).format("YYYY"):"month"==o?v(e).format("MMMM YYYY"):"time"==o?v(e).format("hh:mm A"):v(e).format("DD MMM, YYYY"),l(t)},showYearDropdown:!0,yearDropdownItemNumber:5,dropdownMode:"select",placeholderText:n},R,{renderCustomHeader:({date:e,changeYear:l,decreaseMonth:r,increaseMonth:i})=>{let n=v(e).format("MMMM");return t.createElement(Ht,M({theme:P},k,{inputType:o,customHeaderStyle:m}),"year"!==o?t.createElement("span",{style:{paddingLeft:"10px"},onClick:r},t.createElement($,{icon:"chevron-left",color:"white",size:16})):null,t.createElement("b",null,"year"!==o?t.createElement("span",{style:{paddingRight:"5px"}},n):null," ",t.createElement("span",{className:"calender-year"},t.createElement("select",{value:e.getFullYear(),onChange:({target:{value:e}})=>l(e)},I.map((e=>t.createElement("option",{key:e,value:e},e)))))),"year"!==o?t.createElement("span",{style:{paddingRight:"10px"},onClick:i},t.createElement($,{icon:"chevron-right",color:"white",size:16})):null)}}))),w.length>0&&t.createElement("div",{className:"err-text"},w))};qt.propTypes={defaultValue:e.string,onChange:e.func,inputType:e.string,onClick:e.func,placeHolder:e.string,value:e.string,disabled:e.bool,startYear:e.number,endYearRange:e.number,iconProps:e.object,customHeaderStyle:e.object,timeBtnStyle:e.object,wrapperStyle:e.object,customIconContainerStyle:e.object,label:e.string,labelStyle:e.object,labelInline:e.bool,errMsg:e.string,errMsgColor:e.string,isValid:e.bool},qt.defaultProps={disabled:!1,startYear:new Date,endYearRange:10,value:"",defaultValue:"",onChange:()=>{},label:"",required:!1,labelInline:!1,errMsg:"",isValid:!0};const Zt=m.div`
1324
1325
 
1325
1326
  cursor: ${({isDisabled:e})=>e?"not-allowed":"initial"} !important;
1326
1327
 
@@ -1534,7 +1535,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1534
1535
  align-items: center;
1535
1536
  margin: 20px 0px;
1536
1537
  font-size: 14px;
1537
- `;const tl=({label:e,labelStyle:l,labelInline:o,required:i,message:a,fileArr:c,setFileArr:s,deleteFile:d,customDropzoneStyles:p,customFileStyles:m,customTextStyles:b,customFileNameStyles:g,backgroundColor:f,singleFile:h,messageSize:y,showSupportedFormats:x,file_extensions:v,maxFilesAmount:C,minFilesAmount:A,fileSizeLimit:w,fileSizeNamingConvention:S,errorMessages:E,suggesionMessage:k,MessagelabelStyle:V,dropValid:z,setDropValid:B,dropzoneContent:I,dropIcon:L,iconColor:W,id:R,customTooltipContentStyle:P,customStylesTPArightBefore:j,customStylesTPArightAfter:F,...q})=>{const Z=u()||H,[O,D]=r(!1),G=n(),[X,J]=r(z),[U,Y]=r("");let N;var Q=v;let K=Q.map((e=>e.toLowerCase()));K=[...new Set(K)];var _=!1,ee=x?"All file formats cannot be used with the files you provided.":"",te="";1==h&&(A=1,C=1);var le="Please upload (min."+A+" to max."+C+")files",oe=e=>{te="";let t=[];var l=0,o=c.length;if(o+e.length<A||o+e.length>C){var r=`Please upload (minimum ${A} to maximum ${C} files)`;te=E?.amount,te=void 0!==te?te:r}for(const e of c)e.size&&(l+=e.size);if(""==te)for(const[o,c]of Object.entries(e)){_=!0,c.name,l+=c.size;var i=c.name.split(".");i=i[i.length-1],_=Q.includes(i.toLowerCase());var n=1024;("MB"===S||"GB"===S||"TB"===S)&&(n*=1024);var a=Math.round(l/n);if(!1===_&&(te=E?.format,te=te||ee),a>w&&_){_=!1;r="The file(s) must be under "+w+" "+S;te=E?.size,te=void 0!==te?te:r}_&&(N=URL.createObjectURL(c),c.path=N,t.push(c))}return te.length>0?(B(!1),J(z),Y(te)):(B(!0),J(z),Y("")),t};function re(e){e.preventDefault(),e.stopPropagation()}function ie(e,t){let l=[...c,...e];return t||(l=l.filter(((e,t,l)=>t===l.findIndex((t=>t.place===e.place&&t.name===e.name))))),s(l),D(!1),l}function ne(e,t){if(e instanceof File){const t=c.findIndex((t=>t.name===e.name));let l=c[t].path;URL.revokeObjectURL(l);const o=c.filter((t=>t.name!==e.name));s(o)}else!function(e,t){const l=c.filter((t=>t.name!==e.name));s(l),d(e)}(e)}const ae=t.createElement("div",null,K.map(((e,l)=>t.createElement("span",null,e,l<K.length-1?", ":""))));return t.createElement("div",null,t.createElement("div",{style:{display:"flex",width:"inherit"}},t.createElement(ct,M({customStyles:l,type:"label-text",labelInline:o,text:e,style:{display:"flex",marginBottom:`${o?0:"8px"}`,paddingBottom:"0px"}},q)),i&&t.createElement("div",{style:{marginLeft:"4px",color:`${Z.variant.error}`}},"*")),t.createElement(Yt,{theme:Z,inBuiltCss:T,defaultStyles:"dropzone-parent",backgroundColor:f,customDropzoneStyles:z?p:{},onDragLeave:function(e){re(e),D(!1)},onDragOver:function(e){re(e),D(!0)},onDrop:function(e){re(e);const{files:t}=e.dataTransfer;var l=oe(t);D(!0),q.onFilesAdded(ie(l,h))},onClick:function(){G.current.click()},hover:O,dropValid:z,fileArr:c},t.createElement(Qt,M({ref:G,valid:X,dropValid:z,type:"file",id:R,multiple:!h,onChange:function(e){let{files:t}=e.target;D(!1);var l=oe(t);l&&q.onFilesAdded(ie(l,h))},onClick:e=>e.target.value=null},q)),z?t.createElement(t.Fragment,null,L?t.createElement($,{icon:L,color:O?Z.bgColor:W,size:24}):t.createElement($,{icon:"file-upload",color:O?Z.bgColor:Z.primary["primary-1"],size:24})):null,t.createElement(Kt,{dropValid:z,valid:X,hover:O,backgroundColor:f,customTextStyles:b,inBuiltCss:T,defaultStyles:"dropzone-text-div"},z?t.createElement(t.Fragment,null,I?t.createElement("div",{style:{color:O?Z.bgColor:null}},I):t.createElement("div",null,t.createElement("span",{style:{color:O?Z.bgColor:Z.primary["primary-1"]}},"Choose a file"," "),t.createElement("span",{style:{color:O?Z.bgColor:Z.neutral["neutral-2"]}},"or"," "),t.createElement("span",{style:{color:O?Z.bgColor:Z.textColor}},"drag ",h?"it":"them"," here"))):t.createElement("div",null,t.createElement("span",{style:{color:Z.variant.error}},"Try again!!"," "),t.createElement("span",{style:{color:Z.textColor}},U||a)))),U===ee||E.format?t.createElement("div",{style:{display:"flex"}},t.createElement(ct,M({themeColor:H,customStyles:V,type:"label-text",labelInline:o,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},q)),t.createElement(tt,{contentTrigger:t.createElement("span",{style:{cursor:"pointer"}},"Click here to view the supported file types"),headerTooltip:"",contentTooltip:ae,footerTooltip:"",popperOptionsP:{placement:"right"},settings:{closeOnOutsideClick:!0,trigger:"click"},customTriggerStyle:{marginTop:"8px",marginLeft:"4px",textDecoration:"underline",color:Z.variant["primary-1"]},customBodyStyle:{wordWrap:"break-word"},customContentStyle:P,customStylesTPArightBefore:j,customStylesTPArightAfter:F})):"The file size is not uploaded"===U?t.createElement(ct,M({themeColor:H,customStyles:V,type:"label-text",labelInline:o,text:le,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},q)):"",c?.map(((e,l)=>t.createElement(Nt,{inBuiltCss:T,defaultStyles:"dropzone-file-div",key:`${e}-${l}`,customFileStyles:m},t.createElement(_t,null,t.createElement($,{icon:"file-icon",color:Z.primary["primary-1"]})),(File,t.createElement("a",{style:{color:Z.variant["primary-1"],marginLeft:"5px"},href:e?.path,target:"_blank",rel:"noreferrer",download:e.name}," ",e.name)),t.createElement(el,null,e?.otherInfo),t.createElement($t,{key:101*Math.random()|0},t.createElement("div",{style:{marginRight:"7px"}},t.createElement($,{icon:`${!(e instanceof File)&&"cloud-icon"}`,color:Z.primary["primary-1"]})),t.createElement($,{icon:"cross-icon",color:Z.neutral["neutral-2"],size:13,onClick:()=>ne(e),customstyles:{cursor:"pointer"}}))))))};tl.propTypes={onFilesAdded:e.func,dropValid:e.bool,setDropValid:e.func,message:e.string,fileArr:e.array,setFileArr:e.func,customDropzoneStyles:e.object,customFileStyles:e.object,customTextStyles:e.object,customFileNameStyles:e.object,backgroundColor:e.string,messageSize:e.number,maxFilesAmount:e.number,minFilesAmount:e.number,fileSizeLimit:e.number,fileSizeNamingConvention:e.string,showSupportedFormats:e.bool,file_extensions:e.array,errorMessages:e.object,suggesionMessage:e.any,MessagelabelStyle:e.object,id:e.string,dropzoneContent:e.any,dropIcon:e.string,iconColor:e.string,singleFile:e.bool,customTooltipContentStyle:e.object,customStylesTPArightBefore:e.object,customStylesTPArightAfter:e.object},tl.defaultProps={onFilesAdded:()=>null,dropValid:!0,message:"",fileArr:[],setFileArr:()=>{},customDropzoneStyles:{},customFileStyles:{},customTextStyles:{},customFileNameStyles:{},messageSize:100,additionalText:"",maxFilesAmount:5,minFilesAmount:1,fileSizeLimit:10,fileSizeNamingConvention:"MB",showSupportedFormats:!0,file_extensions:["doc","docx","jpg","JPG","pdf","png","xlsx","xlsr","xls"],errorMessages:{},MessagelabelStyle:{},suggesionMessage:"doc, docx, jpg, pdf, png, xlsx, xlsr, xls (Max 10MB)",id:"",iconColor:"black"};const ll=b`
1538
+ `;const tl=({label:e,labelStyle:l,labelInline:o,required:i,message:a,fileArr:c,setFileArr:s,deleteFile:d,customDropzoneStyles:p,customFileStyles:m,customTextStyles:b,customFileNameStyles:g,backgroundColor:f,singleFile:h,messageSize:y,showSupportedFormats:x,file_extensions:v,maxFilesAmount:C,minFilesAmount:A,fileSizeLimit:w,fileSizeNamingConvention:S,errorMessages:E,suggesionMessage:k,MessagelabelStyle:V,dropValid:z,setDropValid:B,dropzoneContent:I,dropIcon:L,iconColor:W,id:R,customTooltipContentStyle:P,customStylesTPArightBefore:j,customStylesTPArightAfter:F,...q})=>{const Z=u()||H,[O,D]=r(!1),G=n(),[X,J]=r(z),[U,Y]=r("");let N;var Q=v;let K=new Map(Q.map((e=>[e.toLowerCase(),e])));K=Array.from(K.values()).join(", ");var _=!1,ee=x?"All file formats cannot be used with the files you provided.":"",te="";1==h&&(A=1,C=1);var le="Please upload (min."+A+" to max."+C+")files",oe=e=>{te="";let t=[];var l=0,o=c.length;if(o+e.length<A||o+e.length>C){var r=`Please upload (minimum ${A} to maximum ${C} files)`;te=E?.amount,te=void 0!==te?te:r}for(const e of c)e.size&&(l+=e.size);if(""==te)for(const[o,c]of Object.entries(e)){_=!0,c.name,l+=c.size;var i=c.name.split(".");i=i[i.length-1],_=Q.includes(i.toLowerCase());var n=1024;("MB"===S||"GB"===S||"TB"===S)&&(n*=1024);var a=l/n;if(!1===_&&(te=E?.format,te=te||ee),a>w&&_){_=!1;r="The file(s) must be under "+w+" "+S;te=E?.size,te=void 0!==te?te:r}_&&(N=URL.createObjectURL(c),c.path=N,t.push(c))}return te.length>0?(B(!1),J(z),Y(te)):(B(!0),J(z),Y("")),t};function re(e){e.preventDefault(),e.stopPropagation()}function ie(e,t){let l=[...c,...e];return t||(l=l.filter(((e,t,l)=>t===l.findIndex((t=>t.place===e.place&&t.name===e.name))))),s(l),D(!1),l}function ne(e,t){if(e instanceof File){const t=c.findIndex((t=>t.name===e.name));let l=c[t].path;URL.revokeObjectURL(l);const o=c.filter((t=>t.name!==e.name));s(o)}else!function(e,t){const l=c.filter((t=>t.name!==e.name));s(l),d(e)}(e)}const ae=t.createElement("div",null,K);return t.createElement("div",null,t.createElement("div",{style:{display:"flex",width:"inherit"}},t.createElement(ct,M({customStyles:l,type:"label-text",labelInline:o,text:e,style:{display:"flex",marginBottom:`${o?0:"8px"}`,paddingBottom:"0px"}},q)),i&&t.createElement("div",{style:{marginLeft:"4px",color:`${Z.variant.error}`}},"*")),t.createElement(Yt,{theme:Z,inBuiltCss:T,defaultStyles:"dropzone-parent",backgroundColor:f,customDropzoneStyles:z?p:{},onDragLeave:function(e){re(e),D(!1)},onDragOver:function(e){re(e),D(!0)},onDrop:function(e){re(e);const{files:t}=e.dataTransfer;var l=oe(t);D(!0),q.onFilesAdded(ie(l,h))},onClick:function(){G.current.click()},hover:O,dropValid:z,fileArr:c},t.createElement(Qt,M({ref:G,valid:X,dropValid:z,type:"file",id:R,multiple:!h,onChange:function(e){let{files:t}=e.target;D(!1);var l=oe(t);l&&q.onFilesAdded(ie(l,h))},onClick:e=>e.target.value=null},q)),z?t.createElement(t.Fragment,null,L?t.createElement($,{icon:L,color:O?Z.bgColor:W,size:24}):t.createElement($,{icon:"file-upload",color:O?Z.bgColor:Z.primary["primary-1"],size:24})):null,t.createElement(Kt,{dropValid:z,valid:X,hover:O,backgroundColor:f,customTextStyles:b,inBuiltCss:T,defaultStyles:"dropzone-text-div"},z?t.createElement(t.Fragment,null,I?t.createElement("div",{style:{color:O?Z.bgColor:null}},I):t.createElement("div",null,t.createElement("span",{style:{color:O?Z.bgColor:Z.primary["primary-1"]}},"Choose a file"," "),t.createElement("span",{style:{color:O?Z.bgColor:Z.neutral["neutral-2"]}},"or"," "),t.createElement("span",{style:{color:O?Z.bgColor:Z.textColor}},"drag ",h?"it":"them"," here"))):t.createElement("div",null,t.createElement("span",{style:{color:Z.variant.error}},"Try again!!"," "),t.createElement("span",{style:{color:Z.textColor}},U||a)))),U===ee||E.format?t.createElement("div",{style:{display:"flex"}},t.createElement(ct,M({themeColor:H,customStyles:V,type:"label-text",labelInline:o,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},q)),t.createElement(tt,{contentTrigger:t.createElement("span",{style:{cursor:"pointer"}},"Click here to view the supported file types"),headerTooltip:"",contentTooltip:ae,footerTooltip:"",popperOptionsP:{placement:"bottom"},settings:{closeOnOutsideClick:!0,trigger:"click"},customTriggerStyle:{marginTop:"8px",marginLeft:"4px",textDecoration:"underline",color:Z.variant["primary-1"]},customBodyStyle:{wordWrap:"break-word"},customContentStyle:P,customStylesTPArightBefore:j,customStylesTPArightAfter:F})):"The file size is not uploaded"===U?t.createElement(ct,M({themeColor:H,customStyles:V,type:"label-text",labelInline:o,text:le,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},q)):"",c?.map(((e,l)=>t.createElement(Nt,{inBuiltCss:T,defaultStyles:"dropzone-file-div",key:`${e}-${l}`,customFileStyles:m},t.createElement(_t,null,t.createElement($,{icon:"file-icon",color:Z.primary["primary-1"]})),(File,t.createElement("a",{style:{color:Z.variant["primary-1"],marginLeft:"5px"},href:e?.path,target:"_blank",rel:"noreferrer",download:e.name}," ",e.name)),t.createElement(el,null,e?.otherInfo),t.createElement($t,{key:101*Math.random()|0},t.createElement("div",{style:{marginRight:"7px"}},t.createElement($,{icon:`${!(e instanceof File)&&"cloud-icon"}`,color:Z.primary["primary-1"]})),t.createElement($,{icon:"cross-icon",color:Z.neutral["neutral-2"],size:13,onClick:()=>ne(e),customstyles:{cursor:"pointer"}}))))))};tl.propTypes={onFilesAdded:e.func,dropValid:e.bool,setDropValid:e.func,message:e.string,fileArr:e.array,setFileArr:e.func,customDropzoneStyles:e.object,customFileStyles:e.object,customTextStyles:e.object,customFileNameStyles:e.object,backgroundColor:e.string,messageSize:e.number,maxFilesAmount:e.number,minFilesAmount:e.number,fileSizeLimit:e.number,fileSizeNamingConvention:e.string,showSupportedFormats:e.bool,file_extensions:e.array,errorMessages:e.object,suggesionMessage:e.any,MessagelabelStyle:e.object,id:e.string,dropzoneContent:e.any,dropIcon:e.string,iconColor:e.string,singleFile:e.bool,customTooltipContentStyle:e.object,customStylesTPArightBefore:e.object,customStylesTPArightAfter:e.object},tl.defaultProps={onFilesAdded:()=>null,dropValid:!0,message:"",fileArr:[],setFileArr:()=>{},customDropzoneStyles:{},customFileStyles:{},customTextStyles:{},customFileNameStyles:{},messageSize:100,additionalText:"",maxFilesAmount:5,minFilesAmount:1,fileSizeLimit:10,fileSizeNamingConvention:"MB",showSupportedFormats:!0,file_extensions:["doc","docx","jpg","JPG","pdf","png","xlsx","xlsr","xls"],errorMessages:{},MessagelabelStyle:{},suggesionMessage:"doc, docx, jpg, pdf, png, xlsx, xlsr, xls (Max 10MB)",id:"",iconColor:"black"};const ll=b`
1538
1539
  pointer-events: none;
1539
1540
  `,ol=m.input`
1540
1541
  background-color: transparent;
@@ -2050,9 +2051,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
2050
2051
  ${({commentWrapperStyle:e})=>e};
2051
2052
  `,co=m.div`
2052
2053
  margin-bottom: 24px;
2053
-
2054
2054
  ${({commentBodyStyle:e})=>e};
2055
-
2056
2055
  `,so=m.div`
2057
2056
  display: flex;
2058
2057
  flex-direction: row;
@@ -2094,7 +2093,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
2094
2093
  `,go=m.div`
2095
2094
  width: 100%;
2096
2095
  margin-left: 16px;
2097
- `,fo=({inputValue:e,setInputValue:l,commentArray:o,commentBodyStyle:i,commentWrapperStyle:n,commentHeadStyle:a,dateTimeStyle:c,commentDivStyle:s,inputWrapperStyle:d,onSave:p,myInfo:m,placeholder:b,loading:g,btnText:f,isLoading:h,viewOnly:y,...x})=>{const v=u()||H,[C,A]=r(!1);return t.createElement(ao,{commentWrapperStyle:n,theme:v},g?t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"24px"}},t.createElement(He,{size:26})):o.map(((e,l)=>{const{name:o,date:r,comment:n,image:d}=e;return t.createElement(co,{key:l,commentBodyStyle:i,theme:v},t.createElement(so,{commentHeadStyle:a},t.createElement(ge,M({user:{fullName:o,userName:o,url:d},toggleName:!0,size:"LG",customStylesName:{color:v.textColor}},x)),t.createElement(po,{dateTimeStyle:c,theme:v},r)),t.createElement(mo,{commentDivStyle:s},n))})),!y&&t.createElement(uo,{theme:v,inputWrapperStyle:d},t.createElement(ge,{user:{fullName:m?.fullName,userName:m?.userName,url:m?.url},toggleName:!1,customStylesImage:{height:"36px",width:"36px"},customStylesContainer:{marginTop:"7px"}}),t.createElement(go,null,t.createElement(Rl,{value:e,onChange:e=>l(e.target.value),placeholder:b,isValid:!0,inputStyle:{height:"23px"},onFocus:e=>A(!0)}),C&&t.createElement(bo,null,t.createElement(Oe,M({size:"sm",onClick:p,isLoading:h},x),f.save),t.createElement(Fe,{disabled:!!h,size:"sm",btnStyle:{color:v.variant["neutral-1"]},onClick:e=>A(!1)},f.cancel)))))};fo.propTypes={commentBodyStyle:e.object,commentWrapperStyle:e.object,commentHeadStyle:e.object,dateTimeStyle:e.object,commentDivStyle:e.object,inputWrapperStyle:e.object,onSave:e.func,commentArray:e.array,inputValue:e.string,setInputValue:e.func,myInfo:e.object,placeholder:e.string,loading:e.bool,btnText:e.object,viewOnly:e.bool},fo.defaultProps={commentBodyStyle:{},commentWrapperStyle:{},commentHeadStyle:{},dateTimeStyle:{},commentDivStyle:{},inputWrapperStyle:{},onSave:()=>{},commentArray:[],inputValue:"",setInputValue:()=>{},myInfo:{},placeholder:"",loading:!1,btnText:{save:"Save",cancel:"Cancel"},viewOnly:!1};const ho=m.div`
2096
+ `,fo=({inputValue:e,setInputValue:l,commentArray:o,commentBodyStyle:i,commentWrapperStyle:n,commentHeadStyle:a,dateTimeStyle:c,commentDivStyle:s,inputWrapperStyle:d,onSave:p,myInfo:m,placeholder:b,loading:g,btnText:f,isLoading:h,viewOnly:y,commentTextBoxProps:x,...v})=>{const C=u()||H,[A,w]=r(!1);return t.createElement(ao,{commentWrapperStyle:n,theme:C},g?t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"24px"}},t.createElement(He,{size:26})):o.map(((e,l)=>{const{name:o,date:r,comment:n,image:d}=e;return t.createElement(co,{key:l,commentBodyStyle:i,theme:C},t.createElement(so,{commentHeadStyle:a},t.createElement(ge,M({user:{fullName:o,userName:o,url:d},toggleName:!0,size:"LG",customStylesName:{color:C.textColor}},v)),t.createElement(po,{dateTimeStyle:c,theme:C},r)),t.createElement(mo,{commentDivStyle:s},n))})),!y&&t.createElement(uo,{theme:C,inputWrapperStyle:d},t.createElement(ge,{user:{fullName:m?.fullName,userName:m?.userName,url:m?.url},toggleName:!1,customStylesImage:{height:"36px",width:"36px"},customStylesContainer:{marginTop:"7px"}}),t.createElement(go,null,t.createElement(Rl,M({value:e,onChange:e=>l(e.target.value),placeholder:b,inputStyle:{height:"23px"},onFocus:e=>w(!0)},x)),A&&t.createElement(bo,null,t.createElement(Oe,M({size:"sm",onClick:p,isLoading:h},v),f.save),t.createElement(Fe,{disabled:!!h,size:"sm",btnStyle:{color:C.variant["neutral-1"]},onClick:e=>w(!1)},f.cancel)))))};fo.propTypes={commentBodyStyle:e.object,commentWrapperStyle:e.object,commentHeadStyle:e.object,dateTimeStyle:e.object,commentDivStyle:e.object,inputWrapperStyle:e.object,onSave:e.func,commentArray:e.array,inputValue:e.string,setInputValue:e.func,myInfo:e.object,placeholder:e.string,loading:e.bool,btnText:e.object,viewOnly:e.bool,commentTextBoxProps:e.object},fo.defaultProps={commentBodyStyle:{},commentWrapperStyle:{},commentHeadStyle:{},dateTimeStyle:{},commentDivStyle:{},inputWrapperStyle:{},onSave:()=>{},commentArray:[],inputValue:"",setInputValue:()=>{},myInfo:{},placeholder:"",loading:!1,btnText:{save:"Save",cancel:"Cancel"},viewOnly:!1,commentTextBoxProps:{isValid:!0,errorMessage:""}};const ho=m.div`
2098
2097
  //Set the styles from the default styles object
2099
2098
  ${({theme:e,type:t})=>j(e,t)}
2100
2099
  @media (max-width: 980px) {
@@ -3033,7 +3032,8 @@ ${({theme:e,type:t,customStyles:l})=>{if(e){let o={};if(e[t]){for(const t in e.c
3033
3032
 
3034
3033
  // custom styles
3035
3034
  ${({progressBarStyle:e})=>e}
3036
- `,di=({labelStyle:e,progressBarStyle:l,progressWrapStyle:o,label:n,total:a,sections:c,innerContent:s,baseColor:d,baseTitle:p,labelProps:m,props:b})=>{const g=u()||H,[f,h]=r([[]]);i((()=>{c&&c.length>0&&h(c)}),[c]);const y=f?.length>0?f?.reduce(((e,t)=>e+t.count),0):0;y>a&&(a=y);const x=f?.length>0?f?.map((e=>e.count/a*100)):[];return t.createElement("div",null,t.createElement(ct,M({inBuiltCss:T,customStyles:e,type:"progressBar-label",text:n},m)),t.createElement(ci,M({theme:g,progressWrapStyle:o,color:d,title:p},b),f?.map(((e,o)=>t.createElement(si,M({key:o,progressBarStyle:l,theme:g,color:e.color,style:{width:x[o]+"%",left:0===o?0:x.slice(0,o).reduce(((e,t)=>e+t),0)+"%"},title:e.label},b)))),t.createElement("div",{style:{position:"absolute",textAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}},s)))};di.propTypes={labelStyle:e.object,progressBarStyle:e.object,progressWrapStyle:e.object,sections:e.arrayOf(e.shape({color:e.string.isRequired,percentage:e.number,count:e.number.isRequired})).isRequired};const pi=m.div`
3035
+
3036
+ `,di=({labelStyle:e,progressBarStyle:l,progressWrapStyle:o,label:n,total:a,sections:c,innerContent:s,baseColor:d,baseTitle:p,labelProps:m,props:b})=>{const g=u()||H,[f,h]=r([[]]),[y,x]=r(null);i((()=>{c&&c.length>0&&h(c)}),[c]);const v=f?.length>0?f?.reduce(((e,t)=>e+t.count),0):0;v>a&&(a=v);const C=f?.length>0?f?.map((e=>e.count/a*100)):[],A=null!==y?f[y].label:p;return t.createElement("div",null,t.createElement(ct,M({inBuiltCss:T,customStyles:e,type:"progressBar-label",text:n},m)),t.createElement(ci,M({theme:g,progressWrapStyle:o,color:d,title:A},b),f?.map(((e,o)=>t.createElement(si,M({key:o,onMouseEnter:()=>x(o),onMouseLeave:()=>x(null),progressBarStyle:l,theme:g,color:e.color,style:{width:C[o]+"%",left:0===o?0:C.slice(0,o).reduce(((e,t)=>e+t),0)+"%"}},b)))),t.createElement("div",{style:{position:"absolute",textAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",top:"50%",left:"50%",transform:"translate(-50%, -50%)",cursor:"default"},onMouseEnter:e=>((e,t)=>{e.stopPropagation(),x(t)})(e,y),onMouseLeave:e=>{e.stopPropagation(),x(null)}},s)))};di.propTypes={labelStyle:e.object,progressBarStyle:e.object,progressWrapStyle:e.object,sections:e.arrayOf(e.shape({color:e.string.isRequired,percentage:e.number,count:e.number.isRequired})).isRequired},di.defaultProps={labelStyle:{},progressBarStyle:{},progressWrapStyle:{},label:"",total:100,innerContent:"",baseColor:"",baseTitle:"Total Task",labelProps:{},props:{}};const pi=m.div`
3037
3037
  background: transparent;
3038
3038
  display: flex;
3039
3039
  align-items: center;