@voyantjs/products-ui 0.16.0 → 0.17.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.
Files changed (63) hide show
  1. package/README.md +11 -0
  2. package/dist/components/option-unit-dialog.d.ts.map +1 -1
  3. package/dist/components/option-unit-dialog.js +7 -3
  4. package/dist/components/option-unit-form.d.ts.map +1 -1
  5. package/dist/components/option-unit-form.js +16 -9
  6. package/dist/components/product-category-combobox.d.ts.map +1 -1
  7. package/dist/components/product-category-combobox.js +6 -4
  8. package/dist/components/product-category-dialog.d.ts.map +1 -1
  9. package/dist/components/product-category-dialog.js +7 -3
  10. package/dist/components/product-category-form.d.ts.map +1 -1
  11. package/dist/components/product-category-form.js +8 -4
  12. package/dist/components/product-category-list.d.ts.map +1 -1
  13. package/dist/components/product-category-list.js +11 -5
  14. package/dist/components/product-day-dialog.d.ts.map +1 -1
  15. package/dist/components/product-day-dialog.js +7 -3
  16. package/dist/components/product-day-form.d.ts.map +1 -1
  17. package/dist/components/product-day-form.js +9 -3
  18. package/dist/components/product-itinerary-dialog.d.ts.map +1 -1
  19. package/dist/components/product-itinerary-dialog.js +13 -5
  20. package/dist/components/product-media-dialog.d.ts.map +1 -1
  21. package/dist/components/product-media-dialog.js +7 -3
  22. package/dist/components/product-media-form.d.ts.map +1 -1
  23. package/dist/components/product-media-form.js +16 -7
  24. package/dist/components/product-media-section.d.ts.map +1 -1
  25. package/dist/components/product-media-section.js +19 -11
  26. package/dist/components/product-option-dialog.d.ts.map +1 -1
  27. package/dist/components/product-option-dialog.js +7 -3
  28. package/dist/components/product-option-form.d.ts.map +1 -1
  29. package/dist/components/product-option-form.js +11 -8
  30. package/dist/components/product-options-section.d.ts.map +1 -1
  31. package/dist/components/product-options-section.js +17 -13
  32. package/dist/components/product-tag-dialog.d.ts.map +1 -1
  33. package/dist/components/product-tag-dialog.js +7 -3
  34. package/dist/components/product-tag-form.d.ts.map +1 -1
  35. package/dist/components/product-tag-form.js +7 -3
  36. package/dist/components/product-tag-list.d.ts.map +1 -1
  37. package/dist/components/product-tag-list.js +9 -5
  38. package/dist/components/product-type-combobox.d.ts +1 -1
  39. package/dist/components/product-type-combobox.d.ts.map +1 -1
  40. package/dist/components/product-type-combobox.js +6 -2
  41. package/dist/components/product-version-dialog.d.ts.map +1 -1
  42. package/dist/components/product-version-dialog.js +5 -3
  43. package/dist/components/product-versions-section.d.ts.map +1 -1
  44. package/dist/components/product-versions-section.js +7 -2
  45. package/dist/i18n/en.d.ts +402 -0
  46. package/dist/i18n/en.d.ts.map +1 -0
  47. package/dist/i18n/en.js +401 -0
  48. package/dist/i18n/index.d.ts +5 -0
  49. package/dist/i18n/index.d.ts.map +1 -0
  50. package/dist/i18n/index.js +3 -0
  51. package/dist/i18n/messages.d.ts +402 -0
  52. package/dist/i18n/messages.d.ts.map +1 -0
  53. package/dist/i18n/messages.js +1 -0
  54. package/dist/i18n/provider.d.ts +826 -0
  55. package/dist/i18n/provider.d.ts.map +1 -0
  56. package/dist/i18n/provider.js +44 -0
  57. package/dist/i18n/ro.d.ts +402 -0
  58. package/dist/i18n/ro.d.ts.map +1 -0
  59. package/dist/i18n/ro.js +401 -0
  60. package/dist/index.d.ts +2 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +1 -0
  63. package/package.json +27 -11
