@vectoriox/iox-ui 4.0.3 → 4.0.4

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.
Files changed (136) hide show
  1. package/fesm2022/vectoriox-iox-ui.mjs +376 -35
  2. package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
  3. package/index.d.ts +95 -6
  4. package/package.json +11 -5
  5. package/.github/workflows/publish-iox-ui.yml +0 -68
  6. package/.github/workflows/release-iox-ui.yml.disabled +0 -77
  7. package/angular.json +0 -150
  8. package/karma.conf.js +0 -44
  9. package/projects/iox-ui/.github/copilot-instructions.md +0 -32
  10. package/projects/iox-ui/.releaserc.json +0 -42
  11. package/projects/iox-ui/README.md +0 -149
  12. package/projects/iox-ui/karma.conf.js +0 -44
  13. package/projects/iox-ui/ng +0 -0
  14. package/projects/iox-ui/ng-package.json +0 -12
  15. package/projects/iox-ui/package-lock.json +0 -93
  16. package/projects/iox-ui/package.json +0 -13
  17. package/projects/iox-ui/src/lib/iox-aos/iox-aos-animations.ts +0 -45
  18. package/projects/iox-ui/src/lib/iox-aos/iox-aos-container.component.ts +0 -46
  19. package/projects/iox-ui/src/lib/iox-aos/iox-aos.directive.ts +0 -133
  20. package/projects/iox-ui/src/lib/iox-aos/iox-aos.module.ts +0 -33
  21. package/projects/iox-ui/src/lib/iox-aos/iox-aos.service.ts +0 -21
  22. package/projects/iox-ui/src/lib/iox-masonry/iox-masonry-item.directive.ts +0 -24
  23. package/projects/iox-ui/src/lib/iox-masonry/iox-masonry.component.spec.ts +0 -25
  24. package/projects/iox-ui/src/lib/iox-masonry/iox-masonry.component.ts +0 -71
  25. package/projects/iox-ui/src/lib/iox-masonry/iox-masonry.module.ts +0 -15
  26. package/projects/iox-ui/src/lib/iox-masonry/iox-masonry.service.spec.ts +0 -16
  27. package/projects/iox-ui/src/lib/iox-masonry/iox-masonry.service.ts +0 -9
  28. package/projects/iox-ui/src/lib/iox-page/iox-page.module.ts +0 -13
  29. package/projects/iox-ui/src/lib/iox-page/page-component/page-component.component.html +0 -5
  30. package/projects/iox-ui/src/lib/iox-page/page-component/page-component.component.scss +0 -19
  31. package/projects/iox-ui/src/lib/iox-page/page-component/page-component.component.ts +0 -60
  32. package/projects/iox-ui/src/lib/iox-ui.module.ts +0 -11
  33. package/projects/iox-ui/src/lib/services/page-scroll.provider.ts +0 -45
  34. package/projects/iox-ui/src/lib/view-position/view-position.directive.ts +0 -98
  35. package/projects/iox-ui/src/lib/view-position/view-position.module.ts +0 -16
  36. package/projects/iox-ui/src/public-api.ts +0 -25
  37. package/projects/iox-ui/src/test.ts +0 -15
  38. package/projects/iox-ui/tsconfig.lib.json +0 -15
  39. package/projects/iox-ui/tsconfig.lib.prod.json +0 -10
  40. package/projects/iox-ui/tsconfig.spec.json +0 -17
  41. package/src/app/app-routing.module.ts +0 -15
  42. package/src/app/app.component.html +0 -17
  43. package/src/app/app.component.scss +0 -31
  44. package/src/app/app.component.spec.ts +0 -33
  45. package/src/app/app.component.ts +0 -21
  46. package/src/app/app.module.ts +0 -36
  47. package/src/app/pages/aos/aos.component.html +0 -35
  48. package/src/app/pages/aos/aos.component.scss +0 -49
  49. package/src/app/pages/aos/aos.component.ts +0 -30
  50. package/src/app/pages/masonry/masonry.component.html +0 -10
  51. package/src/app/pages/masonry/masonry.component.scss +0 -23
  52. package/src/app/pages/masonry/masonry.component.ts +0 -73
  53. package/src/app/styles/abstracts/functions.scss +0 -0
  54. package/src/app/styles/abstracts/mixins.scss +0 -0
  55. package/src/app/styles/abstracts/variables.scss +0 -5
  56. package/src/app/styles/base/fonts/heebo-black/Heebo-Black.eot +0 -0
  57. package/src/app/styles/base/fonts/heebo-black/Heebo-Black.svg +0 -1163
  58. package/src/app/styles/base/fonts/heebo-black/Heebo-Black.ttf +0 -0
  59. package/src/app/styles/base/fonts/heebo-black/Heebo-Black.woff +0 -0
  60. package/src/app/styles/base/fonts/heebo-black/Heebo-Black.woff2 +0 -0
  61. package/src/app/styles/base/fonts/heebo-bold/Heebo-Bold.eot +0 -0
  62. package/src/app/styles/base/fonts/heebo-bold/Heebo-Bold.svg +0 -1163
  63. package/src/app/styles/base/fonts/heebo-bold/Heebo-Bold.ttf +0 -0
  64. package/src/app/styles/base/fonts/heebo-bold/Heebo-Bold.woff +0 -0
  65. package/src/app/styles/base/fonts/heebo-bold/Heebo-Bold.woff2 +0 -0
  66. package/src/app/styles/base/fonts/heebo-extrabold/Heebo-ExtraBold.eot +0 -0
  67. package/src/app/styles/base/fonts/heebo-extrabold/Heebo-ExtraBold.svg +0 -1152
  68. package/src/app/styles/base/fonts/heebo-extrabold/Heebo-ExtraBold.ttf +0 -0
  69. package/src/app/styles/base/fonts/heebo-extrabold/Heebo-ExtraBold.woff +0 -0
  70. package/src/app/styles/base/fonts/heebo-extrabold/Heebo-ExtraBold.woff2 +0 -0
  71. package/src/app/styles/base/fonts/heebo-extralight/Heebo-ExtraLight.eot +0 -0
  72. package/src/app/styles/base/fonts/heebo-extralight/Heebo-ExtraLight.svg +0 -1152
  73. package/src/app/styles/base/fonts/heebo-extralight/Heebo-ExtraLight.ttf +0 -0
  74. package/src/app/styles/base/fonts/heebo-extralight/Heebo-ExtraLight.woff +0 -0
  75. package/src/app/styles/base/fonts/heebo-extralight/Heebo-ExtraLight.woff2 +0 -0
  76. package/src/app/styles/base/fonts/heebo-light/Heebo-Light.eot +0 -0
  77. package/src/app/styles/base/fonts/heebo-light/Heebo-Light.svg +0 -1151
  78. package/src/app/styles/base/fonts/heebo-light/Heebo-Light.ttf +0 -0
  79. package/src/app/styles/base/fonts/heebo-light/Heebo-Light.woff +0 -0
  80. package/src/app/styles/base/fonts/heebo-light/Heebo-Light.woff2 +0 -0
  81. package/src/app/styles/base/fonts/heebo-medium/Heebo-Medium.eot +0 -0
  82. package/src/app/styles/base/fonts/heebo-medium/Heebo-Medium.svg +0 -1158
  83. package/src/app/styles/base/fonts/heebo-medium/Heebo-Medium.ttf +0 -0
  84. package/src/app/styles/base/fonts/heebo-medium/Heebo-Medium.woff +0 -0
  85. package/src/app/styles/base/fonts/heebo-medium/Heebo-Medium.woff2 +0 -0
  86. package/src/app/styles/base/fonts/heebo-regular/Heebo-Regular.eot +0 -0
  87. package/src/app/styles/base/fonts/heebo-regular/Heebo-Regular.svg +0 -1150
  88. package/src/app/styles/base/fonts/heebo-regular/Heebo-Regular.ttf +0 -0
  89. package/src/app/styles/base/fonts/heebo-regular/Heebo-Regular.woff +0 -0
  90. package/src/app/styles/base/fonts/heebo-regular/Heebo-Regular.woff2 +0 -0
  91. package/src/app/styles/base/fonts/heebo-semibold/Heebo-SemiBold.eot +0 -0
  92. package/src/app/styles/base/fonts/heebo-semibold/Heebo-SemiBold.svg +0 -1155
  93. package/src/app/styles/base/fonts/heebo-semibold/Heebo-SemiBold.ttf +0 -0
  94. package/src/app/styles/base/fonts/heebo-semibold/Heebo-SemiBold.woff +0 -0
  95. package/src/app/styles/base/fonts/heebo-semibold/Heebo-SemiBold.woff2 +0 -0
  96. package/src/app/styles/base/fonts/heebo-thin/Heebo-Thin.eot +0 -0
  97. package/src/app/styles/base/fonts/heebo-thin/Heebo-Thin.svg +0 -1143
  98. package/src/app/styles/base/fonts/heebo-thin/Heebo-Thin.ttf +0 -0
  99. package/src/app/styles/base/fonts/heebo-thin/Heebo-Thin.woff +0 -0
  100. package/src/app/styles/base/fonts/heebo-thin/Heebo-Thin.woff2 +0 -0
  101. package/src/app/styles/base/fonts/iox.eot +0 -0
  102. package/src/app/styles/base/fonts/iox.svg +0 -35
  103. package/src/app/styles/base/fonts/iox.ttf +0 -0
  104. package/src/app/styles/base/fonts/iox.woff +0 -0
  105. package/src/app/styles/base/iox-font.scss +0 -102
  106. package/src/app/styles/base/reset.scss +0 -0
  107. package/src/app/styles/base/typography.scss +0 -104
  108. package/src/app/styles/layout/flex.scss +0 -183
  109. package/src/app/styles/layout/grid.scss +0 -0
  110. package/src/app/styles/main.scss +0 -17
  111. package/src/assets/.gitkeep +0 -0
  112. package/src/assets/images/1.jfif +0 -0
  113. package/src/assets/images/2.jfif +0 -0
  114. package/src/assets/images/3.jfif +0 -0
  115. package/src/assets/images/4.png +0 -0
  116. package/src/assets/images/5.jfif +0 -0
  117. package/src/assets/images/6.jfif +0 -0
  118. package/src/assets/images/7.jfif +0 -0
  119. package/src/assets/images/8.jfif +0 -0
  120. package/src/assets/images/9.jfif +0 -0
  121. package/src/environments/environment.prod.ts +0 -3
  122. package/src/environments/environment.ts +0 -16
  123. package/src/favicon.ico +0 -0
  124. package/src/index.html +0 -13
  125. package/src/main.ts +0 -12
  126. package/src/polyfills.ts +0 -53
  127. package/src/styles.scss +0 -15
  128. package/src/test.ts +0 -14
  129. package/temp/unused-iox-projects/README.md +0 -10
  130. package/temp/unused-iox-projects/iox-aos-KEEP.md +0 -1
  131. package/temp/unused-iox-projects/iox-aos_KEEP.md +0 -5
  132. package/temp/unused-iox-projects/iox-masonry-KEEP.md +0 -1
  133. package/temp/unused-iox-projects/iox-masonry_KEEP.md +0 -5
  134. package/tsconfig.app.json +0 -15
  135. package/tsconfig.json +0 -54
  136. package/tsconfig.spec.json +0 -18
