@vectoriox/iox-ui 5.96.2 → 5.97.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.
@@ -1,6 +1,6 @@
1
1
  import { readOwnedTrait, writeOwnedTrait, ROW_INDEX_ATTRIBUTE, elementStyleById, switchElementStyle, LinkType, setColorScheme, COLOR_SCHEME_TRAIT, repeatedRowIndex, roleClass as roleClass$1, headerBehaviourOf, HeaderTrait, headerEdgeOf, headerStaysAtTop } from '@vectoriox/iox-ui/design-core';
2
2
  export { ROW_INDEX_ATTRIBUTE } from '@vectoriox/iox-ui/design-core';
3
- import { shopWord, ShopWord, emptyCartView, QuantityStep, stepQuantity, ShopSlot, productOptions, productVariants, defaultChoice, findVariant, quantityBounds, chooseValue, clampQuantity, variantWords, optionValueStates, canStep, cartIssueWords, formatMoney, CartTransportError, CartTransportErrorCode, CART_TRANSPORT_ERROR_LABELS } from '@vectoriox/iox-ui/commerce-core';
3
+ import { shopWord, ShopWord, emptyCartView, QuantityStep, stepQuantity, ShopSlot, productOptions, productVariants, defaultChoice, findVariant, quantityBounds, chooseValue, clampQuantity, variantSlotOf, optionValueStates, canStep, cartIssueWords, formatMoney, CartTransportError, CartTransportErrorCode, CART_TRANSPORT_ERROR_LABELS } from '@vectoriox/iox-ui/commerce-core';
4
4
 
5
5
  /** What a recipe asks its consumer to create: a NEW node of `type`, the way that consumer creates one
6
6
  * (the builder's `createConfig`, generation-core's `createSerializedNode`), with these props and this
@@ -5430,13 +5430,7 @@ class ShopRuntime {
5430
5430
  this.stamp();
5431
5431
  }
5432
5432
  publishVariant(state) {
5433
- const variant = this.variantOf(state);
5434
- this.publish(ShopSlot.Variant, variant ? {
5435
- ...variant,
5436
- productId: state.product._id,
5437
- words: variantWords(variant.choice, state.options),
5438
- quantity: state.quantity,
5439
- } : null);
5433
+ this.publish(ShopSlot.Variant, variantSlotOf(state.product, state.choice, state.quantity));
5440
5434
  }
5441
5435
  publish(slot, value) {
5442
5436
  const json = JSON.stringify(value ?? null);