@tilde-nlp/ngx-common 8.1.15 → 8.1.16
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.
|
@@ -335,7 +335,7 @@ class NotificationMessageComponent {
|
|
|
335
335
|
i0.ɵɵadvance();
|
|
336
336
|
i0.ɵɵclassProp("inline", ctx.inline);
|
|
337
337
|
i0.ɵɵproperty("ngClass.lt-md", "mobile");
|
|
338
|
-
i0.ɵɵattribute("id", ctx.message.id);
|
|
338
|
+
i0.ɵɵattribute("id", ctx.message == null ? null : ctx.message.id);
|
|
339
339
|
i0.ɵɵadvance(2);
|
|
340
340
|
i0.ɵɵtextInterpolate1(" ", ctx.iconNames[ctx.message.type], " ");
|
|
341
341
|
i0.ɵɵadvance(4);
|
|
@@ -352,7 +352,7 @@ class NotificationMessageComponent {
|
|
|
352
352
|
}
|
|
353
353
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationMessageComponent, [{
|
|
354
354
|
type: Component,
|
|
355
|
-
args: [{ selector: 'lib-tld-notification-message', standalone: false, template: "<div class=\"notification-message {{className}}\">\r\n <div class=\"notification-message-container tld-default-border\" [ngClass.lt-md]=\"'mobile'\" [class.inline]=\"inline\"\r\n fxLayout=\"row\" fxLayoutAlign=\"start start\" [attr.id]=\"message
|
|
355
|
+
args: [{ selector: 'lib-tld-notification-message', standalone: false, template: "<div class=\"notification-message {{className}}\">\r\n <div class=\"notification-message-container tld-default-border\" [ngClass.lt-md]=\"'mobile'\" [class.inline]=\"inline\"\r\n fxLayout=\"row\" fxLayoutAlign=\"start start\" [attr.id]=\"message?.id\" aria-live=\"polite\" fxLayout=\"row\">\r\n <span class=\"material-icons-outlined message-icon\">\r\n {{iconNames[message.type]}}\r\n </span>\r\n <div class=\"items-container\" fxFlex>\r\n <div fxLayout=\"row\">\r\n <div class=\"text-container\" fxFlex>\r\n <p *ngIf=\"message.title\" class=\"message-title\"\r\n [innerHtml]=\"message.title | translate: message.localizationParams\"></p>\r\n <p *ngIf=\"message.body\" class=\"message-body\">\r\n <span [innerHtml]=\"message.body | translate: message.localizationParams\"></span>\r\n <span *ngIf=\"message.support\" [innerHtml]=\"message.support | translate: message.localizationParams\"></span>\r\n </p>\r\n </div>\r\n <button\r\n *ngIf=\"message.callbackButtonText\"\r\n color=\"accent\"\r\n mat-stroked-button\r\n class=\"callback-button\"\r\n (click)=\"message?.callbackButtonClick()\"\r\n >\r\n <mat-icon *ngIf=\"message.callbackButtonIcon\">{{message.callbackButtonIcon}}</mat-icon>\r\n {{ message.callbackButtonText | translate }}\r\n </button>\r\n <tld-close-button *ngIf=\"!message.hideClose && !message.callbackButtonText\" class=\"close-button\" [class.no-top-margin]=\"!message.title || !message.body\" (tldClick)=\"closeClick()\">\r\n </tld-close-button>\r\n </div>\r\n <div fxLayout=\"row\" fxLayoutGap=\"16px\" fxLayoutAlign=\"start center\"\r\n *ngIf=\"message.buttonText || message.linkHref || message.routerLink\">\r\n <button class=\"message-action-button\" color=\"accent\" mat-flat-button *ngIf=\"message.buttonText\"\r\n (click)=\"buttonClick()\">{{message.buttonText | translate}} </button>\r\n <a class=\"message-action-link\" *ngIf=\"message.linkHref && message.linkText\" (click)=\"linkClick()\"\r\n [attr.href]=\"message.linkHref\">{{message.linkText |\r\n translate}}</a>\r\n <a class=\"message-action-link\" *ngIf=\"message.routerLink && message.linkText\" (click)=\"linkClick()\"\r\n [routerLink]=\"[message.routerLink]\">{{message.linkText |\r\n translate}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:inline-block;width:100%}.close-button{position:absolute;top:.2em!important;right:.2em!important}.no-top-margin{top:0}.text-container{margin-right:45px}.notification-message{position:relative}.notification-message.basic{color:var(--base-30)}.notification-message.basic .notification-message-container{background-color:var(--base-95)}.notification-message.basic .notification-message-container .close-button,.notification-message.basic .notification-message-container .message-icon{color:var(--base-40)}.notification-message.basic .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.info .notification-message-container{background-color:var(--info-light)}.notification-message.info .notification-message-container .text-container{color:var(--info-dark)}.notification-message.info .notification-message-container .message-icon{color:var(--info-primary)}.notification-message.info .notification-message-container .close-button{color:var(--info-dark)}.notification-message.info .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.error .notification-message-container{background-color:var(--error-light)}.notification-message.error .notification-message-container .close-button,.notification-message.error .notification-message-container .text-container,.notification-message.error .notification-message-container .message-icon{color:var(--error-dark)}.notification-message.error .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.warning .notification-message-container{background-color:var(--warning-light)}.notification-message.warning .notification-message-container .close-button,.notification-message.warning .notification-message-container .text-container,.notification-message.warning .notification-message-container .message-icon{color:var(--warning-dark)}.notification-message.warning .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message.success .notification-message-container{background-color:var(--success-light)}.notification-message.success .notification-message-container .close-button,.notification-message.success .notification-message-container .text-container,.notification-message.success .notification-message-container .message-icon{color:var(--success-dark)}.notification-message.success .notification-message-container .message-action-button{background-color:var(--base-40)}.notification-message .notification-message-container{border-radius:4px}.notification-message .notification-message-container .text-container:has(.message-title+.message-body) .message-title{font-weight:600}.notification-message .notification-message-container.mobile{padding:.6em .4em!important;border-radius:0}.notification-message .notification-message-container.mobile .items-container{margin-left:.4em!important}.notification-message .notification-message-container.mobile .items-container div+div{margin-top:.2em!important}.notification-message .notification-message-container.mobile .items-container .message-title+.message-body{margin-top:0!important}.notification-message .notification-message-container .text-container:first-child{line-height:1.5em}.notification-message .notification-message-container .text-container .message-title{margin:0;font-size:1rem;line-height:24px}.notification-message .notification-message-container .text-container .message-body{margin:0}.notification-message .notification-message-container:not(.inline){padding:1em}.notification-message .notification-message-container:not(.inline) .items-container{margin-left:1em}.notification-message .notification-message-container:not(.inline) .message-title{font-size:1.25em}.notification-message .notification-message-container:not(.inline) .message-body{line-height:1.5em}.notification-message .notification-message-container.inline{padding:.75em 1em}.notification-message .notification-message-container.inline .items-container{margin-left:.75em}.notification-message .notification-message-container.inline .items-container div+div{margin-top:.5em}.notification-message .notification-message-container.inline .items-container .message-title+.message-body{margin-top:.2em}.notification-message .notification-message-container.inline .message-title{font-size:1em}\n"] }]
|
|
356
356
|
}], null, { message: [{
|
|
357
357
|
type: Input
|
|
358
358
|
}], buttonClicked: [{
|
|
@@ -7902,7 +7902,7 @@ class CustomTitleStrategyService extends TitleStrategy {
|
|
|
7902
7902
|
this.title = inject(Title);
|
|
7903
7903
|
this.appName = "APP_NAME";
|
|
7904
7904
|
this.owner = "OWNER";
|
|
7905
|
-
this.#config = inject(CUSTOM_TITLE_CONFIGURATION_TOKEN);
|
|
7905
|
+
this.#config = inject(CUSTOM_TITLE_CONFIGURATION_TOKEN, { optional: true });
|
|
7906
7906
|
}
|
|
7907
7907
|
updateTitle(snapshot) {
|
|
7908
7908
|
if (this.subscription) {
|
|
@@ -7916,7 +7916,7 @@ class CustomTitleStrategyService extends TitleStrategy {
|
|
|
7916
7916
|
this.subscription = this.#translateService.stream(translationKeys, { appName: this.appName }).subscribe((translations) => {
|
|
7917
7917
|
let translatedTitle = `${translations[this.owner]} ${translations[this.appName]}`;
|
|
7918
7918
|
if (title && translations[title]) {
|
|
7919
|
-
translatedTitle = this.#config
|
|
7919
|
+
translatedTitle = this.#config?.isPageTitleFirst ?? false
|
|
7920
7920
|
? `${translations[title]} | ${translatedTitle}`
|
|
7921
7921
|
: `${translatedTitle} | ${translations[title]}`;
|
|
7922
7922
|
}
|