New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

protvista-sequence

Package Overview
Dependencies
Maintainers
7
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protvista-sequence - npm Package Compare versions

Comparing version 2.6.1 to 2.7.0

2

dist/protvista-sequence.js

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

var ProtvistaSequence=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var r=n(4);function i(e,n,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=i=Reflect.get:t.exports=i=function(t,e,n){var i=r(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(n):o.value}},i(e,n,o||e)}t.exports=i},function(t,e){t.exports=d3},function(t,e){t.exports=ProtvistaZoomable},function(t,e,n){var r=n(0);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=n(11),i=n(12);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(t,e,n){var r=n(4),i=n(13);function o(t,e,n,s){return(o="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,o){var s,a=r(t,e);if(a){if((s=Object.getOwnPropertyDescriptor(a,e)).set)return s.set.call(o,n),!0;if(!s.writable)return!1}if(s=Object.getOwnPropertyDescriptor(o,e)){if(!s.writable)return!1;s.value=n,Object.defineProperty(o,e,s)}else i(o,e,n);return!0})(t,e,n,s)}t.exports=function(t,e,n,r,i){if(!o(t,e,n,r||t)&&i)throw new Error("failed to set property");return n}},function(t,e,n){var r=n(14);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t,e,n){t.exports=n(15)},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,n){"use strict";n.r(e);var r=n(5),i=n.n(r),o=n(6),s=n.n(o),a=n(7),c=n.n(a),u=n(8),f=n.n(u),h=n(0),l=n.n(h),p=n(1),d=n.n(p),g=n(9),b=n.n(g),y=n(2),v=n(3),x=n.n(v),m=function(t){function e(){return i()(this,e),c()(this,l()(e).apply(this,arguments))}return b()(e,t),s()(e,[{key:"connectedCallback",value:function(){var t=this;d()(l()(e.prototype),"connectedCallback",this).call(this),this.sequence=this.getAttribute("sequence"),this.sequence&&this._createSequence(),this.addEventListener("load",function(e){t.data=e.detail.payload})}},{key:"_getCharSize",value:function(){var t=this.seq_g.select("text.base").node();if(t)this.chWidth=.8*t.getBBox().width,this.chHeight=1.6*t.getBBox().height;else{var e=this.seq_g.append("text").attr("class","base").text("T");this.chWidth=.8*e.node().getBBox().width,this.chHeight=1.6*e.node().getBBox().height,e.remove()}}},{key:"_createSequence",value:function(){f()(l()(e.prototype),"svg",Object(y.select)(this).append("div").attr("class","").append("svg").attr("id","").attr("width",this.width).attr("height",this._height),this,!0),this.seq_bg=d()(l()(e.prototype),"svg",this).append("g").attr("class","background"),this.axis=d()(l()(e.prototype),"svg",this).append("g").attr("class","x axis"),this.seq_g=d()(l()(e.prototype),"svg",this).append("g").attr("class","sequence").attr("transform","translate(0,".concat(.75*this._height,")")),this.trackHighlighter.appendHighlightTo(this.svg),this.refresh()}},{key:"refresh",value:function(){var t=this;if(this._getCharSize(),this.axis){var e=this.getSingleBaseWidth(),n=e-this.chWidth,r=e/2,i=Math.round(Math.max(0,this._displaystart-2)),o=Math.round(Math.min(this.sequence.length,this._displayend+1)),s=n<0?[]:this.sequence.slice(i,o).split("").map(function(t,e){return{start:1+i+e,end:1+i+e,aa:t}});this.height>this.chHeight&&(this.xAxis=Object(y.axisBottom)(this.xScale).tickFormat(function(t){return Number.isInteger(t)?t:""}).ticks(3,"s"),this.axis.call(this.xAxis)),this.axis.attr("transform","translate(".concat(this.margin.left+r,",0)")),this.axis.select(".domain").remove(),this.axis.selectAll(".tick line").remove(),this.bases=this.seq_g.selectAll("text.base").data(s,function(t){return t.start}),this.bases.enter().append("text").attr("class","base").attr("text-anchor","middle").attr("x",function(e){return t.getXFromSeqPosition(e.start)+r}).text(function(t){return t.aa}).style("pointer-events","none").style("font-family","monospace"),this.bases.exit().remove(),this.bases.attr("x",function(e){return t.getXFromSeqPosition(e.start)+r}),this.background=this.seq_bg.selectAll("rect.base_bg").data(s,function(t){return t.start}),this.background.enter().append("rect").attr("class","base_bg feature").attr("height",this._height).merge(this.background).attr("width",e).attr("fill",function(t){return Math.round(t.start)%2?"#ccc":"#eee"}).attr("x",function(e){return t.getXFromSeqPosition(e.start)}).call(this.bindEvents,this),this.background.exit().remove(),this.seq_g.style("opacity",Math.min(1,n)),this.background.style("opacity",Math.min(1,n)),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}},{key:"data",get:function(){return this.sequence},set:function(t){"string"==typeof t?this.sequence=t:"sequence"in t&&(this.sequence=t.sequence),this.sequence&&!d()(l()(e.prototype),"svg",this)?this._createSequence():this.refresh()}}],[{key:"observedAttributes",get:function(){return x.a.observedAttributes.concat("highlightstart","highlightend")}}]),e}(x.a),_=function(){customElements.define("protvista-sequence",m)};window.customElements?_():document.addEventListener("WebComponentsReady",function(){_()})}]);
var ProtvistaSequence=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var r=n(4);function i(e,n,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=i=Reflect.get:t.exports=i=function(t,e,n){var i=r(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(n):o.value}},i(e,n,o||e)}t.exports=i},function(t,e){t.exports=d3},function(t,e){t.exports=ProtvistaZoomable},function(t,e,n){var r=n(0);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=n(11),i=n(12);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(t,e,n){var r=n(4),i=n(13);function o(t,e,n,s){return(o="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,o){var s,a=r(t,e);if(a){if((s=Object.getOwnPropertyDescriptor(a,e)).set)return s.set.call(o,n),!0;if(!s.writable)return!1}if(s=Object.getOwnPropertyDescriptor(o,e)){if(!s.writable)return!1;s.value=n,Object.defineProperty(o,e,s)}else i(o,e,n);return!0})(t,e,n,s)}t.exports=function(t,e,n,r,i){if(!o(t,e,n,r||t)&&i)throw new Error("failed to set property");return n}},function(t,e,n){var r=n(14);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t,e,n){t.exports=n(15)},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,n){"use strict";n.r(e);var r=n(5),i=n.n(r),o=n(6),s=n.n(o),a=n(7),c=n.n(a),u=n(8),f=n.n(u),h=n(0),l=n.n(h),p=n(1),d=n.n(p),g=n(9),b=n.n(g),y=n(2),v=n(3),x=n.n(v),m=function(t){function e(){return i()(this,e),c()(this,l()(e).apply(this,arguments))}return b()(e,t),s()(e,[{key:"connectedCallback",value:function(){var t=this;d()(l()(e.prototype),"connectedCallback",this).call(this),this.sequence=this.getAttribute("sequence"),this.sequence&&this._createSequence(),this.addEventListener("load",function(e){t.data=e.detail.payload})}},{key:"_getCharSize",value:function(){if(this.seq_g){var t=this.seq_g.select("text.base").node();if(t)this.chWidth=.8*t.getBBox().width,this.chHeight=1.6*t.getBBox().height;else{var e=this.seq_g.append("text").attr("class","base").text("T");this.chWidth=.8*e.node().getBBox().width,this.chHeight=1.6*e.node().getBBox().height,e.remove()}}}},{key:"_createSequence",value:function(){f()(l()(e.prototype),"svg",Object(y.select)(this).append("div").attr("class","").append("svg").attr("id","").attr("width",this.width).attr("height",this._height),this,!0),this.seq_bg=d()(l()(e.prototype),"svg",this).append("g").attr("class","background"),this.axis=d()(l()(e.prototype),"svg",this).append("g").attr("class","x axis"),this.seq_g=d()(l()(e.prototype),"svg",this).append("g").attr("class","sequence").attr("transform","translate(0,".concat(.75*this._height,")")),this.trackHighlighter.appendHighlightTo(this.svg),this.refresh()}},{key:"refresh",value:function(){var t=this;if(this._getCharSize(),this.axis){var e=this.getSingleBaseWidth(),n=e-this.chWidth,r=e/2,i=Math.round(Math.max(0,this._displaystart-2)),o=Math.round(Math.min(this.sequence.length,this._displayend+1)),s=n<0?[]:this.sequence.slice(i,o).split("").map(function(t,e){return{start:1+i+e,end:1+i+e,aa:t}});this.height>this.chHeight&&(this.xAxis=Object(y.axisBottom)(this.xScale).tickFormat(function(t){return Number.isInteger(t)?t:""}).ticks(3,"s"),this.axis.call(this.xAxis)),this.axis.attr("transform","translate(".concat(this.margin.left+r,",0)")),this.axis.select(".domain").remove(),this.axis.selectAll(".tick line").remove(),this.bases=this.seq_g.selectAll("text.base").data(s,function(t){return t.start}),this.bases.enter().append("text").attr("class","base").attr("text-anchor","middle").attr("x",function(e){return t.getXFromSeqPosition(e.start)+r}).text(function(t){return t.aa}).style("pointer-events","none").style("font-family","monospace"),this.bases.exit().remove(),this.bases.attr("x",function(e){return t.getXFromSeqPosition(e.start)+r}),this.background=this.seq_bg.selectAll("rect.base_bg").data(s,function(t){return t.start}),this.background.enter().append("rect").attr("class","base_bg feature").attr("height",this._height).merge(this.background).attr("width",e).attr("fill",function(t){return Math.round(t.start)%2?"#ccc":"#eee"}).attr("x",function(e){return t.getXFromSeqPosition(e.start)}).call(this.bindEvents,this),this.background.exit().remove(),this.seq_g.style("opacity",Math.min(1,n)),this.background.style("opacity",Math.min(1,n)),this._updateHighlight()}}},{key:"_updateHighlight",value:function(){this.trackHighlighter.updateHighlight()}},{key:"data",get:function(){return this.sequence},set:function(t){"string"==typeof t?this.sequence=t:"sequence"in t&&(this.sequence=t.sequence),this.sequence&&!d()(l()(e.prototype),"svg",this)?this._createSequence():this.refresh()}}],[{key:"observedAttributes",get:function(){return x.a.observedAttributes.concat("highlightstart","highlightend")}}]),e}(x.a),_=function(){customElements.define("protvista-sequence",m)};window.customElements?_():document.addEventListener("WebComponentsReady",function(){_()})}]);
//# sourceMappingURL=protvista-sequence.js.map
{
"name": "protvista-sequence",
"version": "2.6.1",
"version": "2.7.0",
"description": "Sequence component for the ProtVista tool",

@@ -26,3 +26,3 @@ "files": [

"homepage": "https://ebi-webcomponents.github.io/nightingale/",
"gitHead": "e2d43c39b15f9a84c88c20caf7a07ffcf5f9c5a8",
"gitHead": "5e555eaa38d9facc16ee276eaa4abd47c15a3a74",
"dependencies": {

@@ -29,0 +29,0 @@ "lodash-es": "^4.17.11",

@@ -41,2 +41,3 @@ import { axisBottom, select } from "d3";

_getCharSize() {
if (!this.seq_g) return;
const xratio = 0.8;

@@ -43,0 +44,0 @@ const yratio = 1.6;

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