@voyantjs/finance-ui 0.16.0 → 0.18.0

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.
@@ -0,0 +1,92 @@
1
+ export declare const financeUiEn: {
2
+ common: {
3
+ cancel: string;
4
+ saveChanges: string;
5
+ invoiceStatusLabels: {
6
+ draft: string;
7
+ sent: string;
8
+ partially_paid: string;
9
+ paid: string;
10
+ overdue: string;
11
+ void: string;
12
+ };
13
+ supplierPaymentMethodLabels: {
14
+ bank_transfer: string;
15
+ credit_card: string;
16
+ cash: string;
17
+ cheque: string;
18
+ other: string;
19
+ };
20
+ supplierPaymentStatusLabels: {
21
+ pending: string;
22
+ completed: string;
23
+ failed: string;
24
+ refunded: string;
25
+ };
26
+ };
27
+ invoiceDialog: {
28
+ titles: {
29
+ create: string;
30
+ edit: string;
31
+ };
32
+ fields: {
33
+ invoiceNumber: string;
34
+ status: string;
35
+ bookingId: string;
36
+ currency: string;
37
+ subtotalCents: string;
38
+ taxCents: string;
39
+ totalCents: string;
40
+ issueDate: string;
41
+ dueDate: string;
42
+ notes: string;
43
+ };
44
+ placeholders: {
45
+ invoiceNumber: string;
46
+ bookingId: string;
47
+ issueDate: string;
48
+ dueDate: string;
49
+ notes: string;
50
+ };
51
+ actions: {
52
+ create: string;
53
+ };
54
+ validation: {
55
+ invoiceNumberRequired: string;
56
+ bookingIdRequired: string;
57
+ currencyIsoCode: string;
58
+ issueDateRequired: string;
59
+ dueDateRequired: string;
60
+ };
61
+ };
62
+ supplierPaymentDialog: {
63
+ title: string;
64
+ fields: {
65
+ bookingId: string;
66
+ supplierId: string;
67
+ amountCents: string;
68
+ currency: string;
69
+ paymentDate: string;
70
+ paymentMethod: string;
71
+ status: string;
72
+ referenceNumber: string;
73
+ notes: string;
74
+ };
75
+ placeholders: {
76
+ bookingId: string;
77
+ supplierId: string;
78
+ paymentDate: string;
79
+ referenceNumber: string;
80
+ notes: string;
81
+ };
82
+ actions: {
83
+ create: string;
84
+ };
85
+ validation: {
86
+ bookingIdRequired: string;
87
+ amountMinimum: string;
88
+ paymentDateRequired: string;
89
+ };
90
+ };
91
+ };
92
+ //# sourceMappingURL=en.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FK,CAAA"}
@@ -0,0 +1,91 @@
1
+ export const financeUiEn = {
2
+ common: {
3
+ cancel: "Cancel",
4
+ saveChanges: "Save Changes",
5
+ invoiceStatusLabels: {
6
+ draft: "Draft",
7
+ sent: "Sent",
8
+ partially_paid: "Partially Paid",
9
+ paid: "Paid",
10
+ overdue: "Overdue",
11
+ void: "Void",
12
+ },
13
+ supplierPaymentMethodLabels: {
14
+ bank_transfer: "Bank Transfer",
15
+ credit_card: "Credit Card",
16
+ cash: "Cash",
17
+ cheque: "Cheque",
18
+ other: "Other",
19
+ },
20
+ supplierPaymentStatusLabels: {
21
+ pending: "Pending",
22
+ completed: "Completed",
23
+ failed: "Failed",
24
+ refunded: "Refunded",
25
+ },
26
+ },
27
+ invoiceDialog: {
28
+ titles: {
29
+ create: "New Invoice",
30
+ edit: "Edit Invoice",
31
+ },
32
+ fields: {
33
+ invoiceNumber: "Invoice Number",
34
+ status: "Status",
35
+ bookingId: "Booking ID",
36
+ currency: "Currency",
37
+ subtotalCents: "Subtotal (cents)",
38
+ taxCents: "Tax (cents)",
39
+ totalCents: "Total (cents)",
40
+ issueDate: "Issue Date",
41
+ dueDate: "Due Date",
42
+ notes: "Notes",
43
+ },
44
+ placeholders: {
45
+ invoiceNumber: "INV-2025-1234",
46
+ bookingId: "book_...",
47
+ issueDate: "Pick issue date",
48
+ dueDate: "Pick due date",
49
+ notes: "Invoice notes...",
50
+ },
51
+ actions: {
52
+ create: "Create Invoice",
53
+ },
54
+ validation: {
55
+ invoiceNumberRequired: "Invoice number is required",
56
+ bookingIdRequired: "Booking ID is required",
57
+ currencyIsoCode: "Use 3-letter ISO code",
58
+ issueDateRequired: "Issue date is required",
59
+ dueDateRequired: "Due date is required",
60
+ },
61
+ },
62
+ supplierPaymentDialog: {
63
+ title: "Record Supplier Payment",
64
+ fields: {
65
+ bookingId: "Booking ID",
66
+ supplierId: "Supplier ID (optional)",
67
+ amountCents: "Amount (cents)",
68
+ currency: "Currency",
69
+ paymentDate: "Payment Date",
70
+ paymentMethod: "Payment Method",
71
+ status: "Status",
72
+ referenceNumber: "Reference Number",
73
+ notes: "Notes",
74
+ },
75
+ placeholders: {
76
+ bookingId: "book_...",
77
+ supplierId: "supp_...",
78
+ paymentDate: "Select payment date",
79
+ referenceNumber: "TXN-12345",
80
+ notes: "Payment notes...",
81
+ },
82
+ actions: {
83
+ create: "Record Payment",
84
+ },
85
+ validation: {
86
+ bookingIdRequired: "Booking ID is required",
87
+ amountMinimum: "Amount must be at least 1",
88
+ paymentDateRequired: "Payment date is required",
89
+ },
90
+ },
91
+ };
@@ -0,0 +1,5 @@
1
+ export { financeUiEn } from "./en";
2
+ export type { FinanceUiMessages, InvoiceStatus, SupplierPaymentMethod, SupplierPaymentStatus, } from "./messages";
3
+ export { type FinanceUiMessageOverrides, FinanceUiMessagesProvider, financeUiMessageDefinitions, getFinanceUiI18n, resolveFinanceUiMessages, useFinanceUiI18n, useFinanceUiI18nOrDefault, useFinanceUiMessages, useFinanceUiMessagesOrDefault, } from "./provider";
4
+ export { financeUiRo } from "./ro";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAClC,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,KAAK,yBAAyB,EAC9B,yBAAyB,EACzB,2BAA2B,EAC3B,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { financeUiEn } from "./en";
2
+ export { FinanceUiMessagesProvider, financeUiMessageDefinitions, getFinanceUiI18n, resolveFinanceUiMessages, useFinanceUiI18n, useFinanceUiI18nOrDefault, useFinanceUiMessages, useFinanceUiMessagesOrDefault, } from "./provider";
3
+ export { financeUiRo } from "./ro";
@@ -0,0 +1,81 @@
1
+ import type { InvoiceRecord, SupplierPaymentRecord } from "@voyantjs/finance-react";
2
+ export declare const invoiceStatuses: readonly ["draft", "sent", "partially_paid", "paid", "overdue", "void"];
3
+ export declare const supplierPaymentMethods: readonly ["bank_transfer", "credit_card", "cash", "cheque", "other"];
4
+ export declare const supplierPaymentStatuses: readonly ["pending", "completed", "failed", "refunded"];
5
+ export type InvoiceStatus = InvoiceRecord["status"];
6
+ export type SupplierPaymentMethod = (typeof supplierPaymentMethods)[number];
7
+ export type SupplierPaymentStatus = SupplierPaymentRecord["status"];
8
+ export type FinanceUiMessages = {
9
+ common: {
10
+ cancel: string;
11
+ saveChanges: string;
12
+ invoiceStatusLabels: Record<InvoiceStatus, string>;
13
+ supplierPaymentMethodLabels: Record<SupplierPaymentMethod, string>;
14
+ supplierPaymentStatusLabels: Record<SupplierPaymentStatus, string>;
15
+ };
16
+ invoiceDialog: {
17
+ titles: {
18
+ create: string;
19
+ edit: string;
20
+ };
21
+ fields: {
22
+ invoiceNumber: string;
23
+ status: string;
24
+ bookingId: string;
25
+ currency: string;
26
+ subtotalCents: string;
27
+ taxCents: string;
28
+ totalCents: string;
29
+ issueDate: string;
30
+ dueDate: string;
31
+ notes: string;
32
+ };
33
+ placeholders: {
34
+ invoiceNumber: string;
35
+ bookingId: string;
36
+ issueDate: string;
37
+ dueDate: string;
38
+ notes: string;
39
+ };
40
+ actions: {
41
+ create: string;
42
+ };
43
+ validation: {
44
+ invoiceNumberRequired: string;
45
+ bookingIdRequired: string;
46
+ currencyIsoCode: string;
47
+ issueDateRequired: string;
48
+ dueDateRequired: string;
49
+ };
50
+ };
51
+ supplierPaymentDialog: {
52
+ title: string;
53
+ fields: {
54
+ bookingId: string;
55
+ supplierId: string;
56
+ amountCents: string;
57
+ currency: string;
58
+ paymentDate: string;
59
+ paymentMethod: string;
60
+ status: string;
61
+ referenceNumber: string;
62
+ notes: string;
63
+ };
64
+ placeholders: {
65
+ bookingId: string;
66
+ supplierId: string;
67
+ paymentDate: string;
68
+ referenceNumber: string;
69
+ notes: string;
70
+ };
71
+ actions: {
72
+ create: string;
73
+ };
74
+ validation: {
75
+ bookingIdRequired: string;
76
+ amountMinimum: string;
77
+ paymentDateRequired: string;
78
+ };
79
+ };
80
+ };
81
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAEnF,eAAO,MAAM,eAAe,yEAOlB,CAAA;AAEV,eAAO,MAAM,sBAAsB,sEAMzB,CAAA;AAEV,eAAO,MAAM,uBAAuB,yDAA0D,CAAA;AAE9F,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;AACnD,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC3E,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAA;AAEnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAA;QACd,WAAW,EAAE,MAAM,CAAA;QACnB,mBAAmB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;QAClD,2BAA2B,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;QAClE,2BAA2B,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;KACnE,CAAA;IACD,aAAa,EAAE;QACb,MAAM,EAAE;YACN,MAAM,EAAE,MAAM,CAAA;YACd,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;QACD,MAAM,EAAE;YACN,aAAa,EAAE,MAAM,CAAA;YACrB,MAAM,EAAE,MAAM,CAAA;YACd,SAAS,EAAE,MAAM,CAAA;YACjB,QAAQ,EAAE,MAAM,CAAA;YAChB,aAAa,EAAE,MAAM,CAAA;YACrB,QAAQ,EAAE,MAAM,CAAA;YAChB,UAAU,EAAE,MAAM,CAAA;YAClB,SAAS,EAAE,MAAM,CAAA;YACjB,OAAO,EAAE,MAAM,CAAA;YACf,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,YAAY,EAAE;YACZ,aAAa,EAAE,MAAM,CAAA;YACrB,SAAS,EAAE,MAAM,CAAA;YACjB,SAAS,EAAE,MAAM,CAAA;YACjB,OAAO,EAAE,MAAM,CAAA;YACf,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,OAAO,EAAE;YACP,MAAM,EAAE,MAAM,CAAA;SACf,CAAA;QACD,UAAU,EAAE;YACV,qBAAqB,EAAE,MAAM,CAAA;YAC7B,iBAAiB,EAAE,MAAM,CAAA;YACzB,eAAe,EAAE,MAAM,CAAA;YACvB,iBAAiB,EAAE,MAAM,CAAA;YACzB,eAAe,EAAE,MAAM,CAAA;SACxB,CAAA;KACF,CAAA;IACD,qBAAqB,EAAE;QACrB,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE;YACN,SAAS,EAAE,MAAM,CAAA;YACjB,UAAU,EAAE,MAAM,CAAA;YAClB,WAAW,EAAE,MAAM,CAAA;YACnB,QAAQ,EAAE,MAAM,CAAA;YAChB,WAAW,EAAE,MAAM,CAAA;YACnB,aAAa,EAAE,MAAM,CAAA;YACrB,MAAM,EAAE,MAAM,CAAA;YACd,eAAe,EAAE,MAAM,CAAA;YACvB,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,YAAY,EAAE;YACZ,SAAS,EAAE,MAAM,CAAA;YACjB,UAAU,EAAE,MAAM,CAAA;YAClB,WAAW,EAAE,MAAM,CAAA;YACnB,eAAe,EAAE,MAAM,CAAA;YACvB,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,OAAO,EAAE;YACP,MAAM,EAAE,MAAM,CAAA;SACf,CAAA;QACD,UAAU,EAAE;YACV,iBAAiB,EAAE,MAAM,CAAA;YACzB,aAAa,EAAE,MAAM,CAAA;YACrB,mBAAmB,EAAE,MAAM,CAAA;SAC5B,CAAA;KACF,CAAA;CACF,CAAA"}
@@ -0,0 +1,16 @@
1
+ export const invoiceStatuses = [
2
+ "draft",
3
+ "sent",
4
+ "partially_paid",
5
+ "paid",
6
+ "overdue",
7
+ "void",
8
+ ];
9
+ export const supplierPaymentMethods = [
10
+ "bank_transfer",
11
+ "credit_card",
12
+ "cash",
13
+ "cheque",
14
+ "other",
15
+ ];
16
+ export const supplierPaymentStatuses = ["pending", "completed", "failed", "refunded"];
@@ -0,0 +1,206 @@
1
+ import { type LocaleMessageOverrides, type PackageI18nValue } from "@voyantjs/i18n";
2
+ import type { ReactNode } from "react";
3
+ import type { FinanceUiMessages } from "./messages";
4
+ export declare const financeUiMessageDefinitions: {
5
+ en: {
6
+ common: {
7
+ cancel: string;
8
+ saveChanges: string;
9
+ invoiceStatusLabels: {
10
+ draft: string;
11
+ sent: string;
12
+ partially_paid: string;
13
+ paid: string;
14
+ overdue: string;
15
+ void: string;
16
+ };
17
+ supplierPaymentMethodLabels: {
18
+ bank_transfer: string;
19
+ credit_card: string;
20
+ cash: string;
21
+ cheque: string;
22
+ other: string;
23
+ };
24
+ supplierPaymentStatusLabels: {
25
+ pending: string;
26
+ completed: string;
27
+ failed: string;
28
+ refunded: string;
29
+ };
30
+ };
31
+ invoiceDialog: {
32
+ titles: {
33
+ create: string;
34
+ edit: string;
35
+ };
36
+ fields: {
37
+ invoiceNumber: string;
38
+ status: string;
39
+ bookingId: string;
40
+ currency: string;
41
+ subtotalCents: string;
42
+ taxCents: string;
43
+ totalCents: string;
44
+ issueDate: string;
45
+ dueDate: string;
46
+ notes: string;
47
+ };
48
+ placeholders: {
49
+ invoiceNumber: string;
50
+ bookingId: string;
51
+ issueDate: string;
52
+ dueDate: string;
53
+ notes: string;
54
+ };
55
+ actions: {
56
+ create: string;
57
+ };
58
+ validation: {
59
+ invoiceNumberRequired: string;
60
+ bookingIdRequired: string;
61
+ currencyIsoCode: string;
62
+ issueDateRequired: string;
63
+ dueDateRequired: string;
64
+ };
65
+ };
66
+ supplierPaymentDialog: {
67
+ title: string;
68
+ fields: {
69
+ bookingId: string;
70
+ supplierId: string;
71
+ amountCents: string;
72
+ currency: string;
73
+ paymentDate: string;
74
+ paymentMethod: string;
75
+ status: string;
76
+ referenceNumber: string;
77
+ notes: string;
78
+ };
79
+ placeholders: {
80
+ bookingId: string;
81
+ supplierId: string;
82
+ paymentDate: string;
83
+ referenceNumber: string;
84
+ notes: string;
85
+ };
86
+ actions: {
87
+ create: string;
88
+ };
89
+ validation: {
90
+ bookingIdRequired: string;
91
+ amountMinimum: string;
92
+ paymentDateRequired: string;
93
+ };
94
+ };
95
+ };
96
+ ro: {
97
+ common: {
98
+ cancel: string;
99
+ saveChanges: string;
100
+ invoiceStatusLabels: {
101
+ draft: string;
102
+ sent: string;
103
+ partially_paid: string;
104
+ paid: string;
105
+ overdue: string;
106
+ void: string;
107
+ };
108
+ supplierPaymentMethodLabels: {
109
+ bank_transfer: string;
110
+ credit_card: string;
111
+ cash: string;
112
+ cheque: string;
113
+ other: string;
114
+ };
115
+ supplierPaymentStatusLabels: {
116
+ pending: string;
117
+ completed: string;
118
+ failed: string;
119
+ refunded: string;
120
+ };
121
+ };
122
+ invoiceDialog: {
123
+ titles: {
124
+ create: string;
125
+ edit: string;
126
+ };
127
+ fields: {
128
+ invoiceNumber: string;
129
+ status: string;
130
+ bookingId: string;
131
+ currency: string;
132
+ subtotalCents: string;
133
+ taxCents: string;
134
+ totalCents: string;
135
+ issueDate: string;
136
+ dueDate: string;
137
+ notes: string;
138
+ };
139
+ placeholders: {
140
+ invoiceNumber: string;
141
+ bookingId: string;
142
+ issueDate: string;
143
+ dueDate: string;
144
+ notes: string;
145
+ };
146
+ actions: {
147
+ create: string;
148
+ };
149
+ validation: {
150
+ invoiceNumberRequired: string;
151
+ bookingIdRequired: string;
152
+ currencyIsoCode: string;
153
+ issueDateRequired: string;
154
+ dueDateRequired: string;
155
+ };
156
+ };
157
+ supplierPaymentDialog: {
158
+ title: string;
159
+ fields: {
160
+ bookingId: string;
161
+ supplierId: string;
162
+ amountCents: string;
163
+ currency: string;
164
+ paymentDate: string;
165
+ paymentMethod: string;
166
+ status: string;
167
+ referenceNumber: string;
168
+ notes: string;
169
+ };
170
+ placeholders: {
171
+ bookingId: string;
172
+ supplierId: string;
173
+ paymentDate: string;
174
+ referenceNumber: string;
175
+ notes: string;
176
+ };
177
+ actions: {
178
+ create: string;
179
+ };
180
+ validation: {
181
+ bookingIdRequired: string;
182
+ amountMinimum: string;
183
+ paymentDateRequired: string;
184
+ };
185
+ };
186
+ };
187
+ };
188
+ export type FinanceUiMessageOverrides = LocaleMessageOverrides<FinanceUiMessages>;
189
+ export declare function resolveFinanceUiMessages({ locale, overrides, }: {
190
+ locale: string | null | undefined;
191
+ overrides?: FinanceUiMessageOverrides | null;
192
+ }): FinanceUiMessages;
193
+ export declare function getFinanceUiI18n({ locale, overrides, }: {
194
+ locale?: string | null | undefined;
195
+ overrides?: FinanceUiMessageOverrides | null;
196
+ }): PackageI18nValue<FinanceUiMessages>;
197
+ export declare function FinanceUiMessagesProvider({ children, locale, overrides, }: {
198
+ children: ReactNode;
199
+ locale: string | null | undefined;
200
+ overrides?: FinanceUiMessageOverrides | null;
201
+ }): import("react/jsx-runtime").JSX.Element;
202
+ export declare const useFinanceUiI18n: () => PackageI18nValue<FinanceUiMessages>;
203
+ export declare const useFinanceUiMessages: () => FinanceUiMessages;
204
+ export declare function useFinanceUiI18nOrDefault(): PackageI18nValue<FinanceUiMessages>;
205
+ export declare function useFinanceUiMessagesOrDefault(): FinanceUiMessages;
206
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/i18n/provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAKnD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGe,CAAA;AAEvD,MAAM,MAAM,yBAAyB,GAAG,sBAAsB,CAAC,iBAAiB,CAAC,CAAA;AASjF,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;CAC7C,qBAOA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAClC,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;CAC7C,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAStC;AAED,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,MAAM,EACN,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;CAC7C,2CAWA;AAED,eAAO,MAAM,gBAAgB,2CAA2B,CAAA;AACxD,eAAO,MAAM,oBAAoB,yBAA+B,CAAA;AAEhE,wBAAgB,yBAAyB,wCAExC;AAED,wBAAgB,6BAA6B,sBAE5C"}
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { createLocaleFormatters, createPackageMessagesContext, resolvePackageMessages, } from "@voyantjs/i18n";
4
+ import { financeUiEn } from "./en";
5
+ import { financeUiRo } from "./ro";
6
+ const fallbackLocale = "en";
7
+ export const financeUiMessageDefinitions = {
8
+ en: financeUiEn,
9
+ ro: financeUiRo,
10
+ };
11
+ const financeUiContext = createPackageMessagesContext("FinanceUiMessages");
12
+ const defaultFinanceUiI18n = {
13
+ messages: financeUiEn,
14
+ ...createLocaleFormatters(fallbackLocale),
15
+ };
16
+ export function resolveFinanceUiMessages({ locale, overrides, }) {
17
+ return resolvePackageMessages({
18
+ definitions: financeUiMessageDefinitions,
19
+ fallbackLocale,
20
+ locale,
21
+ overrides,
22
+ });
23
+ }
24
+ export function getFinanceUiI18n({ locale, overrides, }) {
25
+ const resolvedLocale = locale ?? fallbackLocale;
26
+ return {
27
+ messages: resolveFinanceUiMessages({
28
+ locale: resolvedLocale,
29
+ overrides,
30
+ }),
31
+ ...createLocaleFormatters(resolvedLocale),
32
+ };
33
+ }
34
+ export function FinanceUiMessagesProvider({ children, locale, overrides, }) {
35
+ return (_jsx(financeUiContext.ResolvedMessagesProvider, { definitions: financeUiMessageDefinitions, fallbackLocale: fallbackLocale, locale: locale, overrides: overrides, children: children }));
36
+ }
37
+ export const useFinanceUiI18n = financeUiContext.useI18n;
38
+ export const useFinanceUiMessages = financeUiContext.useMessages;
39
+ export function useFinanceUiI18nOrDefault() {
40
+ return financeUiContext.useOptionalI18n() ?? defaultFinanceUiI18n;
41
+ }
42
+ export function useFinanceUiMessagesOrDefault() {
43
+ return useFinanceUiI18nOrDefault().messages;
44
+ }
@@ -0,0 +1,92 @@
1
+ export declare const financeUiRo: {
2
+ common: {
3
+ cancel: string;
4
+ saveChanges: string;
5
+ invoiceStatusLabels: {
6
+ draft: string;
7
+ sent: string;
8
+ partially_paid: string;
9
+ paid: string;
10
+ overdue: string;
11
+ void: string;
12
+ };
13
+ supplierPaymentMethodLabels: {
14
+ bank_transfer: string;
15
+ credit_card: string;
16
+ cash: string;
17
+ cheque: string;
18
+ other: string;
19
+ };
20
+ supplierPaymentStatusLabels: {
21
+ pending: string;
22
+ completed: string;
23
+ failed: string;
24
+ refunded: string;
25
+ };
26
+ };
27
+ invoiceDialog: {
28
+ titles: {
29
+ create: string;
30
+ edit: string;
31
+ };
32
+ fields: {
33
+ invoiceNumber: string;
34
+ status: string;
35
+ bookingId: string;
36
+ currency: string;
37
+ subtotalCents: string;
38
+ taxCents: string;
39
+ totalCents: string;
40
+ issueDate: string;
41
+ dueDate: string;
42
+ notes: string;
43
+ };
44
+ placeholders: {
45
+ invoiceNumber: string;
46
+ bookingId: string;
47
+ issueDate: string;
48
+ dueDate: string;
49
+ notes: string;
50
+ };
51
+ actions: {
52
+ create: string;
53
+ };
54
+ validation: {
55
+ invoiceNumberRequired: string;
56
+ bookingIdRequired: string;
57
+ currencyIsoCode: string;
58
+ issueDateRequired: string;
59
+ dueDateRequired: string;
60
+ };
61
+ };
62
+ supplierPaymentDialog: {
63
+ title: string;
64
+ fields: {
65
+ bookingId: string;
66
+ supplierId: string;
67
+ amountCents: string;
68
+ currency: string;
69
+ paymentDate: string;
70
+ paymentMethod: string;
71
+ status: string;
72
+ referenceNumber: string;
73
+ notes: string;
74
+ };
75
+ placeholders: {
76
+ bookingId: string;
77
+ supplierId: string;
78
+ paymentDate: string;
79
+ referenceNumber: string;
80
+ notes: string;
81
+ };
82
+ actions: {
83
+ create: string;
84
+ };
85
+ validation: {
86
+ bookingIdRequired: string;
87
+ amountMinimum: string;
88
+ paymentDateRequired: string;
89
+ };
90
+ };
91
+ };
92
+ //# sourceMappingURL=ro.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../src/i18n/ro.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FK,CAAA"}