@cimplify/sdk 0.22.1 → 0.22.3
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/dist/advanced.d.mts +1 -24
- package/dist/advanced.d.ts +1 -24
- package/dist/advanced.js +20 -29
- package/dist/advanced.mjs +1 -2
- package/dist/{chunk-A7IQN5EK.js → chunk-7QQOYYEB.js} +17 -17
- package/dist/{chunk-W3DMONZR.mjs → chunk-KBKAYGMI.mjs} +1 -1
- package/dist/{chunk-S6TU55KP.js → chunk-L5GKVQVJ.js} +16 -0
- package/dist/{chunk-VYSXEDBV.js → chunk-RETQI2CJ.js} +37 -2
- package/dist/{chunk-R4EYMPSN.mjs → chunk-X7FRCS2Q.mjs} +37 -2
- package/dist/{chunk-WDIMISRC.mjs → chunk-YOIVZ6OA.mjs} +16 -0
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +62 -71
- package/dist/index.mjs +3 -4
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +44 -19
- package/dist/react.mjs +28 -3
- package/dist/utils.js +4 -4
- package/dist/utils.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-FLPI2VVJ.js +0 -72
- package/dist/chunk-LM3CJ4L7.mjs +0 -69
- /package/dist/{client-uvCOGdBp.d.ts → index-uvCOGdBp.d.ts} +0 -0
- /package/dist/{client-v1NFqZFG.d.mts → index-v1NFqZFG.d.mts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,256 +1,247 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var chunkVYSXEDBV_js = require('./chunk-VYSXEDBV.js');
|
|
3
|
+
var chunk7QQOYYEB_js = require('./chunk-7QQOYYEB.js');
|
|
4
|
+
var chunkL5GKVQVJ_js = require('./chunk-L5GKVQVJ.js');
|
|
5
|
+
var chunkRETQI2CJ_js = require('./chunk-RETQI2CJ.js');
|
|
7
6
|
var chunk64OCG2TJ_js = require('./chunk-64OCG2TJ.js');
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
Object.defineProperty(exports, "ActivityService", {
|
|
12
11
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk7QQOYYEB_js.ActivityService; }
|
|
14
13
|
});
|
|
15
14
|
Object.defineProperty(exports, "CimplifyClient", {
|
|
16
15
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk7QQOYYEB_js.CimplifyClient; }
|
|
18
17
|
});
|
|
19
18
|
Object.defineProperty(exports, "DeliveryService", {
|
|
20
19
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunk7QQOYYEB_js.DeliveryService; }
|
|
22
21
|
});
|
|
23
22
|
Object.defineProperty(exports, "createCimplifyClient", {
|
|
24
23
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunk7QQOYYEB_js.createCimplifyClient; }
|
|
26
25
|
});
|
|
27
26
|
Object.defineProperty(exports, "getVariantDisplayName", {
|
|
28
27
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunk7QQOYYEB_js.getVariantDisplayName; }
|
|
30
29
|
});
|
|
31
30
|
Object.defineProperty(exports, "isValidPhoneForContext", {
|
|
32
31
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkL5GKVQVJ_js.isValidPhoneForContext; }
|
|
34
33
|
});
|
|
35
34
|
Object.defineProperty(exports, "normalizePhoneToE164", {
|
|
36
35
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkL5GKVQVJ_js.normalizePhoneToE164; }
|
|
38
37
|
});
|
|
39
38
|
Object.defineProperty(exports, "resolvePhoneCountryCode", {
|
|
40
39
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(exports, "QueryBuilder", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () { return chunkFLPI2VVJ_js.QueryBuilder; }
|
|
46
|
-
});
|
|
47
|
-
Object.defineProperty(exports, "query", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: function () { return chunkFLPI2VVJ_js.query; }
|
|
40
|
+
get: function () { return chunkL5GKVQVJ_js.resolvePhoneCountryCode; }
|
|
50
41
|
});
|
|
51
42
|
Object.defineProperty(exports, "AUTHORIZATION_TYPE", {
|
|
52
43
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkRETQI2CJ_js.AUTHORIZATION_TYPE; }
|
|
54
45
|
});
|
|
55
46
|
Object.defineProperty(exports, "AUTH_MUTATION", {
|
|
56
47
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkRETQI2CJ_js.AUTH_MUTATION; }
|
|
58
49
|
});
|
|
59
50
|
Object.defineProperty(exports, "AuthService", {
|
|
60
51
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkRETQI2CJ_js.AuthService; }
|
|
62
53
|
});
|
|
63
54
|
Object.defineProperty(exports, "BusinessService", {
|
|
64
55
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkRETQI2CJ_js.BusinessService; }
|
|
66
57
|
});
|
|
67
58
|
Object.defineProperty(exports, "CHECKOUT_MODE", {
|
|
68
59
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkRETQI2CJ_js.CHECKOUT_MODE; }
|
|
70
61
|
});
|
|
71
62
|
Object.defineProperty(exports, "CHECKOUT_MUTATION", {
|
|
72
63
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkRETQI2CJ_js.CHECKOUT_MUTATION; }
|
|
74
65
|
});
|
|
75
66
|
Object.defineProperty(exports, "CHECKOUT_STEP", {
|
|
76
67
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkRETQI2CJ_js.CHECKOUT_STEP; }
|
|
78
69
|
});
|
|
79
70
|
Object.defineProperty(exports, "CONTACT_TYPE", {
|
|
80
71
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkRETQI2CJ_js.CONTACT_TYPE; }
|
|
82
73
|
});
|
|
83
74
|
Object.defineProperty(exports, "CartOperations", {
|
|
84
75
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkRETQI2CJ_js.CartOperations; }
|
|
86
77
|
});
|
|
87
78
|
Object.defineProperty(exports, "CatalogueQueries", {
|
|
88
79
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkRETQI2CJ_js.CatalogueQueries; }
|
|
90
81
|
});
|
|
91
82
|
Object.defineProperty(exports, "CheckoutOperations", {
|
|
92
83
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkRETQI2CJ_js.CheckoutService; }
|
|
94
85
|
});
|
|
95
86
|
Object.defineProperty(exports, "CheckoutService", {
|
|
96
87
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkRETQI2CJ_js.CheckoutService; }
|
|
98
89
|
});
|
|
99
90
|
Object.defineProperty(exports, "CimplifyElement", {
|
|
100
91
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkRETQI2CJ_js.CimplifyElement; }
|
|
102
93
|
});
|
|
103
94
|
Object.defineProperty(exports, "CimplifyElements", {
|
|
104
95
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkRETQI2CJ_js.CimplifyElements; }
|
|
106
97
|
});
|
|
107
98
|
Object.defineProperty(exports, "DEFAULT_COUNTRY", {
|
|
108
99
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkRETQI2CJ_js.DEFAULT_COUNTRY; }
|
|
110
101
|
});
|
|
111
102
|
Object.defineProperty(exports, "DEFAULT_CURRENCY", {
|
|
112
103
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkRETQI2CJ_js.DEFAULT_CURRENCY; }
|
|
114
105
|
});
|
|
115
106
|
Object.defineProperty(exports, "DEVICE_TYPE", {
|
|
116
107
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkRETQI2CJ_js.DEVICE_TYPE; }
|
|
118
109
|
});
|
|
119
110
|
Object.defineProperty(exports, "ELEMENT_TYPES", {
|
|
120
111
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkRETQI2CJ_js.ELEMENT_TYPES; }
|
|
122
113
|
});
|
|
123
114
|
Object.defineProperty(exports, "EVENT_TYPES", {
|
|
124
115
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkRETQI2CJ_js.EVENT_TYPES; }
|
|
126
117
|
});
|
|
127
118
|
Object.defineProperty(exports, "FxService", {
|
|
128
119
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkRETQI2CJ_js.FxService; }
|
|
130
121
|
});
|
|
131
122
|
Object.defineProperty(exports, "InventoryService", {
|
|
132
123
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkRETQI2CJ_js.InventoryService; }
|
|
134
125
|
});
|
|
135
126
|
Object.defineProperty(exports, "LINK_MUTATION", {
|
|
136
127
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkRETQI2CJ_js.LINK_MUTATION; }
|
|
138
129
|
});
|
|
139
130
|
Object.defineProperty(exports, "LINK_QUERY", {
|
|
140
131
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkRETQI2CJ_js.LINK_QUERY; }
|
|
142
133
|
});
|
|
143
134
|
Object.defineProperty(exports, "LinkService", {
|
|
144
135
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkRETQI2CJ_js.LinkService; }
|
|
146
137
|
});
|
|
147
138
|
Object.defineProperty(exports, "LiteService", {
|
|
148
139
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkRETQI2CJ_js.LiteService; }
|
|
150
141
|
});
|
|
151
142
|
Object.defineProperty(exports, "MESSAGE_TYPES", {
|
|
152
143
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkRETQI2CJ_js.MESSAGE_TYPES; }
|
|
154
145
|
});
|
|
155
146
|
Object.defineProperty(exports, "MOBILE_MONEY_PROVIDER", {
|
|
156
147
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkRETQI2CJ_js.MOBILE_MONEY_PROVIDER; }
|
|
158
149
|
});
|
|
159
150
|
Object.defineProperty(exports, "ORDER_MUTATION", {
|
|
160
151
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkRETQI2CJ_js.ORDER_MUTATION; }
|
|
162
153
|
});
|
|
163
154
|
Object.defineProperty(exports, "ORDER_TYPE", {
|
|
164
155
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkRETQI2CJ_js.ORDER_TYPE; }
|
|
166
157
|
});
|
|
167
158
|
Object.defineProperty(exports, "OrderQueries", {
|
|
168
159
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkRETQI2CJ_js.OrderQueries; }
|
|
170
161
|
});
|
|
171
162
|
Object.defineProperty(exports, "PAYMENT_METHOD", {
|
|
172
163
|
enumerable: true,
|
|
173
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkRETQI2CJ_js.PAYMENT_METHOD; }
|
|
174
165
|
});
|
|
175
166
|
Object.defineProperty(exports, "PAYMENT_MUTATION", {
|
|
176
167
|
enumerable: true,
|
|
177
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkRETQI2CJ_js.PAYMENT_MUTATION; }
|
|
178
169
|
});
|
|
179
170
|
Object.defineProperty(exports, "PAYMENT_STATE", {
|
|
180
171
|
enumerable: true,
|
|
181
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkRETQI2CJ_js.PAYMENT_STATE; }
|
|
182
173
|
});
|
|
183
174
|
Object.defineProperty(exports, "PICKUP_TIME_TYPE", {
|
|
184
175
|
enumerable: true,
|
|
185
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkRETQI2CJ_js.PICKUP_TIME_TYPE; }
|
|
186
177
|
});
|
|
187
178
|
Object.defineProperty(exports, "SchedulingService", {
|
|
188
179
|
enumerable: true,
|
|
189
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkRETQI2CJ_js.SchedulingService; }
|
|
190
181
|
});
|
|
191
182
|
Object.defineProperty(exports, "combine", {
|
|
192
183
|
enumerable: true,
|
|
193
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkRETQI2CJ_js.combine; }
|
|
194
185
|
});
|
|
195
186
|
Object.defineProperty(exports, "combineObject", {
|
|
196
187
|
enumerable: true,
|
|
197
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkRETQI2CJ_js.combineObject; }
|
|
198
189
|
});
|
|
199
190
|
Object.defineProperty(exports, "createElements", {
|
|
200
191
|
enumerable: true,
|
|
201
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkRETQI2CJ_js.createElements; }
|
|
202
193
|
});
|
|
203
194
|
Object.defineProperty(exports, "err", {
|
|
204
195
|
enumerable: true,
|
|
205
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkRETQI2CJ_js.err; }
|
|
206
197
|
});
|
|
207
198
|
Object.defineProperty(exports, "flatMap", {
|
|
208
199
|
enumerable: true,
|
|
209
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkRETQI2CJ_js.flatMap; }
|
|
210
201
|
});
|
|
211
202
|
Object.defineProperty(exports, "fromPromise", {
|
|
212
203
|
enumerable: true,
|
|
213
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkRETQI2CJ_js.fromPromise; }
|
|
214
205
|
});
|
|
215
206
|
Object.defineProperty(exports, "generateIdempotencyKey", {
|
|
216
207
|
enumerable: true,
|
|
217
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkRETQI2CJ_js.generateIdempotencyKey; }
|
|
218
209
|
});
|
|
219
210
|
Object.defineProperty(exports, "getOrElse", {
|
|
220
211
|
enumerable: true,
|
|
221
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkRETQI2CJ_js.getOrElse; }
|
|
222
213
|
});
|
|
223
214
|
Object.defineProperty(exports, "isErr", {
|
|
224
215
|
enumerable: true,
|
|
225
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkRETQI2CJ_js.isErr; }
|
|
226
217
|
});
|
|
227
218
|
Object.defineProperty(exports, "isOk", {
|
|
228
219
|
enumerable: true,
|
|
229
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkRETQI2CJ_js.isOk; }
|
|
230
221
|
});
|
|
231
222
|
Object.defineProperty(exports, "mapError", {
|
|
232
223
|
enumerable: true,
|
|
233
|
-
get: function () { return
|
|
224
|
+
get: function () { return chunkRETQI2CJ_js.mapError; }
|
|
234
225
|
});
|
|
235
226
|
Object.defineProperty(exports, "mapResult", {
|
|
236
227
|
enumerable: true,
|
|
237
|
-
get: function () { return
|
|
228
|
+
get: function () { return chunkRETQI2CJ_js.mapResult; }
|
|
238
229
|
});
|
|
239
230
|
Object.defineProperty(exports, "ok", {
|
|
240
231
|
enumerable: true,
|
|
241
|
-
get: function () { return
|
|
232
|
+
get: function () { return chunkRETQI2CJ_js.ok; }
|
|
242
233
|
});
|
|
243
234
|
Object.defineProperty(exports, "toNullable", {
|
|
244
235
|
enumerable: true,
|
|
245
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkRETQI2CJ_js.toNullable; }
|
|
246
237
|
});
|
|
247
238
|
Object.defineProperty(exports, "tryCatch", {
|
|
248
239
|
enumerable: true,
|
|
249
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkRETQI2CJ_js.tryCatch; }
|
|
250
241
|
});
|
|
251
242
|
Object.defineProperty(exports, "unwrap", {
|
|
252
243
|
enumerable: true,
|
|
253
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkRETQI2CJ_js.unwrap; }
|
|
254
245
|
});
|
|
255
246
|
Object.defineProperty(exports, "CURRENCY_SYMBOLS", {
|
|
256
247
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { ActivityService, CimplifyClient, DeliveryService, createCimplifyClient, getVariantDisplayName } from './chunk-
|
|
2
|
-
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-
|
|
3
|
-
export {
|
|
4
|
-
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, SchedulingService, combine, combineObject, createElements, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, toNullable, tryCatch, unwrap } from './chunk-R4EYMPSN.mjs';
|
|
1
|
+
export { ActivityService, CimplifyClient, DeliveryService, createCimplifyClient, getVariantDisplayName } from './chunk-KBKAYGMI.mjs';
|
|
2
|
+
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
|
|
3
|
+
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, SchedulingService, combine, combineObject, createElements, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, toNullable, tryCatch, unwrap } from './chunk-X7FRCS2Q.mjs';
|
|
5
4
|
export { CURRENCY_SYMBOLS, CimplifyError, ERROR_HINTS, ErrorCode, MOBILE_MONEY_PROVIDERS, ZERO, categorizePaymentError, currencyCode, detectMobileMoneyProvider, enrichError, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getErrorHint, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isCimplifyError, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isRetryableError, isSupportedCurrency, isTaxInclusive, money, moneyFromNumber, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './chunk-JFT63H34.mjs';
|
package/dist/react.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-BxbWrwqp.mjs';
|
|
3
3
|
export { c as AdConfig, g as getVariantDisplayName } from './ads-BxbWrwqp.mjs';
|
|
4
|
-
import { C as CimplifyClient, a8 as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, bK as Location, bH as Business, k as ReorderResult, aR as OrderStatus, b2 as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, bX as Service, c0 as AvailableSlot, c1 as DayAvailability, c6 as CustomerBooking, cc as CancelBookingResult, w as ActivityStateResponse, u as SessionMessage, x as ActivityRecommendation, E as DeliveryFeeResponse, cO as FxRateResponse, bR as StorefrontBootstrap, Y as ElementsOptions, d0 as AuthenticatedData, cY as AddressInfo, cZ as PaymentMethodInfo, K as CimplifyElements, d2 as ElementsCheckoutResult, a7 as ProcessCheckoutOptions, b1 as LineItem, bY as Staff, bP as Room } from './
|
|
4
|
+
import { C as CimplifyClient, a8 as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, bK as Location, bH as Business, k as ReorderResult, aR as OrderStatus, b2 as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, bX as Service, c0 as AvailableSlot, c1 as DayAvailability, c6 as CustomerBooking, cc as CancelBookingResult, w as ActivityStateResponse, u as SessionMessage, x as ActivityRecommendation, E as DeliveryFeeResponse, cO as FxRateResponse, bR as StorefrontBootstrap, Y as ElementsOptions, d0 as AuthenticatedData, cY as AddressInfo, cZ as PaymentMethodInfo, K as CimplifyElements, d2 as ElementsCheckoutResult, a7 as ProcessCheckoutOptions, b1 as LineItem, bY as Staff, bP as Room } from './index-v1NFqZFG.mjs';
|
|
5
5
|
import { J as Product, d as Pagination, h as CimplifyError, L as ProductWithDetails, a5 as Category, M as Money, b0 as BundleSelectionInput, av as ComponentSelectionInput, b3 as BundleSelectionData, b6 as CompositeSelectionData, a7 as Collection, aD as ProductTaxonomy, aE as TaxonomyWithChildren, aC as ProductTimeProfile, aH as Deal, aI as ProductDealInfo, aJ as DiscountValidation, ac as BundleSummary, aw as CompositePriceResult, y as CustomAttributeDefinition, G as PropertyFacet, bI as ProductBillingPlan, N as VariantView, W as VariantAxisWithValues, a as CurrencyCode, a1 as AddOnWithOptions, ah as BundleComponentView, aa as BundlePriceType, as as CompositeGroupView, bb as DisplayCart } from './payment-DazihbCY.mjs';
|
|
6
6
|
import { P as ProductWithPrice } from './price-BcHVTqqu.mjs';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-BxbWrwqp.js';
|
|
3
3
|
export { c as AdConfig, g as getVariantDisplayName } from './ads-BxbWrwqp.js';
|
|
4
|
-
import { C as CimplifyClient, a8 as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, bK as Location, bH as Business, k as ReorderResult, aR as OrderStatus, b2 as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, bX as Service, c0 as AvailableSlot, c1 as DayAvailability, c6 as CustomerBooking, cc as CancelBookingResult, w as ActivityStateResponse, u as SessionMessage, x as ActivityRecommendation, E as DeliveryFeeResponse, cO as FxRateResponse, bR as StorefrontBootstrap, Y as ElementsOptions, d0 as AuthenticatedData, cY as AddressInfo, cZ as PaymentMethodInfo, K as CimplifyElements, d2 as ElementsCheckoutResult, a7 as ProcessCheckoutOptions, b1 as LineItem, bY as Staff, bP as Room } from './
|
|
4
|
+
import { C as CimplifyClient, a8 as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, bK as Location, bH as Business, k as ReorderResult, aR as OrderStatus, b2 as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, bX as Service, c0 as AvailableSlot, c1 as DayAvailability, c6 as CustomerBooking, cc as CancelBookingResult, w as ActivityStateResponse, u as SessionMessage, x as ActivityRecommendation, E as DeliveryFeeResponse, cO as FxRateResponse, bR as StorefrontBootstrap, Y as ElementsOptions, d0 as AuthenticatedData, cY as AddressInfo, cZ as PaymentMethodInfo, K as CimplifyElements, d2 as ElementsCheckoutResult, a7 as ProcessCheckoutOptions, b1 as LineItem, bY as Staff, bP as Room } from './index-uvCOGdBp.js';
|
|
5
5
|
import { J as Product, d as Pagination, h as CimplifyError, L as ProductWithDetails, a5 as Category, M as Money, b0 as BundleSelectionInput, av as ComponentSelectionInput, b3 as BundleSelectionData, b6 as CompositeSelectionData, a7 as Collection, aD as ProductTaxonomy, aE as TaxonomyWithChildren, aC as ProductTimeProfile, aH as Deal, aI as ProductDealInfo, aJ as DiscountValidation, ac as BundleSummary, aw as CompositePriceResult, y as CustomAttributeDefinition, G as PropertyFacet, bI as ProductBillingPlan, N as VariantView, W as VariantAxisWithValues, a as CurrencyCode, a1 as AddOnWithOptions, ah as BundleComponentView, aa as BundlePriceType, as as CompositeGroupView, bb as DisplayCart } from './payment-DazihbCY.js';
|
|
6
6
|
import { P as ProductWithPrice } from './price-5_L8WK6Q.js';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
package/dist/react.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunk7QQOYYEB_js = require('./chunk-7QQOYYEB.js');
|
|
5
|
+
var chunkRETQI2CJ_js = require('./chunk-RETQI2CJ.js');
|
|
6
6
|
var chunk64OCG2TJ_js = require('./chunk-64OCG2TJ.js');
|
|
7
7
|
var React3 = require('react');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -77,7 +77,19 @@ function getUserIdentity(authenticatedAccountId) {
|
|
|
77
77
|
signals
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
+
function getUserAgentData() {
|
|
81
|
+
if (typeof navigator === "undefined") return null;
|
|
82
|
+
const nav = navigator;
|
|
83
|
+
return nav.userAgentData ?? null;
|
|
84
|
+
}
|
|
80
85
|
function getDeviceType(signals) {
|
|
86
|
+
const uaData = getUserAgentData();
|
|
87
|
+
if (uaData) {
|
|
88
|
+
if (uaData.mobile) {
|
|
89
|
+
return signals.screenWidth >= 768 ? "tablet" : "mobile";
|
|
90
|
+
}
|
|
91
|
+
return "desktop";
|
|
92
|
+
}
|
|
81
93
|
const ua = signals.userAgent.toLowerCase();
|
|
82
94
|
const width = signals.screenWidth;
|
|
83
95
|
if (/mobile|android|iphone|ipod/.test(ua) || width < 768) {
|
|
@@ -89,6 +101,15 @@ function getDeviceType(signals) {
|
|
|
89
101
|
return "desktop";
|
|
90
102
|
}
|
|
91
103
|
function getBrowserInfo(signals) {
|
|
104
|
+
const uaData = getUserAgentData();
|
|
105
|
+
if (uaData && uaData.brands.length > 0) {
|
|
106
|
+
const real = uaData.brands.find(
|
|
107
|
+
(b) => !/not/i.test(b.brand) && !/brand/i.test(b.brand)
|
|
108
|
+
);
|
|
109
|
+
if (real) {
|
|
110
|
+
return { name: real.brand, version: real.version };
|
|
111
|
+
}
|
|
112
|
+
}
|
|
92
113
|
const ua = signals.userAgent;
|
|
93
114
|
const browsers = [
|
|
94
115
|
{ name: "Chrome", regex: /Chrome\/(\d+)/ },
|
|
@@ -106,6 +127,10 @@ function getBrowserInfo(signals) {
|
|
|
106
127
|
return { name: "Unknown", version: "0" };
|
|
107
128
|
}
|
|
108
129
|
function getOSInfo(signals) {
|
|
130
|
+
const uaData = getUserAgentData();
|
|
131
|
+
if (uaData && uaData.platform) {
|
|
132
|
+
return { name: uaData.platform, version: "" };
|
|
133
|
+
}
|
|
109
134
|
const ua = signals.userAgent;
|
|
110
135
|
if (/Windows NT 10/.test(ua)) return { name: "Windows", version: "10" };
|
|
111
136
|
if (/Windows NT 6.3/.test(ua)) return { name: "Windows", version: "8.1" };
|
|
@@ -1036,7 +1061,7 @@ var DEFAULT_COUNTRY = "US";
|
|
|
1036
1061
|
function createDefaultClient() {
|
|
1037
1062
|
const processRef = globalThis.process;
|
|
1038
1063
|
const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
|
|
1039
|
-
return
|
|
1064
|
+
return chunk7QQOYYEB_js.createCimplifyClient({ publicKey: envPublicKey });
|
|
1040
1065
|
}
|
|
1041
1066
|
function getStoredLocationId() {
|
|
1042
1067
|
if (typeof window === "undefined" || !window.localStorage) {
|
|
@@ -3187,19 +3212,19 @@ function AuthElement({
|
|
|
3187
3212
|
}, [onReady, onAuthenticated, onRequiresOtp, onError]);
|
|
3188
3213
|
React3.useEffect(() => {
|
|
3189
3214
|
if (!elements || !containerRef.current) return;
|
|
3190
|
-
const element = elements.create(
|
|
3215
|
+
const element = elements.create(chunkRETQI2CJ_js.ELEMENT_TYPES.AUTH, { prefillEmail });
|
|
3191
3216
|
elementRef.current = element;
|
|
3192
|
-
element.on(
|
|
3217
|
+
element.on(chunkRETQI2CJ_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
3193
3218
|
element.on(
|
|
3194
|
-
|
|
3219
|
+
chunkRETQI2CJ_js.EVENT_TYPES.AUTHENTICATED,
|
|
3195
3220
|
(data) => onAuthenticatedRef.current?.(data)
|
|
3196
3221
|
);
|
|
3197
3222
|
element.on(
|
|
3198
|
-
|
|
3223
|
+
chunkRETQI2CJ_js.EVENT_TYPES.REQUIRES_OTP,
|
|
3199
3224
|
(data) => onRequiresOtpRef.current?.(data)
|
|
3200
3225
|
);
|
|
3201
3226
|
element.on(
|
|
3202
|
-
|
|
3227
|
+
chunkRETQI2CJ_js.EVENT_TYPES.ERROR,
|
|
3203
3228
|
(data) => onErrorRef.current?.(data)
|
|
3204
3229
|
);
|
|
3205
3230
|
element.mount(containerRef.current);
|
|
@@ -3228,15 +3253,15 @@ function AddressElement({
|
|
|
3228
3253
|
}, [onReady, onChange, onError]);
|
|
3229
3254
|
React3.useEffect(() => {
|
|
3230
3255
|
if (!elements || !containerRef.current) return;
|
|
3231
|
-
const element = elements.create(
|
|
3256
|
+
const element = elements.create(chunkRETQI2CJ_js.ELEMENT_TYPES.ADDRESS, { mode });
|
|
3232
3257
|
elementRef.current = element;
|
|
3233
|
-
element.on(
|
|
3258
|
+
element.on(chunkRETQI2CJ_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
3234
3259
|
element.on(
|
|
3235
|
-
|
|
3260
|
+
chunkRETQI2CJ_js.EVENT_TYPES.CHANGE,
|
|
3236
3261
|
(data) => onChangeRef.current?.(data)
|
|
3237
3262
|
);
|
|
3238
3263
|
element.on(
|
|
3239
|
-
|
|
3264
|
+
chunkRETQI2CJ_js.EVENT_TYPES.ERROR,
|
|
3240
3265
|
(data) => onErrorRef.current?.(data)
|
|
3241
3266
|
);
|
|
3242
3267
|
element.mount(containerRef.current);
|
|
@@ -3266,15 +3291,15 @@ function PaymentElement({
|
|
|
3266
3291
|
}, [onReady, onChange, onError]);
|
|
3267
3292
|
React3.useEffect(() => {
|
|
3268
3293
|
if (!elements || !containerRef.current) return;
|
|
3269
|
-
const element = elements.create(
|
|
3294
|
+
const element = elements.create(chunkRETQI2CJ_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
|
|
3270
3295
|
elementRef.current = element;
|
|
3271
|
-
element.on(
|
|
3296
|
+
element.on(chunkRETQI2CJ_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
3272
3297
|
element.on(
|
|
3273
|
-
|
|
3298
|
+
chunkRETQI2CJ_js.EVENT_TYPES.CHANGE,
|
|
3274
3299
|
(data) => onChangeRef.current?.(data)
|
|
3275
3300
|
);
|
|
3276
3301
|
element.on(
|
|
3277
|
-
|
|
3302
|
+
chunkRETQI2CJ_js.EVENT_TYPES.ERROR,
|
|
3278
3303
|
(data) => onErrorRef.current?.(data)
|
|
3279
3304
|
);
|
|
3280
3305
|
element.mount(containerRef.current);
|
|
@@ -3537,7 +3562,7 @@ function VariantSelector({
|
|
|
3537
3562
|
{
|
|
3538
3563
|
"data-cimplify-variant-name": true,
|
|
3539
3564
|
className: cn("flex-1 min-w-0 text-sm", classNames?.name),
|
|
3540
|
-
children:
|
|
3565
|
+
children: chunk7QQOYYEB_js.getVariantDisplayName(variant, productName)
|
|
3541
3566
|
}
|
|
3542
3567
|
),
|
|
3543
3568
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-variant-pricing": true, className: cn("text-sm text-muted-foreground", classNames?.pricing), children: [
|
|
@@ -4851,7 +4876,7 @@ function CartLineItemRow({
|
|
|
4851
4876
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-item": true, className: classNames?.item, children: [
|
|
4852
4877
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-item-info": true, children: [
|
|
4853
4878
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-cart-item-name": true, className: classNames?.itemName, children: item.product.name }),
|
|
4854
|
-
item.variant && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-cart-item-variant": true, children:
|
|
4879
|
+
item.variant && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-cart-item-variant": true, children: chunk7QQOYYEB_js.getVariantDisplayName(item.variant, item.product.name) }),
|
|
4855
4880
|
item.addOnOptions && item.addOnOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-cart-item-addons": true, children: [
|
|
4856
4881
|
"+ ",
|
|
4857
4882
|
item.addOnOptions.map((opt) => opt.name).join(", ")
|
|
@@ -8576,7 +8601,7 @@ function CurrencySelector({
|
|
|
8576
8601
|
|
|
8577
8602
|
Object.defineProperty(exports, "getVariantDisplayName", {
|
|
8578
8603
|
enumerable: true,
|
|
8579
|
-
get: function () { return
|
|
8604
|
+
get: function () { return chunk7QQOYYEB_js.getVariantDisplayName; }
|
|
8580
8605
|
});
|
|
8581
8606
|
exports.Ad = Ad;
|
|
8582
8607
|
exports.AdProvider = AdProvider;
|
package/dist/react.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getVariantDisplayName, createCimplifyClient } from './chunk-
|
|
3
|
-
export { getVariantDisplayName } from './chunk-
|
|
4
|
-
import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-
|
|
2
|
+
import { getVariantDisplayName, createCimplifyClient } from './chunk-KBKAYGMI.mjs';
|
|
3
|
+
export { getVariantDisplayName } from './chunk-KBKAYGMI.mjs';
|
|
4
|
+
import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-X7FRCS2Q.mjs';
|
|
5
5
|
import { isSupportedCurrency, formatPrice, parsePrice, isOnSale, getDiscountPercentage, getBasePrice } from './chunk-JFT63H34.mjs';
|
|
6
6
|
import React3, { createContext, useRef, useState, useCallback, useEffect, useContext, useMemo, useSyncExternalStore, useId } from 'react';
|
|
7
7
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
@@ -72,7 +72,19 @@ function getUserIdentity(authenticatedAccountId) {
|
|
|
72
72
|
signals
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
+
function getUserAgentData() {
|
|
76
|
+
if (typeof navigator === "undefined") return null;
|
|
77
|
+
const nav = navigator;
|
|
78
|
+
return nav.userAgentData ?? null;
|
|
79
|
+
}
|
|
75
80
|
function getDeviceType(signals) {
|
|
81
|
+
const uaData = getUserAgentData();
|
|
82
|
+
if (uaData) {
|
|
83
|
+
if (uaData.mobile) {
|
|
84
|
+
return signals.screenWidth >= 768 ? "tablet" : "mobile";
|
|
85
|
+
}
|
|
86
|
+
return "desktop";
|
|
87
|
+
}
|
|
76
88
|
const ua = signals.userAgent.toLowerCase();
|
|
77
89
|
const width = signals.screenWidth;
|
|
78
90
|
if (/mobile|android|iphone|ipod/.test(ua) || width < 768) {
|
|
@@ -84,6 +96,15 @@ function getDeviceType(signals) {
|
|
|
84
96
|
return "desktop";
|
|
85
97
|
}
|
|
86
98
|
function getBrowserInfo(signals) {
|
|
99
|
+
const uaData = getUserAgentData();
|
|
100
|
+
if (uaData && uaData.brands.length > 0) {
|
|
101
|
+
const real = uaData.brands.find(
|
|
102
|
+
(b) => !/not/i.test(b.brand) && !/brand/i.test(b.brand)
|
|
103
|
+
);
|
|
104
|
+
if (real) {
|
|
105
|
+
return { name: real.brand, version: real.version };
|
|
106
|
+
}
|
|
107
|
+
}
|
|
87
108
|
const ua = signals.userAgent;
|
|
88
109
|
const browsers = [
|
|
89
110
|
{ name: "Chrome", regex: /Chrome\/(\d+)/ },
|
|
@@ -101,6 +122,10 @@ function getBrowserInfo(signals) {
|
|
|
101
122
|
return { name: "Unknown", version: "0" };
|
|
102
123
|
}
|
|
103
124
|
function getOSInfo(signals) {
|
|
125
|
+
const uaData = getUserAgentData();
|
|
126
|
+
if (uaData && uaData.platform) {
|
|
127
|
+
return { name: uaData.platform, version: "" };
|
|
128
|
+
}
|
|
104
129
|
const ua = signals.userAgent;
|
|
105
130
|
if (/Windows NT 10/.test(ua)) return { name: "Windows", version: "10" };
|
|
106
131
|
if (/Windows NT 6.3/.test(ua)) return { name: "Windows", version: "8.1" };
|
package/dist/utils.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkL5GKVQVJ_js = require('./chunk-L5GKVQVJ.js');
|
|
4
4
|
var chunk64OCG2TJ_js = require('./chunk-64OCG2TJ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "isValidPhoneForContext", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkL5GKVQVJ_js.isValidPhoneForContext; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "normalizePhoneToE164", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkL5GKVQVJ_js.normalizePhoneToE164; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "resolvePhoneCountryCode", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkL5GKVQVJ_js.resolvePhoneCountryCode; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "CURRENCY_SYMBOLS", {
|
|
21
21
|
enumerable: true,
|
package/dist/utils.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-
|
|
1
|
+
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
|
|
2
2
|
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './chunk-JFT63H34.mjs';
|