@@ -1,13 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, HostListener, Output, Input, Directive, NgModule, Injectable, ViewChild, Component, Host, Optional, forwardRef, Inject } from '@angular/core';
2
+ import { EventEmitter, HostListener, Output, Input, Directive, NgModule, Injectable, ViewChild, Component, Host, Optional, forwardRef, Inject, PLATFORM_ID, InjectionToken } from '@angular/core';
3
3
  import * as i2 from '@angular/animations';
4
4
  import { style, animate } from '@angular/animations';
5
- import { Subject, fromEvent } from 'rxjs';
5
+ import { Subject, of } from 'rxjs';
6
6
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { Masonry } from '@fristys/masonry';
8
8
  import { BrowserModule } from '@angular/platform-browser';
9
- import { CommonModule } from '@angular/common';
9
+ import * as i3 from '@angular/common';
10
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
10
11
  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';
11
16
 
12
17
  class ViewPositionDirective {
13
18
  constructor(_elr) {
@@ -486,7 +491,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
486
491
  }] });
487
492
 
488
493
  class PageScrollProvider {
494
+ constructor(platformId) {
495
+ this.platformId = platformId;
496
+ }
489
497
  init(options) {
498
+ if (!isPlatformBrowser(this.platformId))
499
+ return;
490
500
  if (this.lenis) {
491
501
  this.lenis.destroy();
492
502
  }
@@ -508,65 +518,78 @@ class PageScrollProvider {
508
518
  }
509
519
  return this.lenis;
510
520
  }
521
+ destroy() {
522
+ if (this.lenis) {
523
+ this.lenis.destroy();
524
+ this.lenis = undefined;
525
+ }
526
+ if (this.rafId != null) {
527
+ cancelAnimationFrame(this.rafId);
528
+ this.rafId = undefined;
529
+ }
530
+ }
511
531
  startLoop() {
512
- if (!this.lenis) {
532
+ if (!this.lenis)
513
533
  return;
514
- }
515
534
  const loop = (time) => {
516
535
  this.lenis.raf(time);
517
536
  this.rafId = requestAnimationFrame(loop);
518
537
  };
519
538
  this.rafId = requestAnimationFrame(loop);
520
539
  }
521
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
540
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
522
541
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider }); }
523
542
  }
