pagy 6.0.0 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 445ffb4fc0af5e397872edbaddd6ecee7e3815243b367000c70beb7a344ea95c
4
- data.tar.gz: a968e0aa93a07c5ab101499284851be9080907f80435ac1e4d3e223e271e14eb
3
+ metadata.gz: f2818be884b2b743e37a7699f944a116b538425ef29cde947b89730dc36350c3
4
+ data.tar.gz: dacc83de59f0b472d33f297f54e0cd6469e617f744f80613b91f2522dd0df801
5
5
  SHA512:
6
- metadata.gz: f16a561a6b5bec95ea89de6c23d114e3f01deddfb67689c54d8a5d469e9ddc40bae870daa4dcc433e68ebe4609d14cc53106da36a25e7077bdbeb098ecc350a8
7
- data.tar.gz: dc4af89758e166dfac07d8dc0484a801e05c6dec15684c2957b8a943301999fd56ddff80459a7ceccfdf95707ec19f334c9c08297678431f5aee8ce09bc0da64
6
+ metadata.gz: 1139594a7c6d8ac72a562d841ca6a477356174e2dbf1a4d93cc74d507d0f445f6d1461c63a131edfa78a1bc3dac0ff2f6f2740d6e02b08ff214a0529112c3a16
7
+ data.tar.gz: 1dc6f90dc4d07d24ab34e0686ead290609c1a27883c891ab2fa6ab8831acb45fcdbab5905dc5dfcb65fc938e3458de6dc29cdd25af4909b9c9496dbc09446753
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017-2022 Domizio Demichelis
3
+ Copyright (c) 2017-2023 Domizio Demichelis
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/lib/config/pagy.rb CHANGED
@@ -1,25 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (6.0.0)
3
+ # Pagy initializer file (6.0.1)
4
4
  # Customize only what you really need and notice that the core Pagy works also without any of the following lines.
5
5
  # Should you just cherry pick part of this file, please maintain the require-order of the extras
6
6
 
7
7
 
8
8
  # Pagy DEFAULT Variables
9
- # See https://ddnexus.github.io/pagy/api/pagy#variables
9
+ # See https://ddnexus.github.io/pagy/docs/api/pagy#variables
10
10
  # All the Pagy::DEFAULT are set for all the Pagy instances but can be overridden per instance by just passing them to
11
11
  # Pagy.new|Pagy::Countless.new|Pagy::Calendar::*.new or any of the #pagy* controller methods
12
12
 
13
13
 
14
14
  # Instance variables
15
- # See https://ddnexus.github.io/pagy/api/pagy#instance-variables
15
+ # See https://ddnexus.github.io/pagy/docs/api/pagy#instance-variables
16
16
  # Pagy::DEFAULT[:page] = 1 # default
17
17
  # Pagy::DEFAULT[:items] = 20 # default
18
18
  # Pagy::DEFAULT[:outset] = 0 # default
19
19
 
20
20
 
21
21
  # Other Variables
22
- # See https://ddnexus.github.io/pagy/api/pagy#other-variables
22
+ # See https://ddnexus.github.io/pagy/docs/api/pagy#other-variables
23
23
  # Pagy::DEFAULT[:size] = [1,4,4,1] # default
24
24
  # Pagy::DEFAULT[:page_param] = :page # default
25
25
  # The :params can be also set as a lambda e.g ->(params){ params.exclude('useless').merge!('custom' => 'useful') }
@@ -32,17 +32,17 @@
32
32
 
33
33
 
34
34
  # Extras
35
- # See https://ddnexus.github.io/pagy/extras
35
+ # See https://ddnexus.github.io/pagy/docs/extras
36
36
 
37
37
 
38
38
  # Backend Extras
39
39
 
40
40
  # Array extra: Paginate arrays efficiently, avoiding expensive array-wrapping and without overriding
41
- # See https://ddnexus.github.io/pagy/extras/array
41
+ # See https://ddnexus.github.io/pagy/docs/extras/array
42
42
  # require 'pagy/extras/array'
