master-components-react 3.5.5 → 3.5.6
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.
|
@@ -325,7 +325,7 @@ Valid keys: `+JSON.stringify(Object.keys(Z),null," "));var te=ge(U,ue,S,B,F+"."
|
|
|
325
325
|
${["delete"].includes(p.type)?Xa.staticColor:""}
|
|
326
326
|
${Xa.actionIcon}
|
|
327
327
|
${f(p)&&f(p)!=="no_icon"?Xa.defaultIcons:""}
|
|
328
|
-
`,children:f(p)&&f(p)!=="no_icon"?f(p):p==null?void 0:p.icon()}),T.jsx("div",{className:Xa.actionLabel,children:T.jsx("span",{style:{...p==null?void 0:p.style},children:p==null?void 0:p.label})})]},m))})]})},wle="DeleteAll-module__deleteAllWrapper",Ile="DeleteAll-module__iconContainer",Tle="DeleteAll-module__deleteItemsCountLabel",Ale="DeleteAll-module__dark",Dle="DeleteAll-module__datagridDeleteAllAction",Fl={deleteAllWrapper:wle,iconContainer:Ile,deleteItemsCountLabel:Tle,dark:Ale,datagridDeleteAllAction:Dle},Ole=ce.forwardRef((e,t)=>{const[i,n]=ce.useState(0),r=o=>{n(o)};ce.useImperativeHandle(t,()=>({setValue:r}));const a=()=>{e.onDeleteAll&&typeof e.onDeleteAll=="function"&&e.onDeleteAll()};return T.jsxs("div",{ref:t,className:`${(e==null?void 0:e.theme)==="dark"?Fl.dark:""} ${Fl.datagridDeleteAllAction} ${Fl.deleteAllWrapper}`,children:[T.jsx("div",{className:Fl.iconContainer,onClick:a,children:T.jsx(Zk,{})}),T.jsx("div",{className:Fl.deleteItemsCountLabel,children:T.jsxs("span",{children:["Delete ",i," Checked Item"]})})]})}),Rle=({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:m,removeFunction:g,withColumnConfigure:y,withDeleteAll:b,withMasterDetail:A,detailTemplate:k,editingOptions:D,scrollMode:K,pagerOptions:H,selection:W,filterOptions:G,defaultPageIndex:q,searchPanel:J,onEvent:$,onPageChange:Y,selectionChanged:x,focusedRowChanging:z,focusedRowChanged:ie,onRowClick:ee,onWheelClick:pe,refresh:de,diselectAll:Z,customActions:V,onColumnConfigure:C,onDeleteAll:I,onDelete:S,onEdit:B,withCustomActions:F,multiExpand:U,onFilterValueChange:N,onRowExpand:Q,onRowCollaps:ue,onOptionChanged:ge,onRowPrepared:te,onFocusedCellChanged:we,ShowLoader:w=!0,noDataText:ne,onLoading:oe,hideActions:P,allowColumnResizing:L=!0,disableOverflow:X,onActionExpand:ve})=>{const[me,le]=ce.useState(!1),Ie=ce.useRef(t),ke=ce.useRef(null),[Ae,Ne]=ce.useState(""),at=ce.useRef({Refresh:()=>ke.current.instance.getDataSource().reload(),SelectedRowKeys:()=>ke.current.instance.getSelectedRowKeys(),DeselectAll:()=>{var ae;return(ae=ke.current)==null?void 0:ae.instance.deselectAll()}}),[qe,it]=ce.useState([{label:"Edit",type:"edit",event:(ae,j)=>Ma(ae,j)},{label:"Delete",type:"delete",event:(ae,j)=>Uo(ae,j)}]),ii=ce.useRef(null),jt=ae=>{qe&&qe.length&&vt()},Ht=()=>{qe&&qe.length&&vt()},vt=()=>{document.querySelectorAll(".datagrid_action_data_controller > ul").forEach(j=>{j.style.display="none",j.style.pointerEvents="none"})},Vi=new Ws({key:h??"id",load:f,update:p,insert:m,remove:g,onLoading:oe}),Mt=(ae,j)=>{$&&typeof $=="function"&&$(j,ae)},di=ae=>{o&&(W==null?void 0:W.mode)==="multiple"&&b&&ii.current.setValue(ae.selectedRowKeys.length),x&&typeof x=="function"&&x(ae)},je=ae=>{z&&typeof z=="function"&&z(ae)},ct=ae=>{ie&&typeof ie=="function"&&ie(ae)},Ci=ae=>{we&&typeof we=="function"&&we(ae)},Li=ae=>{ee&&typeof ee=="function"&&ee(ae.data)},We=(ae,j)=>{ae.button===1&&(pe&&typeof pe=="function"&&pe(j.data),ae.preventDefault())},ht=ae=>{ae.rowElement&&ae.data&&ae.rowElement.addEventListener("mousedown",j=>We(j,ae)),te&&typeof te=="function"&&te(ae)},Zt=()=>{I&&typeof I=="function"&&I(at.current.SelectedRowKeys())},_t=ae=>{ge&&typeof ge=="function"&&ge(ae),ae.fullName==="paging.pageIndex"&&Y&&typeof Y=="function"&&Y(ae.value+1)},Wt=ae=>{let be=document.querySelector(`#datagrid_action_data_id_${ae[n]}`),Le=document.querySelectorAll(".datagrid_action_data_controller > ul"),Qe=be.querySelector("ul");const bt=document.querySelectorAll(".dx-datagrid-rowsview .dx-row > td");bt&&bt.forEach(ni=>{ni.querySelector("ul")?ni.style.overflow="unset":ni.style.overflow="hidden"});const Pt=be.getBoundingClientRect(),xt=document.querySelector(".gridWrapper").getBoundingClientRect();let ut={display:"block",position:"absolute",pointerEvents:"all",top:"20px",left:"-70px"};Pt.bottom>xt.bottom-150&&(ut.top="unset",ut.bottom="100%",ut.left="-100px"),Le.forEach(ni=>{ni.style.display="none",ni.style.pointerEvents="none"}),Object.assign(Qe.style,ut)},yr=ae=>{Ie.current=ae,le(j=>!j),C&&typeof C=="function"&&C(Ie.current)},xr=ae=>{U||ae.component.collapseAll(-1),Q&&typeof Q=="function"&&Q(ae)},zo=ae=>{ue&&typeof ue=="function"&&ue(ae)},Go=ae=>{ae.parentType==="filterRow"&&(ae.editorElement.onchange=j=>{const be={columnKey:ae.dataField,columnName:ae.caption,filterValue:j.target.value};N&&typeof N=="function"&&N(be)})},Uo=(ae,j)=>{const be=document.querySelector('div[data-grid-confirm-delete="true"]');be.style.display="grid",be.setAttribute("data-grid-confirm-row-data",JSON.stringify(j))},Ma=(ae,j)=>{B&&typeof B=="function"&&B(j)},Ko=()=>{const ae=document.querySelector('div[data-grid-confirm-delete="true"]'),j=ae.getAttribute("data-grid-confirm-row-data");S&&typeof S=="function"&&S(JSON.parse(j)),ae.style.display="none",ae.setAttribute("data-grid-confirm-row-data","")},il=()=>{const ae=document.querySelector('div[data-grid-confirm-delete="true"]');ae.style.display="none",ae.setAttribute("data-grid-confirm-row-data","")};ce.useEffect(()=>{V&&V.length&&it(ae=>{const j=ae;return V.forEach(be=>{j.some(Le=>Le.type===be.type)||j.push(be)}),j})},[V]),ce.useEffect(()=>{de&&(at.current.Refresh(),console.info("DataSource Refresh....."))},[de]),ce.useEffect(()=>{Z&&at.current.DeselectAll()},[Z]),ce.useEffect(()=>{if(Array.isArray(X)&&X.length>0){const ae=()=>{X.forEach(Le=>{document.querySelectorAll(`.dx-datagrid-rowsview .dx-row td:nth-child(${Le})`).forEach(bt=>{bt.style.overflow="unset"})})};ae();const j=new MutationObserver(()=>{ae()}),be=document.querySelector(".dx-datagrid-rowsview");return be&&j.observe(be,{childList:!0,subtree:!0}),()=>j.disconnect()}},[X]);const Va=()=>{const ae=ke.current.instance,j=ae.pageIndex();j>0&&ae.pageIndex(j-1)},xe=()=>{const ae=ke.current.instance,j=ae.pageIndex(),be=ae.pageCount();j<be-1&&ae.pageIndex(j+1)};return ce.useEffect(()=>{Ie.current=t,le(ae=>!ae)},[t]),ce.useEffect(()=>(document.addEventListener("click",jt),document.addEventListener("wheel",Ht),()=>{document.removeEventListener("click",jt),document.removeEventListener("wheel",Ht)}),[]),T.jsxs(T.Fragment,{children:[T.jsx("div",{className:r==="dark"?"dark":"","data-grid-confirm-delete":!0,style:{display:"none"},children:T.jsx(Gm,{visible:!0,options:{title:"Are You Sure You Want To Delete",type:"unsaved"},children:T.jsxs("div",{style:{marginTop:"2.25rem",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"},children:[T.jsx(fu,{label:"Cancel",size:"small",buttonStyle:{border:"0.0625rem solid #EF4343",backgroundColor:"transparent"},labelStyle:{color:"red"},onClick:il}),T.jsx(fu,{label:"Confirm",size:"small",onClick:Ko})]})})}),T.jsxs("div",{style:{height:"100%",position:"relative"},className:`gridWrapper __dx_DataGrid_Component__ light ${r&&!["dark","light"].includes(r)?"light":r}`,children:[(y||b&&(W==null?void 0:W.mode)==="multiple")&&T.jsxs("div",{className:"__dx_DataGrid_Toolbar",children:[T.jsx("div",{className:"__dx_DataGrid_Toolbar_Leftside",children:b&&(W==null?void 0:W.mode)==="multiple"&&T.jsx(Ole,{theme:r,ref:ii,onDeleteAll:Zt})}),T.jsx("div",{className:"__dx_DataGrid_Toolbar_Righttside",children:y&&T.jsx("div",{className:"column_configure_wrapper",children:T.jsx(_le,{theme:r,items:Ie.current.sort((ae,j)=>ae.orderIndex-j.orderIndex),change:ae=>yr(ae)})})})]}),T.jsx("div",{className:"custom-pagination-controls",style:{position:"absolute",bottom:"18px",right:"24px",zIndex:"100"},children:T.jsxs("button",{className:"custom-pagination-button",onClick:xe,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"," ",T.jsx("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.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"})})]})}),T.jsx("div",{className:"custom-pagination-controls",style:{position:"absolute",bottom:"18px",left:"24px",zIndex:"1000"},children:T.jsxs("button",{className:"custom-pagination-button",onClick:Va,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:[T.jsx("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.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"]})}),T.jsxs(Nk,{height:a||"100%",ref:ke,onRowPrepared:ht,onFocusedCellChanged:Ci,dataSource:u?Vi:e,remoteOperations:!0,keyExpr:n??"id",allowColumnReordering:!1,allowColumnResizing:L,columnAutoWidth:l,noDataText:ne??"No Data",showColumnLines:!1,showRowLines:!0,rowAlternationEnabled:s,showBorders:!1,hoverStateEnabled:!0,onEditorPreparing:Go,onEditingStart:ae=>Mt(ae,"onEditingStart"),onInitNewRow:ae=>Mt(ae,"onInitNewRow"),onRowInserting:ae=>Mt(ae,"onRowInserting"),onRowInserted:ae=>Mt(ae,"onRowInserted"),onRowUpdating:ae=>Mt(ae,"onRowUpdating"),onRowUpdated:ae=>Mt(ae,"onRowUpdated"),onRowRemoving:ae=>Mt(ae,"onRowRemoving"),onRowRemoved:ae=>Mt(ae,"onRowRemoved"),onSaving:ae=>Mt(ae,"onSaving"),onSaved:ae=>Mt(ae,"onSaved"),onEditCanceling:ae=>Mt(ae,"onEditCanceling"),onEditCanceled:ae=>Mt(ae,"onEditCanceled"),onContentReady:ae=>Mt(ae,"onContentReady"),onOptionChanged:ae=>_t(ae),focusedRowEnabled:o,autoNavigateToFocusedRow:!1,onFocusedRowChanging:je,onFocusedRowChanged:ct,onRowClick:Li,onRowExpanding:xr,onRowCollapsed:zo,onSelectionChanged:di,children:[d&&T.jsx(Wk,{autoExpandAll:c}),T.jsx(Xk,{mode:(W==null?void 0:W.mode)??"single",selectAllMode:(W==null?void 0:W.selectAllMode)??["allPages","page"][0],showCheckBoxesMode:"always"}),D&&T.jsx($k,{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}),T.jsx(Hk,{visible:(G==null?void 0:G.filterRow)??!1,applyFilter:"auto"}),T.jsx(Yk,{visible:(J==null?void 0:J.visible)??!1,width:(J==null?void 0:J.width)??256,placeholder:(J==null?void 0:J.placeholder)??"Search..."}),T.jsx(zk,{allowSearch:!0,visible:(G==null?void 0:G.headerFilter)??!1}),Ie&&Ie.current.map((ae,j)=>ae.group?T.jsx(jc,{groupIndex:0,dataField:ae.columnKey},j):T.jsx(jc,{dataField:ae.columnKey,caption:ae.columnName,alignment:ae.alignment?ae.alignment:ae.dataType==="number"?"right":"left",width:ae.width,visible:ae.visible,dataType:ae.dataType,format:ae.format==="date"?"M/d/yyyy, HH:mm":ae.dataType==="number"&&ae.fixedNumber?{type:"fixedPoint",precision:2}:ae.format,fixed:ae.fixed,cellRender:ae.template,selectedFilterOperation:ae.defaultFilterOperation,allowFiltering:ae.allowFiltering,allowHeaderFiltering:ae.allowHeaderFiltering,allowSorting:ae.allowSorting,allowEditing:ae.allowEditing,visibleIndex:ae.orderIndex,defaultSortOrder:ae.sortOrderType},j)),i&&i.length&&!u&&T.jsx(Nm,{children:i&&i.map((ae,j)=>T.jsx($m,{column:ae.column,summaryType:"custom",customizeText:ae.total},j))}),i&&i.length&&u&&T.jsx(Nm,{children:i.map((ae,j)=>T.jsx($m,{column:ae.column,summaryType:ae.summaryType,displayFormat:ae.displayFormat}))}),!!F&&qe&&qe.length&&T.jsx(jc,{dataField:null,caption:"Actions",alignment:"left",width:100,fixed:!1,fixedPosition:"right",allowFiltering:!1,allowSorting:!1,cellRender:ae=>{if(!P||P.length===0||P&&P.length>0&&!P.includes(ae.data[n]))return T.jsx(Ele,{theme:r,rowData:ae.data,rowID:ae.data[n],actions:qe.filter(j=>j.disabledForKeys&&j.disabledForKeys.length?!j.disabledForKeys.includes(ae.data[n]):j),hiddenActionTypes:[S?"":"delete",B?"":"edit"],onExpand:j=>{Wt(ae.data),ve&&typeof ve=="function"&&ve(ae.data)}})}}),A&&T.jsx(Uk,{enabled:!0,component:k}),T.jsx(Gk,{enabled:w}),T.jsx(qk,{useNative:!0,mode:K??"none"}),T.jsx(jk,{defaultPageIndex:q?q-1:null,defaultPageSize:H==null?void 0:H.defaultPageSize}),T.jsx(Kk,{visible:H==null?void 0:H.visible,allowedPageSizes:H==null?void 0:H.allowedPageSizes,showPageSizeSelector:H==null?void 0:H.showPageSizeSelector,showInfo:H==null?void 0:H.showInfo,showNavigationButtons:H==null?void 0:H.showNavigationButtons})]})]})]})},kle="Tabs-module__tabContainer",Ble="Tabs-module__vertical",Lle="Tabs-module__underline",Ple="Tabs-module__singleTab",Fle="Tabs-module__active",Mle="Tabs-module__button",Vle="Tabs-module__buttonBorder",Nle="Tabs-module__buttonMinimal",$le="Tabs-module__dark",Hle="Tabs-module__underLine",gs={tabContainer:kle,vertical:Ble,underline:Lle,singleTab:Ple,active:Fle,button:Mle,buttonBorder:Vle,buttonMinimal:Nle,dark:$le,underLine:Hle},Wle=({tabsData:e,type:t="underline",vertical:i=!1,onItemClick:n,tabContainerStyle:r,singleTabStyle:a,theme:o})=>{const[s,l]=ce.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 T.jsx("div",{style:r??{},className:`${o==="dark"?gs.dark:""} ${gs.tabContainer} ${gs[t]} ${i?gs.vertical:""}`,children:e.map(d=>T.jsx("p",{style:a??{},className:`${gs.singleTab} ${d.active?gs.active:""}`,onClick:()=>u(d),children:d.label?typeof d.label=="function"?d.label():d.label:""},d.id))})},zle="FileBlock-module__fileBlockWrapper",Gle="FileBlock-module__fileName",Ule="FileBlock-module__texts",Kle="FileBlock-module__deleteFile",jle="FileBlock-module__dark",Cs={fileBlockWrapper:zle,fileName:Gle,texts:Ule,deleteFile:Kle,dark:jle},qle=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",children:T.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"})}),Yle=({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 T.jsx("div",{className:`${e==="dark"?Cs.dark:""} ${Cs.fileBlockWrapper}`,style:n??{},children:T.jsxs("div",{className:Cs.fileName,style:r??{},children:[T.jsx("div",{style:{display:"flex",alignItems:"center"},children:u??T.jsx(qle,{})}),T.jsxs("div",{className:Cs.texts,style:a??{},children:[T.jsx("span",{title:t&&(t!=null&&t.fileName)?t.fileName:"-",style:o??{},children:t&&(t!=null&&t.fileName)?t.fileName:"-"}),T.jsx("span",{style:s??{},className:Cs.size,children:t&&(t!=null&&t.unitSize)?t==null?void 0:t.unitSize:""})]}),T.jsx("div",{className:Cs.deleteFile,onClick:d,children:l??T.jsx(zm,{width:16,color:"#A4A7AE"})})]})})},Xle="FileUploader-module__fileUploaderWrapper",Zle="FileUploader-module__fileUploaderContent",Jle="FileUploader-module__draganddrop",Qle="FileUploader-module__uploadSvg",eue="FileUploader-module__labels",tue="FileUploader-module__title",iue="FileUploader-module__subTitle",nue="FileUploader-module__uploadAction",rue="FileUploader-module__dark",Dr={fileUploaderWrapper:Xle,fileUploaderContent:Zle,draganddrop:Jle,uploadSvg:Qle,labels:eue,title:tue,subTitle:iue,uploadAction:nue,dark:rue},aue=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",children:T.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:"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),oue=({multiple:e=!0,onChange:t,maxSize:i,withFileValidation:n,acceptedFileFormats:r,title:a,subTitle:o,withResults:s=!0,onFormatError:l,onMaxSizeError:u,withIcon:d=!0,uploadIcon:c,fileUploaderWrapperStyle:h,fileUploaderContentStyle:f,draganddropStyle:p,labelsStyle:m,titleStyle:g,clickToUploadStyle:y,subTitleStyle:b,fileBlockWrapperStyle:A,fileNameStyle:k,textsStyle:D,nameStyle:K,sizeStyle:H,clearIcon:W,theme:G})=>{const q=ce.useRef(crypto.randomUUID()),[J,$]=ce.useState(!1),[Y,x]=ce.useState(!1),z=ce.useRef([]),ie=B=>{x(B)},ee=B=>{B.preventDefault(),ie(!0)},pe=B=>{B.preventDefault(),ie(!1)},de=B=>{B.preventDefault(),ie(!0)},Z=B=>{B.preventDefault(),S(B.dataTransfer.files),ie(!1)},V=B=>{z.current=z.current.filter((F,U)=>F.fileID!==B.fileID),$(F=>!F),I()},C=B=>{S(B.target.files)},I=()=>{t&&typeof t=="function"&&t(z.current)},S=async B=>{let F=B,U=[];for(let N=0;N<F.length;N++){let Q={fileName:F[N].name,size:F[N].size,unitSize:mP(F[N].size),type:F[N].type,format:gP(F[N].name),base64:await CP(F[N]),fileID:crypto.randomUUID()};if(n&&r&&!r.includes(Q.format.toLowerCase())){l&&typeof l=="function"&&l(Q.format.toLowerCase());return}i&&F[N].size>i?u&&typeof u=="function"&&u({Error:"Max_Size_Error",MaxSize:i}):U.push(Q)}e?z.current=[...z.current,...U]:(U=U.slice(-1),z.current=U),$(N=>!N),I()};return T.jsxs("div",{className:`${G==="dark"?Dr.dark:""} ${Dr.fileUploaderWrapper}`,style:h??{},children:[T.jsxs("div",{style:f??{},className:`${Dr.fileUploaderContent} `,onDragEnter:ee,onDragLeave:pe,onDragOver:de,onDrop:Z,children:[T.jsxs("div",{className:Dr.draganddrop,style:p??{},children:[d&&T.jsx("div",{className:Dr.uploadSvg,children:c||T.jsx(aue,{})}),T.jsxs("div",{className:`${Dr.labels} `,style:m??{},htmlFor:q.current,children:[a&&typeof a=="function"?a():T.jsx("p",{style:g??{},className:Dr.title,children:a||T.jsxs("div",{children:[T.jsx("span",{style:y??{},children:"Click to upload"})," or drag and drop"]})}),o&&typeof o=="function"?o():T.jsx("p",{style:b??{},className:Dr.subTitle,children:o??""})]})]}),T.jsx("div",{className:Dr.uploadAction,children:T.jsx("input",{type:"file",name:"",id:q.current,multiple:!!e,onChange:C,accept:""})})]}),z&&z.current&&z.current.length&&s?z.current.map((B,F)=>T.jsx(Yle,{theme:G,fileBlockWrapperStyle:A,fileNameStyle:k,textsStyle:D,nameStyle:K,sizeStyle:H,clearIcon:W,file:B,onDelete:V},F)):""]})},sue=()=>{const e=document.createElement("style");e.setAttribute("id","toast_notification_style_key"),e.innerHTML=`
|
|
328
|
+
`,children:f(p)&&f(p)!=="no_icon"?f(p):p==null?void 0:p.icon()}),T.jsx("div",{className:Xa.actionLabel,children:T.jsx("span",{style:{...p==null?void 0:p.style},children:p==null?void 0:p.label})})]},m))})]})},wle="DeleteAll-module__deleteAllWrapper",Ile="DeleteAll-module__iconContainer",Tle="DeleteAll-module__deleteItemsCountLabel",Ale="DeleteAll-module__dark",Dle="DeleteAll-module__datagridDeleteAllAction",Fl={deleteAllWrapper:wle,iconContainer:Ile,deleteItemsCountLabel:Tle,dark:Ale,datagridDeleteAllAction:Dle},Ole=ce.forwardRef((e,t)=>{const[i,n]=ce.useState(0),r=o=>{n(o)};ce.useImperativeHandle(t,()=>({setValue:r}));const a=()=>{e.onDeleteAll&&typeof e.onDeleteAll=="function"&&e.onDeleteAll()};return T.jsxs("div",{ref:t,className:`${(e==null?void 0:e.theme)==="dark"?Fl.dark:""} ${Fl.datagridDeleteAllAction} ${Fl.deleteAllWrapper}`,children:[T.jsx("div",{className:Fl.iconContainer,onClick:a,children:T.jsx(Zk,{})}),T.jsx("div",{className:Fl.deleteItemsCountLabel,children:T.jsxs("span",{children:["Delete ",i," Checked Item"]})})]})}),Rle=({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:m,removeFunction:g,withColumnConfigure:y,withDeleteAll:b,withMasterDetail:A,detailTemplate:k,editingOptions:D,scrollMode:K,pagerOptions:H,selection:W,filterOptions:G,defaultPageIndex:q,searchPanel:J,onEvent:$,onPageChange:Y,selectionChanged:x,focusedRowChanging:z,focusedRowChanged:ie,onRowClick:ee,onWheelClick:pe,refresh:de,diselectAll:Z,customActions:V,onColumnConfigure:C,onDeleteAll:I,onDelete:S,onEdit:B,withCustomActions:F,multiExpand:U,onFilterValueChange:N,onRowExpand:Q,onRowCollaps:ue,onOptionChanged:ge,onRowPrepared:te,onFocusedCellChanged:we,ShowLoader:w=!0,noDataText:ne,onLoading:oe,hideActions:P,allowColumnResizing:L=!0,disableOverflow:X,onActionExpand:ve})=>{const[me,le]=ce.useState(!1),Ie=ce.useRef(t),ke=ce.useRef(null),[Ae,Ne]=ce.useState(""),at=ce.useRef({Refresh:()=>ke.current.instance.getDataSource().reload(),SelectedRowKeys:()=>ke.current.instance.getSelectedRowKeys(),DeselectAll:()=>{var ae;return(ae=ke.current)==null?void 0:ae.instance.deselectAll()}}),[qe,it]=ce.useState([{label:"Edit",type:"edit",event:(ae,j)=>Ma(ae,j)},{label:"Delete",type:"delete",event:(ae,j)=>Uo(ae,j)}]),ii=ce.useRef(null),jt=ae=>{qe&&qe.length&&vt()},Ht=()=>{qe&&qe.length&&vt()},vt=()=>{document.querySelectorAll(".datagrid_action_data_controller > ul").forEach(j=>{j.style.display="none",j.style.pointerEvents="none"})},Vi=new Ws({key:h??"id",load:f,update:p,insert:m,remove:g,onLoading:oe}),Mt=(ae,j)=>{$&&typeof $=="function"&&$(j,ae)},di=ae=>{o&&(W==null?void 0:W.mode)==="multiple"&&b&&ii.current.setValue(ae.selectedRowKeys.length),x&&typeof x=="function"&&x(ae)},je=ae=>{z&&typeof z=="function"&&z(ae)},ct=ae=>{ie&&typeof ie=="function"&&ie(ae)},Ci=ae=>{we&&typeof we=="function"&&we(ae)},Li=ae=>{ee&&typeof ee=="function"&&ee(ae.data)},We=(ae,j)=>{ae.button===1&&(pe&&typeof pe=="function"&&pe(j.data),ae.preventDefault())},ht=ae=>{ae.rowElement&&ae.data&&ae.rowElement.addEventListener("mousedown",j=>We(j,ae)),te&&typeof te=="function"&&te(ae)},Zt=()=>{I&&typeof I=="function"&&I(at.current.SelectedRowKeys())},_t=ae=>{ge&&typeof ge=="function"&&ge(ae),ae.fullName==="paging.pageIndex"&&Y&&typeof Y=="function"&&Y(ae.value+1)},Wt=ae=>{let be=document.querySelector(`#datagrid_action_data_id_${ae[n]}`),Le=document.querySelectorAll(".datagrid_action_data_controller > ul"),Qe=be.querySelector("ul");const bt=document.querySelectorAll(".dx-datagrid-rowsview .dx-row > td");bt&&bt.forEach(ni=>{ni.querySelector("ul")?ni.style.overflow="unset":ni.style.overflow="hidden"});const Pt=be.getBoundingClientRect(),xt=document.querySelector(".gridWrapper").getBoundingClientRect();let ut={display:"block",position:"absolute",pointerEvents:"all",top:"20px",left:"-70px"};Pt.bottom>xt.bottom-150&&(ut.top="unset",ut.bottom="100%",ut.left="-100px"),Le.forEach(ni=>{ni.style.display="none",ni.style.pointerEvents="none"}),Object.assign(Qe.style,ut)},yr=ae=>{Ie.current=ae,le(j=>!j),C&&typeof C=="function"&&C(Ie.current)},xr=ae=>{U||ae.component.collapseAll(-1),Q&&typeof Q=="function"&&Q(ae)},zo=ae=>{ue&&typeof ue=="function"&&ue(ae)},Go=ae=>{ae.parentType==="filterRow"&&(ae.editorElement.onchange=j=>{const be={columnKey:ae.dataField,columnName:ae.caption,filterValue:j.target.value};N&&typeof N=="function"&&N(be)})},Uo=(ae,j)=>{const be=document.querySelector('div[data-grid-confirm-delete="true"]');be.style.display="grid",be.setAttribute("data-grid-confirm-row-data",JSON.stringify(j))},Ma=(ae,j)=>{B&&typeof B=="function"&&B(j)},Ko=()=>{const ae=document.querySelector('div[data-grid-confirm-delete="true"]'),j=ae.getAttribute("data-grid-confirm-row-data");S&&typeof S=="function"&&S(JSON.parse(j)),ae.style.display="none",ae.setAttribute("data-grid-confirm-row-data","")},il=()=>{const ae=document.querySelector('div[data-grid-confirm-delete="true"]');ae.style.display="none",ae.setAttribute("data-grid-confirm-row-data","")};ce.useEffect(()=>{V&&V.length&&it(ae=>{const j=ae;return V.forEach(be=>{j.some(Le=>Le.type===be.type)||j.push(be)}),j})},[V]),ce.useEffect(()=>{de&&(at.current.Refresh(),console.info("DataSource Refresh....."))},[de]),ce.useEffect(()=>{Z&&at.current.DeselectAll()},[Z]),ce.useEffect(()=>{if(Array.isArray(X)&&X.length>0){const ae=()=>{X.forEach(Le=>{document.querySelectorAll(`.dx-datagrid-rowsview .dx-row td:nth-child(${Le})`).forEach(bt=>{bt.style.overflow="unset"})})};ae();const j=new MutationObserver(()=>{ae()}),be=document.querySelector(".dx-datagrid-rowsview");return be&&j.observe(be,{childList:!0,subtree:!0}),()=>j.disconnect()}},[X]);const Va=()=>{const ae=ke.current.instance,j=ae.pageIndex();j>0&&ae.pageIndex(j-1)},xe=()=>{const ae=ke.current.instance,j=ae.pageIndex(),be=ae.pageCount();j<be-1&&ae.pageIndex(j+1)};return ce.useEffect(()=>{Ie.current=t,le(ae=>!ae)},[t]),ce.useEffect(()=>(document.addEventListener("click",jt),document.addEventListener("wheel",Ht),()=>{document.removeEventListener("click",jt),document.removeEventListener("wheel",Ht)}),[]),T.jsxs(T.Fragment,{children:[T.jsx("div",{className:r==="dark"?"dark":"","data-grid-confirm-delete":!0,style:{display:"none"},children:T.jsx(Gm,{visible:!0,options:{title:"Are You Sure You Want To Delete",type:"unsaved"},children:T.jsxs("div",{style:{marginTop:"2.25rem",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"},children:[T.jsx(fu,{label:"Cancel",size:"small",buttonStyle:{border:"0.0625rem solid #EF4343",backgroundColor:"transparent"},labelStyle:{color:"red"},onClick:il}),T.jsx(fu,{label:"Confirm",size:"small",onClick:Ko})]})})}),T.jsxs("div",{style:{height:"100%",position:"relative"},className:`gridWrapper __dx_DataGrid_Component__ light ${r&&!["dark","light"].includes(r)?"light":r}`,children:[(y||b&&(W==null?void 0:W.mode)==="multiple")&&T.jsxs("div",{className:"__dx_DataGrid_Toolbar",children:[T.jsx("div",{className:"__dx_DataGrid_Toolbar_Leftside",children:b&&(W==null?void 0:W.mode)==="multiple"&&T.jsx(Ole,{theme:r,ref:ii,onDeleteAll:Zt})}),T.jsx("div",{className:"__dx_DataGrid_Toolbar_Righttside",children:y&&T.jsx("div",{className:"column_configure_wrapper",children:T.jsx(_le,{theme:r,items:Ie.current.sort((ae,j)=>ae.orderIndex-j.orderIndex),change:ae=>yr(ae)})})})]}),T.jsx("div",{className:"custom-pagination-controls",style:{position:"absolute",bottom:"18px",right:"24px",zIndex:"100"},children:T.jsxs("button",{className:"custom-pagination-button",onClick:xe,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"," ",T.jsx("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.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"})})]})}),T.jsx("div",{className:"custom-pagination-controls",style:{position:"absolute",bottom:"18px",left:"24px",zIndex:"100"},children:T.jsxs("button",{className:"custom-pagination-button",onClick:Va,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:[T.jsx("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.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"]})}),T.jsxs(Nk,{height:a||"100%",ref:ke,onRowPrepared:ht,onFocusedCellChanged:Ci,dataSource:u?Vi:e,remoteOperations:!0,keyExpr:n??"id",allowColumnReordering:!1,allowColumnResizing:L,columnAutoWidth:l,noDataText:ne??"No Data",showColumnLines:!1,showRowLines:!0,rowAlternationEnabled:s,showBorders:!1,hoverStateEnabled:!0,onEditorPreparing:Go,onEditingStart:ae=>Mt(ae,"onEditingStart"),onInitNewRow:ae=>Mt(ae,"onInitNewRow"),onRowInserting:ae=>Mt(ae,"onRowInserting"),onRowInserted:ae=>Mt(ae,"onRowInserted"),onRowUpdating:ae=>Mt(ae,"onRowUpdating"),onRowUpdated:ae=>Mt(ae,"onRowUpdated"),onRowRemoving:ae=>Mt(ae,"onRowRemoving"),onRowRemoved:ae=>Mt(ae,"onRowRemoved"),onSaving:ae=>Mt(ae,"onSaving"),onSaved:ae=>Mt(ae,"onSaved"),onEditCanceling:ae=>Mt(ae,"onEditCanceling"),onEditCanceled:ae=>Mt(ae,"onEditCanceled"),onContentReady:ae=>Mt(ae,"onContentReady"),onOptionChanged:ae=>_t(ae),focusedRowEnabled:o,autoNavigateToFocusedRow:!1,onFocusedRowChanging:je,onFocusedRowChanged:ct,onRowClick:Li,onRowExpanding:xr,onRowCollapsed:zo,onSelectionChanged:di,children:[d&&T.jsx(Wk,{autoExpandAll:c}),T.jsx(Xk,{mode:(W==null?void 0:W.mode)??"single",selectAllMode:(W==null?void 0:W.selectAllMode)??["allPages","page"][0],showCheckBoxesMode:"always"}),D&&T.jsx($k,{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}),T.jsx(Hk,{visible:(G==null?void 0:G.filterRow)??!1,applyFilter:"auto"}),T.jsx(Yk,{visible:(J==null?void 0:J.visible)??!1,width:(J==null?void 0:J.width)??256,placeholder:(J==null?void 0:J.placeholder)??"Search..."}),T.jsx(zk,{allowSearch:!0,visible:(G==null?void 0:G.headerFilter)??!1}),Ie&&Ie.current.map((ae,j)=>ae.group?T.jsx(jc,{groupIndex:0,dataField:ae.columnKey},j):T.jsx(jc,{dataField:ae.columnKey,caption:ae.columnName,alignment:ae.alignment?ae.alignment:ae.dataType==="number"?"right":"left",width:ae.width,visible:ae.visible,dataType:ae.dataType,format:ae.format==="date"?"M/d/yyyy, HH:mm":ae.dataType==="number"&&ae.fixedNumber?{type:"fixedPoint",precision:2}:ae.format,fixed:ae.fixed,cellRender:ae.template,selectedFilterOperation:ae.defaultFilterOperation,allowFiltering:ae.allowFiltering,allowHeaderFiltering:ae.allowHeaderFiltering,allowSorting:ae.allowSorting,allowEditing:ae.allowEditing,visibleIndex:ae.orderIndex,defaultSortOrder:ae.sortOrderType},j)),i&&i.length&&!u&&T.jsx(Nm,{children:i&&i.map((ae,j)=>T.jsx($m,{column:ae.column,summaryType:"custom",customizeText:ae.total},j))}),i&&i.length&&u&&T.jsx(Nm,{children:i.map((ae,j)=>T.jsx($m,{column:ae.column,summaryType:ae.summaryType,displayFormat:ae.displayFormat}))}),!!F&&qe&&qe.length&&T.jsx(jc,{dataField:null,caption:"Actions",alignment:"left",width:100,fixed:!1,fixedPosition:"right",allowFiltering:!1,allowSorting:!1,cellRender:ae=>{if(!P||P.length===0||P&&P.length>0&&!P.includes(ae.data[n]))return T.jsx(Ele,{theme:r,rowData:ae.data,rowID:ae.data[n],actions:qe.filter(j=>j.disabledForKeys&&j.disabledForKeys.length?!j.disabledForKeys.includes(ae.data[n]):j),hiddenActionTypes:[S?"":"delete",B?"":"edit"],onExpand:j=>{Wt(ae.data),ve&&typeof ve=="function"&&ve(ae.data)}})}}),A&&T.jsx(Uk,{enabled:!0,component:k}),T.jsx(Gk,{enabled:w}),T.jsx(qk,{useNative:!0,mode:K??"none"}),T.jsx(jk,{defaultPageIndex:q?q-1:null,defaultPageSize:H==null?void 0:H.defaultPageSize}),T.jsx(Kk,{visible:H==null?void 0:H.visible,allowedPageSizes:H==null?void 0:H.allowedPageSizes,showPageSizeSelector:H==null?void 0:H.showPageSizeSelector,showInfo:H==null?void 0:H.showInfo,showNavigationButtons:H==null?void 0:H.showNavigationButtons})]})]})]})},kle="Tabs-module__tabContainer",Ble="Tabs-module__vertical",Lle="Tabs-module__underline",Ple="Tabs-module__singleTab",Fle="Tabs-module__active",Mle="Tabs-module__button",Vle="Tabs-module__buttonBorder",Nle="Tabs-module__buttonMinimal",$le="Tabs-module__dark",Hle="Tabs-module__underLine",gs={tabContainer:kle,vertical:Ble,underline:Lle,singleTab:Ple,active:Fle,button:Mle,buttonBorder:Vle,buttonMinimal:Nle,dark:$le,underLine:Hle},Wle=({tabsData:e,type:t="underline",vertical:i=!1,onItemClick:n,tabContainerStyle:r,singleTabStyle:a,theme:o})=>{const[s,l]=ce.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 T.jsx("div",{style:r??{},className:`${o==="dark"?gs.dark:""} ${gs.tabContainer} ${gs[t]} ${i?gs.vertical:""}`,children:e.map(d=>T.jsx("p",{style:a??{},className:`${gs.singleTab} ${d.active?gs.active:""}`,onClick:()=>u(d),children:d.label?typeof d.label=="function"?d.label():d.label:""},d.id))})},zle="FileBlock-module__fileBlockWrapper",Gle="FileBlock-module__fileName",Ule="FileBlock-module__texts",Kle="FileBlock-module__deleteFile",jle="FileBlock-module__dark",Cs={fileBlockWrapper:zle,fileName:Gle,texts:Ule,deleteFile:Kle,dark:jle},qle=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",children:T.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"})}),Yle=({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 T.jsx("div",{className:`${e==="dark"?Cs.dark:""} ${Cs.fileBlockWrapper}`,style:n??{},children:T.jsxs("div",{className:Cs.fileName,style:r??{},children:[T.jsx("div",{style:{display:"flex",alignItems:"center"},children:u??T.jsx(qle,{})}),T.jsxs("div",{className:Cs.texts,style:a??{},children:[T.jsx("span",{title:t&&(t!=null&&t.fileName)?t.fileName:"-",style:o??{},children:t&&(t!=null&&t.fileName)?t.fileName:"-"}),T.jsx("span",{style:s??{},className:Cs.size,children:t&&(t!=null&&t.unitSize)?t==null?void 0:t.unitSize:""})]}),T.jsx("div",{className:Cs.deleteFile,onClick:d,children:l??T.jsx(zm,{width:16,color:"#A4A7AE"})})]})})},Xle="FileUploader-module__fileUploaderWrapper",Zle="FileUploader-module__fileUploaderContent",Jle="FileUploader-module__draganddrop",Qle="FileUploader-module__uploadSvg",eue="FileUploader-module__labels",tue="FileUploader-module__title",iue="FileUploader-module__subTitle",nue="FileUploader-module__uploadAction",rue="FileUploader-module__dark",Dr={fileUploaderWrapper:Xle,fileUploaderContent:Zle,draganddrop:Jle,uploadSvg:Qle,labels:eue,title:tue,subTitle:iue,uploadAction:nue,dark:rue},aue=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",children:T.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:"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),oue=({multiple:e=!0,onChange:t,maxSize:i,withFileValidation:n,acceptedFileFormats:r,title:a,subTitle:o,withResults:s=!0,onFormatError:l,onMaxSizeError:u,withIcon:d=!0,uploadIcon:c,fileUploaderWrapperStyle:h,fileUploaderContentStyle:f,draganddropStyle:p,labelsStyle:m,titleStyle:g,clickToUploadStyle:y,subTitleStyle:b,fileBlockWrapperStyle:A,fileNameStyle:k,textsStyle:D,nameStyle:K,sizeStyle:H,clearIcon:W,theme:G})=>{const q=ce.useRef(crypto.randomUUID()),[J,$]=ce.useState(!1),[Y,x]=ce.useState(!1),z=ce.useRef([]),ie=B=>{x(B)},ee=B=>{B.preventDefault(),ie(!0)},pe=B=>{B.preventDefault(),ie(!1)},de=B=>{B.preventDefault(),ie(!0)},Z=B=>{B.preventDefault(),S(B.dataTransfer.files),ie(!1)},V=B=>{z.current=z.current.filter((F,U)=>F.fileID!==B.fileID),$(F=>!F),I()},C=B=>{S(B.target.files)},I=()=>{t&&typeof t=="function"&&t(z.current)},S=async B=>{let F=B,U=[];for(let N=0;N<F.length;N++){let Q={fileName:F[N].name,size:F[N].size,unitSize:mP(F[N].size),type:F[N].type,format:gP(F[N].name),base64:await CP(F[N]),fileID:crypto.randomUUID()};if(n&&r&&!r.includes(Q.format.toLowerCase())){l&&typeof l=="function"&&l(Q.format.toLowerCase());return}i&&F[N].size>i?u&&typeof u=="function"&&u({Error:"Max_Size_Error",MaxSize:i}):U.push(Q)}e?z.current=[...z.current,...U]:(U=U.slice(-1),z.current=U),$(N=>!N),I()};return T.jsxs("div",{className:`${G==="dark"?Dr.dark:""} ${Dr.fileUploaderWrapper}`,style:h??{},children:[T.jsxs("div",{style:f??{},className:`${Dr.fileUploaderContent} `,onDragEnter:ee,onDragLeave:pe,onDragOver:de,onDrop:Z,children:[T.jsxs("div",{className:Dr.draganddrop,style:p??{},children:[d&&T.jsx("div",{className:Dr.uploadSvg,children:c||T.jsx(aue,{})}),T.jsxs("div",{className:`${Dr.labels} `,style:m??{},htmlFor:q.current,children:[a&&typeof a=="function"?a():T.jsx("p",{style:g??{},className:Dr.title,children:a||T.jsxs("div",{children:[T.jsx("span",{style:y??{},children:"Click to upload"})," or drag and drop"]})}),o&&typeof o=="function"?o():T.jsx("p",{style:b??{},className:Dr.subTitle,children:o??""})]})]}),T.jsx("div",{className:Dr.uploadAction,children:T.jsx("input",{type:"file",name:"",id:q.current,multiple:!!e,onChange:C,accept:""})})]}),z&&z.current&&z.current.length&&s?z.current.map((B,F)=>T.jsx(Yle,{theme:G,fileBlockWrapperStyle:A,fileNameStyle:k,textsStyle:D,nameStyle:K,sizeStyle:H,clearIcon:W,file:B,onDelete:V},F)):""]})},sue=()=>{const e=document.createElement("style");e.setAttribute("id","toast_notification_style_key"),e.innerHTML=`
|
|
329
329
|
.notifications_wrapper{
|
|
330
330
|
position: fixed;
|
|
331
331
|
z-index: 9999999;
|
|
@@ -72452,7 +72452,7 @@ const hle = "ColumnConfigure-module__configureWrapper", fle = "ColumnConfigure-m
|
|
|
72452
72452
|
]
|
|
72453
72453
|
}
|
|
72454
72454
|
) }),
|
|
72455
|
-
/* @__PURE__ */ T.jsx("div", { className: "custom-pagination-controls", style: { position: "absolute", bottom: "18px", left: "24px", zIndex: "
|
|
72455
|
+
/* @__PURE__ */ T.jsx("div", { className: "custom-pagination-controls", style: { position: "absolute", bottom: "18px", left: "24px", zIndex: "100" }, children: /* @__PURE__ */ T.jsxs(
|
|
72456
72456
|
"button",
|
|
72457
72457
|
{
|
|
72458
72458
|
className: "custom-pagination-button",
|