New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.10.2 to 0.11.0

dist/esm/angular2-bootstrap-confirm.d.ts

25

CHANGELOG.md

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

<a name="0.11.0"></a>
# [0.11.0](https://github.com/mattlewis92/angular2-bootstrap-confirm/compare/v0.10.2...v0.11.0) (2016-09-24)
### Features
* **build:** support offline template compilation ([b7d518d](https://github.com/mattlewis92/angular2-bootstrap-confirm/commit/b7d518d))
### BREAKING CHANGES
* build: For System.js users the path to the UMD files has changed:
Before:
```
node_modules/angular2-bootstrap-confirm/angular2-bootstrap-confirm.js
```
After:
```
node_modules/angular2-bootstrap-confirm/dist/umd/angular2-bootstrap-confirm.js
```
<a name="0.10.2"></a>

@@ -7,0 +32,0 @@ ## [0.10.2](https://github.com/mattlewis92/angular2-bootstrap-confirm/compare/v0.10.1...v0.10.2) (2016-09-13)

50

package.json
{
"name": "angular2-bootstrap-confirm",
"version": "0.10.2",
"version": "0.11.0",
"description": "An angular2 bootstrap confirmation popover",
"main": "./angular2-bootstrap-confirm.js",
"typings": "./angular2-bootstrap-confirm.d.ts",
"main": "./dist/umd/angular2-bootstrap-confirm.js",
"module": "./dist/esm/angular2-bootstrap-confirm.js",
"typings": "./dist/esm/angular2-bootstrap-confirm.d.ts",
"scripts": {

@@ -11,3 +12,4 @@ "prestart": "typings install",

"build:demo": "webpack -p",
"build:dist": "webpack --config webpack.config.dist.js",
"build:umd": "webpack --config webpack.config.umd.js",
"build:dist": "npm run build:umd && npm run ngc",
"build:position": "webpack --config webpack.config.position.js && cp ./node_modules/@ng-bootstrap/ng-bootstrap/util/positioning.d.ts ./position/position.d.ts",

@@ -17,3 +19,3 @@ "pretest": "typings install",

"test:watch": "karma start --watch",
"clean": "del ./src/*.d.ts ./demo/*.d.ts ./test/*.d.ts angular2-bootstrap-confirm.d.ts angular2-bootstrap-confirm.js* ./position",
"build:clean": "del ./dist ./position",
"commit": "git-cz",

@@ -25,3 +27,4 @@ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",

"release": "git pull && standard-version --first-release && git push --follow-tags origin master && npm run build:dist && npm run build:position && npm publish",
"postrelease": "npm run clean && npm run gh-pages"
"postrelease": "npm run build:clean && npm run gh-pages",
"ngc": "ngc -p tsconfig-ngc.json"
},

@@ -45,9 +48,12 @@ "repository": {

"devDependencies": {
"@angular/common": "2.0.0-rc.7",
"@angular/compiler": "2.0.0-rc.7",
"@angular/core": "2.0.0-rc.7",
"@angular/forms": "2.0.0-rc.7",
"@angular/platform-browser": "2.0.0-rc.7",
"@angular/platform-browser-dynamic": "2.0.0-rc.7",
"@angular/common": "~2.0.0",
"@angular/compiler": "~2.0.0",
"@angular/compiler-cli": "~0.6.3",
"@angular/core": "~2.0.0",
"@angular/forms": "~2.0.0",
"@angular/platform-browser": "~2.0.0",
"@angular/platform-browser-dynamic": "~2.0.0",
"@angular/platform-server": "~2.0.1",
"@ng-bootstrap/ng-bootstrap": "~1.0.0-alpha.0",
"awesome-typescript-loader": "~2.2.4",
"chai": "~3.5.0",

@@ -79,23 +85,19 @@ "chai-dom": "~1.4.0",

"standard-version": "~2.4.0",
"ts-loader": "~0.8.2",
"tslint": "~3.15.1",
"tslint-loader": "~2.1.4",
"typedoc": "~0.4.3",
"typescript": "~1.8.10",
"typings": "~1.3.0",
"typescript": "~2.0.2",
"typings": "~1.4.0",
"validate-commit-msg": "~2.8.0",
"webpack": "~1.13.0",
"webpack-dev-server": "~1.15.0",
"webpack": "~2.1.0-beta.22",
"webpack-dev-server": "~2.1.0-beta.4",
"zone.js": "~0.6.12"
},
"peerDependencies": {
"@angular/core": ">=2.0.0-rc.5",
"@angular/common": ">=2.0.0-rc.5",
"@angular/platform-browser": ">=2.0.0-rc.5"
"@angular/core": "^2.0.0-rc.5",
"@angular/common": "^2.0.0-rc.5",
"@angular/platform-browser": "^2.0.0-rc.5"
},
"files": [
"angular2-bootstrap-confirm.js",
"angular2-bootstrap-confirm.js.map",
"angular2-bootstrap-confirm.d.ts",
"src/**/*.d.ts",
"dist",
"position"

@@ -102,0 +104,0 @@ ],

@@ -9,1 +9,2 @@ export declare class Positioning {

}
export declare function positionElements(hostElement: HTMLElement, targetElement: HTMLElement, placement: string, appendToBody?: boolean): void;

@@ -24,5 +24,5 @@ (function webpackUniversalModuleDefinition(root, factory) {

/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };

@@ -34,3 +34,3 @@ /******/

/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ module.l = true;
/******/

@@ -48,2 +48,26 @@ /******/ // Return the exports of the module

/******/
/******/ // identity function for calling harmory imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmory exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__

@@ -53,3 +77,3 @@ /******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })

@@ -59,136 +83,141 @@ /************************************************************************/

/* 0 */
/***/ function(module, exports) {
/***/ function(module, exports, __webpack_require__) {
"use strict";
// previous version:
// https://github.com/angular-ui/bootstrap/blob/07c31d0731f7cb068a1932b8e01d2312b796b4ec/src/position/position.js
var Positioning = (function () {
function Positioning() {
}
Positioning.prototype.getStyle = function (element, prop) { return window.getComputedStyle(element)[prop]; };
Positioning.prototype.isStaticPositioned = function (element) {
return (this.getStyle(element, 'position') || 'static') === 'static';
};
Positioning.prototype.offsetParent = function (element) {
var offsetParentEl = element.offsetParent || document.documentElement;
while (offsetParentEl && offsetParentEl !== document.documentElement && this.isStaticPositioned(offsetParentEl)) {
offsetParentEl = offsetParentEl.offsetParent;
}
return offsetParentEl || document.documentElement;
};
Positioning.prototype.position = function (element, round) {
if (round === void 0) { round = true; }
var elPosition;
var parentOffset = { width: 0, height: 0, top: 0, bottom: 0, left: 0, right: 0 };
if (this.getStyle(element, 'position') === 'fixed') {
elPosition = element.getBoundingClientRect();
}
else {
var offsetParentEl = this.offsetParent(element);
elPosition = this.offset(element, false);
if (offsetParentEl !== document.documentElement) {
parentOffset = this.offset(offsetParentEl, false);
}
parentOffset.top += offsetParentEl.clientTop;
parentOffset.left += offsetParentEl.clientLeft;
}
elPosition.top -= parentOffset.top;
elPosition.bottom -= parentOffset.top;
elPosition.left -= parentOffset.left;
elPosition.right -= parentOffset.left;
if (round) {
elPosition.top = Math.round(elPosition.top);
elPosition.bottom = Math.round(elPosition.bottom);
elPosition.left = Math.round(elPosition.left);
elPosition.right = Math.round(elPosition.right);
}
return elPosition;
};
Positioning.prototype.offset = function (element, round) {
if (round === void 0) { round = true; }
var elBcr = element.getBoundingClientRect();
var viewportOffset = {
top: window.pageYOffset - document.documentElement.clientTop,
left: window.pageXOffset - document.documentElement.clientLeft
};
var elOffset = {
height: elBcr.height || element.offsetHeight,
width: elBcr.width || element.offsetWidth,
top: elBcr.top + viewportOffset.top,
bottom: elBcr.bottom + viewportOffset.top,
left: elBcr.left + viewportOffset.left,
right: elBcr.right + viewportOffset.left
};
if (round) {
elOffset.height = Math.round(elOffset.height);
elOffset.width = Math.round(elOffset.width);
elOffset.top = Math.round(elOffset.top);
elOffset.bottom = Math.round(elOffset.bottom);
elOffset.left = Math.round(elOffset.left);
elOffset.right = Math.round(elOffset.right);
}
return elOffset;
};
Positioning.prototype.positionElements = function (hostElement, targetElement, placement, appendToBody) {
var hostElPosition = appendToBody ? this.offset(hostElement, false) : this.position(hostElement, false);
var shiftWidth = {
left: hostElPosition.left,
center: hostElPosition.left + hostElPosition.width / 2 - targetElement.offsetWidth / 2,
right: hostElPosition.left + hostElPosition.width
};
var shiftHeight = {
top: hostElPosition.top,
center: hostElPosition.top + hostElPosition.height / 2 - targetElement.offsetHeight / 2,
bottom: hostElPosition.top + hostElPosition.height
};
var targetElBCR = targetElement.getBoundingClientRect();
var placementPrimary = placement.split('-')[0] || 'top';
var placementSecondary = placement.split('-')[1] || 'center';
var targetElPosition = {
height: targetElBCR.height || targetElement.offsetHeight,
width: targetElBCR.width || targetElement.offsetWidth,
top: 0,
bottom: targetElBCR.height || targetElement.offsetHeight,
left: 0,
right: targetElBCR.width || targetElement.offsetWidth
};
switch (placementPrimary) {
case 'top':
targetElPosition.top = hostElPosition.top - targetElement.offsetHeight;
targetElPosition.bottom += hostElPosition.top - targetElement.offsetHeight;
targetElPosition.left = shiftWidth[placementSecondary];
targetElPosition.right += shiftWidth[placementSecondary];
break;
case 'bottom':
targetElPosition.top = shiftHeight[placementPrimary];
targetElPosition.bottom += shiftHeight[placementPrimary];
targetElPosition.left = shiftWidth[placementSecondary];
targetElPosition.right += shiftWidth[placementSecondary];
break;
case 'left':
targetElPosition.top = shiftHeight[placementSecondary];
targetElPosition.bottom += shiftHeight[placementSecondary];
targetElPosition.left = hostElPosition.left - targetElement.offsetWidth;
targetElPosition.right += hostElPosition.left - targetElement.offsetWidth;
break;
case 'right':
targetElPosition.top = shiftHeight[placementSecondary];
targetElPosition.bottom += shiftHeight[placementSecondary];
targetElPosition.left = shiftWidth[placementPrimary];
targetElPosition.right += shiftWidth[placementPrimary];
break;
}
targetElPosition.top = Math.round(targetElPosition.top);
targetElPosition.bottom = Math.round(targetElPosition.bottom);
targetElPosition.left = Math.round(targetElPosition.left);
targetElPosition.right = Math.round(targetElPosition.right);
return targetElPosition;
};
return Positioning;
}());
exports.Positioning = Positioning;
//# sourceMappingURL=positioning.js.map
"use strict";
/* harmony export (binding) */ __webpack_require__.d(exports, "Positioning", function() { return Positioning; });
/* harmony export (immutable) */ exports["positionElements"] = positionElements;
// previous version:
// https://github.com/angular-ui/bootstrap/blob/07c31d0731f7cb068a1932b8e01d2312b796b4ec/src/position/position.js
var Positioning = (function () {
function Positioning() {
}
Positioning.prototype.getStyle = function (element, prop) { return window.getComputedStyle(element)[prop]; };
Positioning.prototype.isStaticPositioned = function (element) {
return (this.getStyle(element, 'position') || 'static') === 'static';
};
Positioning.prototype.offsetParent = function (element) {
var offsetParentEl = element.offsetParent || document.documentElement;
while (offsetParentEl && offsetParentEl !== document.documentElement && this.isStaticPositioned(offsetParentEl)) {
offsetParentEl = offsetParentEl.offsetParent;
}
return offsetParentEl || document.documentElement;
};
Positioning.prototype.position = function (element, round) {
if (round === void 0) { round = true; }
var elPosition;
var parentOffset = { width: 0, height: 0, top: 0, bottom: 0, left: 0, right: 0 };
if (this.getStyle(element, 'position') === 'fixed') {
elPosition = element.getBoundingClientRect();
}
else {
var offsetParentEl = this.offsetParent(element);
elPosition = this.offset(element, false);
if (offsetParentEl !== document.documentElement) {
parentOffset = this.offset(offsetParentEl, false);
}
parentOffset.top += offsetParentEl.clientTop;
parentOffset.left += offsetParentEl.clientLeft;
}
elPosition.top -= parentOffset.top;
elPosition.bottom -= parentOffset.top;
elPosition.left -= parentOffset.left;
elPosition.right -= parentOffset.left;
if (round) {
elPosition.top = Math.round(elPosition.top);
elPosition.bottom = Math.round(elPosition.bottom);
elPosition.left = Math.round(elPosition.left);
elPosition.right = Math.round(elPosition.right);
}
return elPosition;
};
Positioning.prototype.offset = function (element, round) {
if (round === void 0) { round = true; }
var elBcr = element.getBoundingClientRect();
var viewportOffset = {
top: window.pageYOffset - document.documentElement.clientTop,
left: window.pageXOffset - document.documentElement.clientLeft
};
var elOffset = {
height: elBcr.height || element.offsetHeight,
width: elBcr.width || element.offsetWidth,
top: elBcr.top + viewportOffset.top,
bottom: elBcr.bottom + viewportOffset.top,
left: elBcr.left + viewportOffset.left,
right: elBcr.right + viewportOffset.left
};
if (round) {
elOffset.height = Math.round(elOffset.height);
elOffset.width = Math.round(elOffset.width);
elOffset.top = Math.round(elOffset.top);
elOffset.bottom = Math.round(elOffset.bottom);
elOffset.left = Math.round(elOffset.left);
elOffset.right = Math.round(elOffset.right);
}
return elOffset;
};
Positioning.prototype.positionElements = function (hostElement, targetElement, placement, appendToBody) {
var hostElPosition = appendToBody ? this.offset(hostElement, false) : this.position(hostElement, false);
var shiftWidth = {
left: hostElPosition.left,
center: hostElPosition.left + hostElPosition.width / 2 - targetElement.offsetWidth / 2,
right: hostElPosition.left + hostElPosition.width
};
var shiftHeight = {
top: hostElPosition.top,
center: hostElPosition.top + hostElPosition.height / 2 - targetElement.offsetHeight / 2,
bottom: hostElPosition.top + hostElPosition.height
};
var targetElBCR = targetElement.getBoundingClientRect();
var placementPrimary = placement.split('-')[0] || 'top';
var placementSecondary = placement.split('-')[1] || 'center';
var targetElPosition = {
height: targetElBCR.height || targetElement.offsetHeight,
width: targetElBCR.width || targetElement.offsetWidth,
top: 0,
bottom: targetElBCR.height || targetElement.offsetHeight,
left: 0,
right: targetElBCR.width || targetElement.offsetWidth
};
switch (placementPrimary) {
case 'top':
targetElPosition.top = hostElPosition.top - targetElement.offsetHeight;
targetElPosition.bottom += hostElPosition.top - targetElement.offsetHeight;
targetElPosition.left = shiftWidth[placementSecondary];
targetElPosition.right += shiftWidth[placementSecondary];
break;
case 'bottom':
targetElPosition.top = shiftHeight[placementPrimary];
targetElPosition.bottom += shiftHeight[placementPrimary];
targetElPosition.left = shiftWidth[placementSecondary];
targetElPosition.right += shiftWidth[placementSecondary];
break;
case 'left':
targetElPosition.top = shiftHeight[placementSecondary];
targetElPosition.bottom += shiftHeight[placementSecondary];
targetElPosition.left = hostElPosition.left - targetElement.offsetWidth;
targetElPosition.right += hostElPosition.left - targetElement.offsetWidth;
break;
case 'right':
targetElPosition.top = shiftHeight[placementSecondary];
targetElPosition.bottom += shiftHeight[placementSecondary];
targetElPosition.left = shiftWidth[placementPrimary];
targetElPosition.right += shiftWidth[placementPrimary];
break;
}
targetElPosition.top = Math.round(targetElPosition.top);
targetElPosition.bottom = Math.round(targetElPosition.bottom);
targetElPosition.left = Math.round(targetElPosition.left);
targetElPosition.right = Math.round(targetElPosition.right);
return targetElPosition;
};
return Positioning;
}());
var positionService = new Positioning();
function positionElements(hostElement, targetElement, placement, appendToBody) {
var pos = positionService.positionElements(hostElement, targetElement, placement, appendToBody);
targetElement.style.top = pos.top + "px";
targetElement.style.left = pos.left + "px";
}
//# sourceMappingURL=positioning.js.map
/***/ }

@@ -195,0 +224,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