@vectoriox/iox-ui 4.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "4.9.0",
3
+ "version": "4.11.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -749,6 +749,12 @@ interface DataSourceSpec {
749
749
  shop?: DataSourceRequestSpec;
750
750
  endpoint?: string;
751
751
  data?: any;
752
+ /** `derived` alias: a VIEW into another variable — resolve `from` then getByPath(value, path)
753
+ * (e.g. galleryImages = product.gallery). See repeater-binding-ux-plan.md. */
754
+ derived?: {
755
+ from: string;
756
+ path: string;
757
+ };
752
758
  };
753
759
  }
754
760
  type DataSourcePlan = {
@@ -772,6 +778,11 @@ type DataSourcePlan = {
772
778
  kind: 'static';
773
779
  data: any;
774
780
  mode: DataSourceMode;
781
+ } | {
782
+ kind: 'derived';
783
+ from: string;
784
+ path: string;
785
+ mode: DataSourceMode;
775
786
  } | {
776
787
  kind: 'none';
777
788
  };
@@ -823,7 +834,24 @@ declare function getByPath(obj: any, path: string): any;
823
834
  * - With `sourcePath`: the source resolved to a SINGLE resource (e.g. a product); dive into the
824
835
  * nested array property (e.g. `gallery`). Non-array / missing → `[]`.
825
836
  */
837
+ /**
838
+ * Fill in `derived` aliases in an already-resolved map. Given the data sources and a map of resolved
839
+ * NON-derived values (by alias), compute each `type:'derived'` alias as `getByPath(parent, path)` in
840
+ * dependency order (chains resolved by iterating until stable). Mutates + returns the map. Used by the
841
+ * SSR engine after it resolves the root sources; the builder resolves derived lazily per alias.
842
+ */
843
+ declare function resolveDerivedInto(dataSources: DataSourceSpec[], resolved: Record<string, any>): Record<string, any>;
826
844
  declare function resolveRepeaterItems(resolved: any, sourcePath?: string | null): any[];
845
+ /** Aliases referenced anywhere in a node tree: a repeater/slider `source` (a `bindings` entry with
846
+ * `prop === 'source'`, or `props.source` for the slider) plus every binding's `source`. */
847
+ declare function collectReferencedAliases(nodes: any[], acc?: Set<string>): Set<string>;
848
+ /** The subset of `all` whose `alias` is referenced by `nodes` (shallow — direct references only). */
849
+ declare function referencedDataSources(nodes: any[], all: any[]): any[];
850
+ /** Like `referencedDataSources`, but also pulls in the DERIVED dependencies (transitively): a
851
+ * referenced `derived` alias needs its `request.derived.from` source resolved too, even though the
852
+ * layout never names the parent directly. Use this when RESOLVING (the engine) so derived views
853
+ * don't resolve to nothing. */
854
+ declare function referencedDataSourcesDeep(nodes: any[], all: any[]): any[];
827
855
  /** Base URLs for the PUBLIC content controllers. Both must end with `/`. The builder and the SSR
828
856
  * engine pass their own host (they proxy `/api` differently) but MUST target the public
829
857
  * (`@Public()`) controllers, never the authed admin ones — data resolving is storefront data. */
@@ -992,5 +1020,5 @@ declare function effectiveTransitionId(anim: {
992
1020
  enter?: string | null;
993
1021
  } | null | undefined): string;
994
1022
 
995
- 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 };
1023
+ 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 };
996
1024
  export type { DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, IBuilderEventEmitter, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, ResolvedPageTransition, TransitionFeel, TransitionPhase, TransitionTimelineInput };