asma-core-ui 2.20.28 → 2.20.29

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.
@@ -220,4 +220,4 @@ function t$(e,t){return"function"==typeof e?e(t):e}function n$(e,t){return n=>{t
220
220
  *
221
221
  * @license MIT
222
222
  */
223
- function Y$(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}function Z$({table:e,stickyHeader:t=!1,hideHeader:n=!1}){return Te.jsxs("thead",{className:mo("table-header-group z-50 bg-[#fcfcfd] cursor-default",n&&"h-0 opacity-0"),style:t&&{position:"sticky",top:-.2}||{},children:[Te.jsx(X$,{}),e.getHeaderGroups().map((e=>Te.jsx("tr",{children:e.headers.map((e=>{var t;let o=e.getSize();o&&(o=`min-w-[${o}px] w-[${o}px] max-w-[${o}px]`);const r="actions"===(null==(t=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}(e.headerGroup.headers))?void 0:t.id),i=e.headerGroup.headers[e.headerGroup.headers.length-(r?2:1)];((null==i?void 0:i.id)===e.id||!o)&&(o="w-full");let l="";return"actions"===e.column.id&&(l="sticky bg-transparent right-0"),Te.jsx("th",{colSpan:e.colSpan,className:MD(o,"px-2.5 py-0","text-delta-500 bg-transparent border-none text-start text-[10px] font-semibold uppercase justify-start",l),style:{maxWidth:e.column.columnDef.maxSize,minWidth:e.column.columnDef.minSize},children:e.isPlaceholder?null:Te.jsxs("div",{className:mo("flex items-center justify-left",n?"h-0":"h-[30px]",e.column.getCanSort()||"actions"===e.column.id?"cursor-pointer select-none":"",e.column.columnDef.className),onClick:e.column.getToggleSortingHandler(),children:[Y$(e.column.columnDef.header,e.getContext()),{asc:Te.jsx(_l,{className:"text-delta-800"}),desc:Te.jsx(Dl,{className:"text-delta-800"})}[e.column.getIsSorted()]??null]})},e.id)}))},e.id))),Te.jsx(X$,{})]})}const X$=()=>Te.jsx("tr",{className:"bg-[#fcfcfd] w-full relative table-row",children:Te.jsx("th",{className:"w-[calc(100%-1px)] p-0 bg-[#fcfcfd] border-b-solid border-t-transparent border-x-0 border-[0.5px] border-b-delta-300 h-full absolute-center"})});const Q$=e=>Te.jsx(O,{...e});function J$({tableData:e,actions:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=jV();return Te.jsxs("div",{className:"flex justify-center items-center",children:[Te.jsx(jR,{dataTest:"test",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:Te.jsx(Ml,{className:"!text-delta-800",width:20,height:20})}),Te.jsx(Q$,{open:o,anchorEl:n,onClose:r,onClick:r,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:t(e.row).filter((e=>!e.hide)).map((t=>Te.jsx(HV,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label},t.label)))})]})}function ez({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=jV();return Te.jsxs("div",{className:"w-full flex items-center justify-end ",children:[Te.jsx("div",{className:"px-2.5 h-[30px] flex items-center justify-center",onClick:r,children:Te.jsx(Qi,{icon:"mdi:pin",className:"text-delta-500 hover:text-delta-600 min-w-[20px] min-h-[20px]"})}),Te.jsx(Q$,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==QV)).map((e=>e.columnDef.header?Te.jsxs(HV,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[Te.jsx(MN,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}function tz({columns:e,expandArrow:t,enableRowSelection:n,headerPin:o,actions:r,customActionsNode:i}){!e.find((e=>"actions"===e.id))&&(r||i||o)&&e.push(function(e){const{headerPin:t,actions:n,customActionsNode:o}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?Te.jsx(ez,{headerData:e}):null,cell:e=>n||o?Te.jsxs("div",{className:"flex gap-2 items-center justify-end",children:[o&&(null==o?void 0:o(e)),n&&Te.jsx(J$,{tableData:e,actions:n})]}):null,size:50}}({headerPin:o||!1,actions:r,customActionsNode:i})),n&&!e.find((e=>e.id===QV))&&e.unshift({id:QV,minSize:40,maxSize:40,size:40,header:({table:e})=>Te.jsx("div",{className:"w-[25px]",children:Te.jsx(MN,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()})}),cell:({cell:e})=>Te.jsx("div",{className:"w-[25px]",children:Te.jsx(MN,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})})}),t&&!e.find((e=>e.id===JV))&&e.unshift({id:JV,minSize:40,maxSize:40,size:40,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const t=e.row.getIsExpanded();return e.row.getCanExpand()?Te.jsx("span",{className:"flex w-fit h-fit px-2 bg-transparent outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),children:t?Te.jsx($l,{width:24,height:24}):Te.jsx(Vl,{width:24,height:24})}):null}})}function nz({table:e,locale:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=jV(),l="no"===t,a=()=>{var e;const t=document.querySelectorAll('[data-index="0"]');null==(e=null==t?void 0:t[0])||e.scrollIntoView({behavior:"smooth",block:"end",inline:"end"})},s=e.getPageCount(),u=e.getState().pagination.pageIndex+1,c=Array.from({length:s},((e,t)=>t+1));return s>1?Te.jsxs("div",{className:"w-fit animate-opacity-in-5 justify-end flex items-center bg-transparent gap-2",children:[Te.jsx(yr,{title:l?"Nåværende side":"Current Page",children:Te.jsx("div",{children:Te.jsxs(jR,{variant:"outlined",dataTest:"list-pages",className:"w-[134px]",onClick:e=>{i(e)},endIcon:o?Te.jsx($l,{height:24,width:24}):Te.jsx(Vl,{height:24,width:24}),children:[l?"Side":"Page"," ",u," ",l?"av":"of"," ",s]})})}),Te.jsx(Q$,{open:o,anchorEl:n,onClose:r,anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},children:Te.jsx("div",{className:"max-h-[200px] w-[134px] overflow-auto",children:c.map((t=>Te.jsxs("div",{className:mo("h-[36px] relative flex items-center pl-10 cursor-pointer hover:bg-delta-50",u===t&&"bg-gama-50"),onClick:()=>{e.setPageIndex(t-1),r(),a()},children:[u===t&&Te.jsx(Hl,{className:"absolute left-2 top-1 text-gama-500",height:24,width:24}),Te.jsxs("span",{children:[l?"Side":"Page"," ",t]})]},t)))})}),Te.jsx(yr,{title:1===u?"":l?"Forrige side":"Previous Page",children:Te.jsx("div",{children:Te.jsx(jR,{variant:"outlined",dataTest:"pagination-ChevronLeftIcon",startIcon:Te.jsx(il,{height:24,width:24}),onClick:()=>{e.previousPage(),a()},disabled:!e.getCanPreviousPage()})})}),Te.jsx(yr,{title:u===s?"":l?"Neste side":"Next Page",children:Te.jsx("div",{children:Te.jsx(jR,{variant:"outlined",dataTest:"pagination-ChevronRightIcon",startIcon:Te.jsx(rl,{height:24,width:24}),onClick:()=>{e.nextPage(),a()},disabled:!e.getCanNextPage()})})})]}):null}function oz({table:e,locale:t,children:n}){return Te.jsxs("div",{className:"w-full gap-2 bg-transparent flex flex-row py-1 my-1 items-center justify-end ",children:[n,Te.jsx(nz,{table:e,locale:t})]})}const rz=({actions:t,columns:n,data:o,customSubRowData:r,initialState:i,enableRowSelection:l,headerPin:a=!0,loading:s,noRowsOverlay:u,tableInstanceRef:c,className:d,rowHeight:p,tdClassName:f,getRowClassName:h,onRowClick:m,renderSubRows:g,customActionsNode:v,focusable:y,stickyHeader:w,expandArrow:x,height:C,locale:O="en",footer:k,hideHeader:S,hideFooter:E,...R})=>{tz({columns:n,expandArrow:x,enableRowSelection:l,headerPin:a,actions:t,customActionsNode:v});const T=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:B$(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({...R,columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:50},columnVisibility:{...null==i?void 0:i.columnVisibility,[QV]:!1},...i},enableRowSelection:l,getCoreRowModel:e=>r$((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=U$(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>r$((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?K$(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>r$((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return G$(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>r$((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getPaginationRowModel:e=>r$((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:i,flatRows:l,rowsById:a}=n;const s=o*r,u=s+o;let c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:l,rowsById:a}:K$({rows:i,flatRows:l,rowsById:a}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),{key:"development"===process.env.NODE_ENV&&"getPaginationRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getRowId:R.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString())});c&&(c.current=T);const N=E?T.getCoreRowModel().rows:T.getRowModel().rows;return Te.jsxs("div",{children:[Te.jsx("div",{className:mo("overflow-auto w-full",d),style:{height:C},children:Te.jsxs("table",{className:mo("table box-border border-collapse animate-opacity-appear-3 border-spacing-[1px] max-w-[inherit] m-0 w-[calc(100%-5px)]"),children:[!s&&Te.jsx(Z$,{table:T,stickyHeader:w,hideHeader:S}),Te.jsxs("tbody",{className:"table-row-group align-middle max-w-[inherit]",children:[o.length>0&&s?Te.jsx(Il,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-gama-500 z-10",width:50,height:50}):null,0===o.length&&s?Te.jsx(Te.Fragment,{children:Array.from({length:5}).map(((e,t)=>Te.jsx("tr",{children:Te.jsx("td",{colSpan:n.length,children:Te.jsx(ne,{variant:"text",width:"100%",height:50},t)})},t)))}):o.length>0?N.map(((e,t)=>((e,t)=>Te.jsxs(b,{children:[Te.jsx("tr",{"data-index":t,"data-test":e.id,id:e.id,tabIndex:y?-1:void 0,className:mo("table-row align-middle group border-solid border-x border-t border-b-0 last:border-b-transparent first:border-t-transparent border-x-transparent border-y-delta-300 hover:cursor-pointer hover:bg-gama-25 focus:bg-gama-50 focus:border focus:border-gama-500",(e.getIsExpanded()||e.getIsSelected())&&"bg-gama-50",s&&"opacity-50",null==h?void 0:h(e)),style:{height:p?`${p}px`:"inherit"},onMouseDown:t=>{t.target.classList.contains("MuiModal-backdrop")||"INPUT"===t.target.nodeName||"BUTTON"===t.target.nodeName||(e.getCanExpand()&&!x&&e.getToggleExpandedHandler()(),m&&m(t,e))},children:e.getVisibleCells().map((t=>{const n="actions"===t.column.id;return Te.jsx("td",{className:MD("break-words table-cell align-middle text-sm text-delta-900 whitespace-pre-wrap","px-2.5 py-0",f,n&&"bg-white sticky right-0 group-hover:bg-gama-25",n&&(null==h?void 0:h(e))),children:Y$(t.column.columnDef.cell,t.getContext())},t.id)}))}),e.getIsExpanded()&&Te.jsx(Te.Fragment,{children:r&&g&&g({rows:r.get(e.original.id.toString())??[],row:e.original})})]},e.id))(e,t))):Te.jsx("tr",{className:"h-28",children:Te.jsx("td",{colSpan:n.length,className:"text-center align-middle text-sm text-delta-900",children:u})})]})]})}),!E&&Te.jsx(oz,{table:T,locale:O,children:null==k?void 0:k(T)})]})},iz="_title_17oo0_1",lz=function(e){return Te.jsx("div",{className:iz,children:e.children})},az=function(e){return Te.jsx("h1",{"data-test":e.dataTest,className:"font-roboto md:mb-2 mb-5 text-2xl font-bold leading-10 text-[#17232E]",children:e.children})},sz=()=>{const[e,t]=l(null),n=()=>{t((()=>null))};return{anchorEl:e,onClose:n,onAnchorClick:o=>{e?n():(e=>{t((()=>e.currentTarget))})(o)}}},uz=({filterIsActive:e,popoverContent:t,dataTest:n,disabled:o,size:r="large",variant:i="outlined"})=>{const{onAnchorClick:l,onClose:a,anchorEl:s}=sz();return Te.jsxs(Te.Fragment,{children:[Te.jsxs("div",{className:"w-fit h-fit relative",children:[Te.jsx(jR,{disabled:o,variant:i,startIcon:Te.jsx(Ql,{width:"large"===r?24:20,height:"large"===r?24:20}),onClick:l,size:r,dataTest:n,children:"Filter"}),e&&Te.jsx("div",{className:mo("h-2 w-2 bg-gama-400 rounded-full absolute","large"===r?"top-2 right-2":"top-1 right-1")})]}),Te.jsx(Q$,{open:!!s,anchorEl:s,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:"my-1",children:t})]})},cz=({onCloseText:e,onMinimizeText:t,onExpandText:n,showCloseIcon:o=!0,showMinimizeIcon:r=!0,showExpandIcon:i=!0,title:a,label:s,children:u,open:c,onClose:d,className:p="",primaryButtonText:f,secondaryButtonText:h,onPrimaryButtonClick:m,onSecondaryButtonClick:g,dataTest:b})=>{const[v,y]=l(!1),w=()=>{y(!v)};return c?v?Te.jsx("div",{className:"fixed bottom-4 right-4 z-[51] w-[387px] rounded-lg bg-white py-2 pl-4 pr-3 shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",children:Te.jsxs("div",{className:"flex items-center justify-between","data-test":b,children:[Te.jsx("div",{className:"truncate text-lg font-semibold text-delta-800",children:a}),Te.jsxs("div",{className:"flex gap-x-1",children:[Te.jsx("div",{className:"flex items-center gap-x-2",children:Te.jsx(jR,{dataTest:"minimize-button",variant:"text",size:"small",onClick:w,endIcon:i&&Te.jsx(ba,{height:20,width:20,color:"text-gama-500"}),children:n})}),Te.jsx("div",{className:"flex items-center gap-x-2",children:Te.jsx(jR,{dataTest:"close-button",variant:"textGray",size:"small",onClick:d,endIcon:o&&Te.jsx(zl,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]})}):Te.jsxs("div",{className:mo("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",p),"data-test":b,children:[Te.jsxs("div",{className:"fixed-top flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[Te.jsxs("div",{className:"flex items-center justify-between",children:[s?Te.jsx("div",{className:"text-sm text-delta-700",children:s}):Te.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a}),Te.jsxs("div",{className:"flex gap-x-1",children:[Te.jsx("div",{className:"flex items-center gap-x-2",children:Te.jsx(jR,{dataTest:"minimize-button",variant:"textGray",size:"small",onClick:w,endIcon:r&&Te.jsx(ga,{height:20,width:20,color:"text-delta-700"}),children:t})}),Te.jsx("div",{className:"flex items-center gap-x-2",children:Te.jsx(jR,{dataTest:"close-button",variant:"textGray",size:"small",onClick:d,endIcon:Te.jsx(zl,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]}),s&&Te.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a})]}),Te.jsx("div",{children:u}),Te.jsxs("div",{className:"fixed-bottom flex justify-end gap-x-4 border-t-[1px] border-delta-200 p-4",children:[h&&g&&Te.jsx(jR,{dataTest:"cancel-button",variant:"outlined",onClick:g,children:h}),f&&m&&Te.jsx(jR,{dataTest:"save-button",onClick:m,children:f})]})]}):null};export{e$ as ACTIONS_COLUMN_ID,Fl as ArchiveIcon,vl as AssignmentIcon,yl as AssignmentOutlineIcon,oe as Avatar,ya as BadgeIcon,nl as BellIcon,tl as BellOutlineIcon,oa as CalendarBlankOutlineIcon,gl as CalendarIcon,bl as CalendarRangeIcon,Ll as CheckBoxCheckedIcon,ml as CheckFactOutlineIcon,Hl as CheckIcon,hl as CheckOutlineIcon,ll as ChevronDoubleLeftIcon,al as ChevronDoubleRightIcon,Vl as ChevronDownIcon,il as ChevronLeftIcon,rl as ChevronRightIcon,$l as ChevronUpIcon,re as ClickAwayListener,zl as CloseIcon,ma as ConsentsIcon,cl as DashboardViewIcon,dl as DashboardViewOutlineIcon,Xl as DeleteOutlineIcon,Ml as DotsVerticalIcon,Al as DownloadIcon,Yl as DragHorizontalIcon,Dl as DropDownIcon,_l as DropUpIcon,ea as DvrIcon,JV as EXPAND_COLUMN_ID,ca as EarthIcon,Kl as EmptyPageIcon,ta as ErrorOutlineIcon,ie as Fade,ia as FastCheckOutlineIcon,Zl as FilePdfIcon,Ql as FilterIcon,Rl as FindReplaceIcon,Tl as FindReplacePeopleIcon,LO as GridRow,ol as HamburgerIcon,_V as HelperText,Ul as InboxOutboxIcon,Wl as InboxOutboxOutlineIcon,ba as KeyboardCapslockIcon,ra as LinkOutlineIcon,wl as ListNumberedIcon,ua as ListSettingsLineIcon,aa as ListStatusIcon,Il as LoadingIcon,Jl as LockIcon,xl as MessageProcessingIcon,Cl as MessageProcessingOutlineIcon,va as MessageReplyIcon,cz as MinimizableDialog,ga as MinimizeIcon,ha as OutlineCalendarMonth,le as Paper,ul as PdfIcon,pa as PencilOutlineIcon,fl as PeopleIcon,pl as PeopleOutlineIcon,ql as PermMediaIcon,Bl as PermMediaOutline,Nl as PersonIcon,jl as PersonOutlineIcon,ae as Popper,sl as QnrIcon,na as ReplayIcon,Ol as ReportBoxIcon,kl as ReportBoxOutlineIcon,__ as RichInput,QV as SELECT_COLUMN_ID,Pl as SearchIcon,Sl as SettingsIcon,da as SettingsMenuHorizontalIcon,El as SettingsOutlineIcon,se as Skeleton,SN as SnackbarProvider,YV as StyledAccordion,XV as StyledAccordionDetails,ZV as StyledAccordionSummary,DR as StyledAlert,FR as StyledAlertTitle,Ne as StyledBadge,jR as StyledButton,MN as StyledCheckbox,je as StyledChip,KV as StyledContainer,RR as StyledDataGrid,TV as StyledDatePicker,MR as StyledDialog,PR as StyledDialogActions,IR as StyledDialogContent,_R as StyledDialogTitle,$V as StyledDrawer,uz as StyledFilterMenu,yV as StyledFormControl,DV as StyledFormControlLabel,fR as StyledFormGroup,FV as StyledFormHelperText,AV as StyledFormLabel,TR as StyledGridActionsCellItem,IN as StyledInput,_N as StyledInputField,LV as StyledInputLabel,PD as StyledLabel,UV as StyledLink,zV as StyledMenu,HV as StyledMenuItem,qV as StyledMenuList,az as StyledModuleTitle,Q$ as StyledPopover,$_ as StyledRadio,z_ as StyledRadioGroup,D_ as StyledSelect,A_ as StyledSelectAutocomplete,F_ as StyledSelectItem,L_ as StyledSlider,EN as StyledSnackbar,VV as StyledStack,V_ as StyledSwitch,WV as StyledTab,rz as StyledTable,GV as StyledTabs,FN as StyledTextarea,IV as StyledTimePicker,yr as StyledTooltip,wa as StyledTypography,lz as StyledWidgetTitle,sa as TextBoxCheckOutlineIcon,Gl as TopicIcon,la as UnknownDocumentOutlineRoundedIcon,fa as WarningAmberOutlineIcon,sN as closeSnackbar,W$ as createColumnHelper,aN as enqueueSnackbar,Sg as gridDateComparator,jN as message,ve as omit,ye as pick,RN as processAlertSnackBar,TN as processInfoSnackbar,we as tokenOptimizer,CN as useSnackbar};
223
+ function Y$(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}function Z$({table:e,stickyHeader:t=!1,hideHeader:n=!1}){return Te.jsxs("thead",{className:mo("table-header-group z-50 bg-[#fcfcfd] cursor-default",n&&"h-0 opacity-0"),style:t&&{position:"sticky",top:-.2}||{},children:[Te.jsx(X$,{}),e.getHeaderGroups().map((e=>Te.jsx("tr",{children:e.headers.map((e=>{var t;let o=e.getSize();o&&(o=`min-w-[${o}px] w-[${o}px] max-w-[${o}px]`);const r="actions"===(null==(t=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}(e.headerGroup.headers))?void 0:t.id),i=e.headerGroup.headers[e.headerGroup.headers.length-(r?2:1)];((null==i?void 0:i.id)===e.id||!o)&&(o="w-full");let l="";return"actions"===e.column.id&&(l="sticky bg-transparent right-0"),Te.jsx("th",{colSpan:e.colSpan,className:MD(o,"px-2.5 py-0","text-delta-500 bg-transparent border-none text-start text-[10px] font-semibold uppercase justify-start",l),style:{maxWidth:e.column.columnDef.maxSize,minWidth:e.column.columnDef.minSize},children:e.isPlaceholder?null:Te.jsxs("div",{className:mo("flex items-center justify-left",n?"h-0":"h-[30px]",e.column.getCanSort()||"actions"===e.column.id?"cursor-pointer select-none":"",e.column.columnDef.className),onClick:e.column.getToggleSortingHandler(),children:[Y$(e.column.columnDef.header,e.getContext()),{asc:Te.jsx(_l,{className:"text-delta-800"}),desc:Te.jsx(Dl,{className:"text-delta-800"})}[e.column.getIsSorted()]??null]})},e.id)}))},e.id))),Te.jsx(X$,{})]})}const X$=()=>Te.jsx("tr",{className:"bg-[#fcfcfd] w-full relative table-row",children:Te.jsx("th",{className:"w-[calc(100%-1px)] p-0 bg-[#fcfcfd] border-b-solid border-t-transparent border-x-0 border-[0.5px] border-b-delta-300 h-full absolute-center"})});const Q$=e=>Te.jsx(O,{...e});function J$({tableData:e,actions:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=jV();return Te.jsxs("div",{className:"flex justify-center items-center",children:[Te.jsx(jR,{dataTest:"test",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:Te.jsx(Ml,{className:"!text-delta-800",width:20,height:20})}),Te.jsx(Q$,{open:o,anchorEl:n,onClose:r,onClick:r,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:t(e.row).filter((e=>!e.hide)).map(((t,n)=>Te.jsx(HV,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label},n)))})]})}function ez({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=jV();return Te.jsxs("div",{className:"w-full flex items-center justify-end ",children:[Te.jsx("div",{className:"px-2.5 h-[30px] flex items-center justify-center",onClick:r,children:Te.jsx(Qi,{icon:"mdi:pin",className:"text-delta-500 hover:text-delta-600 min-w-[20px] min-h-[20px]"})}),Te.jsx(Q$,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==QV)).map((e=>e.columnDef.header?Te.jsxs(HV,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[Te.jsx(MN,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}function tz({columns:e,expandArrow:t,enableRowSelection:n,headerPin:o,actions:r,customActionsNode:i}){!e.find((e=>"actions"===e.id))&&(r||i||o)&&e.push(function(e){const{headerPin:t,actions:n,customActionsNode:o}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?Te.jsx(ez,{headerData:e}):null,cell:e=>n||o?Te.jsxs("div",{className:"flex gap-2 items-center justify-end",children:[o&&(null==o?void 0:o(e)),n&&Te.jsx(J$,{tableData:e,actions:n})]}):null,size:50}}({headerPin:o||!1,actions:r,customActionsNode:i})),n&&!e.find((e=>e.id===QV))&&e.unshift({id:QV,minSize:40,maxSize:40,size:40,header:({table:e})=>Te.jsx("div",{className:"w-[25px]",children:Te.jsx(MN,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()})}),cell:({cell:e})=>Te.jsx("div",{className:"w-[25px]",children:Te.jsx(MN,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})})}),t&&!e.find((e=>e.id===JV))&&e.unshift({id:JV,minSize:40,maxSize:40,size:40,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const t=e.row.getIsExpanded();return e.row.getCanExpand()?Te.jsx("span",{className:"flex w-fit h-fit px-2 bg-transparent outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),children:t?Te.jsx($l,{width:24,height:24}):Te.jsx(Vl,{width:24,height:24})}):null}})}function nz({table:e,locale:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=jV(),l="no"===t,a=()=>{var e;const t=document.querySelectorAll('[data-index="0"]');null==(e=null==t?void 0:t[0])||e.scrollIntoView({behavior:"smooth",block:"end",inline:"end"})},s=e.getPageCount(),u=e.getState().pagination.pageIndex+1,c=Array.from({length:s},((e,t)=>t+1));return s>1?Te.jsxs("div",{className:"w-fit animate-opacity-in-5 justify-end flex items-center bg-transparent gap-2",children:[Te.jsx(yr,{title:l?"Nåværende side":"Current Page",children:Te.jsx("div",{children:Te.jsxs(jR,{variant:"outlined",dataTest:"list-pages",className:"w-[134px]",onClick:e=>{i(e)},endIcon:o?Te.jsx($l,{height:24,width:24}):Te.jsx(Vl,{height:24,width:24}),children:[l?"Side":"Page"," ",u," ",l?"av":"of"," ",s]})})}),Te.jsx(Q$,{open:o,anchorEl:n,onClose:r,anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},children:Te.jsx("div",{className:"max-h-[200px] w-[134px] overflow-auto",children:c.map((t=>Te.jsxs("div",{className:mo("h-[36px] relative flex items-center pl-10 cursor-pointer hover:bg-delta-50",u===t&&"bg-gama-50"),onClick:()=>{e.setPageIndex(t-1),r(),a()},children:[u===t&&Te.jsx(Hl,{className:"absolute left-2 top-1 text-gama-500",height:24,width:24}),Te.jsxs("span",{children:[l?"Side":"Page"," ",t]})]},t)))})}),Te.jsx(yr,{title:1===u?"":l?"Forrige side":"Previous Page",children:Te.jsx("div",{children:Te.jsx(jR,{variant:"outlined",dataTest:"pagination-ChevronLeftIcon",startIcon:Te.jsx(il,{height:24,width:24}),onClick:()=>{e.previousPage(),a()},disabled:!e.getCanPreviousPage()})})}),Te.jsx(yr,{title:u===s?"":l?"Neste side":"Next Page",children:Te.jsx("div",{children:Te.jsx(jR,{variant:"outlined",dataTest:"pagination-ChevronRightIcon",startIcon:Te.jsx(rl,{height:24,width:24}),onClick:()=>{e.nextPage(),a()},disabled:!e.getCanNextPage()})})})]}):null}function oz({table:e,locale:t,children:n}){return Te.jsxs("div",{className:"w-full gap-2 bg-transparent flex flex-row py-1 my-1 items-center justify-end ",children:[n,Te.jsx(nz,{table:e,locale:t})]})}const rz=({actions:t,columns:n,data:o,customSubRowData:r,initialState:i,enableRowSelection:l,headerPin:a=!0,loading:s,noRowsOverlay:u,tableInstanceRef:c,className:d,rowHeight:p,tdClassName:f,getRowClassName:h,onRowClick:m,renderSubRows:g,customActionsNode:v,focusable:y,stickyHeader:w,expandArrow:x,height:C,locale:O="en",footer:k,hideHeader:S,hideFooter:E,...R})=>{tz({columns:n,expandArrow:x,enableRowSelection:l,headerPin:a,actions:t,customActionsNode:v});const T=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:B$(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({...R,columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:50},columnVisibility:{...null==i?void 0:i.columnVisibility,[QV]:!1},...i},enableRowSelection:l,getCoreRowModel:e=>r$((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=U$(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>r$((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?K$(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>r$((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return G$(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>r$((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getPaginationRowModel:e=>r$((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:i,flatRows:l,rowsById:a}=n;const s=o*r,u=s+o;let c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:l,rowsById:a}:K$({rows:i,flatRows:l,rowsById:a}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),{key:"development"===process.env.NODE_ENV&&"getPaginationRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getRowId:R.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString())});c&&(c.current=T);const N=E?T.getCoreRowModel().rows:T.getRowModel().rows;return Te.jsxs("div",{children:[Te.jsx("div",{className:mo("overflow-auto w-full",d),style:{height:C},children:Te.jsxs("table",{className:mo("table box-border border-collapse animate-opacity-appear-3 border-spacing-[1px] max-w-[inherit] m-0 w-[calc(100%-5px)]"),children:[!s&&Te.jsx(Z$,{table:T,stickyHeader:w,hideHeader:S}),Te.jsxs("tbody",{className:"table-row-group align-middle max-w-[inherit]",children:[o.length>0&&s?Te.jsx(Il,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-gama-500 z-10",width:50,height:50}):null,0===o.length&&s?Te.jsx(Te.Fragment,{children:Array.from({length:5}).map(((e,t)=>Te.jsx("tr",{children:Te.jsx("td",{colSpan:n.length,children:Te.jsx(ne,{variant:"text",width:"100%",height:50},t)})},t)))}):o.length>0?N.map(((e,t)=>((e,t)=>Te.jsxs(b,{children:[Te.jsx("tr",{"data-index":t,"data-test":e.id,id:e.id,tabIndex:y?-1:void 0,className:mo("table-row align-middle group border-solid border-x border-t border-b-0 last:border-b-transparent first:border-t-transparent border-x-transparent border-y-delta-300 hover:cursor-pointer hover:bg-gama-25 focus:bg-gama-50 focus:border focus:border-gama-500",(e.getIsExpanded()||e.getIsSelected())&&"bg-gama-50",s&&"opacity-50",null==h?void 0:h(e)),style:{height:p?`${p}px`:"inherit"},onMouseDown:t=>{t.target.classList.contains("MuiModal-backdrop")||"INPUT"===t.target.nodeName||"BUTTON"===t.target.nodeName||(e.getCanExpand()&&!x&&e.getToggleExpandedHandler()(),m&&m(t,e))},children:e.getVisibleCells().map((t=>{const n="actions"===t.column.id;return Te.jsx("td",{className:MD("break-words table-cell align-middle text-sm text-delta-900 whitespace-pre-wrap","px-2.5 py-0",f,n&&"bg-white sticky right-0 group-hover:bg-gama-25",n&&(null==h?void 0:h(e))),children:Y$(t.column.columnDef.cell,t.getContext())},t.id)}))}),e.getIsExpanded()&&Te.jsx(Te.Fragment,{children:r&&g&&g({rows:r.get(e.original.id.toString())??[],row:e.original})})]},e.id))(e,t))):Te.jsx("tr",{className:"h-28",children:Te.jsx("td",{colSpan:n.length,className:"text-center align-middle text-sm text-delta-900",children:u})})]})]})}),!E&&Te.jsx(oz,{table:T,locale:O,children:null==k?void 0:k(T)})]})},iz="_title_17oo0_1",lz=function(e){return Te.jsx("div",{className:iz,children:e.children})},az=function(e){return Te.jsx("h1",{"data-test":e.dataTest,className:"font-roboto md:mb-2 mb-5 text-2xl font-bold leading-10 text-[#17232E]",children:e.children})},sz=()=>{const[e,t]=l(null),n=()=>{t((()=>null))};return{anchorEl:e,onClose:n,onAnchorClick:o=>{e?n():(e=>{t((()=>e.currentTarget))})(o)}}},uz=({filterIsActive:e,popoverContent:t,dataTest:n,disabled:o,size:r="large",variant:i="outlined"})=>{const{onAnchorClick:l,onClose:a,anchorEl:s}=sz();return Te.jsxs(Te.Fragment,{children:[Te.jsxs("div",{className:"w-fit h-fit relative",children:[Te.jsx(jR,{disabled:o,variant:i,startIcon:Te.jsx(Ql,{width:"large"===r?24:20,height:"large"===r?24:20}),onClick:l,size:r,dataTest:n,children:"Filter"}),e&&Te.jsx("div",{className:mo("h-2 w-2 bg-gama-400 rounded-full absolute","large"===r?"top-2 right-2":"top-1 right-1")})]}),Te.jsx(Q$,{open:!!s,anchorEl:s,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:"my-1",children:t})]})},cz=({onCloseText:e,onMinimizeText:t,onExpandText:n,showCloseIcon:o=!0,showMinimizeIcon:r=!0,showExpandIcon:i=!0,title:a,label:s,children:u,open:c,onClose:d,className:p="",primaryButtonText:f,secondaryButtonText:h,onPrimaryButtonClick:m,onSecondaryButtonClick:g,dataTest:b})=>{const[v,y]=l(!1),w=()=>{y(!v)};return c?v?Te.jsx("div",{className:"fixed bottom-4 right-4 z-[51] w-[387px] rounded-lg bg-white py-2 pl-4 pr-3 shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",children:Te.jsxs("div",{className:"flex items-center justify-between","data-test":b,children:[Te.jsx("div",{className:"truncate text-lg font-semibold text-delta-800",children:a}),Te.jsxs("div",{className:"flex gap-x-1",children:[Te.jsx("div",{className:"flex items-center gap-x-2",children:Te.jsx(jR,{dataTest:"minimize-button",variant:"text",size:"small",onClick:w,endIcon:i&&Te.jsx(ba,{height:20,width:20,color:"text-gama-500"}),children:n})}),Te.jsx("div",{className:"flex items-center gap-x-2",children:Te.jsx(jR,{dataTest:"close-button",variant:"textGray",size:"small",onClick:d,endIcon:o&&Te.jsx(zl,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]})}):Te.jsxs("div",{className:mo("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",p),"data-test":b,children:[Te.jsxs("div",{className:"fixed-top flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[Te.jsxs("div",{className:"flex items-center justify-between",children:[s?Te.jsx("div",{className:"text-sm text-delta-700",children:s}):Te.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a}),Te.jsxs("div",{className:"flex gap-x-1",children:[Te.jsx("div",{className:"flex items-center gap-x-2",children:Te.jsx(jR,{dataTest:"minimize-button",variant:"textGray",size:"small",onClick:w,endIcon:r&&Te.jsx(ga,{height:20,width:20,color:"text-delta-700"}),children:t})}),Te.jsx("div",{className:"flex items-center gap-x-2",children:Te.jsx(jR,{dataTest:"close-button",variant:"textGray",size:"small",onClick:d,endIcon:Te.jsx(zl,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]}),s&&Te.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a})]}),Te.jsx("div",{children:u}),Te.jsxs("div",{className:"fixed-bottom flex justify-end gap-x-4 border-t-[1px] border-delta-200 p-4",children:[h&&g&&Te.jsx(jR,{dataTest:"cancel-button",variant:"outlined",onClick:g,children:h}),f&&m&&Te.jsx(jR,{dataTest:"save-button",onClick:m,children:f})]})]}):null};export{e$ as ACTIONS_COLUMN_ID,Fl as ArchiveIcon,vl as AssignmentIcon,yl as AssignmentOutlineIcon,oe as Avatar,ya as BadgeIcon,nl as BellIcon,tl as BellOutlineIcon,oa as CalendarBlankOutlineIcon,gl as CalendarIcon,bl as CalendarRangeIcon,Ll as CheckBoxCheckedIcon,ml as CheckFactOutlineIcon,Hl as CheckIcon,hl as CheckOutlineIcon,ll as ChevronDoubleLeftIcon,al as ChevronDoubleRightIcon,Vl as ChevronDownIcon,il as ChevronLeftIcon,rl as ChevronRightIcon,$l as ChevronUpIcon,re as ClickAwayListener,zl as CloseIcon,ma as ConsentsIcon,cl as DashboardViewIcon,dl as DashboardViewOutlineIcon,Xl as DeleteOutlineIcon,Ml as DotsVerticalIcon,Al as DownloadIcon,Yl as DragHorizontalIcon,Dl as DropDownIcon,_l as DropUpIcon,ea as DvrIcon,JV as EXPAND_COLUMN_ID,ca as EarthIcon,Kl as EmptyPageIcon,ta as ErrorOutlineIcon,ie as Fade,ia as FastCheckOutlineIcon,Zl as FilePdfIcon,Ql as FilterIcon,Rl as FindReplaceIcon,Tl as FindReplacePeopleIcon,LO as GridRow,ol as HamburgerIcon,_V as HelperText,Ul as InboxOutboxIcon,Wl as InboxOutboxOutlineIcon,ba as KeyboardCapslockIcon,ra as LinkOutlineIcon,wl as ListNumberedIcon,ua as ListSettingsLineIcon,aa as ListStatusIcon,Il as LoadingIcon,Jl as LockIcon,xl as MessageProcessingIcon,Cl as MessageProcessingOutlineIcon,va as MessageReplyIcon,cz as MinimizableDialog,ga as MinimizeIcon,ha as OutlineCalendarMonth,le as Paper,ul as PdfIcon,pa as PencilOutlineIcon,fl as PeopleIcon,pl as PeopleOutlineIcon,ql as PermMediaIcon,Bl as PermMediaOutline,Nl as PersonIcon,jl as PersonOutlineIcon,ae as Popper,sl as QnrIcon,na as ReplayIcon,Ol as ReportBoxIcon,kl as ReportBoxOutlineIcon,__ as RichInput,QV as SELECT_COLUMN_ID,Pl as SearchIcon,Sl as SettingsIcon,da as SettingsMenuHorizontalIcon,El as SettingsOutlineIcon,se as Skeleton,SN as SnackbarProvider,YV as StyledAccordion,XV as StyledAccordionDetails,ZV as StyledAccordionSummary,DR as StyledAlert,FR as StyledAlertTitle,Ne as StyledBadge,jR as StyledButton,MN as StyledCheckbox,je as StyledChip,KV as StyledContainer,RR as StyledDataGrid,TV as StyledDatePicker,MR as StyledDialog,PR as StyledDialogActions,IR as StyledDialogContent,_R as StyledDialogTitle,$V as StyledDrawer,uz as StyledFilterMenu,yV as StyledFormControl,DV as StyledFormControlLabel,fR as StyledFormGroup,FV as StyledFormHelperText,AV as StyledFormLabel,TR as StyledGridActionsCellItem,IN as StyledInput,_N as StyledInputField,LV as StyledInputLabel,PD as StyledLabel,UV as StyledLink,zV as StyledMenu,HV as StyledMenuItem,qV as StyledMenuList,az as StyledModuleTitle,Q$ as StyledPopover,$_ as StyledRadio,z_ as StyledRadioGroup,D_ as StyledSelect,A_ as StyledSelectAutocomplete,F_ as StyledSelectItem,L_ as StyledSlider,EN as StyledSnackbar,VV as StyledStack,V_ as StyledSwitch,WV as StyledTab,rz as StyledTable,GV as StyledTabs,FN as StyledTextarea,IV as StyledTimePicker,yr as StyledTooltip,wa as StyledTypography,lz as StyledWidgetTitle,sa as TextBoxCheckOutlineIcon,Gl as TopicIcon,la as UnknownDocumentOutlineRoundedIcon,fa as WarningAmberOutlineIcon,sN as closeSnackbar,W$ as createColumnHelper,aN as enqueueSnackbar,Sg as gridDateComparator,jN as message,ve as omit,ye as pick,RN as processAlertSnackBar,TN as processInfoSnackbar,we as tokenOptimizer,CN as useSnackbar};
@@ -3,7 +3,7 @@ import type { ReactNode } from 'react';
3
3
  export declare function generateActionsColumn<TData>(options: {
4
4
  headerPin: boolean;
5
5
  actions?: (row: Row<TData>) => {
6
- label: string;
6
+ label: ReactNode;
7
7
  className?: string;
8
8
  disabled?: boolean;
9
9
  hide?: boolean;
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import type { CellContext, Row } from '@tanstack/react-table';
2
+ import type { ReactNode } from 'react';
3
3
  export declare function RowActionMenu<TData>({ tableData, actions, }: {
4
4
  tableData: CellContext<TData, TData>;
5
5
  actions: (row: Row<TData>) => {
6
- label: string;
6
+ label: ReactNode;
7
7
  className?: string;
8
8
  disabled?: boolean;
9
9
  hide?: boolean;
@@ -16,7 +16,7 @@ declare module '@tanstack/react-table' {
16
16
  }
17
17
  }
18
18
  export interface IAction<TData> {
19
- label: string;
19
+ label: ReactNode;
20
20
  className?: string;
21
21
  disabled?: boolean;
22
22
  hide?: boolean;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "2.20.28",
6
+ "version": "2.20.29",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist/**/*",