From b97bd4f788dde11eff5e2146365000b5091b82ae Mon Sep 17 00:00:00 2001 From: Murhaf Sousli Date: Mon, 29 Jul 2024 02:39:20 +0200 Subject: [PATCH] Update --- CHANGELOG.md | 5 +++ package-lock.json | 32 +++++++++---------- package.json | 8 ++--- projects/ngx-scrollbar/package.json | 2 +- .../src/lib/ng-scrollbar-core.ts | 2 +- .../src/lib/tests/visibility.spec.ts | 10 ++++-- .../src/lib/utils/scrollbar-manager.ts | 4 +-- 7 files changed, 37 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fba62ef..716ca512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 15.1.2 + +- Set the latest fixed polyfill CDN as default. +- Update Typescript to v5.5.4, closes [#633](https://github.com/MurhafSousli/ngx-scrollbar/issues/633). + ## 15.1.1 - Fix scroll-timeline polyfill errors, closes [#631](https://github.com/MurhafSousli/ngx-scrollbar/issues/631), [#624](https://github.com/MurhafSousli/ngx-scrollbar/issues/624), [#594](https://github.com/MurhafSousli/ngx-scrollbar/issues/594) and [#590](https://github.com/MurhafSousli/ngx-scrollbar/issues/590). diff --git a/package-lock.json b/package-lock.json index ec4fabae..fefa2777 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,10 +25,10 @@ "ag-grid-community": "^32.0.2", "chance": "^1.1.12", "express": "^4.18.2", - "ng-zorro-antd": "^18.0.1", + "ng-zorro-antd": "^18.1.0", "ngx-color-picker": "^16.0.0", "ngx-infinite-scroll": "^18.0.0", - "primeng": "^17.18.5", + "primeng": "^17.18.6", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "^0.14.6" @@ -48,14 +48,14 @@ "@typescript-eslint/eslint-plugin": "^7.11.0", "@typescript-eslint/parser": "^7.11.0", "eslint": "^8.57.0", - "jasmine-core": "^5.1.2", + "jasmine-core": "^5.2.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", "ng-packagr": "^18.1.0", - "typescript": "~5.4.5" + "typescript": "~5.5.4" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -10252,9 +10252,9 @@ } }, "node_modules/jasmine-core": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.1.2.tgz", - "integrity": "sha512-2oIUMGn00FdUiqz6epiiJr7xcFyNYj3rDcfmnzfkBnHyBQ3cBQUs4mmyGsOb7TTLb9kxk7dBcmEmqhDKkBoDyA==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-5.2.0.tgz", + "integrity": "sha512-tSAtdrvWybZkQmmaIoDgnvHG8ORUNw5kEVlO5CvrXj02Jjr9TZrmjFq7FUiOUzJiOP2wLGYT6PgrQgQF4R1xiw==", "dev": true }, "node_modules/jest-diff": { @@ -12386,9 +12386,9 @@ } }, "node_modules/ng-zorro-antd": { - "version": "18.0.1", - "resolved": "https://registry.npmjs.org/ng-zorro-antd/-/ng-zorro-antd-18.0.1.tgz", - "integrity": "sha512-jqShD//KEKKEl54GAuwxBczF6nyg0V/iohuAUhra5UhjhHbO4Dted1fzotiiCojPme6+zOukwi+iHVHs7HjuQQ==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/ng-zorro-antd/-/ng-zorro-antd-18.1.0.tgz", + "integrity": "sha512-0G9ZAK+Z6XYQXE9uCu+PSevOt+s4YzddLS2Wm6xXHlzm8z3PctUWgTaqlKpxYown7KWDV212uPejokcsaiOuQg==", "dependencies": { "@angular/cdk": "^18.0.0", "@ant-design/icons-angular": "^18.0.0", @@ -13804,9 +13804,9 @@ } }, "node_modules/primeng": { - "version": "17.18.5", - "resolved": "https://registry.npmjs.org/primeng/-/primeng-17.18.5.tgz", - "integrity": "sha512-G8XxwCupXVBJJYSKrnFTuZM73+VaY0kvaYvXBuVHUvCvwnoNsDfLOqi4FkP/WWQQRVnxUpcmNX3KVtUhDUl9ZQ==", + "version": "17.18.6", + "resolved": "https://registry.npmjs.org/primeng/-/primeng-17.18.6.tgz", + "integrity": "sha512-WnsUWUxNkeqiJf5yrdT/TTzVyCP6R7Z60sr87chh3D7BNuNqh2R5Yd6GI86QVRhE172yt3AjjSIWfqRhzyul5w==", "dependencies": { "tslib": "^2.3.0" }, @@ -15548,9 +15548,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index a3fea473..887bca9f 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,10 @@ "ag-grid-community": "^32.0.2", "chance": "^1.1.12", "express": "^4.18.2", - "ng-zorro-antd": "^18.0.1", + "ng-zorro-antd": "^18.1.0", "ngx-color-picker": "^16.0.0", "ngx-infinite-scroll": "^18.0.0", - "primeng": "^17.18.5", + "primeng": "^17.18.6", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "^0.14.6" @@ -54,13 +54,13 @@ "@typescript-eslint/eslint-plugin": "^7.11.0", "@typescript-eslint/parser": "^7.11.0", "eslint": "^8.57.0", - "jasmine-core": "^5.1.2", + "jasmine-core": "^5.2.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", "ng-packagr": "^18.1.0", - "typescript": "~5.4.5" + "typescript": "~5.5.4" } } diff --git a/projects/ngx-scrollbar/package.json b/projects/ngx-scrollbar/package.json index 802c4c3f..4f6985dd 100644 --- a/projects/ngx-scrollbar/package.json +++ b/projects/ngx-scrollbar/package.json @@ -1,6 +1,6 @@ { "name": "ngx-scrollbar", - "version": "15.1.1", + "version": "15.1.2", "license": "MIT", "homepage": "https://ngx-scrollbar.netlify.app/", "author": { diff --git a/projects/ngx-scrollbar/src/lib/ng-scrollbar-core.ts b/projects/ngx-scrollbar/src/lib/ng-scrollbar-core.ts index 6de5ad99..a074c68f 100644 --- a/projects/ngx-scrollbar/src/lib/ng-scrollbar-core.ts +++ b/projects/ngx-scrollbar/src/lib/ng-scrollbar-core.ts @@ -246,7 +246,7 @@ export abstract class NgScrollbarCore implements _NgScrollbar, OnInit, AfterView ngOnInit(): void { runInInjectionContext(this.injector, () => { // The direction signal cannot be initialized in the constructor - // Because it initially returns 'ltr' even if dir.value is 'rtl` + // Because it initially returns 'ltr' even if dir.value is 'rtl`, the map function here is crucial this.direction = toSignal(this.dir.change.pipe(map(() => this.dir.value)), { initialValue: this.dir.value }); effect((onCleanup: EffectCleanupRegisterFn) => { diff --git a/projects/ngx-scrollbar/src/lib/tests/visibility.spec.ts b/projects/ngx-scrollbar/src/lib/tests/visibility.spec.ts index 486ea6db..57e452ef 100644 --- a/projects/ngx-scrollbar/src/lib/tests/visibility.spec.ts +++ b/projects/ngx-scrollbar/src/lib/tests/visibility.spec.ts @@ -36,7 +36,10 @@ describe('Visibility styles', () => { expect(component.nativeElement.getAttribute('visibility')).toBe('hover'); expect(stickyStyles.opacity).toBe('0'); - expect(stickyStyles.transition).toBe('opacity 0.4s ease 1s'); + expect(stickyStyles.transitionDelay).toBe('1s'); + expect(stickyStyles.transitionDuration).toBe('0.4s'); + expect(stickyStyles.transitionTimingFunction).toBe('ease'); + expect(stickyStyles.transitionProperty).toBe('opacity'); }); it('[Visibility] should be able to override styles related to sticky container using CSS variables', async () => { @@ -53,7 +56,10 @@ describe('Visibility styles', () => { const stickyDebugElement: DebugElement = fixture.debugElement.query(By.css('.ng-scrollbar-sticky')); const stickyStyles: CSSStyleDeclaration = getComputedStyle(stickyDebugElement.nativeElement); - expect(stickyStyles.transition).toBe('opacity 0.5s ease 3s'); + expect(stickyStyles.transitionDelay).toBe('3s'); + expect(stickyStyles.transitionDuration).toBe('0.5s'); + expect(stickyStyles.transitionTimingFunction).toBe('ease'); + expect(stickyStyles.transitionProperty).toBe('opacity'); }); // it('[Visibility] should set default styles and hover effect', async () => { diff --git a/projects/ngx-scrollbar/src/lib/utils/scrollbar-manager.ts b/projects/ngx-scrollbar/src/lib/utils/scrollbar-manager.ts index 2fd49a17..303e8507 100644 --- a/projects/ngx-scrollbar/src/lib/utils/scrollbar-manager.ts +++ b/projects/ngx-scrollbar/src/lib/utils/scrollbar-manager.ts @@ -3,8 +3,8 @@ import { DOCUMENT, isPlatformBrowser } from '@angular/common'; import { NG_SCROLLBAR_POLYFILL } from '../ng-scrollbar.model'; import { ScrollTimelineFunc } from './common'; -// This CDN link is for a modified version of the polyfill to fix the firefox bug https://github.com/MurhafSousli/ngx-scrollbar/issues/615 -const scrollTimelinePolyfillUrl: string = 'https://cdn.statically.io/gist/MurhafSousli/c852b6a672069396953f06ddd4b64620/raw/7089126915c424e85fba611d179fc5687b8743a0/scroll-timeline.js'; +// This CDN link for a modified version of the polyfill to fix firefox bug https://github.com/MurhafSousli/ngx-scrollbar/issues/615 +const scrollTimelinePolyfillUrl: string = 'https://cdn.statically.io/gist/MurhafSousli/c852b6a672069396953f06ddd4b64620/raw/ef55db72e2abb7bc002ed79f4ad4cf408bfdb72f/scroll-timeline-lite.js'; @Injectable({ providedIn: 'root' }) export class ScrollbarManager {