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.
- checksums.yaml +4 -4
- data/apps/calendar.ru +1 -1
- data/apps/demo.ru +3 -3
- data/apps/keynav+root_key.ru +321 -0
- data/apps/keynav.ru +3 -1
- data/apps/keyset.ru +1 -1
- data/apps/keyset_sequel.ru +1 -1
- data/apps/rails.ru +1 -1
- data/apps/repro.ru +4 -4
- data/bin/pagy +1 -1
- data/config/pagy.rb +1 -1
- data/javascripts/ai_widget.js +1 -1
- data/javascripts/pagy.js +11 -10
- data/javascripts/pagy.js.map +3 -3
- data/javascripts/pagy.min.js +1 -1
- data/javascripts/pagy.mjs +10 -9
- data/lib/pagy/classes/exceptions.rb +0 -8
- data/lib/pagy/classes/keyset/keynav.rb +2 -1
- data/lib/pagy/classes/offset/countless.rb +18 -13
- data/lib/pagy/classes/request.rb +14 -15
- data/lib/pagy/modules/abilities/linkable.rb +12 -15
- data/lib/pagy/modules/abilities/rangeable.rb +3 -2
- data/lib/pagy/modules/console.rb +2 -16
- data/lib/pagy/modules/searcher.rb +5 -7
- data/lib/pagy/toolbox/helpers/support/a_lambda.rb +1 -1
- data/lib/pagy/toolbox/paginators/calendar.rb +0 -1
- data/lib/pagy/toolbox/paginators/countless.rb +10 -15
- data/lib/pagy/toolbox/paginators/elasticsearch_rails.rb +16 -19
- data/lib/pagy/toolbox/paginators/keynav_js.rb +13 -16
- data/lib/pagy/toolbox/paginators/keyset.rb +6 -9
- data/lib/pagy/toolbox/paginators/meilisearch.rb +16 -19
- data/lib/pagy/toolbox/paginators/method.rb +10 -3
- data/lib/pagy/toolbox/paginators/offset.rb +7 -10
- data/lib/pagy/toolbox/paginators/searchkick.rb +16 -19
- data/lib/pagy.rb +6 -4
- data/locales/id.yml +1 -3
- data/locales/ja.yml +1 -3
- data/locales/km.yml +1 -3
- data/locales/sw.yml +2 -2
- 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
|
-
|
|
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:
|
|
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
|
-
|
|
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: "<"
|
data/locales/ja.yml
CHANGED
|
@@ -4,9 +4,7 @@ ja:
|
|
|
4
4
|
pagy:
|
|
5
5
|
p11n: 'Other'
|
|
6
6
|
aria_label:
|
|
7
|
-
|
|
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: "<"
|
data/locales/km.yml
CHANGED
|
@@ -4,9 +4,7 @@ km:
|
|
|
4
4
|
pagy:
|
|
5
5
|
p11n: 'Other'
|
|
6
6
|
aria_label:
|
|
7
|
-
|
|
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: "<"
|
data/locales/sw.yml
CHANGED
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.
|
|
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
|