@vectoriox/iox-ui 4.0.7 → 4.0.9

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,502 +1,28 @@
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, ChangeDetectionStrategy, ViewContainerRef } from '@angular/core';
3
- import * as i2 from '@angular/animations';
4
- import { style, animate } from '@angular/animations';
5
- import { Subject, of } from 'rxjs';
6
- import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
- import { Masonry } from '@fristys/masonry';
8
- import { BrowserModule } from '@angular/platform-browser';
9
- import * as i1$2 from '@angular/common';
10
- import { isPlatformBrowser, CommonModule } from '@angular/common';
2
+ import { Component, Injectable, EventEmitter, Output, ViewChild, Input, NgModule, InjectionToken } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { fromEvent } from 'rxjs';
11
5
  import Lenis from 'lenis';
12
- import * as i1 from 'ngx-cookie-service';
13
- import { CookieService } from 'ngx-cookie-service';
14
- import * as i1$1 from '@angular/common/http';
15
- import { map } from 'rxjs/operators';
16
6
 
17
- class ViewPositionDirective {
18
- constructor(_elr) {
19
- this._elr = _elr;
20
- this._scrollDirection = "Down";
21
- this._scrollPos = 0;
22
- this.isOnScreen = false;
23
- this.isHalfScreen = false;
24
- this.onEnter = new EventEmitter();
25
- this.onLeave = new EventEmitter();
26
- this.onHalf = new EventEmitter();
27
- this._initScreenDeminitions();
28
- console.log(`screent highet: ${this._viewPortHighet}`);
29
- }
30
- ngAfterViewInit() {
31
- this._elementOffseTop = this._elr.nativeElement.offsetTop;
32
- this._elementHeight = this._elr.nativeElement.offsetHeight;
33
- console.log(`element offset Y = ${this._elementOffseTop}`);
34
- }
35
- onScroll(e) {
36
- if ((document.body.getBoundingClientRect()).top > this._scrollPos) {
37
- if (this._scrollDirection != "Up") {
38
- this.isHalfScreen = false;
39
- this._scrollDirection = "Up";
40
- }
41
- }
42
- else {
43
- if (this._scrollDirection != "Down") {
44
- this.isHalfScreen = false;
45
- this._scrollDirection = "Down";
46
- }
47
- }
48
- this._scrollPos = (document.body.getBoundingClientRect()).top;
49
- let currentClientHight = this._elr.nativeElement.getBoundingClientRect().top;
50
- if (currentClientHight >= this._viewPortHighet || currentClientHight < -this._elementHeight) {
51
- if (this.isOnScreen) {
52
- this.isOnScreen = false;
53
- this.onLeave.emit("OUT");
54
- }
55
- }
56
- else {
57
- if (!this.isOnScreen) {
58
- this.isOnScreen = true;
59
- this.onEnter.emit("IN");
60
- }
61
- }
62
- if (currentClientHight < this._halfSscreen && currentClientHight > 0 && this._scrollDirection == "Down") {
63
- if (!this.isHalfScreen) {
64
- this.isHalfScreen = true;
65
- console.log("half");
66
- this.onHalf.emit(this.data);
67
- }
68
- }
69
- if (currentClientHight + this._elementHeight > this._halfSscreen && currentClientHight + this._elementHeight < this._viewPortHighet && this._scrollDirection == "Up") {
70
- if (!this.isHalfScreen) {
71
- this.isHalfScreen = true;
72
- console.log("I am half");
73
- this.onHalf.emit(this.data);
74
- }
75
- }
76
- }
77
- onResize(e) {
78
- this._viewPortHighet = window.innerHeight;
79
- this._initScreenDeminitions();
80
- }
81
- _initScreenDeminitions() {
82
- this._viewPortHighet = window.innerHeight;
83
- this._curterScreen = Math.trunc(this._viewPortHighet * 0.25);
84
- this._halfSscreen = Math.trunc(this._viewPortHighet * 0.5);
85
- }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ViewPositionDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
87
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ViewPositionDirective, isStandalone: false, selector: "[view-position]", inputs: { data: "data" }, outputs: { onEnter: "onEnter", onLeave: "onLeave", onHalf: "onHalf" }, host: { listeners: { "window:scroll": "onScroll($event)", "window:resize": "onResize($event)" } }, ngImport: i0 }); }
88
- }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ViewPositionDirective, decorators: [{
90
- type: Directive,
91
- args: [{
92
- selector: '[view-position]',
93
- standalone: false
94
- }]
95
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { data: [{
96
- type: Input
97
- }], onEnter: [{
98
- type: Output
99
- }], onLeave: [{
100
- type: Output
101
- }], onHalf: [{
102
- type: Output
103
- }], onScroll: [{
104
- type: HostListener,
105
- args: ['window:scroll', ['$event']]
106
- }], onResize: [{
107
- type: HostListener,
108
- args: ['window:resize', ['$event']]
109
- }] } });
110
-
111
- class ViewPositionModule {
112
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ViewPositionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
113
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: ViewPositionModule, declarations: [ViewPositionDirective], exports: [ViewPositionDirective] }); }
114
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ViewPositionModule }); }
115
- }
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ViewPositionModule, decorators: [{
117
- type: NgModule,
118
- args: [{
119
- declarations: [
120
- ViewPositionDirective
121
- ],
122
- imports: [],
123
- exports: [
124
- ViewPositionDirective
125
- ]
126
- }]
127
- }] });
128
-
129
- /********** Entries Animations ********************/
130
- const IoxAnimationStyles = {};
131
- IoxAnimationStyles["fade-up"] = (delay, duration) => {
132
- return [style({ opacity: 0, transform: "translate3d(0,100px,0)" }),
133
- animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: "translateZ(0)" }))];
134
- };
135
- IoxAnimationStyles["fade-right"] = (delay, duration) => {
136
- return [style({ opacity: 0, transform: "translateX(150px)" }),
137
- animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: "translateZ(0)" }))];
138
- };
139
- IoxAnimationStyles["fade-out-right"] = (delay, duration) => {
140
- return [style({ opacity: 1, transform: "translateX(0px)" }),
141
- animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 0, transform: "translateX(150px)" }))];
142
- };
143
- IoxAnimationStyles["fade-left"] = (delay, duration) => {
144
- return [style({ opacity: 0, transform: "translateX(-150px)" }),
145
- animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: "translateZ(0)" }))];
146
- };
147
- IoxAnimationStyles["fade-out-up"] = (delay, duration) => {
148
- return [style({ opacity: 1, transform: "translateZ(0)" }),
149
- animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 0, transform: "translate3d(0,-100px,0)" }))];
150
- };
151
- IoxAnimationStyles["flip-left"] = (delay, duration) => {
152
- return [style({ opacity: 0, transform: "perspective(2500px) rotateY(-100deg)" }),
153
- animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: "perspective(2500px) rotateY(0)" }))];
154
- };
155
- IoxAnimationStyles["flip-up"] = (delay, duration) => {
156
- return [style({ opacity: 0, transform: "perspective(2500px) rotateX(-100deg)" }),
157
- animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: "perspective(2500px) rotateY(0)" }))];
158
- };
159
- IoxAnimationStyles["zoom-in-up"] = (delay, duration) => {
160
- return [style({ opacity: 0, transform: "translate3d(0,100px,0) scale(.6)" }),
161
- animate(`${duration} ${delay} cubic-bezier(0.445, 0.05, 0.55, 0.95)`, style({ opacity: 1, transform: "translateZ(0) scale(1)" }))];
162
- };
163
-
164
- class AOSService {
165
- constructor() {
166
- this._scrollOffset = new Subject();
167
- this.scrollOffset = this._scrollOffset.asObservable();
168
- }
169
- updateScrollOffset(offset) {
170
- this._scrollOffset.next(offset);
171
- }
172
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AOSService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
173
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AOSService, providedIn: 'root' }); }
174
- }
175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AOSService, decorators: [{
176
- type: Injectable,
177
- args: [{ providedIn: 'root' }]
178
- }], ctorParameters: () => [] });
179
-
180
- class IoxAnimateContainer {
181
- constructor(_element, _aOSService) {
182
- this._element = _element;
183
- this._aOSService = _aOSService;
184
- this.kickIn = true;
185
- this._scrollOffset = new Subject();
186
- this.scrollOffset = this._scrollOffset.asObservable();
187
- }
188
- ngAfterViewInit() {
189
- this.updateOffset();
190
- }
191
- onScroll($event) {
192
- this.updateOffset();
193
- }
194
- ngOnChanges(changes) {
195
- console.log(changes);
196
- if (changes['kickIn'] && changes['kickIn'].currentValue) {
197
- this.updateOffset();
198
- }
199
- }
200
- updateOffset() {
201
- let elClientRect = this.animateRooteElement.nativeElement.getBoundingClientRect();
202
- this._scrollOffset.next(elClientRect);
203
- this._aOSService.updateScrollOffset(elClientRect);
204
- }
205
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxAnimateContainer, deps: [{ token: i0.ElementRef }, { token: AOSService }], target: i0.ɵɵFactoryTarget.Component }); }
206
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: IoxAnimateContainer, isStandalone: false, selector: "[ioxAnimateContainer], ioxAnimateContainer", inputs: { kickIn: "kickIn" }, host: { listeners: { "scroll": "onScroll($event)" } }, viewQueries: [{ propertyName: "animateRooteElement", first: true, predicate: ["animateRooteElement"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `<div class='animate_root_element' #animateRooteElement>
207
- <ng-content></ng-content>
208
- </div>`, isInline: true }); }
209
- }
210
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxAnimateContainer, decorators: [{
211
- type: Component,
212
- args: [{
213
- selector: "[ioxAnimateContainer], ioxAnimateContainer",
214
- template: `<div class='animate_root_element' #animateRooteElement>
215
- <ng-content></ng-content>
216
- </div>`,
217
- standalone: false
218
- }]
219
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: AOSService }], propDecorators: { kickIn: [{
220
- type: Input,
221
- args: ['kickIn']
222
- }], animateRooteElement: [{
223
- type: ViewChild,
224
- args: ['animateRooteElement']
225
- }], onScroll: [{
226
- type: HostListener,
227
- args: ['scroll', ['$event']]
228
- }] } });
229
-
230
- class IoxAosDirective {
231
- constructor(_animateContainer, _element, _animationBuilder, _renderer) {
232
- this._animateContainer = _animateContainer;
233
- this._element = _element;
234
- this._animationBuilder = _animationBuilder;
235
- this._renderer = _renderer;
236
- this.animationDelay = "";
237
- this.animationIn = "";
238
- this.animationOut = "";
239
- this.animationDuration = "0.5s";
240
- this.isAnimationPlayed = false;
241
- this._elTop = 0;
242
- this._renderer.setStyle(_element.nativeElement, 'opacity', '0');
243
- }
244
- ngOnInit() {
245
- }
246
- ngAfterViewInit() {
247
- setTimeout(() => {
248
- this._elTop = this._cumulativeOffset(this._element.nativeElement).top;
249
- if (this._animateContainer) {
250
- if (this._animateContainer.kickIn) {
251
- this.runIfVisiable();
252
- }
253
- else {
254
- return;
255
- }
256
- }
257
- else {
258
- this.runIfVisiable();
259
- }
260
- }, 150);
261
- const resizeObserver = new ResizeObserver((entries) => this._elTop = this._cumulativeOffset(this._element.nativeElement).top);
262
- resizeObserver.observe(document.body);
263
- if (this._animateContainer) {
264
- this._animateContainer?.scrollOffset.subscribe((offset) => {
265
- if (this._animateContainer.kickIn) {
266
- this.scrollEventHandler(-1 * offset.top);
267
- }
268
- });
269
- }
270
- }
271
- makeAnimationIn(animationStyle) {
272
- let animation = IoxAnimationStyles[animationStyle](this.animationDelay, this.animationDuration);
273
- const myAnimation = this._animationBuilder.build(animation);
274
- return myAnimation.create(this._element.nativeElement);
275
- }
276
- _cumulativeOffset(element) {
277
- var top = 0, left = 0;
278
- do {
279
- top += element.offsetTop || 0;
280
- left += element.offsetLeft || 0;
281
- element = element.offsetParent;
282
- } while (element);
283
- return {
284
- top: top,
285
- left: left
286
- };
287
- }
288
- ;
289
- onScrollEvent($event) {
290
- this.scrollEventHandler(window.pageYOffset);
291
- }
292
- isVisable(offset) {
293
- //console.log(this._elTop >= window.pageYOffset && this._elTop <= window.pageYOffset + window.innerHeight);
294
- //return this._elTop >= window.pageYOffset && this._elTop <= window.pageYOffset + window.innerHeight;
295
- return this._elTop >= offset && this._elTop <= offset + window.innerHeight;
296
- }
297
- scrollEventHandler(offset) {
298
- if (this._animateContainer && this._animateContainer.kickIn == false) {
299
- return;
300
- }
301
- if (this.isVisable(offset) && !this.isAnimationPlayed) {
302
- let animationStyle = this.animationIn || "fade-up";
303
- this.makeAnimationIn(animationStyle).play();
304
- this.isAnimationPlayed = true;
305
- }
306
- else if (!this.isVisable(offset) && this.isAnimationPlayed && this.animationOut) {
307
- this.makeAnimationIn(this.animationOut).play();
308
- this.isAnimationPlayed = false;
309
- }
310
- }
311
- runIfVisiable() {
312
- if (this.isVisable(window.pageYOffset)) {
313
- let animationStyle = this.animationIn || "fade-up";
314
- this.makeAnimationIn(animationStyle).play();
315
- this.isAnimationPlayed = true;
316
- }
317
- }
318
- ngOnDestroy() {
319
- }
320
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxAosDirective, deps: [{ token: IoxAnimateContainer, host: true, optional: true }, { token: i0.ElementRef }, { token: i2.AnimationBuilder }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
321
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: IoxAosDirective, isStandalone: false, selector: "[ioxAnimate], ioxAnimate", inputs: { animationDelay: "animationDelay", animationIn: "animationIn", animationOut: "animationOut", animationDuration: "animationDuration" }, host: { listeners: { "document:scroll": "onScrollEvent($event)" } }, ngImport: i0 }); }
322
- }
323
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxAosDirective, decorators: [{
324
- type: Directive,
325
- args: [{
326
- selector: "[ioxAnimate], ioxAnimate",
327
- standalone: false
328
- }]
329
- }], ctorParameters: () => [{ type: IoxAnimateContainer, decorators: [{
330
- type: Host
331
- }, {
332
- type: Optional
333
- }] }, { type: i0.ElementRef }, { type: i2.AnimationBuilder }, { type: i0.Renderer2 }], propDecorators: { animationDelay: [{
334
- type: Input,
335
- args: ["animationDelay"]
336
- }], animationIn: [{
337
- type: Input,
338
- args: ["animationIn"]
339
- }], animationOut: [{
340
- type: Input,
341
- args: ["animationOut"]
342
- }], animationDuration: [{
343
- type: Input,
344
- args: ["animationDuration"]
345
- }], onScrollEvent: [{
346
- type: HostListener,
347
- args: ['document:scroll', ['$event']]
348
- }] } });
349
- function ViewParent() {
350
- throw new Error("Function not implemented.");
351
- }
352
-
353
- class IoxAosModule {
354
- static forRoot() {
355
- return {
356
- ngModule: IoxAosModule,
357
- providers: [AOSService]
358
- };
359
- }
360
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxAosModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
361
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: IoxAosModule, declarations: [IoxAosDirective,
362
- IoxAnimateContainer], imports: [BrowserAnimationsModule], exports: [IoxAosDirective,
363
- IoxAnimateContainer] }); }
364
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxAosModule, providers: [
365
- AOSService
366
- ], imports: [BrowserAnimationsModule] }); }
367
- }
368
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxAosModule, decorators: [{
369
- type: NgModule,
370
- args: [{
371
- declarations: [
372
- IoxAosDirective,
373
- IoxAnimateContainer
374
- ],
375
- imports: [
376
- BrowserAnimationsModule
377
- ],
378
- providers: [
379
- AOSService
380
- ],
381
- exports: [
382
- IoxAosDirective,
383
- IoxAnimateContainer
384
- ]
385
- }]
386
- }] });
387
-
388
- class IoxMasonryService {
389
- constructor() { }
390
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
391
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryService, providedIn: 'root' }); }
392
- }
393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryService, decorators: [{
394
- type: Injectable,
395
- args: [{
396
- providedIn: 'root'
397
- }]
398
- }], ctorParameters: () => [] });
399
-
400
- class IoxMasonryComponent {
401
- constructor(_element) {
402
- this._element = _element;
403
- // Inputs
404
- this.options = {};
405
- this.useImagesLoaded = false;
406
- this.updateLayout = false;
407
- this.layoutComplete = new EventEmitter();
408
- this.isAppendAllowed = true;
409
- this.add = (element) => {
410
- setTimeout(() => {
411
- this._msnry.init();
412
- }, 200);
413
- };
414
- }
415
- ngAfterViewInit() {
416
- console.log("test");
417
- }
418
- ngOnInit() {
419
- this._msnry = new Masonry(document.getElementById('masonry'), this.options);
420
- this.layout();
421
- }
422
- ngOnChanges(changes) {
423
- console.log(changes);
424
- }
425
- remove(element) {
426
- this._msnry.remove(element);
427
- }
428
- layout() {
429
- setTimeout(() => {
430
- this._msnry.init();
431
- });
432
- }
433
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
434
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: IoxMasonryComponent, isStandalone: false, selector: "[iox-masonry], iox-masonry", inputs: { options: "options", useImagesLoaded: "useImagesLoaded", updateLayout: "updateLayout" }, outputs: { layoutComplete: "layoutComplete" }, usesOnChanges: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
435
- }
436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryComponent, decorators: [{
437
- type: Component,
438
- args: [{ selector: "[iox-masonry], iox-masonry", template: `<ng-content></ng-content>`, standalone: false }]
439
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { options: [{
440
- type: Input
441
- }], useImagesLoaded: [{
442
- type: Input
443
- }], updateLayout: [{
444
- type: Input
445
- }], layoutComplete: [{
446
- type: Output
447
- }] } });
448
-
449
- class IoxMasonryItemDirective {
450
- constructor(_element, _parent, _renderer) {
451
- this._element = _element;
452
- this._parent = _parent;
453
- this._renderer = _renderer;
454
- //this._renderer.setStyle(_element.nativeElement,'opacity', '0');
455
- }
456
- ngAfterViewInit() {
457
- console.log(this._element.nativeElement);
458
- this._parent.add(this._element.nativeElement);
459
- }
460
- ngOnDestroy() {
461
- this._parent.remove(this._element.nativeElement);
462
- }
463
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryItemDirective, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => IoxMasonryComponent) }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
464
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: IoxMasonryItemDirective, isStandalone: false, selector: "[ioxMasonryItem], ioxMasonryItem", ngImport: i0 }); }
465
- }
466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryItemDirective, decorators: [{
467
- type: Directive,
468
- args: [{
469
- selector: "[ioxMasonryItem], ioxMasonryItem",
470
- standalone: false
471
- }]
472
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: IoxMasonryComponent, decorators: [{
473
- type: Inject,
474
- args: [forwardRef(() => IoxMasonryComponent)]
475
- }] }, { type: i0.Renderer2 }] });
476
-
477
- class IoxMasonryModule {
478
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
479
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryModule, declarations: [IoxMasonryComponent, IoxMasonryItemDirective], imports: [BrowserModule], exports: [IoxMasonryComponent, IoxMasonryItemDirective] }); }
480
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryModule, imports: [BrowserModule] }); }
481
- }
482
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxMasonryModule, decorators: [{
483
- type: NgModule,
484
- args: [{
485
- declarations: [IoxMasonryComponent, IoxMasonryItemDirective],
486
- imports: [
487
- BrowserModule
488
- ],
489
- exports: [IoxMasonryComponent, IoxMasonryItemDirective]
490
- }]
7
+ class IoxUi {
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IoxUi, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: IoxUi, isStandalone: true, selector: "lib-iox-ui", ngImport: i0, template: `
10
+ <p>
11
+ iox-ui works!
12
+ </p>
13
+ `, isInline: true, styles: [""] }); }
14
+ }
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IoxUi, decorators: [{
16
+ type: Component,
17
+ args: [{ selector: 'lib-iox-ui', imports: [], template: `
18
+ <p>
19
+ iox-ui works!
20
+ </p>
21
+ ` }]
491
22
  }] });
