@vectoriox/iox-ui 4.10.0 → 4.11.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.
|
@@ -2410,6 +2410,48 @@ function resolveRepeaterItems(resolved, sourcePath) {
|
|
|
2410
2410
|
return resolved;
|
|
2411
2411
|
return resolved == null ? [] : [resolved];
|
|
2412
2412
|
}
|
|
2413
|
+
// ── Referenced data sources (shared: builder-save + SSR resolve) ─────────────────────────────────
|
|
2414
|
+
// Which data-source aliases a node tree uses, so a consumer resolves ONLY what a page/global needs
|
|
2415
|
+
// (not the whole org library). Used by cms-client (persist globals' sources) and the SSR engine
|
|
2416
|
+
// (resolve the referenced subset per page). See org-data-sources-plan.md.
|
|
2417
|
+
/** Aliases referenced anywhere in a node tree: a repeater/slider `source` (a `bindings` entry with
|
|
2418
|
+
* `prop === 'source'`, or `props.source` for the slider) plus every binding's `source`. */
|
|
2419
|
+
function collectReferencedAliases(nodes, acc = new Set()) {
|
|
2420
|
+
for (const n of nodes ?? []) {
|
|
2421
|
+
for (const b of n?.bindings ?? []) {
|
|
2422
|
+
if (b?.source)
|
|
2423
|
+
acc.add(b.source);
|
|
2424
|
+
}
|
|
2425
|
+
if (n?.props?.source)
|
|
2426
|
+
acc.add(n.props.source);
|
|
2427
|
+
if (n?.children?.length)
|
|
2428
|
+
collectReferencedAliases(n.children, acc);
|
|
2429
|
+
}
|
|
2430
|
+
return acc;
|
|
2431
|
+
}
|
|
2432
|
+
/** The subset of `all` whose `alias` is referenced by `nodes` (shallow — direct references only). */
|
|
2433
|
+
function referencedDataSources(nodes, all) {
|
|
2434
|
+
const aliases = collectReferencedAliases(nodes);
|
|
2435
|
+
return (all ?? []).filter(ds => aliases.has(ds?.alias));
|
|
2436
|
+
}
|
|
2437
|
+
/** Like `referencedDataSources`, but also pulls in the DERIVED dependencies (transitively): a
|
|
2438
|
+
* referenced `derived` alias needs its `request.derived.from` source resolved too, even though the
|
|
2439
|
+
* layout never names the parent directly. Use this when RESOLVING (the engine) so derived views
|
|
2440
|
+
* don't resolve to nothing. */
|
|
2441
|
+
function referencedDataSourcesDeep(nodes, all) {
|
|
2442
|
+
const byAlias = new Map((all ?? []).map(d => [d?.alias, d]));
|
|
2443
|
+
const wanted = collectReferencedAliases(nodes);
|
|
2444
|
+
const queue = [...wanted];
|
|
2445
|
+
while (queue.length) {
|
|
2446
|
+
const ds = byAlias.get(queue.pop());
|
|
2447
|
+
const from = ds?.request?.derived?.from;
|
|
2448
|
+
if (from && !wanted.has(from)) {
|
|
2449
|
+
wanted.add(from);
|
|
2450
|
+
queue.push(from);
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
return (all ?? []).filter(d => wanted.has(d?.alias));
|
|
2454
|
+
}
|
|
2413
2455
|
/**
|
|
2414
2456
|
* Turn a resolved {@link DataSourcePlan} into the concrete public HTTP request (url + params) — the
|
|
2415
2457
|
* SINGLE place that decides the URL shape, shared by the builder binding preview and the SSR engine
|
|
@@ -2868,5 +2910,5 @@ function effectiveTransitionId(anim) {
|
|
|
2868
2910
|
* Generated bundle index. Do not edit.
|
|
2869
2911
|
*/
|
|
2870
2912
|
|
|
2871
|
-
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, resolveDerivedInto, resolvePageTransition, resolveRepeaterItems, resolveSingleItemId, rewriteViewportUnits, stripSuppressedProps, styleKeyToKebab };
|
|
2913
|
+
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, collectReferencedAliases, compileDeclarations, composeVirtualTraits, dataSourcePlanToRequest, effectiveTransitionId, feelFor, getByPath, legacyEnterToTransition, matchRouteParams, normalizeCollectionResult, planDataSource, referencedDataSources, referencedDataSourcesDeep, renderDefaultDeclarations, resolveDerivedInto, resolvePageTransition, resolveRepeaterItems, resolveSingleItemId, rewriteViewportUnits, stripSuppressedProps, styleKeyToKebab };
|
|
2872
2914
|
//# sourceMappingURL=vectoriox-iox-ui.mjs.map
|