require("source-mapping-url")"use strict";
function _defineCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
$.notify.addStyle("success", {
html: "<div>\n<i class=\"fa fa-check\"></i></span><span data-notify-text style=\"margin-left: 1.5rem\"></span>\n</div>",
classes: {
green: {
"font-weight": "400",
"padding": "15px",
"border": "1px solid #89c673",
"border-radius": "4px",
"white-space": "nowrap",
"background-repeat": "no-repeat",
"background-position": "3px 7px",
"background-color": "#89c673",
"color": "#FFF"
}
}
});
$.notify.addStyle("warning", {
html: "<div>\n<i class=\"fa fa-exclamation-triangle\"></i></span><span data-notify-text style=\"margin-left: 1.5rem\"></span>\n</div>",
classes: {
warning: {
"font-weight": "400",
"padding": "15px",
"border": "1px solid #fbeed5",
"border-radius": "4px",
"white-space": "nowrap",
"background-repeat": "no-repeat",
"background-position": "3px 7px",
"background-color": "#fcf8e3",
"border-color": "#D6E9C6",
"color": "#000"
}
}
});
$.notify.addStyle("fail", {
html: "<div>\n<i class=\"fa fa-exclamation-circle\"></i></span><span data-notify-text style=\"margin-left: 1.5rem\"></span>\n</div>",
classes: {
fail: {
"font-weight": "400",
"padding": "15px",
"border": "1px solid #fbeed5",
"border-radius": "4px",
"white-space": "nowrap",
"background-repeat": "no-repeat",
"background-position": "3px 7px",
"background-color": "#F2DEDE",
"border-color": "#EED3D7",
"color": "#B94A48"
}
}
});
$.notify.addStyle("fail-compiled", {
html: "<div>\n<i class=\"fa fa-exclamation-circle\"></i></span><span data-notify-html style=\"margin-left: 1.5rem\"></span>\n</div>",
classes: {
fail: {
"font-weight": "400",
"padding": "15px",
"border": "1px solid #fbeed5",
"border-radius": "4px",
"white-space": "nowrap",
"background-repeat": "no-repeat",
"background-position": "3px 7px",
"background-color": "#F2DEDE",
"border-color": "#EED3D7",
"color": "#B94A48"
}
}
});
var ShowNotification = function () {
function ShowNotification() {
_classCallCheck(this, ShowNotification);
}
_createClass(ShowNotification, null, [{
key: "success",
value: function success(message) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var ob = {
style: "success",
className: "green"
};
if (options && options.close) {
ob.autoHide = false;
}
$.notify(message || "", ob);
}
}, {
key: "warn",
value: function warn(message) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var ob = {
style: "warning",
className: "warning"
};
if (options && options.close) {
ob.autoHide = false;
}
$.notify(message || "", ob);
}
}, {
key: "fail",
value: function fail(message) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
if (options && options.href) {
var ob = {
style: "fail-compiled",
className: "fail"
};
if (options && options.close) {
ob.autoHide = false;
}
var message_compiled = $("<p>").append($("<a>").attr("href", options.href).css("color", "inherit").text(message || "")).html();
$.notify(message_compiled, ob);
} else {
var _ob = {
style: "fail",
className: "fail"
};
if (options && options.close) {
_ob.autoHide = false;
}
$.notify(message || "", _ob);
}
}
}]);
return ShowNotification;
}();
//# sourceMappingURL=notifications.js.map