492
23
 
493
24
  class PageScrollProvider {
494
- constructor(platformId) {
495
- this.platformId = platformId;
496
- }
497
25
  init(options) {
498
- if (!isPlatformBrowser(this.platformId))
499
- return;
500
26
  if (this.lenis) {
501
27
  this.lenis.destroy();
502
28
  }
@@ -518,90 +44,65 @@ class PageScrollProvider {
518
44
  }
519
45
  return this.lenis;
520
46
  }
521
- destroy() {
522
- if (this.lenis) {
523
- this.lenis.destroy();
524
- this.lenis = undefined;
525
- }
526
- if (this.rafId != null) {
527
- cancelAnimationFrame(this.rafId);
528
- this.rafId = undefined;
529
- }
530
- }
531
47
  startLoop() {
532
- if (!this.lenis)
48
+ if (!this.lenis) {
533
49
  return;
50
+ }
534
51
  const loop = (time) => {
535
52
  this.lenis.raf(time);
536
53
  this.rafId = requestAnimationFrame(loop);
537
54
  };
538
55
  this.rafId = requestAnimationFrame(loop);
539
56
  }
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 }); }
541
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider }); }
57
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PageScrollProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
58
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PageScrollProvider }); }
542
59
  }
543
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PageScrollProvider, decorators: [{
544
61
  type: Injectable
545
- }], ctorParameters: () => [{ type: undefined, decorators: [{
546
- type: Inject,
547
- args: [PLATFORM_ID]
548
- }] }] });
62
+ }] });
549
63
 
