diff --git a/.github/ISSUE_TEMPLATE/Code.yml b/.github/ISSUE_TEMPLATE/Code.yml
index 4715b8553..131d6d894 100644
--- a/.github/ISSUE_TEMPLATE/Code.yml
+++ b/.github/ISSUE_TEMPLATE/Code.yml
@@ -19,7 +19,7 @@ body:
attributes:
label: 👀 Before submitting...
options:
- - label: I upgraded to pagy version 8.3.0
+ - label: I upgraded to pagy version 8.4.0
required: true
- label: I searched through the [Documentation](https://ddnexus.github.io/pagy/)
required: true
diff --git a/.github/latest_release_body.md b/.github/latest_release_body.md
index d268602c6..6ac7875d6 100644
--- a/.github/latest_release_body.md
+++ b/.github/latest_release_body.md
@@ -8,15 +8,13 @@
the [details](https://github.com/ddnexus/pagy/discussions/672#discussioncomment-9212328))
- See the [CHANGELOG](https://ddnexus.github.io/pagy/changelog) for possible breaking changes
-### Changes in 8.3.0
+### Changes in 8.4.0
-- Discontinue foundation materialize, semantic and uikit CSS extras
-- Improve playground:
- - Add install option (automated in pagy development)
- - Fix HTML validation for all apps
- - Remove unused styles from the demo app
-- Hardcode version in pagy.gemspec
+- Retrieve only @in items:
+ - improve the performance of the last page in
+ particular storage conditions (see #696)
+- Improve pagy launcher for pagy devs
[CHANGELOG](https://ddnexus.github.io/pagy/changelog)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 17ac4ff32..c89723efd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,13 @@ If you upgrade from version `< 8.0.0` see the following:
+## Version 8.4.0
+
+- Retrieve only @in items:
+ - improve the performance of the last page in
+ particular storage conditions (see #696)
+- Improve pagy launcher for pagy devs
+
## Version 8.3.0
- Discontinue foundation materialize, semantic and uikit CSS extras
diff --git a/Gemfile.lock b/Gemfile.lock
index d2e0ace4a..9f47696fc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: gem
specs:
- pagy (8.3.0)
+ pagy (8.4.0)
GEM
remote: https://rubygems.org/
diff --git a/README.md b/README.md
index dddd25ce6..ba1c0d880 100644
--- a/README.md
+++ b/README.md
@@ -362,7 +362,7 @@ See also the [How To Page](https://ddnexus.github.io/pagy/docs/how-to)
## Top 💯 Contributors
-[](https://github.com/ddnexus)[](https://github.com/benkoshy)[](https://github.com/dependabot[bot])[](https://github.com/grosser)[](https://github.com/Earlopain)[](https://github.com/workgena)[](https://github.com/bquorning)[](https://github.com/molfar)[](https://github.com/sunny)[](https://github.com/enzinia)[](https://github.com/espen)[](https://github.com/berniechiu)[](https://github.com/renshuki)[](https://github.com/wimdavies)[](https://github.com/tiagotex)[](https://github.com/gamafranco)[](https://github.com/thomasklemm)[](https://github.com/tersor)[](https://github.com/747)[](https://github.com/ashmaroli)[](https://github.com/cseelus)[](https://github.com/sabljak)[](https://github.com/petergoldstein)[](https://github.com/rainerborene)[](https://github.com/simonneutert)[](https://github.com/artplan1)[](https://github.com/serghost)[](https://github.com/Tolchi)[](https://github.com/yenshirak)[](https://github.com/rafaelmontas)[](https://github.com/rafaeelaudibert)[](https://github.com/pedrocarmona)[](https://github.com/olleolleolle)[](https://github.com/okuramasafumi)[](https://github.com/WilliamHorel)[](https://github.com/woller)[](https://github.com/sk8higher)[](https://github.com/muhammadnawzad)[](https://github.com/ronald)[](https://github.com/achmiral)[](https://github.com/mauro-ni)[](https://github.com/borama)[](https://github.com/creativetags)[](https://github.com/mcary)[](https://github.com/marckohlbrugge)[](https://github.com/fluser)[](https://github.com/maful)[](https://github.com/tr4b4nt)[](https://github.com/tiejianluo)[](https://github.com/szTheory)[](https://github.com/smoothdvd)[](https://github.com/rhodes-david)[](https://github.com/radinreth)[](https://github.com/okliv)[](https://github.com/nedimdz)[](https://github.com/msdundar)[](https://github.com/m-abdurrehman)[](https://github.com/dwieringa)[](https://github.com/jyuvaraj03)[](https://github.com/YutoYasunaga)[](https://github.com/iamyujinwon)[](https://github.com/yhk1038)[](https://github.com/ya-s-u)[](https://github.com/yshmarov)[](https://github.com/thattimc)[](https://github.com/thomaschauffour)[](https://github.com/snkashis)[](https://github.com/sliminas)[](https://github.com/egimenos)[](https://github.com/elliotlarson)[](https://github.com/hungdiep97)[](https://github.com/djpremier)[](https://github.com/davidwessman)[](https://github.com/david-a-wheeler)[](https://github.com/daniel-rikowski)[](https://github.com/connie-feng)[](https://github.com/MrMoins)[](https://github.com/excid3)[](https://github.com/cellvinchung)[](https://github.com/brunoocasali)[](https://github.com/BrandonKlotz)[](https://github.com/Atul9)[](https://github.com/amenon)[](https://github.com/artinboghosian)[](https://github.com/antonzaharia)[](https://github.com/PyrinAndrii)[](https://github.com/andrew)[](https://github.com/AliOsm)[](https://github.com/AbelToy)[](https://github.com/loed-idzinga)[](https://github.com/epeirce)[](https://github.com/kobusjoubert)[](https://github.com/KevinColemanInc)[](https://github.com/neontuna)[](https://github.com/xuanxu)[](https://github.com/jpgarritano)[](https://github.com/archonic)[](https://github.com/jonasMirendo)[](https://github.com/lostapathy)[](https://github.com/jivko-chobanov)
+[](https://github.com/ddnexus)[](https://github.com/benkoshy)[](https://github.com/dependabot[bot])[](https://github.com/grosser)[](https://github.com/Earlopain)[](https://github.com/workgena)[](https://github.com/bquorning)[](https://github.com/molfar)[](https://github.com/sunny)[](https://github.com/enzinia)[](https://github.com/espen)[](https://github.com/berniechiu)[](https://github.com/renshuki)[](https://github.com/wimdavies)[](https://github.com/tiagotex)[](https://github.com/gamafranco)[](https://github.com/thomasklemm)[](https://github.com/tersor)[](https://github.com/747)[](https://github.com/ashmaroli)[](https://github.com/cseelus)[](https://github.com/sabljak)[](https://github.com/petergoldstein)[](https://github.com/rainerborene)[](https://github.com/simonneutert)[](https://github.com/artplan1)[](https://github.com/serghost)[](https://github.com/Tolchi)[](https://github.com/yenshirak)[](https://github.com/rafaelmontas)[](https://github.com/rafaeelaudibert)[](https://github.com/pedrocarmona)[](https://github.com/olleolleolle)[](https://github.com/okuramasafumi)[](https://github.com/WilliamHorel)[](https://github.com/woller)[](https://github.com/sk8higher)[](https://github.com/muhammadnawzad)[](https://github.com/ronald)[](https://github.com/achmiral)[](https://github.com/mauro-ni)[](https://github.com/borama)[](https://github.com/creativetags)[](https://github.com/mcary)[](https://github.com/marckohlbrugge)[](https://github.com/fluser)[](https://github.com/maful)[](https://github.com/tr4b4nt)[](https://github.com/tiejianluo)[](https://github.com/szTheory)[](https://github.com/smoothdvd)[](https://github.com/rhodes-david)[](https://github.com/radinreth)[](https://github.com/okliv)[](https://github.com/nedimdz)[](https://github.com/msdundar)[](https://github.com/m-abdurrehman)[](https://github.com/dwieringa)[](https://github.com/jyuvaraj03)[](https://github.com/YutoYasunaga)[](https://github.com/iamyujinwon)[](https://github.com/yhk1038)[](https://github.com/ya-s-u)[](https://github.com/yshmarov)[](https://github.com/thattimc)[](https://github.com/thomaschauffour)[](https://github.com/snkashis)[](https://github.com/sliminas)[](https://github.com/egimenos)[](https://github.com/elliotlarson)[](https://github.com/hungdiep97)[](https://github.com/djpremier)[](https://github.com/davidwessman)[](https://github.com/david-a-wheeler)[](https://github.com/daniel-rikowski)[](https://github.com/connie-feng)[](https://github.com/MrMoins)[](https://github.com/excid3)[](https://github.com/cellvinchung)[](https://github.com/brunoocasali)[](https://github.com/BrandonKlotz)[](https://github.com/Atul9)[](https://github.com/amenon)[](https://github.com/artinboghosian)[](https://github.com/antonzaharia)[](https://github.com/PyrinAndrii)[](https://github.com/andrew)[](https://github.com/AliOsm)[](https://github.com/AbelToy)[](https://github.com/loed-idzinga)[](https://github.com/epeirce)[](https://github.com/kobusjoubert)[](https://github.com/KevinColemanInc)[](https://github.com/neontuna)[](https://github.com/xuanxu)[](https://github.com/jpgarritano)[](https://github.com/archonic)[](https://github.com/jonasMirendo)[](https://github.com/lostapathy)[](https://github.com/jivko-chobanov)
diff --git a/gem/apps/calendar.ru b/gem/apps/calendar.ru
index 45ecd3854..d6597f542 100644
--- a/gem/apps/calendar.ru
+++ b/gem/apps/calendar.ru
@@ -18,7 +18,7 @@
# DOC
# https://ddnexus.github.io/pagy/playground/#4-calendar-app
-VERSION = '8.3.0'
+VERSION = '8.4.0'
require 'bundler/inline'
require 'bundler'
diff --git a/gem/apps/demo.ru b/gem/apps/demo.ru
index aa007eab1..157326df7 100644
--- a/gem/apps/demo.ru
+++ b/gem/apps/demo.ru
@@ -18,7 +18,7 @@
# DOC
# https://ddnexus.github.io/pagy/playground/#3-demo-app
-VERSION = '8.3.0'
+VERSION = '8.4.0'
require 'bundler/inline'
require 'bundler'
diff --git a/gem/apps/rails.ru b/gem/apps/rails.ru
index 75fa99495..91428652e 100644
--- a/gem/apps/rails.ru
+++ b/gem/apps/rails.ru
@@ -15,7 +15,7 @@
# DOC
# https://ddnexus.github.io/pagy/playground/#2-rails-app
-VERSION = '8.3.0'
+VERSION = '8.4.0'
# Gemfile
require 'bundler/inline'
diff --git a/gem/apps/repro.ru b/gem/apps/repro.ru
index 5ef2e7234..6ae6188c6 100644
--- a/gem/apps/repro.ru
+++ b/gem/apps/repro.ru
@@ -15,7 +15,7 @@
# DOC
# https://ddnexus.github.io/pagy/playground/#1-repro-app
-VERSION = '8.3.0'
+VERSION = '8.4.0'
require 'bundler/inline'
require 'bundler'
diff --git a/gem/bin/pagy b/gem/bin/pagy
index c5db59225..9fd95fb3b 100755
--- a/gem/bin/pagy
+++ b/gem/bin/pagy
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
-VERSION = '8.3.0'
+VERSION = '8.4.0'
APPS = %w[repro rails demo calendar].freeze
require_relative '../lib/optimist'
@@ -37,8 +37,9 @@ opts = Optimist.options do
end
Optimist.educate if ARGV.empty?
-# Never install if run from pagy repo (pagy devs)
-opts[:install] = false if File.exist?(File.expand_path('../pagy.gemspec', __dir__))
+run_from_repo = File.exist?(File.expand_path('../pagy.gemspec', __dir__))
+# Never install if run from pagy repo (for pagy devs)
+opts[:install] = false if run_from_repo
# Handles gems
require 'bundler/inline'
@@ -77,11 +78,17 @@ else
end
Optimist.die("#{file.inspect} app not found") unless File.exist?(file)
# Run command
- rackup = "rackup -I #{File.expand_path('../lib', __dir__)} -r pagy -o #{opts[:host]} -p #{opts[:port]} -E #{opts[:env]} #{file}"
+ gem_dir = File.expand_path('..', __dir__)
+ rackup = "rackup -I #{gem_dir}/lib -r pagy -o #{opts[:host]} -p #{opts[:port]} -E #{opts[:env]} #{file}"
rackup << ' -q' if opts[:quiet]
if opts[:rerun]
name = File.basename(file)
- rerun = "rerun --name #{name} -d #{File.dirname(file)} -p #{name}"
+ dir = File.dirname(file)
+ rerun = if run_from_repo # rerun app also when gem dir files change (for pagy devs)
+ "rerun --name #{name} -d #{dir},#{gem_dir} -p **/*.{rb,js,css,scss,ru,yml}"
+ else
+ "rerun --name #{name} -d #{dir} -p #{name}" # rerun only when app.ru changes
+ end
rerun << ' -q' if opts[:quiet]
rerun << ' -c' if opts[:clear]
rerun << " -- #{rackup}"
diff --git a/gem/config/pagy.rb b/gem/config/pagy.rb
index dc6d967d9..9563718c3 100644
--- a/gem/config/pagy.rb
+++ b/gem/config/pagy.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-# Pagy initializer file (8.3.0)
+# Pagy initializer file (8.4.0)
# 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/gem/javascripts/pagy-dev.js b/gem/javascripts/pagy-dev.js
index df4846e4a..d1abe5dc9 100644
--- a/gem/javascripts/pagy-dev.js
+++ b/gem/javascripts/pagy-dev.js
@@ -82,7 +82,7 @@ window.Pagy = (() => {
const trim = (a, param) => a.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
// Public interface
return {
- version: "8.3.0",
+ version: "8.4.0",
// 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2V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bHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGxldCBmaWxsZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IGZpbGxJbih0b2tlbnMuYSwgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IHRva2Vucy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgZmlsbGVkID0gZmlsbEluKHRva2Vucy5jdXJyZW50LCBpdGVtLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGh0bWwgKz0gKHR5cGVvZiB0cmltUGFyYW0gPT09IFwic3RyaW5nXCIgJiYgaXRlbSA9PSAxKSA/IHRyaW0oZmlsbGVkLCB0cmltUGFyYW0pIDogZmlsbGVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaHRtbCArPSB0b2tlbnMuYWZ0ZXI7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBhbGlnbi1hc3NpZ25tZW50cy9hbGlnbi1hc3NpZ25tZW50c1xuICAgICAgICAgICAgZWwuaW5uZXJIVE1MID0gXC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pbml0IGZ1bmN0aW9ucyB3aXRoIHRoZSBkZWNvZGVkIGFyZ3NcbiAgICAgICAgaW5pdChhcmc/OkVsZW1lbnQgfCBuZXZlcikge1xuICAgICAgICAgICAgY29uc3QgdGFyZ2V0ID0gYXJnIGluc3RhbmNlb2YgRWxlbWVudCA/IGFyZyA6IGRvY3VtZW50O1xuICAgICAgICAgICAgY29uc3QgZWxlbWVudHMgPSB0YXJnZXQucXVlcnlTZWxlY3RvckFsbChcIltkYXRhLXBhZ3ldXCIpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBlbCBvZiBlbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHVpbnQ4YXJyYXkgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
\ No newline at end of file
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWtCQSxNQUFNLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRTtJQUNmLDRDQUE0QztJQUM1QyxNQUFNLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUNOLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FDM0UsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFeEUsNEJBQTRCO0lBQzVCLE1BQU0sT0FBTyxHQUFHLENBQUMsRUFBYSxFQUFFLENBQUMsTUFBTSxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsU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bGxJbiA9IChhOnN0cmluZywgcGFnZTpzdHJpbmcsIGxhYmVsOnN0cmluZyk6c3RyaW5nID0+XG4gICAgICAgICAgICBhLnJlcGxhY2UoL19fcGFneV9wYWdlX18vZywgcGFnZSkucmVwbGFjZSgvX19wYWd5X2xhYmVsX18vZywgbGFiZWwpO1xuICAgICAgICAoZWwucGFneVJlbmRlciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGNvbnN0IHdpZHRoID0gd2lkdGhzLmZpbmQodyA9PiB3IDwgY29udGFpbmVyLmNsaWVudFdpZHRoKSB8fCAwO1xuICAgICAgICAgICAgaWYgKHdpZHRoID09PSBsYXN0V2lkdGgpIHsgcmV0dXJuIH0gLy8gbm8gY2hhbmdlOiBhYm9ydFxuICAgICAgICAgICAgbGV0IGh0bWwgPSB0b2tlbnMuYmVmb3JlOyAgLy8gYWxyZWFkeSB0cmltbWVkIGluIGh0bWxcbiAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IHNlcXVlbHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGxldCBmaWxsZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IGZpbGxJbih0b2tlbnMuYSwgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSB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AgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
\ No newline at end of file
diff --git a/gem/javascripts/pagy-module.js b/gem/javascripts/pagy-module.js
index 25847d670..59bc6c3d3 100644
--- a/gem/javascripts/pagy-module.js
+++ b/gem/javascripts/pagy-module.js
@@ -81,7 +81,7 @@ const Pagy = (() => {
const trim = (a, param) => a.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
// Public interface
return {
- version: "8.3.0",
+ version: "8.4.0",
// 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/gem/javascripts/pagy.js b/gem/javascripts/pagy.js
index 75fff9e6a..6d1ba5d30 100644
--- a/gem/javascripts/pagy.js
+++ b/gem/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,l])=>{let i=t.parentElement??t,c=Object.keys(a).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=>ee.toString());for(let e in y){let t;let a=y[e],n=f[e];t="number"==typeof a?s(r.a,a.toString(),n):"gap"===a?r.gap:s(r.current,a,n),g+="string"==typeof l&&1==a?o(t,l):t}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),p=e})(),t.classList.contains("pagy-rjs")&&e.observe(i)},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=e.querySelector("a"),l=a.value,i=function(){if(a.value===l)return;let[e,i,c]=[a.min,a.value,a.max].map(e=>parseInt(e)||0);if(ic){a.value=l,a.select();return}let[p,s]=t(a.value);"string"==typeof r&&"1"===p&&(s=o(s,r)),n.href=s,n.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:"8.3.0",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,...l]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(n,l):"combo"===o?r(n,l):"selector"===o?a(n,l):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,l])=>{let i=t.parentElement??t,c=Object.keys(a).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=>ee.toString());for(let e in y){let t;let a=y[e],n=f[e];t="number"==typeof a?s(r.a,a.toString(),n):"gap"===a?r.gap:s(r.current,a,n),g+="string"==typeof l&&1==a?o(t,l):t}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),p=e})(),t.classList.contains("pagy-rjs")&&e.observe(i)},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=e.querySelector("a"),l=a.value,i=function(){if(a.value===l)return;let[e,i,c]=[a.min,a.value,a.max].map(e=>parseInt(e)||0);if(ic){a.value=l,a.select();return}let[p,s]=t(a.value);"string"==typeof r&&"1"===p&&(s=o(s,r)),n.href=s,n.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:"8.4.0",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,...l]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(n,l):"combo"===o?r(n,l):"selector"===o?a(n,l):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/gem/lib/pagy.rb b/gem/lib/pagy.rb
index 36e082fff..cdbc4b563 100644
--- a/gem/lib/pagy.rb
+++ b/gem/lib/pagy.rb
@@ -5,7 +5,7 @@
# Core class
class Pagy
- VERSION = '8.3.0'
+ VERSION = '8.4.0'
# Gem root pathname to get the path of Pagy files stylesheets, javascripts, apps, locales, etc.
def self.root
diff --git a/gem/lib/pagy/backend.rb b/gem/lib/pagy/backend.rb
index 97aeaa520..723459816 100644
--- a/gem/lib/pagy/backend.rb
+++ b/gem/lib/pagy/backend.rb
@@ -38,7 +38,7 @@ def pagy_get_page(vars)
# Sub-method called only by #pagy: here for easy customization of record-extraction by overriding
# You may need to override this method for collections without offset|limit
def pagy_get_items(collection, pagy)
- collection.offset(pagy.offset).limit(pagy.items)
+ collection.offset(pagy.offset).limit(pagy.in)
end
end
end
diff --git a/gem/lib/pagy/extras/overflow.rb b/gem/lib/pagy/extras/overflow.rb
index 4f8f91043..5eb88a7e6 100644
--- a/gem/lib/pagy/extras/overflow.rb
+++ b/gem/lib/pagy/extras/overflow.rb
@@ -27,7 +27,7 @@ def initialize(vars)
initialize vars.merge!(page: @last) # re-run with the last page
@vars[:page] = requested_page # restore the requested page
when :empty_page
- @offset = @items = @from = @to = 0 # vars relative to the actual page
+ @offset = @items = @in = @from = @to = 0 # vars relative to the actual page
if defined?(Calendar) && is_a?(Calendar) # only for Calendar instances
edge = @order == :asc ? @final : @initial # get the edge of the overflow side (neat, but any time would do)
@from = @to = edge # set both to the edge utc time (a >=&&< query will get no records)
diff --git a/gem/pagy.gemspec b/gem/pagy.gemspec
index cc092b378..cf5d00fbc 100644
--- a/gem/pagy.gemspec
+++ b/gem/pagy.gemspec
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = 'pagy'
- s.version = '8.3.0'
+ s.version = '8.4.0'
s.authors = ['Domizio Demichelis']
s.email = ['dd.nexus@gmail.com']
s.summary = 'The best pagination ruby gem'
diff --git a/quick-start.md b/quick-start.md
index c53daff8a..f9030f459 100644
--- a/quick-start.md
+++ b/quick-start.md
@@ -40,7 +40,7 @@ If you use Bundler, add the gem in the Gemfile, optionally avoiding the next maj
see [RubyGem Specifiers](http://guides.rubygems.org/patterns/#pessimistic-version-constraint)):
```ruby Gemfile
-gem 'pagy', '~> 8.3' # omit patch digit
+gem 'pagy', '~> 8.4' # omit patch digit
```
+++ Without Bundler
diff --git a/retype.yml b/retype.yml
index 07043f7f8..bc052d842 100644
--- a/retype.yml
+++ b/retype.yml
@@ -8,7 +8,7 @@ url: https://ddnexus.github.io/pagy
branding:
title: Pagy
- label: 8.3.0
+ label: 8.4.0
colors:
label:
text: "#FFFFFF"
diff --git a/scripts/version-bump.sh b/scripts/version-bump.sh
index 27b3a6237..fd8fb3524 100755
--- a/scripts/version-bump.sh
+++ b/scripts/version-bump.sh
@@ -50,7 +50,7 @@ esc_new_minor_vers=${esc_new_vers%\\*}
sed -i "0,/$esc_old_minor_vers/{s/$esc_old_minor_vers/$esc_new_minor_vers/}" "$root/quick-start.md"
cd "$root/src"
-pnpm run build
+./build.sh
cd "$root"
# Set tmplog to the commit messages that have changes in the "gem" root path
diff --git a/src/pagy.ts b/src/pagy.ts
index 51cde7315..90afbebbc 100644
--- a/src/pagy.ts
+++ b/src/pagy.ts
@@ -98,7 +98,7 @@ const Pagy = (() => {
// Public interface
return {
- version: "8.3.0",
+ version: "8.4.0",
// Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
init(arg?:Element | never) {
diff --git a/test/pagy/extras/overflow_test.rb b/test/pagy/extras/overflow_test.rb
index 3a2dd403b..8005afa22 100644
--- a/test/pagy/extras/overflow_test.rb
+++ b/test/pagy/extras/overflow_test.rb
@@ -74,7 +74,7 @@
_(pagy.page).must_equal 100
_(pagy.offset).must_equal 0
_(pagy.items).must_equal 0
- _(pagy.in).must_be_nil
+ _(pagy.in).must_equal 0
_(pagy.from).must_equal 0
_(pagy.to).must_equal 0
_(pagy.prev).must_equal pagy.last