@vectoriox/iox-builder 1.4.35 → 1.4.37
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
|
@@ -141,6 +141,16 @@ interface IoxSymbol {
|
|
|
141
141
|
/** Full serialised node tree — same shape as a page layout node. */
|
|
142
142
|
node: Record<string, any>;
|
|
143
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* A named, reusable collection of IoxInteraction[] stored at the org level.
|
|
146
|
+
* Elements reference a preset by `interactionPresetId`. Editing the preset
|
|
147
|
+
* propagates updated interactions to all linked elements immediately.
|
|
148
|
+
*/
|
|
149
|
+
interface InteractionPreset {
|
|
150
|
+
id: string;
|
|
151
|
+
name: string;
|
|
152
|
+
interactions: IoxInteraction[];
|
|
153
|
+
}
|
|
144
154
|
type ElementState = 'hover' | 'active' | 'focus' | 'first-child' | 'last-child' | 'nth-child(odd)' | 'nth-child(even)';
|
|
145
155
|
/** Interaction pseudo-classes — compiled to .iox-node-{id}:state */
|
|
146
156
|
declare const INTERACTION_STATES: ElementState[];
|
|
@@ -187,6 +197,9 @@ interface ComponentNode {
|
|
|
187
197
|
* Absent on stamps (independent copies). When present, any style change
|
|
188
198
|
* on this node propagates to all other instances of the same symbol. */
|
|
189
199
|
symbolId?: string;
|
|
200
|
+
/** ID of the org-level InteractionPreset applied to this node.
|
|
201
|
+
* When set, node.interactions reflects the preset's interactions. */
|
|
202
|
+
interactionPresetId?: string;
|
|
190
203
|
}
|
|
191
204
|
/**
|
|
192
205
|
* Build a full StyleTraitGroup[] schema populated with values from a flat
|
|
@@ -298,7 +311,8 @@ declare function buildFullStyleTraits(): GroupStyleConfig[];
|
|
|
298
311
|
declare enum PanelTypes {
|
|
299
312
|
BINDINGS = "Bindings",
|
|
300
313
|
STYLES = "Styles",
|
|
301
|
-
PAGE = "Page"
|
|
314
|
+
PAGE = "Page",
|
|
315
|
+
INTERACTIONS = "Interactions"
|
|
302
316
|
}
|
|
303
317
|
type RouteAnimationPreset = 'none' | 'fade' | 'slideUp' | 'slideDown' | 'zoomIn' | 'zoomOut' | 'blurIn' | 'flip';
|
|
304
318
|
declare const ROUTE_ANIMATION_OPTIONS: {
|
|
@@ -348,7 +362,12 @@ declare enum ToolbarAction {
|
|
|
348
362
|
MakeGlobal = "make-global",
|
|
349
363
|
RemoveGlobal = "remove-global",
|
|
350
364
|
EditPreset = "edit-preset",
|
|
351
|
-
DetachSymbol = "detach-symbol"
|
|
365
|
+
DetachSymbol = "detach-symbol",
|
|
366
|
+
EditInteractionPreset = "edit-interaction-preset",
|
|
367
|
+
CopyPreset = "copy-preset",
|
|
368
|
+
PastePreset = "paste-preset",
|
|
369
|
+
CopyInteractionPreset = "copy-interaction-preset",
|
|
370
|
+
PasteInteractionPreset = "paste-interaction-preset"
|
|
352
371
|
}
|
|
353
372
|
declare enum NodeAction {
|
|
354
373
|
Delete = "delete",
|
|
@@ -469,7 +488,13 @@ declare enum PanelEventTypes {
|
|
|
469
488
|
/** Fired after a preset is created, updated, or deleted so panels refresh their list. */
|
|
470
489
|
PRESETS_CHANGED = "presetschanged",
|
|
471
490
|
/** Fired when a linked symbol instance's styles change — propagates to all instances. */
|
|
472
|
-
SYMBOLS_CHANGED = "symbolschanged"
|
|
491
|
+
SYMBOLS_CHANGED = "symbolschanged",
|
|
492
|
+
/** Fired on every structural or style mutation — used by BuilderHistoryService to snapshot. */
|
|
493
|
+
LAYOUT_CHANGED = "layoutchanged",
|
|
494
|
+
/** Open the Interactions panel in preset-edit mode for the given preset ID. */
|
|
495
|
+
INTERACTION_PRESET_EDIT = "interactionpresetedit",
|
|
496
|
+
/** Fired after an interaction preset is created, updated, or deleted so panels refresh. */
|
|
497
|
+
INTERACTION_PRESETS_CHANGED = "interactionpresetschanged"
|
|
473
498
|
}
|
|
474
499
|
interface PanelEvent {
|
|
475
500
|
type: PanelEventTypes;
|
|
@@ -550,6 +575,8 @@ declare class DragEngineService {
|
|
|
550
575
|
private _scale;
|
|
551
576
|
/** Called by BuilderComponent whenever the viewport scale changes. */
|
|
552
577
|
setScale(scale: number): void;
|
|
578
|
+
private _dropzoneRectCache;
|
|
579
|
+
private _snapshotRects;
|
|
553
580
|
private readonly ROOT_ESCAPE_PX;
|
|
554
581
|
private _rootEscapeActiveFor;
|
|
555
582
|
private _getEl;
|
|
@@ -722,6 +749,31 @@ declare class ViewportService {
|
|
|
722
749
|
static ɵprov: i0.ɵɵInjectableDeclaration<ViewportService>;
|
|
723
750
|
}
|
|
724
751
|
|
|
752
|
+
interface BuilderClipboard {
|
|
753
|
+
node?: ComponentNode;
|
|
754
|
+
presetId?: string;
|
|
755
|
+
interactionPresetId?: string;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* BuilderClipboardService — in-memory typed clipboard for the page builder.
|
|
759
|
+
*
|
|
760
|
+
* Stores element copies, style preset references, and interaction preset references.
|
|
761
|
+
* Lives in memory only — no navigator.clipboard usage.
|
|
762
|
+
* Scoped to PageUiComponent.providers[] — one clipboard per builder instance.
|
|
763
|
+
*/
|
|
764
|
+
declare class BuilderClipboardService {
|
|
765
|
+
private _clip;
|
|
766
|
+
copyNode(node: ComponentNode): void;
|
|
767
|
+
copyPreset(presetId: string): void;
|
|
768
|
+
copyInteractionPreset(interactionPresetId: string): void;
|
|
769
|
+
getNode(): ComponentNode | undefined;
|
|
770
|
+
getPresetId(): string | undefined;
|
|
771
|
+
getInteractionPresetId(): string | undefined;
|
|
772
|
+
clear(): void;
|
|
773
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BuilderClipboardService, never>;
|
|
774
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BuilderClipboardService>;
|
|
775
|
+
}
|
|
776
|
+
|
|
725
777
|
declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {
|
|
726
778
|
private registry;
|
|
727
779
|
private overlayService;
|
|
@@ -730,6 +782,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
730
782
|
private dsRegistry;
|
|
731
783
|
private viewportService;
|
|
732
784
|
private interactionEngine;
|
|
785
|
+
private clipboard;
|
|
733
786
|
private cdr;
|
|
734
787
|
private appRef;
|
|
735
788
|
layout: ComponentNode[];
|
|
@@ -820,7 +873,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
820
873
|
get canvasMinHeight(): number;
|
|
821
874
|
private sub?;
|
|
822
875
|
private registrySub?;
|
|
823
|
-
constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, cdr: ChangeDetectorRef, appRef: ApplicationRef);
|
|
876
|
+
constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, clipboard: BuilderClipboardService, cdr: ChangeDetectorRef, appRef: ApplicationRef);
|
|
824
877
|
ngOnInit(): void;
|
|
825
878
|
ngOnChanges(changes: SimpleChanges): void;
|
|
826
879
|
ngAfterViewInit(): void;
|
|
@@ -1082,11 +1135,30 @@ declare class SymbolRegistryService {
|
|
|
1082
1135
|
static ɵprov: i0.ɵɵInjectableDeclaration<SymbolRegistryService>;
|
|
1083
1136
|
}
|
|
1084
1137
|
|
|
1138
|
+
/**
|
|
1139
|
+
* InteractionPresetRegistryService — in-memory store for org-level interaction presets.
|
|
1140
|
+
*
|
|
1141
|
+
* Loaded once per page by PageUiComponent alongside the page layout.
|
|
1142
|
+
* Scoped to PageUiComponent.providers[] via IoxBuilderModule — one registry per builder instance.
|
|
1143
|
+
*/
|
|
1144
|
+
declare class InteractionPresetRegistryService {
|
|
1145
|
+
private presets;
|
|
1146
|
+
setPresets(presets: InteractionPreset[]): void;
|
|
1147
|
+
getPreset(id: string): InteractionPreset | undefined;
|
|
1148
|
+
getAll(): InteractionPreset[];
|
|
1149
|
+
upsert(preset: InteractionPreset): void;
|
|
1150
|
+
remove(id: string): void;
|
|
1151
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InteractionPresetRegistryService, never>;
|
|
1152
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InteractionPresetRegistryService>;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1085
1155
|
declare class OverlayComponent implements OnInit, OnDestroy {
|
|
1086
1156
|
private overlayService;
|
|
1087
1157
|
private viewportService;
|
|
1088
1158
|
private presetRegistry;
|
|
1089
1159
|
private symbolRegistry;
|
|
1160
|
+
private interactionPresetRegistry;
|
|
1161
|
+
private clipboard;
|
|
1090
1162
|
private styleRegistry;
|
|
1091
1163
|
private cdr;
|
|
1092
1164
|
toolbarAction: EventEmitter<{
|
|
@@ -1107,8 +1179,10 @@ declare class OverlayComponent implements OnInit, OnDestroy {
|
|
|
1107
1179
|
private containerResizeObserver?;
|
|
1108
1180
|
private mutationObserver?;
|
|
1109
1181
|
private boundUpdate;
|
|
1182
|
+
private _scrollRaf;
|
|
1183
|
+
private boundScrollUpdate;
|
|
1110
1184
|
private activeScrollContainer;
|
|
1111
|
-
constructor(overlayService: OverlayService, viewportService: ViewportService, presetRegistry: PresetRegistryService, symbolRegistry: SymbolRegistryService, styleRegistry: StyleRegistryService, cdr: ChangeDetectorRef);
|
|
1185
|
+
constructor(overlayService: OverlayService, viewportService: ViewportService, presetRegistry: PresetRegistryService, symbolRegistry: SymbolRegistryService, interactionPresetRegistry: InteractionPresetRegistryService, clipboard: BuilderClipboardService, styleRegistry: StyleRegistryService, cdr: ChangeDetectorRef);
|
|
1112
1186
|
ngOnInit(): void;
|
|
1113
1187
|
ngOnDestroy(): void;
|
|
1114
1188
|
onSelectParent(event: MouseEvent): void;
|
|
@@ -1126,7 +1200,15 @@ declare class OverlayComponent implements OnInit, OnDestroy {
|
|
|
1126
1200
|
get selectedPresetName(): string | null;
|
|
1127
1201
|
get isLinkedSymbol(): boolean;
|
|
1128
1202
|
get linkedSymbolName(): string | null;
|
|
1203
|
+
get selectedInteractionPresetName(): string | null;
|
|
1204
|
+
get hasPresetInClipboard(): boolean;
|
|
1205
|
+
get hasInteractionPresetInClipboard(): boolean;
|
|
1129
1206
|
onEditPreset(event: MouseEvent): void;
|
|
1207
|
+
onEditInteractionPreset(event: MouseEvent): void;
|
|
1208
|
+
onCopyPreset(event: MouseEvent): void;
|
|
1209
|
+
onPastePreset(event: MouseEvent): void;
|
|
1210
|
+
onCopyInteractionPreset(event: MouseEvent): void;
|
|
1211
|
+
onPasteInteractionPreset(event: MouseEvent): void;
|
|
1130
1212
|
onDetachSymbol(event: MouseEvent): void;
|
|
1131
1213
|
private observeSelectElement;
|
|
1132
1214
|
private updateAll;
|
|
@@ -1488,6 +1570,30 @@ declare class IoxBuilderModule {
|
|
|
1488
1570
|
static ɵinj: i0.ɵɵInjectorDeclaration<IoxBuilderModule>;
|
|
1489
1571
|
}
|
|
1490
1572
|
|
|
1573
|
+
interface HistoryEntry {
|
|
1574
|
+
layout: ComponentNode[];
|
|
1575
|
+
timestamp: number;
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* BuilderHistoryService — snapshot-based undo/redo for the page builder.
|
|
1579
|
+
*
|
|
1580
|
+
* Snapshots are JSON deep-clones of the full layout array.
|
|
1581
|
+
* Session-only — not persisted to the backend.
|
|
1582
|
+
* Scoped to PageUiComponent.providers[] — one history stack per builder instance.
|
|
1583
|
+
*/
|
|
1584
|
+
declare class BuilderHistoryService {
|
|
1585
|
+
private _past;
|
|
1586
|
+
private _future;
|
|
1587
|
+
get canUndo(): boolean;
|
|
1588
|
+
get canRedo(): boolean;
|
|
1589
|
+
push(layout: ComponentNode[]): void;
|
|
1590
|
+
undo(): ComponentNode[] | null;
|
|
1591
|
+
redo(): ComponentNode[] | null;
|
|
1592
|
+
clear(): void;
|
|
1593
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BuilderHistoryService, never>;
|
|
1594
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BuilderHistoryService>;
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1491
1597
|
declare const VIRTUAL_TRAIT_KEYS: Set<string>;
|
|
1492
1598
|
/**
|
|
1493
1599
|
* Strip virtual trait keys from `raw` and emit their composed CSS equivalents.
|
|
@@ -1564,5 +1670,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
|
|
|
1564
1670
|
constructor();
|
|
1565
1671
|
}
|
|
1566
1672
|
|
|
1567
|
-
export { ACTION_TYPE_OPTIONS, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DeviceMode, DragEngineService, EASING_OPTIONS, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, InteractionEngineService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PresetRegistryService, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VIRTUAL_TRAIT_KEYS, ViewportService, ZOOM_OPTIONS, buildFullStyleTraits, buildPresetStyleTraits, composeVirtualTraits, defaultPageSettings, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
|
|
1568
|
-
export type { ComponentNode, ComponentTrait, DeviceOption, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, InteractionAction, InteractionActionType, InteractionTrigger, IoxBinding, IoxContentService, 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 };
|
|
1673
|
+
export { ACTION_TYPE_OPTIONS, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CardComponentConfig, ComponentConfig, ComponentRegistryService, DEVICE_OPTIONS, DataSourceRegistryService, DeviceMode, DragEngineService, EASING_OPTIONS, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_CONTENT_SERVICE, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, InteractionsPanelComponent, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LayerTreeComponent, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PanelChildComponent, PanelComponent, PanelEventService, PanelEventTypes, PanelTypes, PresetRegistryService, ROUTE_ANIMATION_OPTIONS, RenderDirective, RepeaterComponentConfig, SCREEN_WIDTH_OPTIONS, STRUCTURAL_STATES, SUPPORTED_STATES, SectionComponent, SectionComponentConfig, StyleCategory, StyleRegistryService, TraitConfig as StyleTraitConfig, SymbolRegistryService, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VIRTUAL_TRAIT_KEYS, ViewportService, ZOOM_OPTIONS, buildFullStyleTraits, buildPresetStyleTraits, composeVirtualTraits, defaultPageSettings, generateNodeId, resolveTraitControllerType, resolveTraitOptions };
|
|
1674
|
+
export type { BuilderClipboard, ComponentNode, ComponentTrait, DeviceOption, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, HistoryEntry, InteractionAction, InteractionActionType, InteractionPreset, InteractionTrigger, IoxBinding, IoxContentService, 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 };
|