Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng2-modal

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-modal - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

index.js.map

52

index.js
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
function __export(m) {

@@ -14,25 +23,26 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];

}
ModalModule.decorators = [
{ type: core_1.NgModule, args: [{
imports: [common_1.CommonModule],
declarations: [
Modal_1.Modal,
RouteModal_1.RouteModal,
Modal_1.ModalHeader,
Modal_1.ModalContent,
Modal_1.ModalFooter,
],
exports: [
Modal_1.Modal,
RouteModal_1.RouteModal,
Modal_1.ModalHeader,
Modal_1.ModalContent,
Modal_1.ModalFooter,
],
},] },
];
/** @nocollapse */
ModalModule.ctorParameters = [];
ModalModule = __decorate([
core_1.NgModule({
imports: [common_1.CommonModule],
declarations: [
Modal_1.Modal,
RouteModal_1.RouteModal,
Modal_1.ModalHeader,
Modal_1.ModalContent,
Modal_1.ModalFooter,
],
exports: [
Modal_1.Modal,
RouteModal_1.RouteModal,
Modal_1.ModalHeader,
Modal_1.ModalContent,
Modal_1.ModalFooter,
],
}),
__metadata('design:paramtypes', [])
], ModalModule);
return ModalModule;
}());
exports.ModalModule = ModalModule;
//# sourceMappingURL=index.js.map
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");

@@ -6,10 +15,9 @@ var ModalHeader = (function () {

}
ModalHeader.decorators = [
{ type: core_1.Component, args: [{
selector: "modal-header",
template: "<ng-content></ng-content>"
},] },
];
/** @nocollapse */
ModalHeader.ctorParameters = [];
ModalHeader = __decorate([
core_1.Component({
selector: "modal-header",
template: "<ng-content></ng-content>"
}),
__metadata('design:paramtypes', [])
], ModalHeader);
return ModalHeader;

@@ -21,10 +29,9 @@ }());

}
ModalContent.decorators = [
{ type: core_1.Component, args: [{
selector: "modal-content",
template: "<ng-content></ng-content>"
},] },
];
/** @nocollapse */
ModalContent.ctorParameters = [];
ModalContent = __decorate([
core_1.Component({
selector: "modal-content",
template: "<ng-content></ng-content>"
}),
__metadata('design:paramtypes', [])
], ModalContent);
return ModalContent;

@@ -36,10 +43,9 @@ }());

}
ModalFooter.decorators = [
{ type: core_1.Component, args: [{
selector: "modal-footer",
template: "<ng-content></ng-content>"
},] },
];
/** @nocollapse */
ModalFooter.ctorParameters = [];
ModalFooter = __decorate([
core_1.Component({
selector: "modal-footer",
template: "<ng-content></ng-content>"
}),
__metadata('design:paramtypes', [])
], ModalFooter);
return ModalFooter;

