@clr/angular 16.0.0 → 16.0.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.
@@ -19834,11 +19834,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
19834
19834
  * The full license information can be found in LICENSE in the root directory of this project.
19835
19835
  */
19836
19836
  class ClrAlert {
19837
- constructor(iconService, cdr, multiAlertService, commonStrings) {
19837
+ constructor(iconService, cdr, multiAlertService, commonStrings, renderer, hostElement) {
19838
19838
  this.iconService = iconService;
19839
19839
  this.cdr = cdr;
19840
19840
  this.multiAlertService = multiAlertService;
19841
19841
  this.commonStrings = commonStrings;
19842
+ this.renderer = renderer;
19843
+ this.hostElement = hostElement;
19842
19844
  this.isLight = false;
19843
19845
  this.isSmall = false;
19844
19846
  this.closable = true;
@@ -19874,6 +19876,13 @@ class ClrAlert {
19874
19876
  set hidden(value) {
19875
19877
  if (value !== this._hidden) {
19876
19878
  this._hidden = value;
19879
+ // CDE-1249 @HostBinding('class.alert-hidden') decoration will raise error in console https://angular.io/errors/NG0100
19880
+ if (this._hidden) {
19881
+ this.renderer.addClass(this.hostElement.nativeElement, 'alert-hidden');
19882
+ }
19883
+ else {
19884
+ this.renderer.removeClass(this.hostElement.nativeElement, 'alert-hidden');
19885
+ }
19877
19886
  this.cdr.detectChanges();
19878
19887
  }
19879
19888
  }
@@ -19906,14 +19915,14 @@ class ClrAlert {
19906
19915
  this._closedChanged.emit(true);
19907
19916
  }
19908
19917
  }
19909
- ClrAlert.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAlert, deps: [{ token: AlertIconAndTypesService }, { token: i0.ChangeDetectorRef }, { token: MultiAlertService, optional: true }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
19910
- ClrAlert.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrAlert, selector: "clr-alert", inputs: { isLight: ["clrAlertLightweight", "isLight"], isSmall: ["clrAlertSizeSmall", "isSmall"], closable: ["clrAlertClosable", "closable"], isAppLevel: ["clrAlertAppLevel", "isAppLevel"], clrCloseButtonAriaLabel: "clrCloseButtonAriaLabel", alertType: ["clrAlertType", "alertType"], alertIconShape: ["clrAlertIcon", "alertIconShape"], closed: ["clrAlertClosed", "closed"] }, outputs: { _closedChanged: "clrAlertClosedChange" }, host: { properties: { "class.alert-hidden": "this.hidden" } }, providers: [AlertIconAndTypesService], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2023 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n *ngIf=\"!_closed\"\n class=\"alert\"\n [ngClass]=\"alertClass\"\n [class.alert-sm]=\"isSmall\"\n [class.alert-lightweight]=\"isLight\"\n [class.alert-app-level]=\"isAppLevel\"\n>\n <div class=\"alert-items\">\n <ng-content></ng-content>\n </div>\n <button type=\"button\" class=\"close\" *ngIf=\"closable\" (click)=\"close()\" [attr.aria-label]=\"clrCloseButtonAriaLabel\">\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }] });
19918
+ ClrAlert.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAlert, deps: [{ token: AlertIconAndTypesService }, { token: i0.ChangeDetectorRef }, { token: MultiAlertService, optional: true }, { token: ClrCommonStringsService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
19919
+ ClrAlert.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrAlert, selector: "clr-alert", inputs: { isLight: ["clrAlertLightweight", "isLight"], isSmall: ["clrAlertSizeSmall", "isSmall"], closable: ["clrAlertClosable", "closable"], isAppLevel: ["clrAlertAppLevel", "isAppLevel"], clrCloseButtonAriaLabel: "clrCloseButtonAriaLabel", alertType: ["clrAlertType", "alertType"], alertIconShape: ["clrAlertIcon", "alertIconShape"], closed: ["clrAlertClosed", "closed"] }, outputs: { _closedChanged: "clrAlertClosedChange" }, providers: [AlertIconAndTypesService], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2023 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n *ngIf=\"!_closed\"\n class=\"alert\"\n [ngClass]=\"alertClass\"\n [class.alert-sm]=\"isSmall\"\n [class.alert-lightweight]=\"isLight\"\n [class.alert-app-level]=\"isAppLevel\"\n>\n <div class=\"alert-items\">\n <ng-content></ng-content>\n </div>\n <button type=\"button\" class=\"close\" *ngIf=\"closable\" (click)=\"close()\" [attr.aria-label]=\"clrCloseButtonAriaLabel\">\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }] });
19911
19920
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrAlert, decorators: [{
19912
19921
  type: Component,
19913
19922
  args: [{ selector: 'clr-alert', providers: [AlertIconAndTypesService], template: "<!--\n ~ Copyright (c) 2016-2023 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n *ngIf=\"!_closed\"\n class=\"alert\"\n [ngClass]=\"alertClass\"\n [class.alert-sm]=\"isSmall\"\n [class.alert-lightweight]=\"isLight\"\n [class.alert-app-level]=\"isAppLevel\"\n>\n <div class=\"alert-items\">\n <ng-content></ng-content>\n </div>\n <button type=\"button\" class=\"close\" *ngIf=\"closable\" (click)=\"close()\" [attr.aria-label]=\"clrCloseButtonAriaLabel\">\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n</div>\n" }]
19914
19923
  }], ctorParameters: function () { return [{ type: AlertIconAndTypesService }, { type: i0.ChangeDetectorRef }, { type: MultiAlertService, decorators: [{
19915
19924
  type: Optional
19916
- }] }, { type: ClrCommonStringsService }]; }, propDecorators: { isLight: [{
19925
+ }] }, { type: ClrCommonStringsService }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { isLight: [{
19917
19926
  type: Input,
19918
19927
  args: ['clrAlertLightweight']
19919
19928
  }], isSmall: [{
@@ -19939,9 +19948,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
19939
19948
  }], closed: [{
19940
19949
  type: Input,
19941
19950
  args: ['clrAlertClosed']
19942
- }], hidden: [{
19943
- type: HostBinding,
19944
- args: ['class.alert-hidden']
19945
19951
  }] } });
19946
19952
 
19947
19953
  /*