announcekit-react
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -72,24 +72,30 @@ "use strict"; | ||
selector = null; | ||
window["announcekit"].push(__assign({ widget: widget, name: name, version: 2, selector: selector }, styleParams, { onWidgetInit: function (_widget) { | ||
if (onWidgetInit) { | ||
onWidgetInit(_widget); | ||
} | ||
}, onWidgetOpen: function (_widget) { | ||
if (onWidgetOpen) { | ||
onWidgetOpen(_widget); | ||
} | ||
}, onWidgetClose: function (_widget) { | ||
if (onWidgetClose) { | ||
onWidgetClose(_widget); | ||
} | ||
}, onWidgetResize: function (_widget) { | ||
if (onWidgetResize) { | ||
onWidgetResize(_widget); | ||
} | ||
}, onWidgetUnread: function (_widget) { | ||
if (onWidgetUnread) { | ||
onWidgetUnread(_widget); | ||
} | ||
}, onInit: function (_widget) { | ||
window["announcekit"].push(__assign({ widget: widget, name: name, version: 2, selector: selector }, styleParams, { onInit: function (_widget) { | ||
widgetInstance = _widget; | ||
var ann = window["announcekit"]; | ||
ann.on("widget-init", function (widget) { | ||
if (widget === _widget && onWidgetInit) { | ||
onWidgetInit(_widget); | ||
} | ||
}); | ||
ann.on("widget-open", function (widget) { | ||
if (widget === _widget && onWidgetOpen) { | ||
onWidgetOpen(_widget); | ||
} | ||
}); | ||
ann.on("widget-close", function (widget) { | ||
if (widget === _widget && onWidgetClose) { | ||
onWidgetClose(_widget); | ||
} | ||
}); | ||
ann.on("widget-resize", function (widget) { | ||
if (widget === _widget && onWidgetResize) { | ||
onWidgetResize(_widget); | ||
} | ||
}); | ||
ann.on("widget-unread", function (widget) { | ||
if (widget === _widget && onWidgetUnread) { | ||
onWidgetUnread(_widget); | ||
} | ||
}); | ||
if (destroyed) { | ||
@@ -96,0 +102,0 @@ widgetInstance.destroy(); |
{ | ||
"name": "announcekit-react", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Use AnnounceKit widgets in your React App", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
13882
258