@vectoriox/iox-builder 2.0.2 → 2.0.4
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
|
@@ -852,6 +852,9 @@ declare class MoveableCanvasService {
|
|
|
852
852
|
private target;
|
|
853
853
|
private node;
|
|
854
854
|
private sourceId;
|
|
855
|
+
/** A rubber-band multi-select group is active; `groupAt` guards the immediate follow-up click. */
|
|
856
|
+
private groupActive;
|
|
857
|
+
private groupAt;
|
|
855
858
|
/** Called after a successful reorder so the host can emit LAYOUT_CHANGED / refresh selection. */
|
|
856
859
|
onReorder: (() => void) | null;
|
|
857
860
|
/** Called after a geometry commit (resize) so the host can emit LAYOUT_CHANGED (undo/save). */
|
|
@@ -867,6 +870,13 @@ declare class MoveableCanvasService {
|
|
|
867
870
|
}): void;
|
|
868
871
|
/** Point Moveable at the selected element (skips inline-edit + preview-clone targets). */
|
|
869
872
|
select(element: HTMLElement | null, node: ComponentNode | null): void;
|
|
873
|
+
/**
|
|
874
|
+
* Multi-select group (Selecto rubber-band → group move). With 2+ targets Moveable shows its
|
|
875
|
+
* bounding box + handles for the whole group; with ≤1 it defers to the normal single-select
|
|
876
|
+
* path (select()), which keeps the OverlayService as the sole owner of single-selection visuals.
|
|
877
|
+
* Returns true when a group is active so the host can skip the single-select wiring.
|
|
878
|
+
*/
|
|
879
|
+
selectGroup(elements: HTMLElement[]): boolean;
|
|
870
880
|
/** Recompute the control-box position (call on scroll/zoom/layout changes). */
|
|
871
881
|
refresh(): void;
|
|
872
882
|
/** Snap guideline elements for `target`: every node host except itself, its ancestors, and its
|
|
@@ -897,6 +907,44 @@ declare class MoveableCanvasService {
|
|
|
897
907
|
static ɵprov: i0.ɵɵInjectableDeclaration<MoveableCanvasService>;
|
|
898
908
|
}
|
|
899
909
|
|
|
910
|
+
/**
|
|
911
|
+
* SelectoCanvasService — Phase 1 of the Moveable + Selecto migration
|
|
912
|
+
* (see iox-ai-guidance/architecture/builder/moveable-migration.md).
|
|
913
|
+
*
|
|
914
|
+
* Rubber-band MULTI-select on the canvas. Runs ONLY when `moveableMode` is on; interact.js is
|
|
915
|
+
* untouched, so the flag-off path is byte-identical to today.
|
|
916
|
+
*
|
|
917
|
+
* - `selectFromInside: false` — a drag that STARTS on a node moves it (Moveable); the rubber band
|
|
918
|
+
* only starts from empty canvas space, so single-element drag/select is unaffected.
|
|
919
|
+
* - `selectByClick: false` — a plain click still flows through the existing single-select path
|
|
920
|
+
* (OverlayService), so nothing about clicking changes.
|
|
921
|
+
* - `rootContainer` is the UNtransformed `.preview` (Selecto explicitly wants a non-transformed
|
|
922
|
+
* root): the rubber band and the targets' client rects are then in the same viewport space, so
|
|
923
|
+
* hit-testing is correct even though the canvas content is `transform: scale()`d.
|
|
924
|
+
*
|
|
925
|
+
* On a rubber-band release it emits the selected node host elements; the host maps them to nodes and
|
|
926
|
+
* drives Moveable with the group (see MoveableCanvasService.selectGroup).
|
|
927
|
+
*/
|
|
928
|
+
declare class SelectoCanvasService {
|
|
929
|
+
private selecto;
|
|
930
|
+
/** Called on rubber-band release with the selected `.iox-node-*` host elements (may be empty). */
|
|
931
|
+
onSelect: ((elements: HTMLElement[]) => void) | null;
|
|
932
|
+
/** Count from the last rubber-band release (state/telemetry). */
|
|
933
|
+
lastSelectedCount: number;
|
|
934
|
+
/**
|
|
935
|
+
* Wire Selecto onto the canvas.
|
|
936
|
+
* @param container untransformed element the rubber band renders into (`.preview`).
|
|
937
|
+
* @param dragContainer element the drag is listened on (the same `.preview`).
|
|
938
|
+
* @param selectableRoot the node container whose `.iox-node-*` descendants are selectable.
|
|
939
|
+
*/
|
|
940
|
+
init(container: HTMLElement, dragContainer: HTMLElement, selectableRoot: HTMLElement): void;
|
|
941
|
+
/** Keep Selecto's selectable set fresh after layout changes (nodes added/removed/reordered). */
|
|
942
|
+
refresh(): void;
|
|
943
|
+
destroy(): void;
|
|
944
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectoCanvasService, never>;
|
|
945
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SelectoCanvasService>;
|
|
946
|
+
}
|
|
947
|
+
|
|
900
948
|
/**
|
|
901
949
|
* Page-scoped registry that holds the current page's data sources.
|
|
902
950
|
* Scoped to PageUiComponent.providers[] so every builder service
|
|
@@ -1119,6 +1167,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1119
1167
|
private cdr;
|
|
1120
1168
|
private appRef;
|
|
1121
1169
|
private moveableCanvas;
|
|
1170
|
+
private selectoCanvas;
|
|
1122
1171
|
layout: ComponentNode[];
|
|
1123
1172
|
dataSources: IoxDataSource[];
|
|
1124
1173
|
orgId: string;
|
|
@@ -1215,7 +1264,7 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1215
1264
|
get canvasMinHeight(): number;
|
|
1216
1265
|
private sub?;
|
|
1217
1266
|
private registrySub?;
|
|
1218
|
-
constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, interactionPresetRegistry: InteractionPresetRegistryService, clipboard: BuilderClipboardService, symbolRegistry: SymbolRegistryService, cdr: ChangeDetectorRef, appRef: ApplicationRef, moveableCanvas: MoveableCanvasService);
|
|
1267
|
+
constructor(registry: ComponentRegistryService, overlayService: OverlayService, panelEventService: PanelEventService, dragEngine: DragEngineService, dsRegistry: DataSourceRegistryService, viewportService: ViewportService, interactionEngine: InteractionEngineService, interactionPresetRegistry: InteractionPresetRegistryService, clipboard: BuilderClipboardService, symbolRegistry: SymbolRegistryService, cdr: ChangeDetectorRef, appRef: ApplicationRef, moveableCanvas: MoveableCanvasService, selectoCanvas: SelectoCanvasService);
|
|
1219
1268
|
ngOnInit(): void;
|
|
1220
1269
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1221
1270
|
ngAfterViewInit(): void;
|