Skip to content

Commit 1ca8b59

Browse files
authored
Merge pull request #3 from codewithkyle/wip/1.0.0
Notify.js v1.0.0 Update
2 parents 19fada0 + fb6adab commit 1ca8b59

File tree

8 files changed

+159
-110
lines changed

8 files changed

+159
-110
lines changed

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [1.0.0] - 2019-12-15
11+
12+
### Added
13+
14+
- TypeScript declaration file for `Notify.js`
15+
16+
### Changed
17+
18+
- Updated to ES2019
19+
20+
### Removed
21+
22+
- Support for IE 11
23+
24+
## [0.2.0] - 2019-09-30
25+
26+
### Added
27+
28+
- Reworked library to use `window.requestAnimationFrame` instead of `setTimeout` in order to increase performance
29+
- Notifications are queued and will be displayed in the order they're submitted
30+
- Added positioning information/values
31+
- Updated HTML structure to allow for more robust layouts/designs
32+
- Removed the 10 second maximum notification duration
33+
34+
### Removed
35+
36+
- Entire existing codebase due to rewrite
37+
38+
[Unreleased]: https://github.com/codewithkyle/notifyjs/compare/v1.0.0...HEAD
39+
[1.0.0]: https://github.com/codewithkyle/notifyjs/compare/v0.2.0...v1.0.0
40+
[0.2.0]: https://github.com/codewithkyle/notifyjs/compare/v0.1.0...v0.2.0

Notify.d.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
interface NotificationButton {
2+
label: string;
3+
callback: Function;
4+
ariaLabel?: string;
5+
}
6+
interface SnackbarNotification {
7+
message: string;
8+
duration?: number;
9+
closeable?: boolean;
10+
buttons?: Array<NotificationButton>;
11+
position?: string;
12+
element?: HTMLElement;
13+
force?: boolean;
14+
}
15+
export declare class NotificationManager {
16+
private _queue;
17+
private _callback;
18+
private _isRunning;
19+
private _time;
20+
constructor();
21+
private handleCloseClickEvent;
22+
private handleActionButtonClick;
23+
private activateButton;
24+
private createNotification;
25+
private removeNotification;
26+
private startCallback;
27+
private stopCallback;
28+
private animationFrameCallback;
29+
private validateNotification;
30+
notify(notification: SnackbarNotification): void;
31+
}
32+
export {};

Notify.js

Lines changed: 54 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)