@vectoriox/iox-ui 4.0.6 → 4.0.8

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,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, HostListener, Output, Input, Directive, NgModule, Injectable, ViewChild, Component, Host, Optional, forwardRef, Inject, PLATFORM_ID, InjectionToken } from '@angular/core';
2
+ import { EventEmitter, HostListener, Output, Input, Directive, NgModule, Injectable, ViewChild, Component, Host, Optional, forwardRef, Inject, PLATFORM_ID, InjectionToken, ChangeDetectionStrategy, ViewContainerRef } from '@angular/core';
3
3
  import * as i2 from '@angular/animations';
4
4
  import { style, animate } from '@angular/animations';
5
5
  import { Subject, of } from 'rxjs';
6
6
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { Masonry } from '@fristys/masonry';
8
8
  import { BrowserModule } from '@angular/platform-browser';
9
- import * as i3 from '@angular/common';
9
+ import * as i1$2 from '@angular/common';
10
10
  import { isPlatformBrowser, CommonModule } from '@angular/common';
11
11
  import Lenis from 'lenis';
12
12
  import * as i1 from 'ngx-cookie-service';
@@ -491,7 +491,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
491
491
  }] });
492
492
 
493
493
  class PageScrollProvider {
494
- constructor(platformId) {
494
+ constructor(zone, platformId) {
495
+ this.zone = zone;
495
496
  this.platformId = platformId;
496
497
  }
497
498
  init(options) {
@@ -531,18 +532,20 @@ class PageScrollProvider {
531
532
  startLoop() {
532
533
  if (!this.lenis)
533
534
  return;
534
- const loop = (time) => {
535
- this.lenis.raf(time);
535
+ this.zone.runOutsideAngular(() => {
536
+ const loop = (time) => {
537
+ this.lenis.raf(time);
538
+ this.rafId = requestAnimationFrame(loop);
539
+ };
536
540
  this.rafId = requestAnimationFrame(loop);
537
- };
538
- this.rafId = requestAnimationFrame(loop);
541
+ });
539
542
  }
540
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
543
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider, deps: [{ token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
541
544
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider }); }
542
545
  }
543
546
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider, decorators: [{
544
547
  type: Injectable
545
- }], ctorParameters: () => [{ type: undefined, decorators: [{
548
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: undefined, decorators: [{
546
549
  type: Inject,
547
550
  args: [PLATFORM_ID]
548
551
  }] }] });
@@ -553,6 +556,7 @@ class IoxPageComponent {
553
556
  this.platformId = platformId;
554
557
  this.class = '';
555
558
  this.scrollEnabled = true;
559
+ this.scrollOptions = {};
556
560
  this.scrollEvent = new EventEmitter();
557
561
  }
558
562
  ngAfterViewInit() {
@@ -561,9 +565,9 @@ class IoxPageComponent {
561
565
  this.pageScrollProvider.init({
562
566
  wrapper: this.page.nativeElement,
563
567
  content: this.page.nativeElement.querySelector('.page-mask'),
564
- duration: 1.2,
565
- easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
568
+ ...this.scrollOptions,
566
569
  });
570
+ let _dispatching = false;
567
571
  this.pageScrollProvider.instance.on('scroll', ({ scroll, progress }) => {
568
572
  const el = this.page.nativeElement;
569
573
  this.scrollEvent.emit({
@@ -575,14 +579,20 @@ class IoxPageComponent {
575
579
  clientWidth: el.clientWidth,
576
580
  scrollPercentage: progress * 100,
577
581
  });
582
+ // Guard against re-entry: dispatching 'scroll' on the Lenis wrapper
583
+ // triggers onNativeScroll → re-emits the Lenis scroll event → infinite loop.
584
+ if (_dispatching)
585
+ return;
586
+ _dispatching = true;
578
587
  el.dispatchEvent(new Event('scroll'));
588
+ _dispatching = false;
579
589
  });
580
590
  }
581
591
  ngOnDestroy() {
582
592
  this.pageScrollProvider.destroy();
583
593
  }
584
594
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageComponent, deps: [{ token: PageScrollProvider }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
585
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: IoxPageComponent, isStandalone: false, selector: "iox-page-component", inputs: { class: "class", scrollEnabled: "scrollEnabled" }, outputs: { scrollEvent: "scrollEvent" }, viewQueries: [{ propertyName: "page", first: true, predicate: ["page"], descendants: true }], ngImport: i0, template: "<div #page [class]=\"class\" class=\"iox-page-wrapper\">\n <div class=\"page-mask\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{position:absolute;inset:0}.iox-page-wrapper{position:relative;width:100%;height:100%;overflow:auto}.page-mask{min-height:100%}\n"] }); }
595
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: IoxPageComponent, isStandalone: false, selector: "iox-page-component", inputs: { class: "class", scrollEnabled: "scrollEnabled", scrollOptions: "scrollOptions" }, outputs: { scrollEvent: "scrollEvent" }, viewQueries: [{ propertyName: "page", first: true, predicate: ["page"], descendants: true }], ngImport: i0, template: "<div #page [class]=\"class\" class=\"iox-page-wrapper\">\n <div class=\"page-mask\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{position:absolute;inset:0}.iox-page-wrapper{position:relative;width:100%;height:100%;overflow:auto}.page-mask{min-height:100%}\n"] }); }
586
596
  }
