pagy 7.0.2 → 7.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e62fd47c715c9542483d02630932842ccca5bfda49dd9da1ec355e2d1162e2fb
4
- data.tar.gz: e5e86ddc15039a7c055f3e3dabe080c4edd610dc8708581ccae357d1b26fb58f
3
+ metadata.gz: c225bd71afd0cbd7d09e892df780ebe94828d06d3652ab7aa91c533232f3b19c
4
+ data.tar.gz: 13be49904e036886973fb53e6e56ef1c942a148503a7fc955e36a84b3beede37
5
5
  SHA512:
6
- metadata.gz: 299e52d592164f87fd4379f6e0bfd3dd378b12efc9f739a998a094bc77d2616d48eebaa8512d53725a578d128650dcf4c8f5ff5ffe6bda54bcaa9d92017dec61
7
- data.tar.gz: 34014b47ddd154d69b4ef9b5e38d0c4284d38eafdd4684a3f3a1551df55467602d02782d94dc9dc147efef9e17349b2055f16367b14586572efa71dc92c47208
6
+ metadata.gz: bb105442a350a8ccafe10e2ba941c33577e56e1272672c18019f31875f25f15e1ea0f0a57a430cad1614128279ab844f3ae13bd3b35649d9807aa95a0dee4c86
7
+ data.tar.gz: fb9566979bb2d9892950eb034256b51f8e3f4c2612b6a008c7cb9934c2b3ea6b6861a87129ba8c5ad2f1b1f5ad1cdaa4587f35c360b4e702edd525047c72ab84
data/lib/config/pagy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (7.0.2)
3
+ # Pagy initializer file (7.0.3)
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
 