43
43
 
44
44
  # Calendar extra: Add pagination filtering by calendar time unit (year, quarter, month, week, day)
45
- # See https://ddnexus.github.io/pagy/extras/calendar
45
+ # See https://ddnexus.github.io/pagy/docs/extras/calendar
46
46
  # require 'pagy/extras/calendar'
47
47
  # Default for each unit
48
48
  # Pagy::Calendar::Year::DEFAULT[:order] = :asc # Time direction of pagination
@@ -69,12 +69,12 @@
69
69
  # Pagy::Calendar.prepend LocalizePagyCalendar
70
70
 
71
71
  # Countless extra: Paginate without any count, saving one query per rendering
72
- # See https://ddnexus.github.io/pagy/extras/countless
72
+ # See https://ddnexus.github.io/pagy/docs/extras/countless
73
73
  # require 'pagy/extras/countless'
74
74
  # Pagy::DEFAULT[:countless_minimal] = false # default (eager loading)
75
75
 
76
76
  # Elasticsearch Rails extra: Paginate `ElasticsearchRails::Results` objects
77
- # See https://ddnexus.github.io/pagy/extras/elasticsearch_rails
77
+ # See https://ddnexus.github.io/pagy/docs/extras/elasticsearch_rails
78
78
  # Default :pagy_search method: change only if you use also
79
79
  # the searchkick or meilisearch extra that defines the same
80
80
  # Pagy::DEFAULT[:elasticsearch_rails_pagy_search] = :pagy_search
@@ -91,7 +91,7 @@
91
91
  # pages: 'Total-Pages' } # default
92
92
 
93
93
  # Meilisearch extra: Paginate `Meilisearch` result objects
94
- # See https://ddnexus.github.io/pagy/extras/meilisearch
94
+ # See https://ddnexus.github.io/pagy/docs/extras/meilisearch
95
95
  # Default :pagy_search method: change only if you use also
96
96
  # the elasticsearch_rails or searchkick extra that define the same method
97
97
  # Pagy::DEFAULT[:meilisearch_pagy_search] = :pagy_search
@@ -100,7 +100,7 @@
100
100
  # require 'pagy/extras/meilisearch'
101
101
 
102
102
  # Metadata extra: Provides the pagination metadata to Javascript frameworks like Vue.js, react.js, etc.
103
- # See https://ddnexus.github.io/pagy/extras/metadata
103
+ # See https://ddnexus.github.io/pagy/docs/extras/metadata
104
104
  # you must require the frontend helpers internal extra (BEFORE the metadata extra) ONLY if you need also the :sequels
105
105
  # require 'pagy/extras/frontend_helpers'
106
106
  # require 'pagy/extras/metadata'
@@ -108,7 +108,7 @@
108
108
  # Pagy::DEFAULT[:metadata] = %i[scaffold_url page prev next last] # example
109
109
 
110
110
  # Searchkick extra: Paginate `Searchkick::Results` objects
111
- # See https://ddnexus.github.io/pagy/extras/searchkick
111
+ # See https://ddnexus.github.io/pagy/docs/extras/searchkick
112
112
  # Default :pagy_search method: change only if you use also
113
113
  # the elasticsearch_rails or meilisearch extra that defines the same
114
114
  # DEFAULT[:searchkick_pagy_search] = :pagy_search
@@ -122,51 +122,51 @@
122
122
  # Frontend Extras
123
123
 
124
124
  # Bootstrap extra: Add nav, nav_js and combo_nav_js helpers and templates for Bootstrap pagination
125
- # See https://ddnexus.github.io/pagy/extras/bootstrap
125
+ # See https://ddnexus.github.io/pagy/docs/extras/bootstrap
126
126
  # require 'pagy/extras/bootstrap'
127
127
 
128
128
  # Bulma extra: Add nav, nav_js and combo_nav_js helpers and templates for Bulma pagination
