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