@voyant-travel/identity-react 0.119.1

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.
Files changed (76) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +39 -0
  3. package/dist/client.d.ts +14 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +58 -0
  6. package/dist/components/address-dialog.d.ts +11 -0
  7. package/dist/components/address-dialog.d.ts.map +1 -0
  8. package/dist/components/address-dialog.js +130 -0
  9. package/dist/components/contact-point-dialog.d.ts +11 -0
  10. package/dist/components/contact-point-dialog.d.ts.map +1 -0
  11. package/dist/components/contact-point-dialog.js +78 -0
  12. package/dist/components/entity-ref-picker.d.ts +21 -0
  13. package/dist/components/entity-ref-picker.d.ts.map +1 -0
  14. package/dist/components/entity-ref-picker.js +38 -0
  15. package/dist/components/identity-page.d.ts +20 -0
  16. package/dist/components/identity-page.d.ts.map +1 -0
  17. package/dist/components/identity-page.js +230 -0
  18. package/dist/components/named-contact-dialog.d.ts +11 -0
  19. package/dist/components/named-contact-dialog.d.ts.map +1 -0
  20. package/dist/components/named-contact-dialog.js +101 -0
  21. package/dist/hooks/index.d.ts +7 -0
  22. package/dist/hooks/index.d.ts.map +1 -0
  23. package/dist/hooks/index.js +6 -0
  24. package/dist/hooks/use-address-mutation.d.ts +72 -0
  25. package/dist/hooks/use-address-mutation.d.ts.map +1 -0
  26. package/dist/hooks/use-address-mutation.js +40 -0
  27. package/dist/hooks/use-addresses.d.ts +31 -0
  28. package/dist/hooks/use-addresses.d.ts.map +1 -0
  29. package/dist/hooks/use-addresses.js +12 -0
  30. package/dist/hooks/use-contact-point-mutation.d.ts +51 -0
  31. package/dist/hooks/use-contact-point-mutation.d.ts.map +1 -0
  32. package/dist/hooks/use-contact-point-mutation.js +40 -0
  33. package/dist/hooks/use-contact-points.d.ts +24 -0
  34. package/dist/hooks/use-contact-points.d.ts.map +1 -0
  35. package/dist/hooks/use-contact-points.js +12 -0
  36. package/dist/hooks/use-named-contact-mutation.d.ts +54 -0
  37. package/dist/hooks/use-named-contact-mutation.d.ts.map +1 -0
  38. package/dist/hooks/use-named-contact-mutation.js +40 -0
  39. package/dist/hooks/use-named-contacts.d.ts +25 -0
  40. package/dist/hooks/use-named-contacts.d.ts.map +1 -0
  41. package/dist/hooks/use-named-contacts.js +12 -0
  42. package/dist/i18n/en.d.ts +193 -0
  43. package/dist/i18n/en.d.ts.map +1 -0
  44. package/dist/i18n/en.js +192 -0
  45. package/dist/i18n/index.d.ts +5 -0
  46. package/dist/i18n/index.d.ts.map +1 -0
  47. package/dist/i18n/index.js +3 -0
  48. package/dist/i18n/messages.d.ts +161 -0
  49. package/dist/i18n/messages.d.ts.map +1 -0
  50. package/dist/i18n/messages.js +1 -0
  51. package/dist/i18n/provider.d.ts +408 -0
  52. package/dist/i18n/provider.d.ts.map +1 -0
  53. package/dist/i18n/provider.js +44 -0
  54. package/dist/i18n/ro.d.ts +193 -0
  55. package/dist/i18n/ro.d.ts.map +1 -0
  56. package/dist/i18n/ro.js +192 -0
  57. package/dist/index.d.ts +7 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +6 -0
  60. package/dist/provider.d.ts +2 -0
  61. package/dist/provider.d.ts.map +1 -0
  62. package/dist/provider.js +1 -0
  63. package/dist/query-keys.d.ts +40 -0
  64. package/dist/query-keys.d.ts.map +1 -0
  65. package/dist/query-keys.js +12 -0
  66. package/dist/query-options.d.ts +489 -0
  67. package/dist/query-options.d.ts.map +1 -0
  68. package/dist/query-options.js +63 -0
  69. package/dist/schemas.d.ts +278 -0
  70. package/dist/schemas.d.ts.map +1 -0
  71. package/dist/schemas.js +52 -0
  72. package/dist/ui.d.ts +7 -0
  73. package/dist/ui.d.ts.map +1 -0
  74. package/dist/ui.js +6 -0
  75. package/package.json +146 -0
  76. package/src/styles.css +11 -0