129
- # See https://ddnexus.github.io/pagy/extras/bulma
129
+ # See https://ddnexus.github.io/pagy/docs/extras/bulma
130
130
  # require 'pagy/extras/bulma'
131
131
 
132
132
  # Foundation extra: Add nav, nav_js and combo_nav_js helpers and templates for Foundation pagination
133
- # See https://ddnexus.github.io/pagy/extras/foundation
133
+ # See https://ddnexus.github.io/pagy/docs/extras/foundation
134
134
  # require 'pagy/extras/foundation'
135
135
 
136
136
  # Materialize extra: Add nav, nav_js and combo_nav_js helpers for Materialize pagination
137
- # See https://ddnexus.github.io/pagy/extras/materialize
137
+ # See https://ddnexus.github.io/pagy/docs/extras/materialize
138
138
  # require 'pagy/extras/materialize'
139
139
 
140
140
  # Navs extra: Add nav_js and combo_nav_js javascript helpers
141
141
  # Notice: the other frontend extras add their own framework-styled versions,
142
142
  # so require this extra only if you need the unstyled version
143
- # See https://ddnexus.github.io/pagy/extras/navs
143
+ # See https://ddnexus.github.io/pagy/docs/extras/navs
144
144
  # require 'pagy/extras/navs'
145
145
 
146
146
  # Semantic extra: Add nav, nav_js and combo_nav_js helpers for Semantic UI pagination
147
- # See https://ddnexus.github.io/pagy/extras/semantic
147
+ # See https://ddnexus.github.io/pagy/docs/extras/semantic
148
148
  # require 'pagy/extras/semantic'
149
149
 
150
150
  # UIkit extra: Add nav helper and templates for UIkit pagination
151
- # See https://ddnexus.github.io/pagy/extras/uikit
151
+ # See https://ddnexus.github.io/pagy/docs/extras/uikit
152
152
  # require 'pagy/extras/uikit'
153
153
 
154
154
  # Multi size var used by the *_nav_js helpers
155
- # See https://ddnexus.github.io/pagy/extras/navs#steps
155
+ # See https://ddnexus.github.io/pagy/docs/extras/navs#steps
156
156
  # Pagy::DEFAULT[:steps] = { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] } # example
157
157
 
158
158
 
159
159
  # Feature Extras
160
160
 
161
161
  # Gearbox extra: Automatically change the number of items per page depending on the page number
162
- # See https://ddnexus.github.io/pagy/extras/gearbox
162
+ # See https://ddnexus.github.io/pagy/docs/extras/gearbox
163
163
  # require 'pagy/extras/gearbox'
164
164
  # set to false only if you want to make :gearbox_extra an opt-in variable
165
165
  # Pagy::DEFAULT[:gearbox_extra] = false # default true
166
166
  # Pagy::DEFAULT[:gearbox_items] = [15, 30, 60, 100] # default
167
167
 
168
168
  # Items extra: Allow the client to request a custom number of items per page with an optional selector UI
169
- # See https://ddnexus.github.io/pagy/extras/items
169
+ # See https://ddnexus.github.io/pagy/docs/extras/items
170
170
  # require 'pagy/extras/items'
171
171
  # set to false only if you want to make :items_extra an opt-in variable
172
172
  # Pagy::DEFAULT[:items_extra] = false # default true
@@ -174,22 +174,22 @@
174
174
  # Pagy::DEFAULT[:max_items] = 100 # default
175
175
 
176
176
  # Overflow extra: Allow for easy handling of overflowing pages
177
- # See https://ddnexus.github.io/pagy/extras/overflow
177
+ # See https://ddnexus.github.io/pagy/docs/extras/overflow
178
178
  # require 'pagy/extras/overflow'
179
179
  # Pagy::DEFAULT[:overflow] = :empty_page # default (other options: :last_page and :exception)
180
180
 
181
181
  # Support extra: Extra support for features like: incremental, infinite, auto-scroll pagination
182
- # See https://ddnexus.github.io/pagy/extras/support
182
+ # See https://ddnexus.github.io/pagy/docs/extras/support
183
183
  # require 'pagy/extras/support'
