From 5185a21ab8daf9b932d80971a535569fa9e804ef Mon Sep 17 00:00:00 2001
From: Domizio Demichelis
Date: Thu, 18 Jan 2024 12:41:59 +0700
Subject: [PATCH] Version 6.4.2
---
.github/.env | 2 +-
CHANGELOG.md | 6 ++++++
lib/config/pagy.rb | 2 +-
lib/javascripts/pagy-dev.js | 4 ++--
lib/javascripts/pagy-module.js | 2 +-
lib/javascripts/pagy.js | 2 +-
lib/pagy.rb | 2 +-
retype.yml | 2 +-
src/pagy.ts | 2 +-
9 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/.github/.env b/.github/.env
index 5e095c659..47621de3c 100644
--- a/.github/.env
+++ b/.github/.env
@@ -1,2 +1,2 @@
GEM=pagy
-VERSION=6.4.1
+VERSION=6.4.2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f8080c2a..b519cef71 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,12 @@ None
+## Version 6.4.2
+
+- Better module overrides in jsonapi
+- Replaced the is_a?(Hash) check for jsonapi reserved :page param with respond_to?(:Fetch) and prepended to the Frontend
+- Docs improvements and fixes
+
## Version 6.4.1
- Remove dependency on base64 (#618)Ruby 3.3 prints a warning if base64 is used without specifying it in the gemfile.
diff --git a/lib/config/pagy.rb b/lib/config/pagy.rb
index 6e5cd7be5..53afcecf5 100644
--- a/lib/config/pagy.rb
+++ b/lib/config/pagy.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-# Pagy initializer file (6.4.1)
+# Pagy initializer file (6.4.2)
# Customize only what you really need and notice that the core Pagy works also without any of the following lines.
# Should you just cherry pick part of this file, please maintain the require-order of the extras
diff --git a/lib/javascripts/pagy-dev.js b/lib/javascripts/pagy-dev.js
index 4620a5b67..2771c4768 100644
--- a/lib/javascripts/pagy-dev.js
+++ b/lib/javascripts/pagy-dev.js
@@ -82,7 +82,7 @@ window.Pagy = (() => {
const trim = (link, param) => link.replace(new RegExp(`(\\?|&)${param}=1\\b(?!&)|\\b${param}=1&`), "");
// Public interface
return {
- version: "6.4.1",
+ version: "6.4.2",
// Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
init(arg) {
const target = arg instanceof Element ? arg : document;
@@ -111,4 +111,4 @@ window.Pagy = (() => {
}
};
})();
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWNBLE1BQU0sSUFBSSxHQUFHLENBQUMsR0FBRyxFQUFFO0lBQ2YsNENBQTRDO0lBQzVDLE1BQU0sV0FBVyxHQUFHLElBQUksY0FBYyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQzdDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxVQUFVLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUU3Ryw0QkFBNEI7SUFDNUIsTUFBTSxPQUFPLEdBQUcsQ0FBQyxFQUFhLEVBQUUsQ0FBQyxJQUFJLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBRSxTQUFTLENBQVMsRUFBRSxFQUFFO1FBQ2hGLE1BQU0sU0FBUyxHQUFHLEVBQUUsQ0FBQyxhQUFhLElBQUksRUFBRSxDQUFDO1FBQ3pDLE1BQU0sTUFBTSxHQUFNLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBR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FdpZHRoKSB7IHJldHVybiB9IC8vIG5vIGNoYW5nZTogYWJvcnRcbiAgICAgICAgICAgIGxldCBodG1sICAgICA9IHRhZ3MuYmVmb3JlO1xuICAgICAgICAgICAgY29uc3Qgc2VyaWVzID0gc2VxdWVsc1t3aWR0aC50b1N0cmluZygpXTtcbiAgICAgICAgICAgIGNvbnN0IGxhYmVscyA9IGxhYmVsU2VxdWVscz8uW3dpZHRoLnRvU3RyaW5nKCldID8/IHNlcmllcy5tYXAobCA9PiBsLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpIGluIHNlcmllcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJpbVBhcmFtID09PSBcInN0cmluZ1wiICYmIGl0ZW0gPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0cmltKGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpLCB0cmltUGFyYW0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGl0ZW0gPT09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0gPT09IFwiZ2FwXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0YWdzLmdhcDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgeyAvLyBhY3RpdmUgcGFnZVxuICAgICAgICAgICAgICAgICAgICBodG1sICs9IGZpbGxJbih0YWdzLmFjdGl2ZSwgaXRlbSwgbGFiZWwpO1xuICAgICAgICAgICAgICAgIH1cbiAgIC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WYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWNBLE1BQU0sSUFBSSxHQUFHLENBQUMsR0FBRyxFQUFFO0lBQ2YsNENBQTRDO0lBQzVDLE1BQU0sV0FBVyxHQUFHLElBQUksY0FBYyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQzdDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FBQ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PiBwYXJzZUludCh3KSkuc29ydCgoYSwgYikgPT4gYiAtIGEpO1xuICAgICAgICBsZXQgbGFzdFdpZHRoICAgPSAtMTtcbiAgICAgICAgY29uc3QgZmlsbEluICAgID0gKGxpbms6c3RyaW5nLCBwYWdlOnN0cmluZywgbGFiZWw6c3RyaW5nKTpzdHJpbmcgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsucmVwbGFjZSgvX19wYWd5X3BhZ2VfXy9nLCBwYWdlKS5yZXBsYWNlKC9fX3BhZ3lfbGFiZWxfXy9nLCBsYWJlbCk7XG4gICAgICAgIChlbC5wYWd5UmVuZGVyID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBjb25zdCB3aWR0aCA9IHdpZHRocy5maW5kKHcgPT4gdyA8IGNvbnRhaW5lci5jbGllbnRXaWR0aCkgfHwgMDtcbiAgICAgICAgICAgIGlmICh3aWR0aCA9PT0gbGFzdFdpZHRoKSB7IHJldHVybiB9IC8vIG5vIGNoYW5nZTogYWJvcnRcbiAgICAgICAgICAgIGxldCBodG1sICAgICA9IHRhZ3MuYmVmb3JlO1xuICAgICAgICAgICAgY29uc3Qgc2VyaWVzID0gc2VxdWVsc1t3aWR0aC50b1N0cmluZygpXTtcbiAgICAgICAgICAgIGNvbnN0IGxhYmVscyA9IGxhYmVsU2VxdWVscz8uW3dpZHRoLnRvU3RyaW5nKCldID8/IHNlcmllcy5tYXAobCA9PiBsLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpIGluIHNlcmllcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJpbVBhcmFtID09PSBcInN0cmluZ1wiICYmIGl0ZW0gPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB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AgICAgICAgICAgICBjb25zdCB1aW50OGFycmF5ICAgICAgICAgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
\ No newline at end of file
diff --git a/lib/javascripts/pagy-module.js b/lib/javascripts/pagy-module.js
index d40ce3411..af926efec 100644
--- a/lib/javascripts/pagy-module.js
+++ b/lib/javascripts/pagy-module.js
@@ -81,7 +81,7 @@ const Pagy = (() => {
const trim = (link, param) => link.replace(new RegExp(`(\\?|&)${param}=1\\b(?!&)|\\b${param}=1&`), "");
// Public interface
return {
- version: "6.4.1",
+ version: "6.4.2",
// Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
init(arg) {
const target = arg instanceof Element ? arg : document;
diff --git a/lib/javascripts/pagy.js b/lib/javascripts/pagy.js
index 604ed958c..5762ed291 100644
--- a/lib/javascripts/pagy.js
+++ b/lib/javascripts/pagy.js
@@ -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,a,n,i])=>{let l=t.parentElement??t,p=Object.keys(a).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=>ee.toString());for(let e in y){let t=y[e],a=f[e];"string"==typeof i&&1===t?g+=o(s(r.link,t.toString(),a),i):"number"==typeof t?g+=s(r.link,t.toString(),a):"gap"===t?g+=r.gap:g+=s(r.active,t,a)}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),c=e})(),t.classList.contains("pagy-rjs")&&e.observe(l)},r=(e,[t,r])=>n(e,e=>[e,t.replace(/__pagy_page__/,e)],r),a=(e,[t,r,a])=>{n(e,e=>{let a=Math.max(Math.ceil(t/parseInt(e)),1).toString(),n=r.replace(/__pagy_page__/,a).replace(/__pagy_items__/,e);return[a,n]},a)},n=(e,t,r)=>{let a=e.querySelector("input"),n=a.value,i=function(){if(a.value===n)return;let[i,l,p]=[a.min,a.value,a.max].map(e=>parseInt(e)||0);if(lp){a.value=n,a.select();return}let[c,s]=t(a.value);"string"==typeof r&&"1"===c&&(s=o(s,r)),e.insertAdjacentHTML("afterbegin",s),e.querySelector("a").click()};["change","focus"].forEach(e=>a.addEventListener(e,a.select)),a.addEventListener("focusout",i),a.addEventListener("keypress",e=>{"Enter"===e.key&&i()})},o=(e,t)=>e.replace(RegExp(`(\\?|&)${t}=1\\b(?!&)|\\b${t}=1&`),"");return{version:"6.4.1",init(e){for(let n of(e instanceof Element?e:document).querySelectorAll("[data-pagy]"))try{let e=Uint8Array.from(atob(n.getAttribute("data-pagy")),e=>e.charCodeAt(0)),[o,...i]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(n,i):"combo"===o?r(n,i):"selector"===o?a(n,i):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",n,o)}catch(e){console.warn("Skipped Pagy.init() for: %o\n%s",n,e)}}}})();window.Pagy=e}();
\ No newline at end of file
+!function(){let e=(()=>{let e=new ResizeObserver(e=>e.forEach(e=>e.target.querySelectorAll(".pagy-rjs").forEach(e=>e.pagyRender()))),t=(t,[r,a,n,i])=>{let l=t.parentElement??t,p=Object.keys(a).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=>ee.toString());for(let e in y){let t=y[e],a=f[e];"string"==typeof i&&1===t?g+=o(s(r.link,t.toString(),a),i):"number"==typeof t?g+=s(r.link,t.toString(),a):"gap"===t?g+=r.gap:g+=s(r.active,t,a)}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),c=e})(),t.classList.contains("pagy-rjs")&&e.observe(l)},r=(e,[t,r])=>n(e,e=>[e,t.replace(/__pagy_page__/,e)],r),a=(e,[t,r,a])=>{n(e,e=>{let a=Math.max(Math.ceil(t/parseInt(e)),1).toString(),n=r.replace(/__pagy_page__/,a).replace(/__pagy_items__/,e);return[a,n]},a)},n=(e,t,r)=>{let a=e.querySelector("input"),n=a.value,i=function(){if(a.value===n)return;let[i,l,p]=[a.min,a.value,a.max].map(e=>parseInt(e)||0);if(lp){a.value=n,a.select();return}let[c,s]=t(a.value);"string"==typeof r&&"1"===c&&(s=o(s,r)),e.insertAdjacentHTML("afterbegin",s),e.querySelector("a").click()};["change","focus"].forEach(e=>a.addEventListener(e,a.select)),a.addEventListener("focusout",i),a.addEventListener("keypress",e=>{"Enter"===e.key&&i()})},o=(e,t)=>e.replace(RegExp(`(\\?|&)${t}=1\\b(?!&)|\\b${t}=1&`),"");return{version:"6.4.2",init(e){for(let n of(e instanceof Element?e:document).querySelectorAll("[data-pagy]"))try{let e=Uint8Array.from(atob(n.getAttribute("data-pagy")),e=>e.charCodeAt(0)),[o,...i]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(n,i):"combo"===o?r(n,i):"selector"===o?a(n,i):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",n,o)}catch(e){console.warn("Skipped Pagy.init() for: %o\n%s",n,e)}}}})();window.Pagy=e}();
\ No newline at end of file
diff --git a/lib/pagy.rb b/lib/pagy.rb
index 35fa47cce..5ba12c99d 100644
--- a/lib/pagy.rb
+++ b/lib/pagy.rb
@@ -5,7 +5,7 @@
# Core class
class Pagy
- VERSION = '6.4.1'
+ VERSION = '6.4.2'
# Root pathname to get the path of Pagy files like templates or dictionaries
def self.root
diff --git a/retype.yml b/retype.yml
index 6c3b973e2..8c2410fa4 100644
--- a/retype.yml
+++ b/retype.yml
@@ -4,7 +4,7 @@ url: https://ddnexus.github.io/pagy
branding:
title: Pagy
- label: 6.4.1
+ label: 6.4.2
colors:
label:
text: "#FFFFFF"
diff --git a/src/pagy.ts b/src/pagy.ts
index 3b96e5a98..b4cccd485 100644
--- a/src/pagy.ts
+++ b/src/pagy.ts
@@ -92,7 +92,7 @@ const Pagy = (() => {
// Public interface
return {
- version: "6.4.1",
+ version: "6.4.2",
// Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
init(arg?:Element|never) {