ERP-node/WebContent/js/jquery.floatThead.min.js

3 lines
14 KiB
JavaScript
Raw Normal View History

2025-08-21 09:41:46 +09:00
/** @preserve jQuery.floatThead 2.1.4 - https://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2019 Misha Koryak **/
!function(ht){ht.floatThead=ht.floatThead||{},ht.floatThead.defaults={headerCellSelector:"tr:visible:first>*:visible",zIndex:1001,position:"auto",top:0,bottom:0,scrollContainer:function(t){return ht([])},responsiveContainer:function(t){return ht([])},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 vt=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},ht.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<n?a=setTimeout(e,n-t):(a=null,r||(d=o.apply(l,i)))},t=r&&!a;return a||(a=setTimeout(e,n)),t&&(d=o.apply(l,i)),d}},n}(),bt="undefined"!=typeof MutationObserver,wt=function(){for(var t=3,e=document.createElement("b"),o=e.all||[];t=1+t,e.innerHTML="\x3c!--[if gt IE "+t+"]><i><![endif]--\x3e",o[0];);return 4<t?t:document.documentMode}(),t=/Gecko\//.test(navigator.userAgent),gt=/WebKit\//.test(navigator.userAgent),mt=/rtl/i.test(document.documentElement.dir||"");wt||t||gt||(wt=11);var l=function(){if(gt){var t=ht("<div>").css("width",0).append(ht("<table>").css("max-width","100%").append(ht("<tr>").append(ht("<th>").append(ht("<div>").css("min-width",100).text("X")))));ht("body").append(t);var e=0===t.find("table").width();return t.remove(),e}return!1},yt=!t&&!wt,Tt=ht(window),Ct=t&&window.matchMedia;if(!window.matchMedia||Ct){var e=window.onbeforeprint,o=window.onafterprint;window.onbeforeprint=function(){e&&e(),Tt.triggerHandler("fth-beforeprint")},window.onafterprint=function(){o&&o(),Tt.triggerHandler("fth-afterprint")}}function xt(t){var e=t[0].parentElement;do{if("visible"!==window.getComputedStyle(e).getPropertyValue("overflow"))break}while(e=e.parentElement);return e===document.body?ht([]):ht(e)}function Lt(t){window&&window.console&&window.console.error&&window.console.error("jQuery.floatThead: "+t)}function St(t){var e=t.getBoundingClientRect();return e.width||e.right-e.left}function jt(){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 zt(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<e.length;a++)r+=St(e.get(a));return r}return t[n]()}ht.fn.floatThead=function(t){if(t=t||{},wt<8)return this;var ut=null;if(vt.isFunction(l)&&(l=l()),vt.isString(t)){var r=t,a=Array.prototype.slice.call(arguments,1),i=this;return this.filter("table").each(function(){var t=ht(this),e=t.data("floatThead-lazy");e&&t.floatThead(e);var o=t.data("floatThead-attached");if(o&&vt.isFunction(o[r])){var n=o[r].apply(this,a);void 0!==n&&(i=n)}}),i}var pt=ht.extend({},ht.floatThead.defaults||{},t);if(ht.each(t,function(t,e){t in ht.floatThead.defaults||!pt.debug||Lt("Used ["+t+"] key to init plugin, but that param is not an option for the plugin. Valid options are: "+vt.keys(ht.floatThead.defaults).join(", "))}),pt.debug){var e=ht.fn.jquery.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)<=7&&Lt("jQuery version "+ht.fn.jquery+" detected! This plugin supports 1.8 or better, or 1.7.x with jQuery UI 1.8.24 -> http://jqueryui.com/resources/download/jquery-ui-1.8.24.zip")}return this.filter(