@accounter/client 0.0.8-alpha-20251029124401-d15137847e8450b1ecf3e3cfa6b68dda7239ca45 → 0.0.8-alpha-20251029124448-6b4f8bc975a23de63429b68d0806022dbfc5b226
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/assets/{Checkbox-Cxbop3qM.js → Checkbox-Ddw01d64.js} +1 -1
- package/dist/assets/{MultiSelect-D1XVjXLN.js → MultiSelect-CBtq6WUv.js} +1 -1
- package/dist/assets/{Pagination-DMimIHM4.js → Pagination-BM-86UO5.js} +1 -1
- package/dist/assets/{Progress-CP4jnh2x.js → Progress-Bda-J3ZH.js} +1 -1
- package/dist/assets/{Table-DTU12O53.js → Table-CYqAEQfS.js} +1 -1
- package/dist/assets/{Typography-IL0wuZeq.js → Typography--U0GsZ21.js} +1 -1
- package/dist/assets/{YearPickerInput-CPL_XozD.js → YearPickerInput-CgU-feeq.js} +1 -1
- package/dist/assets/{accordion-DKLV9b0H.js → accordion-B8kebokE.js} +1 -1
- package/dist/assets/{accountant-approvals-CdX2nUgB.js → accountant-approvals-CUluc3sH.js} +1 -1
- package/dist/assets/{accounter-table-CeZ4q0re.js → accounter-table-CM6PQ9Aw.js} +1 -1
- package/dist/assets/{addDays-sGeEkIxC.js → addDays-DGlDD_vj.js} +1 -1
- package/dist/assets/{all-charges-BJvp1ecZ.js → all-charges-DpQS6Xp3.js} +1 -1
- package/dist/assets/{arrow-up-down-DkEXGAin.js → arrow-up-down-C61ge4J5.js} +1 -1
- package/dist/assets/{building-2-BcYhLAVP.js → building-2-3KauBrnS.js} +1 -1
- package/dist/assets/{business-CO7M6XNI.js → business-RCuQN-RO.js} +1 -1
- package/dist/assets/{business-extended-info-MUfOmQ_B.js → business-extended-info-DmQ7B7-Z.js} +1 -1
- package/dist/assets/{business-header-BG2B-PcM.js → business-header-B-uHcc1D.js} +1 -1
- package/dist/assets/{business-transactions-filters-Cijy7ryl.js → business-transactions-filters-D-Y8vZwZ.js} +1 -1
- package/dist/assets/{business-transactions-single-DZqMwNkv.js → business-transactions-single-CEE249QN.js} +1 -1
- package/dist/assets/{business-trip-C7G814AY.js → business-trip-3kCBQ5MD.js} +1 -1
- package/dist/assets/{charge-Bm0hPNT7.js → charge-D19rkm2C.js} +1 -1
- package/dist/assets/{charges-filters-DjnsiGzC.js → charges-filters-BUFmsiTq.js} +1 -1
- package/dist/assets/{charges-ledger-validation-CoHDjCf2.js → charges-ledger-validation-OPtbHzXu.js} +1 -1
- package/dist/assets/{charges-table-C_4dY1Ic.js → charges-table-D_GDHvFS.js} +1 -1
- package/dist/assets/{chart-SbwWAyei.js → chart-iyOBgiH0.js} +1 -1
- package/dist/assets/{data-table-pagination-DtnUvTOC.js → data-table-pagination-CKN0E29f.js} +1 -1
- package/dist/assets/{download-csv-button-D9_6J2pA.js → download-csv-button-DZ5cKqkV.js} +1 -1
- package/dist/assets/{editable-business-trip-xFRu5fSA.js → editable-business-trip-CRiuNdbP.js} +1 -1
- package/dist/assets/{funnel-WdA7f2As.js → funnel-BlaCusqP.js} +1 -1
- package/dist/assets/{index-DPvrbbz9.js → index-B2_EbsaK.js} +191 -191
- package/dist/assets/{index-D3-tv-Kb.js → index-B8pzYiEH.js} +1 -1
- package/dist/assets/{index-9JObwNSb.js → index-BAGVbiiM.js} +1 -1
- package/dist/assets/{index-VzPCd0L-.js → index-BD86tRnn.js} +1 -1
- package/dist/assets/{index-BIdEjDD3.js → index-BGh0NOfw.js} +1 -1
- package/dist/assets/{index-BaEmw40f.js → index-BKiLhEyi.js} +1 -1
- package/dist/assets/{index-Ct0AJEN9.js → index-BNAjS3Tn.js} +1 -1
- package/dist/assets/{index-CwbqTlM4.js → index-BRSlJnxd.js} +1 -1
- package/dist/assets/{index-DjQIiDMo.js → index-BoL57v1D.js} +1 -1
- package/dist/assets/{index-Ey6XKYuP.js → index-C2GP2DWO.js} +1 -1
- package/dist/assets/{index-Vq1FAgYe.js → index-CM60VmgR.js} +1 -1
- package/dist/assets/index-CRLPoT61.js +6 -0
- package/dist/assets/{index-Bx-qi8fd.js → index-CRooGu6R.js} +1 -1
- package/dist/assets/{index--LMZMPY_.js → index-C_OSDuUb.js} +1 -1
- package/dist/assets/{index-Bm3ZL2dx.js → index-Cc7exUI5.js} +1 -1
- package/dist/assets/{index-Bw5hpWBz.js → index-Co66MgF6.js} +1 -1
- package/dist/assets/{index-1loWF1jV.js → index-CyBAoT0l.js} +1 -1
- package/dist/assets/{index-mN2sZqiu.js → index-D5tmtR-a.js} +1 -1
- package/dist/assets/{index-CfsTscFv.js → index-DINxWoMX.js} +1 -1
- package/dist/assets/{index-W6Xv87pg.js → index-DIiuo0-v.js} +1 -1
- package/dist/assets/index-DWXHJxFq.css +1 -0
- package/dist/assets/{index-BOhdfO95.js → index-DtrRL2jA.js} +1 -1
- package/dist/assets/{index-CXH_lcpK.js → index-EaY6ZYvr.js} +1 -1
- package/dist/assets/{index-p1BcqxXQ.js → index-mMqWkzUL.js} +1 -1
- package/dist/assets/{index-CdAUtS2Q.js → index-xLWv_qf6.js} +1 -1
- package/dist/assets/{index-BxnmQCT9.js → index-yOhbO3fy.js} +1 -1
- package/dist/assets/{index.es-C3XngPKv.js → index.es-CaOIcY7v.js} +1 -1
- package/dist/assets/{insert-business-trip-modal-BHY3QQup.js → insert-business-trip-modal-BwOnvw7X.js} +1 -1
- package/dist/assets/issue-document-CzBtBCCO.js +1 -0
- package/dist/assets/{list-plus-ZvPwjqZn.js → list-plus-CGvSlslE.js} +1 -1
- package/dist/assets/{login-page-CsXdm3AZ.js → login-page-BTcklqv4.js} +1 -1
- package/dist/assets/{match-document-modal-Cqimg0VE.js → match-document-modal-DcL0siQq.js} +1 -1
- package/dist/assets/{missing-info-charges-DxLGt6Xs.js → missing-info-charges-DfwRkzNe.js} +1 -1
- package/dist/assets/{modal-Nvfe-DMu.js → modal-B0uNLang.js} +1 -1
- package/dist/assets/{page-layout-SHFb6rY4.js → page-layout-C0GJoVTR.js} +1 -1
- package/dist/assets/{page-not-found-BZ6s-Q5n.js → page-not-found-9UX5vsGE.js} +1 -1
- package/dist/assets/{panel-top-open-C3Q9X7Tg.js → panel-top-open-BFNhAe3f.js} +1 -1
- package/dist/assets/{pencil-CPPx1BhC.js → pencil-9Th5X-OY.js} +1 -1
- package/dist/assets/{report-commentary-row-DpYgprQr.js → report-commentary-row-CNIlhboC.js} +1 -1
- package/dist/assets/{save-D-W46u2J.js → save-qtyyZLc5.js} +1 -1
- package/dist/assets/{similar-transactions-modal-zQY2R-sr.js → similar-transactions-modal-nk8VHEtX.js} +1 -1
- package/dist/assets/{sub-7frHBT3Y.js → sub-fkVv9ghZ.js} +1 -1
- package/dist/assets/subMonths-5wFmciT1.js +1 -0
- package/dist/assets/{summary-DwX_dmjr.js → summary-DuWhfNdL.js} +1 -1
- package/dist/assets/{toggle-expansion-button-Bh24n-cz.js → toggle-expansion-button-41Ejffq3.js} +1 -1
- package/dist/assets/tooltip-lhMCop8U.js +1 -0
- package/dist/assets/{use-url-query-COmN7DHP.js → use-url-query-BPzyQB93.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/providers/index.ts +4 -0
- package/dist/assets/index-BUJm5I0K.css +0 -1
- package/dist/assets/index-DFgRsYAU.js +0 -6
- package/dist/assets/issue-document-BpzcqnRu.js +0 -1
- package/dist/assets/subMonths-CY79vHaS.js +0 -1
- package/dist/assets/tooltip-BaULIFLC.js +0 -1
- package/src/components/ui/pagination.tsx +0 -194
- package/src/providers/index.tsx +0 -56
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import React, { type ComponentProps } from 'react';
|
|
2
|
-
import { ChevronsLeftIcon, ChevronsRightIcon } from 'lucide-react';
|
|
3
|
-
import { Button } from '@/components/ui/button.js';
|
|
4
|
-
import { cn } from '@/lib/utils.js';
|
|
5
|
-
import { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';
|
|
6
|
-
|
|
7
|
-
interface PaginationProps extends Omit<React.ComponentProps<'nav'>, 'onChange' | 'value'> {
|
|
8
|
-
onChange: (page: number) => void;
|
|
9
|
-
total: number;
|
|
10
|
-
value: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const Pagination = ({ onChange, total, value, ...props }: PaginationProps) => {
|
|
14
|
-
if (total <= 1) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
const currentPage = value + 1;
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<PaginationWrapper {...props}>
|
|
21
|
-
<PaginationContent>
|
|
22
|
-
{/* previous button */}
|
|
23
|
-
<PaginationItem>
|
|
24
|
-
<PaginationPrevious disabled={currentPage <= 1} onClick={() => onChange(value - 1)} />
|
|
25
|
-
</PaginationItem>
|
|
26
|
-
|
|
27
|
-
{/* first page button */}
|
|
28
|
-
{total > 3 && currentPage > 1 && (
|
|
29
|
-
<PaginationItem>
|
|
30
|
-
<PaginationLink onClick={() => onChange(0)}>1</PaginationLink>
|
|
31
|
-
</PaginationItem>
|
|
32
|
-
)}
|
|
33
|
-
|
|
34
|
-
{total > 3 && currentPage > 3 && (
|
|
35
|
-
<PaginationItem>
|
|
36
|
-
<PaginationEllipsis />
|
|
37
|
-
</PaginationItem>
|
|
38
|
-
)}
|
|
39
|
-
|
|
40
|
-
{currentPage > 2 && (
|
|
41
|
-
<PaginationItem>
|
|
42
|
-
<PaginationLink onClick={() => onChange(value - 1)}>{currentPage - 1}</PaginationLink>
|
|
43
|
-
</PaginationItem>
|
|
44
|
-
)}
|
|
45
|
-
<PaginationItem>
|
|
46
|
-
<PaginationLink onClick={() => {}} isActive>
|
|
47
|
-
{currentPage}
|
|
48
|
-
</PaginationLink>
|
|
49
|
-
</PaginationItem>
|
|
50
|
-
{currentPage < total - 1 && (
|
|
51
|
-
<PaginationItem>
|
|
52
|
-
<PaginationLink onClick={() => onChange(value + 1)}>{currentPage + 1}</PaginationLink>
|
|
53
|
-
</PaginationItem>
|
|
54
|
-
)}
|
|
55
|
-
|
|
56
|
-
{total > 3 && currentPage < total - 2 && (
|
|
57
|
-
<PaginationItem>
|
|
58
|
-
<PaginationEllipsis />
|
|
59
|
-
</PaginationItem>
|
|
60
|
-
)}
|
|
61
|
-
|
|
62
|
-
{/* last page button */}
|
|
63
|
-
{total > 3 && currentPage < total && (
|
|
64
|
-
<PaginationItem>
|
|
65
|
-
<PaginationLink onClick={() => onChange(total - 1)}>{total}</PaginationLink>
|
|
66
|
-
</PaginationItem>
|
|
67
|
-
)}
|
|
68
|
-
{/* next button */}
|
|
69
|
-
<PaginationItem>
|
|
70
|
-
<PaginationNext disabled={currentPage >= total} onClick={() => onChange(value + 1)} />
|
|
71
|
-
</PaginationItem>
|
|
72
|
-
</PaginationContent>
|
|
73
|
-
</PaginationWrapper>
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
Pagination.displayName = 'Pagination';
|
|
77
|
-
|
|
78
|
-
const PaginationWrapper = ({ className, ...props }: React.ComponentProps<'nav'>) => (
|
|
79
|
-
<nav
|
|
80
|
-
role="navigation"
|
|
81
|
-
aria-label="paginationWrapper"
|
|
82
|
-
className={cn('mx-auto flex w-full justify-center', className)}
|
|
83
|
-
{...props}
|
|
84
|
-
/>
|
|
85
|
-
);
|
|
86
|
-
PaginationWrapper.displayName = 'PaginationWrapper';
|
|
87
|
-
|
|
88
|
-
const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<'ul'>>(
|
|
89
|
-
({ className, ...props }, ref) => (
|
|
90
|
-
<ul ref={ref} className={cn('flex flex-row items-center gap-1', className)} {...props} />
|
|
91
|
-
),
|
|
92
|
-
);
|
|
93
|
-
PaginationContent.displayName = 'PaginationContent';
|
|
94
|
-
|
|
95
|
-
const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(
|
|
96
|
-
({ className, ...props }, ref) => <li ref={ref} className={cn('', className)} {...props} />,
|
|
97
|
-
);
|
|
98
|
-
PaginationItem.displayName = 'PaginationItem';
|
|
99
|
-
|
|
100
|
-
type PaginationLinkProps = {
|
|
101
|
-
isActive?: boolean;
|
|
102
|
-
} & ComponentProps<typeof Button>;
|
|
103
|
-
|
|
104
|
-
const PaginationLink = ({
|
|
105
|
-
className,
|
|
106
|
-
isActive,
|
|
107
|
-
size = 'icon',
|
|
108
|
-
children,
|
|
109
|
-
...props
|
|
110
|
-
}: PaginationLinkProps) => (
|
|
111
|
-
<Button
|
|
112
|
-
aria-current={isActive ? 'page' : undefined}
|
|
113
|
-
variant={isActive ? 'outline' : 'ghost'}
|
|
114
|
-
size={size}
|
|
115
|
-
className={className}
|
|
116
|
-
{...props}
|
|
117
|
-
>
|
|
118
|
-
{children}
|
|
119
|
-
</Button>
|
|
120
|
-
);
|
|
121
|
-
PaginationLink.displayName = 'PaginationLink';
|
|
122
|
-
|
|
123
|
-
const PaginationPrevious = ({
|
|
124
|
-
className,
|
|
125
|
-
...props
|
|
126
|
-
}: React.ComponentProps<typeof PaginationLink>) => (
|
|
127
|
-
<PaginationLink
|
|
128
|
-
aria-label="Go to previous page"
|
|
129
|
-
size="default"
|
|
130
|
-
className={cn('gap-1 pl-2.5', className)}
|
|
131
|
-
{...props}
|
|
132
|
-
>
|
|
133
|
-
<ChevronLeftIcon className="h-4 w-4" />
|
|
134
|
-
</PaginationLink>
|
|
135
|
-
);
|
|
136
|
-
PaginationPrevious.displayName = 'PaginationPrevious';
|
|
137
|
-
|
|
138
|
-
const PaginationFirst = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
|
|
139
|
-
<PaginationLink
|
|
140
|
-
aria-label="Go to First page"
|
|
141
|
-
size="default"
|
|
142
|
-
className={cn('gap-1 pl-2.5', className)}
|
|
143
|
-
{...props}
|
|
144
|
-
>
|
|
145
|
-
<ChevronsLeftIcon className="h-4 w-4" />
|
|
146
|
-
</PaginationLink>
|
|
147
|
-
);
|
|
148
|
-
PaginationFirst.displayName = 'PaginationFirst';
|
|
149
|
-
|
|
150
|
-
const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
|
|
151
|
-
<PaginationLink
|
|
152
|
-
aria-label="Go to next page"
|
|
153
|
-
size="default"
|
|
154
|
-
className={cn('gap-1 pr-2.5', className)}
|
|
155
|
-
{...props}
|
|
156
|
-
>
|
|
157
|
-
<ChevronRightIcon className="h-4 w-4" />
|
|
158
|
-
</PaginationLink>
|
|
159
|
-
);
|
|
160
|
-
PaginationNext.displayName = 'PaginationNext';
|
|
161
|
-
|
|
162
|
-
const PaginationLast = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
|
|
163
|
-
<PaginationLink
|
|
164
|
-
aria-label="Go to Last page"
|
|
165
|
-
size="default"
|
|
166
|
-
className={cn('gap-1 pr-2.5', className)}
|
|
167
|
-
{...props}
|
|
168
|
-
>
|
|
169
|
-
<ChevronsRightIcon className="h-4 w-4" />
|
|
170
|
-
</PaginationLink>
|
|
171
|
-
);
|
|
172
|
-
PaginationLast.displayName = 'PaginationLast';
|
|
173
|
-
|
|
174
|
-
const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<'span'>) => (
|
|
175
|
-
<span
|
|
176
|
-
aria-hidden
|
|
177
|
-
className={cn('flex h-9 w-9 items-center justify-center', className)}
|
|
178
|
-
{...props}
|
|
179
|
-
>
|
|
180
|
-
<DotsHorizontalIcon className="h-4 w-4" />
|
|
181
|
-
<span className="sr-only">More pages</span>
|
|
182
|
-
</span>
|
|
183
|
-
);
|
|
184
|
-
PaginationEllipsis.displayName = 'PaginationEllipsis';
|
|
185
|
-
|
|
186
|
-
export {
|
|
187
|
-
Pagination,
|
|
188
|
-
PaginationContent,
|
|
189
|
-
PaginationLink,
|
|
190
|
-
PaginationItem,
|
|
191
|
-
PaginationPrevious,
|
|
192
|
-
PaginationNext,
|
|
193
|
-
PaginationEllipsis,
|
|
194
|
-
};
|
package/src/providers/index.tsx
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { MantineProvider } from '@mantine/core';
|
|
3
|
-
import { CssBaseline, ThemeProvider } from '@mui/material';
|
|
4
|
-
import { red } from '@mui/material/colors';
|
|
5
|
-
import { createTheme } from '@mui/material/styles';
|
|
6
|
-
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
7
|
-
import { Toaster } from '../components/ui/sonner.js';
|
|
8
|
-
import { AuthContext, AuthGuard, AuthProvider } from './auth-guard.js';
|
|
9
|
-
import { UrqlProvider } from './urql.js';
|
|
10
|
-
import { UserContext, UserProvider, type UserInfo } from './user-provider.js';
|
|
11
|
-
|
|
12
|
-
export { AuthGuard, AuthProvider, AuthContext };
|
|
13
|
-
export { FiltersContext } from './filters-context.js';
|
|
14
|
-
export { UrqlProvider };
|
|
15
|
-
export { UserProvider, UserContext, type UserInfo };
|
|
16
|
-
|
|
17
|
-
const queryClient = new QueryClient();
|
|
18
|
-
|
|
19
|
-
export function Providers({ children }: { children?: ReactNode }): ReactElement {
|
|
20
|
-
const theme = createTheme({
|
|
21
|
-
palette: {
|
|
22
|
-
primary: {
|
|
23
|
-
main: '#556cd6',
|
|
24
|
-
},
|
|
25
|
-
secondary: {
|
|
26
|
-
main: '#19857b',
|
|
27
|
-
},
|
|
28
|
-
error: {
|
|
29
|
-
main: red.A400,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<MantineProvider
|
|
36
|
-
// withNormalizeCSS
|
|
37
|
-
withGlobalStyles
|
|
38
|
-
theme={{
|
|
39
|
-
fontFamily: 'Roboto, sans-serif',
|
|
40
|
-
fontSizes: { md: '14' },
|
|
41
|
-
}}
|
|
42
|
-
>
|
|
43
|
-
<ThemeProvider theme={theme}>
|
|
44
|
-
<CssBaseline />
|
|
45
|
-
<Toaster />
|
|
46
|
-
<AuthGuard>
|
|
47
|
-
<UrqlProvider>
|
|
48
|
-
<QueryClientProvider client={queryClient}>
|
|
49
|
-
<UserProvider>{children}</UserProvider>
|
|
50
|
-
</QueryClientProvider>
|
|
51
|
-
</UrqlProvider>
|
|
52
|
-
</AuthGuard>
|
|
53
|
-
</ThemeProvider>
|
|
54
|
-
</MantineProvider>
|
|
55
|
-
);
|
|
56
|
-
}
|