@tilde-nlp/ngx-common 8.1.19 → 8.1.21

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.
@@ -9086,6 +9086,40 @@ const translations = {
9086
9086
  },
9087
9087
  };
9088
9088
 
9089
+ class MatomoService {
9090
+ setCookies() {
9091
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9092
+ window['_paq'].push(['setCookieConsentGiven']);
9093
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9094
+ window['_paq'].push(['rememberCookieConsentGiven']);
9095
+ }
9096
+ static { this.ɵfac = function MatomoService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MatomoService)(); }; }
9097
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MatomoService, factory: MatomoService.ɵfac, providedIn: 'root' }); }
9098
+ }
9099
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatomoService, [{
9100
+ type: Injectable,
9101
+ args: [{
9102
+ providedIn: 'root',
9103
+ }]
9104
+ }], null, null); })();
9105
+
9106
+ class AnalyticsService {
9107
+ #matomo = inject(MatomoService);
9108
+ cookieConsentGiven(approved) {
9109
+ if (approved) {
9110
+ this.#matomo.setCookies();
9111
+ }
9112
+ }
9113
+ static { this.ɵfac = function AnalyticsService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AnalyticsService)(); }; }
9114
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AnalyticsService, factory: AnalyticsService.ɵfac, providedIn: 'root' }); }
9115
+ }
9116
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AnalyticsService, [{
9117
+ type: Injectable,
9118
+ args: [{
9119
+ providedIn: 'root',
9120
+ }]
9121
+ }], null, null); })();
9122
+
9089
9123
  function CookieConsentComponent_Conditional_0_Conditional_19_Template(rf, ctx) { if (rf & 1) {
9090
9124
  i0.ɵɵelementStart(0, "mat-icon", 9);
9091
9125
  i0.ɵɵtext(1);
@@ -9269,12 +9303,14 @@ function CookieConsentComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
9269
9303
  } }
9270
9304
  class CookieConsentComponent {
9271
9305
  constructor() {
9306
+ this.#analytics = inject(AnalyticsService);
9272
9307
  this.#translate = inject(TranslateService);
9273
9308
  this.isClosed = false;
9274
9309
  this.isDetailsVisible = false;
9275
9310
  this.#COOKIE_CONSENT_ACCEPTED_KEY = 'cookie-consent-accepted';
9276
9311
  this.#COOKIE_CONSENT_DECLINED_KEY = 'cookie-consent-declined';
9277
9312
  }
9313
+ #analytics;
9278
9314
  #translate;
9279
9315
  #COOKIE_CONSENT_ACCEPTED_KEY;
9280
9316
  #COOKIE_CONSENT_DECLINED_KEY;
@@ -9296,10 +9332,7 @@ class CookieConsentComponent {
9296
9332
  }
9297
9333
  accept() {
9298
9334
  this.isClosed = true;
9299
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9300
- window['_paq'].push(['setCookieConsentGiven']);
9301
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9302
- window['_paq'].push(['rememberCookieConsentGiven']);
9335
+ this.#analytics.cookieConsentGiven(true);
9303
9336
  localStorage.setItem(this.#COOKIE_CONSENT_ACCEPTED_KEY, 'true');
9304
9337
  }
9305
9338
  decline() {
@@ -9329,7 +9362,7 @@ class CookieConsentComponent {
9329
9362
  }], privacyPolicyUrl: [{
9330
9363
  type: Input
9331
9364
  }] }); })();
9332
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CookieConsentComponent, { className: "CookieConsentComponent", filePath: "lib/analytics/cookie-consent/cookie-consent.component.ts", lineNumber: 14 }); })();
9365
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CookieConsentComponent, { className: "CookieConsentComponent", filePath: "lib/analytics/cookie-consent/cookie-consent.component.ts", lineNumber: 15 }); })();
9333
9366
 
9334
9367
  /*
9335
9368
  * Public API Surface of ngx-common
@@ -9339,5 +9372,5 @@ class CookieConsentComponent {
9339
9372
  * Generated bundle index. Do not edit.
9340
9373
  */
9341
9374
 
