@vectoriox/iox-builder 2.3.4 → 2.5.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';
|
|
@@ -22,6 +22,9 @@ import * as i27 from 'primeng/dialog';
|
|
|
22
22
|
|
|
23
23
|
declare enum StyleCategory {
|
|
24
24
|
Layout = "Layout",
|
|
25
|
+
/** How THIS node participates in its parent's flex/grid flow (align-self, flex-grow, grid-column…).
|
|
26
|
+
* Distinct from Layout, which configures the node as a container for its OWN children. */
|
|
27
|
+
ChildLayout = "Child Layout",
|
|
25
28
|
Size = "Size",
|
|
26
29
|
Typography = "Typography",
|
|
27
30
|
Spacing = "Spacing",
|
|
@@ -69,11 +72,15 @@ declare enum DataSourceType {
|
|
|
69
72
|
Static = "static",
|
|
70
73
|
/** A VIEW into another variable: `{ from: <alias>, path }` (e.g. galleryImages = product.gallery).
|
|
71
74
|
* Resolves to the value one (or more) level(s) into a parent variable — page-scoped. */
|
|
72
|
-
Derived = "derived"
|
|
75
|
+
Derived = "derived",
|
|
76
|
+
/** A ROUTE-CONTEXT value derived from the current route item — `$route`/`$current`/`$siblings`/
|
|
77
|
+
* `$related`. Not fetched: computed by the shared `computeRelative` from other resolved sources.
|
|
78
|
+
* See relative-data-sources-plan.md. */
|
|
79
|
+
Relative = "relative"
|
|
73
80
|
}
|
|
74
81
|
interface IoxDataSource {
|
|
75
82
|
id: string;
|
|
76
|
-
type: 'cms' | 'shop' | 'internal-api' | 'external-api' | 'static' | 'derived';
|
|
83
|
+
type: 'cms' | 'shop' | 'internal-api' | 'external-api' | 'static' | 'derived' | 'relative';
|
|
77
84
|
mode: 'single' | 'query';
|
|
78
85
|
alias: string;
|
|
79
86
|
request: {
|
|
@@ -84,6 +91,9 @@ interface IoxDataSource {
|
|
|
84
91
|
from: string;
|
|
85
92
|
path: string;
|
|
86
93
|
};
|
|
94
|
+
/** `relative` alias: a route-context computation (kind + from/subjectFrom/sortBy/matchFields…),
|
|
95
|
+
* resolved by the shared `computeRelative`. */
|
|
96
|
+
relative?: RelativeSourceSpec;
|
|
87
97
|
cms?: {
|
|
88
98
|
contentType: string;
|
|
89
99
|
filter?: any;
|
|
@@ -292,12 +302,18 @@ interface QuadSizeSegment {
|
|
|
292
302
|
icon: string;
|
|
293
303
|
ariaLabel?: string;
|
|
294
304
|
}
|
|
295
|
-
/** Conditional visibility: this trait only shows when
|
|
305
|
+
/** Conditional visibility: this trait only shows when a controlling trait matches one of the given values.
|
|
306
|
+
* `scope` selects whose trait is inspected:
|
|
307
|
+
* - `'self'` (default): a sibling trait on the SAME node/group (e.g. grid tracks show when this node's display=grid).
|
|
308
|
+
* - `'parent'`: the same-named trait on the node's PARENT (e.g. flex-child props show when the PARENT's display=flex).
|
|
309
|
+
* Parent-scoped conditions are resolved by the style panel, which threads the parent's live value in. */
|
|
296
310
|
interface TraitShowCondition {
|
|
297
|
-
/** name of
|
|
311
|
+
/** name of the controlling trait (a sibling when scope='self'; read off the parent when scope='parent') */
|
|
298
312
|
trait: string;
|
|
299
313
|
/** one value or an array of values that make this trait visible */
|
|
300
314
|
values: string | string[];
|
|
315
|
+
/** whose trait to inspect — defaults to 'self' (a sibling in the same group). */
|
|
316
|
+
scope?: 'self' | 'parent';
|
|
301
317
|
}
|
|
302
318
|
interface ComponentTrait {
|
|
303
319
|
name: string;
|
|
@@ -369,6 +385,9 @@ declare class PositionGroupStyleConfig extends GroupStyleConfig {
|
|
|
369
385
|
declare class LayoutGroupStyleConfig extends GroupStyleConfig {
|
|
370
386
|
constructor();
|
|
371
387
|
}
|
|
388
|
+
declare class ChildLayoutGroupStyleConfig extends GroupStyleConfig {
|
|
389
|
+
constructor();
|
|
390
|
+
}
|
|
372
391
|
declare class SizeGroupStyleConfig extends GroupStyleConfig {
|
|
373
392
|
constructor();
|
|
374
393
|
}
|
|
@@ -1380,6 +1399,10 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1380
1399
|
private findRepeaterAncestorOf;
|
|
1381
1400
|
/** Emit ELEMENT_SELECT with the ancestors the panels need (symbol + repeater item scope). */
|
|
1382
1401
|
private _emitElementSelect;
|
|
1402
|
+
/** Read a node's current `display` value. The style panel mutates `styleTraits` in place at edit
|
|
1403
|
+
* time, so that is the live source of truth; fall back to a preset's `styleOverrides` map, then
|
|
1404
|
+
* the CSS initial value. */
|
|
1405
|
+
private readNodeDisplay;
|
|
1383
1406
|
private handlePanelEvents;
|
|
1384
1407
|
static ɵfac: i0.ɵɵFactoryDeclaration<BuilderComponent, never>;
|
|
1385
1408
|
static ɵcmp: i0.ɵɵComponentDeclaration<BuilderComponent, "app-builder", never, { "layout": { "alias": "layout"; "required": false; }; "dataSources": { "alias": "dataSources"; "required": false; }; "orgId": { "alias": "orgId"; "required": false; }; "routeParams": { "alias": "routeParams"; "required": false; }; "pageName": { "alias": "pageName"; "required": false; }; "isSaving": { "alias": "isSaving"; "required": false; }; "pageStatus": { "alias": "pageStatus"; "required": false; }; "pageSettings": { "alias": "pageSettings"; "required": false; }; "globalElements": { "alias": "globalElements"; "required": false; }; "canUndo": { "alias": "canUndo"; "required": false; }; "canRedo": { "alias": "canRedo"; "required": false; }; "moveableMode": { "alias": "moveableMode"; "required": false; }; }, { "save": "save"; "undo": "undo"; "redo": "redo"; "back": "back"; "preview": "preview"; "publishToggle": "publishToggle"; "pageSettingsChange": "pageSettingsChange"; "applyAnimationToAll": "applyAnimationToAll"; "saveBlock": "saveBlock"; "globalElementsChange": "globalElementsChange"; }, never, ["[builderComponents]", "[builderTokens]", "[builderPanel]"], false, never>;
|
|
@@ -1800,8 +1823,14 @@ declare class BuilderDataSourceService {
|
|
|
1800
1823
|
fetchRepeaterItems(ds: IoxDataSource | undefined, sourcePath?: string): Observable<any[]>;
|
|
1801
1824
|
/**
|
|
1802
1825
|
* Resolve a data source BY ALIAS, following `derived` aliases (a VIEW into another variable:
|
|
1803
|
-
* resolve the parent, then getByPath)
|
|
1804
|
-
*
|
|
1826
|
+
* resolve the parent, then getByPath) and `relative` aliases (route-context — `$current`/
|
|
1827
|
+
* `$siblings`/`$related`). `findByAlias` is injected so this module stays registry-free (the caller
|
|
1828
|
+
* passes its own page-scoped registry). Recurses for chained aliases.
|
|
1829
|
+
*
|
|
1830
|
+
* The builder is design time: `relative` sources resolve their dependency aliases (subject +
|
|
1831
|
+
* collection) — a single source falls back to its `defaultId`, a list to the whole collection —
|
|
1832
|
+
* then run the SHARED `computeRelative`, so the canvas shows the SAME neighbours the SSR engine
|
|
1833
|
+
* bakes into the live page. `$route` has no live params at design time → `{}`.
|
|
1805
1834
|
*/
|
|
1806
1835
|
fetchByAlias(alias: string, findByAlias: (a: string) => IoxDataSource | undefined): Observable<any>;
|
|
1807
1836
|
/** Repeater items for an alias (follows derived aliases + applies an optional sourcePath). */
|
|
@@ -2290,5 +2319,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
|
|
|
2290
2319
|
constructor();
|
|
2291
2320
|
}
|
|
2292
2321
|
|
|
2293
|
-
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 };
|
|
2322
|
+
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, ChildLayoutGroupStyleConfig, 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 };
|
|
2294
2323
|
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 };
|