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

angular2-bootstrap-confirm

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-bootstrap-confirm - npm Package Compare versions

Comparing version 0.9.1 to 0.10.0

src/confirm.module.d.ts

14

angular2-bootstrap-confirm.d.ts

@@ -1,15 +0,3 @@

import { Confirm } from './src/confirm.directive';
import { ConfirmOptions } from './src/confirmOptions.provider';
import { Position } from './src/position.provider';
import { Focus } from './src/focus.directive';
import { ConfirmPopover } from './src/confirmPopover.component';
export * from './src/confirm.directive';
export { ConfirmOptions } from './src/confirmOptions.provider';
export * from './src/position.provider';
export * from './src/focus.directive';
export * from './src/confirmPopover.component';
declare var _default: {
providers: (typeof ConfirmOptions | typeof Position)[];
directives: (typeof Confirm | typeof Focus | typeof ConfirmPopover)[];
};
export default _default;
export * from './src/confirm.module';
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("@angular/core"), require("@angular/platform-browser"), require("@angular/common"));
module.exports = factory(require("@angular/core"), require("@angular/common"), require("@angular/platform-browser"));
else if(typeof define === 'function' && define.amd)
define(["@angular/core", "@angular/platform-browser", "@angular/common"], factory);
define(["@angular/core", "@angular/common", "@angular/platform-browser"], factory);
else if(typeof exports === 'object')
exports["ng2BootstrapConfirm"] = factory(require("@angular/core"), require("@angular/platform-browser"), require("@angular/common"));
exports["ng2BootstrapConfirm"] = factory(require("@angular/core"), require("@angular/common"), require("@angular/platform-browser"));
else
root["ng2BootstrapConfirm"] = factory(root["ng"]["core"], root["ng"]["platformBrowser"], root["ng"]["common"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_5__) {
root["ng2BootstrapConfirm"] = factory(root["ng"]["core"], root["ng"]["common"], root["ng"]["platformBrowser"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_7__) {
return /******/ (function(modules) { // webpackBootstrap

@@ -61,18 +61,6 @@ /******/ // The module cache

}
var confirm_directive_1 = __webpack_require__(1);
var confirmOptions_provider_1 = __webpack_require__(7);
var position_provider_1 = __webpack_require__(8);
var focus_directive_1 = __webpack_require__(6);
var confirmPopover_component_1 = __webpack_require__(4);
__export(__webpack_require__(1));
var confirmOptions_provider_2 = __webpack_require__(7);
exports.ConfirmOptions = confirmOptions_provider_2.ConfirmOptions;
__export(__webpack_require__(8));
__export(__webpack_require__(6));
var confirmOptions_provider_1 = __webpack_require__(1);
exports.ConfirmOptions = confirmOptions_provider_1.ConfirmOptions;
__export(__webpack_require__(3));
__export(__webpack_require__(4));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
providers: [confirmOptions_provider_1.ConfirmOptions, position_provider_1.Position],
directives: [confirm_directive_1.Confirm, focus_directive_1.Focus, confirmPopover_component_1.ConfirmPopover]
};

@@ -85,2 +73,7 @@

"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

@@ -95,2 +88,185 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

};
var core_1 = __webpack_require__(2);
/**
* Use this for configuring the confirmation popover defaults
*
* Use it like so:
* ```
* const options: ConfirmOptions = new ConfirmOptions();
* // focus the confirm button by default. See below for an explanation of all options.
* options.focusButton = 'confirm';
*
* providers: [{provide: ConfirmOptions, useValue: options}]
* ```
*/
var ConfirmOptions = (function () {
function ConfirmOptions() {
/**
* The popover confirmation button text
*/
this.confirmText = 'Confirm';
/**
* The popover cancel button text
*/
this.cancelText = 'Cancel';
/**
* The popover confirm button type e.g. `success`, `danger` etc
*/
this.confirmButtonType = 'success';
/**
* The popover cancel button type e.g. `success`, `danger` etc
*/
this.cancelButtonType = 'default';
/**
* The popover placement. Can be `top`, `bottom`, `left`, `right`
*/
this.placement = 'top';
/**
* Whether to hide the confirmation button
*/
this.hideConfirmButton = false;
/**
* Whether to hide the cancel button
*/
this.hideCancelButton = false;
/**
* A custom CSS class to be added to the popover
*/
this.popoverClass = '';
/**
* Whether to append the popover to the document body
*/
this.appendToBody = false;
}
ConfirmOptions = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], ConfirmOptions);
return ConfirmOptions;
}());
exports.ConfirmOptions = ConfirmOptions;
/**
* @private
*/
var PopoverConfirmOptions = (function (_super) {
__extends(PopoverConfirmOptions, _super);
function PopoverConfirmOptions() {
_super.apply(this, arguments);
}
PopoverConfirmOptions = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], PopoverConfirmOptions);
return PopoverConfirmOptions;
}(ConfirmOptions));
exports.PopoverConfirmOptions = PopoverConfirmOptions;
/***/ },
/* 2 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
"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 = __webpack_require__(2);
/**
* A placeholder token that you need to overwrite with the actual Position service
*
* ```
* // if not also using the @ng-bootstrap/ng-bootstrap module
* import {Positioning} from 'angular2-bootstrap-confirm/position/position';
* // if already using the @ng-bootstrap/ng-bootstrap module
* import {Positioning} from '@ng-bootstrap/ng-bootstrap/util/positioning';
* import {Position} from 'angular2-bootstrap-confirm';
*
* providers: [
* provide(Position, {
* useClass: Positioning
* })
* ]
* ```
*/
var Position = (function () {
function Position() {
throw new Error('You must provide a service that implements the Position when bootstrapping your app.');
}
Position = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], Position);
return Position;
}());
exports.Position = Position;
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
"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 = __webpack_require__(2);
var common_1 = __webpack_require__(5);
var confirm_directive_1 = __webpack_require__(6);
var confirmPopover_component_1 = __webpack_require__(8);
var focus_directive_1 = __webpack_require__(9);
var ConfirmModule = (function () {
function ConfirmModule() {
}
ConfirmModule = __decorate([
core_1.NgModule({
declarations: [confirm_directive_1.Confirm, confirmPopover_component_1.ConfirmPopover, focus_directive_1.Focus],
imports: [common_1.CommonModule],
exports: [confirm_directive_1.Confirm, focus_directive_1.Focus],
entryComponents: [confirmPopover_component_1.ConfirmPopover]
}),
__metadata('design:paramtypes', [])
], ConfirmModule);
return ConfirmModule;
}());
exports.ConfirmModule = ConfirmModule;
/***/ },
/* 5 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
"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 __param = (this && this.__param) || function (paramIndex, decorator) {

@@ -100,6 +276,6 @@ return function (target, key) { decorator(target, key, paramIndex); }

var core_1 = __webpack_require__(2);
var platform_browser_1 = __webpack_require__(3);
var confirmPopover_component_1 = __webpack_require__(4);
var confirmOptions_provider_1 = __webpack_require__(7);
var position_provider_1 = __webpack_require__(8);
var platform_browser_1 = __webpack_require__(7);
var confirmPopover_component_1 = __webpack_require__(8);
var confirmOptions_provider_1 = __webpack_require__(1);
var position_provider_1 = __webpack_require__(3);
/**

@@ -395,15 +571,9 @@ * All properties can be set on the directive as attributes like so (use the `ConfirmOptions` provider to configure them globally):

/***/ },
/* 2 */
/* 7 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
module.exports = __WEBPACK_EXTERNAL_MODULE_7__;
/***/ },
/* 3 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
/***/ },
/* 4 */
/* 8 */
/***/ function(module, exports, __webpack_require__) {

@@ -422,5 +592,3 @@

var core_1 = __webpack_require__(2);
var common_1 = __webpack_require__(5);
var focus_directive_1 = __webpack_require__(6);
var confirmOptions_provider_1 = __webpack_require__(7);
var confirmOptions_provider_1 = __webpack_require__(1);
/**

@@ -439,3 +607,2 @@ * @private

styles: ["\n .popover {\n display: block;\n }\n "],
directives: [common_1.NgIf, common_1.NgTemplateOutlet, focus_directive_1.Focus],
template: "\n <template #defaultTemplate let-options=\"options\">\n <div [class]=\"'popover ' + options.placement + ' popover-' + options.placement + ' ' + options.popoverClass\">\n <div class=\"popover-arrow arrow\"></div>\n <h3 class=\"popover-title\" [innerHTML]=\"options.title\"></h3>\n <div class=\"popover-content\">\n <p [innerHTML]=\"options.message\"></p>\n <div class=\"row\">\n <div\n class=\"col-xs-6\"\n [class.col-xs-offset-3]=\"options.hideCancelButton\"\n *ngIf=\"!options.hideConfirmButton\">\n <button\n [mwlFocus]=\"options.focusButton === 'confirm'\"\n [class]=\"'btn btn-block btn-' + options.confirmButtonType\"\n (click)=\"options.onConfirm()\"\n [innerHtml]=\"options.confirmText\">\n </button>\n </div>\n <div\n class=\"col-xs-6\"\n [class.col-xs-offset-3]=\"options.hideConfirmButton\"\n *ngIf=\"!options.hideCancelButton\">\n <button\n [mwlFocus]=\"options.focusButton === 'cancel'\"\n [class]=\"'btn btn-block btn-' + options.cancelButtonType\"\n (click)=\"options.onCancel()\"\n [innerHtml]=\"options.cancelText\">\n </button>\n </div>\n </div>\n </div>\n </div>\n </template>\n <template\n [ngTemplateOutlet]=\"options.customTemplate || defaultTemplate\"\n [ngOutletContext]=\"{options: options}\">\n </template>\n "

@@ -451,9 +618,3 @@ }),

/***/ },
/* 5 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
/***/ },
/* 6 */
/* 9 */
/***/ function(module, exports, __webpack_require__) {

@@ -500,142 +661,2 @@

/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
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 = __webpack_require__(2);
/**
* Use this for configuring the confirmation popover defaults
*
* Use it like so:
* ```
* const options: ConfirmOptions = new ConfirmOptions();
* // focus the confirm button by default. See below for an explanation of all options.
* options.focusButton = 'confirm';
*
* providers: [{provide: ConfirmOptions, useValue: options}]
* ```
*/
var ConfirmOptions = (function () {
function ConfirmOptions() {
/**
* The popover confirmation button text
*/
this.confirmText = 'Confirm';
/**
* The popover cancel button text
*/
this.cancelText = 'Cancel';
/**
* The popover confirm button type e.g. `success`, `danger` etc
*/
this.confirmButtonType = 'success';
/**
* The popover cancel button type e.g. `success`, `danger` etc
*/
this.cancelButtonType = 'default';
/**
* The popover placement. Can be `top`, `bottom`, `left`, `right`
*/
this.placement = 'top';
/**
* Whether to hide the confirmation button
*/
this.hideConfirmButton = false;
/**
* Whether to hide the cancel button
*/
this.hideCancelButton = false;
/**
* A custom CSS class to be added to the popover
*/
this.popoverClass = '';
/**
* Whether to append the popover to the document body
*/
this.appendToBody = false;
}
ConfirmOptions = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], ConfirmOptions);
return ConfirmOptions;
}());
exports.ConfirmOptions = ConfirmOptions;
/**
* @private
*/
var PopoverConfirmOptions = (function (_super) {
__extends(PopoverConfirmOptions, _super);
function PopoverConfirmOptions() {
_super.apply(this, arguments);
}
PopoverConfirmOptions = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], PopoverConfirmOptions);
return PopoverConfirmOptions;
}(ConfirmOptions));
exports.PopoverConfirmOptions = PopoverConfirmOptions;
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
"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 = __webpack_require__(2);
/**
* A placeholder token that you need to overwrite with the actual Position service
*
* ```
* // if not also using the @ng-bootstrap/ng-bootstrap module
* import {Positioning} from 'angular2-bootstrap-confirm/position/position';
* // if already using the @ng-bootstrap/ng-bootstrap module
* import {Positioning} from '@ng-bootstrap/ng-bootstrap/util/positioning';
* import {Position} from 'angular2-bootstrap-confirm';
*
* providers: [
* provide(Position, {
* useClass: Positioning
* })
* ]
* ```
*/
var Position = (function () {
function Position() {
throw new Error('You must provide a service that implements the Position when bootstrapping your app.');
}
Position = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], Position);
return Position;
}());
exports.Position = Position;
/***/ }

