@sonic-equipment/ui 122.0.0 → 124.0.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 (95) hide show
  1. package/dist/buttons/add-to-cart-button/add-to-cart-button.js +2 -2
  2. package/dist/buttons/add-to-cart-button/connected-add-to-cart-button.js +8 -0
  3. package/dist/buttons/button/button.d.ts +2 -1
  4. package/dist/buttons/button/button.js +8 -3
  5. package/dist/buttons/button/button.module.css.js +1 -1
  6. package/dist/checkout/adyen-payment.d.ts +21 -0
  7. package/dist/checkout/adyen-payment.js +165 -0
  8. package/dist/checkout/parse-amount.d.ts +2 -0
  9. package/dist/checkout/parse-amount.js +10 -0
  10. package/dist/checkout/payment-details.d.ts +5 -0
  11. package/dist/checkout/payment-details.js +21 -0
  12. package/dist/checkout/payment.d.ts +6 -0
  13. package/dist/checkout/payment.js +69 -0
  14. package/dist/collapsables/accordion/accordion-item.d.ts +2 -1
  15. package/dist/collapsables/accordion/accordion-item.js +6 -2
  16. package/dist/collapsables/accordion/accordion.module.css.js +1 -1
  17. package/dist/config.js +1 -1
  18. package/dist/exports.d.ts +22 -0
  19. package/dist/forms/field-error/field-error.d.ts +14 -1
  20. package/dist/forms/field-error/field-error.js +15 -1
  21. package/dist/forms/input/input.d.ts +1 -0
  22. package/dist/forms/input/input.js +2 -2
  23. package/dist/forms/number-field/number-field.d.ts +4 -1
  24. package/dist/forms/number-field/number-field.js +3 -3
  25. package/dist/forms/select/select.d.ts +4 -1
  26. package/dist/forms/select/select.js +6 -3
  27. package/dist/forms/text-field/text-field.d.ts +4 -1
  28. package/dist/forms/text-field/text-field.js +3 -3
  29. package/dist/forms/textarea/textarea.d.ts +1 -0
  30. package/dist/forms/textarea/textarea.js +10 -10
  31. package/dist/icons/stroke/stroke-information-icon.js +7 -0
  32. package/dist/index.js +24 -2
  33. package/dist/intl/translation-id.d.ts +1 -1
  34. package/dist/loading/progress-circle.d.ts +3 -1
  35. package/dist/loading/progress-circle.js +3 -3
  36. package/dist/loading/progress-circle.module.css.js +1 -1
  37. package/dist/pages/cart-page/cart-page.js +1 -0
  38. package/dist/pages/product-details-page/product-details.js +7 -0
  39. package/dist/shared/api/bff/model/bff.model.d.ts +1 -0
  40. package/dist/shared/api/storefront/hooks/authentication/use-create-guest-account.d.ts +4 -0
  41. package/dist/shared/api/storefront/hooks/authentication/use-create-guest-account.js +21 -0
  42. package/dist/shared/api/storefront/hooks/authentication/use-patch-session.d.ts +4 -0
  43. package/dist/shared/api/storefront/hooks/authentication/use-patch-session.js +15 -0
  44. package/dist/shared/api/storefront/hooks/authentication/use-sign-in.js +14 -9
  45. package/dist/shared/api/storefront/hooks/authentication/use-sign-out.js +1 -2
  46. package/dist/shared/api/storefront/hooks/cart/use-add-product-to-current-cart.js +1 -7
  47. package/dist/shared/api/storefront/hooks/cart/use-delete-cart-line-by-id.js +1 -4
  48. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.js +3 -1
  49. package/dist/shared/api/storefront/hooks/cart/use-patch-cart.d.ts +3 -4
  50. package/dist/shared/api/storefront/hooks/cart/use-patch-cart.js +6 -8
  51. package/dist/shared/api/storefront/hooks/cart/use-place-order.d.ts +3 -3
  52. package/dist/shared/api/storefront/hooks/cart/use-place-order.js +7 -8
  53. package/dist/shared/api/storefront/hooks/cart/use-update-cart-line-by-id.js +1 -13
  54. package/dist/shared/api/storefront/hooks/customer/use-fetch-bill-to-addresses.d.ts +1 -0
  55. package/dist/shared/api/storefront/hooks/customer/use-fetch-bill-to-addresses.js +14 -0
  56. package/dist/shared/api/storefront/hooks/customer/use-fetch-ship-to-addresses.d.ts +3 -0
  57. package/dist/shared/api/storefront/hooks/customer/use-fetch-ship-to-addresses.js +15 -0
  58. package/dist/shared/api/storefront/hooks/customer/use-update-bill-to-address.d.ts +6 -0
  59. package/dist/shared/api/storefront/hooks/customer/use-update-bill-to-address.js +17 -0
  60. package/dist/shared/api/storefront/hooks/payment/use-create-adyen-session.d.ts +3 -0
  61. package/dist/shared/api/storefront/hooks/payment/use-create-adyen-session.js +10 -0
  62. package/dist/shared/api/storefront/hooks/payment/use-fetch-adyen-config.d.ts +1 -0
  63. package/dist/shared/api/storefront/hooks/payment/use-fetch-adyen-config.js +14 -0
  64. package/dist/shared/api/storefront/hooks/payment/use-invalidate-adyen.d.ts +1 -0
  65. package/dist/shared/api/storefront/hooks/payment/use-invalidate-adyen.js +9 -0
  66. package/dist/shared/api/storefront/model/shop.model.d.ts +17 -0
  67. package/dist/shared/api/storefront/services/cart-service.d.ts +15 -2
  68. package/dist/shared/api/storefront/services/cart-service.js +68 -3
  69. package/dist/shared/api/storefront/services/customer-service.d.ts +8 -0
  70. package/dist/shared/api/storefront/services/customer-service.js +31 -0
  71. package/dist/shared/api/storefront/services/payment-service.d.ts +8 -0
  72. package/dist/shared/api/storefront/services/payment-service.js +29 -0
  73. package/dist/shared/ga/data-layer.d.ts +2 -0
  74. package/dist/shared/ga/data-layer.js +13 -0
  75. package/dist/shared/ga/google-analytics-provider.d.ts +8 -0
  76. package/dist/shared/ga/google-analytics-provider.js +15 -0
  77. package/dist/shared/ga/types.d.ts +34 -0
  78. package/dist/shared/ga/types.js +8 -0
  79. package/dist/shared/ga/use-data-layer.d.ts +50 -0
  80. package/dist/shared/ga/use-data-layer.js +89 -0
  81. package/dist/shared/model/address.d.ts +2 -0
  82. package/dist/shared/model/address.js +7 -0
  83. package/dist/shared/model/countries.d.ts +225 -0
  84. package/dist/shared/model/countries.js +260 -0
  85. package/dist/shared/model/currency.d.ts +1 -0
  86. package/dist/shared/model/currency.js +1 -0
  87. package/dist/shared/utils/price.d.ts +38 -0
  88. package/dist/shared/utils/price.js +39 -1
  89. package/dist/shared/utils/random.d.ts +10 -0
  90. package/dist/shared/utils/random.js +16 -0
  91. package/dist/styles.css +306 -107
  92. package/dist/tooltip/tooltip.d.ts +9 -0
  93. package/dist/tooltip/tooltip.js +21 -0
  94. package/dist/tooltip/tooltip.module.css.js +3 -0
  95. package/package.json +2 -2
