@hybr1d-tech/charizard 1.1.24 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hybr1d-ui.js +840 -835
- package/dist/hybr1d-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/hybr1d-ui.umd.cjs
CHANGED
|
@@ -27,7 +27,7 @@ Check the top-level render call using <`+D+">.")}return M}}function de(f,M){{if(
|
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,e5,c1,cc,c1),me[c1+e5]=!0}}return f===n?ec(B0):Kn(B0),B0}}function lc(f,M,D){return he(f,M,D,!0)}function tc(f,M,D){return he(f,M,D,!1)}var ac=tc,nc=lc;S1.Fragment=n,S1.jsx=ac,S1.jsxs=nc}()),S1}var C5;function ke(){return C5||(C5=1,process.env.NODE_ENV==="production"?l3.exports=Ee():l3.exports=Be()),l3.exports}var t=ke();const G0={iconSpan:"_iconSpan_1c9ja_1",icon:"_icon_1c9ja_1",closeIconSpan:"_closeIconSpan_1c9ja_14",closeIcon:"_closeIcon_1c9ja_14",closeToastBtn:"_closeToastBtn_1c9ja_28",toastMessageBox:"_toastMessageBox_1c9ja_34",toastMessage:"_toastMessage_1c9ja_34",toastInfo:"_toastInfo_1c9ja_44"},Re="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%208c0%204.42%203.58%208%208%208s8-3.58%208-8-3.58-8-8-8-8%203.58-8%208m11.29-2.71a1.003%201.003%200%200%201%201.42%201.42l-5%205c-.18.18-.43.29-.71.29s-.53-.11-.71-.29l-3-3a1.003%201.003%200%200%201%201.42-1.42L7%209.59z'%20fill='%2336B37E'/%3e%3c/svg%3e",_5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%20.005A7.993%207.993%200%200%200%20.005%208%207.993%207.993%200%200%200%208%2015.995%207.993%207.993%200%200%200%2015.995%208%207.993%207.993%200%200%200%208%20.005M7%2012.997v-1.999h2v1.999zm0-9.994V10h2V3.003z'%20fill='%23E74C3C'/%3e%3c/svg%3e",x5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m15.845%2013.5.01-.01-6.996-12-.01.01A.97.97%200%200%200%208%201c-.37%200-.67.2-.85.5l-.01-.01-6.995%2012%20.01.01c-.09.15-.15.31-.15.5%200%20.55.45%201%201%201h13.99c.55%200%201-.45%201-1%200-.19-.06-.35-.15-.5M9%2012.99H7.001v-2h1.998zm-1.998-3H9v-5H7.001z'%20fill='%23F39C12'/%3e%3c/svg%3e",Ve="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%200C3.58%200%200%203.58%200%208s3.58%208%208%208%208-3.58%208-8-3.58-8-8-8m1%203v2H7V3zm-3%209v1h4v-1H9V6H6v1h1v5z'%20fill='%23254DDA'/%3e%3c/svg%3e",u2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.47%206.47a.75.75%200%200%201%201.06%200L12%2010.94l4.47-4.47a.75.75%200%201%201%201.06%201.06L13.06%2012l4.47%204.47a.75.75%200%201%201-1.06%201.06L12%2013.06l-4.47%204.47a.75.75%200%200%201-1.06-1.06L10.94%2012%206.47%207.53a.75.75%200%200%201%200-1.06'%20fill='%23070F2C'/%3e%3c/svg%3e";function B({path:e,width:l,height:c,spanClassName:n="",svgClassName:a="",customSpanStyles:o={},customSvgStyles:r={},handleClick:i}){return t.jsx("span",{className:`${n}`,style:{...o},onClick:i,children:t.jsx(pe,{src:e,className:a,style:{...r},onError:s=>console.log(s.message),width:l,height:c})})}const t3={position:"top-right",autoClose:1800,hideProgressBar:!0};function a3({msg:e,info:l}){return t.jsxs("div",{className:g(G0.toastMessageBox),children:[t.jsx("h4",{className:g(G0.toastMessage,"zap-content-medium"),children:e}),t.jsx("p",{className:g(G0.toastInfo,"zap-content-regular"),children:l})]})}const I5=({msg:e,info:l,options:c})=>J1.toast.success(t.jsx(a3,{msg:e,info:l,type:"success"}),{...t3,icon:t.jsx(B,{path:Re,svgClassName:g(G0.icon,G0.success),spanClassName:G0.iconSpan}),...c}),Le=({msg:e,info:l,options:c})=>J1.toast.error(t.jsx(a3,{msg:e,info:l,type:"error"}),{...t3,icon:t.jsx(B,{path:_5,svgClassName:g(G0.icon,G0.error),spanClassName:G0.iconSpan}),...c}),De=({msg:e,info:l,options:c})=>J1.toast.info(t.jsx(a3,{msg:e,info:l,type:"info"}),{...t3,icon:t.jsx(B,{path:Ve,svgClassName:g(G0.icon,G0.info),spanClassName:G0.iconSpan}),...c}),Ge=({msg:e,info:l,options:c})=>J1.toast.warning(t.jsx(a3,{msg:e,info:l,type:"warning"}),{...t3,icon:t.jsx(B,{path:x5,svgClassName:g(G0.icon,G0.warning),spanClassName:G0.iconSpan}),...c});function He({closeToast:e}){return t.jsx("button",{className:G0.closeToastBtn,onClick:e,children:t.jsx(B,{path:u2,svgClassName:G0.closeIcon,spanClassName:G0.closeIconSpan})})}const T3=(e,l,c)=>e===1||e===0||e===void 0||e===null?l:c,z5=(e,l)=>l&&e.length>l?`${e.substring(0,l)}...`:e,O3=e=>e.split(" ").filter(Boolean).slice(0,2).reduce((c,n)=>c+(n[0]||"").toUpperCase(),""),$3=e=>{if(!e||!e.first_name)return"-";let l=e.first_name;return e.middle_name&&(l+=` ${e.middle_name}`),e.last_name&&(l+=` ${e.last_name}`),l},Z3=async(e,l=!0)=>{e&&(await navigator.clipboard.writeText(e).catch(console.error),l&&I5({msg:`Successfully copied ${e}`,options:{toastId:e,autoClose:3e3}}))},X3=["Backspace","Tab","ArrowLeft","ArrowRight","Delete","Enter","Control","Meta"],Fe=0,Pe=25;var W3=(e=>(e.SEARCH="search",e.SORT_BY="sort_by",e.SORT_ORDER="sort_order",e.INITIAL_FILTER="initial_filter",e.FILTER="filter",e.RESET_FILTERS="reset_filters",e.RESET_ALL="reset_all",e.SELECTOR_FILTER="selector_filter",e.PAGE="page",e.LIMIT="limit",e.SET_DURATION="set_duration",e))(W3||{});const y5=(e,l=[])=>{const c={};return e&&Object.keys(e).forEach(n=>{e[n]&&!l.includes(n)&&(c[n]=e[n])}),c},A5=e=>{if(e.sort_by)switch(e.sort_order){case"asc":return`+${e.sort_by}`;case"desc":return`-${e.sort_by}`;default:return`${e.sort_by}`}},Te=e=>{const l={page:e.page,limit:e.limit};return e.search&&(l.search=e.search),e.sort_by&&(l.sort_by=A5({sort_by:e.sort_by,sort_order:e.sort_order})),e.filters&&Object.assign(l,y5(e.filters)),Object.keys(l).forEach(c=>{l[c]===void 0&&delete l[c]}),l},Oe=(e,{payload:l,type:c},n)=>{switch(c){case"search":return{...e,search:l,page:0};case"sort_by":return{...e,sort_by:l,page:0};case"sort_order":return{...e,sort_order:l};case"initial_filter":return{...e,filters:l};case"filter":{const{value:a,filterType:o}=l;return{...e,page:0,filters:{...e.filters,[o]:a}}}case"reset_all":return n;case"reset_filters":return{...e,filters:n.filters};case"page":return{...e,page:l};case"limit":return{...e,limit:l,page:0};case"set_duration":return{...e,filters:{...e.filters,duration:l}};default:throw new Error(`Unhandled action type: ${c}`)}},$e=e=>W2.create(l=>({query:e,dispatch:c=>l(n=>({query:Oe(n.query,c,e)}))})),j5={zenHR:{employeeDirectory:{list:{label:"People",value:"team_list"},hiringTemplate:{label:"Hiring Templates",value:"team_hiring_template"},profileSoftwares:{label:"Profile Softwares",value:"team_profile_softwares"}},attendance:{timesheetList:{label:"Attendance Timesheets",value:"attendance_timesheets_list"},policyList:{label:"Attendance Policy List",value:"attendance_policy_list"}},leave:{policies:{label:"Leave Policies",value:"leave_policies"},publicHolidays:{label:"Leave Public Holidays",value:"leave_public_holidays"}}},zenIT:{inventory:{list:{label:"Inventory List",value:"inventory_list"},archive:{label:"Inventory Archive List",value:"inventory_archive_list"},allocationHistory:{label:"Inventory Allocation History",value:"inventory_allocation_history"}},software:{list:{label:"Software List",value:"software_list"},users:{label:"Software Users",value:"software_users"},detailsUsers:{label:"Software Details Users",value:"software_details_users"}},mdm:{devices:{label:"MDM Devices",value:"mdm_devices"},users:{label:"MDM Users",value:"mdm_users"}}},zenTools:{workflow:{list:{label:"Workflow List",value:"workflow_list"},history:{label:"Workflow History",value:"workflow_history"},forms:{label:"Workflow Forms",value:"workflow_forms"}}},zenPerformance:{goal:{list:{label:"Goal List",value:"goal_list"},departmentList:{label:"Department Goals",value:"departments_goal_list"}}}},Ze=e=>{for(const l of Object.values(j5))for(const c of Object.values(l))for(const n of Object.values(c))if(n.value===e)return n};function Y3(e){return q.useMemo(()=>u5(e),[e])}function w5(e=-3,l,c){const n=l?new Date(l):null,a=n&&!isNaN(n.getTime())?n:D0.addMonths(new Date,e),o=c?new Date(c):null,r=o&&!isNaN(o.getTime())?o:new Date,[i,s]=q.useState({from:a,to:r}),d=i.from?D0.format(i.from,"yyyy-MM-dd"):"",m=i.to?D0.format(i.to,"yyyy-MM-dd"):"",u=q.useCallback(v=>{s({from:v==null?void 0:v.from,to:v==null?void 0:v.to})},[]);return{from:d,to:m,handleDateChange:u,period:i}}function N5(e,l=150){const[c,n]=q.useState(e);return q.useEffect(()=>{const a=setTimeout(()=>{n(e)},l);return()=>{clearTimeout(a)}},[e,l]),c}const J3=()=>{const[e,l]=q.useState(!1);return{isOpen:e,onOpen:()=>{l(!0)},onClose:()=>{l(!1)}}},S5=e=>{q.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e])},M5=e=>typeof window<"u"?window.matchMedia(e).matches:!1;function E5(e){const[l,c]=k.useState(M5(e));return k.useEffect(()=>{function n(){c(M5(e))}const a=window.matchMedia(e);return n(),a.addEventListener("change",n),()=>{a.removeEventListener("change",n)}},[e]),l}const b2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.694%208.284a1.043%201.043%200%200%201%200%201.476l-6.956%206.956a1.044%201.044%200%200%201-1.476%200L4.306%209.76A1.043%201.043%200%201%201%205.78%208.284L12%2014.503l6.219-6.22a1.043%201.043%200%200%201%201.475%200'%20fill='%23070F2C'/%3e%3c/svg%3e",B5="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.5%2014.25a2.25%202.25%200%201%201%200-4.5%202.25%202.25%200%200%201%200%204.5Zm7.5%200a2.25%202.25%200%201%201%200-4.5%202.25%202.25%200%200%201%200%204.5Zm7.5%200a2.25%202.25%200%201%201%200-4.5%202.25%202.25%200%200%201%200%204.5Z'%20fill='%23C5C2D7'/%3e%3c/svg%3e",X={btn:"_btn_1xkr8_2",disabled:"_disabled_1xkr8_23",btnSm:"_btnSm_1xkr8_31",btnAdapt:"_btnAdapt_1xkr8_38",btnXs:"_btnXs_1xkr8_42",btnPrimary:"_btnPrimary_1xkr8_56",btnSecondary:"_btnSecondary_1xkr8_65",btnGhost:"_btnGhost_1xkr8_74",btnDanger:"_btnDanger_1xkr8_84",btnLink:"_btnLink_1xkr8_89",btnMinimal:"_btnMinimal_1xkr8_94",btnGrp:"_btnGrp_1xkr8_106",btnMenu:"_btnMenu_1xkr8_112",btnMenuSingle:"_btnMenuSingle_1xkr8_118",btnAddon:"_btnAddon_1xkr8_122",btnAddonPrimary:"_btnAddonPrimary_1xkr8_127",btnAddonSecondary:"_btnAddonSecondary_1xkr8_132",btnAddonGhost:"_btnAddonGhost_1xkr8_136",btnImgPrimary:"_btnImgPrimary_1xkr8_140",btnImgSecondary:"_btnImgSecondary_1xkr8_144",btnImgGhost:"_btnImgGhost_1xkr8_148",btnImgSm:"_btnImgSm_1xkr8_152",menus:"_menus_1xkr8_157",menu:"_menu_1xkr8_157",menuDisabled:"_menuDisabled_1xkr8_186",menuIcon:"_menuIcon_1xkr8_195",customTrigger:"_customTrigger_1xkr8_206",customTriggerActive:"_customTriggerActive_1xkr8_218",actionsBoxRegular:"_actionsBoxRegular_1xkr8_224",actionsBoxSmall:"_actionsBoxSmall_1xkr8_235",actionsDropdownSpan:"_actionsDropdownSpan_1xkr8_240",actionsDropdown:"_actionsDropdown_1xkr8_240",actionsDropdownActive:"_actionsDropdownActive_1xkr8_261",chevronDown:"_chevronDown_1xkr8_265"};var W0=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.GHOST="ghost",e.DANGER="danger",e.LINK="link",e.MINIMAL="minimal",e))(W0||{});function P0({children:e,variant:l="primary",disabled:c=!1,onClick:n,type:a="button",size:o="md",customStyles:r={}}){return t.jsx("button",{className:g(X.btn,l==="primary"&&X.btnPrimary,l==="secondary"&&X.btnSecondary,l==="ghost"&&X.btnGhost,l==="danger"&&X.btnDanger,l==="link"&&X.btnLink,l==="minimal"&&X.btnMinimal,o==="sm"&&X.btnSm,o==="adapt"&&X.btnAdapt,o==="xs"&&X.btnXs,c&&X.disabled),disabled:c,onClick:n,type:a,style:r,children:e})}function k5({children:e,variant:l="primary",disabled:c=!1,menuItems:n,onClick:a,isCustomTrigger:o=!1,isSingleBtnTrigger:r=!1,customData:i,size:s="md",actionsDropdownOptions:d,positionerProps:m,isTable:u=!1}){const[v,h]=P.useMachine(v2.machine({id:q.useId(),positioning:{placement:(m==null?void 0:m.placement)||"bottom-end"}})),I=v2.connect(v,h,P.normalizeProps);q.useEffect(()=>{!o||!(d!=null&&d.setIsActive)||d.setIsActive(I.open)},[I.open]);const _=q.useRef(I.open);q.useEffect(()=>{_.current=I.open},[I.open]);const b=()=>{_.current&&(console.log("scrolling..."),I.setOpen(!1))};q.useEffect(()=>{if(u){const p=document.getElementById("zap-table-scroll-container");if(p)return p.addEventListener("scroll",b,{passive:!0}),()=>p.removeEventListener("scroll",b)}},[]);const x=t.jsx(t.Fragment,{children:n.length>0&&t.jsx("div",{...I.getPositionerProps(),children:t.jsx("div",{...I.getContentProps(),className:X.menus,children:n.filter(p=>p.filterFn?p.filterFn(i):!0).map(p=>t.jsxs("div",{className:g(X.menu,{[X.menuDisabled]:p.disabled}),...I.getItemProps({value:p.label.toLowerCase()}),onClick:p.disabled?void 0:o?()=>p.onClick(i):p.onClick,children:[p.iconSrc&&t.jsx(B,{path:p.iconSrc,svgClassName:X.menuIcon}),p.label]},p.label))})})});return t.jsxs(t.Fragment,{children:[r?t.jsxs("button",{className:g(X.btn,X.btnMenuSingle,l==="primary"&&X.btnPrimary,l==="secondary"&&X.btnSecondary,l==="ghost"&&X.btnGhost,s==="sm"&&X.btnSm,c&&X.disabled),disabled:c,...I.getTriggerProps(),children:[e,t.jsx(B,{path:b2,width:24,height:24,svgClassName:X.chevronDown})]}):o?t.jsx("button",{className:g("zap-reset-btn",X.customTrigger,I.open&&X.customTriggerActive),...I.getTriggerProps(),children:e}):t.jsxs("div",{className:X.btnGrp,children:[t.jsx("button",{className:g(X.btn,X.btnMenu,l==="primary"&&X.btnPrimary,l==="secondary"&&X.btnSecondary,l==="ghost"&&X.btnGhost,s==="sm"&&X.btnSm,c&&X.disabled),disabled:c,onClick:a,children:e}),t.jsx("button",{className:g(X.btn,X.btnAddon,l==="primary"&&X.btnPrimary,l==="primary"&&X.btnAddonPrimary,l==="secondary"&&X.btnSecondary,l==="secondary"&&X.btnAddonSecondary,l==="ghost"&&X.btnGhost,l==="ghost"&&X.btnAddonGhost,s==="sm"&&X.btnSm,c&&X.disabled),disabled:c,...I.getTriggerProps(),children:t.jsx("img",{src:b2,alt:"chevron down",className:g(l==="primary"&&X.btnImgPrimary,l==="secondary"&&X.btnImgSecondary,l==="ghost"&&X.btnImgGhost,s==="sm"&&X.btnImgSm)})})]}),u?t.jsx(P.Portal,{children:x}):x]})}function Xe({menuItems:e,data:l,variant:c="regular",isTable:n=!1}){const[a,o]=q.useState(!1);return t.jsx(k5,{menuItems:e,isCustomTrigger:!0,customData:l,actionsDropdownOptions:{setIsActive:o},isTable:n,children:t.jsx("div",{className:g(c==="regular"&&X.actionsBoxRegular,c==="small"&&X.actionsBoxSmall,a&&X.actionsBoxActive),children:t.jsx(B,{path:B5,svgClassName:g(X.actionsDropdown,a&&X.actionsDropdownActive),spanClassName:X.actionsDropdownSpan})})})}P0.MenuButton=k5,P0.ActionsDropdown=Xe;const S2={container:"_container_1htmo_1",containerRow:"_containerRow_1htmo_11",title:"_title_1htmo_16",textRow:"_textRow_1htmo_27",desc:"_desc_1htmo_31",info:"_info_1htmo_45",iconBox:"_iconBox_1htmo_49",icon:"_icon_1htmo_49"};function R5({icon:e,title:l,desc:c,flexDir:n="column",btnText:a,onClick:o,customSvgClassName:r}){return t.jsxs("div",{className:g(S2.container,n==="row"&&S2.containerRow),children:[t.jsx("div",{className:S2.iconBox,children:t.jsx(B,{path:e,svgClassName:g(S2.icon,r||void 0)})}),t.jsxs("div",{className:S2.info,children:[t.jsx("h6",{className:g(S2.title,n==="row"&&S2.textRow),children:l}),c&&t.jsx("p",{className:g(S2.desc,n==="row"&&S2.textRow),children:c})]}),a&&t.jsx(P0,{onClick:o,variant:W0.GHOST,children:a})]})}const We="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='currentColor'%3e%3cpath%20d='M4.627%208.889%204%204l2.483%202.207L9.5%208.889H4.627Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.65%203.337a.75.75%200%200%201%20.848.102l1.988%201.767A8.725%208.725%200%200%201%2012%203.25a8.725%208.725%200%200%201%206.187%202.563A8.725%208.725%200%200%201%2020.75%2012a8.725%208.725%200%200%201-2.563%206.187A8.724%208.724%200%200%201%2012%2020.75a8.725%208.725%200%200%201-6.187-2.563%208.764%208.764%200%200%201-1.876-2.784.75.75%200%200%201%201.381-.584A7.262%207.262%200%200%200%2012%2019.25a7.225%207.225%200%200%200%205.127-2.123A7.225%207.225%200%200%200%2019.25%2012a7.226%207.226%200%200%200-2.123-5.127A7.225%207.225%200%200%200%2012%204.75a7.225%207.225%200%200%200-4.375%201.469l2.373%202.11a.75.75%200%200%201-.498%201.31H4.628a.75.75%200%200%201-.744-.655l-.628-4.889a.75.75%200%200%201%20.394-.758ZM5.404%206.25l-.405-.36.094.736c.1-.128.204-.254.31-.376Zm.458%201.888c.199-.314.42-.612.663-.891l1.002.89H5.862Z'/%3e%3c/g%3e%3c/svg%3e",m0={filters:"_filters_14ho9_1",filtersInfo:"_filtersInfo_14ho9_7",filter:"_filter_14ho9_1",filterIcon2:"_filterIcon2_14ho9_22",filterCol:"_filterCol_14ho9_26",filterActive:"_filterActive_14ho9_34",filterIcon:"_filterIcon_14ho9_22",resetIcon2:"_resetIcon2_14ho9_44",totalSelected:"_totalSelected_14ho9_68",positioner:"_positioner_14ho9_80",dropdown:"_dropdown_14ho9_84",options:"_options_14ho9_99",optionsEmpty:"_optionsEmpty_14ho9_107",option:"_option_14ho9_99",selectedFilters:"_selectedFilters_14ho9_132",dropdownSearch:"_dropdownSearch_14ho9_139",footerBox:"_footerBox_14ho9_148",footer:"_footer_14ho9_148",resetBtn:"_resetBtn_14ho9_168",resetIcon:"_resetIcon_14ho9_44",optionLabel:"_optionLabel_14ho9_198",filterTooltip:"_filterTooltip_14ho9_228",filterValue:"_filterValue_14ho9_244",filterTooltipTrigger:"_filterTooltipTrigger_14ho9_258"};function Ye({label:e,value:l,addFilters:c,removeFilters:n,checked:a,filterKey:o,filterDispatch:r,countryCode:i,customName:s}){const[d,m]=P.useMachine(o1.machine({id:l,name:e,checked:a,onCheckedChange:({checked:v})=>{v?c(o,l,r):n(o,l,r)}})),u=o1.connect(d,m,P.normalizeProps);return t.jsxs("label",{...u.getRootProps(),className:m0.optionLabel,children:[t.jsx("div",{...u.getControlProps()}),t.jsxs("span",{...u.getLabelProps(),children:[i&&t.jsx(D3,{countryCode:i||"IN",style:{fontSize:"15px",lineHeight:"15px",marginLeft:"-5px",marginRight:"7px"}}),s?t.jsx("div",{dangerouslySetInnerHTML:{__html:s}}):e]}),t.jsx("input",{...u.getHiddenInputProps()})]})}function Je({filter:e,tableFilter:l,selectedFilters:c}){var i;const[n,a]=P.useMachine(s1.machine({id:e.key})),o=s1.connect(n,a,P.normalizeProps),r=(i=e.options)==null?void 0:i.filter(s=>l==null?void 0:l.values.includes(s.value));return t.jsxs(t.Fragment,{children:[t.jsxs("div",{...o.getTriggerProps(),className:g("zap-reset-btn",m0.filterTooltipTrigger),children:[t.jsx("div",{className:m0.filterCol,children:e.name}),c!==0&&t.jsx("span",{className:m0.totalSelected,children:c})]}),o.open&&c!==0&&t.jsx("div",{...o.getPositionerProps(),children:t.jsx("div",{...o.getContentProps(),className:m0.filterTooltip,children:r.map(s=>t.jsx("div",{className:m0.filterValue,children:s.name},s.value))})})]})}const Ue="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.53%203.47a.75.75%200%200%200-1.06%200l-4%204a.75.75%200%200%200%200%201.06l4%204a.75.75%200%201%200%201.06-1.06L8.81%208.75H11c.88%200%202.217.27%203.312%201.059%201.057.76%201.938%202.035%201.938%204.191%200%202.156-.881%203.43-1.938%204.191-1.095.789-2.432%201.059-3.312%201.059a.75.75%200%200%200%200%201.5c1.12%200%202.783-.33%204.188-1.341%201.443-1.04%202.562-2.765%202.562-5.409%200-2.644-1.119-4.37-2.562-5.409C13.783%207.58%2012.12%207.25%2011%207.25H8.81l2.72-2.72a.75.75%200%200%200%200-1.06Z'%20fill='currentColor'/%3e%3c/svg%3e",V5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11%204.75a6.25%206.25%200%201%200%200%2012.5%206.25%206.25%200%200%200%200-12.5M3.25%2011a7.75%207.75%200%201%201%2013.735%204.924l3.545%203.546a.75.75%200%201%201-1.06%201.06l-3.546-3.545A7.75%207.75%200%200%201%203.25%2011'%20fill='%23070F2C'/%3e%3c/svg%3e",Y2={box:"_box_1cmss_1",search:"_search_1cmss_5",searchDisabled:"_searchDisabled_1cmss_21",searchIcon:"_searchIcon_1cmss_38",clearIcon:"_clearIcon_1cmss_39"};function G2({id:e,search:l,setSearch:c,placeholder:n="Search",clearIconClearFn:a,customStyles:o,disabled:r=!1}){const i=typeof c=="function"&&typeof l=="string",s=o==null?void 0:o.customInputStyles,d=o==null?void 0:o.customIconStyles;return t.jsxs("div",{className:Y2.box,children:[i?t.jsx("input",{id:e,type:"text",className:g(Y2.search,r&&Y2.searchDisabled,"zap-content-medium"),placeholder:n,value:l,onChange:m=>{c(m.target.value)},style:s,disabled:r}):t.jsx("input",{id:e,type:"text",className:g(Y2.search,r&&Y2.searchDisabled,"zap-content-medium"),placeholder:n,style:s,disabled:r}),t.jsx("span",{children:t.jsx("img",{src:V5,alt:"search",className:Y2.searchIcon,style:d})}),i&&l.length!==0&&t.jsx("span",{onClick:()=>{typeof a=="function"&&a(),c("")},children:t.jsx("img",{src:u2,alt:"Clear Search",className:Y2.clearIcon,style:d})})]})}function Qe({filter:e,tableFilters:l,tableFilter:c,addFilters:n,removeFilters:a,resetFilters:o,filterDispatch:r}){var b,x;const[i,s]=q.useState(""),[d,m]=P.useMachine(v2.machine({id:e.id,closeOnSelect:!1})),u=v2.connect(d,m,P.normalizeProps),v=e.options.filter(p=>p.name?p.name.toLowerCase().includes(i.toLowerCase()):!1),h=c==null?void 0:c.values.length,I=()=>{o(c==null?void 0:c.key,r),u.setOpen(!1)},_=p=>{let z=!1;return l.forEach(y=>{y.values.forEach(j=>{if(j===p){z=!0;return}})}),z};return t.jsxs("div",{children:[t.jsxs("button",{className:g("zap-reset-btn",m0.filter,u.open&&m0.filterActive),...u.getTriggerProps(),children:[t.jsx(Je,{filter:e,tableFilter:c,selectedFilters:h}),t.jsx(B,{path:b2,svgClassName:m0.filterIcon2})]}),t.jsx("div",{...u.getPositionerProps(),className:m0.positioner,children:u.open&&t.jsxs("div",{...u.getContentProps(),className:m0.dropdown,onKeyDown:()=>{},children:[!((b=e.config)!=null&&b.hideSearch)&&t.jsx("div",{className:m0.dropdownSearch,children:t.jsx(G2,{id:"filter-search",search:i,setSearch:s,placeholder:((x=e.config)==null?void 0:x.placeholder)||"Search"})}),t.jsx("div",{className:m0.options,children:v.length===0?t.jsx("div",{className:m0.optionsEmpty,children:"No results found"}):v.map((p,z)=>t.jsx("div",{...u.getItemProps({value:p.value}),className:m0.option,children:t.jsx(Ye,{label:p.name,value:p.value,filterKey:e.key,addFilters:n,removeFilters:a,checked:_(p.value),filterDispatch:r,countryCode:p.country_code,customName:p.customName},p.value)},z))}),t.jsx("div",{className:m0.footerBox,children:t.jsxs("div",{className:m0.footer,children:[t.jsxs("div",{className:m0.selectedFilters,children:[h," Selected"]}),t.jsxs("button",{className:g("zap-reset-btn",m0.resetBtn),onClick:I,children:[t.jsx(B,{path:Ue,svgClassName:m0.resetIcon}),"Reset"]})]})})]})})]})}const L5={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},U3=new Map,n3=e=>{const l=U3.get(e);return l?Object.fromEntries(Object.entries(l.stores).map(([c,n])=>[c,n.getState()])):{}},Ke=(e,l,c)=>{if(e===void 0)return{type:"untracked",connection:l.connect(c)};const n=U3.get(c.name);if(n)return{type:"tracked",store:e,...n};const a={connection:l.connect(c),stores:{}};return U3.set(c.name,a),{type:"tracked",store:e,...a}},D5=(e,l={})=>(c,n,a)=>{const{enabled:o,anonymousActionType:r,store:i,...s}=l;let d;try{d=(o??(L5?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!d)return e(c,n,a);const{connection:m,...u}=Ke(i,d,s);let v=!0;a.setState=(_,b,x)=>{const p=c(_,b);if(!v)return p;const z=x===void 0?{type:r||"anonymous"}:typeof x=="string"?{type:x}:x;return i===void 0?(m==null||m.send(z,n()),p):(m==null||m.send({...z,type:`${i}/${z.type}`},{...n3(s.name),[i]:a.getState()}),p)};const h=(..._)=>{const b=v;v=!1,c(..._),v=b},I=e(a.setState,n,a);if(u.type==="untracked"?m==null||m.init(I):(u.stores[u.store]=a,m==null||m.init(Object.fromEntries(Object.entries(u.stores).map(([_,b])=>[_,_===u.store?I:b.getState()])))),a.dispatchFromDevtools&&typeof a.dispatch=="function"){let _=!1;const b=a.dispatch;a.dispatch=(...x)=>{(L5?"production":void 0)!=="production"&&x[0].type==="__setState"&&!_&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),_=!0),b(...x)}}return m.subscribe(_=>{var b;switch(_.type){case"ACTION":if(typeof _.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Q3(_.payload,x=>{if(x.type==="__setState"){if(i===void 0){h(x.state);return}Object.keys(x.state).length!==1&&console.error(`
|
|
30
|
+
<%s key={someKey} {...props} />`,e5,c1,cc,c1),me[c1+e5]=!0}}return f===n?ec(B0):Kn(B0),B0}}function lc(f,M,D){return he(f,M,D,!0)}function tc(f,M,D){return he(f,M,D,!1)}var ac=tc,nc=lc;S1.Fragment=n,S1.jsx=ac,S1.jsxs=nc}()),S1}var C5;function ke(){return C5||(C5=1,process.env.NODE_ENV==="production"?l3.exports=Ee():l3.exports=Be()),l3.exports}var t=ke();const G0={iconSpan:"_iconSpan_1c9ja_1",icon:"_icon_1c9ja_1",closeIconSpan:"_closeIconSpan_1c9ja_14",closeIcon:"_closeIcon_1c9ja_14",closeToastBtn:"_closeToastBtn_1c9ja_28",toastMessageBox:"_toastMessageBox_1c9ja_34",toastMessage:"_toastMessage_1c9ja_34",toastInfo:"_toastInfo_1c9ja_44"},Re="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0%208c0%204.42%203.58%208%208%208s8-3.58%208-8-3.58-8-8-8-8%203.58-8%208m11.29-2.71a1.003%201.003%200%200%201%201.42%201.42l-5%205c-.18.18-.43.29-.71.29s-.53-.11-.71-.29l-3-3a1.003%201.003%200%200%201%201.42-1.42L7%209.59z'%20fill='%2336B37E'/%3e%3c/svg%3e",_5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%20.005A7.993%207.993%200%200%200%20.005%208%207.993%207.993%200%200%200%208%2015.995%207.993%207.993%200%200%200%2015.995%208%207.993%207.993%200%200%200%208%20.005M7%2012.997v-1.999h2v1.999zm0-9.994V10h2V3.003z'%20fill='%23E74C3C'/%3e%3c/svg%3e",x5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='m15.845%2013.5.01-.01-6.996-12-.01.01A.97.97%200%200%200%208%201c-.37%200-.67.2-.85.5l-.01-.01-6.995%2012%20.01.01c-.09.15-.15.31-.15.5%200%20.55.45%201%201%201h13.99c.55%200%201-.45%201-1%200-.19-.06-.35-.15-.5M9%2012.99H7.001v-2h1.998zm-1.998-3H9v-5H7.001z'%20fill='%23F39C12'/%3e%3c/svg%3e",Ve="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%200C3.58%200%200%203.58%200%208s3.58%208%208%208%208-3.58%208-8-3.58-8-8-8m1%203v2H7V3zm-3%209v1h4v-1H9V6H6v1h1v5z'%20fill='%23254DDA'/%3e%3c/svg%3e",u2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.47%206.47a.75.75%200%200%201%201.06%200L12%2010.94l4.47-4.47a.75.75%200%201%201%201.06%201.06L13.06%2012l4.47%204.47a.75.75%200%201%201-1.06%201.06L12%2013.06l-4.47%204.47a.75.75%200%200%201-1.06-1.06L10.94%2012%206.47%207.53a.75.75%200%200%201%200-1.06'%20fill='%23070F2C'/%3e%3c/svg%3e";function B({path:e,width:l,height:c,spanClassName:n="",svgClassName:a="",customSpanStyles:o={},customSvgStyles:r={},handleClick:i}){return t.jsx("span",{className:`${n}`,style:{...o},onClick:i,children:t.jsx(pe,{src:e,className:a,style:{...r},onError:s=>console.log(s.message),width:l,height:c})})}const t3={position:"top-right",autoClose:1800,hideProgressBar:!0};function a3({msg:e,info:l}){return t.jsxs("div",{className:g(G0.toastMessageBox),children:[t.jsx("h4",{className:g(G0.toastMessage,"zap-content-medium"),children:e}),t.jsx("p",{className:g(G0.toastInfo,"zap-content-regular"),children:l})]})}const I5=({msg:e,info:l,options:c})=>J1.toast.success(t.jsx(a3,{msg:e,info:l,type:"success"}),{...t3,icon:t.jsx(B,{path:Re,svgClassName:g(G0.icon,G0.success),spanClassName:G0.iconSpan}),...c}),Le=({msg:e,info:l,options:c})=>J1.toast.error(t.jsx(a3,{msg:e,info:l,type:"error"}),{...t3,icon:t.jsx(B,{path:_5,svgClassName:g(G0.icon,G0.error),spanClassName:G0.iconSpan}),...c}),De=({msg:e,info:l,options:c})=>J1.toast.info(t.jsx(a3,{msg:e,info:l,type:"info"}),{...t3,icon:t.jsx(B,{path:Ve,svgClassName:g(G0.icon,G0.info),spanClassName:G0.iconSpan}),...c}),Ge=({msg:e,info:l,options:c})=>J1.toast.warning(t.jsx(a3,{msg:e,info:l,type:"warning"}),{...t3,icon:t.jsx(B,{path:x5,svgClassName:g(G0.icon,G0.warning),spanClassName:G0.iconSpan}),...c});function He({closeToast:e}){return t.jsx("button",{className:G0.closeToastBtn,onClick:e,children:t.jsx(B,{path:u2,svgClassName:G0.closeIcon,spanClassName:G0.closeIconSpan})})}const T3=(e,l,c)=>e===1||e===0||e===void 0||e===null?l:c,z5=(e,l)=>l&&e.length>l?`${e.substring(0,l)}...`:e,O3=e=>e.split(" ").filter(Boolean).slice(0,2).reduce((c,n)=>c+(n[0]||"").toUpperCase(),""),$3=e=>{if(!e||!e.first_name)return"-";let l=e.first_name;return e.middle_name&&(l+=` ${e.middle_name}`),e.last_name&&(l+=` ${e.last_name}`),l},Z3=async(e,l=!0)=>{e&&(await navigator.clipboard.writeText(e).catch(console.error),l&&I5({msg:`Successfully copied ${e}`,options:{toastId:e,autoClose:3e3}}))},X3=["Backspace","Tab","ArrowLeft","ArrowRight","Delete","Enter","Control","Meta"],Fe=0,Pe=25;var W3=(e=>(e.SEARCH="search",e.SORT_BY="sort_by",e.SORT_ORDER="sort_order",e.INITIAL_FILTER="initial_filter",e.FILTER="filter",e.RESET_FILTERS="reset_filters",e.RESET_ALL="reset_all",e.SELECTOR_FILTER="selector_filter",e.PAGE="page",e.LIMIT="limit",e.SET_DURATION="set_duration",e))(W3||{});const y5=(e,l=[])=>{const c={};return e&&Object.keys(e).forEach(n=>{e[n]&&!l.includes(n)&&(c[n]=e[n])}),c},A5=e=>{if(e.sort_by)switch(e.sort_order){case"asc":return`+${e.sort_by}`;case"desc":return`-${e.sort_by}`;default:return`${e.sort_by}`}},Te=e=>{const l={page:e.page,limit:e.limit};return e.search&&(l.search=e.search),e.sort_by&&(l.sort_by=A5({sort_by:e.sort_by,sort_order:e.sort_order})),e.filters&&Object.assign(l,y5(e.filters)),Object.keys(l).forEach(c=>{l[c]===void 0&&delete l[c]}),l},Oe=(e,{payload:l,type:c},n)=>{switch(c){case"search":return{...e,search:l,page:0};case"sort_by":return{...e,sort_by:l,page:0};case"sort_order":return{...e,sort_order:l};case"initial_filter":return{...e,filters:l};case"filter":{const{value:a,filterType:o}=l;return{...e,page:0,filters:{...e.filters,[o]:a}}}case"reset_all":return n;case"reset_filters":return{...e,filters:n.filters};case"page":return{...e,page:l};case"limit":return{...e,limit:l,page:0};case"set_duration":return{...e,filters:{...e.filters,duration:l}};default:throw new Error(`Unhandled action type: ${c}`)}},$e=e=>W2.create(l=>({query:e,dispatch:c=>l(n=>({query:Oe(n.query,c,e)}))})),j5={team:{employeeDirectory:{list:{label:"People",value:"team_list"},hiringTemplate:{label:"Hiring Templates",value:"team_hiring_template"},profileSoftwares:{label:"Profile Softwares",value:"team_profile_softwares"}}},zenIT:{inventory:{list:{label:"Inventory List",value:"inventory_list"},archive:{label:"Inventory Archive List",value:"inventory_archive_list"},allocationHistory:{label:"Inventory Allocation History",value:"inventory_allocation_history"}},software:{list:{label:"Software List",value:"software_list"},users:{label:"Software Users",value:"software_users"},detailsUsers:{label:"Software Details Users",value:"software_details_users"}},mdm:{devices:{label:"MDM Devices",value:"mdm_devices"},users:{label:"MDM Users",value:"mdm_users"}},webstore:{quotation:{label:"Quotation List",value:"quotation_list"}}},zenCore:{workflow:{list:{label:"Workflow List",value:"workflow_list"},history:{label:"Workflow History",value:"workflow_history"},forms:{label:"Workflow Forms",value:"workflow_forms"}}},zenPerformance:{goal:{list:{label:"Goal List",value:"goal_list"},departmentList:{label:"Department Goals",value:"departments_goal_list"}}},zenHR:{attendance:{timesheetList:{label:"Attendance Timesheets",value:"attendance_timesheets_list"},policyList:{label:"Attendance Policy List",value:"attendance_policy_list"}},leave:{policies:{label:"Leave Policies",value:"leave_policies"},publicHolidays:{label:"Leave Public Holidays",value:"leave_public_holidays"}}}},Ze=e=>{for(const l of Object.values(j5))for(const c of Object.values(l))for(const n of Object.values(c))if(n.value===e)return n};function Y3(e){return q.useMemo(()=>u5(e),[e])}function w5(e=-3,l,c){const n=l?new Date(l):null,a=n&&!isNaN(n.getTime())?n:D0.addMonths(new Date,e),o=c?new Date(c):null,r=o&&!isNaN(o.getTime())?o:new Date,[i,s]=q.useState({from:a,to:r}),d=i.from?D0.format(i.from,"yyyy-MM-dd"):"",m=i.to?D0.format(i.to,"yyyy-MM-dd"):"",u=q.useCallback(v=>{s({from:v==null?void 0:v.from,to:v==null?void 0:v.to})},[]);return{from:d,to:m,handleDateChange:u,period:i}}function N5(e,l=150){const[c,n]=q.useState(e);return q.useEffect(()=>{const a=setTimeout(()=>{n(e)},l);return()=>{clearTimeout(a)}},[e,l]),c}const J3=()=>{const[e,l]=q.useState(!1);return{isOpen:e,onOpen:()=>{l(!0)},onClose:()=>{l(!1)}}},S5=e=>{q.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e])},M5=e=>typeof window<"u"?window.matchMedia(e).matches:!1;function E5(e){const[l,c]=k.useState(M5(e));return k.useEffect(()=>{function n(){c(M5(e))}const a=window.matchMedia(e);return n(),a.addEventListener("change",n),()=>{a.removeEventListener("change",n)}},[e]),l}const b2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.694%208.284a1.043%201.043%200%200%201%200%201.476l-6.956%206.956a1.044%201.044%200%200%201-1.476%200L4.306%209.76A1.043%201.043%200%201%201%205.78%208.284L12%2014.503l6.219-6.22a1.043%201.043%200%200%201%201.475%200'%20fill='%23070F2C'/%3e%3c/svg%3e",B5="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.5%2014.25a2.25%202.25%200%201%201%200-4.5%202.25%202.25%200%200%201%200%204.5Zm7.5%200a2.25%202.25%200%201%201%200-4.5%202.25%202.25%200%200%201%200%204.5Zm7.5%200a2.25%202.25%200%201%201%200-4.5%202.25%202.25%200%200%201%200%204.5Z'%20fill='%23C5C2D7'/%3e%3c/svg%3e",X={btn:"_btn_1xkr8_2",disabled:"_disabled_1xkr8_23",btnSm:"_btnSm_1xkr8_31",btnAdapt:"_btnAdapt_1xkr8_38",btnXs:"_btnXs_1xkr8_42",btnPrimary:"_btnPrimary_1xkr8_56",btnSecondary:"_btnSecondary_1xkr8_65",btnGhost:"_btnGhost_1xkr8_74",btnDanger:"_btnDanger_1xkr8_84",btnLink:"_btnLink_1xkr8_89",btnMinimal:"_btnMinimal_1xkr8_94",btnGrp:"_btnGrp_1xkr8_106",btnMenu:"_btnMenu_1xkr8_112",btnMenuSingle:"_btnMenuSingle_1xkr8_118",btnAddon:"_btnAddon_1xkr8_122",btnAddonPrimary:"_btnAddonPrimary_1xkr8_127",btnAddonSecondary:"_btnAddonSecondary_1xkr8_132",btnAddonGhost:"_btnAddonGhost_1xkr8_136",btnImgPrimary:"_btnImgPrimary_1xkr8_140",btnImgSecondary:"_btnImgSecondary_1xkr8_144",btnImgGhost:"_btnImgGhost_1xkr8_148",btnImgSm:"_btnImgSm_1xkr8_152",menus:"_menus_1xkr8_157",menu:"_menu_1xkr8_157",menuDisabled:"_menuDisabled_1xkr8_186",menuIcon:"_menuIcon_1xkr8_195",customTrigger:"_customTrigger_1xkr8_206",customTriggerActive:"_customTriggerActive_1xkr8_218",actionsBoxRegular:"_actionsBoxRegular_1xkr8_224",actionsBoxSmall:"_actionsBoxSmall_1xkr8_235",actionsDropdownSpan:"_actionsDropdownSpan_1xkr8_240",actionsDropdown:"_actionsDropdown_1xkr8_240",actionsDropdownActive:"_actionsDropdownActive_1xkr8_261",chevronDown:"_chevronDown_1xkr8_265"};var W0=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.GHOST="ghost",e.DANGER="danger",e.LINK="link",e.MINIMAL="minimal",e))(W0||{});function P0({children:e,variant:l="primary",disabled:c=!1,onClick:n,type:a="button",size:o="md",customStyles:r={}}){return t.jsx("button",{className:g(X.btn,l==="primary"&&X.btnPrimary,l==="secondary"&&X.btnSecondary,l==="ghost"&&X.btnGhost,l==="danger"&&X.btnDanger,l==="link"&&X.btnLink,l==="minimal"&&X.btnMinimal,o==="sm"&&X.btnSm,o==="adapt"&&X.btnAdapt,o==="xs"&&X.btnXs,c&&X.disabled),disabled:c,onClick:n,type:a,style:r,children:e})}function k5({children:e,variant:l="primary",disabled:c=!1,menuItems:n,onClick:a,isCustomTrigger:o=!1,isSingleBtnTrigger:r=!1,customData:i,size:s="md",actionsDropdownOptions:d,positionerProps:m,isTable:u=!1}){const[v,h]=P.useMachine(v2.machine({id:q.useId(),positioning:{placement:(m==null?void 0:m.placement)||"bottom-end"}})),I=v2.connect(v,h,P.normalizeProps);q.useEffect(()=>{!o||!(d!=null&&d.setIsActive)||d.setIsActive(I.open)},[I.open]);const _=q.useRef(I.open);q.useEffect(()=>{_.current=I.open},[I.open]);const b=()=>{_.current&&(console.log("scrolling..."),I.setOpen(!1))};q.useEffect(()=>{if(u){const p=document.getElementById("zap-table-scroll-container");if(p)return p.addEventListener("scroll",b,{passive:!0}),()=>p.removeEventListener("scroll",b)}},[]);const x=t.jsx(t.Fragment,{children:n.length>0&&t.jsx("div",{...I.getPositionerProps(),children:t.jsx("div",{...I.getContentProps(),className:X.menus,children:n.filter(p=>p.filterFn?p.filterFn(i):!0).map(p=>t.jsxs("div",{className:g(X.menu,{[X.menuDisabled]:p.disabled}),...I.getItemProps({value:p.label.toLowerCase()}),onClick:p.disabled?void 0:o?()=>p.onClick(i):p.onClick,children:[p.iconSrc&&t.jsx(B,{path:p.iconSrc,svgClassName:X.menuIcon}),p.label]},p.label))})})});return t.jsxs(t.Fragment,{children:[r?t.jsxs("button",{className:g(X.btn,X.btnMenuSingle,l==="primary"&&X.btnPrimary,l==="secondary"&&X.btnSecondary,l==="ghost"&&X.btnGhost,s==="sm"&&X.btnSm,c&&X.disabled),disabled:c,...I.getTriggerProps(),children:[e,t.jsx(B,{path:b2,width:24,height:24,svgClassName:X.chevronDown})]}):o?t.jsx("button",{className:g("zap-reset-btn",X.customTrigger,I.open&&X.customTriggerActive),...I.getTriggerProps(),children:e}):t.jsxs("div",{className:X.btnGrp,children:[t.jsx("button",{className:g(X.btn,X.btnMenu,l==="primary"&&X.btnPrimary,l==="secondary"&&X.btnSecondary,l==="ghost"&&X.btnGhost,s==="sm"&&X.btnSm,c&&X.disabled),disabled:c,onClick:a,children:e}),t.jsx("button",{className:g(X.btn,X.btnAddon,l==="primary"&&X.btnPrimary,l==="primary"&&X.btnAddonPrimary,l==="secondary"&&X.btnSecondary,l==="secondary"&&X.btnAddonSecondary,l==="ghost"&&X.btnGhost,l==="ghost"&&X.btnAddonGhost,s==="sm"&&X.btnSm,c&&X.disabled),disabled:c,...I.getTriggerProps(),children:t.jsx("img",{src:b2,alt:"chevron down",className:g(l==="primary"&&X.btnImgPrimary,l==="secondary"&&X.btnImgSecondary,l==="ghost"&&X.btnImgGhost,s==="sm"&&X.btnImgSm)})})]}),u?t.jsx(P.Portal,{children:x}):x]})}function Xe({menuItems:e,data:l,variant:c="regular",isTable:n=!1}){const[a,o]=q.useState(!1);return t.jsx(k5,{menuItems:e,isCustomTrigger:!0,customData:l,actionsDropdownOptions:{setIsActive:o},isTable:n,children:t.jsx("div",{className:g(c==="regular"&&X.actionsBoxRegular,c==="small"&&X.actionsBoxSmall,a&&X.actionsBoxActive),children:t.jsx(B,{path:B5,svgClassName:g(X.actionsDropdown,a&&X.actionsDropdownActive),spanClassName:X.actionsDropdownSpan})})})}P0.MenuButton=k5,P0.ActionsDropdown=Xe;const S2={container:"_container_1htmo_1",containerRow:"_containerRow_1htmo_11",title:"_title_1htmo_16",textRow:"_textRow_1htmo_27",desc:"_desc_1htmo_31",info:"_info_1htmo_45",iconBox:"_iconBox_1htmo_49",icon:"_icon_1htmo_49"};function R5({icon:e,title:l,desc:c,flexDir:n="column",btnText:a,onClick:o,customSvgClassName:r}){return t.jsxs("div",{className:g(S2.container,n==="row"&&S2.containerRow),children:[t.jsx("div",{className:S2.iconBox,children:t.jsx(B,{path:e,svgClassName:g(S2.icon,r||void 0)})}),t.jsxs("div",{className:S2.info,children:[t.jsx("h6",{className:g(S2.title,n==="row"&&S2.textRow),children:l}),c&&t.jsx("p",{className:g(S2.desc,n==="row"&&S2.textRow),children:c})]}),a&&t.jsx(P0,{onClick:o,variant:W0.GHOST,children:a})]})}const We="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='currentColor'%3e%3cpath%20d='M4.627%208.889%204%204l2.483%202.207L9.5%208.889H4.627Z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.65%203.337a.75.75%200%200%201%20.848.102l1.988%201.767A8.725%208.725%200%200%201%2012%203.25a8.725%208.725%200%200%201%206.187%202.563A8.725%208.725%200%200%201%2020.75%2012a8.725%208.725%200%200%201-2.563%206.187A8.724%208.724%200%200%201%2012%2020.75a8.725%208.725%200%200%201-6.187-2.563%208.764%208.764%200%200%201-1.876-2.784.75.75%200%200%201%201.381-.584A7.262%207.262%200%200%200%2012%2019.25a7.225%207.225%200%200%200%205.127-2.123A7.225%207.225%200%200%200%2019.25%2012a7.226%207.226%200%200%200-2.123-5.127A7.225%207.225%200%200%200%2012%204.75a7.225%207.225%200%200%200-4.375%201.469l2.373%202.11a.75.75%200%200%201-.498%201.31H4.628a.75.75%200%200%201-.744-.655l-.628-4.889a.75.75%200%200%201%20.394-.758ZM5.404%206.25l-.405-.36.094.736c.1-.128.204-.254.31-.376Zm.458%201.888c.199-.314.42-.612.663-.891l1.002.89H5.862Z'/%3e%3c/g%3e%3c/svg%3e",m0={filters:"_filters_14ho9_1",filtersInfo:"_filtersInfo_14ho9_7",filter:"_filter_14ho9_1",filterIcon2:"_filterIcon2_14ho9_22",filterCol:"_filterCol_14ho9_26",filterActive:"_filterActive_14ho9_34",filterIcon:"_filterIcon_14ho9_22",resetIcon2:"_resetIcon2_14ho9_44",totalSelected:"_totalSelected_14ho9_68",positioner:"_positioner_14ho9_80",dropdown:"_dropdown_14ho9_84",options:"_options_14ho9_99",optionsEmpty:"_optionsEmpty_14ho9_107",option:"_option_14ho9_99",selectedFilters:"_selectedFilters_14ho9_132",dropdownSearch:"_dropdownSearch_14ho9_139",footerBox:"_footerBox_14ho9_148",footer:"_footer_14ho9_148",resetBtn:"_resetBtn_14ho9_168",resetIcon:"_resetIcon_14ho9_44",optionLabel:"_optionLabel_14ho9_198",filterTooltip:"_filterTooltip_14ho9_228",filterValue:"_filterValue_14ho9_244",filterTooltipTrigger:"_filterTooltipTrigger_14ho9_258"};function Ye({label:e,value:l,addFilters:c,removeFilters:n,checked:a,filterKey:o,filterDispatch:r,countryCode:i,customName:s}){const[d,m]=P.useMachine(o1.machine({id:l,name:e,checked:a,onCheckedChange:({checked:v})=>{v?c(o,l,r):n(o,l,r)}})),u=o1.connect(d,m,P.normalizeProps);return t.jsxs("label",{...u.getRootProps(),className:m0.optionLabel,children:[t.jsx("div",{...u.getControlProps()}),t.jsxs("span",{...u.getLabelProps(),children:[i&&t.jsx(D3,{countryCode:i||"IN",style:{fontSize:"15px",lineHeight:"15px",marginLeft:"-5px",marginRight:"7px"}}),s?t.jsx("div",{dangerouslySetInnerHTML:{__html:s}}):e]}),t.jsx("input",{...u.getHiddenInputProps()})]})}function Je({filter:e,tableFilter:l,selectedFilters:c}){var i;const[n,a]=P.useMachine(s1.machine({id:e.key})),o=s1.connect(n,a,P.normalizeProps),r=(i=e.options)==null?void 0:i.filter(s=>l==null?void 0:l.values.includes(s.value));return t.jsxs(t.Fragment,{children:[t.jsxs("div",{...o.getTriggerProps(),className:g("zap-reset-btn",m0.filterTooltipTrigger),children:[t.jsx("div",{className:m0.filterCol,children:e.name}),c!==0&&t.jsx("span",{className:m0.totalSelected,children:c})]}),o.open&&c!==0&&t.jsx("div",{...o.getPositionerProps(),children:t.jsx("div",{...o.getContentProps(),className:m0.filterTooltip,children:r.map(s=>t.jsx("div",{className:m0.filterValue,children:s.name},s.value))})})]})}const Ue="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.53%203.47a.75.75%200%200%200-1.06%200l-4%204a.75.75%200%200%200%200%201.06l4%204a.75.75%200%201%200%201.06-1.06L8.81%208.75H11c.88%200%202.217.27%203.312%201.059%201.057.76%201.938%202.035%201.938%204.191%200%202.156-.881%203.43-1.938%204.191-1.095.789-2.432%201.059-3.312%201.059a.75.75%200%200%200%200%201.5c1.12%200%202.783-.33%204.188-1.341%201.443-1.04%202.562-2.765%202.562-5.409%200-2.644-1.119-4.37-2.562-5.409C13.783%207.58%2012.12%207.25%2011%207.25H8.81l2.72-2.72a.75.75%200%200%200%200-1.06Z'%20fill='currentColor'/%3e%3c/svg%3e",V5="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11%204.75a6.25%206.25%200%201%200%200%2012.5%206.25%206.25%200%200%200%200-12.5M3.25%2011a7.75%207.75%200%201%201%2013.735%204.924l3.545%203.546a.75.75%200%201%201-1.06%201.06l-3.546-3.545A7.75%207.75%200%200%201%203.25%2011'%20fill='%23070F2C'/%3e%3c/svg%3e",Y2={box:"_box_1cmss_1",search:"_search_1cmss_5",searchDisabled:"_searchDisabled_1cmss_21",searchIcon:"_searchIcon_1cmss_38",clearIcon:"_clearIcon_1cmss_39"};function G2({id:e,search:l,setSearch:c,placeholder:n="Search",clearIconClearFn:a,customStyles:o,disabled:r=!1}){const i=typeof c=="function"&&typeof l=="string",s=o==null?void 0:o.customInputStyles,d=o==null?void 0:o.customIconStyles;return t.jsxs("div",{className:Y2.box,children:[i?t.jsx("input",{id:e,type:"text",className:g(Y2.search,r&&Y2.searchDisabled,"zap-content-medium"),placeholder:n,value:l,onChange:m=>{c(m.target.value)},style:s,disabled:r}):t.jsx("input",{id:e,type:"text",className:g(Y2.search,r&&Y2.searchDisabled,"zap-content-medium"),placeholder:n,style:s,disabled:r}),t.jsx("span",{children:t.jsx("img",{src:V5,alt:"search",className:Y2.searchIcon,style:d})}),i&&l.length!==0&&t.jsx("span",{onClick:()=>{typeof a=="function"&&a(),c("")},children:t.jsx("img",{src:u2,alt:"Clear Search",className:Y2.clearIcon,style:d})})]})}function Qe({filter:e,tableFilters:l,tableFilter:c,addFilters:n,removeFilters:a,resetFilters:o,filterDispatch:r}){var b,x;const[i,s]=q.useState(""),[d,m]=P.useMachine(v2.machine({id:e.id,closeOnSelect:!1})),u=v2.connect(d,m,P.normalizeProps),v=e.options.filter(p=>p.name?p.name.toLowerCase().includes(i.toLowerCase()):!1),h=c==null?void 0:c.values.length,I=()=>{o(c==null?void 0:c.key,r),u.setOpen(!1)},_=p=>{let z=!1;return l.forEach(y=>{y.values.forEach(j=>{if(j===p){z=!0;return}})}),z};return t.jsxs("div",{children:[t.jsxs("button",{className:g("zap-reset-btn",m0.filter,u.open&&m0.filterActive),...u.getTriggerProps(),children:[t.jsx(Je,{filter:e,tableFilter:c,selectedFilters:h}),t.jsx(B,{path:b2,svgClassName:m0.filterIcon2})]}),t.jsx("div",{...u.getPositionerProps(),className:m0.positioner,children:u.open&&t.jsxs("div",{...u.getContentProps(),className:m0.dropdown,onKeyDown:()=>{},children:[!((b=e.config)!=null&&b.hideSearch)&&t.jsx("div",{className:m0.dropdownSearch,children:t.jsx(G2,{id:"filter-search",search:i,setSearch:s,placeholder:((x=e.config)==null?void 0:x.placeholder)||"Search"})}),t.jsx("div",{className:m0.options,children:v.length===0?t.jsx("div",{className:m0.optionsEmpty,children:"No results found"}):v.map((p,z)=>t.jsx("div",{...u.getItemProps({value:p.value}),className:m0.option,children:t.jsx(Ye,{label:p.name,value:p.value,filterKey:e.key,addFilters:n,removeFilters:a,checked:_(p.value),filterDispatch:r,countryCode:p.country_code,customName:p.customName},p.value)},z))}),t.jsx("div",{className:m0.footerBox,children:t.jsxs("div",{className:m0.footer,children:[t.jsxs("div",{className:m0.selectedFilters,children:[h," Selected"]}),t.jsxs("button",{className:g("zap-reset-btn",m0.resetBtn),onClick:I,children:[t.jsx(B,{path:Ue,svgClassName:m0.resetIcon}),"Reset"]})]})})]})})]})}const L5={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},U3=new Map,n3=e=>{const l=U3.get(e);return l?Object.fromEntries(Object.entries(l.stores).map(([c,n])=>[c,n.getState()])):{}},Ke=(e,l,c)=>{if(e===void 0)return{type:"untracked",connection:l.connect(c)};const n=U3.get(c.name);if(n)return{type:"tracked",store:e,...n};const a={connection:l.connect(c),stores:{}};return U3.set(c.name,a),{type:"tracked",store:e,...a}},D5=(e,l={})=>(c,n,a)=>{const{enabled:o,anonymousActionType:r,store:i,...s}=l;let d;try{d=(o??(L5?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!d)return e(c,n,a);const{connection:m,...u}=Ke(i,d,s);let v=!0;a.setState=(_,b,x)=>{const p=c(_,b);if(!v)return p;const z=x===void 0?{type:r||"anonymous"}:typeof x=="string"?{type:x}:x;return i===void 0?(m==null||m.send(z,n()),p):(m==null||m.send({...z,type:`${i}/${z.type}`},{...n3(s.name),[i]:a.getState()}),p)};const h=(..._)=>{const b=v;v=!1,c(..._),v=b},I=e(a.setState,n,a);if(u.type==="untracked"?m==null||m.init(I):(u.stores[u.store]=a,m==null||m.init(Object.fromEntries(Object.entries(u.stores).map(([_,b])=>[_,_===u.store?I:b.getState()])))),a.dispatchFromDevtools&&typeof a.dispatch=="function"){let _=!1;const b=a.dispatch;a.dispatch=(...x)=>{(L5?"production":void 0)!=="production"&&x[0].type==="__setState"&&!_&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),_=!0),b(...x)}}return m.subscribe(_=>{var b;switch(_.type){case"ACTION":if(typeof _.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Q3(_.payload,x=>{if(x.type==="__setState"){if(i===void 0){h(x.state);return}Object.keys(x.state).length!==1&&console.error(`
|
|
31
31
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
32
32
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
33
33
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|