9342
- export { ALERT_CONFIGURATION_TOKEN, AccessibilityContrasts, AccessibilityDialogComponent, AccessibilityFontSizes, AccessibilityService, AccessibilityTextMagnifierService, AlertService, AuthHeadersHelper, COLLECTIONS_MENU, CUSTOM_TITLE_CONFIGURATION_TOKEN, ClickOutsideDirective, ClickOutsideModule, CloseButtonComponent, CloseButtonModule, CombinedCollection, CombinedCollectionTooltipKey, CompanyProductComponent, CompanyProductModule, Confirmation, ConfirmationModalComponent, ConfirmationModalModule, ConfirmationService, ConversionHelper, CookieConsentComponent, CustomPaginatorInernationalizationHelper, CustomTitleStrategyService, CustomTranslateLoader, DISABLE_EXPORT_ATTRIBUTE_NAME, DOMService, DateAgoModule, DateAgoPipe, DomainTranslatePipe, DragAndDropDirective, DragAndDropModule, ERROR_CODES, EngineTermApiService, EngineTermCollectionScope, EngineTermCollectionSource, EngineTermCollectionStatus, EngineTermCollectionSubStatus, ExportFormat, ExtensionDialogComponent, ExtensionDialogModule, ExtensionDialogService, FILE_SIZE_UNIT, FileCategories, FileExtensionHelper, FileExtensions, FileSizeLabelPipe, FileTypeIcons, FileTypes, FileUploadComponent, FileUploadErrorTypeEnum, FileUploadModule, FilterBarComponent, FilterBarModule, FilterWithHighlightModule, FilterWithHighlightPipe, FooterComponent, FooterModule, GlobalMessageComponent, HashHelper, HtmlElementParseHelper, HtmlHelper, IconService, InlineMessageComponent, InlineMessageIconPosition, InlineMessageModule, InlineMessageType, LAST_USED_SYSTEM_LOCAL_STORAGE_KEY, LLMActions, LLMComponent, LLMModule, LLM_CONFIGURATION_TOKEN, LanguageTranslateModule, LanguageTranslatePipe, LanguageTranslateService, MatButtonLoadingDirective, MatButtonLoadingModule, MissingTranslationHandlerService, MissingTranslationHelper, MtCollectionStatus, MultiFunctionalTableComponent, MultiFunctionalTableModule, NewFeatureDialogWrapperComponent, NotificationMessageComponent, NotificationMessageModule, NotificationMessageType, NotificationService, OPEN_CLOSE_BTN_ICONS_TOKEN, ObjectLengthModule, ObjectLengthPipe, OpenCloseButtonComponent, OpenCloseButtonModule, OpenExtensionDialogComponent, Operations, PlausibleEventDirective, PlausibleHelper, PlausibleModule, ResolutionHelper, SCREEN_SIZE, SaveFileHelper, SelectLanguageDialogComponent, SidebarComponent, SidebarService, SortAlphabeticallyModule, SortAlphabeticallyPipe, SortByNumberPipe, SortDomainsPipe, SortHelper, SortLanguageListPipe, SortTranslationsByPropertyModule, SortTranslationsByPropertyPipe, SortTranslationsModule, SortTranslationsPipe, StatusDisplayComponent, StatusDisplayModule, SubscriptionComponent, SubscriptionPlan, SystemService, TerminologyApiService, TerminologyCollectionService, TerminologyComponent, TerminologyConfigService, TerminologyCreateCollectionComponent, TerminologyModule, TerminologyService, TextToSpeechComponent, TldLoaderComponent, TldLoaderModule, ToastComponent, ToastService, getFileSizeLabel, provideCustomTitleStrategy };
9375
+ export { ALERT_CONFIGURATION_TOKEN, AccessibilityContrasts, AccessibilityDialogComponent, AccessibilityFontSizes, AccessibilityService, AccessibilityTextMagnifierService, AlertService, AnalyticsService, AuthHeadersHelper, COLLECTIONS_MENU, CUSTOM_TITLE_CONFIGURATION_TOKEN, ClickOutsideDirective, ClickOutsideModule, CloseButtonComponent, CloseButtonModule, CombinedCollection, CombinedCollectionTooltipKey, CompanyProductComponent, CompanyProductModule, Confirmation, ConfirmationModalComponent, ConfirmationModalModule, ConfirmationService, ConversionHelper, CookieConsentComponent, CustomPaginatorInernationalizationHelper, CustomTitleStrategyService, CustomTranslateLoader, DISABLE_EXPORT_ATTRIBUTE_NAME, DOMService, DateAgoModule, DateAgoPipe, DomainTranslatePipe, DragAndDropDirective, DragAndDropModule, ERROR_CODES, EngineTermApiService, EngineTermCollectionScope, EngineTermCollectionSource, EngineTermCollectionStatus, EngineTermCollectionSubStatus, ExportFormat, ExtensionDialogComponent, ExtensionDialogModule, ExtensionDialogService, FILE_SIZE_UNIT, FileCategories, FileExtensionHelper, FileExtensions, FileSizeLabelPipe, FileTypeIcons, FileTypes, FileUploadComponent, FileUploadErrorTypeEnum, FileUploadModule, FilterBarComponent, FilterBarModule, FilterWithHighlightModule, FilterWithHighlightPipe, FooterComponent, FooterModule, GlobalMessageComponent, HashHelper, HtmlElementParseHelper, HtmlHelper, IconService, InlineMessageComponent, InlineMessageIconPosition, InlineMessageModule, InlineMessageType, LAST_USED_SYSTEM_LOCAL_STORAGE_KEY, LLMActions, LLMComponent, LLMModule, LLM_CONFIGURATION_TOKEN, LanguageTranslateModule, LanguageTranslatePipe, LanguageTranslateService, MatButtonLoadingDirective, MatButtonLoadingModule, MatomoService, MissingTranslationHandlerService, MissingTranslationHelper, MtCollectionStatus, MultiFunctionalTableComponent, MultiFunctionalTableModule, NewFeatureDialogWrapperComponent, NotificationMessageComponent, NotificationMessageModule, NotificationMessageType, NotificationService, OPEN_CLOSE_BTN_ICONS_TOKEN, ObjectLengthModule, ObjectLengthPipe, OpenCloseButtonComponent, OpenCloseButtonModule, OpenExtensionDialogComponent, Operations, PlausibleEventDirective, PlausibleHelper, PlausibleModule, ResolutionHelper, SCREEN_SIZE, SaveFileHelper, SelectLanguageDialogComponent, SidebarComponent, SidebarService, SortAlphabeticallyModule, SortAlphabeticallyPipe, SortByNumberPipe, SortDomainsPipe, SortHelper, SortLanguageListPipe, SortTranslationsByPropertyModule, SortTranslationsByPropertyPipe, SortTranslationsModule, SortTranslationsPipe, StatusDisplayComponent, StatusDisplayModule, SubscriptionComponent, SubscriptionPlan, SystemService, TerminologyApiService, TerminologyCollectionService, TerminologyComponent, TerminologyConfigService, TerminologyCreateCollectionComponent, TerminologyModule, TerminologyService, TextToSpeechComponent, TldLoaderComponent, TldLoaderModule, ToastComponent, ToastService, getFileSizeLabel, provideCustomTitleStrategy };
9343
9376
  //# sourceMappingURL=tilde-nlp-ngx-common.mjs.map