Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
MurhafSousli committed Jul 29, 2024
1 parent 124c72c commit b97bd4f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 26 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
}
2 changes: 1 addition & 1 deletion projects/ngx-scrollbar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-scrollbar",
"version": "15.1.1",
"version": "15.1.2",
"license": "MIT",
"homepage": "https://ngx-scrollbar.netlify.app/",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-scrollbar/src/lib/ng-scrollbar-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Direction, Direction>(this.dir.change.pipe(map(() => this.dir.value)), { initialValue: this.dir.value });

effect((onCleanup: EffectCleanupRegisterFn) => {
Expand Down
10 changes: 8 additions & 2 deletions projects/ngx-scrollbar/src/lib/tests/visibility.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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 () => {
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-scrollbar/src/lib/utils/scrollbar-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

1 comment on commit b97bd4f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.