From c6cf1054ef0e54722298e807b0b5cf8db6a59415 Mon Sep 17 00:00:00 2001 From: Aakash Bhardwaj Date: Sat, 7 Nov 2020 06:11:59 +0530 Subject: [PATCH] Exposed mgt-person methods as protected (#751) Co-authored-by: Nikola Metulev Co-authored-by: Beth Pan --- .../src/components/mgt-person/mgt-person.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/mgt/src/components/mgt-person/mgt-person.ts b/packages/mgt/src/components/mgt-person/mgt-person.ts index 678e63c6c4..ad5ec6ca97 100644 --- a/packages/mgt/src/components/mgt-person/mgt-person.ts +++ b/packages/mgt/src/components/mgt-person/mgt-person.ts @@ -808,7 +808,14 @@ export class MgtPerson extends MgtTemplatedComponent { return person && person.personImage ? person.personImage : null; } - private getInitials(person?: IDynamicPerson) { + /** + * Gets the user initials + * + * @protected + * @returns {string} + * @memberof MgtPerson + */ + protected getInitials(person?: IDynamicPerson): string { if (!person) { person = this.personDetails; } @@ -919,7 +926,15 @@ export class MgtPerson extends MgtTemplatedComponent { } } - private getColorFromName(name) { + /** + * Gets color from name + * + * @protected + * @param {string} name + * @returns {string} + * @memberof MgtPerson + */ + protected getColorFromName(name: string): string { const charCodes = name .split('') .map(char => char.charCodeAt(0))