@vio-live/web-sdk 0.35.0 → 0.36.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 +15 -0
- package/README.md +2 -0
- package/dist/{chunk-QA5R4VYF.js → chunk-6PQFXUOW.js} +19 -4
- package/dist/chunk-6PQFXUOW.js.map +1 -0
- package/dist/{chunk-F7LE5AZY.js → chunk-DEREQRCM.js} +119 -69
- package/dist/chunk-DEREQRCM.js.map +1 -0
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +3 -3
- package/dist/{tokens-C-LsqKQH.d.ts → tokens-BGzSC3vK.d.ts} +17 -2
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-F7LE5AZY.js.map +0 -1
- package/dist/chunk-QA5R4VYF.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,21 @@ How to keep this file: see [CONTRIBUTING → Changelog](CONTRIBUTING.md#changelo
|
|
|
14
14
|
The details of each feature live in the [README](README.md); this file says *what*
|
|
15
15
|
and *when*, and links there.
|
|
16
16
|
|
|
17
|
+
## 0.36.0 — 2026-10-29
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- **The cart says where shipping is chosen.** Under «Frakt» / «Totalt» a note: «Frakt velger du i Vipps eller i
|
|
21
|
+
neste steg.» (`part="cart-shipping-hint"`). While no rate is chosen and the brand offers several, the shipping and
|
|
22
|
+
the total read «fra …» (the cheapest).
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **The heading of the description fold is configurable**: `Vio.configureDetail({ descriptionLabel: 'Produktbeskrivelse' })`
|
|
26
|
+
for the page, or `description-label` on `<vio-product-detail>` (wins). Default «Beskrivelse». Feedback from Aller
|
|
27
|
+
(29/10): a folded «Produktbeskrivelse» right under the price — with the section order
|
|
28
|
+
`[..., 'price', 'description', 'options', 'purchase', ...]` and `detailDescriptionMode: 'folded'`.
|
|
29
|
+
- **The brand's promises in the cart** too, under the ways to pay (same strip as the product detail, from the
|
|
30
|
+
sponsor block's `highlights`). Hide them with `applyVioTheme({ cartHighlightsDisplay: 'none' })`.
|
|
31
|
+
|
|
17
32
|
## 0.35.0 — 2026-10-29
|
|
18
33
|
|
|
19
34
|
> 0.34.0 was never published on its own: its changes (section order of the product detail and layout tracking,
|
package/README.md
CHANGED
|
@@ -760,11 +760,13 @@ whole page through `applyVioTheme` (theme key → custom property). The element
|
|
|
760
760
|
|---|---|---|---|
|
|
761
761
|
| `gallery` | `detailGallery` | `thumbs` (default) · `carousel` | `carousel`: every photo in one swipeable row with a dot per photo, no thumbnails — less height. `detailCarouselPeek` (`--vio-detail-carousel-peek`) shows the edge of the next one |
|
|
762
762
|
| `description-mode` | `detailDescriptionMode` | `preview` (default) · `folded` · `open` | «Beskrivelse»: the first lines fading out + «Les mer» (`detailDescriptionPreviewLines`, `3`); only the heading until a tap; or all of it |
|
|
763
|
+
| `description-label` | — (`Vio.configureDetail({ descriptionLabel })`) | text, default `Beskrivelse` | Heading of the description fold, e.g. `Produktbeskrivelse` |
|
|
763
764
|
| `highlights` | — | `[{ icon, title, text }]` (JSON) | The brand's promises under the buy zone. By default the brand's own (dashboard Settings → Brand, sponsor block `highlights`); this list replaces them on the page. Icons: `plane heart shirt truck return leaf star shield mailbox home pin clock`, or an image URL. `detailHighlightsDisplay: 'none'` hides the strip |
|
|
764
765
|
| `delivery-time` | — | text, e.g. `2-5 virkedager` | «Leveringstid …» in «Frakt & retur» for a brand whose rates do not say it (each rate's own text in Commerce — «Leveringstid 1-5 dager» — wins) |
|
|
765
766
|
| `carrier-logos` | — | `{ "Bring": "https://…" }` (JSON) | Carrier logos by the name the rate starts with («Bring - Pakke i postkasse»), for rates without their own logo in Commerce (`logo_url`, which wins); otherwise a line icon by the kind of delivery |
|
|
766
767
|
| `vipps-cart-payment` | `vippsCartPayment` | `express` (default) · `checkout` | «Kjøp nå med Vipps» when the brand's cart already has lines: the product is added and the **whole cart** goes to Vipps Express, the line under the button saying «Betaler hele handlekurven · n varer · total»; or (`checkout`) the checkout opens first, Vipps preselected. Also on `<vio-cart>` (its Vipps button) |
|
|
767
768
|
| — | `detailShippingReturnsDisplay` | `block` (default) · `none` | «Frakt & retur»: one row per carrier (logo or icon, carrier, how it delivers, price), the delivery time, the right of withdrawal and the brand's pages |
|
|
769
|
+
| — | `cartHighlightsDisplay` | `grid` (default) · `none` | The brand's promises in the cart, under the ways to pay |
|
|
768
770
|
|
|
769
771
|
The sheet closes with a pull down from its top bar, or from anywhere while its content is at the top.
|
|
770
772
|
|
|
@@ -1181,6 +1181,20 @@ function setGlobalDetailLayout(layout) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
|
+
function currentGlobalDescriptionLabel() {
|
|
1185
|
+
return store().descriptionLabel ?? null;
|
|
1186
|
+
}
|
|
1187
|
+
function setGlobalDescriptionLabel(label) {
|
|
1188
|
+
const s = store();
|
|
1189
|
+
const text3 = typeof label === "string" ? label.trim() : "";
|
|
1190
|
+
s.descriptionLabel = text3 && text3.length <= 40 ? text3 : null;
|
|
1191
|
+
for (const listener of [...s.listeners]) {
|
|
1192
|
+
try {
|
|
1193
|
+
listener();
|
|
1194
|
+
} catch {
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1184
1198
|
function onGlobalDetailLayoutChange(listener) {
|
|
1185
1199
|
const s = store();
|
|
1186
1200
|
s.listeners.add(listener);
|
|
@@ -3955,7 +3969,7 @@ async function prepareApplePay(config) {
|
|
|
3955
3969
|
}
|
|
3956
3970
|
|
|
3957
3971
|
// src/core/version.ts
|
|
3958
|
-
var SDK_VERSION = "0.
|
|
3972
|
+
var SDK_VERSION = "0.36.0";
|
|
3959
3973
|
|
|
3960
3974
|
// src/core/checkout/payments/stripe-embedded.ts
|
|
3961
3975
|
var CREATE_PAYMENT_INTENT_STRIPE_MUTATION = `
|
|
@@ -9326,6 +9340,7 @@ var VioFacade = class {
|
|
|
9326
9340
|
*/
|
|
9327
9341
|
configureDetail(options = {}) {
|
|
9328
9342
|
if (options && typeof options === "object" && "layout" in options) setGlobalDetailLayout(options.layout ?? null);
|
|
9343
|
+
if (options && typeof options === "object" && "descriptionLabel" in options) setGlobalDescriptionLabel(options.descriptionLabel ?? null);
|
|
9329
9344
|
}
|
|
9330
9345
|
/**
|
|
9331
9346
|
* The layout a `<vio-product-detail>` without its own `layout` applies now:
|
|
@@ -10217,6 +10232,6 @@ function vippsButtonAttributes(verb = "buy", opts = {}) {
|
|
|
10217
10232
|
};
|
|
10218
10233
|
}
|
|
10219
10234
|
|
|
10220
|
-
export { ADD_ITEM_MUTATION, ADYEN_RETURN_METHOD, ADYEN_RETURN_QUERY_KEYS, AdyenOriginError, 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, DETAIL_SECTION_IDS, ESSENTIAL_DETAIL_SECTIONS, 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, KUSTOM_RETURN_QUERY_KEYS, 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, __decorateClass, activeCampaignEntry, addItem, adyenReturnOutcome, adyenReturnParams, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, checkoutSponsorOf, componentKindOf, copyAppliedLayout, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, defaultDetailLayout, deleteItem, displayPrice, dominantCampaignOf, effectiveDetailSections, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, gatewayHasBuyerRef, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCountryCode, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, isValidPhone, kustomReturnOutcome, landingUrl, layoutOriginOf, layoutSignature, lineOriginWire, lineOrigins, nexiReturnPaymentId, normalizeBuyerRef, normalizeDetailLayout, normalizeOrigin, normalizeScope, normalizeSlotId, normalizeSlotKind, onGlobalDetailLayoutChange, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, readInternal, readNexiPending, rememberedCheckoutSponsor, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveDetailLayout, resolveInternal, resolveLanding, resolveSlotCampaign, sameOrigin, shippingDescriptionOf, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storageGet, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature, writeInternal };
|
|
10221
|
-
//# sourceMappingURL=chunk-
|
|
10222
|
-
//# sourceMappingURL=chunk-
|
|
10235
|
+
export { ADD_ITEM_MUTATION, ADYEN_RETURN_METHOD, ADYEN_RETURN_QUERY_KEYS, AdyenOriginError, 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, DETAIL_SECTION_IDS, ESSENTIAL_DETAIL_SECTIONS, 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, KUSTOM_RETURN_QUERY_KEYS, 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, __decorateClass, activeCampaignEntry, addItem, adyenReturnOutcome, adyenReturnParams, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, checkoutSponsorOf, componentKindOf, copyAppliedLayout, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, currentGlobalDescriptionLabel, defaultDetailLayout, deleteItem, displayPrice, dominantCampaignOf, effectiveDetailSections, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, gatewayHasBuyerRef, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCountryCode, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, isValidPhone, kustomReturnOutcome, landingUrl, layoutOriginOf, layoutSignature, lineOriginWire, lineOrigins, nexiReturnPaymentId, normalizeBuyerRef, normalizeDetailLayout, normalizeOrigin, normalizeScope, normalizeSlotId, normalizeSlotKind, onGlobalDetailLayoutChange, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, readInternal, readNexiPending, rememberedCheckoutSponsor, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveDetailLayout, resolveInternal, resolveLanding, resolveSlotCampaign, sameOrigin, shippingDescriptionOf, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storageGet, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature, writeInternal };
|
|
10236
|
+
//# sourceMappingURL=chunk-6PQFXUOW.js.map
|
|
10237
|
+
//# sourceMappingURL=chunk-6PQFXUOW.js.map
|