@@ -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,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAKpD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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 "@voyantjs/i18n";
4
+ import { productsUiEn } from "./en";
5
+ import { productsUiRo } from "./ro";
6
+ const fallbackLocale = "en";
7
+ export const productsUiMessageDefinitions = {
8
+ en: productsUiEn,
9
+ ro: productsUiRo,
10
+ };
11
+ const productsUiContext = createPackageMessagesContext("ProductsUiMessages");
12
+ const defaultProductsUiI18n = {
13
+ messages: productsUiEn,
14
+ ...createLocaleFormatters(fallbackLocale),
15
+ };
16
+ export function resolveProductsUiMessages({ locale, overrides, }) {
17
+ return resolvePackageMessages({
18
+ definitions: productsUiMessageDefinitions,
19
+ fallbackLocale,
20
+ locale,
21
+ overrides,
22
+ });
23
+ }
24
+ export function getProductsUiI18n({ locale, overrides, }) {
25
+ const resolvedLocale = locale ?? fallbackLocale;
26
+ return {
27
+ messages: resolveProductsUiMessages({
28
+ locale: resolvedLocale,
29
+ overrides,
30
+ }),
31
+ ...createLocaleFormatters(resolvedLocale),
32
+ };
33
+ }
34
+ export function ProductsUiMessagesProvider({ children, locale, overrides, }) {
35
+ return (_jsx(productsUiContext.ResolvedMessagesProvider, { definitions: productsUiMessageDefinitions, fallbackLocale: fallbackLocale, locale: locale, overrides: overrides, children: children }));
36
+ }
37
+ export const useProductsUiI18n = productsUiContext.useI18n;
38
+ export const useProductsUiMessages = productsUiContext.useMessages;
39
+ export function useProductsUiI18nOrDefault() {
40
+ return productsUiContext.useOptionalI18n() ?? defaultProductsUiI18n;
41
+ }
42
+ export function useProductsUiMessagesOrDefault() {
43
+ return useProductsUiI18nOrDefault().messages;
44
+ }
@@ -0,0 +1,402 @@
1
+ export declare const productsUiRo: {
2
+ common: {
3
+ cancel: string;
4
+ saveChanges: string;
5
+ create: string;
6
+ add: string;
7
+ loading: string;
8
+ none: string;
9
+ previous: string;
10
+ next: string;
11
+ page: string;
12
+ active: string;
13
+ inactive: string;
14
+ mediaTypeLabels: {
15
+ image: string;
16
+ video: string;
17
+ document: string;
18
+ };
19
+ optionUnitTypeLabels: {
20
+ person: string;
21
+ group: string;
22
+ room: string;
23
+ vehicle: string;
24
+ service: string;
25
+ other: string;
26
+ };
27
+ optionStatusLabels: {
28
+ draft: string;
29
+ active: string;
30
+ archived: string;
31
+ };
32
+ };
33
+ comboboxes: {
34
+ productCategory: {
35
+ placeholder: string;
36
+ empty: string;
37
+ };
38
+ productType: {
39
+ placeholder: string;
40
+ empty: string;
41
+ };
42
+ };
43
+ productCategoryDialog: {
44
+ titles: {
45
+ create: string;
46
+ edit: string;
47
+ };
48
+ descriptions: {
49
+ create: string;
50
+ edit: string;
51
+ };
52
+ };
53
+ productCategoryForm: {
54
+ fields: {
55
+ name: string;
56
+ slug: string;
57
+ parentCategory: string;
58
+ description: string;
59
+ sortOrder: string;
60
+ active: string;
61
+ };
62
+ placeholders: {
63
+ name: string;
64
+ slug: string;
65
+ parentCategory: string;
66
+ description: string;
67
+ };
68
+ validation: {
69
+ nameRequired: string;
70
+ slugRequired: string;
71
+ saveFailed: string;
72
+ };
73
+ actions: {
74
+ createCategory: string;
75
+ };
76
+ };
77
+ productCategoryList: {
78
+ searchPlaceholder: string;
79
+ addCategory: string;
80
+ columns: {
81
+ name: string;
82
+ slug: string;
83
+ parent: string;
84
+ status: string;
85
+ actions: string;
86
+ };
87
+ loadingError: string;
88
+ empty: string;
89
+ edit: string;
90
+ delete: string;
91
+ deleteConfirm: string;
92
+ showingSummary: string;
93
+ };
94
+ productTagDialog: {
95
+ titles: {
96
+ create: string;
97
+ edit: string;
98
+ };
99
+ descriptions: {
100
+ create: string;
101
+ edit: string;
102
+ };
103
+ };
104
+ productTagForm: {
105
+ fields: {
106
+ name: string;
107
+ };
108
+ placeholders: {
109
+ name: string;
110
+ };
111
+ validation: {
112
+ nameRequired: string;
113
+ saveFailed: string;
114
+ };
115
+ actions: {
116
+ createTag: string;
117
+ };
118
+ };
119
+ productTagList: {
120
+ searchPlaceholder: string;
121
+ addTag: string;
122
+ columns: {
123
+ name: string;
124
+ actions: string;
125
+ };
126
+ loadingError: string;
127
+ empty: string;
128
+ edit: string;
129
+ delete: string;
130
+ deleteConfirm: string;
131
+ showingSummary: string;
132
+ };
133
+ productMediaDialog: {
134
+ titles: {
135
+ create: string;
136
+ edit: string;
137
+ };
138
+ descriptions: {
139
+ create: string;
140
+ edit: string;
141
+ };
142
+ };
143
+ productMediaForm: {
144
+ fields: {
145
+ mediaType: string;
146
+ name: string;
147
+ url: string;
148
+ storageKey: string;
149
+ mimeType: string;
150
+ fileSize: string;
151
+ sortOrder: string;
152
+ coverMedia: string;
153
+ altText: string;
154
+ };
155
+ placeholders: {
156
+ name: string;
157
+ url: string;
158
+ mimeType: string;
159
+ altText: string;
160
+ };
161
+ validation: {
162
+ nameRequired: string;
163
+ urlRequired: string;
164
+ saveFailed: string;
165
+ };
166
+ actions: {
167
+ addMedia: string;
168
+ saveMedia: string;
169
+ };
170
+ };
171
+ productMediaSection: {
172
+ titles: {
173
+ media: string;
174
+ dayMedia: string;
175
+ };
176
+ descriptions: {
177
+ media: string;
178
+ dayMedia: string;
179
+ };
180
+ actions: {
181
+ upload: string;
182
+ addMedia: string;
183
+ markCover: string;
184
+ edit: string;
185
+ delete: string;
186
+ };
187
+ loadingError: string;
188
+ empty: string;
189
+ uploadFailed: string;
190
+ deleteConfirm: string;
191
+ coverBadge: string;
192
+ columns: {
193
+ name: string;
194
+ type: string;
195
+ url: string;
196
+ sort: string;
197
+ };
198
+ };
199
+ productDayDialog: {
200
+ titles: {
201
+ create: string;
202
+ edit: string;
203
+ };
204
+ descriptions: {
205
+ create: string;
206
+ edit: string;
207
+ };
208
+ };
209
+ productDayForm: {
210
+ fields: {
211
+ dayNumber: string;
212
+ location: string;
213
+ title: string;
214
+ description: string;
215
+ };
216
+ placeholders: {
217
+ location: string;
218
+ title: string;
219
+ description: string;
220
+ };
221
+ validation: {
222
+ dayNumberMin: string;
223
+ saveFailed: string;
224
+ };
225
+ actions: {
226
+ addDay: string;
227
+ saveDay: string;
228
+ };
229
+ };
230
+ productItineraryDialog: {
231
+ titles: {
232
+ create: string;
233
+ edit: string;
234
+ };
235
+ descriptions: {
236
+ create: string;
237
+ edit: string;
238
+ };
239
+ fields: {
240
+ name: string;
241
+ defaultItinerary: string;
242
+ notesDefaultLocked: string;
243
+ notesFirstDefault: string;
244
+ };
245
+ placeholders: {
246
+ name: string;
247
+ };
248
+ validation: {
249
+ nameRequired: string;
250
+ saveFailed: string;
251
+ };
252
+ actions: {
253
+ createItinerary: string;
254
+ };
255
+ };
256
+ optionUnitDialog: {
257
+ titles: {
258
+ create: string;
259
+ edit: string;
260
+ };
261
+ descriptions: {
262
+ create: string;
263
+ edit: string;
264
+ };
265
+ };
266
+ optionUnitForm: {
267
+ fields: {
268
+ name: string;
269
+ code: string;
270
+ unitType: string;
271
+ sortOrder: string;
272
+ minQuantity: string;
273
+ maxQuantity: string;
274
+ minAge: string;
275
+ maxAge: string;
276
+ occupancyMin: string;
277
+ occupancyMax: string;
278
+ description: string;
279
+ required: string;
280
+ hidden: string;
281
+ };
282
+ placeholders: {
283
+ name: string;
284
+ code: string;
285
+ description: string;
286
+ };
287
+ validation: {
288
+ nameRequired: string;
289
+ saveFailed: string;
290
+ };
291
+ actions: {
292
+ createUnit: string;
293
+ };
294
+ };
295
+ productVersionDialog: {
296
+ title: string;
297
+ description: string;
298
+ fields: {
299
+ notes: string;
300
+ };
301
+ placeholders: {
302
+ notes: string;
303
+ };
304
+ validation: {
305
+ saveFailed: string;
306
+ };
307
+ actions: {
308
+ createVersion: string;
309
+ };
310
+ };
311
+ productVersionsSection: {
312
+ titles: {
313
+ default: string;
314
+ };
315
+ descriptions: {
316
+ default: string;
317
+ };
318
+ actions: {
319
+ createVersion: string;
320
+ };
321
+ loadingError: string;
322
+ empty: string;
323
+ versionLabel: string;
324
+ };
325
+ productOptionDialog: {
326
+ titles: {
327
+ create: string;
328
+ edit: string;
329
+ };
330
+ descriptions: {
331
+ create: string;
332
+ edit: string;
333
+ };
334
+ };
335
+ productOptionForm: {
336
+ fields: {
337
+ name: string;
338
+ code: string;
339
+ description: string;
340
+ status: string;
341
+ sortOrder: string;
342
+ availableFrom: string;
343
+ availableTo: string;
344
+ defaultOption: string;
345
+ };
346
+ placeholders: {
347
+ name: string;
348
+ code: string;
349
+ description: string;
350
+ availableFrom: string;
351
+ availableTo: string;
352
+ };
353
+ validation: {
354
+ nameRequired: string;
355
+ saveFailed: string;
356
+ };
357
+ actions: {
358
+ createOption: string;
359
+ };
360
+ };
361
+ productOptionsSection: {
362
+ titles: {
363
+ default: string;
364
+ units: string;
365
+ };
366
+ descriptions: {
367
+ default: string;
368
+ units: string;
369
+ };
370
+ actions: {
371
+ addOption: string;
372
+ addUnit: string;
373
+ duplicate: string;
374
+ edit: string;
375
+ delete: string;
376
+ };
377
+ loadingError: {
378
+ options: string;
379
+ units: string;
380
+ };
381
+ empty: {
382
+ options: string;
383
+ units: string;
384
+ };
385
+ deleteConfirm: {
386
+ option: string;
387
+ unit: string;
388
+ };
389
+ columns: {
390
+ unitType: string;
391
+ unitName: string;
392
+ quantity: string;
393
+ age: string;
394
+ occupancy: string;
395
+ actions: string;
396
+ };
397
+ badges: {
398
+ defaultOption: string;
399
+ };
400
+ };
401
+ };
402
+ //# 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,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkZK,CAAA"}