184
184
 
185
185
  # Trim extra: Remove the page=1 param from links
186
- # See https://ddnexus.github.io/pagy/extras/trim
186
+ # See https://ddnexus.github.io/pagy/docs/extras/trim
187
187
  # require 'pagy/extras/trim'
188
188
  # set to false only if you want to make :trim_extra an opt-in variable
189
189
  # Pagy::DEFAULT[:trim_extra] = false # default true
190
190
 
191
191
  # Standalone extra: Use pagy in non Rack environment/gem
192
- # See https://ddnexus.github.io/pagy/extras/standalone
192
+ # See https://ddnexus.github.io/pagy/docs/extras/standalone
193
193
  # require 'pagy/extras/standalone'
194
194
  # Pagy::DEFAULT[:url] = 'http://www.example.com/subdir' # optional default
195
195
 
@@ -197,7 +197,7 @@
197
197
  # Rails
198
198
  # Enable the .js file required by the helpers that use javascript
199
199
  # (pagy*_nav_js, pagy*_combo_nav_js, and pagy_items_selector_js)
200
- # See https://ddnexus.github.io/pagy/extras#javascript
200
+ # See https://ddnexus.github.io/pagy/docs/extras#javascript
201
201
 
202
202
  # With the asset pipeline
203
203
  # Sprockets need to look into the pagy javascripts dir, so add it to the assets paths
@@ -206,7 +206,7 @@
206
206
  # I18n
207
207
 
208
208
  # Pagy internal I18n: ~18x faster using ~10x less memory than the i18n gem
209
- # See https://ddnexus.github.io/pagy/api/frontend#i18n
209
+ # See https://ddnexus.github.io/pagy/docs/api/frontend#i18n
210
210
  # Notice: No need to configure anything in this section if your app uses only "en"
211
211
  # or if you use the i18n extra below
212
212
  #
@@ -235,7 +235,7 @@
235
235
 
236
236
  # I18n extra: uses the standard i18n gem which is ~18x slower using ~10x more memory
237
237
  # than the default pagy internal i18n (see above)
238
- # See https://ddnexus.github.io/pagy/extras/i18n
238
+ # See https://ddnexus.github.io/pagy/docs/extras/i18n
239
239
  # require 'pagy/extras/i18n'
240
240
 
241
241
  # Default i18n key
