@esolve/ng-esolve-connect 0.44.0 → 0.45.0

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 (116) hide show
  1. package/esm2022/lib/account/esolve-account.service.mjs +3 -3
  2. package/esm2022/lib/account/user-account/classes/esolve-user-client-account.model.mjs +2 -1
  3. package/esm2022/lib/account/user-account/interfaces/esolve-user-client-account-record.interface.mjs +1 -1
  4. package/esm2022/lib/auth/esolve-auth-interceptor.service.mjs +3 -3
  5. package/esm2022/lib/auth/esolve-auth.service.mjs +3 -3
  6. package/esm2022/lib/banners/esolve-banner.service.mjs +3 -3
  7. package/esm2022/lib/cart/esolve-cart.service.mjs +12 -14
  8. package/esm2022/lib/category-tree/esolve-category-tree.service.mjs +3 -3
  9. package/esm2022/lib/core/esolve-config.service.mjs +7 -4
  10. package/esm2022/lib/core/esolve-connect-config.constant.mjs +1 -1
  11. package/esm2022/lib/core/esolve-connect-config.interface.mjs +2 -0
  12. package/esm2022/lib/core/index.mjs +3 -2
  13. package/esm2022/lib/core/providers/index.mjs +2 -0
  14. package/esm2022/lib/core/providers/provide-ng-esolve-connect.function.mjs +24 -0
  15. package/esm2022/lib/coupons/esolve-coupons.service.mjs +9 -11
  16. package/esm2022/lib/enquiry/esolve-enquiry.service.mjs +3 -3
  17. package/esm2022/lib/images/directives/cdn-src.directive.mjs +5 -5
  18. package/esm2022/lib/images/esolve-image-loader.provider.mjs +6 -3
  19. package/esm2022/lib/images/functions/index.mjs +2 -1
  20. package/esm2022/lib/images/functions/is-ftg-cdn-path.function.mjs +5 -0
  21. package/esm2022/lib/images/functions/process-image-src.function.mjs +7 -2
  22. package/esm2022/lib/locations/esolve-locations.service.mjs +9 -11
  23. package/esm2022/lib/manufacturers/esolve-manufacturers.service.mjs +3 -3
  24. package/esm2022/lib/menu/esolve-menu.service.mjs +3 -3
  25. package/esm2022/lib/news/esolve-news.service.mjs +3 -3
  26. package/esm2022/lib/ng-esolve-connect.module.mjs +8 -27
  27. package/esm2022/lib/payment/esolve-payment.service.mjs +11 -13
  28. package/esm2022/lib/payment/interfaces/index.mjs +3 -2
  29. package/esm2022/lib/ranges/esolve-ranges.service.mjs +9 -11
  30. package/esm2022/lib/session/esolve-session-metadata.service.mjs +3 -3
  31. package/esm2022/lib/session/esolve-session.service.mjs +3 -3
  32. package/esm2022/lib/shared/assets/esolve-assets.service.mjs +9 -11
  33. package/esm2022/lib/shared/cookie/esolve-cookie.service.mjs +3 -3
  34. package/esm2022/lib/shared/errors/esolve-error-handler.service.mjs +3 -3
  35. package/esm2022/lib/shared/geocoder/esolve-geocoder.service.mjs +9 -11
  36. package/esm2022/lib/shared/response/esolve-response-handler.service.mjs +3 -3
  37. package/esm2022/lib/shared/seo/esolve-seo.service.mjs +3 -3
  38. package/esm2022/lib/shipping/esolve-shipping.service.mjs +9 -11
  39. package/esm2022/lib/specials/esolve-specials.service.mjs +9 -11
  40. package/esm2022/lib/stock/esolve-stock.service.mjs +9 -11
  41. package/esm2022/lib/suppliers/esolve-suppliers.service.mjs +9 -11
  42. package/esm2022/lib/tags/esolve-tags.service.mjs +9 -11
  43. package/esm2022/lib/topics/esolve-topic.service.mjs +9 -11
  44. package/esm2022/lib/transactions/esolve-transactions.service.mjs +3 -3
  45. package/esm2022/lib/wishlist/esolve-wishlist.service.mjs +11 -13
  46. package/esm2022/media/index.mjs +2 -2
  47. package/esm2022/media/lib/components/media-layout/esolve-media-layout.component.mjs +14 -13
  48. package/esm2022/media/lib/components/media-section/esolve-media-section.component.mjs +15 -14
  49. package/esm2022/media/lib/esolve-connect-media-config.token.mjs +1 -1
  50. package/esm2022/media/lib/functions/index.mjs +2 -0
  51. package/esm2022/media/lib/functions/provide-ng-esolve-connect-media.function.mjs +8 -0
  52. package/esm2022/media/lib/interfaces/esolve-connect-media-config.interface.mjs +2 -0
  53. package/esm2022/media/lib/interfaces/index.mjs +2 -1
  54. package/esm2022/media/lib/ng-esolve-connect-media.module.mjs +8 -29
  55. package/esm2022/media/lib/services/esolve-media-layout.service.mjs +8 -10
  56. package/esm2022/media/lib/services/esolve-media.service.mjs +10 -14
  57. package/esm2022/notifications/index.mjs +1 -2
  58. package/esm2022/notifications/lib/services/esolve-notifications.service.mjs +3 -3
  59. package/esm2022/survey/index.mjs +1 -2
  60. package/esm2022/survey/lib/services/esolve-survey.service.mjs +3 -3
  61. package/fesm2022/esolve-ng-esolve-connect-media.mjs +50 -64
  62. package/fesm2022/esolve-ng-esolve-connect-media.mjs.map +1 -1
  63. package/fesm2022/esolve-ng-esolve-connect-notifications.mjs +5 -18
  64. package/fesm2022/esolve-ng-esolve-connect-notifications.mjs.map +1 -1
  65. package/fesm2022/esolve-ng-esolve-connect-survey.mjs +6 -19
  66. package/fesm2022/esolve-ng-esolve-connect-survey.mjs.map +1 -1
  67. package/fesm2022/esolve-ng-esolve-connect.mjs +169 -194
  68. package/fesm2022/esolve-ng-esolve-connect.mjs.map +1 -1
  69. package/lib/account/user-account/classes/esolve-user-client-account.model.d.ts +1 -0
  70. package/lib/account/user-account/interfaces/esolve-user-client-account-record.interface.d.ts +1 -0
  71. package/lib/cart/esolve-cart.service.d.ts +2 -2
  72. package/lib/core/esolve-config.service.d.ts +2 -1
  73. package/lib/core/esolve-connect-config.constant.d.ts +1 -1
  74. package/lib/core/{esolve-connect.config.d.ts → esolve-connect-config.interface.d.ts} +4 -0
  75. package/lib/core/index.d.ts +2 -1
  76. package/lib/core/providers/index.d.ts +1 -0
  77. package/lib/core/providers/provide-ng-esolve-connect.function.d.ts +3 -0
  78. package/lib/coupons/esolve-coupons.service.d.ts +2 -2
  79. package/lib/images/esolve-image-loader.provider.d.ts +1 -1
  80. package/lib/images/functions/index.d.ts +1 -0
  81. package/lib/images/functions/is-ftg-cdn-path.function.d.ts +1 -0
  82. package/lib/images/functions/process-image-src.function.d.ts +1 -1
  83. package/lib/locations/esolve-locations.service.d.ts +2 -2
  84. package/lib/payment/esolve-payment.service.d.ts +2 -2
  85. package/lib/payment/interfaces/index.d.ts +2 -0
  86. package/lib/ranges/esolve-ranges.service.d.ts +2 -2
  87. package/lib/shared/assets/esolve-assets.service.d.ts +2 -2
  88. package/lib/shared/geocoder/esolve-geocoder.service.d.ts +2 -2
  89. package/lib/shipping/esolve-shipping.service.d.ts +2 -2
  90. package/lib/specials/esolve-specials.service.d.ts +2 -2
  91. package/lib/stock/esolve-stock.service.d.ts +2 -2
  92. package/lib/suppliers/esolve-suppliers.service.d.ts +2 -2
  93. package/lib/tags/esolve-tags.service.d.ts +2 -2
  94. package/lib/topics/esolve-topic.service.d.ts +2 -2
  95. package/lib/wishlist/esolve-wishlist.service.d.ts +2 -2
  96. package/media/index.d.ts +1 -1
  97. package/media/lib/components/media-layout/esolve-media-layout.component.d.ts +2 -3
  98. package/media/lib/components/media-section/esolve-media-section.component.d.ts +2 -3
  99. package/media/lib/esolve-connect-media-config.token.d.ts +1 -1
  100. package/media/lib/functions/index.d.ts +1 -0
  101. package/media/lib/functions/provide-ng-esolve-connect-media.function.d.ts +3 -0
  102. package/media/lib/interfaces/esolve-connect-media-config.interface.d.ts +7 -0
  103. package/media/lib/interfaces/index.d.ts +1 -0
  104. package/media/lib/ng-esolve-connect-media.module.d.ts +2 -6
  105. package/media/lib/services/esolve-media-layout.service.d.ts +1 -2
  106. package/media/lib/services/esolve-media.service.d.ts +0 -3
  107. package/notifications/index.d.ts +0 -1
  108. package/package.json +8 -8
  109. package/survey/index.d.ts +0 -1
  110. package/esm2022/lib/core/esolve-connect.config.mjs +0 -2
  111. package/esm2022/media/lib/esolve-connect-media.config.mjs +0 -2
  112. package/esm2022/notifications/lib/ng-esolve-connect-notifications.module.mjs +0 -15
  113. package/esm2022/survey/lib/ng-esolve-connect-survey.module.mjs +0 -15
  114. package/media/lib/esolve-connect-media.config.d.ts +0 -6
  115. package/notifications/lib/ng-esolve-connect-notifications.module.d.ts +0 -7
  116. package/survey/lib/ng-esolve-connect-survey.module.d.ts +0 -7
