@seniorsistemas/angular-components 15.0.0 → 15.0.2

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.
Files changed (39) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +73 -65
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/file-upload/file-upload.component.d.ts +17 -33
  6. package/components/file-upload/index.d.ts +3 -2
  7. package/components/file-upload/models/file-dto.d.ts +11 -0
  8. package/components/file-upload/models/index.d.ts +2 -0
  9. package/components/file-upload/models/validate-errors.d.ts +4 -0
  10. package/components/token-list/index.d.ts +3 -2
  11. package/components/token-list/models/index.d.ts +1 -0
  12. package/components/token-list/models/token.d.ts +5 -0
  13. package/components/token-list/token-list.component.d.ts +1 -4
  14. package/esm2015/components/file-upload/file-upload.component.js +49 -63
  15. package/esm2015/components/file-upload/file-upload.module.js +7 -2
  16. package/esm2015/components/file-upload/index.js +4 -3
  17. package/esm2015/components/file-upload/models/file-dto.js +1 -0
  18. package/esm2015/components/file-upload/models/index.js +2 -0
  19. package/esm2015/components/file-upload/models/validate-errors.js +6 -0
  20. package/esm2015/components/token-list/index.js +3 -3
  21. package/esm2015/components/token-list/models/index.js +1 -0
  22. package/esm2015/components/token-list/models/token.js +1 -0
  23. package/esm2015/components/token-list/token-list.component.js +2 -2
  24. package/esm5/components/file-upload/file-upload.component.js +65 -67
  25. package/esm5/components/file-upload/file-upload.module.js +7 -2
  26. package/esm5/components/file-upload/index.js +4 -3
  27. package/esm5/components/file-upload/models/file-dto.js +1 -0
  28. package/esm5/components/file-upload/models/index.js +2 -0
  29. package/esm5/components/file-upload/models/validate-errors.js +6 -0
  30. package/esm5/components/token-list/index.js +3 -3
  31. package/esm5/components/token-list/models/index.js +1 -0
  32. package/esm5/components/token-list/models/token.js +1 -0
  33. package/esm5/components/token-list/token-list.component.js +2 -2
  34. package/fesm2015/seniorsistemas-angular-components.js +58 -62
  35. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  36. package/fesm5/seniorsistemas-angular-components.js +73 -65
  37. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  38. package/package.json +1 -1
  39. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -2702,6 +2702,12 @@ var EmptyStateModule = /** @class */ (function () {
2702
2702
  return EmptyStateModule;
2703
2703
  }());
2704
2704
 
