@vectoriox/iox-builder 1.4.36 → 1.4.38
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,14 @@ 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",
|
|
371
|
+
Copy = "copy",
|
|
372
|
+
Paste = "paste"
|
|
352
373
|
}
|
|
353
374
|
declare enum NodeAction {
|
|
354
375
|
Delete = "delete",
|
|
@@ -469,7 +490,13 @@ declare enum PanelEventTypes {
|
|
|
469
490
|
/** Fired after a preset is created, updated, or deleted so panels refresh their list. */
|
|
470
491
|
PRESETS_CHANGED = "presetschanged",
|
|
471
492
|
/** Fired when a linked symbol instance's styles change — propagates to all instances. */
|
|
472
|
-
SYMBOLS_CHANGED = "symbolschanged"
|
|
493
|
+
SYMBOLS_CHANGED = "symbolschanged",
|
|
494
|
+
/** Fired on every structural or style mutation — used by BuilderHistoryService to snapshot. */
|
|
495
|
+
LAYOUT_CHANGED = "layoutchanged",
|
|
496
|
+
/** Open the Interactions panel in preset-edit mode for the given preset ID. */
|
|
497
|
+
INTERACTION_PRESET_EDIT = "interactionpresetedit",
|
|
498
|
+
/** Fired after an interaction preset is created, updated, or deleted so panels refresh. */
|
|
499
|
+
INTERACTION_PRESETS_CHANGED = "interactionpresetschanged"
|
|
473
500
|
}
|
|
474
501
|
interface PanelEvent {
|
|
475
502
|
type: PanelEventTypes;
|
|
@@ -724,6 +751,31 @@ declare class ViewportService {
|
|
|
724
751
|
static ɵprov: i0.ɵɵInjectableDeclaration<ViewportService>;
|
|
725
752
|
}
|
|
726
753
|
|
|
754
|
+
interface BuilderClipboard {
|
|
755
|
+
node?: ComponentNode;
|
|
756
|
+
presetId?: string;
|
|
757
|
+
interactionPresetId?: string;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* BuilderClipboardService — in-memory typed clipboard for the page builder.
|
|
761
|
+
*
|
|
762
|
+
* Stores element copies, style preset references, and interaction preset references.
|
|
763
|
+
* Lives in memory only — no navigator.clipboard usage.
|
|
764
|
+
* Scoped to PageUiComponent.providers[] — one clipboard per builder instance.
|
|
765
|
+
*/
|
|
766
|
+
declare class BuilderClipboardService {
|
|
767
|
+
private _clip;
|
|
768
|
+
copyNode(node: ComponentNode): void;
|
|
769
|
+
copyPreset(presetId: string): void;
|
|
770
|
+
copyInteractionPreset(interactionPresetId: string): void;
|
|
771
|
+
getNode(): ComponentNode | undefined;
|
|
772
|
+
getPresetId(): string | undefined;
|
|
773
|
+
getInteractionPresetId(): string | undefined;
|
|
774
|
+
clear(): void;
|
|
775
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BuilderClipboardService, never>;
|
|
776
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BuilderClipboardService>;
|
|
777
|
+
}
|
|
778
|
+
|
|
727
779
|
declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {
|
|
728
780
|
private registry;
|
|
729
781
|
private overlayService;
|
|
@@ -732,6 +784,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
732
784
|
private dsRegistry;
|
|
733
785
|
private viewportService;
|
|
734
786
|
private interactionEngine;
|
|
787
|
+
private clipboard;
|
|
735
788
|
private cdr;
|
|
736
789
|
private appRef;
|
|
737
790
|
layout: ComponentNode[];
|
|
@@ -743,7 +796,11 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
743
796
|
pageStatus: string;
|
|
744
797
|
pageSettings: PageSettings | null;
|
|
745
798
|
globalElements: ComponentNode[];
|
|
799
|
+
canUndo: boolean;
|
|
800
|
+
canRedo: boolean;
|
|
746
801
|
save: EventEmitter<void>;
|
|
802
|
+
undo: EventEmitter<void>;
|
|
803
|
+
redo: EventEmitter<void>;
|
|
747
804
|
back: EventEmitter<void>;
|
|
748
805
|
preview: EventEmitter<void>;
|
|
749
806
|
publishToggle: EventEmitter<void>;
|
|
@@ -822,7 +879,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
822
879
|
get canvasMinHeight(): number;
|
|
823
880
|
private sub?;
|
|
824
881
|
private registrySub?;
|
|
825
|
-
constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, cdr: ChangeDetectorRef, appRef: ApplicationRef);
|
|
882
|
+
constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, clipboard: BuilderClipboardService, cdr: ChangeDetectorRef, appRef: ApplicationRef);
|
|
826
883
|
ngOnInit(): void;
|
|
827
884
|
ngOnChanges(changes: SimpleChanges): void;
|
|
828
885
|
ngAfterViewInit(): void;
|
|
@@ -882,7 +939,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
882
939
|
private findParentNode;
|
|
883
940
|
private handlePanelEvents;
|
|
884
941
|
static ɵfac: i0.ɵɵFactoryDeclaration<BuilderComponent, never>;
|
|
885
|
-
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; }; }, { "save": "save"; "back": "back"; "preview": "preview"; "publishToggle": "publishToggle"; "pageSettingsChange": "pageSettingsChange"; "applyAnimationToAll": "applyAnimationToAll"; "saveBlock": "saveBlock"; "globalElementsChange": "globalElementsChange"; }, never, ["[builderComponents]", "[builderTokens]", "[builderPanel]"], false, never>;
|
|
942
|
+
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; }; }, { "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>;
|
|
886
943
|
}
|
|
887
944
|
|
|
888
945
|
/**
|
|
@@ -1084,11 +1141,30 @@ declare class SymbolRegistryService {
|
|
|
1084
1141
|
static ɵprov: i0.ɵɵInjectableDeclaration<SymbolRegistryService>;
|
|
1085
1142
|
}
|
|
1086
1143
|
|
|
1144
|
+
/**
|
|
1145
|
+
* InteractionPresetRegistryService — in-memory store for org-level interaction presets.
|
|
1146
|
+
*
|
|
1147
|
+
* Loaded once per page by PageUiComponent alongside the page layout.
|
|
1148
|
+
* Scoped to PageUiComponent.providers[] via IoxBuilderModule — one registry per builder instance.
|
|
1149
|
+
*/
|
|
1150
|
+
declare class InteractionPresetRegistryService {
|
|
1151
|
+
private presets;
|
|
1152
|
+
setPresets(presets: InteractionPreset[]): void;
|
|
1153
|
+
getPreset(id: string): InteractionPreset | undefined;
|
|
1154
|
+
getAll(): InteractionPreset[];
|
|
1155
|
+
upsert(preset: InteractionPreset): void;
|
|
1156
|
+
remove(id: string): void;
|
|
1157
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InteractionPresetRegistryService, never>;
|
|
1158
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InteractionPresetRegistryService>;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1087
1161
|
declare class OverlayComponent implements OnInit, OnDestroy {
|
|
1088
1162
|
private overlayService;
|
|
1089
1163
|
private viewportService;
|
|
1090
1164
|
private presetRegistry;
|
|
1091
1165
|
private symbolRegistry;
|
|
1166
|
+
private interactionPresetRegistry;
|
|
1167
|
+
private clipboard;
|
|
1092
1168
|
private styleRegistry;
|
|
1093
1169
|
private cdr;
|
|
1094
1170
|
toolbarAction: EventEmitter<{
|
|
@@ -1112,7 +1188,7 @@ declare class OverlayComponent implements OnInit, OnDestroy {
|
|
|
1112
1188
|
private _scrollRaf;
|
|
1113
1189
|
private boundScrollUpdate;
|
|
1114
1190
|
private activeScrollContainer;
|
|
1115
|
-
constructor(overlayService: OverlayService, viewportService: ViewportService, presetRegistry: PresetRegistryService, symbolRegistry: SymbolRegistryService, styleRegistry: StyleRegistryService, cdr: ChangeDetectorRef);
|
|
1191
|
+
constructor(overlayService: OverlayService, viewportService: ViewportService, presetRegistry: PresetRegistryService, symbolRegistry: SymbolRegistryService, interactionPresetRegistry: InteractionPresetRegistryService, clipboard: BuilderClipboardService, styleRegistry: StyleRegistryService, cdr: ChangeDetectorRef);
|
|
1116
1192
|
ngOnInit(): void;
|
|
1117
1193
|
ngOnDestroy(): void;
|
|
1118
1194
|
onSelectParent(event: MouseEvent): void;
|
|
@@ -1130,7 +1206,18 @@ declare class OverlayComponent implements OnInit, OnDestroy {
|
|
|
1130
1206
|
get selectedPresetName(): string | null;
|
|
1131
1207
|
get isLinkedSymbol(): boolean;
|
|
1132
1208
|
get linkedSymbolName(): string | null;
|
|
1209
|
+
get selectedInteractionPresetName(): string | null;
|
|
1210
|
+
get hasPresetInClipboard(): boolean;
|
|
1211
|
+
get hasInteractionPresetInClipboard(): boolean;
|
|
1133
1212
|
onEditPreset(event: MouseEvent): void;
|
|
1213
|
+
onEditInteractionPreset(event: MouseEvent): void;
|
|
1214
|
+
get hasCopiedNode(): boolean;
|
|
1215
|
+
onCopyNode(event: MouseEvent): void;
|
|
1216
|
+
onPasteNode(event: MouseEvent): void;
|
|
1217
|
+
onCopyPreset(event: MouseEvent): void;
|
|
1218
|
+
onPastePreset(event: MouseEvent): void;
|
|
1219
|
+
onCopyInteractionPreset(event: MouseEvent): void;
|
|
1220
|
+
onPasteInteractionPreset(event: MouseEvent): void;
|
|
1134
1221
|
onDetachSymbol(event: MouseEvent): void;
|
|
1135
1222
|
private observeSelectElement;
|
|
1136
1223
|
private updateAll;
|
|
@@ -1492,6 +1579,30 @@ declare class IoxBuilderModule {
|
|
|
1492
1579
|
static ɵinj: i0.ɵɵInjectorDeclaration<IoxBuilderModule>;
|
|
1493
1580
|
}
|
|
1494
1581
|
|
|
1582
|
+
interface HistoryEntry {
|
|
1583
|
+
layout: ComponentNode[];
|
|
1584
|
+
timestamp: number;
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* BuilderHistoryService — snapshot-based undo/redo for the page builder.
|
|
1588
|
+
*
|
|
1589
|
+
* Snapshots are JSON deep-clones of the full layout array.
|
|
1590
|
+
* Session-only — not persisted to the backend.
|
|
1591
|
+
* Scoped to PageUiComponent.providers[] — one history stack per builder instance.
|
|
1592
|
+
*/
|
|
1593
|
+
declare class BuilderHistoryService {
|
|
1594
|
+
private _past;
|
|
1595
|
+
private _future;
|
|
1596
|
+
get canUndo(): boolean;
|
|
1597
|
+
get canRedo(): boolean;
|
|
1598
|
+
push(layout: ComponentNode[]): void;
|
|
1599
|
+
undo(): ComponentNode[] | null;
|
|
1600
|
+
redo(): ComponentNode[] | null;
|
|
1601
|
+
clear(): void;
|
|
1602
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BuilderHistoryService, never>;
|
|
1603
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BuilderHistoryService>;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1495
1606
|
declare const VIRTUAL_TRAIT_KEYS: Set<string>;
|
|
1496
1607
|
/**
|
|
1497
1608
|
* Strip virtual trait keys from `raw` and emit their composed CSS equivalents.
|
|
@@ -1568,5 +1679,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
|
|
|
1568
1679
|
constructor();
|
|
1569
1680
|
}
|
|
1570
1681
|
|
|
1571
|
-
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 };
|
|
1572
|
-
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 };
|
|
1682
|
+
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 };
|
|
1683
|
+
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 };
|