fabrikantencore 2.2.12 → 2.2.13

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.
@@ -9758,13 +9758,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
9758
9758
  args: [{ providedIn: 'root' }]
9759
9759
  }], ctorParameters: function () { return [{ type: i1$3.Clipboard }, { type: FabrikantenApiClient }]; } });
9760
9760
 
9761
- class GoogleAnalyticsService {
9761
+ class StatisticsService {
9762
9762
  constructor() {
9763
+ this.Active = true;
9763
9764
  this.analytics = null;
9765
+ this.AnalyticsCode = "G-WZHRFJ55QY";
9766
+ this.LastPageView = "";
9767
+ }
9768
+ PageView(name) {
9769
+ if (this.LastPageView != name) {
9770
+ gtag('config', this.AnalyticsCode);
9771
+ gtag('event', 'pageview', {
9772
+ 'name': name
9773
+ });
9774
+ this.LastPageView = name;
9775
+ }
9764
9776
  }
9765
- PageView() {
9766
- //this.Init();
9767
- //this.analytics.page();
9777
+ SelectCategory(name) {
9778
+ gtag('config', this.AnalyticsCode);
9779
+ gtag('event', "SelectCategory", {
9780
+ category: name
9781
+ });
9782
+ }
9783
+ SelectFilterOption(name) {
9784
+ gtag('config', this.AnalyticsCode);
9785
+ gtag('event', "SelectFilterOption", {
9786
+ filteroption: name
9787
+ });
9788
+ }
9789
+ SelectRangeValue(name) {
9790
+ gtag('config', this.AnalyticsCode);
9791
+ gtag('event', "SelectRangeValue", {
9792
+ range: name
9793
+ });
9794
+ }
9795
+ SelectProduct(name) {
9796
+ gtag('config', this.AnalyticsCode);
9797
+ gtag('event', "SelectProduct", {
9798
+ product: name
9799
+ });
9800
+ }
9801
+ DownloadFile(filetype, productname) {
9802
+ gtag('config', this.AnalyticsCode);
9803
+ gtag('event', "Download " + filetype, {
9804
+ product: productname
9805
+ });
9768
9806
  }
9769
9807
  Init() {
9770
9808
  //if (this.analytics == null) {
@@ -9779,9 +9817,9 @@ class GoogleAnalyticsService {
9779
9817
  //}
9780
9818
  }
9781
9819
  }
9782
- GoogleAnalyticsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: GoogleAnalyticsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9783
- GoogleAnalyticsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: GoogleAnalyticsService, providedIn: 'root' });
9784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: GoogleAnalyticsService, decorators: [{
9820
+ StatisticsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: StatisticsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9821
+ StatisticsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: StatisticsService, providedIn: 'root' });
9822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: StatisticsService, decorators: [{
9785
9823
  type: Injectable,
9786
9824
  args: [{
9787
9825
  providedIn: 'root'
@@ -9789,9 +9827,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
9789
9827
  }], ctorParameters: function () { return []; } });
9790
9828
 
9791
9829
  class NavigateService {
9792
- constructor(Router, GoogleAnalyticsService) {
9830
+ constructor(Router, StatisticsService) {
9793
9831
  this.Router = Router;
9794
- this.GoogleAnalyticsService = GoogleAnalyticsService;
9832
+ this.StatisticsService = StatisticsService;
9795
9833
  this.FabrikantenService = null;
9796
9834
  this.TranslateService = null;
9797
9835
  }
@@ -9800,24 +9838,26 @@ class NavigateService {
9800
9838
  if (this.TranslateService.ActiveLanguage != null && this.FabrikantenService.FabrikantenViewModel != null) {
9801
9839
  if (this.FabrikantenService.ShowCategories()) {
9802
9840
  this.Router.navigate(['/', this.TranslateService.ActiveLanguage.countryCode, 'categories']);
9803
- this.GoogleAnalyticsService.PageView();
9841
+ this.StatisticsService.PageView("categories");
9804
9842
  }
9805
9843
  else if (this.FabrikantenService.FabrikantenViewModel.selectedProduct != null) {
9806
9844
  this.Router.navigate(['/', this.TranslateService.ActiveLanguage.countryCode, 'product', this.FabrikantenService.FabrikantenViewModel.selectedProduct.urlName]);
9845
+ this.StatisticsService.PageView("product");
9807
9846
  }
9808
9847
  else {
9809
9848
  this.Router.navigate(['/', this.TranslateService.ActiveLanguage.countryCode, 'products']);
9849
+ this.StatisticsService.PageView("products");
9810
9850
  }
9811
9851
  }
9812
9852
  }
9813
9853
  }
9814
9854
  }
9815
- NavigateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: NavigateService, deps: [{ token: i1$1.Router }, { token: GoogleAnalyticsService }], target: i0.ɵɵFactoryTarget.Injectable });
9855
+ NavigateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: NavigateService, deps: [{ token: i1$1.Router }, { token: StatisticsService }], target: i0.ɵɵFactoryTarget.Injectable });
9816
9856
  NavigateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: NavigateService, providedIn: 'root' });
