@vectoriox/iox-builder 1.5.5 → 1.5.7
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,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, EventEmitter, Output, Input, Directive, ChangeDetectionStrategy, Component, ViewChild, Optional, Inject, InjectionToken, ContentChildren, NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, inject, NgZone, EventEmitter, Output, Input, Directive, ChangeDetectionStrategy, Component, ViewChild, Optional, Inject, InjectionToken, ContentChildren, NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i4$1 from '@angular/forms';
|
|
@@ -1243,9 +1243,21 @@ class InteractionEngineService {
|
|
|
1243
1243
|
'swiperAutoplayStart', 'swiperAutoplayStop', 'swiperAutoplayPause',
|
|
1244
1244
|
]);
|
|
1245
1245
|
this.instanceRegistry = inject(ComponentInstanceRegistryService);
|
|
1246
|
+
this.ngZone = inject(NgZone);
|
|
1247
|
+
}
|
|
1248
|
+
/**
|
|
1249
|
+
* Run all DOM-manipulation operations (pre-state, observers, animations)
|
|
1250
|
+
* outside the Angular zone so Zone.js does not schedule unnecessary CD ticks
|
|
1251
|
+
* for each RAF/IntersectionObserver/animation callback.
|
|
1252
|
+
* The caller is responsible for calling markForCheck() / refreshSelect() inside
|
|
1253
|
+
* the zone after this returns.
|
|
1254
|
+
*/
|
|
1255
|
+
runOutside(fn) {
|
|
1256
|
+
return this.ngZone.runOutsideAngular(fn);
|
|
1246
1257
|
}
|
|
1247
1258
|
/** Wire all interactions for a node to its rendered DOM element. */
|
|
1248
|
-
attach(node) {
|
|
1259
|
+
attach(node) { this.runOutside(() => this._attach(node)); }
|
|
1260
|
+
_attach(node) {
|
|
1249
1261
|
const ref = this.overlayService.getNodeRef(node);
|
|
1250
1262
|
if (!ref)
|
|
1251
1263
|
return;
|
|
@@ -1290,7 +1302,8 @@ class InteractionEngineService {
|
|
|
1290
1302
|
this.attached.set(node, cleanups);
|
|
1291
1303
|
}
|
|
1292
1304
|
/** Tear down all interaction listeners for a node and reset its animated state. */
|
|
1293
|
-
detach(node) {
|
|
1305
|
+
detach(node) { this.runOutside(() => this._detach(node)); }
|
|
1306
|
+
_detach(node) {
|
|
1294
1307
|
const entries = this.attached.get(node);
|
|
1295
1308
|
if (!entries)
|
|
1296
1309
|
return;
|
|
@@ -1341,15 +1354,15 @@ class InteractionEngineService {
|
|
|
1341
1354
|
}
|
|
1342
1355
|
/** Re-attach interactions after they have been edited in the panel. */
|
|
1343
1356
|
refresh(node) {
|
|
1344
|
-
this.
|
|
1345
|
-
this.attach(node);
|
|
1357
|
+
this.runOutside(() => { this._detach(node); this._attach(node); });
|
|
1346
1358
|
}
|
|
1347
1359
|
/**
|
|
1348
1360
|
* Replay all interactions on a node immediately, regardless of their trigger.
|
|
1349
1361
|
* Used by the builder overlay play button for in-editor animation preview.
|
|
1350
1362
|
* Uses fill:'none' so the element returns to its natural state after the preview.
|
|
1351
1363
|
*/
|
|
1352
|
-
replay(node) {
|
|
1364
|
+
replay(node) { this.runOutside(() => this._replay(node)); }
|
|
1365
|
+
_replay(node) {
|
|
1353
1366
|
if (!node.interactions?.length)
|
|
1354
1367
|
return;
|
|
1355
1368
|
const ref = this.overlayService.getNodeRef(node);
|
|
@@ -1379,7 +1392,8 @@ class InteractionEngineService {
|
|
|
1379
1392
|
* Used by Swiper (and future components) to dispatch their events into the
|
|
1380
1393
|
* interaction engine without coupling to the engine's attach/detach lifecycle.
|
|
1381
1394
|
*/
|
|
1382
|
-
replayTrigger(nodeId, trigger) {
|
|
1395
|
+
replayTrigger(nodeId, trigger) { this.runOutside(() => this._replayTrigger(nodeId, trigger)); }
|
|
1396
|
+
_replayTrigger(nodeId, trigger) {
|
|
1383
1397
|
for (const [node] of this.attached) {
|
|
1384
1398
|
if (node.id !== nodeId)
|
|
1385
1399
|
continue;
|
|
@@ -5435,11 +5449,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
5435
5449
|
}] } });
|
|
5436
5450
|
|
|
5437
5451
|
class SliderContainerComponent {
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5452
|
+
set style(v) {
|
|
5453
|
+
if (v === this._style)
|
|
5454
|
+
return;
|
|
5455
|
+
this._style = v;
|
|
5456
|
+
// Rebuild cached value so ngStyle only re-applies when input actually changed.
|
|
5457
|
+
// Avoids DOM style-attribute mutations on every CD tick → prevents MutationObserver spam.
|
|
5458
|
+
this._editShellStyle = { ...v, position: 'relative' };
|
|
5442
5459
|
}
|
|
5460
|
+
get style() { return this._style; }
|
|
5461
|
+
get editShellStyle() { return this._editShellStyle; }
|
|
5443
5462
|
get source() { return this._source; }
|
|
5444
5463
|
set source(value) {
|
|
5445
5464
|
if (value === this._source)
|
|
@@ -5474,7 +5493,8 @@ class SliderContainerComponent {
|
|
|
5474
5493
|
this.panelEventService = panelEventService;
|
|
5475
5494
|
this.activatedRoute = activatedRoute;
|
|
5476
5495
|
this.children = [];
|
|
5477
|
-
this.
|
|
5496
|
+
this._style = {};
|
|
5497
|
+
this._editShellStyle = { position: 'relative' };
|
|
5478
5498
|
this.nodeId = '';
|
|
5479
5499
|
this.dropListId = '';
|
|
5480
5500
|
// ── Parameters ─────────────────────────────────────────────────────────────
|
|
@@ -5672,7 +5692,6 @@ class SliderContainerComponent {
|
|
|
5672
5692
|
}
|
|
5673
5693
|
_scheduleReinit() {
|
|
5674
5694
|
this._destroySwiper();
|
|
5675
|
-
this.cdr.detectChanges();
|
|
5676
5695
|
this._initRafId = requestAnimationFrame(() => this._initSwiper());
|
|
5677
5696
|
}
|
|
5678
5697
|
// ── Swiper lifecycle ────────────────────────────────────────────────────────
|
|
@@ -6218,12 +6237,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
6218
6237
|
}] } });
|
|
6219
6238
|
|
|
6220
6239
|
class SliderSlideComponent {
|
|
6240
|
+
set style(v) {
|
|
6241
|
+
if (v === this._style)
|
|
6242
|
+
return;
|
|
6243
|
+
this._style = v;
|
|
6244
|
+
// Strip width constraints; rebuild cached object so ngStyle only updates DOM
|
|
6245
|
+
// when the input actually changed — prevents spurious MutationObserver triggers.
|
|
6246
|
+
const { width, minWidth, maxWidth, ...rest } = v || {};
|
|
6247
|
+
this._slideEditStyle = rest;
|
|
6248
|
+
}
|
|
6249
|
+
get style() { return this._style; }
|
|
6250
|
+
get slideEditStyle() { return this._slideEditStyle; }
|
|
6221
6251
|
constructor(dragEngine, cdr, isPreview) {
|
|
6222
6252
|
this.dragEngine = dragEngine;
|
|
6223
6253
|
this.cdr = cdr;
|
|
6224
6254
|
this.isPreview = isPreview;
|
|
6225
6255
|
this.children = [];
|
|
6226
|
-
this.
|
|
6256
|
+
this._style = {};
|
|
6257
|
+
this._slideEditStyle = {};
|
|
6227
6258
|
this.nodeId = '';
|
|
6228
6259
|
this.dropListId = '';
|
|
6229
6260
|
this.childClick = new EventEmitter();
|
|
@@ -6231,10 +6262,6 @@ class SliderSlideComponent {
|
|
|
6231
6262
|
this.childMouseLeave = new EventEmitter();
|
|
6232
6263
|
this.isPreview = !!isPreview;
|
|
6233
6264
|
}
|
|
6234
|
-
get slideEditStyle() {
|
|
6235
|
-
const { width, minWidth, maxWidth, ...rest } = this.style || {};
|
|
6236
|
-
return rest;
|
|
6237
|
-
}
|
|
6238
6265
|
ngOnInit() { }
|
|
6239
6266
|
ngOnDestroy() { }
|
|
6240
6267
|
onDrop(event) {
|