@@ -117,25 +123,57 @@ }());

};
Modal.decorators = [
{ type: core_1.Component, args: [{
selector: "modal",
template: "\n<div class=\"modal\" \n tabindex=\"-1\"\n role=\"dialog\"\n #modalRoot\n (keydown.esc)=\"closeOnEscape ? close() : 0\"\n [ngClass]=\"{ in: isOpened, fade: isOpened }\"\n [ngStyle]=\"{ display: isOpened ? 'block' : 'none' }\"\n (click)=\"closeOnOutsideClick ? close() : 0\">\n <div [class]=\"'modal-dialog ' + modalClass\" (click)=\"preventClosing($event)\">\n <div class=\"modal-content\" tabindex=\"0\" *ngIf=\"isOpened\">\n <div class=\"modal-header\">\n <button *ngIf=\"!hideCloseButton\" type=\"button\" class=\"close\" data-dismiss=\"modal\" [attr.aria-label]=\"cancelButtonLabel || 'Close'\" (click)=\"close()\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" *ngIf=\"title\">{{ title }}</h4>\n <ng-content select=\"modal-header\"></ng-content>\n </div>\n <div class=\"modal-body\">\n <ng-content select=\"modal-content\"></ng-content>\n </div>\n <div class=\"modal-footer\">\n <ng-content select=\"modal-footer\"></ng-content>\n <button *ngIf=\"cancelButtonLabel\" type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\" (click)=\"close()\">{{ cancelButtonLabel }}</button>\n <button *ngIf=\"submitButtonLabel\" type=\"button\" class=\"btn btn-primary\" (click)=\"onSubmit.emit(undefined)\">{{ submitButtonLabel }}</button>\n </div>\n </div>\n </div>\n</div>\n"
},] },
];
/** @nocollapse */
Modal.ctorParameters = [];
Modal.propDecorators = {
'modalClass': [{ type: core_1.Input },],
'closeOnEscape': [{ type: core_1.Input },],
'closeOnOutsideClick': [{ type: core_1.Input },],
'title': [{ type: core_1.Input },],
'hideCloseButton': [{ type: core_1.Input },],
'cancelButtonLabel': [{ type: core_1.Input },],
'submitButtonLabel': [{ type: core_1.Input },],
'onOpen': [{ type: core_1.Output },],
'onClose': [{ type: core_1.Output },],
'onSubmit': [{ type: core_1.Output },],
'modalRoot': [{ type: core_1.ViewChild, args: ["modalRoot",] },],
};
__decorate([
core_1.Input(),
__metadata('design:type', String)
], Modal.prototype, "modalClass", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], Modal.prototype, "closeOnEscape", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], Modal.prototype, "closeOnOutsideClick", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], Modal.prototype, "title", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Object)
], Modal.prototype, "hideCloseButton", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], Modal.prototype, "cancelButtonLabel", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], Modal.prototype, "submitButtonLabel", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], Modal.prototype, "onOpen", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], Modal.prototype, "onClose", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], Modal.prototype, "onSubmit", void 0);
__decorate([
core_1.ViewChild("modalRoot"),
__metadata('design:type', core_1.ElementRef)
], Modal.prototype, "modalRoot", void 0);
Modal = __decorate([
core_1.Component({
selector: "modal",
template: "\n<div class=\"modal\" \n tabindex=\"-1\"\n role=\"dialog\"\n #modalRoot\n (keydown.esc)=\"closeOnEscape ? close() : 0\"\n [ngClass]=\"{ in: isOpened, fade: isOpened }\"\n [ngStyle]=\"{ display: isOpened ? 'block' : 'none' }\"\n (click)=\"closeOnOutsideClick ? close() : 0\">\n <div [class]=\"'modal-dialog ' + modalClass\" (click)=\"preventClosing($event)\">\n <div class=\"modal-content\" tabindex=\"0\" *ngIf=\"isOpened\">\n <div class=\"modal-header\">\n <button *ngIf=\"!hideCloseButton\" type=\"button\" class=\"close\" data-dismiss=\"modal\" [attr.aria-label]=\"cancelButtonLabel || 'Close'\" (click)=\"close()\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" *ngIf=\"title\">{{ title }}</h4>\n <ng-content select=\"modal-header\"></ng-content>\n </div>\n <div class=\"modal-body\">\n <ng-content select=\"modal-content\"></ng-content>\n </div>\n <div class=\"modal-footer\">\n <ng-content select=\"modal-footer\"></ng-content>\n <button *ngIf=\"cancelButtonLabel\" type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\" (click)=\"close()\">{{ cancelButtonLabel }}</button>\n <button *ngIf=\"submitButtonLabel\" type=\"button\" class=\"btn btn-primary\" (click)=\"onSubmit.emit(undefined)\">{{ submitButtonLabel }}</button>\n </div>\n </div>\n </div>\n</div>\n"
}),
__metadata('design:paramtypes', [])
], Modal);
return Modal;
}());
exports.Modal = Modal;
//# sourceMappingURL=Modal.js.map
{
"name": "ng2-modal",
"version": "0.0.22",
"version": "0.0.23",
"description": "Open modal window (dialog box) for your angular2 applications using bootstrap3.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -8,3 +8,5 @@ import { EventEmitter, ElementRef, OnDestroy, OnInit } from "@angular/core";

cancelUrl: any[];
cancelUrlExtras: NavigationExtras;
cancelUrlExtras: {
relative: boolean;
} & NavigationExtras;
modalClass: string;

@@ -11,0 +13,0 @@ closeOnEscape: boolean;

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");

@@ -62,5 +71,8 @@ var router_1 = require("@angular/router");

if (this.cancelUrl) {
var navigationExtras = { relativeTo: this.activatedRoute };
var navigationExtras = {};
if (this.cancelUrlExtras) {
navigationExtras = Object.assign(this.cancelUrlExtras);
if (this.cancelUrlExtras.relative) {
navigationExtras.relativeTo = this.activatedRoute;
}
navigationExtras = Object.assign(navigationExtras, this.cancelUrlExtras);
}

@@ -85,30 +97,65 @@ this.router.navigate(this.cancelUrl, navigationExtras);

};
RouteModal.decorators = [
{ type: core_1.Component, args: [{
selector: "route-modal",
template: "\n<div class=\"modal route-modal\" \n tabindex=\"-1\"\n role=\"dialog\"\n #modalRoot\n (keydown.esc)=\"closeOnEscape ? close() : 0\"\n [ngClass]=\"{ in: isOpened, fade: isOpened }\"\n [ngStyle]=\"{ display: isOpened ? 'block' : 'none' }\"\n (click)=\"closeOnOutsideClick ? close() : 0\">\n <div [class]=\"'modal-dialog ' + modalClass\" (click)=\"preventClosing($event)\">\n <div class=\"modal-content\" tabindex=\"0\" *ngIf=\"isOpened\">\n <div class=\"modal-header\">\n <button *ngIf=\"!hideCloseButton\" type=\"button\" class=\"close\" data-dismiss=\"modal\" [attr.aria-label]=\"cancelButtonLabel || 'Close'\" (click)=\"close()\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" *ngIf=\"title\">{{ title }}</h4>\n <ng-content select=\"modal-header\"></ng-content>\n </div>\n <div class=\"modal-body\">\n <ng-content select=\"modal-content\"></ng-content>\n </div>\n <div class=\"modal-footer\">\n <ng-content select=\"modal-footer\"></ng-content>\n <button *ngIf=\"cancelButtonLabel\" type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\" (click)=\"close()\">{{ cancelButtonLabel }}</button>\n <button *ngIf=\"submitButtonLabel\" type=\"button\" class=\"btn btn-primary\" (click)=\"onSubmit.emit(undefined)\">{{ submitButtonLabel }}</button>\n </div>\n </div>\n </div>\n</div>\n"
},] },
];
/** @nocollapse */
RouteModal.ctorParameters = [
{ type: router_1.Router, },
{ type: router_1.ActivatedRoute, },
];
RouteModal.propDecorators = {
'cancelUrl': [{ type: core_1.Input },],
'cancelUrlExtras': [{ type: core_1.Input },],
'modalClass': [{ type: core_1.Input },],
'closeOnEscape': [{ type: core_1.Input },],
'closeOnOutsideClick': [{ type: core_1.Input },],
'title': [{ type: core_1.Input },],
'hideCloseButton': [{ type: core_1.Input },],
'cancelButtonLabel': [{ type: core_1.Input },],
'submitButtonLabel': [{ type: core_1.Input },],
'onOpen': [{ type: core_1.Output },],
'onClose': [{ type: core_1.Output },],
'onSubmit': [{ type: core_1.Output },],
'modalRoot': [{ type: core_1.ViewChild, args: ["modalRoot",] },],
};
__decorate([
core_1.Input(),
__metadata('design:type', Array)
], RouteModal.prototype, "cancelUrl", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Object)
], RouteModal.prototype, "cancelUrlExtras", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], RouteModal.prototype, "modalClass", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], RouteModal.prototype, "closeOnEscape", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], RouteModal.prototype, "closeOnOutsideClick", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], RouteModal.prototype, "title", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Object)
], RouteModal.prototype, "hideCloseButton", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], RouteModal.prototype, "cancelButtonLabel", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], RouteModal.prototype, "submitButtonLabel", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], RouteModal.prototype, "onOpen", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], RouteModal.prototype, "onClose", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], RouteModal.prototype, "onSubmit", void 0);
__decorate([
core_1.ViewChild("modalRoot"),
__metadata('design:type', core_1.ElementRef)
], RouteModal.prototype, "modalRoot", void 0);
RouteModal = __decorate([
core_1.Component({
selector: "route-modal",
template: "\n<div class=\"modal route-modal\" \n tabindex=\"-1\"\n role=\"dialog\"\n #modalRoot\n (keydown.esc)=\"closeOnEscape ? close() : 0\"\n [ngClass]=\"{ in: isOpened, fade: isOpened }\"\n [ngStyle]=\"{ display: isOpened ? 'block' : 'none' }\"\n (click)=\"closeOnOutsideClick ? close() : 0\">\n <div [class]=\"'modal-dialog ' + modalClass\" (click)=\"preventClosing($event)\">\n <div class=\"modal-content\" tabindex=\"0\" *ngIf=\"isOpened\">\n <div class=\"modal-header\">\n <button *ngIf=\"!hideCloseButton\" type=\"button\" class=\"close\" data-dismiss=\"modal\" [attr.aria-label]=\"cancelButtonLabel || 'Close'\" (click)=\"close()\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" *ngIf=\"title\">{{ title }}</h4>\n <ng-content select=\"modal-header\"></ng-content>\n </div>\n <div class=\"modal-body\">\n <ng-content select=\"modal-content\"></ng-content>\n </div>\n <div class=\"modal-footer\">\n <ng-content select=\"modal-footer\"></ng-content>\n <button *ngIf=\"cancelButtonLabel\" type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\" (click)=\"close()\">{{ cancelButtonLabel }}</button>\n <button *ngIf=\"submitButtonLabel\" type=\"button\" class=\"btn btn-primary\" (click)=\"onSubmit.emit(undefined)\">{{ submitButtonLabel }}</button>\n </div>\n </div>\n </div>\n</div>\n"
}),
__metadata('design:paramtypes', [router_1.Router, router_1.ActivatedRoute])
], RouteModal);
return RouteModal;
}());
exports.RouteModal = RouteModal;
//# sourceMappingURL=RouteModal.js.map
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc