diff --git a/CHANGELOG.md b/CHANGELOG.md index 59811bf..809c4b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 2.2.1 +Fix typescript defs + ### 2.2.0 The Covid Release diff --git a/README.md b/README.md index b636742..83b6832 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ npm install floatthead bower install floatThead ``` #### Download code -[Latest Release (zip)](https://github.com/mkoryak/floatThead/archive/2.2.0.zip) +[Latest Release (zip)](https://github.com/mkoryak/floatThead/archive/2.2.1.zip) #### Via CDN [https://cdnjs.com/libraries/floatthead/](https://cdnjs.com/libraries/floatthead/) @@ -80,7 +80,7 @@ If you use css and html best practices, this plugin will work. If you are stuck How to get help with the floatThead ------------ -All issues should be reported through github. [Coffee/Beer](https://ko-fi.com/floatthead) donations are welcome ;) +All issues should be reported through github. Requirements: ------------- diff --git a/dist/jquery.floatThead.js b/dist/jquery.floatThead.js index 9988200..9f4d693 100644 --- a/dist/jquery.floatThead.js +++ b/dist/jquery.floatThead.js @@ -1,4 +1,4 @@ -/** @preserve jQuery.floatThead 2.2.0 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2020 Misha Koryak **/ +/** @preserve jQuery.floatThead 2.2.1 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2020 Misha Koryak **/ // @license MIT /* @author Misha Koryak diff --git a/dist/jquery.floatThead.min.js b/dist/jquery.floatThead.min.js index a939d1d..361c44e 100644 --- a/dist/jquery.floatThead.min.js +++ b/dist/jquery.floatThead.min.js @@ -1,2 +1,2 @@ -/** @preserve jQuery.floatThead 2.2.0 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2020 Misha Koryak **/ +/** @preserve jQuery.floatThead 2.2.1 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2020 Misha Koryak **/ !function(bt){bt.floatThead=bt.floatThead||{},bt.floatThead.defaults={headerCellSelector:"tr:visible:first>*:visible",zIndex:1001,position:"auto",top:0,bottom:0,scrollContainer:function(t){return bt([])},responsiveContainer:function(t){return bt([])},getSizingRow:function(t,e,o){return t.find("tbody tr:visible:first>*:visible")},ariaLabel:function(t,e,o){return e.text()},floatTableClass:"floatThead-table",floatWrapperClass:"floatThead-wrapper",floatContainerClass:"floatThead-container",copyTableClass:!0,autoReflow:!1,debug:!1,support:{bootstrap:!0,datatables:!0,jqueryUI:!0,perfectScrollbar:!0},floatContainerCss:{"overflow-x":"hidden"}};var wt=function(){var n={},o=Object.prototype.hasOwnProperty;n.has=function(t,e){return o.call(t,e)},n.keys=Object.keys||function(t){if(t!==Object(t))throw new TypeError("Invalid object");var e=[];for(var o in t)n.has(t,o)&&e.push(o);return e};var r=0;return n.uniqueId=function(t){var e=++r+"";return t?t+e:e},bt.each(["Arguments","Function","String","Number","Date","RegExp"],function(){var e=this;n["is"+e]=function(t){return Object.prototype.toString.call(t)==="[object "+e+"]"}}),n.debounce=function(o,n,r){var a,i,l,s,d;return function(){l=this,i=arguments,s=new Date;var e=function(){var t=new Date-s;t").css("width",0).append(bt("").css("max-width","100%").append(bt("").append(bt("
").append(bt("
").css("min-width",100).text("X")))));bt("body").append(t);var e=0===t.find("table").width();return t.remove(),e}return!1},Ct=!t&&!mt,xt=bt(window),Lt=t&&window.matchMedia;if(!window.matchMedia||Lt){var e=window.onbeforeprint,o=window.onafterprint;window.onbeforeprint=function(){e&&e(),xt.triggerHandler("fth-beforeprint")},window.onafterprint=function(){o&&o(),xt.triggerHandler("fth-afterprint")}}function St(t){var e=t[0].parentElement;do{if("visible"!==window.getComputedStyle(e).getPropertyValue("overflow"))break}while(e=e.parentElement);return e===document.body?bt([]):bt(e)}function jt(t){window&&window.console&&window.console.error&&window.console.error("jQuery.floatThead: "+t)}function zt(t){var e=t.getBoundingClientRect();return e.width||e.right-e.left}function It(){var t=document.createElement("scrolltester");t.style.cssText="width:100px;height:100px;overflow:scroll!important;position:absolute;top:-9999px;display:block",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}function Ht(t,e,o){var n=o?"outerWidth":"width";if(l&&t.css("max-width")){var r=0;o&&(r+=parseInt(t.css("borderLeft"),10),r+=parseInt(t.css("borderRight"),10));for(var a=0;a http://jqueryui.com/resources/download/jquery-ui-1.8.24.zip")}return this.filter(":not(."+vt.floatTableClass+")").each(function(){var e=wt.uniqueId(),m=bt(this);if(m.data("floatThead-attached"))return!0;if(!m.is("table"))throw new Error('jQuery.floatThead must be run on a table element. ex: $("table").floatThead();');var o=vt.autoReflow&>,n=null,d=m.children("thead:first"),r=m.children("tbody:first");if(0===d.length||0===r.length)return vt.debug&&(0===d.length?jt("The thead element is missing."):jt("The tbody element is missing.")),m.data("floatThead-lazy",vt),void m.unbind("reflow").one("reflow",function(){m.floatThead(vt)});m.data("floatThead-lazy")&&m.unbind("reflow"),m.data("floatThead-lazy",!1);var y,T,a=!0,C={vertical:0,horizontal:0};wt.isFunction(It)&&(It=It());var i=0;!0===vt.scrollContainer&&(vt.scrollContainer=St);var x=vt.scrollContainer(m)||bt([]),L=0").css({display:"table-footer-group","border-spacing":0,height:0,"border-collapse":"collapse",visibility:"hidden"}),q=!1,s=bt([]),R=mt<=9&&!L&&z,f=bt(""),c=bt(""),u=m.children("colgroup:first"),p=!0;0===u.length&&(u=bt(""),p=!1);var h=p?"col:visible":"col",v=bt("").css({display:"table-row","border-spacing":0,height:0,"border-collapse":"collapse"}),E=bt("
").css(vt.floatContainerCss).attr("aria-hidden","true"),M=!1,b=bt("
"),w=bt(''),g=bt([]),k=bt([]),D=bt([]),F=bt([]);b.append(w),m.prepend(u),Ct&&(l.append(v),m.append(l)),f.append(c),E.append(f),vt.copyTableClass&&f.attr("class",m.attr("class")),f.attr({cellpadding:m.attr("cellpadding"),cellspacing:m.attr("cellspacing"),border:m.attr("border")});var t=m.css("display");if(f.css({borderCollapse:m.css("borderCollapse"),border:m.css("border"),display:t}),L||f.css("width","auto"),"none"===t&&(M=!0),f.addClass(vt.floatTableClass).css({margin:0,"border-bottom-width":0}),z){var O=function(t,e){var o=t.css("position"),n=t;if(!("relative"===o||"absolute"===o)||e){var r={paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight")};E.css(r),n=t.data("floatThead-containerWrap")||t.wrap(bt("
").addClass(vt.floatWrapperClass).css({position:"relative",clear:"both"})).parent(),t.data("floatThead-containerWrap",n),q=!0}return n};L?(s=O(x,!0)).prepend(E):(s=O(m),m.before(E))}else m.before(E);E.css({position:z?"absolute":"fixed",marginTop:0,top:z?0:"auto",zIndex:vt.zIndex,willChange:"transform"}),E.addClass(vt.floatContainerClass),V();var N={"table-layout":"fixed"},A={"table-layout":m.css("tableLayout")||"auto"},Q=m[0].style.width||"",U=m.css("minWidth")||"";function G(t){return t+".fth-"+e+".floatTHead"}function P(){var t=0;if(d.children("tr:visible").each(function(){t+=bt(this).outerHeight(!0)}),"collapse"===m.css("border-collapse")){var e=parseInt(m.css("border-top-width"),10);parseInt(m.find("thead tr:first").find(">*:first").css("border-top-width"),10)"),n.push(bt("").css({display:"table-cell",height:0,width:"auto"}))}o=p?u.html():o.join(""),Ct&&(v.empty(),v.append(n),F=v.find("fthtd")),g=w.find("th"),p||u.html(o),k=u.find(h),c.html(o),D=c.find(h)}return t}();return function(){var t=E.scrollLeft();k=u.find(h);var e,o,n,r,a=(e=m,o=k,n=F,r=mt,Ct?n:r?vt.getSizingRow(e,o,n):o);if(a.length===s&&0=v+y?(o=0,Y(),K(!1)):(o=y+v-u.top+s+(W?d:0),X(),K(!0)),n=g):L&&!z?(lv+y?(o=u.top-v,X(),K(!1)):(o=y,K(!0)),n=u.left+g-b);return{top:Math.round(o),left:Math.round(n)}}}}function et(){var i=null,l=null,s=null;return function(t,e,o){if(null!=t&&(i!==t.top||l!==t.left)){if(8===mt)E.css({top:t.top,left:t.left});else{var n="translateX("+t.left+"px) translateY("+t.top+"px)",r={"-webkit-transform":n,"-moz-transform":n,"-ms-transform":n,"-o-transform":n,transform:n,top:0,left:0};E.css(r)}i=t.top,l=t.left}e&&function(){var t=Ht(m,F,!0),e=j?S:x,o=e.length?zt(e[0]):t,n="hidden"!==e.css("overflow-y")?o-C.vertical:o;if(E.width(n),L){var r=100*t/n;f.css("width",r+"%")}else f.css("width",t+"px")}(),o&&P();var a=(j?S:x).scrollLeft();z&&s===a||(E.scrollLeft(a),s=a)}}function ot(){if(x.length)if(vt.support&&vt.support.perfectScrollbar&&x.data().perfectScrollbar)C={horizontal:0,vertical:0};else{if("scroll"===x.css("overflow-x"))C.horizontal=It;else{var t=x.width(),e=Ht(m,F),o=ntable>thead").add(m.children("tbody,tfoot")):m.children("thead,tbody,tfoot")}})}),this}}(function(){var t=window.jQuery;return"undefined"!=typeof module&&module.exports&&!t&&(t=require("jquery")),t}()); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 53bd9c7..12fbbb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "floatthead", - "version": "2.2.0", + "version": "2.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bfbb54a..48111a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "floatthead", - "version": "2.2.0", + "version": "2.2.1", "description": "fixed table header plugin that works", "main": "dist/jquery.floatThead.min.js", "types": "dist/jquery.floatThead.d.ts", diff --git a/src/jquery.floatThead.js b/src/jquery.floatThead.js index 9988200..9f4d693 100644 --- a/src/jquery.floatThead.js +++ b/src/jquery.floatThead.js @@ -1,4 +1,4 @@ -/** @preserve jQuery.floatThead 2.2.0 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2020 Misha Koryak **/ +/** @preserve jQuery.floatThead 2.2.1 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2020 Misha Koryak **/ // @license MIT /* @author Misha Koryak