@testgorilla/tgo-ui 1.0.14 → 1.1.1
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.
- package/components/avatar/avatar.component.d.ts +48 -0
- package/components/avatar/avatar.component.module.d.ts +11 -0
- package/components/avatar/avatar.model.d.ts +7 -0
- package/components/file-upload/file-upload.component.d.ts +8 -2
- package/components/icon/icon.model.d.ts +2 -2
- package/components/tag/tag.component.d.ts +86 -9
- package/components/tag/tag.component.module.d.ts +4 -1
- package/components/toggle/toggle.component.d.ts +38 -0
- package/components/toggle/toggle.component.module.d.ts +8 -0
- package/components/toggle/toggle.model.d.ts +1 -0
- package/esm2020/components/avatar/avatar.component.mjs +74 -0
- package/esm2020/components/avatar/avatar.component.module.mjs +21 -0
- package/esm2020/components/avatar/avatar.model.mjs +12 -0
- package/esm2020/components/file-upload/file-upload.component.mjs +15 -7
- package/esm2020/components/icon/icon.component.mjs +2 -2
- package/esm2020/components/icon/icon.model.mjs +1 -1
- package/esm2020/components/tag/tag.component.mjs +135 -9
- package/esm2020/components/tag/tag.component.module.mjs +7 -4
- package/esm2020/components/toggle/toggle.component.mjs +78 -0
- package/esm2020/components/toggle/toggle.component.module.mjs +17 -0
- package/esm2020/components/toggle/toggle.model.mjs +2 -0
- package/esm2020/pipes/name-initials.pipe.mjs +23 -0
- package/esm2020/public-api.mjs +10 -1
- package/fesm2015/testgorilla-tgo-ui.mjs +364 -31
- package/fesm2015/testgorilla-tgo-ui.mjs.map +1 -1
- package/fesm2020/testgorilla-tgo-ui.mjs +363 -31
- package/fesm2020/testgorilla-tgo-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/pipes/name-initials.pipe.d.ts +7 -0
- package/public-api.d.ts +6 -0
- package/src/assets/images/Avatar.png +0 -0
|
@@ -43,7 +43,7 @@ import { __decorate } from 'tslib';
|
|
|
43
43
|
import { UntilDestroy } from '@ngneat/until-destroy';
|
|
44
44
|
import * as i1$7 from '@ngneat/transloco';
|
|
45
45
|
import { TranslocoModule, TranslocoService } from '@ngneat/transloco';
|
|
46
|
-
import { lastValueFrom, Subscription } from 'rxjs';
|
|
46
|
+
import { lastValueFrom, Subscription, ReplaySubject, debounceTime, map } from 'rxjs';
|
|
47
47
|
import * as i4$1 from '@angular/material/sort';
|
|
48
48
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
49
49
|
import * as i3$1 from '@angular/material/table';
|
|
@@ -284,10 +284,10 @@ class IconComponent {
|
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IconComponent, deps: [{ token: i1.MatIconRegistry }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
287
|
-
IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: IconComponent, selector: "ui-icon", inputs: { size: "size", cssClass: "cssClass", name: "name", color: "color" }, usesOnChanges: true, ngImport: i0, template: "<mat-icon [svgIcon]=\"name\" [attr.class]=\"customCssClass\"></mat-icon>\n", styles: ["mat-icon{display:flex}mat-icon.size-16 svg{width:16px;height:16px}mat-icon.size-24 svg{width:24px;height:24px}mat-icon.dark svg{color:#888}mat-icon.white svg{color:#fff}mat-icon.teal svg{color:#46a997}mat-icon.petrol svg{color:#276678}mat-icon.black svg{color:#000}\n"], dependencies: [{ kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
287
|
+
IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: IconComponent, selector: "ui-icon", inputs: { size: "size", cssClass: "cssClass", name: "name", color: "color" }, usesOnChanges: true, ngImport: i0, template: "<mat-icon [svgIcon]=\"name\" [attr.class]=\"customCssClass\"></mat-icon>\n", styles: ["mat-icon{display:flex}mat-icon.size-16 svg{width:16px;height:16px}mat-icon.size-24 svg{width:24px;height:24px}mat-icon.size-80 svg{width:80px;height:80px}mat-icon.dark svg{color:#888}mat-icon.white svg{color:#fff}mat-icon.teal svg{color:#46a997}mat-icon.petrol svg{color:#276678}mat-icon.black svg{color:#000}\n"], dependencies: [{ kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
288
288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IconComponent, decorators: [{
|
|
289
289
|
type: Component,
|
|
290
|
-
args: [{ selector: 'ui-icon', encapsulation: ViewEncapsulation.None, template: "<mat-icon [svgIcon]=\"name\" [attr.class]=\"customCssClass\"></mat-icon>\n", styles: ["mat-icon{display:flex}mat-icon.size-16 svg{width:16px;height:16px}mat-icon.size-24 svg{width:24px;height:24px}mat-icon.dark svg{color:#888}mat-icon.white svg{color:#fff}mat-icon.teal svg{color:#46a997}mat-icon.petrol svg{color:#276678}mat-icon.black svg{color:#000}\n"] }]
|
|
290
|
+
args: [{ selector: 'ui-icon', encapsulation: ViewEncapsulation.None, template: "<mat-icon [svgIcon]=\"name\" [attr.class]=\"customCssClass\"></mat-icon>\n", styles: ["mat-icon{display:flex}mat-icon.size-16 svg{width:16px;height:16px}mat-icon.size-24 svg{width:24px;height:24px}mat-icon.size-80 svg{width:80px;height:80px}mat-icon.dark svg{color:#888}mat-icon.white svg{color:#fff}mat-icon.teal svg{color:#46a997}mat-icon.petrol svg{color:#276678}mat-icon.black svg{color:#000}\n"] }]
|
|
291
291
|
}], ctorParameters: function () { return [{ type: i1.MatIconRegistry }, { type: i2.DomSanitizer }]; }, propDecorators: { size: [{
|
|
292
292
|
type: Input
|
|
293
293
|
}], cssClass: [{
|
|
@@ -1826,6 +1826,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1826
1826
|
class FileUploadComponent {
|
|
1827
1827
|
constructor() {
|
|
1828
1828
|
this.class = 'ui-file-upload';
|
|
1829
|
+
/**
|
|
1830
|
+
* Existing file information
|
|
1831
|
+
*
|
|
1832
|
+
* @type {(File | null)}
|
|
1833
|
+
* @memberof FileUploadComponent
|
|
1834
|
+
*/
|
|
1835
|
+
this.file = null;
|
|
1829
1836
|
this.OnDrop = new EventEmitter();
|
|
1830
1837
|
/**
|
|
1831
1838
|
* @ignore
|
|
@@ -1835,7 +1842,6 @@ class FileUploadComponent {
|
|
|
1835
1842
|
* @ignore
|
|
1836
1843
|
*/
|
|
1837
1844
|
this.onTouch = () => { };
|
|
1838
|
-
this.file = null;
|
|
1839
1845
|
this.progress = false;
|
|
1840
1846
|
this.success = false;
|
|
1841
1847
|
}
|
|
@@ -1874,7 +1880,7 @@ class FileUploadComponent {
|
|
|
1874
1880
|
return this.errors ? true : false;
|
|
1875
1881
|
}
|
|
1876
1882
|
ngOnChanges(changes) {
|
|
1877
|
-
if (changes['uploadProgress']) {
|
|
1883
|
+
if (changes['uploadProgress'] || changes['file']) {
|
|
1878
1884
|
this.progress = this.showProgress();
|
|
1879
1885
|
this.success = this.showSuccess();
|
|
1880
1886
|
this.browse = this.showBrowse();
|
|
@@ -1904,13 +1910,13 @@ class FileUploadComponent {
|
|
|
1904
1910
|
}
|
|
1905
1911
|
}
|
|
1906
1912
|
FileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1907
|
-
FileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FileUploadComponent, selector: "ui-file-upload", inputs: { maxFileSizeMB: "maxFileSizeMB", supportedFileTypes: "supportedFileTypes", uploadProgress: "uploadProgress", errors: "errors", disabled: "disabled" }, outputs: { OnDrop: "OnDrop" }, host: { properties: { "class": "this.class" } }, providers: [
|
|
1913
|
+
FileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FileUploadComponent, selector: "ui-file-upload", inputs: { maxFileSizeMB: "maxFileSizeMB", supportedFileTypes: "supportedFileTypes", uploadProgress: "uploadProgress", errors: "errors", disabled: "disabled", file: "file" }, outputs: { OnDrop: "OnDrop" }, host: { properties: { "class": "this.class" } }, providers: [
|
|
1908
1914
|
{
|
|
1909
1915
|
provide: NG_VALUE_ACCESSOR,
|
|
1910
1916
|
useExisting: forwardRef(() => FileUploadComponent),
|
|
1911
1917
|
multi: true,
|
|
1912
1918
|
},
|
|
1913
|
-
], usesOnChanges: true, ngImport: i0, template: "<div
|
|
1919
|
+
], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"upload-file-container\"\n uiDragDrop\n [ngClass]=\"{ 'upload-errors': !!errors }\"\n (fileDropped)=\"onFileDropped($event)\"\n>\n <div *ngIf=\"browse && !(!!success && !!file && !!progress)\" [@inOutAnimation] class=\"upload-files\">\n <div class=\"upload-browse\">\n <ui-icon class=\"upload-icon\" name=\"File-upload\"></ui-icon>\n <div class=\"errors\" *ngIf=\"!!errors\">\n <span *ngFor=\"let error of errors\"> <ui-icon name=\"Error\"></ui-icon> {{ error }} </span>\n </div>\n <input\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n [accept]=\"supportedFileTypes\"\n id=\"fileDrop\"\n (change)=\"onChangeUpload($event)\"\n />\n <p>Drag and drop or <label for=\"fileDrop\" class=\"semibold\">browse</label> your files</p>\n <span class=\"upload-text\">{{ maxFileSizeMB }}MB max file size.</span>\n </div>\n </div>\n <div class=\"upload-change\" [@inOutAnimationChange] *ngIf=\"!!success && !!file && !!progress\">\n <ui-icon class=\"upload-icon\" name=\"File-upload\"></ui-icon>\n <input\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"fileDrop\"\n [accept]=\"supportedFileTypes\"\n (change)=\"onChangeUpload($event)\"\n [disabled]=\"disabled\"\n />\n <p>Drag and drop or <label for=\"fileDrop\" class=\"semibold\">change</label> your files</p>\n <span class=\"upload-text\"\n ><strong>{{ file.name }}</strong></span\n >\n </div>\n <div class=\"upload-progress\" [@inOutAnimationProgress] *ngIf=\"!!progress && !!file && !success\">\n <p>{{ file.name }}</p>\n <ui-progress-bar [progress]=\"uploadProgress\"></ui-progress-bar>\n <p class=\"upload-text\">\n Uploading <span>{{ uploadProgress }}</span\n >%\n </p>\n </div>\n</div>\n<div class=\"upload-supported-files\" *ngIf=\"!!supportedFileTypes\">\n <span>Supported file types:</span>{{ supportedFileTypes }}\n</div>\n", styles: [".upload-file-container{border-radius:8px;border:1px dashed #888888;background:#F6F6F6;display:flex;justify-content:center;align-items:center;height:196px;flex-flow:column;position:relative;max-width:563px}.upload-file-container.upload-errors{border:1px dashed #cb7b7a}.upload-file-container .upload-files{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;height:196px}.upload-file-container .upload-change,.upload-file-container .upload-browse{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;position:relative;height:196px}.upload-file-container .upload-change ui-icon.upload-icon,.upload-file-container .upload-browse ui-icon.upload-icon{margin-bottom:16px}.upload-file-container .upload-change ui-icon.upload-icon mat-icon.size-16 svg,.upload-file-container .upload-browse ui-icon.upload-icon mat-icon.size-16 svg{width:32px;height:32px}.upload-file-container .upload-change input,.upload-file-container .upload-browse input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;cursor:pointer}.upload-file-container .upload-change .upload-text,.upload-file-container .upload-browse .upload-text{margin-top:20px}.upload-file-container .upload-change p,.upload-file-container .upload-browse p{margin:0}.upload-file-container .upload-change p .semibold,.upload-file-container .upload-browse p .semibold{font-weight:400;text-decoration:underline}.upload-file-container .upload-change .errors,.upload-file-container .upload-browse .errors{width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:20px;font-size:12px;line-height:16px;color:#cb7b7a}.upload-file-container .upload-change .errors span,.upload-file-container .upload-browse .errors span{display:flex;align-items:center;margin-bottom:5px}.upload-file-container .upload-change .errors span:last-child,.upload-file-container .upload-browse .errors span:last-child{margin-bottom:0}.upload-file-container .upload-change .errors ui-icon,.upload-file-container .upload-browse .errors ui-icon{margin-right:4px}.upload-file-container .upload-change .errors ui-icon mat-icon.size-16 svg,.upload-file-container .upload-browse .errors ui-icon mat-icon.size-16 svg{width:16px;height:16px;color:#cb7b7a}.upload-file-container .upload-progress{padding:0 32px;width:100%}.upload-file-container .upload-text{text-align:right}.upload-supported-files{font-size:12px;line-height:16px;margin-top:8px;display:flex}.upload-supported-files span{font-weight:700;margin-right:5px}@media (max-width: 600px){.upload-file-container{max-width:100%}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color"] }, { kind: "component", type: ProgressBarComponent, selector: "ui-progress-bar", inputs: ["color", "progress", "mode", "buffer"] }, { kind: "directive", type: DragDropDirective, selector: "[uiDragDrop]", outputs: ["fileDropped"] }], animations: [
|
|
1914
1920
|
trigger('inOutAnimation', [
|
|
1915
1921
|
transition(':enter', [
|
|
1916
1922
|
style({ opacity: 0, height: 0 }),
|
|
@@ -1981,7 +1987,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1981
1987
|
animate('0.2s ease-in', style({ opacity: 0, height: 0 })),
|
|
1982
1988
|
]),
|
|
1983
1989
|
]),
|
|
1984
|
-
], template: "<div
|
|
1990
|
+
], template: "<div\n class=\"upload-file-container\"\n uiDragDrop\n [ngClass]=\"{ 'upload-errors': !!errors }\"\n (fileDropped)=\"onFileDropped($event)\"\n>\n <div *ngIf=\"browse && !(!!success && !!file && !!progress)\" [@inOutAnimation] class=\"upload-files\">\n <div class=\"upload-browse\">\n <ui-icon class=\"upload-icon\" name=\"File-upload\"></ui-icon>\n <div class=\"errors\" *ngIf=\"!!errors\">\n <span *ngFor=\"let error of errors\"> <ui-icon name=\"Error\"></ui-icon> {{ error }} </span>\n </div>\n <input\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n [accept]=\"supportedFileTypes\"\n id=\"fileDrop\"\n (change)=\"onChangeUpload($event)\"\n />\n <p>Drag and drop or <label for=\"fileDrop\" class=\"semibold\">browse</label> your files</p>\n <span class=\"upload-text\">{{ maxFileSizeMB }}MB max file size.</span>\n </div>\n </div>\n <div class=\"upload-change\" [@inOutAnimationChange] *ngIf=\"!!success && !!file && !!progress\">\n <ui-icon class=\"upload-icon\" name=\"File-upload\"></ui-icon>\n <input\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"fileDrop\"\n [accept]=\"supportedFileTypes\"\n (change)=\"onChangeUpload($event)\"\n [disabled]=\"disabled\"\n />\n <p>Drag and drop or <label for=\"fileDrop\" class=\"semibold\">change</label> your files</p>\n <span class=\"upload-text\"\n ><strong>{{ file.name }}</strong></span\n >\n </div>\n <div class=\"upload-progress\" [@inOutAnimationProgress] *ngIf=\"!!progress && !!file && !success\">\n <p>{{ file.name }}</p>\n <ui-progress-bar [progress]=\"uploadProgress\"></ui-progress-bar>\n <p class=\"upload-text\">\n Uploading <span>{{ uploadProgress }}</span\n >%\n </p>\n </div>\n</div>\n<div class=\"upload-supported-files\" *ngIf=\"!!supportedFileTypes\">\n <span>Supported file types:</span>{{ supportedFileTypes }}\n</div>\n", styles: [".upload-file-container{border-radius:8px;border:1px dashed #888888;background:#F6F6F6;display:flex;justify-content:center;align-items:center;height:196px;flex-flow:column;position:relative;max-width:563px}.upload-file-container.upload-errors{border:1px dashed #cb7b7a}.upload-file-container .upload-files{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;height:196px}.upload-file-container .upload-change,.upload-file-container .upload-browse{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;position:relative;height:196px}.upload-file-container .upload-change ui-icon.upload-icon,.upload-file-container .upload-browse ui-icon.upload-icon{margin-bottom:16px}.upload-file-container .upload-change ui-icon.upload-icon mat-icon.size-16 svg,.upload-file-container .upload-browse ui-icon.upload-icon mat-icon.size-16 svg{width:32px;height:32px}.upload-file-container .upload-change input,.upload-file-container .upload-browse input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;cursor:pointer}.upload-file-container .upload-change .upload-text,.upload-file-container .upload-browse .upload-text{margin-top:20px}.upload-file-container .upload-change p,.upload-file-container .upload-browse p{margin:0}.upload-file-container .upload-change p .semibold,.upload-file-container .upload-browse p .semibold{font-weight:400;text-decoration:underline}.upload-file-container .upload-change .errors,.upload-file-container .upload-browse .errors{width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:20px;font-size:12px;line-height:16px;color:#cb7b7a}.upload-file-container .upload-change .errors span,.upload-file-container .upload-browse .errors span{display:flex;align-items:center;margin-bottom:5px}.upload-file-container .upload-change .errors span:last-child,.upload-file-container .upload-browse .errors span:last-child{margin-bottom:0}.upload-file-container .upload-change .errors ui-icon,.upload-file-container .upload-browse .errors ui-icon{margin-right:4px}.upload-file-container .upload-change .errors ui-icon mat-icon.size-16 svg,.upload-file-container .upload-browse .errors ui-icon mat-icon.size-16 svg{width:16px;height:16px;color:#cb7b7a}.upload-file-container .upload-progress{padding:0 32px;width:100%}.upload-file-container .upload-text{text-align:right}.upload-supported-files{font-size:12px;line-height:16px;margin-top:8px;display:flex}.upload-supported-files span{font-weight:700;margin-right:5px}@media (max-width: 600px){.upload-file-container{max-width:100%}}\n"] }]
|
|
1985
1991
|
}], ctorParameters: function () { return []; }, propDecorators: { class: [{
|
|
1986
1992
|
type: HostBinding
|
|
1987
1993
|
}], maxFileSizeMB: [{
|
|
@@ -1994,6 +2000,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1994
2000
|
type: Input
|
|
1995
2001
|
}], disabled: [{
|
|
1996
2002
|
type: Input
|
|
2003
|
+
}], file: [{
|
|
2004
|
+
type: Input
|
|
1997
2005
|
}], OnDrop: [{
|
|
1998
2006
|
type: Output
|
|
1999
2007
|
}] } });
|
|
@@ -3320,40 +3328,147 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3320
3328
|
class TagComponent {
|
|
3321
3329
|
constructor() {
|
|
3322
3330
|
/**
|
|
3323
|
-
*
|
|
3331
|
+
* Icon
|
|
3324
3332
|
*
|
|
3325
|
-
* @type {
|
|
3333
|
+
* @type {string}
|
|
3326
3334
|
* @memberof TagComponent
|
|
3327
3335
|
*/
|
|
3328
|
-
this.
|
|
3336
|
+
this.icon = '';
|
|
3337
|
+
/**
|
|
3338
|
+
* Whether to allow the tag to be closed.
|
|
3339
|
+
*
|
|
3340
|
+
* @type {boolean}
|
|
3341
|
+
* @default false
|
|
3342
|
+
* @memberof TagComponent
|
|
3343
|
+
*/
|
|
3344
|
+
this.allowClose = false;
|
|
3345
|
+
/**
|
|
3346
|
+
* Whether the tag is in read-only mode.
|
|
3347
|
+
*
|
|
3348
|
+
* @type {boolean}
|
|
3349
|
+
* @default false
|
|
3350
|
+
* @memberof TagComponent
|
|
3351
|
+
*/
|
|
3352
|
+
this.readOnly = false;
|
|
3353
|
+
/**
|
|
3354
|
+
* Whether the tag is selected.
|
|
3355
|
+
*
|
|
3356
|
+
* @type {boolean}
|
|
3357
|
+
* @default false
|
|
3358
|
+
* @memberof TagComponent
|
|
3359
|
+
*/
|
|
3360
|
+
this.isSelected = false;
|
|
3361
|
+
/**
|
|
3362
|
+
* Display icon when is selected
|
|
3363
|
+
*
|
|
3364
|
+
* @type {boolean}
|
|
3365
|
+
* @default false
|
|
3366
|
+
* @memberof TagComponent
|
|
3367
|
+
*/
|
|
3368
|
+
this.showIconWhenSelected = false;
|
|
3369
|
+
/**
|
|
3370
|
+
* Specifies whether the element is disabled.
|
|
3371
|
+
*
|
|
3372
|
+
* @type {boolean}
|
|
3373
|
+
* @default false
|
|
3374
|
+
* @memberof TagComponent
|
|
3375
|
+
*/
|
|
3376
|
+
this.isDisabled = false;
|
|
3377
|
+
/**
|
|
3378
|
+
* Event triggered when the tag should be closed.
|
|
3379
|
+
*
|
|
3380
|
+
* @event
|
|
3381
|
+
* @memberof TagComponent
|
|
3382
|
+
*/
|
|
3383
|
+
this.close = new EventEmitter();
|
|
3384
|
+
/**
|
|
3385
|
+
* Event triggered when a press action occurs.
|
|
3386
|
+
*
|
|
3387
|
+
* @event
|
|
3388
|
+
* @memberof TagComponent
|
|
3389
|
+
*/
|
|
3390
|
+
this.press = new EventEmitter();
|
|
3391
|
+
/**
|
|
3392
|
+
* Subject that needs to be triggered when Label input changes, to check if it's truncated
|
|
3393
|
+
* @private
|
|
3394
|
+
* @type {void}
|
|
3395
|
+
* @memberof TagComponent
|
|
3396
|
+
*/
|
|
3397
|
+
this.checkLabelEllipsis$ = new ReplaySubject(1);
|
|
3398
|
+
/**
|
|
3399
|
+
* Observable that indicates if the Label is truncated
|
|
3400
|
+
* debounceTime is used to wait for view to be initialized after receiving a new Label input
|
|
3401
|
+
* @protected
|
|
3402
|
+
* @type {boolean}
|
|
3403
|
+
* @memberof TagComponent
|
|
3404
|
+
*/
|
|
3405
|
+
this.isEllipseActiveObs$ = this.checkLabelEllipsis$.pipe(debounceTime(100), map(() => {
|
|
3406
|
+
const el = this.labelElement.nativeElement;
|
|
3407
|
+
return el.offsetWidth < el.scrollWidth;
|
|
3408
|
+
}));
|
|
3409
|
+
this.labelText = '';
|
|
3410
|
+
}
|
|
3411
|
+
/**
|
|
3412
|
+
* Tag's label
|
|
3413
|
+
*
|
|
3414
|
+
* @memberof TagComponent
|
|
3415
|
+
*/
|
|
3416
|
+
set label(value) {
|
|
3417
|
+
this.labelText = value;
|
|
3418
|
+
if (this.labelElement) {
|
|
3419
|
+
this.isLabelEllipseActive();
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
ngAfterViewInit() {
|
|
3423
|
+
this.isLabelEllipseActive();
|
|
3424
|
+
}
|
|
3425
|
+
onPress() {
|
|
3426
|
+
if (!this.readOnly && !this.allowClose) {
|
|
3427
|
+
this.isSelected = this.showIconWhenSelected ? !this.isSelected : false;
|
|
3428
|
+
this.press.emit(this.isSelected);
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3431
|
+
onClose() {
|
|
3432
|
+
this.close.emit();
|
|
3433
|
+
}
|
|
3434
|
+
isLabelEllipseActive() {
|
|
3435
|
+
this.checkLabelEllipsis$.next();
|
|
3436
|
+
}
|
|
3437
|
+
get tabIndex() {
|
|
3438
|
+
return this.isDisabled || this.readOnly ? -1 : 0;
|
|
3439
|
+
}
|
|
3440
|
+
get filled() {
|
|
3441
|
+
return this.readOnly || this.allowClose || this.isSelected;
|
|
3329
3442
|
}
|
|
3330
3443
|
}
|
|
3331
3444
|
TagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3332
|
-
TagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TagComponent, selector: "ui-tag", inputs: {
|
|
3445
|
+
TagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TagComponent, selector: "ui-tag", inputs: { label: "label", icon: "icon", allowClose: "allowClose", readOnly: "readOnly", isSelected: "isSelected", showIconWhenSelected: "showIconWhenSelected", isDisabled: "isDisabled" }, outputs: { close: "close", press: "press" }, viewQueries: [{ propertyName: "labelElement", first: true, predicate: ["labelElement"], descendants: true }], ngImport: i0, template: "<div class=\"tag-wrapper\" [matTooltip]=\"(isEllipseActiveObs$ | async) ? labelText : ''\">\n <div\n [tabindex]=\"tabIndex\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [ngClass]=\"{\n filled: filled,\n readonly: readOnly,\n disabled: isDisabled,\n outlined: !isSelected,\n }\"\n (click)=\"onPress()\"\n >\n <ui-icon *ngIf=\"icon\" class=\"icon\" [name]=\"icon\"></ui-icon>\n <ui-icon *ngIf=\"isSelected && showIconWhenSelected\" class=\"icon\" [name]=\"'Check'\"></ui-icon>\n <span class=\"tag-label\" #labelElement>{{ labelText }}</span>\n <ui-icon [tabindex]=\"tabIndex\" *ngIf=\"allowClose\" class=\"delete-icon\" (click)=\"onClose()\" [name]=\"'Close'\"></ui-icon>\n </div>\n</div>\n", styles: [":host .tag-wrapper{max-width:264px}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:-moz-fit-content;width:fit-content;cursor:pointer;margin:4px}:host .tag-container.outlined{border:1px solid #6894A0}:host .tag-container:focus{outline:1px dashed #888888;outline-offset:4px;background:#F6F6F6;border:1px solid #6894A0}:host .tag-container:focus.filled{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled{background:#E9F0F1;border:1px solid #E9F0F1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#A9C2C9;border:1px solid #1B4754}:host .tag-container:hover{background:#F6F6F6;border:1px solid #6894A0}:host .tag-container:active{background:#E9F0F1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#E9F0F1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border:1px solid transparent}:host .tag-container .delete-icon:focus{border:1px dashed #1B4754;border-radius:4px}:host .tag-container .delete-icon:focus-visible{outline:none}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
|
|
3333
3446
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponent, decorators: [{
|
|
3334
3447
|
type: Component,
|
|
3335
|
-
args: [{ selector: 'ui-tag', template: "<
|
|
3336
|
-
}],
|
|
3448
|
+
args: [{ selector: 'ui-tag', template: "<div class=\"tag-wrapper\" [matTooltip]=\"(isEllipseActiveObs$ | async) ? labelText : ''\">\n <div\n [tabindex]=\"tabIndex\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [ngClass]=\"{\n filled: filled,\n readonly: readOnly,\n disabled: isDisabled,\n outlined: !isSelected,\n }\"\n (click)=\"onPress()\"\n >\n <ui-icon *ngIf=\"icon\" class=\"icon\" [name]=\"icon\"></ui-icon>\n <ui-icon *ngIf=\"isSelected && showIconWhenSelected\" class=\"icon\" [name]=\"'Check'\"></ui-icon>\n <span class=\"tag-label\" #labelElement>{{ labelText }}</span>\n <ui-icon [tabindex]=\"tabIndex\" *ngIf=\"allowClose\" class=\"delete-icon\" (click)=\"onClose()\" [name]=\"'Close'\"></ui-icon>\n </div>\n</div>\n", styles: [":host .tag-wrapper{max-width:264px}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:-moz-fit-content;width:fit-content;cursor:pointer;margin:4px}:host .tag-container.outlined{border:1px solid #6894A0}:host .tag-container:focus{outline:1px dashed #888888;outline-offset:4px;background:#F6F6F6;border:1px solid #6894A0}:host .tag-container:focus.filled{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled{background:#E9F0F1;border:1px solid #E9F0F1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#A9C2C9;border:1px solid #1B4754}:host .tag-container:hover{background:#F6F6F6;border:1px solid #6894A0}:host .tag-container:active{background:#E9F0F1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#E9F0F1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border:1px solid transparent}:host .tag-container .delete-icon:focus{border:1px dashed #1B4754;border-radius:4px}:host .tag-container .delete-icon:focus-visible{outline:none}\n"] }]
|
|
3449
|
+
}], propDecorators: { label: [{
|
|
3337
3450
|
type: Input
|
|
3338
|
-
}],
|
|
3451
|
+
}], icon: [{
|
|
3452
|
+
type: Input
|
|
3453
|
+
}], allowClose: [{
|
|
3339
3454
|
type: Input
|
|
3455
|
+
}], readOnly: [{
|
|
3456
|
+
type: Input
|
|
3457
|
+
}], isSelected: [{
|
|
3458
|
+
type: Input
|
|
3459
|
+
}], showIconWhenSelected: [{
|
|
3460
|
+
type: Input
|
|
3461
|
+
}], isDisabled: [{
|
|
3462
|
+
type: Input
|
|
3463
|
+
}], close: [{
|
|
3464
|
+
type: Output
|
|
3465
|
+
}], press: [{
|
|
3466
|
+
type: Output
|
|
3467
|
+
}], labelElement: [{
|
|
3468
|
+
type: ViewChild,
|
|
3469
|
+
args: ['labelElement']
|
|
3340
3470
|
}] } });
|
|
3341
3471
|
|
|
3342
|
-
class TagComponentModule {
|
|
3343
|
-
}
|
|
3344
|
-
TagComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3345
|
-
TagComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, declarations: [TagComponent], imports: [CommonModule], exports: [TagComponent] });
|
|
3346
|
-
TagComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, imports: [CommonModule] });
|
|
3347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, decorators: [{
|
|
3348
|
-
type: NgModule,
|
|
3349
|
-
args: [{
|
|
3350
|
-
declarations: [TagComponent],
|
|
3351
|
-
imports: [CommonModule],
|
|
3352
|
-
exports: [TagComponent],
|
|
3353
|
-
providers: [],
|
|
3354
|
-
}]
|
|
3355
|
-
}] });
|
|
3356
|
-
|
|
3357
3472
|
var TooltipPositionType;
|
|
3358
3473
|
(function (TooltipPositionType) {
|
|
3359
3474
|
TooltipPositionType["TOP"] = "top";
|
|
@@ -3422,6 +3537,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3422
3537
|
}]
|
|
3423
3538
|
}] });
|
|
3424
3539
|
|
|
3540
|
+
class TagComponentModule {
|
|
3541
|
+
}
|
|
3542
|
+
TagComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3543
|
+
TagComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, declarations: [TagComponent], imports: [CommonModule, IconComponentModule, TooltipComponentModule, MatTooltipModule], exports: [TagComponent] });
|
|
3544
|
+
TagComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, imports: [CommonModule, IconComponentModule, TooltipComponentModule, MatTooltipModule] });
|
|
3545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, decorators: [{
|
|
3546
|
+
type: NgModule,
|
|
3547
|
+
args: [{
|
|
3548
|
+
declarations: [TagComponent],
|
|
3549
|
+
imports: [CommonModule, IconComponentModule, TooltipComponentModule, MatTooltipModule],
|
|
3550
|
+
exports: [TagComponent],
|
|
3551
|
+
providers: [],
|
|
3552
|
+
}]
|
|
3553
|
+
}] });
|
|
3554
|
+
|
|
3425
3555
|
class DropdownComponent {
|
|
3426
3556
|
constructor() {
|
|
3427
3557
|
this.class = 'ui-dropdown';
|
|
@@ -3945,6 +4075,209 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3945
4075
|
}]
|
|
3946
4076
|
}] });
|
|
3947
4077
|
|
|
4078
|
+
class ToggleComponent {
|
|
4079
|
+
constructor() {
|
|
4080
|
+
/**
|
|
4081
|
+
* The `selected` property determines the current state of the toggle switch.
|
|
4082
|
+
*
|
|
4083
|
+
* @type {boolean}
|
|
4084
|
+
* @default false
|
|
4085
|
+
* @memberof ToggleComponent
|
|
4086
|
+
*/
|
|
4087
|
+
this.selected = false;
|
|
4088
|
+
/**
|
|
4089
|
+
* The `disabled` property determines whether the toggle switch is disabled.
|
|
4090
|
+
*
|
|
4091
|
+
* @type {boolean}
|
|
4092
|
+
* @default false
|
|
4093
|
+
* @memberof ToggleComponent
|
|
4094
|
+
*/
|
|
4095
|
+
this.disabled = false;
|
|
4096
|
+
/**
|
|
4097
|
+
* The `toggle` event is triggered when the state of the toggle switch changes. It returns the new state.
|
|
4098
|
+
*
|
|
4099
|
+
* @type {event}
|
|
4100
|
+
* @memberof ToggleComponent
|
|
4101
|
+
*/
|
|
4102
|
+
this.toggle = new EventEmitter();
|
|
4103
|
+
this.onChange = () => { };
|
|
4104
|
+
this.onTouched = () => { };
|
|
4105
|
+
}
|
|
4106
|
+
onToggle() {
|
|
4107
|
+
if (!this.disabled) {
|
|
4108
|
+
this.selected = !this.selected;
|
|
4109
|
+
this.toggle.emit(this.selected);
|
|
4110
|
+
}
|
|
4111
|
+
}
|
|
4112
|
+
writeValue(state) {
|
|
4113
|
+
if (state) {
|
|
4114
|
+
this.selected = state;
|
|
4115
|
+
}
|
|
4116
|
+
}
|
|
4117
|
+
registerOnChange(fn) {
|
|
4118
|
+
this.onChange = fn;
|
|
4119
|
+
}
|
|
4120
|
+
registerOnTouched(fn) {
|
|
4121
|
+
this.onTouched = fn;
|
|
4122
|
+
}
|
|
4123
|
+
setDisabledState(isDisabled) {
|
|
4124
|
+
this.disabled = isDisabled;
|
|
4125
|
+
}
|
|
4126
|
+
}
|
|
4127
|
+
ToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4128
|
+
ToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ToggleComponent, selector: "ui-toggle", inputs: { selected: "selected", disabled: "disabled" }, outputs: { toggle: "toggle" }, providers: [
|
|
4129
|
+
{
|
|
4130
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4131
|
+
useExisting: forwardRef(() => ToggleComponent),
|
|
4132
|
+
multi: true,
|
|
4133
|
+
},
|
|
4134
|
+
], ngImport: i0, template: "<div\n [tabIndex]=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ 'active': selected, 'disabled': disabled }\"\n (click)=\"onToggle()\"\n>\n <div class=\"knob\"></div>\n</div>\n", styles: [":host .toggle-container{width:32px;height:16px;border-radius:16px;background:#888888;display:flex;align-items:center;padding:0 2px;cursor:pointer}:host .toggle-container:focus{outline:1px dashed #888888;outline-offset:4px}:host .toggle-container .knob{height:12px;width:12px;border-radius:16px;background:#F6F6F6;transition:transform .3s}:host .toggle-container.disabled{background:#E0E0E0;pointer-events:none}:host .toggle-container.disabled:focus{outline:none}:host .toggle-container.active{background:#46A997}:host .toggle-container.active.disabled{opacity:.5}:host .toggle-container.active .knob{transform:translate(16px)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
4135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponent, decorators: [{
|
|
4136
|
+
type: Component,
|
|
4137
|
+
args: [{ selector: 'ui-toggle', providers: [
|
|
4138
|
+
{
|
|
4139
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4140
|
+
useExisting: forwardRef(() => ToggleComponent),
|
|
4141
|
+
multi: true,
|
|
4142
|
+
},
|
|
4143
|
+
], template: "<div\n [tabIndex]=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ 'active': selected, 'disabled': disabled }\"\n (click)=\"onToggle()\"\n>\n <div class=\"knob\"></div>\n</div>\n", styles: [":host .toggle-container{width:32px;height:16px;border-radius:16px;background:#888888;display:flex;align-items:center;padding:0 2px;cursor:pointer}:host .toggle-container:focus{outline:1px dashed #888888;outline-offset:4px}:host .toggle-container .knob{height:12px;width:12px;border-radius:16px;background:#F6F6F6;transition:transform .3s}:host .toggle-container.disabled{background:#E0E0E0;pointer-events:none}:host .toggle-container.disabled:focus{outline:none}:host .toggle-container.active{background:#46A997}:host .toggle-container.active.disabled{opacity:.5}:host .toggle-container.active .knob{transform:translate(16px)}\n"] }]
|
|
4144
|
+
}], propDecorators: { selected: [{
|
|
4145
|
+
type: Input
|
|
4146
|
+
}], disabled: [{
|
|
4147
|
+
type: Input
|
|
4148
|
+
}], toggle: [{
|
|
4149
|
+
type: Output
|
|
4150
|
+
}] } });
|
|
4151
|
+
|
|
4152
|
+
class ToggleComponentModule {
|
|
4153
|
+
}
|
|
4154
|
+
ToggleComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4155
|
+
ToggleComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponentModule, declarations: [ToggleComponent], imports: [CommonModule] });
|
|
4156
|
+
ToggleComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponentModule, imports: [CommonModule] });
|
|
4157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponentModule, decorators: [{
|
|
4158
|
+
type: NgModule,
|
|
4159
|
+
args: [{
|
|
4160
|
+
declarations: [ToggleComponent],
|
|
4161
|
+
imports: [CommonModule],
|
|
4162
|
+
}]
|
|
4163
|
+
}] });
|
|
4164
|
+
|
|
4165
|
+
var AvatarSize;
|
|
4166
|
+
(function (AvatarSize) {
|
|
4167
|
+
AvatarSize["SMALL"] = "small";
|
|
4168
|
+
AvatarSize["MEDIUM"] = "medium";
|
|
4169
|
+
AvatarSize["LARGE"] = "large";
|
|
4170
|
+
})(AvatarSize || (AvatarSize = {}));
|
|
4171
|
+
const iconSize = {
|
|
4172
|
+
small: '16',
|
|
4173
|
+
medium: '24',
|
|
4174
|
+
large: '80',
|
|
4175
|
+
};
|
|
4176
|
+
|
|
4177
|
+
class NameInitialsPipe {
|
|
4178
|
+
transform(value) {
|
|
4179
|
+
var _a, _b, _c, _d;
|
|
4180
|
+
const initials = value.split(' ').filter(Boolean);
|
|
4181
|
+
if (initials.length > 1) {
|
|
4182
|
+
return initials.map(initial => initial[0].toUpperCase()).join('');
|
|
4183
|
+
}
|
|
4184
|
+
else {
|
|
4185
|
+
const firstLetters = value.substring(0, 2);
|
|
4186
|
+
return `${(_b = (_a = firstLetters[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) !== null && _b !== void 0 ? _b : ''}${(_d = (_c = firstLetters[1]) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : ''}`;
|
|
4187
|
+
}
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4190
|
+
NameInitialsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NameInitialsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4191
|
+
NameInitialsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NameInitialsPipe, name: "nameInitials" });
|
|
4192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NameInitialsPipe, decorators: [{
|
|
4193
|
+
type: Pipe,
|
|
4194
|
+
args: [{
|
|
4195
|
+
name: 'nameInitials',
|
|
4196
|
+
}]
|
|
4197
|
+
}] });
|
|
4198
|
+
|
|
4199
|
+
class AvatarComponent {
|
|
4200
|
+
constructor() {
|
|
4201
|
+
/**
|
|
4202
|
+
* Input property for specifying the size of the avatar.
|
|
4203
|
+
* @type {AvatarSize}
|
|
4204
|
+
* @default AvatarSize.SMALL
|
|
4205
|
+
* @memberof AvatarComponent
|
|
4206
|
+
*/
|
|
4207
|
+
this.size = AvatarSize.SMALL;
|
|
4208
|
+
/**
|
|
4209
|
+
* Input property for specifying the URL of the image to display in the avatar.
|
|
4210
|
+
* @type {string}
|
|
4211
|
+
* @memberof AvatarComponent
|
|
4212
|
+
*/
|
|
4213
|
+
this.imageUrl = '';
|
|
4214
|
+
/**
|
|
4215
|
+
* Input property for specifying the initials to display in the avatar.
|
|
4216
|
+
* @type {string}
|
|
4217
|
+
* @memberof AvatarComponent
|
|
4218
|
+
*/
|
|
4219
|
+
this.name = '';
|
|
4220
|
+
/**
|
|
4221
|
+
* Input property for specifying the tooltip text for edit.
|
|
4222
|
+
* @type {string}
|
|
4223
|
+
* @memberof AvatarComponent
|
|
4224
|
+
*/
|
|
4225
|
+
this.tooltipText = '';
|
|
4226
|
+
/**
|
|
4227
|
+
* Input property that makes avatar clickable.
|
|
4228
|
+
* @type {boolean}
|
|
4229
|
+
* @memberof AvatarComponent
|
|
4230
|
+
*/
|
|
4231
|
+
this.allowClick = false;
|
|
4232
|
+
/**
|
|
4233
|
+
* Event emitted when the avatar is clicked.
|
|
4234
|
+
* @type {void}
|
|
4235
|
+
* @memberof AvatarComponent
|
|
4236
|
+
*/
|
|
4237
|
+
this.avatarClick = new EventEmitter();
|
|
4238
|
+
this.iconSize = iconSize;
|
|
4239
|
+
this.avatarSize = AvatarSize;
|
|
4240
|
+
}
|
|
4241
|
+
onAvatarClick() {
|
|
4242
|
+
this.avatarClick.emit();
|
|
4243
|
+
}
|
|
4244
|
+
get clickAllowance() {
|
|
4245
|
+
return this.allowClick ? 'clickable' : 'non-clickable';
|
|
4246
|
+
}
|
|
4247
|
+
}
|
|
4248
|
+
AvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4249
|
+
AvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AvatarComponent, selector: "ui-avatar", inputs: { size: "size", imageUrl: "imageUrl", name: "name", tooltipText: "tooltipText", allowClick: "allowClick" }, outputs: { avatarClick: "avatarClick" }, ngImport: i0, template: "<div\n class=\"avatar-container\"\n [attr.type]=\"!imageUrl && !name ? 'icon' : 'initials'\"\n [ngClass]=\"[size, clickAllowance]\"\n (click)=\"onAvatarClick()\"\n>\n <span *ngIf=\"name && !imageUrl\">\n {{ name | nameInitials }}\n </span>\n <img *ngIf=\"imageUrl\" [attr.src]=\"imageUrl\" [alt]=\"'profile-image'\">\n <ui-icon color=\"dark\" [size]=\"iconSize[size]\" *ngIf=\"!imageUrl && !name\" [name]=\"'User-profile'\"></ui-icon>\n</div>\n\n", styles: [":host .clickable{cursor:pointer}:host .non-clickable{pointer-events:none}:host .avatar-container{font-family:Open Sans,sans-serif;font-weight:400;display:flex;justify-content:center;align-items:center;border-radius:100%;background:#CBD6CB;position:relative;-webkit-user-select:none;user-select:none}:host .avatar-container[type=icon]{background:#E0E0E0}:host .avatar-container img{width:100%;height:100%;object-fit:cover;border-radius:100%}:host .avatar-container.small{width:24px;height:24px;font-size:10px}:host .avatar-container.medium{width:48px;height:48px;font-size:20px}:host .avatar-container.large{width:120px;height:120px;font-size:50px;letter-spacing:-2}:host .avatar-container .edit-avatar{display:flex;justify-content:center;align-items:center;position:absolute;right:0;bottom:0;background:#F6F6F6;width:32px;height:32px;border-radius:100%;cursor:pointer;-webkit-backdrop-filter:drop-shadow(0px 8px 24px 4px #000000,8%);backdrop-filter:drop-shadow(0px 8px 24px 4px #000000,8%)}:host .avatar-container .edit-avatar:hover{background:#EDEDED}:host .avatar-container .edit-avatar:active{background:#E0E0E0}:host .avatar-container .edit-avatar:focus{outline:1px dashed #888888;outline-offset:4px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color"] }, { kind: "pipe", type: NameInitialsPipe, name: "nameInitials" }] });
|
|
4250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
4251
|
+
type: Component,
|
|
4252
|
+
args: [{ selector: 'ui-avatar', template: "<div\n class=\"avatar-container\"\n [attr.type]=\"!imageUrl && !name ? 'icon' : 'initials'\"\n [ngClass]=\"[size, clickAllowance]\"\n (click)=\"onAvatarClick()\"\n>\n <span *ngIf=\"name && !imageUrl\">\n {{ name | nameInitials }}\n </span>\n <img *ngIf=\"imageUrl\" [attr.src]=\"imageUrl\" [alt]=\"'profile-image'\">\n <ui-icon color=\"dark\" [size]=\"iconSize[size]\" *ngIf=\"!imageUrl && !name\" [name]=\"'User-profile'\"></ui-icon>\n</div>\n\n", styles: [":host .clickable{cursor:pointer}:host .non-clickable{pointer-events:none}:host .avatar-container{font-family:Open Sans,sans-serif;font-weight:400;display:flex;justify-content:center;align-items:center;border-radius:100%;background:#CBD6CB;position:relative;-webkit-user-select:none;user-select:none}:host .avatar-container[type=icon]{background:#E0E0E0}:host .avatar-container img{width:100%;height:100%;object-fit:cover;border-radius:100%}:host .avatar-container.small{width:24px;height:24px;font-size:10px}:host .avatar-container.medium{width:48px;height:48px;font-size:20px}:host .avatar-container.large{width:120px;height:120px;font-size:50px;letter-spacing:-2}:host .avatar-container .edit-avatar{display:flex;justify-content:center;align-items:center;position:absolute;right:0;bottom:0;background:#F6F6F6;width:32px;height:32px;border-radius:100%;cursor:pointer;-webkit-backdrop-filter:drop-shadow(0px 8px 24px 4px #000000,8%);backdrop-filter:drop-shadow(0px 8px 24px 4px #000000,8%)}:host .avatar-container .edit-avatar:hover{background:#EDEDED}:host .avatar-container .edit-avatar:active{background:#E0E0E0}:host .avatar-container .edit-avatar:focus{outline:1px dashed #888888;outline-offset:4px}\n"] }]
|
|
4253
|
+
}], propDecorators: { size: [{
|
|
4254
|
+
type: Input
|
|
4255
|
+
}], imageUrl: [{
|
|
4256
|
+
type: Input
|
|
4257
|
+
}], name: [{
|
|
4258
|
+
type: Input
|
|
4259
|
+
}], tooltipText: [{
|
|
4260
|
+
type: Input
|
|
4261
|
+
}], allowClick: [{
|
|
4262
|
+
type: Input
|
|
4263
|
+
}], avatarClick: [{
|
|
4264
|
+
type: Output
|
|
4265
|
+
}] } });
|
|
4266
|
+
|
|
4267
|
+
class AvatarComponentModule {
|
|
4268
|
+
}
|
|
4269
|
+
AvatarComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4270
|
+
AvatarComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponentModule, declarations: [AvatarComponent, NameInitialsPipe], imports: [CommonModule, IconComponentModule, MatTooltipModule], exports: [AvatarComponent] });
|
|
4271
|
+
AvatarComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponentModule, imports: [CommonModule, IconComponentModule, MatTooltipModule] });
|
|
4272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponentModule, decorators: [{
|
|
4273
|
+
type: NgModule,
|
|
4274
|
+
args: [{
|
|
4275
|
+
declarations: [AvatarComponent, NameInitialsPipe],
|
|
4276
|
+
imports: [CommonModule, IconComponentModule, MatTooltipModule],
|
|
4277
|
+
exports: [AvatarComponent],
|
|
4278
|
+
}]
|
|
4279
|
+
}] });
|
|
4280
|
+
|
|
3948
4281
|
/* eslint-disable */
|
|
3949
4282
|
/* Components */
|
|
3950
4283
|
// Alert Banner
|
|
@@ -3953,5 +4286,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3953
4286
|
* Generated bundle index. Do not edit.
|
|
3954
4287
|
*/
|
|
3955
4288
|
|
|
3956
|
-
export { AlertBannerComponent, AlertBannerComponentModule, BannerActionComponent, BannerActionComponentModule, ButtonComponent, ButtonComponentModule, CardComponent, CardComponentModule, CheckboxComponent, CheckboxComponentModule, ColumnAlignmentEnum, ColumnTypeEnum, ConfirmDialogComponent, ConfirmDialogComponentModule, CreateAccountComponent, CreateAccountComponentModule, CreatePasswordComponent, CreatePasswordComponentModule, DataPropertyGetterPipe, DatepickerComponent, DatepickerComponentModule, DialogComponent, DialogComponentModule, DialogService, DropdownComponent, DropdownComponentModule, ElevationShadowComponent, ElevationShadowComponentModule, ElevationType, FieldComponent, FieldComponentModule, FileUploadComponent, FileUploadComponentModule, ForgotPasswordComponent, ForgotPasswordComponentModule, IconComponent, IconComponentModule, IconLabelComponent, IconLabelComponentModule, LabelComponent, LabelComponentModule, LabelSizeEnum, LoginComponent, LoginComponentModule, LogoComponent, LogoComponentModule, LogoPathEnum, LogoTypeEnum, NavbarComponent, NavbarComponentModule, NavigationComponent, NavigationComponentModule, PaginatorComponent, PaginatorComponentModule, ProgressBarComponent, ProgressBarComponentModule, RadioButtonComponent, RadioButtonComponentModule, RatingComponent, RatingComponentModule, SnackbarComponent, SnackbarComponentModule, SnackbarService, SpinnerComponent, SpinnerComponentModule, TableComponent, TableComponentModule, TagComponent, TagComponentModule, TooltipComponent, TooltipComponentModule, TooltipPositionType, preloadLang };
|
|
4289
|
+
export { AlertBannerComponent, AlertBannerComponentModule, AvatarComponent, AvatarComponentModule, BannerActionComponent, BannerActionComponentModule, ButtonComponent, ButtonComponentModule, CardComponent, CardComponentModule, CheckboxComponent, CheckboxComponentModule, ColumnAlignmentEnum, ColumnTypeEnum, ConfirmDialogComponent, ConfirmDialogComponentModule, CreateAccountComponent, CreateAccountComponentModule, CreatePasswordComponent, CreatePasswordComponentModule, DataPropertyGetterPipe, DatepickerComponent, DatepickerComponentModule, DialogComponent, DialogComponentModule, DialogService, DropdownComponent, DropdownComponentModule, ElevationShadowComponent, ElevationShadowComponentModule, ElevationType, FieldComponent, FieldComponentModule, FileUploadComponent, FileUploadComponentModule, ForgotPasswordComponent, ForgotPasswordComponentModule, IconComponent, IconComponentModule, IconLabelComponent, IconLabelComponentModule, LabelComponent, LabelComponentModule, LabelSizeEnum, LoginComponent, LoginComponentModule, LogoComponent, LogoComponentModule, LogoPathEnum, LogoTypeEnum, NavbarComponent, NavbarComponentModule, NavigationComponent, NavigationComponentModule, PaginatorComponent, PaginatorComponentModule, ProgressBarComponent, ProgressBarComponentModule, RadioButtonComponent, RadioButtonComponentModule, RatingComponent, RatingComponentModule, SnackbarComponent, SnackbarComponentModule, SnackbarService, SpinnerComponent, SpinnerComponentModule, TableComponent, TableComponentModule, TagComponent, TagComponentModule, ToggleComponent, ToggleComponentModule, TooltipComponent, TooltipComponentModule, TooltipPositionType, preloadLang };
|
|
3957
4290
|
//# sourceMappingURL=testgorilla-tgo-ui.mjs.map
|