@vectoriox/iox-builder 7.0.1 → 8.0.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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
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
3
  import * as i30 from '@vectoriox/iox-ui';
4
- import { ResponsiveOverrides, RelativeSourceSpec, Breakpoint, PageStyleSettings, FormRenderState, DesignTokenLike, DesignMode, ComponentInstanceRegistryService, DataSourceEndpoints, PalettePreset, syncNodeDesignClasses } from '@vectoriox/iox-ui';
4
+ import { ResponsiveOverrides, RelativeSourceSpec, Breakpoint, PageStyleSettings, FormRenderState, AdoptContext, DesignTokenLike, DesignMode, ComponentInstanceRegistryService, DataSourceEndpoints, PalettePreset, syncNodeDesignClasses } from '@vectoriox/iox-ui';
5
5
  export { ComponentInstanceRegistryService, IoxContextSlot, PageStyleSettings, SetContextParams, VIRTUAL_TRAIT_KEYS, composeVirtualTraits } from '@vectoriox/iox-ui';
6
6
  import * as rxjs from 'rxjs';
7
7
  import { Subject, Subscription, BehaviorSubject, Observable } from 'rxjs';
@@ -906,6 +906,11 @@ declare class ComponentRegistryService {
906
906
  createBaseConfig(type: string): any | null;
907
907
  /** The unstyled base style map of a NEW node of the type — `switchElementStyle`'s baseline. */
908
908
  baselineStyleProps(type: string): Record<string, unknown>;
909
+ /** What an untouched SAVED node of the type holds — its constructor defaults, nothing on top.
910
+ * Adopt (DS7) rewrites an owned trait only while it still holds this. */
911
+ adoptionBaseline(type: string): Record<string, unknown>;
912
+ /** The context `adoptElementStyles` (design-core) reads baselines from. */
913
+ adoptionContext(): AdoptContext;
909
914
  register(type: string, component: Type<any>, config: any): void;
910
915
  getAll(): {
911
916
  type: string;
@@ -3118,14 +3123,31 @@ declare function findNodeLocation(roots: ComponentNode[], target: ComponentNode)
3118
3123
  */
3119
3124
  declare function wrapNode(roots: ComponentNode[], target: ComponentNode, wrapper: ComponentNode): ComponentNode | null;
3120
3125
 
3126
+ /**
3127
+ * State OUTSIDE the layout that one step changed together with it — e.g. adopting a page's element
3128
+ * styles (DS7) also sets the page's design-system flag and links its global elements. Opaque here;
3129
+ * the host owns its shape and restores it.
3130
+ */
3131
+ interface HistoryChange<S = unknown> {
3132
+ before: S;
3133
+ after: S;
3134
+ }
3121
3135
  interface HistoryEntry {
3122
3136
  layout: ComponentNode[];
3123
3137
  timestamp: number;
3138
+ change?: HistoryChange;
3139
+ }
3140
+ /** What undo / redo hand back: the layout to show, and — when the step carried a change — the
3141
+ * state to restore (`before` on undo, `after` on redo). */
3142
+ interface HistoryStep<S = unknown> {
3143
+ layout: ComponentNode[];
3144
+ restore?: S;
3124
3145
  }
3125
3146
  /**
3126
3147
  * BuilderHistoryService — snapshot-based undo/redo for the page builder.
3127
3148
  *
3128
- * Snapshots are JSON deep-clones of the full layout array.
3149
+ * Snapshots are JSON deep-clones of the full layout array; a step that also changed state outside
3150
+ * the layout records that change, so one undo reverts both.
3129
3151
  * Session-only — not persisted to the backend.
3130
3152
  * Scoped to PageUiComponent.providers[] — one history stack per builder instance.
3131
3153
  */
@@ -3134,10 +3156,11 @@ declare class BuilderHistoryService {
3134
3156
  private _future;
3135
3157
  get canUndo(): boolean;
3136
3158
  get canRedo(): boolean;
3137
- push(layout: ComponentNode[]): void;
3138
- undo(): ComponentNode[] | null;
3139
- redo(): ComponentNode[] | null;
3159
+ push(layout: ComponentNode[], change?: HistoryChange): void;
3160
+ undo(): HistoryStep | null;
3161
+ redo(): HistoryStep | null;
3140
3162
  clear(): void;
3163
+ private step;
3141
3164
  static ɵfac: i0.ɵɵFactoryDeclaration<BuilderHistoryService, never>;
3142
3165
  static ɵprov: i0.ɵɵInjectableDeclaration<BuilderHistoryService>;
3143
3166
  }
@@ -3554,4 +3577,4 @@ declare class TextBlockComponentConfig extends ComponentConfig {
3554
3577
  }
3555
3578
 
3556
3579
  export { ACTION_TYPE_OPTIONS, AuditCode, AuditPanelComponent, AuditSeverity, BODY_CRUMB_LABEL, BREAKPOINT_PRESENTATION, BUILDER_CANVAS_CONTAINER, BUILDER_CHROME_EN, BUILDER_FONT_LINK_ATTR, BUILDER_TOKEN_SCOPE_CLASS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, BuilderButtonBlockComponent, BuilderButtonComponentConfig, BuilderClipboardService, BuilderComponent, BuilderContainerComponent, BuilderContainerComponentConfig, BuilderDataSourceService, BuilderDialogComponent, BuilderDividerComponentConfig, BuilderHeadingComponentConfig, BuilderHistoryService, BuilderIconComponentConfig, BuilderImageComponentConfig, BuilderLinkComponentConfig, BuilderLinkedContainerComponent, BuilderLinkedContainerConfig, BuilderListComponentConfig, BuilderListItemComponentConfig, BuilderMode, BuilderRepeaterComponent, BuilderSpacerComponentConfig, ButtonBlockComponentConfig, CANVAS_EMPTY_IMAGE_LABEL_EN, CANVAS_EMPTY_IMAGE_LABEL_KEY, CANVAS_ROOT_RESET_CSS, CardComponentConfig, ChildLayoutGroupStyleConfig, ComponentConfig, ComponentRegistryService, DEFAULT_ESSENTIAL_TRAITS, DRAG_HANDLE_ATTR, DataSourceRegistryService, DataSourceType, DialogComponentConfig, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, EDITOR_CHROME_ATTRIBUTE, ESSENTIAL_TRAITS_BY_TYPE, EffectsGroupStyleConfig, FIELD_KIND_PRESETS, FIELD_PARTS, FORM_PRESETS, FORM_TYPE, FieldComponentConfig, FieldGroupComponentConfig, FormComponentConfig, FormErrorComponentConfig, FormStateService, FormSuccessComponentConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_BUILDER_CANVAS, IOX_BUILDER_LABELS, IOX_DATA_SOURCE_ENDPOINTS, InteractionEngineService, InteractionPresetRegistryService, IoxBuilderModule, IoxDraggableDirective, IoxDropzoneDirective, LAYOUT_PRESETS, LayerTreeComponent, LayoutGroupStyleConfig, ListGroupStyleConfig, NodeAction, OverlayComponent, OverlayService, PALETTE_PRESET_DEFS, 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, SubmitButtonComponentConfig, SymbolRegistryService, TARGETED_STATES, TARGETED_STATE_BASE, TRIGGER_OPTIONS, TextBlockComponentConfig, ToolbarAction, ToolbarComponent, TraitConfig, TraitInputType, TypographyGroupStyleConfig, UNITS_ALL, UNITS_DEG, UNITS_FIXED, UNITS_NO_VW, VALIDATION_STATES, VALIDATION_STATE_CLASS, ViewportService, ZOOM_OPTIONS, arrayItemSchemaFields, arraySchemaFields, auditNodes, buildConsentPreset, buildElementStyleSpecimen, buildFieldKindPreset, buildFlavorSpecimen, buildFormPreset, buildFullStyleTraits, buildLayoutPreset, buildPalettePreset, buildPresetStyleTraits, canFluidise, canvasEmptyImageLabel, collapseColumnsProps, columnCountOf, defaultBuilderLabels, defaultPageSettings, dropTargetLabel, essentialTraitsFor, findNodeLocation, findParentOf, flattenSchemaFields, fluidiseProps, generateNodeId, isHiddenAt, isSpecimen, markSpecimen, matchesControlSearch, nearestFormNode, nodeAncestorPath, nodeAncestorPathInEither, reorderProps, resolveInsertTarget, resolveTraitControllerType, resolveTraitOptions, setStyleTrait, setTrait, stackChildrenProps, summarise, syncEmptyImagePlaceholder, syncNodeDesign, textNode, visibilityProps, wrapNode };
3557
- export type { AuditFinding, AuditNode, BreakpointPresentation, BuilderClipboard, BuilderLabelResolver, ComponentEventDef, ComponentMethodDef, ComponentNode, ComponentTrait, ConsentPreset, CreateConfig, Crumb, DesignSpecimenCopy, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, FieldKindDef, FormPresetDef, FormPresetField, FormStateSnapshot, HistoryEntry, InsertTarget, InteractionAction, InteractionActionType, InteractionPreset, InteractionTrigger, IoxBinding, IoxDataSource, IoxDropEvent, IoxInteraction, IoxSymbol, LayoutPresetChildStyles, LayoutPresetDef, NodeRef, OverlayBoxModel, OverlayBoxSpacing, OverlayEntry, PageRouteAnimationSettings, PageScrollSettings, PageSettings, PalettePresetDef, PanelEvent, QuadSizeSegment, RouteAnimationPreset, ScreenWidthOption, SelectionBadge, StyleMap, StylePart, StylePreset, StyleTrait, StyleTraitGroup, TraitOptionMap, TraitSelectOption, TraitShowCondition, TreePathNode, UpsertTokensOptions, ViewportState, ZoomOption };
3580
+ export type { AuditFinding, AuditNode, BreakpointPresentation, BuilderClipboard, BuilderLabelResolver, ComponentEventDef, ComponentMethodDef, ComponentNode, ComponentTrait, ConsentPreset, CreateConfig, Crumb, DesignSpecimenCopy, DragPayload, DsFilterByQueryParam, DsFilterByRouteParam, ElementState, FieldKindDef, FormPresetDef, FormPresetField, FormStateSnapshot, HistoryChange, HistoryEntry, HistoryStep, InsertTarget, InteractionAction, InteractionActionType, InteractionPreset, InteractionTrigger, IoxBinding, IoxDataSource, IoxDropEvent, IoxInteraction, IoxSymbol, LayoutPresetChildStyles, LayoutPresetDef, NodeRef, OverlayBoxModel, OverlayBoxSpacing, OverlayEntry, PageRouteAnimationSettings, PageScrollSettings, PageSettings, PalettePresetDef, PanelEvent, QuadSizeSegment, RouteAnimationPreset, ScreenWidthOption, SelectionBadge, StyleMap, StylePart, StylePreset, StyleTrait, StyleTraitGroup, TraitOptionMap, TraitSelectOption, TraitShowCondition, TreePathNode, UpsertTokensOptions, ViewportState, ZoomOption };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-builder",
3
- "version": "7.0.1",
3
+ "version": "8.0.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
7
7
  "@angular/animations": ">=20.0.0",
8
8
  "@angular/cdk": ">=20.0.0",
9
- "@vectoriox/iox-ui": ">=5.21.0",
9
+ "@vectoriox/iox-ui": ">=5.22.0",
10
10
  "interactjs": "^1.10.27",
11
11
  "primeng": ">=20.0.0",
12
12
  "swiper": ">=12.0.0",