@@ -1,12 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Inject, InjectionToken, Injector, Component, Input, NgModule } from '@angular/core';
3
- import * as i2$1 from '@angular/common';
2
+ import { inject, Injectable, InjectionToken, Injector, Component, Input, NgModule } from '@angular/core';
3
+ import * as i1$1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i1 from '@angular/common/http';
6
- import { HttpParams, HttpClientModule } from '@angular/common/http';
7
- import * as i2 from '@angular/cdk/portal';
5
+ import * as i1 from '@angular/cdk/portal';
8
6
  import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
9
- import { EsolveSeoInfo, EsolveTag, EsolveTopic, EsolveManufacturer, EsolveRange, ESOLVE_CONNECT_CONFIG, NgEsolveConnectModule } from '@esolve/ng-esolve-connect';
7
+ import { EsolveSeoInfo, EsolveTag, EsolveTopic, EsolveManufacturer, EsolveRange, EsolveConfigService } from '@esolve/ng-esolve-connect';
8
+ import { HttpClient, HttpParams } from '@angular/common/http';
10
9
  import { map } from 'rxjs/operators';
11
10
 
12
11
  class EsolveHeading {
@@ -126,9 +125,9 @@ class EsolveMediaArticle {
126
125
  }
127
126
 
128
127
  class EsolveMediaService {
129
- constructor(config, http) {
130
- this.config = config;
131
- this.http = http;
128
+ constructor() {
129
+ this.config = inject(EsolveConfigService);
130
+ this.http = inject(HttpClient);
132
131
  }
133
132
  /**
134
133
  * Retrieves the media record from the eSolve instance using the identifier
@@ -219,26 +218,24 @@ class EsolveMediaService {
219
218
  getMediaRecords(params) {
220
219
  return this.http.get(`${this.config.api_url}/get-media.php`, { params });
221
220
  }
222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
223
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaService, providedIn: 'root' }); }
221
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
222
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaService, providedIn: 'root' }); }
224
223
  }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaService, decorators: [{
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaService, decorators: [{
226
225
  type: Injectable,
227
226
  args: [{
228
227
  providedIn: 'root',
229
228
  }]
230
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
231
- type: Inject,
232
- args: [ESOLVE_CONNECT_CONFIG]
233
- }] }, { type: i1.HttpClient }]; } });
229
+ }] });
234
230
 
235
231
  const ESOLVE_CONNECT_MEDIA_CONFIG = new InjectionToken('esolve.connect.media.config');
236
232
 
237
233
  class EsolveMediaLayoutService {
238
- constructor(config) {
234
+ constructor() {
239
235
  this.section_key_delimiter = '>>>';
240
236
  this.layout_map = new Map();
241
237
  this.section_map = new Map();
238
+ const config = inject(ESOLVE_CONNECT_MEDIA_CONFIG);
242
239
  if (config.layouts.length === 0) {
243
240
  throw new Error('No layouts have been defined');
244
241
  }
@@ -366,19 +363,16 @@ class EsolveMediaLayoutService {
366
363
  }
367
364
  return key_array.join(this.section_key_delimiter);
368
365
  }
369
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaLayoutService, deps: [{ token: ESOLVE_CONNECT_MEDIA_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
370
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaLayoutService }); }
366
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaLayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
367
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaLayoutService }); }
371
368
  }
372
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaLayoutService, decorators: [{
369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaLayoutService, decorators: [{
373
370
  type: Injectable
374
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
375
- type: Inject,
376
- args: [ESOLVE_CONNECT_MEDIA_CONFIG]
377
- }] }]; } });
371
+ }], ctorParameters: function () { return []; } });
378
372
 
379
373
  class EsolveMediaLayoutComponent {
380
- constructor(layoutService) {
381
- this.layoutService = layoutService;
374
+ constructor() {
375
+ this.layoutService = inject(EsolveMediaLayoutService);
382
376
  }
383
377
  ngOnChanges() {
384
378
  this.layoutService.setMedia(this.media);
@@ -393,19 +387,20 @@ class EsolveMediaLayoutComponent {
393
387
  });
394
388
  this.portal = new ComponentPortal(component, null, injector);
395
389
  }
396
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaLayoutComponent, deps: [{ token: EsolveMediaLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
397
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: EsolveMediaLayoutComponent, selector: "eslv-media-layout", inputs: { media: "media" }, providers: [EsolveMediaLayoutService], usesOnChanges: true, ngImport: i0, template: "<ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n", dependencies: [{ kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] }); }
390
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
391
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: EsolveMediaLayoutComponent, isStandalone: true, selector: "eslv-media-layout", inputs: { media: "media" }, providers: [EsolveMediaLayoutService], usesOnChanges: true, ngImport: i0, template: "<ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] }); }
398
392
  }
399
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaLayoutComponent, decorators: [{
393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaLayoutComponent, decorators: [{
400
394
  type: Component,
401
- args: [{ selector: 'eslv-media-layout', providers: [EsolveMediaLayoutService], template: "<ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n" }]
402
- }], ctorParameters: function () { return [{ type: EsolveMediaLayoutService }]; }, propDecorators: { media: [{
403
- type: Input
395
+ args: [{ standalone: true, selector: 'eslv-media-layout', imports: [CommonModule, PortalModule], providers: [EsolveMediaLayoutService], template: "<ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n" }]
396
+ }], propDecorators: { media: [{
397
+ type: Input,
398
+ args: [{ required: true }]
404
399
  }] } });
405
400
 
406
401
  class EsolveMediaSectionComponent {
407
- constructor(layoutService) {
408
- this.layoutService = layoutService;
402
+ constructor() {
403
+ this.layoutService = inject(EsolveMediaLayoutService);
409
404
  this.portals = [];
410
405
  }
411
406
  ngOnChanges() {
@@ -431,48 +426,39 @@ class EsolveMediaSectionComponent {
431
426
  this.portals.push(portal);
432
427
  }
433
428
  }
434
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaSectionComponent, deps: [{ token: EsolveMediaLayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
435
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: EsolveMediaSectionComponent, selector: "eslv-media-section", inputs: { key: "key" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"portals.length > 0\">\n <ng-container *ngFor=\"let portal of portals\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] }); }
429
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
430
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: EsolveMediaSectionComponent, isStandalone: true, selector: "eslv-media-section", inputs: { key: "key" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"portals.length > 0\">\n <ng-container *ngFor=\"let portal of portals\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }] }); }
436
431
  }
437
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveMediaSectionComponent, decorators: [{
432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveMediaSectionComponent, decorators: [{
438
433
  type: Component,
439
- args: [{ selector: 'eslv-media-section', template: "<ng-container *ngIf=\"portals.length > 0\">\n <ng-container *ngFor=\"let portal of portals\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n </ng-container>\n</ng-container>\n" }]
440
- }], ctorParameters: function () { return [{ type: EsolveMediaLayoutService }]; }, propDecorators: { key: [{
441
- type: Input
434
+ args: [{ standalone: true, selector: 'eslv-media-section', imports: [CommonModule, PortalModule], template: "<ng-container *ngIf=\"portals.length > 0\">\n <ng-container *ngFor=\"let portal of portals\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n </ng-container>\n</ng-container>\n" }]
435
+ }], propDecorators: { key: [{
436
+ type: Input,
437
+ args: [{ required: true }]
442
438
  }] } });
443
439
 
440
+ function provideNgEsolveConnectMedia(config) {
441
+ return {
442
+ provide: ESOLVE_CONNECT_MEDIA_CONFIG,
443
+ useValue: config,
444
+ };
445
+ }
446
+
444
447
  class NgEsolveConnectMediaModule {
445
448
  static withConfig(config) {
446
449
  return {
447
450
  ngModule: NgEsolveConnectMediaModule,
448
- providers: [
449
- {
450
- provide: ESOLVE_CONNECT_MEDIA_CONFIG,
451
- useValue: config,
452
- },
453
- ],
451
+ providers: [provideNgEsolveConnectMedia(config)],
454
452
  };
455
453
  }
456
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectMediaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
457
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectMediaModule, declarations: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent], imports: [CommonModule,
458
- HttpClientModule,
459
- PortalModule,
460
- NgEsolveConnectModule], exports: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent] }); }
461
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectMediaModule, imports: [CommonModule,
462
- HttpClientModule,
463
- PortalModule,
464
- NgEsolveConnectModule] }); }
454
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NgEsolveConnectMediaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
455
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NgEsolveConnectMediaModule, imports: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent], exports: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent] }); }
456
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NgEsolveConnectMediaModule, imports: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent] }); }
465
457
  }
466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectMediaModule, decorators: [{
458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NgEsolveConnectMediaModule, decorators: [{
467
459
  type: NgModule,
468
460
  args: [{
469
- declarations: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent],
470
- imports: [
471
- CommonModule,
472
- HttpClientModule,
473
- PortalModule,
474
- NgEsolveConnectModule,
475
- ],
461
+ imports: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent],
476
462
  exports: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent],
477
463
  }]
478
464
  }] });
@@ -481,5 +467,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImpor
481
467
  * Generated bundle index. Do not edit.
482
468
  */
483
469
 
484
- export { ESOLVE_CONNECT_MEDIA_CONFIG, EsolveHeading, EsolveMediaArticle, EsolveMediaGroup, EsolveMediaLayoutComponent, EsolveMediaLayoutSection, EsolveMediaLayoutService, EsolveMediaLink, EsolveMediaSectionComponent, EsolveMediaService, NgEsolveConnectMediaModule };
470
+ export { ESOLVE_CONNECT_MEDIA_CONFIG, EsolveHeading, EsolveMediaArticle, EsolveMediaGroup, EsolveMediaLayoutComponent, EsolveMediaLayoutSection, EsolveMediaLayoutService, EsolveMediaLink, EsolveMediaSectionComponent, EsolveMediaService, NgEsolveConnectMediaModule, provideNgEsolveConnectMedia };
485
471
  //# sourceMappingURL=esolve-ng-esolve-connect-media.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"esolve-ng-esolve-connect-media.mjs","sources":["../../../../libs/ng-esolve-connect/media/src/lib/classes/esolve-heading.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/classes/esolve-media-group.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/classes/esolve-media-layout-section.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/classes/esolve-media-link.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/classes/esolve-media-article.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/services/esolve-media.service.ts","../../../../libs/ng-esolve-connect/media/src/lib/esolve-connect-media-config.token.ts","../../../../libs/ng-esolve-connect/media/src/lib/services/esolve-media-layout.service.ts","../../../../libs/ng-esolve-connect/media/src/lib/components/media-layout/esolve-media-layout.component.ts","../../../../libs/ng-esolve-connect/media/src/lib/components/media-layout/esolve-media-layout.component.html","../../../../libs/ng-esolve-connect/media/src/lib/components/media-section/esolve-media-section.component.ts","../../../../libs/ng-esolve-connect/media/src/lib/components/media-section/esolve-media-section.component.html","../../../../libs/ng-esolve-connect/media/src/lib/ng-esolve-connect-media.module.ts","../../../../libs/ng-esolve-connect/media/src/esolve-ng-esolve-connect-media.ts"],"sourcesContent":["export class EsolveHeading {\n constructor(public identifier: string, public value: string) {}\n}\n","import { EsolveMediaGroupRecord } from '../interfaces';\n\nexport class EsolveMediaGroup {\n public id = 0;\n public name = '';\n public sef_name = '';\n public description = '';\n\n constructor(record?: EsolveMediaGroupRecord) {\n if (record) {\n this.id = +(record.id ?? 0);\n this.name = record.name ?? '';\n this.sef_name = record.sef_name ?? '';\n this.description = record.description ?? '';\n }\n }\n}\n","import { EsolveMediaLayoutSectionRecord } from '../interfaces';\nimport { EsolveMediaLayoutSectionType } from '../types';\n\nexport class EsolveMediaLayoutSection {\n public type: EsolveMediaLayoutSectionType;\n public sub_type = '';\n public identifier: string;\n\n private data?: any;\n\n constructor(record: EsolveMediaLayoutSectionRecord) {\n this.type = record.type;\n this.identifier = record.identifier;\n this.sub_type = record.sub_type ?? '';\n\n if (record.data) {\n this.data = record.data;\n }\n }\n\n public getData<T>(): T | null {\n if (typeof this.data === 'undefined') {\n return null;\n }\n\n return this.data as T;\n }\n}\n","import { EsolveUrlTarget } from '@esolve/ng-esolve-connect';\n\nimport { EsolveMediaLinkRecord } from '../interfaces';\n\nexport class EsolveMediaLink {\n public caption: string;\n public url: string;\n public target: EsolveUrlTarget;\n\n constructor(record: EsolveMediaLinkRecord) {\n this.url = record.url;\n this.caption = record.caption ?? 'Read more...';\n this.target = record.target ?? '_self';\n }\n}\n","import {\n EsolveSeoDetails,\n EsolveTag,\n EsolveTopic,\n EsolveSeoInfo,\n EsolveManufacturer,\n EsolveRange,\n EsolveCustomFields,\n} from '@esolve/ng-esolve-connect';\n\nimport { EsolveMediaRecord } from '../interfaces';\n\nimport { EsolveMediaGroup } from './esolve-media-group.model';\nimport { EsolveMediaLayoutSection } from './esolve-media-layout-section.model';\nimport { EsolveMediaLink } from './esolve-media-link.model';\n\nexport class EsolveMediaArticle implements EsolveSeoDetails {\n public identifier: string;\n public title: string;\n public sub_title: string;\n public article: string;\n public layout = '';\n public image_url = '';\n public tags: EsolveTag[] = [];\n public topics: EsolveTopic[] = [];\n public seo_details: EsolveSeoInfo;\n public group?: EsolveMediaGroup;\n public manufacturer?: EsolveManufacturer;\n public range?: EsolveRange;\n public sections?: Map<string, EsolveMediaLayoutSection[]>;\n public link?: EsolveMediaLink;\n public custom_fields?: EsolveCustomFields;\n\n constructor(record: EsolveMediaRecord) {\n this.identifier = record.identifier;\n this.title = record.title;\n this.sub_title = record.sub_title;\n this.article = record.article;\n\n let seo_title = record.seo_page_title ?? '';\n const seo_keywords = record.seo_keywords ?? '';\n const seo_description = record.seo_description ?? '';\n\n if (seo_title.trim() === '') {\n seo_title = this.title;\n }\n\n this.seo_details = new EsolveSeoInfo(\n seo_title,\n seo_description,\n seo_keywords,\n );\n\n this.image_url = record.image_url ?? '';\n\n if (record.tags && record.tags.length > 0) {\n for (const tag of record.tags) {\n this.tags.push(new EsolveTag(tag));\n }\n }\n\n if (record.topics && record.topics.length > 0) {\n for (const topic of record.topics) {\n this.topics.push(new EsolveTopic(topic));\n }\n }\n\n if (record.media_group) {\n this.group = new EsolveMediaGroup(record.media_group);\n }\n\n if (record.manufacturer) {\n this.manufacturer = new EsolveManufacturer(record.manufacturer);\n }\n\n if (record.range) {\n this.range = new EsolveRange(record.range);\n }\n\n if (\n record.is_both_master_and_minor_article ||\n !record.is_minor_article\n ) {\n this.layout = record.layout ?? '';\n\n if (record.sections) {\n this.sections = new Map<string, EsolveMediaLayoutSection[]>();\n\n for (const key in record.sections) {\n const section_list: EsolveMediaLayoutSection[] = [];\n const section_records = record.sections[key];\n\n for (const section_record of section_records) {\n section_list.push(\n new EsolveMediaLayoutSection(section_record),\n );\n }\n\n this.sections.set(key, section_list);\n }\n }\n }\n\n if (\n record.is_both_master_and_minor_article ||\n record.is_minor_article\n ) {\n if (record.sef_url) {\n this.link = new EsolveMediaLink({\n url: record.sef_url,\n caption: record.link_caption,\n target: record.target,\n });\n }\n }\n\n if (record.custom_fields) {\n this.custom_fields = record.custom_fields;\n }\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { HttpClient, HttpParams } from '@angular/common/http';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport {\n EsolveConnectConfig,\n EsolveGetResponse,\n ESOLVE_CONNECT_CONFIG,\n} from '@esolve/ng-esolve-connect';\n\nimport { EsolveMediaArticle, EsolveHeading } from '../classes';\nimport { EsolveMediaRecord, EsolveHeadingRecord } from '../interfaces';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class EsolveMediaService {\n constructor(\n @Inject(ESOLVE_CONNECT_CONFIG) private config: EsolveConnectConfig,\n private http: HttpClient,\n ) {}\n\n /**\n * Retrieves the media record from the eSolve instance using the identifier\n *\n * @param identifier String representing the eSolve media identifier\n */\n public getMediaArticle(identifier: string): Observable<EsolveMediaArticle> {\n const params = new HttpParams({ fromObject: { identifier } });\n\n // TODO: Error Handling\n return this.getMediaRecords(params).pipe(\n map((response) => {\n if (\n response.records === undefined ||\n response.records.length <= 0\n ) {\n throw response;\n }\n\n const mediaRecord = response.records[0];\n\n if (!mediaRecord.active) {\n throw response;\n }\n\n return this.processMediaRecord(mediaRecord);\n }),\n );\n }\n\n /**\n * Retrieves a group of media records from the eSolve instance linked to a group\n *\n * @param media_group String representing the eSolve media group\n */\n public getGroupedMediaArticles(\n media_group: string,\n ): Observable<EsolveMediaArticle[]> {\n const params = new HttpParams({\n fromObject: { media_group_sef: media_group },\n });\n\n return this.getMediaRecords(params).pipe(\n map((response) => {\n const mediaArticles: EsolveMediaArticle[] = [];\n\n if (\n response.records !== undefined &&\n response.records.length > 0\n ) {\n for (const mediaRecord of response.records) {\n if (mediaRecord.active) {\n mediaArticles.push(\n this.processMediaRecord(mediaRecord),\n );\n }\n }\n }\n\n return mediaArticles;\n }),\n );\n }\n\n /**\n * Retrieves the media heading records from the eSolve instance using the identifiers\n *\n * @param identifiers Array of strings representing the eSolve heading identifiers\n */\n public getHeadings(identifiers: string[]): Observable<EsolveHeading[]> {\n return this.http\n .get<EsolveGetResponse<EsolveHeadingRecord[]>>(\n `${this.config.api_url}/get-headings.php`,\n {\n params: {\n identifier: identifiers.join(','),\n },\n },\n )\n .pipe(\n map((response) => {\n const headings: EsolveHeading[] = [];\n\n if (\n response.records !== undefined &&\n response.records.length > 0\n ) {\n for (const heading_record of response.records) {\n headings.push(\n this.processHeadingRecord(heading_record),\n );\n }\n }\n\n return headings;\n }),\n );\n }\n\n /**\n * Processes media article record\n *\n * @param record Record from eSolve instance\n */\n private processMediaRecord(record: EsolveMediaRecord): EsolveMediaArticle {\n return new EsolveMediaArticle(record);\n }\n\n /**\n * Processes media heading record\n *\n * @param record Record from eSolve instance\n */\n private processHeadingRecord(record: EsolveHeadingRecord): EsolveHeading {\n return new EsolveHeading(record.identifier, record.value);\n }\n\n /**\n * Retrieves media records from eSolve instance.\n *\n * @param params HTTP params\n */\n private getMediaRecords(\n params: HttpParams,\n ): Observable<EsolveGetResponse<EsolveMediaRecord[]>> {\n return this.http.get<EsolveGetResponse<EsolveMediaRecord[]>>(\n `${this.config.api_url}/get-media.php`,\n { params },\n );\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { EsolveConnectMediaConfig } from './esolve-connect-media.config';\n\nexport const ESOLVE_CONNECT_MEDIA_CONFIG =\n new InjectionToken<EsolveConnectMediaConfig>('esolve.connect.media.config');\n","import { ComponentType } from '@angular/cdk/portal';\nimport { Inject, Injectable } from '@angular/core';\n\nimport { EsolveMediaArticle, EsolveMediaLayoutSection } from '../classes';\nimport { EsolveMediaLayoutSectionType } from '../types';\n\nimport { ESOLVE_CONNECT_MEDIA_CONFIG } from '../esolve-connect-media-config.token';\nimport { EsolveConnectMediaConfig } from '../esolve-connect-media.config';\n\ntype ComponentMap = Map<string, ComponentType<any>>;\n\ntype SectionKeyOptions = {\n type: EsolveMediaLayoutSectionType;\n sub_type?: string;\n layout?: string;\n group?: string;\n};\n\n@Injectable()\nexport class EsolveMediaLayoutService {\n private readonly section_key_delimiter = '>>>';\n\n private media?: EsolveMediaArticle;\n private layout_map: ComponentMap = new Map();\n private section_map: ComponentMap = new Map();\n private default_layout: string;\n\n constructor(\n @Inject(ESOLVE_CONNECT_MEDIA_CONFIG) config: EsolveConnectMediaConfig,\n ) {\n if (config.layouts.length === 0) {\n throw new Error('No layouts have been defined');\n }\n\n for (const layout of config.layouts) {\n this.setLayout(layout.key, layout.component);\n\n if (layout.sections) {\n for (const section_group_key in layout.sections) {\n const sections = layout.sections[section_group_key];\n\n for (const section of sections) {\n const key_options: SectionKeyOptions = {\n type: section.key,\n sub_type: section.sub_key,\n layout: layout.key,\n };\n\n if (section_group_key !== '__default') {\n key_options.group = section_group_key;\n }\n\n this.setSection(section.component, key_options);\n }\n }\n }\n }\n\n const default_layout = config.default_layout;\n\n if (default_layout) {\n this.default_layout = default_layout;\n } else {\n this.default_layout = config.layouts[0].key;\n }\n\n if (config.sections.length > 0) {\n for (const section of config.sections) {\n const key_options: SectionKeyOptions = {\n type: section.key,\n sub_type: section.sub_key,\n };\n\n this.setSection(section.component, key_options);\n }\n }\n }\n\n public getMedia() {\n if (!this.media) {\n throw new Error('Media not declared');\n }\n\n return this.media;\n }\n\n public setMedia(media: EsolveMediaArticle) {\n this.media = media;\n }\n\n public getLayout() {\n const media = this.getMedia();\n\n let layout_key = media.layout;\n\n if (layout_key === '') {\n layout_key = this.default_layout;\n }\n\n return this.searchLayout(layout_key);\n }\n\n public getSectionContent(key: string) {\n const media = this.getMedia();\n\n if (media.sections) {\n const section = media.sections.get(key);\n\n if (section) {\n return section;\n }\n }\n\n return [];\n }\n\n public getSectionComponent(key: string, section: EsolveMediaLayoutSection) {\n const type = section.type;\n const sub_type = section.sub_type;\n const { layout } = this.getMedia();\n\n const section_key = this.createSectionMapKey({\n type,\n sub_type,\n layout,\n group: key,\n });\n\n let component = this.section_map.get(section_key);\n\n if (component) {\n return component;\n }\n\n const layout_key = this.createSectionMapKey({\n type,\n sub_type,\n layout,\n });\n\n component = this.section_map.get(layout_key);\n\n if (component) {\n return component;\n }\n\n const base_key = this.createSectionMapKey({\n type,\n sub_type,\n });\n\n component = this.section_map.get(base_key);\n\n if (component) {\n return component;\n }\n\n throw new Error('Section component not defined');\n }\n\n private searchLayout(layout_key: string) {\n const component = this.layout_map.get(layout_key);\n\n if (!component) {\n throw new Error('Layout not declared');\n }\n\n return component;\n }\n\n private setLayout(key: string, component: ComponentType<any>) {\n this.layout_map.set(key, component);\n }\n\n private setSection(\n component: ComponentType<any>,\n key_options: SectionKeyOptions,\n ) {\n const key = this.createSectionMapKey(key_options);\n\n this.section_map.set(key, component);\n }\n\n private createSectionMapKey(key_options: SectionKeyOptions) {\n const { type, sub_type, layout, group } = key_options;\n\n const key_array: string[] = [type];\n\n if (sub_type) {\n key_array.push(sub_type);\n }\n\n if (layout) {\n key_array.push(layout);\n\n if (group) {\n key_array.push(group);\n }\n }\n\n return key_array.join(this.section_key_delimiter);\n }\n}\n","import { Component, OnChanges, Input, Injector } from '@angular/core';\nimport { ComponentPortal } from '@angular/cdk/portal';\n\nimport { EsolveMediaArticle } from '../../classes';\nimport { EsolveMediaLayoutService } from '../../services';\n\n@Component({\n selector: 'eslv-media-layout',\n templateUrl: 'esolve-media-layout.component.html',\n providers: [EsolveMediaLayoutService],\n})\nexport class EsolveMediaLayoutComponent implements OnChanges {\n @Input() public media!: EsolveMediaArticle;\n\n public portal!: ComponentPortal<any>;\n\n constructor(public layoutService: EsolveMediaLayoutService) {}\n\n public ngOnChanges(): void {\n this.layoutService.setMedia(this.media);\n const component = this.layoutService.getLayout();\n const injector = Injector.create({\n providers: [\n {\n provide: EsolveMediaLayoutService,\n useValue: this.layoutService,\n },\n ],\n });\n\n this.portal = new ComponentPortal(component, null, injector);\n }\n}\n","<ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n","import { Component, OnChanges, Input, Injector } from '@angular/core';\nimport { ComponentPortal } from '@angular/cdk/portal';\n\nimport { EsolveMediaLayoutSection } from '../../classes';\nimport { EsolveMediaLayoutService } from '../../services';\n\n@Component({\n selector: 'eslv-media-section',\n templateUrl: './esolve-media-section.component.html',\n})\nexport class EsolveMediaSectionComponent implements OnChanges {\n @Input() public key!: string;\n\n public portals: ComponentPortal<any>[] = [];\n\n constructor(public layoutService: EsolveMediaLayoutService) {}\n\n public ngOnChanges(): void {\n const sections = this.layoutService.getSectionContent(this.key);\n this.processPortals(sections);\n }\n\n private processPortals(sections: EsolveMediaLayoutSection[]) {\n for (const section of sections) {\n const injector = Injector.create({\n providers: [\n {\n provide: EsolveMediaLayoutSection,\n useValue: section,\n },\n {\n provide: EsolveMediaLayoutService,\n useValue: this.layoutService,\n },\n ],\n });\n\n const component = this.layoutService.getSectionComponent(\n this.key,\n section,\n );\n\n const portal = new ComponentPortal(component, null, injector);\n this.portals.push(portal);\n }\n }\n}\n","<ng-container *ngIf=\"portals.length > 0\">\n <ng-container *ngFor=\"let portal of portals\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n </ng-container>\n</ng-container>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HttpClientModule } from '@angular/common/http';\nimport { PortalModule } from '@angular/cdk/portal';\n\nimport { NgEsolveConnectModule } from '@esolve/ng-esolve-connect';\n\nimport {\n EsolveMediaLayoutComponent,\n EsolveMediaSectionComponent,\n} from './components';\nimport { EsolveConnectMediaConfig } from './esolve-connect-media.config';\nimport { ESOLVE_CONNECT_MEDIA_CONFIG } from './esolve-connect-media-config.token';\n\n@NgModule({\n declarations: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent],\n imports: [\n CommonModule,\n HttpClientModule,\n PortalModule,\n NgEsolveConnectModule,\n ],\n exports: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent],\n})\nexport class NgEsolveConnectMediaModule {\n public static withConfig(\n config: EsolveConnectMediaConfig,\n ): ModuleWithProviders<NgEsolveConnectMediaModule> {\n return {\n ngModule: NgEsolveConnectMediaModule,\n providers: [\n {\n provide: ESOLVE_CONNECT_MEDIA_CONFIG,\n useValue: config,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.EsolveMediaLayoutService","i2","i3"],"mappings":";;;;;;;;;;;MAAa,aAAa,CAAA;IACtB,WAAmB,CAAA,UAAkB,EAAS,KAAa,EAAA;QAAxC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ;QAAS,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;KAAI;AAClE;;MCAY,gBAAgB,CAAA;AAMzB,IAAA,WAAA,CAAY,MAA+B,EAAA;QALpC,IAAE,CAAA,EAAA,GAAG,CAAC,CAAC;QACP,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QACV,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;QACd,IAAW,CAAA,WAAA,GAAG,EAAE,CAAC;AAGpB,QAAA,IAAI,MAAM,EAAE;YACR,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;YAC5B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC;YACtC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC;AAC/C,SAAA;KACJ;AACJ;;MCbY,wBAAwB,CAAA;AAOjC,IAAA,WAAA,CAAY,MAAsC,EAAA;QAL3C,IAAQ,CAAA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es/esolve-heading.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/classes/esolve-media-group.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/classes/esolve-media-layout-section.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/classes/esolve-media-link.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/classes/esolve-media-article.model.ts","../../../../libs/ng-esolve-connect/media/src/lib/services/esolve-media.service.ts","../../../../libs/ng-esolve-connect/media/src/lib/esolve-connect-media-config.token.ts","../../../../libs/ng-esolve-connect/media/src/lib/services/esolve-media-layout.service.ts","../../../../libs/ng-esolve-connect/media/src/lib/components/media-layout/esolve-media-layout.component.ts","../../../../libs/ng-esolve-connect/media/src/lib/components/media-layout/esolve-media-layout.component.html","../../../../libs/ng-esolve-connect/media/src/lib/components/media-section/esolve-media-section.component.ts","../../../../libs/ng-esolve-connect/media/src/lib/components/media-section/esolve-media-section.component.html","../../../../libs/ng-esolve-connect/media/src/lib/functions/provide-ng-esolve-connect-media.function.ts","../../../../libs/ng-esolve-connect/media/src/lib/ng-esolve-connect-media.module.ts","../../../../libs/ng-esolve-connect/media/src/esolve-ng-esolve-connect-media.ts"],"sourcesContent":["export class EsolveHeading {\n constructor(public identifier: string, public value: string) {}\n}\n","import { EsolveMediaGroupRecord } from '../interfaces';\n\nexport class EsolveMediaGroup {\n public id = 0;\n public name = '';\n public sef_name = '';\n public description = '';\n\n constructor(record?: EsolveMediaGroupRecord) {\n if (record) {\n this.id = +(record.id ?? 0);\n this.name = record.name ?? '';\n this.sef_name = record.sef_name ?? '';\n this.description = record.description ?? '';\n }\n }\n}\n","import { EsolveMediaLayoutSectionRecord } from '../interfaces';\nimport { EsolveMediaLayoutSectionType } from '../types';\n\nexport class EsolveMediaLayoutSection {\n public type: EsolveMediaLayoutSectionType;\n public sub_type = '';\n public identifier: string;\n\n private data?: any;\n\n constructor(record: EsolveMediaLayoutSectionRecord) {\n this.type = record.type;\n this.identifier = record.identifier;\n this.sub_type = record.sub_type ?? '';\n\n if (record.data) {\n this.data = record.data;\n }\n }\n\n public getData<T>(): T | null {\n if (typeof this.data === 'undefined') {\n return null;\n }\n\n return this.data as T;\n }\n}\n","import { EsolveUrlTarget } from '@esolve/ng-esolve-connect';\n\nimport { EsolveMediaLinkRecord } from '../interfaces';\n\nexport class EsolveMediaLink {\n public caption: string;\n public url: string;\n public target: EsolveUrlTarget;\n\n constructor(record: EsolveMediaLinkRecord) {\n this.url = record.url;\n this.caption = record.caption ?? 'Read more...';\n this.target = record.target ?? '_self';\n }\n}\n","import {\n EsolveSeoDetails,\n EsolveTag,\n EsolveTopic,\n EsolveSeoInfo,\n EsolveManufacturer,\n EsolveRange,\n EsolveCustomFields,\n} from '@esolve/ng-esolve-connect';\n\nimport { EsolveMediaRecord } from '../interfaces';\n\nimport { EsolveMediaGroup } from './esolve-media-group.model';\nimport { EsolveMediaLayoutSection } from './esolve-media-layout-section.model';\nimport { EsolveMediaLink } from './esolve-media-link.model';\n\nexport class EsolveMediaArticle implements EsolveSeoDetails {\n public identifier: string;\n public title: string;\n public sub_title: string;\n public article: string;\n public layout = '';\n public image_url = '';\n public tags: EsolveTag[] = [];\n public topics: EsolveTopic[] = [];\n public seo_details: EsolveSeoInfo;\n public group?: EsolveMediaGroup;\n public manufacturer?: EsolveManufacturer;\n public range?: EsolveRange;\n public sections?: Map<string, EsolveMediaLayoutSection[]>;\n public link?: EsolveMediaLink;\n public custom_fields?: EsolveCustomFields;\n\n constructor(record: EsolveMediaRecord) {\n this.identifier = record.identifier;\n this.title = record.title;\n this.sub_title = record.sub_title;\n this.article = record.article;\n\n let seo_title = record.seo_page_title ?? '';\n const seo_keywords = record.seo_keywords ?? '';\n const seo_description = record.seo_description ?? '';\n\n if (seo_title.trim() === '') {\n seo_title = this.title;\n }\n\n this.seo_details = new EsolveSeoInfo(\n seo_title,\n seo_description,\n seo_keywords,\n );\n\n this.image_url = record.image_url ?? '';\n\n if (record.tags && record.tags.length > 0) {\n for (const tag of record.tags) {\n this.tags.push(new EsolveTag(tag));\n }\n }\n\n if (record.topics && record.topics.length > 0) {\n for (const topic of record.topics) {\n this.topics.push(new EsolveTopic(topic));\n }\n }\n\n if (record.media_group) {\n this.group = new EsolveMediaGroup(record.media_group);\n }\n\n if (record.manufacturer) {\n this.manufacturer = new EsolveManufacturer(record.manufacturer);\n }\n\n if (record.range) {\n this.range = new EsolveRange(record.range);\n }\n\n if (\n record.is_both_master_and_minor_article ||\n !record.is_minor_article\n ) {\n this.layout = record.layout ?? '';\n\n if (record.sections) {\n this.sections = new Map<string, EsolveMediaLayoutSection[]>();\n\n for (const key in record.sections) {\n const section_list: EsolveMediaLayoutSection[] = [];\n const section_records = record.sections[key];\n\n for (const section_record of section_records) {\n section_list.push(\n new EsolveMediaLayoutSection(section_record),\n );\n }\n\n this.sections.set(key, section_list);\n }\n }\n }\n\n if (\n record.is_both_master_and_minor_article ||\n record.is_minor_article\n ) {\n if (record.sef_url) {\n this.link = new EsolveMediaLink({\n url: record.sef_url,\n caption: record.link_caption,\n target: record.target,\n });\n }\n }\n\n if (record.custom_fields) {\n this.custom_fields = record.custom_fields;\n }\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { HttpClient, HttpParams } from '@angular/common/http';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport {\n EsolveGetResponse,\n EsolveConfigService,\n} from '@esolve/ng-esolve-connect';\n\nimport { EsolveMediaArticle, EsolveHeading } from '../classes';\nimport { EsolveMediaRecord, EsolveHeadingRecord } from '../interfaces';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class EsolveMediaService {\n private config = inject(EsolveConfigService);\n private http = inject(HttpClient);\n\n /**\n * Retrieves the media record from the eSolve instance using the identifier\n *\n * @param identifier String representing the eSolve media identifier\n */\n public getMediaArticle(identifier: string): Observable<EsolveMediaArticle> {\n const params = new HttpParams({ fromObject: { identifier } });\n\n // TODO: Error Handling\n return this.getMediaRecords(params).pipe(\n map((response) => {\n if (\n response.records === undefined ||\n response.records.length <= 0\n ) {\n throw response;\n }\n\n const mediaRecord = response.records[0];\n\n if (!mediaRecord.active) {\n throw response;\n }\n\n return this.processMediaRecord(mediaRecord);\n }),\n );\n }\n\n /**\n * Retrieves a group of media records from the eSolve instance linked to a group\n *\n * @param media_group String representing the eSolve media group\n */\n public getGroupedMediaArticles(\n media_group: string,\n ): Observable<EsolveMediaArticle[]> {\n const params = new HttpParams({\n fromObject: { media_group_sef: media_group },\n });\n\n return this.getMediaRecords(params).pipe(\n map((response) => {\n const mediaArticles: EsolveMediaArticle[] = [];\n\n if (\n response.records !== undefined &&\n response.records.length > 0\n ) {\n for (const mediaRecord of response.records) {\n if (mediaRecord.active) {\n mediaArticles.push(\n this.processMediaRecord(mediaRecord),\n );\n }\n }\n }\n\n return mediaArticles;\n }),\n );\n }\n\n /**\n * Retrieves the media heading records from the eSolve instance using the identifiers\n *\n * @param identifiers Array of strings representing the eSolve heading identifiers\n */\n public getHeadings(identifiers: string[]): Observable<EsolveHeading[]> {\n return this.http\n .get<EsolveGetResponse<EsolveHeadingRecord[]>>(\n `${this.config.api_url}/get-headings.php`,\n {\n params: {\n identifier: identifiers.join(','),\n },\n },\n )\n .pipe(\n map((response) => {\n const headings: EsolveHeading[] = [];\n\n if (\n response.records !== undefined &&\n response.records.length > 0\n ) {\n for (const heading_record of response.records) {\n headings.push(\n this.processHeadingRecord(heading_record),\n );\n }\n }\n\n return headings;\n }),\n );\n }\n\n /**\n * Processes media article record\n *\n * @param record Record from eSolve instance\n */\n private processMediaRecord(record: EsolveMediaRecord): EsolveMediaArticle {\n return new EsolveMediaArticle(record);\n }\n\n /**\n * Processes media heading record\n *\n * @param record Record from eSolve instance\n */\n private processHeadingRecord(record: EsolveHeadingRecord): EsolveHeading {\n return new EsolveHeading(record.identifier, record.value);\n }\n\n /**\n * Retrieves media records from eSolve instance.\n *\n * @param params HTTP params\n */\n private getMediaRecords(\n params: HttpParams,\n ): Observable<EsolveGetResponse<EsolveMediaRecord[]>> {\n return this.http.get<EsolveGetResponse<EsolveMediaRecord[]>>(\n `${this.config.api_url}/get-media.php`,\n { params },\n );\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { EsolveConnectMediaConfig } from './interfaces';\n\nexport const ESOLVE_CONNECT_MEDIA_CONFIG =\n new InjectionToken<EsolveConnectMediaConfig>('esolve.connect.media.config');\n","import { ComponentType } from '@angular/cdk/portal';\nimport { inject, Injectable } from '@angular/core';\n\nimport { EsolveMediaArticle, EsolveMediaLayoutSection } from '../classes';\nimport { EsolveMediaLayoutSectionType } from '../types';\n\nimport { ESOLVE_CONNECT_MEDIA_CONFIG } from '../esolve-connect-media-config.token';\n\ntype ComponentMap = Map<string, ComponentType<any>>;\n\ntype SectionKeyOptions = {\n type: EsolveMediaLayoutSectionType;\n sub_type?: string;\n layout?: string;\n group?: string;\n};\n\n@Injectable()\nexport class EsolveMediaLayoutService {\n private readonly section_key_delimiter = '>>>';\n\n private media?: EsolveMediaArticle;\n private layout_map: ComponentMap = new Map();\n private section_map: ComponentMap = new Map();\n private default_layout: string;\n\n constructor() {\n const config = inject(ESOLVE_CONNECT_MEDIA_CONFIG);\n\n if (config.layouts.length === 0) {\n throw new Error('No layouts have been defined');\n }\n\n for (const layout of config.layouts) {\n this.setLayout(layout.key, layout.component);\n\n if (layout.sections) {\n for (const section_group_key in layout.sections) {\n const sections = layout.sections[section_group_key];\n\n for (const section of sections) {\n const key_options: SectionKeyOptions = {\n type: section.key,\n sub_type: section.sub_key,\n layout: layout.key,\n };\n\n if (section_group_key !== '__default') {\n key_options.group = section_group_key;\n }\n\n this.setSection(section.component, key_options);\n }\n }\n }\n }\n\n const default_layout = config.default_layout;\n\n if (default_layout) {\n this.default_layout = default_layout;\n } else {\n this.default_layout = config.layouts[0].key;\n }\n\n if (config.sections.length > 0) {\n for (const section of config.sections) {\n const key_options: SectionKeyOptions = {\n type: section.key,\n sub_type: section.sub_key,\n };\n\n this.setSection(section.component, key_options);\n }\n }\n }\n\n public getMedia() {\n if (!this.media) {\n throw new Error('Media not declared');\n }\n\n return this.media;\n }\n\n public setMedia(media: EsolveMediaArticle) {\n this.media = media;\n }\n\n public getLayout() {\n const media = this.getMedia();\n\n let layout_key = media.layout;\n\n if (layout_key === '') {\n layout_key = this.default_layout;\n }\n\n return this.searchLayout(layout_key);\n }\n\n public getSectionContent(key: string) {\n const media = this.getMedia();\n\n if (media.sections) {\n const section = media.sections.get(key);\n\n if (section) {\n return section;\n }\n }\n\n return [];\n }\n\n public getSectionComponent(key: string, section: EsolveMediaLayoutSection) {\n const type = section.type;\n const sub_type = section.sub_type;\n const { layout } = this.getMedia();\n\n const section_key = this.createSectionMapKey({\n type,\n sub_type,\n layout,\n group: key,\n });\n\n let component = this.section_map.get(section_key);\n\n if (component) {\n return component;\n }\n\n const layout_key = this.createSectionMapKey({\n type,\n sub_type,\n layout,\n });\n\n component = this.section_map.get(layout_key);\n\n if (component) {\n return component;\n }\n\n const base_key = this.createSectionMapKey({\n type,\n sub_type,\n });\n\n component = this.section_map.get(base_key);\n\n if (component) {\n return component;\n }\n\n throw new Error('Section component not defined');\n }\n\n private searchLayout(layout_key: string) {\n const component = this.layout_map.get(layout_key);\n\n if (!component) {\n throw new Error('Layout not declared');\n }\n\n return component;\n }\n\n private setLayout(key: string, component: ComponentType<any>) {\n this.layout_map.set(key, component);\n }\n\n private setSection(\n component: ComponentType<any>,\n key_options: SectionKeyOptions,\n ) {\n const key = this.createSectionMapKey(key_options);\n\n this.section_map.set(key, component);\n }\n\n private createSectionMapKey(key_options: SectionKeyOptions) {\n const { type, sub_type, layout, group } = key_options;\n\n const key_array: string[] = [type];\n\n if (sub_type) {\n key_array.push(sub_type);\n }\n\n if (layout) {\n key_array.push(layout);\n\n if (group) {\n key_array.push(group);\n }\n }\n\n return key_array.join(this.section_key_delimiter);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, OnChanges, Input, Injector, inject } from '@angular/core';\nimport { ComponentPortal, PortalModule } from '@angular/cdk/portal';\n\nimport { EsolveMediaArticle } from '../../classes';\nimport { EsolveMediaLayoutService } from '../../services';\n\n@Component({\n standalone: true,\n selector: 'eslv-media-layout',\n templateUrl: 'esolve-media-layout.component.html',\n imports: [CommonModule, PortalModule],\n providers: [EsolveMediaLayoutService],\n})\nexport class EsolveMediaLayoutComponent implements OnChanges {\n @Input({ required: true }) public media!: EsolveMediaArticle;\n\n public layoutService = inject(EsolveMediaLayoutService);\n public portal!: ComponentPortal<any>;\n\n public ngOnChanges(): void {\n this.layoutService.setMedia(this.media);\n const component = this.layoutService.getLayout();\n const injector = Injector.create({\n providers: [\n {\n provide: EsolveMediaLayoutService,\n useValue: this.layoutService,\n },\n ],\n });\n\n this.portal = new ComponentPortal(component, null, injector);\n }\n}\n","<ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n","import { CommonModule } from '@angular/common';\nimport { Component, Injector, Input, OnChanges, inject } from '@angular/core';\nimport { ComponentPortal, PortalModule } from '@angular/cdk/portal';\n\nimport { EsolveMediaLayoutSection } from '../../classes';\nimport { EsolveMediaLayoutService } from '../../services';\n\n@Component({\n standalone: true,\n selector: 'eslv-media-section',\n templateUrl: './esolve-media-section.component.html',\n imports: [CommonModule, PortalModule],\n})\nexport class EsolveMediaSectionComponent implements OnChanges {\n @Input({ required: true }) public key!: string;\n\n public layoutService = inject(EsolveMediaLayoutService);\n public portals: ComponentPortal<any>[] = [];\n\n public ngOnChanges(): void {\n const sections = this.layoutService.getSectionContent(this.key);\n this.processPortals(sections);\n }\n\n private processPortals(sections: EsolveMediaLayoutSection[]) {\n for (const section of sections) {\n const injector = Injector.create({\n providers: [\n {\n provide: EsolveMediaLayoutSection,\n useValue: section,\n },\n {\n provide: EsolveMediaLayoutService,\n useValue: this.layoutService,\n },\n ],\n });\n\n const component = this.layoutService.getSectionComponent(\n this.key,\n section,\n );\n\n const portal = new ComponentPortal(component, null, injector);\n this.portals.push(portal);\n }\n }\n}\n","<ng-container *ngIf=\"portals.length > 0\">\n <ng-container *ngFor=\"let portal of portals\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n </ng-container>\n</ng-container>\n","import { Provider } from '@angular/core';\n\nimport { EsolveConnectMediaConfig } from '../interfaces';\nimport { ESOLVE_CONNECT_MEDIA_CONFIG } from '../esolve-connect-media-config.token';\n\nexport function provideNgEsolveConnectMedia(\n config: EsolveConnectMediaConfig,\n): Provider {\n return {\n provide: ESOLVE_CONNECT_MEDIA_CONFIG,\n useValue: config,\n };\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport {\n EsolveMediaLayoutComponent,\n EsolveMediaSectionComponent,\n} from './components';\nimport { EsolveConnectMediaConfig } from './interfaces';\nimport { provideNgEsolveConnectMedia } from './functions';\n\n@NgModule({\n imports: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent],\n exports: [EsolveMediaLayoutComponent, EsolveMediaSectionComponent],\n})\nexport class NgEsolveConnectMediaModule {\n public static withConfig(\n config: EsolveConnectMediaConfig,\n ): ModuleWithProviders<NgEsolveConnectMediaModule> {\n return {\n ngModule: NgEsolveConnectMediaModule,\n providers: [provideNgEsolveConnectMedia(config)],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2"],"mappings":";;;;;;;;;;MAAa,aAAa,CAAA;IACtB,WAAmB,CAAA,UAAkB,EAAS,KAAa,EAAA;QAAxC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ;QAAS,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;KAAI;AAClE;;MCAY,gBAAgB,CAAA;AAMzB,IAAA,WAAA,CAAY,MAA+B,EAAA;QALpC,IAAE,CAAA,EAAA,GAAG,CAAC,CAAC;QACP,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QACV,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;QACd,IAAW,CAAA,WAAA,GAAG,EAAE,CAAC;AAGpB,QAAA,IAAI,MAAM,EAAE;YACR,IAAI,CAAC,EAAE,GAAG,EA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AA;;;AETvB,SAAU,2BAA2B,CACvC,MAAgC,EAAA;IAEhC,OAAO;AACH,QAAA,OAAO,EAAE,2BAA2B;AACpC,QAAA,QAAQ,EAAE,MAAM;KACnB,CAAC;AACN;;MCCa,0BAA0B,CAAA;IAC5B,OAAO,UAAU,CACpB,MAAgC,EAAA;QAEhC,OAAO;AACH,YAAA,QAAQ,EAAE,0BAA0B;AACpC,YAAA,SAAS,EAAE,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;SACnD,CAAC;KACL;8GARQ,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,YAHzB,0BAA0B,EAAE,2BAA2B,CACvD,EAAA,OAAA,EAAA,CAAA,0BAA0B,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;+GAExD,0BAA0B,EAAA,OAAA,EAAA,CAHzB,0BAA0B,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGxD,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAJtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;AACrE,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
@@ -1,23 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgModule, Injectable, Inject } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
2
+ import { Injectable, Inject } from '@angular/core';
4
3
  import * as i1 from '@angular/common/http';
5
4
  import { HttpParams } from '@angular/common/http';
6
5
  import { map } from 'rxjs';
7
6
  import { ESOLVE_CONNECT_CONFIG } from '@esolve/ng-esolve-connect';
8
7
 
9
- class NgEsolveConnectNotificationsModule {
10
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectNotificationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
11
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectNotificationsModule, imports: [CommonModule] }); }
12
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectNotificationsModule, imports: [CommonModule] }); }
13
- }
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectNotificationsModule, decorators: [{
15
- type: NgModule,
16
- args: [{
17
- imports: [CommonModule],
18
- }]
19
- }] });
20
-
21
8
  class EsolveNotificationButtonAction {
22
9
  constructor(record) {
23
10
  this.text = '';
@@ -110,10 +97,10 @@ class EsolveNotificationsService {
110
97
  }
111
98
  return notifications;
112
99
  }
113
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveNotificationsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
114
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveNotificationsService, providedIn: 'root' }); }
100
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveNotificationsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
101
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveNotificationsService, providedIn: 'root' }); }
115
102
  }
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveNotificationsService, decorators: [{
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveNotificationsService, decorators: [{
117
104
  type: Injectable,
118
105
  args: [{
119
106
  providedIn: 'root',
@@ -127,5 +114,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImpor
127
114
  * Generated bundle index. Do not edit.
128
115
  */
129
116
 
130
- export { EsolveNotificationButtonAction, EsolveNotificationDates, EsolveNotificationsService, EsolveSystemNotification, EsolveSystemNotificationType, NgEsolveConnectNotificationsModule };
117
+ export { EsolveNotificationButtonAction, EsolveNotificationDates, EsolveNotificationsService, EsolveSystemNotification, EsolveSystemNotificationType };
131
118
  //# sourceMappingURL=esolve-ng-esolve-connect-notifications.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"esolve-ng-esolve-connect-notifications.mjs","sources":["../../../../libs/ng-esolve-connect/notifications/src/lib/ng-esolve-connect-notifications.module.ts","../../../../libs/ng-esolve-connect/notifications/src/lib/classes/esolve-notification-button-action.model.ts","../../../../libs/ng-esolve-connect/notifications/src/lib/classes/esolve-notification-dates.model.ts","../../../../libs/ng-esolve-connect/notifications/src/lib/classes/esolve-system-notification-type.model.ts","../../../../libs/ng-esolve-connect/notifications/src/lib/classes/esolve-system-notification.model.ts","../../../../libs/ng-esolve-connect/notifications/src/lib/services/esolve-notifications.service.ts","../../../../libs/ng-esolve-connect/notifications/src/esolve-ng-esolve-connect-notifications.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class NgEsolveConnectNotificationsModule {}\n","import { EsolveUrlTarget } from '@esolve/ng-esolve-connect';\n\nimport { EsolveNotificationButtonActionRecord } from '../interfaces';\n\nexport class EsolveNotificationButtonAction {\n public text = '';\n public url = '';\n public module = '';\n public target: EsolveUrlTarget = '_self';\n\n constructor(record?: EsolveNotificationButtonActionRecord) {\n if (record) {\n this.text = record.text;\n this.url = record.url;\n this.module = record.module;\n this.target = record.target;\n }\n }\n}\n","import { EsolveNotificationDatesRecord } from '../interfaces';\n\nexport class EsolveNotificationDates {\n public from: Date;\n public to: Date;\n\n constructor(record: EsolveNotificationDatesRecord) {\n this.from = new Date(record.from.timestamp * 1000);\n this.to = new Date(record.to.timestamp * 1000);\n }\n}\n","import { EsolveSystemNotificationTypeRecord } from '../interfaces';\nimport {\n EsolveNotificationPosition,\n EsolveNotificationSize,\n EsolveNotificationType,\n} from '../types';\n\nexport class EsolveSystemNotificationType {\n public id = 0;\n public identifier = '';\n public title = '';\n public system_disable_order = false;\n public position: EsolveNotificationPosition;\n public size: EsolveNotificationSize;\n public type: EsolveNotificationType;\n\n constructor(record: EsolveSystemNotificationTypeRecord) {\n this.id = +record.id;\n this.identifier = record.identifier;\n this.title = record.title;\n this.system_disable_order = !!+record.system_disable_order;\n this.type = record.type;\n this.size = record.size;\n this.position = record.position;\n }\n}\n","import { EsolveSystemNotificationRecord } from '../interfaces';\nimport { EsolveNotificationButtonAction } from './esolve-notification-button-action.model';\nimport { EsolveNotificationDates } from './esolve-notification-dates.model';\nimport { EsolveSystemNotificationType } from './esolve-system-notification-type.model';\n\nexport class EsolveSystemNotification {\n public id = 0;\n public identifier = '';\n public title = '';\n public message = '';\n public timeout = 0;\n public display_every = 0;\n public button_actions: EsolveNotificationButtonAction[] = [];\n public type: EsolveSystemNotificationType;\n public dates?: EsolveNotificationDates;\n\n constructor(record: EsolveSystemNotificationRecord) {\n this.id = +record.id;\n this.identifier = record.identifier;\n this.title = record.title;\n this.message = record.message;\n this.timeout = +record.timeout;\n this.display_every = +record.display_every;\n\n this.type = new EsolveSystemNotificationType(record.type);\n\n for (const action of record.button_actions) {\n this.button_actions.push(\n new EsolveNotificationButtonAction(action),\n );\n }\n\n if (record.dates) {\n this.dates = new EsolveNotificationDates(record.dates);\n }\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { HttpClient, HttpParams } from '@angular/common/http';\n\nimport { Observable, map } from 'rxjs';\n\nimport {\n ESOLVE_CONNECT_CONFIG,\n EsolveConnectConfig,\n EsolveGetResponse,\n} from '@esolve/ng-esolve-connect';\n\nimport {\n EsolveSystemNotificationOptions,\n EsolveSystemNotificationRecord,\n} from '../interfaces';\nimport { EsolveSystemNotification } from '../classes';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class EsolveNotificationsService {\n constructor(\n @Inject(ESOLVE_CONNECT_CONFIG) private config: EsolveConnectConfig,\n private http: HttpClient,\n ) {}\n\n public getSystemNotifications(\n options?: EsolveSystemNotificationOptions,\n ): Observable<EsolveSystemNotification[]> {\n let params = new HttpParams();\n\n if (options) {\n if (options.exclude_ids) {\n params = params.set(\n 'exclude_ids',\n options.exclude_ids.join(','),\n );\n }\n }\n\n return this.http\n .get<EsolveGetResponse<EsolveSystemNotificationRecord[]>>(\n `${this.config.api_url}/get-system-notifications.php`,\n { params },\n )\n .pipe(\n map((response) => {\n if (\n response.records === undefined ||\n response.records.length <= 0\n ) {\n throw response;\n }\n\n return this.processNotifications(response.records);\n }),\n );\n }\n\n private processNotifications(\n records: EsolveSystemNotificationRecord[],\n ): EsolveSystemNotification[] {\n const notifications: EsolveSystemNotification[] = [];\n\n for (const record of records) {\n notifications.push(new EsolveSystemNotification(record));\n }\n\n return notifications;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAMa,kCAAkC,CAAA;8GAAlC,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA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AAU,EAAE,MAAM;AACrB,iBAAA,CAAA;;0BAGQ,MAAM;2BAAC,qBAAqB,CAAA;;;ACtBrC;;AAEG;;;;"}
1
+ {"version":3,"file":"esolve-ng-esolve-connect-notifications.mjs","sources":["../../../../libs/ng-esolve-connect/notifications/src/lib/classes/esolve-notification-button-action.model.ts","../../../../libs/ng-esolve-connect/notifications/src/lib/classes/esolve-notification-dates.model.ts","../../../../libs/ng-esolve-connect/notifications/src/lib/classes/esolve-system-notification-type.model.ts","../../../../libs/ng-esolve-connect/notifications/src/lib/classes/esolve-system-notification.model.ts","../../../../libs/ng-esolve-connect/notifications/src/lib/services/esolve-notifications.service.ts","../../../../libs/ng-esolve-connect/notifications/src/esolve-ng-esolve-connect-notifications.ts"],"sourcesContent":["import { EsolveUrlTarget } from '@esolve/ng-esolve-connect';\n\nimport { EsolveNotificationButtonActionRecord } from '../interfaces';\n\nexport class EsolveNotificationButtonAction {\n public text = '';\n public url = '';\n public module = '';\n public target: EsolveUrlTarget = '_self';\n\n constructor(record?: EsolveNotificationButtonActionRecord) {\n if (record) {\n this.text = record.text;\n this.url = record.url;\n this.module = record.module;\n this.target = record.target;\n }\n }\n}\n","import { EsolveNotificationDatesRecord } from '../interfaces';\n\nexport class EsolveNotificationDates {\n public from: Date;\n public to: Date;\n\n constructor(record: EsolveNotificationDatesRecord) {\n this.from = new Date(record.from.timestamp * 1000);\n this.to = new Date(record.to.timestamp * 1000);\n }\n}\n","import { EsolveSystemNotificationTypeRecord } from '../interfaces';\nimport {\n EsolveNotificationPosition,\n EsolveNotificationSize,\n EsolveNotificationType,\n} from '../types';\n\nexport class EsolveSystemNotificationType {\n public id = 0;\n public identifier = '';\n public title = '';\n public system_disable_order = false;\n public position: EsolveNotificationPosition;\n public size: EsolveNotificationSize;\n public type: EsolveNotificationType;\n\n constructor(record: EsolveSystemNotificationTypeRecord) {\n this.id = +record.id;\n this.identifier = record.identifier;\n this.title = record.title;\n this.system_disable_order = !!+record.system_disable_order;\n this.type = record.type;\n this.size = record.size;\n this.position = record.position;\n }\n}\n","import { EsolveSystemNotificationRecord } from '../interfaces';\nimport { EsolveNotificationButtonAction } from './esolve-notification-button-action.model';\nimport { EsolveNotificationDates } from './esolve-notification-dates.model';\nimport { EsolveSystemNotificationType } from './esolve-system-notification-type.model';\n\nexport class EsolveSystemNotification {\n public id = 0;\n public identifier = '';\n public title = '';\n public message = '';\n public timeout = 0;\n public display_every = 0;\n public button_actions: EsolveNotificationButtonAction[] = [];\n public type: EsolveSystemNotificationType;\n public dates?: EsolveNotificationDates;\n\n constructor(record: EsolveSystemNotificationRecord) {\n this.id = +record.id;\n this.identifier = record.identifier;\n this.title = record.title;\n this.message = record.message;\n this.timeout = +record.timeout;\n this.display_every = +record.display_every;\n\n this.type = new EsolveSystemNotificationType(record.type);\n\n for (const action of record.button_actions) {\n this.button_actions.push(\n new EsolveNotificationButtonAction(action),\n );\n }\n\n if (record.dates) {\n this.dates = new EsolveNotificationDates(record.dates);\n }\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { HttpClient, HttpParams } from '@angular/common/http';\n\nimport { Observable, map } from 'rxjs';\n\nimport {\n ESOLVE_CONNECT_CONFIG,\n EsolveConnectConfig,\n EsolveGetResponse,\n} from '@esolve/ng-esolve-connect';\n\nimport {\n EsolveSystemNotificationOptions,\n EsolveSystemNotificationRecord,\n} from '../interfaces';\nimport { EsolveSystemNotification } from '../classes';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class EsolveNotificationsService {\n constructor(\n @Inject(ESOLVE_CONNECT_CONFIG) private config: EsolveConnectConfig,\n private http: HttpClient,\n ) {}\n\n public getSystemNotifications(\n options?: EsolveSystemNotificationOptions,\n ): Observable<EsolveSystemNotification[]> {\n let params = new HttpParams();\n\n if (options) {\n if (options.exclude_ids) {\n params = params.set(\n 'exclude_ids',\n options.exclude_ids.join(','),\n );\n }\n }\n\n return this.http\n .get<EsolveGetResponse<EsolveSystemNotificationRecord[]>>(\n `${this.config.api_url}/get-system-notifications.php`,\n { params },\n )\n .pipe(\n map((response) => {\n if (\n response.records === undefined ||\n response.records.length <= 0\n ) {\n throw response;\n }\n\n return this.processNotifications(response.records);\n }),\n );\n }\n\n private processNotifications(\n records: EsolveSystemNotificationRecord[],\n ): EsolveSystemNotification[] {\n const notifications: EsolveSystemNotification[] = [];\n\n for (const record of records) {\n notifications.push(new EsolveSystemNotification(record));\n }\n\n return notifications;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAIa,8BAA8B,CAAA;AAMvC,IAAA,WAAA,CAAY,MAA6C,EAAA;QALlD,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QACV,IAAG,CAAA,GAAA,GAAG,EAAE,CAAC;QACT,IAAM,CAAA,MAAA,GAAG,EAAE,CAAC;QACZ,IAAM,CAAA,MAAA,GAAoB,OAAO,CAAC;AAGrC,QAAA,IAAI,MAAM,EAAE;AACR,YAAA,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;AACxB,YAAA,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;AACtB,YAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC5B,YAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC/B,SAAA;KACJ;AACJ;;MChBY,uBAAuB,CAAA;AAIhC,IAAA,WAAA,CAAY,MAAqC,EAAA;AAC7C,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;AACnD,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;KAClD;AACJ;;MCHY,4BAA4B,CAAA;AASrC,IAAA,WAAA,CAAY,MAA0C,EAAA;QAR/C,IAAE,CAAA,EAAA,GAA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/common';
4
1
  import * as i2 from '@esolve/ng-esolve-connect';
5
2
  import { EsolveSeoInfo, EsolveResponseResult, ESOLVE_CONNECT_CONFIG } from '@esolve/ng-esolve-connect';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable, Inject } from '@angular/core';
6
5
  import * as i1 from '@angular/common/http';
7
6
  import { HttpParams } from '@angular/common/http';
8
7
  import { throwError } from 'rxjs';
9
8
  import { map, catchError } from 'rxjs/operators';
10
9
 
11
- class NgEsolveConnectSurveyModule {
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectSurveyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
13
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectSurveyModule, imports: [CommonModule] }); }
14
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectSurveyModule, imports: [CommonModule] }); }
15
- }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: NgEsolveConnectSurveyModule, decorators: [{
17
- type: NgModule,
18
- args: [{
19
- imports: [CommonModule],
20
- }]
21
- }] });
22
-
23
10
  class EsolveSurveyQuestion {
24
11
  constructor(record) {
25
12
  this.id = record.id;
@@ -300,10 +287,10 @@ class EsolveSurveyService {
300
287
  }
301
288
  return params;
302
289
  }
303
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveSurveyService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1.HttpClient }, { token: i2.EsolveErrorHandlerService }, { token: i2.EsolveResponseHandlerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
304
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveSurveyService, providedIn: 'root' }); }
290
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveSurveyService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1.HttpClient }, { token: i2.EsolveErrorHandlerService }, { token: i2.EsolveResponseHandlerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
291
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveSurveyService, providedIn: 'root' }); }
305
292
  }