587
597
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageComponent, decorators: [{
588
598
  type: Component,
@@ -594,6 +604,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
594
604
  type: Input
595
605
  }], scrollEnabled: [{
596
606
  type: Input
607
+ }], scrollOptions: [{
608
+ type: Input
597
609
  }], page: [{
598
610
  type: ViewChild,
599
611
  args: ['page']
@@ -766,7 +778,7 @@ class PrivacyModalComponent {
766
778
  this.isOpen = false;
767
779
  }
768
780
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalComponent, deps: [{ token: PrivacyModalService }, { token: ConsentService }], target: i0.ɵɵFactoryTarget.Component }); }
769
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: PrivacyModalComponent, isStandalone: false, selector: "privacy-modal", ngImport: i0, template: "<div class=\"privacy-modal\" [ngClass]=\"{'open': isOpen, 'closed': !isOpen}\">\n <div class=\"modal-content\">\n <h2>\u05D0\u05E0\u05D7\u05E0\u05D5 \u05E9\u05D5\u05DE\u05E8\u05D9\u05DD \u05E2\u05DC \u05D4\u05E4\u05E8\u05D8\u05D9\u05D5\u05EA \u05E9\u05DC\u05DA</h2>\n <p dir=\"rtl\">\n <span>\n \u05D0\u05E0\u05D7\u05E0\u05D5 \u05DE\u05E9\u05DE\u05E9\u05D9\u05DD \u05D1\u05E7\u05D1\u05E6\u05D9 \n </span>\n <span>Cookies </span>\n <span>\u05DB\u05D3\u05D9 \u05DC\u05E9\u05E4\u05E8 \u05D0\u05EA \u05D7\u05D5\u05D5\u05D9\u05EA \u05D4\u05D2\u05DC\u05D9\u05E9\u05D4 \u05E9\u05DC\u05DA, \u05DC\u05E0\u05EA\u05D7 \u05E9\u05D9\u05DE\u05D5\u05E9 \u05D1\u05D0\u05EA\u05E8 \u05D5\u05DC\u05D4\u05E6\u05D9\u05E2 \u05EA\u05D5\u05DB\u05DF \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA.</span>\n <span> \u05DC\u05DE\u05D9\u05D3\u05E2 \u05E0\u05D5\u05E1\u05E3 \u05E2\u05DC \u05D0\u05D9\u05DA \u05D0\u05E0\u05D7\u05E0\u05D5 \u05DE\u05E9\u05EA\u05DE\u05E9\u05D9\u05DD \u05D1\u05DE\u05D9\u05D3\u05E2 \u05E9\u05DC\u05DA, \u05E8\u05D0\u05D4 \u05D0\u05EA <a target=\"_blank\" href=\"/privacy\">\u05DE\u05D3\u05D9\u05E0\u05D9\u05D5\u05EA \u05D4\u05E4\u05E8\u05D8\u05D9\u05D5\u05EA </a> \u05E9\u05DC\u05E0\u05D5</span>\n </p>\n\n <div class=\"button-container\">\n <button class=\"accept-button\" (click)=\"onAccept()\">\u05D0\u05E0\u05D9 \u05DE\u05E1\u05DB\u05D9\u05DD</button>\n <button class=\"decline-button\" (click)=\"onDecline()\">\u05D0\u05E0\u05D9 \u05DC\u05D0 \u05DE\u05E1\u05DB\u05D9\u05DD</button>\n </div>\n </div>\n</div>\n", styles: [".privacy-modal{padding:2em;background:#fff;border-radius:8px;position:fixed;z-index:10000000000000;bottom:0;left:0;right:0;height:25vh;display:flex;align-items:center;justify-content:center;transform:translateY(100%);transition:transform .3s ease-in-out}.privacy-modal.open{transform:translateY(0);transition:transform .3s ease-in-out}.modal-content{width:40vw;text-align:right}.privacy-modal h2{margin-top:0;text-align:right;font-size:2.1vw;color:#6b4f3b}.privacy-modal p{font-size:1.3vw;color:#6b4f3b}.button-container{display:flex;justify-content:flex-end;margin-top:20px}.button-container button{border:0;margin-inline-start:15px;font-size:1vw}.button-container .accept-button{background:#6b4f3b;color:#fff;padding:.5em 1em;border-radius:4px;cursor:pointer}.button-container .accept-button:hover{background:#5b4332}.button-container .decline-button{background:transparent;color:#6b4f3b;padding:0;cursor:pointer;border-bottom:1px solid #fff}.button-container .decline-button:hover{border-bottom:1px solid #6b4f3b}@media (max-width: 768px){.privacy-modal h2{font-size:8.2vw}.privacy-modal p{font-size:4.2vw}.privacy-modal .modal-content{width:80vw}.privacy-modal .button-container button{font-size:3.2vw}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
781
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: PrivacyModalComponent, isStandalone: false, selector: "privacy-modal", ngImport: i0, template: "<div class=\"privacy-modal\" [ngClass]=\"{'open': isOpen, 'closed': !isOpen}\">\n <div class=\"modal-content\">\n <h2>\u05D0\u05E0\u05D7\u05E0\u05D5 \u05E9\u05D5\u05DE\u05E8\u05D9\u05DD \u05E2\u05DC \u05D4\u05E4\u05E8\u05D8\u05D9\u05D5\u05EA \u05E9\u05DC\u05DA</h2>\n <p dir=\"rtl\">\n <span>\n \u05D0\u05E0\u05D7\u05E0\u05D5 \u05DE\u05E9\u05DE\u05E9\u05D9\u05DD \u05D1\u05E7\u05D1\u05E6\u05D9 \n </span>\n <span>Cookies </span>\n <span>\u05DB\u05D3\u05D9 \u05DC\u05E9\u05E4\u05E8 \u05D0\u05EA \u05D7\u05D5\u05D5\u05D9\u05EA \u05D4\u05D2\u05DC\u05D9\u05E9\u05D4 \u05E9\u05DC\u05DA, \u05DC\u05E0\u05EA\u05D7 \u05E9\u05D9\u05DE\u05D5\u05E9 \u05D1\u05D0\u05EA\u05E8 \u05D5\u05DC\u05D4\u05E6\u05D9\u05E2 \u05EA\u05D5\u05DB\u05DF \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA.</span>\n <span> \u05DC\u05DE\u05D9\u05D3\u05E2 \u05E0\u05D5\u05E1\u05E3 \u05E2\u05DC \u05D0\u05D9\u05DA \u05D0\u05E0\u05D7\u05E0\u05D5 \u05DE\u05E9\u05EA\u05DE\u05E9\u05D9\u05DD \u05D1\u05DE\u05D9\u05D3\u05E2 \u05E9\u05DC\u05DA, \u05E8\u05D0\u05D4 \u05D0\u05EA <a target=\"_blank\" href=\"/privacy\">\u05DE\u05D3\u05D9\u05E0\u05D9\u05D5\u05EA \u05D4\u05E4\u05E8\u05D8\u05D9\u05D5\u05EA </a> \u05E9\u05DC\u05E0\u05D5</span>\n </p>\n\n <div class=\"button-container\">\n <button class=\"accept-button\" (click)=\"onAccept()\">\u05D0\u05E0\u05D9 \u05DE\u05E1\u05DB\u05D9\u05DD</button>\n <button class=\"decline-button\" (click)=\"onDecline()\">\u05D0\u05E0\u05D9 \u05DC\u05D0 \u05DE\u05E1\u05DB\u05D9\u05DD</button>\n </div>\n </div>\n</div>\n", styles: [".privacy-modal{padding:2em;background:#fff;border-radius:8px;position:fixed;z-index:10000000000000;bottom:0;left:0;right:0;height:25vh;display:flex;align-items:center;justify-content:center;transform:translateY(100%);transition:transform .3s ease-in-out}.privacy-modal.open{transform:translateY(0);transition:transform .3s ease-in-out}.modal-content{width:40vw;text-align:right}.privacy-modal h2{margin-top:0;text-align:right;font-size:2.1vw;color:#6b4f3b}.privacy-modal p{font-size:1.3vw;color:#6b4f3b}.button-container{display:flex;justify-content:flex-end;margin-top:20px}.button-container button{border:0;margin-inline-start:15px;font-size:1vw}.button-container .accept-button{background:#6b4f3b;color:#fff;padding:.5em 1em;border-radius:4px;cursor:pointer}.button-container .accept-button:hover{background:#5b4332}.button-container .decline-button{background:transparent;color:#6b4f3b;padding:0;cursor:pointer;border-bottom:1px solid #fff}.button-container .decline-button:hover{border-bottom:1px solid #6b4f3b}@media (max-width: 768px){.privacy-modal h2{font-size:8.2vw}.privacy-modal p{font-size:4.2vw}.privacy-modal .modal-content{width:80vw}.privacy-modal .button-container button{font-size:3.2vw}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
770
782
  }
771
783
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalComponent, decorators: [{
772
784
  type: Component,
@@ -948,6 +960,771 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
948
960
  args: [PLATFORM_ID]
949
961
  }] }] });
