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

@jspreadsheet/bar

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jspreadsheet/bar - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

36

dist/index.js

@@ -15,10 +15,11 @@ /**

'use strict';var _$_dcb0=";bar;This extension is not included on the scope of this license;License required;This extension request Jspreadsheet Pro v9+;=;360px;320px;!;Name is mandatory;Defined names;Interval Name;Cell range;Save;Cancel;delete;Are you sure?;https://jspreadsheet.com/v8/formulas/g;GET;json;@param ;: ;<br>;(;onselection;data-x;data-y;onblur;onchangedefinednames;onload;oninput;keydown;input;blur;focus;formula;div;object;undefined;function".split(";");
(function(k,e){typeof exports===_$_dcb0[37]&&typeof module!==_$_dcb0[38]?module.exports=e():typeof define===_$_dcb0[39]&&define.amd?define(e):k.bar=e()})(this,function(){var k=jSuites.translate,e=null,n=function(){var b=this,d=null;b.createModal=function(a){d=jSuites.modal(a,{width:_$_dcb0[6],height:_$_dcb0[7],backdrop:!1,closed:!0})};b.open=function(a){d.open();a?(a.index&&(b.index=a.index),a.value&&(b.value=a.value)):(b.index=_$_dcb0[0],b.value=_$_dcb0[0],b.parent.parent.range&&(b.value=e.current.getWorksheetName()+
_$_dcb0[8]+b.parent.parent.range))};b.close=function(a){if(a&&e.current){if(!b.index){alert(_$_dcb0[9]);return}a={index:b.index.toUpperCase(),value:b.value};e.current.setDefinedNames([a])}b.index=_$_dcb0[0];b.value=_$_dcb0[0];d.close()};b.createRangePicker=function(a){e.picker(a,function(){-1==a.val().indexOf(_$_dcb0[8])&&(b.value=e.current.getWorksheetName()+_$_dcb0[8]+a.val())})};var c=`
<div @ready="self.createModal(this)" title="${jSuites.translate(_$_dcb0[10])}">
var _$_dd3d=";bar;This extension is not included on the scope of this license;License required;This extension request Jspreadsheet Pro v9+;=;360px;320px;!;Name is mandatory;Defined names;Interval Name;Cell range;Save;Cancel;delete;Are you sure?;https://jspreadsheet.com/v8/formulas/g;GET;json;@param ;: ;<br>;(;contentEditable;true;data-x;data-y;onselection;onblur;onchangedefinednames;onload;oninput;onafterchanges;keydown;input;blur;focus;readonly;formula;div;object;undefined;function".split(";");
(function(m,d){typeof exports===_$_dd3d[41]&&typeof module!==_$_dd3d[42]?module.exports=d():typeof define===_$_dd3d[43]&&define.amd?define(d):m.bar=d()})(this,function(){var m=jSuites.translate,d=null,q=function(){return 0==this.parent.config.editable||this.options&&0==this.options.editable?!1:!0},r=function(){var b=this,f=null;b.createModal=function(a){f=jSuites.modal(a,{width:_$_dd3d[6],height:_$_dd3d[7],backdrop:!1,closed:!0})};b.open=function(a){f.open();a?(a.index&&(b.index=a.index),a.value&&
(b.value=a.value)):(b.index=_$_dd3d[0],b.value=_$_dd3d[0],b.parent.parent.range&&(b.value=d.current.getWorksheetName()+_$_dd3d[8]+b.parent.parent.range))};b.close=function(a){if(a&&d.current){if(!b.index){alert(_$_dd3d[9]);return}a={index:b.index.toUpperCase(),value:b.value};d.current.setDefinedNames([a])}b.index=_$_dd3d[0];b.value=_$_dd3d[0];f.close()};b.createRangePicker=function(a){d.picker(a,function(){-1==a.val().indexOf(_$_dd3d[8])&&(b.value=d.current.getWorksheetName()+_$_dd3d[8]+a.val())})};
var e=`
<div @ready="self.createModal(this)" title="${jSuites.translate(_$_dd3d[10])}">
<div class='row'>
<div class='column f1'>
<div class='form-group'>
<label class='label'>${jSuites.translate(_$_dcb0[11])}</label>
<label class='label'>${jSuites.translate(_$_dd3d[11])}</label>
<input type='text' @bind='self.index' class='jss_object'/>

@@ -31,3 +32,3 @@ </div>

<div class='form-group'>
<label class='label'>${jSuites.translate(_$_dcb0[12])}</label>
<label class='label'>${jSuites.translate(_$_dd3d[12])}</label>
<div @ready='self.createRangePicker(this)' @bind='self.value'></div>

@@ -39,14 +40,15 @@ </div>

<div class='column center f1'>
<input onclick='self.close(true)' type='button' value="${jSuites.translate(_$_dcb0[13])}" class='jbutton dark w100'>
<input type='button' onclick='self.close()' value="${jSuites.translate(_$_dcb0[14])}" class='jbutton dark w100'>
<input onclick='self.close(true)' type='button' value="${jSuites.translate(_$_dd3d[13])}" class='jbutton dark w100'>
<input type='button' onclick='self.close()' value="${jSuites.translate(_$_dd3d[14])}" class='jbutton dark w100'>
</div>
</div>
</div>`;return lemonade.element(c,b)},p=function(){var b=this;b.visible=!1;b.close=function(){setTimeout(function(){b.visible=!1},100)};b.open=function(){b.visible=b.visible?!1:!0};b[_$_dcb0[15]]=function(d){confirm(k(_$_dcb0[16]))&&e.current.setDefinedNames([{index:d.index,value:null}])};b.edit=function(d){b.modal.open(d);b.visible=!1};b.view=function(d){if(d.value){var c=d.value.split(_$_dcb0[8])[0];Array.isArray(c)&&(c=c[0]);c=c.replace(new RegExp(/'/g),_$_dcb0[0]).toUpperCase();c=
window[c]?window[c]:null;c.openWorksheet();d=c.helpers.getCoordsFromRange(d.value);c.updateSelectionFromCoords(d);b.visible=!1}};b.onload=function(){b.el.component=b;jSuites.tracking(b,!0)};return lemonade.element('\n <div>\n <div class="jss_bar_picker">\n <div><i class="material-icons cursor" onclick="self.open();">arrow_drop_down</i></div>\n <div class="jss_bar_names p20" data-visible="{{self.visible}}">\n <div @loop="self.data">\n <div class="row p6 middle">\n <div class="column f1 cursor" onclick="self.parent.view(self)">\n <div class="p4"><b>{{self.index}}</b></div>\n <div class="p4">{{self.value}}</div>\n </div><div class="column">\n <i class="material-icons cursor" onclick="self.parent.delete(self)">delete</i>\n </div>\n </div>\n </div>\n <br>\n <input type="button" value="Add new entry" class="jbutton dark w100" onclick="self.edit()" />\n </div>\n </div>\n <Modal @ref="self.modal" />\n </div>\n ',
b,{Modal:n})},q=function(){var b=this,d=[];b.onload=function(c){jSuites.ajax({url:_$_dcb0[17],method:_$_dcb0[18],dataType:_$_dcb0[19],success:function(a){d=a}})};b.search=function(c){b.data=[];if((_$_dcb0[0]+c).substr(0,1)!==_$_dcb0[5])return!1;var a=window.getSelection();a&&0!==a.rangeCount&&(a=a.getRangeAt(0),a.cloneRange(),c=a.startContainer.textContent.replace(/[^A-Z]/gi,_$_dcb0[0]));c&&(b.data=d.filter(function(f){f.params=f.param?f.param.map(function(g){return _$_dcb0[20]+g.type+_$_dcb0[21]+
(g.comment||_$_dcb0[0])+_$_dcb0[22]}).join(_$_dcb0[0]):_$_dcb0[0];return 0==f.title.indexOf(c)}))};b.click=function(c,a){var f=window.getSelection();f&&0!==f.rangeCount&&(f=f.getRangeAt(0),f.cloneRange(),f.startContainer.textContent=_$_dcb0[5]+c.title+_$_dcb0[23],jSuites.focus(b.input.input),setTimeout(function(){b.data=[];b.input.update()},200));a.preventDefault()};b.data=[];return lemonade.element("<>\n <div @loop=\"self.data\" class=\"jss_bar_search jss_object\">\n <div class='p20' onmousedown=\"self.parent.click(self, e)\">\n <div class='formula-title'><b>{{self.title}}</b></div>\n <div style='margin-bottom: 10px;'>{{self.description||''}}</div>\n <div style='color: #777'>{{self.syntax||''}}</div>\n <div style='color: #777'>{{self.params}}</div>\n </div>\n </div>\n </>\n ",
b)},r=function(b,d){var c={events:function(a){if(a.type===_$_dcb0[31])13===a.which?(c.input.blur(),setTimeout(function(){e.current.down()},10),a.preventDefault()):27==a.which&&(c.changed=!1,c.input.blur());else if(a.type===_$_dcb0[32])c.changed=!0,setTimeout(function(){c.update()});else if(a.type===_$_dcb0[33]){if(a=c.cell)if(c.changed){var f=parseInt(a.getAttribute(_$_dcb0[25])),g=parseInt(a.getAttribute(_$_dcb0[26]));c.instance.setValueFromCoords(f,g,a.innerText)}else a.innerText=c.label}else a.type===
_$_dcb0[34]&&(c.instance=e.current,c.changed=!1,c.cell=e.current.cursor,c.label=c.cell?e.current.cursor.innerText:_$_dcb0[0])},update:function(){if(e.current){var a=c.input.innerText;e.current.edition?b.input.innerText=a:e.current.cursor&&(e.current.cursor.innerText=a);c.changed=!0}},createFormula:function(a){e.picker(a,{type:_$_dcb0[35],onchange:function(f,g){c.update()},onupdate:function(f){c.update()}});a.addEventListener(_$_dcb0[34],c.events);a.addEventListener(_$_dcb0[33],c.events);a.addEventListener(_$_dcb0[32],
c.events);a.addEventListener(_$_dcb0[31],c.events)}};d=document.createElement(_$_dcb0[36]);b.tools.appendChild(d);lemonade.render(function(){return lemonade.element("\n <>\n <div class='row jss_bar'>\n <input type='text' @bind='self.range' class='range-input jss_object' />\n <Names data=\"{{self.data}}\" />\n <div class='jss_bar_icon'><div></div></div>\n <div @ready='self.createFormula(this)' @ref=\"self.input\" class='formula jss_object'></div>\n <Search @ref=\"self.search\" input=\"{{self}}\" />\n </div>\n </>\n ",
c,{Search:q,Names:p})},d,{});return{onevent:function(a,f,g){if(a===_$_dcb0[24]){a=null;if(a=e.current.getRange().split(_$_dcb0[8])[1])c.range=a;if(f=e.current.cursor)a=parseInt(f.getAttribute(_$_dcb0[25])),f=parseInt(f.getAttribute(_$_dcb0[26])),c.input.innerText=(_$_dcb0[0]+e.current.value(a,f)).replace(/(\r\n|\n|\r)/gm,_$_dcb0[0])}else if(a===_$_dcb0[27])c.input.innerText=_$_dcb0[0];else if(a===_$_dcb0[28]||a===_$_dcb0[29]){a=b.config.definedNames;f=[];for(var l=Object.keys(a),h=0;h<l.length;h++)f.push({index:l[h],
value:a[l[h]]});c.data=f}else a===_$_dcb0[30]&&setTimeout(function(){c.input.innerText=g.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_dcb0[0])})}}},m=function(){};m.oninit=function(b){var d=_$_dcb0[0];8==b.status?b.scope&&-1!=b.scope.indexOf(_$_dcb0[1])||(d=_$_dcb0[2]):d=_$_dcb0[3];if(!d){var c=e.version();if(!c||!c.version||9>parseInt(c.version))d=_$_dcb0[4]}d?console.error(d):b.setPlugins({bar:r})};m.license=function(){null===e&&(e=this)};return m});
</div>`;return lemonade.element(e,b)},t=function(){var b=this;b.visible=!1;b.close=function(){setTimeout(function(){b.visible=!1},100)};b.open=function(){b.visible=b.visible?!1:!0};b[_$_dd3d[15]]=function(f){confirm(m(_$_dd3d[16]))&&d.current.setDefinedNames([{index:f.index,value:null}])};b.edit=function(f){b.modal.open(f);b.visible=!1};b.view=function(f){if(f.value){var e=f.value.split(_$_dd3d[8])[0];Array.isArray(e)&&(e=e[0]);e=e.replace(new RegExp(/'/g),_$_dd3d[0]).toUpperCase();e=
window[e]?window[e]:null;e.openWorksheet();f=e.helpers.getCoordsFromRange(f.value);e.updateSelectionFromCoords(f);b.visible=!1}};b.onload=function(){b.el.component=b;jSuites.tracking(b,!0)};return lemonade.element('\n <div>\n <div class="jss_bar_picker">\n <div><i class="material-icons cursor" onclick="self.open();">arrow_drop_down</i></div>\n <div class="jss_bar_names p20" data-visible="{{self.visible}}">\n <div @loop="self.data">\n <div class="row p6 middle">\n <div class="column f1 cursor" onclick="self.parent.view(self)">\n <div class="p4"><b>{{self.index}}</b></div>\n <div class="p4">{{self.value}}</div>\n </div><div class="column">\n <i class="material-icons cursor" onclick="self.parent.delete(self)">delete</i>\n </div>\n </div>\n </div>\n <br>\n <input type="button" value="Add new entry" class="jbutton dark w100" onclick="self.edit()" />\n </div>\n </div>\n <Modal @ref="self.modal" />\n </div>\n ',
b,{Modal:r})},u=function(){var b=this,f=[];b.onload=function(e){jSuites.ajax({url:_$_dd3d[17],method:_$_dd3d[18],dataType:_$_dd3d[19],success:function(a){f=a}})};b.search=function(e){b.data=[];if((_$_dd3d[0]+e).substr(0,1)!==_$_dd3d[5])return!1;var a=window.getSelection();a&&0!==a.rangeCount&&(a=a.getRangeAt(0),a.cloneRange(),e=a.startContainer.textContent.replace(/[^A-Z]/gi,_$_dd3d[0]));e&&(b.data=f.filter(function(g){g.params=g.param?g.param.map(function(c){return _$_dd3d[20]+c.type+_$_dd3d[21]+
(c.comment||_$_dd3d[0])+_$_dd3d[22]}).join(_$_dd3d[0]):_$_dd3d[0];return 0==g.title.indexOf(e)}))};b.click=function(e,a){var g=window.getSelection();g&&0!==g.rangeCount&&(g=g.getRangeAt(0),g.cloneRange(),g.startContainer.textContent=_$_dd3d[5]+e.title+_$_dd3d[23],jSuites.focus(b.input.input),setTimeout(function(){b.data=[];b.input.update()},200));a.preventDefault()};b.data=[];return lemonade.element("<>\n <div @loop=\"self.data\" class=\"jss_bar_search jss_object\">\n <div class='p20' onmousedown=\"self.parent.click(self, e)\">\n <div class='formula-title'><b>{{self.title}}</b></div>\n <div style='margin-bottom: 10px;'>{{self.description||''}}</div>\n <div style='color: #777'>{{self.syntax||''}}</div>\n <div style='color: #777'>{{self.params}}</div>\n </div>\n </div>\n </>\n ",
b)},v=function(b,f){f={};var e=function(){if(!d.current)return!1;if(q.call(d.current)){a.input.setAttribute(_$_dd3d[24],_$_dd3d[25]);var c=d.current.cursor;if(c){var h=parseInt(c.getAttribute(_$_dd3d[26]));c=parseInt(c.getAttribute(_$_dd3d[27]));a.input.innerHTML=(_$_dd3d[0]+d.current.value(h,c)).replace(/(\r\n|\n|\r)/gm,_$_dd3d[0])}}else a.input.removeAttribute(_$_dd3d[24])};f.onevent=function(c,h,k){if(c===_$_dd3d[28]){c=null;if(c=d.current.getRange().split(_$_dd3d[8])[1])a.range=c;e()}else if(c===
_$_dd3d[29])a.input.innerText=_$_dd3d[0];else if(c===_$_dd3d[30]||c===_$_dd3d[31]){c=b.config.definedNames;h=[];for(var n=Object.keys(c),l=0;l<n.length;l++)h.push({index:n[l],value:c[n[l]]});a.data=h}else c===_$_dd3d[32]?q.call(d.current)&&setTimeout(function(){a.input.innerText=k.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_dd3d[0])}):c===_$_dd3d[33]&&e()};var a={events:function(c){if(c.type===_$_dd3d[34])13===c.which?(a.input.blur(),setTimeout(function(){d.current.down()},10),c.preventDefault()):
27==c.which&&(a.changed=!1,a.input.blur());else if(c.type===_$_dd3d[35])a.changed=!0,setTimeout(function(){a.update()});else if(c.type===_$_dd3d[36]){if(c=a.cell)if(a.changed){var h=parseInt(c.getAttribute(_$_dd3d[26])),k=parseInt(c.getAttribute(_$_dd3d[27]));a.instance.setValueFromCoords(h,k,c.innerText)}else c.innerText=a.label}else c.type===_$_dd3d[37]&&(a.instance=d.current,a.changed=!1,a.cell=d.current.cursor,a.label=a.cell?d.current.cursor.innerText:_$_dd3d[0])},update:function(){if(d.current){var c=
a.input.innerText;d.current.edition?(b.input.innerText=c,a.changed=!0):d.current.cursor&&!d.current.cursor.classList.contains(_$_dd3d[38])&&(d.current.cursor.innerText=c,a.changed=!0)}},createFormula:function(c){d.picker(c,{type:_$_dd3d[39],onchange:function(h,k){a.update()},onupdate:function(h){a.update()}});c.addEventListener(_$_dd3d[37],a.events);c.addEventListener(_$_dd3d[36],a.events);c.addEventListener(_$_dd3d[35],a.events);c.addEventListener(_$_dd3d[34],a.events)}},g=document.createElement(_$_dd3d[40]);
b.tools.appendChild(g);lemonade.render(function(){return lemonade.element("\n <>\n <div class='row jss_bar'>\n <input type='text' @bind='self.range' class='range-input jss_object' />\n <Names data=\"{{self.data}}\" />\n <div class='jss_bar_icon'><div></div></div>\n <div @ready='self.createFormula(this)' @ref=\"self.input\" class='formula jss_object'></div>\n <Search @ref=\"self.search\" input=\"{{self}}\" />\n </div>\n </>\n ",
a,{Search:u,Names:t})},g,{});return f},p=function(){};p.oninit=function(b){var f=_$_dd3d[0];8==b.status?b.scope&&-1!=b.scope.indexOf(_$_dd3d[1])||(f=_$_dd3d[2]):f=_$_dd3d[3];if(!f){var e=d.version();if(!e||!e.version||9>parseInt(e.version))f=_$_dd3d[4]}f?console.error(f):b.setPlugins({bar:v})};p.license=function(){null===d&&(d=this)};return p});

@@ -30,7 +30,7 @@ {

"dependencies": {
"jsuites": "^4.13.5",
"jsuites": "^4.13.8",
"lemonadejs": "^2.6.2"
},
"main": "dist/index.js",
"version": "1.0.2",
"version": "1.0.3",
"bugs": "https://github.com/jspreadsheet/pro/issues",

@@ -37,0 +37,0 @@ "homepage": "https://github.com/jspreadsheet/pro",

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