@takeshape/purchase-order-chat 1.61.0 → 1.62.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.
- package/dist/index.js +1 -1
- package/dist/{purchase-order-chat-wrapper-fadhXbv8.js → purchase-order-chat-wrapper-DAVIPBya.js} +2024 -1850
- package/dist/purchase-order-chat-wrapper-DAVIPBya.js.map +1 -0
- package/dist/shadow.js +2 -2
- package/dist/tailwind.d.ts +61 -46
- package/dist/tailwind.js +214 -149
- package/dist/tailwind.js.map +1 -1
- package/package.json +2 -2
- package/dist/purchase-order-chat-wrapper-fadhXbv8.js.map +0 -1
package/dist/tailwind.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { d as
|
|
2
|
+
import { d as k, P as v, S as T, c as M, a as O, b as L, i as x, s as P } from "./purchase-order-chat-wrapper-DAVIPBya.js";
|
|
3
3
|
class I {
|
|
4
4
|
carts = /* @__PURE__ */ new Map();
|
|
5
5
|
checkouts = /* @__PURE__ */ new Map();
|
|
@@ -76,7 +76,7 @@ class I {
|
|
|
76
76
|
*/
|
|
77
77
|
calculateCartTotals(t) {
|
|
78
78
|
const e = t.reduce(
|
|
79
|
-
(s,
|
|
79
|
+
(s, i) => s + i.extendedSalePrice.value,
|
|
80
80
|
0
|
|
81
81
|
);
|
|
82
82
|
return {
|
|
@@ -89,12 +89,12 @@ class I {
|
|
|
89
89
|
* Helper: Calculate checkout totals
|
|
90
90
|
*/
|
|
91
91
|
calculateCheckoutTotals(t) {
|
|
92
|
-
const e = this.checkoutToCartId.get(t.entityId),
|
|
93
|
-
let
|
|
94
|
-
t.shippingConsignments && t.shippingConsignments.length > 0 && (
|
|
95
|
-
for (const
|
|
96
|
-
|
|
97
|
-
t.subtotal = this.createMoney(
|
|
92
|
+
const e = this.checkoutToCartId.get(t.entityId), i = (e ? this.carts.get(e) : void 0)?.amount.value ?? 0;
|
|
93
|
+
let r = 0, a = 0;
|
|
94
|
+
t.shippingConsignments && t.shippingConsignments.length > 0 && (r = i * 0.08);
|
|
95
|
+
for (const n of t.shippingConsignments ?? [])
|
|
96
|
+
n.selectedShippingOption && (a += n.selectedShippingOption.cost.value);
|
|
97
|
+
t.subtotal = this.createMoney(i), t.taxTotal = this.createMoney(r), t.shippingCostTotal = this.createMoney(a), t.handlingCostTotal = this.createMoney(0), t.grandTotal = this.createMoney(i + r + a);
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
100
|
* Get an existing cart by ID
|
|
@@ -109,33 +109,33 @@ class I {
|
|
|
109
109
|
async createCart(t) {
|
|
110
110
|
if (t.length === 0)
|
|
111
111
|
throw new Error("Cannot create cart with no line items");
|
|
112
|
-
const e = this.generateCartId(), s = this.generateCheckoutId(),
|
|
113
|
-
(
|
|
114
|
-
),
|
|
112
|
+
const e = this.generateCartId(), s = this.generateCheckoutId(), i = { utc: (/* @__PURE__ */ new Date()).toISOString() }, r = t.map(
|
|
113
|
+
(l) => this.createCartLineItem(l)
|
|
114
|
+
), a = this.calculateCartTotals(r), n = {
|
|
115
115
|
id: e,
|
|
116
116
|
entityId: e,
|
|
117
117
|
lineItems: {
|
|
118
|
-
physicalItems:
|
|
118
|
+
physicalItems: r,
|
|
119
119
|
digitalItems: []
|
|
120
120
|
},
|
|
121
|
-
amount:
|
|
122
|
-
baseAmount:
|
|
123
|
-
discountedAmount:
|
|
124
|
-
createdAt:
|
|
125
|
-
updatedAt:
|
|
121
|
+
amount: a.amount,
|
|
122
|
+
baseAmount: a.baseAmount,
|
|
123
|
+
discountedAmount: a.discountedAmount,
|
|
124
|
+
createdAt: i,
|
|
125
|
+
updatedAt: i
|
|
126
126
|
};
|
|
127
|
-
this.carts.set(e,
|
|
128
|
-
const
|
|
127
|
+
this.carts.set(e, n);
|
|
128
|
+
const o = {
|
|
129
129
|
entityId: s,
|
|
130
|
-
subtotal:
|
|
130
|
+
subtotal: n.amount,
|
|
131
131
|
taxTotal: this.createMoney(0),
|
|
132
|
-
grandTotal:
|
|
132
|
+
grandTotal: n.amount,
|
|
133
133
|
shippingCostTotal: this.createMoney(0),
|
|
134
134
|
handlingCostTotal: this.createMoney(0),
|
|
135
135
|
billingAddress: null,
|
|
136
136
|
shippingConsignments: null
|
|
137
137
|
};
|
|
138
|
-
return this.checkouts.set(s,
|
|
138
|
+
return this.checkouts.set(s, o), this.checkoutToCartId.set(s, e), { cart: n, errors: [] };
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
141
|
* Add line items to an existing cart
|
|
@@ -147,73 +147,73 @@ class I {
|
|
|
147
147
|
return { cart: null, errors: [] };
|
|
148
148
|
if (e.length === 0)
|
|
149
149
|
return { cart: s, errors: [] };
|
|
150
|
-
const
|
|
150
|
+
const i = e.map((o) => this.createCartLineItem(o)), r = [...s.lineItems.physicalItems, ...i], a = this.calculateCartTotals(r), n = {
|
|
151
151
|
...s,
|
|
152
152
|
lineItems: {
|
|
153
153
|
...s.lineItems,
|
|
154
|
-
physicalItems:
|
|
154
|
+
physicalItems: r
|
|
155
155
|
},
|
|
156
|
-
amount:
|
|
157
|
-
baseAmount:
|
|
158
|
-
discountedAmount:
|
|
156
|
+
amount: a.amount,
|
|
157
|
+
baseAmount: a.baseAmount,
|
|
158
|
+
discountedAmount: a.discountedAmount,
|
|
159
159
|
updatedAt: { utc: (/* @__PURE__ */ new Date()).toISOString() }
|
|
160
160
|
};
|
|
161
|
-
this.carts.set(t,
|
|
162
|
-
for (const [
|
|
163
|
-
if (
|
|
164
|
-
const u = this.checkouts.get(
|
|
161
|
+
this.carts.set(t, n);
|
|
162
|
+
for (const [o, l] of this.checkoutToCartId.entries())
|
|
163
|
+
if (l === t) {
|
|
164
|
+
const u = this.checkouts.get(o);
|
|
165
165
|
if (u) {
|
|
166
|
-
const
|
|
167
|
-
this.calculateCheckoutTotals(
|
|
166
|
+
const c = { ...u };
|
|
167
|
+
this.calculateCheckoutTotals(c), this.checkouts.set(o, c);
|
|
168
168
|
}
|
|
169
169
|
break;
|
|
170
170
|
}
|
|
171
|
-
return { cart:
|
|
171
|
+
return { cart: n, errors: [] };
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
174
174
|
* Update the quantity of a cart line item
|
|
175
175
|
*/
|
|
176
|
-
async updateCartLineItem(t, e, s,
|
|
177
|
-
const
|
|
178
|
-
if (!
|
|
176
|
+
async updateCartLineItem(t, e, s, i, r) {
|
|
177
|
+
const a = this.carts.get(t);
|
|
178
|
+
if (!a)
|
|
179
179
|
return null;
|
|
180
|
-
const
|
|
181
|
-
(
|
|
180
|
+
const n = a.lineItems.physicalItems.findIndex(
|
|
181
|
+
(h) => h.entityId === e
|
|
182
182
|
);
|
|
183
|
-
if (
|
|
183
|
+
if (n === -1)
|
|
184
184
|
return null;
|
|
185
|
-
const
|
|
186
|
-
if (!
|
|
185
|
+
const o = [...a.lineItems.physicalItems], l = o[n];
|
|
186
|
+
if (!l)
|
|
187
187
|
return null;
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
...
|
|
188
|
+
const c = l.listPrice.value * s;
|
|
189
|
+
o[n] = {
|
|
190
|
+
...l,
|
|
191
191
|
quantity: s,
|
|
192
|
-
extendedListPrice: this.createMoney(
|
|
193
|
-
extendedSalePrice: this.createMoney(
|
|
192
|
+
extendedListPrice: this.createMoney(c),
|
|
193
|
+
extendedSalePrice: this.createMoney(c)
|
|
194
194
|
};
|
|
195
|
-
const
|
|
196
|
-
...
|
|
195
|
+
const d = this.calculateCartTotals(o), p = {
|
|
196
|
+
...a,
|
|
197
197
|
lineItems: {
|
|
198
|
-
...
|
|
199
|
-
physicalItems:
|
|
198
|
+
...a.lineItems,
|
|
199
|
+
physicalItems: o
|
|
200
200
|
},
|
|
201
|
-
amount:
|
|
202
|
-
baseAmount:
|
|
203
|
-
discountedAmount:
|
|
201
|
+
amount: d.amount,
|
|
202
|
+
baseAmount: d.baseAmount,
|
|
203
|
+
discountedAmount: d.discountedAmount,
|
|
204
204
|
updatedAt: { utc: (/* @__PURE__ */ new Date()).toISOString() }
|
|
205
205
|
};
|
|
206
|
-
this.carts.set(t,
|
|
207
|
-
for (const [
|
|
206
|
+
this.carts.set(t, p);
|
|
207
|
+
for (const [h, y] of this.checkoutToCartId.entries())
|
|
208
208
|
if (y === t) {
|
|
209
|
-
const g = this.checkouts.get(
|
|
209
|
+
const g = this.checkouts.get(h);
|
|
210
210
|
if (g) {
|
|
211
211
|
const C = { ...g };
|
|
212
|
-
this.calculateCheckoutTotals(C), this.checkouts.set(
|
|
212
|
+
this.calculateCheckoutTotals(C), this.checkouts.set(h, C);
|
|
213
213
|
}
|
|
214
214
|
break;
|
|
215
215
|
}
|
|
216
|
-
return
|
|
216
|
+
return p;
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
219
|
* Remove a line item from the cart
|
|
@@ -221,33 +221,33 @@ class I {
|
|
|
221
221
|
async deleteCartLineItem(t, e) {
|
|
222
222
|
const s = this.carts.get(t);
|
|
223
223
|
if (!s || !s.lineItems.physicalItems.some(
|
|
224
|
-
(
|
|
224
|
+
(o) => o.entityId === e
|
|
225
225
|
))
|
|
226
226
|
return null;
|
|
227
|
-
const
|
|
228
|
-
(
|
|
229
|
-
),
|
|
227
|
+
const r = s.lineItems.physicalItems.filter(
|
|
228
|
+
(o) => o.entityId !== e
|
|
229
|
+
), a = this.calculateCartTotals(r), n = {
|
|
230
230
|
...s,
|
|
231
231
|
lineItems: {
|
|
232
232
|
...s.lineItems,
|
|
233
|
-
physicalItems:
|
|
233
|
+
physicalItems: r
|
|
234
234
|
},
|
|
235
|
-
amount:
|
|
236
|
-
baseAmount:
|
|
237
|
-
discountedAmount:
|
|
235
|
+
amount: a.amount,
|
|
236
|
+
baseAmount: a.baseAmount,
|
|
237
|
+
discountedAmount: a.discountedAmount,
|
|
238
238
|
updatedAt: { utc: (/* @__PURE__ */ new Date()).toISOString() }
|
|
239
239
|
};
|
|
240
|
-
this.carts.set(t,
|
|
241
|
-
for (const [
|
|
242
|
-
if (
|
|
243
|
-
const u = this.checkouts.get(
|
|
240
|
+
this.carts.set(t, n);
|
|
241
|
+
for (const [o, l] of this.checkoutToCartId.entries())
|
|
242
|
+
if (l === t) {
|
|
243
|
+
const u = this.checkouts.get(o);
|
|
244
244
|
if (u) {
|
|
245
|
-
const
|
|
246
|
-
this.calculateCheckoutTotals(
|
|
245
|
+
const c = { ...u };
|
|
246
|
+
this.calculateCheckoutTotals(c), this.checkouts.set(o, c);
|
|
247
247
|
}
|
|
248
248
|
break;
|
|
249
249
|
}
|
|
250
|
-
return
|
|
250
|
+
return n;
|
|
251
251
|
}
|
|
252
252
|
/**
|
|
253
253
|
* Delete an entire cart
|
|
@@ -256,8 +256,8 @@ class I {
|
|
|
256
256
|
if (!this.carts.get(t))
|
|
257
257
|
return null;
|
|
258
258
|
this.carts.delete(t);
|
|
259
|
-
for (const [s,
|
|
260
|
-
if (
|
|
259
|
+
for (const [s, i] of this.checkoutToCartId.entries())
|
|
260
|
+
if (i === t) {
|
|
261
261
|
this.checkouts.delete(s), this.checkoutToCartId.delete(s);
|
|
262
262
|
break;
|
|
263
263
|
}
|
|
@@ -289,10 +289,10 @@ class I {
|
|
|
289
289
|
* Add shipping consignments (addresses) to a checkout
|
|
290
290
|
*/
|
|
291
291
|
async setCheckoutShippingAddress(t, e, s) {
|
|
292
|
-
const
|
|
293
|
-
if (!
|
|
292
|
+
const i = this.checkouts.get(t);
|
|
293
|
+
if (!i)
|
|
294
294
|
return null;
|
|
295
|
-
const
|
|
295
|
+
const r = this.generateConsignmentId(), a = [
|
|
296
296
|
{
|
|
297
297
|
entityId: this.generateShippingOptionId(),
|
|
298
298
|
description: "Standard Shipping",
|
|
@@ -311,8 +311,8 @@ class I {
|
|
|
311
311
|
type: "shipping_overnight",
|
|
312
312
|
cost: this.createMoney(25)
|
|
313
313
|
}
|
|
314
|
-
],
|
|
315
|
-
entityId:
|
|
314
|
+
], n = {
|
|
315
|
+
entityId: r,
|
|
316
316
|
address: {
|
|
317
317
|
firstName: e.firstName ?? null,
|
|
318
318
|
lastName: e.lastName ?? null,
|
|
@@ -326,18 +326,18 @@ class I {
|
|
|
326
326
|
phone: e.phone ?? null,
|
|
327
327
|
email: e.email ?? null
|
|
328
328
|
},
|
|
329
|
-
availableShippingOptions:
|
|
329
|
+
availableShippingOptions: a,
|
|
330
330
|
selectedShippingOption: null,
|
|
331
331
|
shippingCost: null,
|
|
332
|
-
lineItemIds: s.map((
|
|
333
|
-
},
|
|
334
|
-
...
|
|
332
|
+
lineItemIds: s.map((l) => l.lineItemEntityId)
|
|
333
|
+
}, o = {
|
|
334
|
+
...i,
|
|
335
335
|
shippingConsignments: [
|
|
336
|
-
...
|
|
337
|
-
|
|
336
|
+
...i.shippingConsignments ?? [],
|
|
337
|
+
n
|
|
338
338
|
]
|
|
339
339
|
};
|
|
340
|
-
return this.calculateCheckoutTotals(
|
|
340
|
+
return this.calculateCheckoutTotals(o), this.checkouts.set(t, o), o;
|
|
341
341
|
}
|
|
342
342
|
/**
|
|
343
343
|
* Add billing address to a checkout
|
|
@@ -388,59 +388,6 @@ class I {
|
|
|
388
388
|
"MockBigCommerceClient.request() is not implemented. Use specific methods instead."
|
|
389
389
|
);
|
|
390
390
|
}
|
|
391
|
-
/**
|
|
392
|
-
* Get product paths for building product page URLs
|
|
393
|
-
* Returns a map of productEntityId to path
|
|
394
|
-
*/
|
|
395
|
-
async getProductPaths(t) {
|
|
396
|
-
const e = /* @__PURE__ */ new Map();
|
|
397
|
-
for (const s of t)
|
|
398
|
-
e.set(s, `/products/product-${s}/`);
|
|
399
|
-
return e;
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
* Get products for display (used by showProducts tool)
|
|
403
|
-
* Returns mock product names, images, prices, and variant information
|
|
404
|
-
*/
|
|
405
|
-
async getProductsForDisplay(t) {
|
|
406
|
-
return t.map((e) => ({
|
|
407
|
-
entityId: e,
|
|
408
|
-
name: `Product ${e}`,
|
|
409
|
-
sku: `SKU-${e}`,
|
|
410
|
-
path: `/products/product-${e}/`,
|
|
411
|
-
defaultImage: {
|
|
412
|
-
urlTemplate: "https://cdn11.bigcommerce.com/s-abc/images/stencil/200w/products/{:size}/sample.jpg"
|
|
413
|
-
},
|
|
414
|
-
variants: [
|
|
415
|
-
{
|
|
416
|
-
entityId: e * 1e3 + 1,
|
|
417
|
-
sku: `SKU-${e}-V1`,
|
|
418
|
-
isPurchasable: !0,
|
|
419
|
-
defaultImage: {
|
|
420
|
-
urlTemplate: "https://cdn11.bigcommerce.com/s-abc/images/stencil/200w/products/{:size}/variant1.jpg"
|
|
421
|
-
},
|
|
422
|
-
prices: { price: { value: 29.99, currencyCode: "USD" } },
|
|
423
|
-
inventory: {
|
|
424
|
-
isInStock: !0,
|
|
425
|
-
aggregated: { availableToSell: 10, warningLevel: 3 }
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
entityId: e * 1e3 + 2,
|
|
430
|
-
sku: `SKU-${e}-V2`,
|
|
431
|
-
isPurchasable: !0,
|
|
432
|
-
defaultImage: {
|
|
433
|
-
urlTemplate: "https://cdn11.bigcommerce.com/s-abc/images/stencil/200w/products/{:size}/variant2.jpg"
|
|
434
|
-
},
|
|
435
|
-
prices: { price: { value: 34.99, currencyCode: "USD" } },
|
|
436
|
-
inventory: {
|
|
437
|
-
isInStock: !0,
|
|
438
|
-
aggregated: { availableToSell: 5, warningLevel: 3 }
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
]
|
|
442
|
-
}));
|
|
443
|
-
}
|
|
444
391
|
/**
|
|
445
392
|
* Get product variant details for multiple products
|
|
446
393
|
* Returns mock product options and variants
|
|
@@ -598,6 +545,124 @@ class I {
|
|
|
598
545
|
]
|
|
599
546
|
}));
|
|
600
547
|
}
|
|
548
|
+
/**
|
|
549
|
+
* Get product display data for caching (unified query).
|
|
550
|
+
* Returns mock products with paths, options, and default variant.
|
|
551
|
+
*/
|
|
552
|
+
async getProductDisplayData(t, e) {
|
|
553
|
+
return t.map((s) => {
|
|
554
|
+
const i = {
|
|
555
|
+
entityId: s * 1e3 + 1,
|
|
556
|
+
productEntityId: s,
|
|
557
|
+
sku: `SKU-${s}-S-R`,
|
|
558
|
+
isPurchasable: !0,
|
|
559
|
+
defaultImage: "https://cdn11.bigcommerce.com/s-abc/images/stencil/200w/products/{:size}/variant1.jpg",
|
|
560
|
+
price: 29.99,
|
|
561
|
+
currencyCode: "USD",
|
|
562
|
+
isInStock: !0,
|
|
563
|
+
availableToSell: 10,
|
|
564
|
+
optionValues: {
|
|
565
|
+
[s * 100]: s * 100 + 1,
|
|
566
|
+
// Size: Small
|
|
567
|
+
[s * 100 + 10]: s * 100 + 11
|
|
568
|
+
// Color: Red
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
let r = i;
|
|
572
|
+
if (e?.length) {
|
|
573
|
+
const a = e.find(
|
|
574
|
+
(n) => n >= s * 1e3 + 1 && n <= s * 1e3 + 6
|
|
575
|
+
);
|
|
576
|
+
a && a !== i.entityId && (r = {
|
|
577
|
+
...i,
|
|
578
|
+
entityId: a,
|
|
579
|
+
sku: `SKU-${s}-V${a - s * 1e3}`
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
return {
|
|
583
|
+
entityId: s,
|
|
584
|
+
name: `Product ${s}`,
|
|
585
|
+
sku: `SKU-${s}`,
|
|
586
|
+
path: `/products/product-${s}/`,
|
|
587
|
+
defaultImage: "https://cdn11.bigcommerce.com/s-abc/images/stencil/200w/products/{:size}/sample.jpg",
|
|
588
|
+
productOptions: [
|
|
589
|
+
{
|
|
590
|
+
entityId: s * 100,
|
|
591
|
+
displayName: "Size",
|
|
592
|
+
isRequired: !0,
|
|
593
|
+
isVariantOption: !0,
|
|
594
|
+
displayStyle: "DropdownList",
|
|
595
|
+
values: [
|
|
596
|
+
{
|
|
597
|
+
entityId: s * 100 + 1,
|
|
598
|
+
label: "Small",
|
|
599
|
+
isDefault: !0
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
entityId: s * 100 + 2,
|
|
603
|
+
label: "Medium",
|
|
604
|
+
isDefault: !1
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
entityId: s * 100 + 3,
|
|
608
|
+
label: "Large",
|
|
609
|
+
isDefault: !1
|
|
610
|
+
}
|
|
611
|
+
]
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
entityId: s * 100 + 10,
|
|
615
|
+
displayName: "Color",
|
|
616
|
+
isRequired: !0,
|
|
617
|
+
isVariantOption: !0,
|
|
618
|
+
displayStyle: "DropdownList",
|
|
619
|
+
values: [
|
|
620
|
+
{
|
|
621
|
+
entityId: s * 100 + 11,
|
|
622
|
+
label: "Red",
|
|
623
|
+
isDefault: !0
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
entityId: s * 100 + 12,
|
|
627
|
+
label: "Blue",
|
|
628
|
+
isDefault: !1
|
|
629
|
+
}
|
|
630
|
+
]
|
|
631
|
+
}
|
|
632
|
+
],
|
|
633
|
+
defaultVariant: r
|
|
634
|
+
};
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Get a specific variant by option selections (lazy loading).
|
|
639
|
+
* Returns a mock variant matching the selections.
|
|
640
|
+
*/
|
|
641
|
+
async getVariantByOptions(t, e) {
|
|
642
|
+
const s = {};
|
|
643
|
+
for (const { optionEntityId: p, valueEntityId: h } of e)
|
|
644
|
+
s[p] = h;
|
|
645
|
+
const i = t * 100, r = t * 100 + 10, a = s[i], n = s[r], o = {
|
|
646
|
+
[t * 100 + 1]: "S",
|
|
647
|
+
[t * 100 + 2]: "M",
|
|
648
|
+
[t * 100 + 3]: "L"
|
|
649
|
+
}, l = {
|
|
650
|
+
[t * 100 + 11]: "R",
|
|
651
|
+
[t * 100 + 12]: "B"
|
|
652
|
+
}, u = a ? o[a] : "S", c = n ? l[n] : "R", d = (a ? a - (t * 100 + 1) : 0) * 2 + (n ? n - (t * 100 + 11) : 0) + 1;
|
|
653
|
+
return {
|
|
654
|
+
entityId: t * 1e3 + d,
|
|
655
|
+
productEntityId: t,
|
|
656
|
+
sku: `SKU-${t}-${u}-${c}`,
|
|
657
|
+
isPurchasable: !0,
|
|
658
|
+
defaultImage: "https://cdn11.bigcommerce.com/s-abc/images/stencil/200w/products/{:size}/variant.jpg",
|
|
659
|
+
price: 29.99 + (a ? (a - (t * 100 + 1)) * 5 : 0),
|
|
660
|
+
currencyCode: "USD",
|
|
661
|
+
isInStock: !0,
|
|
662
|
+
availableToSell: 10 - d,
|
|
663
|
+
optionValues: s
|
|
664
|
+
};
|
|
665
|
+
}
|
|
601
666
|
/**
|
|
602
667
|
* Reset all state (useful for testing)
|
|
603
668
|
*/
|
|
@@ -605,19 +670,19 @@ class I {
|
|
|
605
670
|
this.carts.clear(), this.checkouts.clear(), this.checkoutToCartId.clear(), this.nextCartId = 1, this.nextCheckoutId = 1, this.nextLineItemId = 1, this.nextConsignmentId = 1, this.nextShippingOptionId = 1;
|
|
606
671
|
}
|
|
607
672
|
}
|
|
608
|
-
function S(
|
|
609
|
-
return new I(
|
|
673
|
+
function S(m) {
|
|
674
|
+
return new I(m);
|
|
610
675
|
}
|
|
611
676
|
export {
|
|
612
677
|
I as MockBigCommerceClient,
|
|
613
|
-
|
|
614
|
-
|
|
678
|
+
k as PurchaseOrderChat,
|
|
679
|
+
v as PurchaseOrderChatWidget,
|
|
615
680
|
T as StylesTarget,
|
|
616
681
|
M as createB2BClient,
|
|
617
|
-
|
|
618
|
-
|
|
682
|
+
O as createBigCommerceClient,
|
|
683
|
+
L as createBigCommerceEndpoint,
|
|
619
684
|
S as createMockBigCommerceClient,
|
|
620
|
-
|
|
621
|
-
|
|
685
|
+
x as initTracing,
|
|
686
|
+
P as stencilB2BJwt
|
|
622
687
|
};
|
|
623
688
|
//# sourceMappingURL=tailwind.js.map
|