@vectoriox/iox-ui 4.0.8 → 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,503 +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(zone, platformId) {
495
- this.zone = zone;
496
- this.platformId = platformId;
497
- }
498
25
  init(options) {
499
- if (!isPlatformBrowser(this.platformId))
500
- return;
501
26
  if (this.lenis) {
502
27
  this.lenis.destroy();
503
28
  }
@@ -519,92 +44,65 @@ class PageScrollProvider {
519
44
  }
520
45
  return this.lenis;
521
46
  }
522
- destroy() {
523
- if (this.lenis) {
524
- this.lenis.destroy();
525
- this.lenis = undefined;
526
- }
527
- if (this.rafId != null) {
528
- cancelAnimationFrame(this.rafId);
529
- this.rafId = undefined;
530
- }
531
- }
532
47
  startLoop() {
533
- if (!this.lenis)
48
+ if (!this.lenis) {
534
49
  return;
535
- this.zone.runOutsideAngular(() => {
536
- const loop = (time) => {
537
- this.lenis.raf(time);
538
- this.rafId = requestAnimationFrame(loop);
539
- };
50
+ }
51
+ const loop = (time) => {
52
+ this.lenis.raf(time);
540
53
  this.rafId = requestAnimationFrame(loop);
541
- });
54
+ };
55
+ this.rafId = requestAnimationFrame(loop);
542
56
  }
543
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider, deps: [{ token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
544
- 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 }); }
545
59
  }
546
- 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: [{
547
61
  type: Injectable
548
- }], ctorParameters: () => [{ type: i0.NgZone }, { type: undefined, decorators: [{
549
- type: Inject,
550
- args: [PLATFORM_ID]
551
- }] }] });
62
+ }] });
552
63
 
553
64
  class IoxPageComponent {
554
- constructor(pageScrollProvider, platformId) {
65
+ constructor(pageScrollProvider) {
555
66
  this.pageScrollProvider = pageScrollProvider;
556
- this.platformId = platformId;
557
67
  this.class = '';
558
- this.scrollEnabled = true;
559
- this.scrollOptions = {};
560
68
  this.scrollEvent = new EventEmitter();
561
69
  }
562
70
  ngAfterViewInit() {
563
- if (!isPlatformBrowser(this.platformId) || !this.page || !this.scrollEnabled)
564
- return;
565
- this.pageScrollProvider.init({
566
- wrapper: this.page.nativeElement,
567
- content: this.page.nativeElement.querySelector('.page-mask'),
568
- ...this.scrollOptions,
569
- });
570
- let _dispatching = false;
571
- this.pageScrollProvider.instance.on('scroll', ({ scroll, progress }) => {
572
- const el = this.page.nativeElement;
573
- this.scrollEvent.emit({
574
- scrollTop: scroll,
575
- scrollLeft: 0,
576
- scrollHeight: el.scrollHeight,
577
- scrollWidth: el.scrollWidth,
578
- clientHeight: el.clientHeight,
579
- clientWidth: el.clientWidth,
580
- scrollPercentage: progress * 100,
71
+ if (this.page) {
72
+ this.scrollSubscription = fromEvent(this.page.nativeElement, 'scroll').subscribe((event) => {
73
+ this.onScroll(event);
581
74
  });
582
- // Guard against re-entry: dispatching 'scroll' on the Lenis wrapper
583
- // triggers onNativeScroll → re-emits the Lenis scroll event → infinite loop.
584
- if (_dispatching)
585
- return;
586
- _dispatching = true;
587
- el.dispatchEvent(new Event('scroll'));
588
- _dispatching = false;
589
- });
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)),
80
+ });
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 });
590
93
  }
591
94
  ngOnDestroy() {
592
- this.pageScrollProvider.destroy();
95
+ if (this.scrollSubscription) {
96
+ this.scrollSubscription.unsubscribe();
97
+ }
593
98
  }
594
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageComponent, deps: [{ token: PageScrollProvider }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
595
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: IoxPageComponent, isStandalone: false, selector: "iox-page-component", inputs: { class: "class", scrollEnabled: "scrollEnabled", scrollOptions: "scrollOptions" }, outputs: { scrollEvent: "scrollEvent" }, viewQueries: [{ propertyName: "page", first: true, predicate: ["page"], descendants: true }], ngImport: i0, template: "<div #page [class]=\"class\" class=\"iox-page-wrapper\">\n <div class=\"page-mask\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{position:absolute;inset:0}.iox-page-wrapper{position:relative;width:100%;height:100%;overflow:auto}.page-mask{min-height:100%}\n"] }); }
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"] }); }
596
101
  }
597
- 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: [{
598
103
  type: Component,
599
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"] }]
600
- }], ctorParameters: () => [{ type: PageScrollProvider }, { type: undefined, decorators: [{
601
- type: Inject,
602
- args: [PLATFORM_ID]
603
- }] }], propDecorators: { class: [{
604
- type: Input
605
- }], scrollEnabled: [{
606
- type: Input
607
- }], scrollOptions: [{
105
+ }], ctorParameters: () => [{ type: PageScrollProvider }], propDecorators: { class: [{
608
106
  type: Input
609
107
  }], page: [{
610
108
  type: ViewChild,
@@ -614,11 +112,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
614
112
  }] } });
615
113
 
616
114
  class IoxPageModule {
617
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
618
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: IoxPageModule, declarations: [IoxPageComponent], imports: [CommonModule], exports: [IoxPageComponent] }); }
619
- 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] }); }
620
118
  }
621
- 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: [{
622
120
  type: NgModule,
623
121
  args: [{
624
122
  imports: [CommonModule],
@@ -628,1102 +126,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
628
126
  }]
629
127
  }] });
630
128
 
