@vectoriox/iox-ui 5.94.0 → 5.95.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/actions-core/index.d.ts +7 -2
- package/commerce-core/index.d.ts +312 -2
- package/composite-core/index.d.ts +290 -2
- package/design-core/index.d.ts +1049 -105
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +15 -4
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-commerce-core.mjs +527 -6
- package/fesm2022/vectoriox-iox-ui-commerce-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +1170 -177
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +1147 -43
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +2 -2
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui.mjs +8 -1
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/generation-core/index.d.ts +2 -2
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/actions-core/action.model.ts +1 -1
- package/src/actions-core/element-actions.ts +17 -3
- package/src/commerce-core/cart-transport.ts +211 -0
- package/src/commerce-core/public-api.ts +4 -0
- package/src/commerce-core/quantity.ts +56 -0
- package/src/commerce-core/shop-display.ts +117 -0
- package/src/commerce-core/variants.ts +296 -0
- package/src/composite-core/exclusive-runtime.ts +20 -7
- package/src/composite-core/public-api.ts +2 -0
- package/src/composite-core/shop-runtime.ts +626 -0
- package/src/composite-core/shop.ts +433 -0
- package/src/design-core/flavor-spec.generated.ts +1147 -43
- package/src/generation-core/site-spec.generated.ts +2 -2
- package/styles/iox-design.css +95 -0
|
@@ -17,6 +17,7 @@ import { runExitMotion, isExiting, popoverOpenersSelector, OpenerAttribute, canc
|
|
|
17
17
|
export { SCROLL_PROGRESS_TRIGGER } from '@vectoriox/iox-ui/actions-core';
|
|
18
18
|
import { VideoKind, planVideo, videoRootAttributes, videoInnerHtml, videoWords, VideoAttribute, attachVideoAt, VideoClass } from '@vectoriox/iox-ui/media-core';
|
|
19
19
|
import * as i1$1 from '@angular/platform-browser';
|
|
20
|
+
import { formatMoneyValue, CURRENCY_CODES, SHOP_SLOTS } from '@vectoriox/iox-ui/commerce-core';
|
|
20
21
|
|
|
21
22
|
class ViewPositionDirective {
|
|
22
23
|
constructor(_elr) {
|
|
@@ -10258,6 +10259,9 @@ const PIPE_REGISTRY = {
|
|
|
10258
10259
|
}
|
|
10259
10260
|
return new Intl.NumberFormat(ctx.locale, opts).format(n);
|
|
10260
10261
|
},
|
|
10262
|
+
// Commerce E1c (shop-aware A-D2, C-D7): a price in the page's language — a Money as it is, a bare number as MAJOR
|
|
10263
|
+
// units of the binding's currency, else the studio's. commerce-core `formatMoneyValue` is the one formatter.
|
|
10264
|
+
money: (v, args, ctx) => formatMoneyValue(v, args[0] || ctx.currency, ctx.locale),
|
|
10261
10265
|
};
|
|
10262
10266
|
/**
|
|
10263
10267
|
* Apply a binding's pipe chain to a resolved value, LEFT→RIGHT. Pure. An empty/undefined chain returns
|
|
@@ -10285,6 +10289,8 @@ const PIPE_DESCRIPTORS = [
|
|
|
10285
10289
|
{ name: 'lowercase', label: 'lowercase', args: [] },
|
|
10286
10290
|
{ name: 'truncate', label: 'Truncate', args: [{ key: 'length', label: 'Max length', control: 'number', default: 100 }] },
|
|
10287
10291
|
{ name: 'number', label: 'Number', args: [{ key: 'decimals', label: 'Decimals', control: 'number', default: null }] },
|
|
10292
|
+
{ name: 'money', label: 'Money', args: [{ key: 'currency', label: 'Currency', control: 'select', default: '',
|
|
10293
|
+
options: [{ label: 'The studio\'s', value: '' }, ...CURRENCY_CODES.map(code => ({ label: code, value: code }))] }] },
|
|
10288
10294
|
];
|
|
10289
10295
|
|
|
10290
10296
|
/**
|
|
@@ -11324,8 +11330,9 @@ declared = []) {
|
|
|
11324
11330
|
walk(nodes, written, read);
|
|
11325
11331
|
// A binding only names a SLOT if something writes that key; otherwise it names a data source.
|
|
11326
11332
|
const keys = new Set(written);
|
|
11333
|
+
// The shop parts' slots (commerce E1c) are written by the shop runtime, never by an action: read = live.
|
|
11327
11334
|
for (const key of read)
|
|
11328
|
-
if (written.has(key))
|
|
11335
|
+
if (written.has(key) || SHOP_SLOTS.includes(key))
|
|
11329
11336
|
keys.add(key);
|
|
11330
11337
|
for (const decl of declared) {
|
|
11331
11338
|
// A declared variable (a data source of type 'variable') or a legacy IoxContextSlot.
|