ng-alert-box-popup
Version:
`ng-alert-box-popup` is an Angular library that provides a customizable alert box component with support for different types of alerts using SweetAlert2.
107 lines (95 loc) • 5.32 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('sweetalert2')) :
typeof define === 'function' && define.amd ? define('ng-alert-box-popup', ['exports', '@angular/core', 'sweetalert2'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ng-alert-box-popup"] = {}, global.ng.core, global.Swal));
})(this, (function (exports, i0, swal) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
var swal__default = /*#__PURE__*/_interopDefaultLegacy(swal);
var NgAlertBoxService = /** @class */ (function () {
function NgAlertBoxService() {
}
return NgAlertBoxService;
}());
NgAlertBoxService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
NgAlertBoxService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxService, providedIn: 'root' });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxService, decorators: [{
type: i0.Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return []; } });
var NgAlertBoxComponent = /** @class */ (function () {
function NgAlertBoxComponent() {
}
NgAlertBoxComponent.prototype.ngOnInit = function () {
};
NgAlertBoxComponent.prototype.dialog = function (type, msg) {
if (type.toUpperCase() == 'S') {
swal__default["default"]("Success!", msg, "success");
}
else if (type.toUpperCase() == 'E') {
swal__default["default"]("Error!", msg, "error");
}
else if (type.toUpperCase() == 'W') {
swal__default["default"]("Warning!", msg, "warning");
}
else if (type.toUpperCase() == 'I') {
swal__default["default"]("Info!", msg, "info");
}
};
return NgAlertBoxComponent;
}());
NgAlertBoxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
NgAlertBoxComponent.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxComponent, providedIn: 'root' });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxComponent, decorators: [{
type: i0.Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return []; } });
var NgAlertBoxModule = /** @class */ (function () {
function NgAlertBoxModule() {
}
return NgAlertBoxModule;
}());
NgAlertBoxModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
NgAlertBoxModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxModule });
NgAlertBoxModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxModule, imports: [[]] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgAlertBoxModule, decorators: [{
type: i0.NgModule,
args: [{
declarations: [],
imports: [],
exports: []
}]
}] });
/*
* Public API Surface of ng-alert-box
*/
/**
* Generated bundle index. Do not edit.
*/
exports.NgAlertBoxComponent = NgAlertBoxComponent;
exports.NgAlertBoxModule = NgAlertBoxModule;
exports.NgAlertBoxService = NgAlertBoxService;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=ng-alert-box-popup.umd.js.map