pagy 3.8.2 → 9.4.0

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 (152) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/apps/calendar.ru +737 -0
  4. data/apps/demo.ru +449 -0
  5. data/apps/index.rb +7 -0
  6. data/apps/keyset_ar.ru +228 -0
  7. data/apps/keyset_s.ru +220 -0
  8. data/apps/rails.ru +217 -0
  9. data/apps/repro.ru +182 -0
  10. data/bin/pagy +98 -0
  11. data/config/pagy.rb +220 -0
  12. data/javascripts/pagy.d.ts +5 -0
  13. data/javascripts/pagy.min.js +4 -0
  14. data/javascripts/pagy.min.js.map +10 -0
  15. data/javascripts/pagy.mjs +100 -0
  16. data/lib/optimist.rb +1022 -0
  17. data/lib/pagy/b64.rb +33 -0
  18. data/lib/pagy/backend.rb +30 -19
  19. data/lib/pagy/calendar/day.rb +41 -0
  20. data/lib/pagy/calendar/month.rb +42 -0
  21. data/lib/pagy/calendar/quarter.rb +49 -0
  22. data/lib/pagy/calendar/unit.rb +103 -0
  23. data/lib/pagy/calendar/week.rb +39 -0
  24. data/lib/pagy/calendar/year.rb +35 -0
  25. data/lib/pagy/calendar.rb +84 -0
  26. data/lib/pagy/console.rb +23 -0
  27. data/lib/pagy/countless.rb +27 -22
  28. data/lib/pagy/exceptions.rb +16 -13
  29. data/lib/pagy/extras/arel.rb +11 -14
  30. data/lib/pagy/extras/array.rb +12 -16
  31. data/lib/pagy/extras/bootstrap.rb +83 -41
  32. data/lib/pagy/extras/bulma.rb +79 -46
  33. data/lib/pagy/extras/calendar.rb +79 -0
  34. data/lib/pagy/extras/countless.rb +20 -25
  35. data/lib/pagy/extras/elasticsearch_rails.rb +59 -38
  36. data/lib/pagy/extras/gearbox.rb +55 -0
  37. data/lib/pagy/extras/headers.rb +38 -23
  38. data/lib/pagy/extras/i18n.rb +19 -18
  39. data/lib/pagy/extras/js_tools.rb +70 -0
  40. data/lib/pagy/extras/jsonapi.rb +88 -0
  41. data/lib/pagy/extras/keyset.rb +30 -0
  42. data/lib/pagy/extras/limit.rb +63 -0
  43. data/lib/pagy/extras/meilisearch.rb +57 -0
  44. data/lib/pagy/extras/metadata.rb +32 -27
  45. data/lib/pagy/extras/overflow.rb +61 -53
  46. data/lib/pagy/extras/pagy.rb +82 -0
  47. data/lib/pagy/extras/searchkick.rb +52 -41
  48. data/lib/pagy/extras/size.rb +40 -0
  49. data/lib/pagy/extras/standalone.rb +60 -0
  50. data/lib/pagy/extras/trim.rb +19 -13
  51. data/lib/pagy/frontend.rb +76 -51
  52. data/lib/pagy/i18n.rb +167 -0
  53. data/lib/pagy/keyset/active_record.rb +44 -0
  54. data/lib/pagy/keyset/sequel.rb +57 -0
  55. data/lib/pagy/keyset.rb +118 -0
  56. data/lib/pagy/shared_methods.rb +26 -0
  57. data/lib/pagy/url_helpers.rb +26 -0
  58. data/lib/pagy.rb +91 -37
  59. data/locales/ar.yml +29 -0
  60. data/locales/be.yml +25 -0
  61. data/locales/bg.yml +21 -0
  62. data/locales/bs.yml +25 -0
  63. data/locales/ca.yml +21 -0
  64. data/locales/ckb.yml +18 -0
  65. data/locales/cs.yml +23 -0
  66. data/locales/da.yml +21 -0
  67. data/locales/de.yml +21 -0
  68. data/locales/dz.yml +17 -0
  69. data/locales/en.yml +21 -0
  70. data/{lib/locales → locales}/es.yml +11 -12
  71. data/locales/fr.yml +21 -0
  72. data/locales/hr.yml +25 -0
  73. data/locales/id.yml +19 -0
  74. data/locales/it.yml +21 -0
  75. data/locales/ja.yml +19 -0
  76. data/locales/km.yml +19 -0
  77. data/locales/ko.yml +17 -0
  78. data/locales/nb.yml +21 -0
  79. data/locales/nl.yml +21 -0
  80. data/locales/nn.yml +21 -0
  81. data/locales/pl.yml +25 -0
  82. data/{lib/locales → locales}/pt-BR.yml +11 -12
  83. data/locales/pt.yml +21 -0
  84. data/locales/ru.yml +25 -0
  85. data/locales/sk.yml +23 -0
  86. data/locales/sr.yml +25 -0
  87. data/locales/sv-SE.yml +21 -0
  88. data/locales/sv.yml +21 -0
  89. data/locales/sw.yml +25 -0
  90. data/locales/ta.yml +21 -0
  91. data/locales/tr.yml +19 -0
  92. data/locales/uk.yml +25 -0
  93. data/locales/vi.yml +17 -0
  94. data/locales/zh-CN.yml +17 -0
  95. data/locales/zh-HK.yml +17 -0
  96. data/locales/zh-TW.yml +17 -0
  97. data/stylesheets/pagy.css +46 -0
  98. data/stylesheets/pagy.scss +48 -0
  99. data/stylesheets/pagy.tailwind.css +21 -0
  100. metadata +95 -67
  101. data/lib/config/pagy.rb +0 -170
  102. data/lib/javascripts/pagy.js +0 -106
  103. data/lib/locales/README.md +0 -35
  104. data/lib/locales/bg.yml +0 -22
  105. data/lib/locales/ca.yml +0 -22
  106. data/lib/locales/da.yml +0 -22
  107. data/lib/locales/de.yml +0 -22
  108. data/lib/locales/en.yml +0 -22
  109. data/lib/locales/fr.yml +0 -22
  110. data/lib/locales/id.yml +0 -20
  111. data/lib/locales/it.yml +0 -22
  112. data/lib/locales/ja.yml +0 -20
  113. data/lib/locales/km.yml +0 -19
  114. data/lib/locales/ko.yml +0 -20
  115. data/lib/locales/nb.yml +0 -22
  116. data/lib/locales/nl.yml +0 -22
  117. data/lib/locales/pl.yml +0 -24
  118. data/lib/locales/ru.yml +0 -24
  119. data/lib/locales/sv-SE.yml +0 -23
  120. data/lib/locales/sv.yml +0 -23
  121. data/lib/locales/tr.yml +0 -20
  122. data/lib/locales/utils/i18n.rb +0 -25
  123. data/lib/locales/utils/loader.rb +0 -34
  124. data/lib/locales/utils/p11n.rb +0 -80
  125. data/lib/locales/zh-CN.yml +0 -20
  126. data/lib/locales/zh-HK.yml +0 -20
  127. data/lib/locales/zh-TW.yml +0 -20
  128. data/lib/pagy/extras/foundation.rb +0 -57
  129. data/lib/pagy/extras/items.rb +0 -65
  130. data/lib/pagy/extras/materialize.rb +0 -59
  131. data/lib/pagy/extras/navs.rb +0 -38
  132. data/lib/pagy/extras/pagy_search.rb +0 -18
  133. data/lib/pagy/extras/semantic.rb +0 -55
  134. data/lib/pagy/extras/shared.rb +0 -53
  135. data/lib/pagy/extras/support.rb +0 -29
  136. data/lib/pagy/extras/uikit.rb +0 -62
  137. data/lib/templates/bootstrap_nav.html.erb +0 -24
  138. data/lib/templates/bootstrap_nav.html.haml +0 -34
  139. data/lib/templates/bootstrap_nav.html.slim +0 -34
  140. data/lib/templates/bulma_nav.html.erb +0 -24
  141. data/lib/templates/bulma_nav.html.haml +0 -32
  142. data/lib/templates/bulma_nav.html.slim +0 -32
  143. data/lib/templates/foundation_nav.html.erb +0 -24
  144. data/lib/templates/foundation_nav.html.haml +0 -34
  145. data/lib/templates/foundation_nav.html.slim +0 -34
  146. data/lib/templates/nav.html.erb +0 -22
  147. data/lib/templates/nav.html.haml +0 -30
  148. data/lib/templates/nav.html.slim +0 -29
  149. data/lib/templates/uikit_nav.html.erb +0 -15
  150. data/lib/templates/uikit_nav.html.haml +0 -28
  151. data/lib/templates/uikit_nav.html.slim +0 -28
  152. data/pagy.gemspec +0 -16