@@ -82,7 +82,7 @@ window.Pagy = (() => {
82
82
  const trim = (link, param) => link.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
83
83
  // Public interface
84
84
  return {
85
- version: "7.0.2",
85
+ version: "7.0.3",
86
86
  // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
87
87
  init(arg) {
88
88
  const target = arg instanceof Element ? arg : document;
@@ -111,4 +111,4 @@ window.Pagy = (() => {
111
111
  }
112
112
  };
113
113
  })();
114
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWtCQSxNQUFNLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRTtJQUNmLDRDQUE0QztJQUM1QyxNQUFNLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUNOLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FDM0UsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFeEUsNEJBQTRCO0lBQzVCLE1BQU0sT0FBTyxHQUFHLENBQUMsRUFBYSxFQUFFLENBQUMsSUFBSSxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsU0FBUyxDQUFTLEVBQUUsRUFBRTtRQUNoRixNQUFNLFNBQVMsR0FBRyxFQUFFLENBQUMsYUFBYSxJQUFJLEVBQUUsQ0FBQztRQUN6QyxNQUFNLE1BQU0sR0FBTSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsR0FBRyxDQUFD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zdCByanNPYnNlcnZlciA9IG5ldyBSZXNpemVPYnNlcnZlcihlbnRyaWVzID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJpZXMuZm9yRWFjaChlID0+IGUudGFyZ2V0LnF1ZXJ5U2VsZWN0b3JBbGw8TmF2RWxlbWVudD4oXCIucGFneS1yanNcIikuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsID0+IGVsLnBhZ3lSZW5kZXIoKSkpKTtcblxuICAgIC8vIEluaXQgdGhlICpfbmF2X2pzIGhlbHBlcnNcbiAgICBjb25zdCBpbml0TmF2ID0gKGVsOk5hdkVsZW1lbnQsIFt0YWdzLCBzZXF1ZWxzLCBsYWJlbFNlcXVlbHMsIHRyaW1QYXJhbV06TmF2QXJncykgPT4ge1xuICAgICAgICBjb25zdCBjb250YWluZXIgPSBlbC5wYXJlbnRFbGVtZW50ID8/IGVsO1xuICAgICAgICBjb25zdCB3aWR0aHMgICAgPSBPYmplY3Qua2V5cyhzZXF1ZWxzKS5tYXAodyA9PiBwYXJzZUludCh3KSkuc29ydCgoYSwgYikgPT4gYiAtIGEpO1xuICAgICAgICBsZXQgbGFzdFdpZHRoICAgPSAtMTtcbiAgICAgICAgY29uc3QgZmlsbEluICAgID0gKGxpbms6c3RyaW5nLCBwYWdlOnN0cmluZywgbGFiZWw6c3RyaW5nKTpzdHJpbmcgPT5cbiAgICAgICAgICAgIGxpbmsucmVwbGFjZSgvX19wYWd5X3BhZ2VfXy9nLCBwYWdlKS5yZXBsYWNlKC9fX3BhZ3lfbGFiZWxfXy9nLCBsYWJlbCk7XG4gICAgICAgIChlbC5wYWd5UmVuZGVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgY29uc3Qgd2lkdGggPSB3aWR0aHMuZmluZCh3ID0+IHcgPCBjb250YWluZXIuY2xpZW50V2lkdGgpIHx8IDA7XG4gICAgICAgICAgICBpZiAod2lkdGggPT09IGxhc3RXaWR0aCkgeyByZXR1cm4gfSAvLyBubyBjaGFuZ2U6IGFib3J0XG4gICAgICAgICAgICBsZXQgaHRtbCAgICAgPSB0YWdzLmJlZm9yZTtcbiAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IHNlcXVlbHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtICA9IHNlcmllc1tpXTtcbiAgICAgICAgICAgICAgICBjb25zdCBsYWJlbCA9IGxhYmVsc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHRyaW1QYXJhbSA9PT0gXCJzdHJpbmdcIiAmJiBpdGVtID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdHJpbShmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKSwgdHJpbVBhcmFtKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gZmlsbEluKHRhZ3MubGluaywgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdGFncy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5hY3RpdmUsIGl0ZW0sIGxhYmVsKTtc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aWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
114
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWtCQSxNQUFNLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRTtJQUNmLDRDQUE0QztJQUM1QyxNQUFNLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUNOLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FDM0UsRUF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IiAmJiBpdGVtID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdHJpbShmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKSwgdHJpbVBhcmFtKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gZmlsbEluKHRhZ3MubGluaywgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gdGFncy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5hY3RpdmUsIGl0ZW0sIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBodG1sICs9IHRhZ3MuYWZ0ZXI7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBhbGlnbi1hc3NpZ25tZW50cy9hbGlnbi1hc3NpZ25tZW50c1xuICAgICAgICAgICAgZWwuaW5uZXJIVE1MID0gXCJcIjtcbiAgICAgICAgICAgIGVsLmluc2VydEFkamFjZW50SFRNTChcImFmdGVyYmVnaW5cIiwgaHRtbCk7XG4gICAgICAgICAgICBsYXN0V2lkdGggPSB3aWR0aDtcbiAgICAgICAgfSkoKTtcbiAgICAgICAgaWYgKGVsLmNsYXNzTGlzdC5jb250YWlucyhcInBhZ3ktcmpzXCIpKSB7IHJqc09ic2VydmVyLm9ic2VydmUoY29udGFpbmVyKSB9XG4gICAgfTtcblxuICAgIC8vIEluaXQgdGhlICpfY29tYm9fbmF2X2pzIGhlbHBlcnNcbiAgICBjb25zdCBpbml0Q29tYm8gPSAoZWw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AgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB1aW50OGFycmF5ICAgICAgICAgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
@@ -81,7 +81,7 @@ const Pagy = (() => {
81
81
  const trim = (link, param) => link.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
82
82
  // Public interface
83
83
  return {
84
- version: "7.0.2",
84
+ version: "7.0.3",
85
85
  // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
86
86
  init(arg) {
87
87
  const target = arg instanceof Element ? arg : document;
@@ -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,c=Object.keys(n).map(e=>parseInt(e)).sort((e,t)=>t-e),p=-1,s=(e,t,r)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,r);(t.pagyRender=function(){let e=c.find(e=>e<l.clientWidth)||0;if(e===p)return;let g=r.before,y=n[e.toString()],f=a?.[e.toString()]??y.map(e=>e.toString());for(let e in y){let t=y[e],n=f[e];"string"==typeof i&&1===t?g+=o(s(r.link,t.toString(),n),i):"number"==typeof t?g+=s(r.link,t.toString(),n):"gap"===t?g+=r.gap:g+=s(r.active,t,n)}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),p=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[i,l,c]=[n.min,n.value,n.max].map(e=>parseInt(e)||0);if(l<i||l>c){n.value=a,n.select();return}let[p,s]=t(n.value);"string"==typeof r&&"1"===p&&(s=o(s,r)),e.insertAdjacentHTML("afterbegin",s),e.querySelector("a").click()};["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.2",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}();
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,c=Object.keys(n).map(e=>parseInt(e)).sort((e,t)=>t-e),p=-1,s=(e,t,r)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,r);(t.pagyRender=function(){let e=c.find(e=>e<l.clientWidth)||0;if(e===p)return;let g=r.before,y=n[e.toString()],f=a?.[e.toString()]??y.map(e=>e.toString());for(let e in y){let t=y[e],n=f[e];"string"==typeof i&&1===t?g+=o(s(r.link,t.toString(),n),i):"number"==typeof t?g+=s(r.link,t.toString(),n):"gap"===t?g+=r.gap:g+=s(r.active,t,n)}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),p=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[i,l,c]=[n.min,n.value,n.max].map(e=>parseInt(e)||0);if(l<i||l>c){n.value=a,n.select();return}let[p,s]=t(n.value);"string"==typeof r&&"1"===p&&(s=o(s,r)),e.insertAdjacentHTML("afterbegin",s),e.querySelector("a").click()};["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.3",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}();
@@ -14,10 +14,10 @@ class Pagy # :nodoc:
14
14
  p_id = %( id="#{pagy_id}") if pagy_id
15
15
  link = pagy_link_proc(pagy, link_extra:)
16
16
  tags = { 'before' => prev_html(pagy, link),
17
- 'link' => %(<span class="page">#{link.call(PAGE_PLACEHOLDER, LABEL_PLACEHOLDER)}</span> ),
17
+ 'link' => %(<span class="page">#{link.call(PAGE_PLACEHOLDER, LABEL_PLACEHOLDER)}</span>),
18
18
  'active' => %(<span class="page active">) +
19
- %(<a role="link" aria-current="page" aria-disabled="true">#{LABEL_PLACEHOLDER}</a></span> ),
20
- 'gap' => %(<span class="page gap">#{pagy_t 'pagy.gap'}</span> ),
19
+ %(<a role="link" aria-current="page" aria-disabled="true">#{LABEL_PLACEHOLDER}</a></span>),
20
+ 'gap' => %(<span class="page gap">#{pagy_t 'pagy.gap'}</span>),
21
21
  'after' => next_html(pagy, link) }
22
22
 
23
23
  %(<nav#{p_id} class="#{'pagy-rjs ' if sequels.size > 1}pagy-nav-js pagination" #{
@@ -40,7 +40,7 @@ class Pagy # :nodoc:
40
40
  nav_aria_label_attr(pagy, nav_aria_label, nav_i18n_key)} #{
41
41
  pagy_data(pagy, :combo, pagy_marked_link(link))}>#{
42
42
  prev_html(pagy, link)
43
- }<span class="pagy-combo-input" style="margin: 0 0.6rem;">#{
43
+ }<span class="pagy-combo-input">#{
44
44
  pagy_t('pagy.combo_nav_js', page_input: input, count: p_page, pages: p_pages)
45
45
  }</span> #{
46
46
  next_html(pagy, link)
data/lib/pagy/frontend.rb CHANGED
@@ -25,12 +25,12 @@ class Pagy
25
25
  pagy.series(**vars).each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
26
26
  html << case item
27
27
  when Integer
28
- %(<span class="page">#{link.call(item)}</span> )
28
+ %(<span class="page">#{link.call(item)}</span>)
29
29
  when String
30
30
  %(<span class="page active">) +
31
- %(<a role="link" aria-disabled="true" aria-current="page">#{pagy.label_for(item)}</a></span> )
31
+ %(<a role="link" aria-disabled="true" aria-current="page">#{pagy.label_for(item)}</a></span>)
32
32
  when :gap
33
- %(<span class="page gap">#{pagy_t('pagy.gap')}</span> )
33
+ %(<span class="page gap">#{pagy_t('pagy.gap')}</span>)
34
34
  else
35
35
  raise InternalError, "expected item types in series to be Integer, String or :gap; got #{item.inspect}"
36
36
  end
@@ -95,10 +95,10 @@ class Pagy
95
95
 
96
96
  def prev_html(pagy, link, text: pagy_t('pagy.prev'))
97
97
  if (p_prev = pagy.prev)
98
- %(<span class="page prev">#{link.call(p_prev, text, prev_aria_label_attr)}</span> )
98
+ %(<span class="page prev">#{link.call(p_prev, text, prev_aria_label_attr)}</span>)
99
99
  else
100
100
  %(<span class="page prev disabled"><a role="link" aria-disabled="true" #{
101
- prev_aria_label_attr}>#{text}</a></span> )
101
+ prev_aria_label_attr}>#{text}</a></span>)
102
102
  end
103
103
  end
104
104
 
data/lib/pagy.rb CHANGED
@@ -5,7 +5,7 @@ require 'pathname'
5
5
 
6
6
  # Core class
7
7
  class Pagy
8
- VERSION = '7.0.2'
8
+ VERSION = '7.0.3'
9
9
 
10
10
  # Root pathname to get the path of Pagy files like templates or dictionaries
11
11
  def self.root
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.2
4
+ version: 7.0.3
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-02-18 00:00:00.000000000 Z
11
+ date: 2024-02-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Agnostic pagination in plain ruby. It does it all. Better.
14
14
  email: