@tilde-nlp/ngx-common 8.1.18 → 8.1.20
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,26 @@ const translations = {
|
|
|
9086
9086
|
},
|
|
9087
9087
|
};
|
|
9088
9088
|
|
|
9089
|
+
class AnalyticsService {
|
|
9090
|
+
constructor() {
|
|
9091
|
+
this.cookieConsentSubject = new Subject();
|
|
9092
|
+
}
|
|
9093
|
+
getCookieConsent() {
|
|
9094
|
+
return this.cookieConsentSubject.asObservable();
|
|
9095
|
+
}
|
|
9096
|
+
cookieConsentGiven(approved) {
|
|
9097
|
+
this.cookieConsentSubject.next(approved);
|
|
9098
|
+
}
|
|
9099
|
+
static { this.ɵfac = function AnalyticsService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AnalyticsService)(); }; }
|
|
9100
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AnalyticsService, factory: AnalyticsService.ɵfac, providedIn: 'root' }); }
|
|
9101
|
+
}
|
|
9102
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AnalyticsService, [{
|
|
9103
|
+
type: Injectable,
|
|
9104
|
+
args: [{
|
|
9105
|
+
providedIn: 'root',
|
|
9106
|
+
}]
|
|
9107
|
+
}], null, null); })();
|
|
9108
|
+
|
|
9089
9109
|
function CookieConsentComponent_Conditional_0_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
9090
9110
|
i0.ɵɵelementStart(0, "mat-icon", 9);
|
|
9091
9111
|
i0.ɵɵtext(1);
|
|
@@ -9269,12 +9289,14 @@ function CookieConsentComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
9269
9289
|
} }
|
|
9270
9290
|
class CookieConsentComponent {
|
|
9271
9291
|
constructor() {
|
|
9292
|
+
this.#analytics = inject(AnalyticsService);
|
|
9272
9293
|
this.#translate = inject(TranslateService);
|
|
9273
9294
|
this.isClosed = false;
|
|
9274
9295
|
this.isDetailsVisible = false;
|
|
9275
9296
|
this.#COOKIE_CONSENT_ACCEPTED_KEY = 'cookie-consent-accepted';
|
|
9276
9297
|
this.#COOKIE_CONSENT_DECLINED_KEY = 'cookie-consent-declined';
|
|
9277
9298
|
}
|
|
9299
|
+
#analytics;
|
|
9278
9300
|
#translate;
|
|
9279
9301
|
#COOKIE_CONSENT_ACCEPTED_KEY;
|
|
9280
9302
|
#COOKIE_CONSENT_DECLINED_KEY;
|
|
@@ -9282,7 +9304,7 @@ class CookieConsentComponent {
|
|
|
9282
9304
|
const script = document.createElement('script');
|
|
9283
9305
|
script.async = true;
|
|
9284
9306
|
script.defer = true;
|
|
9285
|
-
script.innerHTML = this.script
|
|
9307
|
+
script.innerHTML = this.script;
|
|
9286
9308
|
document.body.appendChild(script);
|
|
9287
9309
|
if (this.isCookieConsentConfigured()) {
|
|
9288
9310
|
this.isClosed = true;
|
|
@@ -9296,8 +9318,7 @@ class CookieConsentComponent {
|
|
|
9296
9318
|
}
|
|
9297
9319
|
accept() {
|
|
9298
9320
|
this.isClosed = true;
|
|
9299
|
-
|
|
9300
|
-
window['_mtm'].push(['setCookieConsentGiven']);
|
|
9321
|
+
this.#analytics.cookieConsentGiven(true);
|
|
9301
9322
|
localStorage.setItem(this.#COOKIE_CONSENT_ACCEPTED_KEY, 'true');
|
|
9302
9323
|
}
|
|
9303
9324
|
decline() {
|
|
@@ -9313,7 +9334,7 @@ class CookieConsentComponent {
|
|
|
9313
9334
|
return isAccepted || isDeclined;
|
|
9314
9335
|
}
|
|
9315
9336
|
static { this.ɵfac = function CookieConsentComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CookieConsentComponent)(); }; }
|
|
9316
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CookieConsentComponent, selectors: [["lib-cookie-consent"]], inputs: { script: "script",
|
|
9337
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CookieConsentComponent, selectors: [["lib-cookie-consent"]], inputs: { script: "script", privacyPolicyUrl: "privacyPolicyUrl" }, decls: 1, vars: 1, consts: [[1, "cookie-consent-container"], [1, "cookie-consent-content"], [1, "cookie-consent-description", 3, "innerHTML"], [1, "cookie-consent-actions"], ["mat-flat-button", "", 3, "click"], ["mat-stroked-button", "", 3, "click"], [1, "cookie-consent-info"], [1, "cookie-consent-info--privacy", 3, "href"], [1, "cookie-consent-info--details", 3, "click"], [1, "spin"], [1, "cookie-consent--details"]], template: function CookieConsentComponent_Template(rf, ctx) { if (rf & 1) {
|
|
9317
9338
|
i0.ɵɵconditionalCreate(0, CookieConsentComponent_Conditional_0_Template, 90, 79, "section", 0);
|
|
9318
9339
|
} if (rf & 2) {
|
|
9319
9340
|
i0.ɵɵconditional(!ctx.isClosed ? 0 : -1);
|
|
@@ -9324,12 +9345,10 @@ class CookieConsentComponent {
|
|
|
9324
9345
|
args: [{ selector: 'lib-cookie-consent', imports: [TranslateModule, MatButtonModule, MatIconModule, MatCheckboxModule], template: "@if (!isClosed) {\r\n<section class=\"cookie-consent-container\">\r\n\t<div class=\"cookie-consent-content\">\r\n\t\t<div class=\"cookie-consent-description\" [innerHTML]=\"'COOKIE_CONSENT.DESCRIPTION' | translate\"></div>\r\n\r\n\t\t<div class=\"cookie-consent-actions\">\r\n\t\t\t<button mat-flat-button (click)=\"accept()\">{{ \"COOKIE_CONSENT.ACCEPT\" | translate }}</button>\r\n\t\t\t<button mat-stroked-button (click)=\"decline()\">{{ \"COOKIE_CONSENT.DECLINE\" | translate }}</button>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"cookie-consent-info\">\r\n\t\t\t<a [href]=\"privacyPolicyUrl\" class=\"cookie-consent-info--privacy\">{{ \"COOKIE_CONSENT.PRIVACY\" | translate }}</a>\r\n\t\t\t|\r\n\t\t\t<button class=\"cookie-consent-info--details\" (click)=\"toggleDetails()\">\r\n\t\t\t\t{{ \"COOKIE_CONSENT.DETAILS\" | translate }}\r\n\r\n\t\t\t\t@if (isDetailsVisible) {\r\n\t\t\t\t<mat-icon class=\"spin\">{{ \"keyboard_arrow_down\" }}</mat-icon>\r\n\t\t\t\t} @else {\r\n\t\t\t\t<mat-icon class=\"spin\">{{ \"keyboard_arrow_up\" }}</mat-icon>\r\n\t\t\t\t}\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class=\"cookie-consent--details\" [class.cookie-consent--details-hidden]=\"!isDetailsVisible\">\r\n\t\t<table>\r\n\t\t\t<thead>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>{{ \"COOKIE_CONSENT.MORE_INFORMATION.NAME\" | translate }}</th>\r\n\t\t\t\t\t<th>{{ \"COOKIE_CONSENT.MORE_INFORMATION.PURPOSE\" | translate }}</th>\r\n\t\t\t\t\t<th>{{ \"COOKIE_CONSENT.MORE_INFORMATION.CATEGORY\" | translate }}</th>\r\n\t\t\t\t\t<th>{{ \"COOKIE_CONSENT.MORE_INFORMATION.DURATION\" | translate }}</th>\r\n\t\t\t\t</tr>\r\n\t\t\t</thead>\r\n\t\t\t<tbody>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.ALLOW_COOKIES\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.ALLOW_COOKIES_PURPOSE\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.FUNCTIONAL_COOKIES\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.ONE_YEAR\" | translate }}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.CULTURE\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.CULTURE_PURPOSE\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.FUNCTIONAL_COOKIES\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.ONE_MONTH\" | translate }}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.PK_ID\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.PK_ID_PURPOSE\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.ANALYTICAL_COOKIES\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.THIRTEEN_MONTHS\" | translate }}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.PK_SES\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.PK_SES_PURPOSE\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.SESSION_COOKIES\" | translate }}</td>\r\n\t\t\t\t\t<td>{{ \"COOKIE_CONSENT.MORE_INFORMATION.THIRTY_MINUTES\" | translate }}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</tbody>\r\n\t\t</table>\r\n\t</div>\r\n</section>\r\n\r\n}\r\n", styles: [".spin{animation:spinArrow .3s forwards}@keyframes spinArrow{to{transform:rotate(180deg)}}button{min-width:170px}tr{border-bottom:1px solid var(--base-65)}.cookie-consent-container{position:fixed;bottom:0;width:100%;background-color:var(--base-100);box-shadow:0 -2px 5px #0000001a;padding:25px;z-index:1000;display:flex;flex-direction:column;align-items:center;justify-content:center}.cookie-consent-content{max-width:800px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:20px}.cookie-consent-description{color:var(--base-30)}.cookie-consent-actions{display:flex;gap:10px}.cookie-consent-info{display:flex;gap:16px;font-weight:700;font-size:14px}.cookie-consent-info--privacy,.cookie-consent-info--details{color:var(--base-30)!important}.cookie-consent-info--details{display:flex;align-items:center;gap:10px}table{margin-top:20px;color:var(--base-30)}th,td{padding:10px 20px}th{text-align:start}.cookie-consent--details{max-height:245px;transition:max-height .2s ease-in}.cookie-consent--details-hidden{max-height:0;transition:max-height .2s ease-out;overflow:hidden}@media (max-width: 600px){.cookie-consent-container{padding:15px}.cookie-consent-content{gap:15px}.cookie-consent-actions{flex-direction:column;width:100%}button{width:100%}.cookie-consent--details{max-width:100vw;overflow:auto}.cookie-consent-info--details{gap:0}.cookie-consent-info--details mat-icon{display:none}th,td{padding:2px 4px}}.cookie-consent-configuration-description{color:var(--base-40)}mat-checkbox{width:100%;text-align:start}\n"] }]
|
|
9325
9346
|
}], null, { script: [{
|
|
9326
9347
|
type: Input
|
|
9327
|
-
}], scriptSrc: [{
|
|
9328
|
-
type: Input
|
|
9329
9348
|
}], privacyPolicyUrl: [{
|
|
9330
9349
|
type: Input
|
|
9331
9350
|
}] }); })();
|
|
9332
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CookieConsentComponent, { className: "CookieConsentComponent", filePath: "lib/analytics/cookie-consent/cookie-consent.component.ts", lineNumber:
|
|
9351
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CookieConsentComponent, { className: "CookieConsentComponent", filePath: "lib/analytics/cookie-consent/cookie-consent.component.ts", lineNumber: 15 }); })();
|
|
9333
9352
|
|
|
9334
9353
|
/*
|
|
9335
9354
|
* Public API Surface of ngx-common
|
|
@@ -9339,5 +9358,5 @@ class CookieConsentComponent {
|
|
|
9339
9358
|
* Generated bundle index. Do not edit.
|
|
9340
9359
|
*/
|
|
9341
9360
|
|
|
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 };
|
|
9361
|
+
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, 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
9362
|
//# sourceMappingURL=tilde-nlp-ngx-common.mjs.map
|