@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: [{
|
|
@@ -1822,6 +1822,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1822
1822
|
class FileUploadComponent {
|
|
1823
1823
|
constructor() {
|
|
1824
1824
|
this.class = 'ui-file-upload';
|
|
1825
|
+
/**
|
|
1826
|
+
* Existing file information
|
|
1827
|
+
*
|
|
1828
|
+
* @type {(File | null)}
|
|
1829
|
+
* @memberof FileUploadComponent
|
|
1830
|
+
*/
|
|
1831
|
+
this.file = null;
|
|
1825
1832
|
this.OnDrop = new EventEmitter();
|
|
1826
1833
|
/**
|
|
1827
1834
|
* @ignore
|
|
@@ -1831,7 +1838,6 @@ class FileUploadComponent {
|
|
|
1831
1838
|
* @ignore
|
|
1832
1839
|
*/
|
|
1833
1840
|
this.onTouch = () => { };
|
|
1834
|
-
this.file = null;
|
|
1835
1841
|
this.progress = false;
|
|
1836
1842
|
this.success = false;
|
|
1837
1843
|
}
|
|
@@ -1870,7 +1876,7 @@ class FileUploadComponent {
|
|
|
1870
1876
|
return this.errors ? true : false;
|
|
1871
1877
|
}
|
|
1872
1878
|
ngOnChanges(changes) {
|
|
1873
|
-
if (changes['uploadProgress']) {
|
|
1879
|
+
if (changes['uploadProgress'] || changes['file']) {
|
|
1874
1880
|
this.progress = this.showProgress();
|
|
1875
1881
|
this.success = this.showSuccess();
|
|
1876
1882
|
this.browse = this.showBrowse();
|
|
@@ -1900,13 +1906,13 @@ class FileUploadComponent {
|
|
|
1900
1906
|
}
|
|
1901
1907
|
}
|
|
1902
1908
|
FileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1903
|
-
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: [
|
|
1909
|
+
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: [
|
|
1904
1910
|
{
|
|
1905
1911
|
provide: NG_VALUE_ACCESSOR,
|
|
1906
1912
|
useExisting: forwardRef(() => FileUploadComponent),
|
|
1907
1913
|
multi: true,
|
|
1908
1914
|
},
|
|
1909
|
-
], usesOnChanges: true, ngImport: i0, template: "<div
|
|
1915
|
+
], 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: [
|
|
1910
1916
|
trigger('inOutAnimation', [
|
|
1911
1917
|
transition(':enter', [
|
|
1912
1918
|
style({ opacity: 0, height: 0 }),
|
|
@@ -1977,7 +1983,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1977
1983
|
animate('0.2s ease-in', style({ opacity: 0, height: 0 })),
|
|
1978
1984
|
]),
|
|
1979
1985
|
]),
|
|
1980
|
-
], template: "<div
|
|
1986
|
+
], 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"] }]
|
|
1981
1987
|
}], ctorParameters: function () { return []; }, propDecorators: { class: [{
|
|
1982
1988
|
type: HostBinding
|
|
1983
1989
|
}], maxFileSizeMB: [{
|
|
@@ -1990,6 +1996,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1990
1996
|
type: Input
|
|
1991
1997
|
}], disabled: [{
|
|
1992
1998
|
type: Input
|
|
1999
|
+
}], file: [{
|
|
2000
|
+
type: Input
|
|
1993
2001
|
}], OnDrop: [{
|
|
1994
2002
|
type: Output
|
|
1995
2003
|
}] } });
|
|
@@ -3309,40 +3317,147 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3309
3317
|
class TagComponent {
|
|
3310
3318
|
constructor() {
|
|
3311
3319
|
/**
|
|
3312
|
-
*
|
|
3320
|
+
* Icon
|
|
3313
3321
|
*
|
|
3314
|
-
* @type {
|
|
3322
|
+
* @type {string}
|
|
3315
3323
|
* @memberof TagComponent
|
|
3316
3324
|
*/
|
|
3317
|
-
this.
|
|
3325
|
+
this.icon = '';
|
|
3326
|
+
/**
|
|
3327
|
+
* Whether to allow the tag to be closed.
|
|
3328
|
+
*
|
|
3329
|
+
* @type {boolean}
|
|
3330
|
+
* @default false
|
|
3331
|
+
* @memberof TagComponent
|
|
3332
|
+
*/
|
|
3333
|
+
this.allowClose = false;
|
|
3334
|
+
/**
|
|
3335
|
+
* Whether the tag is in read-only mode.
|
|
3336
|
+
*
|
|
3337
|
+
* @type {boolean}
|
|
3338
|
+
* @default false
|
|
3339
|
+
* @memberof TagComponent
|
|
3340
|
+
*/
|
|
3341
|
+
this.readOnly = false;
|
|
3342
|
+
/**
|
|
3343
|
+
* Whether the tag is selected.
|
|
3344
|
+
*
|
|
3345
|
+
* @type {boolean}
|
|
3346
|
+
* @default false
|
|
3347
|
+
* @memberof TagComponent
|
|
3348
|
+
*/
|
|
3349
|
+
this.isSelected = false;
|
|
3350
|
+
/**
|
|
3351
|
+
* Display icon when is selected
|
|
3352
|
+
*
|
|
3353
|
+
* @type {boolean}
|
|
3354
|
+
* @default false
|
|
3355
|
+
* @memberof TagComponent
|
|
3356
|
+
*/
|
|
3357
|
+
this.showIconWhenSelected = false;
|
|
3358
|
+
/**
|
|
3359
|
+
* Specifies whether the element is disabled.
|
|
3360
|
+
*
|
|
3361
|
+
* @type {boolean}
|
|
3362
|
+
* @default false
|
|
3363
|
+
* @memberof TagComponent
|
|
3364
|
+
*/
|
|
3365
|
+
this.isDisabled = false;
|
|
3366
|
+
/**
|
|
3367
|
+
* Event triggered when the tag should be closed.
|
|
3368
|
+
*
|
|
3369
|
+
* @event
|
|
3370
|
+
* @memberof TagComponent
|
|
3371
|
+
*/
|
|
3372
|
+
this.close = new EventEmitter();
|
|
3373
|
+
/**
|
|
3374
|
+
* Event triggered when a press action occurs.
|
|
3375
|
+
*
|
|
3376
|
+
* @event
|
|
3377
|
+
* @memberof TagComponent
|
|
3378
|
+
*/
|
|
3379
|
+
this.press = new EventEmitter();
|
|
3380
|
+
/**
|
|
3381
|
+
* Subject that needs to be triggered when Label input changes, to check if it's truncated
|
|
3382
|
+
* @private
|
|
3383
|
+
* @type {void}
|
|
3384
|
+
* @memberof TagComponent
|
|
3385
|
+
*/
|
|
3386
|
+
this.checkLabelEllipsis$ = new ReplaySubject(1);
|
|
3387
|
+
/**
|
|
3388
|
+
* Observable that indicates if the Label is truncated
|
|
3389
|
+
* debounceTime is used to wait for view to be initialized after receiving a new Label input
|
|
3390
|
+
* @protected
|
|
3391
|
+
* @type {boolean}
|
|
3392
|
+
* @memberof TagComponent
|
|
3393
|
+
*/
|
|
3394
|
+
this.isEllipseActiveObs$ = this.checkLabelEllipsis$.pipe(debounceTime(100), map(() => {
|
|
3395
|
+
const el = this.labelElement.nativeElement;
|
|
3396
|
+
return el.offsetWidth < el.scrollWidth;
|
|
3397
|
+
}));
|
|
3398
|
+
this.labelText = '';
|
|
3399
|
+
}
|
|
3400
|
+
/**
|
|
3401
|
+
* Tag's label
|
|
3402
|
+
*
|
|
3403
|
+
* @memberof TagComponent
|
|
3404
|
+
*/
|
|
3405
|
+
set label(value) {
|
|
3406
|
+
this.labelText = value;
|
|
3407
|
+
if (this.labelElement) {
|
|
3408
|
+
this.isLabelEllipseActive();
|
|
3409
|
+
}
|
|
3410
|
+
}
|
|
3411
|
+
ngAfterViewInit() {
|
|
3412
|
+
this.isLabelEllipseActive();
|
|
3413
|
+
}
|
|
3414
|
+
onPress() {
|
|
3415
|
+
if (!this.readOnly && !this.allowClose) {
|
|
3416
|
+
this.isSelected = this.showIconWhenSelected ? !this.isSelected : false;
|
|
3417
|
+
this.press.emit(this.isSelected);
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
onClose() {
|
|
3421
|
+
this.close.emit();
|
|
3422
|
+
}
|
|
3423
|
+
isLabelEllipseActive() {
|
|
3424
|
+
this.checkLabelEllipsis$.next();
|
|
3425
|
+
}
|
|
3426
|
+
get tabIndex() {
|
|
3427
|
+
return this.isDisabled || this.readOnly ? -1 : 0;
|
|
3428
|
+
}
|
|
3429
|
+
get filled() {
|
|
3430
|
+
return this.readOnly || this.allowClose || this.isSelected;
|
|
3318
3431
|
}
|
|
3319
3432
|
}
|
|
3320
3433
|
TagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3321
|
-
TagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TagComponent, selector: "ui-tag", inputs: {
|
|
3434
|
+
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" }] });
|
|
3322
3435
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponent, decorators: [{
|
|
3323
3436
|
type: Component,
|
|
3324
|
-
args: [{ selector: 'ui-tag', template: "<
|
|
3325
|
-
}],
|
|
3437
|
+
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"] }]
|
|
3438
|
+
}], propDecorators: { label: [{
|
|
3326
3439
|
type: Input
|
|
3327
|
-
}],
|
|
3440
|
+
}], icon: [{
|
|
3441
|
+
type: Input
|
|
3442
|
+
}], allowClose: [{
|
|
3328
3443
|
type: Input
|
|
3444
|
+
}], readOnly: [{
|
|
3445
|
+
type: Input
|
|
3446
|
+
}], isSelected: [{
|
|
3447
|
+
type: Input
|
|
3448
|
+
}], showIconWhenSelected: [{
|
|
3449
|
+
type: Input
|
|
3450
|
+
}], isDisabled: [{
|
|
3451
|
+
type: Input
|
|
3452
|
+
}], close: [{
|
|
3453
|
+
type: Output
|
|
3454
|
+
}], press: [{
|
|
3455
|
+
type: Output
|
|
3456
|
+
}], labelElement: [{
|
|
3457
|
+
type: ViewChild,
|
|
3458
|
+
args: ['labelElement']
|
|
3329
3459
|
}] } });
|
|
3330
3460
|
|
|
3331
|
-
class TagComponentModule {
|
|
3332
|
-
}
|
|
3333
|
-
TagComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3334
|
-
TagComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, declarations: [TagComponent], imports: [CommonModule], exports: [TagComponent] });
|
|
3335
|
-
TagComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, imports: [CommonModule] });
|
|
3336
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, decorators: [{
|
|
3337
|
-
type: NgModule,
|
|
3338
|
-
args: [{
|
|
3339
|
-
declarations: [TagComponent],
|
|
3340
|
-
imports: [CommonModule],
|
|
3341
|
-
exports: [TagComponent],
|
|
3342
|
-
providers: [],
|
|
3343
|
-
}]
|
|
3344
|
-
}] });
|
|
3345
|
-
|
|
3346
3461
|
var TooltipPositionType;
|
|
3347
3462
|
(function (TooltipPositionType) {
|
|
3348
3463
|
TooltipPositionType["TOP"] = "top";
|
|
@@ -3411,6 +3526,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3411
3526
|
}]
|
|
3412
3527
|
}] });
|
|
3413
3528
|
|
|
3529
|
+
class TagComponentModule {
|
|
3530
|
+
}
|
|
3531
|
+
TagComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3532
|
+
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] });
|
|
3533
|
+
TagComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, imports: [CommonModule, IconComponentModule, TooltipComponentModule, MatTooltipModule] });
|
|
3534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TagComponentModule, decorators: [{
|
|
3535
|
+
type: NgModule,
|
|
3536
|
+
args: [{
|
|
3537
|
+
declarations: [TagComponent],
|
|
3538
|
+
imports: [CommonModule, IconComponentModule, TooltipComponentModule, MatTooltipModule],
|
|
3539
|
+
exports: [TagComponent],
|
|
3540
|
+
providers: [],
|
|
3541
|
+
}]
|
|
3542
|
+
}] });
|
|
3543
|
+
|
|
3414
3544
|
class DropdownComponent {
|
|
3415
3545
|
constructor() {
|
|
3416
3546
|
this.class = 'ui-dropdown';
|
|
@@ -3930,6 +4060,208 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3930
4060
|
}]
|
|
3931
4061
|
}] });
|
|
3932
4062
|
|
|
4063
|
+
class ToggleComponent {
|
|
4064
|
+
constructor() {
|
|
4065
|
+
/**
|
|
4066
|
+
* The `selected` property determines the current state of the toggle switch.
|
|
4067
|
+
*
|
|
4068
|
+
* @type {boolean}
|
|
4069
|
+
* @default false
|
|
4070
|
+
* @memberof ToggleComponent
|
|
4071
|
+
*/
|
|
4072
|
+
this.selected = false;
|
|
4073
|
+
/**
|
|
4074
|
+
* The `disabled` property determines whether the toggle switch is disabled.
|
|
4075
|
+
*
|
|
4076
|
+
* @type {boolean}
|
|
4077
|
+
* @default false
|
|
4078
|
+
* @memberof ToggleComponent
|
|
4079
|
+
*/
|
|
4080
|
+
this.disabled = false;
|
|
4081
|
+
/**
|
|
4082
|
+
* The `toggle` event is triggered when the state of the toggle switch changes. It returns the new state.
|
|
4083
|
+
*
|
|
4084
|
+
* @type {event}
|
|
4085
|
+
* @memberof ToggleComponent
|
|
4086
|
+
*/
|
|
4087
|
+
this.toggle = new EventEmitter();
|
|
4088
|
+
this.onChange = () => { };
|
|
4089
|
+
this.onTouched = () => { };
|
|
4090
|
+
}
|
|
4091
|
+
onToggle() {
|
|
4092
|
+
if (!this.disabled) {
|
|
4093
|
+
this.selected = !this.selected;
|
|
4094
|
+
this.toggle.emit(this.selected);
|
|
4095
|
+
}
|
|
4096
|
+
}
|
|
4097
|
+
writeValue(state) {
|
|
4098
|
+
if (state) {
|
|
4099
|
+
this.selected = state;
|
|
4100
|
+
}
|
|
4101
|
+
}
|
|
4102
|
+
registerOnChange(fn) {
|
|
4103
|
+
this.onChange = fn;
|
|
4104
|
+
}
|
|
4105
|
+
registerOnTouched(fn) {
|
|
4106
|
+
this.onTouched = fn;
|
|
4107
|
+
}
|
|
4108
|
+
setDisabledState(isDisabled) {
|
|
4109
|
+
this.disabled = isDisabled;
|
|
4110
|
+
}
|
|
4111
|
+
}
|
|
4112
|
+
ToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4113
|
+
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: [
|
|
4114
|
+
{
|
|
4115
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4116
|
+
useExisting: forwardRef(() => ToggleComponent),
|
|
4117
|
+
multi: true,
|
|
4118
|
+
},
|
|
4119
|
+
], 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"] }] });
|
|
4120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponent, decorators: [{
|
|
4121
|
+
type: Component,
|
|
4122
|
+
args: [{ selector: 'ui-toggle', providers: [
|
|
4123
|
+
{
|
|
4124
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4125
|
+
useExisting: forwardRef(() => ToggleComponent),
|
|
4126
|
+
multi: true,
|
|
4127
|
+
},
|
|
4128
|
+
], 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"] }]
|
|
4129
|
+
}], propDecorators: { selected: [{
|
|
4130
|
+
type: Input
|
|
4131
|
+
}], disabled: [{
|
|
4132
|
+
type: Input
|
|
4133
|
+
}], toggle: [{
|
|
4134
|
+
type: Output
|
|
4135
|
+
}] } });
|
|
4136
|
+
|
|
4137
|
+
class ToggleComponentModule {
|
|
4138
|
+
}
|
|
4139
|
+
ToggleComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4140
|
+
ToggleComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponentModule, declarations: [ToggleComponent], imports: [CommonModule] });
|
|
4141
|
+
ToggleComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponentModule, imports: [CommonModule] });
|
|
4142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ToggleComponentModule, decorators: [{
|
|
4143
|
+
type: NgModule,
|
|
4144
|
+
args: [{
|
|
4145
|
+
declarations: [ToggleComponent],
|
|
4146
|
+
imports: [CommonModule],
|
|
4147
|
+
}]
|
|
4148
|
+
}] });
|
|
4149
|
+
|
|
4150
|
+
var AvatarSize;
|
|
4151
|
+
(function (AvatarSize) {
|
|
4152
|
+
AvatarSize["SMALL"] = "small";
|
|
4153
|
+
AvatarSize["MEDIUM"] = "medium";
|
|
4154
|
+
AvatarSize["LARGE"] = "large";
|
|
4155
|
+
})(AvatarSize || (AvatarSize = {}));
|
|
4156
|
+
const iconSize = {
|
|
4157
|
+
small: '16',
|
|
4158
|
+
medium: '24',
|
|
4159
|
+
large: '80',
|
|
4160
|
+
};
|
|
4161
|
+
|
|
4162
|
+
class NameInitialsPipe {
|
|
4163
|
+
transform(value) {
|
|
4164
|
+
const initials = value.split(' ').filter(Boolean);
|
|
4165
|
+
if (initials.length > 1) {
|
|
4166
|
+
return initials.map(initial => initial[0].toUpperCase()).join('');
|
|
4167
|
+
}
|
|
4168
|
+
else {
|
|
4169
|
+
const firstLetters = value.substring(0, 2);
|
|
4170
|
+
return `${firstLetters[0]?.toUpperCase() ?? ''}${firstLetters[1]?.toLowerCase() ?? ''}`;
|
|
4171
|
+
}
|
|
4172
|
+
}
|
|
4173
|
+
}
|
|
4174
|
+
NameInitialsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NameInitialsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4175
|
+
NameInitialsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NameInitialsPipe, name: "nameInitials" });
|
|
4176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NameInitialsPipe, decorators: [{
|
|
4177
|
+
type: Pipe,
|
|
4178
|
+
args: [{
|
|
4179
|
+
name: 'nameInitials',
|
|
4180
|
+
}]
|
|
4181
|
+
}] });
|
|
4182
|
+
|
|
4183
|
+
class AvatarComponent {
|
|
4184
|
+
constructor() {
|
|
4185
|
+
/**
|
|
4186
|
+
* Input property for specifying the size of the avatar.
|
|
4187
|
+
* @type {AvatarSize}
|
|
4188
|
+
* @default AvatarSize.SMALL
|
|
4189
|
+
* @memberof AvatarComponent
|
|
4190
|
+
*/
|
|
4191
|
+
this.size = AvatarSize.SMALL;
|
|
4192
|
+
/**
|
|
4193
|
+
* Input property for specifying the URL of the image to display in the avatar.
|
|
4194
|
+
* @type {string}
|
|
4195
|
+
* @memberof AvatarComponent
|
|
4196
|
+
*/
|
|
4197
|
+
this.imageUrl = '';
|
|
4198
|
+
/**
|
|
4199
|
+
* Input property for specifying the initials to display in the avatar.
|
|
4200
|
+
* @type {string}
|
|
4201
|
+
* @memberof AvatarComponent
|
|
4202
|
+
*/
|
|
4203
|
+
this.name = '';
|
|
4204
|
+
/**
|
|
4205
|
+
* Input property for specifying the tooltip text for edit.
|
|
4206
|
+
* @type {string}
|
|
4207
|
+
* @memberof AvatarComponent
|
|
4208
|
+
*/
|
|
4209
|
+
this.tooltipText = '';
|
|
4210
|
+
/**
|
|
4211
|
+
* Input property that makes avatar clickable.
|
|
4212
|
+
* @type {boolean}
|
|
4213
|
+
* @memberof AvatarComponent
|
|
4214
|
+
*/
|
|
4215
|
+
this.allowClick = false;
|
|
4216
|
+
/**
|
|
4217
|
+
* Event emitted when the avatar is clicked.
|
|
4218
|
+
* @type {void}
|
|
4219
|
+
* @memberof AvatarComponent
|
|
4220
|
+
*/
|
|
4221
|
+
this.avatarClick = new EventEmitter();
|
|
4222
|
+
this.iconSize = iconSize;
|
|
4223
|
+
this.avatarSize = AvatarSize;
|
|
4224
|
+
}
|
|
4225
|
+
onAvatarClick() {
|
|
4226
|
+
this.avatarClick.emit();
|
|
4227
|
+
}
|
|
4228
|
+
get clickAllowance() {
|
|
4229
|
+
return this.allowClick ? 'clickable' : 'non-clickable';
|
|
4230
|
+
}
|
|
4231
|
+
}
|
|
4232
|
+
AvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4233
|
+
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" }] });
|
|
4234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
4235
|
+
type: Component,
|
|
4236
|
+
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"] }]
|
|
4237
|
+
}], propDecorators: { size: [{
|
|
4238
|
+
type: Input
|
|
4239
|
+
}], imageUrl: [{
|
|
4240
|
+
type: Input
|
|
4241
|
+
}], name: [{
|
|
4242
|
+
type: Input
|
|
4243
|
+
}], tooltipText: [{
|
|
4244
|
+
type: Input
|
|
4245
|
+
}], allowClick: [{
|
|
4246
|
+
type: Input
|
|
4247
|
+
}], avatarClick: [{
|
|
4248
|
+
type: Output
|
|
4249
|
+
}] } });
|
|
4250
|
+
|
|
4251
|
+
class AvatarComponentModule {
|
|
4252
|
+
}
|
|
4253
|
+
AvatarComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4254
|
+
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] });
|
|
4255
|
+
AvatarComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponentModule, imports: [CommonModule, IconComponentModule, MatTooltipModule] });
|
|
4256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AvatarComponentModule, decorators: [{
|
|
4257
|
+
type: NgModule,
|
|
4258
|
+
args: [{
|
|
4259
|
+
declarations: [AvatarComponent, NameInitialsPipe],
|
|
4260
|
+
imports: [CommonModule, IconComponentModule, MatTooltipModule],
|
|
4261
|
+
exports: [AvatarComponent],
|
|
4262
|
+
}]
|
|
4263
|
+
}] });
|
|
4264
|
+
|
|
3933
4265
|
/* eslint-disable */
|
|
3934
4266
|
/* Components */
|
|
3935
4267
|
// Alert Banner
|
|
@@ -3938,5 +4270,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3938
4270
|
* Generated bundle index. Do not edit.
|
|
3939
4271
|
*/
|
|
3940
4272
|
|
|
3941
|
-
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 };
|
|
4273
|
+
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 };
|
|
3942
4274
|
//# sourceMappingURL=testgorilla-tgo-ui.mjs.map
|