@vectoriox/iox-builder 3.4.0 → 3.5.1
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.
|
@@ -1,24 +1,24 @@
|
|
|
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
|
|
3
|
+
import * as i28 from '@vectoriox/iox-ui';
|
|
4
4
|
import { RelativeSourceSpec, DataSourceEndpoints } from '@vectoriox/iox-ui';
|
|
5
5
|
export { ComponentInstanceRegistryService, IoxContextSlot, 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';
|
|
8
8
|
import * as _vectoriox_iox_builder from '@vectoriox/iox-builder';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i23 from 'primeng/popover';
|
|
10
10
|
import { Popover } from 'primeng/popover';
|
|
11
11
|
import { HttpClient } from '@angular/common/http';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i20 from '@angular/cdk/drag-drop';
|
|
13
13
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
14
|
+
import * as i18 from '@angular/common';
|
|
15
|
+
import * as i19 from '@angular/forms';
|
|
16
|
+
import * as i21 from 'primeng/accordion';
|
|
17
|
+
import * as i22 from 'primeng/button';
|
|
18
|
+
import * as i24 from 'primeng/inputtext';
|
|
19
|
+
import * as i25 from 'primeng/select';
|
|
20
|
+
import * as i26 from 'primeng/tooltip';
|
|
21
|
+
import * as i27 from 'primeng/dialog';
|
|
22
22
|
|
|
23
23
|
declare enum StyleCategory {
|
|
24
24
|
Layout = "Layout",
|
|
@@ -1375,6 +1375,9 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1375
1375
|
activeZoom: number;
|
|
1376
1376
|
activeScreenWidth: number;
|
|
1377
1377
|
selectedItem: ComponentNode | null;
|
|
1378
|
+
/** Root → selected node. Drives the breadcrumb bar. Recomputed on every selection
|
|
1379
|
+
* change (never a getter — see `_emitElementSelect`). */
|
|
1380
|
+
selectedPath: ComponentNode[];
|
|
1378
1381
|
isDragging: boolean;
|
|
1379
1382
|
scrollThumbTop: number;
|
|
1380
1383
|
scrollThumbHeight: number;
|
|
@@ -1477,6 +1480,11 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1477
1480
|
handleMouseEnter(event: any): void;
|
|
1478
1481
|
handleMouseLeave(): void;
|
|
1479
1482
|
handleCanvasClick(): void;
|
|
1483
|
+
/** Breadcrumb crumb clicked — select that ancestor. Mirrors a layer-tree click. */
|
|
1484
|
+
onCrumbSelect(node: ComponentNode): void;
|
|
1485
|
+
/** Breadcrumb crumb hovered (or `null` on leave) — outline it on the canvas so the chain
|
|
1486
|
+
* is readable without clicking through it. */
|
|
1487
|
+
onCrumbPeek(node: ComponentNode | null): void;
|
|
1480
1488
|
onTreeNodeSelect(node: ComponentNode): void;
|
|
1481
1489
|
onTreeNodeAction(event: {
|
|
1482
1490
|
action: NodeAction;
|
|
@@ -1502,6 +1510,9 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1502
1510
|
scrollPercentage?: number;
|
|
1503
1511
|
}): void;
|
|
1504
1512
|
private findNodeInTree;
|
|
1513
|
+
/** Immediate parent of `target` within `children`, or null at a root. Derives from the
|
|
1514
|
+
* shared `nodeAncestorPath` walk in `utils/node-path.util.ts` — one tree recursion to
|
|
1515
|
+
* keep correct, not one per caller. */
|
|
1505
1516
|
private findParentNode;
|
|
1506
1517
|
/** Returns the closest ancestor (or self) of `target` that has a `symbolId`. */
|
|
1507
1518
|
private findSymbolAncestorOf;
|
|
@@ -2280,9 +2291,55 @@ declare class LayerTreeComponent implements OnInit, OnDestroy {
|
|
|
2280
2291
|
static ɵcmp: i0.ɵɵComponentDeclaration<LayerTreeComponent, "app-layer-tree", never, { "layout": { "alias": "layout"; "required": false; }; "globalElements": { "alias": "globalElements"; "required": false; }; }, { "nodeSelect": "nodeSelect"; "nodeAction": "nodeAction"; "nodeMove": "nodeMove"; }, never, never, false, never>;
|
|
2281
2292
|
}
|
|
2282
2293
|
|
|
2294
|
+
/** One rendered crumb — precomputed so the template binds fields, never method calls. */
|
|
2295
|
+
interface Crumb {
|
|
2296
|
+
node: ComponentNode;
|
|
2297
|
+
label: string;
|
|
2298
|
+
/** True for the last crumb (the selected node itself). */
|
|
2299
|
+
isCurrent: boolean;
|
|
2300
|
+
}
|
|
2301
|
+
/** A state badge shown on the right of the bar for the selected node. */
|
|
2302
|
+
interface SelectionBadge {
|
|
2303
|
+
icon: string;
|
|
2304
|
+
label: string;
|
|
2305
|
+
title: string;
|
|
2306
|
+
}
|
|
2307
|
+
/**
|
|
2308
|
+
* The element path bar — the full ancestor chain of the selected node, clickable,
|
|
2309
|
+
* plus a badge for each piece of node state that otherwise only surfaces by opening
|
|
2310
|
+
* a different panel (bound / symbol / preset / interactions / global).
|
|
2311
|
+
*
|
|
2312
|
+
* Presentational: it holds no tree and does no lookups. The builder computes the path
|
|
2313
|
+
* (see `utils/node-path.util.ts`) and passes it in.
|
|
2314
|
+
*
|
|
2315
|
+
* See iox-ai-guidance `architecture/builder/builder-usability-plan.md` (B1).
|
|
2316
|
+
*/
|
|
2317
|
+
declare class BreadcrumbBarComponent {
|
|
2318
|
+
/** Root → selected node. Empty when nothing is selected. */
|
|
2319
|
+
set path(value: ComponentNode[] | null | undefined);
|
|
2320
|
+
/** Emitted when a crumb is clicked — the builder selects that node. */
|
|
2321
|
+
nodeSelect: EventEmitter<ComponentNode>;
|
|
2322
|
+
/** Emitted on crumb hover (and `null` on leave) — the builder outlines it on canvas. */
|
|
2323
|
+
nodePeek: EventEmitter<ComponentNode | null>;
|
|
2324
|
+
crumbs: Crumb[];
|
|
2325
|
+
badges: SelectionBadge[];
|
|
2326
|
+
trackCrumb(_index: number, crumb: Crumb): ComponentNode;
|
|
2327
|
+
trackBadge(_index: number, badge: SelectionBadge): string;
|
|
2328
|
+
onSelect(crumb: Crumb): void;
|
|
2329
|
+
onPeek(crumb: Crumb): void;
|
|
2330
|
+
onPeekEnd(): void;
|
|
2331
|
+
/**
|
|
2332
|
+
* Node state that today is only discoverable by visiting another panel. Built as a
|
|
2333
|
+
* data table rather than a chain of ifs so a new badge is one row.
|
|
2334
|
+
*/
|
|
2335
|
+
private buildBadges;
|
|
2336
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbBarComponent, never>;
|
|
2337
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbBarComponent, "app-breadcrumb-bar", never, { "path": { "alias": "path"; "required": false; }; }, { "nodeSelect": "nodeSelect"; "nodePeek": "nodePeek"; }, never, never, false, never>;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2283
2340
|
declare class IoxBuilderModule {
|
|
2284
2341
|
static ɵfac: i0.ɵɵFactoryDeclaration<IoxBuilderModule, never>;
|
|
2285
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IoxBuilderModule, [typeof BuilderComponent, typeof RenderDirective, typeof IoxDraggableDirective, typeof IoxDropzoneDirective, typeof OverlayComponent, typeof ToolbarComponent, typeof SectionComponent, typeof BuilderContainerComponent, typeof BuilderLinkedContainerComponent, typeof BuilderRepeaterComponent, typeof BuilderButtonBlockComponent, typeof SliderContainerComponent, typeof SliderSlideComponent, typeof PanelComponent, typeof PanelChildComponent, typeof LayerTreeComponent], [typeof
|
|
2342
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IoxBuilderModule, [typeof BuilderComponent, typeof RenderDirective, typeof IoxDraggableDirective, typeof IoxDropzoneDirective, typeof OverlayComponent, typeof ToolbarComponent, typeof SectionComponent, typeof BuilderContainerComponent, typeof BuilderLinkedContainerComponent, typeof BuilderRepeaterComponent, typeof BuilderButtonBlockComponent, typeof SliderContainerComponent, typeof SliderSlideComponent, typeof PanelComponent, typeof PanelChildComponent, typeof LayerTreeComponent, typeof BreadcrumbBarComponent], [typeof i18.CommonModule, typeof i19.FormsModule, typeof i20.DragDropModule, typeof i21.AccordionModule, typeof i22.ButtonModule, typeof i23.PopoverModule, typeof i24.InputTextModule, typeof i25.SelectModule, typeof i26.TooltipModule, typeof i27.DialogModule, typeof i28.IoxPageModule], [typeof i18.CommonModule, typeof i19.FormsModule, typeof i20.DragDropModule, typeof i21.AccordionModule, typeof i22.ButtonModule, typeof i23.PopoverModule, typeof i24.InputTextModule, typeof i25.SelectModule, typeof i26.TooltipModule, typeof i27.DialogModule, typeof i28.IoxPageModule, typeof BuilderComponent, typeof RenderDirective, typeof IoxDraggableDirective, typeof IoxDropzoneDirective, typeof OverlayComponent, typeof ToolbarComponent, typeof SectionComponent, typeof BuilderContainerComponent, typeof BuilderLinkedContainerComponent, typeof BuilderRepeaterComponent, typeof BuilderButtonBlockComponent, typeof SliderContainerComponent, typeof SliderSlideComponent, typeof PanelComponent, typeof PanelChildComponent, typeof LayerTreeComponent, typeof BreadcrumbBarComponent]>;
|
|
2286
2343
|
static ɵinj: i0.ɵɵInjectorDeclaration<IoxBuilderModule>;
|
|
2287
2344
|
}
|
|
2288
2345
|
|
|
@@ -2360,6 +2417,45 @@ interface IoxFontManager {
|
|
|
2360
2417
|
}[];
|
|
2361
2418
|
}
|
|
2362
2419
|
|
|
2420
|
+
/**
|
|
2421
|
+
* node-path — pure ancestor-chain helpers for the builder's node tree.
|
|
2422
|
+
*
|
|
2423
|
+
* The builder needs a node's ancestor chain in several places: the breadcrumb bar,
|
|
2424
|
+
* "select parent", and the parent-scoped style traits (Child Layout). Each of those
|
|
2425
|
+
* used to re-walk the tree with its own private recursion. `nodeAncestorPath` is the
|
|
2426
|
+
* single walk they all derive from.
|
|
2427
|
+
*
|
|
2428
|
+
* Builder-only on purpose: the SSR engine never needs a breadcrumb, so this stays in
|
|
2429
|
+
* `iox-builder` rather than `@vectoriox/iox-ui` (which is the home for logic BOTH
|
|
2430
|
+
* renderers consume). Structural helpers the two renderers share live in
|
|
2431
|
+
* `@vectoriox/iox-ui` `style-compiler/tree-relations.ts`.
|
|
2432
|
+
*/
|
|
2433
|
+
/** Minimal shape these helpers need — any node with optional children. */
|
|
2434
|
+
interface TreePathNode {
|
|
2435
|
+
children?: TreePathNode[] | null;
|
|
2436
|
+
}
|
|
2437
|
+
/**
|
|
2438
|
+
* The chain of nodes from a root down to (and including) `target`, matched by
|
|
2439
|
+
* REFERENCE identity. Returns `null` when `target` is not in the tree.
|
|
2440
|
+
*
|
|
2441
|
+
* Depth-first, pre-order; first match wins. Reference identity (not `id`) is the right
|
|
2442
|
+
* matcher here because the builder mutates nodes in place and repeater/slider clones
|
|
2443
|
+
* deliberately share a template's `styleId` — matching by id would return the template's
|
|
2444
|
+
* path for a clone.
|
|
2445
|
+
*/
|
|
2446
|
+
declare function nodeAncestorPath<T extends TreePathNode>(roots: readonly T[] | null | undefined, target: T | null | undefined): T[] | null;
|
|
2447
|
+
/**
|
|
2448
|
+
* The immediate parent of `target`, or `null` when it is a root node or not in the tree.
|
|
2449
|
+
* Derived from `nodeAncestorPath` so there is exactly one tree walk to keep correct.
|
|
2450
|
+
*/
|
|
2451
|
+
declare function findParentOf<T extends TreePathNode>(roots: readonly T[] | null | undefined, target: T | null | undefined): T | null;
|
|
2452
|
+
/**
|
|
2453
|
+
* The ancestor chain across BOTH builder trees — the page layout and the global
|
|
2454
|
+
* elements overlay, which are separate roots. Returns the first tree that contains
|
|
2455
|
+
* the node, or `null` when neither does.
|
|
2456
|
+
*/
|
|
2457
|
+
declare function nodeAncestorPathInEither<T extends TreePathNode>(layout: readonly T[] | null | undefined, globalElements: readonly T[] | null | undefined, target: T | null | undefined): T[] | null;
|
|
2458
|
+
|
|
2363
2459
|
declare class BuilderButtonComponentConfig extends ComponentConfig {
|
|
2364
2460
|
constructor();
|
|
2365
2461
|
}
|
|
@@ -2448,5 +2544,5 @@ declare class TextBlockComponentConfig extends ComponentConfig {
|
|
|
2448
2544
|
constructor();
|
|
2449
2545
|
}
|
|
2450
2546
|
|
|
2451
|
-
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, DRAG_HANDLE_ATTR, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, EffectsGroupStyleConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, 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, TARGETED_STATES, TARGETED_STATE_BASE, 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, findNodeLocation, flattenSchemaFields, generateNodeId, resolveTraitControllerType, resolveTraitOptions, wrapNode };
|
|
2452
|
-
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 };
|
|
2547
|
+
export { ACTION_TYPE_OPTIONS, BackgroundGroupStyleConfig, BorderGroupStyleConfig, BreadcrumbBarComponent, 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, DRAG_HANDLE_ATTR, DataSourceRegistryService, DataSourceType, DeviceMode, DimensionsGroupStyleConfig, DragEngineService, EASING_OPTIONS, EffectsGroupStyleConfig, GalleryConfig, GroupStyleConfig, INTERACTION_STATES, INVERSE_ACTION, IOX_DATA_SOURCE_ENDPOINTS, IOX_FONT_MANAGER, InteractionEngineService, InteractionPresetRegistryService, 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, TARGETED_STATES, TARGETED_STATE_BASE, 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, findNodeLocation, findParentOf, flattenSchemaFields, generateNodeId, nodeAncestorPath, nodeAncestorPathInEither, resolveTraitControllerType, resolveTraitOptions, wrapNode };
|
|
2548
|
+
export type { BuilderClipboard, ComponentEventDef, ComponentMethodDef, ComponentNode, ComponentTrait, Crumb, 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, SelectionBadge, StylePreset, StyleTrait, StyleTraitGroup, TraitOptionMap, TraitSelectOption, TraitShowCondition, TreePathNode, ViewportState, ZoomOption };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vectoriox/iox-builder",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=20.0.0",
|
|
6
6
|
"@angular/core": ">=20.0.0",
|
|
@@ -18,15 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"module": "fesm2022/vectoriox-iox-builder.mjs",
|
|
21
|
-
"typings": "
|
|
21
|
+
"typings": "index.d.ts",
|
|
22
22
|
"exports": {
|
|
23
23
|
"./package.json": {
|
|
24
24
|
"default": "./package.json"
|
|
25
25
|
},
|
|
26
26
|
".": {
|
|
27
|
-
"types": "./
|
|
27
|
+
"types": "./index.d.ts",
|
|
28
28
|
"default": "./fesm2022/vectoriox-iox-builder.mjs"
|
|
29
29
|
}
|
|
30
|
-
}
|
|
31
|
-
"type": "module"
|
|
30
|
+
}
|
|
32
31
|
}
|