@vectoriox/iox-builder 2.3.3 → 2.4.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,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ComponentRef, Type, ChangeDetectorRef, OnInit, AfterViewInit, OnChanges, OnDestroy, EventEmitter, ElementRef, ApplicationRef, SimpleChanges, ViewContainerRef, Injector, EnvironmentInjector, InjectionToken, TemplateRef, AfterContentInit, QueryList } from '@angular/core';
|
|
3
|
+
import * as i28 from '@vectoriox/iox-ui';
|
|
4
|
+
import { RelativeSourceSpec, DataSourceEndpoints } from '@vectoriox/iox-ui';
|
|
5
|
+
export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
3
6
|
import * as rxjs from 'rxjs';
|
|
4
7
|
import { Subject, Subscription, BehaviorSubject, Observable } from 'rxjs';
|
|
5
8
|
import * as _vectoriox_iox_builder from '@vectoriox/iox-builder';
|
|
6
9
|
import * as i23 from 'primeng/popover';
|
|
7
10
|
import { Popover } from 'primeng/popover';
|
|
8
11
|
import { HttpClient } from '@angular/common/http';
|
|
9
|
-
import * as i28 from '@vectoriox/iox-ui';
|
|
10
|
-
import { DataSourceEndpoints } from '@vectoriox/iox-ui';
|
|
11
|
-
export { ComponentInstanceRegistryService, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
|
|
12
12
|
import * as i20 from '@angular/cdk/drag-drop';
|
|
13
13
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
14
14
|
import * as i18 from '@angular/common';
|
|
@@ -69,11 +69,15 @@ declare enum DataSourceType {
|
|
|
69
69
|
Static = "static",
|
|
70
70
|
/** A VIEW into another variable: `{ from: <alias>, path }` (e.g. galleryImages = product.gallery).
|
|
71
71
|
* Resolves to the value one (or more) level(s) into a parent variable — page-scoped. */
|
|
72
|
-
Derived = "derived"
|
|
72
|
+
Derived = "derived",
|
|
73
|
+
/** A ROUTE-CONTEXT value derived from the current route item — `$route`/`$current`/`$siblings`/
|
|
74
|
+
* `$related`. Not fetched: computed by the shared `computeRelative` from other resolved sources.
|
|
75
|
+
* See relative-data-sources-plan.md. */
|
|
76
|
+
Relative = "relative"
|
|
73
77
|
}
|
|
74
78
|
interface IoxDataSource {
|
|
75
79
|
id: string;
|
|
76
|
-
type: 'cms' | 'shop' | 'internal-api' | 'external-api' | 'static' | 'derived';
|
|
80
|
+
type: 'cms' | 'shop' | 'internal-api' | 'external-api' | 'static' | 'derived' | 'relative';
|
|
77
81
|
mode: 'single' | 'query';
|
|
78
82
|
alias: string;
|
|
79
83
|
request: {
|
|
@@ -84,6 +88,9 @@ interface IoxDataSource {
|
|
|
84
88
|
from: string;
|
|
85
89
|
path: string;
|
|
86
90
|
};
|
|
91
|
+
/** `relative` alias: a route-context computation (kind + from/subjectFrom/sortBy/matchFields…),
|
|
92
|
+
* resolved by the shared `computeRelative`. */
|
|
93
|
+
relative?: RelativeSourceSpec;
|
|
87
94
|
cms?: {
|
|
88
95
|
contentType: string;
|
|
89
96
|
filter?: any;
|
|
@@ -414,6 +421,23 @@ declare function arraySchemaFields(properties: Record<string, any>): {
|
|
|
414
421
|
label: string;
|
|
415
422
|
value: string;
|
|
416
423
|
}[];
|
|
424
|
+
/**
|
|
425
|
+
* Describe the ITEM shape of an array PROPERTY, straight from the schema — the authoritative source
|
|
426
|
+
* (a resolved sample may be missing, or ambiguous). Given a resource's schema `properties` and the
|
|
427
|
+
* dot-path to an array field (e.g. `gallery` or `info.items`):
|
|
428
|
+
* - **object item** → its primitive leaf fields (flattened): `[{label:'url',value:'url'}, …]`.
|
|
429
|
+
* - **primitive item** (`string[]`/`number[]`) → `isPrimitive:true` (caller offers "(the item value)").
|
|
430
|
+
* - **can't tell** (many-relation whose items are related docs, or path not found) → both empty, so
|
|
431
|
+
* the caller falls back to a resolved sample.
|
|
432
|
+
* JSON-schema arrays store the item schema under `.items`; embedded objects under `.properties`.
|
|
433
|
+
*/
|
|
434
|
+
declare function arrayItemSchemaFields(properties: Record<string, any>, arrayPath: string): {
|
|
435
|
+
fields: {
|
|
436
|
+
label: string;
|
|
437
|
+
value: string;
|
|
438
|
+
}[];
|
|
439
|
+
isPrimitive: boolean;
|
|
440
|
+
};
|
|
417
441
|
|
|
418
442
|
declare enum PanelTypes {
|
|
419
443
|
BINDINGS = "Bindings",
|
|
@@ -1783,8 +1807,14 @@ declare class BuilderDataSourceService {
|
|
|
1783
1807
|
fetchRepeaterItems(ds: IoxDataSource | undefined, sourcePath?: string): Observable<any[]>;
|
|
1784
1808
|
/**
|
|
1785
1809
|
* Resolve a data source BY ALIAS, following `derived` aliases (a VIEW into another variable:
|
|
1786
|
-
* resolve the parent, then getByPath)
|
|
1787
|
-
*
|
|
1810
|
+
* resolve the parent, then getByPath) and `relative` aliases (route-context — `$current`/
|
|
1811
|
+
* `$siblings`/`$related`). `findByAlias` is injected so this module stays registry-free (the caller
|
|
1812
|
+
* passes its own page-scoped registry). Recurses for chained aliases.
|
|
1813
|
+
*
|
|
1814
|
+
* The builder is design time: `relative` sources resolve their dependency aliases (subject +
|
|
1815
|
+
* collection) — a single source falls back to its `defaultId`, a list to the whole collection —
|
|
1816
|
+
* then run the SHARED `computeRelative`, so the canvas shows the SAME neighbours the SSR engine
|
|
1817
|
+
* bakes into the live page. `$route` has no live params at design time → `{}`.
|
|
1788
1818
|
*/
|
|
1789
1819
|
fetchByAlias(alias: string, findByAlias: (a: string) => IoxDataSource | undefined): Observable<any>;
|
|
1790
1820
|
/** Repeater items for an alias (follows derived aliases + applies an optional sourcePath). */
|
|
@@ -2273,5 +2303,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
|
|
|
2273
2303
|
constructor();
|
|
2274
2304
|
}
|
|
2275
2305
|
|
|
2276
|
-
export { ACTION_TYPE_OPTIONS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, EffectsGroupStyleConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, ViewportService, ZOOM_OPTIONS, arraySchemaFields, buildFullStyleTraits, buildPresetStyleTraits, defaultPageSettings, flattenSchemaFields, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
|
|
2306
|
+
export { ACTION_TYPE_OPTIONS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, EffectsGroupStyleConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PositionGroupStyleConfig, PresetRegistryService, RELATIONAL_STATES, RELATIONAL_STATE_BASE, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, SizeGroupStyleConfig, SliderContainerComponent, SliderContainerConfig, SliderSlideComponent, SliderSlideConfig, SpacingGroupStyleConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, buildFullStyleTraits, buildPresetStyleTraits, defaultPageSettings, flattenSchemaFields, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
|
|
2277
2307
|
export type { BuilderClipboard, ComponentEventDef, ComponentMethodDef, ComponentNode, ComponentTrait, DeviceOption, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, HistoryEntry, InteractionAction, InteractionActionType, InteractionPreset, InteractionTrigger, IoxBinding, IoxDataSource, IoxDropEvent, IoxFontManager, IoxInteraction, IoxSymbol, NodeRef, OverlayBoxModel, OverlayBoxSpacing, OverlayEntry, PageRouteAnimationSettings, PageScrollSettings, PageSettings, PageStyleSettings, PanelEvent, QuadSizeSegment, RouteAnimationPreset, ScreenWidthOption, StylePreset, StyleTrait, StyleTraitGroup, TraitOptionMap, TraitSelectOption, TraitShowCondition, ViewportState, ZoomOption };
|