@vio-live/web-sdk 0.29.0 → 0.33.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 +219 -0
- package/README.md +127 -19
- package/dist/chunk-QGJUBVH3.js +3 -0
- package/dist/{chunk-67QESEV2.js.map → chunk-QGJUBVH3.js.map} +1 -1
- package/dist/{chunk-L6YYYKQK.js → chunk-T5B74YBQ.js} +1433 -205
- package/dist/chunk-T5B74YBQ.js.map +1 -0
- package/dist/{chunk-AG4G2S2M.js → chunk-ZORYG4W3.js} +1153 -169
- package/dist/chunk-ZORYG4W3.js.map +1 -0
- package/dist/core/index.d.ts +891 -556
- 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-Dok4d21V.d.ts → tokens-B7GVA_qB.d.ts} +325 -21
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-67QESEV2.js +0 -3
- package/dist/chunk-AG4G2S2M.js.map +0 -1
- package/dist/chunk-L6YYYKQK.js.map +0 -1
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, 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-
|
|
1
|
+
import '../chunk-QGJUBVH3.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, INTERNAL_KEY, INTERNAL_PARAM, 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, readInternal, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveInternal, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature, writeInternal } from '../chunk-ZORYG4W3.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, 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, CartUpdatedDetail, 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';
|
|
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, CartUpdatedDetail, 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, INTERNAL_KEY, INTERNAL_PARAM, 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, readInternal, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveInternal, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature, writeInternal } 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, 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-
|
|
1
|
+
import './chunk-QGJUBVH3.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, INTERNAL_KEY, INTERNAL_PARAM, 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, readInternal, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveInternal, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature, writeInternal } from './chunk-ZORYG4W3.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-B7GVA_qB.js';
|
|
3
|
+
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-B7GVA_qB.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-T5B74YBQ.js';
|
|
2
|
+
export { VioTokens, applyVioTheme } from '../chunk-T5B74YBQ.js';
|
|
3
|
+
import '../chunk-ZORYG4W3.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
// node_modules/@lit/react/node/create-component.js
|
|
@@ -9,6 +9,18 @@ declare class VioProduct extends LitElement {
|
|
|
9
9
|
name: string;
|
|
10
10
|
/** Pre-formatted price string (e.g. "990 kr"). Bold. */
|
|
11
11
|
price: string;
|
|
12
|
+
/** Short text under the name (plain text, cut after --vio-card-description-lines, 4). Shown only with `show-description`. */
|
|
13
|
+
description: string;
|
|
14
|
+
/** Show `description` under the name. Off by default. */
|
|
15
|
+
showDescription: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The buy button, as in the Vev card: `icon` (the round bag on the image —
|
|
18
|
+
* default), `bar` (a full-width button under the price) or `hidden`. Both
|
|
19
|
+
* add to the cart, or open the product when it has sizes to pick.
|
|
20
|
+
*/
|
|
21
|
+
buttonStyle: 'icon' | 'bar' | 'hidden';
|
|
22
|
+
/** Text of the `bar` button (default «Kjøp»); «Kjøp · 2» once two are in the cart. */
|
|
23
|
+
buttonLabel: string;
|
|
12
24
|
/** Retailer / sponsor name shown at the bottom (uppercase, gray). */
|
|
13
25
|
retailer: string;
|
|
14
26
|
/** Product image URL. Square aspect, gray bg if missing. */
|
|
@@ -135,6 +147,26 @@ declare class VioProductCarousel extends LitElement {
|
|
|
135
147
|
productRefs: string;
|
|
136
148
|
/** Currency for product prices. */
|
|
137
149
|
currency: string;
|
|
150
|
+
/**
|
|
151
|
+
* `carousel` (default: one row that scrolls sideways) or `list` (the cards
|
|
152
|
+
* one under the other, full width, like products inside an article). Unset
|
|
153
|
+
* = the theme's `carouselLayout` (`--vio-carousel-layout`).
|
|
154
|
+
*/
|
|
155
|
+
layout: string;
|
|
156
|
+
/** Every card shows its product's description (see `descriptions` to write your own). Off by default. */
|
|
157
|
+
showDescription: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* The editor's own text per product, over the catalogue's: `{ "<productId>": "text" }`
|
|
160
|
+
* (attribute: the same as JSON). Shown even without `show-description`; `""`
|
|
161
|
+
* hides that product's description.
|
|
162
|
+
*/
|
|
163
|
+
descriptions: Record<string, string>;
|
|
164
|
+
/** The cards' buy button: `icon` (default), `bar` or `hidden` — see `<vio-product>`. */
|
|
165
|
+
buttonStyle: 'icon' | 'bar' | 'hidden';
|
|
166
|
+
/** Text of the `bar` button (default «Kjøp»). */
|
|
167
|
+
buttonLabel: string;
|
|
168
|
+
/** `layout` resolved against the theme on connect. */
|
|
169
|
+
private resolvedLayout;
|
|
138
170
|
/**
|
|
139
171
|
* Slot this carousel sits in (ADR-0027). Optional: without it the carousel
|
|
140
172
|
* registers itself as `carousel-N` (its position among the carousels on the
|
|
@@ -179,6 +211,11 @@ declare class VioProductCarousel extends LitElement {
|
|
|
179
211
|
private isLoading;
|
|
180
212
|
private fetchError;
|
|
181
213
|
static styles: lit.CSSResult;
|
|
214
|
+
private overrideFor;
|
|
215
|
+
private descriptionFor;
|
|
216
|
+
/** The editor's text always shows (unless empty); the catalogue's only with show-description. */
|
|
217
|
+
private showsDescription;
|
|
218
|
+
willUpdate(changed: Map<string, unknown>): void;
|
|
182
219
|
connectedCallback(): void;
|
|
183
220
|
disconnectedCallback(): void;
|
|
184
221
|
updated(changed: Map<string, unknown>): void;
|
|
@@ -187,6 +224,13 @@ declare class VioProductCarousel extends LitElement {
|
|
|
187
224
|
* sponsor of the campaign the slot shows (ADR-0034 — "the campaign of the
|
|
188
225
|
* block is its sponsor"), else 0 (unknown).
|
|
189
226
|
*/
|
|
227
|
+
/**
|
|
228
|
+
* The campaign whose channel sells a sponsor's products here (one article =
|
|
229
|
+
* one campaign = one channel): the campaign this slot credits for that
|
|
230
|
+
* sponsor (`Vio.attribution`), then the element's own (`vio-campaign`, an
|
|
231
|
+
* ancestor's `data-vio-campaign`).
|
|
232
|
+
*/
|
|
233
|
+
private commerceCampaigns;
|
|
190
234
|
private effectiveSponsorId;
|
|
191
235
|
private autoFetch;
|
|
192
236
|
private unobserveImpression;
|
|
@@ -196,6 +240,8 @@ declare class VioProductCarousel extends LitElement {
|
|
|
196
240
|
/** view_item_list needs BOTH the viewport dwell and loaded products —
|
|
197
241
|
* whichever lands last fires it (once). */
|
|
198
242
|
private maybeTrackList;
|
|
243
|
+
/** The products on show as analytics lines (impression and view_item_list); null before they load. */
|
|
244
|
+
private listCommerce;
|
|
199
245
|
private parseRefs;
|
|
200
246
|
private scrollByDirection;
|
|
201
247
|
private renderScrollerContent;
|
|
@@ -207,6 +253,13 @@ declare global {
|
|
|
207
253
|
}
|
|
208
254
|
}
|
|
209
255
|
|
|
256
|
+
/** One of the brand's promises under the buy zone («Rask levering», «Designet i Norge»). */
|
|
257
|
+
interface VioDetailHighlight {
|
|
258
|
+
/** A built-in line icon (see HIGHLIGHT_ICONS: plane, heart, shirt, truck, return, leaf, star, shield) or an image URL. */
|
|
259
|
+
icon?: string;
|
|
260
|
+
title: string;
|
|
261
|
+
text?: string;
|
|
262
|
+
}
|
|
210
263
|
declare class VioProductDetail extends LitElement {
|
|
211
264
|
open: boolean;
|
|
212
265
|
productId: string;
|
|
@@ -243,6 +296,46 @@ declare class VioProductDetail extends LitElement {
|
|
|
243
296
|
vioContentId: string;
|
|
244
297
|
/** Per-element override of the content title. */
|
|
245
298
|
vioContentTitle: string;
|
|
299
|
+
/**
|
|
300
|
+
* No «Lagt i handlekurven» toast after «Legg i handlekurv» — for a host
|
|
301
|
+
* that answers `vio:added-to-cart` with its own (opening its cart drawer,
|
|
302
|
+
* say). Off by default: the toast shows.
|
|
303
|
+
*/
|
|
304
|
+
noAddedToast: boolean;
|
|
305
|
+
/**
|
|
306
|
+
* How the images show: `thumbs` (one image, thumbnails under it — the
|
|
307
|
+
* default) or `carousel` (every image in one swipeable row, no thumbnails:
|
|
308
|
+
* less height). Unset = the theme's `detailGallery` (`--vio-detail-gallery`),
|
|
309
|
+
* so a host sets it once for every detail on the page.
|
|
310
|
+
*/
|
|
311
|
+
gallery: string;
|
|
312
|
+
/**
|
|
313
|
+
* «Beskrivelse»: `preview` (default — the first lines fading out and «Les
|
|
314
|
+
* mer»), `folded` (only the heading until a tap) or `open` (all of it).
|
|
315
|
+
* Unset = the theme's `detailDescriptionMode` (`--vio-detail-description-mode`).
|
|
316
|
+
*/
|
|
317
|
+
descriptionMode: string;
|
|
318
|
+
/**
|
|
319
|
+
* The brand's promises, shown in a row under the buy zone. By default the
|
|
320
|
+
* brand's own (dashboard Settings → Brand, in the bootstrap); this list
|
|
321
|
+
* replaces them on this page — e.g.
|
|
322
|
+
* `[{ icon: 'plane', title: 'Rask levering', text: '2-5 virkedager' }]`
|
|
323
|
+
* (attribute: the same as JSON). Up to three read well. None by default.
|
|
324
|
+
*/
|
|
325
|
+
highlights: VioDetailHighlight[];
|
|
326
|
+
/**
|
|
327
|
+
* How long delivery takes (`2-5 virkedager`), for a brand whose rates do not
|
|
328
|
+
* say it: Commerce's own text on each rate («Leveringstid 1-5 dager») wins.
|
|
329
|
+
* Shown under the rates in «Frakt & retur». None by default.
|
|
330
|
+
*/
|
|
331
|
+
deliveryTime: string;
|
|
332
|
+
/**
|
|
333
|
+
* Carrier logos for «Frakt & retur», by the carrier's name as the rate
|
|
334
|
+
* starts (`{ "Bring": "https://…/bring.svg", "Helthjem": "…" }`, any case;
|
|
335
|
+
* attribute: the same as JSON), for rates without their own logo in
|
|
336
|
+
* Commerce (which wins). A carrier with neither gets the line icon.
|
|
337
|
+
*/
|
|
338
|
+
carrierLogos: Record<string, string>;
|
|
246
339
|
private readonly slotRegistration;
|
|
247
340
|
/** What the click that opened the detail carried ('' when nothing), and for which product. */
|
|
248
341
|
private eventSlot;
|
|
@@ -260,6 +353,13 @@ declare class VioProductDetail extends LitElement {
|
|
|
260
353
|
private get activeSlot();
|
|
261
354
|
/** The page-campaign candidates of the open product: the opening card's, then this element's own and its ancestor's. */
|
|
262
355
|
private get activeCampaignHint();
|
|
356
|
+
/**
|
|
357
|
+
* The campaign whose channel sells the open product (one article = one
|
|
358
|
+
* campaign = one channel): the campaign its events credit, then the opening
|
|
359
|
+
* click's and this element's own — so the product, its rates and its
|
|
360
|
+
* seller are read with that channel's key, the one the cart is created on.
|
|
361
|
+
*/
|
|
362
|
+
private commerceCampaigns;
|
|
263
363
|
private slotAttributes;
|
|
264
364
|
/** Attribution every event of the open product carries (`Vio.attribution` of the opening card's slot, else this element's). */
|
|
265
365
|
private attribution;
|
|
@@ -272,23 +372,65 @@ declare class VioProductDetail extends LitElement {
|
|
|
272
372
|
*/
|
|
273
373
|
private sellerName;
|
|
274
374
|
private sellerSettled;
|
|
375
|
+
/**
|
|
376
|
+
* The cheapest shipping rate of the product for the page's market, in the
|
|
377
|
+
* product's currency — under the price as «Frakt fra X» («Gratis frakt» at
|
|
378
|
+
* 0). null = not known (not asked yet, none, or another currency): only the
|
|
379
|
+
* right of withdrawal is said then.
|
|
380
|
+
*/
|
|
381
|
+
private shippingFrom;
|
|
382
|
+
/** Every rate for the page's country, cheapest first — for «Frakt & retur». */
|
|
383
|
+
private shippingRates;
|
|
275
384
|
private isLoading;
|
|
276
385
|
private fetchError;
|
|
277
386
|
private selectedOptions;
|
|
387
|
+
/** The option a buy button asked for and the shopper has not chosen yet ('' = none asked). */
|
|
388
|
+
private selectionPrompt;
|
|
278
389
|
private quantity;
|
|
279
390
|
private activeImageIndex;
|
|
280
391
|
/** The thumbnail row is wider than its box (arrows shown with a mouse). */
|
|
281
392
|
private thumbsOverflow;
|
|
282
393
|
private thumbsAtStart;
|
|
283
394
|
private thumbsAtEnd;
|
|
395
|
+
/** «Beskrivelse» shows a preview until a tap opens it all. */
|
|
396
|
+
private descriptionOpen;
|
|
397
|
+
/** The description is longer than its preview (otherwise there is nothing to open). */
|
|
398
|
+
private descriptionClipped;
|
|
399
|
+
/** `gallery` resolved against the theme when the detail opens. */
|
|
400
|
+
private galleryMode;
|
|
401
|
+
/** `description-mode` resolved against the theme when the detail opens. */
|
|
402
|
+
private resolvedDescriptionMode;
|
|
284
403
|
/** The top bar's logo file is square-ish: a mark, so its name goes beside it. */
|
|
285
404
|
private logoSquare;
|
|
286
405
|
private adding;
|
|
406
|
+
/**
|
|
407
|
+
* «Lagt i handlekurven» after an add, with «Til kassen» and «Fortsett å
|
|
408
|
+
* handle» (Mote & Livsstil, 2026-10-28: an add closed the detail and said
|
|
409
|
+
* nothing). Outlives the detail: the brand and attribution of the add.
|
|
410
|
+
*/
|
|
411
|
+
private addedToast;
|
|
412
|
+
private addedToastTimer;
|
|
287
413
|
/** Apple Pay actually usable (real Stripe + registered domain) — set on load. */
|
|
288
414
|
private applePayOk;
|
|
289
415
|
/** Payment method names enabled for the sponsor (backend-configured).
|
|
290
416
|
* null = not loaded yet → all buy buttons render; [] = none enabled. */
|
|
291
417
|
private availableMethods;
|
|
418
|
+
/**
|
|
419
|
+
* The brand's methods are being asked for. Meanwhile the buy zone shows a
|
|
420
|
+
* neutral placeholder, never the buttons of every method: «null = render
|
|
421
|
+
* all» painted Stripe and Klarna for a Vipps-only brand until the answer
|
|
422
|
+
* came (Mote & Livsstil, 2026-10-28).
|
|
423
|
+
*/
|
|
424
|
+
private methodsLoading;
|
|
425
|
+
/**
|
|
426
|
+
* The brand's Vipps is KNOWN to run Express: its method list came back,
|
|
427
|
+
* with Vipps and no `config.express: false`. Only then does the line under
|
|
428
|
+
* the button say the app fills in name and address — never on a guess
|
|
429
|
+
* after a failed lookup.
|
|
430
|
+
*/
|
|
431
|
+
private vippsExpress;
|
|
432
|
+
/** Whose methods `availableMethods` are — another brand's are not shown while its own load. */
|
|
433
|
+
private methodsSponsorId;
|
|
292
434
|
private vippsOfficial;
|
|
293
435
|
/** Race guard: only the latest fetch may write state (two quick taps on
|
|
294
436
|
* different cards would otherwise let the slow response win). */
|
|
@@ -310,6 +452,19 @@ declare class VioProductDetail extends LitElement {
|
|
|
310
452
|
connectedCallback(): void;
|
|
311
453
|
disconnectedCallback(): void;
|
|
312
454
|
updated(changed: Map<string, unknown>): void;
|
|
455
|
+
willUpdate(changed: Map<string, unknown>): void;
|
|
456
|
+
/** An option as the element says it, else as the theme's custom property says it (lower case, unquoted). */
|
|
457
|
+
private themeChoice;
|
|
458
|
+
/** The attribute wins; else the theme's `--vio-detail-gallery`; else thumbnails. */
|
|
459
|
+
private resolveGalleryMode;
|
|
460
|
+
private carouselTrack;
|
|
461
|
+
/** The photo in view is the active one (dots, Apple Pay sheet, events). */
|
|
462
|
+
private onCarouselScroll;
|
|
463
|
+
/** One photo's width plus the gap (with a peek a photo is narrower than the row). */
|
|
464
|
+
private carouselStep;
|
|
465
|
+
/** Bring the active photo into view — only when it is not already the one a swipe is on. */
|
|
466
|
+
private revealActiveSlide;
|
|
467
|
+
private stepCarousel;
|
|
313
468
|
private thumbRow;
|
|
314
469
|
/** Arrows only when the row overflows; each one off at its own end. */
|
|
315
470
|
private measureThumbs;
|
|
@@ -323,6 +478,8 @@ declare class VioProductDetail extends LitElement {
|
|
|
323
478
|
private fetchProduct;
|
|
324
479
|
/** Which buy buttons to render — backend-configured per sponsor. */
|
|
325
480
|
private loadAvailablePaymentMethods;
|
|
481
|
+
/** The methods are still on their way: a placeholder stands where the buttons go. */
|
|
482
|
+
private get methodsPending();
|
|
326
483
|
/** Backend names arrive as e.g. "Apple Pay" — compare letters only. */
|
|
327
484
|
private methodEnabled;
|
|
328
485
|
/**
|
|
@@ -353,18 +510,55 @@ declare class VioProductDetail extends LitElement {
|
|
|
353
510
|
/** True if some in-stock variant carries this option value. */
|
|
354
511
|
private isValueAvailable;
|
|
355
512
|
private get unitPrice();
|
|
513
|
+
/**
|
|
514
|
+
* There is something to pay for — whether the express buttons show. With
|
|
515
|
+
* every option chosen, the chosen variant's price; before that, the
|
|
516
|
+
* product's or any variant's: the first variant (what `unitPrice` falls
|
|
517
|
+
* back to) at 0 must not hide Vipps for a size that costs 699.
|
|
518
|
+
*/
|
|
519
|
+
private get hasPrice();
|
|
356
520
|
private get compareAt();
|
|
521
|
+
/** The options the shopper has to choose (those with values), in order. */
|
|
522
|
+
private choosableOptions;
|
|
523
|
+
/** The first option still without a value, or null when every one is chosen. */
|
|
524
|
+
private missingOption;
|
|
525
|
+
/**
|
|
526
|
+
* Units that can be sold. With every option chosen, the chosen variant's;
|
|
527
|
+
* before that, the most any variant still matching the partial choice has
|
|
528
|
+
* — so the stepper and «Utsolgt» do not speak for a variant (the first
|
|
529
|
+
* one) the shopper never picked.
|
|
530
|
+
*/
|
|
357
531
|
private get availableQuantity();
|
|
532
|
+
/**
|
|
533
|
+
* «Få igjen — N stk» only for the variant actually chosen: before a size is
|
|
534
|
+
* picked the count belonged to the first variant, which said «Få igjen» of
|
|
535
|
+
* a product with plenty of other sizes.
|
|
536
|
+
*/
|
|
358
537
|
private stockLabel;
|
|
538
|
+
/** «Velg størrelse» for a size, «Velg farge» for a colour… */
|
|
539
|
+
private promptFor;
|
|
540
|
+
/**
|
|
541
|
+
* Every buy button goes through here first: with an option not chosen yet,
|
|
542
|
+
* nothing is added or paid — the picker says what is missing and comes
|
|
543
|
+
* into view (it sits right above the buttons, inside the buy zone).
|
|
544
|
+
*/
|
|
545
|
+
private requireSelection;
|
|
359
546
|
/** Pick an option value. If the exact combination doesn't exist, jump to an
|
|
360
547
|
* in-stock variant that carries the value and adopt its full option map
|
|
361
548
|
* (keeps the selection always resolvable to a real variant). */
|
|
362
549
|
private selectOption;
|
|
550
|
+
private applyOption;
|
|
363
551
|
private allImages;
|
|
364
552
|
private get activeImage();
|
|
365
553
|
/** Add the current product + selected variant + qty to the cart. Returns the variant id used. */
|
|
366
554
|
private addCurrentToCart;
|
|
367
555
|
private addToCart;
|
|
556
|
+
/** The toast after an add; it goes by itself after a while. */
|
|
557
|
+
private showAddedToast;
|
|
558
|
+
private hideAddedToast;
|
|
559
|
+
/** «Til kassen»: the checkout of the brand just added to — the host opens it on `vio:checkout-open`, as from the cart. */
|
|
560
|
+
private toastToCheckout;
|
|
561
|
+
private renderAddedToast;
|
|
368
562
|
/**
|
|
369
563
|
* Express buy: add to cart, then open the checkout overlay with Klarna
|
|
370
564
|
* preselected. The host app handles `vio:checkout-open` (same event the cart
|
|
@@ -397,6 +591,12 @@ declare class VioProductDetail extends LitElement {
|
|
|
397
591
|
/** Vipps' own button when its script answers; our orange one otherwise. */
|
|
398
592
|
private loadVippsButton;
|
|
399
593
|
private buyWithVipps;
|
|
594
|
+
/**
|
|
595
|
+
* The Vipps button will open the app with Express (see buyWithVipps): the
|
|
596
|
+
* brand has Express on, and this brand's cart is empty — with lines in it
|
|
597
|
+
* the checkout opens first.
|
|
598
|
+
*/
|
|
599
|
+
private vippsGoesStraightToApp;
|
|
400
600
|
private startVippsExpressOrCheckout;
|
|
401
601
|
/** The ordinary way in, Vipps preselected: the host opens the checkout on `vio:checkout-open`. */
|
|
402
602
|
private openCheckoutWithVipps;
|
|
@@ -423,6 +623,35 @@ declare class VioProductDetail extends LitElement {
|
|
|
423
623
|
* that total.
|
|
424
624
|
*/
|
|
425
625
|
private buyWithApplePay;
|
|
626
|
+
/**
|
|
627
|
+
* The product's cheapest rate for the page's market — the rates the
|
|
628
|
+
* backend cart offers for its line. A rate in another currency than the
|
|
629
|
+
* product's price is not shown (never a price the shopper would not pay).
|
|
630
|
+
*/
|
|
631
|
+
private loadShippingFrom;
|
|
632
|
+
/**
|
|
633
|
+
* `gallery="carousel"`: every photo in one row that snaps one at a time —
|
|
634
|
+
* swipe on touch, arrows with a mouse — and a dot per photo over it
|
|
635
|
+
* instead of thumbnails, so the name, price and sizes come up higher.
|
|
636
|
+
*/
|
|
637
|
+
private renderCarousel;
|
|
638
|
+
/**
|
|
639
|
+
* «Beskrivelse», not shut: the first lines show, fading out, and a tap on
|
|
640
|
+
* the heading, the text or «Les mer» opens the rest (Angelo, 2026-10-28).
|
|
641
|
+
* A description that fits in the preview has nothing to open.
|
|
642
|
+
*/
|
|
643
|
+
private renderDescription;
|
|
644
|
+
/** Is the preview hiding part of the text? Measured with the preview applied. */
|
|
645
|
+
private measureDescription;
|
|
646
|
+
private renderHighlights;
|
|
647
|
+
/**
|
|
648
|
+
* «Frakt & retur», folded like «Beskrivelse»: the delivery options for the
|
|
649
|
+
* page's country with their price, and the right of withdrawal with the
|
|
650
|
+
* brand's own terms and returns pages when it gave them.
|
|
651
|
+
*/
|
|
652
|
+
private renderShippingReturns;
|
|
653
|
+
/** Under the price: «Frakt fra X · 14 dagers angrerett» (or «Gratis frakt · …»). */
|
|
654
|
+
private renderDeliveryNote;
|
|
426
655
|
/** The seller's Company name; the brand when there is none; nothing while asking. */
|
|
427
656
|
private headerName;
|
|
428
657
|
private loadSeller;
|
|
@@ -468,6 +697,8 @@ declare class VioCart extends LitElement {
|
|
|
468
697
|
/** Payment method names enabled for the sponsor (backend-configured).
|
|
469
698
|
* null = not loaded yet → all buttons render; [] = none enabled. */
|
|
470
699
|
private availableMethods;
|
|
700
|
+
/** Asking for the brand's methods: a neutral placeholder instead of every method's button (see methodEnabled). */
|
|
701
|
+
private methodsLoading;
|
|
471
702
|
private vippsOfficial;
|
|
472
703
|
/** Whether the method lookup has been attempted — see boundOnCartChange. */
|
|
473
704
|
private paymentMethodsAttempted;
|
|
@@ -493,7 +724,13 @@ declare class VioCart extends LitElement {
|
|
|
493
724
|
/** Which payment buttons to render — backend-configured per sponsor.
|
|
494
725
|
* Falls back to showing everything if the query fails or none is set. */
|
|
495
726
|
private loadAvailablePaymentMethods;
|
|
496
|
-
/**
|
|
727
|
+
/** The methods are on their way and none is known yet. */
|
|
728
|
+
private get methodsPending();
|
|
729
|
+
/**
|
|
730
|
+
* Backend names arrive as e.g. "Apple Pay" — compare letters only. While
|
|
731
|
+
* the list loads, no method's button is drawn: «unknown = all» painted
|
|
732
|
+
* Stripe and Klarna for a Vipps-only brand until it came.
|
|
733
|
+
*/
|
|
497
734
|
private methodEnabled;
|
|
498
735
|
updated(changed: Map<string, unknown>): void;
|
|
499
736
|
/** Pre-resolve the Apple Pay sheet for the current cart total. */
|
|
@@ -518,25 +755,36 @@ declare class VioCart extends LitElement {
|
|
|
518
755
|
*/
|
|
519
756
|
private onCheckout;
|
|
520
757
|
/**
|
|
521
|
-
* Vipps
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
*
|
|
758
|
+
* Vipps from the cart: the checkout opens with Vipps preselected — the
|
|
759
|
+
* standard path, where our form collects name, address, mobile and the
|
|
760
|
+
* delivery (with its price) before paying (Mote & Livsstil, 2026-10-28).
|
|
761
|
+
* It no longer starts Express from here: Express is the product detail's
|
|
762
|
+
* «Kjøp nå med Vipps» only.
|
|
525
763
|
*/
|
|
526
764
|
private onVipps;
|
|
527
765
|
/** Vipps' own button when its script answers; our orange one otherwise. */
|
|
528
766
|
private loadVippsButton;
|
|
529
|
-
private startVippsExpressOrCheckout;
|
|
530
767
|
/** Stripe — opens the checkout with Stripe preselected. */
|
|
531
768
|
private onStripe;
|
|
532
769
|
/** The name over a sponsor's lines: the brand's display name by the one rule, else what the cart kept. */
|
|
533
770
|
private sponsorLabel;
|
|
771
|
+
/** Something to pay for: lines, and a total above 0. No button opens a checkout or a payment otherwise. */
|
|
772
|
+
private get payable();
|
|
534
773
|
private get totalAcrossSponsors();
|
|
774
|
+
/**
|
|
775
|
+
* Shipping across the carts, from what the server cart says of its lines:
|
|
776
|
+
* the rate chosen for them, else the cheapest one offered (the one the
|
|
777
|
+
* checkout preselects). null when some cart has no known rate — the footer
|
|
778
|
+
* says it is worked out in the checkout then.
|
|
779
|
+
*/
|
|
780
|
+
private get shippingAcrossSponsors();
|
|
535
781
|
private get primaryCurrency();
|
|
536
782
|
private onIncrement;
|
|
537
783
|
private onDecrement;
|
|
538
784
|
private onRemove;
|
|
539
785
|
render(): lit_html.TemplateResult<1>;
|
|
786
|
+
/** «Frakt» (the chosen or cheapest rate) and «Totalt» with it; «Beregnes i kassen» when unknown. */
|
|
787
|
+
private renderShippingRows;
|
|
540
788
|
private renderConfirmation;
|
|
541
789
|
}
|
|
542
790
|
declare global {
|
|
@@ -549,12 +797,6 @@ declare class VioCheckout extends LitElement {
|
|
|
549
797
|
open: boolean;
|
|
550
798
|
heading: string;
|
|
551
799
|
shippingLabel: string;
|
|
552
|
-
/**
|
|
553
|
-
* Vipps Express: the shopper picks the delivery inside Vipps, so with Vipps
|
|
554
|
-
* selected our own shipping rate is not part of the total and the summary
|
|
555
|
-
* says the shipping is chosen in Vipps (Angelo, 2026-10-24).
|
|
556
|
-
*/
|
|
557
|
-
private vippsShipsInApp;
|
|
558
800
|
/** Express mode — render only the Klarna widget (no address form / method grid). */
|
|
559
801
|
express: boolean;
|
|
560
802
|
private checkoutState;
|
|
@@ -810,7 +1052,20 @@ declare class VioCheckout extends LitElement {
|
|
|
810
1052
|
* shopcart refuses the physical case on its side.
|
|
811
1053
|
*/
|
|
812
1054
|
private someLineShipsOnItsOwn;
|
|
813
|
-
/**
|
|
1055
|
+
/** The shipping country the mobile's calling code defaults to (no +prefix typed). */
|
|
1056
|
+
private get phoneCountry();
|
|
1057
|
+
/**
|
|
1058
|
+
* The mobile is required only for the standard Vipps payment — shopcart
|
|
1059
|
+
* does not ask Vipps for the profile there. Every other method takes it
|
|
1060
|
+
* when given and never waits for it (a host that pre-fills the form with
|
|
1061
|
+
* `setAddress()` and no phone keeps working).
|
|
1062
|
+
*/
|
|
1063
|
+
private get phoneRequired();
|
|
1064
|
+
/** A number typed that is not usable (nothing said while the field is empty). */
|
|
1065
|
+
private get phoneError();
|
|
1066
|
+
/** The mobile as the chosen method needs it: valid when required, else anything. */
|
|
1067
|
+
private get phoneReady();
|
|
1068
|
+
/** Whether all mandatory Leveringsadresse fields are filled (the mobile only for Vipps). */
|
|
814
1069
|
private get isAddressValid();
|
|
815
1070
|
/** Whether a valid shipping option is selected (when shippings exist). */
|
|
816
1071
|
private get hasSelectedShipping();
|
|
@@ -865,14 +1120,21 @@ declare class VioCheckout extends LitElement {
|
|
|
865
1120
|
/** After choosing a method that needs our form, bring the form into view. */
|
|
866
1121
|
private revealAddressForm;
|
|
867
1122
|
/**
|
|
868
|
-
* Vipps from the checkout:
|
|
869
|
-
*
|
|
870
|
-
*
|
|
871
|
-
*
|
|
872
|
-
*
|
|
873
|
-
*
|
|
1123
|
+
* Vipps from the checkout: the STANDARD payment, always (Mote & Livsstil,
|
|
1124
|
+
* 2026-10-28). The shopper filled our form — name, address, mobile — and
|
|
1125
|
+
* chose the delivery with its price here; the payment carries that address
|
|
1126
|
+
* and the rate on the cart, and Vipps only approves and pays. Express (the
|
|
1127
|
+
* app filling in name and address) is the product detail's «Kjøp nå med
|
|
1128
|
+
* Vipps» alone, even when the brand has Express on.
|
|
874
1129
|
*/
|
|
875
1130
|
private startVippsFromCheckout;
|
|
1131
|
+
/**
|
|
1132
|
+
* The chosen delivery on the cart before a hosted payment is minted (its
|
|
1133
|
+
* total depends on it). False — and the payment must not start — when it
|
|
1134
|
+
* could not be saved: the selected rate has no supplier to save it under,
|
|
1135
|
+
* or the backend refused. A cart with no rates at all has nothing to save.
|
|
1136
|
+
*/
|
|
1137
|
+
private persistSelectedShipping;
|
|
876
1138
|
private onApplePay;
|
|
877
1139
|
private onPay;
|
|
878
1140
|
/**
|
|
@@ -939,13 +1201,17 @@ declare class VioCheckout extends LitElement {
|
|
|
939
1201
|
private methodLabel;
|
|
940
1202
|
/** True for methods that complete via a separate sheet/widget, not the CTA. */
|
|
941
1203
|
private isExpressMethod;
|
|
1204
|
+
/**
|
|
1205
|
+
* A total above 0 — every pay button needs it. The state's subtotal follows
|
|
1206
|
+
* the cart (CheckoutManager.onCartChange): a cart emptied or paid in
|
|
1207
|
+
* another tab drops it to 0 here.
|
|
1208
|
+
*/
|
|
1209
|
+
private get cartPayable();
|
|
942
1210
|
private orderTotal;
|
|
943
1211
|
/** Shipping cost (major units) whenever a shipping option is in effect —
|
|
944
1212
|
* express always has one; the normal flow has one once the backend
|
|
945
1213
|
* shippings loaded (the choice IS persisted on the cart and charged). */
|
|
946
1214
|
private shippingMajor;
|
|
947
|
-
/** Vipps is the method and it runs as Express: the delivery is chosen in Vipps. */
|
|
948
|
-
private vippsChoosesShipping;
|
|
949
1215
|
/** The rate the summary names — Qliro's own pick while Qliro is the method. */
|
|
950
1216
|
private summaryShippingName;
|
|
951
1217
|
/** Total to charge — items + shipping (express). */
|
|
@@ -1317,6 +1583,20 @@ interface VioThemeOverrides {
|
|
|
1317
1583
|
detailImageInset?: string;
|
|
1318
1584
|
/** Background behind the main image (default the muted surface). */
|
|
1319
1585
|
detailImageBg?: string;
|
|
1586
|
+
/** `thumbs` (default: one image, thumbnails under it) or `carousel` (every image in one swipeable row with a dot per photo, no thumbnails — less height). An element's `gallery` attribute wins over it. */
|
|
1587
|
+
detailGallery?: string;
|
|
1588
|
+
/** In the carousel, how much of the next photo shows at the edge (default `0px`), e.g. `32px`. */
|
|
1589
|
+
detailCarouselPeek?: string;
|
|
1590
|
+
/** «Beskrivelse»: `preview` (default — first lines + «Les mer»), `folded` (heading only until a tap) or `open`. An element's `description-mode` wins. */
|
|
1591
|
+
detailDescriptionMode?: string;
|
|
1592
|
+
/** Lines the «Beskrivelse» preview shows (default `3`). */
|
|
1593
|
+
detailDescriptionPreviewLines?: string;
|
|
1594
|
+
/** The brand's promises under the buy zone: `grid` (default, shown when the brand has some) or `none` (hidden). */
|
|
1595
|
+
detailHighlightsDisplay?: string;
|
|
1596
|
+
/** «Frakt & retur» in the detail: `block` (default) or `none` (hidden). */
|
|
1597
|
+
detailShippingReturnsDisplay?: string;
|
|
1598
|
+
/** `<vio-product-carousel>`: `carousel` (default, one row) or `list` (cards one under the other). Its `layout` attribute wins. */
|
|
1599
|
+
carouselLayout?: string;
|
|
1320
1600
|
/** Thumbnail size (default `64px`). One row, scrolls sideways. */
|
|
1321
1601
|
detailThumbSize?: string;
|
|
1322
1602
|
/** Space between thumbnails (default `8px`). */
|
|
@@ -1341,6 +1621,30 @@ interface VioThemeOverrides {
|
|
|
1341
1621
|
detailBuyPosition?: string;
|
|
1342
1622
|
/** Shadow over a sticky buy zone, e.g. `0 -8px 16px rgba(0,0,0,.06)`. */
|
|
1343
1623
|
detailBuyShadow?: string;
|
|
1624
|
+
/** Font of the card (default the SDK's sans). */
|
|
1625
|
+
cardFont?: string;
|
|
1626
|
+
/** Frame around the card, e.g. `1px solid rgba(230,230,230,.6)` (default none). */
|
|
1627
|
+
cardBorder?: string;
|
|
1628
|
+
/** Image box proportion (default `1 / 1`), e.g. `3 / 4`. */
|
|
1629
|
+
cardImageAspect?: string;
|
|
1630
|
+
/** `cover` (default, fills and crops) or `contain` (whole image). */
|
|
1631
|
+
cardImageFit?: string;
|
|
1632
|
+
/** Background behind the card image (default the muted surface). */
|
|
1633
|
+
cardImageBg?: string;
|
|
1634
|
+
/** Space around the image inside its box (default `0`). */
|
|
1635
|
+
cardImagePadding?: string;
|
|
1636
|
+
/** Padding of the text under the image (default `14px 0 0`), e.g. `16px` in a framed card. */
|
|
1637
|
+
cardMetaPadding?: string;
|
|
1638
|
+
/** Font of the price (default the card's), e.g. a serif. */
|
|
1639
|
+
cardPriceFont?: string;
|
|
1640
|
+
/** Colour of the `bar` buy button (default the text colour). */
|
|
1641
|
+
cardAccent?: string;
|
|
1642
|
+
/** Corners of the `bar` buy button (default `6px`). */
|
|
1643
|
+
cardBarRadius?: string;
|
|
1644
|
+
/** Lines of the description a card shows (default `4`). */
|
|
1645
|
+
cardDescriptionLines?: string;
|
|
1646
|
+
/** `-1` lifts the seller line above the name (where a brand line goes); default `0` (at the bottom). */
|
|
1647
|
+
cardRetailerOrder?: string;
|
|
1344
1648
|
/** Cart drawer width on desktop (default `440px`). */
|
|
1345
1649
|
cartWidth?: string;
|
|
1346
1650
|
/** Checkout panel width on desktop (default `440px`). */
|
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-B7GVA_qB.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-T5B74YBQ.js';
|
|
2
|
+
export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-T5B74YBQ.js';
|
|
3
|
+
import '../chunk-ZORYG4W3.js';
|
|
4
4
|
|
|
5
5
|
// src/ui/index.ts
|
|
6
6
|
registerVioElements();
|
package/package.json
CHANGED
package/dist/chunk-67QESEV2.js
DELETED