|
|
|
"use strict";var _createClass=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(t,e,n){var r;"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?(r=require("jquery"),require("datatables.net"),require("mark.js/dist/jquery.mark.js"),module.exports=t(0,n,r)):"function"==typeof define&&define.amd?define(["jquery","datatables.net","markjs"],function(e){return t(0,n,e)}):t(0,n,jQuery)}(function(e,t,i){var a=(_createClass(n,[{key:"initMarkListener",value:function(){var e=this,t="draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth",n=null;this.instance.on(t,function(){e.instance.rows({filter:"applied",page:"current"}).nodes().length>e.intervalThreshold?(clearTimeout(n),n=setTimeout(function(){e.mark()},e.intervalMs)):e.mark()}),this.instance.on("destroy",function(){e.instance.off(t)}),this.mark()}},{key:"mark",value:function(){var r=this,a=this.instance.search();i(this.instance.table().body()).unmark(this.options),this.instance.columns({search:"applied",page:"current"}).nodes().each(function(e,t){var n=r.instance.column(t).search()||a;n&&e.forEach(function(e){i(e).mark(n,r.options)})})}}]),n);function n(e,t){if(_classCallCheck(this,n),!i.fn.mark||!i.fn.unmark)throw new Error("jquery.mark.js is necessary for datatables.mark.js");this.instance=e,this.options="object"===(void 0===t?"undefined":_typeof(t))?t:{},this.intervalThreshold=49,this.intervalMs=300,this.initMarkListener()}i(t).on("init.dt.dth",function(e,t){var n,r;"dt"===e.namespace&&(r=null,(n=i.fn.dataTable.Api(t)).init().mark?r=n.init().mark:i.fn.dataTable.defaults.mark&&(r=i.fn.dataTable.defaults.mark),null!==r&&new a(n,r))})},window,document);
|
|
|
|
"use strict";var _createClass=function(){function a(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}}(),_typeof="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};function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}!function(e,t,n){var a;"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?(a=require("jquery"),require("datatables.net"),require("mark.js/dist/jquery.mark.js"),module.exports=e(0,n,a)):"function"==typeof define&&define.amd?define(["jquery","datatables.net","markjs"],function(t){return e(0,n,t)}):e(0,n,jQuery)}(function(t,e,i){var r=(_createClass(n,[{key:"initMarkListener",value:function(){var t=this,e="draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth";e+=" responsive-display.dt.dth";var n=null;this.instance.on(e,function(){t.instance.rows({filter:"applied",page:"current"}).nodes().length>t.intervalThreshold?(clearTimeout(n),n=setTimeout(function(){t.mark()},t.intervalMs)):t.mark()}),this.instance.on("destroy",function(){t.instance.off(e)}),this.mark()}},{key:"mark",value:function(){var a=this,r=this.instance.search(),t=i(this.instance.table().body());t.unmark(this.options),this.instance.table().rows({search:"applied"}).data().length&&t.mark(r,this.options),this.instance.columns({search:"applied",page:"current"}).nodes().each(function(t,e){var n=a.instance.column(e).search()||r;n&&t.forEach(function(t){i(t).unmark(a.options).mark(n,a.options)})})}}]),n);function n(t,e){if(_classCallCheck(this,n),!i.fn.mark||!i.fn.unmark)throw new Error("jquery.mark.js is necessary for datatables.mark.js");this.instance=t,this.options="object"===(void 0===e?"undefined":_typeof(e))?e:{},this.intervalThreshold=49,this.intervalMs=300,this.initMarkListener()}i(e).on("init.dt.dth",function(t,e){var n,a;"dt"===t.namespace&&(a=null,(n=i.fn.dataTable.Api(e)).init().mark?a=n.init().mark:i.fn.dataTable.defaults.mark&&(a=i.fn.dataTable.defaults.mark),null!==a&&new r(n,a))})},window,document);
|