master-components-react 4.2.30 → 4.2.32
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.
|
@@ -328,7 +328,7 @@ Valid keys: `+JSON.stringify(Object.keys(X),null," "));var ce=pe(M,re,A,B,R+"."
|
|
|
328
328
|
${["delete"].includes(v.type)?eo.staticColor:""}
|
|
329
329
|
${eo.actionIcon}
|
|
330
330
|
${f(v)&&f(v)!=="no_icon"?eo.defaultIcons:""}
|
|
331
|
-
`,style:{opacity:r[v.disableKey]?.5:1},children:f(v)&&f(v)!=="no_icon"?f(v):v==null?void 0:v.icon()}),w.jsxs("div",{className:eo.actionLabel,children:[w.jsx("p",{style:{...v==null?void 0:v.style,opacity:r[v.disableKey]?.5:1},children:v==null?void 0:v.label})," ",p(v)]})]},g))})]})},rue="DeleteAll-module__deleteAllWrapper",aue="DeleteAll-module__iconContainer",oue="DeleteAll-module__deleteItemsCountLabel",sue="DeleteAll-module__dark",lue="DeleteAll-module__datagridDeleteAllAction",Ml={deleteAllWrapper:rue,iconContainer:aue,deleteItemsCountLabel:oue,dark:sue,datagridDeleteAllAction:lue},uue=oe.forwardRef((e,t)=>{const[i,n]=oe.useState(0),r=o=>{n(o)};oe.useImperativeHandle(t,()=>({setValue:r}));const a=()=>{e.onDeleteAll&&typeof e.onDeleteAll=="function"&&e.onDeleteAll()};return w.jsxs("div",{ref:t,className:`${(e==null?void 0:e.theme)==="dark"?Ml.dark:""} ${Ml.datagridDeleteAllAction} ${Ml.deleteAllWrapper}`,children:[w.jsx("div",{className:Ml.iconContainer,onClick:a,children:w.jsx(tB,{})}),w.jsx("div",{className:Ml.deleteItemsCountLabel,children:w.jsxs("span",{children:["Delete ",i," Checked Item"]})})]})}),due=({data:e,customColumns:t,summary:i,keyExpr:n,theme:r,height:a,focusedRowEnabled:o=!0,rowAlternationEnabled:s,columnAutoWidth:l=!0,withCustomStore:u,withGrouping:d,groupDefaultCollapsed:c,storeKey:h,loadFunction:f,updateFunction:p,insertFunction:v,removeFunction:g,withColumnConfigure:C,withDeleteAll:x,withMasterDetail:S,detailTemplate:P,editingOptions:D,scrollMode:$,pagerOptions:z,selection:G,filterOptions:q,defaultPageIndex:Z,searchPanel:te,onEvent:H,onPageChange:Y,selectionChanged:I,focusedRowChanging:U,focusedRowChanged:L,onRowClick:ee,onWheelClick:de,showPagination:ie=!0,refresh:X,diselectAll:j,customActions:y,onColumnConfigure:T,onDeleteAll:A,onDelete:B,onEdit:R,withCustomActions:M,multiExpand:V,onFilterValueChange:J,onRowExpand:re,onRowCollaps:pe,onOptionChanged:ce,onRowPrepared:Ae,onFocusedCellChanged:b,ShowLoader:ae=!0,noDataText:le,onLoading:F,hideActions:N,allowColumnResizing:Q=!0,disableOverflow:me,onActionExpand:he})=>{const[ne,be]=oe.useState(!1),De=oe.useRef(t),Ie=oe.useRef(null),[Ne,rt]=oe.useState(""),Je=oe.useRef({Refresh:()=>Ie.current.instance.getDataSource().reload(),SelectedRowKeys:()=>Ie.current.instance.getSelectedRowKeys(),DeselectAll:()=>{var Ce;return(Ce=Ie.current)==null?void 0:Ce.instance.deselectAll()}}),[wt,ht]=oe.useState([{label:"Edit",type:"edit",event:(Ce,fe)=>Ha(Ce,fe)},{label:"Delete",type:"delete",event:(Ce,fe)=>$a(Ce,fe)}]),Gt=oe.useRef(null),mi=Ce=>{wt&&wt.length&&fi()},st=()=>{wt&&wt.length&&fi()},fi=()=>{document.querySelectorAll(".datagrid_action_data_controller > ul").forEach(fe=>{fe.style.display="none",fe.style.pointerEvents="none"})},Mi=new zs({key:h??"id",load:f,update:p,insert:v,remove:g,onLoading:F}),bt=(Ce,fe)=>{if(H&&typeof H=="function"&&H(fe,Ce),fe==="onContentReady"){const K=document.querySelector(".dx-pager"),we=document.querySelector("#pagination-container");let Re=!1;K?Re=!K.classList.contains("dx-hidden"):Re=!1,we.style.display=Re?"block":"none"}},fn=Ce=>{o&&(G==null?void 0:G.mode)==="multiple"&&x&&Gt.current.setValue(Ce.selectedRowKeys.length),I&&typeof I=="function"&&I(Ce)},Ki=Ce=>{U&&typeof U=="function"&&U(Ce)},Vi=Ce=>{L&&typeof L=="function"&&L(Ce)},Ge=Ce=>{b&&typeof b=="function"&&b(Ce)},ft=Ce=>{ee&&typeof ee=="function"&&ee(Ce.data)},qt=(Ce,fe)=>{Ce.button===1&&(de&&typeof de=="function"&&de(fe.data),Ce.preventDefault())},Ni=Ce=>{Ce.rowElement&&Ce.data&&Ce.rowElement.addEventListener("mousedown",fe=>qt(fe,Ce)),Ae&&typeof Ae=="function"&&Ae(Ce)},We=()=>{A&&typeof A=="function"&&A(Je.current.SelectedRowKeys())},It=Ce=>{ce&&typeof ce=="function"&&ce(Ce),Ce.fullName==="paging.pageIndex"&&Y&&typeof Y=="function"&&Y(Ce.value+1)},Di=Ce=>{let K=document.querySelector(`#datagrid_action_data_id_${Ce[n]}`),we=document.querySelectorAll(".datagrid_action_data_controller > ul"),Re=K.querySelector("ul");const qe=document.querySelectorAll(".dx-datagrid-rowsview .dx-row > td");qe&&qe.forEach(lt=>{lt.querySelector("ul")?lt.style.overflow="unset":lt.style.overflow="hidden"});const Tt=K.getBoundingClientRect(),Vt=document.querySelector(".gridWrapper").getBoundingClientRect();let pt={display:"block",position:"absolute",pointerEvents:"all",top:"20px",left:"-70px"};Tt.bottom>Vt.bottom-150&&(pt.top="unset",pt.bottom="100%",pt.left="-100px"),we.forEach(lt=>{lt.style.display="none",lt.style.pointerEvents="none"}),Object.assign(Re.style,pt)},_t=Ce=>{De.current=Ce,be(fe=>!fe),T&&typeof T=="function"&&T(De.current)},Mt=Ce=>{V||Ce.component.collapseAll(-1),re&&typeof re=="function"&&re(Ce)},Ir=Ce=>{pe&&typeof pe=="function"&&pe(Ce)},qo=Ce=>{Ce.parentType==="filterRow"&&(Ce.editorElement.onchange=fe=>{const K={columnKey:Ce.dataField,columnName:Ce.caption,filterValue:fe.target.value};J&&typeof J=="function"&&J(K)})},$a=(Ce,fe)=>{B&&typeof B=="function"&&B(fe)},Ha=(Ce,fe)=>{R&&typeof R=="function"&&R(fe)};oe.useEffect(()=>{y&&y.length&&ht(Ce=>{const fe=Ce;return y.forEach(K=>{fe.some(we=>we.type===K.type)||fe.push(K)}),fe})},[y]),oe.useEffect(()=>{X&&(Je.current.Refresh(),console.info("DataSource Refresh....."))},[X]),oe.useEffect(()=>{j&&Je.current.DeselectAll()},[j]),oe.useEffect(()=>{if(Array.isArray(me)&&me.length>0){const Ce=()=>{me.forEach(we=>{document.querySelectorAll(`.dx-datagrid-rowsview .dx-row td:nth-child(${we})`).forEach(qe=>{qe.style.overflow="unset"})})};Ce();const fe=new MutationObserver(()=>{Ce()}),K=document.querySelector(".dx-datagrid-rowsview");return K&&fe.observe(K,{childList:!0,subtree:!0}),()=>fe.disconnect()}},[me]);const nl=()=>{const Ce=Ie.current.instance,fe=Ce.pageIndex();fe>0&&Ce.pageIndex(fe-1)},rl=()=>{const Ce=Ie.current.instance,fe=Ce.pageIndex(),K=Ce.pageCount();fe<K-1&&Ce.pageIndex(fe+1)};return oe.useEffect(()=>{De.current=t,be(Ce=>!Ce)},[t]),oe.useEffect(()=>(document.addEventListener("click",mi),document.addEventListener("wheel",st),()=>{document.removeEventListener("click",mi),document.removeEventListener("wheel",st)}),[]),oe.useEffect(()=>{const Ce=document.querySelector(".dx-pager"),fe=document.querySelector("#pagination-container");let K=!1;Ce?K=!Ce.classList.contains("dx-hidden"):K=!1,fe.style.display=K?"block":"none"},[e,Mi,X]),w.jsxs(w.Fragment,{children:[w.jsx("div",{className:r==="dark"?"dark":"","data-grid-confirm-delete":!0,style:{display:"none"}}),w.jsxs("div",{style:{height:"100%",position:"relative"},className:`gridWrapper __dx_DataGrid_Component__ light ${r&&!["dark","light"].includes(r)?"light":r}`,children:[(C||x&&(G==null?void 0:G.mode)==="multiple")&&w.jsxs("div",{className:"__dx_DataGrid_Toolbar",children:[w.jsx("div",{className:"__dx_DataGrid_Toolbar_Leftside",children:x&&(G==null?void 0:G.mode)==="multiple"&&w.jsx(uue,{theme:r,ref:Gt,onDeleteAll:We})}),w.jsx("div",{className:"__dx_DataGrid_Toolbar_Righttside",children:C&&w.jsx("div",{className:"column_configure_wrapper",children:w.jsx(Yle,{theme:r,items:De.current.sort((Ce,fe)=>Ce.orderIndex-fe.orderIndex),change:Ce=>_t(Ce)})})})]}),w.jsxs("div",{id:"pagination-container",children:[w.jsx("div",{className:"custom-pagination-controls",style:{position:"absolute",bottom:"18px",right:"24px",zIndex:"100"},children:w.jsxs("button",{className:"custom-pagination-button",onClick:rl,size:"sm",style:{backgroundColor:"transparent",border:"1px solid #D5D7DA",borderRadius:"8px",height:"32px",padding:"16px 12px",color:"#414651",fontFamily:"Inter-SemiBold",fontSize:"14px",cursor:"pointer",display:"flex",alignItems:"center",gap:"4px"},children:["Next"," ",w.jsx("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M4.1665 10.5001H15.8332M15.8332 10.5001L9.99984 4.66675M15.8332 10.5001L9.99984 16.3334",stroke:"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),w.jsx("div",{className:"custom-pagination-controls",style:{position:"absolute",bottom:"18px",left:"24px",zIndex:"100"},children:w.jsxs("button",{className:"custom-pagination-button",onClick:nl,size:"sm",style:{backgroundColor:"transparent",border:"1px solid #D5D7DA",borderRadius:"8px",height:"32px",padding:"16px 12px",color:"#414651",fontSize:"14px",cursor:"pointer",display:"flex",alignItems:"center",gap:"4px",fontFamily:"Inter-SemiBold"},children:[w.jsx("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M15.8334 10.5001H4.16675M4.16675 10.5001L10.0001 16.3334M4.16675 10.5001L10.0001 4.66675",stroke:"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})," ","Previous"]})})]}),w.jsxs(zk,{height:a||"100%",ref:Ie,onRowPrepared:Ni,onFocusedCellChanged:Ge,dataSource:u?Mi:e,remoteOperations:!0,keyExpr:n??"id",allowColumnReordering:!1,allowColumnResizing:Q,columnAutoWidth:l,noDataText:le??"No Data",showColumnLines:!1,showRowLines:!0,rowAlternationEnabled:s,showBorders:!1,hoverStateEnabled:!0,onEditorPreparing:qo,onEditingStart:Ce=>bt(Ce,"onEditingStart"),onInitNewRow:Ce=>bt(Ce,"onInitNewRow"),onRowInserting:Ce=>bt(Ce,"onRowInserting"),onRowInserted:Ce=>bt(Ce,"onRowInserted"),onRowUpdating:Ce=>bt(Ce,"onRowUpdating"),onRowUpdated:Ce=>bt(Ce,"onRowUpdated"),onRowRemoving:Ce=>bt(Ce,"onRowRemoving"),onRowRemoved:Ce=>bt(Ce,"onRowRemoved"),onSaving:Ce=>bt(Ce,"onSaving"),onSaved:Ce=>bt(Ce,"onSaved"),onEditCanceling:Ce=>bt(Ce,"onEditCanceling"),onEditCanceled:Ce=>bt(Ce,"onEditCanceled"),onContentReady:Ce=>bt(Ce,"onContentReady"),onOptionChanged:Ce=>It(Ce),focusedRowEnabled:o,autoNavigateToFocusedRow:!1,onFocusedRowChanging:Ki,onFocusedRowChanged:Vi,onRowClick:ft,onRowExpanding:Mt,onRowCollapsed:Ir,onSelectionChanged:fn,children:[d&&w.jsx(Kk,{autoExpandAll:c}),w.jsx(eB,{mode:(G==null?void 0:G.mode)??"single",selectAllMode:(G==null?void 0:G.selectAllMode)??["allPages","page"][0],showCheckBoxesMode:"always"}),D&&w.jsx(Gk,{mode:(D==null?void 0:D.mode)??"row",allowUpdating:(D==null?void 0:D.allowUpdating)??!1,allowDeleting:(D==null?void 0:D.allowDeleting)??!1,allowAdding:!1}),w.jsx(Uk,{visible:(q==null?void 0:q.filterRow)??!1,applyFilter:"auto"}),w.jsx(Qk,{visible:(te==null?void 0:te.visible)??!1,width:(te==null?void 0:te.width)??256,placeholder:(te==null?void 0:te.placeholder)??"Search..."}),w.jsx(jk,{allowSearch:!0,visible:(q==null?void 0:q.headerFilter)??!1}),De&&De.current.map((Ce,fe)=>Ce.group?w.jsx(jc,{groupIndex:0,dataField:Ce.columnKey},fe):w.jsx(jc,{dataField:Ce.columnKey,caption:Ce.columnName,alignment:Ce.alignment?Ce.alignment:Ce.dataType==="number"?"right":"left",width:Ce.width,visible:Ce.visible,dataType:Ce.dataType,format:Ce.format==="date"?"M/d/yyyy, HH:mm":Ce.dataType==="number"&&Ce.fixedNumber?{type:"fixedPoint",precision:2}:Ce.format,fixed:Ce.fixed,cellRender:Ce.template,selectedFilterOperation:Ce.defaultFilterOperation,allowFiltering:Ce.allowFiltering,allowHeaderFiltering:Ce.allowHeaderFiltering,allowSorting:Ce.allowSorting,allowEditing:Ce.allowEditing,visibleIndex:Ce.orderIndex,defaultSortOrder:Ce.sortOrderType},fe)),i&&i.length&&!u&&w.jsx(Nm,{children:i&&i.map((Ce,fe)=>w.jsx($m,{column:Ce.column,summaryType:"custom",customizeText:Ce.total},fe))}),i&&i.length&&u&&w.jsx(Nm,{children:i.map((Ce,fe)=>w.jsx($m,{column:Ce.column,summaryType:Ce.summaryType,displayFormat:Ce.displayFormat}))}),!!M&&wt&&wt.length&&w.jsx(jc,{dataField:null,caption:"Actions",alignment:"left",width:100,fixed:!1,fixedPosition:"right",allowFiltering:!1,allowSorting:!1,cellRender:Ce=>{if(!N||N.length===0||N&&N.length>0&&!N.includes(Ce.data[n]))return w.jsx(nue,{theme:r,rowData:Ce.data,rowID:Ce.data[n],actions:wt.filter(fe=>fe.disabledForKeys&&fe.disabledForKeys.length?!fe.disabledForKeys.includes(Ce.data[n]):fe),hiddenActionTypes:[B?"":"delete",R?"":"edit"],onExpand:fe=>{Di(Ce.data),he&&typeof he=="function"&&he(Ce.data)}})}}),S&&w.jsx(Yk,{enabled:!0,component:P}),w.jsx(qk,{enabled:ae}),w.jsx(Jk,{useNative:!0,mode:$??"none"}),w.jsx(Zk,{defaultPageIndex:Z?Z-1:null,defaultPageSize:z==null?void 0:z.defaultPageSize}),w.jsx(Xk,{visible:z==null?void 0:z.visible,allowedPageSizes:z==null?void 0:z.allowedPageSizes,showPageSizeSelector:z==null?void 0:z.showPageSizeSelector,showInfo:z==null?void 0:z.showInfo,showNavigationButtons:z==null?void 0:z.showNavigationButtons})]})]})]})},cue="Tabs-module__tabContainer",hue="Tabs-module__vertical",fue="Tabs-module__underline",pue="Tabs-module__singleTab",vue="Tabs-module__active",_ue="Tabs-module__button",mue="Tabs-module__buttonBorder",gue="Tabs-module__buttonMinimal",Cue="Tabs-module__dark",yue="Tabs-module__underLine",to={tabContainer:cue,vertical:hue,underline:fue,singleTab:pue,active:vue,button:_ue,buttonBorder:mue,buttonMinimal:gue,dark:Cue,underLine:yue},xue=({tabsData:e,type:t="underline",vertical:i=!1,onItemClick:n,tabContainerStyle:r,singleTabStyle:a,theme:o})=>{const[s,l]=oe.useState(!1),u=d=>{d.active=!0,e.forEach(c=>{c.id===d.id?c.active=!0:c.active=!1}),n&&typeof n=="function"&&n(d),l(c=>!c)};return w.jsx("div",{style:r??{},className:`${o==="dark"?to.dark:""} ${to.tabContainer} ${to[t]} ${i?to.vertical:""}`,children:e.map(d=>w.jsx("div",{style:a??{},className:`${to.singleTab} ${d.active?to.active:""}`,onClick:()=>u(d),children:typeof d.label=="function"?w.jsx("span",{className:to.labelWrapper,children:d.label()}):d.label},d.id))})},bue="FileBlock-module__fileBlockWrapper",Sue="FileBlock-module__fileName",Eue="FileBlock-module__texts",wue="FileBlock-module__deleteFile",Iue="FileBlock-module__dark",ys={fileBlockWrapper:bue,fileName:Sue,texts:Eue,deleteFile:wue,dark:Iue},Tue=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",children:w.jsx("path",{d:"M9.66665 1.89118V5.33329C9.66665 5.8 9.66665 6.03336 9.75747 6.21162C9.83737 6.36842 9.96485 6.4959 10.1217 6.5758C10.2999 6.66663 10.5333 6.66663 11 6.66663H14.4421M14.6666 8.32348V14.3333C14.6666 15.7334 14.6666 16.4335 14.3942 16.9683C14.1545 17.4387 13.772 17.8211 13.3016 18.0608C12.7668 18.3333 12.0668 18.3333 10.6666 18.3333H5.33331C3.93318 18.3333 3.23312 18.3333 2.69834 18.0608C2.22793 17.8211 1.84548 17.4387 1.6058 16.9683C1.33331 16.4335 1.33331 15.7334 1.33331 14.3333V5.66663C1.33331 4.26649 1.33331 3.56643 1.6058 3.03165C1.84548 2.56124 2.22793 2.17879 2.69834 1.93911C3.23312 1.66663 3.93318 1.66663 5.33331 1.66663H8.00979C8.62127 1.66663 8.92701 1.66663 9.21473 1.7357C9.46982 1.79694 9.71368 1.89795 9.93736 2.03503C10.1897 2.18963 10.4058 2.40582 10.8382 2.8382L13.4951 5.49505C13.9275 5.92743 14.1436 6.14362 14.2982 6.39591C14.4353 6.61959 14.5363 6.86346 14.5976 7.11855C14.6666 7.40627 14.6666 7.712 14.6666 8.32348Z",stroke:"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),Aue=({theme:e,file:t,onDelete:i,fileBlockWrapperStyle:n,fileNameStyle:r,textsStyle:a,nameStyle:o,sizeStyle:s,clearIcon:l,fileIcon:u})=>{const d=()=>{i&&typeof i=="function"&&i(t)};return w.jsx("div",{className:`${e==="dark"?ys.dark:""} ${ys.fileBlockWrapper}`,style:n??{},children:w.jsxs("div",{className:ys.fileName,style:r??{},children:[w.jsx("div",{style:{display:"flex",alignItems:"center"},children:u??w.jsx(Tue,{})}),w.jsxs("div",{className:ys.texts,style:a??{},children:[w.jsx("span",{title:t&&(t!=null&&t.fileName)?t.fileName:"-",style:o??{},children:t&&(t!=null&&t.fileName)?t.fileName:"-"}),w.jsx("span",{style:s??{},className:ys.size,children:t&&(t!=null&&t.unitSize)?t==null?void 0:t.unitSize:""})]}),w.jsx("div",{className:ys.deleteFile,onClick:d,children:l??w.jsx(zm,{width:16})})]})})},Due="FileUploader-module__fileUploaderWrapper",Oue="FileUploader-module__rowStyle",Rue="FileUploader-module__fileUploaderContent",kue="FileUploader-module__labels",Bue="FileUploader-module__draganddrop",Pue="FileUploader-module__uploadSvg",Lue="FileUploader-module__title",Fue="FileUploader-module__brandColor",Mue="FileUploader-module__subTitle",Vue="FileUploader-module__uploadAction",Nue="FileUploader-module__dark",sn={fileUploaderWrapper:Due,rowStyle:Oue,fileUploaderContent:Rue,labels:kue,draganddrop:Bue,uploadSvg:Pue,title:Lue,brandColor:Fue,subTitle:Mue,uploadAction:Vue,dark:Nue},yI=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",children:w.jsx("path",{d:"M7.16675 13.3333L10.5001 10M10.5001 10L13.8334 13.3333M10.5001 10V17.5M17.1667 13.9524C18.1847 13.1117 18.8334 11.8399 18.8334 10.4167C18.8334 7.88536 16.7814 5.83333 14.2501 5.83333C14.068 5.83333 13.8976 5.73833 13.8052 5.58145C12.7185 3.73736 10.7121 2.5 8.41675 2.5C4.96497 2.5 2.16675 5.29822 2.16675 8.75C2.16675 10.4718 2.86295 12.0309 3.98921 13.1613",stroke:"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),$ue=({multiple:e=!0,onChange:t,maxSize:i,withFileValidation:n,acceptedFileFormats:r,title:a,subTitle:o,withResults:s=!0,onFormatError:l,onMaxSizeError:u,defaultValue:d,type:c="default",withIcon:h=!0,uploadIcon:f,fileUploaderWrapperStyle:p,fileUploaderContentStyle:v,draganddropStyle:g,labelsStyle:C,titleStyle:x,clickToUploadStyle:S,subTitleStyle:P,fileBlockWrapperStyle:D,fileNameStyle:$,textsStyle:z,nameStyle:G,sizeStyle:q,clearIcon:Z,theme:te})=>{const H=oe.useRef(crypto.randomUUID()),[Y,I]=oe.useState(!1),[U,L]=oe.useState(!1),ee=oe.useRef([]);oe.useEffect(()=>{d&&(ee.current=d,R(d))},[d]);const de=M=>{L(M)},ie=M=>{M.preventDefault(),de(!0)},X=M=>{M.preventDefault(),de(!1)},j=M=>{M.preventDefault(),de(!0)},y=M=>{M.preventDefault(),R(M.dataTransfer.files),de(!1)},T=M=>{ee.current=ee.current.filter((V,J)=>V.fileID!==M.fileID),I(V=>!V),B()},A=M=>{R(M.target.files)},B=()=>{t&&typeof t=="function"&&t(ee.current)},R=async M=>{let V=M,J=[];for(let re=0;re<V.length;re++){let pe={fileName:V[re].name,size:V[re].size,unitSize:HL(V[re].size),type:V[re].type,format:WL(V[re].name),base64:await zL(V[re]),fileID:crypto.randomUUID()};if(n&&r&&!r.includes(pe.format.toLowerCase())){l&&typeof l=="function"&&l(pe.format.toLowerCase());return}i&&V[re].size>i?u&&typeof u=="function"&&u({Error:"Max_Size_Error",MaxSize:i}):J.push(pe)}e?ee.current=[...ee.current,...J]:(J=J.slice(-1),ee.current=J),I(re=>!re),B()};return w.jsxs("div",{className:`${te==="dark"?sn.dark:""} ${sn.fileUploaderWrapper} ${c==="row"?sn.rowStyle:""}`,style:p??{},children:[w.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center"},children:[w.jsxs("div",{style:v??{},className:`${sn.fileUploaderContent} `,onDragEnter:ie,onDragLeave:X,onDragOver:j,onDrop:y,children:[w.jsxs("div",{className:sn.draganddrop,style:g??{},children:[c!=="row"&&h&&w.jsx("div",{className:sn.uploadSvg,children:f||w.jsx(yI,{})}),w.jsxs("div",{className:`${sn.labels} `,style:C??{},htmlFor:H.current,children:[a&&typeof a=="function"?a():w.jsx("div",{style:x??{},className:sn.title,children:a||w.jsx("div",{children:w.jsxs(w.Fragment,{children:[w.jsx("span",{style:S??{},className:c!=="row"?sn.brandColor:"",children:c!=="row"?"Click to upload":"Click to "}),w.jsxs("span",{className:c==="row"?sn.brandColor:"",children:[" ",c!=="row"?"or drag and drop":"upload"]})]})})}),o&&typeof o=="function"?o():w.jsx("p",{style:P??{},className:sn.subTitle,children:o??""})]})]}),w.jsx("div",{className:sn.uploadAction,children:w.jsx("input",{type:"file",name:"",id:H.current,multiple:!!e,onChange:A,accept:""})})]}),c==="row"&&h&&w.jsx("div",{className:sn.uploadSvg,children:f||w.jsxs("div",{children:[w.jsx(yI,{}),w.jsx("div",{className:sn.uploadAction,children:w.jsx("input",{type:"file",name:"",id:H.current,multiple:!!e,onChange:A,accept:""})})]})})]}),ee&&ee.current&&ee.current.length&&s?ee.current.map((M,V)=>w.jsx(Aue,{theme:te,fileBlockWrapperStyle:D,fileNameStyle:$,textsStyle:z,nameStyle:G,sizeStyle:q,clearIcon:Z,file:M,onDelete:T},V)):""]})},Hue=()=>{const e=document.createElement("style");e.setAttribute("id","toast_notification_style_key"),e.innerHTML=`
|
|
331
|
+
`,style:{opacity:r[v.disableKey]?.5:1},children:f(v)&&f(v)!=="no_icon"?f(v):v==null?void 0:v.icon()}),w.jsxs("div",{className:eo.actionLabel,children:[w.jsx("p",{style:{...v==null?void 0:v.style,opacity:r[v.disableKey]?.5:1},children:v==null?void 0:v.label})," ",p(v)]})]},g))})]})},rue="DeleteAll-module__deleteAllWrapper",aue="DeleteAll-module__iconContainer",oue="DeleteAll-module__deleteItemsCountLabel",sue="DeleteAll-module__dark",lue="DeleteAll-module__datagridDeleteAllAction",Ml={deleteAllWrapper:rue,iconContainer:aue,deleteItemsCountLabel:oue,dark:sue,datagridDeleteAllAction:lue},uue=oe.forwardRef((e,t)=>{const[i,n]=oe.useState(0),r=o=>{n(o)};oe.useImperativeHandle(t,()=>({setValue:r}));const a=()=>{e.onDeleteAll&&typeof e.onDeleteAll=="function"&&e.onDeleteAll()};return w.jsxs("div",{ref:t,className:`${(e==null?void 0:e.theme)==="dark"?Ml.dark:""} ${Ml.datagridDeleteAllAction} ${Ml.deleteAllWrapper}`,children:[w.jsx("div",{className:Ml.iconContainer,onClick:a,children:w.jsx(tB,{})}),w.jsx("div",{className:Ml.deleteItemsCountLabel,children:w.jsxs("span",{children:["Delete ",i," Checked Item"]})})]})}),due=({data:e,customColumns:t,summary:i,keyExpr:n,theme:r,height:a,focusedRowEnabled:o=!0,rowAlternationEnabled:s,columnAutoWidth:l=!0,withCustomStore:u,withGrouping:d,groupDefaultCollapsed:c,storeKey:h,loadFunction:f,updateFunction:p,insertFunction:v,removeFunction:g,withColumnConfigure:C,withDeleteAll:x,withMasterDetail:S,detailTemplate:P,editingOptions:D,scrollMode:$,pagerOptions:z,selection:G,filterOptions:q,defaultPageIndex:Z,searchPanel:te,onEvent:H,onPageChange:Y,selectionChanged:I,focusedRowChanging:U,focusedRowChanged:L,onRowClick:ee,onWheelClick:de,showPagination:ie=!0,refresh:X,diselectAll:j,customActions:y,onColumnConfigure:T,onDeleteAll:A,onDelete:B,onEdit:R,withCustomActions:M,multiExpand:V,onFilterValueChange:J,onRowExpand:re,onRowCollaps:pe,onOptionChanged:ce,onRowPrepared:Ae,onFocusedCellChanged:b,ShowLoader:ae=!0,noDataText:le,onLoading:F,hideActions:N,allowColumnResizing:Q=!0,disableOverflow:me,onActionExpand:he})=>{const[ne,be]=oe.useState(!1),De=oe.useRef(t),Ie=oe.useRef(null),[Ne,rt]=oe.useState(""),Je=oe.useRef({Refresh:()=>Ie.current.instance.getDataSource().reload(),SelectedRowKeys:()=>Ie.current.instance.getSelectedRowKeys(),DeselectAll:()=>{var Ce;return(Ce=Ie.current)==null?void 0:Ce.instance.deselectAll()}}),[wt,ht]=oe.useState([{label:"Edit",type:"edit",event:(Ce,fe)=>Ha(Ce,fe)},{label:"Delete",type:"delete",event:(Ce,fe)=>$a(Ce,fe)}]),Gt=oe.useRef(null),mi=Ce=>{wt&&wt.length&&fi()},st=()=>{wt&&wt.length&&fi()},fi=()=>{document.querySelectorAll(".datagrid_action_data_controller > ul").forEach(fe=>{fe.style.display="none",fe.style.pointerEvents="none"})},Mi=new zs({key:h??"id",load:f,update:p,insert:v,remove:g,onLoading:F}),bt=(Ce,fe)=>{if(H&&typeof H=="function"&&H(fe,Ce),fe==="onContentReady"){const K=document.querySelector(".dx-pager"),we=document.querySelector("#pagination-container");let Re=!1;K?Re=!K.classList.contains("dx-hidden"):Re=!1,we.style.display=Re?"block":"none"}},fn=Ce=>{o&&(G==null?void 0:G.mode)==="multiple"&&x&&Gt.current.setValue(Ce.selectedRowKeys.length),I&&typeof I=="function"&&I(Ce)},Ki=Ce=>{U&&typeof U=="function"&&U(Ce)},Vi=Ce=>{L&&typeof L=="function"&&L(Ce)},Ge=Ce=>{b&&typeof b=="function"&&b(Ce)},ft=Ce=>{ee&&typeof ee=="function"&&ee(Ce.data)},qt=(Ce,fe)=>{Ce.button===1&&(de&&typeof de=="function"&&de(fe.data),Ce.preventDefault())},Ni=Ce=>{Ce.rowElement&&Ce.data&&Ce.rowElement.addEventListener("mousedown",fe=>qt(fe,Ce)),Ae&&typeof Ae=="function"&&Ae(Ce)},We=()=>{A&&typeof A=="function"&&A(Je.current.SelectedRowKeys())},It=Ce=>{ce&&typeof ce=="function"&&ce(Ce),Ce.fullName==="paging.pageIndex"&&Y&&typeof Y=="function"&&Y(Ce.value+1)},Di=Ce=>{let K=document.querySelector(`#datagrid_action_data_id_${Ce[n]}`),we=document.querySelectorAll(".datagrid_action_data_controller > ul"),Re=K.querySelector("ul");const qe=document.querySelectorAll(".dx-datagrid-rowsview .dx-row > td");qe&&qe.forEach(lt=>{lt.querySelector("ul")?lt.style.overflow="unset":lt.style.overflow="hidden"});const Tt=K.getBoundingClientRect(),Vt=document.querySelector(".gridWrapper").getBoundingClientRect();let pt={display:"block",position:"absolute",pointerEvents:"all",top:"20px",left:"-70px"};Tt.bottom>Vt.bottom-150&&(pt.top="unset",pt.bottom="100%",pt.left="-100px"),we.forEach(lt=>{lt.style.display="none",lt.style.pointerEvents="none"}),Object.assign(Re.style,pt)},_t=Ce=>{De.current=Ce,be(fe=>!fe),T&&typeof T=="function"&&T(De.current)},Mt=Ce=>{V||Ce.component.collapseAll(-1),re&&typeof re=="function"&&re(Ce)},Ir=Ce=>{pe&&typeof pe=="function"&&pe(Ce)},qo=Ce=>{Ce.parentType==="filterRow"&&(Ce.editorElement.onchange=fe=>{const K={columnKey:Ce.dataField,columnName:Ce.caption,filterValue:fe.target.value};J&&typeof J=="function"&&J(K)})},$a=(Ce,fe)=>{B&&typeof B=="function"&&B(fe)},Ha=(Ce,fe)=>{R&&typeof R=="function"&&R(fe)};oe.useEffect(()=>{y&&y.length&&ht(Ce=>{const fe=Ce;return y.forEach(K=>{fe.some(we=>we.type===K.type)||fe.push(K)}),fe})},[y]),oe.useEffect(()=>{X&&(Je.current.Refresh(),console.info("DataSource Refresh....."))},[X]),oe.useEffect(()=>{j&&Je.current.DeselectAll()},[j]),oe.useEffect(()=>{if(Array.isArray(me)&&me.length>0){const Ce=()=>{me.forEach(we=>{document.querySelectorAll(`.dx-datagrid-rowsview .dx-row td:nth-child(${we})`).forEach(qe=>{qe.style.overflow="unset"})})};Ce();const fe=new MutationObserver(()=>{Ce()}),K=document.querySelector(".dx-datagrid-rowsview");return K&&fe.observe(K,{childList:!0,subtree:!0}),()=>fe.disconnect()}},[me]);const nl=()=>{const Ce=Ie.current.instance,fe=Ce.pageIndex();fe>0&&Ce.pageIndex(fe-1)},rl=()=>{const Ce=Ie.current.instance,fe=Ce.pageIndex(),K=Ce.pageCount();fe<K-1&&Ce.pageIndex(fe+1)};return oe.useEffect(()=>{De.current=t,be(Ce=>!Ce)},[t]),oe.useEffect(()=>(document.addEventListener("click",mi),document.addEventListener("wheel",st),()=>{document.removeEventListener("click",mi),document.removeEventListener("wheel",st)}),[]),oe.useEffect(()=>{const Ce=document.querySelector(".dx-pager"),fe=document.querySelector("#pagination-container");let K=!1;Ce?K=!Ce.classList.contains("dx-hidden"):K=!1,fe.style.display=K?"block":"none"},[e,Mi,X]),w.jsxs(w.Fragment,{children:[w.jsx("div",{className:r==="dark"?"dark":"","data-grid-confirm-delete":!0,style:{display:"none"}}),w.jsxs("div",{style:{height:"100%",position:"relative"},className:`gridWrapper __dx_DataGrid_Component__ light ${r&&!["dark","light"].includes(r)?"light":r}`,children:[(C||x&&(G==null?void 0:G.mode)==="multiple")&&w.jsxs("div",{className:"__dx_DataGrid_Toolbar",children:[w.jsx("div",{className:"__dx_DataGrid_Toolbar_Leftside",children:x&&(G==null?void 0:G.mode)==="multiple"&&w.jsx(uue,{theme:r,ref:Gt,onDeleteAll:We})}),w.jsx("div",{className:"__dx_DataGrid_Toolbar_Righttside",children:C&&w.jsx("div",{className:"column_configure_wrapper",children:w.jsx(Yle,{theme:r,items:De.current.sort((Ce,fe)=>Ce.orderIndex-fe.orderIndex),change:Ce=>_t(Ce)})})})]}),w.jsxs("div",{id:"pagination-container",children:[w.jsx("div",{className:"custom-pagination-controls",style:{position:"absolute",bottom:"18px",right:"24px",zIndex:"100"},children:w.jsxs("button",{className:"custom-pagination-button",onClick:rl,size:"sm",style:{backgroundColor:"transparent",border:"1px solid #D5D7DA",borderRadius:"8px",height:"32px",padding:"16px 12px",color:"#414651",fontFamily:"Inter-SemiBold",fontSize:"14px",cursor:"pointer",display:"flex",alignItems:"center",gap:"4px"},children:["Next"," ",w.jsx("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M4.1665 10.5001H15.8332M15.8332 10.5001L9.99984 4.66675M15.8332 10.5001L9.99984 16.3334",stroke:"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),w.jsx("div",{className:"custom-pagination-controls",style:{position:"absolute",bottom:"18px",left:"24px",zIndex:"100"},children:w.jsxs("button",{className:"custom-pagination-button",onClick:nl,size:"sm",style:{backgroundColor:"transparent",border:"1px solid #D5D7DA",borderRadius:"8px",height:"32px",padding:"16px 12px",color:"#414651",fontSize:"14px",cursor:"pointer",display:"flex",alignItems:"center",gap:"4px",fontFamily:"Inter-SemiBold"},children:[w.jsx("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M15.8334 10.5001H4.16675M4.16675 10.5001L10.0001 16.3334M4.16675 10.5001L10.0001 4.66675",stroke:"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})," ","Previous"]})})]}),w.jsxs(zk,{height:a||"100%",ref:Ie,onRowPrepared:Ni,onFocusedCellChanged:Ge,dataSource:u?Mi:e,remoteOperations:!0,keyExpr:n??"id",allowColumnReordering:!1,allowColumnResizing:Q,columnAutoWidth:l,noDataText:le??"No Data",showColumnLines:!1,showRowLines:!0,rowAlternationEnabled:s,showBorders:!1,hoverStateEnabled:!0,onEditorPreparing:qo,onEditingStart:Ce=>bt(Ce,"onEditingStart"),onInitNewRow:Ce=>bt(Ce,"onInitNewRow"),onRowInserting:Ce=>bt(Ce,"onRowInserting"),onRowInserted:Ce=>bt(Ce,"onRowInserted"),onRowUpdating:Ce=>bt(Ce,"onRowUpdating"),onRowUpdated:Ce=>bt(Ce,"onRowUpdated"),onRowRemoving:Ce=>bt(Ce,"onRowRemoving"),onRowRemoved:Ce=>bt(Ce,"onRowRemoved"),onSaving:Ce=>bt(Ce,"onSaving"),onSaved:Ce=>bt(Ce,"onSaved"),onEditCanceling:Ce=>bt(Ce,"onEditCanceling"),onEditCanceled:Ce=>bt(Ce,"onEditCanceled"),onContentReady:Ce=>bt(Ce,"onContentReady"),onOptionChanged:Ce=>It(Ce),focusedRowEnabled:o,autoNavigateToFocusedRow:!1,onFocusedRowChanging:Ki,onFocusedRowChanged:Vi,onRowClick:ft,onRowExpanding:Mt,onRowCollapsed:Ir,onSelectionChanged:fn,children:[d&&w.jsx(Kk,{autoExpandAll:c}),w.jsx(eB,{mode:(G==null?void 0:G.mode)??"single",selectAllMode:(G==null?void 0:G.selectAllMode)??["allPages","page"][0],showCheckBoxesMode:"always"}),D&&w.jsx(Gk,{mode:(D==null?void 0:D.mode)??"row",allowUpdating:(D==null?void 0:D.allowUpdating)??!1,allowDeleting:(D==null?void 0:D.allowDeleting)??!1,allowAdding:!1}),w.jsx(Uk,{visible:(q==null?void 0:q.filterRow)??!1,applyFilter:"auto"}),w.jsx(Qk,{visible:(te==null?void 0:te.visible)??!1,width:(te==null?void 0:te.width)??256,placeholder:(te==null?void 0:te.placeholder)??"Search..."}),w.jsx(jk,{allowSearch:!0,visible:(q==null?void 0:q.headerFilter)??!1}),De&&De.current.map((Ce,fe)=>Ce.group?w.jsx(jc,{groupIndex:0,dataField:Ce.columnKey},fe):w.jsx(jc,{dataField:Ce.columnKey,caption:Ce.columnName,alignment:Ce.alignment?Ce.alignment:Ce.dataType==="number"?"right":"left",width:Ce.width,visible:Ce.visible,dataType:Ce.dataType,format:Ce.format==="date"?"M/d/yyyy, HH:mm":Ce.dataType==="number"&&Ce.fixedNumber?{type:"fixedPoint",precision:2}:Ce.format,fixed:Ce.fixed,cellRender:Ce.template,selectedFilterOperation:Ce.defaultFilterOperation,allowFiltering:Ce.allowFiltering,allowHeaderFiltering:Ce.allowHeaderFiltering,allowSorting:Ce.allowSorting,allowEditing:Ce.allowEditing,visibleIndex:Ce.orderIndex,defaultSortOrder:Ce.sortOrderType},fe)),i&&i.length&&!u&&w.jsx(Nm,{children:i&&i.map((Ce,fe)=>w.jsx($m,{column:Ce.column,summaryType:"custom",customizeText:Ce.total},fe))}),i&&i.length&&u&&w.jsx(Nm,{children:i.map((Ce,fe)=>w.jsx($m,{column:Ce.column,summaryType:Ce.summaryType,displayFormat:Ce.displayFormat}))}),!!M&&wt&&wt.length&&w.jsx(jc,{dataField:null,caption:"Actions",alignment:"left",width:100,fixed:!1,fixedPosition:"right",allowFiltering:!1,allowSorting:!1,cellRender:Ce=>{if(!N||N.length===0||N&&N.length>0&&!N.includes(Ce.data[n]))return w.jsx(nue,{theme:r,rowData:Ce.data,rowID:Ce.data[n],actions:wt.filter(fe=>fe.disabledForKeys&&fe.disabledForKeys.length?!fe.disabledForKeys.includes(Ce.data[n]):fe),hiddenActionTypes:[B?"":"delete",R?"":"edit"],onExpand:fe=>{Di(Ce.data),he&&typeof he=="function"&&he(Ce.data)}})}}),S&&w.jsx(Yk,{enabled:!0,component:P}),w.jsx(qk,{enabled:ae}),w.jsx(Jk,{useNative:!0,mode:$??"none"}),w.jsx(Zk,{defaultPageIndex:Z?Z-1:null,defaultPageSize:z==null?void 0:z.defaultPageSize}),w.jsx(Xk,{visible:z==null?void 0:z.visible,allowedPageSizes:z==null?void 0:z.allowedPageSizes,showPageSizeSelector:z==null?void 0:z.showPageSizeSelector,showInfo:z==null?void 0:z.showInfo,showNavigationButtons:z==null?void 0:z.showNavigationButtons})]})]})]})},cue="Tabs-module__tabContainer",hue="Tabs-module__vertical",fue="Tabs-module__underline",pue="Tabs-module__singleTab",vue="Tabs-module__active",_ue="Tabs-module__button",mue="Tabs-module__buttonBorder",gue="Tabs-module__buttonMinimal",Cue="Tabs-module__dark",yue="Tabs-module__underLine",to={tabContainer:cue,vertical:hue,underline:fue,singleTab:pue,active:vue,button:_ue,buttonBorder:mue,buttonMinimal:gue,dark:Cue,underLine:yue},xue=({tabsData:e,type:t="underline",vertical:i=!1,onItemClick:n,tabContainerStyle:r,singleTabStyle:a,theme:o})=>{const[s,l]=oe.useState(!1),u=d=>{d.active=!0,e.forEach(c=>{c.id===d.id?c.active=!0:c.active=!1}),n&&typeof n=="function"&&n(d),l(c=>!c)};return w.jsx("div",{style:r??{},className:`${o==="dark"?to.dark:""} ${to.tabContainer} ${to[t]} ${i?to.vertical:""}`,children:e.map(d=>w.jsx("div",{style:a??{},className:`${to.singleTab} ${d.active?to.active:""}`,onClick:()=>u(d),children:typeof d.label=="function"?w.jsx("span",{className:to.labelWrapper,children:d.label()}):d.label},d.id))})},bue="FileBlock-module__fileBlockWrapper",Sue="FileBlock-module__fileName",Eue="FileBlock-module__texts",wue="FileBlock-module__deleteFile",Iue="FileBlock-module__dark",ys={fileBlockWrapper:bue,fileName:Sue,texts:Eue,deleteFile:wue,dark:Iue},Tue=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",children:w.jsx("path",{d:"M9.66665 1.89118V5.33329C9.66665 5.8 9.66665 6.03336 9.75747 6.21162C9.83737 6.36842 9.96485 6.4959 10.1217 6.5758C10.2999 6.66663 10.5333 6.66663 11 6.66663H14.4421M14.6666 8.32348V14.3333C14.6666 15.7334 14.6666 16.4335 14.3942 16.9683C14.1545 17.4387 13.772 17.8211 13.3016 18.0608C12.7668 18.3333 12.0668 18.3333 10.6666 18.3333H5.33331C3.93318 18.3333 3.23312 18.3333 2.69834 18.0608C2.22793 17.8211 1.84548 17.4387 1.6058 16.9683C1.33331 16.4335 1.33331 15.7334 1.33331 14.3333V5.66663C1.33331 4.26649 1.33331 3.56643 1.6058 3.03165C1.84548 2.56124 2.22793 2.17879 2.69834 1.93911C3.23312 1.66663 3.93318 1.66663 5.33331 1.66663H8.00979C8.62127 1.66663 8.92701 1.66663 9.21473 1.7357C9.46982 1.79694 9.71368 1.89795 9.93736 2.03503C10.1897 2.18963 10.4058 2.40582 10.8382 2.8382L13.4951 5.49505C13.9275 5.92743 14.1436 6.14362 14.2982 6.39591C14.4353 6.61959 14.5363 6.86346 14.5976 7.11855C14.6666 7.40627 14.6666 7.712 14.6666 8.32348Z",stroke:"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),Aue=({theme:e,file:t,onDelete:i,fileBlockWrapperStyle:n,fileNameStyle:r,textsStyle:a,nameStyle:o,sizeStyle:s,clearIcon:l,fileIcon:u})=>{const d=()=>{i&&typeof i=="function"&&i(t)};return w.jsx("div",{className:`${e==="dark"?ys.dark:""} ${ys.fileBlockWrapper}`,style:n??{},children:w.jsxs("div",{className:ys.fileName,style:r??{},children:[w.jsx("div",{style:{display:"flex",alignItems:"center"},children:u??w.jsx(Tue,{})}),w.jsxs("div",{className:ys.texts,style:a??{},children:[w.jsx("span",{title:t&&(t!=null&&t.fileName)?t.fileName:"-",style:o??{},children:t&&(t!=null&&t.fileName)?t.fileName:"-"}),w.jsx("span",{style:s??{},className:ys.size,children:t&&(t!=null&&t.unitSize)?t==null?void 0:t.unitSize:""})]}),w.jsx("div",{className:ys.deleteFile,onClick:d,children:l??w.jsx(zm,{width:16})})]})})},Due="FileUploader-module__fileUploaderWrapper",Oue="FileUploader-module__rowStyle",Rue="FileUploader-module__fileUploaderContent",kue="FileUploader-module__labels",Bue="FileUploader-module__draganddrop",Pue="FileUploader-module__uploadSvg",Lue="FileUploader-module__title",Fue="FileUploader-module__brandColor",Mue="FileUploader-module__subTitle",Vue="FileUploader-module__uploadAction",Nue="FileUploader-module__dark",sn={fileUploaderWrapper:Due,rowStyle:Oue,fileUploaderContent:Rue,labels:kue,draganddrop:Bue,uploadSvg:Pue,title:Lue,brandColor:Fue,subTitle:Mue,uploadAction:Vue,dark:Nue},yI=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",children:w.jsx("path",{d:"M7.16675 13.3333L10.5001 10M10.5001 10L13.8334 13.3333M10.5001 10V17.5M17.1667 13.9524C18.1847 13.1117 18.8334 11.8399 18.8334 10.4167C18.8334 7.88536 16.7814 5.83333 14.2501 5.83333C14.068 5.83333 13.8976 5.73833 13.8052 5.58145C12.7185 3.73736 10.7121 2.5 8.41675 2.5C4.96497 2.5 2.16675 5.29822 2.16675 8.75C2.16675 10.4718 2.86295 12.0309 3.98921 13.1613",stroke:"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),$ue=({multiple:e=!0,onChange:t,maxSize:i,withFileValidation:n,acceptedFileFormats:r,title:a,subTitle:o,withResults:s=!0,onFormatError:l,onMaxSizeError:u,defaultValue:d,type:c="default",withIcon:h=!0,uploadIcon:f,fileUploaderWrapperStyle:p,fileUploaderContentStyle:v,draganddropStyle:g,labelsStyle:C,titleStyle:x,clickToUploadStyle:S,subTitleStyle:P,fileBlockWrapperStyle:D,fileNameStyle:$,textsStyle:z,nameStyle:G,sizeStyle:q,clearIcon:Z,theme:te})=>{const H=oe.useRef(crypto.randomUUID()),[Y,I]=oe.useState(!1),[U,L]=oe.useState(!1),ee=oe.useRef([]);oe.useEffect(()=>{d&&(ee.current=d)},[]);const de=M=>{L(M)},ie=M=>{M.preventDefault(),de(!0)},X=M=>{M.preventDefault(),de(!1)},j=M=>{M.preventDefault(),de(!0)},y=M=>{M.preventDefault(),R(M.dataTransfer.files),de(!1)},T=M=>{ee.current=ee.current.filter((V,J)=>V.fileID!==M.fileID),I(V=>!V),B()},A=M=>{R(M.target.files)},B=()=>{t&&typeof t=="function"&&t(ee.current)},R=async M=>{let V=M,J=[];for(let re=0;re<V.length;re++){let pe={fileName:V[re].name,size:V[re].size,unitSize:HL(V[re].size),type:V[re].type,format:WL(V[re].name),base64:await zL(V[re]),fileID:crypto.randomUUID()};if(n&&r&&!r.includes(pe.format.toLowerCase())){l&&typeof l=="function"&&l(pe.format.toLowerCase());return}i&&V[re].size>i?u&&typeof u=="function"&&u({Error:"Max_Size_Error",MaxSize:i}):J.push(pe)}e?ee.current=[...ee.current,...J]:(J=J.slice(-1),ee.current=J),I(re=>!re),B()};return w.jsxs("div",{className:`${te==="dark"?sn.dark:""} ${sn.fileUploaderWrapper} ${c==="row"?sn.rowStyle:""}`,style:p??{},children:[w.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center"},children:[w.jsxs("div",{style:v??{},className:`${sn.fileUploaderContent} `,onDragEnter:ie,onDragLeave:X,onDragOver:j,onDrop:y,children:[w.jsxs("div",{className:sn.draganddrop,style:g??{},children:[c!=="row"&&h&&w.jsx("div",{className:sn.uploadSvg,children:f||w.jsx(yI,{})}),w.jsxs("div",{className:`${sn.labels} `,style:C??{},htmlFor:H.current,children:[a&&typeof a=="function"?a():w.jsx("div",{style:x??{},className:sn.title,children:a||w.jsx("div",{children:w.jsxs(w.Fragment,{children:[w.jsx("span",{style:S??{},className:c!=="row"?sn.brandColor:"",children:c!=="row"?"Click to upload":"Click to "}),w.jsxs("span",{className:c==="row"?sn.brandColor:"",children:[" ",c!=="row"?"or drag and drop":"upload"]})]})})}),o&&typeof o=="function"?o():w.jsx("p",{style:P??{},className:sn.subTitle,children:o??""})]})]}),w.jsx("div",{className:sn.uploadAction,children:w.jsx("input",{type:"file",name:"",id:H.current,multiple:!!e,onChange:A,accept:""})})]}),c==="row"&&h&&w.jsx("div",{className:sn.uploadSvg,children:f||w.jsxs("div",{children:[w.jsx(yI,{}),w.jsx("div",{className:sn.uploadAction,children:w.jsx("input",{type:"file",name:"",id:H.current,multiple:!!e,onChange:A,accept:""})})]})})]}),ee&&ee.current&&ee.current.length&&s?ee.current.map((M,V)=>w.jsx(Aue,{theme:te,fileBlockWrapperStyle:D,fileNameStyle:$,textsStyle:z,nameStyle:G,sizeStyle:q,clearIcon:Z,file:M,onDelete:T},V)):""]})},Hue=()=>{const e=document.createElement("style");e.setAttribute("id","toast_notification_style_key"),e.innerHTML=`
|
|
332
332
|
.notifications_wrapper{
|
|
333
333
|
position: fixed;
|
|
334
334
|
z-index: 9999999;
|
|
@@ -73013,8 +73013,8 @@ const jle = "ColumnConfigure-module__configureWrapper", qle = "ColumnConfigure-m
|
|
|
73013
73013
|
}) => {
|
|
73014
73014
|
const H = Xe(crypto.randomUUID()), [Y, I] = He(!1), [U, P] = He(!1), ee = Xe([]);
|
|
73015
73015
|
Ze(() => {
|
|
73016
|
-
d && (ee.current = d
|
|
73017
|
-
}, [
|
|
73016
|
+
d && (ee.current = d);
|
|
73017
|
+
}, []);
|
|
73018
73018
|
const ue = (M) => {
|
|
73019
73019
|
P(M);
|
|
73020
73020
|
}, ie = (M) => {
|