From c58825bb05ab9df807c61b0ea1d152e763bfb8d0 Mon Sep 17 00:00:00 2001 From: Tobias Date: Sat, 25 Jun 2022 12:57:20 +0200 Subject: [PATCH 1/3] Add possibility to load initial page from server when using server side this should fix issue #21 and be consistend with datatables deferLoading (https://datatables.net/reference/option/deferLoading) When deferLoading is not set the table is loaded from the server, otherwise the value should be the number of total rows of the table --- dist/jstable.es5.min.js | 4 ++-- dist/jstable.min.js | 2 +- src/jstable.js | 14 ++++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dist/jstable.es5.min.js b/dist/jstable.es5.min.js index 627406b..0eddace 100644 --- a/dist/jstable.es5.min.js +++ b/dist/jstable.es5.min.js @@ -1,4 +1,4 @@ -!function(){var t={9662:function(t,e,r){var n=r(7854),o=r(614),i=r(6330),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},9483:function(t,e,r){var n=r(7854),o=r(4411),i=r(6330),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},6077:function(t,e,r){var n=r(7854),o=r(614),i=n.String,a=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},1223:function(t,e,r){var n=r(5112),o=r(30),i=r(3070),a=n("unscopables"),s=Array.prototype;null==s[a]&&i.f(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},1530:function(t,e,r){"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},5787:function(t,e,r){var n=r(7854),o=r(7976),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},9670:function(t,e,r){var n=r(7854),o=r(111),i=n.String,a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},8533:function(t,e,r){"use strict";var n=r(2092).forEach,o=r(9341)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},8457:function(t,e,r){"use strict";var n=r(7854),o=r(9974),i=r(6916),a=r(7908),s=r(3411),u=r(7659),c=r(4411),f=r(6244),l=r(6135),h=r(8554),p=r(1246),v=n.Array;t.exports=function(t){var e=a(t),r=c(this),n=arguments.length,d=n>1?arguments[1]:void 0,g=void 0!==d;g&&(d=o(d,n>2?arguments[2]:void 0));var y,m,b,x,w,S,P=p(e),E=0;if(!P||this==v&&u(P))for(y=f(e),m=r?new this(y):v(y);y>E;E++)S=g?d(e[E],E):e[E],l(m,E,S);else for(w=(x=h(e,P)).next,m=r?new this:[];!(b=i(w,x)).done;E++)S=g?s(x,d,[b.value,E],!0):b.value,l(m,E,S);return m.length=E,m}},1318:function(t,e,r){var n=r(5656),o=r(1400),i=r(6244),a=function(t){return function(e,r,a){var s,u=n(e),c=i(u),f=o(a,c);if(t&&r!=r){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:function(t,e,r){var n=r(9974),o=r(1702),i=r(8361),a=r(7908),s=r(6244),u=r(5417),c=o([].push),f=function(t){var e=1==t,r=2==t,o=3==t,f=4==t,l=6==t,h=7==t,p=5==t||l;return function(v,d,g,y){for(var m,b,x=a(v),w=i(x),S=n(d,g),P=s(w),E=0,L=y||u,O=e?L(v,P):r||h?L(v,0):void 0;P>E;E++)if((p||E in w)&&(b=S(m=w[E],E,x),t))if(e)O[E]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return E;case 2:c(O,m)}else switch(t){case 4:return!1;case 7:c(O,m)}return l?-1:o||f?f:O}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},1194:function(t,e,r){var n=r(7293),o=r(5112),i=r(7392),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:function(t,e,r){"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},206:function(t,e,r){var n=r(1702);t.exports=n([].slice)},4362:function(t,e,r){var n=r(206),o=Math.floor,i=function(t,e){var r=t.length,u=o(r/2);return r<8?a(t,e):s(t,i(n(t,0,u),e),i(n(t,u),e),e)},a=function(t,e){for(var r,n,o=t.length,i=1;i0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},s=function(t,e,r,n){for(var o=e.length,i=r.length,a=0,s=0;a0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},8008:function(t,e,r){var n=r(8113).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,r){var n=r(7854),o=r(1236).f,i=r(8880),a=r(1320),s=r(3505),u=r(9920),c=r(4705);t.exports=function(t,e){var r,f,l,h,p,v=t.target,d=t.global,g=t.stat;if(r=d?n:g?n[v]||s(v,{}):(n[v]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(p=o(r,f))&&p.value:r[f],!c(d?f:v+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;u(h,l)}(t.sham||l&&l.sham)&&i(h,"sham",!0),a(r,f,h,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:function(t,e,r){"use strict";r(4916);var n=r(1702),o=r(1320),i=r(2261),a=r(7293),s=r(5112),u=r(8880),c=s("species"),f=RegExp.prototype;t.exports=function(t,e,r,l){var h=s(t),p=!a((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),v=p&&!a((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[h]=/./[h]),r.exec=function(){return e=!0,null},r[h](""),!e}));if(!p||!v||r){var d=n(/./[h]),g=e(h,""[t],(function(t,e,r,o,a){var s=n(t),u=e.exec;return u===i||u===f.exec?p&&!a?{done:!0,value:d(e,r,o)}:{done:!0,value:s(r,e,o)}:{done:!1}}));o(String.prototype,t,g[0]),o(f,h,g[1])}l&&u(f[h],"sham",!0)}},2104:function(t){var e=Function.prototype,r=e.apply,n=e.bind,o=e.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?o.bind(r):function(){return o.apply(r,arguments)})},9974:function(t,e,r){var n=r(1702),o=r(9662),i=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},6916:function(t){var e=Function.prototype.call;t.exports=e.bind?e.bind(e):function(){return e.apply(e,arguments)}},6530:function(t,e,r){var n=r(9781),o=r(2597),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,c=s&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},1702:function(t){var e=Function.prototype,r=e.bind,n=e.call,o=r&&r.bind(n);t.exports=r?function(t){return t&&o(n,t)}:function(t){return t&&function(){return n.apply(t,arguments)}}},5005:function(t,e,r){var n=r(7854),o=r(614),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},1246:function(t,e,r){var n=r(648),o=r(8173),i=r(7497),a=r(5112)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[n(t)]}},8554:function(t,e,r){var n=r(7854),o=r(6916),i=r(9662),a=r(9670),s=r(6330),u=r(1246),c=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?u(t):e;if(i(r))return a(o(r,t));throw c(s(t)+" is not iterable")}},8173:function(t,e,r){var n=r(9662);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},647:function(t,e,r){var n=r(1702),o=r(7908),i=Math.floor,a=n("".charAt),s=n("".replace),u=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,f=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,l,h){var p=r+t.length,v=n.length,d=f;return void 0!==l&&(l=o(l),d=c),s(h,d,(function(o,s){var c;switch(a(s,0)){case"$":return"$";case"&":return t;case"`":return u(e,0,r);case"'":return u(e,p);case"<":c=l[u(s,1,-1)];break;default:var f=+s;if(0===f)return o;if(f>v){var h=i(f/10);return 0===h?o:h<=v?void 0===n[h-1]?a(s,1):n[h-1]+a(s,1):o}c=n[f-1]}return void 0===c?"":c}))}},7854:function(t,e,r){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:function(t,e,r){var n=r(1702),o=r(7908),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:function(t){t.exports={}},842:function(t,e,r){var n=r(7854);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},490:function(t,e,r){var n=r(5005);t.exports=n("document","documentElement")},4664:function(t,e,r){var n=r(9781),o=r(7293),i=r(317);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,r){var n=r(7854),o=r(1702),i=r(7293),a=r(4326),s=n.Object,u=o("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?u(t,""):s(t)}:s},2788:function(t,e,r){var n=r(1702),o=r(614),i=r(5465),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},9909:function(t,e,r){var n,o,i,a=r(8536),s=r(7854),u=r(1702),c=r(111),f=r(8880),l=r(2597),h=r(5465),p=r(6200),v=r(3501),d="Object already initialized",g=s.TypeError,y=s.WeakMap;if(a||h.state){var m=h.state||(h.state=new y),b=u(m.get),x=u(m.has),w=u(m.set);n=function(t,e){if(x(m,t))throw new g(d);return e.facade=t,w(m,t,e),e},o=function(t){return b(m,t)||{}},i=function(t){return x(m,t)}}else{var S=p("state");v[S]=!0,n=function(t,e){if(l(t,S))throw new g(d);return e.facade=t,f(t,S,e),e},o=function(t){return l(t,S)?t[S]:{}},i=function(t){return l(t,S)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!c(e)||(r=o(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return r}}}},7659:function(t,e,r){var n=r(5112),o=r(7497),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},3157:function(t,e,r){var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},614:function(t){t.exports=function(t){return"function"==typeof t}},4411:function(t,e,r){var n=r(1702),o=r(7293),i=r(614),a=r(648),s=r(5005),u=r(2788),c=function(){},f=[],l=s("Reflect","construct"),h=/^\s*(?:class|function)\b/,p=n(h.exec),v=!h.exec(c),d=function(t){if(!i(t))return!1;try{return l(c,f,t),!0}catch(t){return!1}};t.exports=!l||o((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return v||!!p(h,u(t))}:d},4705:function(t,e,r){var n=r(7293),o=r(614),i=/#|\.prototype\./,a=function(t,e){var r=u[s(t)];return r==f||r!=c&&(o(e)?n(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},111:function(t,e,r){var n=r(614);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},1913:function(t){t.exports=!1},7850:function(t,e,r){var n=r(111),o=r(4326),i=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},2190:function(t,e,r){var n=r(7854),o=r(5005),i=r(614),a=r(7976),s=r(3307),u=n.Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,u(t))}},408:function(t,e,r){var n=r(7854),o=r(9974),i=r(6916),a=r(9670),s=r(6330),u=r(7659),c=r(6244),f=r(7976),l=r(8554),h=r(1246),p=r(9212),v=n.TypeError,d=function(t,e){this.stopped=t,this.result=e},g=d.prototype;t.exports=function(t,e,r){var n,y,m,b,x,w,S,P=r&&r.that,E=!(!r||!r.AS_ENTRIES),L=!(!r||!r.IS_ITERATOR),O=!(!r||!r.INTERRUPTED),k=o(e,P),j=function(t){return n&&p(n,"normal",t),new d(!0,t)},C=function(t){return E?(a(t),O?k(t[0],t[1],j):k(t[0],t[1])):O?k(t,j):k(t)};if(L)n=t;else{if(!(y=h(t)))throw v(s(t)+" is not iterable");if(u(y)){for(m=0,b=c(t);b>m;m++)if((x=C(t[m]))&&f(g,x))return x;return new d(!1)}n=l(t,y)}for(w=n.next;!(S=i(w,n)).done;){try{x=C(S.value)}catch(t){p(n,"throw",t)}if("object"==typeof x&&x&&f(g,x))return x}return new d(!1)}},9212:function(t,e,r){var n=r(6916),o=r(9670),i=r(8173);t.exports=function(t,e,r){var a,s;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw r;if(s)throw a;return o(a),r}},3383:function(t,e,r){"use strict";var n,o,i,a=r(7293),s=r(614),u=r(30),c=r(9518),f=r(1320),l=r(5112),h=r(1913),p=l("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=c(c(i)))!==Object.prototype&&(n=o):v=!0),null==n||a((function(){var t={};return n[p].call(t)!==t}))?n={}:h&&(n=u(n)),s(n[p])||f(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},7497:function(t){t.exports={}},6244:function(t,e,r){var n=r(7466);t.exports=function(t){return n(t.length)}},5948:function(t,e,r){var n,o,i,a,s,u,c,f,l=r(7854),h=r(9974),p=r(1236).f,v=r(261).set,d=r(6833),g=r(1528),y=r(1036),m=r(5268),b=l.MutationObserver||l.WebKitMutationObserver,x=l.document,w=l.process,S=l.Promise,P=p(l,"queueMicrotask"),E=P&&P.value;E||(n=function(){var t,e;for(m&&(t=w.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},d||m||y||!b||!x?!g&&S&&S.resolve?((c=S.resolve(void 0)).constructor=S,f=h(c.then,c),a=function(){f(n)}):m?a=function(){w.nextTick(n)}:(v=h(v,l),a=function(){v(n)}):(s=!0,u=x.createTextNode(""),new b(n).observe(u,{characterData:!0}),a=function(){u.data=s=!s})),t.exports=E||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},3366:function(t,e,r){var n=r(7854);t.exports=n.Promise},133:function(t,e,r){var n=r(7392),o=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},590:function(t,e,r){var n=r(7293),o=r(5112),i=r(1913),a=o("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),i&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},8536:function(t,e,r){var n=r(7854),o=r(614),i=r(2788),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},8523:function(t,e,r){"use strict";var n=r(9662),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},1574:function(t,e,r){"use strict";var n=r(9781),o=r(1702),i=r(6916),a=r(7293),s=r(1956),u=r(5181),c=r(5296),f=r(7908),l=r(8361),h=Object.assign,p=Object.defineProperty,v=o([].concat);t.exports=!h||a((function(){if(n&&1!==h({b:1},h(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=h({},t)[r]||s(h({},e)).join("")!=o}))?function(t,e){for(var r=f(t),o=arguments.length,a=1,h=u.f,p=c.f;o>a;)for(var d,g=l(arguments[a++]),y=h?v(s(g),h(g)):s(g),m=y.length,b=0;m>b;)d=y[b++],n&&!i(p,g,d)||(r[d]=g[d]);return r}:h},30:function(t,e,r){var n,o=r(9670),i=r(6048),a=r(748),s=r(3501),u=r(490),c=r(317),f=r(6200),l=f("IE_PROTO"),h=function(){},p=function(t){return"