@assecosolutions/fox-avatar
Advanced tools
Comparing version 1.11.8-beta.0 to 1.11.8-beta.1
12
index.js
@@ -1605,5 +1605,6 @@ import { css, LitElement, html as html$2 } from 'lit'; | ||
this.icon = 'person'; | ||
this.initials = ''; | ||
} | ||
render() { | ||
if (this.image) this.checkImage(); | ||
this.checkImage(); | ||
return html$2(_t || (_t = _` ${0} `), this.image ? this.renderImage() : this.renderLabel()); | ||
@@ -1622,5 +1623,7 @@ } | ||
renderLabel() { | ||
return this.name ? html$2(_t3 || (_t3 = _`<h3>${0}</h3>`), this.renderInitials()) : html$2(_t4 || (_t4 = _`<fox-icon icon="${0}"></fox-icon>`), this.icon); | ||
return this.name || this.initials ? html$2(_t3 || (_t3 = _`<h3> | ||
${0} | ||
</h3>`), this.initials ? this.initials.slice(0, 3) : this.getInitialsFromName()) : html$2(_t4 || (_t4 = _`<fox-icon icon="${0}"></fox-icon>`), this.icon); | ||
} | ||
renderInitials() { | ||
getInitialsFromName() { | ||
let initials = ''; | ||
@@ -1665,2 +1668,5 @@ this.name.split(' ', 2).forEach(element => { | ||
}), __metadata("design:type", Object)], FoxAvatar.prototype, "icon", void 0); | ||
__decorate([property({ | ||
type: String | ||
}), __metadata("design:type", Object)], FoxAvatar.prototype, "initials", void 0); | ||
const name = 'fox-avatar'; | ||
@@ -1667,0 +1673,0 @@ if (!customElements.get(name)) { |
{ | ||
"name": "@assecosolutions/fox-avatar", | ||
"version": "1.11.8-beta.0", | ||
"version": "1.11.8-beta.1", | ||
"public": true, | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -48,6 +48,7 @@ import { LitElement } from 'lit'; | ||
icon: string; | ||
initials: string; | ||
protected render(): import("lit-html").TemplateResult<1>; | ||
protected renderImage(): import("lit-html").TemplateResult<1>; | ||
protected renderLabel(): import("lit-html").TemplateResult<1>; | ||
protected renderInitials(): import("lit-html").TemplateResult<1>; | ||
protected getInitialsFromName(): import("lit-html").TemplateResult<1>; | ||
protected checkImage(): void; | ||
@@ -54,0 +55,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63115
1476