550
64
  class IoxPageComponent {
551
- constructor(pageScrollProvider, platformId) {
65
+ constructor(pageScrollProvider) {
552
66
  this.pageScrollProvider = pageScrollProvider;
553
- this.platformId = platformId;
554
67
  this.class = '';
555
- this.scrollEnabled = true;
556
- this.scrollOptions = {};
557
68
  this.scrollEvent = new EventEmitter();
558
69
  }
559
70
  ngAfterViewInit() {
560
- if (!isPlatformBrowser(this.platformId) || !this.page || !this.scrollEnabled)
561
- return;
562
- this.pageScrollProvider.init({
563
- wrapper: this.page.nativeElement,
564
- content: this.page.nativeElement.querySelector('.page-mask'),
565
- ...this.scrollOptions,
566
- });
567
- let _dispatching = false;
568
- this.pageScrollProvider.instance.on('scroll', ({ scroll, progress }) => {
569
- const el = this.page.nativeElement;
570
- this.scrollEvent.emit({
571
- scrollTop: scroll,
572
- scrollLeft: 0,
573
- scrollHeight: el.scrollHeight,
574
- scrollWidth: el.scrollWidth,
575
- clientHeight: el.clientHeight,
576
- clientWidth: el.clientWidth,
577
- scrollPercentage: progress * 100,
71
+ if (this.page) {
72
+ this.scrollSubscription = fromEvent(this.page.nativeElement, 'scroll').subscribe((event) => {
73
+ this.onScroll(event);
74
+ });
75
+ this.pageScrollProvider.init({
76
+ wrapper: this.page.nativeElement,
77
+ content: this.page.nativeElement.querySelector('.page-mask'),
78
+ duration: 1.2,
79
+ easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
578
80
  });
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;
584
- el.dispatchEvent(new Event('scroll'));
585
- _dispatching = false;
586
- });
81
+ }
82
+ }
83
+ onScroll(event) {
84
+ const target = event.target;
85
+ const scrollTop = target.scrollTop;
86
+ const scrollLeft = target.scrollLeft;
87
+ const scrollHeight = target.scrollHeight;
88
+ const scrollWidth = target.scrollWidth;
89
+ const clientHeight = target.clientHeight;
90
+ const clientWidth = target.clientWidth;
91
+ const scrollPercentage = (scrollTop / (scrollHeight - clientHeight)) * 100;
92
+ this.scrollEvent.emit({ scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth, scrollPercentage });
587
93
  }
588
94
  ngOnDestroy() {
589
- this.pageScrollProvider.destroy();
95
+ if (this.scrollSubscription) {
96
+ this.scrollSubscription.unsubscribe();
97
+ }
590
98
  }
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 }); }
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"] }); }
99
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IoxPageComponent, deps: [{ token: PageScrollProvider }], target: i0.ɵɵFactoryTarget.Component }); }
100
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: IoxPageComponent, isStandalone: false, selector: "iox-page-component", inputs: { class: "class" }, 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"] }); }
593
101
  }
594
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageComponent, decorators: [{
102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IoxPageComponent, decorators: [{
595
103
  type: Component,
596
104
  args: [{ selector: 'iox-page-component', standalone: false, 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"] }]
597
- }], ctorParameters: () => [{ type: PageScrollProvider }, { type: undefined, decorators: [{
598
- type: Inject,
599
- args: [PLATFORM_ID]
600
- }] }], propDecorators: { class: [{
601
- type: Input
602
- }], scrollEnabled: [{
603
- type: Input
604
- }], scrollOptions: [{
105
+ }], ctorParameters: () => [{ type: PageScrollProvider }], propDecorators: { class: [{
605
106
  type: Input
606
107
  }], page: [{
607
108
  type: ViewChild,
@@ -611,11 +112,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
611
112
  }] } });
612
113
 
613
114
  class IoxPageModule {
614
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
615
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: IoxPageModule, declarations: [IoxPageComponent], imports: [CommonModule], exports: [IoxPageComponent] }); }
616
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageModule, providers: [PageScrollProvider], imports: [CommonModule] }); }
115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IoxPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
116
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IoxPageModule, declarations: [IoxPageComponent], imports: [CommonModule], exports: [IoxPageComponent] }); }
117
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IoxPageModule, providers: [PageScrollProvider], imports: [CommonModule] }); }
617
118
  }
