@vectoriox/iox-ui 4.8.1 → 4.10.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
|
@@ -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
|
};
|
|
@@ -811,6 +822,26 @@ declare function planDataSource(ds: DataSourceSpec | undefined, routeParams?: Re
|
|
|
811
822
|
* A `by-id` response is already the item, so callers pass it through unchanged.
|
|
812
823
|
*/
|
|
813
824
|
declare function normalizeCollectionResult(mode: DataSourceMode, data: any): any;
|
|
825
|
+
/** Navigate a dot/bracket path into an object, e.g. `gallery`, `details.images`, `variants[0].skus`.
|
|
826
|
+
* Returns undefined if any segment is missing. Kept minimal + self-contained so it is shareable by
|
|
827
|
+
* both the builder and the SSR engine (the two have divergent local `resolvePath` copies). */
|
|
828
|
+
declare function getByPath(obj: any, path: string): any;
|
|
829
|
+
/**
|
|
830
|
+
* The array a Repeater (or a repeating Slider) iterates over — the SHARED decision so the builder
|
|
831
|
+
* canvas and the SSR engine agree (see data-source-resolving.md).
|
|
832
|
+
* - No `sourcePath`: the resolved source IS the list. An array passes through; a lone object degrades
|
|
833
|
+
* to a single-row list (back-compat with the old `fetchItems`); null/undefined → `[]`.
|
|
834
|
+
* - With `sourcePath`: the source resolved to a SINGLE resource (e.g. a product); dive into the
|
|
835
|
+
* nested array property (e.g. `gallery`). Non-array / missing → `[]`.
|
|
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>;
|
|
844
|
+
declare function resolveRepeaterItems(resolved: any, sourcePath?: string | null): any[];
|
|
814
845
|
/** Base URLs for the PUBLIC content controllers. Both must end with `/`. The builder and the SSR
|
|
815
846
|
* engine pass their own host (they proxy `/api` differently) but MUST target the public
|
|
816
847
|
* (`@Public()`) controllers, never the authed admin ones — data resolving is storefront data. */
|
|
@@ -979,5 +1010,5 @@ declare function effectiveTransitionId(anim: {
|
|
|
979
1010
|
enter?: string | null;
|
|
980
1011
|
} | null | undefined): string;
|
|
981
1012
|
|
|
982
|
-
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 };
|
|
1013
|
+
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 };
|
|
983
1014
|
export type { DataSourceDomain, DataSourceEndpoints, DataSourceMode, DataSourcePlan, DataSourceQueryFilter, DataSourceRequest, DataSourceRequestSpec, DataSourceRouteFilter, DataSourceSpec, IBuilderEventEmitter, PageTransitionCategory, PageTransitionCategoryMeta, PageTransitionOptions, PageTransitionPreset, ResolvedPageTransition, TransitionFeel, TransitionPhase, TransitionTimelineInput };
|