@@ -642,0 +663,0 @@ /******/ ])

@@ -5,2 +5,31 @@ # Change Log

<a name="0.10.0"></a>
# [0.10.0](https://github.com/mattlewis92/angular2-bootstrap-confirm/compare/v0.9.1...v0.10.0) (2016-08-12)
### Features
* upgrade to angular RC5 ([040010d](https://github.com/mattlewis92/angular2-bootstrap-confirm/commit/040010d))
### BREAKING CHANGES
* A peer dependency of angular RC5 is now required.
The `ConfirmPopover` component and `Confirm` directive are now no longer exported. Instead you must use the new `ConfirmModule` module in your apps module like so:
```
import {NgModule} from '@angular/core';
import {ConfirmModule} from 'angular2-bootstrap-confirm';
@NgModule({
declarations: [MyComponent],
imports: [ConfirmModule],
bootstrap: [MyComponent]
})
class MyModule {}
```
<a name="0.9.1"></a>

@@ -7,0 +36,0 @@ ## [0.9.1](https://github.com/mattlewis92/angular2-bootstrap-confirm/compare/v0.9.0...v0.9.1) (2016-08-04)

{
"name": "angular2-bootstrap-confirm",
"version": "0.9.1",
"version": "0.10.0",
"description": "An angular2 bootstrap confirmation popover",

@@ -42,7 +42,8 @@ "main": "./angular2-bootstrap-confirm.js",

"devDependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "~0.3.0",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@ng-bootstrap/ng-bootstrap": "~1.0.0-alpha.0",

@@ -60,3 +61,3 @@ "chai": "~3.5.0",

"imports-loader": "~0.6.5",
"karma": "~1.1.1",
"karma": "~1.2.0",
"karma-coverage": "~1.1.0",

@@ -68,3 +69,3 @@ "karma-mocha": "~1.1.1",

"karma-sourcemap-loader": "~0.3.7",
"karma-webpack": "~1.7.0",
"karma-webpack": "~1.8.0",
"mocha": "~3.0.1",

@@ -90,5 +91,5 @@ "phantomjs-prebuilt": "~2.1.7",

"peerDependencies": {
"@angular/core": "2.0.0-rc.4",
"@angular/common": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4"
"@angular/core": "2.0.0-rc.5",
"@angular/common": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5"
},

@@ -95,0 +96,0 @@ "files": [

@@ -39,3 +39,3 @@ # Angular2 bootstrap confirm

import {Component} from '@angular/core';
import {Confirm, ConfirmOptions, ConfirmPopover, Position} from 'angular2-bootstrap-confirm';
import {ConfirmOptions, Position} from 'angular2-bootstrap-confirm';
import {Positioning} from 'angular2-bootstrap-confirm/position/position';

@@ -54,8 +54,2 @@ // Or if you're already using the @ng-bootstrap/ng-bootstrap module

],
directives: [
Confirm
],
precompile: [
ConfirmPopover
],
template: `

@@ -82,2 +76,14 @@ <button

}
// now use within your apps module
import {NgModule} from '@angular/core';
import {ConfirmModule} from 'angular2-bootstrap-confirm';
@NgModule({
declarations: [MyComponent],
imports: [ConfirmModule],
bootstrap: [MyComponent]
})
class MyModule {}
```

@@ -84,0 +90,0 @@

Sorry, the diff of this file is not supported yet

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