618
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageModule, decorators: [{
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IoxPageModule, decorators: [{
619
120
  type: NgModule,
620
121
  args: [{
621
122
  imports: [CommonModule],
@@ -625,1102 +126,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
625
126
  }]
626
127
  }] });
627
128
 
628
- class IoxUiModule {
629
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
630
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: IoxUiModule, imports: [IoxAosModule, IoxPageModule], exports: [IoxAosModule, IoxPageModule] }); }
631
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxUiModule, imports: [IoxAosModule, IoxPageModule, IoxAosModule, IoxPageModule] }); }
632
- }
633
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxUiModule, decorators: [{
634
- type: NgModule,
635
- args: [{
636
- declarations: [],
637
- imports: [IoxAosModule, IoxPageModule],
638
- exports: [IoxAosModule, IoxPageModule]
639
- }]
640
- }] });
641
-
642
- var PrivacyModelEvent;
643
- (function (PrivacyModelEvent) {
644
- PrivacyModelEvent[PrivacyModelEvent["OPEN"] = 1] = "OPEN";
645
- PrivacyModelEvent[PrivacyModelEvent["CLOSE"] = 2] = "CLOSE";
646
- })(PrivacyModelEvent || (PrivacyModelEvent = {}));
647
- class PrivacyModalService {
648
- constructor() {
649
- this.modalEvent = new Subject();
650
- this.decisionSubject = null;
651
- }
652
- registerModalEvent(func) {
653
- this.modalEvent.subscribe({
654
- next: (val) => {
655
- func(val);
656
- }
657
- });
658
- }
659
- openModal() {
660
- this.modalEvent.next(PrivacyModelEvent.OPEN);
661
- this.decisionSubject = new Subject();
662
- return this.decisionSubject;
663
- }
664
- closeModal() {
665
- this.modalEvent.next(PrivacyModelEvent.CLOSE);
666
- }
667
- notifyDecision(accepted) {
668
- if (this.decisionSubject) {
669
- this.decisionSubject.next(accepted);
670
- this.decisionSubject.complete();
671
- this.decisionSubject = null;
672
- }
673
- this.closeModal();
674
- }
675
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
676
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalService }); }
677
- }
678
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalService, decorators: [{
679
- type: Injectable
680
- }], ctorParameters: () => [] });
681
-
682
- class ConsentService {
683
- constructor(cookieService, httpClient, _privacyModalService, environment) {
684
- this.cookieService = cookieService;
685
- this.httpClient = httpClient;
686
- this._privacyModalService = _privacyModalService;
687
- this.environment = environment;
688
- this.WEB_USER = "webUser";
689
- }
690
- hasAnalyticsConsent() {
691
- const cookieValue = this.cookieService.get(this.WEB_USER);
692
- if (!cookieValue) {
693
- return false;
694
- }
695
- try {
696
- const parsedCookieValue = JSON.parse(cookieValue);
697
- return parsedCookieValue.user?.consent?.analyticsConsent === true;
698
- }
699
- catch {
700
- // Invalid JSON or unexpected structure: treat as no consent
701
- return false;
702
- }
703
- }
704
- checkAnalyticsConsent() {
705
- if (this.hasAnalyticsConsent()) {
706
- // Consent already given, return true immediately as Observable
707
- return of(true);
708
- }
709
- // No consent yet (or invalid/missing cookie) -> show modal
710
- return this._privacyModalService.openModal();
711
- }
712
- checkMarketingConsent() {
713
- let cookieValue = this.cookieService.get(this.WEB_USER);
714
- if (!cookieValue) {
715
- return false;
716
- }
717
- let parsedCookieValue = JSON.parse(cookieValue);
718
- return parsedCookieValue.user?.consent?.marketingConsent;
719
- }
720
- setConsent(analytics, marketing) {
721
- let cookieValue = this.cookieService.get(this.WEB_USER);
722
- let parsedCookieValue = cookieValue ? JSON.parse(cookieValue) : { user: { consent: {
723
- anonymousId: this.generateAnonymousId()
724
- } } };
725
- parsedCookieValue.user.consent.analyticsConsent = analytics;
726
- parsedCookieValue.user.consent.marketingConsent = marketing;
727
- this.cookieService.set(this.WEB_USER, JSON.stringify(parsedCookieValue));
728
- this.httpClient.post(`${this.environment.HOST}consent`, parsedCookieValue.user.consent)
729
- .subscribe({
730
- next: (response) => {
731
- console.log('Consent updated successfully:', response);
732
- },
733
- error: (error) => {
734
- console.error('Error updating consent:', error);
735
- }
736
- });
737
- }
738
- generateAnonymousId() {
739
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
740
- var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
741
- return v.toString(16);
742
- });
743
- }
744
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsentService, deps: [{ token: i1.CookieService }, { token: i1$1.HttpClient }, { token: PrivacyModalService }, { token: ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
745
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsentService }); }
746
- }
747
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsentService, decorators: [{
748
- type: Injectable
749
- }], ctorParameters: () => [{ type: i1.CookieService }, { type: i1$1.HttpClient }, { type: PrivacyModalService }, { type: undefined, decorators: [{
750
- type: Inject,
751
- args: [ENVIRONMENT]
752
- }] }] });
753
-
754
- class PrivacyModalComponent {
755
- constructor(_privacyModalService, _consentService) {
756
- this._privacyModalService = _privacyModalService;
757
- this._consentService = _consentService;
758
- this.isOpen = false;
759
- this._privacyModalService.registerModalEvent((event) => {
760
- if (event == PrivacyModelEvent.CLOSE) {
761
- this.isOpen = false;
762
- }
763
- else {
764
- this.isOpen = true;
765
- }
766
- });
767
- }
768
- onAccept() {
769
- this._consentService.setConsent(true, true);
770
- this._privacyModalService.notifyDecision(true);
771
- this.isOpen = false;
772
- }
773
- onDecline() {
774
- this._privacyModalService.notifyDecision(false);
775
- this.isOpen = false;
776
- }
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 }); }
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"] }] }); }
779
- }
780
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalComponent, decorators: [{
781
- type: Component,
782
- args: [{ selector: 'privacy-modal', standalone: false, 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"] }]
783
- }], ctorParameters: () => [{ type: PrivacyModalService }, { type: ConsentService }] });
784
-
785
- class WebSettingsService {
786
- constructor(httpClient, environment) {
787
- this.httpClient = httpClient;
788
- this.environment = environment;
789
- }
790
- getSettings() {
791
- // If the server injected a runtime config (window.__APP_CONFIG) use that first,
792
- // otherwise fall back to the compile-time environment.HOST.
793
- const runtimeHost = (typeof window !== 'undefined' && window.__APP_CONFIG && window.__APP_CONFIG.HOST) ? window.__APP_CONFIG.HOST : this.environment.HOST;
794
- return this.httpClient.get(`${runtimeHost}web/settings`);
795
- }
796
- configArrayToObject(arr) {
797
- return arr.reduce((acc, item) => {
798
- acc[item.key] = item.value;
799
- return acc;
800
- }, {});
801
- }
802
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WebSettingsService, deps: [{ token: i1$1.HttpClient }, { token: ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
803
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WebSettingsService }); }
804
- }
805
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WebSettingsService, decorators: [{
806
- type: Injectable
807
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
808
- type: Inject,
809
- args: [ENVIRONMENT]
810
- }] }] });
811
-
812
- class ContentService {
813
- constructor(httpClient, environment) {
814
- this.httpClient = httpClient;
815
- this.environment = environment;
816
- this.appContent = {};
817
- }
818
- getContent(contentName, id) {
819
- if (this.appContent[contentName] && this.appContent[contentName].length) {
820
- if (id) {
821
- return of(this.findOne(this.appContent[contentName], id));
822
- }
823
- return of(this.appContent[contentName]);
824
- }
825
- return this.httpClient.get(`${this.environment.HOST}${contentName}`).pipe(map((content) => {
826
- if (contentName == this.environment.contentResource.SERVICES || contentName == this.environment.contentResource.PROJECTS) {
827
- content = content.map((item) => {
828
- item.id = item.name.replace(/ /g, "_");
829
- //item._id= item.name.replace(/ /g,"_");
830
- return item;
831
- });
832
- }
833
- this.appContent[contentName] = content;
834
- if (id) {
835
- return this.findOne(this.appContent[contentName], id);
836
- }
837
- return content;
838
- }));
839
- }
840
- findOne(arr, id) {
841
- for (let i = 0; i < arr.length; i++) {
842
- if (arr[i].id == id) {
843
- return arr[i];
844
- }
845
- }
846
- }
847
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContentService, deps: [{ token: i1$1.HttpClient }, { token: ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
848
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContentService }); }
849
- }
850
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContentService, decorators: [{
851
- type: Injectable
852
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
853
- type: Inject,
854
- args: [ENVIRONMENT]
855
- }] }] });
856
-
857
- const ENVIRONMENT = new InjectionToken('environment');
858
- class CMSClientInfraModule {
859
- static forRoot(environment) {
860
- return {
861
- ngModule: CMSClientInfraModule,
862
- providers: [
863
- { provide: ENVIRONMENT, useValue: environment },
864
- ConsentService,
865
- ContentService,
866
- CookieService,
867
- WebSettingsService,
868
- PrivacyModalService
869
- ]
870
- };
871
- }
872
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
873
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, declarations: [PrivacyModalComponent], imports: [CommonModule], exports: [PrivacyModalComponent] }); }
874
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, imports: [CommonModule] }); }
875
- }
876
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, decorators: [{
877
- type: NgModule,
878
- args: [{
879
- declarations: [
880
- PrivacyModalComponent
881
- ],
882
- imports: [
883
- CommonModule
884
- ],
885
- exports: [PrivacyModalComponent]
886
- }]
887
- }] });
888
-
889
- class AnalyticsService {
890
- constructor(platformId) {
891
- this.platformId = platformId;
892
- this.gaScriptId = 'google-analytics-script';
893
- }
894
- applyGoogleAnalytics(appId) {
895
- if (!isPlatformBrowser(this.platformId))
896
- return;
897
- // 1. Establish the dataLayer and the CORRECT gtag function stub
898
- const win = window;
899
- win.dataLayer = win.dataLayer || [];
900
- // CRITICAL FIX: The Google library requires the special 'arguments' object,
901
- // NOT a standard array spread [...args].
902
- if (!win.gtag) {
903
- win.gtag = function () {
904
- win.dataLayer.push(arguments);
905
- };
906
- }
907
- // 2. Queue initial commands immediately (even before script loads)
908
- win.gtag('js', new Date());
909
- win.gtag('config', appId);
910
- // 3. Load the script if not already present
911
- if (!document.getElementById(this.gaScriptId)) {
912
- const script = document.createElement('script');
913
- script.id = this.gaScriptId;
914
- script.async = true;
915
- script.src = `https://www.googletagmanager.com/gtag/js?id=${appId}`;
916
- script.onload = () => {
917
- console.log('[Analytics] gtag.js script loaded and ready');
918
- };
919
- script.onerror = (e) => console.error('[Analytics] gtag.js failed to load', e);
920
- document.head.appendChild(script);
921
- }
922
- }
923
- // Helper to send events from your components
924
- sendEvent(eventName, params = {}) {
925
- if (isPlatformBrowser(this.platformId) && window.gtag) {
926
- window.gtag('event', eventName, params);
927
- }
928
- }
929
- // Synchronous page view sender that won't rely on internal ready Promise
930
- sendPageView(path) {
931
- if (!isPlatformBrowser(this.platformId))
932
- return;
933
- const win = window;
934
- try {
935
- if (win && win.gtag) {
936
- // Prefer gtag when available
937
- win.gtag('event', 'page_view', { page_path: path });
938
- return;
939
- }
940
- // Fallback: ensure dataLayer exists and push a native arguments-like object
941
- win.dataLayer = win.dataLayer || [];
942
- // Use a plain object that resembles gtag's usage if gtag not present
943
- win.dataLayer.push({ event: 'page_view', page_path: path });
944
- }
945
- catch (err) {
946
- console.warn('[Analytics] sendPageView failed', err);
947
- }
948
- }
949
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AnalyticsService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
950
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AnalyticsService, providedIn: 'root' }); }
951
- }
952
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AnalyticsService, decorators: [{
953
- type: Injectable,
954
- args: [{ providedIn: 'root' }]
955
- }], ctorParameters: () => [{ type: Object, decorators: [{
956
- type: Inject,
957
- args: [PLATFORM_ID]
958
- }] }] });
959
-
960
129
  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
130
 
1725
131
  /*
1726
132
  * Public API Surface of iox-ui
@@ -1730,5 +136,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1730
136
  * Generated bundle index. Do not edit.
1731
137
  */
1732
138
 
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 };
139
+ export { IS_PREVIEW, IoxPageComponent, IoxPageModule, IoxUi, PageScrollProvider };
1734
140
  //# sourceMappingURL=vectoriox-iox-ui.mjs.map