@vio-live/web-sdk 0.23.1 → 0.26.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/README.md +191 -21
- package/dist/{chunk-BRJMT7P4.js → chunk-5KWICUME.js} +1321 -333
- package/dist/chunk-5KWICUME.js.map +1 -0
- package/dist/{chunk-UVDOKFGD.js → chunk-A3LN5JEM.js} +235 -58
- package/dist/chunk-A3LN5JEM.js.map +1 -0
- package/dist/chunk-NCP76AXW.js +3 -0
- package/dist/{chunk-45YKS5UG.js.map → chunk-NCP76AXW.js.map} +1 -1
- package/dist/core/index.d.ts +1284 -596
- 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-DDfZuHF6.d.ts → tokens-Bn7fK9ta.d.ts} +72 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +2 -1
- package/dist/chunk-45YKS5UG.js +0 -3
- package/dist/chunk-BRJMT7P4.js.map +0 -1
- package/dist/chunk-UVDOKFGD.js.map +0 -1
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, 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-
|
|
1
|
+
import '../chunk-NCP76AXW.js';
|
|
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-5KWICUME.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, 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';
|
|
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';
|
|
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, 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-
|
|
1
|
+
import './chunk-NCP76AXW.js';
|
|
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-5KWICUME.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-Bn7fK9ta.js';
|
|
3
|
+
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-Bn7fK9ta.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-A3LN5JEM.js';
|
|
2
|
+
export { VioTokens, applyVioTheme } from '../chunk-A3LN5JEM.js';
|
|
3
|
+
import '../chunk-5KWICUME.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
// node_modules/@lit/react/node/create-component.js
|
|
@@ -36,13 +36,29 @@ declare class VioProduct extends LitElement {
|
|
|
36
36
|
vioScope: string;
|
|
37
37
|
/** Human label of the scope (` · Title` in the slot name); inherited from `data-vio-scope-name`. */
|
|
38
38
|
vioScopeName: string;
|
|
39
|
+
/**
|
|
40
|
+
* The campaign this element's PAGE belongs to (ADR-0034, amendment 3).
|
|
41
|
+
* Inherited: this attribute, else the nearest ancestor's `data-vio-campaign`,
|
|
42
|
+
* else `Vio.init({ campaignId })`. A dashboard assignment of the slot wins
|
|
43
|
+
* over it. Optional.
|
|
44
|
+
*/
|
|
45
|
+
vioCampaign: string;
|
|
39
46
|
/** Per-element override of the content (article) id the events carry; see `Vio.content()`. */
|
|
40
47
|
vioContentId: string;
|
|
41
48
|
/** Per-element override of the content title. */
|
|
42
49
|
vioContentTitle: string;
|
|
50
|
+
/**
|
|
51
|
+
* What kind of SDK element this card stands for in analytics
|
|
52
|
+
* (`component_template_id`): `product-card` on its own; a carousel sets
|
|
53
|
+
* `product-carousel` on the cards it renders, so its impressions and its
|
|
54
|
+
* clicks count under one component type.
|
|
55
|
+
*/
|
|
56
|
+
componentTemplateId: string;
|
|
43
57
|
private readonly slotRegistration;
|
|
44
58
|
/** The slot id in effect: `vio-slot`, else the auto id (`card-N`). Read-only. */
|
|
45
59
|
get effectiveSlot(): string;
|
|
60
|
+
/** The element's own page campaign (`vio-campaign` / ancestor), if any; `Vio.init`'s applies otherwise. */
|
|
61
|
+
get effectiveCampaignId(): number | undefined;
|
|
46
62
|
/** The slot campaign's sponsor as the string the attributes use ('' when unknown). */
|
|
47
63
|
private sponsorFromAttribution;
|
|
48
64
|
private slotAttributes;
|
|
@@ -139,6 +155,13 @@ declare class VioProductCarousel extends LitElement {
|
|
|
139
155
|
vioScope: string;
|
|
140
156
|
/** Human label of the scope (` · Title` in the slot name); inherited from `data-vio-scope-name`. */
|
|
141
157
|
vioScopeName: string;
|
|
158
|
+
/**
|
|
159
|
+
* The campaign this element's PAGE belongs to (ADR-0034, amendment 3).
|
|
160
|
+
* Inherited: this attribute, else the nearest ancestor's `data-vio-campaign`,
|
|
161
|
+
* else `Vio.init({ campaignId })`. A dashboard assignment of the slot wins
|
|
162
|
+
* over it. Optional.
|
|
163
|
+
*/
|
|
164
|
+
vioCampaign: string;
|
|
142
165
|
/** Per-element override of the content (article) id the events carry; see `Vio.content()`. */
|
|
143
166
|
vioContentId: string;
|
|
144
167
|
/** Per-element override of the content title. */
|
|
@@ -146,6 +169,8 @@ declare class VioProductCarousel extends LitElement {
|
|
|
146
169
|
private readonly slotRegistration;
|
|
147
170
|
/** The slot id in effect: `vio-slot`, else the auto id (`carousel-N`). Read-only. */
|
|
148
171
|
get effectiveSlot(): string;
|
|
172
|
+
/** The element's own page campaign (`vio-campaign` / ancestor), if any; `Vio.init`'s applies otherwise. */
|
|
173
|
+
get effectiveCampaignId(): number | undefined;
|
|
149
174
|
private slotAttributes;
|
|
150
175
|
/** Attribution every analytics event of this carousel carries (`Vio.attribution` + the content overrides). */
|
|
151
176
|
private attribution;
|
|
@@ -207,6 +232,13 @@ declare class VioProductDetail extends LitElement {
|
|
|
207
232
|
vioScope: string;
|
|
208
233
|
/** Human label of the scope (` · Title` in the slot name); inherited from `data-vio-scope-name`. */
|
|
209
234
|
vioScopeName: string;
|
|
235
|
+
/**
|
|
236
|
+
* The campaign this element's PAGE belongs to (ADR-0034, amendment 3).
|
|
237
|
+
* Inherited: this attribute, else the nearest ancestor's `data-vio-campaign`,
|
|
238
|
+
* else `Vio.init({ campaignId })`. A dashboard assignment of the slot wins
|
|
239
|
+
* over it. Optional.
|
|
240
|
+
*/
|
|
241
|
+
vioCampaign: string;
|
|
210
242
|
/** Per-element override of the content (article) id the events carry; see `Vio.content()`. */
|
|
211
243
|
vioContentId: string;
|
|
212
244
|
/** Per-element override of the content title. */
|
|
@@ -216,13 +248,18 @@ declare class VioProductDetail extends LitElement {
|
|
|
216
248
|
private eventSlot;
|
|
217
249
|
private eventContentId;
|
|
218
250
|
private eventContentTitle;
|
|
251
|
+
private eventCampaignId;
|
|
219
252
|
private eventProductId;
|
|
220
253
|
/** The card's context applies to the product it opened — not to one the host opened by hand later. */
|
|
221
254
|
private get fromCard();
|
|
222
255
|
/** The slot id in effect for this element: `vio-slot`, else the auto id (`detail-N`). Read-only. */
|
|
223
256
|
get effectiveSlot(): string;
|
|
257
|
+
/** The element's own page campaign (`vio-campaign` / ancestor), if any; `Vio.init`'s applies otherwise. */
|
|
258
|
+
get effectiveCampaignId(): number | undefined;
|
|
224
259
|
/** The slot the open product is attributed to: the opening card's, else this element's. */
|
|
225
260
|
private get activeSlot();
|
|
261
|
+
/** The page-campaign candidates of the open product: the opening card's, then this element's own and its ancestor's. */
|
|
262
|
+
private get activeCampaignHint();
|
|
226
263
|
private slotAttributes;
|
|
227
264
|
/** Attribution every event of the open product carries (`Vio.attribution` of the opening card's slot, else this element's). */
|
|
228
265
|
private attribution;
|
|
@@ -776,6 +813,41 @@ declare class VioCheckout extends LitElement {
|
|
|
776
813
|
* paid sponsor's cart so the badge + drawer reflect the purchase.
|
|
777
814
|
*/
|
|
778
815
|
private confirmOrder;
|
|
816
|
+
/** Longest `vio:payment-success` waits for the checkout's buyer reference, and when it asks a second time. */
|
|
817
|
+
private static readonly BUYER_REF_WAIT_MS;
|
|
818
|
+
private static readonly BUYER_REF_RETRY_AT_MS;
|
|
819
|
+
/** Payment events still waiting for their buyer reference: settled early (without it) when the page hides or the element leaves. */
|
|
820
|
+
private readonly pendingSuccessEmits;
|
|
821
|
+
/**
|
|
822
|
+
* `vio:payment-success` for the host and analytics — with the buyer
|
|
823
|
+
* reference (`buyerRef`: shopcart's keyed hash of the email → analytics
|
|
824
|
+
* `buyer_id`) when the checkout can say it. An emitter whose own answer
|
|
825
|
+
* carried it (Apple Pay, Klarna native) sends at once; the others (a
|
|
826
|
+
* redirect return, Stripe / Adyen / Nexi in the drawer, a provider's
|
|
827
|
+
* receipt) ask the checkout — at once and, while it has neither order nor
|
|
828
|
+
* reference, again at 1.2 s, since a webhook may write the checkout a
|
|
829
|
+
* moment after the redirect — within 2.5 s, and
|
|
830
|
+
* send without it when the answer is late or empty. Nothing is asked when
|
|
831
|
+
* it cannot help (the gateway has no `buyer_ref` yet; a confirmation that
|
|
832
|
+
* already answered). Only the event waits — the screen is already the
|
|
833
|
+
* confirmation — and not past the page: when the page hides (`pagehide`,
|
|
834
|
+
* `visibilitychange`) or the element leaves, the event goes out at once
|
|
835
|
+
* without the reference. Exactly one event per call. `afterwards` runs
|
|
836
|
+
* right after the event, so a path keeps the order it always had (the cart
|
|
837
|
+
* is cleared after the event).
|
|
838
|
+
*/
|
|
839
|
+
private emitPaymentSuccess;
|
|
840
|
+
/** Whether asking the checkout for the buyer reference can still help. */
|
|
841
|
+
private shouldAskBuyerRef;
|
|
842
|
+
/**
|
|
843
|
+
* The buyer reference of a checkout: asked at once and, when that answer
|
|
844
|
+
* failed or has neither the reference nor an order yet (the webhook has not
|
|
845
|
+
* written the checkout), again at 1.2 s — all within 2.5 s. An order
|
|
846
|
+
* without a reference is a settled answer: the backend has none, asking
|
|
847
|
+
* again cannot help. `undefined` when the time is up, when the answer
|
|
848
|
+
* stopped mattering (`stopped()`) or on failure.
|
|
849
|
+
*/
|
|
850
|
+
private askBuyerRef;
|
|
779
851
|
/** Waits between asks for the Vio order number: the order is often born a
|
|
780
852
|
* moment after the payment (Vipps and Stripe through their webhook). */
|
|
781
853
|
private static readonly ORDER_NUMBER_DELAYS_MS;
|
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-Bn7fK9ta.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-A3LN5JEM.js';
|
|
2
|
+
export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-A3LN5JEM.js';
|
|
3
|
+
import '../chunk-5KWICUME.js';
|
|
4
4
|
|
|
5
5
|
// src/ui/index.ts
|
|
6
6
|
registerVioElements();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vio-live/web-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Vio Web SDK — in-site shoppable + native checkout, designed for editorial commerce sites",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"@lit/react": "^1.0.8",
|
|
58
58
|
"@types/node": "^22.10.0",
|
|
59
59
|
"@types/react": "^19.2.17",
|
|
60
|
+
"graphql": "^16.14.2",
|
|
60
61
|
"jsdom": "^25.0.1",
|
|
61
62
|
"tsup": "^8.5.1",
|
|
62
63
|
"typescript": "^5.6.3",
|
package/dist/chunk-45YKS5UG.js
DELETED