pagy 43.0.7 → 43.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/apps/calendar.ru +1 -1
  3. data/apps/demo.ru +3 -3
  4. data/apps/keynav+root_key.ru +321 -0
  5. data/apps/keynav.ru +3 -1
  6. data/apps/keyset.ru +1 -1
  7. data/apps/keyset_sequel.ru +1 -1
  8. data/apps/rails.ru +1 -1
  9. data/apps/repro.ru +4 -4
  10. data/bin/pagy +1 -1
  11. data/config/pagy.rb +1 -1
  12. data/javascripts/ai_widget.js +1 -1
  13. data/javascripts/pagy.js +11 -10
  14. data/javascripts/pagy.js.map +3 -3
  15. data/javascripts/pagy.min.js +1 -1
  16. data/javascripts/pagy.mjs +10 -9
  17. data/lib/pagy/classes/exceptions.rb +0 -8
  18. data/lib/pagy/classes/keyset/keynav.rb +2 -1
  19. data/lib/pagy/classes/offset/countless.rb +18 -13
  20. data/lib/pagy/classes/request.rb +14 -15
  21. data/lib/pagy/modules/abilities/linkable.rb +12 -15
  22. data/lib/pagy/modules/abilities/rangeable.rb +3 -2
  23. data/lib/pagy/modules/console.rb +2 -16
  24. data/lib/pagy/modules/searcher.rb +5 -7
  25. data/lib/pagy/toolbox/helpers/support/a_lambda.rb +1 -1
  26. data/lib/pagy/toolbox/paginators/calendar.rb +0 -1
  27. data/lib/pagy/toolbox/paginators/countless.rb +10 -15
  28. data/lib/pagy/toolbox/paginators/elasticsearch_rails.rb +16 -19
  29. data/lib/pagy/toolbox/paginators/keynav_js.rb +13 -16
  30. data/lib/pagy/toolbox/paginators/keyset.rb +6 -9
  31. data/lib/pagy/toolbox/paginators/meilisearch.rb +16 -19
  32. data/lib/pagy/toolbox/paginators/method.rb +10 -3
  33. data/lib/pagy/toolbox/paginators/offset.rb +7 -10
  34. data/lib/pagy/toolbox/paginators/searchkick.rb +16 -19
  35. data/lib/pagy.rb +6 -4
  36. data/locales/id.yml +1 -3
  37. data/locales/ja.yml +1 -3
  38. data/locales/km.yml +1 -3
  39. data/locales/sw.yml +2 -2
  40. metadata +2 -1
data/lib/pagy.rb CHANGED
@@ -8,11 +8,13 @@ require_relative 'pagy/toolbox/helpers/loader'
8
8
 
9
9
  # Top superclass: it defines only what's common to all the subclasses
10
10
  class Pagy
11
- VERSION = '43.0.7'
11
+ class RawQueryValue < String; end
12
+
13
+ VERSION = '43.1.4'
12
14
  ROOT = Pathname.new(__dir__).parent.freeze
13
15
  DEFAULT = { limit: 20, limit_key: 'limit', page_key: 'page' }.freeze
14
- PAGE_TOKEN = 'P '
15
- LIMIT_TOKEN = 'L '
16
+ PAGE_TOKEN = RawQueryValue.new('P ')
17
+ LIMIT_TOKEN = RawQueryValue.new('L ')
16
18
  LABEL_TOKEN = 'L'
17
19
  A_TAG = '<a style="display: none;">#</a>'
18
20
 
@@ -46,7 +48,7 @@ class Pagy
46
48
  def keyset? = false
47
49
  def keynav? = false
48
50
 
49
- # Validates and assign the passed options: var must be present and value.to_i must be >= to min
51
+ # Validates and assign the passed options: they must be present and value.to_i must be >= min
50
52
  def assign_and_check(name_min)
51
53
  name_min.each do |name, min|
52
54
  raise OptionError.new(self, name, ">= #{min}", @options[name]) \
data/locales/id.yml CHANGED
@@ -4,9 +4,7 @@ id:
4
4
  pagy:
5
5
  p11n: 'Other'
6
6
  aria_label:
7
- # please add a comment in the https://github.com/ddnexus/pagy/issues/588
8
- # posting the translation of the following "Page"/"Pages" with the plurals for this locale
9
- nav: "Pages"
7
+ nav: "Halaman"
10
8
  previous: "Sebelumnya"
11
9
  next: "Selanjutnya"
12
10
  previous: "&lt;"
data/locales/ja.yml CHANGED
@@ -4,9 +4,7 @@ ja:
4
4
  pagy:
5
5
  p11n: 'Other'
6
6
  aria_label:
7
- # please add a comment in the https://github.com/ddnexus/pagy/issues/590
8
- # posting the translation of the following "Page"/"Pages" with the plurals for this locale
9
- nav: "Pages"
7
+ nav: "ページ"
10
8
  previous: "前へ"
11
9
  next: "次へ"
12
10
  previous: "&lt;"
data/locales/km.yml CHANGED
@@ -4,9 +4,7 @@ km:
4
4
  pagy:
5
5
  p11n: 'Other'
6
6
  aria_label:
7
- # please add a comment in the https://github.com/ddnexus/pagy/issues/591
8
- # posting the translation of the following "Page"/"Pages" with the plurals for this locale
9
- nav: "Pages"
7
+ nav: "ទំព័រ"
10
8
  previous: "មុន"
11
9
  next: "បន្ទាប់"
12
10
  previous: "&lt;"
data/locales/sw.yml CHANGED
@@ -9,8 +9,8 @@ sw:
9
9
  # after you make these changes.
10
10
  aria_label:
11
11
  nav:
12
- one: "Page"
13
- other: "Pages"
12
+ one: "Ukurasa"
13
+ other: "Kurasa"
14
14
  previous: "Awali"
15
15
  next: "Ifuatayo"
16
16
  previous: "&lt;"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 43.0.7
4
+ version: 43.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
@@ -49,6 +49,7 @@ files:
49
49
  - apps/calendar.ru
50
50
  - apps/demo.ru
51
51
  - apps/index.rb
52
+ - apps/keynav+root_key.ru
52
53
  - apps/keynav.ru
53
54
  - apps/keyset.ru
54
55
  - apps/keyset_sequel.ru