@antv/dom-util
Advanced tools
Comparing version 2.0.1 to 2.0.2
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function addEventListener(target, eventType, callback) { | ||
@@ -10,3 +10,3 @@ if (target) { | ||
target.removeEventListener(eventType, callback, false); | ||
} | ||
}, | ||
}; | ||
@@ -22,3 +22,3 @@ // @ts-ignore | ||
target.detachEvent('on' + eventType, callback); | ||
} | ||
}, | ||
}; | ||
@@ -28,3 +28,3 @@ } | ||
} | ||
exports["default"] = addEventListener; | ||
exports.default = addEventListener; | ||
//# sourceMappingURL=add-event-listener.js.map |
@@ -7,3 +7,3 @@ "use strict"; | ||
*/ | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var TABLE; | ||
@@ -24,3 +24,3 @@ var TABLE_TR; | ||
th: TABLE_TR, | ||
'*': document.createElement('div') | ||
'*': document.createElement('div'), | ||
}; | ||
@@ -43,3 +43,3 @@ } | ||
} | ||
exports["default"] = createDom; | ||
exports.default = createDom; | ||
//# sourceMappingURL=create-dom.js.map |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var get_style_1 = require("./get-style"); | ||
function getHeight(el, defaultValue) { | ||
var height = get_style_1["default"](el, 'height', defaultValue); | ||
var height = get_style_1.default(el, 'height', defaultValue); | ||
if (height === 'auto') { | ||
@@ -11,3 +11,3 @@ height = el.offsetHeight; | ||
} | ||
exports["default"] = getHeight; | ||
exports.default = getHeight; | ||
//# sourceMappingURL=get-height.js.map |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var get_style_1 = require("./get-style"); | ||
var get_height_1 = require("./get-height"); | ||
function getOuterHeight(el, defaultValue) { | ||
var height = get_height_1["default"](el, defaultValue); | ||
var bTop = parseFloat(get_style_1["default"](el, 'borderTopWidth')) || 0; | ||
var pTop = parseFloat(get_style_1["default"](el, 'paddingTop')) || 0; | ||
var pBottom = parseFloat(get_style_1["default"](el, 'paddingBottom')) || 0; | ||
var bBottom = parseFloat(get_style_1["default"](el, 'borderBottomWidth')) || 0; | ||
var mTop = parseFloat(get_style_1["default"](el, 'marginTop')) || 0; | ||
var mBottom = parseFloat(get_style_1["default"](el, 'marginBottom')) || 0; | ||
var height = get_height_1.default(el, defaultValue); | ||
var bTop = parseFloat(get_style_1.default(el, 'borderTopWidth')) || 0; | ||
var pTop = parseFloat(get_style_1.default(el, 'paddingTop')) || 0; | ||
var pBottom = parseFloat(get_style_1.default(el, 'paddingBottom')) || 0; | ||
var bBottom = parseFloat(get_style_1.default(el, 'borderBottomWidth')) || 0; | ||
var mTop = parseFloat(get_style_1.default(el, 'marginTop')) || 0; | ||
var mBottom = parseFloat(get_style_1.default(el, 'marginBottom')) || 0; | ||
return height + bTop + bBottom + pTop + pBottom + mTop + mBottom; | ||
} | ||
exports["default"] = getOuterHeight; | ||
exports.default = getOuterHeight; | ||
//# sourceMappingURL=get-outer-height.js.map |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var get_style_1 = require("./get-style"); | ||
var get_width_1 = require("./get-width"); | ||
function getOuterWidth(el, defaultValue) { | ||
var width = get_width_1["default"](el, defaultValue); | ||
var bLeft = parseFloat(get_style_1["default"](el, 'borderLeftWidth')) || 0; | ||
var pLeft = parseFloat(get_style_1["default"](el, 'paddingLeft')) || 0; | ||
var pRight = parseFloat(get_style_1["default"](el, 'paddingRight')) || 0; | ||
var bRight = parseFloat(get_style_1["default"](el, 'borderRightWidth')) || 0; | ||
var mRight = parseFloat(get_style_1["default"](el, 'marginRight')) || 0; | ||
var mLeft = parseFloat(get_style_1["default"](el, 'marginLeft')) || 0; | ||
var width = get_width_1.default(el, defaultValue); | ||
var bLeft = parseFloat(get_style_1.default(el, 'borderLeftWidth')) || 0; | ||
var pLeft = parseFloat(get_style_1.default(el, 'paddingLeft')) || 0; | ||
var pRight = parseFloat(get_style_1.default(el, 'paddingRight')) || 0; | ||
var bRight = parseFloat(get_style_1.default(el, 'borderRightWidth')) || 0; | ||
var mRight = parseFloat(get_style_1.default(el, 'marginRight')) || 0; | ||
var mLeft = parseFloat(get_style_1.default(el, 'marginLeft')) || 0; | ||
return width + bLeft + bRight + pLeft + pRight + mLeft + mRight; | ||
} | ||
exports["default"] = getOuterWidth; | ||
exports.default = getOuterWidth; | ||
//# sourceMappingURL=get-outer-width.js.map |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function getRatio() { | ||
return window.devicePixelRatio ? window.devicePixelRatio : 2; | ||
} | ||
exports["default"] = getRatio; | ||
exports.default = getRatio; | ||
//# sourceMappingURL=get-ratio.js.map |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
@@ -25,3 +25,3 @@ * 获取样式 | ||
} | ||
exports["default"] = getStyle; | ||
exports.default = getStyle; | ||
//# sourceMappingURL=get-style.js.map |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var get_style_1 = require("./get-style"); | ||
function getHeight(el, defaultValue) { | ||
var width = get_style_1["default"](el, 'width', defaultValue); | ||
var width = get_style_1.default(el, 'width', defaultValue); | ||
if (width === 'auto') { | ||
@@ -11,3 +11,3 @@ width = el.offsetWidth; | ||
} | ||
exports["default"] = getHeight; | ||
exports.default = getHeight; | ||
//# sourceMappingURL=get-width.js.map |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// dom | ||
var add_event_listener_1 = require("./add-event-listener"); | ||
exports.addEventListener = add_event_listener_1["default"]; | ||
exports.addEventListener = add_event_listener_1.default; | ||
var create_dom_1 = require("./create-dom"); | ||
exports.createDom = create_dom_1["default"]; | ||
exports.createDom = create_dom_1.default; | ||
var get_height_1 = require("./get-height"); | ||
exports.getHeight = get_height_1["default"]; | ||
exports.getHeight = get_height_1.default; | ||
var get_outer_height_1 = require("./get-outer-height"); | ||
exports.getOuterHeight = get_outer_height_1["default"]; | ||
exports.getOuterHeight = get_outer_height_1.default; | ||
var get_outer_width_1 = require("./get-outer-width"); | ||
exports.getOuterWidth = get_outer_width_1["default"]; | ||
exports.getOuterWidth = get_outer_width_1.default; | ||
var get_ratio_1 = require("./get-ratio"); | ||
exports.getRatio = get_ratio_1["default"]; | ||
exports.getRatio = get_ratio_1.default; | ||
var get_style_1 = require("./get-style"); | ||
exports.getStyle = get_style_1["default"]; | ||
exports.getStyle = get_style_1.default; | ||
var get_width_1 = require("./get-width"); | ||
exports.getWidth = get_width_1["default"]; | ||
exports.getWidth = get_width_1.default; | ||
var modify_css_1 = require("./modify-css"); | ||
exports.modifyCSS = modify_css_1["default"]; | ||
exports.modifyCSS = modify_css_1.default; | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function modifyCSS(dom, css) { | ||
@@ -13,3 +13,3 @@ if (dom) { | ||
} | ||
exports["default"] = modifyCSS; | ||
exports.default = modifyCSS; | ||
//# sourceMappingURL=modify-css.js.map |
{ | ||
"name": "@antv/dom-util", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A common util collection for antv projects", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"module": "esm/index.js", | ||
"files": [ | ||
"package.json", | ||
"esm", | ||
"lib", | ||
"README.md" | ||
], | ||
"scripts": { | ||
"build": "rm -rf lib && tsc", | ||
"build": "npm run clean && run-p build:*", | ||
"build:esm": "tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm", | ||
"build:cjs": "tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib", | ||
"clean": "rm -rf lib && rm -rf esm", | ||
"coverage": "npm run coverage-generator && npm run coverage-viewer", | ||
@@ -33,6 +43,10 @@ "coverage-generator": "torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts __tests__/mocha.opts", | ||
"@antv/torch": "^1.0.0", | ||
"less": "^3.9.0" | ||
"less": "^3.9.0", | ||
"npm-run-all": "^4.1.5" | ||
}, | ||
"homepage": "https://github.com/antvis/util#readme", | ||
"dependencies": {} | ||
"dependencies": { | ||
"tslib": "^1.10.0" | ||
}, | ||
"gitHead": "502334a1fb8acb3bfdbeb6cd7a34175f75c3e04f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
29365
62
1
3
398
2
+ Addedtslib@^1.10.0
+ Addedtslib@1.14.1(transitive)