950
962
 
963
+ const IS_PREVIEW = new InjectionToken('IS_PREVIEW');
964
+ const IOX_BUILDER_EVENTS = new InjectionToken('IOX_BUILDER_EVENTS');
965
+
966
+ class BuilderImageComponent {
967
+ constructor() {
968
+ this.src = 'https://placehold.co/600x400?text=Image';
969
+ this.alt = 'Image';
970
+ this.objectFit = 'cover';
971
+ this.nodeId = '';
972
+ }
973
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
974
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderImageComponent, isStandalone: false, selector: "app-builder-image", inputs: { src: "src", alt: "alt", objectFit: "objectFit", nodeId: "nodeId" }, ngImport: i0, template: `
975
+ <img [src]="src" [alt]="alt" [ngClass]="'iox-node-' + nodeId" [style.object-fit]="objectFit" />
976
+ `, isInline: true, styles: ["img{display:block;max-width:100%}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
977
+ }
978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderImageComponent, decorators: [{
979
+ type: Component,
980
+ args: [{ selector: 'app-builder-image', template: `
981
+ <img [src]="src" [alt]="alt" [ngClass]="'iox-node-' + nodeId" [style.object-fit]="objectFit" />
982
+ `, standalone: false, styles: ["img{display:block;max-width:100%}\n"] }]
983
+ }], propDecorators: { src: [{
984
+ type: Input
985
+ }], alt: [{
986
+ type: Input
987
+ }], objectFit: [{
988
+ type: Input
989
+ }], nodeId: [{
990
+ type: Input
991
+ }] } });
992
+
993
+ class BuilderSpacerComponent {
994
+ constructor() {
995
+ this.nodeId = '';
996
+ }
997
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
998
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderSpacerComponent, isStandalone: false, selector: "app-builder-spacer", inputs: { nodeId: "nodeId" }, ngImport: i0, template: `<div class="iox-spacer" [ngClass]="'iox-node-' + nodeId"></div>`, isInline: true, styles: [".iox-spacer{display:block;flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
999
+ }
1000
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderSpacerComponent, decorators: [{
1001
+ type: Component,
1002
+ args: [{ selector: 'app-builder-spacer', template: `<div class="iox-spacer" [ngClass]="'iox-node-' + nodeId"></div>`, standalone: false, styles: [".iox-spacer{display:block;flex-shrink:0}\n"] }]
1003
+ }], propDecorators: { nodeId: [{
1004
+ type: Input
1005
+ }] } });
1006
+
1007
+ class CardComponent {
1008
+ constructor() {
1009
+ this.title = '';
1010
+ this.image = '';
1011
+ this.description = '';
1012
+ this.nodeId = '';
1013
+ }
1014
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1015
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CardComponent, isStandalone: false, selector: "app-card", inputs: { title: "title", image: "image", description: "description", nodeId: "nodeId" }, ngImport: i0, template: `
1016
+ <div class="card" [ngClass]="'iox-node-' + nodeId">
1017
+ <div class="image-wrapper">
1018
+ <img [src]="image" alt="Card image" class="card-img">
1019
+ </div>
1020
+ <h2>{{ title }}</h2>
1021
+ <p>{{ description }}</p>
1022
+ </div>
1023
+ `, isInline: true, styles: [".image-wrapper{width:100%;aspect-ratio:1/1;overflow:hidden;margin-bottom:.75rem}\n", ".card-img{width:100%;height:100%;object-fit:cover}\n", "h2{margin:0 0 .5rem;font-size:1.2rem}\n", "p{margin:0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1024
+ }
1025
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CardComponent, decorators: [{
1026
+ type: Component,
1027
+ args: [{ selector: 'app-card', template: `
1028
+ <div class="card" [ngClass]="'iox-node-' + nodeId">
1029
+ <div class="image-wrapper">
1030
+ <img [src]="image" alt="Card image" class="card-img">
1031
+ </div>
1032
+ <h2>{{ title }}</h2>
1033
+ <p>{{ description }}</p>
1034
+ </div>
1035
+ `, standalone: false, styles: [".image-wrapper{width:100%;aspect-ratio:1/1;overflow:hidden;margin-bottom:.75rem}\n", ".card-img{width:100%;height:100%;object-fit:cover}\n", "h2{margin:0 0 .5rem;font-size:1.2rem}\n", "p{margin:0}\n"] }]
1036
+ }], propDecorators: { title: [{
1037
+ type: Input
1038
+ }], image: [{
1039
+ type: Input
1040
+ }], description: [{
1041
+ type: Input
1042
+ }], nodeId: [{
1043
+ type: Input
1044
+ }] } });
1045
+
1046
+ class BuilderDividerComponent {
1047
+ constructor() {
1048
+ this.nodeId = '';
1049
+ }
1050
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1051
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderDividerComponent, isStandalone: false, selector: "app-builder-divider", inputs: { nodeId: "nodeId" }, ngImport: i0, template: `<div class="iox-divider" [ngClass]="'iox-node-' + nodeId"></div>`, isInline: true, styles: [".iox-divider{box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1052
+ }
1053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderDividerComponent, decorators: [{
1054
+ type: Component,
1055
+ args: [{ selector: 'app-builder-divider', template: `<div class="iox-divider" [ngClass]="'iox-node-' + nodeId"></div>`, standalone: false, styles: [".iox-divider{box-sizing:border-box}\n"] }]
1056
+ }], propDecorators: { nodeId: [{
1057
+ type: Input
1058
+ }] } });
1059
+
1060
+ class BuilderIconComponent {
1061
+ constructor() {
1062
+ /** Full Phosphor icon CSS class string, e.g. "ph-thin ph-star" */
1063
+ this.iconClass = 'ph-thin ph-star';
1064
+ this.nodeId = '';
1065
+ }
1066
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1067
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderIconComponent, isStandalone: false, selector: "app-builder-icon", inputs: { iconClass: "iconClass", nodeId: "nodeId" }, ngImport: i0, template: `<i [ngClass]="[iconClass, 'iox-node-' + nodeId]"></i>`, isInline: true, styles: ["i{display:inline-block;line-height:1}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1068
+ }
1069
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderIconComponent, decorators: [{
1070
+ type: Component,
1071
+ args: [{ selector: 'app-builder-icon', template: `<i [ngClass]="[iconClass, 'iox-node-' + nodeId]"></i>`, standalone: false, styles: ["i{display:inline-block;line-height:1}\n"] }]
1072
+ }], propDecorators: { iconClass: [{
1073
+ type: Input
1074
+ }], nodeId: [{
1075
+ type: Input
1076
+ }] } });
1077
+
1078
+ class BuilderLinkComponent {
1079
+ constructor(isPreview) {
1080
+ this.isPreview = isPreview;
1081
+ this.label = 'Click here';
1082
+ this.linkType = 'external';
1083
+ this.url = 'https://';
1084
+ this.pageRoute = '';
1085
+ this.target = '_self';
1086
+ this.style = {};
1087
+ }
1088
+ get resolvedHref() {
1089
+ if (this.linkType !== 'page')
1090
+ return this.url || '#';
1091
+ return this.pageRoute || '#';
1092
+ }
1093
+ onLinkClick(event) {
1094
+ if (!this.isPreview) {
1095
+ event.preventDefault();
1096
+ event.stopPropagation();
1097
+ }
1098
+ }
1099
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderLinkComponent, deps: [{ token: IS_PREVIEW, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1100
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderLinkComponent, isStandalone: false, selector: "app-builder-link", inputs: { label: "label", linkType: "linkType", url: "url", pageRoute: "pageRoute", target: "target", style: "style" }, ngImport: i0, template: `
1101
+ <a [href]="isPreview ? resolvedHref : null"
1102
+ [attr.target]="isPreview ? target : null"
1103
+ [ngStyle]="style"
1104
+ [style.pointerEvents]="isPreview ? '' : 'none'"
1105
+ class="builder-link"
1106
+ (click)="onLinkClick($event)">
1107
+ {{ label }}
1108
+ </a>
1109
+ `, isInline: true, styles: [".builder-link{display:inline;cursor:pointer;color:inherit}\n"], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1110
+ }
1111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderLinkComponent, decorators: [{
1112
+ type: Component,
1113
+ args: [{ selector: 'app-builder-link', template: `
1114
+ <a [href]="isPreview ? resolvedHref : null"
1115
+ [attr.target]="isPreview ? target : null"
1116
+ [ngStyle]="style"
1117
+ [style.pointerEvents]="isPreview ? '' : 'none'"
1118
+ class="builder-link"
1119
+ (click)="onLinkClick($event)">
1120
+ {{ label }}
1121
+ </a>
1122
+ `, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".builder-link{display:inline;cursor:pointer;color:inherit}\n"] }]
1123
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1124
+ type: Optional
1125
+ }, {
1126
+ type: Inject,
1127
+ args: [IS_PREVIEW]
1128
+ }] }], propDecorators: { label: [{
1129
+ type: Input
1130
+ }], linkType: [{
1131
+ type: Input
1132
+ }], url: [{
1133
+ type: Input
1134
+ }], pageRoute: [{
1135
+ type: Input
1136
+ }], target: [{
1137
+ type: Input
1138
+ }], style: [{
1139
+ type: Input
1140
+ }] } });
1141
+
1142
+ class BuilderButtonComponent {
1143
+ constructor(events) {
1144
+ this.events = events;
1145
+ this.label = 'Click me';
1146
+ this.link = '#';
1147
+ this.variant = 'primary';
1148
+ this.nodeId = '';
1149
+ this.node = null;
1150
+ this.editing = false;
1151
+ }
1152
+ ngOnInit() { }
1153
+ startEdit(event) {
1154
+ if (this.isBound('label'))
1155
+ return;
1156
+ event.preventDefault();
1157
+ event.stopPropagation();
1158
+ this.editing = true;
1159
+ setTimeout(() => event.target.focus());
1160
+ }
1161
+ commitEdit(event) {
1162
+ if (!this.editing)
1163
+ return;
1164
+ this.editing = false;
1165
+ const newValue = event.target.innerText.trim();
1166
+ this.label = newValue;
1167
+ this.syncTraitToPanel('label', newValue);
1168
+ }
1169
+ onKeyDown(event) {
1170
+ if (event.key === 'Enter') {
1171
+ event.preventDefault();
1172
+ event.target.blur();
1173
+ }
1174
+ if (event.key === 'Escape') {
1175
+ this.editing = false;
1176
+ event.target.blur();
1177
+ }
1178
+ event.stopPropagation();
1179
+ }
1180
+ isBound(prop) {
1181
+ return (this.node?.bindings || []).some(b => b.prop === prop);
1182
+ }
1183
+ syncTraitToPanel(prop, value) {
1184
+ if (!this.node || !this.events)
1185
+ return;
1186
+ const trait = (this.node.traits || []).find(t => t.name === prop);
1187
+ if (trait) {
1188
+ trait.default = value;
1189
+ }
1190
+ this.events.emit('elementselect', { node: this.node, componentRef: null });
1191
+ }
1192
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderButtonComponent, deps: [{ token: IOX_BUILDER_EVENTS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1193
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderButtonComponent, isStandalone: false, selector: "app-builder-button", inputs: { label: "label", link: "link", variant: "variant", nodeId: "nodeId", node: "node" }, ngImport: i0, template: `
1194
+ <a [href]="link" class="builder-btn" [ngClass]="['variant-' + variant, 'iox-node-' + nodeId]"
1195
+ [attr.contenteditable]="editing ? 'true' : null"
1196
+ (dblclick)="startEdit($event)"
1197
+ (blur)="commitEdit($event)"
1198
+ (keydown)="onKeyDown($event)">
1199
+ {{ label }}
1200
+ </a>
1201
+ `, isInline: true, styles: [".builder-btn{display:inline-block;padding:.6rem 1.5rem;border-radius:6px;font-size:.9rem;text-decoration:none;cursor:pointer;text-align:center;transition:opacity .15s}.variant-primary{background:#cb9090;color:#fff;border:1px solid #cb9090}.variant-outlined{background:transparent;color:#cb9090;border:1px solid #cb9090}.variant-text{background:transparent;color:#cb9090;border:1px solid transparent}[contenteditable]{outline:2px solid #cb9090;cursor:text}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1202
+ }
1203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderButtonComponent, decorators: [{
1204
+ type: Component,
1205
+ args: [{ selector: 'app-builder-button', template: `
1206
+ <a [href]="link" class="builder-btn" [ngClass]="['variant-' + variant, 'iox-node-' + nodeId]"
1207
+ [attr.contenteditable]="editing ? 'true' : null"
1208
+ (dblclick)="startEdit($event)"
1209
+ (blur)="commitEdit($event)"
1210
+ (keydown)="onKeyDown($event)">
1211
+ {{ label }}
1212
+ </a>
1213
+ `, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".builder-btn{display:inline-block;padding:.6rem 1.5rem;border-radius:6px;font-size:.9rem;text-decoration:none;cursor:pointer;text-align:center;transition:opacity .15s}.variant-primary{background:#cb9090;color:#fff;border:1px solid #cb9090}.variant-outlined{background:transparent;color:#cb9090;border:1px solid #cb9090}.variant-text{background:transparent;color:#cb9090;border:1px solid transparent}[contenteditable]{outline:2px solid #cb9090;cursor:text}\n"] }]
1214
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1215
+ type: Optional
1216
+ }, {
1217
+ type: Inject,
1218
+ args: [IOX_BUILDER_EVENTS]
1219
+ }] }], propDecorators: { label: [{
1220
+ type: Input
1221
+ }], link: [{
1222
+ type: Input
1223
+ }], variant: [{
1224
+ type: Input
1225
+ }], nodeId: [{
1226
+ type: Input
1227
+ }], node: [{
1228
+ type: Input
1229
+ }] } });
1230
+
1231
+ class BuilderHeadingComponent {
1232
+ constructor(events, cdr) {
1233
+ this.events = events;
1234
+ this.cdr = cdr;
1235
+ this.content = 'Heading';
1236
+ this.level = 'h2';
1237
+ this.nodeId = '';
1238
+ this.node = null;
1239
+ this.editing = false;
1240
+ }
1241
+ ngOnInit() { }
1242
+ onMouseDown(event) {
1243
+ if (this.editing) {
1244
+ event.stopPropagation();
1245
+ }
1246
+ }
1247
+ startEdit(event) {
1248
+ if (this.isBound('content'))
1249
+ return;
1250
+ event.stopPropagation();
1251
+ this.editing = true;
1252
+ this.cdr.detectChanges();
1253
+ this.cdr.detach();
1254
+ const el = event.target;
1255
+ setTimeout(() => { el.focus(); });
1256
+ }
1257
+ commitEdit(event) {
1258
+ if (!this.editing)
1259
+ return;
1260
+ this.editing = false;
1261
+ const newValue = event.target.innerText;
1262
+ this.content = newValue;
1263
+ this.cdr.reattach();
1264
+ this.syncTraitToPanel('content', newValue);
1265
+ }
1266
+ onKeyDown(event) {
1267
+ if (event.key === 'Enter' && !event.shiftKey) {
1268
+ event.preventDefault();
1269
+ event.target.blur();
1270
+ }
1271
+ if (event.key === 'Escape') {
1272
+ this.editing = false;
1273
+ this.cdr.reattach();
1274
+ event.target.blur();
1275
+ }
1276
+ event.stopPropagation();
1277
+ }
1278
+ isBound(prop) {
1279
+ return (this.node?.bindings || []).some(b => b.prop === prop);
1280
+ }
1281
+ syncTraitToPanel(prop, value) {
1282
+ if (!this.node || !this.events)
1283
+ return;
1284
+ const trait = (this.node.traits || []).find(t => t.name === prop);
1285
+ if (trait) {
1286
+ trait.default = value;
1287
+ }
1288
+ this.events.emit('elementselect', { node: this.node, componentRef: null, isCanvasUpdate: true });
1289
+ }
1290
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderHeadingComponent, deps: [{ token: IOX_BUILDER_EVENTS, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1291
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderHeadingComponent, isStandalone: false, selector: "app-builder-heading", inputs: { content: "content", level: "level", nodeId: "nodeId", node: "node" }, ngImport: i0, template: `
1292
+ <ng-container [ngSwitch]="level">
1293
+ <h1 *ngSwitchCase="'h1'" [ngClass]="'iox-node-' + nodeId"
1294
+ [attr.contenteditable]="editing ? 'true' : null"
1295
+ (mousedown)="onMouseDown($event)"
1296
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h1>
1297
+ <h2 *ngSwitchCase="'h2'" [ngClass]="'iox-node-' + nodeId"
1298
+ [attr.contenteditable]="editing ? 'true' : null"
1299
+ (mousedown)="onMouseDown($event)"
1300
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h2>
1301
+ <h3 *ngSwitchCase="'h3'" [ngClass]="'iox-node-' + nodeId"
1302
+ [attr.contenteditable]="editing ? 'true' : null"
1303
+ (mousedown)="onMouseDown($event)"
1304
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h3>
1305
+ <h4 *ngSwitchCase="'h4'" [ngClass]="'iox-node-' + nodeId"
1306
+ [attr.contenteditable]="editing ? 'true' : null"
1307
+ (mousedown)="onMouseDown($event)"
1308
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h4>
1309
+ <h5 *ngSwitchCase="'h5'" [ngClass]="'iox-node-' + nodeId"
1310
+ [attr.contenteditable]="editing ? 'true' : null"
1311
+ (mousedown)="onMouseDown($event)"
1312
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h5>
1313
+ <h6 *ngSwitchDefault [ngClass]="'iox-node-' + nodeId"
1314
+ [attr.contenteditable]="editing ? 'true' : null"
1315
+ (mousedown)="onMouseDown($event)"
1316
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h6>
1317
+ </ng-container>
1318
+ `, isInline: true, styles: ["h1,h2,h3,h4,h5,h6{margin:0}[contenteditable]{outline:none;cursor:text}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1319
+ }
1320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderHeadingComponent, decorators: [{
1321
+ type: Component,
1322
+ args: [{ selector: 'app-builder-heading', template: `
1323
+ <ng-container [ngSwitch]="level">
1324
+ <h1 *ngSwitchCase="'h1'" [ngClass]="'iox-node-' + nodeId"
1325
+ [attr.contenteditable]="editing ? 'true' : null"
1326
+ (mousedown)="onMouseDown($event)"
1327
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h1>
1328
+ <h2 *ngSwitchCase="'h2'" [ngClass]="'iox-node-' + nodeId"
1329
+ [attr.contenteditable]="editing ? 'true' : null"
1330
+ (mousedown)="onMouseDown($event)"
1331
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h2>
1332
+ <h3 *ngSwitchCase="'h3'" [ngClass]="'iox-node-' + nodeId"
1333
+ [attr.contenteditable]="editing ? 'true' : null"
1334
+ (mousedown)="onMouseDown($event)"
1335
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h3>
1336
+ <h4 *ngSwitchCase="'h4'" [ngClass]="'iox-node-' + nodeId"
1337
+ [attr.contenteditable]="editing ? 'true' : null"
1338
+ (mousedown)="onMouseDown($event)"
1339
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h4>
1340
+ <h5 *ngSwitchCase="'h5'" [ngClass]="'iox-node-' + nodeId"
1341
+ [attr.contenteditable]="editing ? 'true' : null"
1342
+ (mousedown)="onMouseDown($event)"
1343
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h5>
1344
+ <h6 *ngSwitchDefault [ngClass]="'iox-node-' + nodeId"
1345
+ [attr.contenteditable]="editing ? 'true' : null"
1346
+ (mousedown)="onMouseDown($event)"
1347
+ (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h6>
1348
+ </ng-container>
1349
+ `, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["h1,h2,h3,h4,h5,h6{margin:0}[contenteditable]{outline:none;cursor:text}\n"] }]
1350
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1351
+ type: Optional
1352
+ }, {
1353
+ type: Inject,
1354
+ args: [IOX_BUILDER_EVENTS]
1355
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { content: [{
1356
+ type: Input
1357
+ }], level: [{
1358
+ type: Input
1359
+ }], nodeId: [{
1360
+ type: Input
1361
+ }], node: [{
1362
+ type: Input
1363
+ }] } });
1364
+
1365
+ class TextBlockComponent {
1366
+ constructor(events, cdr) {
1367
+ this.events = events;
1368
+ this.cdr = cdr;
1369
+ this.content = 'Enter text here';
1370
+ this.tag = 'p';
1371
+ this.style = {};
1372
+ this.nodeId = '';
1373
+ this.node = null;
1374
+ this.editing = false;
1375
+ }
1376
+ ngOnInit() { }
1377
+ onMouseDown(event) {
1378
+ if (this.editing) {
1379
+ event.stopPropagation();
1380
+ }
1381
+ }
1382
+ startEdit(event) {
1383
+ if (this.isBound('content'))
1384
+ return;
1385
+ event.stopPropagation();
1386
+ this.editing = true;
1387
+ this.cdr.detectChanges();
1388
+ this.cdr.detach();
1389
+ const el = event.target;
1390
+ setTimeout(() => { el.focus(); });
1391
+ }
1392
+ commitEdit(event) {
1393
+ if (!this.editing)
1394
+ return;
1395
+ this.editing = false;
1396
+ const newValue = event.target.innerText;
1397
+ this.content = newValue;
1398
+ this.cdr.reattach();
1399
+ this.syncTraitToPanel('content', newValue);
1400
+ }
1401
+ onKeyDown(event) {
1402
+ if (event.key === 'Enter' && !event.shiftKey) {
1403
+ event.preventDefault();
1404
+ event.target.blur();
1405
+ }
1406
+ if (event.key === 'Escape') {
1407
+ this.editing = false;
1408
+ this.cdr.reattach();
1409
+ event.target.blur();
1410
+ }
1411
+ event.stopPropagation();
1412
+ }
1413
+ isBound(prop) {
1414
+ return (this.node?.bindings || []).some(b => b.prop === prop);
1415
+ }
1416
+ syncTraitToPanel(prop, value) {
1417
+ if (!this.node || !this.events)
1418
+ return;
1419
+ const trait = (this.node.traits || []).find(t => t.name === prop);
1420
+ if (trait) {
1421
+ trait.default = value;
1422
+ }
1423
+ this.events.emit('elementselect', { node: this.node, componentRef: null, isCanvasUpdate: true });
1424
+ }
1425
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TextBlockComponent, deps: [{ token: IOX_BUILDER_EVENTS, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1426
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: TextBlockComponent, isStandalone: false, selector: "app-text-block", inputs: { content: "content", tag: "tag", style: "style", nodeId: "nodeId", node: "node" }, ngImport: i0, template: `
1427
+ <ng-container [ngSwitch]="tag">
1428
+ <p *ngSwitchDefault
1429
+ [ngClass]="'iox-node-' + nodeId"
1430
+ [attr.contenteditable]="editing ? 'true' : null"
1431
+ (mousedown)="onMouseDown($event)"
1432
+ (dblclick)="startEdit($event)"
1433
+ (blur)="commitEdit($event)"
1434
+ (keydown)="onKeyDown($event)">{{ content }}</p>
1435
+ <span *ngSwitchCase="'span'"
1436
+ [ngClass]="'iox-node-' + nodeId"
1437
+ [attr.contenteditable]="editing ? 'true' : null"
1438
+ (mousedown)="onMouseDown($event)"
1439
+ (dblclick)="startEdit($event)"
1440
+ (blur)="commitEdit($event)"
1441
+ (keydown)="onKeyDown($event)">{{ content }}</span>
1442
+ </ng-container>
1443
+ `, isInline: true, styles: ["p,span{margin:0}[contenteditable]{outline:none;cursor:text}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }] }); }
1444
+ }
1445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TextBlockComponent, decorators: [{
1446
+ type: Component,
1447
+ args: [{ selector: 'app-text-block', template: `
1448
+ <ng-container [ngSwitch]="tag">
1449
+ <p *ngSwitchDefault
1450
+ [ngClass]="'iox-node-' + nodeId"
1451
+ [attr.contenteditable]="editing ? 'true' : null"
1452
+ (mousedown)="onMouseDown($event)"
1453
+ (dblclick)="startEdit($event)"
1454
+ (blur)="commitEdit($event)"
1455
+ (keydown)="onKeyDown($event)">{{ content }}</p>
1456
+ <span *ngSwitchCase="'span'"
1457
+ [ngClass]="'iox-node-' + nodeId"
1458
+ [attr.contenteditable]="editing ? 'true' : null"
1459
+ (mousedown)="onMouseDown($event)"
1460
+ (dblclick)="startEdit($event)"
1461
+ (blur)="commitEdit($event)"
1462
+ (keydown)="onKeyDown($event)">{{ content }}</span>
1463
+ </ng-container>
1464
+ `, standalone: false, styles: ["p,span{margin:0}[contenteditable]{outline:none;cursor:text}\n"] }]
1465
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1466
+ type: Optional
1467
+ }, {
1468
+ type: Inject,
1469
+ args: [IOX_BUILDER_EVENTS]
1470
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { content: [{
1471
+ type: Input
1472
+ }], tag: [{
1473
+ type: Input
1474
+ }], style: [{
1475
+ type: Input
1476
+ }], nodeId: [{
1477
+ type: Input
1478
+ }], node: [{
1479
+ type: Input
1480
+ }] } });
1481
+
1482
+ class SectionComponent {
1483
+ constructor() {
1484
+ this.nodeId = '';
1485
+ }
1486
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1487
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: SectionComponent, isStandalone: false, selector: "iox-section", inputs: { nodeId: "nodeId" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
1488
+ <div class="section-root" [ngClass]="['iox-node-' + nodeId]">
1489
+ <ng-container #childrenHost></ng-container>
1490
+ </div>
1491
+ `, isInline: true, styles: [".section-root{position:relative;box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1492
+ }
1493
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SectionComponent, decorators: [{
1494
+ type: Component,
1495
+ args: [{ selector: 'iox-section', template: `
1496
+ <div class="section-root" [ngClass]="['iox-node-' + nodeId]">
1497
+ <ng-container #childrenHost></ng-container>
1498
+ </div>
1499
+ `, standalone: false, styles: [".section-root{position:relative;box-sizing:border-box}\n"] }]
1500
+ }], propDecorators: { nodeId: [{
1501
+ type: Input
1502
+ }], childrenHost: [{
1503
+ type: ViewChild,
1504
+ args: ['childrenHost', { read: ViewContainerRef, static: true }]
1505
+ }] } });
1506
+
1507
+ class ContainerComponent {
1508
+ constructor() {
1509
+ this.nodeId = '';
1510
+ }
1511
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1512
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ContainerComponent, isStandalone: false, selector: "iox-container", inputs: { nodeId: "nodeId" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
1513
+ <div class="container-root" [ngClass]="['iox-node-' + nodeId]">
1514
+ <ng-container #childrenHost></ng-container>
1515
+ </div>
1516
+ `, isInline: true, styles: [".container-root{position:relative;box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1517
+ }
1518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContainerComponent, decorators: [{
1519
+ type: Component,
1520
+ args: [{ selector: 'iox-container', template: `
1521
+ <div class="container-root" [ngClass]="['iox-node-' + nodeId]">
1522
+ <ng-container #childrenHost></ng-container>
1523
+ </div>
1524
+ `, standalone: false, styles: [".container-root{position:relative;box-sizing:border-box}\n"] }]
1525
+ }], propDecorators: { nodeId: [{
1526
+ type: Input
1527
+ }], childrenHost: [{
1528
+ type: ViewChild,
1529
+ args: ['childrenHost', { read: ViewContainerRef, static: true }]
1530
+ }] } });
1531
+
1532
+ class LinkedContainerComponent {
1533
+ constructor(elRef, isPreview) {
1534
+ this.elRef = elRef;
1535
+ this.isPreview = isPreview;
1536
+ this.nodeId = '';
1537
+ this.linkType = 'external';
1538
+ this.url = 'https://';
1539
+ this.pageRoute = '';
1540
+ this.target = '_self';
1541
+ this.capturePreventDefault = (e) => e.preventDefault();
1542
+ }
1543
+ ngOnInit() {
1544
+ if (!this.isPreview) {
1545
+ this.elRef.nativeElement.addEventListener('click', this.capturePreventDefault, true);
1546
+ }
1547
+ }
1548
+ ngOnDestroy() {
1549
+ if (!this.isPreview) {
1550
+ this.elRef.nativeElement.removeEventListener('click', this.capturePreventDefault, true);
1551
+ }
1552
+ }
1553
+ get resolvedHref() {
1554
+ if (this.linkType !== 'page')
1555
+ return this.url || '#';
1556
+ return this.pageRoute || '#';
1557
+ }
1558
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkedContainerComponent, deps: [{ token: i0.ElementRef }, { token: IS_PREVIEW, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1559
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: LinkedContainerComponent, isStandalone: false, selector: "iox-linked-container", inputs: { nodeId: "nodeId", linkType: "linkType", url: "url", pageRoute: "pageRoute", target: "target" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
1560
+ <a [href]="resolvedHref"
1561
+ [target]="target"
1562
+ [ngClass]="['iox-node-' + nodeId]"
1563
+ class="linked-container-root">
1564
+ <ng-container #childrenHost></ng-container>
1565
+ </a>
1566
+ `, isInline: true, styles: [".linked-container-root{display:block;position:relative;box-sizing:border-box;text-decoration:none;color:inherit;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1567
+ }
1568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkedContainerComponent, decorators: [{
1569
+ type: Component,
1570
+ args: [{ selector: 'iox-linked-container', template: `
1571
+ <a [href]="resolvedHref"
1572
+ [target]="target"
1573
+ [ngClass]="['iox-node-' + nodeId]"
1574
+ class="linked-container-root">
1575
+ <ng-container #childrenHost></ng-container>
1576
+ </a>
1577
+ `, standalone: false, styles: [".linked-container-root{display:block;position:relative;box-sizing:border-box;text-decoration:none;color:inherit;cursor:pointer}\n"] }]
1578
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
1579
+ type: Optional
1580
+ }, {
1581
+ type: Inject,
1582
+ args: [IS_PREVIEW]
1583
+ }] }], propDecorators: { nodeId: [{
1584
+ type: Input
1585
+ }], linkType: [{
1586
+ type: Input
1587
+ }], url: [{
1588
+ type: Input
1589
+ }], pageRoute: [{
1590
+ type: Input
1591
+ }], target: [{
1592
+ type: Input
1593
+ }], childrenHost: [{
1594
+ type: ViewChild,
1595
+ args: ['childrenHost', { read: ViewContainerRef, static: true }]
1596
+ }] } });
1597
+
1598
+ /**
1599
+ * Client-engine repeater shell. Data fetching and item expansion are handled
1600
+ * by DataSourceResolverService + BindingApplicatorService in the PageResolver
1601
+ * before this component is rendered. ClientRenderDirective inserts one child
1602
+ * per resolved item into childrenHost.
1603
+ */
1604
+ class ClientRepeaterComponent {
1605
+ constructor() {
1606
+ this.nodeId = '';
1607
+ }
1608
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ClientRepeaterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1609
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ClientRepeaterComponent, isStandalone: false, selector: "iox-repeater", inputs: { nodeId: "nodeId" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
1610
+ <div class="repeater-root" [ngClass]="['iox-node-' + nodeId]">
1611
+ <ng-container #childrenHost></ng-container>
1612
+ </div>
1613
+ `, isInline: true, styles: [".repeater-root{position:relative;box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1614
+ }
1615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ClientRepeaterComponent, decorators: [{
1616
+ type: Component,
1617
+ args: [{ selector: 'iox-repeater', template: `
1618
+ <div class="repeater-root" [ngClass]="['iox-node-' + nodeId]">
1619
+ <ng-container #childrenHost></ng-container>
1620
+ </div>
1621
+ `, standalone: false, styles: [".repeater-root{position:relative;box-sizing:border-box}\n"] }]
1622
+ }], propDecorators: { nodeId: [{
1623
+ type: Input
1624
+ }], childrenHost: [{
1625
+ type: ViewChild,
1626
+ args: ['childrenHost', { read: ViewContainerRef, static: true }]
1627
+ }] } });
1628
+
1629
+ const COMPONENTS = [
1630
+ BuilderImageComponent,
1631
+ BuilderSpacerComponent,
1632
+ CardComponent,
1633
+ BuilderDividerComponent,
1634
+ BuilderIconComponent,
1635
+ BuilderLinkComponent,
1636
+ BuilderButtonComponent,
1637
+ BuilderHeadingComponent,
1638
+ TextBlockComponent,
1639
+ SectionComponent,
1640
+ ContainerComponent,
1641
+ LinkedContainerComponent,
1642
+ ClientRepeaterComponent,
1643
+ ];
1644
+ class IoxBuilderComponentsModule {
1645
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxBuilderComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1646
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: IoxBuilderComponentsModule, declarations: [BuilderImageComponent,
1647
+ BuilderSpacerComponent,
1648
+ CardComponent,
1649
+ BuilderDividerComponent,
1650
+ BuilderIconComponent,
1651
+ BuilderLinkComponent,
1652
+ BuilderButtonComponent,
1653
+ BuilderHeadingComponent,
1654
+ TextBlockComponent,
1655
+ SectionComponent,
1656
+ ContainerComponent,
1657
+ LinkedContainerComponent,
1658
+ ClientRepeaterComponent], imports: [CommonModule], exports: [BuilderImageComponent,
1659
+ BuilderSpacerComponent,
1660
+ CardComponent,
1661
+ BuilderDividerComponent,
1662
+ BuilderIconComponent,
1663
+ BuilderLinkComponent,
1664
+ BuilderButtonComponent,
1665
+ BuilderHeadingComponent,
1666
+ TextBlockComponent,
1667
+ SectionComponent,
1668
+ ContainerComponent,
1669
+ LinkedContainerComponent,
1670
+ ClientRepeaterComponent] }); }
1671
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxBuilderComponentsModule, imports: [CommonModule] }); }
1672
+ }
1673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxBuilderComponentsModule, decorators: [{
1674
+ type: NgModule,
1675
+ args: [{
1676
+ declarations: COMPONENTS,
1677
+ imports: [CommonModule],
1678
+ exports: COMPONENTS,
1679
+ }]
1680
+ }] });
1681
+
1682
+ /**
1683
+ * Single source of truth for the IOX component type → Angular class mapping.
1684
+ * Used by the client engine (iox-client-engine) to resolve component classes
1685
+ * from IoxLayoutNode.type strings at render time.
1686
+ *
1687
+ * All 13 builder components are registered here:
1688
+ * - Leaf (Phase 2a): Image, Spacer, Card, Divider, Icon
1689
+ * - Inline-editable (Phase 2b): Link, Button, Heading, Text
1690
+ * - Layout shells (Phase 2c): Section, Container, LinkedContainer
1691
+ * - Repeater (Phase 2d): ClientRepeaterComponent
1692
+ *
1693
+ * Section/Container/LinkedContainer/Repeater expose childrenHost: ViewContainerRef
1694
+ * for ClientRenderDirective to insert child components into.
1695
+ */
1696
+ class IoxComponentRegistryService {
1697
+ constructor() {
1698
+ this.map = new Map([
1699
+ ['Image', BuilderImageComponent],
1700
+ ['Spacer', BuilderSpacerComponent],
1701
+ ['Card', CardComponent],
1702
+ ['Divider', BuilderDividerComponent],
1703
+ ['Icon', BuilderIconComponent],
1704
+ ['Link', BuilderLinkComponent],
1705
+ ['Button', BuilderButtonComponent],
1706
+ ['Heading', BuilderHeadingComponent],
1707
+ ['Text', TextBlockComponent],
1708
+ ['Section', SectionComponent],
1709
+ ['Container', ContainerComponent],
1710
+ ['LinkedContainer', LinkedContainerComponent],
1711
+ ['Repeater', ClientRepeaterComponent],
1712
+ ]);
1713
+ }
1714
+ getComponent(type) {
1715
+ return this.map.get(type);
1716
+ }
1717
+ hasComponent(type) {
1718
+ return this.map.has(type);
1719
+ }
1720
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxComponentRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1721
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxComponentRegistryService, providedIn: 'root' }); }
1722
+ }
1723
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxComponentRegistryService, decorators: [{
1724
+ type: Injectable,
1725
+ args: [{ providedIn: 'root' }]
1726
+ }] });
1727
+
951
1728
  /*
952
1729
  * Public API Surface of iox-ui
953
1730
  */
@@ -956,5 +1733,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
956
1733
  * Generated bundle index. Do not edit.
957
1734
  */
958
1735
 
959
- export { AOSService, AnalyticsService, CMSClientInfraModule, ConsentService, ContentService, ENVIRONMENT, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxMasonryComponent, IoxMasonryItemDirective, IoxMasonryModule, IoxMasonryService, IoxPageComponent, IoxPageModule, IoxUiModule, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, ViewPositionDirective, ViewPositionModule, WebSettingsService };
1736
+ export { AOSService, AnalyticsService, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, CMSClientInfraModule, CardComponent, ClientRepeaterComponent, ConsentService, ContainerComponent, ContentService, ENVIRONMENT, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxMasonryComponent, IoxMasonryItemDirective, IoxMasonryModule, IoxMasonryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, SectionComponent, TextBlockComponent, ViewPositionDirective, ViewPositionModule, WebSettingsService };
960
1737
  //# sourceMappingURL=vectoriox-iox-ui.mjs.map