524
543
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageScrollProvider, decorators: [{
525
544
  type: Injectable
526
- }] });
545
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
546
+ type: Inject,
547
+ args: [PLATFORM_ID]
548
+ }] }] });
527
549
 
528
550
  class IoxPageComponent {
529
- constructor(pageScrollProvider) {
551
+ constructor(pageScrollProvider, platformId) {
530
552
  this.pageScrollProvider = pageScrollProvider;
553
+ this.platformId = platformId;
531
554
  this.class = '';
532
555
  this.scrollEvent = new EventEmitter();
533
556
  }
534
557
  ngAfterViewInit() {
535
- if (this.page) {
536
- this.scrollSubscription = fromEvent(this.page.nativeElement, 'scroll').subscribe((event) => {
537
- this.onScroll(event);
538
- });
539
- this.pageScrollProvider.init({
540
- wrapper: this.page.nativeElement,
541
- content: this.page.nativeElement.querySelector('.page-mask'),
542
- duration: 1.2,
543
- easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
558
+ if (!isPlatformBrowser(this.platformId) || !this.page)
559
+ return;
560
+ this.pageScrollProvider.init({
561
+ wrapper: this.page.nativeElement,
562
+ content: this.page.nativeElement.querySelector('.page-mask'),
563
+ duration: 1.2,
564
+ easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
565
+ });
566
+ this.pageScrollProvider.instance.on('scroll', ({ scroll, progress }) => {
567
+ const el = this.page.nativeElement;
568
+ this.scrollEvent.emit({
569
+ scrollTop: scroll,
570
+ scrollLeft: 0,
571
+ scrollHeight: el.scrollHeight,
572
+ scrollWidth: el.scrollWidth,
573
+ clientHeight: el.clientHeight,
574
+ clientWidth: el.clientWidth,
575
+ scrollPercentage: progress * 100,
544
576
  });
545
- }
546
- }
547
- onScroll(event) {
548
- const target = event.target;
549
- const scrollTop = target.scrollTop;
550
- const scrollLeft = target.scrollLeft;
551
- const scrollHeight = target.scrollHeight;
552
- const scrollWidth = target.scrollWidth;
553
- const clientHeight = target.clientHeight;
554
- const clientWidth = target.clientWidth;
555
- const scrollPercentage = (scrollTop / (scrollHeight - clientHeight)) * 100;
556
- this.scrollEvent.emit({ scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth, scrollPercentage });
577
+ el.dispatchEvent(new Event('scroll'));
578
+ });
557
579
  }
558
580
  ngOnDestroy() {
559
- if (this.scrollSubscription) {
560
- this.scrollSubscription.unsubscribe();
561
- }
581
+ this.pageScrollProvider.destroy();
562
582
  }
563
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageComponent, deps: [{ token: PageScrollProvider }], target: i0.ɵɵFactoryTarget.Component }); }
583
+ 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 }); }
564
584
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", 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"] }); }
565
585
  }
