@vio-live/web-sdk 0.26.1 → 0.28.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/CHANGELOG.md +289 -0
- package/README.md +184 -0
- package/dist/chunk-67QESEV2.js +3 -0
- package/dist/{chunk-NCP76AXW.js.map → chunk-67QESEV2.js.map} +1 -1
- package/dist/{chunk-NXIYIY2D.js → chunk-AFJ5M53F.js} +492 -57
- package/dist/chunk-AFJ5M53F.js.map +1 -0
- package/dist/{chunk-6Q2M3MIK.js → chunk-Q2NALS7P.js} +1053 -165
- package/dist/chunk-Q2NALS7P.js.map +1 -0
- package/dist/core/index.d.ts +229 -19
- package/dist/core/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +3 -3
- package/dist/{tokens-Bn7fK9ta.d.ts → tokens-y0KzN7bP.d.ts} +153 -3
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +3 -2
- package/dist/chunk-6Q2M3MIK.js.map +0 -1
- package/dist/chunk-NCP76AXW.js +0 -3
- package/dist/chunk-NXIYIY2D.js.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -193,6 +193,10 @@ interface Sponsor {
|
|
|
193
193
|
logoUrl?: string | null;
|
|
194
194
|
primaryColor?: string | null;
|
|
195
195
|
secondaryColor?: string | null;
|
|
196
|
+
/** The brand's purchase terms (its own page, e.g. its shop's terms of service). */
|
|
197
|
+
termsUrl?: string | null;
|
|
198
|
+
/** The brand's returns / refund policy page. */
|
|
199
|
+
refundPolicyUrl?: string | null;
|
|
196
200
|
commerce: SponsorCommerceBlock;
|
|
197
201
|
}
|
|
198
202
|
/**
|
|
@@ -808,6 +812,47 @@ declare function sameOrigin(a: CartOrigin, b: CartOrigin): boolean;
|
|
|
808
812
|
*/
|
|
809
813
|
declare function lineOrigins(line: Pick<CartLineItem, 'origins' | 'quantity'>): CartLineOrigin[];
|
|
810
814
|
|
|
815
|
+
/**
|
|
816
|
+
* Who sells — the sponsor's (brand's) display identity: its name and logo.
|
|
817
|
+
*
|
|
818
|
+
* ONE rule for every place that names a sponsor (the product detail, the
|
|
819
|
+
* carousel's retailer line, the cart, the checkout header, the confirmation,
|
|
820
|
+
* the payment event and `getOrderReference`): the bootstrap's sponsor block —
|
|
821
|
+
* the config's primary and secondaries, then every `campaigns[]` primary and
|
|
822
|
+
* secondaries, first match — and, when the bootstrap does not know the id,
|
|
823
|
+
* what this tab remembered of the checkout, then the cart's `sponsorName`.
|
|
824
|
+
*
|
|
825
|
+
* In a checkout and on its confirmation the sponsor is the CHECKOUT's (the
|
|
826
|
+
* cart's sponsor, the one the order is with), never the page's attribution:
|
|
827
|
+
* an article of brand A may sell a product of brand B.
|
|
828
|
+
*
|
|
829
|
+
* Pure helpers and a tiny per-checkout memory in `sessionStorage`; no DOM.
|
|
830
|
+
*/
|
|
831
|
+
|
|
832
|
+
/** What a sponsor looks like to a shopper. `name` is the brand's display name. */
|
|
833
|
+
interface SponsorIdentity {
|
|
834
|
+
id: number;
|
|
835
|
+
name: string;
|
|
836
|
+
/** The brand's logo, as the bootstrap gives it (never rewritten); `null` when it has none. */
|
|
837
|
+
logoUrl: string | null;
|
|
838
|
+
avatarUrl: string | null;
|
|
839
|
+
/** The brand's purchase terms page — https only; `null` when it has none. */
|
|
840
|
+
termsUrl?: string | null;
|
|
841
|
+
/** The brand's returns / refund policy page — https only; `null` when it has none. */
|
|
842
|
+
refundPolicyUrl?: string | null;
|
|
843
|
+
}
|
|
844
|
+
/** The sponsor of a checkout / an order as events and `getOrderReference` carry it. */
|
|
845
|
+
type CheckoutSponsor = Pick<SponsorIdentity, 'id' | 'name' | 'logoUrl'>;
|
|
846
|
+
/** `sessionStorage` key of the per-checkout memory. */
|
|
847
|
+
declare const CHECKOUT_SPONSOR_STORAGE_KEY = "vio.checkoutSponsor.v1";
|
|
848
|
+
/**
|
|
849
|
+
* The identity of a sponsor from a bootstrap (`findSponsorIn`): its trimmed
|
|
850
|
+
* name and its logo / avatar URLs as given (an empty string is `null`).
|
|
851
|
+
* `null` when the bootstrap does not know the id, or the block says neither
|
|
852
|
+
* a name nor a logo. Pure, never throws.
|
|
853
|
+
*/
|
|
854
|
+
declare function sponsorIdentityFrom(boot: BootstrapResponse | null | undefined, sponsorId: number | string | null | undefined): SponsorIdentity | null;
|
|
855
|
+
|
|
811
856
|
/**
|
|
812
857
|
* What the commerce gateway may not know yet.
|
|
813
858
|
*
|
|
@@ -1192,7 +1237,14 @@ interface AnalyticsCommerce {
|
|
|
1192
1237
|
items?: AnalyticsItemInput[];
|
|
1193
1238
|
value?: number;
|
|
1194
1239
|
currency?: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* `order_id` on the wire. On a `purchase` it is Vio's order number (`4415`,
|
|
1242
|
+
* the number the dashboard and Commerce's cancellations use), else the
|
|
1243
|
+
* checkout id standing in for it (`props.order_id_kind` says which).
|
|
1244
|
+
*/
|
|
1195
1245
|
orderId?: string;
|
|
1246
|
+
/** `checkout_id` on the wire: Vio's checkout id (uuid). Always on the SDK's own `purchase`. */
|
|
1247
|
+
checkoutId?: string;
|
|
1196
1248
|
paymentMethod?: string;
|
|
1197
1249
|
/**
|
|
1198
1250
|
* The buyer reference (`buyer_id` on the wire): shopcart's `buyer_ref`, a
|
|
@@ -1264,6 +1316,12 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1264
1316
|
private client;
|
|
1265
1317
|
/** The landing it was read from — persisted later when consent arrives after the first event. */
|
|
1266
1318
|
private landing;
|
|
1319
|
+
/** Checkouts (`c:<id>`) and orders (`o:<number>`) this page load reported a `purchase` for: one each. */
|
|
1320
|
+
private readonly purchased;
|
|
1321
|
+
/** Purchases still waiting for Vio's order number: each sends at once, with what it has, when called. */
|
|
1322
|
+
private readonly pendingPurchases;
|
|
1323
|
+
/** Between `pagehide` and `pageshow` (bfcache): nothing waits, it all goes out now. */
|
|
1324
|
+
private pageHiding;
|
|
1267
1325
|
/** The landing this manager resolved on this page load (the first event's), or null before it; read only — for the order's entry context when nothing is stored yet. */
|
|
1268
1326
|
get currentLanding(): Landing | null;
|
|
1269
1327
|
private teardown;
|
|
@@ -1282,12 +1340,14 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1282
1340
|
/** ¿Podemos escribir en el dispositivo? */
|
|
1283
1341
|
private get canPersist();
|
|
1284
1342
|
start(options?: AnalyticsStartOptions): void;
|
|
1285
|
-
/** Stop timers + listeners (tests / SPA unmount). Queue survives. */
|
|
1343
|
+
/** Stop timers + listeners (tests / SPA unmount). Queue survives — a purchase still waiting for its order number joins it now. */
|
|
1286
1344
|
stop(): void;
|
|
1287
1345
|
/** Attach the partner's user id (opaque) to all subsequent events. */
|
|
1288
1346
|
identify(externalUserId: string | null): void;
|
|
1289
1347
|
/** Queue one event. Works pre-init and pre-start (SSR: no-op). */
|
|
1290
1348
|
track(name: AnalyticsEventName, opts?: TrackOptions): void;
|
|
1349
|
+
/** The sinks and the queue for one built event — `track`'s second half. */
|
|
1350
|
+
private record;
|
|
1291
1351
|
/**
|
|
1292
1352
|
* Impression helper: observes an element and tracks ONE
|
|
1293
1353
|
* `component_impression` per (session, campaignComponentId) when the
|
|
@@ -1324,6 +1384,37 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1324
1384
|
* writes ZERO tracking code for the commerce funnel.
|
|
1325
1385
|
*/
|
|
1326
1386
|
private installAutoListeners;
|
|
1387
|
+
/**
|
|
1388
|
+
* Claims the purchase of a payment for this page load: false when its
|
|
1389
|
+
* checkout (or its order) already has one, reported or waiting.
|
|
1390
|
+
*/
|
|
1391
|
+
private claimPurchase;
|
|
1392
|
+
/**
|
|
1393
|
+
* Sends the `purchase` event(s) of one payment — ONCE, with Vio's order
|
|
1394
|
+
* number as `order_id` (`props.order_id_kind: 'order'`) and the checkout id
|
|
1395
|
+
* as `checkout_id`. When the payment event did not bring the number (a
|
|
1396
|
+
* redirect return, an order a webhook creates) the checkout is asked for it
|
|
1397
|
+
* — the receipt's own path, `Vio.checkout.getOrderReference` — at once and
|
|
1398
|
+
* after 0.5 / 1 / 2 / 3 / 3 s, for at most 10 s; nothing else waits for it.
|
|
1399
|
+
* Unanswered, or when the page hides or `stop()` comes first, the events go
|
|
1400
|
+
* out with what they have: the checkout id as `order_id`
|
|
1401
|
+
* (`order_id_kind: 'checkout'`), as before — and the late number adds no
|
|
1402
|
+
* second event. The events are BUILT at the payment — its moment (`ts`),
|
|
1403
|
+
* `event_id`, session, page and content — and only the order number (and a
|
|
1404
|
+
* buyer reference the payment did not bring) is filled in when it comes.
|
|
1405
|
+
*/
|
|
1406
|
+
private reportPurchase;
|
|
1407
|
+
/** Sends every purchase still waiting for its order number, at once, with what it has. */
|
|
1408
|
+
private settlePendingPurchases;
|
|
1409
|
+
/** Whether the page is hidden or going away (`pagehide` until `pageshow`). */
|
|
1410
|
+
private isPageHidden;
|
|
1411
|
+
/**
|
|
1412
|
+
* How a purchase asks a checkout for Vio's order number: through the SDK's
|
|
1413
|
+
* checkout manager (`getOrderReference`, which never throws and shares its
|
|
1414
|
+
* in-flight ask with the receipt's). `null` when there is nothing to ask —
|
|
1415
|
+
* no checkout id, or no checkout manager on this page.
|
|
1416
|
+
*/
|
|
1417
|
+
private orderReferenceAsker;
|
|
1327
1418
|
/** The lines of the cart (current, else the pre-clear snapshot), optionally one sponsor's. */
|
|
1328
1419
|
private cartLines;
|
|
1329
1420
|
/**
|
|
@@ -1384,10 +1475,20 @@ interface PaymentSuccessDetail {
|
|
|
1384
1475
|
/** Per-element content override (`vio-content-id` / `vio-content-title`), when the emitter carries one. */
|
|
1385
1476
|
contentId?: string | number;
|
|
1386
1477
|
contentTitle?: string;
|
|
1387
|
-
/**
|
|
1478
|
+
/**
|
|
1479
|
+
* Redirect return: Vio's checkout id (the name predates `checkoutId`). A
|
|
1480
|
+
* value that is a whole number is read as Vio's order number instead — a
|
|
1481
|
+
* checkout id is a uuid, never one.
|
|
1482
|
+
*/
|
|
1388
1483
|
orderId?: string | number;
|
|
1389
1484
|
/** Vio's checkout id — from the checkout state or the return URL. */
|
|
1390
1485
|
checkoutId?: string | number;
|
|
1486
|
+
/**
|
|
1487
|
+
* Vio's order number (`4415`), when the emitter knows it: the SDK's checkout
|
|
1488
|
+
* adds it when its ask for the buyer reference already found the order.
|
|
1489
|
+
* Becomes the purchase's `order_id`.
|
|
1490
|
+
*/
|
|
1491
|
+
orderNumber?: string | number | null;
|
|
1391
1492
|
/**
|
|
1392
1493
|
* The buyer reference the emitter learned with the payment — shopcart's
|
|
1393
1494
|
* `buyer_ref`, a keyed hash of the email (`buyerRef` from the SDK's own
|
|
@@ -1397,10 +1498,18 @@ interface PaymentSuccessDetail {
|
|
|
1397
1498
|
buyerRef?: string | null;
|
|
1398
1499
|
buyer_ref?: string | null;
|
|
1399
1500
|
result?: PaymentSuccessResult | null;
|
|
1501
|
+
/**
|
|
1502
|
+
* The sponsor the order is with — the CHECKOUT's (its cart's sponsor),
|
|
1503
|
+
* never the page's: `{ id, name, logoUrl }` by the `Vio.sponsorIdentity`
|
|
1504
|
+
* rule, when it can be named. For the host's own receipt; analytics does
|
|
1505
|
+
* not read it.
|
|
1506
|
+
*/
|
|
1507
|
+
sponsor?: CheckoutSponsor;
|
|
1400
1508
|
}
|
|
1401
1509
|
/**
|
|
1402
|
-
* What the checkout attaches as `result`. Only `confirmation` carries
|
|
1403
|
-
*
|
|
1510
|
+
* What the checkout attaches as `result`. Only `confirmation` carries Vio
|
|
1511
|
+
* ids: the order `ConfirmPaymentApplePay` created (its number) and the
|
|
1512
|
+
* checkout it paid. `order.orderId` / `orderId`
|
|
1404
1513
|
* are the PROVIDER's references (Qliro's, Walley's — the checkout itself
|
|
1405
1514
|
* shows them as `providerRef`), and `chargedTotal` includes shipping on some
|
|
1406
1515
|
* methods only. Analytics reads none of those.
|
|
@@ -1408,6 +1517,8 @@ interface PaymentSuccessDetail {
|
|
|
1408
1517
|
interface PaymentSuccessResult {
|
|
1409
1518
|
confirmation?: {
|
|
1410
1519
|
orderId?: string | number | null;
|
|
1520
|
+
/** The checkout the confirmation paid (Apple Pay from the cart names no other). */
|
|
1521
|
+
checkoutId?: string | null;
|
|
1411
1522
|
status?: string;
|
|
1412
1523
|
buyerRef?: string | null;
|
|
1413
1524
|
buyer_ref?: string | null;
|
|
@@ -1433,17 +1544,41 @@ declare function buyerRefOf(d: {
|
|
|
1433
1544
|
buyer_ref?: unknown;
|
|
1434
1545
|
result?: PaymentSuccessResult | null;
|
|
1435
1546
|
} | null | undefined): string | undefined;
|
|
1436
|
-
/**
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
*/
|
|
1446
|
-
|
|
1547
|
+
/** The ids of a `purchase`, as a `vio:payment-success` detail gives them (`purchaseIdsOf`). */
|
|
1548
|
+
interface PurchaseIds {
|
|
1549
|
+
/**
|
|
1550
|
+
* `commerce.order_id`: Vio's order number when the detail has it, else the
|
|
1551
|
+
* checkout id standing in for it.
|
|
1552
|
+
*/
|
|
1553
|
+
orderId?: string;
|
|
1554
|
+
/** `commerce.checkout_id`: Vio's checkout id (uuid), when the detail has it. */
|
|
1555
|
+
checkoutId?: string;
|
|
1556
|
+
/** `props.order_id_kind`: what `orderId` is — `'order'` (the number) or `'checkout'` (the stand-in). */
|
|
1557
|
+
orderIdKind?: 'order' | 'checkout';
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1560
|
+
* The ids of a `purchase` — ALWAYS Vio's, never a provider's reference. The
|
|
1561
|
+
* order number: `orderNumber` (an emitter that knows it) →
|
|
1562
|
+
* `result.confirmation.orderId` (Apple Pay: the order `ConfirmPaymentApplePay`
|
|
1563
|
+
* created) → an `orderId` that is a whole number. The checkout id: `orderId`
|
|
1564
|
+
* (the redirect return's, a uuid) → `checkoutId` → `result.confirmation.checkoutId`
|
|
1565
|
+
* (Apple Pay from the cart). `orderId` is the number
|
|
1566
|
+
* when there is one, else the checkout id — the SDK's own `purchase` then
|
|
1567
|
+
* waits for the number (see `AnalyticsManager`); a host with its own sink can
|
|
1568
|
+
* ask `Vio.checkout.getOrderReference(checkoutId)` the same way.
|
|
1569
|
+
*/
|
|
1570
|
+
declare function purchaseIdsOf(d: PaymentSuccessDetail | null | undefined): PurchaseIds;
|
|
1571
|
+
/**
|
|
1572
|
+
* The `order_id`, `checkout_id` and `buyer_id` of a `purchase`, as far as the
|
|
1573
|
+
* detail says them NOW (`purchaseIdsOf`; the SDK's own `purchase` may still
|
|
1574
|
+
* wait for the order number). `value` and `currency` are deliberately NOT
|
|
1575
|
+
* read from the result: on every path they come from the cart snapshot (sum
|
|
1576
|
+
* of the items, no shipping), so revenue stays comparable across payment
|
|
1577
|
+
* methods — the charged total will arrive through the server-side
|
|
1578
|
+
* `order_paid` event. With nothing to say it returns `{}`, so the cart
|
|
1579
|
+
* snapshot keeps its keys.
|
|
1580
|
+
*/
|
|
1581
|
+
declare function purchaseFromPaymentSuccess(d: PaymentSuccessDetail): Pick<AnalyticsCommerce, 'orderId' | 'checkoutId' | 'buyerId'>;
|
|
1447
1582
|
|
|
1448
1583
|
/**
|
|
1449
1584
|
* The cart split per campaign (ADR-0034) — ONE rule, shared by the SDK's own
|
|
@@ -2295,6 +2430,7 @@ interface AdyenResult {
|
|
|
2295
2430
|
* merchant, same as iOS multi-sponsor model). Multiple sponsors → multiple
|
|
2296
2431
|
* sequential checkouts.
|
|
2297
2432
|
*/
|
|
2433
|
+
|
|
2298
2434
|
type PaymentMethod = 'apple-pay' | 'klarna' | 'vipps' | 'card' | 'stripe' | 'kustom' | 'qliro' | 'walley' | 'nexi' | 'adyen';
|
|
2299
2435
|
interface CheckoutAddress {
|
|
2300
2436
|
firstName: string;
|
|
@@ -2333,6 +2469,25 @@ interface CheckoutState {
|
|
|
2333
2469
|
*/
|
|
2334
2470
|
session?: number;
|
|
2335
2471
|
}
|
|
2472
|
+
/**
|
|
2473
|
+
* Detail of `vio:checkout-open` as the SDK's elements emit it (the cart, the
|
|
2474
|
+
* product detail): whose cart to check out, the method to preselect, the
|
|
2475
|
+
* element's attribution — and `sponsor`, the checkout's sponsor as a shopper
|
|
2476
|
+
* sees it (`{ id, name, logoUrl }`, the `Vio.sponsorIdentity` rule), when it
|
|
2477
|
+
* can be named.
|
|
2478
|
+
*/
|
|
2479
|
+
interface CheckoutOpenDetail {
|
|
2480
|
+
sponsorId: number;
|
|
2481
|
+
paymentMethod?: PaymentMethod;
|
|
2482
|
+
express?: boolean;
|
|
2483
|
+
sponsor?: CheckoutSponsor;
|
|
2484
|
+
slot?: string;
|
|
2485
|
+
campaignId?: number;
|
|
2486
|
+
contentId?: string;
|
|
2487
|
+
contentTitle?: string;
|
|
2488
|
+
contentUrl?: string;
|
|
2489
|
+
componentTemplateId?: string;
|
|
2490
|
+
}
|
|
2336
2491
|
|
|
2337
2492
|
/**
|
|
2338
2493
|
* CheckoutManager — orchestrates the checkout flow.
|
|
@@ -2404,11 +2559,33 @@ interface KlarnaPaymentsHandle {
|
|
|
2404
2559
|
*/
|
|
2405
2560
|
interface CheckoutManagerDeps {
|
|
2406
2561
|
orderAttribution?: (sponsorId: number) => Promise<CheckoutAttributionWire | undefined> | CheckoutAttributionWire | undefined;
|
|
2562
|
+
/**
|
|
2563
|
+
* Who a sponsor is (`Vio.sponsorIdentity`): remembered per checkout when one
|
|
2564
|
+
* is created, and answered with `getOrderReference`. Optional: without it
|
|
2565
|
+
* the memory keeps only whose checkout it is, and the cart's name.
|
|
2566
|
+
*/
|
|
2567
|
+
sponsorIdentity?: (sponsorId: number | undefined, opts?: {
|
|
2568
|
+
checkoutId?: string | null;
|
|
2569
|
+
}) => SponsorIdentity | null;
|
|
2407
2570
|
}
|
|
2571
|
+
/** What `getOrderReference` answers: the checkout's reference plus, when it can be named, its sponsor. */
|
|
2572
|
+
type OrderReference = CheckoutReference & {
|
|
2573
|
+
/** The sponsor the order is with — the checkout's, by the `Vio.sponsorIdentity` rule. */
|
|
2574
|
+
sponsor?: CheckoutSponsor;
|
|
2575
|
+
};
|
|
2408
2576
|
declare class CheckoutManager extends EventTarget {
|
|
2409
2577
|
private readonly cartManager;
|
|
2410
2578
|
private readonly deps;
|
|
2411
|
-
private
|
|
2579
|
+
private currentStateValue;
|
|
2580
|
+
/**
|
|
2581
|
+
* Every write of the state goes through here: a state that names its
|
|
2582
|
+
* backend checkout is remembered with its sponsor (see
|
|
2583
|
+
* `rememberSponsorOfCheckout`), whatever path created the checkout.
|
|
2584
|
+
*/
|
|
2585
|
+
private get state();
|
|
2586
|
+
private set state(value);
|
|
2587
|
+
/** The last checkout + identity written to the memory — the state is set on every keystroke of the form. */
|
|
2588
|
+
private lastRememberedSponsor;
|
|
2412
2589
|
/** Counts `open()` calls — see CheckoutState.session. */
|
|
2413
2590
|
private sessionSeq;
|
|
2414
2591
|
private applePayAvailableCache;
|
|
@@ -2471,7 +2648,24 @@ declare class CheckoutManager extends EventTarget {
|
|
|
2471
2648
|
* `vio:payment-success` detail carries as `buyerRef` and analytics sends as
|
|
2472
2649
|
* `buyer_id`. Never throws; `null` for whatever the API does not say.
|
|
2473
2650
|
*/
|
|
2474
|
-
getOrderReference(checkoutId: string, sponsorId?: number): Promise<
|
|
2651
|
+
getOrderReference(checkoutId: string, sponsorId?: number): Promise<OrderReference>;
|
|
2652
|
+
/**
|
|
2653
|
+
* The sponsor of a checkout as `getOrderReference` carries it
|
|
2654
|
+
* (`{ id, name, logoUrl }`): the given sponsor, else the one this tab
|
|
2655
|
+
* remembered for the checkout, else the open checkout's when it IS that
|
|
2656
|
+
* checkout — named by the `Vio.sponsorIdentity` rule. `undefined` when
|
|
2657
|
+
* nothing names it; never throws.
|
|
2658
|
+
*/
|
|
2659
|
+
private checkoutSponsor;
|
|
2660
|
+
/** The sponsor id of a checkout: this tab's memory of it, else the open checkout's when it is that one. */
|
|
2661
|
+
private sponsorIdOfCheckout;
|
|
2662
|
+
private withSponsor;
|
|
2663
|
+
/**
|
|
2664
|
+
* Remember whose checkout this is (`rememberCheckoutSponsor`), with the
|
|
2665
|
+
* sponsor's name and logo as known now — so a confirmation after a redirect
|
|
2666
|
+
* or a reload can name the brand. Written again only when something changed.
|
|
2667
|
+
*/
|
|
2668
|
+
private rememberSponsorOfCheckout;
|
|
2475
2669
|
/** In-flight `getOrderReference` per checkout id (see there). */
|
|
2476
2670
|
private referenceInFlight;
|
|
2477
2671
|
/**
|
|
@@ -2975,6 +3169,22 @@ declare class VioFacade {
|
|
|
2975
3169
|
*/
|
|
2976
3170
|
bootstrap(): Promise<BootstrapResponse>;
|
|
2977
3171
|
get bootstrapCache(): BootstrapResponse | null;
|
|
3172
|
+
/**
|
|
3173
|
+
* Who a sponsor is to a shopper — `{ id, name, logoUrl, avatarUrl }` — by
|
|
3174
|
+
* the ONE rule every element uses (`sponsorIdentityFrom`): the live
|
|
3175
|
+
* bootstrap's sponsor blocks (the config's primary and secondaries, then
|
|
3176
|
+
* every `campaigns[]` primary and secondaries, first match); when the
|
|
3177
|
+
* bootstrap does not know the id (not loaded yet, a redirect return), what
|
|
3178
|
+
* this tab remembered of the checkout (`opts.checkoutId`, else the latest
|
|
3179
|
+
* checkout of that sponsor), then the cart's `sponsorName`. With only
|
|
3180
|
+
* `opts.checkoutId`, the sponsor is the one remembered for that checkout.
|
|
3181
|
+
* In a checkout pass the CHECKOUT's sponsor — never the page's
|
|
3182
|
+
* attribution. URLs as given; an empty logo is `null`. `null` when nothing
|
|
3183
|
+
* names it. Pure over local state, never throws.
|
|
3184
|
+
*/
|
|
3185
|
+
sponsorIdentity(sponsorId?: number | string | null, opts?: {
|
|
3186
|
+
checkoutId?: string | null;
|
|
3187
|
+
}): SponsorIdentity | null;
|
|
2978
3188
|
/**
|
|
2979
3189
|
* Get a CommerceClient scoped to a specific sponsor (via bootstrap).
|
|
2980
3190
|
* Throws if bootstrap hasn't been called or the sponsor is unknown.
|
|
@@ -3156,7 +3366,7 @@ declare function normalizeBuyerRef(value: unknown): string | undefined;
|
|
|
3156
3366
|
*
|
|
3157
3367
|
* RELEASE CHECKLIST: bump together with package.json (see CONTRIBUTING).
|
|
3158
3368
|
*/
|
|
3159
|
-
declare const SDK_VERSION = "0.
|
|
3369
|
+
declare const SDK_VERSION = "0.28.0";
|
|
3160
3370
|
|
|
3161
3371
|
/**
|
|
3162
3372
|
* Vipps MobilePay's own button, the way the design guidelines ask for it.
|
|
@@ -3185,4 +3395,4 @@ declare function vippsButtonAttributes(verb?: 'buy' | 'pay' | 'express' | 'conti
|
|
|
3185
3395
|
language?: string;
|
|
3186
3396
|
}): Record<string, string>;
|
|
3187
3397
|
|
|
3188
|
-
export { ADD_ITEM_MUTATION, type AddManualOptions, type AddProductOptions, type AnalyticsCommerce, type AnalyticsContext, type AnalyticsEventName, type AnalyticsItemInput, AnalyticsManager, type AnalyticsStartOptions, type ApplePayConfig, type ApplePayResult, type Attribution, BUYER_REF_MAX_LENGTH, type BootstrapCampaign, type BootstrapCampaignEntry, type BootstrapCampaignStatus, type BootstrapResponse, type BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, type CampaignHint, type CartChangeDetail, type CartLineItem, type CartLineOrigin, CartManager, type CartOrigin, type CartQueryOptions, type CartSlice, type CheckoutAddress, type CheckoutAttributionInput, type CheckoutAttributionWire, type CheckoutChangeDetail, CheckoutManager, type CheckoutManagerDeps, type CheckoutReference, type CheckoutState, type ClientContext, CommerceClient, Configuration, type ContentRef, type CreatePaymentVippsResponse, type CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, type EntryContextWire, type Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, type GatewayFeature, type GetVippsStatusVariables, type ImageSize, LINE_ORIGIN_CAPS, type Landing, type LineOriginWire, type LineOriginWireOptions, type ManifestLocation, type ManifestRequest, type ManifestResult, type OriginPage, type PaymentCompleteDetail, type PaymentMethod, type PaymentSelectDetail, type PaymentSuccessDetail, type PaymentSuccessResult, type PlacementComponent, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductPrice, type ProductVariant, type RegisterSlotOptions, type ResolvedConfig, SDK_VERSION, type SlotInput, type SlotKind, type Sponsor, type SponsorCartState, type SponsorCommerceBlock, type SurfacePrivacyMode, type SurfaceResponse, type TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, type VioConfig, type VioItem, type VioPlatform, type VippsPaymentState, type VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature };
|
|
3398
|
+
export { ADD_ITEM_MUTATION, type AddManualOptions, type AddProductOptions, type AnalyticsCommerce, type AnalyticsContext, type AnalyticsEventName, type AnalyticsItemInput, AnalyticsManager, type AnalyticsStartOptions, type ApplePayConfig, type ApplePayResult, type Attribution, BUYER_REF_MAX_LENGTH, type BootstrapCampaign, type BootstrapCampaignEntry, type BootstrapCampaignStatus, type BootstrapResponse, type BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, type CampaignHint, type CartChangeDetail, type CartLineItem, type CartLineOrigin, CartManager, type CartOrigin, type CartQueryOptions, type CartSlice, type CheckoutAddress, type CheckoutAttributionInput, type CheckoutAttributionWire, type CheckoutChangeDetail, CheckoutManager, type CheckoutManagerDeps, type CheckoutOpenDetail, type CheckoutReference, type CheckoutSponsor, type CheckoutState, type ClientContext, CommerceClient, Configuration, type ContentRef, type CreatePaymentVippsResponse, type CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, type EntryContextWire, type Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, type GatewayFeature, type GetVippsStatusVariables, type ImageSize, LINE_ORIGIN_CAPS, type Landing, type LineOriginWire, type LineOriginWireOptions, type ManifestLocation, type ManifestRequest, type ManifestResult, type OrderReference, type OriginPage, type PaymentCompleteDetail, type PaymentMethod, type PaymentSelectDetail, type PaymentSuccessDetail, type PaymentSuccessResult, type PlacementComponent, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductPrice, type ProductVariant, type PurchaseIds, type RegisterSlotOptions, type ResolvedConfig, SDK_VERSION, type SlotInput, type SlotKind, type Sponsor, type SponsorCartState, type SponsorCommerceBlock, type SponsorIdentity, type SurfacePrivacyMode, type SurfaceResponse, type TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, type VioConfig, type VioItem, type VioPlatform, type VippsPaymentState, type VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature };
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../chunk-
|
|
2
|
-
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from '../chunk-
|
|
1
|
+
import '../chunk-67QESEV2.js';
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from '../chunk-AFJ5M53F.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ADD_ITEM_MUTATION, AddManualOptions, AddProductOptions, AnalyticsCommerce, AnalyticsContext, AnalyticsEventName, AnalyticsItemInput, AnalyticsManager, AnalyticsStartOptions, ApplePayConfig, ApplePayResult, Attribution, BUYER_REF_MAX_LENGTH, BootstrapCampaign, BootstrapCampaignEntry, BootstrapCampaignStatus, BootstrapResponse, BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CampaignHint, CartChangeDetail, CartLineItem, CartLineOrigin, CartManager, CartOrigin, CartQueryOptions, CartSlice, CheckoutAddress, CheckoutAttributionInput, CheckoutAttributionWire, CheckoutChangeDetail, CheckoutManager, CheckoutManagerDeps, CheckoutReference, CheckoutState, ClientContext, CommerceClient, Configuration, ContentRef, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, EntryContextWire, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, GatewayFeature, GetVippsStatusVariables, ImageSize, LINE_ORIGIN_CAPS, Landing, LineOriginWire, LineOriginWireOptions, ManifestLocation, ManifestRequest, ManifestResult, OriginPage, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PaymentSuccessDetail, PaymentSuccessResult, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, RegisterSlotOptions, ResolvedConfig, SDK_VERSION, SlotInput, SlotKind, Sponsor, SponsorCartState, SponsorCommerceBlock, SurfacePrivacyMode, SurfaceResponse, TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, VioConfig, VioItem, VioPlatform, VippsPaymentState, VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './core/index.js';
|
|
1
|
+
export { ADD_ITEM_MUTATION, AddManualOptions, AddProductOptions, AnalyticsCommerce, AnalyticsContext, AnalyticsEventName, AnalyticsItemInput, AnalyticsManager, AnalyticsStartOptions, ApplePayConfig, ApplePayResult, Attribution, BUYER_REF_MAX_LENGTH, BootstrapCampaign, BootstrapCampaignEntry, BootstrapCampaignStatus, BootstrapResponse, BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CampaignHint, CartChangeDetail, CartLineItem, CartLineOrigin, CartManager, CartOrigin, CartQueryOptions, CartSlice, CheckoutAddress, CheckoutAttributionInput, CheckoutAttributionWire, CheckoutChangeDetail, CheckoutManager, CheckoutManagerDeps, CheckoutOpenDetail, CheckoutReference, CheckoutSponsor, CheckoutState, ClientContext, CommerceClient, Configuration, ContentRef, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, EntryContextWire, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, GatewayFeature, GetVippsStatusVariables, ImageSize, LINE_ORIGIN_CAPS, Landing, LineOriginWire, LineOriginWireOptions, ManifestLocation, ManifestRequest, ManifestResult, OrderReference, OriginPage, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PaymentSuccessDetail, PaymentSuccessResult, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, PurchaseIds, RegisterSlotOptions, ResolvedConfig, SDK_VERSION, SlotInput, SlotKind, Sponsor, SponsorCartState, SponsorCommerceBlock, SponsorIdentity, SurfacePrivacyMode, SurfaceResponse, TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, VioConfig, VioItem, VioPlatform, VippsPaymentState, VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './core/index.js';
|
|
2
2
|
import 'graphql-request';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './chunk-
|
|
1
|
+
import './chunk-67QESEV2.js';
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './chunk-AFJ5M53F.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _lit_react from '@lit/react';
|
|
2
|
-
import { V as VioCart$1, a as VioCheckout$1, b as VioProduct$1, c as VioProductCarousel$1, d as VioProductDetail$1 } from '../tokens-
|
|
3
|
-
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-
|
|
2
|
+
import { V as VioCart$1, a as VioCheckout$1, b as VioProduct$1, c as VioProductCarousel$1, d as VioProductDetail$1 } from '../tokens-y0KzN7bP.js';
|
|
3
|
+
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-y0KzN7bP.js';
|
|
4
4
|
import 'lit-html';
|
|
5
5
|
import 'lit';
|
|
6
6
|
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerVioElements, VioProduct, VioProductCarousel, VioProductDetail, VioCart, VioCheckout } from '../chunk-
|
|
2
|
-
export { VioTokens, applyVioTheme } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { registerVioElements, VioProduct, VioProductCarousel, VioProductDetail, VioCart, VioCheckout } from '../chunk-Q2NALS7P.js';
|
|
2
|
+
export { VioTokens, applyVioTheme } from '../chunk-Q2NALS7P.js';
|
|
3
|
+
import '../chunk-AFJ5M53F.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
// node_modules/@lit/react/node/create-component.js
|