You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
193 KiB

3 years ago
4 years ago
  1. !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}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=2)}([function(t,e){},function(t,e,n){},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(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)}}n.r(e);var o=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e?(this.el=document.createElement(e),this.el.className=n):this.el=e,this.data={}}var e,n,o;return e=t,(n=[{key:"data",value:function(t,e){return void 0!==e?(this.data[t]=e,this):this.data[t]}},{key:"on",value:function(t,e){var n=r(t.split(".")),i=n[0],o=n.slice(1),a=i;return"mousewheel"===a&&/Firefox/i.test(window.navigator.userAgent)&&(a="DOMMouseScroll"),this.el.addEventListener(a,function(t){e(t);for(var n=0;n<o.length;n+=1){var r=o[n];if("left"===r&&0!==t.button)return;if("right"===r&&2!==t.button)return;"stop"===r&&t.stopPropagation()}}),this}},{key:"offset",value:function(t){var e=this;if(void 0!==t)return Object.keys(t).forEach(function(n){e.css(n,"".concat(t[n],"px"))}),this;var n=this.el;return{top:n.offsetTop,left:n.offsetLeft,height:n.offsetHeight,width:n.offsetWidth}}},{key:"scroll",value:function(t){var e=this.el;return void 0!==t&&(void 0!==t.left&&(e.scrollLeft=t.left),void 0!==t.top&&(e.scrollTop=t.top)),{left:e.scrollLeft,top:e.scrollTop}}},{key:"box",value:function(){return this.el.getBoundingClientRect()}},{key:"parent",value:function(){return new t(this.el.parentNode)}},{key:"children",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===arguments.length?this.el.childNodes:(n.forEach(function(e){return t.child(e)}),this)}},{key:"removeChild",value:function(t){this.el.removeChild(t)}},{key:"child",value:function(e){var n=e;return"string"==typeof e?n=document.createTextNode(e):e instanceof t&&(n=e.el),this.el.appendChild(n),this}},{key:"contains",value:function(t){return this.el.contains(t)}},{key:"className",value:function(t){return void 0!==t?(this.el.className=t,this):this.el.className}},{key:"addClass",value:function(t){return this.el.classList.add(t),this}},{key:"hasClass",value:function(t){return this.el.classList.contains(t)}},{key:"removeClass",value:function(t){return this.el.classList.remove(t),this}},{key:"toggle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"active";return this.toggleClass(t)}},{key:"toggleClass",value:function(t){return this.el.classList.toggle(t)}},{key:"active",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"active";return t?this.addClass(e):this.removeClass(e),this}},{key:"checked",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.activ
  2. //# sourceMappingURL=xspreadsheet.js.map