9817
9857
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: NavigateService, decorators: [{
9818
9858
  type: Injectable,
9819
9859
  args: [{ providedIn: 'root' }]
9820
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: GoogleAnalyticsService }]; } });
9860
+ }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: StatisticsService }]; } });
9821
9861
 
9822
9862
  class TranslateService {
9823
9863
  constructor(TranslateApiClient, NavigateService) {
@@ -10295,7 +10335,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
10295
10335
  }], ctorParameters: function () { return [{ type: FabrikantenApiClient }]; } });
10296
10336
 
10297
10337
  class FabrikantenService {
10298
- constructor(FabrikantenApiClient, BestekService, TranslateService, WebGLService, SVGService, TextureService, NavigateService) {
10338
+ constructor(FabrikantenApiClient, BestekService, TranslateService, WebGLService, SVGService, TextureService, NavigateService, StatisticsService) {
10299
10339
  this.FabrikantenApiClient = FabrikantenApiClient;
10300
10340
  this.BestekService = BestekService;
10301
10341
  this.TranslateService = TranslateService;
@@ -10303,6 +10343,7 @@ class FabrikantenService {
10303
10343
  this.SVGService = SVGService;
10304
10344
  this.TextureService = TextureService;
10305
10345
  this.NavigateService = NavigateService;
10346
+ this.StatisticsService = StatisticsService;
10306
10347
  this.Init = false;
10307
10348
  this.Loading = true;
10308
10349
  this.DownloadARKEYAdomiLoading = false;
@@ -10347,6 +10388,9 @@ class FabrikantenService {
10347
10388
  request.sessionId = this.FabrikantenViewModel.sessionId;
10348
10389
  request.filterOptionId = filteroptionid;
10349
10390
  request.filterId = filterid;
10391
+ if (this.StatisticsService.Active) {
10392
+ this.StatisticsService.SelectFilterOption(this.TranslateService.GetActiveValueFilter(filterid) + ": " + this.TranslateService.GetActiveValueFilterOption(filteroptionid));
10393
+ }
10350
10394
  this.FabrikantenApiClient.selectFilterOption(request).subscribe(() => {
10351
10395
  this.ReloadModel(ChangeDetectorRef);
10352
10396
  }, (error) => {
@@ -10387,6 +10431,9 @@ class FabrikantenService {
10387
10431
  request.sessionId = this.FabrikantenViewModel.sessionId;
10388
10432
  request.rangeInputId = rangeinputid;
10389
10433
  request.value = value;
10434
+ if (this.StatisticsService.Active) {
10435
+ this.StatisticsService.SelectRangeValue(this.TranslateService.GetActiveValueRangeInput(rangeinputid) + ": " + value);
10436
+ }
10390
10437
  this.FabrikantenApiClient.setRangeInput(request).subscribe(() => {
10391
10438
  this.ReloadModel(ChangeDetectorRef);
10392
10439
  }, (error) => {
@@ -10441,6 +10488,9 @@ class FabrikantenService {
10441
10488
  request.sessionId = this.FabrikantenViewModel.sessionId;
10442
10489
  request.categoryId = category.id;
10443
10490
  request.categoryLayer = category.layer;
10491
+ if (this.StatisticsService.Active) {
10492
+ this.StatisticsService.SelectCategory(this.TranslateService.GetActiveValueCategory(category.id));
10493
+ }
10444
10494
  this.FabrikantenApiClient.selectCategory(request).subscribe(() => {
10445
10495
  this.ReloadModel(ChangeDetectorRef);
10446
10496
  }, (error) => {
@@ -10460,6 +10510,9 @@ class FabrikantenService {
10460
10510
  var request = new SelectProductRequest();
10461
10511
  request.sessionId = this.FabrikantenViewModel.sessionId;
10462
10512
  request.productId = product.id;
10513
+ if (this.StatisticsService.Active) {
10514
+ this.StatisticsService.SelectProduct(this.TranslateService.GetActiveValueProduct(product.id));
10515
+ }
10463
10516
  this.FabrikantenApiClient.selectProduct(request).subscribe(() => {
10464
10517
  this.SelectedToebehoren = null;
10465
10518
  this.ResetTabs();
@@ -10870,6 +10923,11 @@ class FabrikantenService {
10870
10923
  request.fileType = "dhg";
10871
10924
  request.model3D = true;
10872
10925
  request.customBCBEBOId = custombcbeboid;
10926
+ if (this.StatisticsService.Active) {
10927
+ if (this.FabrikantenViewModel?.selectedProduct != null) {
10928
+ this.StatisticsService.DownloadFile(request.fileType, this.TranslateService.GetActiveValueProduct(this.FabrikantenViewModel.selectedProduct.id));
10929
+ }
10930
+ }
10873
10931
  this.FabrikantenApiClient.getFabrikantenFileViewModel(request).subscribe((model) => {
10874
10932
  this.StartDownload(model.file + "", ".dhg");
10875
10933
  this.DownloadARKEYAdomiLoading = false;
@@ -10889,6 +10947,11 @@ class FabrikantenService {
10889
10947
  request.fileType = "ifc";
10890
10948
  request.model3D = true;
10891
10949
  request.customBCBEBOId = custombcbeboid;
10950
+ if (this.StatisticsService.Active) {
10951
+ if (this.FabrikantenViewModel?.selectedProduct != null) {
10952
+ this.StatisticsService.DownloadFile(request.fileType, this.TranslateService.GetActiveValueProduct(this.FabrikantenViewModel.selectedProduct.id));
10953
+ }
10954
+ }
10892
10955
  this.FabrikantenApiClient.getFabrikantenFileViewModel(request).subscribe((model) => {
10893
10956
  this.StartDownload(model.file + "", ".ifc");
10894
10957
  this.DownloadIFCLoading = false;
@@ -10908,6 +10971,11 @@ class FabrikantenService {
10908
10971
  request.fileType = "hdhRevit";
10909
10972
  request.model3D = true;
10910
10973
  request.customBCBEBOId = custombcbeboid;
10974
+ if (this.StatisticsService.Active) {
10975
+ if (this.FabrikantenViewModel?.selectedProduct != null) {
10976
+ this.StatisticsService.DownloadFile(request.fileType, this.TranslateService.GetActiveValueProduct(this.FabrikantenViewModel.selectedProduct.id));
10977
+ }
10978
+ }
10911
10979
  this.FabrikantenApiClient.getFabrikantenFileViewModel(request).subscribe((model) => {
10912
10980
  window.location.href = model.file + "";
10913
10981
  this.DownloadRevitPluginLoading = false;
@@ -10927,6 +10995,11 @@ class FabrikantenService {
10927
10995
  request.fileType = "dwg";
10928
10996
  request.model3D = true;
10929
10997
  request.customBCBEBOId = custombcbeboid;
10998
+ if (this.StatisticsService.Active) {
10999
+ if (this.FabrikantenViewModel?.selectedProduct != null) {
11000
+ this.StatisticsService.DownloadFile(request.fileType, this.TranslateService.GetActiveValueProduct(this.FabrikantenViewModel.selectedProduct.id));
11001
+ }
11002
+ }
10930
11003
  this.FabrikantenApiClient.getFabrikantenFileViewModel(request).subscribe((model) => {
10931
11004
  this.StartDownload(model.file + "", ".dwg");
10932
11005
  this.Download3DAutoCADDwgLoading = false;
@@ -10946,6 +11019,11 @@ class FabrikantenService {
10946
11019
  request.fileType = "dxf";
10947
11020
  request.model3D = true;
10948
11021
  request.customBCBEBOId = custombcbeboid;
11022
+ if (this.StatisticsService.Active) {
11023
+ if (this.FabrikantenViewModel?.selectedProduct != null) {
11024
+ this.StatisticsService.DownloadFile(request.fileType, this.TranslateService.GetActiveValueProduct(this.FabrikantenViewModel.selectedProduct.id));
11025
+ }
11026
+ }
10949
11027
  this.FabrikantenApiClient.getFabrikantenFileViewModel(request).subscribe((model) => {
10950
11028
  this.StartDownload(model.file + "", ".dxf");
10951
11029
  this.Download3DDxfLoading = false;
@@ -10965,6 +11043,11 @@ class FabrikantenService {
10965
11043
  request.fileType = "dwg";
10966
11044
  request.model3D = false;
10967
11045
  request.customBCBEBOId = custombcbeboid;
11046
+ if (this.StatisticsService.Active) {
11047
+ if (this.FabrikantenViewModel?.selectedProduct != null) {
11048
+ this.StatisticsService.DownloadFile(request.fileType, this.TranslateService.GetActiveValueProduct(this.FabrikantenViewModel.selectedProduct.id));
11049
+ }
11050
+ }
10968
11051
  this.FabrikantenApiClient.getFabrikantenFileViewModel(request).subscribe((model) => {
10969
11052
  this.StartDownload(model.file + "", ".dwg");
10970
11053
  this.Download2DAutoCADDwgLoading = false;
@@ -10984,6 +11067,11 @@ class FabrikantenService {
10984
11067
  request.fileType = "dxf";
10985
11068
  request.model3D = false;
10986
11069
  request.customBCBEBOId = custombcbeboid;
11070
+ if (this.StatisticsService.Active) {
11071
+ if (this.FabrikantenViewModel?.selectedProduct != null) {
11072
+ this.StatisticsService.DownloadFile(request.fileType, this.TranslateService.GetActiveValueProduct(this.FabrikantenViewModel.selectedProduct.id));
11073
+ }
11074
+ }
10987
11075
  this.FabrikantenApiClient.getFabrikantenFileViewModel(request).subscribe((model) => {
10988
11076
  this.StartDownload(model.file + "", ".dxf");
10989
11077
  this.Download2DDxfLoading = false;
@@ -11003,6 +11091,11 @@ class FabrikantenService {
11003
11091
  request.fileType = "rfa";
11004
11092
  request.model3D = false;
11005
11093
  request.customBCBEBOId = custombcbeboid;
11094
+ if (this.StatisticsService.Active) {
11095
+ if (this.FabrikantenViewModel?.selectedProduct != null) {
11096
+ this.StatisticsService.DownloadFile(request.fileType, this.TranslateService.GetActiveValueProduct(this.FabrikantenViewModel.selectedProduct.id));
11097
+ }
11098
+ }
11006
11099
  this.FabrikantenApiClient.getFabrikantenFileViewModel(request).subscribe((model) => {
11007
11100
  if (model.customRFAZip) {
11008
11101
  this.StartDownload(model.file + "", ".zip");
@@ -11045,6 +11138,11 @@ class FabrikantenService {
11045
11138
  if (this.BestekService.TypeBestek == "Vrij") {
11046
11139
  this.DownloadBestekInner(data, ".txt");
11047
11140
  }
11141
+ if (this.StatisticsService.Active) {
11142
+ if (this.FabrikantenViewModel?.selectedProduct != null) {
11143
+ this.StatisticsService.DownloadFile("bestek", this.TranslateService.GetActiveValueProduct(this.FabrikantenViewModel.selectedProduct.id));
11144
+ }
11145
+ }
11048
11146
  }
11049
11147
  DownloadBestekInner(data, extension) {
11050
11148
  var c = document.createElement("a");
@@ -11151,12 +11249,12 @@ class FabrikantenService {
11151
11249
  return toebehoren;
11152
11250
  }
11153
11251
  }
11154
- FabrikantenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: FabrikantenService, deps: [{ token: FabrikantenApiClient }, { token: BestekService }, { token: TranslateService }, { token: WebGLService }, { token: SVGService }, { token: TextureService }, { token: NavigateService }], target: i0.ɵɵFactoryTarget.Injectable });
11252
+ FabrikantenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: FabrikantenService, deps: [{ token: FabrikantenApiClient }, { token: BestekService }, { token: TranslateService }, { token: WebGLService }, { token: SVGService }, { token: TextureService }, { token: NavigateService }, { token: StatisticsService }], target: i0.ɵɵFactoryTarget.Injectable });
11155
11253
  FabrikantenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: FabrikantenService, providedIn: 'root' });
11156
11254
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImport: i0, type: FabrikantenService, decorators: [{
11157
11255
  type: Injectable,
11158
11256
  args: [{ providedIn: 'root' }]
11159
- }], ctorParameters: function () { return [{ type: FabrikantenApiClient }, { type: BestekService }, { type: TranslateService }, { type: WebGLService }, { type: SVGService }, { type: TextureService }, { type: NavigateService }]; } });
11257
+ }], ctorParameters: function () { return [{ type: FabrikantenApiClient }, { type: BestekService }, { type: TranslateService }, { type: WebGLService }, { type: SVGService }, { type: TextureService }, { type: NavigateService }, { type: StatisticsService }]; } });
11160
11258
 
11161
11259
  class FabFiltersComponent {
11162
11260
  constructor(MobileService, FabrikantenService, BestekService, TranslateService, ActivatedRoute, ChangeDetectorRef) {
@@ -15539,7 +15637,7 @@ FabrikantenCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
15539
15637
  ToebehorenService,
15540
15638
  TextureService,
15541
15639
  SVGService,
15542
- GoogleAnalyticsService,
15640
+ StatisticsService,
15543
15641
  MobileService,
15544
15642
  TranslateService,
15545
15643
  FabrikantenService,
@@ -15555,8 +15653,7 @@ FabrikantenCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
15555
15653
  ProductsApiClient,
15556
15654
  ProjectSettingApiClient,
15557
15655
  { provide: HTTP_INTERCEPTORS, useClass: BasicAuthInterceptor, multi: true },
15558
- { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
15559
- { provide: 'googleTagManagerId', useValue: "G-XK4L5JFYTN" }
15656
+ { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }
15560
15657
  ], imports: [CommonModule,
15561
15658
  HttpClientModule,
15562
15659
  MatInputModule,
@@ -15582,7 +15679,6 @@ FabrikantenCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
15582
15679
  MatProgressSpinnerModule,
15583
15680
  MatSelectModule,
15584
15681
  MatSnackBarModule,
15585
- //GoogleTagManagerModule.forRoot(),
15586
15682
  RouterModule.forRoot(routes, {
15587
15683
  scrollPositionRestoration: 'enabled',
15588
15684
  anchorScrolling: 'enabled',
@@ -15616,7 +15712,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
15616
15712
  MatProgressSpinnerModule,
15617
15713
  MatSelectModule,
15618
15714
  MatSnackBarModule,
15619
- //GoogleTagManagerModule.forRoot(),
15620
15715
  RouterModule.forRoot(routes, {
15621
15716
  scrollPositionRestoration: 'enabled',
15622
15717
  anchorScrolling: 'enabled',
@@ -15704,7 +15799,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
15704
15799
  ToebehorenService,
15705
15800
  TextureService,
15706
15801
  SVGService,
15707
- GoogleAnalyticsService,
15802
+ StatisticsService,
15708
15803
  MobileService,
15709
15804
  TranslateService,
15710
15805
  FabrikantenService,
@@ -15720,8 +15815,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
15720
15815
  ProductsApiClient,
15721
15816
  ProjectSettingApiClient,
15722
15817
  { provide: HTTP_INTERCEPTORS, useClass: BasicAuthInterceptor, multi: true },
15723
- { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
15724
- { provide: 'googleTagManagerId', useValue: "G-XK4L5JFYTN" }
15818
+ { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }
15725
15819
  ],
15726
15820
  exports: [
15727
15821
  FabFiltersComponent,