Skip to content

Commit

Permalink
chore(*): prepare release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcScheib committed Oct 9, 2016
1 parent 7c054ce commit 74fe662
Show file tree
Hide file tree
Showing 14 changed files with 150 additions and 24 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-notify",
"version": "0.6.0",
"version": "0.7.0",
"description": "A notification plugin for Aurelia.",
"keywords": [
"aurelia",
Expand Down
23 changes: 21 additions & 2 deletions dist/amd/notification-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-metadata', 'aurelia-
});
exports.NotificationService = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
};



var _class, _temp;
Expand All @@ -31,14 +37,27 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-metadata', 'aurelia-
return Promise.resolve(compositionContext);
};

NotificationService.prototype.notify = function notify(message, settings, level) {
NotificationService.prototype.notify = function notify(model, settings, level) {
var _this = this;

var notificationLevel = level || _notificationLevel.NotificationLevel.info;
var _settings = Object.assign({}, this.notificationRenderer.defaultSettings, settings);

var notification = void 0;
if (typeof model === 'string') {
notification = model;
} else if ((typeof model === 'undefined' ? 'undefined' : _typeof(model)) === 'object') {
if (model.notification === undefined) {
throw new Error('model must implement `notification` property.');
}
notification = model.notification;
} else {
throw new Error('type is not supported by `notify()`.');
}

_settings.model = {
notification: message,
notification: notification,
data: model,
level: notificationLevel
};

Expand Down
5 changes: 4 additions & 1 deletion dist/aurelia-notify.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ export declare class NotificationRenderer {
}
export declare class NotificationService {
static inject: any;
compositionEngine: CompositionEngine;
container: Container;
notificationRenderer: NotificationRenderer;
constructor(compositionEngine: CompositionEngine, container: Container, notificationRenderer: NotificationRenderer);
notify(message: string, settings?: any, level?: string): any;
notify(model: any, settings?: any, level?: string): any;
info(message: string, settings?: any): any;
success(message: string, settings?: any): any;
warning(message: string, settings?: any): any;
Expand Down
21 changes: 19 additions & 2 deletions dist/aurelia-notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ export class NotificationRenderer {
export class NotificationService {
static inject = [CompositionEngine, Container, NotificationRenderer];

compositionEngine: CompositionEngine;
container: Container;
notificationRenderer: NotificationRenderer;

constructor(compositionEngine: CompositionEngine, container: Container, notificationRenderer: NotificationRenderer) {
this.compositionEngine = compositionEngine;
this.container = container;
Expand All @@ -220,12 +224,25 @@ export class NotificationService {
return Promise.resolve(compositionContext);
}

notify(message: string, settings?: any, level?: string) {
notify(model: any, settings?: any, level?: string) {
let notificationLevel = level || NotificationLevel.info;
let _settings = Object.assign({}, this.notificationRenderer.defaultSettings, settings);

let notification;
if (typeof model === 'string') {
notification = model;
} else if (typeof model === 'object') {
if (model.notification === undefined) {
throw new Error('model must implement `notification` property.');
}
notification = model.notification;
} else {
throw new Error('type is not supported by `notify()`.');
}

_settings.model = {
notification: message,
notification: notification,
data: model,
level: notificationLevel
};

Expand Down
19 changes: 17 additions & 2 deletions dist/commonjs/notification-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
});
exports.NotificationService = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

var _class, _temp;

var _aureliaDependencyInjection = require('aurelia-dependency-injection');
Expand Down Expand Up @@ -44,14 +46,27 @@ var NotificationService = exports.NotificationService = (_temp = _class = functi
return Promise.resolve(compositionContext);
};

NotificationService.prototype.notify = function notify(message, settings, level) {
NotificationService.prototype.notify = function notify(model, settings, level) {
var _this = this;

var notificationLevel = level || _notificationLevel.NotificationLevel.info;
var _settings = Object.assign({}, this.notificationRenderer.defaultSettings, settings);

var notification = void 0;
if (typeof model === 'string') {
notification = model;
} else if ((typeof model === 'undefined' ? 'undefined' : _typeof(model)) === 'object') {
if (model.notification === undefined) {
throw new Error('model must implement `notification` property.');
}
notification = model.notification;
} else {
throw new Error('type is not supported by `notify()`.');
}

_settings.model = {
notification: message,
notification: notification,
data: model,
level: notificationLevel
};

Expand Down
17 changes: 15 additions & 2 deletions dist/es2015/notification-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,25 @@ export let NotificationService = (_temp = _class = class NotificationService {
return Promise.resolve(compositionContext);
}

notify(message, settings, level) {
notify(model, settings, level) {
let notificationLevel = level || NotificationLevel.info;
let _settings = Object.assign({}, this.notificationRenderer.defaultSettings, settings);

let notification;
if (typeof model === 'string') {
notification = model;
} else if (typeof model === 'object') {
if (model.notification === undefined) {
throw new Error('model must implement `notification` property.');
}
notification = model.notification;
} else {
throw new Error('type is not supported by `notify()`.');
}

_settings.model = {
notification: message,
notification: notification,
data: model,
level: notificationLevel
};

Expand Down
19 changes: 17 additions & 2 deletions dist/native-modules/notification-service.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

var _class, _temp;


Expand Down Expand Up @@ -32,14 +34,27 @@ export var NotificationService = (_temp = _class = function () {
return Promise.resolve(compositionContext);
};

NotificationService.prototype.notify = function notify(message, settings, level) {
NotificationService.prototype.notify = function notify(model, settings, level) {
var _this = this;

var notificationLevel = level || NotificationLevel.info;
var _settings = Object.assign({}, this.notificationRenderer.defaultSettings, settings);

var notification = void 0;
if (typeof model === 'string') {
notification = model;
} else if ((typeof model === 'undefined' ? 'undefined' : _typeof(model)) === 'object') {
if (model.notification === undefined) {
throw new Error('model must implement `notification` property.');
}
notification = model.notification;
} else {
throw new Error('type is not supported by `notify()`.');
}

_settings.model = {
notification: message,
notification: notification,
data: model,
level: notificationLevel
};

Expand Down
8 changes: 4 additions & 4 deletions dist/system/aurelia-notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@ System.register(['./notification-renderer', './bs-notification', './notification
var _exportObj = {};

for (var _key in _bsNotification) {
if (_key !== "default" && key !== "__esModule") _exportObj[_key] = _bsNotification[_key];
if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _bsNotification[_key];
}

_export(_exportObj);
}, function (_notificationLevel) {
var _exportObj2 = {};

for (var _key2 in _notificationLevel) {
if (_key2 !== "default" && key !== "__esModule") _exportObj2[_key2] = _notificationLevel[_key2];
if (_key2 !== "default" && _key2 !== "__esModule") _exportObj2[_key2] = _notificationLevel[_key2];
}

_export(_exportObj2);
}, function (_notificationService) {
var _exportObj3 = {};

for (var _key3 in _notificationService) {
if (_key3 !== "default" && key !== "__esModule") _exportObj3[_key3] = _notificationService[_key3];
if (_key3 !== "default" && _key3 !== "__esModule") _exportObj3[_key3] = _notificationService[_key3];
}

_export(_exportObj3);
}, function (_notificationController) {
var _exportObj4 = {};

for (var _key4 in _notificationController) {
if (_key4 !== "default" && key !== "__esModule") _exportObj4[_key4] = _notificationController[_key4];
if (_key4 !== "default" && _key4 !== "__esModule") _exportObj4[_key4] = _notificationController[_key4];
}

_export(_exportObj4);
Expand Down
2 changes: 1 addition & 1 deletion dist/system/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ System.register(['./aurelia-notify'], function (_export, _context) {
var _exportObj = {};

for (var _key in _aureliaNotify) {
if (_key !== "default" && key !== "__esModule") _exportObj[_key] = _aureliaNotify[_key];
if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _aureliaNotify[_key];
}

_export(_exportObj);
Expand Down
25 changes: 22 additions & 3 deletions dist/system/notification-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
System.register(['aurelia-dependency-injection', 'aurelia-metadata', 'aurelia-templating', './lifecycle', './notification-controller', './notification-level', './notification-renderer'], function (_export, _context) {
"use strict";

var Container, Origin, CompositionEngine, invokeLifecycle, NotificationController, NotificationLevel, NotificationRenderer, _class, _temp, NotificationService;
var Container, Origin, CompositionEngine, invokeLifecycle, NotificationController, NotificationLevel, NotificationRenderer, _typeof, _class, _temp, NotificationService;



Expand All @@ -24,6 +24,12 @@ System.register(['aurelia-dependency-injection', 'aurelia-metadata', 'aurelia-te
NotificationRenderer = _notificationRenderer.NotificationRenderer;
}],
execute: function () {
_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
};

_export('NotificationService', NotificationService = (_temp = _class = function () {
function NotificationService(compositionEngine, container, notificationRenderer) {

Expand All @@ -45,14 +51,27 @@ System.register(['aurelia-dependency-injection', 'aurelia-metadata', 'aurelia-te
return Promise.resolve(compositionContext);
};

NotificationService.prototype.notify = function notify(message, settings, level) {
NotificationService.prototype.notify = function notify(model, settings, level) {
var _this = this;

var notificationLevel = level || NotificationLevel.info;
var _settings = Object.assign({}, this.notificationRenderer.defaultSettings, settings);

var notification = void 0;
if (typeof model === 'string') {
notification = model;
} else if ((typeof model === 'undefined' ? 'undefined' : _typeof(model)) === 'object') {
if (model.notification === undefined) {
throw new Error('model must implement `notification` property.');
}
notification = model.notification;
} else {
throw new Error('type is not supported by `notify()`.');
}

_settings.model = {
notification: message,
notification: notification,
data: model,
level: notificationLevel
};

Expand Down
19 changes: 17 additions & 2 deletions dist/temp/aurelia-notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
});
exports.NotificationService = exports.NotificationRenderer = exports.globalSettings = exports.BSNotification = exports.NotificationController = exports.NotificationLevel = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

var _class, _temp, _class3, _temp2;

exports.invokeLifecycle = invokeLifecycle;
Expand Down Expand Up @@ -246,14 +248,27 @@ var NotificationService = exports.NotificationService = (_temp2 = _class3 = func
return Promise.resolve(compositionContext);
};

NotificationService.prototype.notify = function notify(message, settings, level) {
NotificationService.prototype.notify = function notify(model, settings, level) {
var _this3 = this;

var notificationLevel = level || NotificationLevel.info;
var _settings = Object.assign({}, this.notificationRenderer.defaultSettings, settings);

var notification = void 0;
if (typeof model === 'string') {
notification = model;
} else if ((typeof model === 'undefined' ? 'undefined' : _typeof(model)) === 'object') {
if (model.notification === undefined) {
throw new Error('model must implement `notification` property.');
}
notification = model.notification;
} else {
throw new Error('type is not supported by `notify()`.');
}

_settings.model = {
notification: message,
notification: notification,
data: model,
level: notificationLevel
};

Expand Down
10 changes: 10 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="0.7.0"></a>
# [0.7.0](https://github.com/MarcScheib/aurelia-notify/compare/0.6.0...v0.7.0) (2016-10-09)


### Features

* **service:** add support for additional model data ([7c054ce](https://github.com/MarcScheib/aurelia-notify/commit/7c054ce))



<a name="0.6.0"></a>
# [0.6.0](https://github.com/MarcScheib/aurelia-notify/compare/0.5.0...v0.6.0) (2016-07-28)

Expand Down
Loading

0 comments on commit 74fe662

Please sign in to comment.