@vio-live/web-sdk 0.23.0 → 0.23.1
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/README.md +51 -18
- package/dist/chunk-45YKS5UG.js +3 -0
- package/dist/{chunk-25QECQDS.js.map → chunk-45YKS5UG.js.map} +1 -1
- package/dist/{chunk-AMDI7KH3.js → chunk-BRJMT7P4.js} +352 -146
- package/dist/chunk-BRJMT7P4.js.map +1 -0
- package/dist/{chunk-COCHGJ2K.js → chunk-UVDOKFGD.js} +89 -62
- package/dist/chunk-UVDOKFGD.js.map +1 -0
- package/dist/core/index.d.ts +90 -18
- 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-DSYvrBsB.d.ts → tokens-DDfZuHF6.d.ts} +4 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-25QECQDS.js +0 -3
- package/dist/chunk-AMDI7KH3.js.map +0 -1
- package/dist/chunk-COCHGJ2K.js.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -573,6 +573,13 @@ declare class CartManager extends EventTarget {
|
|
|
573
573
|
* waiting (a quantity intent replayed by an AddItem reconcile). No-op if
|
|
574
574
|
* nothing is pending. */
|
|
575
575
|
waitForCartMutations(sponsorId: number): Promise<void>;
|
|
576
|
+
/**
|
|
577
|
+
* True while an AddItem/UpdateItem/DeleteItem of this sponsor OTHER than
|
|
578
|
+
* `except` has not settled. A mutation applying its own answer passes
|
|
579
|
+
* itself: its response is current for what IT sent — only the others make
|
|
580
|
+
* it stale.
|
|
581
|
+
*/
|
|
582
|
+
private hasMutationsInFlight;
|
|
576
583
|
/** Register a backend mutation so `waitForCartMutations` can await it. */
|
|
577
584
|
private trackMutation;
|
|
578
585
|
private qtySyncKey;
|
|
@@ -592,7 +599,11 @@ declare class CartManager extends EventTarget {
|
|
|
592
599
|
private emitError;
|
|
593
600
|
/** Ensure the sponsor cart exists server-side; returns its backend cart id. */
|
|
594
601
|
ensureCartId(sponsorId: number, currency?: string, shippingCountry?: string): Promise<string | undefined>;
|
|
595
|
-
/**
|
|
602
|
+
/**
|
|
603
|
+
* Overwrite local cart state with the backend cart response (source of
|
|
604
|
+
* truth). `opts.settling` is the mutation whose answer this is: it does not
|
|
605
|
+
* count as "in flight" for the origins (see `hasMutationsInFlight`).
|
|
606
|
+
*/
|
|
596
607
|
updateFromBackendCart(sponsorId: number, backendCart: {
|
|
597
608
|
cart_id?: string;
|
|
598
609
|
currency?: string;
|
|
@@ -621,6 +632,8 @@ declare class CartManager extends EventTarget {
|
|
|
621
632
|
shipping?: unknown;
|
|
622
633
|
available_shippings?: unknown[];
|
|
623
634
|
}>;
|
|
635
|
+
}, opts?: {
|
|
636
|
+
settling?: Promise<unknown>;
|
|
624
637
|
}): void;
|
|
625
638
|
/** Add a Product DTO to a sponsor's cart. Bumps quantity if already present.
|
|
626
639
|
* When a variantId is given, the line uses the VARIANT's price / image / title
|
|
@@ -2102,16 +2115,23 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
2102
2115
|
/** The lines of the cart (current, else the pre-clear snapshot), optionally one sponsor's. */
|
|
2103
2116
|
private cartLines;
|
|
2104
2117
|
/**
|
|
2105
|
-
* The cart split per campaign
|
|
2106
|
-
*
|
|
2107
|
-
*
|
|
2108
|
-
* the line's sponsor. One slice per campaign: its items (quantities from
|
|
2109
|
-
* the origins), its value, and the slot / content when they are the same
|
|
2110
|
-
* for the whole slice. A cart with one campaign is one slice.
|
|
2118
|
+
* The cart split per campaign — the shared rule of cart/slices.ts over the
|
|
2119
|
+
* current cart (else the pre-clear snapshot), plus whether any unit named
|
|
2120
|
+
* its campaign itself (a cart without origins is reported as before).
|
|
2111
2121
|
*/
|
|
2112
2122
|
private cartSlices;
|
|
2113
|
-
/**
|
|
2123
|
+
/**
|
|
2124
|
+
* The context of one of several per-campaign events: the slice's campaign,
|
|
2125
|
+
* slot and content — only its own; when the slice spans several slots or
|
|
2126
|
+
* articles the event names none rather than the one the click came from.
|
|
2127
|
+
*/
|
|
2114
2128
|
private sliceContext;
|
|
2129
|
+
/**
|
|
2130
|
+
* The context of a single-campaign checkout/purchase: when the cart's origins
|
|
2131
|
+
* say which campaign they came from, the event says it too (plus the slot /
|
|
2132
|
+
* content when unique) — a cart without origins is exactly as before.
|
|
2133
|
+
*/
|
|
2134
|
+
private singleSliceContext;
|
|
2115
2135
|
/** Current cart → commerce payload; falls back to the pre-clear snapshot. */
|
|
2116
2136
|
private cartCommerce;
|
|
2117
2137
|
private findLine;
|
|
@@ -2143,6 +2163,8 @@ interface PaymentSuccessDetail {
|
|
|
2143
2163
|
sponsorId?: number | string;
|
|
2144
2164
|
/** The slot the purchase started from, when the emitter knows it. */
|
|
2145
2165
|
slot?: string;
|
|
2166
|
+
/** The campaign the emitter attributed the purchase to (its `Vio.attribution`). */
|
|
2167
|
+
campaignId?: number;
|
|
2146
2168
|
/** Per-element content override (`vio-content-id` / `vio-content-title`), when the emitter carries one. */
|
|
2147
2169
|
contentId?: string | number;
|
|
2148
2170
|
contentTitle?: string;
|
|
@@ -2189,8 +2211,8 @@ declare function purchaseFromPaymentSuccess(d: PaymentSuccessDetail): Pick<Analy
|
|
|
2189
2211
|
*
|
|
2190
2212
|
* Pure: `resolveContent()` takes the document and location (defaults to the
|
|
2191
2213
|
* globals) so it can be tested, never throws, and answers `{}` where there is
|
|
2192
|
-
* no DOM (SSR, node tests). `Vio.content()`
|
|
2193
|
-
*
|
|
2214
|
+
* no DOM (SSR, node tests). `Vio.content()` resolves it live on every call —
|
|
2215
|
+
* an SPA route change or a new title is seen on the next event.
|
|
2194
2216
|
*/
|
|
2195
2217
|
interface ContentRef {
|
|
2196
2218
|
id?: string;
|
|
@@ -2269,6 +2291,39 @@ declare function autoSlotDisplayName(kind: SlotKind, ordinal: number, scopeName?
|
|
|
2269
2291
|
/** A scope value fit for an id: trimmed, inner whitespace → `-`. */
|
|
2270
2292
|
declare function normalizeScope(scope: string | null | undefined): string;
|
|
2271
2293
|
|
|
2294
|
+
/**
|
|
2295
|
+
* The cart split per campaign (ADR-0034) — ONE rule, shared by the SDK's own
|
|
2296
|
+
* `begin_checkout` / `purchase` events, by `Vio.cartSlices()` and so by any
|
|
2297
|
+
* host with its own analytics sink (Vev).
|
|
2298
|
+
*
|
|
2299
|
+
* Every unit of every line goes to the campaign of its origin — the one the
|
|
2300
|
+
* place showed when it was added — and units without one to the campaign the
|
|
2301
|
+
* caller's rule resolves for the line's sponsor (`resolveCampaign`). One slice
|
|
2302
|
+
* per campaign: its items (quantities from the origins, merged per product +
|
|
2303
|
+
* variant), its value with two decimals, and `slot` / `contentId` /
|
|
2304
|
+
* `sponsorId` only when they are the same for the whole slice. A cart with
|
|
2305
|
+
* one campaign is one slice. Pure; never throws on odd lines.
|
|
2306
|
+
*/
|
|
2307
|
+
|
|
2308
|
+
/** An item of a slice — the analytics item shape (ids as given, normalized on the wire). */
|
|
2309
|
+
type VioItem = AnalyticsItemInput;
|
|
2310
|
+
/** One campaign's share of the cart. */
|
|
2311
|
+
interface CartSlice {
|
|
2312
|
+
campaignId?: number;
|
|
2313
|
+
sponsorId?: number;
|
|
2314
|
+
slot?: string;
|
|
2315
|
+
contentId?: string;
|
|
2316
|
+
items: VioItem[];
|
|
2317
|
+
value: number;
|
|
2318
|
+
currency?: string;
|
|
2319
|
+
/** 1-based position of this slice and how many there are. */
|
|
2320
|
+
slice: number;
|
|
2321
|
+
slices: number;
|
|
2322
|
+
}
|
|
2323
|
+
/** The campaign of a unit without an explicit one: the caller's rule (slot assignment → sponsor → default). */
|
|
2324
|
+
type ResolveCampaign = (slot: string | undefined, sponsorId: number) => number | undefined;
|
|
2325
|
+
declare function cartSlicesFrom(lines: ReadonlyArray<CartLineItem>, resolveCampaign: ResolveCampaign, fallbackCurrency?: string): CartSlice[];
|
|
2326
|
+
|
|
2272
2327
|
declare class VioFacade {
|
|
2273
2328
|
private apiInstance;
|
|
2274
2329
|
private commerceClients;
|
|
@@ -2287,8 +2342,11 @@ declare class VioFacade {
|
|
|
2287
2342
|
private slotDeclareTimer;
|
|
2288
2343
|
/** A name appeared (or the key changed) since the registry was last declared. */
|
|
2289
2344
|
private slotsDirty;
|
|
2290
|
-
/**
|
|
2291
|
-
private
|
|
2345
|
+
/** Manifests POSTed by this page load (abuse / rollout guard, see declareSlots). */
|
|
2346
|
+
private declarationsThisLoad;
|
|
2347
|
+
/** Each cap warns once per page load. */
|
|
2348
|
+
private warnedLocationCap;
|
|
2349
|
+
private warnedDeclarationCap;
|
|
2292
2350
|
private cartManager;
|
|
2293
2351
|
private checkoutManager;
|
|
2294
2352
|
private analyticsManager;
|
|
@@ -2296,10 +2354,11 @@ declare class VioFacade {
|
|
|
2296
2354
|
/**
|
|
2297
2355
|
* The content (article, page) this SDK instance is rendered in — what every
|
|
2298
2356
|
* analytics event carries as `content_id` / `content_title` when the event
|
|
2299
|
-
* has no explicit one
|
|
2300
|
-
*
|
|
2301
|
-
*
|
|
2302
|
-
* a
|
|
2357
|
+
* has no explicit one: init option → URL query → `vio:content-*` metas →
|
|
2358
|
+
* canonical/og:url → pathname (see `resolveContent`). Resolved LIVE on each
|
|
2359
|
+
* call — a few querySelectors — so an SPA route change, a new canonical or
|
|
2360
|
+
* a new title are seen without any re-init. Never throws; `{}` without a
|
|
2361
|
+
* document.
|
|
2303
2362
|
*/
|
|
2304
2363
|
content(): ContentRef;
|
|
2305
2364
|
get isInitialized(): boolean;
|
|
@@ -2376,6 +2435,19 @@ declare class VioFacade {
|
|
|
2376
2435
|
attribution(slot?: string | null, hint?: {
|
|
2377
2436
|
sponsorId?: number | string;
|
|
2378
2437
|
}): Attribution;
|
|
2438
|
+
/**
|
|
2439
|
+
* The cart split per campaign — the SAME rule `begin_checkout` / `purchase`
|
|
2440
|
+
* use, for hosts with their own analytics sink (Vev). Every unit of every
|
|
2441
|
+
* line goes to the campaign of its origin; units without one to the campaign
|
|
2442
|
+
* the current rule resolves for the line's sponsor (slot assignment → the
|
|
2443
|
+
* sponsor's active campaign → default); `slot` / `contentId` / `sponsorId`
|
|
2444
|
+
* only when they are the same for the whole slice; `value` with two
|
|
2445
|
+
* decimals; `slice` / `slices` number the parts. Pure over the current cart
|
|
2446
|
+
* (or over `opts.items`); `[]` when there is nothing.
|
|
2447
|
+
*/
|
|
2448
|
+
cartSlices(sponsorId?: number, opts?: {
|
|
2449
|
+
items?: CartLineItem[];
|
|
2450
|
+
}): CartSlice[];
|
|
2379
2451
|
private scheduleSlotDeclaration;
|
|
2380
2452
|
private findSponsor;
|
|
2381
2453
|
}
|
|
@@ -2388,7 +2460,7 @@ declare const Vio: VioFacade;
|
|
|
2388
2460
|
*
|
|
2389
2461
|
* RELEASE CHECKLIST: bump together with package.json (see CONTRIBUTING).
|
|
2390
2462
|
*/
|
|
2391
|
-
declare const SDK_VERSION = "0.23.
|
|
2463
|
+
declare const SDK_VERSION = "0.23.1";
|
|
2392
2464
|
|
|
2393
2465
|
/**
|
|
2394
2466
|
* Vipps MobilePay's own button, the way the design guidelines ask for it.
|
|
@@ -2417,4 +2489,4 @@ declare function vippsButtonAttributes(verb?: 'buy' | 'pay' | 'express' | 'conti
|
|
|
2417
2489
|
language?: string;
|
|
2418
2490
|
}): Record<string, string>;
|
|
2419
2491
|
|
|
2420
|
-
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, type BootstrapCampaign, type BootstrapCampaignEntry, type BootstrapCampaignStatus, type BootstrapResponse, type BootstrapSlot, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, type CartChangeDetail, type CartLineItem, type CartLineOrigin, CartManager, type CartOrigin, type CartQueryOptions, type CheckoutAddress, type CheckoutChangeDetail, CheckoutManager, type CheckoutState, CommerceClient, Configuration, type ContentRef, type CreatePaymentVippsResponse, type CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, type Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, type GetVippsStatusVariables, type ImageSize, type ManifestLocation, type ManifestRequest, type ManifestResult, 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 ResolvedConfig, SDK_VERSION, type SlotInput, type SlotKind, type Sponsor, type SponsorCartState, type SponsorCommerceBlock, type TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, type VioConfig, type VioPlatform, type VippsPaymentState, type VippsStatusResult, addItem, autoSlotDisplayName, autoSlotId, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, ensureVippsButton, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, lineOrigins, normalizeOrigin, normalizeScope, primaryImageUrl, purchaseFromPaymentSuccess, resolveCampaignId, resolveContent, resolveSlotCampaign, sameOrigin, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes };
|
|
2492
|
+
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, type BootstrapCampaign, type BootstrapCampaignEntry, type BootstrapCampaignStatus, type BootstrapResponse, type BootstrapSlot, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, type CartChangeDetail, type CartLineItem, type CartLineOrigin, CartManager, type CartOrigin, type CartQueryOptions, type CartSlice, type CheckoutAddress, type CheckoutChangeDetail, CheckoutManager, type CheckoutState, CommerceClient, Configuration, type ContentRef, type CreatePaymentVippsResponse, type CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, type Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, type GetVippsStatusVariables, type ImageSize, type ManifestLocation, type ManifestRequest, type ManifestResult, 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 ResolvedConfig, SDK_VERSION, type SlotInput, type SlotKind, type Sponsor, type SponsorCartState, type SponsorCommerceBlock, type TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_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, addItem, autoSlotDisplayName, autoSlotId, cartSlicesFrom, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, ensureVippsButton, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, lineOrigins, normalizeOrigin, normalizeScope, primaryImageUrl, purchaseFromPaymentSuccess, resolveCampaignId, resolveContent, resolveSlotCampaign, sameOrigin, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes };
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../chunk-
|
|
2
|
-
export { ADD_ITEM_MUTATION, AnalyticsManager, CREATE_CART_MUTATION, CREATE_CHECKOUT_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, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, addItem, autoSlotDisplayName, autoSlotId, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, ensureVippsButton, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, lineOrigins, normalizeOrigin, normalizeScope, primaryImageUrl, purchaseFromPaymentSuccess, resolveCampaignId, resolveContent, resolveSlotCampaign, sameOrigin, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes } from '../chunk-
|
|
1
|
+
import '../chunk-45YKS5UG.js';
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, CREATE_CART_MUTATION, CREATE_CHECKOUT_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, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, addItem, autoSlotDisplayName, autoSlotId, cartSlicesFrom, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, ensureVippsButton, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, lineOrigins, normalizeOrigin, normalizeScope, primaryImageUrl, purchaseFromPaymentSuccess, resolveCampaignId, resolveContent, resolveSlotCampaign, sameOrigin, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes } from '../chunk-BRJMT7P4.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, BootstrapCampaign, BootstrapCampaignEntry, BootstrapCampaignStatus, BootstrapResponse, BootstrapSlot, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartChangeDetail, CartLineItem, CartLineOrigin, CartManager, CartOrigin, CartQueryOptions, CheckoutAddress, CheckoutChangeDetail, CheckoutManager, CheckoutState, CommerceClient, Configuration, ContentRef, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GetVippsStatusVariables, ImageSize, ManifestLocation, ManifestRequest, ManifestResult, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PaymentSuccessDetail, PaymentSuccessResult, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, ResolvedConfig, SDK_VERSION, SlotInput, SlotKind, Sponsor, SponsorCartState, SponsorCommerceBlock, TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, VioConfig, VioPlatform, VippsPaymentState, VippsStatusResult, addItem, autoSlotDisplayName, autoSlotId, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, ensureVippsButton, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, lineOrigins, normalizeOrigin, normalizeScope, primaryImageUrl, purchaseFromPaymentSuccess, resolveCampaignId, resolveContent, resolveSlotCampaign, sameOrigin, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes } from './core/index.js';
|
|
1
|
+
export { ADD_ITEM_MUTATION, AddManualOptions, AddProductOptions, AnalyticsCommerce, AnalyticsContext, AnalyticsEventName, AnalyticsItemInput, AnalyticsManager, AnalyticsStartOptions, ApplePayConfig, ApplePayResult, Attribution, BootstrapCampaign, BootstrapCampaignEntry, BootstrapCampaignStatus, BootstrapResponse, BootstrapSlot, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartChangeDetail, CartLineItem, CartLineOrigin, CartManager, CartOrigin, CartQueryOptions, CartSlice, CheckoutAddress, CheckoutChangeDetail, CheckoutManager, CheckoutState, CommerceClient, Configuration, ContentRef, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GetVippsStatusVariables, ImageSize, ManifestLocation, ManifestRequest, ManifestResult, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PaymentSuccessDetail, PaymentSuccessResult, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, ResolvedConfig, SDK_VERSION, SlotInput, SlotKind, Sponsor, SponsorCartState, SponsorCommerceBlock, TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, VioConfig, VioItem, VioPlatform, VippsPaymentState, VippsStatusResult, addItem, autoSlotDisplayName, autoSlotId, cartSlicesFrom, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, ensureVippsButton, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, lineOrigins, normalizeOrigin, normalizeScope, primaryImageUrl, purchaseFromPaymentSuccess, resolveCampaignId, resolveContent, resolveSlotCampaign, sameOrigin, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes } 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, CREATE_CART_MUTATION, CREATE_CHECKOUT_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, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, addItem, autoSlotDisplayName, autoSlotId, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, ensureVippsButton, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, lineOrigins, normalizeOrigin, normalizeScope, primaryImageUrl, purchaseFromPaymentSuccess, resolveCampaignId, resolveContent, resolveSlotCampaign, sameOrigin, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes } from './chunk-
|
|
1
|
+
import './chunk-45YKS5UG.js';
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, CREATE_CART_MUTATION, CREATE_CHECKOUT_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, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, addItem, autoSlotDisplayName, autoSlotId, cartSlicesFrom, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, ensureVippsButton, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, lineOrigins, normalizeOrigin, normalizeScope, primaryImageUrl, purchaseFromPaymentSuccess, resolveCampaignId, resolveContent, resolveSlotCampaign, sameOrigin, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes } from './chunk-BRJMT7P4.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-DDfZuHF6.js';
|
|
3
|
+
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-DDfZuHF6.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-UVDOKFGD.js';
|
|
2
|
+
export { VioTokens, applyVioTheme } from '../chunk-UVDOKFGD.js';
|
|
3
|
+
import '../chunk-BRJMT7P4.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
// node_modules/@lit/react/node/create-component.js
|
|
@@ -212,10 +212,13 @@ declare class VioProductDetail extends LitElement {
|
|
|
212
212
|
/** Per-element override of the content title. */
|
|
213
213
|
vioContentTitle: string;
|
|
214
214
|
private readonly slotRegistration;
|
|
215
|
-
/** What the click that opened the detail carried ('' when nothing). */
|
|
215
|
+
/** What the click that opened the detail carried ('' when nothing), and for which product. */
|
|
216
216
|
private eventSlot;
|
|
217
217
|
private eventContentId;
|
|
218
218
|
private eventContentTitle;
|
|
219
|
+
private eventProductId;
|
|
220
|
+
/** The card's context applies to the product it opened — not to one the host opened by hand later. */
|
|
221
|
+
private get fromCard();
|
|
219
222
|
/** The slot id in effect for this element: `vio-slot`, else the auto id (`detail-N`). Read-only. */
|
|
220
223
|
get effectiveSlot(): string;
|
|
221
224
|
/** The slot the open product is attributed to: the opening card's, else this element's. */
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { V as VioCart, a as VioCheckout, b as VioProduct, c as VioProductCarousel, d as VioProductDetail, e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-
|
|
1
|
+
export { V as VioCart, a as VioCheckout, b as VioProduct, c as VioProductCarousel, d as VioProductDetail, e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-DDfZuHF6.js';
|
|
2
2
|
import 'lit-html';
|
|
3
3
|
import 'lit';
|
|
4
4
|
|
package/dist/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerVioElements } from '../chunk-
|
|
2
|
-
export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { registerVioElements } from '../chunk-UVDOKFGD.js';
|
|
2
|
+
export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-UVDOKFGD.js';
|
|
3
|
+
import '../chunk-BRJMT7P4.js';
|
|
4
4
|
|
|
5
5
|
// src/ui/index.ts
|
|
6
6
|
registerVioElements();
|
package/package.json
CHANGED
package/dist/chunk-25QECQDS.js
DELETED