@accounter/client 0.0.8-alpha-20251030162303-87017b2c2addf0e61478260aac336b9343f15c98 → 0.0.8-alpha-20251030164843-d2f490daba879840366288d1f62974ab25081876
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 +27 -1
- package/dist/assets/{Checkbox-CLE7WylX.js → Checkbox-dSmM5Kto.js} +1 -1
- package/dist/assets/{MultiSelect-SsgUtHuW.js → MultiSelect-BKzjkxRf.js} +1 -1
- package/dist/assets/{Progress-D7j8SJRp.js → Progress-CaCuNARE.js} +1 -1
- package/dist/assets/{Table-DpZKU9e6.js → Table-DxJ1YCr5.js} +1 -1
- package/dist/assets/{Typography-DOCvIzjw.js → Typography-rzf7AKzm.js} +1 -1
- package/dist/assets/{YearPickerInput-BbyQMsmW.js → YearPickerInput-Bp2ytdrx.js} +1 -1
- package/dist/assets/{accordion-KRd9M_7N.js → accordion-B83CGJPM.js} +1 -1
- package/dist/assets/{accountant-approvals-BWkXiUJx.js → accountant-approvals-DRr7UYE4.js} +1 -1
- package/dist/assets/{accounter-table-BvOYdMv2.js → accounter-table-CLZmYCK0.js} +1 -1
- package/dist/assets/{addDays-HTdY9JyJ.js → addDays-DbkSn4rN.js} +1 -1
- package/dist/assets/{all-charges-uOrXkSoe.js → all-charges-Cn0oGAAS.js} +1 -1
- package/dist/assets/{arrow-up-down-D0e6luFS.js → arrow-up-down-kJRuABuk.js} +1 -1
- package/dist/assets/{building-2-BScQAy2y.js → building-2-DAb5H_9e.js} +1 -1
- package/dist/assets/{business-qHY5sNtm.js → business-DeId1elJ.js} +1 -1
- package/dist/assets/{business-extended-info-BPdDug4k.js → business-extended-info-u-wZchjH.js} +1 -1
- package/dist/assets/{business-header-ScM944FH.js → business-header-vz6RQ5nZ.js} +1 -1
- package/dist/assets/{business-ledger-filters-C6zdPVNQ.js → business-ledger-filters-DyyAMsOt.js} +1 -1
- package/dist/assets/{business-ledger-single-D_gxQY7c.js → business-ledger-single-Cy7nqs_T.js} +1 -1
- package/dist/assets/{business-trip-BD6qMULS.js → business-trip-CA4-OIFH.js} +1 -1
- package/dist/assets/{charge-CXgCTI2e.js → charge-DkSqluIG.js} +1 -1
- package/dist/assets/{charges-filters-DhYogrgu.js → charges-filters-Djo_kWBf.js} +1 -1
- package/dist/assets/{charges-ledger-validation-K96Gpr99.js → charges-ledger-validation-DvCBQB1e.js} +1 -1
- package/dist/assets/{charges-table-Cff0tibm.js → charges-table-D1vDT-UP.js} +1 -1
- package/dist/assets/{chart-Rag7RVt5.js → chart-BMSKXrwP.js} +1 -1
- package/dist/assets/contracts-ZJWgQOle.js +16 -0
- package/dist/assets/{data-table-pagination-BenxjRXY.js → data-table-pagination-BUpZwYMw.js} +1 -1
- package/dist/assets/{download-csv-button-8ow10rSS.js → download-csv-button-tWswwko2.js} +1 -1
- package/dist/assets/{edit-issue-document-modal-2d_PTbvO.js → edit-issue-document-modal-CHR5idQt.js} +1 -1
- package/dist/assets/{editable-business-trip-BFJ_Mqji.js → editable-business-trip-D0UrHlFI.js} +1 -1
- package/dist/assets/{eye-off-BNMLF-BO.js → eye-off-CGW7uC-c.js} +1 -1
- package/dist/assets/{funnel-DW3_rS_8.js → funnel-Bmrsutts.js} +1 -1
- package/dist/assets/{index-BCiHeRl-.js → index-2vL0dn5v.js} +1 -1
- package/dist/assets/{index-BHA96r33.js → index-B5HkjHjI.js} +1 -1
- package/dist/assets/{index-Bd-SKdyy.js → index-BZ8AOwEl.js} +3 -3
- package/dist/assets/{index-CKNxDyu9.js → index-Babx_Mc7.js} +1 -1
- package/dist/assets/{index-DyLWk3js.js → index-BnhjaCUg.js} +1 -1
- package/dist/assets/{index-lMXNkFuw.js → index-Br0GTPfc.js} +1 -1
- package/dist/assets/{index-4ufIi3AX.js → index-C-VKA9Ok.js} +1 -1
- package/dist/assets/{index-DvvRs9Ha.js → index-C7cxxohd.js} +1 -1
- package/dist/assets/{index-Bo2SK7RM.js → index-CUveXkuD.js} +1 -1
- package/dist/assets/{index-B2VI47XT.js → index-CYX2yO-u.js} +1 -1
- package/dist/assets/{index-B0Je179L.js → index-D1DOb6_Y.js} +1 -1
- package/dist/assets/{index-q3ev6JER.js → index-D7_jh5GD.js} +1 -1
- package/dist/assets/{index-Dp9F68vS.js → index-DSuF8jdU.js} +1 -1
- package/dist/assets/{index-BPS5RB7_.js → index-DTcOeWYo.js} +1 -1
- package/dist/assets/{index-CqIav7Xr.js → index-Dh1--D4F.js} +1 -1
- package/dist/assets/{index-VD71ra9C.js → index-Dkpu6Zhk.js} +1 -1
- package/dist/assets/{index-NdA_oCxx.js → index-DyH8FMHQ.js} +1 -1
- package/dist/assets/{index-BZLSFBEt.js → index-HH5Rxplr.js} +1 -1
- package/dist/assets/{index-BQyZXdTq.js → index-KBivZEq1.js} +1 -1
- package/dist/assets/{index-2unHvdGT.js → index-NS4xXWXV.js} +1 -1
- package/dist/assets/{index-BDUyPP2c.js → index-cC755YI-.js} +1 -1
- package/dist/assets/{index-CEiIgRJ2.js → index-dSI-XOHn.js} +1 -1
- package/dist/assets/{index-B86FoQmY.js → index-h3vstU9e.js} +1 -1
- package/dist/assets/{index-1iKxq5ag.js → index-tBA1vG1Y.js} +1 -1
- package/dist/assets/{index-Bp6IHcih.js → index-tMg1Ls6M.js} +1 -1
- package/dist/assets/{index.es-C9I2aTP4.js → index.es-DNpMwt0n.js} +1 -1
- package/dist/assets/{insert-business-trip-modal-DVcWpJHr.js → insert-business-trip-modal-4vXkqVnt.js} +1 -1
- package/dist/assets/issue-document-BoFHPotT.js +1 -0
- package/dist/assets/{list-plus-B7wBrICK.js → list-plus-CDqpqAwS.js} +1 -1
- package/dist/assets/{login-page-BpgscuKm.js → login-page-Bi8pRR_Y.js} +1 -1
- package/dist/assets/{match-document-modal-CqP2SE2c.js → match-document-modal-CETycNjj.js} +1 -1
- package/dist/assets/{missing-info-charges-CIs_kE3P.js → missing-info-charges-BPeEhfPv.js} +1 -1
- package/dist/assets/{modal-CwuHXtxz.js → modal-8mlzJehM.js} +1 -1
- package/dist/assets/modify-contract-dialog-DWLEVQ1d.js +1 -0
- package/dist/assets/{page-layout-XgNPsCmr.js → page-layout-BfCdWwql.js} +1 -1
- package/dist/assets/{page-not-found-CrFJMQNO.js → page-not-found-DukC1kEI.js} +1 -1
- package/dist/assets/{panel-top-open-DU7alj-S.js → panel-top-open-CpMFDJrl.js} +1 -1
- package/dist/assets/{pencil-9DTTP5vx.js → pencil-R8t4mFRO.js} +1 -1
- package/dist/assets/{report-commentary-row-BdS3qqMS.js → report-commentary-row-Byk41KMN.js} +1 -1
- package/dist/assets/{save-i8sPy_OW.js → save-BjBw7mG5.js} +1 -1
- package/dist/assets/{similar-transactions-modal-CZAOYt-d.js → similar-transactions-modal-BPFaQ7dD.js} +1 -1
- package/dist/assets/{sub-BL9nfaPD.js → sub-dol6DnIB.js} +1 -1
- package/dist/assets/subMonths-Cu51bw_I.js +1 -0
- package/dist/assets/{summary-Dfiju7xJ.js → summary-Sj8NMKlv.js} +1 -1
- package/dist/assets/{toggle-expansion-button-BbVh8z6s.js → toggle-expansion-button-Buzq87-g.js} +1 -1
- package/dist/assets/tooltip-gvPoRI4e.js +1 -0
- package/dist/assets/{use-url-query-5TFyEk1x.js → use-url-query-DOEL3cY1.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/components/clients/contracts/modify-contract-dialog.tsx +1 -7
- package/src/components/contracts/cells/date.tsx +5 -1
- package/src/components/contracts/columns.tsx +1 -1
- package/src/components/contracts/contracts-filter.tsx +8 -9
- package/src/components/contracts/index.tsx +0 -1
- package/src/components/contracts/issue-documents-modal.tsx +5 -3
- package/src/components/screens/businesses/clients/contracts/contracts.tsx +2 -4
- package/dist/assets/contracts-C26gq1yS.js +0 -16
- package/dist/assets/issue-document-BxTTlJ1T.js +0 -1
- package/dist/assets/modify-contract-dialog-BoeamC68.js +0 -1
- package/dist/assets/subMonths-DHPWOZP6.js +0 -1
- package/dist/assets/tooltip-C-fd9L1l.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @accounter/client
|
|
2
2
|
|
|
3
|
-
## 0.0.8-alpha-
|
|
3
|
+
## 0.0.8-alpha-20251030164843-d2f490daba879840366288d1f62974ab25081876
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -145,6 +145,13 @@
|
|
|
145
145
|
[`lucide-react@0.548.0` ↗︎](https://www.npmjs.com/package/lucide-react/v/0.548.0) (from
|
|
146
146
|
`0.547.0`, in `dependencies`)
|
|
147
147
|
|
|
148
|
+
- [#2646](https://github.com/Urigo/accounter-fullstack/pull/2646)
|
|
149
|
+
[`3266908`](https://github.com/Urigo/accounter-fullstack/commit/3266908bd76d58229510147d03f2dd137172abca)
|
|
150
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - dependencies updates:
|
|
151
|
+
- Updated dependency
|
|
152
|
+
[`react-router-dom@7.9.5` ↗︎](https://www.npmjs.com/package/react-router-dom/v/7.9.5) (from
|
|
153
|
+
`7.9.4`, in `dependencies`)
|
|
154
|
+
|
|
148
155
|
- [#2631](https://github.com/Urigo/accounter-fullstack/pull/2631)
|
|
149
156
|
[`86c8b3e`](https://github.com/Urigo/accounter-fullstack/commit/86c8b3ebea4e3be0c0e99a108ec1cdad8b39e5d8)
|
|
150
157
|
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **Database Schema Update**: A new
|
|
@@ -339,6 +346,25 @@
|
|
|
339
346
|
support fetching ledger records and transactions specifically by financial entity, catering to
|
|
340
347
|
the new UI structure.
|
|
341
348
|
|
|
349
|
+
- [#2646](https://github.com/Urigo/accounter-fullstack/pull/2646)
|
|
350
|
+
[`ea9fe94`](https://github.com/Urigo/accounter-fullstack/commit/ea9fe94330f6315a71eb09553473ec0d576151f2)
|
|
351
|
+
Thanks [@gilgardosh](https://github.com/gilgardosh)! - - **New Contracts Screen**: A dedicated
|
|
352
|
+
user interface has been introduced for viewing and managing client contracts, accessible via a new
|
|
353
|
+
sidebar link.
|
|
354
|
+
- **Enhanced Contract Management**: The new screen features a comprehensive data table for
|
|
355
|
+
contracts, offering functionalities like sorting, filtering by various criteria (product type,
|
|
356
|
+
billing cycle, subscription plan, active status), column visibility toggling, and pagination.
|
|
357
|
+
- **Contract Editing Functionality**: Users can now edit existing contracts directly from the
|
|
358
|
+
contracts table through a modified dialog that fetches and pre-fills contract details for a
|
|
359
|
+
seamless editing experience.
|
|
360
|
+
- **Bulk Document Issuance**: A new modal allows users to select multiple contracts and generate
|
|
361
|
+
document drafts for a specified month, streamlining the process of creating invoices or other
|
|
362
|
+
contract-related documents.
|
|
363
|
+
- **Backend API and Caching Improvements**: New GraphQL queries and resolvers have been added to
|
|
364
|
+
support fetching contracts by administrator ID and individual contract details. The backend also
|
|
365
|
+
includes refined cache invalidation logic for contract operations, ensuring data consistency and
|
|
366
|
+
improved performance.
|
|
367
|
+
|
|
342
368
|
## 0.0.7
|
|
343
369
|
|
|
344
370
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as fr,r as w,c7 as Q,ep as ur,aa as t,eq as R,c5 as X,c6 as D,c8 as n,er as I,c9 as z,es as vr,et as _r,eu as yr}from"./index-
|
|
1
|
+
import{v as fr,r as w,c7 as Q,ep as ur,aa as t,eq as R,c5 as X,c6 as D,c8 as n,er as I,c9 as z,es as vr,et as _r,eu as yr}from"./index-BZ8AOwEl.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{c5 as Ee,c8 as f,c6 as _,aa as p,eC as Lr,ht as be,r as E,c7 as jr,eD as Fr,hu as Hr,eu as Wr,et as Ar,ep as _e,hv as Kr,hw as Ur,fP as ae,eq as Oe,hx as te,hy as qr,eA as Tr,hz as Zr,hA as Gr}from"./index-Bd-SKdyy.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:y})=>({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]:y==="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:y,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:H,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(H.defaultValue,y)},Q),p.createElement("span",{className:H.defaultValueLabel},a),!I&&!s&&p.createElement(Lr,{"aria-hidden":!0,onMouseDown:N,size:ra[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:H.defaultValueRemove,tabIndex:-1,unstyled:K}))}ze.displayName="@mantine/core/MultiSelect/DefaultValue";function aa({data:e,searchable:r,limit:a,searchValue:n,filter:v,value:y,disableSelectedItemFiltering:N}){if(!r&&y.length===0)return e;if(!r){const s=[];for(let u=0;u<e.length;u+=1)(N||!y.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&&y.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:be})} - ${f(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:_({size:a,sizes:be})}},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,F=(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:Hr,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:Fr("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},wa=E.forwardRef((e,r)=>{const a=jr("MultiSelect",va,e),{className:n,style:v,required:y,label:N,description:I,size:s,error:u,classNames:h,styles:O,wrapperProps:K,value:Q,defaultValue:H,data:M,onChange:Be,valueComponent:Le,itemComponent:je,id:Fe,transitionProps:He,maxDropdownHeight:We,shadow:ya,nothingFound:ne,onFocus:le,onBlur:oe,searchable:S,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:wr,readOnly:V,withAsterisk:yr,clearButtonProps:Sr,hoverOnSearchChange:fe,disableSelectedItemFiltering:br}=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({}),L=Ar(Fe),[d,c]=E.useState(Je),[Ir,D]=E.useState(-1),[ge,Cr]=E.useState("column"),[b,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}),we=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,j]=_e({value:ke(Q,M),defaultValue:ke(H,M),finalValue:[],onChange:Be}),w=E.useRef(!!g&&g<o.length),ye=t=>{if(!V){const l=o.filter(m=>m!==t);j(l),g&&l.length<g&&(w.current=!1)}},Vr=t=>{U(t.currentTarget.value),!P&&!w.current&&S&&c(!0)},$r=t=>{typeof le=="function"&&le(t),!P&&!w.current&&S&&c(!0)},i=aa({data:re,searchable:S,searchValue:b,limit:Ue,filter:Ke,value:o,disableSelectedItemFiltering:br});we&&er(b,re)&&(ee=ue(b),i.push({label:b,value:b,creatable:!0}));const $=Math.min(Ir,i.length-1),Se=(t,l,m)=>{let k=t;for(;m(k);)if(k=l(k),!i[k].disabled)return k;return t};ae(()=>{D(fe&&b?0:-1)},[b,fe]),ae(()=>{!P&&o.length>M.length&&c(!1),g&&o.length<g&&(w.current=!1),g&&o.length>=g&&(w.current=!0,c(!1))},[o]);const T=t=>{if(!V)if(qe&&U(""),o.includes(t.value))ye(t.value);else{if(t.creatable&&typeof de=="function"){const l=de(t.value);typeof l<"u"&&l!==null&&j(typeof l=="string"?[...o,l]:[...o,l.value])}else j([...o,t.value]);o.length===g-1&&(w.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&&w.current)return;const l=ge==="column",m=()=>{D(R=>{var x;const A=Se(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=Se(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" ":{S||(t.preventDefault(),i[$]&&d?T(i[$]):c(!0));break}case"Backspace":{o.length>0&&b.length===0&&(j(o.slice(0,-1)),c(!0),g&&(w.current=!1));break}case"Home":{if(!S){t.preventDefault(),d||c(!0);const R=i.findIndex(x=>!x.disabled);D(R),q({alignment:l?"end":"start"})}break}case"End":{if(!S){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&&we&&(l={value:t,label:t}),l}).filter(t=>!!t).map((t,l)=>p.createElement(Le,De(F({},t),{variant:B,disabled:P,className:C.value,readOnly:V,onRemove:m=>{m.preventDefault(),m.stopPropagation(),ye(t.value)},key:t.value,size:s,styles:O,classNames:h,radius:ie,index:l}))),Mr=t=>o.includes(t),Br=()=>{var t;U(""),j([]),(t=X.current)==null||t.focus(),g&&(w.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,F(F({required:y,id:L,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:wr,unstyled:W,withAsterisk:yr,variant:B},Pr),K),p.createElement(te,{opened:Z,transitionProps:He,shadow:"sm",withinPortal:lr,portalProps:or,__staticSelector:"MultiSelect",onDirectionChange:Cr,switchDirectionOnFlip:sr,zIndex:ir,dropdownPosition:dr,positionDependencies:[...mr,b],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?`${L}-items`:null,"aria-controls":L,"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,F({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:s,variant:B,disabled:P,error:u,required:y,radius:ie,icon:Qe,unstyled:W,onMouseDown:t=>{var l;t.preventDefault(),!P&&!w.current&&c(!d),(l=X.current)==null||l.focus()},classNames:De(F({},h),{input:he({[C.input]:!S},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:Sr,readOnly:V})),p.createElement("div",{className:C.values,"data-clearable":se||void 0},Nr,p.createElement("input",F({ref:Tr(r,X),type:"search",id:L,className:he(C.searchInput,{[C.searchInputPointer]:!S,[C.searchInputInputHidden]:!d&&o.length>0||!S&&o.length>0,[C.searchInputEmpty]:o.length===0}),onKeyDown:zr,value:b,onChange:Vr,onFocus:$r,onBlur:Rr,readOnly:!S||w.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:L,innerRef:kr,__staticSelector:"MultiSelect",classNames:h,styles:O},p.createElement(Gr,{data:i,hovered:$,classNames:h,styles:O,uuid:L,__staticSelector:"MultiSelect",onItemHover:D,onItemSelect:T,itemsRefs:Y,itemComponent:je,size:s,nothingFound:ne,isItemSelected:Mr,creatable:ce&&!!ee,createLabel:ee,unstyled:W,variant:B}))))});wa.displayName="@mantine/core/MultiSelect";export{wa as M};
|
|
1
|
+
import{c5 as Ee,c8 as f,c6 as _,aa as p,eC as Lr,ht as be,r as E,c7 as jr,eD as Fr,hu as Hr,eu as Wr,et as Ar,ep as _e,hv as Kr,hw as Ur,fP as ae,eq as Oe,hx as te,hy as qr,eA as Tr,hz as Zr,hA as Gr}from"./index-BZ8AOwEl.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:y})=>({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]:y==="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:y,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:H,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(H.defaultValue,y)},Q),p.createElement("span",{className:H.defaultValueLabel},a),!I&&!s&&p.createElement(Lr,{"aria-hidden":!0,onMouseDown:N,size:ra[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:H.defaultValueRemove,tabIndex:-1,unstyled:K}))}ze.displayName="@mantine/core/MultiSelect/DefaultValue";function aa({data:e,searchable:r,limit:a,searchValue:n,filter:v,value:y,disableSelectedItemFiltering:N}){if(!r&&y.length===0)return e;if(!r){const s=[];for(let u=0;u<e.length;u+=1)(N||!y.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&&y.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:be})} - ${f(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:_({size:a,sizes:be})}},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,F=(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:Hr,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:Fr("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},wa=E.forwardRef((e,r)=>{const a=jr("MultiSelect",va,e),{className:n,style:v,required:y,label:N,description:I,size:s,error:u,classNames:h,styles:O,wrapperProps:K,value:Q,defaultValue:H,data:M,onChange:Be,valueComponent:Le,itemComponent:je,id:Fe,transitionProps:He,maxDropdownHeight:We,shadow:ya,nothingFound:ne,onFocus:le,onBlur:oe,searchable:S,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:wr,readOnly:V,withAsterisk:yr,clearButtonProps:Sr,hoverOnSearchChange:fe,disableSelectedItemFiltering:br}=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({}),L=Ar(Fe),[d,c]=E.useState(Je),[Ir,D]=E.useState(-1),[ge,Cr]=E.useState("column"),[b,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}),we=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,j]=_e({value:ke(Q,M),defaultValue:ke(H,M),finalValue:[],onChange:Be}),w=E.useRef(!!g&&g<o.length),ye=t=>{if(!V){const l=o.filter(m=>m!==t);j(l),g&&l.length<g&&(w.current=!1)}},Vr=t=>{U(t.currentTarget.value),!P&&!w.current&&S&&c(!0)},$r=t=>{typeof le=="function"&&le(t),!P&&!w.current&&S&&c(!0)},i=aa({data:re,searchable:S,searchValue:b,limit:Ue,filter:Ke,value:o,disableSelectedItemFiltering:br});we&&er(b,re)&&(ee=ue(b),i.push({label:b,value:b,creatable:!0}));const $=Math.min(Ir,i.length-1),Se=(t,l,m)=>{let k=t;for(;m(k);)if(k=l(k),!i[k].disabled)return k;return t};ae(()=>{D(fe&&b?0:-1)},[b,fe]),ae(()=>{!P&&o.length>M.length&&c(!1),g&&o.length<g&&(w.current=!1),g&&o.length>=g&&(w.current=!0,c(!1))},[o]);const T=t=>{if(!V)if(qe&&U(""),o.includes(t.value))ye(t.value);else{if(t.creatable&&typeof de=="function"){const l=de(t.value);typeof l<"u"&&l!==null&&j(typeof l=="string"?[...o,l]:[...o,l.value])}else j([...o,t.value]);o.length===g-1&&(w.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&&w.current)return;const l=ge==="column",m=()=>{D(R=>{var x;const A=Se(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=Se(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" ":{S||(t.preventDefault(),i[$]&&d?T(i[$]):c(!0));break}case"Backspace":{o.length>0&&b.length===0&&(j(o.slice(0,-1)),c(!0),g&&(w.current=!1));break}case"Home":{if(!S){t.preventDefault(),d||c(!0);const R=i.findIndex(x=>!x.disabled);D(R),q({alignment:l?"end":"start"})}break}case"End":{if(!S){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&&we&&(l={value:t,label:t}),l}).filter(t=>!!t).map((t,l)=>p.createElement(Le,De(F({},t),{variant:B,disabled:P,className:C.value,readOnly:V,onRemove:m=>{m.preventDefault(),m.stopPropagation(),ye(t.value)},key:t.value,size:s,styles:O,classNames:h,radius:ie,index:l}))),Mr=t=>o.includes(t),Br=()=>{var t;U(""),j([]),(t=X.current)==null||t.focus(),g&&(w.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,F(F({required:y,id:L,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:wr,unstyled:W,withAsterisk:yr,variant:B},Pr),K),p.createElement(te,{opened:Z,transitionProps:He,shadow:"sm",withinPortal:lr,portalProps:or,__staticSelector:"MultiSelect",onDirectionChange:Cr,switchDirectionOnFlip:sr,zIndex:ir,dropdownPosition:dr,positionDependencies:[...mr,b],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?`${L}-items`:null,"aria-controls":L,"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,F({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:s,variant:B,disabled:P,error:u,required:y,radius:ie,icon:Qe,unstyled:W,onMouseDown:t=>{var l;t.preventDefault(),!P&&!w.current&&c(!d),(l=X.current)==null||l.focus()},classNames:De(F({},h),{input:he({[C.input]:!S},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:Sr,readOnly:V})),p.createElement("div",{className:C.values,"data-clearable":se||void 0},Nr,p.createElement("input",F({ref:Tr(r,X),type:"search",id:L,className:he(C.searchInput,{[C.searchInputPointer]:!S,[C.searchInputInputHidden]:!d&&o.length>0||!S&&o.length>0,[C.searchInputEmpty]:o.length===0}),onKeyDown:zr,value:b,onChange:Vr,onFocus:$r,onBlur:Rr,readOnly:!S||w.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:L,innerRef:kr,__staticSelector:"MultiSelect",classNames:h,styles:O},p.createElement(Gr,{data:i,hovered:$,classNames:h,styles:O,uuid:L,__staticSelector:"MultiSelect",onItemHover:D,onItemSelect:T,itemsRefs:Y,itemComponent:je,size:s,nothingFound:ne,isItemSelected:Mr,creatable:ce&&!!ee,createLabel:ee,unstyled:W,variant:B}))))});wa.displayName="@mantine/core/MultiSelect";export{wa as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c5 as q,c6 as _,c8 as o,dA as G,r as H,c7 as J,aa as s,T as K,c9 as w,ba as O}from"./index-
|
|
1
|
+
import{c5 as q,c6 as _,c8 as o,dA as G,r as H,c7 as J,aa as s,T as K,c9 as w,ba as O}from"./index-BZ8AOwEl.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=q((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,c=(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},h=(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(h(c({},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:d,color:C,size:E,radius:$,striped:u,animate:i,label:m,"aria-label":j,classNames:z,styles:T,sections:p,unstyled:A,variant:D}=e,I=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:C,radius:$},{name:"Progress",classNames:z,styles:T,unstyled:A,variant:D,size:E}),L=Array.isArray(p)?aa(p).map((B,F)=>{var v=B,{tooltip:g,accumulated:V,value:M,label:y,color:W}=v,P=x(v,["tooltip","accumulated","value","label","color"]);return s.createElement(K.Floating,{label:g,disabled:!g,key:F},s.createElement(w,h(c({},P),{className:f(l.bar,P.className),"data-striped":u||i||void 0,"data-animate":i||void 0,sx:{width:`${M}%`,left:`${V}%`,backgroundColor:b.fn.variant({variant:"filled",primaryFallback:!1,color:W||b.primaryColor}).background}}),y&&s.createElement(O,{className:l.label},y)))}):null;return s.createElement(w,c({className:f(l.root,t),ref:r},I),L||s.createElement("div",{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":d,"aria-label":j,className:l.bar,style:{width:`${d}%`},"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{c5 as $,c8 as k,c6 as s,r as j,c7 as m,aa as x,c9 as T}from"./index-
|
|
1
|
+
import{c5 as $,c8 as k,c6 as s,r as j,c7 as m,aa as x,c9 as T}from"./index-BZ8AOwEl.js";var B=Object.defineProperty,E=Object.defineProperties,N=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,C=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={}))R.call(o,t)&&p(r,t,o[t]);if(c)for(var t of c(o))C.call(o,t)&&p(r,t,o[t]);return r},H=(r,o)=>E(r,N(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]})})}}),V=Object.defineProperty,A=Object.defineProperties,L=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,f=(r,o,t)=>o in r?V(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)=>A(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:_,verticalSpacing:v,fontSize:y,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:v,horizontalSpacing:_,fontSize:y,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{dQ as S,dR as K,dS as Q,dT as X,dU as E,dV as Y,d6 as Z,d5 as z,r as A,da as N,dW as tt,j as et,ab as rt,dB as _}from"./index-
|
|
1
|
+
import{dQ as S,dR as K,dS as Q,dT as X,dU as E,dV as Y,d6 as Z,d5 as z,r as A,da as N,dW as tt,j as et,ab as rt,dB as _}from"./index-BZ8AOwEl.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 H(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]=H(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 F(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 M(t,e,r){const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(o=>M(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=F,slotShouldForwardProp:o=F}=t;function s(a){ut(a,e,r)}return(a,y={})=>{Q(a,u=>u.filter(c=>c!==E));const{name:l,slot:h,skipVariantsResolver:x,skipSx:C,overridesResolver:v=lt(dt(h)),...T}=y,w=l&&l.startsWith("Mui")||h?"components":"custom",P=x!==void 0?x:h&&h!=="Root"&&h!=="root"||!1,k=C||!1;let b=F;h==="Root"||h==="root"?b=n:h?b=o:pt(a)&&(b=void 0);const V=X(a,{shouldForwardProp:b,label:ft(),...T}),q=u=>{if(u.__emotion_real===u)return u;if(typeof u=="function")return function(m){return M(m,u,m.theme.modularCssLayers?w:void 0)};if(Y(u)){const c=G(u);return function(d){return c.variants?M(d,c,d.theme.modularCssLayers?w:void 0):d.theme.modularCssLayers?g(c.style,w):c.style}}return u},B=(...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 W={};for(const j in p)W[j]=M(f,p[j],f.theme.modularCssLayers?"theme":void 0);return v(f,W)}),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(E),Array.isArray(m[0])){const R=m.shift(),f=new Array(c.length).fill(""),O=new Array(d.length).fill("");let p;p=[...f,...R,...O],p.raw=[...f,...R.raw,...O],c.unshift(p)}const J=[...c,...m,...d],L=V(...J);return a.muiName&&(L.muiName=a.muiName),L};return V.withConfig&&(B.withConfig=V.withConfig),B}}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 U={theme:void 0};function yt(t){let e,r;return function(o){let s=e;return(s===void 0||o.theme!==r)&&(U.theme=o.theme,s=G(t(U)),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:z,rootShouldForwardProp:St}),wt=yt;function Vt(...t){const e=A.useRef(void 0),r=A.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 A.useMemo(()=>t.every(n=>n==null)?null:n=>{e.current&&(e.current(),e.current=void 0),n!=null&&(e.current=r(n))},t)}function bt(t){return typeof t.main=="string"}function xt(t,e=[]){if(!bt(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&&xt(e,t)}function Tt(t){return H("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},Rt=tt(),Ot=t=>{const{align:e,gutterBottom:r,noWrap:n,paragraph:o,variant:s,classes:i}=t,a={root:["root",s,t.align!=="inherit"&&`align${_(e)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return mt(a,Tt,i)},At=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${_(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${_(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}}]}))),D={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ft=A.forwardRef(function(e,r){const{color:n,...o}=N({props:e,name:"MuiTypography"}),s=!Pt[n],i=Rt({...o,...s&&{color:n}}),{align:a="inherit",className:y,component:l,gutterBottom:h=!1,noWrap:x=!1,paragraph:C=!1,variant:v="body1",variantMapping:T=D,...w}=i,P={...i,align:a,color:n,className:y,component:l,gutterBottom:h,noWrap:x,paragraph:C,variant:v,variantMapping:T},k=l||(C?"p":T[v]||D[v])||"span",b=Ot(P);return et.jsx(At,{as:k,ref:r,className:rt(b.root,y),...w,ownerState:P,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...w.style}})});export{Ft as T,kt as _,it as a,F as b,mt as c,Ct as d,H as g,wt as m,vt as s,Vt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as E,c7 as j,go as B,aa as C,gp as G,gq as J,gr as K,gs as Q,gt as S}from"./index-
|
|
1
|
+
import{r as E,c7 as j,go as B,aa as C,gp as G,gq as J,gr as K,gs as Q,gt as S}from"./index-BZ8AOwEl.js";var U=Object.defineProperty,v=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,h=(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={}))R.call(a,r)&&h(e,r,a[r]);if(v)for(var r of v(a))V.call(a,r)&&h(e,r,a[r]);return e},W=(e,a)=>{var r={};for(var t in e)R.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&&V.call(e,t)&&(r[t]=e[t]);return r};const X={type:"default"},$=E.forwardRef((e,a)=>{const r=j("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}=B({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))});$.displayName="@mantine/dates/YearPicker";var Z=Object.defineProperty,ee=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,k=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={}))k.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)k.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=E.forwardRef((e,a)=>{const r=j("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:F,formattedValue:T,dropdownHandlers:z,dropdownOpened:A,onClear:H,shouldClear:q}=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:T,dropdownOpened:A,dropdownHandlers:z,classNames:c,styles:u,unstyled:n,__staticSelector:"YearPickerInput",ref:a,onClear:H,shouldClear:q,value:s,type:t,size:f,variant:d,dropdownType:_},M),C.createElement($,re(b({},L),{size:f,variant:d,type:t,value:s,defaultDate:Array.isArray(s)?s[0]||S({maxDate:l,minDate:o}):s||S({maxDate:l,minDate:o}),onChange:F,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{aa as l,j as t,g$ as Q,h0 as W,h1 as O,h2 as X,h3 as Z,h4 as T,h5 as ee,h6 as oe,h7 as M,h8 as re,h9 as te,ha as ne,m as P,bK as ae}from"./index-
|
|
1
|
+
import{aa as l,j as t,g$ as Q,h0 as W,h1 as O,h2 as X,h3 as Z,h4 as T,h5 as ee,h6 as oe,h7 as M,h8 as re,h9 as te,ha as ne,m as P,bK as ae}from"./index-BZ8AOwEl.js";var d="Accordion",ce=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[k,ie,se]=Q(d),[b]=W(d,[se,O]),E=O(),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),[K,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(K,{scope:e.__scopeAccordion,collapsible:r,children:t.jsx($,{...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(x=>i((f=[])=>[...f,x]),[i]),v=l.useCallback(x=>i((f=[])=>f.filter(C=>C!==x)),[i]);return t.jsx(H,{scope:e.__scopeAccordion,value:s,onItemOpen:p,onItemClose:v,children:t.jsx(K,{scope:e.__scopeAccordion,collapsible:!0,children:t.jsx($,{...r,ref:n})})})}),[fe,h]=b(d),$=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",C=ne(e.onKeyDown,m=>{if(!ce.includes(m.key))return;const F=m.target,I=v().filter(R=>!R.ref.current?.disabled),g=I.findIndex(R=>R.ref.current===F),D=I.length;if(g===-1)return;m.preventDefault();let u=g;const j=0,w=D-1,_=()=>{u=g+1,u>w&&(u=j)},y=()=>{u=g-1,u<j&&(u=w)};switch(m.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 J=u%D;I[J].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(T.div,{...s,"data-orientation":r,ref:p,onKeyDown:a?void 0:C})})})}),A="AccordionItem",[ve,S]=b(A),z=l.forwardRef((e,n)=>{const{__scopeAccordion:o,value:a,...c}=e,r=h(A,o),s=le(A,o),i=E(o),p=X(),v=a&&s.value.includes(a)||!1,x=r.disabled||e.disabled;return t.jsx(ve,{scope:o,open:v,disabled:x,triggerId:p,children:t.jsx(Z,{"data-orientation":r.orientation,"data-state":B(v),...i,...c,ref:n,disabled:x,open:v,onOpenChange:f=>{f?s.onItemOpen(a):s.onItemClose(a)}})})});z.displayName=A;var L="AccordionHeader",G=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=h(d,o),r=S(L,o);return t.jsx(T.h3,{"data-orientation":c.orientation,"data-state":B(r.open),"data-disabled":r.disabled?"":void 0,...a,ref:n})});G.displayName=L;var N="AccordionTrigger",U=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=h(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})})});U.displayName=N;var Y="AccordionContent",q=l.forwardRef((e,n)=>{const{__scopeAccordion:o,...a}=e,c=h(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}})});q.displayName=Y;function B(e){return e?"open":"closed"}var xe=V,me=z,ge=G,Ae=U,be=q;function Ce({...e}){return t.jsx(xe,{"data-slot":"accordion",...e})}function Ie({className:e,...n}){return t.jsx(me,{"data-slot":"accordion-item",className:P("border-b last:border-b-0",e),...n})}function je({className:e,children:n,...o}){return t.jsx(ge,{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{Ce as A,Ie as a,we as b,je as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,F as h,a7 as v,a9 as C,u as P,j as e,L as A,hb as F}from"./index-
|
|
1
|
+
import{r as s,F as h,a7 as v,a9 as C,u as P,j as e,L as A,hb as F}from"./index-BZ8AOwEl.js";import{u as b}from"./use-url-query-DOEL3cY1.js";import{C as y}from"./charges-filters-Djo_kWBf.js";import{P as j}from"./page-layout-BfCdWwql.js";import{P as D}from"./Progress-CaCuNARE.js";import"./modal-8mlzJehM.js";import"./funnel-Bmrsutts.js";import"./sub-dol6DnIB.js";import"./addDays-DbkSn4rN.js";import"./subMonths-Cu51bw_I.js";import"./MultiSelect-BKzjkxRf.js";const L=()=>{const{setFiltersContext:c}=s.useContext(h),{get:i}=b(),{userContext:p}=s.useContext(v),[a,m]=s.useState(i("chargesFilters")?JSON.parse(decodeURIComponent(i("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:a,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 s.useEffect(()=>{c(e.jsx("div",{className:"flex flex-row gap-x-5",children:e.jsx(y,{filter:a,setFilter:m,activePage:1,setPage:()=>{},totalPages:1})}))},[r,u,a,c,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{L as AccountantApprovals};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as t,B as r,d$ as a}from"./index-
|
|
1
|
+
import{r as s,j as t,B as r,d$ as a}from"./index-BZ8AOwEl.js";import{T as c}from"./Table-DxJ1YCr5.js";function h(e){const[i,o]=s.useState(!1),l=e.moreInfo?e.moreInfo(e.item):null;return t.jsxs(t.Fragment,{children:[t.jsxs("tr",{children:[e.columns.map((n,d)=>n.disabled?null:t.jsx("td",{style:n.style,children:n.value(e.item,e.rowContext?e.rowContext(e.item):void 0)},String(d))),e.moreInfo&&t.jsx("td",{children:l===null?t.jsx("p",{children:"No Data Related"}):t.jsx(r,{onClick:()=>o(!i),className:"ml-auto",children:"More Info"})})]}),(e.isShowAll||i)&&l!==null&&t.jsx("tr",{children:t.jsx("td",{colSpan:12,children:t.jsx(a,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:l})})})]})}function u(e){const[i,o]=s.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex flex-row justify-end w-full",children:e.showButton===!0?t.jsx(r,{type:"button",onClick:()=>{o(l=>!l)},children:i?"Hide All":"Show All"}):null}),t.jsxs(c,{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((l,n)=>l.disabled?null:t.jsx("th",{children:l.title},String(n))),e.moreInfo&&t.jsx("th",{children:"More Info"})]})}),t.jsx("tbody",{children:e.items.map((l,n)=>t.jsx(h,{columns:e.columns,item:l,moreInfo:e.moreInfo,isShowAll:i,rowContext:e.rowContext},n))})]})]})}export{h as A,u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fO as s,gx as i}from"./index-
|
|
1
|
+
import{fO as s,gx as i}from"./index-BZ8AOwEl.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-BZ8AOwEl.js";import{u as T}from"./use-url-query-DOEL3cY1.js";import{C as z}from"./charges-filters-Djo_kWBf.js";import{C as B}from"./charges-table-D1vDT-UP.js";import{M as L}from"./index-Babx_Mc7.js";import{E as R,I as k,M as Q}from"./match-document-modal-CETycNjj.js";import{P as U}from"./page-layout-BfCdWwql.js";import{P as q,a as J}from"./panel-top-open-CpMFDJrl.js";import"./modal-8mlzJehM.js";import"./funnel-Bmrsutts.js";import"./sub-dol6DnIB.js";import"./addDays-DbkSn4rN.js";import"./subMonths-Cu51bw_I.js";import"./MultiSelect-BKzjkxRf.js";import"./toggle-expansion-button-Buzq87-g.js";import"./index-Br0GTPfc.js";import"./similar-transactions-modal-BPFaQ7dD.js";import"./list-plus-CDqpqAwS.js";import"./tooltip-gvPoRI4e.js";import"./Table-DxJ1YCr5.js";import"./summary-Sj8NMKlv.js";import"./Checkbox-dSmM5Kto.js";import"./YearPickerInput-Bp2ytdrx.js";import"./insert-business-trip-modal-4vXkqVnt.js";import"./accounter-table-CLZmYCK0.js";const he=()=>{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{he as AllCharges};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as Z,w as xs,u as ee,S as ps,r as p,j as e,D as Je,x as Qe,E as js,c as Ye,g as Ze,t as ne,i as es,U as gs,y as Be,z as ss,G as pe,H as M,J as $,K as as,N as z,O as U,Q as Te,V as G,W as j,X as g,Y as f,Z as C,I as B,_ as v,$ as w,a0 as ie,a1 as Ee,B as T,a2 as fs,a3 as ts,a4 as Pe,a5 as _,a6 as vs,a7 as Le,a8 as ys,P as Ns,a9 as bs,aa as P,ab as _e,ac as Cs,ad as ws,ae as Ss,af as J,ag as Q,ah as ks,ai as As,aj as Is,ak as we,al as Ds,am as Bs,an as Ts,ao as Es,ap as Ps,aq as Ls,ar as Os,as as Fs,at as re,au as Y,av as xe,aw as _s,ax as Vs,ay as Se,az as Ve,aA as ns,aB as Rs,aC as ke,aD as Ms,aE as Re,aF as $s,aG as Me,aH as zs,aI as Us,aJ as Gs,aK as qs,aL as Ws,aM as Ks,aN as Hs,aO as Xs,aP as Js,aQ as N,aR as Qs,aS as Oe,aT as Ys,aU as Zs,aV as ea,aW as sa,aX as aa,aY as ta,aZ as na,a_ as ia,a$ as ra,b0 as la,F as ca,b1 as oa,b2 as da,b3 as q,b4 as ma,b5 as ua,b6 as V,b7 as ha,a as xa,b as pa,b8 as ja}from"./index-
|
|
1
|
+
import{v as Z,w as xs,u as ee,S as ps,r as p,j as e,D as Je,x as Qe,E as js,c as Ye,g as Ze,t as ne,i as es,U as gs,y as Be,z as ss,G as pe,H as M,J as $,K as as,N as z,O as U,Q as Te,V as G,W as j,X as g,Y as f,Z as C,I as B,_ as v,$ as w,a0 as ie,a1 as Ee,B as T,a2 as fs,a3 as ts,a4 as Pe,a5 as _,a6 as vs,a7 as Le,a8 as ys,P as Ns,a9 as bs,aa as P,ab as _e,ac as Cs,ad as ws,ae as Ss,af as J,ag as Q,ah as ks,ai as As,aj as Is,ak as we,al as Ds,am as Bs,an as Ts,ao as Es,ap as Ps,aq as Ls,ar as Os,as as Fs,at as re,au as Y,av as xe,aw as _s,ax as Vs,ay as Se,az as Ve,aA as ns,aB as Rs,aC as ke,aD as Ms,aE as Re,aF as $s,aG as Me,aH as zs,aI as Us,aJ as Gs,aK as qs,aL as Ws,aM as Ks,aN as Hs,aO as Xs,aP as Js,aQ as N,aR as Qs,aS as Oe,aT as Ys,aU as Zs,aV as ea,aW as sa,aX as aa,aY as ta,aZ as na,a_ as ia,a$ as ra,b0 as la,F as ca,b1 as oa,b2 as da,b3 as q,b4 as ma,b5 as ua,b6 as V,b7 as ha,a as xa,b as pa,b8 as ja}from"./index-BZ8AOwEl.js";import{S as Fe}from"./save-BjBw7mG5.js";import{B as ga}from"./business-extended-info-u-wZchjH.js";import{B as fa}from"./business-header-vz6RQ5nZ.js";import{S as va,C as ya,L as Na}from"./charges-table-D1vDT-UP.js";import{i as ba,D as Ca,f as wa,E as Sa,L as ye,a as je,C as ka,A as Aa,b as me,c as Ia,d as Ae,h as Da,e as Ba,g as is,u as Ta,G as Ea,j as $e,k as Pa,X as rs,Y as ls,l as La,m as Oa,R as Fa,n as _a,o as Va,p as Ra}from"./chart-BMSKXrwP.js";import{M as Ma,s as $a,a as za}from"./modify-contract-dialog-DWLEVQ1d.js";import{P as Ua}from"./pencil-R8t4mFRO.js";import{E as Ga,T as qa}from"./index-Br0GTPfc.js";import{A as Wa,a as Ne,b as be,c as ze}from"./accordion-B83CGJPM.js";import{B as Ka}from"./building-2-DAb5H_9e.js";import"./download-csv-button-tWswwko2.js";import"./Table-DxJ1YCr5.js";import"./toggle-expansion-button-Buzq87-g.js";import"./panel-top-open-CpMFDJrl.js";import"./summary-Sj8NMKlv.js";import"./list-plus-CDqpqAwS.js";import"./sequential-CAnleQny.js";import"./similar-transactions-modal-BPFaQ7dD.js";import"./addDays-DbkSn4rN.js";import"./tooltip-gvPoRI4e.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-BPdDug4k.js → business-extended-info-u-wZchjH.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as M,c5 as G,r as D,c7 as J,aa as V,c9 as H,j as e,de as K,w as v,u as Y,dX as q,bb as o,c as Q,T as W,B as X,bm as P,R as S,aK as A,bd as Z}from"./index-
|
|
1
|
+
import{v as M,c5 as G,r as D,c7 as J,aa as V,c9 as H,j as e,de as K,w as v,u as Y,dX as q,bb as o,c as Q,T as W,B as X,bm as P,R as S,aK as A,bd as Z}from"./index-BZ8AOwEl.js";import{D as ee}from"./download-csv-button-tWswwko2.js";import{T as ne}from"./Table-DxJ1YCr5.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{G as l,j as e,au as t,w as m,b9 as x}from"./index-
|
|
1
|
+
import{G as l,j as e,au as t,w as m,b9 as x}from"./index-BZ8AOwEl.js";import{B as o}from"./building-2-DAb5H_9e.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};
|
package/dist/assets/{business-ledger-filters-C6zdPVNQ.js → business-ledger-filters-DyyAMsOt.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,be as y,j as e,bf as C,B as S,y as I,bg as F,a7 as B,bh as m,bi as v,bj as j,w as f,bk as E,bl as w}from"./index-
|
|
1
|
+
import{r as x,be as y,j as e,bf as C,B as S,y as I,bg as F,a7 as B,bh as m,bi as v,bj as j,w as f,bk as E,bl as w}from"./index-BZ8AOwEl.js";import{u as N}from"./use-url-query-DOEL3cY1.js";import{P as L}from"./modal-8mlzJehM.js";import{F as R}from"./funnel-Bmrsutts.js";import{M as D}from"./MultiSelect-BKzjkxRf.js";function A({filter:r,setFilter:b,closeModal:u,single:l=!1}){const{control:n,handleSubmit:p}=I({defaultValues:{...r}}),{selectableBusinesses:d,fetching:i}=F(),{userContext:g}=x.useContext(B),h=s=>{b(s),u()};function o(){b({businessIDs:l?r.businessIDs:void 0}),u()}return e.jsxs(e.Fragment,{children:[i?e.jsx("div",{children:"Loading..."}):e.jsx("div",{}),e.jsxs("form",{onSubmit:p(h),children:[e.jsx(m,{name:"ownerIds",control:n,defaultValue:r.ownerIds,render:({field:s,fieldState:a})=>e.jsx(D,{...s,data:d,value:s.value??(g?.context.adminBusinessId?[g.context.adminBusinessId]:void 0),disabled:i,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:a.error?.message})}),!l&&e.jsx(m,{name:"businessIDs",control:n,defaultValue:r.businessIDs,render:({field:s,fieldState:a})=>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:a.error?.message})}),e.jsx(m,{name:"fromDate",control:n,defaultValue:r.fromDate,rules:{pattern:{value:v,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:a})=>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:a.error?.message,label:"From Date",popoverProps:{withinPortal:!0}})}),e.jsx(m,{name:"toDate",control:n,defaultValue:r.toDate,rules:{pattern:{value:v,message:"Date must be im format yyyy-mm-dd"}},render:({field:s,fieldState:a})=>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:a.error?.message,label:"To Date",popoverProps:{withinPortal:!0}})}),e.jsx(m,{name:"type",control:n,defaultValue:null,render:({field:s,fieldState:a})=>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:a.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:o,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 O({filter:r,setFilter:b}){const[u,l]=x.useState(!1),[n,p]=x.useState(!y(r)),{get:d,set:i}=N();function g(o){return Object.entries(o??{}).filter(([a,t])=>t!==void 0&&Array.isArray(t)&&t.length>0).length>0}function h(o){o.fromDate?.trim()===""&&(o.fromDate=void 0),o.toDate?.trim()===""&&(o.toDate=void 0),w(o,r)||(b(o),p(g(o)))}return x.useEffect(()=>{const o=y(r)?null:encodeURIComponent(JSON.stringify(r)),s=d("ledgerRecordsFilters");o!==s&&i("ledgerRecordsFilters",o)},[r,d,i]),e.jsxs(e.Fragment,{children:[e.jsx(L,{opened:u,onClose:()=>l(!1),content:e.jsx(A,{single:!0,filter:r,setFilter:h,closeModal:()=>l(!1)})}),e.jsx(C,{inline:!0,size:16,disabled:!n,children:e.jsx(S,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>l(!0),children:e.jsx(R,{className:"size-5"})})})]})}export{O as B};
|
package/dist/assets/{business-ledger-single-D_gxQY7c.js → business-ledger-single-Cy7nqs_T.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as S,r as c,F as w,u as C,j as n,c as x,bb as o,bc as y}from"./index-
|
|
1
|
+
import{a as S,r as c,F as w,u as C,j as n,c as x,bb as o,bc as y}from"./index-BZ8AOwEl.js";import{u as h}from"./use-url-query-DOEL3cY1.js";import{a as F}from"./accounter-table-CLZmYCK0.js";import{M as p,B as R}from"./business-extended-info-u-wZchjH.js";import{B as v}from"./business-ledger-filters-DyyAMsOt.js";import"./Table-DxJ1YCr5.js";import"./download-csv-button-tWswwko2.js";import"./modal-8mlzJehM.js";import"./funnel-Bmrsutts.js";import"./MultiSelect-BKzjkxRf.js";const M=({businessId:t})=>{const{businessId:r}=S(),{get:s}=h(),{setFiltersContext:u}=c.useContext(w),l=t||r,[m,d]=c.useState(s("ledgerRecordsFilters")?{...JSON.parse(decodeURIComponent(s("ledgerRecordsFilters"))),businessIDs:l?[l]:[]}:{businessIDs:l?[l]:[]}),[{data:a,fetching:f}]=C({query:y,variables:{filters:m}});c.useEffect(()=>{u(n.jsx(v,{filter:m,setFilter:d}))},[a,m,u,d]);const b=c.useMemo(()=>a?.businessTransactionsSumFromLedgerRecords.__typename==="CommonError"?[]:a?.businessTransactionsSumFromLedgerRecords.businessTransactionsSum?a.businessTransactionsSumFromLedgerRecords.businessTransactionsSum.sort((e,g)=>e.business.name.localeCompare(g.business.name)):[],[a?.businessTransactionsSumFromLedgerRecords]);return f?n.jsx(x,{}):n.jsx(F,{moreInfo:e=>n.jsx(R,{businessID:e.business.id,filter:m}),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)?n.jsx(p,{color:e.total.raw>0?"green":"red",children:e.total.formatted}):e.total.formatted,style:{whiteSpace:"nowrap"}},...i(o.Eur),...i(o.Usd),...i(o.Gbp),...i(o.Cad),...i(o.Jpy),...i(o.Aud),...i(o.Sek)]})};function i(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)?n.jsx(p,{color:s.total.raw>0?"green":"red",children:s.total.formatted}):s?.total?.formatted},style:{whiteSpace:"nowrap"}}]}export{M as BusinessLedgerRecordsSingle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,r as n,F as u,u as m,j as s,c,c4 as x}from"./index-
|
|
1
|
+
import{a as p,r as n,F as u,u as m,j as s,c,c4 as x}from"./index-BZ8AOwEl.js";import{P as d,C as l,E as f}from"./editable-business-trip-D0UrHlFI.js";import{P as T}from"./page-layout-BfCdWwql.js";import"./list-plus-CDqpqAwS.js";import"./summary-Sj8NMKlv.js";import"./Table-DxJ1YCr5.js";import"./toggle-expansion-button-Buzq87-g.js";import"./panel-top-open-CpMFDJrl.js";import"./MultiSelect-BKzjkxRf.js";import"./similar-transactions-modal-BPFaQ7dD.js";import"./tooltip-gvPoRI4e.js";const v=({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(T,{title:`Business Trip: ${r.businessTrip.name}`,description:"Manage business trip",children:s.jsx(l,{className:"mt-5",children:e&&s.jsx(f,{tripId:e,isExtended:!0})})})};export{v as BusinessTrip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I,b as x,r,u as D,j as e,c as f,C as j}from"./index-
|
|
1
|
+
import{a as I,b as x,r,u as D,j as e,c as f,C as j}from"./index-BZ8AOwEl.js";import{C as v}from"./charges-table-D1vDT-UP.js";import{E as M,I as E,M as S}from"./match-document-modal-CETycNjj.js";import"./toggle-expansion-button-Buzq87-g.js";import"./panel-top-open-CpMFDJrl.js";import"./index-Br0GTPfc.js";import"./similar-transactions-modal-BPFaQ7dD.js";import"./addDays-DbkSn4rN.js";import"./list-plus-CDqpqAwS.js";import"./tooltip-gvPoRI4e.js";import"./Table-DxJ1YCr5.js";import"./summary-Sj8NMKlv.js";import"./YearPickerInput-Bp2ytdrx.js";import"./insert-business-trip-modal-4vXkqVnt.js";import"./accounter-table-CLZmYCK0.js";import"./modal-8mlzJehM.js";const G=({chargeId:u})=>{const{chargeId:g}=I(),a=u||g;let t;try{t=x()}catch{}const[o,n]=r.useState(void 0),[s,i]=r.useState(void 0),[c,d]=r.useState(void 0),[{data:p,fetching:l},m]=D({query:j,pause:!a||!!t,variables:{chargeId:a??""}});r.useEffect(()=>{a&&!t&&m()},[a,t,m]);const h=t||p,C=!t&&l;return a?e.jsxs(e.Fragment,{children:[C?e.jsx(f,{}):e.jsx(v,{setEditChargeId:n,setInsertDocument:i,setMatchDocuments:d,data:h?.charge?[h.charge]:[],isAllOpened:!0}),o&&e.jsx(M,{chargeId:o?.id,close:()=>n(void 0),onChange:o.onChange}),s&&e.jsx(E,{chargeId:s.id,onChange:s.onChange,close:()=>i(void 0)}),c&&e.jsx(S,{chargeId:c.id,ownerId:c.ownerId,setMatchDocuments:()=>d(void 0)})]}):e.jsx("div",{children:"Charge not found"})};export{G as Charge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,be as B,bl as W,j as e,P as R,bf as z,B as G,a7 as U,y as _,w as N,a9 as D,dg as Q,aj as X,Q as Y,dh as q,bh as h,eh as J,bi as P,bj as O,bk as L,e8 as A,ag as m,hc as Z,aY as K,W as x,X as j,Y as p,Z as g,bF as $,bG as ee,bH as se}from"./index-
|
|
1
|
+
import{r as i,be as B,bl as W,j as e,P as R,bf as z,B as G,a7 as U,y as _,w as N,a9 as D,dg as Q,aj as X,Q as Y,dh as q,bh as h,eh as J,bi as P,bj as O,bk as L,e8 as A,ag as m,hc as Z,aY as K,W as x,X as j,Y as p,Z as g,bF as $,bG as ee,bH as se}from"./index-BZ8AOwEl.js";import{u as ae}from"./use-url-query-DOEL3cY1.js";import{P as te}from"./modal-8mlzJehM.js";import{F as ne}from"./funnel-Bmrsutts.js";import{s as oe}from"./sub-dol6DnIB.js";import{M as k}from"./MultiSelect-BKzjkxRf.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(U),o=_({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}=Q(),{selectableTags:v,fetching:I}=X(),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(Y,{...o,children:e.jsxs("form",{onSubmit:T(V),children:[e.jsxs(q,{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:J,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,M)=>M.label?.toLowerCase().includes(r.toLowerCase().trim())||M.description?.toLowerCase().includes(r.toLowerCase().trim())})}),e.jsx(h,{name:"fromAnyDate",control:l,defaultValue:a.fromAnyDate,rules:{pattern:{value:P,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:P,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:Z,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(K,{children:"Missing Information:"}),e.jsx(x,{control:o.control,name:"withoutInvoice",render:({field:s})=>e.jsxs(j,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(p,{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(j,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(p,{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(j,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(p,{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(j,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(p,{children:"With Open Documents"})}),e.jsx(g,{children:e.jsxs($,{children:[e.jsx(ee,{children:e.jsx(m,{defaultChecked:a.withOpenDocuments??!1,onCheckedChange:s.onChange})}),e.jsx(se,{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(j,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(p,{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(j,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(p,{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(j,{className:"flex flex-row items-center justify-between",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(p,{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 pe({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}=ae();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=>{W(t,a)||(w(t),F(!B(t)))},[a,w]);return e.jsxs("div",{className:"flex flex-row gap-5 items-center",children:[e.jsx(te,{opened:T,onClose:()=>C(!1),content:e.jsx(ie,{filter:a,setFilter:S,closeModal:()=>C(!1)}),modalSize:"xl"}),o>1&&e.jsx(R,{className:"flex-fit w-fit mx-0",value:d,onChange:b,total:o}),e.jsx(z,{inline:!0,size:16,disabled:!y,children:e.jsx(G,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>C(!0),children:e.jsx(ne,{className:"size-5"})})})]})}export{pe as C,ce as c};
|
package/dist/assets/{charges-ledger-validation-K96Gpr99.js → charges-ledger-validation-DvCBQB1e.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-BZ8AOwEl.js";import{u as O}from"./use-url-query-DOEL3cY1.js";import{C as k}from"./charges-filters-Djo_kWBf.js";import{C as B,T as R}from"./charges-table-D1vDT-UP.js";import{M as V}from"./index-Babx_Mc7.js";import{E as A,I as Q,M as U}from"./match-document-modal-CETycNjj.js";import{P as q}from"./page-layout-BfCdWwql.js";import{P as J}from"./Progress-CaCuNARE.js";import{P as $,a as G}from"./panel-top-open-CpMFDJrl.js";import"./modal-8mlzJehM.js";import"./funnel-Bmrsutts.js";import"./sub-dol6DnIB.js";import"./addDays-DbkSn4rN.js";import"./subMonths-Cu51bw_I.js";import"./MultiSelect-BKzjkxRf.js";import"./toggle-expansion-button-Buzq87-g.js";import"./index-Br0GTPfc.js";import"./similar-transactions-modal-BPFaQ7dD.js";import"./list-plus-CDqpqAwS.js";import"./tooltip-gvPoRI4e.js";import"./Table-DxJ1YCr5.js";import"./summary-Sj8NMKlv.js";import"./Checkbox-dSmM5Kto.js";import"./YearPickerInput-Bp2ytdrx.js";import"./insert-business-trip-modal-4vXkqVnt.js";import"./accounter-table-CLZmYCK0.js";const Me=()=>{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,d]=t.useState([]),{get:F}=O(),m=F("chargesFilters"),I=t.useMemo(()=>{if(m)try{return JSON.parse(decodeURIComponent(m))}catch{return}},[m]),[o,j]=t.useState(I),S=t.useCallback((s,y)=>{r.map(h=>h.id).includes(s)?d(r.filter(h=>h.id!==s)):d([...r,{id:s,onChange:y}])},[r]),[{data:a,fetching:M},v]=E({query:W,variables:{filters:o},pause:!0});function P(){d([])}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{Me as ChargesLedgerValidation};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as Oe,j as r,ev as vo,ew as jo,ex as bo,aB as Co,c5 as Ve,c8 as $,c6 as we,ey as Do,r as g,c7 as Ue,aa as N,c9 as He,ez as Br,eA as So,eB as wo,ep as _o,eC as Io,eq as Wt,ba as Qe,eD as Vr,eE as Eo,d as jt,ch as Ur,G as L,eF as Oo,g as Pe,eG as Po,t as F,i as Ae,eH as Ao,bI as Gt,T as Le,B as Q,m as Hr,eI as No,eJ as To,y as xn,Q as $o,eK as Fo,eL as ko,eM as nt,eN as rt,eO as Mn,eP as zn,dF as Ro,eQ as Kr,eR as Mo,l as gt,eS as zo,eT as Lo,D as yn,aU as Bo,bX as Gr,x as vn,eU as Vo,eV as Uo,bJ as qr,bP as Wr,bQ as Yr,aV as Ho,aW as Ko,H as Qr,bz as jn,bA as bn,bB as Ye,bC as Te,bM as Pt,bD as Cn,bE as Ie,p as Ln,w as Be,u as Xe,eW as Go,E as qo,c as Wo,eX as Yo,d_ as Qo,eY as Jo,bf as Re,eZ as Xo,bm as At,R as mt,e_ as Jr,e$ as Xr,f0 as ze,f1 as Zo,f2 as Zr,f3 as ea,f4 as ta,f5 as es,f6 as an,f7 as ts,f8 as na,f9 as ra,bb as Dn,fa as sa,at as ns,fb as rs,n as ft,bh as $e,bi as ss,bj as os,cg as as,bk as Nt,fc as oa,fd as aa,cm as Sn,e as ia,fe as ca,a4 as la,ff as da,L as is,fg as ua,fh as fa,di as pa,fi as cn,fj as cs,fk as ls,fl as ga,fm as Yt,fn as Bn,fo as ds,dj as ma,fp as ha,dy as De,bK as Se,au as us,fq as Vn,ed as xa,bO as ya,P as va,d$ as fs,fr as ps,fs as gs,ft as ja,de as tt,fu as ms,fv as ba,fw as hs,V as Ca,N as Da,fx as xs,fy as Sa,fz as ys,fA as vs,fB as _e,fC as je,fD as Un,fE as js,fF as wa,fG as _a,fH as qe,fI as Ia,fJ as Ea,fK as Oa}from"./index-
|
|
1
|
+
import{v as Oe,j as r,ev as vo,ew as jo,ex as bo,aB as Co,c5 as Ve,c8 as $,c6 as we,ey as Do,r as g,c7 as Ue,aa as N,c9 as He,ez as Br,eA as So,eB as wo,ep as _o,eC as Io,eq as Wt,ba as Qe,eD as Vr,eE as Eo,d as jt,ch as Ur,G as L,eF as Oo,g as Pe,eG as Po,t as F,i as Ae,eH as Ao,bI as Gt,T as Le,B as Q,m as Hr,eI as No,eJ as To,y as xn,Q as $o,eK as Fo,eL as ko,eM as nt,eN as rt,eO as Mn,eP as zn,dF as Ro,eQ as Kr,eR as Mo,l as gt,eS as zo,eT as Lo,D as yn,aU as Bo,bX as Gr,x as vn,eU as Vo,eV as Uo,bJ as qr,bP as Wr,bQ as Yr,aV as Ho,aW as Ko,H as Qr,bz as jn,bA as bn,bB as Ye,bC as Te,bM as Pt,bD as Cn,bE as Ie,p as Ln,w as Be,u as Xe,eW as Go,E as qo,c as Wo,eX as Yo,d_ as Qo,eY as Jo,bf as Re,eZ as Xo,bm as At,R as mt,e_ as Jr,e$ as Xr,f0 as ze,f1 as Zo,f2 as Zr,f3 as ea,f4 as ta,f5 as es,f6 as an,f7 as ts,f8 as na,f9 as ra,bb as Dn,fa as sa,at as ns,fb as rs,n as ft,bh as $e,bi as ss,bj as os,cg as as,bk as Nt,fc as oa,fd as aa,cm as Sn,e as ia,fe as ca,a4 as la,ff as da,L as is,fg as ua,fh as fa,di as pa,fi as cn,fj as cs,fk as ls,fl as ga,fm as Yt,fn as Bn,fo as ds,dj as ma,fp as ha,dy as De,bK as Se,au as us,fq as Vn,ed as xa,bO as ya,P as va,d$ as fs,fr as ps,fs as gs,ft as ja,de as tt,fu as ms,fv as ba,fw as hs,V as Ca,N as Da,fx as xs,fy as Sa,fz as ys,fA as vs,fB as _e,fC as je,fD as Un,fE as js,fF as wa,fG as _a,fH as qe,fI as Ia,fJ as Ea,fK as Oa}from"./index-BZ8AOwEl.js";import{T as Pa}from"./toggle-expansion-button-Buzq87-g.js";import{M as Aa,P as W,I as Na,T as bs,a as Ta,D as $a,A as Fa,b as ka,c as Ra,S as Ma,C as za,d as La}from"./index-Br0GTPfc.js";import{T as Cs}from"./Table-DxJ1YCr5.js";import{R as Ba,S as Va,M as oe,B as Ua,L as Hn,G as Qt,C as Kn,A as U,a as Ha}from"./summary-Sj8NMKlv.js";import{L as Jt}from"./list-plus-CDqpqAwS.js";/**
|
|
2
2
|
* @license lucide-react v0.548.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|