@accounter/client 0.0.8-alpha-20251029124401-d15137847e8450b1ecf3e3cfa6b68dda7239ca45 → 0.0.8-alpha-20251029124448-6b4f8bc975a23de63429b68d0806022dbfc5b226
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/CHANGELOG.md +1 -1
- package/dist/assets/{Checkbox-Cxbop3qM.js → Checkbox-Ddw01d64.js} +1 -1
- package/dist/assets/{MultiSelect-D1XVjXLN.js → MultiSelect-CBtq6WUv.js} +1 -1
- package/dist/assets/{Pagination-DMimIHM4.js → Pagination-BM-86UO5.js} +1 -1
- package/dist/assets/{Progress-CP4jnh2x.js → Progress-Bda-J3ZH.js} +1 -1
- package/dist/assets/{Table-DTU12O53.js → Table-CYqAEQfS.js} +1 -1
- package/dist/assets/{Typography-IL0wuZeq.js → Typography--U0GsZ21.js} +1 -1
- package/dist/assets/{YearPickerInput-CPL_XozD.js → YearPickerInput-CgU-feeq.js} +1 -1
- package/dist/assets/{accordion-DKLV9b0H.js → accordion-B8kebokE.js} +1 -1
- package/dist/assets/{accountant-approvals-CdX2nUgB.js → accountant-approvals-CUluc3sH.js} +1 -1
- package/dist/assets/{accounter-table-CeZ4q0re.js → accounter-table-CM6PQ9Aw.js} +1 -1
- package/dist/assets/{addDays-sGeEkIxC.js → addDays-DGlDD_vj.js} +1 -1
- package/dist/assets/{all-charges-BJvp1ecZ.js → all-charges-DpQS6Xp3.js} +1 -1
- package/dist/assets/{arrow-up-down-DkEXGAin.js → arrow-up-down-C61ge4J5.js} +1 -1
- package/dist/assets/{building-2-BcYhLAVP.js → building-2-3KauBrnS.js} +1 -1
- package/dist/assets/{business-CO7M6XNI.js → business-RCuQN-RO.js} +1 -1
- package/dist/assets/{business-extended-info-MUfOmQ_B.js → business-extended-info-DmQ7B7-Z.js} +1 -1
- package/dist/assets/{business-header-BG2B-PcM.js → business-header-B-uHcc1D.js} +1 -1
- package/dist/assets/{business-transactions-filters-Cijy7ryl.js → business-transactions-filters-D-Y8vZwZ.js} +1 -1
- package/dist/assets/{business-transactions-single-DZqMwNkv.js → business-transactions-single-CEE249QN.js} +1 -1
- package/dist/assets/{business-trip-C7G814AY.js → business-trip-3kCBQ5MD.js} +1 -1
- package/dist/assets/{charge-Bm0hPNT7.js → charge-D19rkm2C.js} +1 -1
- package/dist/assets/{charges-filters-DjnsiGzC.js → charges-filters-BUFmsiTq.js} +1 -1
- package/dist/assets/{charges-ledger-validation-CoHDjCf2.js → charges-ledger-validation-OPtbHzXu.js} +1 -1
- package/dist/assets/{charges-table-C_4dY1Ic.js → charges-table-D_GDHvFS.js} +1 -1
- package/dist/assets/{chart-SbwWAyei.js → chart-iyOBgiH0.js} +1 -1
- package/dist/assets/{data-table-pagination-DtnUvTOC.js → data-table-pagination-CKN0E29f.js} +1 -1
- package/dist/assets/{download-csv-button-D9_6J2pA.js → download-csv-button-DZ5cKqkV.js} +1 -1
- package/dist/assets/{editable-business-trip-xFRu5fSA.js → editable-business-trip-CRiuNdbP.js} +1 -1
- package/dist/assets/{funnel-WdA7f2As.js → funnel-BlaCusqP.js} +1 -1
- package/dist/assets/{index-DPvrbbz9.js → index-B2_EbsaK.js} +191 -191
- package/dist/assets/{index-D3-tv-Kb.js → index-B8pzYiEH.js} +1 -1
- package/dist/assets/{index-9JObwNSb.js → index-BAGVbiiM.js} +1 -1
- package/dist/assets/{index-VzPCd0L-.js → index-BD86tRnn.js} +1 -1
- package/dist/assets/{index-BIdEjDD3.js → index-BGh0NOfw.js} +1 -1
- package/dist/assets/{index-BaEmw40f.js → index-BKiLhEyi.js} +1 -1
- package/dist/assets/{index-Ct0AJEN9.js → index-BNAjS3Tn.js} +1 -1
- package/dist/assets/{index-CwbqTlM4.js → index-BRSlJnxd.js} +1 -1
- package/dist/assets/{index-DjQIiDMo.js → index-BoL57v1D.js} +1 -1
- package/dist/assets/{index-Ey6XKYuP.js → index-C2GP2DWO.js} +1 -1
- package/dist/assets/{index-Vq1FAgYe.js → index-CM60VmgR.js} +1 -1
- package/dist/assets/index-CRLPoT61.js +6 -0
- package/dist/assets/{index-Bx-qi8fd.js → index-CRooGu6R.js} +1 -1
- package/dist/assets/{index--LMZMPY_.js → index-C_OSDuUb.js} +1 -1
- package/dist/assets/{index-Bm3ZL2dx.js → index-Cc7exUI5.js} +1 -1
- package/dist/assets/{index-Bw5hpWBz.js → index-Co66MgF6.js} +1 -1
- package/dist/assets/{index-1loWF1jV.js → index-CyBAoT0l.js} +1 -1
- package/dist/assets/{index-mN2sZqiu.js → index-D5tmtR-a.js} +1 -1
- package/dist/assets/{index-CfsTscFv.js → index-DINxWoMX.js} +1 -1
- package/dist/assets/{index-W6Xv87pg.js → index-DIiuo0-v.js} +1 -1
- package/dist/assets/index-DWXHJxFq.css +1 -0
- package/dist/assets/{index-BOhdfO95.js → index-DtrRL2jA.js} +1 -1
- package/dist/assets/{index-CXH_lcpK.js → index-EaY6ZYvr.js} +1 -1
- package/dist/assets/{index-p1BcqxXQ.js → index-mMqWkzUL.js} +1 -1
- package/dist/assets/{index-CdAUtS2Q.js → index-xLWv_qf6.js} +1 -1
- package/dist/assets/{index-BxnmQCT9.js → index-yOhbO3fy.js} +1 -1
- package/dist/assets/{index.es-C3XngPKv.js → index.es-CaOIcY7v.js} +1 -1
- package/dist/assets/{insert-business-trip-modal-BHY3QQup.js → insert-business-trip-modal-BwOnvw7X.js} +1 -1
- package/dist/assets/issue-document-CzBtBCCO.js +1 -0
- package/dist/assets/{list-plus-ZvPwjqZn.js → list-plus-CGvSlslE.js} +1 -1
- package/dist/assets/{login-page-CsXdm3AZ.js → login-page-BTcklqv4.js} +1 -1
- package/dist/assets/{match-document-modal-Cqimg0VE.js → match-document-modal-DcL0siQq.js} +1 -1
- package/dist/assets/{missing-info-charges-DxLGt6Xs.js → missing-info-charges-DfwRkzNe.js} +1 -1
- package/dist/assets/{modal-Nvfe-DMu.js → modal-B0uNLang.js} +1 -1
- package/dist/assets/{page-layout-SHFb6rY4.js → page-layout-C0GJoVTR.js} +1 -1
- package/dist/assets/{page-not-found-BZ6s-Q5n.js → page-not-found-9UX5vsGE.js} +1 -1
- package/dist/assets/{panel-top-open-C3Q9X7Tg.js → panel-top-open-BFNhAe3f.js} +1 -1
- package/dist/assets/{pencil-CPPx1BhC.js → pencil-9Th5X-OY.js} +1 -1
- package/dist/assets/{report-commentary-row-DpYgprQr.js → report-commentary-row-CNIlhboC.js} +1 -1
- package/dist/assets/{save-D-W46u2J.js → save-qtyyZLc5.js} +1 -1
- package/dist/assets/{similar-transactions-modal-zQY2R-sr.js → similar-transactions-modal-nk8VHEtX.js} +1 -1
- package/dist/assets/{sub-7frHBT3Y.js → sub-fkVv9ghZ.js} +1 -1
- package/dist/assets/subMonths-5wFmciT1.js +1 -0
- package/dist/assets/{summary-DwX_dmjr.js → summary-DuWhfNdL.js} +1 -1
- package/dist/assets/{toggle-expansion-button-Bh24n-cz.js → toggle-expansion-button-41Ejffq3.js} +1 -1
- package/dist/assets/tooltip-lhMCop8U.js +1 -0
- package/dist/assets/{use-url-query-COmN7DHP.js → use-url-query-BPzyQB93.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/providers/index.ts +4 -0
- package/dist/assets/index-BUJm5I0K.css +0 -1
- package/dist/assets/index-DFgRsYAU.js +0 -6
- package/dist/assets/issue-document-BpzcqnRu.js +0 -1
- package/dist/assets/subMonths-CY79vHaS.js +0 -1
- package/dist/assets/tooltip-BaULIFLC.js +0 -1
- package/src/components/ui/pagination.tsx +0 -194
- package/src/providers/index.tsx +0 -56
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as fr,r as w,bA as Q,ei as ur,ab as t,ej as R,by as X,bz as D,bB as n,ek as z,bC as I,el as vr,em as _r,en as br}from"./index-
|
|
1
|
+
import{v as fr,r as w,bA as Q,ei as ur,ab as t,ej as R,by as X,bz as D,bB as n,ek as z,bC as I,el as vr,em as _r,en as br}from"./index-B2_EbsaK.js";/**
|
|
2
2
|
* @license lucide-react v0.548.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{by as Ee,bB as f,bz as _,ab as p,ev as jr,hl as Se,r as E,bA as Lr,ew as Hr,hm as Fr,en as Wr,em as Ar,ei as _e,hn as Kr,ho as Ur,fH as ae,ej as Oe,hp as te,hq as qr,et as Tr,hr as Zr,hs as Gr}from"./index-DPvrbbz9.js";const Ve={xs:f(16),sm:f(22),md:f(26),lg:f(30),xl:f(36)},Jr={xs:f(10),sm:f(12),md:f(14),lg:f(16),xl:f(18)};var Qr=Ee((e,{disabled:r,radius:a,readOnly:n},{size:v,variant:w})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:r?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:w==="filled"?e.white:e.colors.gray[1],color:r?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:_({size:v,sizes:Ve}),paddingLeft:`calc(${_({size:v,sizes:e.spacing})} / 1.5)`,paddingRight:r||n?_({size:v,sizes:e.spacing}):0,fontWeight:500,fontSize:_({size:v,sizes:Jr}),borderRadius:_({size:a,sizes:e.radius}),cursor:r?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${f(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${_({size:v,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}})),Xr=Object.defineProperty,G=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Pe=(e,r,a)=>r in e?Xr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,Yr=(e,r)=>{for(var a in r||(r={}))$e.call(r,a)&&Pe(e,a,r[a]);if(G)for(var a of G(r))Re.call(r,a)&&Pe(e,a,r[a]);return e},ea=(e,r)=>{var a={};for(var n in e)$e.call(e,n)&&r.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&G)for(var n of G(e))r.indexOf(n)<0&&Re.call(e,n)&&(a[n]=e[n]);return a};const ra={xs:16,sm:22,md:24,lg:26,xl:30};function ze(e){var r=e,{label:a,classNames:n,styles:v,className:w,onRemove:N,disabled:I,readOnly:s,size:u,radius:h="sm",variant:O,unstyled:K}=r,Q=ea(r,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:F,cx:M}=Qr({disabled:I,readOnly:s,radius:h},{name:"MultiSelect",classNames:n,styles:v,unstyled:K,size:u,variant:O});return p.createElement("div",Yr({className:M(F.defaultValue,w)},Q),p.createElement("span",{className:F.defaultValueLabel},a),!I&&!s&&p.createElement(jr,{"aria-hidden":!0,onMouseDown:N,size:ra[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:F.defaultValueRemove,tabIndex:-1,unstyled:K}))}ze.displayName="@mantine/core/MultiSelect/DefaultValue";function aa({data:e,searchable:r,limit:a,searchValue:n,filter:v,value:w,disableSelectedItemFiltering:N}){if(!r&&w.length===0)return e;if(!r){const s=[];for(let u=0;u<e.length;u+=1)(N||!w.some(h=>h===e[u].value&&!e[u].disabled))&&s.push(e[u]);return s}const I=[];for(let s=0;s<e.length&&(v(n,!N&&w.some(u=>u===e[s].value&&!e[s].disabled),e[s])&&I.push(e[s]),!(I.length>=a));s+=1);return I}var ta=Object.defineProperty,na=Object.defineProperties,la=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,sa=Object.prototype.propertyIsEnumerable,Ie=(e,r,a)=>r in e?ta(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,ia=(e,r)=>{for(var a in r||(r={}))oa.call(r,a)&&Ie(e,a,r[a]);if(xe)for(var a of xe(r))sa.call(r,a)&&Ie(e,a,r[a]);return e},ca=(e,r)=>na(e,la(r)),ua=Ee((e,{invalid:r},{size:a})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${_({size:a,sizes:Se})} - ${f(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:_({size:a,sizes:Se})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${f(2)}) calc(${e.spacing.xs} / 2)`},searchInput:ca(ia({},e.fn.fontStyles()),{flex:1,minWidth:f(60),backgroundColor:"transparent",border:0,outline:0,fontSize:_({size:a,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:_({size:a,sizes:Ve}),"&::placeholder":{opacity:1,color:r?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}})),da=Object.defineProperty,pa=Object.defineProperties,fa=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ce=(e,r,a)=>r in e?da(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,H=(e,r)=>{for(var a in r||(r={}))Ne.call(r,a)&&Ce(e,a,r[a]);if(J)for(var a of J(r))Me.call(r,a)&&Ce(e,a,r[a]);return e},De=(e,r)=>pa(e,fa(r)),ha=(e,r)=>{var a={};for(var n in e)Ne.call(e,n)&&r.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&J)for(var n of J(e))r.indexOf(n)<0&&Me.call(e,n)&&(a[n]=e[n]);return a};function ga(e,r,a){return r?!1:a.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function ma(e,r){return!!e&&!r.some(a=>a.value.toLowerCase()===e.toLowerCase())}function ke(e,r){if(!Array.isArray(e))return;if(r.length===0)return[];const a=r.map(n=>typeof n=="object"?n.value:n);return e.filter(n=>a.includes(n))}const va={size:"sm",valueComponent:ze,itemComponent:Fr,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:ga,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:ma,switchDirectionOnFlip:!1,zIndex:Hr("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},ba=E.forwardRef((e,r)=>{const a=Lr("MultiSelect",va,e),{className:n,style:v,required:w,label:N,description:I,size:s,error:u,classNames:h,styles:O,wrapperProps:K,value:Q,defaultValue:F,data:M,onChange:Be,valueComponent:je,itemComponent:Le,id:He,transitionProps:Fe,maxDropdownHeight:We,shadow:wa,nothingFound:ne,onFocus:le,onBlur:oe,searchable:y,placeholder:Ae,filter:Ke,limit:Ue,clearSearchOnChange:qe,clearable:se,clearSearchOnBlur:Te,variant:B,onSearchChange:Ze,searchValue:Ge,disabled:P,initiallyOpened:Je,radius:ie,icon:Qe,rightSection:Xe,rightSectionWidth:Ye,creatable:ce,getCreateLabel:ue,shouldCreate:er,onCreate:de,sx:rr,dropdownComponent:ar,onDropdownClose:tr,onDropdownOpen:nr,maxSelectedValues:g,withinPortal:lr,portalProps:or,switchDirectionOnFlip:sr,zIndex:ir,selectOnBlur:cr,name:ur,dropdownPosition:dr,errorProps:pr,labelProps:fr,descriptionProps:hr,form:gr,positionDependencies:mr,onKeyDown:pe,unstyled:W,inputContainer:vr,inputWrapperOrder:br,readOnly:V,withAsterisk:wr,clearButtonProps:yr,hoverOnSearchChange:fe,disableSelectedItemFiltering:Sr}=a,_r=ha(a,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:C,cx:he,theme:Or}=ua({invalid:!!u},{name:"MultiSelect",classNames:h,styles:O,unstyled:W,size:s,variant:B}),{systemStyles:Pr,rest:xr}=Wr(_r),X=E.useRef(),Y=E.useRef({}),j=Ar(He),[d,c]=E.useState(Je),[Ir,D]=E.useState(-1),[ge,Cr]=E.useState("column"),[S,U]=_e({value:Ge,defaultValue:"",finalValue:void 0,onChange:Ze}),[Dr,me]=E.useState(!1),{scrollIntoView:q,targetRef:ve,scrollableRef:kr}=Kr({duration:0,offset:5,cancelable:!1,isList:!0}),be=ce&&typeof ue=="function";let ee=null;const Er=M.map(t=>typeof t=="string"?{label:t,value:t}:t),re=Ur({data:Er}),[o,L]=_e({value:ke(Q,M),defaultValue:ke(F,M),finalValue:[],onChange:Be}),b=E.useRef(!!g&&g<o.length),we=t=>{if(!V){const l=o.filter(m=>m!==t);L(l),g&&l.length<g&&(b.current=!1)}},Vr=t=>{U(t.currentTarget.value),!P&&!b.current&&y&&c(!0)},$r=t=>{typeof le=="function"&&le(t),!P&&!b.current&&y&&c(!0)},i=aa({data:re,searchable:y,searchValue:S,limit:Ue,filter:Ke,value:o,disableSelectedItemFiltering:Sr});be&&er(S,re)&&(ee=ue(S),i.push({label:S,value:S,creatable:!0}));const $=Math.min(Ir,i.length-1),ye=(t,l,m)=>{let k=t;for(;m(k);)if(k=l(k),!i[k].disabled)return k;return t};ae(()=>{D(fe&&S?0:-1)},[S,fe]),ae(()=>{!P&&o.length>M.length&&c(!1),g&&o.length<g&&(b.current=!1),g&&o.length>=g&&(b.current=!0,c(!1))},[o]);const T=t=>{if(!V)if(qe&&U(""),o.includes(t.value))we(t.value);else{if(t.creatable&&typeof de=="function"){const l=de(t.value);typeof l<"u"&&l!==null&&L(typeof l=="string"?[...o,l]:[...o,l.value])}else L([...o,t.value]);o.length===g-1&&(b.current=!0,c(!1)),i.length===1&&c(!1)}},Rr=t=>{typeof oe=="function"&&oe(t),cr&&i[$]&&d&&T(i[$]),Te&&U(""),c(!1)},zr=t=>{if(Dr||(pe?.(t),V)||t.key!=="Backspace"&&g&&b.current)return;const l=ge==="column",m=()=>{D(R=>{var x;const A=ye(R,z=>z+1,z=>z<i.length-1);return d&&(ve.current=Y.current[(x=i[A])==null?void 0:x.value],q({alignment:l?"end":"start"})),A})},k=()=>{D(R=>{var x;const A=ye(R,z=>z-1,z=>z>0);return d&&(ve.current=Y.current[(x=i[A])==null?void 0:x.value],q({alignment:l?"start":"end"})),A})};switch(t.key){case"ArrowUp":{t.preventDefault(),c(!0),l?k():m();break}case"ArrowDown":{t.preventDefault(),c(!0),l?m():k();break}case"Enter":{t.preventDefault(),i[$]&&d?T(i[$]):c(!0);break}case" ":{y||(t.preventDefault(),i[$]&&d?T(i[$]):c(!0));break}case"Backspace":{o.length>0&&S.length===0&&(L(o.slice(0,-1)),c(!0),g&&(b.current=!1));break}case"Home":{if(!y){t.preventDefault(),d||c(!0);const R=i.findIndex(x=>!x.disabled);D(R),q({alignment:l?"end":"start"})}break}case"End":{if(!y){t.preventDefault(),d||c(!0);const R=i.map(x=>!!x.disabled).lastIndexOf(!1);D(R),q({alignment:l?"end":"start"})}break}case"Escape":c(!1)}},Nr=o.map(t=>{let l=re.find(m=>m.value===t&&!m.disabled);return!l&&be&&(l={value:t,label:t}),l}).filter(t=>!!t).map((t,l)=>p.createElement(je,De(H({},t),{variant:B,disabled:P,className:C.value,readOnly:V,onRemove:m=>{m.preventDefault(),m.stopPropagation(),we(t.value)},key:t.value,size:s,styles:O,classNames:h,radius:ie,index:l}))),Mr=t=>o.includes(t),Br=()=>{var t;U(""),L([]),(t=X.current)==null||t.focus(),g&&(b.current=!1)},Z=!V&&(i.length>0?d:d&&!!ne);return ae(()=>{const t=Z?nr:tr;typeof t=="function"&&t()},[Z]),p.createElement(Oe.Wrapper,H(H({required:w,id:j,label:N,error:u,description:I,size:s,className:n,style:v,classNames:h,styles:O,__staticSelector:"MultiSelect",sx:rr,errorProps:pr,descriptionProps:hr,labelProps:fr,inputContainer:vr,inputWrapperOrder:br,unstyled:W,withAsterisk:wr,variant:B},Pr),K),p.createElement(te,{opened:Z,transitionProps:Fe,shadow:"sm",withinPortal:lr,portalProps:or,__staticSelector:"MultiSelect",onDirectionChange:Cr,switchDirectionOnFlip:sr,zIndex:ir,dropdownPosition:dr,positionDependencies:[...mr,S],classNames:h,styles:O,unstyled:W,variant:B},p.createElement(te.Target,null,p.createElement("div",{className:C.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":d&&Z?`${j}-items`:null,"aria-controls":j,"aria-expanded":d,onMouseLeave:()=>D(-1),tabIndex:-1},p.createElement("input",{type:"hidden",name:ur,value:o.join(","),form:gr,disabled:P}),p.createElement(Oe,H({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:s,variant:B,disabled:P,error:u,required:w,radius:ie,icon:Qe,unstyled:W,onMouseDown:t=>{var l;t.preventDefault(),!P&&!b.current&&c(!d),(l=X.current)==null||l.focus()},classNames:De(H({},h),{input:he({[C.input]:!y},h?.input)})},qr({theme:Or,rightSection:Xe,rightSectionWidth:Ye,styles:O,size:s,shouldClear:se&&o.length>0,onClear:Br,error:u,disabled:P,clearButtonProps:yr,readOnly:V})),p.createElement("div",{className:C.values,"data-clearable":se||void 0},Nr,p.createElement("input",H({ref:Tr(r,X),type:"search",id:j,className:he(C.searchInput,{[C.searchInputPointer]:!y,[C.searchInputInputHidden]:!d&&o.length>0||!y&&o.length>0,[C.searchInputEmpty]:o.length===0}),onKeyDown:zr,value:S,onChange:Vr,onFocus:$r,onBlur:Rr,readOnly:!y||b.current||V,placeholder:o.length===0?Ae:void 0,disabled:P,"data-mantine-stop-propagation":d,autoComplete:"off",onCompositionStart:()=>me(!0),onCompositionEnd:()=>me(!1)},xr)))))),p.createElement(te.Dropdown,{component:ar||Zr,maxHeight:We,direction:ge,id:j,innerRef:kr,__staticSelector:"MultiSelect",classNames:h,styles:O},p.createElement(Gr,{data:i,hovered:$,classNames:h,styles:O,uuid:j,__staticSelector:"MultiSelect",onItemHover:D,onItemSelect:T,itemsRefs:Y,itemComponent:Le,size:s,nothingFound:ne,isItemSelected:Mr,creatable:ce&&!!ee,createLabel:ee,unstyled:W,variant:B}))))});ba.displayName="@mantine/core/MultiSelect";export{ba as M};
|
|
1
|
+
import{by as Ee,bB as f,bz as _,ab as p,ev as jr,hl as Se,r as E,bA as Lr,ew as Hr,hm as Fr,en as Wr,em as Ar,ei as _e,hn as Kr,ho as Ur,fH as ae,ej as Oe,hp as te,hq as qr,et as Tr,hr as Zr,hs as Gr}from"./index-B2_EbsaK.js";const Ve={xs:f(16),sm:f(22),md:f(26),lg:f(30),xl:f(36)},Jr={xs:f(10),sm:f(12),md:f(14),lg:f(16),xl:f(18)};var Qr=Ee((e,{disabled:r,radius:a,readOnly:n},{size:v,variant:w})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:r?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:w==="filled"?e.white:e.colors.gray[1],color:r?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:_({size:v,sizes:Ve}),paddingLeft:`calc(${_({size:v,sizes:e.spacing})} / 1.5)`,paddingRight:r||n?_({size:v,sizes:e.spacing}):0,fontWeight:500,fontSize:_({size:v,sizes:Jr}),borderRadius:_({size:a,sizes:e.radius}),cursor:r?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${f(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${_({size:v,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}})),Xr=Object.defineProperty,G=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Pe=(e,r,a)=>r in e?Xr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,Yr=(e,r)=>{for(var a in r||(r={}))$e.call(r,a)&&Pe(e,a,r[a]);if(G)for(var a of G(r))Re.call(r,a)&&Pe(e,a,r[a]);return e},ea=(e,r)=>{var a={};for(var n in e)$e.call(e,n)&&r.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&G)for(var n of G(e))r.indexOf(n)<0&&Re.call(e,n)&&(a[n]=e[n]);return a};const ra={xs:16,sm:22,md:24,lg:26,xl:30};function ze(e){var r=e,{label:a,classNames:n,styles:v,className:w,onRemove:N,disabled:I,readOnly:s,size:u,radius:h="sm",variant:O,unstyled:K}=r,Q=ea(r,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:F,cx:M}=Qr({disabled:I,readOnly:s,radius:h},{name:"MultiSelect",classNames:n,styles:v,unstyled:K,size:u,variant:O});return p.createElement("div",Yr({className:M(F.defaultValue,w)},Q),p.createElement("span",{className:F.defaultValueLabel},a),!I&&!s&&p.createElement(jr,{"aria-hidden":!0,onMouseDown:N,size:ra[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:F.defaultValueRemove,tabIndex:-1,unstyled:K}))}ze.displayName="@mantine/core/MultiSelect/DefaultValue";function aa({data:e,searchable:r,limit:a,searchValue:n,filter:v,value:w,disableSelectedItemFiltering:N}){if(!r&&w.length===0)return e;if(!r){const s=[];for(let u=0;u<e.length;u+=1)(N||!w.some(h=>h===e[u].value&&!e[u].disabled))&&s.push(e[u]);return s}const I=[];for(let s=0;s<e.length&&(v(n,!N&&w.some(u=>u===e[s].value&&!e[s].disabled),e[s])&&I.push(e[s]),!(I.length>=a));s+=1);return I}var ta=Object.defineProperty,na=Object.defineProperties,la=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,sa=Object.prototype.propertyIsEnumerable,Ie=(e,r,a)=>r in e?ta(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,ia=(e,r)=>{for(var a in r||(r={}))oa.call(r,a)&&Ie(e,a,r[a]);if(xe)for(var a of xe(r))sa.call(r,a)&&Ie(e,a,r[a]);return e},ca=(e,r)=>na(e,la(r)),ua=Ee((e,{invalid:r},{size:a})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${_({size:a,sizes:Se})} - ${f(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:_({size:a,sizes:Se})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${f(2)}) calc(${e.spacing.xs} / 2)`},searchInput:ca(ia({},e.fn.fontStyles()),{flex:1,minWidth:f(60),backgroundColor:"transparent",border:0,outline:0,fontSize:_({size:a,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:_({size:a,sizes:Ve}),"&::placeholder":{opacity:1,color:r?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}})),da=Object.defineProperty,pa=Object.defineProperties,fa=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ce=(e,r,a)=>r in e?da(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,H=(e,r)=>{for(var a in r||(r={}))Ne.call(r,a)&&Ce(e,a,r[a]);if(J)for(var a of J(r))Me.call(r,a)&&Ce(e,a,r[a]);return e},De=(e,r)=>pa(e,fa(r)),ha=(e,r)=>{var a={};for(var n in e)Ne.call(e,n)&&r.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&J)for(var n of J(e))r.indexOf(n)<0&&Me.call(e,n)&&(a[n]=e[n]);return a};function ga(e,r,a){return r?!1:a.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function ma(e,r){return!!e&&!r.some(a=>a.value.toLowerCase()===e.toLowerCase())}function ke(e,r){if(!Array.isArray(e))return;if(r.length===0)return[];const a=r.map(n=>typeof n=="object"?n.value:n);return e.filter(n=>a.includes(n))}const va={size:"sm",valueComponent:ze,itemComponent:Fr,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:ga,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:ma,switchDirectionOnFlip:!1,zIndex:Hr("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},ba=E.forwardRef((e,r)=>{const a=Lr("MultiSelect",va,e),{className:n,style:v,required:w,label:N,description:I,size:s,error:u,classNames:h,styles:O,wrapperProps:K,value:Q,defaultValue:F,data:M,onChange:Be,valueComponent:je,itemComponent:Le,id:He,transitionProps:Fe,maxDropdownHeight:We,shadow:wa,nothingFound:ne,onFocus:le,onBlur:oe,searchable:y,placeholder:Ae,filter:Ke,limit:Ue,clearSearchOnChange:qe,clearable:se,clearSearchOnBlur:Te,variant:B,onSearchChange:Ze,searchValue:Ge,disabled:P,initiallyOpened:Je,radius:ie,icon:Qe,rightSection:Xe,rightSectionWidth:Ye,creatable:ce,getCreateLabel:ue,shouldCreate:er,onCreate:de,sx:rr,dropdownComponent:ar,onDropdownClose:tr,onDropdownOpen:nr,maxSelectedValues:g,withinPortal:lr,portalProps:or,switchDirectionOnFlip:sr,zIndex:ir,selectOnBlur:cr,name:ur,dropdownPosition:dr,errorProps:pr,labelProps:fr,descriptionProps:hr,form:gr,positionDependencies:mr,onKeyDown:pe,unstyled:W,inputContainer:vr,inputWrapperOrder:br,readOnly:V,withAsterisk:wr,clearButtonProps:yr,hoverOnSearchChange:fe,disableSelectedItemFiltering:Sr}=a,_r=ha(a,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:C,cx:he,theme:Or}=ua({invalid:!!u},{name:"MultiSelect",classNames:h,styles:O,unstyled:W,size:s,variant:B}),{systemStyles:Pr,rest:xr}=Wr(_r),X=E.useRef(),Y=E.useRef({}),j=Ar(He),[d,c]=E.useState(Je),[Ir,D]=E.useState(-1),[ge,Cr]=E.useState("column"),[S,U]=_e({value:Ge,defaultValue:"",finalValue:void 0,onChange:Ze}),[Dr,me]=E.useState(!1),{scrollIntoView:q,targetRef:ve,scrollableRef:kr}=Kr({duration:0,offset:5,cancelable:!1,isList:!0}),be=ce&&typeof ue=="function";let ee=null;const Er=M.map(t=>typeof t=="string"?{label:t,value:t}:t),re=Ur({data:Er}),[o,L]=_e({value:ke(Q,M),defaultValue:ke(F,M),finalValue:[],onChange:Be}),b=E.useRef(!!g&&g<o.length),we=t=>{if(!V){const l=o.filter(m=>m!==t);L(l),g&&l.length<g&&(b.current=!1)}},Vr=t=>{U(t.currentTarget.value),!P&&!b.current&&y&&c(!0)},$r=t=>{typeof le=="function"&&le(t),!P&&!b.current&&y&&c(!0)},i=aa({data:re,searchable:y,searchValue:S,limit:Ue,filter:Ke,value:o,disableSelectedItemFiltering:Sr});be&&er(S,re)&&(ee=ue(S),i.push({label:S,value:S,creatable:!0}));const $=Math.min(Ir,i.length-1),ye=(t,l,m)=>{let k=t;for(;m(k);)if(k=l(k),!i[k].disabled)return k;return t};ae(()=>{D(fe&&S?0:-1)},[S,fe]),ae(()=>{!P&&o.length>M.length&&c(!1),g&&o.length<g&&(b.current=!1),g&&o.length>=g&&(b.current=!0,c(!1))},[o]);const T=t=>{if(!V)if(qe&&U(""),o.includes(t.value))we(t.value);else{if(t.creatable&&typeof de=="function"){const l=de(t.value);typeof l<"u"&&l!==null&&L(typeof l=="string"?[...o,l]:[...o,l.value])}else L([...o,t.value]);o.length===g-1&&(b.current=!0,c(!1)),i.length===1&&c(!1)}},Rr=t=>{typeof oe=="function"&&oe(t),cr&&i[$]&&d&&T(i[$]),Te&&U(""),c(!1)},zr=t=>{if(Dr||(pe?.(t),V)||t.key!=="Backspace"&&g&&b.current)return;const l=ge==="column",m=()=>{D(R=>{var x;const A=ye(R,z=>z+1,z=>z<i.length-1);return d&&(ve.current=Y.current[(x=i[A])==null?void 0:x.value],q({alignment:l?"end":"start"})),A})},k=()=>{D(R=>{var x;const A=ye(R,z=>z-1,z=>z>0);return d&&(ve.current=Y.current[(x=i[A])==null?void 0:x.value],q({alignment:l?"start":"end"})),A})};switch(t.key){case"ArrowUp":{t.preventDefault(),c(!0),l?k():m();break}case"ArrowDown":{t.preventDefault(),c(!0),l?m():k();break}case"Enter":{t.preventDefault(),i[$]&&d?T(i[$]):c(!0);break}case" ":{y||(t.preventDefault(),i[$]&&d?T(i[$]):c(!0));break}case"Backspace":{o.length>0&&S.length===0&&(L(o.slice(0,-1)),c(!0),g&&(b.current=!1));break}case"Home":{if(!y){t.preventDefault(),d||c(!0);const R=i.findIndex(x=>!x.disabled);D(R),q({alignment:l?"end":"start"})}break}case"End":{if(!y){t.preventDefault(),d||c(!0);const R=i.map(x=>!!x.disabled).lastIndexOf(!1);D(R),q({alignment:l?"end":"start"})}break}case"Escape":c(!1)}},Nr=o.map(t=>{let l=re.find(m=>m.value===t&&!m.disabled);return!l&&be&&(l={value:t,label:t}),l}).filter(t=>!!t).map((t,l)=>p.createElement(je,De(H({},t),{variant:B,disabled:P,className:C.value,readOnly:V,onRemove:m=>{m.preventDefault(),m.stopPropagation(),we(t.value)},key:t.value,size:s,styles:O,classNames:h,radius:ie,index:l}))),Mr=t=>o.includes(t),Br=()=>{var t;U(""),L([]),(t=X.current)==null||t.focus(),g&&(b.current=!1)},Z=!V&&(i.length>0?d:d&&!!ne);return ae(()=>{const t=Z?nr:tr;typeof t=="function"&&t()},[Z]),p.createElement(Oe.Wrapper,H(H({required:w,id:j,label:N,error:u,description:I,size:s,className:n,style:v,classNames:h,styles:O,__staticSelector:"MultiSelect",sx:rr,errorProps:pr,descriptionProps:hr,labelProps:fr,inputContainer:vr,inputWrapperOrder:br,unstyled:W,withAsterisk:wr,variant:B},Pr),K),p.createElement(te,{opened:Z,transitionProps:Fe,shadow:"sm",withinPortal:lr,portalProps:or,__staticSelector:"MultiSelect",onDirectionChange:Cr,switchDirectionOnFlip:sr,zIndex:ir,dropdownPosition:dr,positionDependencies:[...mr,S],classNames:h,styles:O,unstyled:W,variant:B},p.createElement(te.Target,null,p.createElement("div",{className:C.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":d&&Z?`${j}-items`:null,"aria-controls":j,"aria-expanded":d,onMouseLeave:()=>D(-1),tabIndex:-1},p.createElement("input",{type:"hidden",name:ur,value:o.join(","),form:gr,disabled:P}),p.createElement(Oe,H({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:s,variant:B,disabled:P,error:u,required:w,radius:ie,icon:Qe,unstyled:W,onMouseDown:t=>{var l;t.preventDefault(),!P&&!b.current&&c(!d),(l=X.current)==null||l.focus()},classNames:De(H({},h),{input:he({[C.input]:!y},h?.input)})},qr({theme:Or,rightSection:Xe,rightSectionWidth:Ye,styles:O,size:s,shouldClear:se&&o.length>0,onClear:Br,error:u,disabled:P,clearButtonProps:yr,readOnly:V})),p.createElement("div",{className:C.values,"data-clearable":se||void 0},Nr,p.createElement("input",H({ref:Tr(r,X),type:"search",id:j,className:he(C.searchInput,{[C.searchInputPointer]:!y,[C.searchInputInputHidden]:!d&&o.length>0||!y&&o.length>0,[C.searchInputEmpty]:o.length===0}),onKeyDown:zr,value:S,onChange:Vr,onFocus:$r,onBlur:Rr,readOnly:!y||b.current||V,placeholder:o.length===0?Ae:void 0,disabled:P,"data-mantine-stop-propagation":d,autoComplete:"off",onCompositionStart:()=>me(!0),onCompositionEnd:()=>me(!1)},xr)))))),p.createElement(te.Dropdown,{component:ar||Zr,maxHeight:We,direction:ge,id:j,innerRef:kr,__staticSelector:"MultiSelect",classNames:h,styles:O},p.createElement(Gr,{data:i,hovered:$,classNames:h,styles:O,uuid:j,__staticSelector:"MultiSelect",onItemHover:D,onItemSelect:T,itemsRefs:Y,itemComponent:Le,size:s,nothingFound:ne,isItemSelected:Mr,creatable:ce&&!!ee,createLabel:ee,unstyled:W,variant:B}))))});ba.displayName="@mantine/core/MultiSelect";export{ba as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ei as It,r as B,eJ as xt,bA as S,ab as o,by as tt,bB as I,bz as m,ff as Et,bC as St,er as Nt,fJ as Lt,e$ as jt}from"./index-DPvrbbz9.js";import{c as R}from"./create-event-handler-BiA-1lGu.js";function u(t,e){const a=e-t+1;return Array.from({length:a},(n,i)=>i+t)}const M="dots";function zt({total:t,siblings:e=1,boundaries:a=1,page:n,initialPage:i=1,onChange:s}){const r=Math.max(Math.trunc(t),0),[c,l]=It({value:n,onChange:s,defaultValue:i,finalValue:i}),f=v=>{v<=0?l(1):v>r?l(r):l(v)},g=()=>f(c+1),_=()=>f(c-1),d=()=>f(1),y=()=>f(r);return{range:B.useMemo(()=>{if(e*2+3+a*2>=r)return u(1,r);const w=Math.max(c-e,a),C=Math.min(c+e,r-a),b=w>a+2,$=C<r-(a+1);if(!b&&$){const O=e*2+a+2;return[...u(1,O),M,...u(r-(a-1),r)]}if(b&&!$){const O=a+1+2*e;return[...u(1,a),M,...u(r-O,r)]}return[...u(1,a),M,...u(w,C),M,...u(r-a+1,r)]},[r,e,c]),active:c,setPage:f,next:g,previous:_,first:d,last:y}}const[Rt,Z]=xt("Pagination.Root component was not found in tree"),Mt={siblings:1,boundaries:1};function ft(t){const{total:e,value:a,defaultValue:n,onChange:i,disabled:s,children:r,siblings:c,boundaries:l,color:f,radius:g,onNextPage:_,onPreviousPage:d,onFirstPage:y,onLastPage:j,getItemProps:v,classNames:w,styles:C,unstyled:b,variant:$,size:O}=S("PaginationRoot",Mt,t),{range:T,setPage:U,next:p,previous:z,active:W,first:G,last:q}=zt({page:a,initialPage:n,onChange:i,total:e,siblings:c,boundaries:l}),K=R(_,p),Q=R(d,z),X=R(y,G),Y=R(j,q);return o.createElement(Rt,{value:{total:e,range:T,active:W,disabled:s,color:f,radius:g,getItemProps:v,onChange:U,onNext:K,onPrevious:Q,onFirst:X,onLast:Y,stylesApi:{name:"Pagination",classNames:w,styles:C,unstyled:b,variant:$,size:O}}},r)}const E={xs:I(22),sm:I(26),md:I(32),lg:I(38),xl:I(44)};var Dt=tt((t,{color:e,radius:a,withPadding:n},{size:i})=>{const s=t.fn.variant({color:e,variant:"filled"});return{control:{cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",border:`${I(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,height:m({size:i,sizes:E}),minWidth:m({size:i,sizes:E}),padding:n?`0 calc(${m({size:i,sizes:t.spacing})} / 2)`:void 0,fontSize:m({size:i,sizes:t.fontSizes}),borderRadius:t.fn.radius(a),lineHeight:1,backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,"&:not([data-disabled])":t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]}),"&:active:not([data-disabled])":t.activeStyles,"&[data-disabled]":{opacity:.4,cursor:"not-allowed",pointerEvents:"none"},"&[data-active]":{borderColor:"transparent",color:s.color,backgroundColor:s.background,"&:not([data-disabled])":t.fn.hover({backgroundColor:s.hover})}}}}),Ft=Object.defineProperty,Vt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,nt=(t,e,a)=>e in t?Ft(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,kt=(t,e)=>{for(var a in e||(e={}))dt.call(e,a)&&nt(t,a,e[a]);if(D)for(var a of D(e))pt.call(e,a)&&nt(t,a,e[a]);return t},Bt=(t,e)=>Vt(t,At(e)),Zt=(t,e)=>{var a={};for(var n in t)dt.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&D)for(var n of D(t))e.indexOf(n)<0&&pt.call(t,n)&&(a[n]=t[n]);return a};const Ht={withPadding:!0},H=B.forwardRef((t,e)=>{const a=S("PaginationControl",Ht,t),{active:n,className:i,disabled:s,withPadding:r}=a,c=Zt(a,["active","className","disabled","withPadding"]),l=Z(),{classes:f,cx:g}=Dt({color:l.color,radius:l.radius,withPadding:r},l.stylesApi);return o.createElement(Et,Bt(kt({},c),{disabled:s,"data-active":n||void 0,"data-disabled":s||void 0,ref:e,className:g(f.control,i)}))});H.displayName="@mantine/core/PaginationControl";var Jt=Object.defineProperty,Tt=Object.defineProperties,Ut=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,rt=(t,e,a)=>e in t?Jt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,h=(t,e)=>{for(var a in e||(e={}))gt.call(e,a)&&rt(t,a,e[a]);if(F)for(var a of F(e))Pt.call(e,a)&&rt(t,a,e[a]);return t},N=(t,e)=>Tt(t,Ut(e)),Wt=(t,e)=>{var a={};for(var n in t)gt.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&F)for(var n of F(t))e.indexOf(n)<0&&Pt.call(t,n)&&(a[n]=t[n]);return a};function vt(t){return`calc(${m({size:t,sizes:E})} / 2)`}function L(t){var e=t,{size:a,style:n,children:i,path:s}=e,r=Wt(e,["size","style","children","path"]);return o.createElement("svg",h({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:h({width:a,height:a},n)},r),o.createElement("path",{d:s,fill:"currentColor"}))}const Gt=t=>o.createElement(L,N(h({},t),{path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"})),qt=t=>o.createElement(L,N(h({},t),{path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"})),Kt=t=>o.createElement(L,N(h({},t),{path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"})),Qt=t=>o.createElement(L,N(h({},t),{path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"})),Xt=t=>o.createElement(L,N(h({},t),{path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}));var Yt=tt((t,e,{size:a})=>({dots:{height:m({size:a,sizes:E}),minWidth:m({size:a,sizes:E}),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}})),te=Object.defineProperty,V=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,ot=(t,e,a)=>e in t?te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,ee=(t,e)=>{for(var a in e||(e={}))ut.call(e,a)&&ot(t,a,e[a]);if(V)for(var a of V(e))mt.call(e,a)&&ot(t,a,e[a]);return t},ae=(t,e)=>{var a={};for(var n in t)ut.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&V)for(var n of V(t))e.indexOf(n)<0&&mt.call(t,n)&&(a[n]=t[n]);return a};const ne={icon:Xt},et=B.forwardRef((t,e)=>{const a=S("PaginationDots",ne,t),{className:n,icon:i}=a,s=ae(a,["className","icon"]),r=Z(),{classes:c,cx:l}=Yt(null,r.stylesApi);return o.createElement(St,ee({ref:e,className:l(c.dots,n)},s),o.createElement(i,{size:vt(r.stylesApi.size)}))});et.displayName="@mantine/core/PaginationDots";var re=Object.defineProperty,it=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,st=(t,e,a)=>e in t?re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,se=(t,e)=>{for(var a in e||(e={}))oe.call(e,a)&&st(t,a,e[a]);if(it)for(var a of it(e))ie.call(e,a)&&st(t,a,e[a]);return t};function at({dotsIcon:t}){const e=Z(),a=e.range.map((n,i)=>{var s;return n==="dots"?o.createElement(et,{icon:t,key:i}):o.createElement(H,se({key:i,active:n===e.active,"aria-current":n===e.active?"page":void 0,onClick:()=>e.onChange(n),disabled:e.disabled},(s=e.getItemProps)==null?void 0:s.call(e,n)),n)});return o.createElement(o.Fragment,null,a)}at.displayName="@mantine/core/PaginationItems";var le=tt(t=>({icon:{transform:t.dir==="rtl"?"rotate(180deg)":"unset"}})),ce=Object.defineProperty,A=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,lt=(t,e,a)=>e in t?ce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,fe=(t,e)=>{for(var a in e||(e={}))_t.call(e,a)&<(t,a,e[a]);if(A)for(var a of A(e))yt.call(e,a)&<(t,a,e[a]);return t},de=(t,e)=>{var a={};for(var n in t)_t.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&A)for(var n of A(t))e.indexOf(n)<0&&yt.call(t,n)&&(a[n]=t[n]);return a};function J({icon:t,name:e,action:a,type:n}){const i={icon:t},s=B.forwardRef((r,c)=>{const l=S(e,i,r),{icon:f}=l,g=de(l,["icon"]),{classes:_}=le(),d=Z(),y=n==="next"?d.active===d.total:d.active===1;return o.createElement(H,fe({disabled:d.disabled||y,ref:c,onClick:d[a],withPadding:!1},g),o.createElement(f,{className:_.icon,size:vt(d.stylesApi.size)}))});return s.displayName=`@mantine/core/${e}`,Nt(s)}const Ot=J({icon:Gt,name:"PaginationNext",action:"onNext",type:"next"}),ht=J({icon:qt,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),wt=J({icon:Kt,name:"PaginationFirst",action:"onFirst",type:"previous"}),Ct=J({icon:Qt,name:"PaginationLast",action:"onLast",type:"next"});var pe=Object.defineProperty,k=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,ct=(t,e,a)=>e in t?pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,x=(t,e)=>{for(var a in e||(e={}))bt.call(e,a)&&ct(t,a,e[a]);if(k)for(var a of k(e))$t.call(e,a)&&ct(t,a,e[a]);return t},ge=(t,e)=>{var a={};for(var n in t)bt.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&k)for(var n of k(t))e.indexOf(n)<0&&$t.call(t,n)&&(a[n]=t[n]);return a};const Pe={withControls:!0,siblings:1,boundaries:1};function P(t){const e=S("Pagination",Pe,t),{withEdges:a,withControls:n,classNames:i,styles:s,unstyled:r,variant:c,size:l,total:f,value:g,defaultValue:_,onChange:d,disabled:y,siblings:j,boundaries:v,color:w,radius:C,onNextPage:b,onPreviousPage:$,onFirstPage:O,onLastPage:T,getItemProps:U,getControlProps:p,spacing:z,nextIcon:W,previousIcon:G,lastIcon:q,firstIcon:K,dotsIcon:Q}=e,X=ge(e,["withEdges","withControls","classNames","styles","unstyled","variant","size","total","value","defaultValue","onChange","disabled","siblings","boundaries","color","radius","onNextPage","onPreviousPage","onFirstPage","onLastPage","getItemProps","getControlProps","spacing","nextIcon","previousIcon","lastIcon","firstIcon","dotsIcon"]),Y=Lt();return f<=0?null:o.createElement(ft,{classNames:i,styles:s,unstyled:r,variant:c,size:l,total:f,value:g,defaultValue:_,onChange:d,disabled:y,siblings:j,boundaries:v,color:w,radius:C,onNextPage:b,onPreviousPage:$,onFirstPage:O,onLastPage:T,getItemProps:U},o.createElement(jt,x({spacing:z??`calc(${m({size:l,sizes:Y.spacing})} / 2)`},X),a&&o.createElement(wt,x({icon:K},p?.("first"))),n&&o.createElement(ht,x({icon:G},p?.("previous"))),o.createElement(at,{dotsIcon:Q}),n&&o.createElement(Ot,x({icon:W},p?.("next"))),a&&o.createElement(Ct,x({icon:q},p?.("last")))))}P.displayName="@mantine/core/Pagination";P.Root=ft;P.Items=at;P.Control=H;P.Dots=et;P.Next=Ot;P.Previous=ht;P.Last=Ct;P.First=wt;export{P};
|
|
1
|
+
import{ei as It,r as B,eJ as xt,bA as S,ab as o,by as tt,bB as I,bz as m,ff as Et,bC as St,er as Nt,fJ as Lt,e$ as jt}from"./index-B2_EbsaK.js";import{c as R}from"./create-event-handler-BiA-1lGu.js";function u(t,e){const a=e-t+1;return Array.from({length:a},(n,i)=>i+t)}const M="dots";function zt({total:t,siblings:e=1,boundaries:a=1,page:n,initialPage:i=1,onChange:s}){const r=Math.max(Math.trunc(t),0),[c,l]=It({value:n,onChange:s,defaultValue:i,finalValue:i}),f=v=>{v<=0?l(1):v>r?l(r):l(v)},g=()=>f(c+1),_=()=>f(c-1),d=()=>f(1),y=()=>f(r);return{range:B.useMemo(()=>{if(e*2+3+a*2>=r)return u(1,r);const w=Math.max(c-e,a),C=Math.min(c+e,r-a),b=w>a+2,$=C<r-(a+1);if(!b&&$){const O=e*2+a+2;return[...u(1,O),M,...u(r-(a-1),r)]}if(b&&!$){const O=a+1+2*e;return[...u(1,a),M,...u(r-O,r)]}return[...u(1,a),M,...u(w,C),M,...u(r-a+1,r)]},[r,e,c]),active:c,setPage:f,next:g,previous:_,first:d,last:y}}const[Rt,Z]=xt("Pagination.Root component was not found in tree"),Mt={siblings:1,boundaries:1};function ft(t){const{total:e,value:a,defaultValue:n,onChange:i,disabled:s,children:r,siblings:c,boundaries:l,color:f,radius:g,onNextPage:_,onPreviousPage:d,onFirstPage:y,onLastPage:j,getItemProps:v,classNames:w,styles:C,unstyled:b,variant:$,size:O}=S("PaginationRoot",Mt,t),{range:T,setPage:U,next:p,previous:z,active:W,first:G,last:q}=zt({page:a,initialPage:n,onChange:i,total:e,siblings:c,boundaries:l}),K=R(_,p),Q=R(d,z),X=R(y,G),Y=R(j,q);return o.createElement(Rt,{value:{total:e,range:T,active:W,disabled:s,color:f,radius:g,getItemProps:v,onChange:U,onNext:K,onPrevious:Q,onFirst:X,onLast:Y,stylesApi:{name:"Pagination",classNames:w,styles:C,unstyled:b,variant:$,size:O}}},r)}const E={xs:I(22),sm:I(26),md:I(32),lg:I(38),xl:I(44)};var Dt=tt((t,{color:e,radius:a,withPadding:n},{size:i})=>{const s=t.fn.variant({color:e,variant:"filled"});return{control:{cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",border:`${I(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,height:m({size:i,sizes:E}),minWidth:m({size:i,sizes:E}),padding:n?`0 calc(${m({size:i,sizes:t.spacing})} / 2)`:void 0,fontSize:m({size:i,sizes:t.fontSizes}),borderRadius:t.fn.radius(a),lineHeight:1,backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,"&:not([data-disabled])":t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]}),"&:active:not([data-disabled])":t.activeStyles,"&[data-disabled]":{opacity:.4,cursor:"not-allowed",pointerEvents:"none"},"&[data-active]":{borderColor:"transparent",color:s.color,backgroundColor:s.background,"&:not([data-disabled])":t.fn.hover({backgroundColor:s.hover})}}}}),Ft=Object.defineProperty,Vt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,nt=(t,e,a)=>e in t?Ft(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,kt=(t,e)=>{for(var a in e||(e={}))dt.call(e,a)&&nt(t,a,e[a]);if(D)for(var a of D(e))pt.call(e,a)&&nt(t,a,e[a]);return t},Bt=(t,e)=>Vt(t,At(e)),Zt=(t,e)=>{var a={};for(var n in t)dt.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&D)for(var n of D(t))e.indexOf(n)<0&&pt.call(t,n)&&(a[n]=t[n]);return a};const Ht={withPadding:!0},H=B.forwardRef((t,e)=>{const a=S("PaginationControl",Ht,t),{active:n,className:i,disabled:s,withPadding:r}=a,c=Zt(a,["active","className","disabled","withPadding"]),l=Z(),{classes:f,cx:g}=Dt({color:l.color,radius:l.radius,withPadding:r},l.stylesApi);return o.createElement(Et,Bt(kt({},c),{disabled:s,"data-active":n||void 0,"data-disabled":s||void 0,ref:e,className:g(f.control,i)}))});H.displayName="@mantine/core/PaginationControl";var Jt=Object.defineProperty,Tt=Object.defineProperties,Ut=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,rt=(t,e,a)=>e in t?Jt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,h=(t,e)=>{for(var a in e||(e={}))gt.call(e,a)&&rt(t,a,e[a]);if(F)for(var a of F(e))Pt.call(e,a)&&rt(t,a,e[a]);return t},N=(t,e)=>Tt(t,Ut(e)),Wt=(t,e)=>{var a={};for(var n in t)gt.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&F)for(var n of F(t))e.indexOf(n)<0&&Pt.call(t,n)&&(a[n]=t[n]);return a};function vt(t){return`calc(${m({size:t,sizes:E})} / 2)`}function L(t){var e=t,{size:a,style:n,children:i,path:s}=e,r=Wt(e,["size","style","children","path"]);return o.createElement("svg",h({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:h({width:a,height:a},n)},r),o.createElement("path",{d:s,fill:"currentColor"}))}const Gt=t=>o.createElement(L,N(h({},t),{path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"})),qt=t=>o.createElement(L,N(h({},t),{path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"})),Kt=t=>o.createElement(L,N(h({},t),{path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"})),Qt=t=>o.createElement(L,N(h({},t),{path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"})),Xt=t=>o.createElement(L,N(h({},t),{path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}));var Yt=tt((t,e,{size:a})=>({dots:{height:m({size:a,sizes:E}),minWidth:m({size:a,sizes:E}),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}})),te=Object.defineProperty,V=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,ot=(t,e,a)=>e in t?te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,ee=(t,e)=>{for(var a in e||(e={}))ut.call(e,a)&&ot(t,a,e[a]);if(V)for(var a of V(e))mt.call(e,a)&&ot(t,a,e[a]);return t},ae=(t,e)=>{var a={};for(var n in t)ut.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&V)for(var n of V(t))e.indexOf(n)<0&&mt.call(t,n)&&(a[n]=t[n]);return a};const ne={icon:Xt},et=B.forwardRef((t,e)=>{const a=S("PaginationDots",ne,t),{className:n,icon:i}=a,s=ae(a,["className","icon"]),r=Z(),{classes:c,cx:l}=Yt(null,r.stylesApi);return o.createElement(St,ee({ref:e,className:l(c.dots,n)},s),o.createElement(i,{size:vt(r.stylesApi.size)}))});et.displayName="@mantine/core/PaginationDots";var re=Object.defineProperty,it=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,st=(t,e,a)=>e in t?re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,se=(t,e)=>{for(var a in e||(e={}))oe.call(e,a)&&st(t,a,e[a]);if(it)for(var a of it(e))ie.call(e,a)&&st(t,a,e[a]);return t};function at({dotsIcon:t}){const e=Z(),a=e.range.map((n,i)=>{var s;return n==="dots"?o.createElement(et,{icon:t,key:i}):o.createElement(H,se({key:i,active:n===e.active,"aria-current":n===e.active?"page":void 0,onClick:()=>e.onChange(n),disabled:e.disabled},(s=e.getItemProps)==null?void 0:s.call(e,n)),n)});return o.createElement(o.Fragment,null,a)}at.displayName="@mantine/core/PaginationItems";var le=tt(t=>({icon:{transform:t.dir==="rtl"?"rotate(180deg)":"unset"}})),ce=Object.defineProperty,A=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,lt=(t,e,a)=>e in t?ce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,fe=(t,e)=>{for(var a in e||(e={}))_t.call(e,a)&<(t,a,e[a]);if(A)for(var a of A(e))yt.call(e,a)&<(t,a,e[a]);return t},de=(t,e)=>{var a={};for(var n in t)_t.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&A)for(var n of A(t))e.indexOf(n)<0&&yt.call(t,n)&&(a[n]=t[n]);return a};function J({icon:t,name:e,action:a,type:n}){const i={icon:t},s=B.forwardRef((r,c)=>{const l=S(e,i,r),{icon:f}=l,g=de(l,["icon"]),{classes:_}=le(),d=Z(),y=n==="next"?d.active===d.total:d.active===1;return o.createElement(H,fe({disabled:d.disabled||y,ref:c,onClick:d[a],withPadding:!1},g),o.createElement(f,{className:_.icon,size:vt(d.stylesApi.size)}))});return s.displayName=`@mantine/core/${e}`,Nt(s)}const Ot=J({icon:Gt,name:"PaginationNext",action:"onNext",type:"next"}),ht=J({icon:qt,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),wt=J({icon:Kt,name:"PaginationFirst",action:"onFirst",type:"previous"}),Ct=J({icon:Qt,name:"PaginationLast",action:"onLast",type:"next"});var pe=Object.defineProperty,k=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,ct=(t,e,a)=>e in t?pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,x=(t,e)=>{for(var a in e||(e={}))bt.call(e,a)&&ct(t,a,e[a]);if(k)for(var a of k(e))$t.call(e,a)&&ct(t,a,e[a]);return t},ge=(t,e)=>{var a={};for(var n in t)bt.call(t,n)&&e.indexOf(n)<0&&(a[n]=t[n]);if(t!=null&&k)for(var n of k(t))e.indexOf(n)<0&&$t.call(t,n)&&(a[n]=t[n]);return a};const Pe={withControls:!0,siblings:1,boundaries:1};function P(t){const e=S("Pagination",Pe,t),{withEdges:a,withControls:n,classNames:i,styles:s,unstyled:r,variant:c,size:l,total:f,value:g,defaultValue:_,onChange:d,disabled:y,siblings:j,boundaries:v,color:w,radius:C,onNextPage:b,onPreviousPage:$,onFirstPage:O,onLastPage:T,getItemProps:U,getControlProps:p,spacing:z,nextIcon:W,previousIcon:G,lastIcon:q,firstIcon:K,dotsIcon:Q}=e,X=ge(e,["withEdges","withControls","classNames","styles","unstyled","variant","size","total","value","defaultValue","onChange","disabled","siblings","boundaries","color","radius","onNextPage","onPreviousPage","onFirstPage","onLastPage","getItemProps","getControlProps","spacing","nextIcon","previousIcon","lastIcon","firstIcon","dotsIcon"]),Y=Lt();return f<=0?null:o.createElement(ft,{classNames:i,styles:s,unstyled:r,variant:c,size:l,total:f,value:g,defaultValue:_,onChange:d,disabled:y,siblings:j,boundaries:v,color:w,radius:C,onNextPage:b,onPreviousPage:$,onFirstPage:O,onLastPage:T,getItemProps:U},o.createElement(jt,x({spacing:z??`calc(${m({size:l,sizes:Y.spacing})} / 2)`},X),a&&o.createElement(wt,x({icon:K},p?.("first"))),n&&o.createElement(ht,x({icon:G},p?.("previous"))),o.createElement(at,{dotsIcon:Q}),n&&o.createElement(Ot,x({icon:W},p?.("next"))),a&&o.createElement(Ct,x({icon:q},p?.("last")))))}P.displayName="@mantine/core/Pagination";P.Root=ft;P.Items=at;P.Control=H;P.Dots=et;P.Next=Ot;P.Previous=ht;P.Last=Ct;P.First=wt;export{P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{by as W,bz as _,bB as o,dq as G,r as H,bA as J,ab as s,T as K,bC as w,bj as O}from"./index-
|
|
1
|
+
import{by as W,bz as _,bB as o,dq as G,r as H,bA as J,ab as s,T as K,bC as w,bj as O}from"./index-B2_EbsaK.js";const k={xs:o(3),sm:o(5),md:o(8),lg:o(12),xl:o(16)},Q=G({from:{backgroundPosition:"0 0"},to:{backgroundPosition:`${o(40)} 0`}});var U=W((a,{color:r,radius:e},{size:t})=>({root:{position:"relative",height:_({size:t,sizes:k}),backgroundColor:a.colorScheme==="dark"?a.colors.dark[4]:a.colors.gray[2],borderRadius:a.fn.radius(e),overflow:"hidden"},bar:{position:"absolute",top:0,bottom:0,left:0,height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:a.fn.variant({variant:"filled",primaryFallback:!1,color:r||a.primaryColor}).background,transition:"width 100ms linear","&[data-animate]":{animation:`${Q} 1000ms linear infinite`},"&[data-striped]":{backgroundSize:`${o(20)} ${o(20)}`,backgroundImage:"linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)"},"&:last-of-type":{borderTopRightRadius:a.fn.radius(e),borderBottomRightRadius:a.fn.radius(e)},"&:first-of-type":{borderTopLeftRadius:a.fn.radius(e),borderBottomLeftRadius:a.fn.radius(e)},"@media (prefers-reduced-motion)":{transitionDuration:a.respectReducedMotion?"0ms":void 0}},label:{color:a.white,fontSize:`calc(${_({size:t,sizes:k})} * 0.65)`,fontWeight:700,userSelect:"none",overflow:"hidden",whiteSpace:"nowrap"}})),X=Object.defineProperty,Y=Object.defineProperties,Z=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,N=(a,r,e)=>r in a?X(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e,d=(a,r)=>{for(var e in r||(r={}))R.call(r,e)&&N(a,e,r[e]);if(n)for(var e of n(r))S.call(r,e)&&N(a,e,r[e]);return a},C=(a,r)=>Y(a,Z(r)),x=(a,r)=>{var e={};for(var t in a)R.call(a,t)&&r.indexOf(t)<0&&(e[t]=a[t]);if(a!=null&&n)for(var t of n(a))r.indexOf(t)<0&&S.call(a,t)&&(e[t]=a[t]);return e};function aa(a){return a.reduce((r,e)=>(r.sections.push(C(d({},e),{accumulated:r.accumulated})),r.accumulated+=e.value,r),{accumulated:0,sections:[]}).sections}const ea={size:"md",radius:"sm",striped:!1,animate:!1,label:""},ra=H.forwardRef((a,r)=>{const e=J("Progress",ea,a),{className:t,value:c,color:h,size:E,radius:$,striped:u,animate:i,label:m,"aria-label":j,classNames:z,styles:T,sections:p,unstyled:A,variant:B}=e,D=x(e,["className","value","color","size","radius","striped","animate","label","aria-label","classNames","styles","sections","unstyled","variant"]),{classes:l,cx:f,theme:b}=U({color:h,radius:$},{name:"Progress",classNames:z,styles:T,unstyled:A,variant:B,size:E}),I=Array.isArray(p)?aa(p).map((L,F)=>{var v=L,{tooltip:g,accumulated:V,value:q,label:y,color:M}=v,P=x(v,["tooltip","accumulated","value","label","color"]);return s.createElement(K.Floating,{label:g,disabled:!g,key:F},s.createElement(w,C(d({},P),{className:f(l.bar,P.className),"data-striped":u||i||void 0,"data-animate":i||void 0,sx:{width:`${q}%`,left:`${V}%`,backgroundColor:b.fn.variant({variant:"filled",primaryFallback:!1,color:M||b.primaryColor}).background}}),y&&s.createElement(O,{className:l.label},y)))}):null;return s.createElement(w,d({className:f(l.root,t),ref:r},D),I||s.createElement("div",{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,"aria-label":j,className:l.bar,style:{width:`${c}%`},"data-striped":u||i||void 0,"data-animate":i||void 0},m?s.createElement(O,{className:l.label},m):""))});ra.displayName="@mantine/core/Progress";export{ra as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{by as $,bB as k,bz as s,r as j,bA as m,ab as x,bC as T}from"./index-
|
|
1
|
+
import{by as $,bB as k,bz as s,r as j,bA as m,ab as x,bC as T}from"./index-B2_EbsaK.js";var B=Object.defineProperty,C=Object.defineProperties,E=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,p=(r,o,t)=>o in r?B(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,D=(r,o)=>{for(var t in o||(o={}))N.call(o,t)&&p(r,t,o[t]);if(c)for(var t of c(o))R.call(o,t)&&p(r,t,o[t]);return r},H=(r,o)=>C(r,E(o)),I=$((r,{captionSide:o,horizontalSpacing:t,verticalSpacing:e,fontSize:n,withBorder:d,withColumnBorders:i})=>{const a=`${k(1)} solid ${r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[3]}`;return{root:H(D({},r.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:o,color:r.colorScheme==="dark"?r.colors.dark[0]:r.black,lineHeight:r.lineHeight,border:d?a:void 0,"& > caption":{marginTop:o==="top"?0:r.spacing.xs,marginBottom:o==="bottom"?0:r.spacing.xs,fontSize:r.fontSizes.sm,color:r.colorScheme==="dark"?r.colors.dark[2]:r.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:r.colorScheme==="dark"?r.colors.dark[0]:r.colors.gray[7],fontSize:s({size:n,sizes:r.fontSizes}),padding:`${s({size:e,sizes:r.spacing})} ${s({size:t,sizes:r.spacing})}`},"& > thead > tr > th":{borderBottom:a},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:a},"& > tbody > tr > td":{padding:`${s({size:e,sizes:r.spacing})} ${s({size:t,sizes:r.spacing})}`,borderTop:a,fontSize:s({size:n,sizes:r.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:i?a:"none","&:last-of-type":{borderRight:"none",borderLeft:i?a:"none"}},"& > tbody > tr > th":{borderRight:i?a:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.colors.gray[0]},"&[data-hover] > tbody > tr":r.fn.hover({backgroundColor:r.colorScheme==="dark"?r.colors.dark[5]:r.colors.gray[1]})})}}),A=Object.defineProperty,V=Object.defineProperties,L=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,f=(r,o,t)=>o in r?A(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,W=(r,o)=>{for(var t in o||(o={}))g.call(o,t)&&f(r,t,o[t]);if(l)for(var t of l(o))b.call(o,t)&&f(r,t,o[t]);return r},q=(r,o)=>V(r,L(o)),F=(r,o)=>{var t={};for(var e in r)g.call(r,e)&&o.indexOf(e)<0&&(t[e]=r[e]);if(r!=null&&l)for(var e of l(r))o.indexOf(e)<0&&b.call(r,e)&&(t[e]=r[e]);return t};const G={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},J=j.forwardRef((r,o)=>{const t=m("Table",G,r),{className:e,children:n,striped:d,highlightOnHover:i,captionSide:a,horizontalSpacing:y,verticalSpacing:_,fontSize:v,unstyled:O,withBorder:S,withColumnBorders:P,variant:z}=t,h=F(t,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:u,cx:w}=I({captionSide:a,verticalSpacing:_,horizontalSpacing:y,fontSize:v,withBorder:S,withColumnBorders:P},{unstyled:O,name:"Table",variant:z});return x.createElement(T,q(W({},h),{component:"table",ref:o,className:w(u.root,e),"data-striped":d||void 0,"data-hover":i||void 0}),n)});J.displayName="@mantine/core/Table";export{J as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dJ as S,dK as K,dL as Q,dM as X,dN as W,dO as Y,cD as Z,cC as N,r as M,cH as z,dP as tt,j as et,ac as rt,dr as V}from"./index-
|
|
1
|
+
import{dJ as S,dK as K,dL as Q,dM as X,dN as W,dO as Y,cD as Z,cC as N,r as M,cH as z,dP as tt,j as et,ac as rt,dr as V}from"./index-B2_EbsaK.js";function kt(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}const $=t=>t,nt=()=>{let t=$;return{configure(e){t=e},generate(e){return t(e)},reset(){t=$}}},ot=nt(),st={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function U(t,e,r="Mui"){const n=st[e];return n?`${r}-${n}`:`${ot.generate(t)}-${e}`}function it(t,e,r="Mui"){const n={};return e.forEach(o=>{n[o]=U(t,o,r)}),n}function G(t){const{variants:e,...r}=t,n={variants:e,style:S(r),isProcessed:!0};return n.style===r||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=S(o.style))}),n}const at=K();function L(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function g(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function lt(t){return t?(e,r)=>r[t]:null}function ut(t,e,r){t.theme=ht(t.theme)?r:t.theme[e]||t.theme}function A(t,e,r){const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(o=>A(t,o,r));if(Array.isArray(n?.variants)){let o;if(n.isProcessed)o=r?g(n.style,r):n.style;else{const{variants:s,...i}=n;o=r?g(S(i),r):i}return I(t,n.variants,[o],r)}return n?.isProcessed?r?g(S(n.style),r):n.style:r?g(S(n),r):n}function I(t,e,r=[],n=void 0){let o;t:for(let s=0;s<e.length;s+=1){const i=e[s];if(typeof i.props=="function"){if(o??={...t,...t.ownerState,ownerState:t.ownerState},!i.props(o))continue}else for(const a in i.props)if(t[a]!==i.props[a]&&t.ownerState?.[a]!==i.props[a])continue t;typeof i.style=="function"?(o??={...t,...t.ownerState,ownerState:t.ownerState},r.push(n?g(S(i.style(o)),n):i.style(o))):r.push(n?g(S(i.style),n):i.style)}return r}function ct(t={}){const{themeId:e,defaultTheme:r=at,rootShouldForwardProp:n=L,slotShouldForwardProp:o=L}=t;function s(a){ut(a,e,r)}return(a,y={})=>{Q(a,u=>u.filter(c=>c!==W));const{name:l,slot:h,skipVariantsResolver:b,skipSx:C,overridesResolver:v=lt(dt(h)),...T}=y,w=l&&l.startsWith("Mui")||h?"components":"custom",P=b!==void 0?b:h&&h!=="Root"&&h!=="root"||!1,k=C||!1;let x=L;h==="Root"||h==="root"?x=n:h?x=o:pt(a)&&(x=void 0);const F=X(a,{shouldForwardProp:x,label:ft(),...T}),q=u=>{if(u.__emotion_real===u)return u;if(typeof u=="function")return function(m){return A(m,u,m.theme.modularCssLayers?w:void 0)};if(Y(u)){const c=G(u);return function(d){return c.variants?A(d,c,d.theme.modularCssLayers?w:void 0):d.theme.modularCssLayers?g(c.style,w):c.style}}return u},_=(...u)=>{const c=[],m=u.map(q),d=[];if(c.push(s),l&&v&&d.push(function(f){const p=f.theme.components?.[l]?.styleOverrides;if(!p)return null;const B={};for(const E in p)B[E]=A(f,p[E],f.theme.modularCssLayers?"theme":void 0);return v(f,B)}),l&&!P&&d.push(function(f){const p=f.theme?.components?.[l]?.variants;return p?I(f,p,[],f.theme.modularCssLayers?"theme":void 0):null}),k||d.push(W),Array.isArray(m[0])){const O=m.shift(),f=new Array(c.length).fill(""),R=new Array(d.length).fill("");let p;p=[...f,...O,...R],p.raw=[...f,...O.raw,...R],c.unshift(p)}const J=[...c,...m,...d],j=F(...J);return a.muiName&&(j.muiName=a.muiName),j};return F.withConfig&&(_.withConfig=F.withConfig),_}}function ft(t,e){return void 0}function ht(t){for(const e in t)return!1;return!0}function pt(t){return typeof t=="string"&&t.charCodeAt(0)>96}function dt(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}const D={theme:void 0};function yt(t){let e,r;return function(o){let s=e;return(s===void 0||o.theme!==r)&&(D.theme=o.theme,s=G(t(D)),e=s,r=o.theme),s}}function mt(t,e,r=void 0){const n={};for(const o in t){const s=t[o];let i="",a=!0;for(let y=0;y<s.length;y+=1){const l=s[y];l&&(i+=(a===!0?"":" ")+e(l),a=!1,r&&r[l]&&(i+=" "+r[l]))}n[o]=i}return n}function gt(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const St=t=>gt(t)&&t!=="classes",vt=ct({themeId:Z,defaultTheme:N,rootShouldForwardProp:St}),wt=yt;function Ft(...t){const e=M.useRef(void 0),r=M.useCallback(n=>{const o=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const i=s,a=i(n);return typeof a=="function"?a:()=>{i(null)}}return s.current=n,()=>{s.current=null}});return()=>{o.forEach(s=>s?.())}},t);return M.useMemo(()=>t.every(n=>n==null)?null:n=>{e.current&&(e.current(),e.current=void 0),n!=null&&(e.current=r(n))},t)}function xt(t){return typeof t.main=="string"}function bt(t,e=[]){if(!xt(t))return!1;for(const r of e)if(!t.hasOwnProperty(r)||typeof t[r]!="string")return!1;return!0}function Ct(t=[]){return([,e])=>e&&bt(e,t)}function Tt(t){return U("MuiTypography",t)}it("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Pt={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Ot=tt(),Rt=t=>{const{align:e,gutterBottom:r,noWrap:n,paragraph:o,variant:s,classes:i}=t,a={root:["root",s,t.align!=="inherit"&&`align${V(e)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return mt(a,Tt,i)},Mt=vt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.variant&&e[r.variant],r.align!=="inherit"&&e[`align${V(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(wt(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,r])=>e!=="inherit"&&r&&typeof r=="object").map(([e,r])=>({props:{variant:e},style:r})),...Object.entries(t.palette).filter(Ct()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${V(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),H={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Lt=M.forwardRef(function(e,r){const{color:n,...o}=z({props:e,name:"MuiTypography"}),s=!Pt[n],i=Ot({...o,...s&&{color:n}}),{align:a="inherit",className:y,component:l,gutterBottom:h=!1,noWrap:b=!1,paragraph:C=!1,variant:v="body1",variantMapping:T=H,...w}=i,P={...i,align:a,color:n,className:y,component:l,gutterBottom:h,noWrap:b,paragraph:C,variant:v,variantMapping:T},k=l||(C?"p":T[v]||H[v])||"span",x=Rt(P);return et.jsx(Mt,{as:k,ref:r,className:rt(x.root,y),...w,ownerState:P,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...w.style}})});export{Lt as T,kt as _,it as a,L as b,mt as c,Ct as d,U as g,wt as m,vt as s,Ft as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as j,bA as E,gg as q,ab as C,gh as G,gi as J,gj as K,gk as Q,gl as h}from"./index-
|
|
1
|
+
import{r as j,bA as E,gg as q,ab as C,gh as G,gi as J,gj as K,gk as Q,gl as h}from"./index-B2_EbsaK.js";var U=Object.defineProperty,v=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,S=(e,a,r)=>a in e?U(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,Y=(e,a)=>{for(var r in a||(a={}))k.call(a,r)&&S(e,r,a[r]);if(v)for(var r of v(a))R.call(a,r)&&S(e,r,a[r]);return e},W=(e,a)=>{var r={};for(var t in e)k.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&v)for(var t of v(e))a.indexOf(t)<0&&R.call(e,t)&&(r[t]=e[t]);return r};const X={type:"default"},V=j.forwardRef((e,a)=>{const r=E("YearPicker",X,e),{type:t,defaultValue:g,value:m,onChange:y,__staticSelector:O,getYearControlProps:p,allowSingleDateInRange:i,allowDeselect:c,onMouseLeave:u,onYearSelect:n}=r,w=W(r,["type","defaultValue","value","onChange","__staticSelector","getYearControlProps","allowSingleDateInRange","allowDeselect","onMouseLeave","onYearSelect"]),{onDateChange:f,onRootMouseLeave:d,onHoveredDateChange:_,getControlProps:D}=q({type:t,level:"year",allowDeselect:c,allowSingleDateInRange:i,value:m,defaultValue:g,onChange:y,onMouseLeave:u});return C.createElement(G,Y({ref:a,minLevel:"decade",__updateDateOnYearSelect:!1,__staticSelector:O||"YearPicker",onMouseLeave:d,onYearMouseEnter:(o,l)=>_(l),onYearSelect:o=>{f(o),n?.(o)},getYearControlProps:o=>Y(Y({},D(o)),p?.(o))},w))});V.displayName="@mantine/dates/YearPicker";var Z=Object.defineProperty,ee=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,I=(e,a,r)=>a in e?Z(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,b=(e,a)=>{for(var r in a||(a={}))$.call(a,r)&&I(e,r,a[r]);if(P)for(var r of P(a))x.call(a,r)&&I(e,r,a[r]);return e},re=(e,a)=>ee(e,ae(a)),te=(e,a)=>{var r={};for(var t in e)$.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&P)for(var t of P(e))a.indexOf(t)<0&&x.call(e,t)&&(r[t]=e[t]);return r};const oe={type:"default",valueFormat:"YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},ne=j.forwardRef((e,a)=>{const r=E("YearPickerInput",oe,e),{type:t,value:g,defaultValue:m,onChange:y,valueFormat:O,labelSeparator:p,locale:i,classNames:c,styles:u,unstyled:n,closeOnChange:w,size:f,variant:d,dropdownType:_,sortDates:D,minDate:o,maxDate:l}=r,N=te(r,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","minDate","maxDate"]),{calendarProps:L,others:M}=J(N),{_value:s,setValue:A,formattedValue:F,dropdownHandlers:T,dropdownOpened:z,onClear:H,shouldClear:B}=K({type:t,value:g,defaultValue:m,onChange:y,locale:i,format:O,labelSeparator:p,closeOnChange:w,sortDates:D});return C.createElement(Q,b({formattedValue:F,dropdownOpened:z,dropdownHandlers:T,classNames:c,styles:u,unstyled:n,__staticSelector:"YearPickerInput",ref:a,onClear:H,shouldClear:B,value:s,type:t,size:f,variant:d,dropdownType:_},M),C.createElement(V,re(b({},L),{size:f,variant:d,type:t,value:s,defaultDate:Array.isArray(s)?s[0]||h({maxDate:l,minDate:o}):s||h({maxDate:l,minDate:o}),onChange:A,locale:i,classNames:c,styles:u,unstyled:n,__staticSelector:"YearPickerInput",__stopPropagation:_==="popover",minDate:o,maxDate:l})))});ne.displayName="@mantine/dates/YearPickerInput";export{ne as Y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ab as l,j as t,gT as B,gU as F,gV as T,gW as J,gX as Q,gY as O,gZ as ee,g_ as oe,g$ as M,h0 as re,h1 as te,h2 as ne,m as P,dn as ae}from"./index-
|
|
1
|
+
import{ab as l,j as t,gT as B,gU as F,gV as T,gW as J,gX as Q,gY as O,gZ as ee,g_ as oe,g$ as M,h0 as re,h1 as te,h2 as ne,m as P,dn as ae}from"./index-B2_EbsaK.js";var d="Accordion",ce=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[k,ie,se]=B(d),[b]=F(d,[se,T]),E=T(),V=l.forwardRef((e,n)=>{const{type:o,...a}=e,c=a,r=a;return t.jsx(k.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?t.jsx(ue,{...r,ref:n}):t.jsx(pe,{...c,ref:n})})});V.displayName=d;var[H,le]=b(d),[$,de]=b(d,{collapsible:!1}),pe=l.forwardRef((e,n)=>{const{value:o,defaultValue:a,onValueChange:c=()=>{},collapsible:r=!1,...s}=e,[i,p]=M({prop:o,defaultProp:a??"",onChange:c,caller:d});return t.jsx(H,{scope:e.__scopeAccordion,value:l.useMemo(()=>i?[i]:[],[i]),onItemOpen:p,onItemClose:l.useCallback(()=>r&&p(""),[r,p]),children:t.jsx($,{scope:e.__scopeAccordion,collapsible:r,children:t.jsx(K,{...s,ref:n})})})}),ue=l.forwardRef((e,n)=>{const{value:o,defaultValue:a,onValueChange:c=()=>{},...r}=e,[s,i]=M({prop:o,defaultProp:a??[],onChange:c,caller:d}),p=l.useCallback(g=>i((f=[])=>[...f,g]),[i]),v=l.useCallback(g=>i((f=[])=>f.filter(h=>h!==g)),[i]);return t.jsx(H,{scope:e.__scopeAccordion,value:s,onItemOpen:p,onItemClose:v,children:t.jsx($,{scope:e.__scopeAccordion,collapsible:!0,children:t.jsx(K,{...r,ref:n})})})}),[fe,C]=b(d),K=l.forwardRef((e,n)=>{const{__scopeAccordion:o,disabled:a,dir:c,orientation:r="vertical",...s}=e,i=l.useRef(null),p=re(i,n),v=ie(o),f=te(c)==="ltr",h=ne(e.onKeyDown,x=>{if(!ce.includes(x.key))return;const Z=x.target,I=v().filter(R=>!R.ref.current?.disabled),m=I.findIndex(R=>R.ref.current===Z),D=I.length;if(m===-1)return;x.preventDefault();let u=m;const j=0,w=D-1,_=()=>{u=m+1,u>w&&(u=j)},y=()=>{u=m-1,u<j&&(u=w)};switch(x.key){case"Home":u=j;break;case"End":u=w;break;case"ArrowRight":r==="horizontal"&&(f?_():y());break;case"ArrowDown":r==="vertical"&&_();break;case"ArrowLeft":r==="horizontal"&&(f?y():_());break;case"ArrowUp":r==="vertical"&&y();break}const q=u%D;I[q].ref.current?.focus()});return t.jsx(fe,{scope:o,disabled:a,direction:c,orientation:r,children:t.jsx(k.Slot,{scope:o,children:t.jsx(O.div,{...s,"data-orientation":r,ref:p,onKeyDown:a?void 0:h})})})}),A="AccordionItem",[ve,S]=b(A),z=l.forwardRef((e,n)=>{const{__scopeAccordion:o,value:a,...c}=e,r=C(A,o),s=le(A,o),i=E(o),p=J(),v=a&&s.value.includes(a)||!1,g=r.disabled||e.disabled;return t.jsx(ve,{scope:o,open:v,disabled:g,triggerId:p,children:t.jsx(Q,{"data-orientation":r.orientation,"data-state":X(v),...i,...c,ref:n,disabled:g,open:v,onOpenChange:f=>{f?s.onItemOpen(a):s.onItemClose(a)}})})});z.displayName=A;var L="AccordionHeader",U=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=C(d,o),r=S(L,o);return t.jsx(O.h3,{"data-orientation":c.orientation,"data-state":X(r.open),"data-disabled":r.disabled?"":void 0,...a,ref:n})});U.displayName=L;var N="AccordionTrigger",G=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=C(d,o),r=S(N,o),s=de(N,o),i=E(o);return t.jsx(k.ItemSlot,{scope:o,children:t.jsx(ee,{"aria-disabled":r.open&&!s.collapsible||void 0,"data-orientation":c.orientation,id:r.triggerId,...i,...a,ref:n})})});G.displayName=N;var Y="AccordionContent",W=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=C(d,o),r=S(Y,o),s=E(o);return t.jsx(oe,{role:"region","aria-labelledby":r.triggerId,"data-orientation":c.orientation,...s,...a,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});W.displayName=Y;function X(e){return e?"open":"closed"}var ge=V,xe=z,me=U,Ae=G,be=W;function he({...e}){return t.jsx(ge,{"data-slot":"accordion",...e})}function Ie({className:e,...n}){return t.jsx(xe,{"data-slot":"accordion-item",className:P("border-b last:border-b-0",e),...n})}function je({className:e,children:n,...o}){return t.jsx(me,{className:"flex",children:t.jsxs(Ae,{"data-slot":"accordion-trigger",className:P("focus-visible:border-gray-950 focus-visible:ring-gray-950/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50",e),...o,children:[n,t.jsx(ae,{className:"text-gray-500 pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-gray-400"})]})})}function we({className:e,children:n,...o}){return t.jsx(be,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...o,children:t.jsx("div",{className:P("pt-0 pb-4",e),children:n})})}export{he as A,Ie as a,we as b,je as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,F as h,a8 as v,aa as C,u as P,j as e,L as A,h3 as F}from"./index-
|
|
1
|
+
import{r as a,F as h,a8 as v,aa as C,u as P,j as e,L as A,h3 as F}from"./index-B2_EbsaK.js";import{u as b}from"./use-url-query-BPzyQB93.js";import{C as y}from"./charges-filters-BUFmsiTq.js";import{P as j}from"./page-layout-C0GJoVTR.js";import{P as D}from"./Progress-Bda-J3ZH.js";import"./modal-B0uNLang.js";import"./Pagination-BM-86UO5.js";import"./create-event-handler-BiA-1lGu.js";import"./funnel-BlaCusqP.js";import"./sub-fkVv9ghZ.js";import"./addDays-DGlDD_vj.js";import"./subMonths-5wFmciT1.js";import"./MultiSelect-CBtq6WUv.js";const T=()=>{const{setFiltersContext:i}=a.useContext(h),{get:c}=b(),{userContext:p}=a.useContext(v),[s,m]=a.useState(c("chargesFilters")?JSON.parse(decodeURIComponent(c("chargesFilters"))):{byOwners:p?.context.adminBusinessId?[p?.context.adminBusinessId]:[],sortBy:{field:C.Date,asc:!1},toAnyDate:null,fromAnyDate:null}),[{data:r,fetching:u}]=P({query:F,variables:{filters:s,page:1,limit:999999}}),t=r?.allCharges?.nodes.length??0;let o=0,l=0,n=0;r?.allCharges?.nodes.map(f=>{switch(f.accountantApproval){case"APPROVED":o+=1;break;case"PENDING":l+=1;break;case"UNAPPROVED":n+=1;break}});const x=100*o/t,d=100*l/t,g=100*n/t;return a.useEffect(()=>{i(e.jsx("div",{className:"flex flex-row gap-x-5",children:e.jsx(y,{filter:s,setFilter:m,activePage:1,setPage:()=>{},totalPages:1})}))},[r,u,s,i,m]),e.jsx(j,{title:"Accountant Approvals Status",children:u?e.jsx(A,{className:"h-10 w-10 animate-spin mr-2 self-center"}):e.jsxs("div",{className:"mx-10 mt-5 flex flex-col gap-5",children:[`Total charges: ${t}`,e.jsx(D,{color:"green",radius:"xl",size:"xl",sections:[{value:x,color:"green",label:`${x.toFixed(1)}% (${o})`},{value:d,color:"orange",label:`${d.toFixed(1)}% (${l})`},{value:g,color:"red",label:`${g.toFixed(1)}% (${n})`}]})]})})};export{T as AccountantApprovals};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as t,B as a,dU as d}from"./index-
|
|
1
|
+
import{r as s,j as t,B as a,dU as d}from"./index-B2_EbsaK.js";import{P as c}from"./Pagination-BM-86UO5.js";import{T as h}from"./Table-CYqAEQfS.js";function m(e){const[i,o]=s.useState(!1),n=e.moreInfo?e.moreInfo(e.item):null;return t.jsxs(t.Fragment,{children:[t.jsxs("tr",{children:[e.columns.map((l,r)=>l.disabled?null:t.jsx("td",{style:l.style,children:l.value(e.item,e.rowContext?e.rowContext(e.item):void 0)},String(r))),e.moreInfo&&t.jsx("td",{children:n===null?t.jsx("p",{children:"No Data Related"}):t.jsx(a,{onClick:()=>o(!i),className:"ml-auto",children:"More Info"})})]}),(e.isShowAll||i)&&n!==null&&t.jsx("tr",{children:t.jsx("td",{colSpan:12,children:t.jsx(d,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:n})})})]})}function j(e){const[i,o]=s.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex flex-row justify-end w-full",children:[e.pagination&&t.jsx(c,{className:"flex-auto",...e.pagination}),e.showButton===!0?t.jsx(a,{type:"button",onClick:()=>{o(n=>!n)},children:i?"Hide All":"Show All"}):null]}),t.jsxs(h,{striped:e.striped,highlightOnHover:e.highlightOnHover,children:[t.jsx("thead",{style:e.stickyHeader?{position:"sticky",top:0,zIndex:20}:{},children:t.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[e.columns.map((n,l)=>n.disabled?null:t.jsx("th",{children:n.title},String(l))),e.moreInfo&&t.jsx("th",{children:"More Info"})]})}),t.jsx("tbody",{children:e.items.map((n,l)=>t.jsx(m,{columns:e.columns,item:n,moreInfo:e.moreInfo,isShowAll:i,rowContext:e.rowContext},l))})]})]})}export{m as A,j as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fG as s,gp as i}from"./index-
|
|
1
|
+
import{fG as s,gp as i}from"./index-B2_EbsaK.js";function o(a,r,e){const t=s(a,e?.in);return isNaN(r)?i(a,NaN):(r&&t.setDate(t.getDate()+r),t)}export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,F as y,u as A,j as e,T as N,B as b,L as w,A as O}from"./index-
|
|
1
|
+
import{r as t,F as y,u as A,j as e,T as N,B as b,L as w,A as O}from"./index-B2_EbsaK.js";import{u as T}from"./use-url-query-BPzyQB93.js";import{C as z}from"./charges-filters-BUFmsiTq.js";import{C as B}from"./charges-table-D_GDHvFS.js";import{M as L}from"./index-EaY6ZYvr.js";import{E as R,I as k,M as Q}from"./match-document-modal-DcL0siQq.js";import{P as U}from"./page-layout-C0GJoVTR.js";import{P as q,a as J}from"./panel-top-open-BFNhAe3f.js";import"./modal-B0uNLang.js";import"./Pagination-BM-86UO5.js";import"./create-event-handler-BiA-1lGu.js";import"./funnel-BlaCusqP.js";import"./sub-fkVv9ghZ.js";import"./addDays-DGlDD_vj.js";import"./subMonths-5wFmciT1.js";import"./MultiSelect-CBtq6WUv.js";import"./toggle-expansion-button-41Ejffq3.js";import"./index-CRLPoT61.js";import"./similar-transactions-modal-nk8VHEtX.js";import"./list-plus-CGvSlslE.js";import"./tooltip-lhMCop8U.js";import"./Table-CYqAEQfS.js";import"./summary-DuWhfNdL.js";import"./Checkbox-Ddw01d64.js";import"./YearPickerInput-CgU-feeq.js";import"./insert-business-trip-modal-BwOnvw7X.js";import"./accounter-table-CM6PQ9Aw.js";const fe=()=>{const{setFiltersContext:h}=t.useContext(y),[i,C]=t.useState(void 0),[n,f]=t.useState(void 0),[l,x]=t.useState(void 0),[c,j]=t.useState(!1),[a,m]=t.useState([]),{get:p}=T(),[d,M]=t.useState(p("page")?Number(p("page")):1),g=p("chargesFilters"),v=t.useMemo(()=>{if(g)try{return JSON.parse(decodeURIComponent(g))}catch{return}},[g]),[r,S]=t.useState(v),D=t.useCallback((s,F)=>{a.map(u=>u.id).includes(s)?m(a.filter(u=>u.id!==s)):m([...a,{id:s,onChange:F}])},[a]),[{data:o,fetching:I},P]=A({query:O,variables:{filters:r,page:d,limit:100},pause:!0});t.useEffect(()=>{r&&P()},[r,P]);function E(){m([])}return t.useEffect(()=>{h(e.jsxs("div",{className:"flex flex-row gap-x-5",children:[e.jsx(z,{filter:r,setFilter:S,activePage:d,setPage:M,totalPages:o?.allCharges?.pageInfo.totalPages,initiallyOpened:!r}),e.jsx(N,{label:"Expand all accounts",children:e.jsx(b,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>j(s=>!s),children:c?e.jsx(q,{className:"size-5"}):e.jsx(J,{className:"size-5"})})}),e.jsx(L,{selected:a,resetMerge:E})]}))},[o,I,r,d,c,h,M,S,j,a,v]),e.jsxs(U,{title:"All Charges",description:"Manage charges",children:[I?e.jsx(w,{className:"h-10 w-10 animate-spin mr-2 self-center"}):o?.allCharges.nodes?e.jsx(B,{setEditChargeId:C,setInsertDocument:f,setMatchDocuments:x,toggleMergeCharge:D,mergeSelectedCharges:new Set(a.map(s=>s.id)),data:o?.allCharges?.nodes,isAllOpened:c}):e.jsx("span",{children:"Please apply filters"}),i&&e.jsx(R,{chargeId:i?.id,close:()=>C(void 0),onChange:i.onChange}),n&&e.jsx(k,{chargeId:n.id,onChange:n.onChange,close:()=>f(void 0)}),l&&e.jsx(Q,{chargeId:l.id,ownerId:l.ownerId,setMatchDocuments:()=>x(void 0)})]})};export{fe as AllCharges};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as Ne,w as ye,S as Se,x as he,u as be,y as Rs,r as b,j as e,D as qe,z as We,E as Ms,c as ps,g as Ie,t as M,i as De,U as $s,G as Te,H as Ke,J as Ce,K as G,N as q,O as js,P as W,Q as K,V as Ee,W as H,X as j,Y as g,Z as f,_ as N,I as T,$ as A,a0 as C,a1 as ae,a2 as He,B as P,a3 as Us,a4 as Xe,a5 as Je,a6 as _,a7 as gs,a8 as Qe,a9 as zs,aa as Gs,ab as V,ac as ts,ad as qs,ae as Ws,af as Ks,ag as ee,ah as Q,ai as Hs,aj as Xs,ak as Js,al as Ve,am as xe,an as pe,ao as je,ap as ge,aq as Qs,ar as fe,as as Ys,at as Zs,au as Y,av as Z,aw as ie,ax as et,ay as st,az as _e,aA as Re,aB as fs,aC as tt,aD as Me,aE as nt,aF as $e,aG as vs,aH as ns,aI as ys,aJ as at,aK as it,aL as Ye,aM as Ns,aN as Ze,aO as bs,aP as Cs,aQ as ws,aR as As,aS as Ss,aT as ks,aU as rt,aV as de,aW as lt,aX as as,aY as ct,aZ as ot,a_ as dt,a$ as mt,b0 as ut,b1 as ht,b2 as xt,b3 as pt,b4 as k,b5 as jt,b6 as es,b7 as gt,b8 as ft,b9 as vt,ba as yt,bb as Nt,bc as J,bd as bt,be as Ct,bf as z,bg as wt,a as At,b as St,bh as kt}from"./index-
|
|
1
|
+
import{v as Ne,w as ye,S as Se,x as he,u as be,y as Rs,r as b,j as e,D as qe,z as We,E as Ms,c as ps,g as Ie,t as M,i as De,U as $s,G as Te,H as Ke,J as Ce,K as G,N as q,O as js,P as W,Q as K,V as Ee,W as H,X as j,Y as g,Z as f,_ as N,I as T,$ as A,a0 as C,a1 as ae,a2 as He,B as P,a3 as Us,a4 as Xe,a5 as Je,a6 as _,a7 as gs,a8 as Qe,a9 as zs,aa as Gs,ab as V,ac as ts,ad as qs,ae as Ws,af as Ks,ag as ee,ah as Q,ai as Hs,aj as Xs,ak as Js,al as Ve,am as xe,an as pe,ao as je,ap as ge,aq as Qs,ar as fe,as as Ys,at as Zs,au as Y,av as Z,aw as ie,ax as et,ay as st,az as _e,aA as Re,aB as fs,aC as tt,aD as Me,aE as nt,aF as $e,aG as vs,aH as ns,aI as ys,aJ as at,aK as it,aL as Ye,aM as Ns,aN as Ze,aO as bs,aP as Cs,aQ as ws,aR as As,aS as Ss,aT as ks,aU as rt,aV as de,aW as lt,aX as as,aY as ct,aZ as ot,a_ as dt,a$ as mt,b0 as ut,b1 as ht,b2 as xt,b3 as pt,b4 as k,b5 as jt,b6 as es,b7 as gt,b8 as ft,b9 as vt,ba as yt,bb as Nt,bc as J,bd as bt,be as Ct,bf as z,bg as wt,a as At,b as St,bh as kt}from"./index-B2_EbsaK.js";import{S as ss}from"./save-qtyyZLc5.js";import{B as It}from"./business-header-B-uHcc1D.js";import{S as Dt,C as Tt}from"./charges-table-D_GDHvFS.js";import{P as Et}from"./Pagination-BM-86UO5.js";import{i as Bt,D as Pt,f as Ot,E as Lt,L as Pe,a as we,C as Ft,A as Vt,b as me,c as _t,d as Ue,h as Rt,e as Mt,g as Is,u as $t,G as Ut,j as is,k as zt,X as Ds,Y as Ts,l as Gt,m as qt,R as Wt,n as Kt,o as Ht,p as Xt}from"./chart-iyOBgiH0.js";import{P as Jt}from"./pencil-9Th5X-OY.js";import{E as Qt}from"./index-CRLPoT61.js";import{A as Yt,a as Oe,b as Le,c as rs}from"./accordion-B8kebokE.js";import{B as Zt}from"./business-extended-info-DmQ7B7-Z.js";import{B as en}from"./building-2-3KauBrnS.js";import"./toggle-expansion-button-41Ejffq3.js";import"./panel-top-open-BFNhAe3f.js";import"./Table-CYqAEQfS.js";import"./summary-DuWhfNdL.js";import"./create-event-handler-BiA-1lGu.js";import"./list-plus-CGvSlslE.js";import"./sequential-CAnleQny.js";import"./similar-transactions-modal-nk8VHEtX.js";import"./addDays-DGlDD_vj.js";import"./tooltip-lhMCop8U.js";import"./download-csv-button-DZ5cKqkV.js";/**
|
|
2
2
|
* @license lucide-react v0.548.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/dist/assets/{business-extended-info-MUfOmQ_B.js → business-extended-info-DmQ7B7-Z.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as M,by as G,r as D,bA as J,ab as V,bC as H,j as e,cM as K,x as v,u as Q,dQ as Y,aN as o,c as q,T as W,B as X,bS as R,R as b,a$ as A,bl as Z}from"./index-
|
|
1
|
+
import{v as M,by as G,r as D,bA as J,ab as V,bC as H,j as e,cM as K,x as v,u as Q,dQ as Y,aN as o,c as q,T as W,B as X,bS as R,R as b,a$ as A,bl as Z}from"./index-B2_EbsaK.js";import{D as ee}from"./download-csv-button-DZ5cKqkV.js";import{T as ne}from"./Table-CYqAEQfS.js";/**
|
|
2
2
|
* @license lucide-react v0.548.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as l,j as e,av as t,x as m,bi as x}from"./index-
|
|
1
|
+
import{J as l,j as e,av as t,x as m,bi as x}from"./index-B2_EbsaK.js";import{B as o}from"./building-2-3KauBrnS.js";function h({data:n}){const s=l(x,n);if(!s||s.__typename!=="LtdFinancialEntity")return e.jsx("div",{});const{isActive:i,adminInfo:r,clientInfo:a}=s,d=!!r?.id,c=!!a?.id;return e.jsx("header",{className:"sticky top-0 z-50 w-full border-b border-border bg-card/95 backdrop-blur supports-[backdrop-filter]:bg-card/60",children:e.jsx("div",{className:"container mx-auto px-4 md:px-6 lg:px-8 max-w-7xl",children:e.jsxs("div",{className:"flex h-16 items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-accent",children:e.jsx(o,{className:"h-5 w-5 text-accent-foreground"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h1",{className:"text-lg font-semibold text-foreground",children:s.name}),i?e.jsx(t,{variant:"secondary",children:"Active"}):e.jsx(t,{variant:"destructive",children:"Inactive"}),d&&e.jsx(t,{variant:"outline",children:"Admin"}),c&&e.jsx(t,{variant:"outline",children:"Client"})]}),e.jsxs("p",{className:"text-sm text-muted-foreground truncate",children:["Business ID: ",s.id]})]})]}),e.jsxs("div",{className:"hidden md:flex items-center gap-6 text-sm",children:[s.governmentId&&e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-muted-foreground",children:"Tax ID"}),e.jsx("p",{className:"font-medium text-foreground",children:s.governmentId})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-muted-foreground",children:"Since"}),e.jsx("p",{className:"font-medium text-foreground",children:m(s.createdAt,"MMM yyyy")})]})]})]})})})}export{h as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,bm as y,j as e,bn as C,B as S,G as I,bo as F,a8 as B,bp as m,bq as v,br as j,x as f,bs as E,bt as N}from"./index-
|
|
1
|
+
import{r as p,bm as y,j as e,bn as C,B as S,G as I,bo as F,a8 as B,bp as m,bq as v,br as j,x as f,bs as E,bt as N}from"./index-B2_EbsaK.js";import{u as w}from"./use-url-query-BPzyQB93.js";import{P as T}from"./modal-B0uNLang.js";import{F as A}from"./funnel-BlaCusqP.js";import{M as D}from"./MultiSelect-CBtq6WUv.js";function L({filter:a,setFilter:b,closeModal:u,single:l=!1}){const{control:r,handleSubmit:g}=I({defaultValues:{...a}}),{selectableBusinesses:d,fetching:i}=F(),{userContext:x}=p.useContext(B),h=s=>{b(s),u()};function n(){b({businessIDs:l?a.businessIDs:void 0}),u()}return e.jsxs(e.Fragment,{children:[i?e.jsx("div",{children:"Loading..."}):e.jsx("div",{}),e.jsxs("form",{onSubmit:g(h),children:[e.jsx(m,{name:"ownerIds",control:r,defaultValue:a.ownerIds,render:({field:s,fieldState:o})=>e.jsx(D,{...s,data:d,value:s.value??(x?.context.adminBusinessId?[x.context.adminBusinessId]:void 0),disabled:i,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:o.error?.message})}),!l&&e.jsx(m,{name:"businessIDs",control:r,defaultValue:a.businessIDs,render:({field:s,fieldState:o})=>e.jsx(D,{...s,data:d,value:s.value??void 0,disabled:i,label:"Businesses",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:o.error?.message})}),e.jsx(m,{name:"fromDate",control:r,defaultValue:a.fromDate,rules:{pattern:{value:v,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:o})=>e.jsx(j,{...s,onChange:t=>{const c=t?typeof t=="string"?t:f(t,"yyyy-MM-dd"):void 0;c!==s.value&&s.onChange(c)},value:s.value?new Date(s.value):void 0,error:o.error?.message,label:"From Date",popoverProps:{withinPortal:!0}})}),e.jsx(m,{name:"toDate",control:r,defaultValue:a.toDate,rules:{pattern:{value:v,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:o})=>e.jsx(j,{...s,onChange:t=>{const c=t?typeof t=="string"?t:f(t,"yyyy-MM-dd"):void 0;c!==s.value&&s.onChange(c)},value:s.value?new Date(s.value):void 0,error:o.error?.message,label:"To Date",popoverProps:{withinPortal:!0}})}),e.jsx(m,{name:"type",control:r,defaultValue:null,render:({field:s,fieldState:o})=>e.jsx(E,{...s,onChange:t=>s.onChange(t==="NULL"?null:t),data:[{value:"NULL",label:"All"},{value:"BUSINESS",label:"Business"},{value:"TAX_CATEGORY",label:"Tax Category"}],error:o.error?.message,label:"Type"})}),e.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[e.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Filter"}),e.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-orange-600 rounded-sm text-lg",onClick:n,children:"Clear"}),e.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-rose-600 rounded-sm text-lg",onClick:u,children:"Cancel"})]})]})]})}function k({filter:a,setFilter:b}){const[u,l]=p.useState(!1),[r,g]=p.useState(!y(a)),{get:d,set:i}=w();function x(n){return Object.entries(n??{}).filter(([o,t])=>t!==void 0&&Array.isArray(t)&&t.length>0).length>0}function h(n){n.fromDate?.trim()===""&&(n.fromDate=void 0),n.toDate?.trim()===""&&(n.toDate=void 0),N(n,a)||(b(n),g(x(n)))}return p.useEffect(()=>{const n=y(a)?null:encodeURIComponent(JSON.stringify(a)),s=d("transactionsFilters");n!==s&&i("transactionsFilters",n)},[a,d,i]),e.jsxs(e.Fragment,{children:[e.jsx(T,{opened:u,onClose:()=>l(!1),content:e.jsx(L,{single:!0,filter:a,setFilter:h,closeModal:()=>l(!1)})}),e.jsx(C,{inline:!0,size:16,disabled:!r,children:e.jsx(S,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>l(!0),children:e.jsx(A,{className:"size-5"})})})]})}export{k as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w,r as c,F as g,u as C,j as a,c as x,aN as o,bk as y}from"./index-
|
|
1
|
+
import{a as w,r as c,F as g,u as C,j as a,c as x,aN as o,bk as y}from"./index-B2_EbsaK.js";import{u as T}from"./use-url-query-BPzyQB93.js";import{a as h}from"./accounter-table-CM6PQ9Aw.js";import{M as p,B as F}from"./business-extended-info-DmQ7B7-Z.js";import{B as v}from"./business-transactions-filters-D-Y8vZwZ.js";import"./Pagination-BM-86UO5.js";import"./create-event-handler-BiA-1lGu.js";import"./Table-CYqAEQfS.js";import"./download-csv-button-DZ5cKqkV.js";import"./modal-B0uNLang.js";import"./funnel-BlaCusqP.js";import"./MultiSelect-CBtq6WUv.js";const $=({businessId:t})=>{const{businessId:r}=w(),{get:s}=T(),{setFiltersContext:u}=c.useContext(g),m=t||r,[l,d]=c.useState(s("transactionsFilters")?{...JSON.parse(decodeURIComponent(s("transactionsFilters"))),businessIDs:m?[m]:[]}:{businessIDs:m?[m]:[]}),[{data:i,fetching:f}]=C({query:y,variables:{filters:l}});c.useEffect(()=>{u(a.jsx(v,{filter:l,setFilter:d}))},[i,l,u,d]);const b=c.useMemo(()=>i?.businessTransactionsSumFromLedgerRecords.__typename==="CommonError"?[]:i?.businessTransactionsSumFromLedgerRecords.businessTransactionsSum?i.businessTransactionsSumFromLedgerRecords.businessTransactionsSum.sort((e,S)=>e.business.name.localeCompare(S.business.name)):[],[i?.businessTransactionsSumFromLedgerRecords]);return f?a.jsx(x,{}):a.jsx(h,{moreInfo:e=>a.jsx(F,{businessID:e.business.id,filter:l}),striped:!0,highlightOnHover:!0,stickyHeader:!0,items:b,columns:[{title:"Business Name",value:e=>e.business.name},{title:"Debit",value:e=>e.debit.formatted,style:{whiteSpace:"nowrap"}},{title:"Credit",value:e=>e.credit.formatted,style:{whiteSpace:"nowrap"}},{title:"Total",value:e=>e.total.raw&&(e.total.raw<-1e-4||e.total.raw>1e-4)?a.jsx(p,{color:e.total.raw>0?"green":"red",children:e.total.formatted}):e.total.formatted,style:{whiteSpace:"nowrap"}},...n(o.Eur),...n(o.Usd),...n(o.Gbp),...n(o.Cad),...n(o.Jpy),...n(o.Aud),...n(o.Sek)]})};function n(t){return[{title:`${t} Debit`,value:r=>r.foreignCurrenciesSum.find(s=>s.currency===t)?.debit?.formatted,style:{whiteSpace:"nowrap"}},{title:`${t} Credit`,value:r=>r.foreignCurrenciesSum.find(s=>s.currency===t)?.credit?.formatted,style:{whiteSpace:"nowrap"}},{title:`${t} Total`,value:r=>{const s=r.foreignCurrenciesSum.find(u=>u.currency===t);return s?.total?.raw&&(s.total.raw<-1e-4||s.total.raw>1e-4)?a.jsx(p,{color:s.total.raw>0?"green":"red",children:s.total.formatted}):s?.total?.formatted},style:{whiteSpace:"nowrap"}}]}export{$ as BusinessTransactionsSingle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,r as n,F as u,u as m,j as s,c,bx as x}from"./index-
|
|
1
|
+
import{a as p,r as n,F as u,u as m,j as s,c,bx as x}from"./index-B2_EbsaK.js";import{P as d,C as l,E as b}from"./editable-business-trip-CRiuNdbP.js";import{P as f}from"./page-layout-C0GJoVTR.js";import"./list-plus-CGvSlslE.js";import"./summary-DuWhfNdL.js";import"./create-event-handler-BiA-1lGu.js";import"./Table-CYqAEQfS.js";import"./toggle-expansion-button-41Ejffq3.js";import"./panel-top-open-BFNhAe3f.js";import"./MultiSelect-CBtq6WUv.js";import"./similar-transactions-modal-nk8VHEtX.js";import"./tooltip-lhMCop8U.js";const L=({businessTripId:o})=>{const{businessTripId:a}=p(),{setFiltersContext:i}=n.useContext(u),e=o??a??"",[{data:r,fetching:t}]=m({query:x,variables:{businessTripId:e}});return n.useEffect(()=>{i(s.jsx("div",{className:"flex flex-row gap-x-5",children:s.jsx(d,{filename:"business_trip_report"})}))},[r,t,i]),t||!r?.businessTrip?s.jsx(c,{}):s.jsx(f,{title:`Business Trip: ${r.businessTrip.name}`,description:"Manage business trip",children:s.jsx(l,{className:"mt-5",children:e&&s.jsx(b,{tripId:e,isExtended:!0})})})};export{L as BusinessTrip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I,b as x,r as a,u as D,j as e,c as f,C as j}from"./index-
|
|
1
|
+
import{a as I,b as x,r as a,u as D,j as e,c as f,C as j}from"./index-B2_EbsaK.js";import{C as v}from"./charges-table-D_GDHvFS.js";import{E as M,I as E,M as S}from"./match-document-modal-DcL0siQq.js";import"./toggle-expansion-button-41Ejffq3.js";import"./panel-top-open-BFNhAe3f.js";import"./index-CRLPoT61.js";import"./similar-transactions-modal-nk8VHEtX.js";import"./addDays-DGlDD_vj.js";import"./list-plus-CGvSlslE.js";import"./tooltip-lhMCop8U.js";import"./Table-CYqAEQfS.js";import"./summary-DuWhfNdL.js";import"./create-event-handler-BiA-1lGu.js";import"./YearPickerInput-CgU-feeq.js";import"./insert-business-trip-modal-BwOnvw7X.js";import"./accounter-table-CM6PQ9Aw.js";import"./Pagination-BM-86UO5.js";import"./modal-B0uNLang.js";const J=({chargeId:u})=>{const{chargeId:g}=I(),r=u||g;let t;try{t=x()}catch{}const[o,i]=a.useState(void 0),[s,n]=a.useState(void 0),[c,d]=a.useState(void 0),[{data:p,fetching:l},m]=D({query:j,pause:!r||!!t,variables:{chargeId:r??""}});a.useEffect(()=>{r&&!t&&m()},[r,t,m]);const h=t||p,C=!t&&l;return r?e.jsxs(e.Fragment,{children:[C?e.jsx(f,{}):e.jsx(v,{setEditChargeId:i,setInsertDocument:n,setMatchDocuments:d,data:h?.charge?[h.charge]:[],isAllOpened:!0}),o&&e.jsx(M,{chargeId:o?.id,close:()=>i(void 0),onChange:o.onChange}),s&&e.jsx(E,{chargeId:s.id,onChange:s.onChange,close:()=>n(void 0)}),c&&e.jsx(S,{chargeId:c.id,ownerId:c.ownerId,setMatchDocuments:()=>d(void 0)})]}):e.jsx("div",{children:"Charge not found"})};export{J as Charge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,bm as B,bt as R,j as e,bn as W,B as z,a8 as G,G as U,x as N,aa as D,cO as _,ak as q,V as X,cP as J,bp as h,ea as Q,bq as M,br as O,bs as L,e1 as A,ah as m,h4 as Y,b8 as Z,X as x,Y as p,Z as j,_ as g,dd as K,de as $,df as ee}from"./index-
|
|
1
|
+
import{r as i,bm as B,bt as R,j as e,bn as W,B as z,a8 as G,G as U,x as N,aa as D,cO as _,ak as q,V as X,cP as J,bp as h,ea as Q,bq as M,br as O,bs as L,e1 as A,ah as m,h4 as Y,b8 as Z,X as x,Y as p,Z as j,_ as g,dd as K,de as $,df as ee}from"./index-B2_EbsaK.js";import{u as se}from"./use-url-query-BPzyQB93.js";import{P as ae}from"./modal-B0uNLang.js";import{P as te}from"./Pagination-BM-86UO5.js";import{F as ne}from"./funnel-BlaCusqP.js";import{s as oe}from"./sub-fkVv9ghZ.js";import{M as k}from"./MultiSelect-CBtq6WUv.js";function re(a){return!a||B(a)?null:encodeURIComponent(JSON.stringify(a))}const le=[{value:D.AbsAmount,label:"Abs Amount"},{value:D.Amount,label:"Amount"},{value:D.Date,label:"Date"}],ce=[{label:"All",value:A.All},{label:"Income",value:A.Income},{label:"Expense",value:A.Expense}];function ie({filter:a,setFilter:w,closeModal:d}){const{userContext:b}=i.useContext(G),o=U({defaultValues:{byOwners:b?.context.adminBusinessId?[b.context.adminBusinessId]:void 0,sortBy:{field:D.Date,asc:!1},toAnyDate:N(new Date,"yyyy-MM-dd"),fromAnyDate:N(oe(new Date,{years:1}),"yyyy-MM-dd"),...a}}),{control:l,handleSubmit:T,watch:C}=o,[y,F]=i.useState(a.sortBy?.asc??!1),[c,u]=i.useState(!!a.sortBy?.field),{selectableFinancialEntities:S,fetching:t}=_(),{selectableTags:v,fetching:I}=q(),E=C("sortBy.field");i.useEffect(()=>{E&&!c?u(!0):!E&&c&&u(!1)},[E,c]);const V=s=>{y!=null&&s.sortBy?.field&&(s.sortBy.asc=y),w(s),d()};function H(){w({}),F(!1),d()}return e.jsxs(e.Fragment,{children:[t?e.jsx("div",{children:"Loading..."}):e.jsx("div",{}),e.jsx(X,{...o,children:e.jsxs("form",{onSubmit:T(V),children:[e.jsxs(J,{cols:2,children:[e.jsx(h,{name:"byOwners",control:l,defaultValue:a.byOwners,render:({field:s,fieldState:n})=>e.jsx(k,{...s,data:S,value:s.value??[],disabled:t,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:n.error?.message,withinPortal:!0})}),e.jsx(h,{name:"byBusinesses",control:l,defaultValue:a.byBusinesses,render:({field:s,fieldState:n})=>e.jsx(k,{...s,data:S,value:s.value??[],disabled:t,label:"Financial Entities",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:n.error?.message,withinPortal:!0})}),e.jsx(h,{name:"byTags",control:l,defaultValue:a.byTags,render:({field:s,fieldState:n})=>e.jsx(k,{...s,data:v,itemComponent:Q,value:s.value??[],disabled:I,label:"Tags",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:n.error?.message,withinPortal:!0,filter:(r,f,P)=>P.label?.toLowerCase().includes(r.toLowerCase().trim())||P.description?.toLowerCase().includes(r.toLowerCase().trim())})}),e.jsx(h,{name:"fromAnyDate",control:l,defaultValue:a.fromAnyDate,rules:{pattern:{value:M,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:n})=>e.jsx(O,{...s,onChange:r=>{const f=r?typeof r=="string"?r:N(r,"yyyy-MM-dd"):void 0;f!==s.value&&s.onChange(f)},value:s.value?new Date(s.value):void 0,error:n.error?.message,label:"From Date",popoverProps:{withinPortal:!0}})}),e.jsx(h,{name:"toAnyDate",control:l,defaultValue:a.toAnyDate,rules:{pattern:{value:M,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:n})=>e.jsx(O,{...s,onChange:r=>{const f=r?typeof r=="string"?r:N(r,"yyyy-MM-dd"):void 0;f!==s.value&&s.onChange(f)},value:s.value?new Date(s.value):void 0,error:n.error?.message,label:"To Date",popoverProps:{withinPortal:!0}})}),e.jsx(h,{name:"chargesType",control:l,defaultValue:a.chargesType,render:({field:s,fieldState:n})=>e.jsx(L,{...s,data:ce,value:s.value??A.All,disabled:t,label:"Charge Type",placeholder:"Filter income/expense",maxDropdownHeight:160,error:n.error?.message,withinPortal:!0})}),e.jsx(h,{name:"sortBy.field",control:l,defaultValue:a.sortBy?.field??D.Date,render:({field:s,fieldState:n})=>e.jsx(L,{...s,data:le,label:"Field to sort by",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:n.error?.message,rightSectionProps:{style:{width:"5rem"}},withinPortal:!0,rightSection:e.jsxs("div",{className:"flex flex-row items-center gap-1",children:[e.jsx(m,{defaultChecked:a.sortBy?.asc??!1,checked:y??!1,disabled:!c,onCheckedChange:F}),e.jsx("span",{className:"text-xs",children:y?"ASC":"DESC"})]})})}),e.jsx(h,{name:"accountantStatus",control:l,defaultValue:a.accountantStatus,render:({field:s,fieldState:n})=>e.jsx(k,{...s,value:s.value??[],data:Y,disabled:t,label:"Accountant Status",placeholder:"All",maxDropdownHeight:160,error:n.error?.message,withinPortal:!0})}),e.jsxs("div",{className:"flex flex-col gap-2 mt-4 rounded-lg border p-3 shadow-sm space-y-2",children:[e.jsx(Z,{children:"Missing Information:"}),e.jsx(x,{control:o.control,name:"withoutInvoice",render:({field:s})=>e.jsxs(p,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(j,{children:"Without Invoice"})}),e.jsx(g,{children:e.jsx(m,{defaultChecked:a.withoutInvoice??!1,onCheckedChange:s.onChange})})]})}),e.jsx(x,{control:o.control,name:"withoutReceipt",render:({field:s})=>e.jsxs(p,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(j,{children:"Without Receipts"})}),e.jsx(g,{children:e.jsx(m,{defaultChecked:a.withoutReceipt??!1,onCheckedChange:s.onChange})})]})}),e.jsx(x,{control:o.control,name:"withoutDocuments",render:({field:s})=>e.jsxs(p,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(j,{children:"Without Documents"})}),e.jsx(g,{children:e.jsx(m,{defaultChecked:a.withoutDocuments??!1,onCheckedChange:s.onChange})})]})}),e.jsx(x,{control:o.control,name:"withOpenDocuments",render:({field:s})=>e.jsxs(p,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(j,{children:"With Open Documents"})}),e.jsx(g,{children:e.jsxs(K,{children:[e.jsx($,{children:e.jsx(m,{defaultChecked:a.withOpenDocuments??!1,onCheckedChange:s.onChange})}),e.jsx(ee,{children:e.jsx("p",{children:"Show only charges with documents that are currently open"})})]})})]})}),e.jsx(x,{control:o.control,name:"withoutTransactions",render:({field:s})=>e.jsxs(p,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(j,{children:"Without Transactions"})}),e.jsx(g,{children:e.jsx(m,{defaultChecked:a.withoutTransactions??!1,onCheckedChange:s.onChange})})]})}),e.jsx(x,{control:o.control,name:"unbalanced",render:({field:s})=>e.jsxs(p,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(j,{children:"Unbalanced businesses"})}),e.jsx(g,{children:e.jsx(m,{defaultChecked:a.unbalanced??!1,onCheckedChange:s.onChange})})]})}),e.jsx(x,{control:o.control,name:"withoutLedger",render:({field:s})=>e.jsxs(p,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(j,{children:"Without ledger"})}),e.jsx(g,{children:e.jsx(m,{defaultChecked:a.withoutLedger??!1,onCheckedChange:s.onChange})})]})})]})]}),e.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[e.jsx("button",{type:"submit",disabled:t||I,className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Filter"}),e.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-orange-600 rounded-sm text-lg",onClick:H,children:"Clear"}),e.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-rose-600 rounded-sm text-lg",onClick:d,children:"Cancel"})]})]})})]})}function ge({filter:a={},setFilter:w,activePage:d,setPage:b,totalPages:o=1,initiallyOpened:l=!1}){const[T,C]=i.useState(l),[y,F]=i.useState(!B(a)),{get:c,set:u}=se();i.useEffect(()=>{const t=d>1?d.toFixed(0):null,v=c("page");t!==v&&u("page",t)},[d,c,u]),i.useEffect(()=>{const t=re(a),v=c("chargesFilters");t!==v&&(u("chargesFilters",t),u("page"),b(1))},[a,c,u,b]);const S=i.useCallback(t=>{R(t,a)||(w(t),F(!B(t)))},[a,w]);return e.jsxs("div",{className:"flex flex-row gap-5 items-center",children:[e.jsx(ae,{opened:T,onClose:()=>C(!1),content:e.jsx(ie,{filter:a,setFilter:S,closeModal:()=>C(!1)}),modalSize:"xl"}),o>1&&e.jsx(te,{className:"flex-auto",value:d,onChange:b,total:o}),e.jsx(W,{inline:!0,size:16,disabled:!y,children:e.jsx(z,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>C(!0),children:e.jsx(ne,{className:"size-5"})})})]})}export{ge as C,ce as c};
|
package/dist/assets/{charges-ledger-validation-CoHDjCf2.js → charges-ledger-validation-OPtbHzXu.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,F as D,u as E,j as e,T as N,B as w,L as T,d as b,e as z,f as W}from"./index-
|
|
1
|
+
import{r as t,F as D,u as E,j as e,T as N,B as w,L as T,d as b,e as z,f as W}from"./index-B2_EbsaK.js";import{u as O}from"./use-url-query-BPzyQB93.js";import{C as k}from"./charges-filters-BUFmsiTq.js";import{C as B,T as R}from"./charges-table-D_GDHvFS.js";import{M as V}from"./index-EaY6ZYvr.js";import{E as A,I as Q,M as U}from"./match-document-modal-DcL0siQq.js";import{P as q}from"./page-layout-C0GJoVTR.js";import{P as J}from"./Progress-Bda-J3ZH.js";import{P as $,a as G}from"./panel-top-open-BFNhAe3f.js";import"./modal-B0uNLang.js";import"./Pagination-BM-86UO5.js";import"./create-event-handler-BiA-1lGu.js";import"./funnel-BlaCusqP.js";import"./sub-fkVv9ghZ.js";import"./addDays-DGlDD_vj.js";import"./subMonths-5wFmciT1.js";import"./MultiSelect-CBtq6WUv.js";import"./toggle-expansion-button-41Ejffq3.js";import"./index-CRLPoT61.js";import"./similar-transactions-modal-nk8VHEtX.js";import"./list-plus-CGvSlslE.js";import"./tooltip-lhMCop8U.js";import"./Table-CYqAEQfS.js";import"./summary-DuWhfNdL.js";import"./Checkbox-Ddw01d64.js";import"./YearPickerInput-CgU-feeq.js";import"./insert-business-trip-modal-BwOnvw7X.js";import"./accounter-table-CM6PQ9Aw.js";const Le=()=>{const{setFiltersContext:p}=t.useContext(D),[n,u]=t.useState(void 0),[l,x]=t.useState(void 0),[c,C]=t.useState(void 0),[g,f]=t.useState(!1),[r,m]=t.useState([]),{get:F}=O(),d=F("chargesFilters"),I=t.useMemo(()=>{if(d)try{return JSON.parse(decodeURIComponent(d))}catch{return}},[d]),[o,j]=t.useState(I),S=t.useCallback((s,y)=>{r.map(h=>h.id).includes(s)?m(r.filter(h=>h.id!==s)):m([...r,{id:s,onChange:y}])},[r]),[{data:a,fetching:M},v]=E({query:W,variables:{filters:o},pause:!0});function P(){m([])}const i=t.useMemo(()=>a?.chargesWithLedgerChanges?.length?a.chargesWithLedgerChanges[a.chargesWithLedgerChanges.length-1].progress:0,[a?.chargesWithLedgerChanges]),L=t.useCallback(s=>{j(s)},[j]);return t.useEffect(()=>{o&&v()},[o,v]),t.useEffect(()=>{p(e.jsxs("div",{className:"flex flex-row gap-x-5 items-center",children:[e.jsx(J,{value:i,label:`${i?.toFixed(2)}%`,size:"xl",animate:i<100,className:"min-w-52"}),e.jsx(k,{filter:o,setFilter:L,activePage:1,setPage:()=>{},initiallyOpened:!0}),e.jsx(N,{label:"Expand all accounts",children:e.jsx(w,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>f(s=>!s),children:g?e.jsx($,{className:"size-5"}):e.jsx(G,{className:"size-5"})})}),e.jsx(V,{selected:r,resetMerge:P})]}))},[a,M,o,g,p,f,r,i,L]),e.jsxs(q,{title:"Charges Ledger Validation",description:"Manage charges",children:[M?e.jsx(T,{className:"h-10 w-10 animate-spin mr-2 self-center"}):e.jsxs(e.Fragment,{children:[e.jsx(B,{setEditChargeId:u,setInsertDocument:x,setMatchDocuments:C,toggleMergeCharge:S,mergeSelectedCharges:new Set(r.map(s=>s.id)),data:a?.chargesWithLedgerChanges.filter(s=>!!s.charge).map(s=>s.charge)??[],isAllOpened:g}),e.jsxs("div",{className:"flex flex-row justify-center my-2",children:[i>0&&i<100&&e.jsx(b,{}),i===100&&!a?.chargesWithLedgerChanges.filter(s=>!!s.charge).length&&e.jsx(R,{radius:"xl",size:"xl",color:"green",children:e.jsx(z,{})})]})]}),n&&e.jsx(A,{chargeId:n?.id,close:()=>u(void 0),onChange:n.onChange}),l&&e.jsx(Q,{chargeId:l.id,onChange:l.onChange,close:()=>x(void 0)}),c&&e.jsx(U,{chargeId:c.id,ownerId:c.ownerId,setMatchDocuments:()=>C(void 0)})]})};export{Le as ChargesLedgerValidation};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as Oe,j as r,eo as yo,ep as vo,eq as jo,aC as bo,by as Ve,bB as $,bz as we,er as Co,r as g,bA as Ue,ab as T,bC as Ke,es as Lr,et as Do,eu as So,ei as wo,ev as _o,ej as Wt,bj as Qe,ew as Br,ex as Io,d as jt,bL as Vr,J as K,ey as Eo,g as Pe,ez as Oo,t as F,i as Ae,eA as Po,bQ as Gt,T as Le,B as Q,m as Ur,eB as Ao,eC as To,G as xn,V as No,eD as $o,eE as Fo,eF as nt,eG as rt,eH as Mn,eI as zn,dv as ko,eJ as Kr,eK as Ro,l as gt,eL as Mo,eM as zo,D as yn,aO as Lo,bU as Hr,z as vn,eN as Bo,eO as Vo,cQ as Gr,d3 as qr,d5 as Wr,aP as Uo,aQ as Ko,K as Yr,cT as jn,cU as bn,cV as Ye,cW as Ne,cX as Pt,cY as Cn,cZ as Ie,p as Ln,x as Be,u as Xe,eP as Ho,E as Go,c as qo,eQ as Wo,dT as Yo,eR as Qo,bn as Re,eS as Jo,bS as At,R as mt,eT as Qr,eU as Jr,eV as ze,eW as Xo,eX as Xr,eY as Zo,eZ as ea,e_ as Zr,e$ as an,f0 as es,f1 as ta,f2 as na,aN as Dn,f3 as ra,au as ts,f4 as ns,n as ft,bp as $e,bq as rs,br as ss,bK as os,bs as Tt,f5 as sa,f6 as oa,bR as Sn,e as aa,f7 as ia,a5 as ca,f8 as la,L as as,f9 as da,fa as ua,cR as fa,fb as cn,fc as is,fd as cs,fe as pa,ff as Yt,fg as Bn,fh as ls,cS as ga,fi as ma,dm as De,dn as Se,av as ds,fj as us,e6 as ha,dU as fs,fk as ps,fl as gs,fm as xa,cM as tt,fn as ms,fo as ya,fp as hs,W as va,P as ja,fq as xs,fr as ba,fs as ys,ft as vs,fu as _e,fv as je,fw as Vn,fx as Ca,fy as Da,fz as qe,fA as Sa,fB as wa,fC as _a}from"./index-
|
|
1
|
+
import{v as Oe,j as r,eo as yo,ep as vo,eq as jo,aC as bo,by as Ve,bB as $,bz as we,er as Co,r as g,bA as Ue,ab as T,bC as Ke,es as Lr,et as Do,eu as So,ei as wo,ev as _o,ej as Wt,bj as Qe,ew as Br,ex as Io,d as jt,bL as Vr,J as K,ey as Eo,g as Pe,ez as Oo,t as F,i as Ae,eA as Po,bQ as Gt,T as Le,B as Q,m as Ur,eB as Ao,eC as To,G as xn,V as No,eD as $o,eE as Fo,eF as nt,eG as rt,eH as Mn,eI as zn,dv as ko,eJ as Kr,eK as Ro,l as gt,eL as Mo,eM as zo,D as yn,aO as Lo,bU as Hr,z as vn,eN as Bo,eO as Vo,cQ as Gr,d3 as qr,d5 as Wr,aP as Uo,aQ as Ko,K as Yr,cT as jn,cU as bn,cV as Ye,cW as Ne,cX as Pt,cY as Cn,cZ as Ie,p as Ln,x as Be,u as Xe,eP as Ho,E as Go,c as qo,eQ as Wo,dT as Yo,eR as Qo,bn as Re,eS as Jo,bS as At,R as mt,eT as Qr,eU as Jr,eV as ze,eW as Xo,eX as Xr,eY as Zo,eZ as ea,e_ as Zr,e$ as an,f0 as es,f1 as ta,f2 as na,aN as Dn,f3 as ra,au as ts,f4 as ns,n as ft,bp as $e,bq as rs,br as ss,bK as os,bs as Tt,f5 as sa,f6 as oa,bR as Sn,e as aa,f7 as ia,a5 as ca,f8 as la,L as as,f9 as da,fa as ua,cR as fa,fb as cn,fc as is,fd as cs,fe as pa,ff as Yt,fg as Bn,fh as ls,cS as ga,fi as ma,dm as De,dn as Se,av as ds,fj as us,e6 as ha,dU as fs,fk as ps,fl as gs,fm as xa,cM as tt,fn as ms,fo as ya,fp as hs,W as va,P as ja,fq as xs,fr as ba,fs as ys,ft as vs,fu as _e,fv as je,fw as Vn,fx as Ca,fy as Da,fz as qe,fA as Sa,fB as wa,fC as _a}from"./index-B2_EbsaK.js";import{T as Ia}from"./toggle-expansion-button-41Ejffq3.js";import{M as Ea,P as W,I as Oa,T as js,a as Pa,D as Aa,A as Ta,b as Na,c as $a,S as Fa,C as ka,d as Ra}from"./index-CRLPoT61.js";import{T as bs}from"./Table-CYqAEQfS.js";import{R as Ma,S as za,M as oe,B as La,L as Un,G as Qt,C as Kn,A as V,a as Ba}from"./summary-DuWhfNdL.js";import{L as Jt}from"./list-plus-CGvSlslE.js";/**
|
|
2
2
|
* @license lucide-react v0.548.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|