566
586
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: IoxPageComponent, decorators: [{
567
587
  type: Component,
568
588
  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"] }]
569
- }], ctorParameters: () => [{ type: PageScrollProvider }], propDecorators: { class: [{
589
+ }], ctorParameters: () => [{ type: PageScrollProvider }, { type: undefined, decorators: [{
590
+ type: Inject,
591
+ args: [PLATFORM_ID]
592
+ }] }], propDecorators: { class: [{
570
593
  type: Input
571
594
  }], page: [{
572
595
  type: ViewChild,
@@ -604,6 +627,324 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
604
627
  }]
605
628
  }] });
606
629
 
630
+ var PrivacyModelEvent;
631
+ (function (PrivacyModelEvent) {
632
+ PrivacyModelEvent[PrivacyModelEvent["OPEN"] = 1] = "OPEN";
633
+ PrivacyModelEvent[PrivacyModelEvent["CLOSE"] = 2] = "CLOSE";
634
+ })(PrivacyModelEvent || (PrivacyModelEvent = {}));
635
+ class PrivacyModalService {
636
+ constructor() {
637
+ this.modalEvent = new Subject();
638
+ this.decisionSubject = null;
639
+ }
640
+ registerModalEvent(func) {
641
+ this.modalEvent.subscribe({
642
+ next: (val) => {
643
+ func(val);
644
+ }
645
+ });
646
+ }
647
+ openModal() {
648
+ this.modalEvent.next(PrivacyModelEvent.OPEN);
649
+ this.decisionSubject = new Subject();
650
+ return this.decisionSubject;
651
+ }
652
+ closeModal() {
653
+ this.modalEvent.next(PrivacyModelEvent.CLOSE);
654
+ }
655
+ notifyDecision(accepted) {
656
+ if (this.decisionSubject) {
657
+ this.decisionSubject.next(accepted);
658
+ this.decisionSubject.complete();
659
+ this.decisionSubject = null;
660
+ }
661
+ this.closeModal();
662
+ }
663
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
664
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalService }); }
665
+ }
666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalService, decorators: [{
667
+ type: Injectable
668
+ }], ctorParameters: () => [] });
669
+
670
+ class ConsentService {
671
+ constructor(cookieService, httpClient, _privacyModalService, environment) {
672
+ this.cookieService = cookieService;
673
+ this.httpClient = httpClient;
674
+ this._privacyModalService = _privacyModalService;
675
+ this.environment = environment;
676
+ this.WEB_USER = "webUser";
677
+ }
678
+ hasAnalyticsConsent() {
679
+ const cookieValue = this.cookieService.get(this.WEB_USER);
680
+ if (!cookieValue) {
681
+ return false;
682
+ }
683
+ try {
684
+ const parsedCookieValue = JSON.parse(cookieValue);
685
+ return parsedCookieValue.user?.consent?.analyticsConsent === true;
686
+ }
687
+ catch {
688
+ // Invalid JSON or unexpected structure: treat as no consent
689
+ return false;
690
+ }
691
+ }
692
+ checkAnalyticsConsent() {
693
+ if (this.hasAnalyticsConsent()) {
694
+ // Consent already given, return true immediately as Observable
695
+ return of(true);
696
+ }
697
+ // No consent yet (or invalid/missing cookie) -> show modal
698
+ return this._privacyModalService.openModal();
699
+ }
700
+ checkMarketingConsent() {
701
+ let cookieValue = this.cookieService.get(this.WEB_USER);
702
+ if (!cookieValue) {
703
+ return false;
704
+ }
705
+ let parsedCookieValue = JSON.parse(cookieValue);
706
+ return parsedCookieValue.user?.consent?.marketingConsent;
707
+ }
708
+ setConsent(analytics, marketing) {
709
+ let cookieValue = this.cookieService.get(this.WEB_USER);
710
+ let parsedCookieValue = cookieValue ? JSON.parse(cookieValue) : { user: { consent: {
711
+ anonymousId: this.generateAnonymousId()
712
+ } } };
713
+ parsedCookieValue.user.consent.analyticsConsent = analytics;
714
+ parsedCookieValue.user.consent.marketingConsent = marketing;
715
+ this.cookieService.set(this.WEB_USER, JSON.stringify(parsedCookieValue));
716
+ this.httpClient.post(`${this.environment.HOST}consent`, parsedCookieValue.user.consent)
717
+ .subscribe({
718
+ next: (response) => {
719
+ console.log('Consent updated successfully:', response);
720
+ },
721
+ error: (error) => {
722
+ console.error('Error updating consent:', error);
723
+ }
724
+ });
725
+ }
726
+ generateAnonymousId() {
727
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
728
+ var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
729
+ return v.toString(16);
730
+ });
731
+ }
732
+ 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 }); }
733
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsentService }); }
734
+ }
735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConsentService, decorators: [{
736
+ type: Injectable
737
+ }], ctorParameters: () => [{ type: i1.CookieService }, { type: i1$1.HttpClient }, { type: PrivacyModalService }, { type: undefined, decorators: [{
738
+ type: Inject,
739
+ args: [ENVIRONMENT]
740
+ }] }] });
741
+
742
+ class PrivacyModalComponent {
743
+ constructor(_privacyModalService, _consentService) {
744
+ this._privacyModalService = _privacyModalService;
745
+ this._consentService = _consentService;
746
+ this.isOpen = false;
747
+ this._privacyModalService.registerModalEvent((event) => {
748
+ if (event == PrivacyModelEvent.CLOSE) {
749
+ this.isOpen = false;
750
+ }
751
+ else {
752
+ this.isOpen = true;
753
+ }
754
+ });
755
+ }
756
+ onAccept() {
757
+ this._consentService.setConsent(true, true);
758
+ this._privacyModalService.notifyDecision(true);
759
+ this.isOpen = false;
760
+ }
761
+ onDecline() {
762
+ this._privacyModalService.notifyDecision(false);
763
+ this.isOpen = false;
764
+ }
765
+ 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 }); }
766
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: PrivacyModalComponent, isStandalone: false, selector: "privacy-modal", ngImport: i0, template: "<div class=\"privacy-modal\" [ngClass]=\"{'open': isOpen, 'closed': !isOpen}\">\n <div class=\"modal-content\">\n <h2>\u05D0\u05E0\u05D7\u05E0\u05D5 \u05E9\u05D5\u05DE\u05E8\u05D9\u05DD \u05E2\u05DC \u05D4\u05E4\u05E8\u05D8\u05D9\u05D5\u05EA \u05E9\u05DC\u05DA</h2>\n <p dir=\"rtl\">\n <span>\n \u05D0\u05E0\u05D7\u05E0\u05D5 \u05DE\u05E9\u05DE\u05E9\u05D9\u05DD \u05D1\u05E7\u05D1\u05E6\u05D9 \n </span>\n <span>Cookies </span>\n <span>\u05DB\u05D3\u05D9 \u05DC\u05E9\u05E4\u05E8 \u05D0\u05EA \u05D7\u05D5\u05D5\u05D9\u05EA \u05D4\u05D2\u05DC\u05D9\u05E9\u05D4 \u05E9\u05DC\u05DA, \u05DC\u05E0\u05EA\u05D7 \u05E9\u05D9\u05DE\u05D5\u05E9 \u05D1\u05D0\u05EA\u05E8 \u05D5\u05DC\u05D4\u05E6\u05D9\u05E2 \u05EA\u05D5\u05DB\u05DF \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA.</span>\n <span> \u05DC\u05DE\u05D9\u05D3\u05E2 \u05E0\u05D5\u05E1\u05E3 \u05E2\u05DC \u05D0\u05D9\u05DA \u05D0\u05E0\u05D7\u05E0\u05D5 \u05DE\u05E9\u05EA\u05DE\u05E9\u05D9\u05DD \u05D1\u05DE\u05D9\u05D3\u05E2 \u05E9\u05DC\u05DA, \u05E8\u05D0\u05D4 \u05D0\u05EA <a target=\"_blank\" href=\"/privacy\">\u05DE\u05D3\u05D9\u05E0\u05D9\u05D5\u05EA \u05D4\u05E4\u05E8\u05D8\u05D9\u05D5\u05EA </a> \u05E9\u05DC\u05E0\u05D5</span>\n </p>\n\n <div class=\"button-container\">\n <button class=\"accept-button\" (click)=\"onAccept()\">\u05D0\u05E0\u05D9 \u05DE\u05E1\u05DB\u05D9\u05DD</button>\n <button class=\"decline-button\" (click)=\"onDecline()\">\u05D0\u05E0\u05D9 \u05DC\u05D0 \u05DE\u05E1\u05DB\u05D9\u05DD</button>\n </div>\n </div>\n</div>\n", styles: [".privacy-modal{padding:2em;background:#fff;border-radius:8px;position:fixed;z-index:10000000000000;bottom:0;left:0;right:0;height:25vh;display:flex;align-items:center;justify-content:center;transform:translateY(100%);transition:transform .3s ease-in-out}.privacy-modal.open{transform:translateY(0);transition:transform .3s ease-in-out}.modal-content{width:40vw;text-align:right}.privacy-modal h2{margin-top:0;text-align:right;font-size:2.1vw;color:#6b4f3b}.privacy-modal p{font-size:1.3vw;color:#6b4f3b}.button-container{display:flex;justify-content:flex-end;margin-top:20px}.button-container button{border:0;margin-inline-start:15px;font-size:1vw}.button-container .accept-button{background:#6b4f3b;color:#fff;padding:.5em 1em;border-radius:4px;cursor:pointer}.button-container .accept-button:hover{background:#5b4332}.button-container .decline-button{background:transparent;color:#6b4f3b;padding:0;cursor:pointer;border-bottom:1px solid #fff}.button-container .decline-button:hover{border-bottom:1px solid #6b4f3b}@media (max-width: 768px){.privacy-modal h2{font-size:8.2vw}.privacy-modal p{font-size:4.2vw}.privacy-modal .modal-content{width:80vw}.privacy-modal .button-container button{font-size:3.2vw}}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
767
+ }
768
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PrivacyModalComponent, decorators: [{
769
+ type: Component,
770
+ 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"] }]
771
+ }], ctorParameters: () => [{ type: PrivacyModalService }, { type: ConsentService }] });
772
+
773
+ class WebSettingsService {
774
+ constructor(httpClient, environment) {
775
+ this.httpClient = httpClient;
776
+ this.environment = environment;
777
+ }
778
+ getSettings() {
779
+ // If the server injected a runtime config (window.__APP_CONFIG) use that first,
780
+ // otherwise fall back to the compile-time environment.HOST.
781
+ const runtimeHost = (typeof window !== 'undefined' && window.__APP_CONFIG && window.__APP_CONFIG.HOST) ? window.__APP_CONFIG.HOST : this.environment.HOST;
782
+ return this.httpClient.get(`${runtimeHost}web/settings`);
783
+ }
784
+ configArrayToObject(arr) {
785
+ return arr.reduce((acc, item) => {
786
+ acc[item.key] = item.value;
787
+ return acc;
788
+ }, {});
789
+ }
790
+ 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 }); }
791
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WebSettingsService }); }
792
+ }
793
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WebSettingsService, decorators: [{
794
+ type: Injectable
795
+ }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
796
+ type: Inject,
797
+ args: [ENVIRONMENT]
798
+ }] }] });
799
+
800
+ class ContentService {
801
+ constructor(httpClient, environment) {
802
+ this.httpClient = httpClient;
803
+ this.environment = environment;
804
+ this.appContent = {};
805
+ }
806
+ getContent(contentName, id) {
807
+ if (this.appContent[contentName] && this.appContent[contentName].length) {
808
+ if (id) {
809
+ return of(this.findOne(this.appContent[contentName], id));
810
+ }
811
+ return of(this.appContent[contentName]);
812
+ }
813
+ return this.httpClient.get(`${this.environment.HOST}${contentName}`).pipe(map((content) => {
814
+ if (contentName == this.environment.contentResource.SERVICES || contentName == this.environment.contentResource.PROJECTS) {
815
+ content = content.map((item) => {
816
+ item.id = item.name.replace(/ /g, "_");
817
+ //item._id= item.name.replace(/ /g,"_");
818
+ return item;
819
+ });
820
+ }
821
+ this.appContent[contentName] = content;
822
+ if (id) {
823
+ return this.findOne(this.appContent[contentName], id);
824
+ }
825
+ return content;
826
+ }));
827
+ }
828
+ findOne(arr, id) {
829
+ for (let i = 0; i < arr.length; i++) {
830
+ if (arr[i].id == id) {
831
+ return arr[i];
832
+ }
833
+ }
834
+ }
835
+ 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 }); }
836
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContentService }); }
837
+ }
838
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ContentService, decorators: [{
839
+ type: Injectable
840
+ }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
841
+ type: Inject,
842
+ args: [ENVIRONMENT]
843
+ }] }] });
844
+
845
+ const ENVIRONMENT = new InjectionToken('environment');
846
+ class CMSClientInfraModule {
847
+ static forRoot(environment) {
848
+ return {
849
+ ngModule: CMSClientInfraModule,
850
+ providers: [
851
+ { provide: ENVIRONMENT, useValue: environment },
852
+ ConsentService,
853
+ ContentService,
854
+ CookieService,
855
+ WebSettingsService,
856
+ PrivacyModalService
857
+ ]
858
+ };
859
+ }
860
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
861
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, declarations: [PrivacyModalComponent], imports: [CommonModule], exports: [PrivacyModalComponent] }); }
862
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, imports: [CommonModule] }); }
863
+ }
864
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CMSClientInfraModule, decorators: [{
865
+ type: NgModule,
866
+ args: [{
867
+ declarations: [
868
+ PrivacyModalComponent
869
+ ],
870
+ imports: [
871
+ CommonModule
872
+ ],
873
+ exports: [PrivacyModalComponent]
874
+ }]
875
+ }] });
876
+
877
+ class AnalyticsService {
878
+ constructor(platformId) {
879
+ this.platformId = platformId;
880
+ this.gaScriptId = 'google-analytics-script';
881
+ }
882
+ applyGoogleAnalytics(appId) {
883
+ if (!isPlatformBrowser(this.platformId))
884
+ return;
885
+ // 1. Establish the dataLayer and the CORRECT gtag function stub
886
+ const win = window;
887
+ win.dataLayer = win.dataLayer || [];
888
+ // CRITICAL FIX: The Google library requires the special 'arguments' object,
889
+ // NOT a standard array spread [...args].
890
+ if (!win.gtag) {
891
+ win.gtag = function () {
892
+ win.dataLayer.push(arguments);
893
+ };
894
+ }
895
+ // 2. Queue initial commands immediately (even before script loads)
896
+ win.gtag('js', new Date());
897
+ win.gtag('config', appId);
898
+ // 3. Load the script if not already present
899
+ if (!document.getElementById(this.gaScriptId)) {
900
+ const script = document.createElement('script');
901
+ script.id = this.gaScriptId;
902
+ script.async = true;
903
+ script.src = `https://www.googletagmanager.com/gtag/js?id=${appId}`;
904
+ script.onload = () => {
905
+ console.log('[Analytics] gtag.js script loaded and ready');
906
+ };
907
+ script.onerror = (e) => console.error('[Analytics] gtag.js failed to load', e);
908
+ document.head.appendChild(script);
909
+ }
910
+ }
911
+ // Helper to send events from your components
912
+ sendEvent(eventName, params = {}) {
913
+ if (isPlatformBrowser(this.platformId) && window.gtag) {
914
+ window.gtag('event', eventName, params);
915
+ }
916
+ }
917
+ // Synchronous page view sender that won't rely on internal ready Promise
918
+ sendPageView(path) {
919
+ if (!isPlatformBrowser(this.platformId))
920
+ return;
921
+ const win = window;
922
+ try {
923
+ if (win && win.gtag) {
924
+ // Prefer gtag when available
925
+ win.gtag('event', 'page_view', { page_path: path });
926
+ return;
927
+ }
928
+ // Fallback: ensure dataLayer exists and push a native arguments-like object
929
+ win.dataLayer = win.dataLayer || [];
930
+ // Use a plain object that resembles gtag's usage if gtag not present
931
+ win.dataLayer.push({ event: 'page_view', page_path: path });
932
+ }
933
+ catch (err) {
934
+ console.warn('[Analytics] sendPageView failed', err);
935
+ }
936
+ }
937
+ 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 }); }
938
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AnalyticsService, providedIn: 'root' }); }
939
+ }
940
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AnalyticsService, decorators: [{
941
+ type: Injectable,
942
+ args: [{ providedIn: 'root' }]
943
+ }], ctorParameters: () => [{ type: Object, decorators: [{
944
+ type: Inject,
945
+ args: [PLATFORM_ID]
946
+ }] }] });
947
+
607
948
  /*
608
949
  * Public API Surface of iox-ui
609
950
  */
@@ -612,5 +953,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
612
953
  * Generated bundle index. Do not edit.
613
954
  */
614
955
 
615
- export { AOSService, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxMasonryComponent, IoxMasonryItemDirective, IoxMasonryModule, IoxMasonryService, IoxPageComponent, IoxPageModule, IoxUiModule, PageScrollProvider, ViewPositionDirective, ViewPositionModule };
956
+ export { AOSService, AnalyticsService, CMSClientInfraModule, ConsentService, ContentService, ENVIRONMENT, IoxAnimateContainer, IoxAosDirective, IoxAosModule, IoxMasonryComponent, IoxMasonryItemDirective, IoxMasonryModule, IoxMasonryService, IoxPageComponent, IoxPageModule, IoxUiModule, PageScrollProvider, PrivacyModalComponent, PrivacyModalService, PrivacyModelEvent, ViewPositionDirective, ViewPositionModule, WebSettingsService };
616
957
  //# sourceMappingURL=vectoriox-iox-ui.mjs.map