631
- class IoxUiModule {
632
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
633
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: IoxUiModule, imports: [IoxAosModule, IoxPageModule], exports: [IoxAosModule, IoxPageModule] }); }
634
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxUiModule, imports: [IoxAosModule, IoxPageModule, IoxAosModule, IoxPageModule] }); }
635
- }
636
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxUiModule, decorators: [{
637
- type: NgModule,
638
- args: [{
639
- declarations: [],
640
- imports: [IoxAosModule, IoxPageModule],
641
- exports: [IoxAosModule, IoxPageModule]
642
- }]
643
- }] });
644
-
645
- var PrivacyModelEvent;
646
- (function (PrivacyModelEvent) {
647
- PrivacyModelEvent[PrivacyModelEvent["OPEN"] = 1] = "OPEN";
648
- PrivacyModelEvent[PrivacyModelEvent["CLOSE"] = 2] = "CLOSE";
649
- })(PrivacyModelEvent || (PrivacyModelEvent = {}));
650
- class PrivacyModalService {
651
- constructor() {
652
- this.modalEvent = new Subject();
653
- this.decisionSubject = null;
654
- }
655
- registerModalEvent(func) {
656
- this.modalEvent.subscribe({
657
- next: (val) => {
658
- func(val);
659
- }
660
- });
661
- }
662
- openModal() {
663
- this.modalEvent.next(PrivacyModelEvent.OPEN);
664
- this.decisionSubject = new Subject();
665
- return this.decisionSubject;
666
- }
667
- closeModal() {
668
- this.modalEvent.next(PrivacyModelEvent.CLOSE);
669
- }
670
- notifyDecision(accepted) {
671
- if (this.decisionSubject) {
672
- this.decisionSubject.next(accepted);
673
- this.decisionSubject.complete();
674
- this.decisionSubject = null;
675
- }
676
- this.closeModal();
677
- }
678
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
679
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalService }); }
680
- }
681
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalService, decorators: [{
682
- type: Injectable
683
- }], ctorParameters: () => [] });
684
-
685
- class ConsentService {
686
- constructor(cookieService, httpClient, _privacyModalService, environment) {
687
- this.cookieService = cookieService;
688
- this.httpClient = httpClient;
689
- this._privacyModalService = _privacyModalService;
690
- this.environment = environment;
691
- this.WEB_USER = "webUser";
692
- }
693
- hasAnalyticsConsent() {
694
- const cookieValue = this.cookieService.get(this.WEB_USER);
695
- if (!cookieValue) {
696
- return false;
697
- }
698
- try {
699
- const parsedCookieValue = JSON.parse(cookieValue);
700
- return parsedCookieValue.user?.consent?.analyticsConsent === true;
701
- }
702
- catch {
703
- // Invalid JSON or unexpected structure: treat as no consent
704
- return false;
705
- }
706
- }
707
- checkAnalyticsConsent() {
708
- if (this.hasAnalyticsConsent()) {
709
- // Consent already given, return true immediately as Observable
710
- return of(true);
711
- }
712
- // No consent yet (or invalid/missing cookie) -> show modal
713
- return this._privacyModalService.openModal();
714
- }
715
- checkMarketingConsent() {
716
- let cookieValue = this.cookieService.get(this.WEB_USER);
717
- if (!cookieValue) {
718
- return false;
719
- }
720
- let parsedCookieValue = JSON.parse(cookieValue);
721
- return parsedCookieValue.user?.consent?.marketingConsent;
722
- }
723
- setConsent(analytics, marketing) {
724
- let cookieValue = this.cookieService.get(this.WEB_USER);
725
- let parsedCookieValue = cookieValue ? JSON.parse(cookieValue) : { user: { consent: {
726
- anonymousId: this.generateAnonymousId()
727
- } } };
728
- parsedCookieValue.user.consent.analyticsConsent = analytics;
729
- parsedCookieValue.user.consent.marketingConsent = marketing;
730
- this.cookieService.set(this.WEB_USER, JSON.stringify(parsedCookieValue));
731
- this.httpClient.post(`${this.environment.HOST}consent`, parsedCookieValue.user.consent)
732
- .subscribe({
733
- next: (response) => {
734
- console.log('Consent updated successfully:', response);
735
- },
736
- error: (error) => {
737
- console.error('Error updating consent:', error);
738
- }
739
- });
740
- }
741
- generateAnonymousId() {
742
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
743
- var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
744
- return v.toString(16);
745
- });
746
- }
747
- 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 }); }
748
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsentService }); }
749
- }
750
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsentService, decorators: [{
751
- type: Injectable
752
- }], ctorParameters: () => [{ type: i1.CookieService }, { type: i1$1.HttpClient }, { type: PrivacyModalService }, { type: undefined, decorators: [{
753
- type: Inject,
754
- args: [ENVIRONMENT]
755
- }] }] });
756
-
757
- class PrivacyModalComponent {
758
- constructor(_privacyModalService, _consentService) {
759
- this._privacyModalService = _privacyModalService;
760
- this._consentService = _consentService;
761
- this.isOpen = false;
762
- this._privacyModalService.registerModalEvent((event) => {
763
- if (event == PrivacyModelEvent.CLOSE) {
764
- this.isOpen = false;
765
- }
766
- else {
767
- this.isOpen = true;
768
- }
769
- });
770
- }
771
- onAccept() {
772
- this._consentService.setConsent(true, true);
773
- this._privacyModalService.notifyDecision(true);
774
- this.isOpen = false;
775
- }
776
- onDecline() {
777
- this._privacyModalService.notifyDecision(false);
778
- this.isOpen = false;
779
- }
780
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalComponent, deps: [{ token: PrivacyModalService }, { token: ConsentService }], target: i0.ɵɵFactoryTarget.Component }); }
781
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: PrivacyModalComponent, isStandalone: false, selector: "privacy-modal", ngImport: i0, template: "<div class=\"privacy-modal\" [ngClass]=\"{'open': isOpen, 'closed': !isOpen}\">\n <div class=\"modal-content\">\n <h2>\u05D0\u05E0\u05D7\u05E0\u05D5 \u05E9\u05D5\u05DE\u05E8\u05D9\u05DD \u05E2\u05DC \u05D4\u05E4\u05E8\u05D8\u05D9\u05D5\u05EA \u05E9\u05DC\u05DA</h2>\n <p dir=\"rtl\">\n <span>\n \u05D0\u05E0\u05D7\u05E0\u05D5 \u05DE\u05E9\u05DE\u05E9\u05D9\u05DD \u05D1\u05E7\u05D1\u05E6\u05D9 \n </span>\n <span>Cookies </span>\n <span>\u05DB\u05D3\u05D9 \u05DC\u05E9\u05E4\u05E8 \u05D0\u05EA \u05D7\u05D5\u05D5\u05D9\u05EA \u05D4\u05D2\u05DC\u05D9\u05E9\u05D4 \u05E9\u05DC\u05DA, \u05DC\u05E0\u05EA\u05D7 \u05E9\u05D9\u05DE\u05D5\u05E9 \u05D1\u05D0\u05EA\u05E8 \u05D5\u05DC\u05D4\u05E6\u05D9\u05E2 \u05EA\u05D5\u05DB\u05DF \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA.</span>\n <span> \u05DC\u05DE\u05D9\u05D3\u05E2 \u05E0\u05D5\u05E1\u05E3 \u05E2\u05DC \u05D0\u05D9\u05DA \u05D0\u05E0\u05D7\u05E0\u05D5 \u05DE\u05E9\u05EA\u05DE\u05E9\u05D9\u05DD \u05D1\u05DE\u05D9\u05D3\u05E2 \u05E9\u05DC\u05DA, \u05E8\u05D0\u05D4 \u05D0\u05EA <a target=\"_blank\" href=\"/privacy\">\u05DE\u05D3\u05D9\u05E0\u05D9\u05D5\u05EA \u05D4\u05E4\u05E8\u05D8\u05D9\u05D5\u05EA </a> \u05E9\u05DC\u05E0\u05D5</span>\n </p>\n\n <div class=\"button-container\">\n <button class=\"accept-button\" (click)=\"onAccept()\">\u05D0\u05E0\u05D9 \u05DE\u05E1\u05DB\u05D9\u05DD</button>\n <button class=\"decline-button\" (click)=\"onDecline()\">\u05D0\u05E0\u05D9 \u05DC\u05D0 \u05DE\u05E1\u05DB\u05D9\u05DD</button>\n </div>\n </div>\n</div>\n", styles: [".privacy-modal{padding:2em;background:#fff;border-radius:8px;position:fixed;z-index:10000000000000;bottom:0;left:0;right:0;height:25vh;display:flex;align-items:center;justify-content:center;transform:translateY(100%);transition:transform .3s ease-in-out}.privacy-modal.open{transform:translateY(0);transition:transform .3s ease-in-out}.modal-content{width:40vw;text-align:right}.privacy-modal h2{margin-top:0;text-align:right;font-size:2.1vw;color:#6b4f3b}.privacy-modal p{font-size:1.3vw;color:#6b4f3b}.button-container{display:flex;justify-content:flex-end;margin-top:20px}.button-container button{border:0;margin-inline-start:15px;font-size:1vw}.button-container .accept-button{background:#6b4f3b;color:#fff;padding:.5em 1em;border-radius:4px;cursor:pointer}.button-container .accept-button:hover{background:#5b4332}.button-container .decline-button{background:transparent;color:#6b4f3b;padding:0;cursor:pointer;border-bottom:1px solid #fff}.button-container .decline-button:hover{border-bottom:1px solid #6b4f3b}@media (max-width: 768px){.privacy-modal h2{font-size:8.2vw}.privacy-modal p{font-size:4.2vw}.privacy-modal .modal-content{width:80vw}.privacy-modal .button-container button{font-size:3.2vw}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
782
- }
783
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalComponent, decorators: [{
784
- type: Component,
785
- 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"] }]
786
- }], ctorParameters: () => [{ type: PrivacyModalService }, { type: ConsentService }] });
787
-
788
- class WebSettingsService {
789
- constructor(httpClient, environment) {
790
- this.httpClient = httpClient;
791
- this.environment = environment;
792
- }
793
- getSettings() {
794
- // If the server injected a runtime config (window.__APP_CONFIG) use that first,
795
- // otherwise fall back to the compile-time environment.HOST.
796
- const runtimeHost = (typeof window !== 'undefined' && window.__APP_CONFIG && window.__APP_CONFIG.HOST) ? window.__APP_CONFIG.HOST : this.environment.HOST;
797
- return this.httpClient.get(`${runtimeHost}web/settings`);
798
- }
799
- configArrayToObject(arr) {
800
- return arr.reduce((acc, item) => {
801
- acc[item.key] = item.value;
802
- return acc;
803
- }, {});
804
- }
805
- 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 }); }
806
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WebSettingsService }); }
807
- }
808
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WebSettingsService, decorators: [{
809
- type: Injectable
810
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
811
- type: Inject,
812
- args: [ENVIRONMENT]
813
- }] }] });
814
-
815
- class ContentService {
816
- constructor(httpClient, environment) {
817
- this.httpClient = httpClient;
818
- this.environment = environment;
819
- this.appContent = {};
820
- }
821
- getContent(contentName, id) {
822
- if (this.appContent[contentName] && this.appContent[contentName].length) {
823
- if (id) {
824
- return of(this.findOne(this.appContent[contentName], id));
825
- }
826
- return of(this.appContent[contentName]);
827
- }
828
- return this.httpClient.get(`${this.environment.HOST}${contentName}`).pipe(map((content) => {
829
- if (contentName == this.environment.contentResource.SERVICES || contentName == this.environment.contentResource.PROJECTS) {
830
- content = content.map((item) => {
831
- item.id = item.name.replace(/ /g, "_");
832
- //item._id= item.name.replace(/ /g,"_");
833
- return item;
834
- });
835
- }
836
- this.appContent[contentName] = content;
837
- if (id) {
838
- return this.findOne(this.appContent[contentName], id);
839
- }
840
- return content;
841
- }));
842
- }
843
- findOne(arr, id) {
844
- for (let i = 0; i < arr.length; i++) {
845
- if (arr[i].id == id) {
846
- return arr[i];
847
- }
848
- }
849
- }
850
- 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 }); }
851
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContentService }); }
852
- }
853
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContentService, decorators: [{
854
- type: Injectable
855
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
856
- type: Inject,
857
- args: [ENVIRONMENT]
858
- }] }] });
859
-
860
- const ENVIRONMENT = new InjectionToken('environment');
861
- class CMSClientInfraModule {
862
- static forRoot(environment) {
863
- return {
864
- ngModule: CMSClientInfraModule,
865
- providers: [
866
- { provide: ENVIRONMENT, useValue: environment },
867
- ConsentService,
868
- ContentService,
869
- CookieService,
870
- WebSettingsService,
871
- PrivacyModalService
872
- ]
873
- };
874
- }
875
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
876
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, declarations: [PrivacyModalComponent], imports: [CommonModule], exports: [PrivacyModalComponent] }); }
877
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, imports: [CommonModule] }); }
878
- }
879
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, decorators: [{
880
- type: NgModule,
881
- args: [{
882
- declarations: [
883
- PrivacyModalComponent
884
- ],
885
- imports: [
886
- CommonModule
887
- ],
888
- exports: [PrivacyModalComponent]
889
- }]
890
- }] });
891
-
892
- class AnalyticsService {
893
- constructor(platformId) {
894
- this.platformId = platformId;
895
- this.gaScriptId = 'google-analytics-script';
896
- }
897
- applyGoogleAnalytics(appId) {
898
- if (!isPlatformBrowser(this.platformId))
899
- return;
900
- // 1. Establish the dataLayer and the CORRECT gtag function stub
901
- const win = window;
902
- win.dataLayer = win.dataLayer || [];
903
- // CRITICAL FIX: The Google library requires the special 'arguments' object,
904
- // NOT a standard array spread [...args].
905
- if (!win.gtag) {
906
- win.gtag = function () {
907
- win.dataLayer.push(arguments);
908
- };
909
- }
910
- // 2. Queue initial commands immediately (even before script loads)
911
- win.gtag('js', new Date());
912
- win.gtag('config', appId);
913
- // 3. Load the script if not already present
914
- if (!document.getElementById(this.gaScriptId)) {
915
- const script = document.createElement('script');
916
- script.id = this.gaScriptId;
917
- script.async = true;
918
- script.src = `https://www.googletagmanager.com/gtag/js?id=${appId}`;
919
- script.onload = () => {
920
- console.log('[Analytics] gtag.js script loaded and ready');
921
- };
922
- script.onerror = (e) => console.error('[Analytics] gtag.js failed to load', e);
923
- document.head.appendChild(script);
924
- }
925
- }
926
- // Helper to send events from your components
927
- sendEvent(eventName, params = {}) {
928
- if (isPlatformBrowser(this.platformId) && window.gtag) {
929
- window.gtag('event', eventName, params);
930
- }
931
- }
932
- // Synchronous page view sender that won't rely on internal ready Promise
933
- sendPageView(path) {
934
- if (!isPlatformBrowser(this.platformId))
935
- return;
936
- const win = window;
937
- try {
938
- if (win && win.gtag) {
939
- // Prefer gtag when available
940
- win.gtag('event', 'page_view', { page_path: path });
941
- return;
942
- }
943
- // Fallback: ensure dataLayer exists and push a native arguments-like object
944
- win.dataLayer = win.dataLayer || [];
945
- // Use a plain object that resembles gtag's usage if gtag not present
946
- win.dataLayer.push({ event: 'page_view', page_path: path });
947
- }
948
- catch (err) {
949
- console.warn('[Analytics] sendPageView failed', err);
950
- }
951
- }
952
- 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 }); }
953
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AnalyticsService, providedIn: 'root' }); }
954
- }
955
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AnalyticsService, decorators: [{
956
- type: Injectable,
957
- args: [{ providedIn: 'root' }]
958
- }], ctorParameters: () => [{ type: Object, decorators: [{
959
- type: Inject,
960
- args: [PLATFORM_ID]
961
- }] }] });
962
-
963
129
  const IS_PREVIEW = new InjectionToken('IS_PREVIEW');
