From 66ac009644d2caf7b33c8991d274ca081ebc8bf9 Mon Sep 17 00:00:00 2001 From: xidedix Date: Fri, 7 Nov 2025 17:51:19 +0100 Subject: [PATCH 1/3] refactor(pagination): input transform for disabled prop, cleanups --- CHANGELOG.md | 6 ++++++ .../page-item/page-item.directive.ts | 17 +++++++++++++++-- .../page-link/page-link.directive.spec.ts | 7 +++++-- .../page-link/page-link.directive.ts | 18 +++++++++++++++--- 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d321fa67..bc20be8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ --- +#### `5.5.22` next + +- refactor(pagination): input transform for disabled prop, cleanups + +--- + #### `5.5.21` - chore(dependencies): update to `Angular 20.3.10` diff --git a/projects/coreui-angular/src/lib/pagination/page-item/page-item.directive.ts b/projects/coreui-angular/src/lib/pagination/page-item/page-item.directive.ts index 7e85ceb8..58b12336 100644 --- a/projects/coreui-angular/src/lib/pagination/page-item/page-item.directive.ts +++ b/projects/coreui-angular/src/lib/pagination/page-item/page-item.directive.ts @@ -1,4 +1,15 @@ -import { computed, contentChild, Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core'; +import { + booleanAttribute, + computed, + contentChild, + Directive, + effect, + ElementRef, + inject, + input, + Renderer2 +} from '@angular/core'; +import { BooleanInput } from '@angular/cdk/coercion'; import { PageLinkDirective } from '../page-link/page-link.directive'; @@ -11,6 +22,8 @@ import { PageLinkDirective } from '../page-link/page-link.directive'; } }) export class PageItemDirective { + static ngAcceptInputType_disabled: BooleanInput; + readonly #renderer = inject(Renderer2); /** @@ -23,7 +36,7 @@ export class PageItemDirective { * Toggle the disabled state for the component. * @return boolean */ - readonly disabled = input(); + readonly disabled = input(false, { transform: booleanAttribute }); readonly ariaCurrent = computed(() => { return this.active() ? 'page' : null; diff --git a/projects/coreui-angular/src/lib/pagination/page-link/page-link.directive.spec.ts b/projects/coreui-angular/src/lib/pagination/page-link/page-link.directive.spec.ts index a4b53fe4..c416d4c1 100644 --- a/projects/coreui-angular/src/lib/pagination/page-link/page-link.directive.spec.ts +++ b/projects/coreui-angular/src/lib/pagination/page-link/page-link.directive.spec.ts @@ -1,8 +1,11 @@ +import { TestBed } from '@angular/core/testing'; import { PageLinkDirective } from './page-link.directive'; describe('PageLinkDirective', () => { it('should create an instance', () => { - const directive = new PageLinkDirective(); - expect(directive).toBeTruthy(); + TestBed.runInInjectionContext(() => { + const directive = new PageLinkDirective(); + expect(directive).toBeTruthy(); + }); }); }); diff --git a/projects/coreui-angular/src/lib/pagination/page-link/page-link.directive.ts b/projects/coreui-angular/src/lib/pagination/page-link/page-link.directive.ts index fd053286..8a62fa77 100644 --- a/projects/coreui-angular/src/lib/pagination/page-link/page-link.directive.ts +++ b/projects/coreui-angular/src/lib/pagination/page-link/page-link.directive.ts @@ -1,7 +1,19 @@ -import { Directive } from '@angular/core'; +import { booleanAttribute, computed, Directive, input } from '@angular/core'; +import { BooleanInput } from '@angular/cdk/coercion'; @Directive({ selector: '[cPageLink]', - host: { class: 'page-link' } + host: { class: 'page-link', '[class]': 'hostClasses()' } }) -export class PageLinkDirective {} +export class PageLinkDirective { + static ngAcceptInputType_disabled: BooleanInput; + + readonly disabled = input(false, { transform: booleanAttribute }); + + readonly hostClasses = computed(() => { + return { + 'page-link': true, + disabled: this.disabled() + } as Record; + }); +} From 3f67ff8ee4b69707bee20863cb44f1e948f46e2e Mon Sep 17 00:00:00 2001 From: xidedix Date: Sat, 8 Nov 2025 18:59:20 +0100 Subject: [PATCH 2/3] chore(dependencies): update - `angular-eslint` @ "20.5.2" (was "20.5.1") --- CHANGELOG.md | 4 ++- package-lock.json | 90 +++++++++++++++++++++++------------------------ package.json | 2 +- 3 files changed, 49 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc20be8f..06c51f8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,11 @@ --- -#### `5.5.22` next +#### `5.5.22` - refactor(pagination): input transform for disabled prop, cleanups +- chore(dependencies): update + - `angular-eslint` @ "20.5.2" (was "20.5.1") --- diff --git a/package-lock.json b/package-lock.json index 95f13482..37449835 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "@types/jasmine": "^5.1.12", "@types/lodash-es": "^4.17.12", "@types/node": "^22.19.0", - "angular-eslint": "^20.5.1", + "angular-eslint": "^20.5.2", "copyfiles": "^2.4.1", "eslint": "^9.39.1", "jasmine-core": "^5.12.1", @@ -342,9 +342,9 @@ } }, "node_modules/@angular-eslint/builder": { - "version": "20.5.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-20.5.1.tgz", - "integrity": "sha512-jUnqrMbMQ/UR8xPncg3NW3I18dlnV68V0HHozZgX3rjHuDOa7Yq4jwjFaaxfaId5KsNDoEGtjZCAz1lgw/+4Gw==", + "version": "20.5.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-20.5.2.tgz", + "integrity": "sha512-BBuuVnkA8JCdmuqMlbaU+TRYZrrTqZgAR+Qn/2I371JMMPK3KFo1IdnGK2ByA472JTdK6QtO5kqAXzRkAEv8dA==", "dev": true, "license": "MIT", "dependencies": { @@ -357,21 +357,21 @@ } }, "node_modules/@angular-eslint/bundled-angular-compiler": { - "version": "20.5.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-20.5.1.tgz", - "integrity": "sha512-0VroIEZzTBFB9B7Ws6xU5X3X9RoOSBVUcFbMs+UqfNoxHdZd5ToU5nwbImQg3hyFF0zdAjffoW3wW00qiC3L+g==", + "version": "20.5.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-20.5.2.tgz", + "integrity": "sha512-lYCCohMJ7dj49o2A8O8WOzZaXwDp51fZ9F8oyz/EtORDr83VVcsLeXRaByfalbWbJHWVogZ5Koo5rTF9IrZBeA==", "dev": true, "license": "MIT" }, "node_modules/@angular-eslint/eslint-plugin": { - "version": "20.5.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-20.5.1.tgz", - "integrity": "sha512-We7vkqRypa4+TPFMy1VSJkNSTIezRYbDS3YuzycNT5G6fhY3nn4WMa3ejsID/llcvptWyTKSZXZ/rJ+Zvo8xuQ==", + "version": "20.5.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-20.5.2.tgz", + "integrity": "sha512-9opiJMnGvFA12sAbc+slIPXsHnmjQxYtCcb2yhPIeHEuvlF2GKdvO4i4VFDbhRVOOn8IsLZpSG1C1tZtBEytdQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "20.5.1", - "@angular-eslint/utils": "20.5.1", + "@angular-eslint/bundled-angular-compiler": "20.5.2", + "@angular-eslint/utils": "20.5.2", "ts-api-utils": "^2.1.0" }, "peerDependencies": { @@ -381,19 +381,19 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template": { - "version": "20.5.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-20.5.1.tgz", - "integrity": "sha512-J3efFHXACo84vT80p4Jq/rKeI1NwWru7qe9U6hCZetKbXz0dGgcGgh4gN8lWGtCqw1Gsi+xzpEGiHS1BWDDvmA==", + "version": "20.5.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-20.5.2.tgz", + "integrity": "sha512-Mc0hkkP0Ux31U+c7YE7eJJbQSTbSRnMYRwjkYPRVUfViHFicAj+NkYUwIHsoEHXHvNnMEdoRAMO8lHY311DoLg==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "20.5.1", - "@angular-eslint/utils": "20.5.1", + "@angular-eslint/bundled-angular-compiler": "20.5.2", + "@angular-eslint/utils": "20.5.2", "aria-query": "5.3.2", "axobject-query": "4.1.0" }, "peerDependencies": { - "@angular-eslint/template-parser": "20.5.1", + "@angular-eslint/template-parser": "20.5.2", "@typescript-eslint/types": "^7.11.0 || ^8.0.0", "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", "eslint": "^8.57.0 || ^9.0.0", @@ -401,16 +401,16 @@ } }, "node_modules/@angular-eslint/schematics": { - "version": "20.5.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-20.5.1.tgz", - "integrity": "sha512-pPVbgiCCRDRKC2E3AeS0H3gC++azLarpYVTbOJS7vIGpmYqy++rKy5egXoECjHWQza/sXHJjUuHRpGhh/FN0og==", + "version": "20.5.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-20.5.2.tgz", + "integrity": "sha512-02yzRgmUPCc+NniasYECMey09EOm6OjKZ8aJtAbrDnHcvEu/YjFWyF8y17RT70MZcpFatxT79AV7zXQEwR2w7g==", "dev": true, "license": "MIT", "dependencies": { "@angular-devkit/core": ">= 20.0.0 < 21.0.0", "@angular-devkit/schematics": ">= 20.0.0 < 21.0.0", - "@angular-eslint/eslint-plugin": "20.5.1", - "@angular-eslint/eslint-plugin-template": "20.5.1", + "@angular-eslint/eslint-plugin": "20.5.2", + "@angular-eslint/eslint-plugin-template": "20.5.2", "ignore": "7.0.5", "semver": "7.7.3", "strip-json-comments": "3.1.1" @@ -430,13 +430,13 @@ } }, "node_modules/@angular-eslint/template-parser": { - "version": "20.5.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-20.5.1.tgz", - "integrity": "sha512-XIXf5zt7AurD1kjSAoMadLLB7VGuwg4+ln4JHfPN9MYwcIqJGZMt0brBkkFV7ed2M4167uT03yyfyTK8Ijl6qA==", + "version": "20.5.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-20.5.2.tgz", + "integrity": "sha512-zBkrr9+ml5dH+gnz4uFwQFcBNKzo81BGSPFf7bHNmphXS9U6RdGokBJF/R+YVFt05CkCl4U00fuydR2P/mh7mQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "20.5.1", + "@angular-eslint/bundled-angular-compiler": "20.5.2", "eslint-scope": "^8.0.2" }, "peerDependencies": { @@ -445,13 +445,13 @@ } }, "node_modules/@angular-eslint/utils": { - "version": "20.5.1", - "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-20.5.1.tgz", - "integrity": "sha512-6Zf9EBzW8eBTDxqgzBqKD4a9IH0uAVZFX9zgASipk8m5sO6YkjaS+auplmEac3ESzVCh9AzwNDFD68JAE0ugLQ==", + "version": "20.5.2", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-20.5.2.tgz", + "integrity": "sha512-JFNovS6jVpNVucm1MW0SjeAxRowDUvpTKvqCZqQTgzVCh5jj3Lgz2fcqLp5ICG27s96zDrNJzHBNKxDai4t6yQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "20.5.1" + "@angular-eslint/bundled-angular-compiler": "20.5.2" }, "peerDependencies": { "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", @@ -3939,9 +3939,9 @@ ] }, "node_modules/@rollup/wasm-node": { - "version": "4.53.0", - "resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.53.0.tgz", - "integrity": "sha512-QggssjuL8sqUiYcAc/Za0bDglGTjmE/8cz1t+KxibDAOZss8uueiS4mQG1Kuv3dAeoc1Iv5GuDvztCkv/tN6pg==", + "version": "4.53.1", + "resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.53.1.tgz", + "integrity": "sha512-S2Vy3hXqx+j+Yo4Pks/avPv3ogXO5E5dmvpm2YhjABnYVI7r6myI9KaDzJRL64s0ZHG1044InpA9DysCIe45GQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4559,19 +4559,19 @@ } }, "node_modules/angular-eslint": { - "version": "20.5.1", - "resolved": "https://registry.npmjs.org/angular-eslint/-/angular-eslint-20.5.1.tgz", - "integrity": "sha512-7Vx2Vs4u5KO7Kxzo8kMAZnpubtHxK/wBWhBmHrKz/GRsrRQw2aIO13eCH6RU200EssNWpZ2OADIK0vlR9J0T0A==", + "version": "20.5.2", + "resolved": "https://registry.npmjs.org/angular-eslint/-/angular-eslint-20.5.2.tgz", + "integrity": "sha512-naf3bBX9vNZu0igPyB3Ctw5y8GJi7WSZXB2k7+3st+ZCb99ptKHvux3JIEcDP50JbTcs41nDGHyfeErTvHcYSA==", "dev": true, "license": "MIT", "dependencies": { "@angular-devkit/core": ">= 20.0.0 < 21.0.0", "@angular-devkit/schematics": ">= 20.0.0 < 21.0.0", - "@angular-eslint/builder": "20.5.1", - "@angular-eslint/eslint-plugin": "20.5.1", - "@angular-eslint/eslint-plugin-template": "20.5.1", - "@angular-eslint/schematics": "20.5.1", - "@angular-eslint/template-parser": "20.5.1", + "@angular-eslint/builder": "20.5.2", + "@angular-eslint/eslint-plugin": "20.5.2", + "@angular-eslint/eslint-plugin-template": "20.5.2", + "@angular-eslint/schematics": "20.5.2", + "@angular-eslint/template-parser": "20.5.2", "@typescript-eslint/types": "^8.0.0", "@typescript-eslint/utils": "^8.0.0" }, @@ -5786,9 +5786,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.248", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.248.tgz", - "integrity": "sha512-zsur2yunphlyAO4gIubdJEXCK6KOVvtpiuDfCIqbM9FjcnMYiyn0ICa3hWfPr0nc41zcLWobgy1iL7VvoOyA2Q==", + "version": "1.5.249", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.249.tgz", + "integrity": "sha512-5vcfL3BBe++qZ5kuFhD/p8WOM1N9m3nwvJPULJx+4xf2usSlZFJ0qoNYO2fOX4hi3ocuDcmDobtA+5SFr4OmBg==", "license": "ISC" }, "node_modules/emoji-regex": { diff --git a/package.json b/package.json index 5d669e6f..e82a2355 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@types/jasmine": "^5.1.12", "@types/lodash-es": "^4.17.12", "@types/node": "^22.19.0", - "angular-eslint": "^20.5.1", + "angular-eslint": "^20.5.2", "copyfiles": "^2.4.1", "eslint": "^9.39.1", "jasmine-core": "^5.12.1", From 77678d2faf1db1d27efc69291ae31e7a422e051e Mon Sep 17 00:00:00 2001 From: xidedix Date: Sat, 8 Nov 2025 19:02:24 +0100 Subject: [PATCH 3/3] chore(release): ship v5.5.22 --- package-lock.json | 4 ++-- package.json | 2 +- projects/coreui-angular-chartjs/package.json | 2 +- projects/coreui-angular/package.json | 6 +++--- projects/coreui-icons-angular/package.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 37449835..fc4eb1d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coreui-angular-dev", - "version": "5.5.21", + "version": "5.5.22", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coreui-angular-dev", - "version": "5.5.21", + "version": "5.5.22", "license": "MIT", "dependencies": { "@angular/animations": "^20.3.10", diff --git a/package.json b/package.json index e82a2355..374e4054 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coreui-angular-dev", - "version": "5.5.21", + "version": "5.5.22", "description": "CoreUI Components Library for Angular", "copyright": "Copyright 2025 creativeLabs Łukasz Holeczek", "license": "MIT", diff --git a/projects/coreui-angular-chartjs/package.json b/projects/coreui-angular-chartjs/package.json index 697c4f6e..968f069a 100644 --- a/projects/coreui-angular-chartjs/package.json +++ b/projects/coreui-angular-chartjs/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/angular-chartjs", - "version": "5.5.21", + "version": "5.5.22", "description": "Angular wrapper component for Chart.js", "copyright": "Copyright 2025 creativeLabs Łukasz Holeczek", "license": "MIT", diff --git a/projects/coreui-angular/package.json b/projects/coreui-angular/package.json index 2222a915..af6fa715 100644 --- a/projects/coreui-angular/package.json +++ b/projects/coreui-angular/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/angular", - "version": "5.5.21", + "version": "5.5.22", "description": "CoreUI Components Library for Angular", "copyright": "Copyright 2025 creativeLabs Łukasz Holeczek", "license": "MIT", @@ -24,12 +24,12 @@ "sideEffects": false, "peerDependencies": { "@angular/animations": "^20.3.0", - "@angular/cdk": "^20.2.10", + "@angular/cdk": "^20.2.12", "@angular/common": "^20.3.0", "@angular/core": "^20.3.0", "@angular/router": "^20.3.0", "@coreui/coreui": "^5.4.3", - "@coreui/icons-angular": "~5.5.21", + "@coreui/icons-angular": "~5.5.22", "rxjs": "^7.8.2" }, "repository": { diff --git a/projects/coreui-icons-angular/package.json b/projects/coreui-icons-angular/package.json index 990c7113..42342403 100644 --- a/projects/coreui-icons-angular/package.json +++ b/projects/coreui-icons-angular/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/icons-angular", - "version": "5.5.21", + "version": "5.5.22", "description": "CoreUI Icons Angular component and service", "copyright": "Copyright 2025 creativeLabs Łukasz Holeczek", "license": "MIT",