2705
+ var ValidateErrors;
2706
+ (function (ValidateErrors) {
2707
+ ValidateErrors["MAX_FILE_SIZE"] = "MAX_FILE_SIZE";
2708
+ ValidateErrors["MAX_FILE_LIMIT"] = "MAX_FILE_LIMIT";
2709
+ })(ValidateErrors || (ValidateErrors = {}));
2710
+
2705
2711
  var Breakpoints = {
2706
2712
  SM_MIN: 0,
2707
2713
  SM_MAX: 767,
@@ -2808,14 +2814,10 @@ var ExportUtils = /** @class */ (function () {
2808
2814
  return ExportUtils;
2809
2815
  }());
2810
2816
 
2811
- var ValidateErrors;
2812
- (function (ValidateErrors) {
2813
- ValidateErrors["MAX_FILE_SIZE"] = "MAX_FILE_SIZE";
2814
- ValidateErrors["MAX_FILE_LIMIT"] = "MAX_FILE_LIMIT";
2815
- })(ValidateErrors || (ValidateErrors = {}));
2816
2817
  var FileUploadComponent = /** @class */ (function () {
2817
2818
  function FileUploadComponent(sanitizer) {
2818
2819
  this.sanitizer = sanitizer;
2820
+ this.inputValue = "";
2819
2821
  this.id = "s-file-upload-" + FileUploadComponent_1.nextId++;
2820
2822
  this.chooseLabel = "Anexar arquivos";
2821
2823
  this.removeLabel = "Remover";
@@ -2828,12 +2830,10 @@ var FileUploadComponent = /** @class */ (function () {
2828
2830
  this.cancelUpload = new EventEmitter();
2829
2831
  this.downloadFile = new EventEmitter();
2830
2832
  this.validateErros = new EventEmitter();
2831
- this.uploadedFileCount = 0;
2832
2833
  this._files = [];
2833
2834
  this.ngUsubscribe = new Subject();
2834
2835
  }
2835
2836
  FileUploadComponent_1 = FileUploadComponent;
2836
- FileUploadComponent.prototype.ngOnInit = function () { };
2837
2837
  FileUploadComponent.prototype.ngOnDestroy = function () {
2838
2838
  this.ngUsubscribe.next();
2839
2839
  this.ngUsubscribe.complete();
@@ -2844,91 +2844,94 @@ var FileUploadComponent = /** @class */ (function () {
2844
2844
  FileUploadComponent.prototype.onResize = function () {
2845
2845
  this.update();
2846
2846
  };
2847
- FileUploadComponent.prototype.update = function () {
2848
- var windowWidth = window.innerWidth;
2849
- this.isSmallDevice = windowWidth <= Breakpoints.SM_MAX;
2850
- };
2851
2847
  FileUploadComponent.prototype.onFileSelect = function (files) {
2852
- var previousFiles = __spread(this.files);
2848
+ var e_1, _a;
2849
+ var newFiles = [];
2853
2850
  if (!this.multiple) {
2854
2851
  this.files = [];
2855
2852
  }
2856
- if (this.fileLimit) {
2857
- this.uploadedFileCount += files.length;
2858
- if (this.isFileLimitExceeded()) {
2859
- this.uploadedFileCount -= this.files.length;
2860
- this.validateErros.emit(ValidateErrors.MAX_FILE_LIMIT);
2861
- return;
2862
- }
2853
+ if (this.isFileLimitExceeded(files)) {
2854
+ this.validateErros.emit(ValidateErrors.MAX_FILE_LIMIT);
2855
+ return;
2863
2856
  }
2864
- for (var i = 0; i < files.length; i++) {
2865
- var file = files[i];
2866
- if (this.isFileSizeExceeded(file)) {
2867
- this.validateErros.emit(ValidateErrors.MAX_FILE_SIZE);
2868
- this.files = previousFiles;
2869
- return;
2857
+ try {
2858
+ for (var files_1 = __values(files), files_1_1 = files_1.next(); !files_1_1.done; files_1_1 = files_1.next()) {
2859
+ var file = files_1_1.value;
2860
+ if (this.isFileSizeExceeded(file)) {
2861
+ this.validateErros.emit(ValidateErrors.MAX_FILE_SIZE);
2862
+ return;
2863
+ }
2864
+ newFiles.push(file);
2870
2865
  }
2871
- else {
2872
- this.files.push(file);
2866
+ }
2867
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2868
+ finally {
2869
+ try {
2870
+ if (files_1_1 && !files_1_1.done && (_a = files_1.return)) _a.call(files_1);
2873
2871
  }
2872
+ finally { if (e_1) throw e_1.error; }
2874
2873
  }
2875
- if (this.hasFiles()) {
2876
- this.uploadHandler.emit({ files: this.files });
2874
+ if (newFiles.length) {
2875
+ this.files = this.files.concat(newFiles);
2876
+ this.uploadHandler.emit({
2877
+ files: newFiles,
2878
+ });
2877
2879
  this.inputUpload.nativeElement.value = "";
2878
2880
  }
2879
2881
  };
2880
- FileUploadComponent.prototype.onRemoveFile = function (event, file) {
2881
- this.files.splice(this.files.indexOf(file), 1);
2882
- this.uploadedFileCount -= 1;
2883
- this.removeFile.emit({ file: file });
2884
- event.preventDefault();
2885
- };
2886
- FileUploadComponent.prototype.onCancelUpload = function (event, index) {
2887
- this.uploadedFileCount -= 1;
2888
- this.files.splice(index, 1);
2889
- this.cancelUpload.emit(index);
2890
- event.preventDefault();
2882
+ FileUploadComponent.prototype.onRemoveFile = function (file) {
2883
+ var fileIndex = this.files.indexOf(file);
2884
+ var removedFiles = this.files.splice(fileIndex, 1);
2885
+ if (removedFiles.length) {
2886
+ this.removeFile.emit({ file: file });
2887
+ }
2891
2888
  };
2892
- FileUploadComponent.prototype.onDowloadFile = function (event, index) {
2893
- this.downloadFile.emit({ index: index, anchor: this.anchor });
2894
- event.preventDefault();
2889
+ FileUploadComponent.prototype.onCancelUpload = function (index) {
2890
+ var removedFiles = this.files.splice(index, 1);
2891
+ if (removedFiles.length) {
2892
+ this.cancelUpload.emit(index);
2893
+ }
2895
2894
  };
2896
- FileUploadComponent.prototype.hasFiles = function () {
2897
- return this.files && this.files.length > 0;
2895
+ FileUploadComponent.prototype.onDowloadFile = function (index) {
2896
+ this.downloadFile.emit({
2897
+ index: index,
2898
+ anchor: this.anchor,
2899
+ });
2898
2900
  };
2899
2901
  Object.defineProperty(FileUploadComponent.prototype, "files", {
2900
2902
  get: function () {
2901
2903
  return this._files;
2902
2904
  },
2903
2905
  set: function (files) {
2904
- this._files = [];
2905
- for (var i = 0; i < files.length; i++) {
2906
- var file = files[i];
2907
- if (this.isImage(file)) {
2908
- file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(files[i]));
2906
+ var _this = this;
2907
+ this._files = files.map(function (file) {
2908
+ if (_this.isImage(file)) {
2909
+ file.objectURL = _this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(file));
2909
2910
  }
2910
- this._files.push(files[i]);
2911
- }
2911
+ return file;
2912
+ });
2912
2913
  },
2913
2914
  enumerable: true,
2914
2915
  configurable: true
2915
2916
  });
2916
- FileUploadComponent.prototype.getFileSize = function (size) {
2917
- return (size / 1024).toFixed(2);
2917
+ FileUploadComponent.prototype.update = function () {
2918
+ var windowWidth = window.innerWidth;
2919
+ this.isSmallDevice = windowWidth <= Breakpoints.SM_MAX;
2918
2920
  };
2919
2921
  FileUploadComponent.prototype.isImage = function (file) {
2920
2922
  return /^image\//.test(file.type);
2921
2923
  };
2922
- FileUploadComponent.prototype.defaltCatchError = function (err, index) {
2923
- this.files[index].error = err;
2924
- this.files[index].isUploading = false;
2925
- throw new Error("error in upload file. Details: " + err.message);
2926
- };
2927
- FileUploadComponent.prototype.isFileLimitExceeded = function () {
2928
- return this.fileLimit && this.fileLimit < this.files.length + this.uploadedFileCount;
2924
+ FileUploadComponent.prototype.isFileLimitExceeded = function (files) {
2925
+ if (!this.fileLimit) {
2926
+ return false;
2927
+ }
2928
+ return this.files.length + files.length > this.fileLimit;
2929
2929
  };
2930
2930
  FileUploadComponent.prototype.isFileSizeExceeded = function (file) {
2931
- return this.maxFileSize && file.size > this.maxFileSize;
2931
+ if (!this.maxFileSize) {
2932
+ return false;
2933
+ }
2934
+ return file.size > this.maxFileSize;
2932
2935
  };
2933
2936
  var FileUploadComponent_1;
2934
2937
  FileUploadComponent.nextId = 0;
@@ -3013,7 +3016,7 @@ var FileUploadComponent = /** @class */ (function () {
3013
3016
  FileUploadComponent = FileUploadComponent_1 = __decorate([
3014
3017
  Component({
3015
3018
  selector: "s-file-upload",
3016
- template: "<div class=\"s-fileupload\" [id]=\"id\">\n <div class=\"s-fileupload-choose\">\n <input type=\"file\" name=\"file\" [accept]=\"accept\" [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer ? $event.dataTransfer.files : $event.target.files)\" #inputUpload>\n <s-button [id]=\"id + 'upload-button'\" [label]=\"chooseLabel\" (onClick)=\"inputUpload.click()\" priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled\" [auxiliary]=\"false\"></s-button>\n </div>\n\n <section [id]=\"id + 'fileupload-list'\" class=\"s-fileupload-list\" *ngIf=\"files.length\" role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div class=\"s-fileupload-list-file\" role=\"row\">\n <div [id]=\"id + '-file-' + i + '-name'\" class=\"s-fileupload-list-file-name\" role=\"gridcell\">\n <ng-container\n *ngTemplateOutlet=\"file.savedFile || file.progress === 100 ? descriptionUrl : description; context: { $implicit: file, index: i }\">\n </ng-container>\n </div>\n <div class=\"s-fileupload-list-file-status\" role=\"gridcell\">\n <p-progressBar *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\" [showValue]=\"false\" role=\"alert\" [attr.aria-label]=\"ariaLabelProgress\">\n </p-progressBar>\n <span [id]=\"id + '-file-' + i + '-spin'\" class=\"fas fa-circle-notch fa-spin\"\n *ngIf=\"file.isUploading && isSmallDevice\" [attr.aria-label]=\"ariaLabelProgress\"></span>\n <span [id]=\"id + '-file-' + i + '-check'\" class=\"fas fa-check\" role=\"alert\"\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip\" [pTooltip]=\"successTooltip\"\n tooltipPosition=\"top\" showDelay=\"500\" [appendTo]=\"'body'\"></span>\n <span [id]=\"id + '-file-' + i + '-error'\" class=\"fas fa-times\" role=\"alert\"\n *ngIf=\"file.error?.message\" [pTooltip]=\"file.error?.message\" tooltipPosition=\"top\"\n showDelay=\"500\" [appendTo]=\"'body'\"></span>\n </div>\n <div class=\"s-fileupload-list-file-actions\" role=\"gridcell\">\n <a [id]=\"id + '-file-' + i + '-cancel'\" class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload($event, i)\" *ngIf=\"file.isUploading\">{{cancelLabel}}</a>\n <a role=\"button\" tabindex=\"0\" [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\" (click)=\"onRemoveFile($event, file)\"\n *ngIf=\"!file.isUploading && !(disabled || !!formGroup?.disabled)\" [attr.aria-label]=\"ariaLabelRemove || removeLabel\">{{removeLabel}}</a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template #descriptionUrl let-file let-i = index>\n <a [id]=\"id + '-file-' + i + '-name-link'\" tabindex=\"0\" (click)=\"onDowloadFile($event, i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}</a>\n <a style=\"display: none;\" [href]=\"file.objectURL\" target=\"_blank\" download #anchor></a>\n</ng-template>\n\n<ng-template #description let-file>\n <span tabindex=\"0\" [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
3019
+ template: "<div\n [id]=\"id\"\n class=\"s-fileupload\">\n <div class=\"s-fileupload-choose\">\n <input\n #inputUpload\n [id]=\"id+'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)\"> \n <s-button\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled\"\n [auxiliary]=\"false\">\n </s-button>\n </div>\n\n <section\n *ngIf=\"files.length\" \n [id]=\"id + 'fileupload-list'\"\n class=\"s-fileupload-list\"\n role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\">\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\">\n <ng-container *ngTemplateOutlet=\"file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }\">\n </ng-container>\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\">\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress\">\n </p-progressBar>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress\">\n </span>\n <span\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip\"\n [pTooltip]=\"successTooltip\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n <span\n *ngIf=\"file.error?.message\" \n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\">\n <a\n *ngIf=\"file.isUploading\"\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\">\n {{cancelLabel}}\n </a>\n <a\n *ngIf=\"!file.isUploading && !(disabled || !!formGroup?.disabled)\"\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"ariaLabelRemove || removeLabel\">\n {{removeLabel}}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}\n </a>\n <a\n style=\"display: none;\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
3017
3020
  styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name>a{cursor:pointer;text-decoration:none}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-fileupload-list .s-fileupload-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-check{color:#0c9348;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-times{color:#c13018;font-size:12px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin-top:15px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:100%}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action{text-decoration:none;color:#428bca}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :focus,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :visited,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action:hover{text-decoration:none}@media (min-width:768px){.s-fileupload-list .s-fileupload-list-file{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;-ms-flex-positive:2;flex-grow:2}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{margin:0 15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin:0;width:auto}}"]
3018
3021
  })
3019
3022
  ], FileUploadComponent);
@@ -3026,7 +3029,12 @@ var FileUploadModule = /** @class */ (function () {
3026
3029
  FileUploadModule = __decorate([
3027
3030
  NgModule({
3028
3031
  declarations: [FileUploadComponent],
3029
- imports: [CommonModule, ButtonModule, TooltipModule, ProgressBarModule],
3032
+ imports: [
3033
+ CommonModule,
3034
+ ButtonModule,
3035
+ TooltipModule,
3036
+ ProgressBarModule,
3037
+ ],
3030
3038
  exports: [FileUploadComponent],
3031
3039
  })
3032
3040
  ], FileUploadModule);
@@ -4378,7 +4386,7 @@ var TokenListComponent = /** @class */ (function () {
4378
4386
  TokenListComponent = TokenListComponent_1 = __decorate([
4379
4387
  Component({
4380
4388
  selector: "s-token-list",
4381
- template: "<div\n [id]=\"id\"\n class=\"token-list\">\n <ng-container *ngFor=\"let token of tokens\">\n <span\n [id]=\"token.id\"\n class=\"token\"\n [ngClass]=\"{ 'no-pointer-events': hidePointerEvents }\">\n <a\n [id]=\"(token.id || 'token') + '-label'\"\n class=\"token-label\"\n (click)=\"tokenSelected.next(token)\">\n {{ token.label }}\n </a>\n <span\n *ngIf=\"removableTokens\"\n [id]=\"token.id + '-remove'\"\n class=\"token-icon fa fa-fw fa-close\"\n (click)=\"tokenRemoved.next(token)\">\n </span>\n </span>\n </ng-container>\n</div>",
4389
+ template: "<div\n [id]=\"id\"\n class=\"token-list\">\n <ng-container *ngFor=\"let token of tokens\">\n <span\n [id]=\"token.id\"\n class=\"token\"\n [ngClass]=\"{ 'no-pointer-events': hidePointerEvents }\">\n <a\n [id]=\"(token.id || 'token') + '-label'\"\n class=\"token-label\"\n (click)=\"tokenSelected.next(token)\">\n {{ token.label }}\n </a>\n <span\n *ngIf=\"removableTokens && !token.notRemovable\"\n [id]=\"token.id + '-remove'\"\n class=\"token-icon fa fa-fw fa-close\"\n (click)=\"tokenRemoved.next(token)\">\n </span>\n </span>\n </ng-container>\n</div>",
4382
4390
  styles: [".no-pointer-events{pointer-events:none}.token-list{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%;padding:0 10px;text-transform:none}.token-list .token{-ms-flex-align:center;align-items:center;background-color:#ccc;border-radius:4px;color:#333;display:-ms-flexbox;display:flex;font:400 12px/150% \"Open Sans\",sans-serif;margin:2px 5px 0 0;max-width:100%;padding:2px 8px}.token-list .token-label{max-width:50ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.token-list .token:focus,.token-list .token:hover{background-color:#e5eaea}.token-list .token a{text-decoration:none;color:#333}"]
4383
4391
  })
4384
4392
  ], TokenListComponent);