@@ -0,0 +1,161 @@
1
+ import type { AddressRecord, ContactPointRecord, NamedContactRecord } from "../index.js";
2
+ export type AddressLabel = AddressRecord["label"];
3
+ export type ContactPointKind = ContactPointRecord["kind"];
4
+ export type NamedContactRole = NamedContactRecord["role"];
5
+ export type IdentityUiMessages = {
6
+ common: {
7
+ cancel: string;
8
+ saveChanges: string;
9
+ primary: string;
10
+ addressLabelLabels: Record<AddressLabel, string>;
11
+ contactPointKindLabels: Record<ContactPointKind, string>;
12
+ namedContactRoleLabels: Record<NamedContactRole, string>;
13
+ };
14
+ identityPage: {
15
+ title: string;
16
+ description: string;
17
+ fields: {
18
+ entityType: string;
19
+ entity: string;
20
+ customEntityType: string;
21
+ };
22
+ placeholders: {
23
+ entityType: string;
24
+ entity: string;
25
+ };
26
+ entityTypeLabels: Record<"person" | "organization" | "supplier" | "booking" | "product", string>;
27
+ emptyScope: string;
28
+ tabs: {
29
+ contactPoints: string;
30
+ addresses: string;
31
+ namedContacts: string;
32
+ };
33
+ };
34
+ contactPointsTab: {
35
+ description: string;
36
+ add: string;
37
+ empty: {
38
+ loading: string;
39
+ none: string;
40
+ };
41
+ columns: {
42
+ kind: string;
43
+ value: string;
44
+ label: string;
45
+ primary: string;
46
+ };
47
+ actions: {
48
+ deleteConfirm: string;
49
+ };
50
+ };
51
+ addressesTab: {
52
+ description: string;
53
+ add: string;
54
+ empty: {
55
+ loading: string;
56
+ none: string;
57
+ };
58
+ columns: {
59
+ label: string;
60
+ street: string;
61
+ city: string;
62
+ country: string;
63
+ primary: string;
64
+ };
65
+ actions: {
66
+ deleteConfirm: string;
67
+ };
68
+ };
69
+ namedContactsTab: {
70
+ description: string;
71
+ add: string;
72
+ empty: {
73
+ loading: string;
74
+ none: string;
75
+ };
76
+ columns: {
77
+ role: string;
78
+ name: string;
79
+ title: string;
80
+ email: string;
81
+ phone: string;
82
+ primary: string;
83
+ };
84
+ actions: {
85
+ deleteConfirm: string;
86
+ };
87
+ };
88
+ addressDialog: {
89
+ titles: {
90
+ create: string;
91
+ edit: string;
92
+ };
93
+ fields: {
94
+ label: string;
95
+ line1: string;
96
+ line2: string;
97
+ city: string;
98
+ region: string;
99
+ postalCode: string;
100
+ country: string;
101
+ timezone: string;
102
+ latitude: string;
103
+ longitude: string;
104
+ notes: string;
105
+ };
106
+ placeholders: {
107
+ timezone: string;
108
+ };
109
+ actions: {
110
+ create: string;
111
+ };
112
+ };
113
+ contactPointDialog: {
114
+ titles: {
115
+ create: string;
116
+ edit: string;
117
+ };
118
+ fields: {
119
+ kind: string;
120
+ label: string;
121
+ value: string;
122
+ notes: string;
123
+ };
124
+ placeholders: {
125
+ label: string;
126
+ value: string;
127
+ };
128
+ actions: {
129
+ create: string;
130
+ };
131
+ validation: {
132
+ valueRequired: string;
133
+ };
134
+ };
135
+ namedContactDialog: {
136
+ titles: {
137
+ create: string;
138
+ edit: string;
139
+ };
140
+ fields: {
141
+ role: string;
142
+ name: string;
143
+ title: string;
144
+ email: string;
145
+ phone: string;
146
+ notes: string;
147
+ };
148
+ placeholders: {
149
+ name: string;
150
+ title: string;
151
+ email: string;
152
+ };
153
+ actions: {
154
+ create: string;
155
+ };
156
+ validation: {
157
+ nameRequired: string;
158
+ };
159
+ };
160
+ };
161
+ //# 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,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAExF,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;AACjD,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA;AACzD,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA;AAEzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAA;QACd,WAAW,EAAE,MAAM,CAAA;QACnB,OAAO,EAAE,MAAM,CAAA;QACf,kBA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,MAAM,CAAA;SACjB,CAAA;QACD,OAAO,EAAE;YACP,MAAM,EAAE,MAAM,CAAA;SACf,CAAA;KACF,CAAA;IACD,kBAAkB,EAAE;QAClB,MAAM,EAAE;YACN,MAAM,EAAE,MAAM,CAAA;YACd,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,OAAO,EAAE;YACP,MAAM,EAAE,MAAM,CAAA;SACf,CAAA;QACD,UAAU,EAAE;YACV,aAAa,EAAE,MAAM,CAAA;SACtB,CAAA;KACF,CAAA;IACD,kBAAkB,EAAE;QAClB,MAAM,EAAE;YACN,MAAM,EAAE,MAAM,CAAA;YACd,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM,CAAA;YACZ,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;QACD,OAAO,EAAE;YACP,MAAM,EAAE,MAAM,CAAA;SACf,CAAA;QACD,UAAU,EAAE;YACV,YAAY,EAAE,MAAM,CAAA;SACrB,CAAA;KACF,CAAA;CACF,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,408 @@
1
+ import { type LocaleMessageOverrides, type PackageI18nValue } from "@voyant-travel/i18n";
2
+ import type { ReactNode } from "react";
3
+ import type { IdentityUiMessages } from "./messages.js";
4
+ export declare const identityUiMessageDefinitions: {
5
+ en: {
6
+ common: {
7
+ cancel: string;
8
+ saveChanges: string;
9
+ primary: string;
10
+ addressLabelLabels: {
11
+ primary: string;
12
+ billing: string;
13
+ shipping: string;
14
+ mailing: string;
15
+ meeting: string;
16
+ service: string;
17
+ legal: string;
18
+ other: string;
19
+ };
20
+ contactPointKindLabels: {
21
+ email: string;
22
+ phone: string;
23
+ mobile: string;
24
+ whatsapp: string;
25
+ website: string;
26
+ sms: string;
27
+ fax: string;
28
+ social: string;
29
+ other: string;
30
+ };
31
+ namedContactRoleLabels: {
32
+ general: string;
33
+ primary: string;
34
+ reservations: string;
35
+ operations: string;
36
+ front_desk: string;
37
+ sales: string;
38
+ emergency: string;
39
+ accounting: string;
40
+ legal: string;
41
+ other: string;
42
+ };
43
+ };
44
+ identityPage: {
45
+ title: string;
46
+ description: string;
47
+ fields: {
48
+ entityType: string;
49
+ entity: string;
50
+ customEntityType: string;
51
+ };
52
+ placeholders: {
53
+ entityType: string;
54
+ entity: string;
55
+ };
56
+ entityTypeLabels: {
57
+ person: string;
58
+ organization: string;
59
+ supplier: string;
60
+ booking: string;
61
+ product: string;
62
+ };
63
+ emptyScope: string;
64
+ tabs: {
65
+ contactPoints: string;
66
+ addresses: string;
67
+ namedContacts: string;
68
+ };
69
+ };
70
+ contactPointsTab: {
71
+ description: string;
72
+ add: string;
73
+ empty: {
74
+ loading: string;
75
+ none: string;
76
+ };
77
+ columns: {
78
+ kind: string;
79
+ value: string;
80
+ label: string;
81
+ primary: string;
82
+ };
83
+ actions: {
84
+ deleteConfirm: string;
85
+ };
86
+ };
87
+ addressesTab: {
88
+ description: string;
89
+ add: string;
90
+ empty: {
91
+ loading: string;
92
+ none: string;
93
+ };
94
+ columns: {
95
+ label: string;
96
+ street: string;
97
+ city: string;
98
+ country: string;
99
+ primary: string;
100
+ };
101
+ actions: {
102
+ deleteConfirm: string;
103
+ };
104
+ };
105
+ namedContactsTab: {
106
+ description: string;
107
+ add: string;
108
+ empty: {
109
+ loading: string;
110
+ none: string;
111
+ };
112
+ columns: {
113
+ role: string;
114
+ name: string;
115
+ title: string;
116
+ email: string;
117
+ phone: string;
118
+ primary: string;
119
+ };
120
+ actions: {
121
+ deleteConfirm: string;
122
+ };
123
+ };
124
+ addressDialog: {
125
+ titles: {
126
+ create: string;
127
+ edit: string;
128
+ };
129
+ fields: {
130
+ label: string;
131
+ line1: string;
132
+ line2: string;
133
+ city: string;
134
+ region: string;
135
+ postalCode: string;
136
+ country: string;
137
+ timezone: string;
138
+ latitude: string;
139
+ longitude: string;
140
+ notes: string;
141
+ };
142
+ placeholders: {
143
+ timezone: string;
144
+ };
145
+ actions: {
146
+ create: string;
147
+ };
148
+ };
149
+ contactPointDialog: {
150
+ titles: {
151
+ create: string;
152
+ edit: string;
153
+ };
154
+ fields: {
155
+ kind: string;
156
+ label: string;
157
+ value: string;
158
+ notes: string;
159
+ };
160
+ placeholders: {
161
+ label: string;
162
+ value: string;
163
+ };
164
+ actions: {
165
+ create: string;
166
+ };
167
+ validation: {
168
+ valueRequired: string;
169
+ };
170
+ };
171
+ namedContactDialog: {
172
+ titles: {
173
+ create: string;
174
+ edit: string;
175
+ };
176
+ fields: {
177
+ role: string;
178
+ name: string;
179
+ title: string;
180
+ email: string;
181
+ phone: string;
182
+ notes: string;
183
+ };
184
+ placeholders: {
185
+ name: string;
186
+ title: string;
187
+ email: string;
188
+ };
189
+ actions: {
190
+ create: string;
191
+ };
192
+ validation: {
193
+ nameRequired: string;
194
+ };
195
+ };
196
+ };
197
+ ro: {
198
+ common: {
199
+ cancel: string;
200
+ saveChanges: string;
201
+ primary: string;
202
+ addressLabelLabels: {
203
+ primary: string;
204
+ billing: string;
205
+ shipping: string;
206
+ mailing: string;
207
+ meeting: string;
208
+ service: string;
209
+ legal: string;
210
+ other: string;
211
+ };
212
+ contactPointKindLabels: {
213
+ email: string;
214
+ phone: string;
215
+ mobile: string;
216
+ whatsapp: string;
217
+ website: string;
218
+ sms: string;
219
+ fax: string;
220
+ social: string;
221
+ other: string;
222
+ };
223
+ namedContactRoleLabels: {
224
+ general: string;
225
+ primary: string;
226
+ reservations: string;
227
+ operations: string;
228
+ front_desk: string;
229
+ sales: string;
230
+ emergency: string;
231
+ accounting: string;
232
+ legal: string;
233
+ other: string;
234
+ };
235
+ };
236
+ identityPage: {
237
+ title: string;
238
+ description: string;
239
+ fields: {
240
+ entityType: string;
241
+ entity: string;
242
+ customEntityType: string;
243
+ };
244
+ placeholders: {
245
+ entityType: string;
246
+ entity: string;
247
+ };
248
+ entityTypeLabels: {
249
+ person: string;
250
+ organization: string;
251
+ supplier: string;
252
+ booking: string;
253
+ product: string;
254
+ };
255
+ emptyScope: string;
256
+ tabs: {
257
+ contactPoints: string;
258
+ addresses: string;
259
+ namedContacts: string;
260
+ };
261
+ };
262
+ contactPointsTab: {
263
+ description: string;
264
+ add: string;
265
+ empty: {
266
+ loading: string;
267
+ none: string;
268
+ };
269
+ columns: {
270
+ kind: string;
271
+ value: string;
272
+ label: string;
273
+ primary: string;
274
+ };
275
+ actions: {
276
+ deleteConfirm: string;
277
+ };
278
+ };
279
+ addressesTab: {
280
+ description: string;
281
+ add: string;
282
+ empty: {
283
+ loading: string;
284
+ none: string;
285
+ };
286
+ columns: {
287
+ label: string;
288
+ street: string;
289
+ city: string;
290
+ country: string;
291
+ primary: string;
292
+ };
293
+ actions: {
294
+ deleteConfirm: string;
295
+ };
296
+ };
297
+ namedContactsTab: {
298
+ description: string;
299
+ add: string;
300
+ empty: {
301
+ loading: string;
302
+ none: string;
303
+ };
304
+ columns: {
305
+ role: string;
306
+ name: string;
307
+ title: string;
308
+ email: string;
309
+ phone: string;
310
+ primary: string;
311
+ };
312
+ actions: {
313
+ deleteConfirm: string;
314
+ };
315
+ };
316
+ addressDialog: {
317
+ titles: {
318
+ create: string;
319
+ edit: string;
320
+ };
321
+ fields: {
322
+ label: string;
323
+ line1: string;
324
+ line2: string;
325
+ city: string;
326
+ region: string;
327
+ postalCode: string;
328
+ country: string;
329
+ timezone: string;
330
+ latitude: string;
331
+ longitude: string;
332
+ notes: string;
333
+ };
334
+ placeholders: {
335
+ timezone: string;
336
+ };
337
+ actions: {
338
+ create: string;
339
+ };
340
+ };
341
+ contactPointDialog: {
342
+ titles: {
343
+ create: string;
344
+ edit: string;
345
+ };
346
+ fields: {
347
+ kind: string;
348
+ label: string;
349
+ value: string;
350
+ notes: string;
351
+ };
352
+ placeholders: {
353
+ label: string;
354
+ value: string;
355
+ };
356
+ actions: {
357
+ create: string;
358
+ };
359
+ validation: {
360
+ valueRequired: string;
361
+ };
362
+ };
363
+ namedContactDialog: {
364
+ titles: {
365
+ create: string;
366
+ edit: string;
367
+ };
368
+ fields: {
369
+ role: string;
370
+ name: string;
371
+ title: string;
372
+ email: string;
373
+ phone: string;
374
+ notes: string;
375
+ };
376
+ placeholders: {
377
+ name: string;
378
+ title: string;
379
+ email: string;
380
+ };
381
+ actions: {
382
+ create: string;
383
+ };
384
+ validation: {
385
+ nameRequired: string;
386
+ };
387
+ };
388
+ };
389
+ };
390
+ export type IdentityUiMessageOverrides = LocaleMessageOverrides<IdentityUiMessages>;
391
+ export declare function resolveIdentityUiMessages({ locale, overrides, }: {
392
+ locale: string | null | undefined;
393
+ overrides?: IdentityUiMessageOverrides | null;
394
+ }): IdentityUiMessages;
395
+ export declare function getIdentityUiI18n({ locale, overrides, }: {
396
+ locale?: string | null | undefined;
397
+ overrides?: IdentityUiMessageOverrides | null;
398
+ }): PackageI18nValue<IdentityUiMessages>;
399
+ export declare function IdentityUiMessagesProvider({ children, locale, overrides, }: {
400
+ children: ReactNode;
401
+ locale: string | null | undefined;
402
+ overrides?: IdentityUiMessageOverrides | null;
403
+ }): import("react/jsx-runtime").JSX.Element;
404
+ export declare const useIdentityUiI18n: () => PackageI18nValue<IdentityUiMessages>;
405
+ export declare const useIdentityUiMessages: () => IdentityUiMessages;
406
+ export declare function useIdentityUiI18nOrDefault(): PackageI18nValue<IdentityUiMessages>;
407
+ export declare function useIdentityUiMessagesOrDefault(): IdentityUiMessages;
408
+ //# 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,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAKvD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGe,CAAA;AAExD,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,CAAC,kBAAkB,CAAC,CAAA;AASnF,wBAAgB,yBAAyB,CAAC,EACxC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAA;CAC9C,sBAOA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAClC,SAAS,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAA;CAC9C,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,CASvC;AAED,wBAAgB,0BAA0B,CAAC,EACzC,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,0BAA0B,GAAG,IAAI,CAAA;CAC9C,2CAWA;AAED,eAAO,MAAM,iBAAiB,4CAA4B,CAAA;AAC1D,eAAO,MAAM,qBAAqB,0BAAgC,CAAA;AAElE,wBAAgB,0BAA0B,yCAEzC;AAED,wBAAgB,8BAA8B,uBAE7C"}
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { createLocaleFormatters, createPackageMessagesContext, resolvePackageMessages, } from "@voyant-travel/i18n";
4
+ import { identityUiEn } from "./en.js";
5
+ import { identityUiRo } from "./ro.js";
6
+ const fallbackLocale = "en";
7
+ export const identityUiMessageDefinitions = {
8
+ en: identityUiEn,
9
+ ro: identityUiRo,
10
+ };
11
+ const identityUiContext = createPackageMessagesContext("IdentityUiMessages");
12
+ const defaultIdentityUiI18n = {
13
+ messages: identityUiEn,
14
+ ...createLocaleFormatters(fallbackLocale),
15
+ };
16
+ export function resolveIdentityUiMessages({ locale, overrides, }) {
17
+ return resolvePackageMessages({
18
+ definitions: identityUiMessageDefinitions,
19
+ fallbackLocale,
20
+ locale,
21
+ overrides,
22
+ });
23
+ }
24
+ export function getIdentityUiI18n({ locale, overrides, }) {
25
+ const resolvedLocale = locale ?? fallbackLocale;
26
+ return {
27
+ messages: resolveIdentityUiMessages({
28
+ locale: resolvedLocale,
29
+ overrides,
30
+ }),
31
+ ...createLocaleFormatters(resolvedLocale),
32
+ };
33
+ }
34
+ export function IdentityUiMessagesProvider({ children, locale, overrides, }) {
35
+ return (_jsx(identityUiContext.ResolvedMessagesProvider, { definitions: identityUiMessageDefinitions, fallbackLocale: fallbackLocale, locale: locale, overrides: overrides, children: children }));
36
+ }
37
+ export const useIdentityUiI18n = identityUiContext.useI18n;
38
+ export const useIdentityUiMessages = identityUiContext.useMessages;
39
+ export function useIdentityUiI18nOrDefault() {
40
+ return identityUiContext.useOptionalI18n() ?? defaultIdentityUiI18n;
41
+ }
42
+ export function useIdentityUiMessagesOrDefault() {
43
+ return useIdentityUiI18nOrDefault().messages;
44
+ }