piral-notifications
Advanced tools
Comparing version 0.9.3 to 0.9.4
@@ -6,9 +6,9 @@ "use strict"; | ||
function openNotification(ctx, dialog) { | ||
react_atom_1.swap(ctx, state => (Object.assign({}, state, { notifications: piral_core_1.prependItem(state.notifications, dialog) }))); | ||
react_atom_1.swap(ctx, state => (Object.assign(Object.assign({}, state), { notifications: piral_core_1.prependItem(state.notifications, dialog) }))); | ||
} | ||
exports.openNotification = openNotification; | ||
function closeNotification(ctx, dialog) { | ||
react_atom_1.swap(ctx, state => (Object.assign({}, state, { notifications: piral_core_1.excludeItem(state.notifications, dialog) }))); | ||
react_atom_1.swap(ctx, state => (Object.assign(Object.assign({}, state), { notifications: piral_core_1.excludeItem(state.notifications, dialog) }))); | ||
} | ||
exports.closeNotification = closeNotification; | ||
//# sourceMappingURL=actions.js.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
function createNotification(context, id, content, defaultOptions, customOptions = {}) { | ||
const options = Object.assign({}, defaultOptions, customOptions); | ||
const options = Object.assign(Object.assign({}, defaultOptions), customOptions); | ||
const notification = { | ||
@@ -50,3 +50,3 @@ id, | ||
context.defineActions(actions); | ||
react_atom_1.swap(context.state, state => (Object.assign({}, state, { components: Object.assign({}, state.components, { NotificationsHost: default_1.DefaultHost, NotificationsToast: default_1.DefaultToast }), notifications: getNotifications(context, messages, defaultOptions) }))); | ||
react_atom_1.swap(context.state, state => (Object.assign(Object.assign({}, state), { components: Object.assign(Object.assign({}, state.components), { NotificationsHost: default_1.DefaultHost, NotificationsToast: default_1.DefaultToast }), notifications: getNotifications(context, messages, defaultOptions) }))); | ||
return api => ({ | ||
@@ -53,0 +53,0 @@ showNotification(content, customOptions) { |
{ | ||
"name": "piral-notifications", | ||
"version": "0.9.3", | ||
"version": "0.9.4", | ||
"description": "Plugin for triggering notifications in Piral.", | ||
@@ -41,3 +41,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"piral-core": "^0.9.3" | ||
"piral-core": "^0.9.4" | ||
}, | ||
@@ -47,3 +47,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "a079ff637821eeacd28f1209593b778e370d0366" | ||
"gitHead": "2426a2466d490035811e382e871f1a019eae3513" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29659
1234