data/locales/sw.yml ADDED
@@ -0,0 +1,25 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ sw:
3
+ pagy:
4
+ # please add a comment in the https://github.com/ddnexus/pagy/issues/603
5
+ # posting the translation of the following "Page"/"Pages" with the plurals for this locale
6
+ # Please change the final test in 18n_loacles_test.rb to remove the sw.yml exclusion
7
+ # after you make these changes.
8
+ aria_label:
9
+ nav: "Pages"
10
+ # one: ""
11
+ # other: ""
12
+ prev: "Awali"
13
+ next: "Ifuatayo"
14
+ prev: "<"
15
+ next: ">"
16
+ gap: "…"
17
+ item_name:
18
+ one: "kifaa"
19
+ other: "vifaa"
20
+ info:
21
+ no_items: "Hamna %{item_name} vilivyopatikana"
22
+ single_page: "Inaonyesha %{item_name} %{count}"
23
+ multiple_pages: "Inaonyesha %{item_name} %{from}-%{to} ya %{count} kwa jumla"
24
+ combo_nav_js: "Kurasa %{page_input} ya %{pages}"
25
+ limit_selector_js: "Onyesha %{limit_input} %{item_name} kwa kila ukurasa"
data/locales/ta.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ ta:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "பக்கம்"
7
+ other: "பக்கங்கள்"
8
+ prev: "முந்தையது"
9
+ next: "அடுத்தது"
10
+ prev: "<"
11
+ next: ">"
12
+ gap: "…"
13
+ item_name:
14
+ one: "பதிவு"
15
+ other: "பதிவுகள்"
16
+ info:
17
+ no_items: "%{item_name} கிடைக்கவில்லை"
18
+ single_page: "%{count} %{item_name} காட்டப்படுகின்றது"
19
+ multiple_pages: "மொத்தம் %{count} %{item_name}, காட்டப்படுபவை %{from}-%{to}"
20
+ combo_nav_js: "%{pages}-இல் %{page_input}-வது பக்கம்"
21
+ limit_selector_js: "ஒரு பக்கத்திற்கு %{limit_input} %{item_name} காட்டு"
data/locales/tr.yml ADDED
@@ -0,0 +1,19 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ tr:
3
+ pagy:
4
+ aria_label:
5
+ # please add a comment in the https://github.com/ddnexus/pagy/issues/605
6
+ # posting the translation of the following "Page"/"Pages" with the plurals for this locale
7
+ nav: "Pages"
8
+ prev: "Önceki"
9
+ next: "Sonraki"
10
+ prev: "<"
11
+ next: ">"
12
+ gap: "…"
13
+ item_name: "kayıt"
14
+ info:
15
+ no_items: "Hiç %{item_name} bulunamadı"
16
+ single_page: "Toplam %{count} %{item_name} gösteriliyor"
17
+ multiple_pages: "%{count} %{item_name} içerisinden %{from}-%{to} kadarı gösteriliyor"
18
+ combo_nav_js: "Sayfa %{page_input} / %{pages}"
19
+ limit_selector_js: "Sayfada %{limit_input} %{item_name} göster"
data/locales/uk.yml ADDED
@@ -0,0 +1,25 @@
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ uk:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Сторінка"
7
+ few: "Сторінки"
8
+ many: "Сторінок"
9
+ other: "Сторінки"
10
+ prev: "Назад"
11
+ next: "Далі"
12
+ prev: "<"
13
+ next: ">"
14
+ gap: "…"
15
+ item_name:
16
+ one: "запис"
17
+ few: "записів"
18
+ many: "записів"
19
+ other: "записів"
20
+ info:
21
+ no_items: "Більше %{item_name} немає"
22
+ single_page: "%{count} %{item_name}"
23
+ multiple_pages: "Загалом %{count} %{item_name}, показані з %{from} по %{to}"
24
+ combo_nav_js: "Сторінка %{page_input} з %{pages}"
25
+ limit_selector_js: "Показати %{limit_input} %{item_name} на сторінці"
data/locales/vi.yml ADDED
@@ -0,0 +1,17 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ vi:
3
+ pagy:
4
+ aria_label:
5
+ nav: "Trang"
6
+ prev: "Trang trước"
7
+ next: "Trang sau"
8
+ prev: "<"
9
+ next: ">"
10
+ gap: "…"
11
+ item_name: "kết quả"
12
+ info:
13
+ no_items: "Không tìm thấy %{item_name} nào"
14
+ single_page: "%{count} %{item_name}"
15
+ multiple_pages: "Đang hiển thị %{from}-%{to} trong tổng số %{count} %{item_name}"
16
+ combo_nav_js: "Trang %{page_input} trên %{pages}"
17
+ limit_selector_js: "Hiển thị %{limit_input} %{item_name} mỗi trang"
data/locales/zh-CN.yml ADDED
@@ -0,0 +1,17 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ zh-CN:
3
+ pagy:
4
+ aria_label:
5
+ nav: "页"
6
+ prev: "上一页"
7
+ next: "下一页"
8
+ prev: "<"
9
+ next: ">"
10
+ gap: "…"
11
+ item_name: "项"
12
+ info:
13
+ no_items: "未找到任何 %{item_name}"
14
+ single_page: "显示 %{count} 项 %{item_name}"
15
+ multiple_pages: "共 %{count} 项 %{item_name},显示第 %{from}-%{to} 项"
16
+ combo_nav_js: "第 %{page_input} 页,共 %{pages} 页"
17
+ limit_selector_js: "每页显示 %{limit_input} 项 %{item_name}"
data/locales/zh-HK.yml ADDED
@@ -0,0 +1,17 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ zh-HK:
3
+ pagy:
4
+ aria_label:
5
+ nav: "頁"
6
+ prev: "上一頁"
7
+ next: "下一頁"
8
+ prev: "<"
9
+ next: ">"
10
+ gap: "…"
11
+ item_name: "項"
12
+ info:
13
+ no_items: "搵唔到任何 %{item_name}"
14
+ single_page: "顯示 %{count} 項 %{item_name}"
15
+ multiple_pages: "總共 %{count} 項 %{item_name},顯示第 %{from} 至 %{to} 項"
16
+ combo_nav_js: "第 %{page_input} 頁,共 %{pages} 頁"
17
+ limit_selector_js: "每頁顯示 %{limit_input} 項 %{item_name}"
data/locales/zh-TW.yml ADDED
@@ -0,0 +1,17 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ zh-TW:
3
+ pagy:
4
+ aria_label:
5
+ nav: "頁"
6
+ prev: "上一頁"
7
+ next: "下一頁"
8
+ prev: "<"
9
+ next: ">"
10
+ gap: "…"
11
+ item_name: "項"
12
+ info:
13
+ no_items: "未找到任何 %{item_name}"
14
+ single_page: "顯示 %{count} 項 %{item_name}"
15
+ multiple_pages: "共 %{count} 項 %{item_name},顯示第 %{from} 至 %{to} 項"
16
+ combo_nav_js: "第 %{page_input} 頁,共 %{pages} 頁"
17
+ limit_selector_js: "每頁顯示 %{limit_input} 項 %{item_name}"
@@ -0,0 +1,46 @@
1
+ .pagy {
2
+ display: flex;
3
+ font-family: sans-serif;
4
+ font-size: 0.875rem;
5
+ line-height: 1.25rem;
6
+ font-weight: 600;
7
+ color: #6b7280;
8
+ }
9
+ .pagy > :not([hidden]) ~ :not([hidden]) {
10
+ --space-reverse: 0;
11
+ margin-right: calc(0.25rem * var(--space-reverse));
12
+ margin-left: calc(0.25rem * calc(1 - var(--space-reverse)));
13
+ }
14
+ .pagy a:not(.gap) {
15
+ display: block;
16
+ text-decoration: none;
17
+ border-radius: 0.5rem;
18
+ background-color: #e5e7eb;
19
+ padding: 0.25rem 0.75rem;
20
+ color: inherit;
21
+ }
22
+ .pagy a:not(.gap):hover {
23
+ background-color: #d1d5db;
24
+ }
25
+ .pagy a:not(.gap):not([href]) { /* disabled links */
26
+ cursor: default;
27
+ background-color: #f3f4f6;
28
+ color: #d1d5db;
29
+ }
30
+ .pagy a:not(.gap).current {
31
+ background-color: #9ca3af;
32
+ color: white;
33
+ }
34
+ .pagy label {
35
+ white-space: nowrap;
36
+ display: inline-block;
37
+ border-radius: 0.5rem;
38
+ background-color: #e5e7eb;
39
+ padding: 0.125rem 0.75rem;
40
+ }
41
+ .pagy label input {
42
+ line-height: 1.5rem;
43
+ border-radius: 0.375rem;
44
+ border-style: none;
45
+ background-color: #f3f4f6;
46
+ }
@@ -0,0 +1,48 @@
1
+ .pagy {
2
+ display: flex;
3
+ font-family: sans-serif;
4
+ font-size: 0.875rem;
5
+ line-height: 1.25rem;
6
+ font-weight: 600;
7
+ color: rgb(107 114 128);
8
+ & > :not([hidden]) ~ :not([hidden]) {
9
+ --space-reverse: 0;
10
+ margin-right: calc(0.25rem * var(--space-reverse));
11
+ margin-left: calc(0.25rem * calc(1 - var(--space-reverse)));
12
+ }
13
+
14
+ a:not(.gap) {
15
+ display: block;
16
+ text-decoration: none;
17
+ border-radius: 0.5rem;
18
+ background-color: rgb(229 231 235);
19
+ padding: 0.25rem 0.75rem;
20
+ color: inherit;
21
+ &:hover {
22
+ background-color: rgb(209 213 219);
23
+ }
24
+ &:not([href]) { /* disabled links */
25
+ cursor: default;
26
+ background-color: rgb(243 244 246);
27
+ color: rgb(209 213 219);
28
+ }
29
+ &.current {
30
+ background-color: rgb(156 163 175);
31
+ color: rgb(255 255 255);
32
+ }
33
+ }
34
+
35
+ label {
36
+ white-space: nowrap;
37
+ display: inline-block;
38
+ border-radius: 0.5rem;
39
+ background-color: rgb(229 231 235);
40
+ padding: 0.125rem 0.75rem;
41
+ input {
42
+ line-height: 1.5rem;
43
+ border-radius: 0.375rem;
44
+ border-style: none;
45
+ background-color: rgb(243 244 246);
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,21 @@
1
+ .pagy {
2
+ @apply flex space-x-1 font-semibold text-sm text-gray-500;
3
+ a:not(.gap) {
4
+ @apply block rounded-lg px-3 py-1 bg-gray-200;
5
+ &:hover {
6
+ @apply bg-gray-300;
7
+ }
8
+ &:not([href]) { /* disabled links */
9
+ @apply text-gray-300 bg-gray-100 cursor-default;
10
+ }
11
+ &.current {
12
+ @apply text-white bg-gray-400;
13
+ }
14
+ }
15
+ label {
16
+ @apply inline-block whitespace-nowrap bg-gray-200 rounded-lg px-3 py-0.5;
17
+ input {
18
+ @apply bg-gray-100 border-none rounded-md;
19
+ }
20
+ }
21
+ }
metadata CHANGED
@@ -1,101 +1,130 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.2
4
+ version: 9.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2020-06-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description: 'Agnostic pagination in plain ruby: it works with any framework, ORM
14
- and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays,
15
- JSON data... Easy, powerful, fast and light.'
12
+ description: Agnostic pagination in plain ruby. It does it all. Better.
16
13
  email:
17
14
  - dd.nexus@gmail.com
18
- executables: []
15
+ executables:
16
+ - pagy
19
17
  extensions: []
20
18
  extra_rdoc_files: []
21
19
  files:
22
20
  - LICENSE.txt
23
- - lib/config/pagy.rb
24
- - lib/javascripts/pagy.js
25
- - lib/locales/README.md
26
- - lib/locales/bg.yml
27
- - lib/locales/ca.yml
28
- - lib/locales/da.yml
29
- - lib/locales/de.yml
30
- - lib/locales/en.yml
31
- - lib/locales/es.yml
32
- - lib/locales/fr.yml
33
- - lib/locales/id.yml
34
- - lib/locales/it.yml
35
- - lib/locales/ja.yml
36
- - lib/locales/km.yml
37
- - lib/locales/ko.yml
38
- - lib/locales/nb.yml
39
- - lib/locales/nl.yml
40
- - lib/locales/pl.yml
41
- - lib/locales/pt-BR.yml
42
- - lib/locales/ru.yml
43
- - lib/locales/sv-SE.yml
44
- - lib/locales/sv.yml
45
- - lib/locales/tr.yml
46
- - lib/locales/utils/i18n.rb
47
- - lib/locales/utils/loader.rb
48
- - lib/locales/utils/p11n.rb
49
- - lib/locales/zh-CN.yml
50
- - lib/locales/zh-HK.yml
51
- - lib/locales/zh-TW.yml
21
+ - apps/calendar.ru
22
+ - apps/demo.ru
23
+ - apps/index.rb
24
+ - apps/keyset_ar.ru
25
+ - apps/keyset_s.ru
26
+ - apps/rails.ru
27
+ - apps/repro.ru
28
+ - bin/pagy
29
+ - config/pagy.rb
30
+ - javascripts/pagy.d.ts
31
+ - javascripts/pagy.min.js
32
+ - javascripts/pagy.min.js.map
33
+ - javascripts/pagy.mjs
34
+ - lib/optimist.rb
52
35
  - lib/pagy.rb
36
+ - lib/pagy/b64.rb
53
37
  - lib/pagy/backend.rb
38
+ - lib/pagy/calendar.rb
39
+ - lib/pagy/calendar/day.rb
40
+ - lib/pagy/calendar/month.rb
41
+ - lib/pagy/calendar/quarter.rb
42
+ - lib/pagy/calendar/unit.rb
43
+ - lib/pagy/calendar/week.rb
44
+ - lib/pagy/calendar/year.rb
45
+ - lib/pagy/console.rb
54
46
  - lib/pagy/countless.rb
55
47
  - lib/pagy/exceptions.rb
56
48
  - lib/pagy/extras/arel.rb
57
49
  - lib/pagy/extras/array.rb
58
50
  - lib/pagy/extras/bootstrap.rb
59
51
  - lib/pagy/extras/bulma.rb
52
+ - lib/pagy/extras/calendar.rb
60
53
  - lib/pagy/extras/countless.rb
61
54
  - lib/pagy/extras/elasticsearch_rails.rb
62
- - lib/pagy/extras/foundation.rb
55
+ - lib/pagy/extras/gearbox.rb
63
56
  - lib/pagy/extras/headers.rb
64
57
  - lib/pagy/extras/i18n.rb
65
- - lib/pagy/extras/items.rb
66
- - lib/pagy/extras/materialize.rb
58
+ - lib/pagy/extras/js_tools.rb
59
+ - lib/pagy/extras/jsonapi.rb
60
+ - lib/pagy/extras/keyset.rb
61
+ - lib/pagy/extras/limit.rb
62
+ - lib/pagy/extras/meilisearch.rb
67
63
  - lib/pagy/extras/metadata.rb
68
- - lib/pagy/extras/navs.rb
69
64
  - lib/pagy/extras/overflow.rb
70
- - lib/pagy/extras/pagy_search.rb
65
+ - lib/pagy/extras/pagy.rb
71
66
  - lib/pagy/extras/searchkick.rb
72
- - lib/pagy/extras/semantic.rb
73
- - lib/pagy/extras/shared.rb
74
- - lib/pagy/extras/support.rb
67
+ - lib/pagy/extras/size.rb
68
+ - lib/pagy/extras/standalone.rb
75
69
  - lib/pagy/extras/trim.rb
76
- - lib/pagy/extras/uikit.rb
77
70
  - lib/pagy/frontend.rb
78
- - lib/templates/bootstrap_nav.html.erb
79
- - lib/templates/bootstrap_nav.html.haml
80
- - lib/templates/bootstrap_nav.html.slim
81
- - lib/templates/bulma_nav.html.erb
82
- - lib/templates/bulma_nav.html.haml
83
- - lib/templates/bulma_nav.html.slim
84
- - lib/templates/foundation_nav.html.erb
85
- - lib/templates/foundation_nav.html.haml
86
- - lib/templates/foundation_nav.html.slim
87
- - lib/templates/nav.html.erb
88
- - lib/templates/nav.html.haml
89
- - lib/templates/nav.html.slim
90
- - lib/templates/uikit_nav.html.erb
91
- - lib/templates/uikit_nav.html.haml
92
- - lib/templates/uikit_nav.html.slim
93
- - pagy.gemspec
71
+ - lib/pagy/i18n.rb
72
+ - lib/pagy/keyset.rb
73
+ - lib/pagy/keyset/active_record.rb
74
+ - lib/pagy/keyset/sequel.rb
75
+ - lib/pagy/shared_methods.rb
76
+ - lib/pagy/url_helpers.rb
77
+ - locales/ar.yml
78
+ - locales/be.yml
79
+ - locales/bg.yml
80
+ - locales/bs.yml
81
+ - locales/ca.yml
82
+ - locales/ckb.yml
83
+ - locales/cs.yml
84
+ - locales/da.yml
85
+ - locales/de.yml
86
+ - locales/dz.yml
87
+ - locales/en.yml
88
+ - locales/es.yml
89
+ - locales/fr.yml
90
+ - locales/hr.yml
91
+ - locales/id.yml
92
+ - locales/it.yml
93
+ - locales/ja.yml
94
+ - locales/km.yml
95
+ - locales/ko.yml
96
+ - locales/nb.yml
97
+ - locales/nl.yml
98
+ - locales/nn.yml
99
+ - locales/pl.yml
100
+ - locales/pt-BR.yml
101
+ - locales/pt.yml
102
+ - locales/ru.yml
103
+ - locales/sk.yml
104
+ - locales/sr.yml
105
+ - locales/sv-SE.yml
106
+ - locales/sv.yml
107
+ - locales/sw.yml
108
+ - locales/ta.yml
109
+ - locales/tr.yml
110
+ - locales/uk.yml
111
+ - locales/vi.yml
112
+ - locales/zh-CN.yml
113
+ - locales/zh-HK.yml
114
+ - locales/zh-TW.yml
115
+ - stylesheets/pagy.css
116
+ - stylesheets/pagy.scss
117
+ - stylesheets/pagy.tailwind.css
94
118
  homepage: https://github.com/ddnexus/pagy
95
119
  licenses:
96
120
  - MIT
97
- metadata: {}
98
- post_install_message:
121
+ metadata:
122
+ rubygems_mfa_required: 'true'
123
+ homepage_uri: https://github.com/ddnexus/pagy
124
+ documentation_uri: https://ddnexus.github.io/pagy
125
+ bug_tracker_uri: https://github.com/ddnexus/pagy/issues
126
+ changelog_uri: https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md
127
+ support: https://github.com/ddnexus/pagy/discussions/categories/q-a
99
128
  rdoc_options: []
100
129
  require_paths:
101
130
  - lib
@@ -103,15 +132,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
132
  requirements:
104
133
  - - ">="
105
134
  - !ruby/object:Gem::Version
106
- version: '1.9'
135
+ version: '3.1'
107
136
  required_rubygems_version: !ruby/object:Gem::Requirement
108
137
  requirements:
109
138
  - - ">="
110
139
  - !ruby/object:Gem::Version
111
140
  version: '0'
112
141
  requirements: []
113
- rubygems_version: 3.1.2
114
- signing_key:
142
+ rubygems_version: 3.6.7
115
143
  specification_version: 4
116
- summary: The Ultimate Pagination Ruby Gem
144
+ summary: The best pagination ruby gem
117
145
  test_files: []
data/lib/config/pagy.rb DELETED
@@ -1,170 +0,0 @@
1
- # encoding: utf-8
2
- # frozen_string_literal: true
3
-
4
- # Pagy initializer file (3.8.2)
5
- # Customize only what you really need and notice that Pagy works also without any of the following lines.
6
- # Should you just cherry pick part of this file, please maintain the require-order of the extras
7
-
8
-
9
- # Extras
10
- # See https://ddnexus.github.io/pagy/extras
11
-
12
-
13
- # Backend Extras
14
-
15
- # Array extra: Paginate arrays efficiently, avoiding expensive array-wrapping and without overriding
16
- # See https://ddnexus.github.io/pagy/extras/array
17
- # require 'pagy/extras/array'
18
-
19
- # Countless extra: Paginate without any count, saving one query per rendering
20
- # See https://ddnexus.github.io/pagy/extras/countless
21
- # require 'pagy/extras/countless'
22
- # Pagy::VARS[:cycle] = false # default
23
-
24
- # Elasticsearch Rails extra: Paginate `ElasticsearchRails::Results` objects
25
- # See https://ddnexus.github.io/pagy/extras/elasticsearch_rails
26
- # require 'pagy/extras/elasticsearch_rails'
27
-
28
- # Searchkick extra: Paginate `Searchkick::Results` objects
29
- # See https://ddnexus.github.io/pagy/extras/searchkick
30
- # require 'pagy/extras/searchkick'
31
-
32
-
33
- # Frontend Extras
34
-
35
- # Bootstrap extra: Add nav, nav_js and combo_nav_js helpers and templates for Bootstrap pagination
36
- # See https://ddnexus.github.io/pagy/extras/bootstrap
37
- # require 'pagy/extras/bootstrap'
38
-
39
- # Bulma extra: Add nav, nav_js and combo_nav_js helpers and templates for Bulma pagination
40
- # See https://ddnexus.github.io/pagy/extras/bulma
41
- # require 'pagy/extras/bulma'
42
-
43
- # Foundation extra: Add nav, nav_js and combo_nav_js helpers and templates for Foundation pagination
44
- # See https://ddnexus.github.io/pagy/extras/foundation
45
- # require 'pagy/extras/foundation'
46
-
47
- # Materialize extra: Add nav, nav_js and combo_nav_js helpers for Materialize pagination
48
- # See https://ddnexus.github.io/pagy/extras/materialize
49
- # require 'pagy/extras/materialize'
50
-
51
- # Navs extra: Add nav_js and combo_nav_js javascript helpers
52
- # Notice: the other frontend extras add their own framework-styled versions,
53
- # so require this extra only if you need the unstyled version
54
- # See https://ddnexus.github.io/pagy/extras/navs
55
- # require 'pagy/extras/navs'
56
-
57
- # Semantic extra: Add nav, nav_js and combo_nav_js helpers for Semantic UI pagination
58
- # See https://ddnexus.github.io/pagy/extras/semantic
59
- # require 'pagy/extras/semantic'
60
-
61
- # UIkit extra: Add nav helper and templates for UIkit pagination
62
- # See https://ddnexus.github.io/pagy/extras/uikit
63
- # require 'pagy/extras/uikit'
64
-
65
- # Multi size var used by the *_nav_js helpers
66
- # See https://ddnexus.github.io/pagy/extras/navs#steps
67
- # Pagy::VARS[:steps] = { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] } # example
68
-
69
-
70
- # Feature Extras
71
-
72
- # Headers extra: http response headers (and other helpers) useful for API pagination
73
- # See http://ddnexus.github.io/pagy/extras/headers
74
- # require 'pagy/extras/headers'
75
- # Pagy::VARS[:headers] = { page: 'Current-Page', items: 'Page-Items', count: 'Total-Count', pages: 'Total-Pages' } # default
76
-
77
- # Support extra: Extra support for features like: incremental, infinite, auto-scroll pagination
78
- # See https://ddnexus.github.io/pagy/extras/support
79
- # require 'pagy/extras/support'
80
-
81
- # Items extra: Allow the client to request a custom number of items per page with an optional selector UI
82
- # See https://ddnexus.github.io/pagy/extras/items
83
- # require 'pagy/extras/items'
84
- # Pagy::VARS[:items_param] = :items # default
85
- # Pagy::VARS[:max_items] = 100 # default
86
-
87
- # Overflow extra: Allow for easy handling of overflowing pages
88
- # See https://ddnexus.github.io/pagy/extras/overflow
89
- # require 'pagy/extras/overflow'
90
- # Pagy::VARS[:overflow] = :empty_page # default (other options: :last_page and :exception)
91
-
92
- # Metadata extra: Provides the pagination metadata to Javascript frameworks like Vue.js, react.js, etc.
93
- # See https://ddnexus.github.io/pagy/extras/metadata
94
- # you must require the shared internal extra (BEFORE the metadata extra) ONLY if you need also the :sequels
95
- # require 'pagy/extras/shared'
96
- # require 'pagy/extras/metadata'
97
- # For performance reason, you should explicitly set ONLY the metadata you use in the frontend
98
- # Pagy::VARS[:metadata] = [:scaffold_url, :count, :page, :prev, :next, :last] # example
99
-
100
- # Trim extra: Remove the page=1 param from links
101
- # See https://ddnexus.github.io/pagy/extras/trim
102
- # require 'pagy/extras/trim'
103
-
104
-
105
-
106
- # Pagy Variables
107
- # See https://ddnexus.github.io/pagy/api/pagy#variables
108
- # All the Pagy::VARS are set for all the Pagy instances but can be overridden
109
- # per instance by just passing them to Pagy.new or the #pagy controller method
110
-
111
-
112
- # Instance variables
113
- # See https://ddnexus.github.io/pagy/api/pagy#instance-variables
114
- # Pagy::VARS[:items] = 20 # default
115
-
116
-
117
- # Other Variables
118
- # See https://ddnexus.github.io/pagy/api/pagy#other-variables
119
- # Pagy::VARS[:size] = [1,4,4,1] # default
120
- # Pagy::VARS[:page_param] = :page # default
121
- # Pagy::VARS[:params] = {} # default
122
- # Pagy::VARS[:anchor] = '#anchor' # example
123
- # Pagy::VARS[:link_extra] = 'data-remote="true"' # example
124
-
125
-
126
- # Rails
127
-
128
- # Rails: extras assets path required by the helpers that use javascript
129
- # (pagy*_nav_js, pagy*_combo_nav_js, and pagy_items_selector_js)
130
- # See https://ddnexus.github.io/pagy/extras#javascript
131
- # Rails.application.config.assets.paths << Pagy.root.join('javascripts')
132
-
133
-
134
- # I18n
135
-
136
- # Pagy internal I18n: ~18x faster using ~10x less memory than the i18n gem
137
- # See https://ddnexus.github.io/pagy/api/frontend#i18n
138
- # Notice: No need to configure anything in this section if your app uses only "en"
139
- # or if you use the i18n extra below
140
- #
141
- # Examples:
142
- # load the "de" built-in locale:
143
- # Pagy::I18n.load(locale: 'de')
144
- #
145
- # load the "de" locale defined in the custom file at :filepath:
146
- # Pagy::I18n.load(locale: 'de', filepath: 'path/to/pagy-de.yml')
147
- #
148
- # load the "de", "en" and "es" built-in locales:
149
- # (the first passed :locale will be used also as the default_locale)
150
- # Pagy::I18n.load({locale: 'de'},
151
- # {locale: 'en'},
152
- # {locale: 'es'})
153
- #
154
- # load the "en" built-in locale, a custom "es" locale,
155
- # and a totally custom locale complete with a custom :pluralize proc:
156
- # (the first passed :locale will be used also as the default_locale)
157
- # Pagy::I18n.load({locale: 'en'},
158
- # {locale: 'es', filepath: 'path/to/pagy-es.yml'},
159
- # {locale: 'xyz', # not built-in
160
- # filepath: 'path/to/pagy-xyz.yml',
161
- # pluralize: lambda{|count| ... } )
162
-
163
-
164
- # I18n extra: uses the standard i18n gem which is ~18x slower using ~10x more memory
165
- # than the default pagy internal i18n (see above)
166
- # See https://ddnexus.github.io/pagy/extras/i18n
167
- # require 'pagy/extras/i18n'
168
-
169
- # Default i18n key
170
- # Pagy::VARS[:i18n_key] = 'pagy.item_name' # default