asma-core-ui 2.22.8 → 2.22.9

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.
@@ -43,4 +43,4 @@ import*as e from"react";import t,{Children as n,forwardRef as o,useRef as r,useC
43
43
  *
44
44
  * @license MIT
45
45
  */
46
- function Rb(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 Ib({table:e,styledTableProps:t}){const{stickyHeader:n=!1,hideHeader:o=!1}=t;return t.loading?null:Oe.jsx("thead",{className:sn("table-header",o&&"hide-table-header"),style:n&&{position:"sticky",top:-.2}||{},children:e.getHeaderGroups().map((e=>Oe.jsx("tr",{children:e.headers.map((e=>{var t;let n=e.getSize();n&&(n=`${n}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)];return((null==i?void 0:i.id)===e.id||!n)&&(n="100%"),Oe.jsx("th",{colSpan:e.colSpan,className:oh("t-cell","actions"===e.column.id&&"t-cell__actions"),style:{width:n||e.column.columnDef.size,maxWidth:n||e.column.columnDef.maxSize,minWidth:n||e.column.columnDef.minSize},children:Oe.jsxs("div",{className:oh("flex items-center justify-left",o?"hide-table-header":"show-table-header",e.column.getCanSort()&&"sortable-column",e.column.columnDef.className),onClick:e.column.getToggleSortingHandler(),children:[Rb(e.column.columnDef.header,e.getContext()),{asc:Oe.jsx(pi,{className:"sort-icon"}),desc:Oe.jsx(hi,{className:"sort-icon"})}[e.column.getIsSorted()]??null]})},e.id)}))},e.id)))})}const Db=({colSpan:e})=>Oe.jsx(Oe.Fragment,{children:Array.from({length:5}).map(((t,n)=>Oe.jsx("tr",{children:Oe.jsx("td",{colSpan:e,children:Oe.jsx(ie,{variant:"text",width:"100%",height:50},n)})},n)))});function Lb({styledTableProps:e,row:t,index:n}){const{focusable:o,loading:r,getRowClassName:i,rowHeight:a,onRowClick:l,expandArrow:s,tdClassName:u,customSubRowData:c,renderSubRows:d}=e;return Oe.jsxs(v,{children:[Oe.jsx("tr",{"data-index":n,"data-test":t.id,id:t.id,tabIndex:o?-1:void 0,className:oh("t-row",r&&"is-loading",(t.getIsExpanded()||t.getIsSelected())&&"selected",null==i?void 0:i(t)),style:{height:a?`${a}px`:"inherit"},onMouseDown:e=>{var n;e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName||(t.getCanExpand()&&!s&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus(),l&&l(e,t))},children:t.getVisibleCells().map((e=>{const n="actions"===e.column.id;return Oe.jsx("td",{className:oh("t-cell",u,n&&"action-cell",n&&(t.getIsExpanded()||t.getIsSelected())&&"selected",n&&(null!=i&&i(t)?null==i?void 0:i(t):"action-cell-default-background")),children:Rb(e.column.columnDef.cell,e.getContext())},e.id)}))}),t.getIsExpanded()&&Oe.jsx(Oe.Fragment,{children:c&&d&&d({rows:c.get(t.original.id.toString())??[],row:t.original})})]},t.id)}function qb({styledTableProps:e,table:t}){const n=e.hideFooter?t.getCoreRowModel().rows:t.getRowModel().rows;return Oe.jsx(Oe.Fragment,{children:n.map(((t,n)=>Oe.jsx(Lb,{styledTableProps:e,row:t,index:n},t.id)))})}const Fb=({colSpan:e,noRowsOverlay:t})=>Oe.jsx("tr",{className:"no-rows-overlay",children:Oe.jsx("td",{colSpan:e,children:t})});function zb({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,noRowsOverlay:i}=t;return Oe.jsxs("tbody",{className:"tbody",children:[o.length>0&&r&&Oe.jsx(fi,{className:"loading-icon",width:50,height:50}),0===o.length&&r?Oe.jsx(Db,{colSpan:n.length}):o.length>0?Oe.jsx(qb,{table:e,styledTableProps:t}):Oe.jsx(Fb,{colSpan:n.length,noRowsOverlay:i})]})}const Vb=e=>Oe.jsx(z,{...e}),Bb=()=>{const[e,t]=p(null),n=!!e,o=i((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:i((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}};function Hb({table:e,locale:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=Bb(),a="no"===t,l=()=>{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?Oe.jsxs("div",{className:"table-pagination",children:[Oe.jsx(Xn,{title:a?"Nåværende side":"Current Page",children:Oe.jsx("div",{children:Oe.jsxs(ta,{variant:"outlined",dataTest:"list-pages",style:{width:"134px"},onClick:e=>{i(e)},endIcon:o?Oe.jsx(bi,{height:24,width:24}):Oe.jsx(yi,{height:24,width:24}),children:[a?"Side":"Page"," ",u," ",a?"av":"of"," ",s]})})}),Oe.jsx(Vb,{open:o,anchorEl:n,onClose:r,anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},children:Oe.jsx("div",{className:"table-pagination__pages-list",children:c.map((t=>Oe.jsxs("div",{className:oh("table-pagination__pages-list__page",u===t&&"page-selected"),onClick:()=>{e.setPageIndex(t-1),r(),l()},children:[u===t&&Oe.jsx(xi,{className:"check-icon",height:24,width:24}),Oe.jsxs("span",{children:[a?"Side":"Page"," ",t]})]},t)))})}),Oe.jsx(Xn,{title:1===u?"":a?"Forrige side":"Previous Page",children:Oe.jsx("div",{children:Oe.jsx(ta,{variant:"outlined",dataTest:"pagination-ChevronLeftIcon",startIcon:Oe.jsx(qr,{height:24,width:24}),onClick:()=>{e.previousPage(),l()},disabled:!e.getCanPreviousPage()})})}),Oe.jsx(Xn,{title:u===s?"":a?"Neste side":"Next Page",children:Oe.jsx("div",{children:Oe.jsx(ta,{variant:"outlined",dataTest:"pagination-ChevronRightIcon",startIcon:Oe.jsx(Lr,{height:24,width:24}),onClick:()=>{e.nextPage(),l()},disabled:!e.getCanNextPage()})})})]}):null}function Ub({table:e,styledTableProps:t}){var n;return t.hideFooter?null:Oe.jsxs("div",{className:"table-footer",children:[null==(n=t.footer)?void 0:n.call(t,e),Oe.jsx(Hb,{table:e,locale:t.locale||"en"})]})}const Wb=t=>{const{columns:n,data:o,initialState:r,enableRowSelection:i,tableInstanceRef:a,...l}=t,s=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:jb(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}({...l,columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:50},columnVisibility:{...null==r?void 0:r.columnVisibility,[Ly]:!1},...r},enableRowSelection:i,getCoreRowModel:e=>Hy((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const a=[];for(let s=0;s<t.length;s++){const u=Tb(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var l;n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(l=u.originalSubRows)&&l.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return a};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=>Hy((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?Ab(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>Hy((()=>[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 a=n.map((e=>e.id)),l=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&l&&s.length&&(a.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:l,resolvedValue:null!=(t=null==l.resolveFilterValue?void 0:l.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 Mb(t.rows,(e=>{for(let t=0;t<a.length;t++)if(!1===e.columnFilters[a[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=>Hy((()=>[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()})),a={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const l=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],l=a[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(l.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?l.sortUndefined:-l.sortUndefined)}if(0===u&&(u=l.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),l.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=l(e.subRows))})),t};return{rows:l(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=>Hy((()=>[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:a,rowsById:l}=n;const s=o*r,u=s+o;let c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:a,rowsById:l}:Ab({rows:i,flatRows:a,rowsById:l}),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:l.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString())});return a&&(a.current=s),{table:s}};function $b({tableData:e,actions:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=Bb(),a=t(e.row).filter((e=>!e.hide));return Oe.jsx("div",{className:"flex justify-center items-center w-[42px]",children:a.length?Oe.jsxs(Oe.Fragment,{children:[Oe.jsx(ta,{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:Oe.jsx(ci,{className:"!text-delta-800",width:20,height:20})}),Oe.jsx(Vb,{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)=>Oe.jsx(Sy,{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)))})]}):null})}function Gb({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=Bb();return Oe.jsxs("div",{className:"w-full flex items-center justify-end ",children:[Oe.jsx("div",{className:"px-2.5 h-[30px] flex items-center justify-center cursor-pointer",onClick:r,children:Oe.jsx(Pr,{icon:"mdi:pin",className:"text-delta-500 hover:text-delta-600 min-w-[20px] min-h-[20px]"})}),Oe.jsx(Vb,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==Ly)).map((e=>e.columnDef.header?Oe.jsxs(Sy,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[Oe.jsx(ns,{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))})]})}const Kb=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:a}=e;!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?Oe.jsx(Gb,{headerData:e}):null,cell:e=>n||o?Oe.jsxs("div",{className:"flex items-center justify-end",children:[o&&Oe.jsx("div",{className:"mr-1",children:null==o?void 0:o(e)}),n&&Oe.jsx($b,{tableData:e,actions:n})]}):null,size:50}}({headerPin:r,actions:n,customActionsNode:o})),i&&!t.find((e=>e.id===Ly))&&t.unshift({id:Ly,minSize:40,maxSize:40,size:40,header:({table:e})=>Oe.jsx("div",{className:"w-[25px]",children:Oe.jsx(ns,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()})}),cell:({cell:e})=>Oe.jsx("div",{className:"w-[25px]",children:Oe.jsx(ns,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})})}),a&&!t.find((e=>e.id===qy))&&t.unshift({id:qy,minSize:40,maxSize:40,size:40,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const t=e.row.getIsExpanded();return e.row.getCanExpand()?Oe.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?Oe.jsx(bi,{width:24,height:24}):Oe.jsx(yi,{width:24,height:24})}):null}})},Yb=e=>{const{className:t,height:n}=e;Kb(e);const{table:o}=Wb(e);return Oe.jsxs("div",{className:"asma-core-ui-styled-table",children:[Oe.jsx("div",{className:oh("table-wrapper",t),style:{height:n},children:Oe.jsxs("table",{className:"table",children:[Oe.jsx(Ib,{table:o,styledTableProps:e}),Oe.jsx(zb,{table:o,styledTableProps:e})]})}),Oe.jsx(Ub,{table:o,styledTableProps:e})]})},Zb="_title_17oo0_1",Xb=function(e){return Oe.jsx("div",{className:Zb,children:e.children})},Qb=function(e){return Oe.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})},Jb=()=>{const[e,t]=p(null),n=()=>{t((()=>null))};return{anchorEl:e,onClose:n,onAnchorClick:o=>{e?n():(e=>{t((()=>e.currentTarget))})(o)}}},ew=({filterIsActive:e,popoverContent:t,dataTest:n,disabled:o,size:r="large",variant:i="outlined"})=>{const{onAnchorClick:a,onClose:l,anchorEl:s}=Jb();return Oe.jsxs(Oe.Fragment,{children:[Oe.jsxs("div",{className:"w-fit h-fit relative",children:[Oe.jsx(ta,{disabled:o,variant:i,startIcon:Oe.jsx(Pi,{width:"large"===r?24:20,height:"large"===r?24:20}),onClick:a,size:r,dataTest:n,children:"Filter"}),e&&Oe.jsx("div",{className:sn("h-2 w-2 bg-gama-400 rounded-full absolute","large"===r?"top-2 right-2":"top-1 right-1")})]}),Oe.jsx(Vb,{open:!!s,anchorEl:s,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:"my-1",children:t})]})},tw=({onCloseText:e,onMinimizeText:t,onExpandText:n,showCloseIcon:o=!0,showMinimizeIcon:r=!0,showExpandIcon:i=!0,title:a,label:l,children:s,open:u,onClose:c,className:d="",primaryButtonText:f,secondaryButtonText:h,onPrimaryButtonClick:g,onSecondaryButtonClick:m,dataTest:v})=>{const[y,b]=p(!1),w=()=>{b(!y)};return u?y?Oe.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:Oe.jsxs("div",{className:"flex items-center justify-between","data-test":v,children:[Oe.jsx("div",{className:"truncate text-lg font-semibold text-delta-800",children:a}),Oe.jsxs("div",{className:"flex gap-x-1",children:[Oe.jsx("div",{className:"flex items-center gap-x-2",children:Oe.jsx(ta,{dataTest:"minimize-button",variant:"text",size:"small",onClick:w,endIcon:i&&Oe.jsx(Zi,{height:20,width:20,color:"text-gama-500"}),children:n})}),Oe.jsx("div",{className:"flex items-center gap-x-2",children:Oe.jsx(ta,{dataTest:"close-button",variant:"textGray",size:"small",onClick:c,endIcon:o&&Oe.jsx(wi,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]})}):Oe.jsxs("div",{className:sn("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",d),"data-test":v,children:[Oe.jsxs("div",{className:"fixed-top flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[Oe.jsxs("div",{className:"flex items-center justify-between",children:[l?Oe.jsx("div",{className:"text-sm text-delta-700",children:l}):Oe.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a}),Oe.jsxs("div",{className:"flex gap-x-1",children:[Oe.jsx("div",{className:"flex items-center gap-x-2",children:Oe.jsx(ta,{dataTest:"minimize-button",variant:"textGray",size:"small",onClick:w,endIcon:r&&Oe.jsx(Yi,{height:20,width:20,color:"text-delta-700"}),children:t})}),Oe.jsx("div",{className:"flex items-center gap-x-2",children:Oe.jsx(ta,{dataTest:"close-button",variant:"textGray",size:"small",onClick:c,endIcon:Oe.jsx(wi,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]}),l&&Oe.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a})]}),Oe.jsx("div",{children:s}),Oe.jsxs("div",{className:"fixed-bottom flex justify-end gap-x-4 border-t-[1px] border-delta-200 p-4",children:[h&&m&&Oe.jsx(ta,{dataTest:"cancel-button",variant:"outlined",onClick:m,children:h}),f&&g&&Oe.jsx(ta,{dataTest:"save-button",onClick:g,children:f})]})]}):null};export{Fy as ACTIONS_COLUMN_ID,gi as ArchiveIcon,Xr as AssignmentIcon,Qr as AssignmentOutlineIcon,ae as Avatar,Qi as BadgeIcon,Ir as BellIcon,Rr as BellOutlineIcon,Di as CalendarBlankOutlineIcon,Yr as CalendarIcon,Zr as CalendarRangeIcon,vi as CheckBoxCheckedIcon,Kr as CheckFactOutlineIcon,xi as CheckIcon,Gr as CheckOutlineIcon,Fr as ChevronDoubleLeftIcon,zr as ChevronDoubleRightIcon,yi as ChevronDownIcon,qr as ChevronLeftIcon,Lr as ChevronRightIcon,bi as ChevronUpIcon,le as ClickAwayListener,wi as CloseIcon,Ki as ConsentsIcon,Hr as DashboardViewIcon,Ur as DashboardViewOutlineIcon,Ti as DeleteOutlineIcon,ci as DotsVerticalIcon,mi as DownloadIcon,Ni as DragHorizontalIcon,hi as DropDownIcon,pi as DropUpIcon,Ai as DvrIcon,qy as EXPAND_COLUMN_ID,Hi as EarthIcon,Si as EmptyPageIcon,Ri as ErrorOutlineIcon,se as Fade,qi as FastCheckOutlineIcon,ji as FilePdfIcon,Pi as FilterIcon,ai as FindReplaceIcon,li as FindReplacePeopleIcon,Dr as HamburgerIcon,Ei as InboxOutboxIcon,Ci as InboxOutboxOutlineIcon,Zi as KeyboardCapslockIcon,Li as LinkOutlineIcon,Jr as ListNumberedIcon,Bi as ListSettingsLineIcon,zi as ListStatusIcon,fi as LoadingIcon,Mi as LockIcon,ei as MessageProcessingIcon,ti as MessageProcessingOutlineIcon,Xi as MessageReplyIcon,tw as MinimizableDialog,Yi as MinimizeIcon,Gi as OutlineCalendarMonth,ue as Paper,Br as PdfIcon,Wi as PencilOutlineIcon,$r as PeopleIcon,Wr as PeopleOutlineIcon,_i as PermMediaIcon,ki as PermMediaOutline,si as PersonIcon,ui as PersonOutlineIcon,ce as Popper,Vr as QnrIcon,Ii as ReplayIcon,ni as ReportBoxIcon,oi as ReportBoxOutlineIcon,ap as RichInput,Ly as SELECT_COLUMN_ID,di as SearchIcon,ri as SettingsIcon,Ui as SettingsMenuHorizontalIcon,ii as SettingsOutlineIcon,de as Skeleton,Zl as SnackbarProvider,Ry as StyledAccordion,Dy as StyledAccordionDetails,Iy as StyledAccordionSummary,aa as StyledAlert,la as StyledAlertTitle,Se as StyledBadge,ta as StyledButton,ns as StyledCheckbox,Ne as StyledChip,Ay as StyledContainer,ty as StyledDatePicker,na as StyledDialog,oa as StyledDialogActions,ra as StyledDialogContent,ia as StyledDialogTitle,Cy as StyledDrawer,ew as StyledFilterMenu,$v as StyledFormControl,by as StyledFormControlLabel,Ey as StyledFormGroup,wy as StyledFormHelperText,xy as StyledFormLabel,rs as StyledInput,is as StyledInputField,_y as StyledInputLabel,rh as StyledLabel,Ty as StyledLink,Oy as StyledMenu,Sy as StyledMenuItem,Ny as StyledMenuList,Qb as StyledModuleTitle,Vb as StyledPopover,fp as StyledRadio,pp as StyledRadioGroup,lp as StyledSelect,up as StyledSelectAutocomplete,sp as StyledSelectItem,cp as StyledSlider,Xl as StyledSnackbar,ky as StyledStack,dp as StyledSwitch,Py as StyledTab,Yb as StyledTable,My as StyledTabs,ls as StyledTextarea,yy as StyledTimePicker,Xn as StyledTooltip,Ji as StyledTypography,Xb as StyledWidgetTitle,Vi as TextBoxCheckOutlineIcon,Oi as TopicIcon,Fi as UnknownDocumentOutlineRoundedIcon,$i as WarningAmberOutlineIcon,Al as closeSnackbar,Pb as createColumnHelper,Ml as enqueueSnackbar,ts as message,me as omit,ve as pick,Ql as processAlertSnackBar,Jl as processInfoSnackbar,ye as tokenOptimizer,Gl as useSnackbar};
46
+ function Rb(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 Ib({table:e,styledTableProps:t}){const{stickyHeader:n=!1,hideHeader:o=!1}=t;return t.loading?null:Oe.jsx("thead",{className:sn("table-header",o&&"hide-table-header"),style:n&&{position:"sticky",top:-.2}||{},children:e.getHeaderGroups().map((e=>Oe.jsx("tr",{children:e.headers.map((e=>{var t;let n=e.getSize();n&&(n=`${n}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)];return((null==i?void 0:i.id)===e.id||!n)&&(n="100%"),Oe.jsx("th",{colSpan:e.colSpan,className:oh("t-cell","actions"===e.column.id&&"t-cell__actions"),style:{width:n||e.column.columnDef.size,maxWidth:n||e.column.columnDef.maxSize,minWidth:n||e.column.columnDef.minSize},children:Oe.jsxs("div",{className:oh("flex items-center justify-left",o?"hide-table-header":"show-table-header",e.column.getCanSort()&&"sortable-column",e.column.columnDef.className),onClick:e.column.getToggleSortingHandler(),children:[Rb(e.column.columnDef.header,e.getContext()),{asc:Oe.jsx(pi,{className:"sort-icon"}),desc:Oe.jsx(hi,{className:"sort-icon"})}[e.column.getIsSorted()]??null]})},e.id)}))},e.id)))})}const Db=({colSpan:e})=>Oe.jsx(Oe.Fragment,{children:Array.from({length:5}).map(((t,n)=>Oe.jsx("tr",{children:Oe.jsx("td",{colSpan:e,children:Oe.jsx(ie,{variant:"text",width:"100%",height:50},n)})},n)))});function Lb({styledTableProps:e,row:t,index:n}){const{focusable:o,loading:r,getRowClassName:i,rowHeight:a,onRowClick:l,expandArrow:s,tdClassName:u,customSubRowData:c,renderSubRows:d}=e;return Oe.jsxs(v,{children:[Oe.jsx("tr",{"data-index":n,"data-test":t.id,id:t.id,tabIndex:o?-1:void 0,className:oh("t-row",r&&"is-loading",(t.getIsExpanded()||t.getIsSelected())&&"selected",null==i?void 0:i(t)),style:{height:a?`${a}px`:"inherit"},onMouseDown:e=>{var n;e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName||(t.getCanExpand()&&!s&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus(),l&&l(e,t))},children:t.getVisibleCells().map((e=>{const n="actions"===e.column.id;return Oe.jsx("td",{className:oh("t-cell",u,n&&"action-cell",n&&(t.getIsExpanded()||t.getIsSelected())&&"selected",n&&(null!=i&&i(t)?null==i?void 0:i(t):"action-cell-default-background")),children:Rb(e.column.columnDef.cell,e.getContext())},e.id)}))}),t.getIsExpanded()&&Oe.jsx(Oe.Fragment,{children:c&&d&&d({rows:c.get(t.original.id.toString())??[],row:t.original})})]},t.id)}function qb({styledTableProps:e,table:t}){const n=e.hideFooter?t.getCoreRowModel().rows:t.getRowModel().rows;return Oe.jsx(Oe.Fragment,{children:n.map(((t,n)=>Oe.jsx(Lb,{styledTableProps:e,row:t,index:n},t.id)))})}const Fb=({colSpan:e,noRowsOverlay:t})=>Oe.jsx("tr",{className:"no-rows-overlay",children:Oe.jsx("td",{colSpan:e,children:t})});function zb({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,noRowsOverlay:i}=t;return Oe.jsxs("tbody",{className:"tbody",children:[o.length>0&&r&&Oe.jsx(fi,{className:"loading-icon",width:50,height:50}),0===o.length&&r?Oe.jsx(Db,{colSpan:n.length}):o.length>0?Oe.jsx(qb,{table:e,styledTableProps:t}):Oe.jsx(Fb,{colSpan:n.length,noRowsOverlay:i})]})}const Vb=e=>Oe.jsx(z,{...e}),Bb=()=>{const[e,t]=p(null),n=!!e,o=i((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:i((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}};function Hb({table:e,locale:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=Bb(),a="no"===t,l=()=>{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?Oe.jsxs("div",{className:"table-pagination",children:[Oe.jsx(Xn,{title:a?"Nåværende side":"Current Page",children:Oe.jsx("div",{children:Oe.jsxs(ta,{variant:"outlined",dataTest:"list-pages",style:{width:"134px"},onClick:e=>{i(e)},endIcon:o?Oe.jsx(bi,{height:24,width:24}):Oe.jsx(yi,{height:24,width:24}),children:[a?"Side":"Page"," ",u," ",a?"av":"of"," ",s]})})}),Oe.jsx(Vb,{open:o,anchorEl:n,onClose:r,anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},children:Oe.jsx("div",{className:"table-pagination__pages-list",children:c.map((t=>Oe.jsxs("div",{className:oh("table-pagination__pages-list__page",u===t&&"page-selected"),onClick:()=>{e.setPageIndex(t-1),r(),l()},children:[u===t&&Oe.jsx(xi,{className:"check-icon",height:24,width:24}),Oe.jsxs("span",{children:[a?"Side":"Page"," ",t]})]},t)))})}),Oe.jsx(Xn,{title:1===u?"":a?"Forrige side":"Previous Page",children:Oe.jsx("div",{children:Oe.jsx(ta,{variant:"outlined",dataTest:"pagination-ChevronLeftIcon",startIcon:Oe.jsx(qr,{height:24,width:24}),onClick:()=>{e.previousPage(),l()},disabled:!e.getCanPreviousPage()})})}),Oe.jsx(Xn,{title:u===s?"":a?"Neste side":"Next Page",children:Oe.jsx("div",{children:Oe.jsx(ta,{variant:"outlined",dataTest:"pagination-ChevronRightIcon",startIcon:Oe.jsx(Lr,{height:24,width:24}),onClick:()=>{e.nextPage(),l()},disabled:!e.getCanNextPage()})})})]}):null}function Ub({table:e,styledTableProps:t}){var n;return t.hideFooter?null:Oe.jsxs("div",{className:"table-footer",children:[null==(n=t.footer)?void 0:n.call(t,e),Oe.jsx(Hb,{table:e,locale:t.locale||"en"})]})}const Wb=t=>{const{columns:n,data:o,initialState:r,pageSize:i,enableRowSelection:a,tableInstanceRef:l,...s}=t,u=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:jb(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}({...s,columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:i||50},columnVisibility:{...null==r?void 0:r.columnVisibility,[Ly]:!1},...r},enableRowSelection:a,getCoreRowModel:e=>Hy((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const a=[];for(let s=0;s<t.length;s++){const u=Tb(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var l;n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(l=u.originalSubRows)&&l.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return a};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=>Hy((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?Ab(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>Hy((()=>[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 a=n.map((e=>e.id)),l=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;o&&l&&s.length&&(a.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:l,resolvedValue:null!=(t=null==l.resolveFilterValue?void 0:l.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 Mb(t.rows,(e=>{for(let t=0;t<a.length;t++)if(!1===e.columnFilters[a[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=>Hy((()=>[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()})),a={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const l=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],l=a[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(l.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?l.sortUndefined:-l.sortUndefined)}if(0===u&&(u=l.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),l.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=l(e.subRows))})),t};return{rows:l(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=>Hy((()=>[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:a,rowsById:l}=n;const s=o*r,u=s+o;let c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:a,rowsById:l}:Ab({rows:i,flatRows:a,rowsById:l}),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:s.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString())});return l&&(l.current=u),{table:u}};function $b({tableData:e,actions:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=Bb(),a=t(e.row).filter((e=>!e.hide));return Oe.jsx("div",{className:"flex justify-center items-center w-[42px]",children:a.length?Oe.jsxs(Oe.Fragment,{children:[Oe.jsx(ta,{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:Oe.jsx(ci,{className:"!text-delta-800",width:20,height:20})}),Oe.jsx(Vb,{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)=>Oe.jsx(Sy,{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)))})]}):null})}function Gb({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=Bb();return Oe.jsxs("div",{className:"w-full flex items-center justify-end ",children:[Oe.jsx("div",{className:"px-2.5 h-[30px] flex items-center justify-center cursor-pointer",onClick:r,children:Oe.jsx(Pr,{icon:"mdi:pin",className:"text-delta-500 hover:text-delta-600 min-w-[20px] min-h-[20px]"})}),Oe.jsx(Vb,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==Ly)).map((e=>e.columnDef.header?Oe.jsxs(Sy,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),children:[Oe.jsx(ns,{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))})]})}const Kb=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:a}=e;!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?Oe.jsx(Gb,{headerData:e}):null,cell:e=>n||o?Oe.jsxs("div",{className:"flex items-center justify-end",children:[o&&Oe.jsx("div",{className:"mr-1",children:null==o?void 0:o(e)}),n&&Oe.jsx($b,{tableData:e,actions:n})]}):null,size:50}}({headerPin:r,actions:n,customActionsNode:o})),i&&!t.find((e=>e.id===Ly))&&t.unshift({id:Ly,minSize:40,maxSize:40,size:40,header:({table:e})=>Oe.jsx("div",{className:"w-[25px]",children:Oe.jsx(ns,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()})}),cell:({cell:e})=>Oe.jsx("div",{className:"w-[25px]",children:Oe.jsx(ns,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})})}),a&&!t.find((e=>e.id===qy))&&t.unshift({id:qy,minSize:40,maxSize:40,size:40,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const t=e.row.getIsExpanded();return e.row.getCanExpand()?Oe.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?Oe.jsx(bi,{width:24,height:24}):Oe.jsx(yi,{width:24,height:24})}):null}})},Yb=e=>{const{className:t,height:n}=e;Kb(e);const{table:o}=Wb(e);return Oe.jsxs("div",{className:"asma-core-ui-styled-table",children:[Oe.jsx("div",{className:oh("table-wrapper",t),style:{height:n},children:Oe.jsxs("table",{className:"table",children:[Oe.jsx(Ib,{table:o,styledTableProps:e}),Oe.jsx(zb,{table:o,styledTableProps:e})]})}),Oe.jsx(Ub,{table:o,styledTableProps:e})]})},Zb="_title_17oo0_1",Xb=function(e){return Oe.jsx("div",{className:Zb,children:e.children})},Qb=function(e){return Oe.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})},Jb=()=>{const[e,t]=p(null),n=()=>{t((()=>null))};return{anchorEl:e,onClose:n,onAnchorClick:o=>{e?n():(e=>{t((()=>e.currentTarget))})(o)}}},ew=({filterIsActive:e,popoverContent:t,dataTest:n,disabled:o,size:r="large",variant:i="outlined"})=>{const{onAnchorClick:a,onClose:l,anchorEl:s}=Jb();return Oe.jsxs(Oe.Fragment,{children:[Oe.jsxs("div",{className:"w-fit h-fit relative",children:[Oe.jsx(ta,{disabled:o,variant:i,startIcon:Oe.jsx(Pi,{width:"large"===r?24:20,height:"large"===r?24:20}),onClick:a,size:r,dataTest:n,children:"Filter"}),e&&Oe.jsx("div",{className:sn("h-2 w-2 bg-gama-400 rounded-full absolute","large"===r?"top-2 right-2":"top-1 right-1")})]}),Oe.jsx(Vb,{open:!!s,anchorEl:s,onClose:l,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:"my-1",children:t})]})},tw=({onCloseText:e,onMinimizeText:t,onExpandText:n,showCloseIcon:o=!0,showMinimizeIcon:r=!0,showExpandIcon:i=!0,title:a,label:l,children:s,open:u,onClose:c,className:d="",primaryButtonText:f,secondaryButtonText:h,onPrimaryButtonClick:g,onSecondaryButtonClick:m,dataTest:v})=>{const[y,b]=p(!1),w=()=>{b(!y)};return u?y?Oe.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:Oe.jsxs("div",{className:"flex items-center justify-between","data-test":v,children:[Oe.jsx("div",{className:"truncate text-lg font-semibold text-delta-800",children:a}),Oe.jsxs("div",{className:"flex gap-x-1",children:[Oe.jsx("div",{className:"flex items-center gap-x-2",children:Oe.jsx(ta,{dataTest:"minimize-button",variant:"text",size:"small",onClick:w,endIcon:i&&Oe.jsx(Zi,{height:20,width:20,color:"text-gama-500"}),children:n})}),Oe.jsx("div",{className:"flex items-center gap-x-2",children:Oe.jsx(ta,{dataTest:"close-button",variant:"textGray",size:"small",onClick:c,endIcon:o&&Oe.jsx(wi,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]})}):Oe.jsxs("div",{className:sn("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",d),"data-test":v,children:[Oe.jsxs("div",{className:"fixed-top flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[Oe.jsxs("div",{className:"flex items-center justify-between",children:[l?Oe.jsx("div",{className:"text-sm text-delta-700",children:l}):Oe.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a}),Oe.jsxs("div",{className:"flex gap-x-1",children:[Oe.jsx("div",{className:"flex items-center gap-x-2",children:Oe.jsx(ta,{dataTest:"minimize-button",variant:"textGray",size:"small",onClick:w,endIcon:r&&Oe.jsx(Yi,{height:20,width:20,color:"text-delta-700"}),children:t})}),Oe.jsx("div",{className:"flex items-center gap-x-2",children:Oe.jsx(ta,{dataTest:"close-button",variant:"textGray",size:"small",onClick:c,endIcon:Oe.jsx(wi,{height:20,width:20,color:"text-delta-700"}),children:e})})]})]}),l&&Oe.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:a})]}),Oe.jsx("div",{children:s}),Oe.jsxs("div",{className:"fixed-bottom flex justify-end gap-x-4 border-t-[1px] border-delta-200 p-4",children:[h&&m&&Oe.jsx(ta,{dataTest:"cancel-button",variant:"outlined",onClick:m,children:h}),f&&g&&Oe.jsx(ta,{dataTest:"save-button",onClick:g,children:f})]})]}):null};export{Fy as ACTIONS_COLUMN_ID,gi as ArchiveIcon,Xr as AssignmentIcon,Qr as AssignmentOutlineIcon,ae as Avatar,Qi as BadgeIcon,Ir as BellIcon,Rr as BellOutlineIcon,Di as CalendarBlankOutlineIcon,Yr as CalendarIcon,Zr as CalendarRangeIcon,vi as CheckBoxCheckedIcon,Kr as CheckFactOutlineIcon,xi as CheckIcon,Gr as CheckOutlineIcon,Fr as ChevronDoubleLeftIcon,zr as ChevronDoubleRightIcon,yi as ChevronDownIcon,qr as ChevronLeftIcon,Lr as ChevronRightIcon,bi as ChevronUpIcon,le as ClickAwayListener,wi as CloseIcon,Ki as ConsentsIcon,Hr as DashboardViewIcon,Ur as DashboardViewOutlineIcon,Ti as DeleteOutlineIcon,ci as DotsVerticalIcon,mi as DownloadIcon,Ni as DragHorizontalIcon,hi as DropDownIcon,pi as DropUpIcon,Ai as DvrIcon,qy as EXPAND_COLUMN_ID,Hi as EarthIcon,Si as EmptyPageIcon,Ri as ErrorOutlineIcon,se as Fade,qi as FastCheckOutlineIcon,ji as FilePdfIcon,Pi as FilterIcon,ai as FindReplaceIcon,li as FindReplacePeopleIcon,Dr as HamburgerIcon,Ei as InboxOutboxIcon,Ci as InboxOutboxOutlineIcon,Zi as KeyboardCapslockIcon,Li as LinkOutlineIcon,Jr as ListNumberedIcon,Bi as ListSettingsLineIcon,zi as ListStatusIcon,fi as LoadingIcon,Mi as LockIcon,ei as MessageProcessingIcon,ti as MessageProcessingOutlineIcon,Xi as MessageReplyIcon,tw as MinimizableDialog,Yi as MinimizeIcon,Gi as OutlineCalendarMonth,ue as Paper,Br as PdfIcon,Wi as PencilOutlineIcon,$r as PeopleIcon,Wr as PeopleOutlineIcon,_i as PermMediaIcon,ki as PermMediaOutline,si as PersonIcon,ui as PersonOutlineIcon,ce as Popper,Vr as QnrIcon,Ii as ReplayIcon,ni as ReportBoxIcon,oi as ReportBoxOutlineIcon,ap as RichInput,Ly as SELECT_COLUMN_ID,di as SearchIcon,ri as SettingsIcon,Ui as SettingsMenuHorizontalIcon,ii as SettingsOutlineIcon,de as Skeleton,Zl as SnackbarProvider,Ry as StyledAccordion,Dy as StyledAccordionDetails,Iy as StyledAccordionSummary,aa as StyledAlert,la as StyledAlertTitle,Se as StyledBadge,ta as StyledButton,ns as StyledCheckbox,Ne as StyledChip,Ay as StyledContainer,ty as StyledDatePicker,na as StyledDialog,oa as StyledDialogActions,ra as StyledDialogContent,ia as StyledDialogTitle,Cy as StyledDrawer,ew as StyledFilterMenu,$v as StyledFormControl,by as StyledFormControlLabel,Ey as StyledFormGroup,wy as StyledFormHelperText,xy as StyledFormLabel,rs as StyledInput,is as StyledInputField,_y as StyledInputLabel,rh as StyledLabel,Ty as StyledLink,Oy as StyledMenu,Sy as StyledMenuItem,Ny as StyledMenuList,Qb as StyledModuleTitle,Vb as StyledPopover,fp as StyledRadio,pp as StyledRadioGroup,lp as StyledSelect,up as StyledSelectAutocomplete,sp as StyledSelectItem,cp as StyledSlider,Xl as StyledSnackbar,ky as StyledStack,dp as StyledSwitch,Py as StyledTab,Yb as StyledTable,My as StyledTabs,ls as StyledTextarea,yy as StyledTimePicker,Xn as StyledTooltip,Ji as StyledTypography,Xb as StyledWidgetTitle,Vi as TextBoxCheckOutlineIcon,Oi as TopicIcon,Fi as UnknownDocumentOutlineRoundedIcon,$i as WarningAmberOutlineIcon,Al as closeSnackbar,Pb as createColumnHelper,Ml as enqueueSnackbar,ts as message,me as omit,ve as pick,Ql as processAlertSnackBar,Jl as processInfoSnackbar,ye as tokenOptimizer,Gl as useSnackbar};
@@ -56,6 +56,7 @@ export type StyledTableProps<TData, TCustomData> = {
56
56
  }) => ReactElement | null;
57
57
  getRowSelectionIds?: (ids: string[]) => void;
58
58
  hideHeader?: boolean;
59
+ pageSize?: number;
59
60
  } & Omit<TTableOptions<TData>, 'getCoreRowModel' | 'getExpandedRowModel' | 'getFilteredRowModel' | 'getSortedRowModel'> & TFooter<TData>;
60
61
  export declare const SELECT_COLUMN_ID = "select";
61
62
  export declare const EXPAND_COLUMN_ID = "expand-column-id";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "2.22.8",
6
+ "version": "2.22.9",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist/**/*",