From 317ef27a236c410b8231a339abb7ff9552b144f5 Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Wed, 3 Apr 2024 12:12:02 +0700 Subject: [PATCH 01/12] Complete translation of aria.nav for "ru" locale (close #599) --- gem/locales/ru.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gem/locales/ru.yml b/gem/locales/ru.yml index c08ffc9dd..14fca759d 100644 --- a/gem/locales/ru.yml +++ b/gem/locales/ru.yml @@ -2,13 +2,11 @@ ru: pagy: aria_label: - # please add a comment in the https://github.com/ddnexus/pagy/issues/599 - # posting the translation of the following "Page"/"Pages" with the plurals for this locale - nav: "Pages" -# one: "" -# few: "" -# many: "" -# other: "" + nav: + one: "Страница" + few: "Страницы" + many: "Страниц" + other: "Страниц" prev: "Назад" next: "Вперёд" prev: "<" From b03fa683722afb9cf5de2306efb9662430e78fbd Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Wed, 3 Apr 2024 12:12:19 +0700 Subject: [PATCH 02/12] Improve docs --- docs/how-to.md | 8 ++------ playground.md | 6 +++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/how-to.md b/docs/how-to.md index 8edc0af84..7bfe8832d 100644 --- a/docs/how-to.md +++ b/docs/how-to.md @@ -853,12 +853,6 @@ You can use it as usual: just remember to pass the `:pagy` local set to the `@pa <%== render file: 'nav.html.erb', locals: {pagy: @pagy} %> ``` -And here an example of the output: - -:::code source="assets/nav.html" ::: - -You may want to read also the [Pagy::Frontend API documentation](api/frontend.md) for complete control over your templates. - !!! You may want to look at the actual output interactively by running: ```sh @@ -867,3 +861,5 @@ pagy demo ``` ...and point your browser at http://0.0.0.0:8000/template !!! + +You may want to read also the [Pagy::Frontend API documentation](api/frontend.md) for complete control over your templates. diff --git a/playground.md b/playground.md index c72fdf899..3a63a69c6 100644 --- a/playground.md +++ b/playground.md @@ -69,6 +69,9 @@ pagy demo _Run `pagy clone demo` to inspect the app file_ +If you want to see how your CSSs changes look, you can follow the same usage as the [Repro App](#1-repro-app) to iterate through +changes. + #### 4. Calendar App Interactive showcase/repro for the calendar extra: @@ -101,13 +104,14 @@ You have already activated GEMNAME v1, but your Gemfile requires GEMNAME v2. Prepending `bundle exec` to your command may solve this. ``` -If `bundle exec` doesn't solve it, then try `gem cleanup`. +If `bundle exec` doesn't solve it, then try `gem cleanup`. If after that you get into another error: ```txt ... `find_spec_for_exe': can't find gem GEMNAME (>= 0.x) with executable EXEC (Gem::GemNotFoundException) ``` + then `gem pristine GEMNAME` should solve the problem. ==- Rerun From 6fe992df203b2a9ba187c3eb0dc9db35dabceef5 Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Wed, 3 Apr 2024 18:06:01 +0700 Subject: [PATCH 03/12] Update workflows --- .github/chore-merge.md | 9 +++-- .github/workflows/create-release.yml | 2 +- .github/workflows/pagy-ci.yml | 49 ++++++++++++++++++---------- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/.github/chore-merge.md b/.github/chore-merge.md index d0de30a63..c90380fd5 100644 --- a/.github/chore-merge.md +++ b/.github/chore-merge.md @@ -9,21 +9,20 @@ gitGraph branch master checkout master commit - commit branch chore-1 checkout chore-1 - commit id: "1" + commit id: "oldest" checkout master commit commit branch chore-2 checkout chore-2 - commit id: "chore-2" + commit id: "newest" checkout master commit - cherry-pick id: "1" - cherry-pick id: "chore-2" + cherry-pick id: "oldest" + cherry-pick id: "newest" ``` (The graph above uses "cherry-pick" labels, but you can rebase if you want to.) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 983bcb33e..2a94b0866 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -3,7 +3,7 @@ name: Create Release on: push: tags: - - "[0-9]+.[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.[0-9]+" jobs: build: diff --git a/.github/workflows/pagy-ci.yml b/.github/workflows/pagy-ci.yml index 061eb6849..9aa38f04d 100644 --- a/.github/workflows/pagy-ci.yml +++ b/.github/workflows/pagy-ci.yml @@ -1,34 +1,33 @@ name: Pagy CI on: + workflow_dispatch: push: - branches: - - '**' + branches: ['**'] pull_request: branches: ['**'] jobs: - should_run: - name: Run or skip? + ruby_check: + name: Ruby Check continue-on-error: true runs-on: ubuntu-latest outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} steps: - id: skip_check - uses: fkirc/skip-duplicate-actions@master + uses: fkirc/skip-duplicate-actions@v5.3.1 with: - # All of these options are optional, so you can remove them if you are happy with the defaults concurrent_skipping: 'never' skip_after_successful_duplicate: 'true' - paths_ignore: '["**/*.md", "**/docs/**", "lib/config/pagy.rb", "LICENSE.txt"]' + paths: '["gem/lib/**", "gem/locales/en.yml", ".simplecov", ".rubocop", "Rakefile", "test/**", "tasks/**"]' + paths_ignore: '["**/*.md"]' do_not_skip: '["workflow_dispatch", "schedule"]' - ruby_test: - needs: should_run - if: ${{ needs.should_run.outputs.should_skip != 'true' }} + needs: ruby_check + if: ${{ needs.ruby_check.outputs.should_skip != 'true' }} name: Ruby ${{ matrix.ruby-version }} Test runs-on: ubuntu-latest strategy: @@ -48,22 +47,38 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Check gem manifest + run: bundle exec rake manifest:check + + - name: Check Rubocop compliance + run: bundle exec rubocop --format github + - name: Check Tests run: bundle exec rake test - name: Check Coverage # fails unless 100% run: bundle exec rake check_coverage - - name: Check Rubocop compliance - run: bundle exec rubocop --format github - - - name: Check gem manifest - run: bundle exec rake manifest:check + e2e_check: + name: E2E Check + continue-on-error: true + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5.3.1 + with: + concurrent_skipping: 'never' + skip_after_successful_duplicate: 'true' + paths: '["gem/lib/**", "gem/locales/en.yml", "gem/javascripts/**", "e2e/**"]' + paths_ignore: '["**/*.md"]' + do_not_skip: '["workflow_dispatch", "schedule"]' e2e_test: - needs: should_run - if: ${{ needs.should_run.outputs.should_skip != 'true' }} + needs: e2e_check + if: ${{ needs.e2e_check.outputs.should_skip != 'true' }} name: E2E Test runs-on: ubuntu-latest env: From 9122d04774070be42f9e7782f0adce6846429c36 Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Wed, 3 Apr 2024 22:31:26 +0700 Subject: [PATCH 04/12] Faster rubocop --- .rubocop.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 8e9aa1698..5a03d55d1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,14 +9,14 @@ AllCops: TargetRubyVersion: 3.1 NewCops: enable Exclude: - # '___' prefixed dirs are excluded - ___*/**/* - # avoid Error: RuboCop found unsupported Ruby version 2.1 in `TargetRubyVersion` parameter - # (in vendor/bundle/ruby/3.0.0/gems/rainbow-3.0.0/.rubocop.yml) and also the extra weird - # "Unable to find gem panolint; is the gem installed? Gem::MissingSpecError" in all ruby versions - - vendor/bundle/**/* - - pnpm/**/* + - "**/node_modules/**/*" + - coverage/**/* + - docs/**/* - gem/lib/optimist.rb + - pnpm/**/* + - src/**/* + - vendor/**/* # fix the problem with github ruby Layout/LineLength: Max: 130 From 7b3cc77b812715d35f2e92e85803be7f6aae2677 Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Wed, 3 Apr 2024 22:50:04 +0700 Subject: [PATCH 05/12] Reorganize default task and update RM run configurations --- .idea/runConfigurations/Coverage_Check.xml | 26 ------------ .idea/runConfigurations/Test.xml | 46 ---------------------- Rakefile | 2 +- 3 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 .idea/runConfigurations/Coverage_Check.xml delete mode 100644 .idea/runConfigurations/Test.xml diff --git a/.idea/runConfigurations/Coverage_Check.xml b/.idea/runConfigurations/Coverage_Check.xml deleted file mode 100644 index 0f70a9a16..000000000 --- a/.idea/runConfigurations/Coverage_Check.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Test.xml b/.idea/runConfigurations/Test.xml deleted file mode 100644 index 21e83a00c..000000000 --- a/.idea/runConfigurations/Test.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Rakefile b/Rakefile index e31d448fd..ba41af667 100644 --- a/Rakefile +++ b/Rakefile @@ -2,5 +2,5 @@ Rake.add_rakelib 'tasks' -task default: %i[test rubocop check_coverage manifest:check] +task default: %i[manifest:check rubocop test check_coverage] task test_cov: %i[test check_coverage] From 9f40e9613fc86dca9486352e25ebfa1766070f1a Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Thu, 4 Apr 2024 12:37:03 +0700 Subject: [PATCH 06/12] Use require_relative for gem/lib files --- gem/lib/pagy.rb | 6 +++--- gem/lib/pagy/calendar.rb | 2 +- gem/lib/pagy/console.rb | 4 ++-- gem/lib/pagy/countless.rb | 2 +- gem/lib/pagy/extras/bootstrap.rb | 2 +- gem/lib/pagy/extras/bulma.rb | 2 +- gem/lib/pagy/extras/calendar.rb | 4 ++-- gem/lib/pagy/extras/countless.rb | 2 +- gem/lib/pagy/extras/foundation.rb | 2 +- gem/lib/pagy/extras/headers.rb | 2 +- gem/lib/pagy/extras/items.rb | 2 +- gem/lib/pagy/extras/jsonapi.rb | 2 +- gem/lib/pagy/extras/materialize.rb | 2 +- gem/lib/pagy/extras/metadata.rb | 2 +- gem/lib/pagy/extras/pagy.rb | 2 +- gem/lib/pagy/extras/semantic.rb | 2 +- gem/lib/pagy/extras/uikit.rb | 2 +- gem/lib/pagy/frontend.rb | 4 ++-- 18 files changed, 23 insertions(+), 23 deletions(-) diff --git a/gem/lib/pagy.rb b/gem/lib/pagy.rb index ccb613323..6a53aaf52 100644 --- a/gem/lib/pagy.rb +++ b/gem/lib/pagy.rb @@ -147,6 +147,6 @@ def setup_request_path_var end end -require 'pagy/backend' -require 'pagy/frontend' -require 'pagy/exceptions' +require_relative 'pagy/backend' +require_relative 'pagy/frontend' +require_relative 'pagy/exceptions' diff --git a/gem/lib/pagy/calendar.rb b/gem/lib/pagy/calendar.rb index 0384f5473..af73c71e8 100644 --- a/gem/lib/pagy/calendar.rb +++ b/gem/lib/pagy/calendar.rb @@ -7,7 +7,7 @@ require 'active_support/core_ext/numeric/time' require 'active_support/core_ext/integer/time' -require 'pagy' +require_relative '../pagy' class Pagy # :nodoc: # Base class for time units subclasses (Year, Quarter, Month, Week, Day) diff --git a/gem/lib/pagy/console.rb b/gem/lib/pagy/console.rb index 437c20322..d4fa05f09 100644 --- a/gem/lib/pagy/console.rb +++ b/gem/lib/pagy/console.rb @@ -1,8 +1,8 @@ # See Pagy::Console API documentation: https://ddnexus.github.io/pagy/docs/api/console # frozen_string_literal: true -require 'pagy' # so you can require just the extra in the console -require 'pagy/extras/standalone' +require_relative '../pagy' # so you can require just the extra in the console +require_relative 'extras/standalone' class Pagy # Provide a ready to use pagy environment when included in irb/rails console diff --git a/gem/lib/pagy/countless.rb b/gem/lib/pagy/countless.rb index e11a05445..ca6e8b247 100644 --- a/gem/lib/pagy/countless.rb +++ b/gem/lib/pagy/countless.rb @@ -1,7 +1,7 @@ # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/docs/api/countless # frozen_string_literal: true -require 'pagy' +require_relative '../pagy' class Pagy # No need to know the count to paginate diff --git a/gem/lib/pagy/extras/bootstrap.rb b/gem/lib/pagy/extras/bootstrap.rb index 89ddeb54f..e3c19cdc3 100644 --- a/gem/lib/pagy/extras/bootstrap.rb +++ b/gem/lib/pagy/extras/bootstrap.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/bootstrap # frozen_string_literal: true -require 'pagy/extras/js_tools' +require_relative 'js_tools' class Pagy # :nodoc: # Frontend modules are specially optimized for performance. diff --git a/gem/lib/pagy/extras/bulma.rb b/gem/lib/pagy/extras/bulma.rb index 71f3b6c8e..011581f4a 100644 --- a/gem/lib/pagy/extras/bulma.rb +++ b/gem/lib/pagy/extras/bulma.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/bulma # frozen_string_literal: true -require 'pagy/extras/js_tools' +require_relative 'js_tools' class Pagy # :nodoc: # Frontend modules are specially optimized for performance. diff --git a/gem/lib/pagy/extras/calendar.rb b/gem/lib/pagy/extras/calendar.rb index 9b037eb81..a5f96b8ea 100644 --- a/gem/lib/pagy/extras/calendar.rb +++ b/gem/lib/pagy/extras/calendar.rb @@ -1,8 +1,8 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/calendar # frozen_string_literal: true -require 'pagy/calendar' -require 'pagy/calendar/helper' +require_relative '../calendar' +require_relative '../calendar/helper' class Pagy # :nodoc: # Add pagination filtering by calendar unit (:year, :quarter, :month, :week, :day) to the regular pagination diff --git a/gem/lib/pagy/extras/countless.rb b/gem/lib/pagy/extras/countless.rb index c8c79f339..cfa0d9a99 100644 --- a/gem/lib/pagy/extras/countless.rb +++ b/gem/lib/pagy/extras/countless.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/countless # frozen_string_literal: true -require 'pagy/countless' +require_relative '../countless' class Pagy # :nodoc: DEFAULT[:countless_minimal] = false diff --git a/gem/lib/pagy/extras/foundation.rb b/gem/lib/pagy/extras/foundation.rb index b5f03a4d5..900ab6d0e 100644 --- a/gem/lib/pagy/extras/foundation.rb +++ b/gem/lib/pagy/extras/foundation.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/foundation # frozen_string_literal: true -require 'pagy/extras/js_tools' +require_relative 'js_tools' class Pagy # :nodoc: # Frontend modules are specially optimized for performance. diff --git a/gem/lib/pagy/extras/headers.rb b/gem/lib/pagy/extras/headers.rb index ce224c8eb..2a64a715d 100644 --- a/gem/lib/pagy/extras/headers.rb +++ b/gem/lib/pagy/extras/headers.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/headers # frozen_string_literal: true -require 'pagy/url_helpers' +require_relative '../url_helpers' class Pagy # :nodoc: DEFAULT[:headers] = { page: 'current-page', diff --git a/gem/lib/pagy/extras/items.rb b/gem/lib/pagy/extras/items.rb index 755d6c025..1149edd57 100644 --- a/gem/lib/pagy/extras/items.rb +++ b/gem/lib/pagy/extras/items.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/items # frozen_string_literal: true -require 'pagy/extras/js_tools' +require_relative 'js_tools' class Pagy # :nodoc: DEFAULT[:items_param] = :items diff --git a/gem/lib/pagy/extras/jsonapi.rb b/gem/lib/pagy/extras/jsonapi.rb index 64cd278f7..3f57b9904 100644 --- a/gem/lib/pagy/extras/jsonapi.rb +++ b/gem/lib/pagy/extras/jsonapi.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/jsonapi # frozen_string_literal: true -require 'pagy/url_helpers' +require_relative '../url_helpers' class Pagy # :nodoc: DEFAULT[:jsonapi] = true diff --git a/gem/lib/pagy/extras/materialize.rb b/gem/lib/pagy/extras/materialize.rb index 86fd8e660..85c5ebae9 100644 --- a/gem/lib/pagy/extras/materialize.rb +++ b/gem/lib/pagy/extras/materialize.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/materialize # frozen_string_literal: true -require 'pagy/extras/js_tools' +require_relative 'js_tools' class Pagy # :nodoc: # Frontend modules are specially optimized for performance. diff --git a/gem/lib/pagy/extras/metadata.rb b/gem/lib/pagy/extras/metadata.rb index 51dbad2a8..cf9597a64 100644 --- a/gem/lib/pagy/extras/metadata.rb +++ b/gem/lib/pagy/extras/metadata.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/metadata # frozen_string_literal: true -require 'pagy/url_helpers' +require_relative '../url_helpers' class Pagy # :nodoc: DEFAULT[:metadata] = %i[ scaffold_url first_url prev_url page_url next_url last_url diff --git a/gem/lib/pagy/extras/pagy.rb b/gem/lib/pagy/extras/pagy.rb index 5a1c77acb..85afe69f9 100644 --- a/gem/lib/pagy/extras/pagy.rb +++ b/gem/lib/pagy/extras/pagy.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/pagy # frozen_string_literal: true -require 'pagy/extras/js_tools' +require_relative 'js_tools' class Pagy # :nodoc: # Frontend modules are specially optimized for performance. diff --git a/gem/lib/pagy/extras/semantic.rb b/gem/lib/pagy/extras/semantic.rb index d2ba0d2b5..67b9bcae8 100644 --- a/gem/lib/pagy/extras/semantic.rb +++ b/gem/lib/pagy/extras/semantic.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/semantic # frozen_string_literal: true -require 'pagy/extras/js_tools' +require_relative 'js_tools' class Pagy # :nodoc: # Frontend modules are specially optimized for performance. diff --git a/gem/lib/pagy/extras/uikit.rb b/gem/lib/pagy/extras/uikit.rb index 83e29c580..08d080395 100644 --- a/gem/lib/pagy/extras/uikit.rb +++ b/gem/lib/pagy/extras/uikit.rb @@ -1,7 +1,7 @@ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/uikit # frozen_string_literal: true -require 'pagy/extras/js_tools' +require_relative 'js_tools' class Pagy # :nodoc: # Frontend modules are specially optimized for performance. diff --git a/gem/lib/pagy/frontend.rb b/gem/lib/pagy/frontend.rb index 3dbdbbf48..74d5ecff3 100644 --- a/gem/lib/pagy/frontend.rb +++ b/gem/lib/pagy/frontend.rb @@ -1,8 +1,8 @@ # See Pagy::Frontend API documentation: https://ddnexus.github.io/pagy/docs/api/frontend # frozen_string_literal: true -require 'pagy/url_helpers' -require 'pagy/i18n' +require_relative 'url_helpers' +require_relative 'i18n' class Pagy # Used for search and replace, hardcoded also in the pagy.js file From e782ceb6475bfcd25d394e1b48aaf32b45dae86c Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Thu, 4 Apr 2024 13:21:36 +0700 Subject: [PATCH 07/12] Fix for Turbo not intercepting changes in window.location --- e2e/snapshots.js | 158 ++++++------ gem/javascripts/pagy-dev.js | 6 +- gem/javascripts/pagy-module.js | 4 +- gem/javascripts/pagy.js | 2 +- gem/lib/pagy/extras/bootstrap.rb | 2 +- gem/lib/pagy/extras/bulma.rb | 3 +- gem/lib/pagy/extras/foundation.rb | 2 +- gem/lib/pagy/extras/items.rb | 2 +- gem/lib/pagy/extras/js_tools.rb | 3 + gem/lib/pagy/extras/materialize.rb | 3 +- gem/lib/pagy/extras/pagy.rb | 2 +- gem/lib/pagy/extras/semantic.rb | 3 +- gem/lib/pagy/extras/uikit.rb | 2 +- src/pagy.ts | 4 +- test/pagy/extras/bootstrap_test.rb.rematch | 96 ++++---- test/pagy/extras/bulma_test.rb.rematch | 21 +- test/pagy/extras/foundation_test.rb.rematch | 107 ++++---- test/pagy/extras/items_test.rb.rematch | 9 +- test/pagy/extras/items_trim_test.rb.rematch | 9 +- test/pagy/extras/materialize_test.rb.rematch | 132 +++++----- test/pagy/extras/pagy_test.rb.rematch | 244 ++++++++++--------- test/pagy/extras/semantic_test.rb.rematch | 82 ++++--- test/pagy/extras/uikit_test.rb.rematch | 71 +++--- 23 files changed, 498 insertions(+), 469 deletions(-) diff --git a/e2e/snapshots.js b/e2e/snapshots.js index 8db5cb0ae..c17eaac9d 100644 --- a/e2e/snapshots.js +++ b/e2e/snapshots.js @@ -425,101 +425,101 @@ module.exports = { "Test all comboNavs for all styles": { "Test /bootstrap #combo-nav-js": { "1": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "" + "12": "" }, "Test /bulma #combo-nav-js": { "1": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "" + "12": "" }, "Test /foundation #combo-nav-js": { "1": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "" + "12": "" }, "Test /materialize #combo-nav-js": { "1": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "" + "12": "" }, "Test /pagy #combo-nav-js": { "1": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "", + "4": "", "5": "

41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "", + "6": "", "7": "

\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "", + "8": "", "9": "

\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "", + "10": "", "11": "

\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "" + "12": "" }, "Test /semantic #combo-nav-js": { "1": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "
\n
<
\n
>\n
", + "2": "
\n
<
\n
>\n
", "3": "

21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "
\n <\n
>\n
", + "4": "
\n <\n
>\n
", "5": "

41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "
\n <\n
>\n
", + "6": "
\n <\n
>\n
", "7": "

\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "
\n <\n
\n
>
\n
", + "8": "
\n <\n
\n
>
\n
", "9": "

\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "
\n <\n
>\n
", + "10": "
\n <\n
>\n
", "11": "

\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "
\n <\n
>\n
" + "12": "
\n <\n
>\n
" }, "Test /uikit #combo-nav-js": { "1": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "
    \n
  • \n
  • \n
  • \n
", + "2": "
    \n
  • \n
  • \n
  • \n
", "3": "

21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40

", - "4": "
    \n
  • \n
  • \n
  • \n
", + "4": "
    \n
  • \n
  • \n
  • \n
", "5": "

41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60

", - "6": "
    \n
  • \n
  • \n
  • \n
", + "6": "
    \n
  • \n
  • \n
  • \n
", "7": "

\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "8": "
    \n
  • \n
  • \n
  • \n
", + "8": "
    \n
  • \n
  • \n
  • \n
", "9": "

\n 961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980\n

", - "10": "
    \n
  • \n
  • \n
  • \n
", + "10": "
    \n
  • \n
  • \n
  • \n
", "11": "

\n 941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960\n

", - "12": "
    \n
  • \n
  • \n
  • \n
" + "12": "
    \n
  • \n
  • \n
  • \n
" } }, "Test generic helpers": { @@ -535,37 +535,37 @@ module.exports = { }, "Test pagy_items_selector_js": { "1": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

", - "2": "", + "2": "", "3": "

1,2,3,4,5,6,7,8,9,10

", - "4": "", + "4": "", "5": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17

", - "6": "", + "6": "", "7": "

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18

", - "8": "", + "8": "", "9": "

81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100

", - "10": "", + "10": "", "11": "

81,82,83,84,85,86,87,88,89,90

", - "12": "", + "12": "", "13": "

69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85

", - "14": "", + "14": "", "15": "

55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72

", - "16": "", + "16": "", "17": "

\n 701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720\n

", - "18": "", + "18": "", "19": "

701,702,703,704,705,706,707,708,709,710

", - "20": "", + "20": "", "21": "

\n 698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714

", - "22": "", + "22": "", "23": "

\n 685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702

", - "24": "", + "24": "", "25": "

\n 981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000\n

", - "26": "", + "26": "", "27": "

981,982,983,984,985,986,987,988,989,990

", - "28": "", + "28": "", "29": "

\n 970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986

", - "30": "", + "30": "", "31": "

\n 955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972

", - "32": "" + "32": "" } }, "Test all navs for all styles": { @@ -994,107 +994,107 @@ module.exports = { "Test trimmed links for /bootstrap?trim=true&page=1": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /bootstrap?trim=true&page=2": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /bootstrap?trim=true&page=3": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /bulma?trim=true&page=1": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /bulma?trim=true&page=2": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /bulma?trim=true&page=3": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /foundation?trim=true&page=1": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /foundation?trim=true&page=2": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /foundation?trim=true&page=3": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /materialize?trim=true&page=1": { "1": "
\n \n
", "2": "
\n \n
", - "3": "" + "3": "" }, "Test trimmed links for /materialize?trim=true&page=2": { "1": "
\n \n
", "2": "
\n \n
", - "3": "" + "3": "" }, "Test trimmed links for /materialize?trim=true&page=3": { "1": "
\n
    \n
  • chevron_left\n
  • \n
  • 1\n
  • \n
  • 2
  • \n
  • 3
  • \n
  • 4
  • \n
  • 5
  • \n
  • 6
  • \n
  • 7
  • \n
  • \n
  • 50
  • \n
  • chevron_right
  • \n
\n
", "2": "
\n
    \n
  • chevron_left\n
  • \n
  • 1\n
  • \n
  • 2
  • \n
  • 3
  • \n
  • 4
  • \n
  • 5
  • \n
  • 6
  • \n
  • 7
  • \n
  • \n
  • 50
  • \n
  • chevron_right
  • \n
\n
", - "3": "
    \n
  • chevron_left
  • \n
  • Page of 50
  • \n
  • chevron_right
  • \n
" + "3": "
    \n
  • chevron_left
  • \n
  • Page # of 50
  • \n
  • chevron_right
  • \n
" }, "Test trimmed links for /pagy?trim=true&page=1": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /pagy?trim=true&page=2": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /pagy?trim=true&page=3": { "1": "", "2": "", - "3": "" + "3": "" }, "Test trimmed links for /semantic?trim=true&page=1": { "1": "
\n
<
12345\n
50>\n
", "2": "
\n
<
12345\n
50>\n
", - "3": "
\n
<
\n
>\n
" + "3": "
\n
<
\n
>\n
" }, "Test trimmed links for /semantic?trim=true&page=2": { "1": "
<123456\n
50>\n
", "2": "
\n <123456\n
50>\n
", - "3": "
\n <\n
>\n
" + "3": "
\n <\n
>\n
" }, "Test trimmed links for /semantic?trim=true&page=3": { "1": "
<1234567\n
50>\n
", "2": "
\n <1234567\n
50>\n
", - "3": "
\n <\n
>\n
" + "3": "
\n <\n
>\n
" }, "Test trimmed links for /uikit?trim=true&page=1": { "1": "
    \n
  • \n
  • 1
  • \n
  • 2
  • \n
  • 3
  • \n
  • 4
  • \n
  • 5
  • \n
  • \n
  • 50
  • \n
  • \n
", "2": "
    \n
  • \n
  • 1
  • \n
  • 2
  • \n
  • 3
  • \n
  • 4
  • \n
  • 5
  • \n
  • \n
  • 50
  • \n
  • \n
", - "3": "
    \n
  • \n
  • \n
  • \n
" + "3": "
    \n
  • \n
  • \n
  • \n
" }, "Test trimmed links for /uikit?trim=true&page=2": { "1": "
    \n
  • \n
  • 1
  • \n
  • 2
  • \n
  • 3
  • \n
  • 4
  • \n
  • 5
  • \n
  • 6
  • \n
  • \n
  • 50
  • \n
  • \n
", "2": "
    \n
  • \n
  • 1
  • \n
  • 2
  • \n
  • 3
  • \n
  • 4
  • \n
  • 5
  • \n
  • 6
  • \n
  • \n
  • 50
  • \n
  • \n
", - "3": "
    \n
  • \n
  • \n
  • \n
" + "3": "
    \n
  • \n
  • \n
  • \n
" }, "Test trimmed links for /uikit?trim=true&page=3": { "1": "
    \n
  • \n
  • 1
  • \n
  • 2
  • \n
  • 3
  • \n
  • 4
  • \n
  • 5
  • \n
  • 6
  • \n
  • 7
  • \n
  • \n
  • 50
  • \n
  • \n
", "2": "
    \n
  • \n
  • 1
  • \n
  • 2
  • \n
  • 3
  • \n
  • 4
  • \n
  • 5
  • \n
  • 6
  • \n
  • 7
  • \n
  • \n
  • 50
  • \n
  • \n
", - "3": "
    \n
  • \n
  • \n
  • \n
" + "3": "
    \n
  • \n
  • \n
  • \n
" }, "Test trimmed links for /bootstrap-calendar?trim=true&month_page=1": { "1": "", diff --git a/gem/javascripts/pagy-dev.js b/gem/javascripts/pagy-dev.js index 54e7a5bd1..089a7eb74 100644 --- a/gem/javascripts/pagy-dev.js +++ b/gem/javascripts/pagy-dev.js @@ -53,6 +53,7 @@ window.Pagy = (() => { // Init the input element const initInput = (el, getVars, trimParam) => { const input = el.querySelector("input"); + const link = el.querySelector("a"); const initial = input.value; const action = function () { if (input.value === initial) { @@ -68,7 +69,8 @@ window.Pagy = (() => { if (typeof trimParam === "string" && page === "1") { url = trim(url, trimParam); } - window.location.href = url; + link.href = url; + link.click(); }; ["change", "focus"].forEach(e => input.addEventListener(e, input.select)); // auto-select input.addEventListener("focusout", action); // trigger action @@ -109,4 +111,4 @@ window.Pagy = (() => { } }; })(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWtCQSxNQUFNLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRTtJQUNmLDRDQUE0QztJQUM1QyxNQUFNLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUNOLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FDM0UsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFeEUsNEJBQTRCO0lBQzVCLE1BQU0sT0FBTyxHQUFHLENBQUMsRUFBYSxFQUFFLENBQUMsTUFBTSxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsU0FBUyxDQUFTLEVBQUUsRUFBRTtRQUNsRixNQUFNLFNBQVMsR0FBRyxFQUFFLENBQUMsYUFBYSxJQUFJLEVBQUUsQ0FBQztRQUN6QyxNQUFNLE1BQU0sR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEdBQU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Y29udGFpbmVyLmNsaWVudFdpZHRoKSB8fCAwO1xuICAgICAgICAgICAgaWYgKHdpZHRoID09PSBsYXN0V2lkdGgpIHsgcmV0dXJuIH0gLy8gbm8gY2hhbmdlOiBhYm9ydFxuICAgICAgICAgICAgbGV0IGh0bWwgPSB0b2tlbnMuYmVmb3JlOyAgLy8gYWxyZWFkeSB0cmltbWVkIGluIGh0bWxcbiAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IHNlcXVlbHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGxldCBmaWxsZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IGZpbGxJbih0b2tlbnMuYSwgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IHRva2Vucy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgZmlsbGVkID0gZmlsbEluKHRva2Vucy5jdXJyZW50LCBpdGVtLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGh0bWwgKz0gKHR5cGVvZiB0cmltUGFyYW0gPT09IFwic3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iAgICAgICAgdmVyc2lvbjogXCI4LjAuMVwiLFxuXG4gICAgICAgIC8vIFNjYW4gZm9yIGVsZW1lbnRzIHdpdGggYSBcImRhdGEtcGFneVwiIGF0dHJpYnV0ZSBhbmQgY2FsbCB0aGVpciBpbml0IGZ1bmN0aW9ucyB3aXRoIHRoZSBkZWNvZGVkIGFyZ3NcbiAgICAgICAgaW5pdChhcmc/OkVsZW1lbnQgfCBuZXZlcikge1xuICAgICAgICAgICAgY29uc3QgdGFyZ2V0ID0gYXJnIGluc3RhbmNlb2YgRWxlbWVudCA/IGFyZyA6IGRvY3VtZW50O1xuICAgICAgICAgICAgY29uc3QgZWxlbWVudHMgPSB0YXJnZXQucXVlcnlTZWxlY3RvckFsbChcIltkYXRhLXBhZ3ldXCIpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBlbCBvZiBlbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHVpbnQ4YXJyYXkgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWtCQSxNQUFNLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRTtJQUNmLDRDQUE0QztJQUM1QyxNQUFNLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUNOLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FDM0UsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxFQUFFLENBQUM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Qua2V5cyhzZXF1ZWxzKS5tYXAodyA9PiBwYXJzZUludCh3KSkuc29ydCgoYSwgYikgPT4gYiAtIGEpO1xuICAgICAgICBsZXQgbGFzdFdpZHRoID0gLTE7XG4gICAgICAgIGNvbnN0IGZpbGxJbiA9IChhOnN0cmluZywgcGFnZTpzdHJpbmcsIGxhYmVsOnN0cmluZyk6c3RyaW5nID0+XG4gICAgICAgICAgICBhLnJlcGxhY2UoL19fcGFneV9wYWdlX18vZywgcGFnZSkucmVwbGFjZSgvX19wYWd5X2xhYmVsX18vZywgbGFiZWwpO1xuICAgICAgICAoZWwucGFneVJlbmRlciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGNvbnN0IHdpZHRoID0gd2lkdGhzLmZpbmQodyA9PiB3IDwgY29udGFpbmVyLmNsaWVudFdpZHRoKSB8fCAwO1xuICAgICAgICAgICAgaWYgKHdpZHRoID09PSBsYXN0V2lkdGgpIHsgcmV0dXJuIH0gLy8gbm8gY2hhbmdlOiBhYm9ydFxuICAgICAgICAgICAgbGV0IGh0bWwgPSB0b2tlbnMuYmVmb3JlOyAgLy8gYWxyZWFkeSB0cmltbWVkIGluIGh0bWxcbiAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IHNlcXVlbHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGxldCBmaWxsZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IGZpbGxJbih0b2tlbnMuYSwgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IHRva2Vucy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgZmlsbGVkID0gZmlsbEluKHRva2Vucy5jdXJyZW50LCBpdGVtLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGh0bWwgKz0gKHR5cGVvZiB0cmltUGFyYW0gPT09IFwic3RyaW5nXCIgJiYgaXRlbSA9PSAxKSA/IHRyaW0oZmlsbGVkLCB0cmltUGFyYW0pIDogZmlsbGVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaHRtbCArPSB0b2tlbnMuYWZ0ZXI7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBhbGlnbi1hc3NpZ25tZW50cy9hbGlnbi1hc3NpZ25tZW50c1xuICAgICAgICAgICAgZWwuaW5uZXJIVE1MID0gXCJcIjtcbiAgICAgICAgICAgIGVsLmluc2VydEFkamFjZW50SFRNTChcImFmdGVyYmVnaW5cIiwgaHRtbCk7XG4gICAgICAgICAgICBsYXN0V2lkdGggPSB3aWR0aDtcbiAgICAgICAgfSkoKTtcbiAgICAgICAgaWYgKGVsLmNsYXNzTGlzdC5jb250YWlucyhcInBhZ3ktcmpzXCIpKSB7IHJqc09ic2VydmVyLm9ic2VydmUoY29udGFpbmVyKSB9XG4gICAgfTtcblxuICAgIC8vIEluaXQgdGhlICpfY29tYm9fbmF2X2pzIGhlbHBlcnNcbiAgICBjb25zdCBpbml0Q29tYm8gPSAoZWw6RWxlbWVudCwgW3VybF90b2tlbiwgdHJpbVBhcmFtXTpDb21ib0Fy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Q4YXJyYXkgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ== \ No newline at end of file diff --git a/gem/javascripts/pagy-module.js b/gem/javascripts/pagy-module.js index ba3e09166..686d00c70 100644 --- a/gem/javascripts/pagy-module.js +++ b/gem/javascripts/pagy-module.js @@ -52,6 +52,7 @@ const Pagy = (() => { // Init the input element const initInput = (el, getVars, trimParam) => { const input = el.querySelector("input"); + const link = el.querySelector("a"); const initial = input.value; const action = function () { if (input.value === initial) { @@ -67,7 +68,8 @@ const Pagy = (() => { if (typeof trimParam === "string" && page === "1") { url = trim(url, trimParam); } - window.location.href = url; + link.href = url; + link.click(); }; ["change", "focus"].forEach(e => input.addEventListener(e, input.select)); // auto-select input.addEventListener("focusout", action); // trigger action diff --git a/gem/javascripts/pagy.js b/gem/javascripts/pagy.js index b2bf316b9..d28c1b158 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,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=>ee.toString());for(let e in f){let t;let n=f[e],a=y[e];t="number"==typeof n?s(r.a,n.toString(),a):"gap"===n?r.gap:s(r.current,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(il){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:"8.0.1",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}(); \ 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.0.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,...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/extras/bootstrap.rb b/gem/lib/pagy/extras/bootstrap.rb index e3c19cdc3..6e84d9158 100644 --- a/gem/lib/pagy/extras/bootstrap.rb +++ b/gem/lib/pagy/extras/bootstrap.rb @@ -57,7 +57,7 @@ def pagy_bootstrap_combo_nav_js(pagy, id: nil, classes: 'pagination', aria_label page_input = %() + %(border: none; display: inline-block;" class="page-link active">#{JSTools::A_TAG}) %() + %(border: none; border-radius: 4px; padding: 0; font-size: 1.1rem; color: white; ) << + %(background-color: #485fc7;">#{JSTools::A_TAG}) %() + %(height: 1.5rem; padding: .5rem; margin: 0 .4rem; font-size: .875rem;" class="current">#{JSTools::A_TAG}) %() + items}" style="padding: 0; text-align: center; width: #{items.to_s.length + 1}rem;">#{JSTools::A_TAG}) %() + %(border: none; border-radius: 2px; color: white; background-color: #ee6e73;" class="browser-default"> ) << + JSTools::A_TAG %() + %(style="text-align: center; width: #{pages.to_s.length + 1}rem; padding: 0;">#{JSTools::A_TAG}) %() + %(style="text-align: center; width: #{pages.to_s.length + 1}rem; padding: 0; margin: 0 0.3rem">) << + JSTools::A_TAG %() + %(style="text-align: center; width: #{pages.to_s.length + 1}rem;">#{JSTools::A_TAG}) %( { // Init the input element const initInput = (el:Element, getVars:(v:string) => [string, string], trimParam?:string) => { const input = el.querySelector("input") as HTMLInputElement; + const link = el.querySelector("a") as HTMLAnchorElement; const initial = input.value; const action = function () { if (input.value === initial) { return } // not changed @@ -83,7 +84,8 @@ const Pagy = (() => { } let [page, url] = getVars(input.value); // eslint-disable-line prefer-const if (typeof trimParam === "string" && page === "1") { url = trim(url, trimParam) } - window.location.href = url; + link.href = url; + link.click(); }; ["change", "focus"].forEach(e => input.addEventListener(e, input.select)); // auto-select input.addEventListener("focusout", action); // trigger action diff --git a/test/pagy/extras/bootstrap_test.rb.rematch b/test/pagy/extras/bootstrap_test.rb.rematch index cf96277db..4e62ef292 100644 --- a/test/pagy/extras/bootstrap_test.rb.rematch +++ b/test/pagy/extras/bootstrap_test.rb.rematch @@ -1,50 +1,4 @@ --- -pagy/extras/bootstrap::#pagy_bootstrap_combo_nav_js#test_0001_renders first, intermediate and last pages: - :plain_1: '' - :extras_1: '' - :plain_3: '' - :extras_3: '' - :plain_6: '' - :extras_6: '' pagy/extras/bootstrap::#pagy_bootstrap_nav_js#test_0001_renders single and multiple pages when used with Pagy::Countless: :plain_1_0: :extras_1_0: +pagy/extras/bootstrap::#pagy_bootstrap_combo_nav_js#test_0001_renders first, intermediate and last pages: + :plain_1: '' + :extras_1: '' + :plain_3: '' + :extras_3: '' + :plain_6: '' + :extras_6: '' diff --git a/test/pagy/extras/bulma_test.rb.rematch b/test/pagy/extras/bulma_test.rb.rematch index 6f5d9cbd4..aecdc3a88 100644 --- a/test/pagy/extras/bulma_test.rb.rematch +++ b/test/pagy/extras/bulma_test.rb.rematch @@ -29,7 +29,8 @@ pagy/extras/bulma::#pagy_bulma_combo_nav_js#test_0001_renders first, intermediat class="pagination-link">' + color: white; background-color: #485fc7;"># + of 6' :extras_1: '' + 4px; padding: 0; font-size: 1.1rem; color: white; background-color: #485fc7;"># of 6' :plain_3: '' + color: white; background-color: #485fc7;"># + of 6' :extras_3: '' + 4px; padding: 0; font-size: 1.1rem; color: white; background-color: #485fc7;"># of 6' :plain_6: '' + color: white; background-color: #485fc7;"># + of 6' :extras_6: '' + 4px; padding: 0; font-size: 1.1rem; color: white; background-color: #485fc7;"># of 6' pagy/extras/bulma::#pagy_bulma_nav#test_0001_renders first, intermediate and last pages: :plain_1: ' + :extras_1: '' + :plain_3: '' + :extras_3: '' + :plain_6: '' + :extras_6: '' pagy/extras/foundation::#pagy_foundation_nav#test_0001_renders first, intermediate and last pages: :plain_1: -pagy/extras/foundation::#pagy_foundation_nav_js#test_0001_renders single and multiple pages when used with Pagy::Countless: - :plain_1_0: - :extras_1_0: - :plain_2_23: - :extras_2_23: pagy/extras/foundation::#pagy_foundation_nav_js#test_0002_renders first, intermediate and last pages with required steps: :plain_1: :extras_1: :extras_50: -pagy/extras/foundation::#pagy_foundation_combo_nav_js#test_0001_renders first, intermediate and last pages: - :plain_1: '' - :extras_1: '' - :plain_3: '' - :extras_3: '' - :plain_6: '' - :extras_6: '' +pagy/extras/foundation::#pagy_foundation_nav_js#test_0001_renders single and multiple pages when used with Pagy::Countless: + :plain_1_0: + :extras_1_0: + :plain_2_23: + :extras_2_23: diff --git a/test/pagy/extras/items_test.rb.rematch b/test/pagy/extras/items_test.rb.rematch index 40478eee7..92caa2ab2 100644 --- a/test/pagy/extras/items_test.rb.rematch +++ b/test/pagy/extras/items_test.rb.rematch @@ -2,10 +2,9 @@ pagy/extras/items::view_methods#test_0001_renders items selector: :selector_1: '' + 0; text-align: center; width: 3rem;"># + items per page' :selector_2: '' - :selector_3: '' + 0; text-align: center; width: 3rem;"># + products per page' diff --git a/test/pagy/extras/items_trim_test.rb.rematch b/test/pagy/extras/items_trim_test.rb.rematch index 46c38f5f2..c6b4c0048 100644 --- a/test/pagy/extras/items_trim_test.rb.rematch +++ b/test/pagy/extras/items_trim_test.rb.rematch @@ -2,10 +2,9 @@ pagy/extras/items_trim#test_0001_renders items selector with trim: :selector_1: '' + 0; text-align: center; width: 3rem;"># + items per page' :selector_2: '' - :selector_3: '' + 0; text-align: center; width: 3rem;"># + products per page' diff --git a/test/pagy/extras/materialize_test.rb.rematch b/test/pagy/extras/materialize_test.rb.rematch index 6df503524..e16b64f15 100644 --- a/test/pagy/extras/materialize_test.rb.rematch +++ b/test/pagy/extras/materialize_test.rb.rematch @@ -1,59 +1,4 @@ --- -pagy/extras/materialize::#pagy_materialize_combo_nav_js#test_0001_renders first, intermediate and last pages: - :plain_1: '' - :extras_1: '' - :plain_3: '' - :extras_3: '' - :plain_6: '
' - :extras_6: '
' pagy/extras/materialize::#pagy_materialize_nav#test_0001_renders first, intermediate and last pages: :plain_1: -pagy/extras/materialize::#pagy_materialize_nav_js#test_0001_renders single and multiple pages when used with Pagy::Countless: - :plain_1_0: - :extras_1_0: - :plain_2_23: - :extras_2_23: pagy/extras/materialize::#pagy_materialize_nav_js#test_0002_renders first, intermediate and last pages with required steps: :plain_1: @@ -143,3 +79,71 @@ pagy/extras/materialize::#pagy_materialize_nav_js#test_0002_renders first, inter data-pagy="WyJuYXYiLHsiYmVmb3JlIjoiPHVsIGNsYXNzPVwicGFnaW5hdGlvblwiPjxsaSBjbGFzcz1cIndhdmVzLWVmZmVjdCBwcmV2XCI+PGEgaHJlZj1cIi9mb28/cGFnZT00OVwiIGFyaWEtbGFiZWw9XCJQcmV2aW91c1wiPjxpIGNsYXNzPVwibWF0ZXJpYWwtaWNvbnNcIj5jaGV2cm9uX2xlZnQ8L2k+PC9hPjwvbGk+IiwiYSI6IjxsaSBjbGFzcz1cIndhdmVzLWVmZmVjdFwiPjxhIGhyZWY9XCIvZm9vP3BhZ2U9X19wYWd5X3BhZ2VfX1wiPl9fcGFneV9sYWJlbF9fPC9hPjwvbGk+IiwiY3VycmVudCI6IjxsaSBjbGFzcz1cImFjdGl2ZVwiPjxhIHJvbGU9XCJsaW5rXCIgYXJpYS1jdXJyZW50PVwicGFnZVwiIGFyaWEtZGlzYWJsZWQ9XCJ0cnVlXCI+X19wYWd5X2xhYmVsX188L2E+PC9saT4iLCJnYXAiOiI8bGkgY2xhc3M9XCJnYXAgZGlzYWJsZWRcIj48YSByb2xlPVwibGlua1wiIGFyaWEtZGlzYWJsZWQ9XCJ0cnVlXCI+JmhlbGxpcDs8L2E+PC9saT4iLCJhZnRlciI6IjxsaSBjbGFzcz1cIm5leHQgZGlzYWJsZWRcIiM+PGEgcm9sZT1cImxpbmtcIiBhcmlhLWRpc2FibGVkPVwidHJ1ZVwiIGFyaWEtbGFiZWw9XCJOZXh0PjxpIGNsYXNzPVwibWF0ZXJpYWwtaWNvbnNcIj5jaGV2cm9uX3JpZ2h0PC9pPjwvYT48L2xpPjwvdWw+In0seyIwIjpbMSwiZ2FwIiw0Niw0Nyw0OCw0OSwiNTAiXX0sbnVsbF0="> :extras_50: +pagy/extras/materialize::#pagy_materialize_nav_js#test_0001_renders single and multiple pages when used with Pagy::Countless: + :plain_1_0: + :extras_1_0: + :plain_2_23: + :extras_2_23: +pagy/extras/materialize::#pagy_materialize_combo_nav_js#test_0001_renders first, intermediate and last pages: + :plain_1: '' + :extras_1: '' + :plain_3: '' + :extras_3: '' + :plain_6: '' + :extras_6: '' diff --git a/test/pagy/extras/pagy_test.rb.rematch b/test/pagy/extras/pagy_test.rb.rematch index 34dd365c5..9b4791d98 100644 --- a/test/pagy/extras/pagy_test.rb.rematch +++ b/test/pagy/extras/pagy_test.rb.rematch @@ -1,34 +1,82 @@ --- -pagy/extras/pagy::#pagy_next_link#test_0004_renders the pagy_next_link for page 50: - :r1: - :r2: - :r3: - :r4: -pagy/extras/pagy::#pagy_next_link#test_0003_renders the pagy_next_link for page 6: - :r1: - :r2: - :r3: - :r4: -pagy/extras/pagy::#pagy_next_link#test_0001_renders the pagy_next_link for page 1: - :r1: - :r2: - :r3: - :r4: -pagy/extras/pagy::#pagy_next_link#test_0002_renders the pagy_next_link for page 3: - :r1: - :r2: - :r3: - :r4: -pagy/extras/pagy::#pagy_next_a#test_0004_renders the pagy_next_a for page 50: - :r1: > - :r2: > - :r3: NEXT - :r4: NEXT +pagy/extras/pagy::#pagy_nav_js#test_0001_renders single and multiple pages when used with Pagy::Countless: + :plain_1_0: + :extras_1_0: + :plain_2_23: + :extras_2_23: +pagy/extras/pagy::#pagy_nav_js#test_0002_renders first, intermediate and last pages with required steps: + :plain_1: + :extras_1: + :plain_20: + :extras_20: + :plain_50: + :extras_50: +pagy/extras/pagy::#pagy_combo_nav_js#test_0001_renders first, intermediate and last pages: + :plain_1: '' + :extras_1: '' + :plain_3: '' + :extras_3: '' + :plain_6: '' + :extras_6: '' +pagy/extras/pagy::#pagy_prev_a#test_0003_renders the pagy_prev_a for page 6: + :r1: < + :r2: < + :r3: PREV + :r4: PREV +pagy/extras/pagy::#pagy_prev_a#test_0004_renders the pagy_prev_a for page 50: + :r1: < + :r2: < + :r3: PREV + :r4: PREV +pagy/extras/pagy::#pagy_prev_a#test_0001_renders the pagy_prev_a for page 1: + :r1: < + :r2: < + :r3: PREV + :r4: PREV +pagy/extras/pagy::#pagy_prev_a#test_0002_renders the pagy_prev_a for page 3: + :r1: < + :r2: < + :r3: PREV + :r4: PREV pagy/extras/pagy::#pagy_next_a#test_0003_renders the pagy_next_a for page 6: :r1: > :r2: > :r3: NEXT :r4: NEXT +pagy/extras/pagy::#pagy_next_a#test_0004_renders the pagy_next_a for page 50: + :r1: > + :r2: > + :r3: NEXT + :r4: NEXT pagy/extras/pagy::#pagy_next_a#test_0001_renders the pagy_next_a for page 1: :r1: > :r2: > @@ -78,82 +126,16 @@ pagy/extras/pagy::#pagy_nav#test_0001_renders first, intermediate and last pages anchor_string href="/foo?page=47">47484950> -pagy/extras/pagy::#pagy_combo_nav_js#test_0001_renders first, intermediate and last pages: - :plain_1: '' - :extras_1: '' - :plain_3: '' - :extras_3: '' - :plain_6: '' - :extras_6: '' -pagy/extras/pagy::#pagy_nav_js#test_0001_renders single and multiple pages when used with Pagy::Countless: - :plain_1_0: - :extras_1_0: - :plain_2_23: - :extras_2_23: -pagy/extras/pagy::#pagy_nav_js#test_0002_renders first, intermediate and last pages with required steps: - :plain_1: - :extras_1: - :plain_20: - :extras_20: - :plain_50: - :extras_50: -pagy/extras/pagy::#pagy_prev_a#test_0004_renders the pagy_prev_a for page 50: - :r1: < - :r2: < - :r3: PREV - :r4: PREV -pagy/extras/pagy::#pagy_prev_a#test_0003_renders the pagy_prev_a for page 6: - :r1: < - :r2: < - :r3: PREV - :r4: PREV -pagy/extras/pagy::#pagy_prev_a#test_0001_renders the pagy_prev_a for page 1: - :r1: < - :r2: < - :r3: PREV - :r4: PREV -pagy/extras/pagy::#pagy_prev_a#test_0002_renders the pagy_prev_a for page 3: - :r1: < - :r2: < - :r3: PREV - :r4: PREV -pagy/extras/pagy::#pagy_next_url#test_0004_renders the pagy_next_url for page 50: - :r1: - :r2: - :r3: - :r4: pagy/extras/pagy::#pagy_next_url#test_0003_renders the pagy_next_url for page 6: :r1: "/foo?page=7" :r2: "/foo?page=7" :r3: http://example.com:3000/foo?page=7 :r4: http://example.com:3000/foo?page=7 +pagy/extras/pagy::#pagy_next_url#test_0004_renders the pagy_next_url for page 50: + :r1: + :r2: + :r3: + :r4: pagy/extras/pagy::#pagy_next_url#test_0001_renders the pagy_next_url for page 1: :r1: "/foo?page=2" :r2: "/foo?page=2" @@ -164,36 +146,16 @@ pagy/extras/pagy::#pagy_next_url#test_0002_renders the pagy_next_url for page 3: :r2: "/foo?page=4" :r3: http://example.com:3000/foo?page=4 :r4: http://example.com:3000/foo?page=4 -pagy/extras/pagy::#pagy_prev_link#test_0004_renders the pagy_prev_link for page 50: - :r1: - :r2: - :r3: - :r4: -pagy/extras/pagy::#pagy_prev_link#test_0003_renders the pagy_prev_link for page 6: - :r1: - :r2: - :r3: - :r4: -pagy/extras/pagy::#pagy_prev_link#test_0001_renders the pagy_prev_link for page 1: - :r1: - :r2: - :r3: - :r4: -pagy/extras/pagy::#pagy_prev_link#test_0002_renders the pagy_prev_link for page 3: - :r1: - :r2: - :r3: - :r4: -pagy/extras/pagy::#pagy_prev_url#test_0004_renders the pagy_prev_url for page 50: - :r1: "/foo?page=49" - :r2: "/foo?page=49" - :r3: http://example.com:3000/foo?page=49 - :r4: http://example.com:3000/foo?page=49 pagy/extras/pagy::#pagy_prev_url#test_0003_renders the pagy_prev_url for page 6: :r1: "/foo?page=5" :r2: "/foo?page=5" :r3: http://example.com:3000/foo?page=5 :r4: http://example.com:3000/foo?page=5 +pagy/extras/pagy::#pagy_prev_url#test_0004_renders the pagy_prev_url for page 50: + :r1: "/foo?page=49" + :r2: "/foo?page=49" + :r3: http://example.com:3000/foo?page=49 + :r4: http://example.com:3000/foo?page=49 pagy/extras/pagy::#pagy_prev_url#test_0001_renders the pagy_prev_url for page 1: :r1: :r2: @@ -204,3 +166,43 @@ pagy/extras/pagy::#pagy_prev_url#test_0002_renders the pagy_prev_url for page 3: :r2: "/foo?page=2" :r3: http://example.com:3000/foo?page=2 :r4: http://example.com:3000/foo?page=2 +pagy/extras/pagy::#pagy_next_link#test_0003_renders the pagy_next_link for page 6: + :r1: + :r2: + :r3: + :r4: +pagy/extras/pagy::#pagy_next_link#test_0004_renders the pagy_next_link for page 50: + :r1: + :r2: + :r3: + :r4: +pagy/extras/pagy::#pagy_next_link#test_0001_renders the pagy_next_link for page 1: + :r1: + :r2: + :r3: + :r4: +pagy/extras/pagy::#pagy_next_link#test_0002_renders the pagy_next_link for page 3: + :r1: + :r2: + :r3: + :r4: +pagy/extras/pagy::#pagy_prev_link#test_0003_renders the pagy_prev_link for page 6: + :r1: + :r2: + :r3: + :r4: +pagy/extras/pagy::#pagy_prev_link#test_0004_renders the pagy_prev_link for page 50: + :r1: + :r2: + :r3: + :r4: +pagy/extras/pagy::#pagy_prev_link#test_0001_renders the pagy_prev_link for page 1: + :r1: + :r2: + :r3: + :r4: +pagy/extras/pagy::#pagy_prev_link#test_0002_renders the pagy_prev_link for page 3: + :r1: + :r2: + :r3: + :r4: diff --git a/test/pagy/extras/semantic_test.rb.rematch b/test/pagy/extras/semantic_test.rb.rematch index 5e2a754e0..7b29b3b1a 100644 --- a/test/pagy/extras/semantic_test.rb.rematch +++ b/test/pagy/extras/semantic_test.rb.rematch @@ -21,6 +21,48 @@ pagy/extras/semantic::#pagy_semantic_nav_js#test_0001_renders single and multipl aria-label="Pages" data-pagy="WyJuYXYiLHsiYmVmb3JlIjoiPGEgaHJlZj1cIi9mb28/cGFnZT0xXCIgY2xhc3M9XCJpdGVtXCIgYXJpYS1sYWJlbD1cIlByZXZpb3VzXCI+Jmx0OzwvYT4iLCJhIjoiPGEgaHJlZj1cIi9mb28/cGFnZT1fX3BhZ3lfcGFnZV9fXCIgY2xhc3M9XCJpdGVtXCI+X19wYWd5X2xhYmVsX188L2E+IiwiY3VycmVudCI6IjxhIHJvbGU9XCJsaW5rXCIgY2xhc3M9XCJpdGVtIGFjdGl2ZVwiIGFyaWEtY3VycmVudD1cInBhZ2VcIiBhcmlhLWRpc2FibGVkPVwidHJ1ZVwiPl9fcGFneV9sYWJlbF9fPC9hPiIsImdhcCI6IjxkaXYgY2xhc3M9XCJkaXNhYmxlZCBpdGVtXCI+JmhlbGxpcDs8L2Rpdj4iLCJhZnRlciI6IjxhIGhyZWY9XCIvZm9vP3BhZ2U9M1wiIGNsYXNzPVwiaXRlbVwiIGFyaWEtbGFiZWw9XCJOZXh0XCI+Jmd0OzwvYT4ifSx7IjAiOlsxLCIyIiwzXX0sbnVsbF0="> :extras_2_23: +pagy/extras/semantic::#pagy_semantic_combo_nav_js#test_0001_renders first, intermediate and last pages: + :plain_1: '' + :extras_1: '' + :plain_3: '' + :extras_3: '' + :plain_6: '' + :extras_6: '' pagy/extras/semantic::#pagy_semantic_nav#test_0001_renders first, intermediate and last pages: :plain_1: -pagy/extras/semantic::#pagy_semantic_combo_nav_js#test_0001_renders first, intermediate and last pages: - :plain_1: '' - :extras_1: '' - :plain_3: '' - :extras_3: '' - :plain_6: '' - :extras_6: '' diff --git a/test/pagy/extras/uikit_test.rb.rematch b/test/pagy/extras/uikit_test.rb.rematch index 46a0c057f..b8aee6261 100644 --- a/test/pagy/extras/uikit_test.rb.rematch +++ b/test/pagy/extras/uikit_test.rb.rematch @@ -5,39 +5,64 @@ pagy/extras/uikit::#pagy_uikit_combo_nav_js#test_0001_renders first, intermediat class="uk-disabled">
  • ' + 2rem;"># of 6
  • ' :extras_1: '' + 2rem;"># of 6
  • ' :plain_3: '' + style="text-align: center; width: 2rem;"># + of 6
  • ' :extras_3: '' + style="text-align: center; width: 2rem;"># + of 6
  • ' :plain_6: '' + style="text-align: center; width: 2rem;"># + of 6
  • ' :extras_6: '' + style="text-align: center; width: 2rem;"># + of 6
  • ' +pagy/extras/uikit::#pagy_uikit_nav_js#test_0002_renders first, intermediate and last pages with required steps: + :plain_1: + :extras_1: + :plain_20: + :extras_20: + :plain_50: + :extras_50: +pagy/extras/uikit::#pagy_uikit_nav_js#test_0001_renders single and multiple pages when used with Pagy::Countless: + :plain_1_0: + :extras_1_0: + :plain_2_23: + :extras_2_23: pagy/extras/uikit::#pagy_uikit_nav#test_0001_renders first, intermediate and last pages: :plain_1: -pagy/extras/uikit::#pagy_uikit_nav_js#test_0001_renders single and multiple pages when used with Pagy::Countless: - :plain_1_0: - :extras_1_0: - :plain_2_23: - :extras_2_23: -pagy/extras/uikit::#pagy_uikit_nav_js#test_0002_renders first, intermediate and last pages with required steps: - :plain_1: - :extras_1: - :plain_20: - :extras_20: - :plain_50: - :extras_50: From e406a5625a4b51f4f7a7e137848144aefea35fcc Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Thu, 4 Apr 2024 21:21:36 +0700 Subject: [PATCH 08/12] Fix canonical gem root: - Correct script.build: "NODE_PATH=\"$(bundle show 'pagy')/javascripts\" - Move pagy.gemspec inside the gem root dir - Remove rake:manifest gem --- .github/gemfiles/default | 3 -- .github/workflows/pagy-ci.yml | 3 -- .gitignore | 2 +- CHANGELOG.md | 32 +++++++----- Gemfile | 2 - Gemfile.lock | 4 -- Rakefile | 2 +- docs/api/javascript/setup.md | 6 +-- gem/locales/README.md | 12 ----- pagy.gemspec => gem/pagy.gemspec | 10 ++-- pagy.manifest | 90 -------------------------------- tasks/check_coverage.rake | 2 +- tasks/rubygem_release.rake | 16 +++--- 13 files changed, 36 insertions(+), 148 deletions(-) rename pagy.gemspec => gem/pagy.gemspec (84%) delete mode 100644 pagy.manifest diff --git a/.github/gemfiles/default b/.github/gemfiles/default index 736c649e8..297684568 100644 --- a/.github/gemfiles/default +++ b/.github/gemfiles/default @@ -10,7 +10,6 @@ gem 'oj', require: false # false is for testing with or without it gem 'rack' gem 'rackup' gem 'rake' -gem 'rake-manifest' group :test do gem 'activesupport' @@ -29,6 +28,4 @@ group :apps do gem 'puma' gem 'sinatra' gem 'sinatra-contrib' - # gem 'slim' - # gem 'haml' end diff --git a/.github/workflows/pagy-ci.yml b/.github/workflows/pagy-ci.yml index 9aa38f04d..1116e941c 100644 --- a/.github/workflows/pagy-ci.yml +++ b/.github/workflows/pagy-ci.yml @@ -47,9 +47,6 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Check gem manifest - run: bundle exec rake manifest:check - - name: Check Rubocop compliance run: bundle exec rubocop --format github diff --git a/.gitignore b/.gitignore index ed6997294..9d823c341 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ /.bundle/ /coverage/ node_modules/ -/pkg/ +/gem/pkg/ /tmp/ pnpm .pnpm-debug.log diff --git a/CHANGELOG.md b/CHANGELOG.md index 69f6ee677..ae6ee8c83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ icon: versions-24 ## ⚠ WARNING -We may drop pagy's less used CSS extras. +We may drop pagy's less used CSS extras. If you wish to keep them alive, please, [vote here](https://github.com/ddnexus/pagy/discussions/categories/survey). @@ -30,7 +30,8 @@ None ## Version 8.0.1 -- Reorganize the gem root dir: it was the lib dir (containing everything), now is the gem dir (containing lib and everything else). +- Reorganize the gem root dir: it was the lib dir (containing everything), now is the gem dir (containing lib and everything + else). - Fix broken link in README ## Version 8.0.0 @@ -44,20 +45,26 @@ None - The `item_i18n_key` has been removed: pass the interpolated/pluralized value as the `item_name:` argument - The `link_extra:` has been removed: its cumulative mechanism was confusing and error prone. The `:anchor_string` pagy variable substitutes it, however it's not an helper argument anymore, so you can assign it as the `DEFAULT[:anchor_string]` - and/or pass it as any other pagy variable at object construction. (See [customize the link attributes](https://ddnexus.github.io/pagy/docs/how-to/#customize-the-link-attributes)) -- HTML structure, classes and internal methods have been changed: they may break your views if you used custom stylesheets, + and/or pass it as any other pagy variable at object construction. ( + See [customize the link attributes](https://ddnexus.github.io/pagy/docs/how-to/#customize-the-link-attributes)) +- HTML structure, classes and internal methods have been changed: they may break your views if you used custom stylesheets, templates or helper overrides. See the complete changes below if you notice any cosmetic changes or get some exception. -- The `navs` and `support` extras has been merged into the new [pagy extra](https://ddnexus.github.io/pagy/docs/extras/pagy). - Search for `"extra/navs"` and +- The `navs` and `support` extras has been merged into the new [pagy extra](https://ddnexus.github.io/pagy/docs/extras/pagy). + Search for `"extra/navs"` and `"extras/support"` and replace with `"extras/pagy"` (remove the duplicate if you used both) -- The build path for javascript builders has moved from the `lib` to the `gem` dir so the correct setup in `package.json` is: - `build: "NODE_PATH=\"$(bundle show 'pagy')/gem/javascripts\" "` +- The build path for javascript builders has been updated to the canonical paths for gems, and has moved from the `lib` to + the gem root. Notice that the correct setup in `package json` was still wrongly wrapped in the `gem` dir for 8.0.0-8.0.1, and it + has finally been fixed in 8.0.2 (sorry for that): + - 8.0.0-8.0.1 only: `build: "NODE_PATH=\"$(bundle show 'pagy')/gem/javascripts\" "` + - 8.0.2+: `build: "NODE_PATH=\"$(bundle show 'pagy')/javascripts\" "` ### Changes -- Streamlined HTML and CSS helper structure. You may want to look at the actual output by running the [pagy demo](https://ddnexus.github.io/pagy/playground.md#3-demo-app) +- Streamlined HTML and CSS helper structure. You may want to look at the actual output by running + the [pagy demo](https://ddnexus.github.io/pagy/playground.md#3-demo-app) - The `pagy_nav` and `pagy_nav_js` helpers output a series of `a` tags inside a wrapper `nav` tag (nothing else) - - The disabled links are so because they are missing the `href` attributes. (They also have the `role="link"` and `aria-disabled="true"` attributes) + - The disabled links are so because they are missing the `href` attributes. (They also have the `role="link"` + and `aria-disabled="true"` attributes) - The `current` and `gap` classes are assigned to the specific `a` tags - HTML changes - All the pagy helper root classes have been changed according to the following rule. For example: @@ -65,7 +72,8 @@ None - `"pagy-bootstrap-nav-js"` > `"pagy-bootstrap nav-js"` - and so on for all the helpers - The `active` class of the `*nav`/`*nav_js` links as been renamed as `current` - - The `disabled`, `prev`, `next` and `pagy-combo-input` link classes have been removed (see the [stylesheets](https://ddnexus.github.io/pagy/docs/api/stylesheets/#pagy-scss) for details) + - The `disabled`, `prev`, `next` and `pagy-combo-input` link classes have been removed (see + the [stylesheets](https://ddnexus.github.io/pagy/docs/api/stylesheets/#pagy-scss) for details) - The `rel="prev"` and `rel="next"` attributes have been dropped (they are obsolete) - The `` and ``/`` wrappers in the dictionary files have been removed - The `pagy_link_proc` method (only used internally or in your custom overriding) has been renamed to `pagy_anchor` and it works @@ -83,7 +91,7 @@ None - The [stylesheets](https://ddnexus.github.io/pagy/docs/api/stylesheets/) are a lot simpler as a consequence of the changes above - All the `*combo-nav_js` of the framework extras use simpler structure and improve the look and feel consistently with their respective frameworks -- All the frontend extra have been normalized and are totally consistent with each other; a few may add the `classes:` +- All the frontend extra have been normalized and are totally consistent with each other; a few may add the `classes:` argument to a few components, when the framework allows it. - Created the [pagy playground](https://ddnexus.github.io/pagy/playground) system of apps working with the `pagy` executable. - Internal renaming `FrontendHelpers` > `JSTools` diff --git a/Gemfile b/Gemfile index 64bd3726d..1f2b0a6df 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,6 @@ group :test do gem 'oj', require: false # false is for testing with or without it gem 'rack' gem 'rackup' - gem 'rake-manifest' gem 'rematch' gem 'rubocop' gem 'rubocop-minitest' @@ -33,7 +32,6 @@ group :apps do gem 'rouge' gem 'sinatra' gem 'sinatra-contrib' - gem 'slop' end group :performance do diff --git a/Gemfile.lock b/Gemfile.lock index ce01a7db3..4347ff999 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -84,7 +84,6 @@ GEM webrick (~> 1.8) rainbow (3.1.1) rake (13.1.0) - rake-manifest (0.2.3) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) @@ -139,7 +138,6 @@ GEM rack-protection (= 4.0.0) sinatra (= 4.0.0) tilt (~> 2.0) - slop (4.10.1) tilt (2.3.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) @@ -163,7 +161,6 @@ DEPENDENCIES rack rackup rake - rake-manifest readline-ext rematch rerun @@ -176,7 +173,6 @@ DEPENDENCIES simplecov sinatra sinatra-contrib - slop BUNDLED WITH 2.5.3 diff --git a/Rakefile b/Rakefile index ba41af667..4524943f8 100644 --- a/Rakefile +++ b/Rakefile @@ -2,5 +2,5 @@ Rake.add_rakelib 'tasks' -task default: %i[manifest:check rubocop test check_coverage] +task default: %i[rubocop test check_coverage] task test_cov: %i[test check_coverage] diff --git a/docs/api/javascript/setup.md b/docs/api/javascript/setup.md index dd7d14c71..87e479ae0 100644 --- a/docs/api/javascript/setup.md +++ b/docs/api/javascript/setup.md @@ -167,7 +167,7 @@ unless Rails.env.production? Prepend the `NODE_PATH` environment variable to the `scripts.build` command: ```json package.json { - "build": "NODE_PATH=\"$(bundle show 'pagy')/gem/javascripts\" " + "build": "NODE_PATH=\"$(bundle show 'pagy')/javascripts\" " } ``` @@ -175,7 +175,7 @@ Prepend the `NODE_PATH` environment variable to the `scripts.build` command: Prepend the `NODE_PATH` environment variable to the `scripts.build` command: ```json package.json { - "build": "NODE_PATH=\"$(bundle show 'pagy')/gem/javascripts\" " + "build": "NODE_PATH=\"$(bundle show 'pagy')/javascripts\" " } ``` @@ -215,7 +215,7 @@ import './pagy.js.erb' Prepend the `NODE_PATH` environment variable to the `scripts.build` command: ```json package.json { - "build": "NODE_PATH=\"$(bundle show 'pagy')/gem/javascripts\" " + "build": "NODE_PATH=\"$(bundle show 'pagy')/javascripts\" " } ``` diff --git a/gem/locales/README.md b/gem/locales/README.md index 4fdc03c26..1276a9b3c 100644 --- a/gem/locales/README.md +++ b/gem/locales/README.md @@ -37,18 +37,6 @@ You can create a Pull Request for your language, and get all the help you need t for `one`, `few`, `many` and `other`, if it uses `:one_other`, you should provide `one` and `other` plurals. If it uses `:other` you should only provide a single value. Look into other dictionary files to get some example. Ask if in doubt. -- [ ] Update the manifest file. - -```sh -rake manifest:generate -``` - -and then confirm it with: - -```sh -rake manifest:check -``` - Feel free to ask for help in your Pull Request. ### Useful Links diff --git a/pagy.gemspec b/gem/pagy.gemspec similarity index 84% rename from pagy.gemspec rename to gem/pagy.gemspec index 79d70a540..76b407361 100644 --- a/pagy.gemspec +++ b/gem/pagy.gemspec @@ -1,8 +1,6 @@ # frozen_string_literal: true -lib = File.expand_path('gem/lib', __dir__) -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'pagy' +require_relative 'lib/pagy' Gem::Specification.new do |s| s.name = 'pagy' @@ -13,15 +11,15 @@ Gem::Specification.new do |s| s.description = 'Agnostic pagination in plain ruby. It does it all. Better.' s.homepage = 'https://github.com/ddnexus/pagy' s.license = 'MIT' - s.files = File.read('pagy.manifest').split + s.files = Dir.glob('**/*') + .reject { |f| f.end_with?('.md', '.gemspec') } + .select { |f| File.file?(f) } + ['LICENSE.txt'] # LICENSE.txt is copied and deleted around build s.metadata = { 'rubygems_mfa_required' => 'true', 'homepage_uri' => 'https://github.com/ddnexus/pagy', 'documentation_uri' => 'https://ddnexus.github.io/pagy', 'bug_tracker_uri' => 'https://github.com/ddnexus/pagy/issues', 'changelog_uri' => 'https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md', 'support' => 'https://github.com/ddnexus/pagy/discussions/categories/q-a' } - s.require_paths = ['gem/lib'] - s.bindir = 'gem/bin' s.executables << 'pagy' s.post_install_message = <<~PIM *********************** PAGY WARNING! *********************** diff --git a/pagy.manifest b/pagy.manifest deleted file mode 100644 index 33d1e558f..000000000 --- a/pagy.manifest +++ /dev/null @@ -1,90 +0,0 @@ -gem/apps/calendar.ru -gem/apps/demo.ru -gem/apps/rails.ru -gem/apps/repro.ru -gem/bin/pagy -gem/config/pagy.rb -gem/javascripts/pagy-dev.js -gem/javascripts/pagy-module.d.ts -gem/javascripts/pagy-module.js -gem/javascripts/pagy.js -gem/lib/optimist.rb -gem/lib/pagy.rb -gem/lib/pagy/backend.rb -gem/lib/pagy/calendar.rb -gem/lib/pagy/calendar/day.rb -gem/lib/pagy/calendar/helper.rb -gem/lib/pagy/calendar/month.rb -gem/lib/pagy/calendar/quarter.rb -gem/lib/pagy/calendar/week.rb -gem/lib/pagy/calendar/year.rb -gem/lib/pagy/console.rb -gem/lib/pagy/countless.rb -gem/lib/pagy/exceptions.rb -gem/lib/pagy/extras/arel.rb -gem/lib/pagy/extras/array.rb -gem/lib/pagy/extras/bootstrap.rb -gem/lib/pagy/extras/bulma.rb -gem/lib/pagy/extras/calendar.rb -gem/lib/pagy/extras/countless.rb -gem/lib/pagy/extras/elasticsearch_rails.rb -gem/lib/pagy/extras/foundation.rb -gem/lib/pagy/extras/gearbox.rb -gem/lib/pagy/extras/headers.rb -gem/lib/pagy/extras/i18n.rb -gem/lib/pagy/extras/items.rb -gem/lib/pagy/extras/js_tools.rb -gem/lib/pagy/extras/jsonapi.rb -gem/lib/pagy/extras/materialize.rb -gem/lib/pagy/extras/meilisearch.rb -gem/lib/pagy/extras/metadata.rb -gem/lib/pagy/extras/overflow.rb -gem/lib/pagy/extras/pagy.rb -gem/lib/pagy/extras/searchkick.rb -gem/lib/pagy/extras/semantic.rb -gem/lib/pagy/extras/standalone.rb -gem/lib/pagy/extras/trim.rb -gem/lib/pagy/extras/uikit.rb -gem/lib/pagy/frontend.rb -gem/lib/pagy/i18n.rb -gem/lib/pagy/url_helpers.rb -gem/locales/ar.yml -gem/locales/be.yml -gem/locales/bg.yml -gem/locales/bs.yml -gem/locales/ca.yml -gem/locales/ckb.yml -gem/locales/cs.yml -gem/locales/da.yml -gem/locales/de.yml -gem/locales/en.yml -gem/locales/es.yml -gem/locales/fr.yml -gem/locales/hr.yml -gem/locales/id.yml -gem/locales/it.yml -gem/locales/ja.yml -gem/locales/km.yml -gem/locales/ko.yml -gem/locales/nb.yml -gem/locales/nl.yml -gem/locales/nn.yml -gem/locales/pl.yml -gem/locales/pt-BR.yml -gem/locales/pt.yml -gem/locales/ru.yml -gem/locales/sr.yml -gem/locales/sv-SE.yml -gem/locales/sv.yml -gem/locales/sw.yml -gem/locales/ta.yml -gem/locales/tr.yml -gem/locales/uk.yml -gem/locales/vi.yml -gem/locales/zh-CN.yml -gem/locales/zh-HK.yml -gem/locales/zh-TW.yml -gem/stylesheets/pagy.css -gem/stylesheets/pagy.scss -gem/stylesheets/pagy.tailwind.css -LICENSE.txt diff --git a/tasks/check_coverage.rake b/tasks/check_coverage.rake index c57a45ca1..f3af38901 100644 --- a/tasks/check_coverage.rake +++ b/tasks/check_coverage.rake @@ -4,7 +4,7 @@ require 'json' desc 'Display coverage summary. Fail if not 100%' task :check_coverage do - last_run = JSON.parse(File.read(File.expand_path('../coverage/.last_run.json', __dir__))) + last_run = JSON.parse(File.read('coverage/.last_run.json')) line = last_run['result']['line'] branch = last_run['result']['branch'] message = "\n>>> Coverage -> line: #{line}% -> branch: #{branch}%\n" diff --git a/tasks/rubygem_release.rake b/tasks/rubygem_release.rake index b662b4d18..a08c6b361 100644 --- a/tasks/rubygem_release.rake +++ b/tasks/rubygem_release.rake @@ -1,14 +1,8 @@ # frozen_string_literal: true # Gem release cycle - -require 'bundler/gem_tasks' -require 'rake/manifest' - -Rake::Manifest::Task.new do |t| - t.patterns = FileList.new.include('gem/**/*', 'LICENSE.txt').exclude('**/*.md') - t.manifest_file = 'pagy.manifest' -end +require 'bundler/gem_helper' +Bundler::GemHelper.install_tasks(dir: 'gem', name: 'pagy') module Bundler # :nodoc: all class GemHelper @@ -26,8 +20,10 @@ task :rubygem_release do branch = `git rev-parse --abbrev-ref HEAD` abort 'Wrong branch to release!' unless /^master/.match?(branch) - Rake::Task['manifest:check'].invoke + FileUtils.cp('LICENSE.txt', 'gem/LICENSE.txt') Rake::Task['build'].invoke + FileUtils.rm_f('gem/LICENSE.txt') + Rake::Task['release'].invoke - FileUtils.rm_rf('pkg', secure: true) + FileUtils.rm_rf('gem/pkg', secure: true) end From b6145446c0e9b4a0d172700b306379b88d4f9ace Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Fri, 5 Apr 2024 17:42:47 +0700 Subject: [PATCH 09/12] Update gems and node modules --- Gemfile.lock | 10 +- e2e/package.json | 12 +-- e2e/snapshots.js | 2 +- pnpm-lock.yaml | 232 ++++++++++++++++++++--------------------------- src/package.json | 6 +- 5 files changed, 114 insertions(+), 148 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4347ff999..9f6f494e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,7 +39,7 @@ GEM http-form_data (2.3.0) i18n (1.14.4) concurrent-ruby (~> 1.0) - json (2.7.1) + json (2.7.2) kalibera (0.1.2) memoist (~> 0.16) rbzip2 (~> 0.3) @@ -69,7 +69,7 @@ GEM parser (3.3.0.5) ast (~> 2.4.1) racc - public_suffix (5.0.4) + public_suffix (5.0.5) puma (6.4.2) nio4r (~> 2.0) racc (1.7.3) @@ -83,7 +83,7 @@ GEM rack (>= 3) webrick (~> 1.8) rainbow (3.1.1) - rake (13.1.0) + rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) @@ -113,9 +113,9 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) rubocop-packaging (0.5.2) rubocop (>= 1.33, < 2.0) - rubocop-performance (1.20.2) + rubocop-performance (1.21.0) rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) ruby-progressbar (1.13.0) diff --git a/e2e/package.json b/e2e/package.json index a179adf86..bb03ccd30 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -8,10 +8,10 @@ }, "devDependencies": { "@cypress/snapshot": "^2.1.7", - "@types/node": "20.11.30", - "@typescript-eslint/eslint-plugin": "7.4.0", - "@typescript-eslint/parser": "7.4.0", - "cypress": "13.7.1", + "@types/node": "20.12.4", + "@typescript-eslint/eslint-plugin": "7.5.0", + "@typescript-eslint/parser": "7.5.0", + "cypress": "13.7.2", "cypress-html-validate": "6.1.0", "eslint": "8.57.0", "eslint-plugin-align-assignments": "^1.1.2", @@ -19,9 +19,9 @@ "eslint-plugin-import": "2.29.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "6.1.1", - "html-validate": "8.18.0", + "html-validate": "8.18.1", "start-server-and-test": "2.0.3", - "typescript": "5.4.3" + "typescript": "5.4.4" }, "scripts": { "lint-fix": "eslint --fix cypress --ext .ts", diff --git a/e2e/snapshots.js b/e2e/snapshots.js index c17eaac9d..e0d87bb26 100644 --- a/e2e/snapshots.js +++ b/e2e/snapshots.js @@ -421,7 +421,7 @@ module.exports = { "10": "" } }, - "__version": "13.7.1", + "__version": "13.7.2", "Test all comboNavs for all styles": { "Test /bootstrap #combo-nav-js": { "1": "

    1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

    ", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39179a800..21fd2a5e4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,20 +18,20 @@ importers: specifier: ^2.1.7 version: 2.1.7 '@types/node': - specifier: 20.11.30 - version: 20.11.30 + specifier: 20.12.4 + version: 20.12.4 '@typescript-eslint/eslint-plugin': - specifier: 7.4.0 - version: 7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3) + specifier: 7.5.0 + version: 7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.4) '@typescript-eslint/parser': - specifier: 7.4.0 - version: 7.4.0(eslint@8.57.0)(typescript@5.4.3) + specifier: 7.5.0 + version: 7.5.0(eslint@8.57.0)(typescript@5.4.4) cypress: - specifier: 13.7.1 - version: 13.7.1 + specifier: 13.7.2 + version: 13.7.2 cypress-html-validate: specifier: 6.1.0 - version: 6.1.0(cypress@13.7.1)(html-validate@8.18.0) + version: 6.1.0(cypress@13.7.2)(html-validate@8.18.1) eslint: specifier: 8.57.0 version: 8.57.0 @@ -43,7 +43,7 @@ importers: version: 2.15.1(eslint@8.57.0) eslint-plugin-import: specifier: 2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.4.0)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.5.0)(eslint@8.57.0) eslint-plugin-node: specifier: ^11.1.0 version: 11.1.0(eslint@8.57.0) @@ -51,14 +51,14 @@ importers: specifier: 6.1.1 version: 6.1.1(eslint@8.57.0) html-validate: - specifier: 8.18.0 - version: 8.18.0 + specifier: 8.18.1 + version: 8.18.1 start-server-and-test: specifier: 2.0.3 version: 2.0.3 typescript: - specifier: 5.4.3 - version: 5.4.3 + specifier: 5.4.4 + version: 5.4.4 src: devDependencies: @@ -66,11 +66,11 @@ importers: specifier: 20.8.0 version: 20.8.0 '@typescript-eslint/eslint-plugin': - specifier: 7.4.0 - version: 7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3) + specifier: 7.5.0 + version: 7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.4) '@typescript-eslint/parser': - specifier: 7.4.0 - version: 7.4.0(eslint@8.57.0)(typescript@5.4.3) + specifier: 7.5.0 + version: 7.5.0(eslint@8.57.0)(typescript@5.4.4) eslint: specifier: 8.57.0 version: 8.57.0 @@ -79,7 +79,7 @@ importers: version: 1.1.2(eslint@8.57.0) eslint-plugin-import: specifier: 2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.4.0)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.5.0)(eslint@8.57.0) eslint-plugin-node: specifier: ^11.1.0 version: 11.1.0(eslint@8.57.0) @@ -88,13 +88,13 @@ importers: version: 6.1.1(eslint@8.57.0) parcel: specifier: 2.12.0 - version: 2.12.0(typescript@5.4.3) + version: 2.12.0(typescript@5.4.4) parcel-plugin-nuke-dist: specifier: ^1.0.1 version: 1.0.1 typescript: - specifier: 5.4.3 - version: 5.4.3 + specifier: 5.4.4 + version: 5.4.4 packages: @@ -103,14 +103,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@babel/code-frame@7.23.5: - resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.23.4 - chalk: 2.4.2 - dev: true - /@babel/code-frame@7.24.2: resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} engines: {node: '>=6.9.0'} @@ -124,15 +116,6 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/highlight@7.23.4: - resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.20 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - /@babel/highlight@7.24.2: resolution: {integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==} engines: {node: '>=6.9.0'} @@ -470,7 +453,7 @@ packages: - '@swc/helpers' dev: true - /@parcel/config-default@2.12.0(@parcel/core@2.12.0)(typescript@5.4.3): + /@parcel/config-default@2.12.0(@parcel/core@2.12.0)(typescript@5.4.4): resolution: {integrity: sha512-dPNe2n9eEsKRc1soWIY0yToMUPirPIa2QhxcCB3Z5RjpDGIXm0pds+BaiqY6uGLEEzsjhRO0ujd4v2Rmm0vuFg==} peerDependencies: '@parcel/core': ^2.12.0 @@ -480,7 +463,7 @@ packages: '@parcel/core': 2.12.0 '@parcel/namer-default': 2.12.0(@parcel/core@2.12.0) '@parcel/optimizer-css': 2.12.0(@parcel/core@2.12.0) - '@parcel/optimizer-htmlnano': 2.12.0(@parcel/core@2.12.0)(typescript@5.4.3) + '@parcel/optimizer-htmlnano': 2.12.0(@parcel/core@2.12.0)(typescript@5.4.4) '@parcel/optimizer-image': 2.12.0(@parcel/core@2.12.0) '@parcel/optimizer-svgo': 2.12.0(@parcel/core@2.12.0) '@parcel/optimizer-swc': 2.12.0(@parcel/core@2.12.0) @@ -646,12 +629,12 @@ packages: - '@swc/helpers' dev: true - /@parcel/optimizer-htmlnano@2.12.0(@parcel/core@2.12.0)(typescript@5.4.3): + /@parcel/optimizer-htmlnano@2.12.0(@parcel/core@2.12.0)(typescript@5.4.4): resolution: {integrity: sha512-MfPMeCrT8FYiOrpFHVR+NcZQlXAptK2r4nGJjfT+ndPBhEEZp4yyL7n1y7HfX9geg5altc4WTb4Gug7rCoW8VQ==} engines: {node: '>= 12.0.0', parcel: ^2.12.0} dependencies: '@parcel/plugin': 2.12.0(@parcel/core@2.12.0) - htmlnano: 2.1.0(svgo@2.8.0)(typescript@5.4.3) + htmlnano: 2.1.0(svgo@2.8.0)(typescript@5.4.4) nullthrows: 1.1.1 posthtml: 0.16.6 svgo: 2.8.0 @@ -1312,7 +1295,7 @@ packages: peerDependencies: ajv: 4.11.8 - 8 dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.2 ajv: 8.12.0 chalk: 4.1.2 dev: true @@ -1461,8 +1444,8 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/node@20.11.30: - resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==} + /@types/node@20.12.4: + resolution: {integrity: sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==} dependencies: undici-types: 5.26.5 dev: true @@ -1487,12 +1470,12 @@ packages: resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.4 dev: true optional: true - /@typescript-eslint/eslint-plugin@7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-yHMQ/oFaM7HZdVrVm/M2WHaNPgyuJH4WelkSVEWSSsir34kxW2kDJCxlXRhhGWEsMN0WAW/vLpKfKVcm8k+MPw==} + /@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.4): + resolution: {integrity: sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1503,25 +1486,25 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/scope-manager': 7.4.0 - '@typescript-eslint/type-utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/scope-manager': 7.5.0 + '@typescript-eslint/type-utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.3) - typescript: 5.4.3 + ts-api-utils: 1.3.0(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@7.4.0(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-ZvKHxHLusweEUVwrGRXXUVzFgnWhigo4JurEj0dGF1tbcGh6buL+ejDdjxOQxv6ytcY1uhun1p2sm8iWStlgLQ==} + /@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.4): + resolution: {integrity: sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1530,27 +1513,27 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.4.0 - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/scope-manager': 7.5.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) + '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 - typescript: 5.4.3 + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@7.4.0: - resolution: {integrity: sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==} + /@typescript-eslint/scope-manager@7.5.0: + resolution: {integrity: sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/visitor-keys': 7.5.0 dev: true - /@typescript-eslint/type-utils@7.4.0(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-247ETeHgr9WTRMqHbbQdzwzhuyaJ8dPTuyuUEMANqzMRB1rj/9qFIuIXK7l0FX9i9FXbHeBQl/4uz6mYuCE7Aw==} + /@typescript-eslint/type-utils@7.5.0(eslint@8.57.0)(typescript@5.4.4): + resolution: {integrity: sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1559,23 +1542,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) - '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) + '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 - ts-api-utils: 1.0.3(typescript@5.4.3) - typescript: 5.4.3 + ts-api-utils: 1.3.0(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@7.4.0: - resolution: {integrity: sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==} + /@typescript-eslint/types@7.5.0: + resolution: {integrity: sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==} engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/typescript-estree@7.4.0(typescript@5.4.3): - resolution: {integrity: sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==} + /@typescript-eslint/typescript-estree@7.5.0(typescript@5.4.4): + resolution: {integrity: sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1583,21 +1566,21 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.3) - typescript: 5.4.3 + ts-api-utils: 1.3.0(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@7.4.0(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==} + /@typescript-eslint/utils@7.5.0(eslint@8.57.0)(typescript@5.4.4): + resolution: {integrity: sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1605,21 +1588,21 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 7.4.0 - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) + '@typescript-eslint/scope-manager': 7.5.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) eslint: 8.57.0 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@7.4.0: - resolution: {integrity: sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==} + /@typescript-eslint/visitor-keys@7.5.0: + resolution: {integrity: sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.4.0 + '@typescript-eslint/types': 7.5.0 eslint-visitor-keys: 3.4.3 dev: true @@ -2156,7 +2139,7 @@ packages: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} dev: true - /cosmiconfig@8.3.6(typescript@5.4.3): + /cosmiconfig@8.3.6(typescript@5.4.4): resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} engines: {node: '>=14'} peerDependencies: @@ -2169,7 +2152,7 @@ packages: js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 - typescript: 5.4.3 + typescript: 5.4.4 dev: true /cross-spawn@7.0.3: @@ -2211,19 +2194,19 @@ packages: css-tree: 1.1.3 dev: true - /cypress-html-validate@6.1.0(cypress@13.7.1)(html-validate@8.18.0): + /cypress-html-validate@6.1.0(cypress@13.7.2)(html-validate@8.18.1): resolution: {integrity: sha512-IXVB1ZzdSHMzPM/QYZCXlG3yW2CdvSVY7bJtlijmk4kCRepfdHe0JLQ939h2Dj9ZsjyBockPQpun4omq1uRW6Q==} engines: {node: '>= 16'} peerDependencies: cypress: ^10 || ^11.0.1 || ^12 || ^13 html-validate: ^5 || ^6 || ^7 || ^8 dependencies: - cypress: 13.7.1 - html-validate: 8.18.0 + cypress: 13.7.2 + html-validate: 8.18.1 dev: true - /cypress@13.7.1: - resolution: {integrity: sha512-4u/rpFNxOFCoFX/Z5h+uwlkBO4mWzAjveURi3vqdSu56HPvVdyGTxGw4XKGWt399Y1JwIn9E1L9uMXQpc0o55w==} + /cypress@13.7.2: + resolution: {integrity: sha512-FF5hFI5wlRIHY8urLZjJjj/YvfCBrRpglbZCLr/cYcL9MdDe0+5usa8kTIrDHthlEc9lwihbkb5dmwqBDNS2yw==} engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} hasBin: true requiresBuild: true @@ -2265,7 +2248,7 @@ packages: process: 0.11.10 proxy-from-env: 1.0.0 request-progress: 3.0.0 - semver: 7.5.4 + semver: 7.6.0 supports-color: 8.1.1 tmp: 0.2.1 untildify: 4.0.0 @@ -2719,7 +2702,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.4.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.5.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} engines: {node: '>=4'} peerDependencies: @@ -2740,7 +2723,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.4) debug: 3.2.7(supports-color@8.1.1) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -2776,7 +2759,7 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.4.0)(eslint@8.57.0): + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.5.0)(eslint@8.57.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -2786,7 +2769,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.4) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -2795,7 +2778,7 @@ packages: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.4.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.5.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -3418,8 +3401,8 @@ packages: function-bind: 1.1.2 dev: true - /html-validate@8.18.0: - resolution: {integrity: sha512-y1fp/LxjDOIil+HzktSUIbi09YJdUqjEWYsWC6X8Pk1z9lePznHd7A/vQd9aB/5j2KmEsYpR1R9DNTF37C+28g==} + /html-validate@8.18.1: + resolution: {integrity: sha512-6NYRciFBQhVZH29fwDQxofPil0qm7MMSEDzDpZWu2U23Fnmv1WTuompP7fbzHYj6+CIJ4T/Q4hyWRCe0CCrsMg==} engines: {node: '>= 16.14'} hasBin: true peerDependencies: @@ -3437,7 +3420,7 @@ packages: vitest: optional: true dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.2 '@html-validate/stylish': 4.1.0 '@sidvind/better-ajv-errors': 2.1.3(ajv@8.12.0) ajv: 8.12.0 @@ -3447,10 +3430,10 @@ packages: kleur: 4.1.5 minimist: 1.2.8 prompts: 2.4.2 - semver: 7.5.4 + semver: 7.6.0 dev: true - /htmlnano@2.1.0(svgo@2.8.0)(typescript@5.4.3): + /htmlnano@2.1.0(svgo@2.8.0)(typescript@5.4.4): resolution: {integrity: sha512-jVGRE0Ep9byMBKEu0Vxgl8dhXYOUk0iNQ2pjsG+BcRB0u0oDF5A9p/iBGMg/PGKYUyMD0OAGu8dVT5Lzj8S58g==} peerDependencies: cssnano: ^6.0.0 @@ -3479,7 +3462,7 @@ packages: uncss: optional: true dependencies: - cosmiconfig: 8.3.6(typescript@5.4.3) + cosmiconfig: 8.3.6(typescript@5.4.4) posthtml: 0.16.6 svgo: 2.8.0 timsort: 0.3.0 @@ -4413,7 +4396,7 @@ packages: rimraf: 3.0.2 dev: true - /parcel@2.12.0(typescript@5.4.3): + /parcel@2.12.0(typescript@5.4.4): resolution: {integrity: sha512-W+gxAq7aQ9dJIg/XLKGcRT0cvnStFAQHPaI0pvD0U2l6IVLueUAm3nwN7lkY62zZNmlvNx6jNtE4wlbS+CyqSg==} engines: {node: '>= 12.0.0'} hasBin: true @@ -4421,7 +4404,7 @@ packages: '@parcel/core': optional: true dependencies: - '@parcel/config-default': 2.12.0(@parcel/core@2.12.0)(typescript@5.4.3) + '@parcel/config-default': 2.12.0(@parcel/core@2.12.0)(typescript@5.4.4) '@parcel/core': 2.12.0 '@parcel/diagnostic': 2.12.0 '@parcel/events': 2.12.0 @@ -4629,7 +4612,7 @@ packages: resolution: {integrity: sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==} engines: {node: '>=0.6'} dependencies: - side-channel: 1.0.4 + side-channel: 1.0.6 dev: true /querystringify@2.2.0: @@ -4806,14 +4789,6 @@ packages: hasBin: true dev: true - /semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: true - /semver@7.6.0: resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} engines: {node: '>=10'} @@ -5224,22 +5199,13 @@ packages: url-parse: 1.5.10 dev: true - /ts-api-utils@1.0.3(typescript@5.4.3): - resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} - engines: {node: '>=16.13.0'} - peerDependencies: - typescript: '>=4.2.0' - dependencies: - typescript: 5.4.3 - dev: true - - /ts-api-utils@1.3.0(typescript@5.4.3): + /ts-api-utils@1.3.0(typescript@5.4.4): resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.4.3 + typescript: 5.4.4 dev: true /tsconfig-paths@3.15.0: @@ -5368,8 +5334,8 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /typescript@5.4.3: - resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==} + /typescript@5.4.4: + resolution: {integrity: sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==} engines: {node: '>=14.17'} hasBin: true dev: true diff --git a/src/package.json b/src/package.json index e768a8079..35fd5315d 100644 --- a/src/package.json +++ b/src/package.json @@ -4,8 +4,8 @@ "private": true, "devDependencies": { "@types/node": "20.8.0", - "@typescript-eslint/eslint-plugin": "7.4.0", - "@typescript-eslint/parser": "7.4.0", + "@typescript-eslint/eslint-plugin": "7.5.0", + "@typescript-eslint/parser": "7.5.0", "eslint": "8.57.0", "eslint-plugin-align-assignments": "^1.1.2", "eslint-plugin-import": "2.29.1", @@ -13,7 +13,7 @@ "eslint-plugin-promise": "6.1.1", "parcel": "2.12.0", "parcel-plugin-nuke-dist": "^1.0.1", - "typescript": "5.4.3" + "typescript": "5.4.4" }, "browserslist": [ "defaults" From 5c203c654de675c26568b71937c43806e1e20c97 Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Fri, 5 Apr 2024 17:48:40 +0700 Subject: [PATCH 10/12] Minor change in rails app and RM run config --- .idea/runConfigurations/Rails.xml | 5 +---- gem/apps/rails.ru | 18 +++++++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.idea/runConfigurations/Rails.xml b/.idea/runConfigurations/Rails.xml index 7e3bf4978..6a07b1e36 100644 --- a/.idea/runConfigurations/Rails.xml +++ b/.idea/runConfigurations/Rails.xml @@ -6,9 +6,6 @@ - - - @@ -28,7 +25,7 @@ - + \ No newline at end of file diff --git a/gem/apps/rails.ru b/gem/apps/rails.ru index e5b209dfb..4a0049590 100644 --- a/gem/apps/rails.ru +++ b/gem/apps/rails.ru @@ -27,15 +27,6 @@ gemfile(true) do gem 'sqlite3' end -# Pagy initializer -require 'pagy/extras/pagy' -require 'pagy/extras/items' -require 'pagy/extras/overflow' -Pagy::DEFAULT[:size] = [1, 4, 4, 1] -Pagy::DEFAULT[:items] = 10 -Pagy::DEFAULT[:overflow] = :empty_page -Pagy::DEFAULT.freeze - # require 'rails/all' # too much stuff require 'action_controller/railtie' require 'active_record' @@ -64,6 +55,15 @@ unless File.writable?(dir) exit 1 end +# Pagy initializer +require 'pagy/extras/pagy' +require 'pagy/extras/items' +require 'pagy/extras/overflow' +Pagy::DEFAULT[:size] = [1, 4, 4, 1] +Pagy::DEFAULT[:items] = 10 +Pagy::DEFAULT[:overflow] = :empty_page +Pagy::DEFAULT.freeze + ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: "#{dir}/tmp/pagy-rails.sqlite3") ActiveRecord::Schema.define do create_table :posts, force: true do |t| From 58a44b12ca71074779cc41462b919214b3abcf09 Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Sat, 6 Apr 2024 15:32:02 +0700 Subject: [PATCH 11/12] Improve release content in version-bump.sh --- .github/latest_release_body.md | 9 ++++++++- scripts/version-bump.sh | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/latest_release_body.md b/.github/latest_release_body.md index 5fc692695..e23cd680f 100644 --- a/.github/latest_release_body.md +++ b/.github/latest_release_body.md @@ -9,4 +9,11 @@ If you wish to keep your favorites alive, please, [vote here](https://github.com - Better frontend helpers - New [Pagy Playground](https://ddnexus.github.io/pagy/playground/) to showcase, clone and develop pagy APPs without any setup on your side (try the [pagy demo](https://ddnexus.github.io/pagy/playground.md#3-demo-app)) -- See the [Changelog](https://ddnexus.github.io/pagy/changelog) for possible breaking changes +- See the [CHANGELOG](https://ddnexus.github.io/pagy/changelog) for possible breaking changes + +### Changes + + + + +[CHANGELOG](https://ddnexus.github.io/pagy/changelog) diff --git a/scripts/version-bump.sh b/scripts/version-bump.sh index 4f99f2424..92d231588 100755 --- a/scripts/version-bump.sh +++ b/scripts/version-bump.sh @@ -53,9 +53,13 @@ echo "$(git log --format="- %s%b" "$old_vers"..HEAD)" > "$TMPLOG" # Edit it read -p 'Edit and save the changelog content (enter)> ' nano "$TMPLOG" -# Set the release body file used by .github/workflows/create_release.yml + +# Insert the changes in the the release body file used by .github/workflows/create_release.yml # which is triggered by the :rubygem_release task (push tag) -cp -fv "$TMPLOG" "$ROOT/.github/latest_release_body.md" +lead='^$' +tail='^$' +sed -i "/$lead/,/$tail/{ /$lead/{p; r $TMPLOG + }; /$tail/p; d }" "$ROOT/.github/latest_release_body.md" # Update CHANGELOG changelog=$(cat <(echo -e "
    \n\n## Version $new_vers\n") "$TMPLOG") From 98cf69fc0439898a54602a92cdf3327f22202fc4 Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Sat, 6 Apr 2024 16:11:50 +0700 Subject: [PATCH 12/12] Version 8.0.2 --- .github/ISSUE_TEMPLATE/Code.yml | 2 +- .github/latest_release_body.md | 8 ++++++++ CHANGELOG.md | 11 +++++++++++ README.md | 2 +- gem/apps/calendar.ru | 2 +- gem/apps/demo.ru | 2 +- gem/apps/rails.ru | 2 +- gem/apps/repro.ru | 2 +- gem/bin/pagy | 2 +- gem/config/pagy.rb | 2 +- gem/javascripts/pagy-dev.js | 4 ++-- gem/javascripts/pagy-module.js | 2 +- gem/javascripts/pagy.js | 2 +- gem/lib/pagy.rb | 2 +- retype.yml | 2 +- src/pagy.ts | 2 +- 16 files changed, 34 insertions(+), 15 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Code.yml b/.github/ISSUE_TEMPLATE/Code.yml index 6b9a406ef..bd5e7c0ff 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.0.1 + - label: I upgraded to pagy version 8.0.2 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 e23cd680f..a7de6819e 100644 --- a/.github/latest_release_body.md +++ b/.github/latest_release_body.md @@ -14,6 +14,14 @@ If you wish to keep your favorites alive, please, [vote here](https://github.com ### Changes +- Minor change in rails app and RM run config +- Fix canonical gem root: + - Correct script.build: "NODE_PATH=\"$(bundle show 'pagy')/javascripts\" + - Move pagy.gemspec inside the gem root dir +- Fix for Turbo not intercepting changes in window.location +- Use require_relative for gem/lib files +- Complete translation of aria.nav for "ru" locale (close #599) +- Docs improvement and fixes [CHANGELOG](https://ddnexus.github.io/pagy/changelog) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae6ee8c83..ec023372d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,17 @@ If you upgrade from version `< 8.0.0` see the following: None
    +## Version 8.0.2 + +- Minor change in rails app and RM run config +- Fix canonical gem root: + - Correct script.build: "NODE_PATH="$(bundle show 'pagy')/javascripts" + - Move pagy.gemspec inside the gem root dir +- Fix for Turbo not intercepting changes in window.location +- Use require_relative for gem/lib files +- Complete translation of aria.nav for "ru" locale (close #599) +- Docs improvement and fixes + ## Version 8.0.1 - Reorganize the gem root dir: it was the lib dir (containing everything), now is the gem dir (containing lib and everything diff --git a/README.md b/README.md index 2f8f4317e..5a8e18863 100644 --- a/README.md +++ b/README.md @@ -371,7 +371,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/workgena)[](https://github.com/bquorning)[](https://github.com/molfar)[](https://github.com/sunny)[](https://github.com/enzinia)[](https://github.com/espen)[](https://github.com/Earlopain)[](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/simonneutert)[](https://github.com/rainerborene)[](https://github.com/petergoldstein)[](https://github.com/sabljak)[](https://github.com/cseelus)[](https://github.com/ashmaroli)[](https://github.com/747)[](https://github.com/WilliamHorel)[](https://github.com/okuramasafumi)[](https://github.com/olleolleolle)[](https://github.com/pedrocarmona)[](https://github.com/rafaeelaudibert)[](https://github.com/rafaelmontas)[](https://github.com/yenshirak)[](https://github.com/Tolchi)[](https://github.com/serghost)[](https://github.com/sliminas)[](https://github.com/artplan1)[](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/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/fluser)[](https://github.com/tulak)[](https://github.com/Federico-G)[](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/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/andrew)[](https://github.com/AliOsm)[](https://github.com/AbelToy)[](https://github.com/maful)[](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/whithajess) +[](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/simonneutert)[](https://github.com/rainerborene)[](https://github.com/petergoldstein)[](https://github.com/sabljak)[](https://github.com/cseelus)[](https://github.com/ashmaroli)[](https://github.com/747)[](https://github.com/WilliamHorel)[](https://github.com/okuramasafumi)[](https://github.com/olleolleolle)[](https://github.com/pedrocarmona)[](https://github.com/rafaeelaudibert)[](https://github.com/rafaelmontas)[](https://github.com/yenshirak)[](https://github.com/Tolchi)[](https://github.com/serghost)[](https://github.com/sliminas)[](https://github.com/artplan1)[](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/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/fluser)[](https://github.com/tulak)[](https://github.com/Federico-G)[](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/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/andrew)[](https://github.com/AliOsm)[](https://github.com/AbelToy)[](https://github.com/maful)[](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/whithajess)
    diff --git a/gem/apps/calendar.ru b/gem/apps/calendar.ru index f82a585d9..909f7bbd7 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.0.1' +VERSION = '8.0.2' require 'bundler/inline' gemfile(true) do diff --git a/gem/apps/demo.ru b/gem/apps/demo.ru index 394775264..b8f636230 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.0.1' +VERSION = '8.0.2' require 'bundler/inline' gemfile(true) do diff --git a/gem/apps/rails.ru b/gem/apps/rails.ru index 4a0049590..50debd6b6 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.0.1' +VERSION = '8.0.2' # Gemfile require 'bundler/inline' diff --git a/gem/apps/repro.ru b/gem/apps/repro.ru index d1919c0d1..d5ee91529 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.0.1' +VERSION = '8.0.2' require 'bundler/inline' gemfile(true) do diff --git a/gem/bin/pagy b/gem/bin/pagy index 2a1c93a4c..ce2216cce 100755 --- a/gem/bin/pagy +++ b/gem/bin/pagy @@ -1,7 +1,7 @@ #!/usr/bin/env ruby # frozen_string_literal: true -VERSION = '8.0.1' +VERSION = '8.0.2' APPS = %w[repro rails demo calendar].freeze require_relative '../lib/optimist' diff --git a/gem/config/pagy.rb b/gem/config/pagy.rb index b5f009db5..0ad70d0dc 100644 --- a/gem/config/pagy.rb +++ b/gem/config/pagy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Pagy initializer file (8.0.1) +# Pagy initializer file (8.0.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/gem/javascripts/pagy-dev.js b/gem/javascripts/pagy-dev.js index 089a7eb74..dadfd4398 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.0.1", + version: "8.0.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 = (() => { } }; })(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lbnMuYmVmb3JlOyAgLy8gYWxyZWFkeSB0cmltbWVkIGluIGh0bWxcbiAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IHNlcXVlbHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGxldCBmaWxsZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IGZpbGxJbih0b2tlbnMuYSwgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IHRva2Vucy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgZmlsbGVkID0gZmlsbEluKHRva2Vucy5jdXJyZW50LCBpdGVtLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGh0bWwgKz0gKHR5cGVvZiB0cmltUGFyYW0gPT09IFwic3RyaW5nXCIgJiYgaXRlbSA9PSAxKSA/IHRyaW0oZmlsbGVkLCB0cmltUGFyYW0pIDogZmlsbGVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaHRtbCArPSB0b2tlbnMuYWZ0ZXI7ICAgLy8gZXNsaW50LWRpc2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ICAgIC8vIFNjYW4gZm9yIGVsZW1lbnRzIHdpdGggYSBcImRhdGEtcGFneVwiIGF0dHJpYnV0ZSBhbmQgY2FsbCB0aGVpciBpbml0IGZ1bmN0aW9ucyB3aXRoIHRoZSBkZWNvZGVkIGFyZ3NcbiAgICAgICAgaW5pdChhcmc/OkVsZW1lbnQgfCBuZXZlcikge1xuICAgICAgICAgICAgY29uc3QgdGFyZ2V0ID0gYXJnIGluc3RhbmNlb2YgRWxlbWVudCA/IGFyZyA6IGRvY3VtZW50O1xuICAgICAgICAgICAgY29uc3QgZWxlbWVudHMgPSB0YXJnZXQucXVlcnlTZWxlY3RvckFsbChcIltkYXRhLXBhZ3ldXCIpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBlbCBvZiBlbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHVpbnQ4YXJyYXkgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWtCQSxNQUFNLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRTtJQUNmLDRDQUE0QztJQUM1QyxNQUFNLFdBQVcsR0FBRyxJQUFJLGNBQWMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUNOLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FDM0UsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFeEUsNEJBQTRCO0lBQz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3KSkuc29ydCgoYSwgYikgPT4gYiAtIGEpO1xuICAgICAgICBsZXQgbGFzdFdpZHRoID0gLTE7XG4gICAgICAgIGNvbnN0IGZpbGxJbiA9IChhOnN0cmluZywgcGFnZTpzdHJpbmcsIGxhYmVsOnN0cmluZyk6c3RyaW5nID0+XG4gICAgICAgICAgICBhLnJlcGxhY2UoL19fcGFneV9wYWdlX18vZywgcGFnZSkucmVwbGFjZSgvX19wYWd5X2xhYmVsX18vZywgbGFiZWwpO1xuICAgICAgICAoZWwucGFneVJlbmRlciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGNvbnN0IHdpZHRoID0gd2lkdGhzLmZpbmQodyA9PiB3IDwgY29udGFpbmVyLmNsaWVudFdpZHRoKSB8fCAwO1xuICAgICAgICAgICAgaWYgKHdpZHRoID09PSBsYXN0V2lkdGgpIHsgcmV0dXJuIH0gLy8gbm8gY2hhbmdlOiBhYm9ydFxuICAgICAgICAgICAgbGV0IGh0bWwgPSB0b2tlbnMuYmVmb3JlOyAgLy8gYWxyZWFkeSB0cmltbWVkIGluIGh0bWxcbiAgICAgICAgICAgIGNvbnN0IHNlcmllcyA9IHNlcXVlbHNbd2lkdGgudG9TdHJpbmcoKV07XG4gICAgICAgICAgICBjb25zdCBsYWJlbHMgPSBsYWJlbFNlcXVlbHM/Llt3aWR0aC50b1N0cmluZygpXSA/PyBzZXJpZXMubWFwKGwgPT4gbC50b1N0cmluZygpKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgaSBpbiBzZXJpZXMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGxldCBmaWxsZWQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IGZpbGxJbih0b2tlbnMuYSwgaXRlbS50b1N0cmluZygpLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtID09PSBcImdhcFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGxlZCA9IHRva2Vucy5nYXA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHsgLy8gYWN0aXZlIHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgZmlsbGVkID0gZmlsbEluKHRva2Vucy5jdXJyZW50LCBpdGVtLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGh0bWwgKz0gKHR5cGVvZiB0cmltUGFyYW0gPT09IFwic3RyaW5nXCIgJiYgaXRlbSA9PSAxKSA/IHRyaW0oZmlsbGVkLCB0cmltUGFyYW0pIDogZmlsbGVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaHRtbCArPSB0b2tlbnMuYWZ0ZXI7ICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBhbGlnbi1hc3NpZ25tZW50cy9hbGlnbi1hc3NpZ25tZW50c1xuICAgICAgICAgICAgZWwuaW5uZXJIVE1MID0gXCJcIjtcbiAgICAgICAgICAgIGVsLmluc2VydEFkamFjZW50SFRNTChcImFmdGVyYmVnaW5cIiwgaHRtbCk7XG4gICAgICAgICAgICBsYXN0V2lkdGggPSB3aWR0aDtcbiAgICAgICAgfSkoKTtcbiAgICAgICAgaWYgKGVsLmNsYXNzTGlzdC5jb250YWlucyhcInBhZ3ktcmpzXCIpKSB7IHJqc09ic2VydmVyLm9ic2VydmUoY29udGFpbmVyKSB9XG4gICAgfTtcblxuICAgIC8vIEluaXQgdGhlICpfY29tYm9fbmF2X2pzIGhlbHBlcnNcbiAgICBjb25zdCBpbml0Q29tYm8gPSAoZWw6RWxlbWVudCwgW3VybF90b2tlbiwgdHJpbVBhcmFtXTpDb21ib0FyZ3MpID0+XG4gICAgICAgIGluaXRJbnB1dChlbCwgaW5wdXR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ZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ== \ No newline at end of file diff --git a/gem/javascripts/pagy-module.js b/gem/javascripts/pagy-module.js index 686d00c70..8e6e3b939 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.0.1", + version: "8.0.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/gem/javascripts/pagy.js b/gem/javascripts/pagy.js index d28c1b158..082a02238 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.0.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,...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.0.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,...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 6a53aaf52..9155a94a2 100644 --- a/gem/lib/pagy.rb +++ b/gem/lib/pagy.rb @@ -5,7 +5,7 @@ # Core class class Pagy - VERSION = '8.0.1' + VERSION = '8.0.2' # Gem root pathname to get the path of Pagy files stylesheets, javascripts, apps, locales, etc. def self.root diff --git a/retype.yml b/retype.yml index a0f9826de..a48ed2fd0 100644 --- a/retype.yml +++ b/retype.yml @@ -8,7 +8,7 @@ url: https://ddnexus.github.io/pagy branding: title: Pagy - label: 8.0.1 + label: 8.0.2 colors: label: text: "#FFFFFF" diff --git a/src/pagy.ts b/src/pagy.ts index f90ce3e93..5db65732d 100644 --- a/src/pagy.ts +++ b/src/pagy.ts @@ -98,7 +98,7 @@ const Pagy = (() => { // Public interface return { - version: "8.0.1", + version: "8.0.2", // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args init(arg?:Element | never) {