@@ -0,0 +1,225 @@
1
+ export declare const countries: [{
2
+ readonly abbreviation: "AD";
3
+ readonly id: "a4ab0470-e310-e311-ba31-d43d7e4e88b2";
4
+ readonly name: "Andorra";
5
+ readonly properties: {};
6
+ readonly states: [];
7
+ readonly uri: "/api/v1/websites/current/countries/a4ab0470-e310-e311-ba31-d43d7e4e88b2";
8
+ }, {
9
+ readonly abbreviation: "AT";
10
+ readonly id: "adab0470-e310-e311-ba31-d43d7e4e88b2";
11
+ readonly name: "Austria";
12
+ readonly properties: {};
13
+ readonly states: [];
14
+ readonly uri: "/api/v1/websites/current/countries/adab0470-e310-e311-ba31-d43d7e4e88b2";
15
+ }, {
16
+ readonly abbreviation: "BE";
17
+ readonly id: "b4ab0470-e310-e311-ba31-d43d7e4e88b2";
18
+ readonly name: "België/Belgique";
19
+ readonly properties: {};
20
+ readonly states: [];
21
+ readonly uri: "/api/v1/websites/current/countries/b4ab0470-e310-e311-ba31-d43d7e4e88b2";
22
+ }, {
23
+ readonly abbreviation: "BG";
24
+ readonly id: "c1ab0470-e310-e311-ba31-d43d7e4e88b2";
25
+ readonly name: "Bulgaria";
26
+ readonly properties: {};
27
+ readonly states: [];
28
+ readonly uri: "/api/v1/websites/current/countries/c1ab0470-e310-e311-ba31-d43d7e4e88b2";
29
+ }, {
30
+ readonly abbreviation: "HR";
31
+ readonly id: "d6ab0470-e310-e311-ba31-d43d7e4e88b2";
32
+ readonly name: "Croatia";
33
+ readonly properties: {};
34
+ readonly states: [];
35
+ readonly uri: "/api/v1/websites/current/countries/d6ab0470-e310-e311-ba31-d43d7e4e88b2";
36
+ }, {
37
+ readonly abbreviation: "CY";
38
+ readonly id: "d9ab0470-e310-e311-ba31-d43d7e4e88b2";
39
+ readonly name: "Cyprus";
40
+ readonly properties: {};
41
+ readonly states: [];
42
+ readonly uri: "/api/v1/websites/current/countries/d9ab0470-e310-e311-ba31-d43d7e4e88b2";
43
+ }, {
44
+ readonly abbreviation: "CZ";
45
+ readonly id: "daab0470-e310-e311-ba31-d43d7e4e88b2";
46
+ readonly name: "Česká republika";
47
+ readonly properties: {};
48
+ readonly states: [];
49
+ readonly uri: "/api/v1/websites/current/countries/daab0470-e310-e311-ba31-d43d7e4e88b2";
50
+ }, {
51
+ readonly abbreviation: "DK";
52
+ readonly id: "dbab0470-e310-e311-ba31-d43d7e4e88b2";
53
+ readonly name: "Danmark";
54
+ readonly properties: {};
55
+ readonly states: [];
56
+ readonly uri: "/api/v1/websites/current/countries/dbab0470-e310-e311-ba31-d43d7e4e88b2";
57
+ }, {
58
+ readonly abbreviation: "DE";
59
+ readonly id: "f1ab0470-e310-e311-ba31-d43d7e4e88b2";
60
+ readonly name: "Germany";
61
+ readonly properties: {};
62
+ readonly states: [];
63
+ readonly uri: "/api/v1/websites/current/countries/f1ab0470-e310-e311-ba31-d43d7e4e88b2";
64
+ }, {
65
+ readonly abbreviation: "EE";
66
+ readonly id: "e4ab0470-e310-e311-ba31-d43d7e4e88b2";
67
+ readonly name: "Estonia";
68
+ readonly properties: {};
69
+ readonly states: [];
70
+ readonly uri: "/api/v1/websites/current/countries/e4ab0470-e310-e311-ba31-d43d7e4e88b2";
71
+ }, {
72
+ readonly abbreviation: "FI";
73
+ readonly id: "e9ab0470-e310-e311-ba31-d43d7e4e88b2";
74
+ readonly name: "Finland";
75
+ readonly properties: {};
76
+ readonly states: [];
77
+ readonly uri: "/api/v1/websites/current/countries/e9ab0470-e310-e311-ba31-d43d7e4e88b2";
78
+ }, {
79
+ readonly abbreviation: "FR";
80
+ readonly id: "eaab0470-e310-e311-ba31-d43d7e4e88b2";
81
+ readonly name: "France";
82
+ readonly properties: {};
83
+ readonly states: [];
84
+ readonly uri: "/api/v1/websites/current/countries/eaab0470-e310-e311-ba31-d43d7e4e88b2";
85
+ }, {
86
+ readonly abbreviation: "GR";
87
+ readonly id: "f4ab0470-e310-e311-ba31-d43d7e4e88b2";
88
+ readonly name: "Greece";
89
+ readonly properties: {};
90
+ readonly states: [];
91
+ readonly uri: "/api/v1/websites/current/countries/f4ab0470-e310-e311-ba31-d43d7e4e88b2";
92
+ }, {
93
+ readonly abbreviation: "HU";
94
+ readonly id: "03ac0470-e310-e311-ba31-d43d7e4e88b2";
95
+ readonly name: "Hungary";
96
+ readonly properties: {};
97
+ readonly states: [];
98
+ readonly uri: "/api/v1/websites/current/countries/03ac0470-e310-e311-ba31-d43d7e4e88b2";
99
+ }, {
100
+ readonly abbreviation: "IE";
101
+ readonly id: "09ac0470-e310-e311-ba31-d43d7e4e88b2";
102
+ readonly name: "Ireland";
103
+ readonly properties: {};
104
+ readonly states: [];
105
+ readonly uri: "/api/v1/websites/current/countries/09ac0470-e310-e311-ba31-d43d7e4e88b2";
106
+ }, {
107
+ readonly abbreviation: "IT";
108
+ readonly id: "0cac0470-e310-e311-ba31-d43d7e4e88b2";
109
+ readonly name: "Italia";
110
+ readonly properties: {};
111
+ readonly states: [];
112
+ readonly uri: "/api/v1/websites/current/countries/0cac0470-e310-e311-ba31-d43d7e4e88b2";
113
+ }, {
114
+ readonly abbreviation: "LV";
115
+ readonly id: "19ac0470-e310-e311-ba31-d43d7e4e88b2";
116
+ readonly name: "Latvia";
117
+ readonly properties: {};
118
+ readonly states: [];
119
+ readonly uri: "/api/v1/websites/current/countries/19ac0470-e310-e311-ba31-d43d7e4e88b2";
120
+ }, {
121
+ readonly abbreviation: "LT";
122
+ readonly id: "1fac0470-e310-e311-ba31-d43d7e4e88b2";
123
+ readonly name: "Lithuania";
124
+ readonly properties: {};
125
+ readonly states: [];
126
+ readonly uri: "/api/v1/websites/current/countries/1fac0470-e310-e311-ba31-d43d7e4e88b2";
127
+ }, {
128
+ readonly abbreviation: "LU";
129
+ readonly id: "20ac0470-e310-e311-ba31-d43d7e4e88b2";
130
+ readonly name: "Luxembourg";
131
+ readonly properties: {};
132
+ readonly states: [];
133
+ readonly uri: "/api/v1/websites/current/countries/20ac0470-e310-e311-ba31-d43d7e4e88b2";
134
+ }, {
135
+ readonly abbreviation: "MT";
136
+ readonly id: "28ac0470-e310-e311-ba31-d43d7e4e88b2";
137
+ readonly name: "Malta";
138
+ readonly properties: {};
139
+ readonly states: [];
140
+ readonly uri: "/api/v1/websites/current/countries/28ac0470-e310-e311-ba31-d43d7e4e88b2";
141
+ }, {
142
+ readonly abbreviation: "NO";
143
+ readonly id: "44ac0470-e310-e311-ba31-d43d7e4e88b2";
144
+ readonly name: "Norway";
145
+ readonly properties: {};
146
+ readonly states: [];
147
+ readonly uri: "/api/v1/websites/current/countries/44ac0470-e310-e311-ba31-d43d7e4e88b2";
148
+ }, {
149
+ readonly abbreviation: "PL";
150
+ readonly id: "4fac0470-e310-e311-ba31-d43d7e4e88b2";
151
+ readonly name: "Poland";
152
+ readonly properties: {};
153
+ readonly states: [];
154
+ readonly uri: "/api/v1/websites/current/countries/4fac0470-e310-e311-ba31-d43d7e4e88b2";
155
+ }, {
156
+ readonly abbreviation: "PT";
157
+ readonly id: "50ac0470-e310-e311-ba31-d43d7e4e88b2";
158
+ readonly name: "Portugal";
159
+ readonly properties: {};
160
+ readonly states: [];
161
+ readonly uri: "/api/v1/websites/current/countries/50ac0470-e310-e311-ba31-d43d7e4e88b2";
162
+ }, {
163
+ readonly abbreviation: "RO";
164
+ readonly id: "54ac0470-e310-e311-ba31-d43d7e4e88b2";
165
+ readonly name: "Romania";
166
+ readonly properties: {};
167
+ readonly states: [];
168
+ readonly uri: "/api/v1/websites/current/countries/54ac0470-e310-e311-ba31-d43d7e4e88b2";
169
+ }, {
170
+ readonly abbreviation: "SK";
171
+ readonly id: "68ac0470-e310-e311-ba31-d43d7e4e88b2";
172
+ readonly name: "Slovakia";
173
+ readonly properties: {};
174
+ readonly states: [];
175
+ readonly uri: "/api/v1/websites/current/countries/68ac0470-e310-e311-ba31-d43d7e4e88b2";
176
+ }, {
177
+ readonly abbreviation: "SI";
178
+ readonly id: "69ac0470-e310-e311-ba31-d43d7e4e88b2";
179
+ readonly name: "Slovenia";
180
+ readonly properties: {};
181
+ readonly states: [];
182
+ readonly uri: "/api/v1/websites/current/countries/69ac0470-e310-e311-ba31-d43d7e4e88b2";
183
+ }, {
184
+ readonly abbreviation: "ES";
185
+ readonly id: "6fac0470-e310-e311-ba31-d43d7e4e88b2";
186
+ readonly name: "Spain";
187
+ readonly properties: {};
188
+ readonly states: [];
189
+ readonly uri: "/api/v1/websites/current/countries/6fac0470-e310-e311-ba31-d43d7e4e88b2";
190
+ }, {
191
+ readonly abbreviation: "SE";
192
+ readonly id: "75ac0470-e310-e311-ba31-d43d7e4e88b2";
193
+ readonly name: "Sweden";
194
+ readonly properties: {};
195
+ readonly states: [];
196
+ readonly uri: "/api/v1/websites/current/countries/75ac0470-e310-e311-ba31-d43d7e4e88b2";
197
+ }, {
198
+ readonly abbreviation: "CH";
199
+ readonly id: "76ac0470-e310-e311-ba31-d43d7e4e88b2";
200
+ readonly name: "Switzerland";
201
+ readonly properties: {};
202
+ readonly states: [];
203
+ readonly uri: "/api/v1/websites/current/countries/76ac0470-e310-e311-ba31-d43d7e4e88b2";
204
+ }, {
205
+ readonly abbreviation: "NL";
206
+ readonly id: "3bac0470-e310-e311-ba31-d43d7e4e88b2";
207
+ readonly name: "The Netherlands";
208
+ readonly properties: {};
209
+ readonly states: [];
210
+ readonly uri: "/api/v1/websites/current/countries/3bac0470-e310-e311-ba31-d43d7e4e88b2";
211
+ }, {
212
+ readonly abbreviation: "GB";
213
+ readonly id: "89ac0470-e310-e311-ba31-d43d7e4e88b2";
214
+ readonly name: "United Kingdom";
215
+ readonly properties: {};
216
+ readonly states: [];
217
+ readonly uri: "/api/v1/websites/current/countries/89ac0470-e310-e311-ba31-d43d7e4e88b2";
218
+ }, {
219
+ readonly abbreviation: "US";
220
+ readonly id: "8aac0470-e310-e311-ba31-d43d7e4e88b2";
221
+ readonly name: "United States";
222
+ readonly properties: {};
223
+ readonly states: [];
224
+ readonly uri: "/api/v1/websites/current/countries/8aac0470-e310-e311-ba31-d43d7e4e88b2";
225
+ }];
@@ -0,0 +1,260 @@
1
+ const countries = [
2
+ {
3
+ abbreviation: 'AD',
4
+ id: 'a4ab0470-e310-e311-ba31-d43d7e4e88b2',
5
+ name: 'Andorra',
6
+ properties: {},
7
+ states: [],
8
+ uri: '/api/v1/websites/current/countries/a4ab0470-e310-e311-ba31-d43d7e4e88b2',
9
+ },
10
+ {
11
+ abbreviation: 'AT',
12
+ id: 'adab0470-e310-e311-ba31-d43d7e4e88b2',
13
+ name: 'Austria',
14
+ properties: {},
15
+ states: [],
16
+ uri: '/api/v1/websites/current/countries/adab0470-e310-e311-ba31-d43d7e4e88b2',
17
+ },
18
+ {
19
+ abbreviation: 'BE',
20
+ id: 'b4ab0470-e310-e311-ba31-d43d7e4e88b2',
21
+ name: 'België/Belgique',
22
+ properties: {},
23
+ states: [],
24
+ uri: '/api/v1/websites/current/countries/b4ab0470-e310-e311-ba31-d43d7e4e88b2',
25
+ },
26
+ {
27
+ abbreviation: 'BG',
28
+ id: 'c1ab0470-e310-e311-ba31-d43d7e4e88b2',
29
+ name: 'Bulgaria',
30
+ properties: {},
31
+ states: [],
32
+ uri: '/api/v1/websites/current/countries/c1ab0470-e310-e311-ba31-d43d7e4e88b2',
33
+ },
34
+ {
35
+ abbreviation: 'HR',
36
+ id: 'd6ab0470-e310-e311-ba31-d43d7e4e88b2',
37
+ name: 'Croatia',
38
+ properties: {},
39
+ states: [],
40
+ uri: '/api/v1/websites/current/countries/d6ab0470-e310-e311-ba31-d43d7e4e88b2',
41
+ },
42
+ {
43
+ abbreviation: 'CY',
44
+ id: 'd9ab0470-e310-e311-ba31-d43d7e4e88b2',
45
+ name: 'Cyprus',
46
+ properties: {},
47
+ states: [],
48
+ uri: '/api/v1/websites/current/countries/d9ab0470-e310-e311-ba31-d43d7e4e88b2',
49
+ },
50
+ {
51
+ abbreviation: 'CZ',
52
+ id: 'daab0470-e310-e311-ba31-d43d7e4e88b2',
53
+ name: 'Česká republika',
54
+ properties: {},
55
+ states: [],
56
+ uri: '/api/v1/websites/current/countries/daab0470-e310-e311-ba31-d43d7e4e88b2',
57
+ },
58
+ {
59
+ abbreviation: 'DK',
60
+ id: 'dbab0470-e310-e311-ba31-d43d7e4e88b2',
61
+ name: 'Danmark',
62
+ properties: {},
63
+ states: [],
64
+ uri: '/api/v1/websites/current/countries/dbab0470-e310-e311-ba31-d43d7e4e88b2',
65
+ },
66
+ {
67
+ abbreviation: 'DE',
68
+ id: 'f1ab0470-e310-e311-ba31-d43d7e4e88b2',
69
+ name: 'Germany',
70
+ properties: {},
71
+ states: [],
72
+ uri: '/api/v1/websites/current/countries/f1ab0470-e310-e311-ba31-d43d7e4e88b2',
73
+ },
74
+ {
75
+ abbreviation: 'EE',
76
+ id: 'e4ab0470-e310-e311-ba31-d43d7e4e88b2',
77
+ name: 'Estonia',
78
+ properties: {},
79
+ states: [],
80
+ uri: '/api/v1/websites/current/countries/e4ab0470-e310-e311-ba31-d43d7e4e88b2',
81
+ },
82
+ {
83
+ abbreviation: 'FI',
84
+ id: 'e9ab0470-e310-e311-ba31-d43d7e4e88b2',
85
+ name: 'Finland',
86
+ properties: {},
87
+ states: [],
88
+ uri: '/api/v1/websites/current/countries/e9ab0470-e310-e311-ba31-d43d7e4e88b2',
89
+ },
90
+ {
91
+ abbreviation: 'FR',
92
+ id: 'eaab0470-e310-e311-ba31-d43d7e4e88b2',
93
+ name: 'France',
94
+ properties: {},
95
+ states: [],
96
+ uri: '/api/v1/websites/current/countries/eaab0470-e310-e311-ba31-d43d7e4e88b2',
97
+ },
98
+ {
99
+ abbreviation: 'GR',
100
+ id: 'f4ab0470-e310-e311-ba31-d43d7e4e88b2',
101
+ name: 'Greece',
102
+ properties: {},
103
+ states: [],
104
+ uri: '/api/v1/websites/current/countries/f4ab0470-e310-e311-ba31-d43d7e4e88b2',
105
+ },
106
+ {
107
+ abbreviation: 'HU',
108
+ id: '03ac0470-e310-e311-ba31-d43d7e4e88b2',
109
+ name: 'Hungary',
110
+ properties: {},
111
+ states: [],
112
+ uri: '/api/v1/websites/current/countries/03ac0470-e310-e311-ba31-d43d7e4e88b2',
113
+ },
114
+ {
115
+ abbreviation: 'IE',
116
+ id: '09ac0470-e310-e311-ba31-d43d7e4e88b2',
117
+ name: 'Ireland',
118
+ properties: {},
119
+ states: [],
120
+ uri: '/api/v1/websites/current/countries/09ac0470-e310-e311-ba31-d43d7e4e88b2',
121
+ },
122
+ {
123
+ abbreviation: 'IT',
124
+ id: '0cac0470-e310-e311-ba31-d43d7e4e88b2',
125
+ name: 'Italia',
126
+ properties: {},
127
+ states: [],
128
+ uri: '/api/v1/websites/current/countries/0cac0470-e310-e311-ba31-d43d7e4e88b2',
129
+ },
130
+ {
131
+ abbreviation: 'LV',
132
+ id: '19ac0470-e310-e311-ba31-d43d7e4e88b2',
133
+ name: 'Latvia',
134
+ properties: {},
135
+ states: [],
136
+ uri: '/api/v1/websites/current/countries/19ac0470-e310-e311-ba31-d43d7e4e88b2',
137
+ },
138
+ {
139
+ abbreviation: 'LT',
140
+ id: '1fac0470-e310-e311-ba31-d43d7e4e88b2',
141
+ name: 'Lithuania',
142
+ properties: {},
143
+ states: [],
144
+ uri: '/api/v1/websites/current/countries/1fac0470-e310-e311-ba31-d43d7e4e88b2',
145
+ },
146
+ {
147
+ abbreviation: 'LU',
148
+ id: '20ac0470-e310-e311-ba31-d43d7e4e88b2',
149
+ name: 'Luxembourg',
150
+ properties: {},
151
+ states: [],
152
+ uri: '/api/v1/websites/current/countries/20ac0470-e310-e311-ba31-d43d7e4e88b2',
153
+ },
154
+ {
155
+ abbreviation: 'MT',
156
+ id: '28ac0470-e310-e311-ba31-d43d7e4e88b2',
157
+ name: 'Malta',
158
+ properties: {},
159
+ states: [],
160
+ uri: '/api/v1/websites/current/countries/28ac0470-e310-e311-ba31-d43d7e4e88b2',
161
+ },
162
+ {
163
+ abbreviation: 'NO',
164
+ id: '44ac0470-e310-e311-ba31-d43d7e4e88b2',
165
+ name: 'Norway',
166
+ properties: {},
167
+ states: [],
168
+ uri: '/api/v1/websites/current/countries/44ac0470-e310-e311-ba31-d43d7e4e88b2',
169
+ },
170
+ {
171
+ abbreviation: 'PL',
172
+ id: '4fac0470-e310-e311-ba31-d43d7e4e88b2',
173
+ name: 'Poland',
174
+ properties: {},
175
+ states: [],
176
+ uri: '/api/v1/websites/current/countries/4fac0470-e310-e311-ba31-d43d7e4e88b2',
177
+ },
178
+ {
179
+ abbreviation: 'PT',
180
+ id: '50ac0470-e310-e311-ba31-d43d7e4e88b2',
181
+ name: 'Portugal',
182
+ properties: {},
183
+ states: [],
184
+ uri: '/api/v1/websites/current/countries/50ac0470-e310-e311-ba31-d43d7e4e88b2',
185
+ },
186
+ {
187
+ abbreviation: 'RO',
188
+ id: '54ac0470-e310-e311-ba31-d43d7e4e88b2',
189
+ name: 'Romania',
190
+ properties: {},
191
+ states: [],
192
+ uri: '/api/v1/websites/current/countries/54ac0470-e310-e311-ba31-d43d7e4e88b2',
193
+ },
194
+ {
195
+ abbreviation: 'SK',
196
+ id: '68ac0470-e310-e311-ba31-d43d7e4e88b2',
197
+ name: 'Slovakia',
198
+ properties: {},
199
+ states: [],
200
+ uri: '/api/v1/websites/current/countries/68ac0470-e310-e311-ba31-d43d7e4e88b2',
201
+ },
202
+ {
203
+ abbreviation: 'SI',
204
+ id: '69ac0470-e310-e311-ba31-d43d7e4e88b2',
205
+ name: 'Slovenia',
206
+ properties: {},
207
+ states: [],
208
+ uri: '/api/v1/websites/current/countries/69ac0470-e310-e311-ba31-d43d7e4e88b2',
209
+ },
210
+ {
211
+ abbreviation: 'ES',
212
+ id: '6fac0470-e310-e311-ba31-d43d7e4e88b2',
213
+ name: 'Spain',
214
+ properties: {},
215
+ states: [],
216
+ uri: '/api/v1/websites/current/countries/6fac0470-e310-e311-ba31-d43d7e4e88b2',
217
+ },
218
+ {
219
+ abbreviation: 'SE',
220
+ id: '75ac0470-e310-e311-ba31-d43d7e4e88b2',
221
+ name: 'Sweden',
222
+ properties: {},
223
+ states: [],
224
+ uri: '/api/v1/websites/current/countries/75ac0470-e310-e311-ba31-d43d7e4e88b2',
225
+ },
226
+ {
227
+ abbreviation: 'CH',
228
+ id: '76ac0470-e310-e311-ba31-d43d7e4e88b2',
229
+ name: 'Switzerland',
230
+ properties: {},
231
+ states: [],
232
+ uri: '/api/v1/websites/current/countries/76ac0470-e310-e311-ba31-d43d7e4e88b2',
233
+ },
234
+ {
235
+ abbreviation: 'NL',
236
+ id: '3bac0470-e310-e311-ba31-d43d7e4e88b2',
237
+ name: 'The Netherlands',
238
+ properties: {},
239
+ states: [],
240
+ uri: '/api/v1/websites/current/countries/3bac0470-e310-e311-ba31-d43d7e4e88b2',
241
+ },
242
+ {
243
+ abbreviation: 'GB',
244
+ id: '89ac0470-e310-e311-ba31-d43d7e4e88b2',
245
+ name: 'United Kingdom',
246
+ properties: {},
247
+ states: [],
248
+ uri: '/api/v1/websites/current/countries/89ac0470-e310-e311-ba31-d43d7e4e88b2',
249
+ },
250
+ {
251
+ abbreviation: 'US',
252
+ id: '8aac0470-e310-e311-ba31-d43d7e4e88b2',
253
+ name: 'United States',
254
+ properties: {},
255
+ states: [],
256
+ uri: '/api/v1/websites/current/countries/8aac0470-e310-e311-ba31-d43d7e4e88b2',
257
+ },
258
+ ];
259
+
260
+ export { countries };
@@ -1,4 +1,5 @@
1
1
  export declare const currencySymbolToISO: {
2
+ readonly '': "EUR";
2
3
  readonly $: "USD";
3
4
  readonly 'Bs.': "VES";
4
5
  readonly Ft: "HUF";
@@ -1,4 +1,5 @@
1
1
  const currencySymbolToISO = {
2
+ '': 'EUR', // Euro
2
3
  $: 'USD', // US Dollar
3
4
  'Bs.': 'VES', // Venezuelan Bolívar Soberano
4
5
  Ft: 'HUF', // Hungarian Forint
@@ -1 +1,39 @@
1
1
  export declare const formatPrice: (price: number) => string;
2
+ export declare const currencies: {
3
+ AR: string;
4
+ AU: string;
5
+ BR: string;
6
+ CA: string;
7
+ CH: string;
8
+ CN: string;
9
+ CZ: string;
10
+ DK: string;
11
+ GB: string;
12
+ HK: string;
13
+ HR: string;
14
+ HU: string;
15
+ ID: string;
16
+ IN: string;
17
+ JP: string;
18
+ KR: string;
19
+ LA: string;
20
+ MG: string;
21
+ MX: string;
22
+ MY: string;
23
+ NO: string;
24
+ NZ: string;
25
+ PH: string;
26
+ PL: string;
27
+ RO: string;
28
+ RS: string;
29
+ RU: string;
30
+ SE: string;
31
+ SG: string;
32
+ SK: string;
33
+ TH: string;
34
+ TW: string;
35
+ US: string;
36
+ VN: string;
37
+ default: string;
38
+ };
39
+ export declare const getCurrencyByCountryCode: (countryCode: string) => any;
@@ -2,5 +2,43 @@ const formatPrice = (price) => new Intl.NumberFormat('en-US', {
2
2
  maximumFractionDigits: 2,
3
3
  minimumFractionDigits: 2,
4
4
  }).format(price);
5
+ const currencies = {
6
+ AR: 'ARS',
7
+ AU: 'AUD',
8
+ BR: 'BRL',
9
+ CA: 'CAD',
10
+ CH: 'CHF',
11
+ CN: 'CNY',
12
+ CZ: 'CZK',
13
+ DK: 'DKK',
14
+ GB: 'GBP',
15
+ HK: 'HKD',
16
+ HR: 'HRK',
17
+ HU: 'HUN',
18
+ ID: 'IDR',
19
+ IN: 'INR',
20
+ JP: 'JPY',
21
+ KR: 'KRW',
22
+ LA: 'LAK',
23
+ MG: 'MGA',
24
+ MX: 'MXN',
25
+ MY: 'MYR',
26
+ NO: 'NOK',
27
+ NZ: 'NZD',
28
+ PH: 'PHP',
29
+ PL: 'PLN',
30
+ RO: 'RON',
31
+ RS: 'RSD',
32
+ RU: 'RUB',
33
+ SE: 'SEK',
34
+ SG: 'SGD',
35
+ SK: 'SKK',
36
+ TH: 'THB',
37
+ TW: 'TWD',
38
+ US: 'USD',
39
+ VN: 'VND',
40
+ default: 'EUR',
41
+ };
42
+ const getCurrencyByCountryCode = (countryCode) => currencies[countryCode] || currencies.default;
5
43
 
6
- export { formatPrice };
44
+ export { currencies, formatPrice, getCurrencyByCountryCode };
@@ -0,0 +1,10 @@
1
+ export declare function random<T>(array: T[]): T;
2
+ export declare function random<T>(array: T[] | ({
3
+ length: 0;
4
+ } & never[])): T | undefined;
5
+ export declare function random(max: number): number;
6
+ export declare function random(min: number, max: number): number;
7
+ export declare function random(minMax: number, max?: number): number;
8
+ export declare function randomInt(max: number): number;
9
+ export declare function randomInt(min: number, max: number): number;
10
+ export declare function randomInt(minMax: number, max?: number): number;
@@ -0,0 +1,16 @@
1
+ function random(minMaxArray, max) {
2
+ if (Array.isArray(minMaxArray)) {
3
+ const randomEntry = minMaxArray[randomInt(minMaxArray.length)];
4
+ if (!randomEntry)
5
+ throw new Error('Array is empty');
6
+ return randomEntry;
7
+ }
8
+ const _min = max === undefined ? 0 : minMaxArray;
9
+ const _max = max === undefined ? minMaxArray : max;
10
+ return Math.random() * (_max - _min) + _min;
11
+ }
12
+ function randomInt(minMax, max) {
13
+ return Math.floor(random(minMax, max));
14
+ }
15
+
16
+ export { random, randomInt };