@vectoriox/iox-ui 4.8.0 → 4.9.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.
|
@@ -966,11 +966,11 @@ class BuilderIconComponent {
|
|
|
966
966
|
this.nodeId = '';
|
|
967
967
|
}
|
|
968
968
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BuilderIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
969
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: BuilderIconComponent, isStandalone: false, selector: "i[iox-icon]", inputs: { iconClass: "iconClass", nodeId: "nodeId" }, host: { properties: { "class": "iconClass + ' iox-node-' + nodeId" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:
|
|
969
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: BuilderIconComponent, isStandalone: false, selector: "i[iox-icon]", inputs: { iconClass: "iconClass", nodeId: "nodeId" }, host: { properties: { "class": "iconClass + ' iox-node-' + nodeId" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0}\n"] }); }
|
|
970
970
|
}
|
|
971
971
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BuilderIconComponent, decorators: [{
|
|
972
972
|
type: Component,
|
|
973
|
-
args: [{ selector: 'i[iox-icon]', template: '', host: { '[class]': "iconClass + ' iox-node-' + nodeId" }, standalone: false, styles: [":host{display:
|
|
973
|
+
args: [{ selector: 'i[iox-icon]', template: '', host: { '[class]': "iconClass + ' iox-node-' + nodeId" }, standalone: false, styles: [":host{display:inline-flex;align-items:center;justify-content:center;line-height:0}\n"] }]
|
|
974
974
|
}], propDecorators: { iconClass: [{
|
|
975
975
|
type: Input
|
|
976
976
|
}], nodeId: [{
|
|
@@ -2101,6 +2101,14 @@ function renderDefaultDeclarations(type, styleProps, hasHoverState) {
|
|
|
2101
2101
|
// it is not enough: the icon would inherit 1.5 from its container instead.
|
|
2102
2102
|
if (type === 'Icon')
|
|
2103
2103
|
out.push('line-height: 0');
|
|
2104
|
+
// An icon's `<i>` must shrink-wrap its glyph so it grows with font-size and doesn't overflow its
|
|
2105
|
+
// parent. Phosphor forces `display:inline-flex` on its own class; generated (fantasticon) fonts
|
|
2106
|
+
// don't, so the engine's plain `<i class="bi-x iox-node-…">` would fall back to inline and the
|
|
2107
|
+
// glyph would overflow. Emit it here (guarded so a user-set display still wins) — mirrors the
|
|
2108
|
+
// builder Icon component's `:host{display:inline-flex}`.
|
|
2109
|
+
if (type === 'Icon' && sp['display'] === undefined) {
|
|
2110
|
+
out.push('display: inline-flex', 'align-items: center', 'justify-content: center');
|
|
2111
|
+
}
|
|
2104
2112
|
return out;
|
|
2105
2113
|
}
|
|
2106
2114
|
|
|
@@ -2342,6 +2350,39 @@ function normalizeCollectionResult(mode, data) {
|
|
|
2342
2350
|
const items = Array.isArray(data) ? data : (data?.items ?? data?.data ?? []);
|
|
2343
2351
|
return mode === 'single' ? (items[0] ?? null) : items;
|
|
2344
2352
|
}
|
|
2353
|
+
/** Navigate a dot/bracket path into an object, e.g. `gallery`, `details.images`, `variants[0].skus`.
|
|
2354
|
+
* Returns undefined if any segment is missing. Kept minimal + self-contained so it is shareable by
|
|
2355
|
+
* both the builder and the SSR engine (the two have divergent local `resolvePath` copies). */
|
|
2356
|
+
function getByPath(obj, path) {
|
|
2357
|
+
if (obj == null || !path)
|
|
2358
|
+
return obj;
|
|
2359
|
+
// Turn `a[0].b` into ['a','0','b'].
|
|
2360
|
+
const segments = path.replace(/\[(\w+)\]/g, '.$1').split('.').filter(Boolean);
|
|
2361
|
+
let cur = obj;
|
|
2362
|
+
for (const seg of segments) {
|
|
2363
|
+
if (cur == null)
|
|
2364
|
+
return undefined;
|
|
2365
|
+
cur = cur[seg];
|
|
2366
|
+
}
|
|
2367
|
+
return cur;
|
|
2368
|
+
}
|
|
2369
|
+
/**
|
|
2370
|
+
* The array a Repeater (or a repeating Slider) iterates over — the SHARED decision so the builder
|
|
2371
|
+
* canvas and the SSR engine agree (see data-source-resolving.md).
|
|
2372
|
+
* - No `sourcePath`: the resolved source IS the list. An array passes through; a lone object degrades
|
|
2373
|
+
* to a single-row list (back-compat with the old `fetchItems`); null/undefined → `[]`.
|
|
2374
|
+
* - With `sourcePath`: the source resolved to a SINGLE resource (e.g. a product); dive into the
|
|
2375
|
+
* nested array property (e.g. `gallery`). Non-array / missing → `[]`.
|
|
2376
|
+
*/
|
|
2377
|
+
function resolveRepeaterItems(resolved, sourcePath) {
|
|
2378
|
+
if (sourcePath) {
|
|
2379
|
+
const nested = getByPath(resolved, sourcePath);
|
|
2380
|
+
return Array.isArray(nested) ? nested : [];
|
|
2381
|
+
}
|
|
2382
|
+
if (Array.isArray(resolved))
|
|
2383
|
+
return resolved;
|
|
2384
|
+
return resolved == null ? [] : [resolved];
|
|
2385
|
+
}
|
|
2345
2386
|
/**
|
|
2346
2387
|
* Turn a resolved {@link DataSourcePlan} into the concrete public HTTP request (url + params) — the
|
|
2347
2388
|
* SINGLE place that decides the URL shape, shared by the builder binding preview and the SSR engine
|
|
@@ -2800,5 +2841,5 @@ function effectiveTransitionId(anim) {
|
|
|
2800
2841
|
* Generated bundle index. Do not edit.
|
|
2801
2842
|
*/
|
|
2802
2843
|
|
|
2803
|
-
export { AOSService, AnalyticsService, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CardComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, ENVIRONMENT, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, SUPPRESSED_STYLE_PROPS_BY_TYPE, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, applyFeel, buildDataSourceFilter, buildTransitionTimeline, compileDeclarations, composeVirtualTraits, dataSourcePlanToRequest, effectiveTransitionId, feelFor, legacyEnterToTransition, matchRouteParams, normalizeCollectionResult, planDataSource, renderDefaultDeclarations, resolvePageTransition, resolveSingleItemId, rewriteViewportUnits, stripSuppressedProps, styleKeyToKebab };
|
|
2844
|
+
export { AOSService, AnalyticsService, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, ButtonBlockComponent, CMSClientInfraModule, CardComponent, ClientListComponent, ClientListItemComponent, ClientRepeaterComponent, ClientSliderContainerComponent, ClientSliderSlideComponent, ComponentInstanceRegistryService, ConsentService, ContainerComponent, ContentService, DEFAULT_PAGE_TRANSITION, DEFAULT_PAGE_TRANSITION_DURATION, DEFAULT_PAGE_TRANSITION_EASING, DEFAULT_PAGE_TRANSITION_PERSPECTIVE, DEFAULT_WIDTH_BY_TYPE, ENVIRONMENT, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PAGE_TRANSITION_CATEGORIES, PAGE_TRANSITION_PRESETS, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, SUPPRESSED_STYLE_PROPS_BY_TYPE, SectionComponent, TRANSITION_FEELS, TextBlockComponent, VIRTUAL_TRAIT_KEYS, ViewPositionDirective, ViewPositionModule, WebSettingsService, applyFeel, buildDataSourceFilter, buildTransitionTimeline, compileDeclarations, composeVirtualTraits, dataSourcePlanToRequest, effectiveTransitionId, feelFor, getByPath, legacyEnterToTransition, matchRouteParams, normalizeCollectionResult, planDataSource, renderDefaultDeclarations, resolvePageTransition, resolveRepeaterItems, resolveSingleItemId, rewriteViewportUnits, stripSuppressedProps, styleKeyToKebab };
|
|
2804
2845
|
//# sourceMappingURL=vectoriox-iox-ui.mjs.map
|