306
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: EsolveSurveyService, decorators: [{
293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: EsolveSurveyService, decorators: [{
307
294
  type: Injectable,
308
295
  args: [{
309
296
  providedIn: 'root',
@@ -317,5 +304,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImpor
317
304
  * Generated bundle index. Do not edit.
318
305
  */
319
306
 
320
- export { EsolveSurvey, EsolveSurveyAnswerResult, EsolveSurveyCheckQuestion, EsolveSurveyInputQuestion, EsolveSurveyOptionsQuestion, EsolveSurveyQuestion, EsolveSurveyRadioQuestion, EsolveSurveyRatingQuestion, EsolveSurveySelectQuestion, EsolveSurveyService, EsolveSurveyTextQuestion, EsolveSurveyTextareaQuestion, EsolveSurveyValuesQuestion, NgEsolveConnectSurveyModule };
307
+ export { EsolveSurvey, EsolveSurveyAnswerResult, EsolveSurveyCheckQuestion, EsolveSurveyInputQuestion, EsolveSurveyOptionsQuestion, EsolveSurveyQuestion, EsolveSurveyRadioQuestion, EsolveSurveyRatingQuestion, EsolveSurveySelectQuestion, EsolveSurveyService, EsolveSurveyTextQuestion, EsolveSurveyTextareaQuestion, EsolveSurveyValuesQuestion };
321
308
  //# sourceMappingURL=esolve-ng-esolve-connect-survey.mjs.map