pagy 5.7.4 → 5.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/config/pagy.rb +1 -1
- data/lib/javascripts/pagy-dev.js +2 -3
- data/lib/javascripts/pagy-module.js +1 -2
- data/lib/javascripts/pagy.js +1 -1
- data/lib/pagy.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5bc1c84a1f90fa31a110f50b24de244340c92aa5802af474c7fce568ac8c8ed
|
4
|
+
data.tar.gz: bbaa9a6574a34d2e02f9ca058a685269da0d17826f198fcc2b5ac1fd3ea49c2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21bca1edbbfd7a2fad5310b50fa6e6e09168e6e357d4f76017d2d6af2d47c6f0e93ed1cf5daecd5b456bb0ef27398b25de61cd40873dc896eda252d0a0b4f703
|
7
|
+
data.tar.gz: d46828e39f61c057f286e724960949b2dc875a41bfeec20e55f80e6cd7856661f6f3e7ce601d437f076a090462832d7ef0d538a5378470792e8429fc2c5db8f1
|
data/lib/config/pagy.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Pagy initializer file (5.7.
|
3
|
+
# Pagy initializer file (5.7.5)
|
4
4
|
# Customize only what you really need and notice that the core Pagy works also without any of the following lines.
|
5
5
|
# Should you just cherry pick part of this file, please maintain the require-order of the extras
|
6
6
|
|
data/lib/javascripts/pagy-dev.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
/* Generated from 'src/pagy.ts' with TypeScript Version 4.5.4 */
|
2
1
|
"use strict";
|
3
2
|
const Pagy = {
|
4
|
-
version: "5.7.
|
3
|
+
version: "5.7.5",
|
5
4
|
// Scan for "data-pagy-json" elements, parse their JSON content and call their init functions
|
6
5
|
init(arg) {
|
7
6
|
const target = arg instanceof Element ? arg : document;
|
@@ -116,4 +115,4 @@ const Pagy = {
|
|
116
115
|
// Trim the ${page-param}=1 params in links
|
117
116
|
trim: (link, param) => link.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "")
|
118
117
|
};
|
119
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWdCQSxNQUFNLElBQUksR0FBRztJQUNULE9BQU8sRUFBRSxPQUFPO0lBRWhCLDZGQUE2RjtJQUM3RixJQUFJLENBQUMsR0FBa0I7UUFDbkIsTUFBTSxNQUFNLEdBQUssR0FBRyxZQUFZLE9BQU8sQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUM7UUFDekQsTUFBTSxRQUFRLEdBQUcsTUFBTSxDQUFDLGdCQUFnQixDQUFDLGtCQUFrQixDQUFDLENBQUM7UUFDN0QsTUFBTSxJQUFJLEdBQU8sQ0FBQyxFQUFVLEVBQUUsR0FBVyxFQUFFLEVBQUUsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLHFDQUFxQyxFQUFFLEVBQUUsRUFBRSxHQUFHLENBQUMsQ0FBQztRQUMzRyxLQUFLLE1BQU0sT0FBTyxJQUFJLFFBQVEsRUFBRTtZQUM1QixNQUFNLElBQUksR0FBRyxPQUFPLENBQUMsWUFBWSxDQUFDLGdCQUFnQixDQUFXLENBQUM7WUFDOUQsSUFBSTtnQkFDQSxNQUFNLENBQUMsT0FBTyxFQUFFLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQWEsQ0FBQztnQkFDeEQsSUFBSSxPQUFPLEtBQUssS0FBSyxFQUFFO29C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aXIgaW5pdCBmdW5jdGlvbnNcbiAgICBpbml0KGFyZz86RWxlbWVudHxuZXZlcikge1xuICAgICAgICBjb25zdCB0YXJnZXQgICA9IGFyZyBpbnN0YW5jZW9mIEVsZW1lbnQgPyBhcmcgOiBkb2N1bWVudDtcbiAgICAgICAgY29uc3QgZWxlbWVudHMgPSB0YXJnZXQucXVlcnlTZWxlY3RvckFsbChcIltkYXRhLXBhZ3ktanNvbl1cIik7XG4gICAgICAgIGNvbnN0IHdhcm4gICAgID0gKGVsOkVsZW1lbnQsIGVycjp1bmtub3duKSA9PiBjb25zb2xlLndhcm4oXCJQYWd5LmluaXQoKSBza2lwcGVkIGVsZW1lbnQ6ICVvXFxuJXNcIiwgZWwsIGVycik7XG4gICAgICAgIGZvciAoY29uc3QgZWxlbWVudCBvZiBlbGVtZW50cykge1xuICAgICAgICAgICAgY29uc3QganNvbiA9IGVsZW1lbnQuZ2V0QXR0cmlidXRlKFwiZGF0YS1wYWd5LWpzb25cIikgYXMgc3RyaW5nO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKGpzb24pIGFzIFBhZ3lKU09OO1xuICAgICAgICAgICAgICAgIGlmIChrZXl3b3JkID09PSBcIm5hdlwiKSB7XG4gICAgICAgICAgICAgICAgICAgIFBhZ3kuaW5pdE5hdihlbGVtZW50IGFzIE5hdkVsZW1lbnQsIGFyZ3MgYXMgTmF2QXJncyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChrZXl3b3JkID09PSBcImNvbWJvXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgUGFneS5pbml0Q29tYm8oZWxlbWVudCwgYXJncyBhcyBDb21ib0FyZ3MpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIFBhZ3kuaW5pdFNlbG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oID0gd2lkdGhzLmZpbmQodyA9PiB3IDwgY29udGFpbmVyLmNsaWVudFdpZHRoKSB8fCAwO1xuICAgICAgICAgICAgaWYgKHdpZHRoID09PSBsYXN0V2lkdGgpIHsgcmV0dXJuIH0gLy8gbm8gY2hhbmdlOiBhYm9ydFxuICAgICAgICAgICAgbGV0IGh0bWwgICAgID0gdGFncy5iZWZvcmU7XG4gICAgICAgICAgICBjb25zdCBzZXJpZXMgPSBzZXF1ZWxzW3dpZHRoLnRvU3RyaW5nKCldO1xuICAgICAgICAgICAgY29uc3QgbGFiZWxzID0gbGFiZWxTZXF1ZWxzPy5bd2lkdGgudG9TdHJpbmcoKV0gPz8gc2VyaWVzLm1hcChsID0+IGwudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGkgaW4gc2VyaWVzKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgaXRlbSAgPSBzZXJpZXNbaV07XG4gICAgICAgICAgICAgICAgY29uc3QgbGFiZWwgPSBsYWJlbHNbaV07XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0cmltUGFyYW0gPT09IFwic3RyaW5nXCIgJiYgaXRlbSA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBodG1sICs9IFBhZ3kudHJpbShmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKSwgdHJpbVBhcmFtKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gZmlsbEluKHRhZ3MubGluaywgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdGFncy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5hY3RpdmUsIGl0ZW0sIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBodG1sICs9IHRhZ3MuYWZ0ZXI7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBhbGlnbi1hc3NpZ25tZW50cy9hbGlnbi1hc3NpZ25tZW50c1xuICAgICAgICAgICAgZWwuaW5uZXJIVE1MID0gXCJcIjtcbiAgICAgICAgICAgIGVsLmluc2VydEFkamFjZW50SFRNTChcImFmdGVyYmVnaW5cIiwgaHRtbCk7XG4gICAgICAgICAgICBsYXN0V2lkdGggPSB3aWR0aDtcbiAgICAgICAgfSkoKTtcbiAgICAgICAgaWYgKGVsLmNsYXNzTGlzdC5jb250YWlucyhcInBhZ3ktcmpzXCIpKSB7IFBhZ3kucmpzT2JzZXJ2ZXIub2JzZXJ2ZShjb250YWluZXIpIH1cbiAgICB9LFxuXG4gICAgLy8gVGhlIG9ic2VydmVyIGluc3RhbmNlIGZvciByZXNwb25zaXZlIG5hdnNcbiAgICByanNPYnNlcnZlcjogbmV3IFJlc2l6ZU9ic2VydmVyKGVudHJpZXMgPT4ge1xuICAgICAgICBlbnRyaWVzLmZpbHRlcihlID0+IGUuY29udGVudEJveFNpemUpXG4gICAgICAgICAgICAgICAuZm9yRWFjaChlID0+IGUudGFyZ2V0LnF1ZXJ5U2VsZWN0b3JBbGw8TmF2RWxlbWVudD4oXCIucGFneS1yanNcIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZm9yRWFjaChyanMgPT4gcmpzLnBhZ3lSZW5kZXIoKSkpO1xuICAgIH0pLFxuXG4gICAgLy8gSW5pdCB0aGUgKl9jb21ib19uYXZfanMgaGVscGVyc1xuICAgIGluaXRDb21ibyhlbDpFbGVtZW50LCBbbGluaywgdHJpbVBhcmFtXTpDb21ib0FyZ3MpIHtcbi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lclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gZmlsbEluKHRhZ3MubGluaywgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdGFncy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5hY3RpdmUsIGl0ZW0sIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBodG1sICs9IHRhZ3MuYWZ0ZXI7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBhbGlnbi1hc3NpZ25tZW50cy9hbGlnbi1hc3NpZ25tZW50c1xuICAgICAgICAgICAgZWwuaW5uZXJIVE1MID0gXCJcIjtcbiAgICAgICAgICAgIGVsLmluc2VydEFkamFjZW50SFRNTChcImFmdGVyYmVnaW5cIiwgaHRtbCk7XG4gICAgICAgICAgICBsYXN0V2lkdGggPSB3aWR0aDtcbiAgICAgICAgfSkoKTtcbiAgICAgICAgaWYgKGVsLmNsYXNzTGlzdC5jb250YWlucyhcInBhZ3ktcmpzXCIpKSB7IFBhZ3kucmpzT2JzZXJ2ZXIub2JzZXJ2ZShjb250YWluZXIpIH1cbiAgICB9LFxuXG4gICAgLy8gVGhlIG9ic2VydmVyIGluc3RhbmNlIGZvciByZXNwb25zaXZlIG5hdnNcbiAgICByanNPYnNlcnZlcjogbmV3IFJlc2l6ZU9ic2VydmVyKGVudHJpZXMgPT4ge1xuICAgICAgICBlbnRyaWVzLmZpbHRlcihlID0+IGUuY29udGVudEJveFNpemUpXG4gICAgICAgICAgICAgICAuZm9yRWFjaChlID0+IGUudGFyZ2V0LnF1ZXJ5U2VsZWN0b3JBbGw8TmF2RWxlbWVudD4o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Y2soKTtcbiAgICAgICAgfTtcbiAgICAgICAgW1wiY2hhbmdlXCIsIFwiZm9jdXNcIl0uZm9yRWFjaChlID0+IGlucHV0LmFkZEV2ZW50TGlzdGVuZXIoZSwgaW5wdXQuc2VsZWN0KSk7ICAgICAgICAvLyBhdXRvLXNlbGVjdFxuICAgICAgICBpbnB1dC5hZGRFdmVudExpc3RlbmVyKFwiZm9jdXNvdXRcIiwgYWN0aW9uKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0cmlnZ2VyIGFjdGlvblxuICAgICAgICBpbnB1dC5hZGRFdmVudExpc3RlbmVyKFwia2V5cHJlc3NcIiwgZSA9PiB7IGlmIChlLmtleSA9PT0gXCJFbnRlclwiKSB7IGFjdGlvbigpIH0gfSk7IC8vIHRyaWdnZXIgYWN0aW9uXG4gICAgfSxcblxuICAgIC8vIFRyaW0gdGhlICR7cGFnZS1wYXJhbX09MSBwYXJhbXMgaW4gbGlua3NcbiAgICB0cmltOiAobGluazpzdHJpbmcsIHBhcmFtOnN0cmluZykgPT4gbGluay5yZXBsYWNlKG5ldyBSZWdFeHAoYFs/Jl0ke3BhcmFtfT0xXFxcXGIoPyEmKXxcXFxcYiR7cGFyYW19PTEmYCksIFwiXCIpXG59O1xuIl19
|
@@ -1,6 +1,5 @@
|
|
1
|
-
/* Generated from 'src/pagy.ts' with TypeScript Version 4.5.4 */
|
2
1
|
const Pagy = {
|
3
|
-
version: "5.7.
|
2
|
+
version: "5.7.5",
|
4
3
|
// Scan for "data-pagy-json" elements, parse their JSON content and call their init functions
|
5
4
|
init(arg) {
|
6
5
|
const target = arg instanceof Element ? arg : document;
|
data/lib/javascripts/pagy.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(){function t(t){if(Array.isArray(t))return t}function n(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(r,i){return t(r)||n(r)||e()}var i={version:"5.7.
|
1
|
+
!function(){function t(t){if(Array.isArray(t))return t}function n(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(r,i){return t(r)||n(r)||e()}var i={version:"5.7.5",init:function(r){var a,o=(r instanceof Element?r:document).querySelectorAll("[data-pagy-json]"),c=function(t,n){return console.warn("Pagy.init() skipped element: %o\n%s",t,n)},u=!0,l=!1,f=void 0;try{for(var p,s=o[Symbol.iterator]();!(u=(p=s.next()).done);u=!0){var v=p.value,g=v.getAttribute("data-pagy-json");try{var y=t(a=JSON.parse(g))||n(a)||e(),d=y[0],m=y.slice(1);"nav"===d?i.initNav(v,m):"combo"===d?i.initCombo(v,m):"selector"===d?i.initSelector(v,m):c(v,'Illegal PagyJSON keyword: expected "nav"|"combo"|"selector", got "'.concat(d,'"'))}catch(t){c(v,t)}}}catch(t){l=!0,f=t}finally{try{u||null==s.return||s.return()}finally{if(l)throw f}}},initNav:function(t,n){var e,a=r(n),o=a[0],c=a[1],u=a[2],l=a[3],f=null!==(e=t.parentElement)&&void 0!==e?e:t,p=Object.getOwnPropertyNames(c).map((function(t){return parseInt(t)})).sort((function(t,n){return n-t})),s=-1,v=function(t,n,e){return t.replace(/__pagy_page__/g,n).replace(/__pagy_label__/g,e)};(t.pagyRender=function(){var n=p.find((function(t){return t<f.clientWidth}))||0;if(n!==s){var e,r=o.before,a=c[n.toString()],g=null!==(e=null==u?void 0:u[n.toString()])&&void 0!==e?e:a.map((function(t){return t.toString()}));for(var y in a){var d=a[y],m=g[y];r+="string"==typeof l&&1===d?i.trim(v(o.link,d.toString(),m),l):"number"==typeof d?v(o.link,d.toString(),m):"gap"===d?o.gap:v(o.active,d,m)}r+=o.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",r),s=n}})(),t.classList.contains("pagy-rjs")&&i.rjsObserver.observe(f)},rjsObserver:new ResizeObserver((function(t){t.filter((function(t){return t.contentBoxSize})).forEach((function(t){return t.target.querySelectorAll(".pagy-rjs").forEach((function(t){return t.pagyRender()}))}))})),initCombo:function(t,n){var e=r(n),a=e[0],o=e[1];i.initInput(t,(function(t){return[t,a.replace(/__pagy_page__/,t)]}),o)},initSelector:function(t,n){var e=r(n),a=e[0],o=e[1],c=e[2];i.initInput(t,(function(t){var n=Math.max(Math.ceil(a/parseInt(t)),1).toString();return[n,o.replace(/__pagy_page__/,n).replace(/__pagy_items__/,t)]}),c)},initInput:function(t,n,e){var a=t.querySelector("input"),o=a.value,c=function(){if(a.value!==o){var c=r([a.min,a.value,a.max].map((function(t){return parseInt(t)||0}))),u=c[0],l=c[1],f=c[2];if(l<u||l>f)return a.value=o,void a.select();var p=r(n(a.value)),s=p[0],v=p[1];"string"==typeof e&&"1"===s&&(v=i.trim(v,e)),t.insertAdjacentHTML("afterbegin",v),t.querySelector("a").click()}};["change","focus"].forEach((function(t){return a.addEventListener(t,a.select)})),a.addEventListener("focusout",c),a.addEventListener("keypress",(function(t){"Enter"===t.key&&c()}))},trim:function(t,n){return t.replace(new RegExp("[?&]".concat(n,"=1\\b(?!&)|\\b").concat(n,"=1&")),"")}},a=i;window.Pagy=a}();
|
data/lib/pagy.rb
CHANGED