datatables.net-bs4
Advanced tools
Comparing version 1.12.1 to 1.13.0
@@ -0,1 +1,2 @@ | ||
/*! DataTables Bootstrap 4 integration | ||
@@ -5,10 +6,2 @@ * ©2011-2017 SpryMedia Ltd - datatables.net/license | ||
/** | ||
* DataTables integration for Bootstrap 4. This requires Bootstrap 4 and | ||
* DataTables 1.10 or newer. | ||
* | ||
* This file sets the defaults and adds options to DataTables to style its | ||
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap | ||
* for further information. | ||
*/ | ||
(function( factory ){ | ||
@@ -25,12 +18,18 @@ if ( typeof define === 'function' && define.amd ) { | ||
if ( ! root ) { | ||
// CommonJS environments without a window global must pass a | ||
// root. This will give an error otherwise | ||
root = window; | ||
} | ||
if ( ! $ || ! $.fn.dataTable ) { | ||
// Require DataTables, which attaches to jQuery, including | ||
// jQuery if needed and have a $ property so we can access the | ||
// jQuery object that is used | ||
$ = require('datatables.net')(root, $).$; | ||
if ( ! $ ) { | ||
$ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window | ||
require('jquery') : | ||
require('jquery')( root ); | ||
} | ||
if ( ! $.fn.dataTable ) { | ||
require('datatables.net')(root, $); | ||
} | ||
return factory( $, root, root.document ); | ||
@@ -48,2 +47,12 @@ }; | ||
/** | ||
* DataTables integration for Bootstrap 4. This requires Bootstrap 4 and | ||
* DataTables 1.10 or newer. | ||
* | ||
* This file sets the defaults and adds options to DataTables to style its | ||
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap | ||
* for further information. | ||
*/ | ||
/* Set the defaults for DataTables initialisation */ | ||
@@ -75,3 +84,3 @@ $.extend( true, DataTable.defaults, { | ||
var aria = settings.oLanguage.oAria.paginate || {}; | ||
var btnDisplay, btnClass, counter=0; | ||
var btnDisplay, btnClass; | ||
@@ -145,3 +154,3 @@ var attach = function( container, buttons ) { | ||
'aria-label': aria[ button ], | ||
'data-dt-idx': counter, | ||
'data-dt-idx': button, | ||
'tabindex': settings.iTabIndex, | ||
@@ -157,4 +166,2 @@ 'class': 'page-link' | ||
); | ||
counter++; | ||
} | ||
@@ -161,0 +168,0 @@ } |
@@ -1,14 +0,4 @@ | ||
/*! | ||
DataTables Bootstrap 4 integration | ||
©2011-2017 SpryMedia Ltd - datatables.net/license | ||
*/ | ||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var e=a.length,d=0;d<e;d++){var f=a[d];if(b.call(c,f,d,a))return{i:d,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1; | ||
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this); | ||
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]}; | ||
$jscomp.polyfill=function(a,b,c,e){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,e):$jscomp.polyfillUnisolated(a,b,c,e))};$jscomp.polyfillUnisolated=function(a,b,c,e){c=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var d=a[e];if(!(d in c))return;c=c[d]}a=a[a.length-1];e=c[a];b=b(e);b!=e&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}; | ||
$jscomp.polyfillIsolated=function(a,b,c,e){var d=a.split(".");a=1===d.length;e=d[0];e=!a&&e in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<d.length-1;f++){var l=d[f];if(!(l in e))return;e=e[l]}d=d[d.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?e[d]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,d,{configurable:!0,writable:!0,value:b}):b!==c&&($jscomp.propertyToPolyfillSymbol[d]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(d):$jscomp.POLYFILL_PREFIX+d,d= | ||
$jscomp.propertyToPolyfillSymbol[d],$jscomp.defineProperty(e,d,{configurable:!0,writable:!0,value:b})))};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(b,c){return $jscomp.findInternal(this,b,c).v}},"es6","es3"); | ||
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,c){b||(b=window);c&&c.fn.dataTable||(c=require("datatables.net")(b,c).$);return a(c,b,b.document)}:a(jQuery,window,document)})(function(a,b,c,e){var d=a.fn.dataTable;a.extend(!0,d.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", | ||
renderer:"bootstrap"});a.extend(d.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});d.ext.renderer.pageButton.bootstrap=function(f,l,A,B,m,t){var u=new d.Api(f),C=f.oClasses,n=f.oLanguage.oPaginate,D=f.oLanguage.oAria.paginate||{},h,k,v=0,y=function(q,w){var x,E=function(p){p.preventDefault(); | ||
a(p.currentTarget).hasClass("disabled")||u.page()==p.data.action||u.page(p.data.action).draw("page")};var r=0;for(x=w.length;r<x;r++){var g=w[r];if(Array.isArray(g))y(q,g);else{k=h="";switch(g){case "ellipsis":h="…";k="disabled";break;case "first":h=n.sFirst;k=g+(0<m?"":" disabled");break;case "previous":h=n.sPrevious;k=g+(0<m?"":" disabled");break;case "next":h=n.sNext;k=g+(m<t-1?"":" disabled");break;case "last":h=n.sLast;k=g+(m<t-1?"":" disabled");break;default:h=g+1,k=m===g?"active":""}if(h){var F= | ||
a("<li>",{"class":C.sPageButton+" "+k,id:0===A&&"string"===typeof g?f.sTableId+"_"+g:null}).append(a("<a>",{href:"#","aria-controls":f.sTableId,"aria-label":D[g],"data-dt-idx":v,tabindex:f.iTabIndex,"class":"page-link"}).html(h)).appendTo(q);f.oApi._fnBindAction(F,{action:g},E);v++}}}};try{var z=a(l).find(c.activeElement).data("dt-idx")}catch(q){}y(a(l).empty().html('<ul class="pagination"/>').children("ul"),B);z!==e&&a(l).find("[data-dt-idx="+z+"]").trigger("focus")};return d}); | ||
/*! DataTables Bootstrap 4 integration | ||
* ©2011-2017 SpryMedia Ltd - datatables.net/license | ||
*/ | ||
!function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,a){return e=e||window,(a=a||("undefined"!=typeof window?require("jquery"):require("jquery")(e))).fn.dataTable||require("datatables.net")(e,a),t(a,0,e.document)}:t(jQuery,window,document)}(function(x,e,n,o){"use strict";var r=x.fn.dataTable;return x.extend(!0,r.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),x.extend(r.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),r.ext.renderer.pageButton.bootstrap=function(i,e,d,a,l,c){function u(e,a){for(var t,n,o=function(e){e.preventDefault(),x(e.currentTarget).hasClass("disabled")||m.page()==e.data.action||m.page(e.data.action).draw("page")},r=0,s=a.length;r<s;r++)if(n=a[r],Array.isArray(n))u(e,n);else{switch(f=p="",n){case"ellipsis":p="…",f="disabled";break;case"first":p=g.sFirst,f=n+(0<l?"":" disabled");break;case"previous":p=g.sPrevious,f=n+(0<l?"":" disabled");break;case"next":p=g.sNext,f=n+(l<c-1?"":" disabled");break;case"last":p=g.sLast,f=n+(l<c-1?"":" disabled");break;default:p=n+1,f=l===n?"active":""}p&&(t=x("<li>",{class:b.sPageButton+" "+f,id:0===d&&"string"==typeof n?i.sTableId+"_"+n:null}).append(x("<a>",{href:"#","aria-controls":i.sTableId,"aria-label":w[n],"data-dt-idx":n,tabindex:i.iTabIndex,class:"page-link"}).html(p)).appendTo(e),i.oApi._fnBindAction(t,{action:n},o))}}var p,f,t,m=new r.Api(i),b=i.oClasses,g=i.oLanguage.oPaginate,w=i.oLanguage.oAria.paginate||{};try{t=x(e).find(n.activeElement).data("dt-idx")}catch(e){}u(x(e).empty().html('<ul class="pagination"/>').children("ul"),a),t!==o&&x(e).find("[data-dt-idx="+t+"]").trigger("focus")},r}); |
@@ -5,8 +5,10 @@ { | ||
"main": "js/dataTables.bootstrap4.js", | ||
"module": "js/dataTables.bootstrap4.mjs", | ||
"style": "css/dataTables.bootstrap4.css", | ||
"types": "./types/dataTables.bootstrap4.d.ts", | ||
"version": "1.12.1", | ||
"types": "./types/types.d.ts", | ||
"version": "1.13.0", | ||
"files": [ | ||
"css/**/*.css", | ||
"js/**/*.js", | ||
"js/**/*.mjs", | ||
"types/**/*.d.ts", | ||
@@ -25,3 +27,3 @@ "images/*" | ||
"dependencies": { | ||
"datatables.net": ">=1.11.3", | ||
"datatables.net": ">=1.12.1", | ||
"jquery": ">=1.7" | ||
@@ -28,0 +30,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
120645
17
2922
1
Updateddatatables.net@>=1.12.1