diff --git a/CHANGELOG.md b/CHANGELOG.md
index 688ef911..b4a95845 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
### [@coreui/angular](https://coreui.io/angular/) changelog
+#### `4.4.1`
+
+- fix(alert): typo in template
+- refactor(html-attr): cleanup
+- refactor(icon, icon-set): cleanup
+
#### `4.4.0`
- chore: dependencies update
diff --git a/package-lock.json b/package-lock.json
index b8c92a37..31214c69 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "coreui-angular-dev",
- "version": "4.4.0",
+ "version": "4.4.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coreui-angular-dev",
- "version": "4.4.0",
+ "version": "4.4.1",
"license": "MIT",
"dependencies": {
"@angular/animations": "^15.2.6",
diff --git a/package.json b/package.json
index f8810e14..bdd36aa6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "coreui-angular-dev",
- "version": "4.4.0",
+ "version": "4.4.1",
"description": "CoreUI Components Library for Angular",
"copyright": "Copyright 2023 creativeLabs Łukasz Holeczek",
"license": "MIT",
diff --git a/projects/coreui-angular-chartjs/package.json b/projects/coreui-angular-chartjs/package.json
index d7deac4d..279da932 100644
--- a/projects/coreui-angular-chartjs/package.json
+++ b/projects/coreui-angular-chartjs/package.json
@@ -1,6 +1,6 @@
{
"name": "@coreui/angular-chartjs",
- "version": "4.4.0",
+ "version": "4.4.1",
"description": "Angular wrapper component for Chart.js",
"copyright": "Copyright 2023 creativeLabs Łukasz Holeczek",
"license": "MIT",
diff --git a/projects/coreui-angular/package.json b/projects/coreui-angular/package.json
index 44d0e814..28301098 100644
--- a/projects/coreui-angular/package.json
+++ b/projects/coreui-angular/package.json
@@ -1,6 +1,6 @@
{
"name": "@coreui/angular",
- "version": "4.4.0",
+ "version": "4.4.1",
"description": "CoreUI for Angular UI components library",
"copyright": "Copyright 2023 creativeLabs Łukasz Holeczek",
"license": "MIT",
diff --git a/projects/coreui-angular/src/lib/alert/alert.component.html b/projects/coreui-angular/src/lib/alert/alert.component.html
index 865b7cb1..5c0762a6 100644
--- a/projects/coreui-angular/src/lib/alert/alert.component.html
+++ b/projects/coreui-angular/src/lib/alert/alert.component.html
@@ -2,7 +2,7 @@
- ś
+
diff --git a/projects/coreui-angular/src/lib/shared/html-attr.directive.ts b/projects/coreui-angular/src/lib/shared/html-attr.directive.ts
index dc00d656..e5b11bad 100644
--- a/projects/coreui-angular/src/lib/shared/html-attr.directive.ts
+++ b/projects/coreui-angular/src/lib/shared/html-attr.directive.ts
@@ -1,4 +1,4 @@
-import {Directive, ElementRef, Input, OnInit, Renderer2} from '@angular/core';
+import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core';
@Directive({
selector: '[cHtmlAttr]',
@@ -7,8 +7,7 @@ import {Directive, ElementRef, Input, OnInit, Renderer2} from '@angular/core';
})
export class HtmlAttributesDirective implements OnInit {
- // @ts-ignore
- @Input() cHtmlAttr: {[key: string]: any };
+ @Input() cHtmlAttr?: { [key: string]: any };
constructor(
private renderer: Renderer2,
@@ -18,7 +17,7 @@ export class HtmlAttributesDirective implements OnInit {
ngOnInit(): void {
const attribs = this.cHtmlAttr;
for (const attr in attribs) {
- if (attr === 'style' && typeof(attribs[attr]) === 'object' ) {
+ if (attr === 'style' && typeof (attribs[attr]) === 'object') {
this.setStyle(attribs[attr]);
} else if (attr === 'class') {
this.addClass(attribs[attr]);
@@ -36,16 +35,16 @@ export class HtmlAttributesDirective implements OnInit {
}
}
- private addClass(classes: string): void {
+ private addClass(classes: string | string[]): void {
const classArray = (Array.isArray(classes) ? classes : classes.split(' '));
classArray.filter((element) => element.length > 0).forEach(element => {
- this.renderer.addClass(this.el.nativeElement, element );
+ this.renderer.addClass(this.el.nativeElement, element);
});
}
private setAttrib(key: string, value: string | null): void {
value !== null ?
- this.renderer.setAttribute(this.el.nativeElement, key, value ) :
+ this.renderer.setAttribute(this.el.nativeElement, key, value) :
this.renderer.removeAttribute(this.el.nativeElement, key);
}
}
diff --git a/projects/coreui-icons-angular/package.json b/projects/coreui-icons-angular/package.json
index b72f6131..ff586d09 100644
--- a/projects/coreui-icons-angular/package.json
+++ b/projects/coreui-icons-angular/package.json
@@ -1,6 +1,6 @@
{
"name": "@coreui/icons-angular",
- "version": "4.4.0",
+ "version": "4.4.1",
"description": "CoreUI Icons Angular component and service",
"copyright": "Copyright 2023 creativeLabs Łukasz Holeczek",
"license": "MIT",
diff --git a/projects/coreui-icons-angular/src/lib/icon-set/icon-set.module.ts b/projects/coreui-icons-angular/src/lib/icon-set/icon-set.module.ts
index 06a6ee16..8899028d 100644
--- a/projects/coreui-icons-angular/src/lib/icon-set/icon-set.module.ts
+++ b/projects/coreui-icons-angular/src/lib/icon-set/icon-set.module.ts
@@ -3,10 +3,7 @@ import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core
import { IconSetService } from './icon-set.service';
@NgModule({
- imports: [],
- providers: [
- IconSetService
- ]
+ providers: [IconSetService]
})
export class IconSetModule {
constructor(@Optional() @SkipSelf() parentModule?: IconSetModule) {
diff --git a/projects/coreui-icons-angular/src/lib/icon/icon.module.ts b/projects/coreui-icons-angular/src/lib/icon/icon.module.ts
index 1bd4254d..3cf95951 100644
--- a/projects/coreui-icons-angular/src/lib/icon/icon.module.ts
+++ b/projects/coreui-icons-angular/src/lib/icon/icon.module.ts
@@ -1,13 +1,9 @@
import { NgModule } from '@angular/core';
-
-import { HtmlAttributesDirective } from '../shared/html-attr.directive';
import { IconComponent } from './icon.component';
import { IconDirective } from './icon.directive';
@NgModule({
- declarations: [],
imports: [
- HtmlAttributesDirective,
IconComponent,
IconDirective
],
diff --git a/projects/coreui-icons-angular/src/lib/shared/html-attr.directive.spec.ts b/projects/coreui-icons-angular/src/lib/shared/html-attr.directive.spec.ts
index 1c2c4ebe..31836331 100644
--- a/projects/coreui-icons-angular/src/lib/shared/html-attr.directive.spec.ts
+++ b/projects/coreui-icons-angular/src/lib/shared/html-attr.directive.spec.ts
@@ -8,8 +8,7 @@ import { HtmlAttributesDirective } from './html-attr.directive';
template: `
`
})
-class TestComponent {
-}
+class TestComponent {}
describe('HtmlAttributesDirective', () => {
diff --git a/projects/coreui-icons-angular/src/lib/shared/html-attr.directive.ts b/projects/coreui-icons-angular/src/lib/shared/html-attr.directive.ts
index f1e14c3c..e5b11bad 100644
--- a/projects/coreui-icons-angular/src/lib/shared/html-attr.directive.ts
+++ b/projects/coreui-icons-angular/src/lib/shared/html-attr.directive.ts
@@ -27,10 +27,11 @@ export class HtmlAttributesDirective implements OnInit {
}
}
- private setStyle(styles: any): void {
- // tslint:disable-next-line:forin
+ private setStyle(styles: { [x: string]: any; }): void {
for (const style in styles) {
- this.renderer.setStyle(this.el.nativeElement, style, styles[style]);
+ if (style) {
+ this.renderer.setStyle(this.el.nativeElement, style, styles[style]);
+ }
}
}