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

@antv/g-plugin-dom-interaction

Package Overview
Dependencies
Maintainers
63
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-plugin-dom-interaction - npm Package Compare versions

Comparing version 1.7.33 to 1.7.34

22

dist/index.esm.js

@@ -1,2 +0,2 @@

import { AbstractRendererPlugin } from '@antv/g-lite';
import { runtime, AbstractRendererPlugin } from '@antv/g-lite';

@@ -385,7 +385,7 @@ function _regeneratorRuntime() {

var addPointerEventListener = function addPointerEventListener($el) {
globalThis.document.addEventListener('pointermove', onPointerMove, true);
runtime.globalThis.document.addEventListener('pointermove', onPointerMove, true);
$el.addEventListener('pointerdown', onPointerDown, true);
$el.addEventListener('pointerleave', onPointerOut, true);
$el.addEventListener('pointerover', onPointerOver, true);
globalThis.addEventListener('pointerup', onPointerUp, true);
runtime.globalThis.addEventListener('pointerup', onPointerUp, true);
};

@@ -399,14 +399,14 @@ var addTouchEventListener = function addTouchEventListener($el) {

var addMouseEventListener = function addMouseEventListener($el) {
globalThis.document.addEventListener('mousemove', onPointerMove, true);
runtime.globalThis.document.addEventListener('mousemove', onPointerMove, true);
$el.addEventListener('mousedown', onPointerDown, true);
$el.addEventListener('mouseout', onPointerOut, true);
$el.addEventListener('mouseover', onPointerOver, true);
globalThis.addEventListener('mouseup', onPointerUp, true);
runtime.globalThis.addEventListener('mouseup', onPointerUp, true);
};
var removePointerEventListener = function removePointerEventListener($el) {
globalThis.document.removeEventListener('pointermove', onPointerMove, true);
runtime.globalThis.document.removeEventListener('pointermove', onPointerMove, true);
$el.removeEventListener('pointerdown', onPointerDown, true);
$el.removeEventListener('pointerleave', onPointerOut, true);
$el.removeEventListener('pointerover', onPointerOver, true);
globalThis.removeEventListener('pointerup', onPointerUp, true);
runtime.globalThis.removeEventListener('pointerup', onPointerUp, true);
};

@@ -420,7 +420,7 @@ var removeTouchEventListener = function removeTouchEventListener($el) {

var removeMouseEventListener = function removeMouseEventListener($el) {
globalThis.document.removeEventListener('mousemove', onPointerMove, true);
runtime.globalThis.document.removeEventListener('mousemove', onPointerMove, true);
$el.removeEventListener('mousedown', onPointerDown, true);
$el.removeEventListener('mouseout', onPointerOut, true);
$el.removeEventListener('mouseover', onPointerOver, true);
globalThis.removeEventListener('mouseup', onPointerUp, true);
runtime.globalThis.removeEventListener('mouseup', onPointerUp, true);
};

@@ -434,3 +434,3 @@ renderingService.hooks.init.tapPromise(DOMInteractionPlugin.tag, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {

$el = _this.context.contextService.getDomElement(); // @ts-ignore
if (globalThis.navigator.msPointerEnabled) {
if (runtime.globalThis.navigator.msPointerEnabled) {
// @ts-ignore

@@ -467,3 +467,3 @@ $el.style.msContentZooming = 'none';

// @ts-ignore
if (globalThis.navigator.msPointerEnabled) {
if (runtime.globalThis.navigator.msPointerEnabled) {
// @ts-ignore

@@ -470,0 +470,0 @@ $el.style.msContentZooming = '';

@@ -389,7 +389,7 @@ 'use strict';

var addPointerEventListener = function addPointerEventListener($el) {
globalThis.document.addEventListener('pointermove', onPointerMove, true);
gLite.runtime.globalThis.document.addEventListener('pointermove', onPointerMove, true);
$el.addEventListener('pointerdown', onPointerDown, true);
$el.addEventListener('pointerleave', onPointerOut, true);
$el.addEventListener('pointerover', onPointerOver, true);
globalThis.addEventListener('pointerup', onPointerUp, true);
gLite.runtime.globalThis.addEventListener('pointerup', onPointerUp, true);
};

@@ -403,14 +403,14 @@ var addTouchEventListener = function addTouchEventListener($el) {

var addMouseEventListener = function addMouseEventListener($el) {
globalThis.document.addEventListener('mousemove', onPointerMove, true);
gLite.runtime.globalThis.document.addEventListener('mousemove', onPointerMove, true);
$el.addEventListener('mousedown', onPointerDown, true);
$el.addEventListener('mouseout', onPointerOut, true);
$el.addEventListener('mouseover', onPointerOver, true);
globalThis.addEventListener('mouseup', onPointerUp, true);
gLite.runtime.globalThis.addEventListener('mouseup', onPointerUp, true);
};
var removePointerEventListener = function removePointerEventListener($el) {
globalThis.document.removeEventListener('pointermove', onPointerMove, true);
gLite.runtime.globalThis.document.removeEventListener('pointermove', onPointerMove, true);
$el.removeEventListener('pointerdown', onPointerDown, true);
$el.removeEventListener('pointerleave', onPointerOut, true);
$el.removeEventListener('pointerover', onPointerOver, true);
globalThis.removeEventListener('pointerup', onPointerUp, true);
gLite.runtime.globalThis.removeEventListener('pointerup', onPointerUp, true);
};

@@ -424,7 +424,7 @@ var removeTouchEventListener = function removeTouchEventListener($el) {

var removeMouseEventListener = function removeMouseEventListener($el) {
globalThis.document.removeEventListener('mousemove', onPointerMove, true);
gLite.runtime.globalThis.document.removeEventListener('mousemove', onPointerMove, true);
$el.removeEventListener('mousedown', onPointerDown, true);
$el.removeEventListener('mouseout', onPointerOut, true);
$el.removeEventListener('mouseover', onPointerOver, true);
globalThis.removeEventListener('mouseup', onPointerUp, true);
gLite.runtime.globalThis.removeEventListener('mouseup', onPointerUp, true);
};

@@ -438,3 +438,3 @@ renderingService.hooks.init.tapPromise(DOMInteractionPlugin.tag, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {

$el = _this.context.contextService.getDomElement(); // @ts-ignore
if (globalThis.navigator.msPointerEnabled) {
if (gLite.runtime.globalThis.navigator.msPointerEnabled) {
// @ts-ignore

@@ -471,3 +471,3 @@ $el.style.msContentZooming = 'none';

// @ts-ignore
if (globalThis.navigator.msPointerEnabled) {
if (gLite.runtime.globalThis.navigator.msPointerEnabled) {
// @ts-ignore

@@ -474,0 +474,0 @@ $el.style.msContentZooming = '';

@@ -389,7 +389,7 @@ (function (global, factory) {

var addPointerEventListener = function addPointerEventListener($el) {
globalThis.document.addEventListener('pointermove', onPointerMove, true);
gLite.runtime.globalThis.document.addEventListener('pointermove', onPointerMove, true);
$el.addEventListener('pointerdown', onPointerDown, true);
$el.addEventListener('pointerleave', onPointerOut, true);
$el.addEventListener('pointerover', onPointerOver, true);
globalThis.addEventListener('pointerup', onPointerUp, true);
gLite.runtime.globalThis.addEventListener('pointerup', onPointerUp, true);
};

@@ -403,14 +403,14 @@ var addTouchEventListener = function addTouchEventListener($el) {

var addMouseEventListener = function addMouseEventListener($el) {
globalThis.document.addEventListener('mousemove', onPointerMove, true);
gLite.runtime.globalThis.document.addEventListener('mousemove', onPointerMove, true);
$el.addEventListener('mousedown', onPointerDown, true);
$el.addEventListener('mouseout', onPointerOut, true);
$el.addEventListener('mouseover', onPointerOver, true);
globalThis.addEventListener('mouseup', onPointerUp, true);
gLite.runtime.globalThis.addEventListener('mouseup', onPointerUp, true);
};
var removePointerEventListener = function removePointerEventListener($el) {
globalThis.document.removeEventListener('pointermove', onPointerMove, true);
gLite.runtime.globalThis.document.removeEventListener('pointermove', onPointerMove, true);
$el.removeEventListener('pointerdown', onPointerDown, true);
$el.removeEventListener('pointerleave', onPointerOut, true);
$el.removeEventListener('pointerover', onPointerOver, true);
globalThis.removeEventListener('pointerup', onPointerUp, true);
gLite.runtime.globalThis.removeEventListener('pointerup', onPointerUp, true);
};

@@ -424,7 +424,7 @@ var removeTouchEventListener = function removeTouchEventListener($el) {

var removeMouseEventListener = function removeMouseEventListener($el) {
globalThis.document.removeEventListener('mousemove', onPointerMove, true);
gLite.runtime.globalThis.document.removeEventListener('mousemove', onPointerMove, true);
$el.removeEventListener('mousedown', onPointerDown, true);
$el.removeEventListener('mouseout', onPointerOut, true);
$el.removeEventListener('mouseover', onPointerOver, true);
globalThis.removeEventListener('mouseup', onPointerUp, true);
gLite.runtime.globalThis.removeEventListener('mouseup', onPointerUp, true);
};

@@ -438,3 +438,3 @@ renderingService.hooks.init.tapPromise(DOMInteractionPlugin.tag, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {

$el = _this.context.contextService.getDomElement(); // @ts-ignore
if (globalThis.navigator.msPointerEnabled) {
if (gLite.runtime.globalThis.navigator.msPointerEnabled) {
// @ts-ignore

@@ -471,3 +471,3 @@ $el.style.msContentZooming = 'none';

// @ts-ignore
if (globalThis.navigator.msPointerEnabled) {
if (gLite.runtime.globalThis.navigator.msPointerEnabled) {
// @ts-ignore

@@ -474,0 +474,0 @@ $el.style.msContentZooming = '';

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.DOMInteraction={}),t.window.G)}(this,(function(t,e){"use strict";function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=Object.create((e&&e.prototype instanceof v?e:v).prototype),a=new T(r||[]);return o(i,"_invoke",{value:b(t,n,a)}),i}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function v(){}function p(){}function d(){}var y={};s(y,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(_([])));g&&g!==e&&r.call(g,a)&&(y=g);var E=d.prototype=v.prototype=Object.create(y);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function b(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=x(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=h(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=h(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=d,o(E,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:p,configurable:!0}),p.displayName=s(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,u,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},L(w.prototype),s(w.prototype,c,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(E),s(E,u,"Generator"),s(E,a,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=_,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function r(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))}}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var a=function(){function t(){this.context=void 0}return t.prototype.apply=function(e){var r=this,i=e.renderingService,a=e.renderingContext;this.context=e;var c=a.root.ownerDocument.defaultView,u=function(t){i.hooks.pointerMove.call(t)},s=function(t){i.hooks.pointerUp.call(t)},l=function(t){i.hooks.pointerDown.call(t)},h=function(t){i.hooks.pointerOver.call(t)},f=function(t){i.hooks.pointerOut.call(t)},v=function(t){i.hooks.pointerCancel.call(t)},p=function(t){i.hooks.pointerWheel.call(t)},d=function(t){globalThis.document.addEventListener("pointermove",u,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("pointerleave",f,!0),t.addEventListener("pointerover",h,!0),globalThis.addEventListener("pointerup",s,!0)},y=function(t){t.addEventListener("touchstart",l,!0),t.addEventListener("touchend",s,!0),t.addEventListener("touchmove",u,!0),t.addEventListener("touchcancel",v,!0)},m=function(t){globalThis.document.addEventListener("mousemove",u,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("mouseout",f,!0),t.addEventListener("mouseover",h,!0),globalThis.addEventListener("mouseup",s,!0)};i.hooks.init.tapPromise(t.tag,o(n().mark((function t(){var e;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=r.context.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="none",e.style.msTouchAction="none"):c.supportsPointerEvents&&(e.style.touchAction="none"),c.supportsPointerEvents?d(e):m(e),c.supportsTouchEvents&&y(e),e.addEventListener("wheel",p,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),i.hooks.destroy.tap(t.tag,(function(){var t=r.context.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):c.supportsPointerEvents&&(t.style.touchAction=""),c.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",u,!0),t.removeEventListener("pointerdown",l,!0),t.removeEventListener("pointerleave",f,!0),t.removeEventListener("pointerover",h,!0),globalThis.removeEventListener("pointerup",s,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",u,!0),t.removeEventListener("mousedown",l,!0),t.removeEventListener("mouseout",f,!0),t.removeEventListener("mouseover",h,!0),globalThis.removeEventListener("mouseup",s,!0)}(t),c.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",l,!0),t.removeEventListener("touchend",s,!0),t.removeEventListener("touchmove",u,!0),t.removeEventListener("touchcancel",v,!0)}(t),t.removeEventListener("wheel",p,!0)}))},t}();a.tag="DOMInteraction";var c=function(t){var e,n;function r(){for(var e,n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).name="dom-interaction",e}(e=r).prototype=Object.create((n=t).prototype),e.prototype.constructor=e,i(e,n);var o=r.prototype;return o.init=function(){this.addRenderingPlugin(new a)},o.destroy=function(){this.removeAllRenderingPlugins()},r}(e.AbstractRendererPlugin);t.Plugin=c,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.DOMInteraction={}),t.window.G)}(this,(function(t,e){"use strict";function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=Object.create((e&&e.prototype instanceof v?e:v).prototype),a=new T(r||[]);return o(i,"_invoke",{value:b(t,n,a)}),i}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function v(){}function p(){}function d(){}var m={};s(m,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(_([])));g&&g!==e&&r.call(g,a)&&(m=g);var E=d.prototype=v.prototype=Object.create(m);function L(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function b(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=x(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=h(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=h(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function _(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=d,o(E,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:p,configurable:!0}),p.displayName=s(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,u,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},L(w.prototype),s(w.prototype,c,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(E),s(E,u,"Generator"),s(E,a,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=_,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function r(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))}}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var a=function(){function t(){this.context=void 0}return t.prototype.apply=function(r){var i=this,a=r.renderingService,c=r.renderingContext;this.context=r;var u=c.root.ownerDocument.defaultView,s=function(t){a.hooks.pointerMove.call(t)},l=function(t){a.hooks.pointerUp.call(t)},h=function(t){a.hooks.pointerDown.call(t)},f=function(t){a.hooks.pointerOver.call(t)},v=function(t){a.hooks.pointerOut.call(t)},p=function(t){a.hooks.pointerCancel.call(t)},d=function(t){a.hooks.pointerWheel.call(t)},m=function(t){e.runtime.globalThis.document.addEventListener("pointermove",s,!0),t.addEventListener("pointerdown",h,!0),t.addEventListener("pointerleave",v,!0),t.addEventListener("pointerover",f,!0),e.runtime.globalThis.addEventListener("pointerup",l,!0)},y=function(t){t.addEventListener("touchstart",h,!0),t.addEventListener("touchend",l,!0),t.addEventListener("touchmove",s,!0),t.addEventListener("touchcancel",p,!0)},g=function(t){e.runtime.globalThis.document.addEventListener("mousemove",s,!0),t.addEventListener("mousedown",h,!0),t.addEventListener("mouseout",v,!0),t.addEventListener("mouseover",f,!0),e.runtime.globalThis.addEventListener("mouseup",l,!0)};a.hooks.init.tapPromise(t.tag,o(n().mark((function t(){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=i.context.contextService.getDomElement(),e.runtime.globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):u.supportsPointerEvents&&(r.style.touchAction="none"),u.supportsPointerEvents?m(r):g(r),u.supportsTouchEvents&&y(r),r.addEventListener("wheel",d,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),a.hooks.destroy.tap(t.tag,(function(){var t=i.context.contextService.getDomElement();e.runtime.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):u.supportsPointerEvents&&(t.style.touchAction=""),u.supportsPointerEvents?function(t){e.runtime.globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",h,!0),t.removeEventListener("pointerleave",v,!0),t.removeEventListener("pointerover",f,!0),e.runtime.globalThis.removeEventListener("pointerup",l,!0)}(t):function(t){e.runtime.globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",h,!0),t.removeEventListener("mouseout",v,!0),t.removeEventListener("mouseover",f,!0),e.runtime.globalThis.removeEventListener("mouseup",l,!0)}(t),u.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",h,!0),t.removeEventListener("touchend",l,!0),t.removeEventListener("touchmove",s,!0),t.removeEventListener("touchcancel",p,!0)}(t),t.removeEventListener("wheel",d,!0)}))},t}();a.tag="DOMInteraction";var c=function(t){var e,n;function r(){for(var e,n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).name="dom-interaction",e}(e=r).prototype=Object.create((n=t).prototype),e.prototype.constructor=e,i(e,n);var o=r.prototype;return o.init=function(){this.addRenderingPlugin(new a)},o.destroy=function(){this.removeAllRenderingPlugins()},r}(e.AbstractRendererPlugin);t.Plugin=c,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "@antv/g-plugin-dom-interaction",
"version": "1.7.33",
"version": "1.7.34",
"description": "A G plugin",

@@ -44,3 +44,3 @@ "keywords": [

},
"gitHead": "c3c09705bf97040bbec01d94f55c27cc6f14d230"
"gitHead": "d780322215f8ece20e3a2d8c137c02c0a6b57f84"
}

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