964
- const IOX_BUILDER_EVENTS = new InjectionToken('IOX_BUILDER_EVENTS');
965
-
966
- class BuilderImageComponent {
967
- constructor() {
968
- this.src = 'https://placehold.co/600x400?text=Image';
969
- this.alt = 'Image';
970
- this.objectFit = 'cover';
971
- this.nodeId = '';
972
- }
973
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
974
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderImageComponent, isStandalone: false, selector: "app-builder-image", inputs: { src: "src", alt: "alt", objectFit: "objectFit", nodeId: "nodeId" }, ngImport: i0, template: `
975
- <img [src]="src" [alt]="alt" [ngClass]="'iox-node-' + nodeId" [style.object-fit]="objectFit" />
976
- `, isInline: true, styles: ["img{display:block;max-width:100%}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
977
- }
978
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderImageComponent, decorators: [{
979
- type: Component,
980
- args: [{ selector: 'app-builder-image', template: `
981
- <img [src]="src" [alt]="alt" [ngClass]="'iox-node-' + nodeId" [style.object-fit]="objectFit" />
982
- `, standalone: false, styles: ["img{display:block;max-width:100%}\n"] }]
983
- }], propDecorators: { src: [{
984
- type: Input
985
- }], alt: [{
986
- type: Input
987
- }], objectFit: [{
988
- type: Input
989
- }], nodeId: [{
990
- type: Input
991
- }] } });
992
-
993
- class BuilderSpacerComponent {
994
- constructor() {
995
- this.nodeId = '';
996
- }
997
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
998
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderSpacerComponent, isStandalone: false, selector: "app-builder-spacer", inputs: { nodeId: "nodeId" }, ngImport: i0, template: `<div class="iox-spacer" [ngClass]="'iox-node-' + nodeId"></div>`, isInline: true, styles: [".iox-spacer{display:block;flex-shrink:0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
999
- }
1000
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderSpacerComponent, decorators: [{
1001
- type: Component,
1002
- args: [{ selector: 'app-builder-spacer', template: `<div class="iox-spacer" [ngClass]="'iox-node-' + nodeId"></div>`, standalone: false, styles: [".iox-spacer{display:block;flex-shrink:0}\n"] }]
1003
- }], propDecorators: { nodeId: [{
1004
- type: Input
1005
- }] } });
1006
-
1007
- class CardComponent {
1008
- constructor() {
1009
- this.title = '';
1010
- this.image = '';
1011
- this.description = '';
1012
- this.nodeId = '';
1013
- }
1014
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1015
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CardComponent, isStandalone: false, selector: "app-card", inputs: { title: "title", image: "image", description: "description", nodeId: "nodeId" }, ngImport: i0, template: `
1016
- <div class="card" [ngClass]="'iox-node-' + nodeId">
1017
- <div class="image-wrapper">
1018
- <img [src]="image" alt="Card image" class="card-img">
1019
- </div>
1020
- <h2>{{ title }}</h2>
1021
- <p>{{ description }}</p>
1022
- </div>
1023
- `, isInline: true, styles: [".image-wrapper{width:100%;aspect-ratio:1/1;overflow:hidden;margin-bottom:.75rem}\n", ".card-img{width:100%;height:100%;object-fit:cover}\n", "h2{margin:0 0 .5rem;font-size:1.2rem}\n", "p{margin:0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1024
- }
1025
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CardComponent, decorators: [{
1026
- type: Component,
1027
- args: [{ selector: 'app-card', template: `
1028
- <div class="card" [ngClass]="'iox-node-' + nodeId">
1029
- <div class="image-wrapper">
1030
- <img [src]="image" alt="Card image" class="card-img">
1031
- </div>
1032
- <h2>{{ title }}</h2>
1033
- <p>{{ description }}</p>
1034
- </div>
1035
- `, standalone: false, styles: [".image-wrapper{width:100%;aspect-ratio:1/1;overflow:hidden;margin-bottom:.75rem}\n", ".card-img{width:100%;height:100%;object-fit:cover}\n", "h2{margin:0 0 .5rem;font-size:1.2rem}\n", "p{margin:0}\n"] }]
1036
- }], propDecorators: { title: [{
1037
- type: Input
1038
- }], image: [{
1039
- type: Input
1040
- }], description: [{
1041
- type: Input
1042
- }], nodeId: [{
1043
- type: Input
1044
- }] } });
1045
-
1046
- class BuilderDividerComponent {
1047
- constructor() {
1048
- this.nodeId = '';
1049
- }
1050
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1051
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderDividerComponent, isStandalone: false, selector: "app-builder-divider", inputs: { nodeId: "nodeId" }, ngImport: i0, template: `<div class="iox-divider" [ngClass]="'iox-node-' + nodeId"></div>`, isInline: true, styles: [".iox-divider{box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1052
- }
1053
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderDividerComponent, decorators: [{
1054
- type: Component,
1055
- args: [{ selector: 'app-builder-divider', template: `<div class="iox-divider" [ngClass]="'iox-node-' + nodeId"></div>`, standalone: false, styles: [".iox-divider{box-sizing:border-box}\n"] }]
1056
- }], propDecorators: { nodeId: [{
1057
- type: Input
1058
- }] } });
1059
-
1060
- class BuilderIconComponent {
1061
- constructor() {
1062
- /** Full Phosphor icon CSS class string, e.g. "ph-thin ph-star" */
1063
- this.iconClass = 'ph-thin ph-star';
1064
- this.nodeId = '';
1065
- }
1066
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1067
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderIconComponent, isStandalone: false, selector: "app-builder-icon", inputs: { iconClass: "iconClass", nodeId: "nodeId" }, ngImport: i0, template: `<i [ngClass]="[iconClass, 'iox-node-' + nodeId]"></i>`, isInline: true, styles: ["i{display:inline-block;line-height:1}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1068
- }
1069
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderIconComponent, decorators: [{
1070
- type: Component,
1071
- args: [{ selector: 'app-builder-icon', template: `<i [ngClass]="[iconClass, 'iox-node-' + nodeId]"></i>`, standalone: false, styles: ["i{display:inline-block;line-height:1}\n"] }]
1072
- }], propDecorators: { iconClass: [{
1073
- type: Input
1074
- }], nodeId: [{
1075
- type: Input
1076
- }] } });
1077
-
1078
- class BuilderLinkComponent {
1079
- constructor(isPreview) {
1080
- this.isPreview = isPreview;
1081
- this.label = 'Click here';
1082
- this.linkType = 'external';
1083
- this.url = 'https://';
1084
- this.pageRoute = '';
1085
- this.target = '_self';
1086
- this.style = {};
1087
- }
1088
- get resolvedHref() {
1089
- if (this.linkType !== 'page')
1090
- return this.url || '#';
1091
- return this.pageRoute || '#';
1092
- }
1093
- onLinkClick(event) {
1094
- if (!this.isPreview) {
1095
- event.preventDefault();
1096
- event.stopPropagation();
1097
- }
1098
- }
1099
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderLinkComponent, deps: [{ token: IS_PREVIEW, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1100
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderLinkComponent, isStandalone: false, selector: "app-builder-link", inputs: { label: "label", linkType: "linkType", url: "url", pageRoute: "pageRoute", target: "target", style: "style" }, ngImport: i0, template: `
1101
- <a [href]="isPreview ? resolvedHref : null"
1102
- [attr.target]="isPreview ? target : null"
1103
- [ngStyle]="style"
1104
- [style.pointerEvents]="isPreview ? '' : 'none'"
1105
- class="builder-link"
1106
- (click)="onLinkClick($event)">
1107
- {{ label }}
1108
- </a>
1109
- `, isInline: true, styles: [".builder-link{display:inline;cursor:pointer;color:inherit}\n"], dependencies: [{ kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1110
- }
1111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderLinkComponent, decorators: [{
1112
- type: Component,
1113
- args: [{ selector: 'app-builder-link', template: `
1114
- <a [href]="isPreview ? resolvedHref : null"
1115
- [attr.target]="isPreview ? target : null"
1116
- [ngStyle]="style"
1117
- [style.pointerEvents]="isPreview ? '' : 'none'"
1118
- class="builder-link"
1119
- (click)="onLinkClick($event)">
1120
- {{ label }}
1121
- </a>
1122
- `, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".builder-link{display:inline;cursor:pointer;color:inherit}\n"] }]
1123
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1124
- type: Optional
1125
- }, {
1126
- type: Inject,
1127
- args: [IS_PREVIEW]
1128
- }] }], propDecorators: { label: [{
1129
- type: Input
1130
- }], linkType: [{
1131
- type: Input
1132
- }], url: [{
1133
- type: Input
1134
- }], pageRoute: [{
1135
- type: Input
1136
- }], target: [{
1137
- type: Input
1138
- }], style: [{
1139
- type: Input
1140
- }] } });
1141
-
1142
- class BuilderButtonComponent {
1143
- constructor(events) {
1144
- this.events = events;
1145
- this.label = 'Click me';
1146
- this.link = '#';
1147
- this.variant = 'primary';
1148
- this.nodeId = '';
1149
- this.node = null;
1150
- this.editing = false;
1151
- }
1152
- ngOnInit() { }
1153
- startEdit(event) {
1154
- if (this.isBound('label'))
1155
- return;
1156
- event.preventDefault();
1157
- event.stopPropagation();
1158
- this.editing = true;
1159
- setTimeout(() => event.target.focus());
1160
- }
1161
- commitEdit(event) {
1162
- if (!this.editing)
1163
- return;
1164
- this.editing = false;
1165
- const newValue = event.target.innerText.trim();
1166
- this.label = newValue;
1167
- this.syncTraitToPanel('label', newValue);
1168
- }
1169
- onKeyDown(event) {
1170
- if (event.key === 'Enter') {
1171
- event.preventDefault();
1172
- event.target.blur();
1173
- }
1174
- if (event.key === 'Escape') {
1175
- this.editing = false;
1176
- event.target.blur();
1177
- }
1178
- event.stopPropagation();
1179
- }
1180
- isBound(prop) {
1181
- return (this.node?.bindings || []).some(b => b.prop === prop);
1182
- }
1183
- syncTraitToPanel(prop, value) {
1184
- if (!this.node || !this.events)
1185
- return;
1186
- const trait = (this.node.traits || []).find(t => t.name === prop);
1187
- if (trait) {
1188
- trait.default = value;
1189
- }
1190
- this.events.emit('elementselect', { node: this.node, componentRef: null });
1191
- }
1192
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderButtonComponent, deps: [{ token: IOX_BUILDER_EVENTS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1193
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderButtonComponent, isStandalone: false, selector: "app-builder-button", inputs: { label: "label", link: "link", variant: "variant", nodeId: "nodeId", node: "node" }, ngImport: i0, template: `
1194
- <a [href]="link" class="builder-btn" [ngClass]="['variant-' + variant, 'iox-node-' + nodeId]"
1195
- [attr.contenteditable]="editing ? 'true' : null"
1196
- (dblclick)="startEdit($event)"
1197
- (blur)="commitEdit($event)"
1198
- (keydown)="onKeyDown($event)">
1199
- {{ label }}
1200
- </a>
1201
- `, isInline: true, styles: [".builder-btn{display:inline-block;padding:.6rem 1.5rem;border-radius:6px;font-size:.9rem;text-decoration:none;cursor:pointer;text-align:center;transition:opacity .15s}.variant-primary{background:#cb9090;color:#fff;border:1px solid #cb9090}.variant-outlined{background:transparent;color:#cb9090;border:1px solid #cb9090}.variant-text{background:transparent;color:#cb9090;border:1px solid transparent}[contenteditable]{outline:2px solid #cb9090;cursor:text}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1202
- }
1203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderButtonComponent, decorators: [{
1204
- type: Component,
1205
- args: [{ selector: 'app-builder-button', template: `
1206
- <a [href]="link" class="builder-btn" [ngClass]="['variant-' + variant, 'iox-node-' + nodeId]"
1207
- [attr.contenteditable]="editing ? 'true' : null"
1208
- (dblclick)="startEdit($event)"
1209
- (blur)="commitEdit($event)"
1210
- (keydown)="onKeyDown($event)">
1211
- {{ label }}
1212
- </a>
1213
- `, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".builder-btn{display:inline-block;padding:.6rem 1.5rem;border-radius:6px;font-size:.9rem;text-decoration:none;cursor:pointer;text-align:center;transition:opacity .15s}.variant-primary{background:#cb9090;color:#fff;border:1px solid #cb9090}.variant-outlined{background:transparent;color:#cb9090;border:1px solid #cb9090}.variant-text{background:transparent;color:#cb9090;border:1px solid transparent}[contenteditable]{outline:2px solid #cb9090;cursor:text}\n"] }]
1214
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1215
- type: Optional
1216
- }, {
1217
- type: Inject,
1218
- args: [IOX_BUILDER_EVENTS]
1219
- }] }], propDecorators: { label: [{
1220
- type: Input
1221
- }], link: [{
1222
- type: Input
1223
- }], variant: [{
1224
- type: Input
1225
- }], nodeId: [{
1226
- type: Input
1227
- }], node: [{
1228
- type: Input
1229
- }] } });
1230
-
1231
- class BuilderHeadingComponent {
1232
- constructor(events, cdr) {
1233
- this.events = events;
1234
- this.cdr = cdr;
1235
- this.content = 'Heading';
1236
- this.level = 'h2';
1237
- this.nodeId = '';
1238
- this.node = null;
1239
- this.editing = false;
1240
- }
1241
- ngOnInit() { }
1242
- onMouseDown(event) {
1243
- if (this.editing) {
1244
- event.stopPropagation();
1245
- }
1246
- }
1247
- startEdit(event) {
1248
- if (this.isBound('content'))
1249
- return;
1250
- event.stopPropagation();
1251
- this.editing = true;
1252
- this.cdr.detectChanges();
1253
- this.cdr.detach();
1254
- const el = event.target;
1255
- setTimeout(() => { el.focus(); });
1256
- }
1257
- commitEdit(event) {
1258
- if (!this.editing)
1259
- return;
1260
- this.editing = false;
1261
- const newValue = event.target.innerText;
1262
- this.content = newValue;
1263
- this.cdr.reattach();
1264
- this.syncTraitToPanel('content', newValue);
1265
- }
1266
- onKeyDown(event) {
1267
- if (event.key === 'Enter' && !event.shiftKey) {
1268
- event.preventDefault();
1269
- event.target.blur();
1270
- }
1271
- if (event.key === 'Escape') {
1272
- this.editing = false;
1273
- this.cdr.reattach();
1274
- event.target.blur();
1275
- }
1276
- event.stopPropagation();
1277
- }
1278
- isBound(prop) {
1279
- return (this.node?.bindings || []).some(b => b.prop === prop);
1280
- }
1281
- syncTraitToPanel(prop, value) {
1282
- if (!this.node || !this.events)
1283
- return;
1284
- const trait = (this.node.traits || []).find(t => t.name === prop);
1285
- if (trait) {
1286
- trait.default = value;
1287
- }
1288
- this.events.emit('elementselect', { node: this.node, componentRef: null, isCanvasUpdate: true });
1289
- }
1290
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderHeadingComponent, deps: [{ token: IOX_BUILDER_EVENTS, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1291
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: BuilderHeadingComponent, isStandalone: false, selector: "app-builder-heading", inputs: { content: "content", level: "level", nodeId: "nodeId", node: "node" }, ngImport: i0, template: `
1292
- <ng-container [ngSwitch]="level">
1293
- <h1 *ngSwitchCase="'h1'" [ngClass]="'iox-node-' + nodeId"
1294
- [attr.contenteditable]="editing ? 'true' : null"
1295
- (mousedown)="onMouseDown($event)"
1296
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h1>
1297
- <h2 *ngSwitchCase="'h2'" [ngClass]="'iox-node-' + nodeId"
1298
- [attr.contenteditable]="editing ? 'true' : null"
1299
- (mousedown)="onMouseDown($event)"
1300
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h2>
1301
- <h3 *ngSwitchCase="'h3'" [ngClass]="'iox-node-' + nodeId"
1302
- [attr.contenteditable]="editing ? 'true' : null"
1303
- (mousedown)="onMouseDown($event)"
1304
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h3>
1305
- <h4 *ngSwitchCase="'h4'" [ngClass]="'iox-node-' + nodeId"
1306
- [attr.contenteditable]="editing ? 'true' : null"
1307
- (mousedown)="onMouseDown($event)"
1308
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h4>
1309
- <h5 *ngSwitchCase="'h5'" [ngClass]="'iox-node-' + nodeId"
1310
- [attr.contenteditable]="editing ? 'true' : null"
1311
- (mousedown)="onMouseDown($event)"
1312
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h5>
1313
- <h6 *ngSwitchDefault [ngClass]="'iox-node-' + nodeId"
1314
- [attr.contenteditable]="editing ? 'true' : null"
1315
- (mousedown)="onMouseDown($event)"
1316
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h6>
1317
- </ng-container>
1318
- `, isInline: true, styles: ["h1,h2,h3,h4,h5,h6{margin:0}[contenteditable]{outline:none;cursor:text}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1319
- }
1320
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BuilderHeadingComponent, decorators: [{
1321
- type: Component,
1322
- args: [{ selector: 'app-builder-heading', template: `
1323
- <ng-container [ngSwitch]="level">
1324
- <h1 *ngSwitchCase="'h1'" [ngClass]="'iox-node-' + nodeId"
1325
- [attr.contenteditable]="editing ? 'true' : null"
1326
- (mousedown)="onMouseDown($event)"
1327
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h1>
1328
- <h2 *ngSwitchCase="'h2'" [ngClass]="'iox-node-' + nodeId"
1329
- [attr.contenteditable]="editing ? 'true' : null"
1330
- (mousedown)="onMouseDown($event)"
1331
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h2>
1332
- <h3 *ngSwitchCase="'h3'" [ngClass]="'iox-node-' + nodeId"
1333
- [attr.contenteditable]="editing ? 'true' : null"
1334
- (mousedown)="onMouseDown($event)"
1335
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h3>
1336
- <h4 *ngSwitchCase="'h4'" [ngClass]="'iox-node-' + nodeId"
1337
- [attr.contenteditable]="editing ? 'true' : null"
1338
- (mousedown)="onMouseDown($event)"
1339
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h4>
1340
- <h5 *ngSwitchCase="'h5'" [ngClass]="'iox-node-' + nodeId"
1341
- [attr.contenteditable]="editing ? 'true' : null"
1342
- (mousedown)="onMouseDown($event)"
1343
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h5>
1344
- <h6 *ngSwitchDefault [ngClass]="'iox-node-' + nodeId"
1345
- [attr.contenteditable]="editing ? 'true' : null"
1346
- (mousedown)="onMouseDown($event)"
1347
- (dblclick)="startEdit($event)" (blur)="commitEdit($event)" (keydown)="onKeyDown($event)">{{ content }}</h6>
1348
- </ng-container>
1349
- `, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["h1,h2,h3,h4,h5,h6{margin:0}[contenteditable]{outline:none;cursor:text}\n"] }]
1350
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1351
- type: Optional
1352
- }, {
1353
- type: Inject,
1354
- args: [IOX_BUILDER_EVENTS]
1355
- }] }, { type: i0.ChangeDetectorRef }], propDecorators: { content: [{
1356
- type: Input
1357
- }], level: [{
1358
- type: Input
1359
- }], nodeId: [{
1360
- type: Input
1361
- }], node: [{
1362
- type: Input
1363
- }] } });
1364
-
1365
- class TextBlockComponent {
1366
- constructor(events, cdr) {
1367
- this.events = events;
1368
- this.cdr = cdr;
1369
- this.content = 'Enter text here';
1370
- this.tag = 'p';
1371
- this.style = {};
1372
- this.nodeId = '';
1373
- this.node = null;
1374
- this.editing = false;
1375
- }
1376
- ngOnInit() { }
1377
- onMouseDown(event) {
1378
- if (this.editing) {
1379
- event.stopPropagation();
1380
- }
1381
- }
1382
- startEdit(event) {
1383
- if (this.isBound('content'))
1384
- return;
1385
- event.stopPropagation();
1386
- this.editing = true;
1387
- this.cdr.detectChanges();
1388
- this.cdr.detach();
1389
- const el = event.target;
1390
- setTimeout(() => { el.focus(); });
1391
- }
1392
- commitEdit(event) {
1393
- if (!this.editing)
1394
- return;
1395
- this.editing = false;
1396
- const newValue = event.target.innerText;
1397
- this.content = newValue;
1398
- this.cdr.reattach();
1399
- this.syncTraitToPanel('content', newValue);
1400
- }
1401
- onKeyDown(event) {
1402
- if (event.key === 'Enter' && !event.shiftKey) {
1403
- event.preventDefault();
1404
- event.target.blur();
1405
- }
1406
- if (event.key === 'Escape') {
1407
- this.editing = false;
1408
- this.cdr.reattach();
1409
- event.target.blur();
1410
- }
1411
- event.stopPropagation();
1412
- }
1413
- isBound(prop) {
1414
- return (this.node?.bindings || []).some(b => b.prop === prop);
1415
- }
1416
- syncTraitToPanel(prop, value) {
1417
- if (!this.node || !this.events)
1418
- return;
1419
- const trait = (this.node.traits || []).find(t => t.name === prop);
1420
- if (trait) {
1421
- trait.default = value;
1422
- }
1423
- this.events.emit('elementselect', { node: this.node, componentRef: null, isCanvasUpdate: true });
1424
- }
1425
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TextBlockComponent, deps: [{ token: IOX_BUILDER_EVENTS, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1426
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: TextBlockComponent, isStandalone: false, selector: "app-text-block", inputs: { content: "content", tag: "tag", style: "style", nodeId: "nodeId", node: "node" }, ngImport: i0, template: `
1427
- <ng-container [ngSwitch]="tag">
1428
- <p *ngSwitchDefault
1429
- [ngClass]="'iox-node-' + nodeId"
1430
- [attr.contenteditable]="editing ? 'true' : null"
1431
- (mousedown)="onMouseDown($event)"
1432
- (dblclick)="startEdit($event)"
1433
- (blur)="commitEdit($event)"
1434
- (keydown)="onKeyDown($event)">{{ content }}</p>
1435
- <span *ngSwitchCase="'span'"
1436
- [ngClass]="'iox-node-' + nodeId"
1437
- [attr.contenteditable]="editing ? 'true' : null"
1438
- (mousedown)="onMouseDown($event)"
1439
- (dblclick)="startEdit($event)"
1440
- (blur)="commitEdit($event)"
1441
- (keydown)="onKeyDown($event)">{{ content }}</span>
1442
- </ng-container>
1443
- `, isInline: true, styles: ["p,span{margin:0}[contenteditable]{outline:none;cursor:text}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }] }); }
1444
- }
1445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TextBlockComponent, decorators: [{
1446
- type: Component,
1447
- args: [{ selector: 'app-text-block', template: `
1448
- <ng-container [ngSwitch]="tag">
1449
- <p *ngSwitchDefault
1450
- [ngClass]="'iox-node-' + nodeId"
1451
- [attr.contenteditable]="editing ? 'true' : null"
1452
- (mousedown)="onMouseDown($event)"
1453
- (dblclick)="startEdit($event)"
1454
- (blur)="commitEdit($event)"
1455
- (keydown)="onKeyDown($event)">{{ content }}</p>
1456
- <span *ngSwitchCase="'span'"
1457
- [ngClass]="'iox-node-' + nodeId"
1458
- [attr.contenteditable]="editing ? 'true' : null"
1459
- (mousedown)="onMouseDown($event)"
1460
- (dblclick)="startEdit($event)"
1461
- (blur)="commitEdit($event)"
1462
- (keydown)="onKeyDown($event)">{{ content }}</span>
1463
- </ng-container>
1464
- `, standalone: false, styles: ["p,span{margin:0}[contenteditable]{outline:none;cursor:text}\n"] }]
1465
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1466
- type: Optional
1467
- }, {
1468
- type: Inject,
1469
- args: [IOX_BUILDER_EVENTS]
1470
- }] }, { type: i0.ChangeDetectorRef }], propDecorators: { content: [{
1471
- type: Input
1472
- }], tag: [{
1473
- type: Input
1474
- }], style: [{
1475
- type: Input
1476
- }], nodeId: [{
1477
- type: Input
1478
- }], node: [{
1479
- type: Input
1480
- }] } });
1481
-
1482
- class SectionComponent {
1483
- constructor() {
1484
- this.nodeId = '';
1485
- }
1486
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1487
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: SectionComponent, isStandalone: false, selector: "iox-section", inputs: { nodeId: "nodeId" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
1488
- <div class="section-root" [ngClass]="['iox-node-' + nodeId]">
1489
- <ng-container #childrenHost></ng-container>
1490
- </div>
1491
- `, isInline: true, styles: [".section-root{position:relative;box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1492
- }
1493
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SectionComponent, decorators: [{
1494
- type: Component,
1495
- args: [{ selector: 'iox-section', template: `
1496
- <div class="section-root" [ngClass]="['iox-node-' + nodeId]">
1497
- <ng-container #childrenHost></ng-container>
1498
- </div>
1499
- `, standalone: false, styles: [".section-root{position:relative;box-sizing:border-box}\n"] }]
1500
- }], propDecorators: { nodeId: [{
1501
- type: Input
1502
- }], childrenHost: [{
1503
- type: ViewChild,
1504
- args: ['childrenHost', { read: ViewContainerRef, static: true }]
1505
- }] } });
1506
-
1507
- class ContainerComponent {
1508
- constructor() {
1509
- this.nodeId = '';
1510
- }
1511
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1512
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ContainerComponent, isStandalone: false, selector: "iox-container", inputs: { nodeId: "nodeId" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
1513
- <div class="container-root" [ngClass]="['iox-node-' + nodeId]">
1514
- <ng-container #childrenHost></ng-container>
1515
- </div>
1516
- `, isInline: true, styles: [".container-root{position:relative;box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1517
- }
1518
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContainerComponent, decorators: [{
1519
- type: Component,
1520
- args: [{ selector: 'iox-container', template: `
1521
- <div class="container-root" [ngClass]="['iox-node-' + nodeId]">
1522
- <ng-container #childrenHost></ng-container>
1523
- </div>
1524
- `, standalone: false, styles: [".container-root{position:relative;box-sizing:border-box}\n"] }]
1525
- }], propDecorators: { nodeId: [{
1526
- type: Input
1527
- }], childrenHost: [{
1528
- type: ViewChild,
1529
- args: ['childrenHost', { read: ViewContainerRef, static: true }]
1530
- }] } });
1531
-
1532
- class LinkedContainerComponent {
1533
- constructor(elRef, isPreview) {
1534
- this.elRef = elRef;
1535
- this.isPreview = isPreview;
1536
- this.nodeId = '';
1537
- this.linkType = 'external';
1538
- this.url = 'https://';
1539
- this.pageRoute = '';
1540
- this.target = '_self';
1541
- this.capturePreventDefault = (e) => e.preventDefault();
1542
- }
1543
- ngOnInit() {
1544
- if (!this.isPreview) {
1545
- this.elRef.nativeElement.addEventListener('click', this.capturePreventDefault, true);
1546
- }
1547
- }
1548
- ngOnDestroy() {
1549
- if (!this.isPreview) {
1550
- this.elRef.nativeElement.removeEventListener('click', this.capturePreventDefault, true);
1551
- }
1552
- }
1553
- get resolvedHref() {
1554
- if (this.linkType !== 'page')
1555
- return this.url || '#';
1556
- return this.pageRoute || '#';
1557
- }
1558
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkedContainerComponent, deps: [{ token: i0.ElementRef }, { token: IS_PREVIEW, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1559
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: LinkedContainerComponent, isStandalone: false, selector: "iox-linked-container", inputs: { nodeId: "nodeId", linkType: "linkType", url: "url", pageRoute: "pageRoute", target: "target" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
1560
- <a [href]="resolvedHref"
1561
- [target]="target"
1562
- [ngClass]="['iox-node-' + nodeId]"
1563
- class="linked-container-root">
1564
- <ng-container #childrenHost></ng-container>
1565
- </a>
1566
- `, isInline: true, styles: [".linked-container-root{display:block;position:relative;box-sizing:border-box;text-decoration:none;color:inherit;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1567
- }
1568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkedContainerComponent, decorators: [{
1569
- type: Component,
1570
- args: [{ selector: 'iox-linked-container', template: `
1571
- <a [href]="resolvedHref"
1572
- [target]="target"
1573
- [ngClass]="['iox-node-' + nodeId]"
1574
- class="linked-container-root">
1575
- <ng-container #childrenHost></ng-container>
1576
- </a>
1577
- `, standalone: false, styles: [".linked-container-root{display:block;position:relative;box-sizing:border-box;text-decoration:none;color:inherit;cursor:pointer}\n"] }]
1578
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
1579
- type: Optional
1580
- }, {
1581
- type: Inject,
1582
- args: [IS_PREVIEW]
1583
- }] }], propDecorators: { nodeId: [{
1584
- type: Input
1585
- }], linkType: [{
1586
- type: Input
1587
- }], url: [{
1588
- type: Input
1589
- }], pageRoute: [{
1590
- type: Input
1591
- }], target: [{
1592
- type: Input
1593
- }], childrenHost: [{
1594
- type: ViewChild,
1595
- args: ['childrenHost', { read: ViewContainerRef, static: true }]
1596
- }] } });
1597
-
1598
- /**
1599
- * Client-engine repeater shell. Data fetching and item expansion are handled
1600
- * by DataSourceResolverService + BindingApplicatorService in the PageResolver
1601
- * before this component is rendered. ClientRenderDirective inserts one child
1602
- * per resolved item into childrenHost.
1603
- */
1604
- class ClientRepeaterComponent {
1605
- constructor() {
1606
- this.nodeId = '';
1607
- }
1608
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ClientRepeaterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1609
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ClientRepeaterComponent, isStandalone: false, selector: "iox-repeater", inputs: { nodeId: "nodeId" }, viewQueries: [{ propertyName: "childrenHost", first: true, predicate: ["childrenHost"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
1610
- <div class="repeater-root" [ngClass]="['iox-node-' + nodeId]">
1611
- <ng-container #childrenHost></ng-container>
1612
- </div>
1613
- `, isInline: true, styles: [".repeater-root{position:relative;box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
1614
- }
1615
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ClientRepeaterComponent, decorators: [{
1616
- type: Component,
1617
- args: [{ selector: 'iox-repeater', template: `
1618
- <div class="repeater-root" [ngClass]="['iox-node-' + nodeId]">
1619
- <ng-container #childrenHost></ng-container>
1620
- </div>
1621
- `, standalone: false, styles: [".repeater-root{position:relative;box-sizing:border-box}\n"] }]
1622
- }], propDecorators: { nodeId: [{
1623
- type: Input
1624
- }], childrenHost: [{
1625
- type: ViewChild,
1626
- args: ['childrenHost', { read: ViewContainerRef, static: true }]
1627
- }] } });
1628
-
1629
- const COMPONENTS = [
1630
- BuilderImageComponent,
1631
- BuilderSpacerComponent,
1632
- CardComponent,
1633
- BuilderDividerComponent,
1634
- BuilderIconComponent,
1635
- BuilderLinkComponent,
1636
- BuilderButtonComponent,
1637
- BuilderHeadingComponent,
1638
- TextBlockComponent,
1639
- SectionComponent,
1640
- ContainerComponent,
1641
- LinkedContainerComponent,
1642
- ClientRepeaterComponent,
1643
- ];
1644
- class IoxBuilderComponentsModule {
1645
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxBuilderComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1646
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: IoxBuilderComponentsModule, declarations: [BuilderImageComponent,
1647
- BuilderSpacerComponent,
1648
- CardComponent,
1649
- BuilderDividerComponent,
1650
- BuilderIconComponent,
1651
- BuilderLinkComponent,
1652
- BuilderButtonComponent,
1653
- BuilderHeadingComponent,
1654
- TextBlockComponent,
1655
- SectionComponent,
1656
- ContainerComponent,
1657
- LinkedContainerComponent,
1658
- ClientRepeaterComponent], imports: [CommonModule], exports: [BuilderImageComponent,
1659
- BuilderSpacerComponent,
1660
- CardComponent,
1661
- BuilderDividerComponent,
1662
- BuilderIconComponent,
1663
- BuilderLinkComponent,
1664
- BuilderButtonComponent,
1665
- BuilderHeadingComponent,
1666
- TextBlockComponent,
1667
- SectionComponent,
1668
- ContainerComponent,
1669
- LinkedContainerComponent,
1670
- ClientRepeaterComponent] }); }
1671
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxBuilderComponentsModule, imports: [CommonModule] }); }
1672
- }
1673
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxBuilderComponentsModule, decorators: [{
1674
- type: NgModule,
1675
- args: [{
1676
- declarations: COMPONENTS,
1677
- imports: [CommonModule],
1678
- exports: COMPONENTS,
1679
- }]
1680
- }] });
1681
-
1682
- /**
1683
- * Single source of truth for the IOX component type → Angular class mapping.
1684
- * Used by the client engine (iox-client-engine) to resolve component classes
1685
- * from IoxLayoutNode.type strings at render time.
1686
- *
1687
- * All 13 builder components are registered here:
1688
- * - Leaf (Phase 2a): Image, Spacer, Card, Divider, Icon
1689
- * - Inline-editable (Phase 2b): Link, Button, Heading, Text
1690
- * - Layout shells (Phase 2c): Section, Container, LinkedContainer
1691
- * - Repeater (Phase 2d): ClientRepeaterComponent
1692
- *
1693
- * Section/Container/LinkedContainer/Repeater expose childrenHost: ViewContainerRef
1694
- * for ClientRenderDirective to insert child components into.
1695
- */
1696
- class IoxComponentRegistryService {
1697
- constructor() {
1698
- this.map = new Map([
1699
- ['Image', BuilderImageComponent],
1700
- ['Spacer', BuilderSpacerComponent],
1701
- ['Card', CardComponent],
1702
- ['Divider', BuilderDividerComponent],
1703
- ['Icon', BuilderIconComponent],
1704
- ['Link', BuilderLinkComponent],
1705
- ['Button', BuilderButtonComponent],
1706
- ['Heading', BuilderHeadingComponent],
1707
- ['Text', TextBlockComponent],
1708
- ['Section', SectionComponent],
1709
- ['Container', ContainerComponent],
1710
- ['LinkedContainer', LinkedContainerComponent],
1711
- ['Repeater', ClientRepeaterComponent],
1712
- ]);
1713
- }
1714
- getComponent(type) {
1715
- return this.map.get(type);
1716
- }
1717
- hasComponent(type) {
1718
- return this.map.has(type);
1719
- }
1720
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxComponentRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1721
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxComponentRegistryService, providedIn: 'root' }); }
1722
- }
1723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxComponentRegistryService, decorators: [{
1724
- type: Injectable,
1725
- args: [{ providedIn: 'root' }]
1726
- }] });
1727
130
 
1728
131
  /*
1729
132
  * Public API Surface of iox-ui
@@ -1733,5 +136,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1733
136
  * Generated bundle index. Do not edit.
1734
137
  */
1735
138
 
1736
- export { AOSService, AnalyticsService, BuilderButtonComponent, BuilderDividerComponent, BuilderHeadingComponent, BuilderIconComponent, BuilderImageComponent, BuilderLinkComponent, BuilderSpacerComponent, CMSClientInfraModule, CardComponent, ClientRepeaterComponent, ConsentService, ContainerComponent, ContentService, ENVIRONMENT, IOX_BUILDER_EVENTS, IS_PREVIEW, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxBuilderComponentsModule, IoxComponentRegistryService, IoxMasonryComponent, IoxMasonryItemDirective, IoxMasonryModule, IoxMasonryService, IoxPageComponent, IoxPageModule, IoxUiModule, LinkedContainerComponent, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, SectionComponent, TextBlockComponent, ViewPositionDirective, ViewPositionModule, WebSettingsService };
139
+ export { IS_PREVIEW, IoxPageComponent, IoxPageModule, IoxUi, PageScrollProvider };
1737
140
  //# sourceMappingURL=vectoriox-iox-ui.mjs.map