@leanix/components 0.4.556 → 0.4.557
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.
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, Input, Component, signal, ChangeDetectionStrategy, HostBinding, inject, input, computed, EventEmitter, HostListener, Output, Injectable, ElementRef, ViewChild, Inject, model, Directive, Optional, Pipe, NgModule, DestroyRef, ChangeDetectorRef, effect, ContentChild, afterRenderEffect, ContentChildren, ViewChildren, forwardRef, TemplateRef, viewChild, booleanAttribute, SecurityContext, Self, Host } from '@angular/core';
|
3
3
|
import * as i1 from '@ngx-translate/core';
|
4
4
|
import { TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
5
|
-
import { NgTemplateOutlet, NgClass, AsyncPipe,
|
5
|
+
import { NgTemplateOutlet, NgClass, AsyncPipe, UpperCasePipe, DecimalPipe, CommonModule, NgIf, NgFor, formatDate } from '@angular/common';
|
6
6
|
import { toSignal, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
7
7
|
import { IconComponent as IconComponent$1 } from '@ui5/webcomponents-ngx/main/icon';
|
8
8
|
import * as i5 from 'rxjs';
|
@@ -2649,17 +2649,17 @@ class AvatarComponent {
|
|
2649
2649
|
}
|
2650
2650
|
ngOnChanges(changes) {
|
2651
2651
|
const { user } = changes;
|
2652
|
-
if (user && user.currentValue && !user.currentValue
|
2652
|
+
if (user && user.currentValue && !user.currentValue?.technicalUser) {
|
2653
2653
|
const { id, displayName } = this.user || {};
|
2654
2654
|
this.imageURL = this.imageReader.getAvatar(id ?? undefined, this.size, displayName);
|
2655
2655
|
}
|
2656
2656
|
}
|
2657
2657
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AvatarComponent, deps: [{ token: IMAGE_READER }], target: i0.ɵɵFactoryTarget.Component }); }
|
2658
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
2658
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: AvatarComponent, isStandalone: true, selector: "lx-avatar", inputs: { user: "user", size: "size", showMailToLink: "showMailToLink", disabled: "disabled" }, usesOnChanges: true, ngImport: i0, template: "@let image = imageURL | async;\n@let isTechnicalUser = user?.technicalUser;\n@let hasMailToLink = showMailToLink && user?.email;\n\n@if (image) {\n @if (!isTechnicalUser) {\n @if (hasMailToLink) {\n <a class=\"userLink\" href=\"mailto:{{ user?.email }}\" lxTooltip=\"{{ user?.displayName }}\">\n <img\n [src]=\"image\"\n class=\"avatarImage\"\n [class]=\"size\"\n [class.disabled]=\"disabled\"\n role=\"presentation\"\n alt=\"{{ user?.displayName }}\"\n />\n </a>\n } @else {\n <img [src]=\"image\" class=\"avatarImage\" [class]=\"size\" [class.disabled]=\"disabled\" role=\"presentation\" alt=\"{{ user?.displayName }}\" />\n }\n } @else {\n <i class=\"avatarImage fas fa-robot\" lxTooltip=\"{{ user?.displayName }}\" [class]=\"size\" [class.disabled]=\"disabled\"></i>\n }\n} @else {\n <div class=\"avatarImage userLink loading\" [class]=\"size\"></div>\n}\n", styles: [".userLink{display:inline-block;width:fit-content;height:fit-content}.avatarImage{border-radius:50%}.avatarImage.disabled{opacity:.4}.loading{background:linear-gradient(270deg,#ccc,#eee,#ccc);background-size:200% 100%;animation:loading 1.5s infinite;object-fit:cover;vertical-align:middle}@keyframes loading{0%{background-position:200% 0}to{background-position:-200% 0}}.fa-robot{background-color:#b2bccc;color:#fff;vertical-align:middle;text-align:center}.fa-robot.XS{line-height:14px;font-size:10px}.fa-robot.S{line-height:22px;font-size:13px}.fa-robot.M{line-height:30px;font-size:18px}.fa-robot.L{line-height:38px;font-size:22px}.fa-robot.XL{line-height:62px;font-size:40px}.XS{width:16px;max-width:16px;height:16px;max-height:16px}.S{width:24px;max-width:24px;height:24px;max-height:24px}.M{width:32px;max-width:32px;height:32px;max-height:32px}.L{width:40px;max-width:40px;height:40px;max-height:40px}.XL{width:64px;max-width:64px;height:64px;max-height:64px}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: TooltipDirective, selector: "[lxTooltip]", inputs: ["lxTooltip", "lxTooltipPosition", "lxTooltipDelay", "lxTooltipIsHtmlContent"] }] }); }
|
2659
2659
|
}
|
2660
2660
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AvatarComponent, decorators: [{
|
2661
2661
|
type: Component,
|
2662
|
-
args: [{ selector: 'lx-avatar', imports: [
|
2662
|
+
args: [{ selector: 'lx-avatar', imports: [AsyncPipe, TooltipDirective], template: "@let image = imageURL | async;\n@let isTechnicalUser = user?.technicalUser;\n@let hasMailToLink = showMailToLink && user?.email;\n\n@if (image) {\n @if (!isTechnicalUser) {\n @if (hasMailToLink) {\n <a class=\"userLink\" href=\"mailto:{{ user?.email }}\" lxTooltip=\"{{ user?.displayName }}\">\n <img\n [src]=\"image\"\n class=\"avatarImage\"\n [class]=\"size\"\n [class.disabled]=\"disabled\"\n role=\"presentation\"\n alt=\"{{ user?.displayName }}\"\n />\n </a>\n } @else {\n <img [src]=\"image\" class=\"avatarImage\" [class]=\"size\" [class.disabled]=\"disabled\" role=\"presentation\" alt=\"{{ user?.displayName }}\" />\n }\n } @else {\n <i class=\"avatarImage fas fa-robot\" lxTooltip=\"{{ user?.displayName }}\" [class]=\"size\" [class.disabled]=\"disabled\"></i>\n }\n} @else {\n <div class=\"avatarImage userLink loading\" [class]=\"size\"></div>\n}\n", styles: [".userLink{display:inline-block;width:fit-content;height:fit-content}.avatarImage{border-radius:50%}.avatarImage.disabled{opacity:.4}.loading{background:linear-gradient(270deg,#ccc,#eee,#ccc);background-size:200% 100%;animation:loading 1.5s infinite;object-fit:cover;vertical-align:middle}@keyframes loading{0%{background-position:200% 0}to{background-position:-200% 0}}.fa-robot{background-color:#b2bccc;color:#fff;vertical-align:middle;text-align:center}.fa-robot.XS{line-height:14px;font-size:10px}.fa-robot.S{line-height:22px;font-size:13px}.fa-robot.M{line-height:30px;font-size:18px}.fa-robot.L{line-height:38px;font-size:22px}.fa-robot.XL{line-height:62px;font-size:40px}.XS{width:16px;max-width:16px;height:16px;max-height:16px}.S{width:24px;max-width:24px;height:24px;max-height:24px}.M{width:32px;max-width:32px;height:32px;max-height:32px}.L{width:40px;max-width:40px;height:40px;max-height:40px}.XL{width:64px;max-width:64px;height:64px;max-height:64px}\n"] }]
|
2663
2663
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
2664
2664
|
type: Inject,
|
2665
2665
|
args: [IMAGE_READER]
|