@@ -82,7 +82,7 @@ window.Pagy = (() => {
82
82
  const trim = (link, param) => link.replace(new RegExp(`(\\?|&)${param}=1\\b(?!&)|\\b${param}=1&`), "");
83
83
  // Public interface
84
84
  return {
85
- version: "6.0.0",
85
+ version: "6.0.1",
86
86
  // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
87
87
  init(arg) {
88
88
  const target = arg instanceof Element ? arg : document;
@@ -111,4 +111,4 @@ window.Pagy = (() => {
111
111
  }
112
112
  };
113
113
  })();
114
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWNBLE1BQU0sSUFBSSxHQUFHLENBQUMsR0FBRyxFQUFFO0lBQ2YsNENBQTRDO0lBQzVDLE1BQU0sV0FBVyxHQUFHLElBQUksY0FBYyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQzdDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxVQUFVLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUU3Ryw0QkFBNEI7SUFDNUIsTUFBTSxPQUFPLEdBQUcsQ0FBQyxFQUFhLEVBQUUsQ0FBQyxJQUFJLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBRSxTQUFTLENBQVMsRUFBRSxFQUFFO1FBQ2hGLE1BQU0sU0FBUyxHQUFHLEVBQUUsQ0FBQyxhQUFhLElBQUksRUFBRSxDQUFDO1FBQ3pDLE1BQU0sTUFBTSxHQUFNLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFD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RvU3RyaW5nKCkpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpIGluIHNlcmllcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJpbVBhcmFtID09PSBcInN0cmluZ1wiICYmIGl0ZW0gPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0cmltKGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpLCB0cmltUGFyYW0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGl0ZW0gPT09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0gPT09IFwiZ2FwXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0YWdzLmdhcDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgeyAvLyBhY3RpdmUgcGFnZVxuICAgICAgICAgICAgICAgICAgICBodG1sICs9IGZpbGxJbih0YWdzLmFjdGl2ZSwgaXRlbSwgbGFiZWwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGh0bWwgKz0gdGFncy5hZnRlcjsgICAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIGFsaWduLWFzc2lnbm1lbnRzL2FsaWduLWFzc2lnbm1lbnRzXG4gICAgICAgICAgICBlbC5pbm5lckhUTUwgPSBcIlwiO1xuICAgICAgICAgICAgZWwuaW5zZXJ0QWRqYWNlbnRIVE1MKFwiYWZ0ZXJiZWdpblwiLCBodG1sKTtcbiAgICAgICAgICAgIGxhc3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ldmVyKSB7XG4gICAgICAgICAgICBjb25zdCB0YXJnZXQgICA9IGFyZyBpbnN0YW5jZW9mIEVsZW1lbnQgPyBhcmcgOiBkb2N1bWVudDtcbiAgICAgICAgICAgIGNvbnN0IGVsZW1lbnRzID0gdGFyZ2V0LnF1ZXJ5U2VsZWN0b3JBbGwoXCJbZGF0YS1wYWd5XVwiKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgZWwgb2YgZWxlbWVudHMpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB1aW50OGFycmF5ICAgICAgICAgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgIC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dFdpZHRoKSB7IHJldHVybiB9IC8vIG5vIGNoYW5nZTogYWJvcnRcbiAgICAgICAgICAgIGxldCBodG1sICAgICA9IHRhZ3MuYmVmb3JlO1xuICAgICAgICAgICAgY29uc3Qgc2VyaWVzID0gc2VxdWVsc1t3aWR0aC50b1N0cmluZygpXTtcbiAgICAgICAgICAgIGNvbnN0IGxhYmVscyA9IGxhYmVsU2VxdWVscz8uW3dpZHRoLnRvU3RyaW5nKCldID8/IHNlcmllcy5tYXAobCA9PiBsLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpIGluIHNlcmllcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJpbVBhcmFtID09PSBcInN0cmluZ1wiICYmIGl0ZW0gPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0cmltKGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpLCB0cmltUGFyYW0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGl0ZW0gPT09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0gPT09IFwiZ2FwXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0YWdzLmdhcDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgeyAvLyBhY3RpdmUgcGFnZVxuICAgICAgICAgICAgICAgICAgICBodG1sICs9IGZpbGxJbih0YWdzLmFjdGl2ZSwgaXRlbSwgbGFiZWwpO1xuICAgICAgICAgICAgICAgIH1cbiAg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gaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
@@ -81,7 +81,7 @@ const Pagy = (() => {
81
81
  const trim = (link, param) => link.replace(new RegExp(`(\\?|&)${param}=1\\b(?!&)|\\b${param}=1&`), "");
82
82
  // Public interface
83
83
  return {
84
- version: "6.0.0",
84
+ version: "6.0.1",
85
85
  // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
86
86
  init(arg) {
87
87
  const target = arg instanceof Element ? arg : document;
@@ -1 +1 @@
1
- !function(){var e=(()=>{const e=new ResizeObserver((e=>e.forEach((e=>e.target.querySelectorAll(".pagy-rjs").forEach((e=>e.pagyRender())))))),t=(t,[n,r,a,c])=>{const i=t.parentElement??t,s=Object.keys(r).map((e=>parseInt(e))).sort(((e,t)=>t-e));let p=-1;const l=(e,t,n)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,n);(t.pagyRender=function(){const e=s.find((e=>e<i.clientWidth))||0;if(e===p)return;let g=n.before;const y=r[e.toString()],f=a?.[e.toString()]??y.map((e=>e.toString()));for(const e in y){const t=y[e],r=f[e];g+="string"==typeof c&&1===t?o(l(n.link,t.toString(),r),c):"number"==typeof t?l(n.link,t.toString(),r):"gap"===t?n.gap:l(n.active,t,r)}g+=n.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),p=e})(),t.classList.contains("pagy-rjs")&&e.observe(i)},n=(e,[t,n])=>a(e,(e=>[e,t.replace(/__pagy_page__/,e)]),n),r=(e,[t,n,r])=>{a(e,(e=>{const r=Math.max(Math.ceil(t/parseInt(e)),1).toString();return[r,n.replace(/__pagy_page__/,r).replace(/__pagy_items__/,e)]}),r)},a=(e,t,n)=>{const r=e.querySelector("input"),a=r.value,c=function(){if(r.value===a)return;const[c,i,s]=[r.min,r.value,r.max].map((e=>parseInt(e)||0));if(i<c||i>s)return r.value=a,void r.select();let[p,l]=t(r.value);"string"==typeof n&&"1"===p&&(l=o(l,n)),e.insertAdjacentHTML("afterbegin",l),e.querySelector("a").click()};["change","focus"].forEach((e=>r.addEventListener(e,r.select))),r.addEventListener("focusout",c),r.addEventListener("keypress",(e=>{"Enter"===e.key&&c()}))},o=(e,t)=>e.replace(new RegExp(`(\\?|&amp;)${t}=1\\b(?!&amp;)|\\b${t}=1&amp;`),"");return{version:"6.0.0",init(e){const a=(e instanceof Element?e:document).querySelectorAll("[data-pagy]");for(const e of a)try{const a=Uint8Array.from(atob(e.getAttribute("data-pagy")),(e=>e.charCodeAt(0))),[o,...c]=JSON.parse((new TextDecoder).decode(a));"nav"===o?t(e,c):"combo"===o?n(e,c):"selector"===o?r(e,c):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",e,o)}catch(t){console.warn("Skipped Pagy.init() for: %o\n%s",e,t)}}}})();window.Pagy=e}();
1
+ !function(){var e=(()=>{const e=new ResizeObserver((e=>e.forEach((e=>e.target.querySelectorAll(".pagy-rjs").forEach((e=>e.pagyRender())))))),t=(t,[n,r,a,c])=>{const i=t.parentElement??t,s=Object.keys(r).map((e=>parseInt(e))).sort(((e,t)=>t-e));let p=-1;const l=(e,t,n)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,n);(t.pagyRender=function(){const e=s.find((e=>e<i.clientWidth))||0;if(e===p)return;let g=n.before;const y=r[e.toString()],f=a?.[e.toString()]??y.map((e=>e.toString()));for(const e in y){const t=y[e],r=f[e];g+="string"==typeof c&&1===t?o(l(n.link,t.toString(),r),c):"number"==typeof t?l(n.link,t.toString(),r):"gap"===t?n.gap:l(n.active,t,r)}g+=n.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),p=e})(),t.classList.contains("pagy-rjs")&&e.observe(i)},n=(e,[t,n])=>a(e,(e=>[e,t.replace(/__pagy_page__/,e)]),n),r=(e,[t,n,r])=>{a(e,(e=>{const r=Math.max(Math.ceil(t/parseInt(e)),1).toString();return[r,n.replace(/__pagy_page__/,r).replace(/__pagy_items__/,e)]}),r)},a=(e,t,n)=>{const r=e.querySelector("input"),a=r.value,c=function(){if(r.value===a)return;const[c,i,s]=[r.min,r.value,r.max].map((e=>parseInt(e)||0));if(i<c||i>s)return r.value=a,void r.select();let[p,l]=t(r.value);"string"==typeof n&&"1"===p&&(l=o(l,n)),e.insertAdjacentHTML("afterbegin",l),e.querySelector("a").click()};["change","focus"].forEach((e=>r.addEventListener(e,r.select))),r.addEventListener("focusout",c),r.addEventListener("keypress",(e=>{"Enter"===e.key&&c()}))},o=(e,t)=>e.replace(new RegExp(`(\\?|&amp;)${t}=1\\b(?!&amp;)|\\b${t}=1&amp;`),"");return{version:"6.0.1",init(e){const a=(e instanceof Element?e:document).querySelectorAll("[data-pagy]");for(const e of a)try{const a=Uint8Array.from(atob(e.getAttribute("data-pagy")),(e=>e.charCodeAt(0))),[o,...c]=JSON.parse((new TextDecoder).decode(a));"nav"===o?t(e,c):"combo"===o?n(e,c):"selector"===o?r(e,c):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",e,o)}catch(t){console.warn("Skipped Pagy.init() for: %o\n%s",e,t)}}}})();window.Pagy=e}();
data/lib/pagy/backend.rb CHANGED
@@ -1,4 +1,4 @@
1
- # See Pagy::Backend API documentation: https://ddnexus.github.io/pagy/api/backend
1
+ # See Pagy::Backend API documentation: https://ddnexus.github.io/pagy/docs/api/backend
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy
@@ -1,4 +1,4 @@
1
- # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/api/calendar
1
+ # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/docs/api/calendar
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/api/calendar
1
+ # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/docs/api/calendar
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/api/calendar
1
+ # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/docs/api/calendar
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/api/calendar
1
+ # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/docs/api/calendar
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/api/calendar
1
+ # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/docs/api/calendar
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
data/lib/pagy/calendar.rb CHANGED
@@ -1,4 +1,4 @@
1
- # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/api/calendar
1
+ # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/docs/api/calendar
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'active_support'
data/lib/pagy/console.rb CHANGED
@@ -1,4 +1,4 @@
1
- # See Pagy::Console API documentation: https://ddnexus.github.io/pagy/api/console
1
+ # See Pagy::Console API documentation: https://ddnexus.github.io/pagy/docs/api/console
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy' # so you can require just the extra in the console
@@ -1,4 +1,4 @@
1
- # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/api/countless
1
+ # See Pagy::Countless API documentation: https://ddnexus.github.io/pagy/docs/api/countless
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/arel
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/arel
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/array
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/array
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/bootstrap
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/bootstrap
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/extras/frontend_helpers'
@@ -51,7 +51,7 @@ class Pagy # :nodoc:
51
51
  p_page = pagy.page
52
52
  p_pages = pagy.pages
53
53
  input = %(<input type="number" min="1" max="#{p_pages}" value="#{
54
- p_page}" class="text-primary" style="padding: 0; border: none; text-align: center; width: #{
54
+ p_page}" style="padding: 0; border: none; text-align: center; width: #{
55
55
  p_pages.to_s.length + 1}rem;">)
56
56
 
57
57
  %(<nav#{p_id} class="pagy-bootstrap-combo-nav-js pagination"><div class="btn-group" role="group" #{
@@ -61,7 +61,7 @@ class Pagy # :nodoc:
61
61
  else
62
62
  %(<a class="prev btn btn-primary disabled" href="#">#{pagy_t('pagy.nav.prev')}</a>)
63
63
  end
64
- }<div class="pagy-combo-input btn btn-primary disabled" style="white-space: nowrap;">#{
64
+ }<div class="pagy-combo-input btn btn-secondary" style="white-space: nowrap;">#{
65
65
  pagy_t 'pagy.combo_nav_js', page_input: input, count: p_page, pages: p_pages}</div>#{
66
66
  if (p_next = pagy.next)
67
67
  link.call p_next, pagy_t('pagy.nav.next'), 'aria-label="next" class="next btn btn-primary"'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/bulma
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/bulma
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/extras/frontend_helpers'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/calendar
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/calendar
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/calendar'
@@ -35,13 +35,13 @@ class Pagy # :nodoc:
35
35
  # This method must be implemented by the application
36
36
  def pagy_calendar_period(*)
37
37
  raise NoMethodError, 'the pagy_calendar_period method must be implemented by the application ' \
38
- '(see https://ddnexus.github.io/pagy/extras/calendar#pagy_calendar_periodcollection)'
38
+ '(see https://ddnexus.github.io/pagy/docs/extras/calendar/#pagy-calendar-period-collection)'
39
39
  end
40
40
 
41
41
  # This method must be implemented by the application
42
42
  def pagy_calendar_filter(*)
43
43
  raise NoMethodError, 'the pagy_calendar_filter method must be implemented by the application ' \
44
- '(see https://ddnexus.github.io/pagy/extras/calendar#pagy_calendar_filtercollection-from-to)'
44
+ '(see https://ddnexus.github.io/pagy/docs/extras/calendar/#pagy-calendar-filter-collection-from-to)'
45
45
  end
46
46
  end
47
47
  end
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/countless
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/countless
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/countless'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/elasticsearch_rails
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/elasticsearch_rails
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/foundation
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/foundation
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/extras/frontend_helpers'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/gearbox
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/gearbox
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/headers
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/headers
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/url_helpers'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/i18n
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/i18n
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/items
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/items
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/extras/frontend_helpers'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/materialize
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/materialize
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/extras/frontend_helpers'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/metadata
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/metadata
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/url_helpers'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/navs
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/navs
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/extras/frontend_helpers'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/overflow
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/overflow
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -41,7 +41,7 @@ class Pagy # :nodoc:
41
41
 
42
42
  # Special series for empty page
43
43
  module Series
44
- def series(*)
44
+ def series(*, **)
45
45
  @page = @last # series for last page
46
46
  super.tap do |s| # call original series
47
47
  s[s.index(@page.to_s)] = @page # string to integer (i.e. no current page)
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/searchkick
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/searchkick
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/semantic
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/semantic
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/extras/frontend_helpers'
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/standalone
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/standalone
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'uri'
@@ -48,7 +48,7 @@ class Pagy # :nodoc:
48
48
  params[page_param] = page
49
49
  params[items_param] = vars[:items] if vars[:items_extra]
50
50
  params = pagy.params.call(params) if pagy.params.is_a?(Proc)
51
- query_string = "?#{Rack::Utils.build_nested_query(params)}"
51
+ query_string = "?#{QueryUtils.build_nested_query(params)}"
52
52
  query_string = query_string.gsub('&', '&amp;') if html_escaped # the only unescaped entity
53
53
  "#{vars[:url]}#{query_string}#{vars[:fragment]}"
54
54
  end
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/support
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/support
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/trim
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/trim
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Pagy # :nodoc:
@@ -1,4 +1,4 @@
1
- # See the Pagy documentation: https://ddnexus.github.io/pagy/extras/uikit
1
+ # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/uikit
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/extras/frontend_helpers'
data/lib/pagy/frontend.rb CHANGED
@@ -1,4 +1,4 @@
1
- # See Pagy::Frontend API documentation: https://ddnexus.github.io/pagy/api/frontend
1
+ # See Pagy::Frontend API documentation: https://ddnexus.github.io/pagy/docs/api/frontend
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pagy/url_helpers'
data/lib/pagy/i18n.rb CHANGED
@@ -1,4 +1,4 @@
1
- # See Pagy::I18n API documentation https://ddnexus.github.io/pagy/api/i18n
1
+ # See Pagy::I18n API documentation https://ddnexus.github.io/pagy/docs/api/i18n
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'yaml'
data/lib/pagy.rb CHANGED
@@ -1,11 +1,11 @@
1
- # See Pagy API documentation: https://ddnexus.github.io/pagy/api/pagy
1
+ # See Pagy API documentation: https://ddnexus.github.io/pagy/docs/api/pagy
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pathname'
5
5
 
6
6
  # Core class
7
7
  class Pagy
8
- VERSION = '6.0.0'
8
+ VERSION = '6.0.1'
9
9
 
10
10
  # Root pathname to get the path of Pagy files like templates or dictionaries
11
11
  def self.root
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-22 00:00:00.000000000 Z
11
+ date: 2023-01-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Agnostic pagination in plain ruby. It does it all. Better.
14
14
  email: