pagy 7.0.10 → 7.0.11
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 -2
- data/lib/javascripts/pagy-module.js +1 -1
- data/lib/javascripts/pagy.js +1 -1
- data/lib/pagy/extras/jsonapi.rb +2 -2
- data/lib/pagy.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c08904b00151c5b11f1092364dda8fcc5923061864d64900e299a9c314a2c67
|
4
|
+
data.tar.gz: d1b51b18ab4f360738287a13ec254592f175de6ffdd3a8822c5c2985361c4c92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b06fba64f1ad3d86c29faee572f1250ea0dc468efc15c9445f3e39c3f07be3ac182b8d861f371b654b1615bcc333e7b2b0a37c6c3400e4044a37474aa51d158
|
7
|
+
data.tar.gz: 6ed8b340de3b6f208807ad195e3bf39372b6a90a2173013ba2c424d7e166908a744bb86ef996ed80ecf2832d35ff172eed1caf11da300a3a8ce47218ef7c58ae
|
data/lib/config/pagy.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Pagy initializer file (7.0.
|
3
|
+
# Pagy initializer file (7.0.11)
|
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
@@ -80,7 +80,7 @@ window.Pagy = (() => {
|
|
80
80
|
const trim = (link, param) => link.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
|
81
81
|
// Public interface
|
82
82
|
return {
|
83
|
-
version: "7.0.
|
83
|
+
version: "7.0.11",
|
84
84
|
// Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
|
85
85
|
init(arg) {
|
86
86
|
const target = arg instanceof Element ? arg : document;
|
@@ -109,4 +109,4 @@ window.Pagy = (() => {
|
|
109
109
|
}
|
110
110
|
};
|
111
111
|
})();
|
112
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWtCQSxNQUFNLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRTtJQUNmLDRDQUE0QztJQUM1QyxNQUFNLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUNOLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FDM0UsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFeEUsNEJBQTRCO0lBQzVCLE1BQU0sT0FBTyxHQUFHLENBQUMsRUFBYSxFQUFFLENBQUMsSUFBSSxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsU0FBUyxDQUFTLEVBQUUsRUFBRTtRQUNoRixNQUFNLFNBQVMsR0FBRyxFQUFFLENBQUMsYUFBYSxJQUFJLEVBQUUsQ0FBQztRQUN6QyxNQUFNLE1BQU0sR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQ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yBjaGFuZ2U6IGFib3J0XG4gICAgICAgICAgICBsZXQgaHRtbCA9IHRhZ3MuYmVmb3JlOyAgLy8gYWxyZWFkeSB0cmltbWVkIGluIGh0bWxcbiAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IHNlcXVlbHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGxldCBmaWxsZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbSA9PT0gXCJnYXBcIikge1xuICAgICAgICAgICAgICAgICAgICBmaWxsZWQgPSB0YWdzLmdhcDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgeyAvLyBhY3RpdmUgcGFnZVxuICAgICAgICAgICAgICAgICAgICBmaWxsZWQgPSBmaWxsSW4odGFncy5hY3RpdmUsIGl0ZW0sIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaHRtbCArPSAodHlwZW9mIHRyaW1QYXJhbSA9PT0gXCJzdHJpbmdcIiAmJiBpdGVtID09IDEpID8gdHJpbShmaWxsZWQsIHRyaW1QYXJhbSkgOiBmaWxsZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgIC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ICAgIGxpbmsucmVwbGFjZSgvX19wYWd5X3BhZ2VfXy9nLCBwYWdlKS5yZXBsYWNlKC9fX3BhZ3lfbGFiZWxfXy9nLCBsYWJlbCk7XG4gICAgICAgIChlbC5wYWd5UmVuZGVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgY29uc3Qgd2lkdGggPSB3aWR0aHMuZmluZCh3ID0+IHcgPCBjb250YWluZXIuY2xpZW50V2lkdGgpIHx8IDA7XG4gICAgICAgICAgICBpZiAod2lkdGggPT09IGxhc3RXaWR0aCkgeyByZXR1cm4gfSAvLyBubyBjaGFuZ2U6IGFib3J0XG4gICAgICAgICAgICBsZXQgaHRtbCA9IHRhZ3MuYmVmb3JlOyAgLy8gYWxyZWFkeSB0cmltbWVkIGluIGh0bWxcbiAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IHNlcXVlbHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGxldCBmaWxsZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbSA9PT0gXCJnYXBcIikge1xuICAgICAgICAgICAgICAgICAgICBmaWxsZWQgPSB0YWdzLmdhcDtcbiAgICA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ICAgICAgaWYgKGtleXdvcmQgPT09IFwibmF2XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluaXROYXYoZWwgYXMgTmF2RWxlbWVudCwgYXJncyBhcyBOYXZBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChrZXl3b3JkID09PSBcImNvbWJvXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluaXRDb21ibyhlbCwgYXJncyBhcyBDb21ib0FyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwic2VsZWN0b3JcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdFNlbGVjdG9yKGVsLCBhcmdzIGFzIFNlbGVjdG9yQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG5Vbmtub3duIGtleXdvcmQgJyVzJ1wiLCBlbCwga2V5d29yZCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnIpIHsgY29uc29sZS53YXJuKFwiU2tpcHBlZCBQYWd5LmluaXQoKSBmb3I6ICVvXFxuJXNcIiwgZWwsIGVycikgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbn0pKCk7XG4iXX0=
|
@@ -79,7 +79,7 @@ const Pagy = (() => {
|
|
79
79
|
const trim = (link, param) => link.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
|
80
80
|
// Public interface
|
81
81
|
return {
|
82
|
-
version: "7.0.
|
82
|
+
version: "7.0.11",
|
83
83
|
// Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
|
84
84
|
init(arg) {
|
85
85
|
const target = arg instanceof Element ? arg : document;
|
data/lib/javascripts/pagy.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(){let e=(()=>{let e=new ResizeObserver(e=>e.forEach(e=>e.target.querySelectorAll(".pagy-rjs").forEach(e=>e.pagyRender()))),t=(t,[r,n,a,i])=>{let l=t.parentElement??t,p=Object.keys(n).map(e=>parseInt(e)).sort((e,t)=>t-e),c=-1,s=(e,t,r)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,r);(t.pagyRender=function(){let e=p.find(e=>e<l.clientWidth)||0;if(e===c)return;let g=r.before,f=n[e.toString()],y=a?.[e.toString()]??f.map(e=>e.toString());for(let e in f){let t;let n=f[e],a=y[e];t="number"==typeof n?s(r.link,n.toString(),a):"gap"===n?r.gap:s(r.active,n,a),g+="string"==typeof i&&1==n?o(t,i):t}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),c=e})(),t.classList.contains("pagy-rjs")&&e.observe(l)},r=(e,[t,r])=>a(e,e=>[e,t.replace(/__pagy_page__/,e)],r),n=(e,[t,r,n])=>{a(e,e=>{let n=Math.max(Math.ceil(t/parseInt(e)),1).toString(),a=r.replace(/__pagy_page__/,n).replace(/__pagy_items__/,e);return[n,a]},n)},a=(e,t,r)=>{let n=e.querySelector("input"),a=n.value,i=function(){if(n.value===a)return;let[e,i,l]=[n.min,n.value,n.max].map(e=>parseInt(e)||0);if(i<e||i>l){n.value=a,n.select();return}let[p,c]=t(n.value);"string"==typeof r&&"1"===p&&(c=o(c,r)),window.location.href=c};["change","focus"].forEach(e=>n.addEventListener(e,n.select)),n.addEventListener("focusout",i),n.addEventListener("keypress",e=>{"Enter"===e.key&&i()})},o=(e,t)=>e.replace(RegExp(`[?&]${t}=1\\b(?!&)|\\b${t}=1&`),"");return{version:"7.0.
|
1
|
+
!function(){let e=(()=>{let e=new ResizeObserver(e=>e.forEach(e=>e.target.querySelectorAll(".pagy-rjs").forEach(e=>e.pagyRender()))),t=(t,[r,n,a,i])=>{let l=t.parentElement??t,p=Object.keys(n).map(e=>parseInt(e)).sort((e,t)=>t-e),c=-1,s=(e,t,r)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,r);(t.pagyRender=function(){let e=p.find(e=>e<l.clientWidth)||0;if(e===c)return;let g=r.before,f=n[e.toString()],y=a?.[e.toString()]??f.map(e=>e.toString());for(let e in f){let t;let n=f[e],a=y[e];t="number"==typeof n?s(r.link,n.toString(),a):"gap"===n?r.gap:s(r.active,n,a),g+="string"==typeof i&&1==n?o(t,i):t}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),c=e})(),t.classList.contains("pagy-rjs")&&e.observe(l)},r=(e,[t,r])=>a(e,e=>[e,t.replace(/__pagy_page__/,e)],r),n=(e,[t,r,n])=>{a(e,e=>{let n=Math.max(Math.ceil(t/parseInt(e)),1).toString(),a=r.replace(/__pagy_page__/,n).replace(/__pagy_items__/,e);return[n,a]},n)},a=(e,t,r)=>{let n=e.querySelector("input"),a=n.value,i=function(){if(n.value===a)return;let[e,i,l]=[n.min,n.value,n.max].map(e=>parseInt(e)||0);if(i<e||i>l){n.value=a,n.select();return}let[p,c]=t(n.value);"string"==typeof r&&"1"===p&&(c=o(c,r)),window.location.href=c};["change","focus"].forEach(e=>n.addEventListener(e,n.select)),n.addEventListener("focusout",i),n.addEventListener("keypress",e=>{"Enter"===e.key&&i()})},o=(e,t)=>e.replace(RegExp(`[?&]${t}=1\\b(?!&)|\\b${t}=1&`),"");return{version:"7.0.11",init(e){for(let a of(e instanceof Element?e:document).querySelectorAll("[data-pagy]"))try{let e=Uint8Array.from(atob(a.getAttribute("data-pagy")),e=>e.charCodeAt(0)),[o,...i]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(a,i):"combo"===o?r(a,i):"selector"===o?n(a,i):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",a,o)}catch(e){console.warn("Skipped Pagy.init() for: %o\n%s",a,e)}}}})();window.Pagy=e}();
|
data/lib/pagy/extras/jsonapi.rb
CHANGED
@@ -26,8 +26,8 @@ class Pagy # :nodoc:
|
|
26
26
|
def pagy_jsonapi_links(pagy, **opts)
|
27
27
|
{ first: pagy_url_for(pagy, 1, **opts),
|
28
28
|
last: pagy_url_for(pagy, pagy.last, **opts),
|
29
|
-
prev: pagy_url_for(pagy, pagy.prev, **opts),
|
30
|
-
next: pagy_url_for(pagy, pagy.next, **opts) }
|
29
|
+
prev: pagy.prev ? pagy_url_for(pagy, pagy.prev, **opts) : nil,
|
30
|
+
next: pagy.next ? pagy_url_for(pagy, pagy.next, **opts) : nil }
|
31
31
|
end
|
32
32
|
|
33
33
|
# Should skip the jsonapi
|
data/lib/pagy.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pagy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domizio Demichelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Agnostic pagination in plain ruby. It does it all. Better.
|
14
14
|
email:
|