pagy 5.9.0 → 5.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/config/pagy.rb +8 -3
- data/lib/javascripts/pagy-dev.js +3 -3
- data/lib/javascripts/pagy-module.js +1 -1
- data/lib/javascripts/pagy.js +1 -1
- data/lib/pagy.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5285ddf98e2fe9b5d2709a5727de0602922527915576af03f71593ea9397bd0e
|
4
|
+
data.tar.gz: 29ba3c6a96f0991c3589d77b5ca33029e788873b51f9a4a9539cfac56056ee70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41443ab50cab3385683094f614ffdd6765ead63811f942aa19c16542af80a76d0546612cd1ea21f7f6636738ec9732bf6cc9483607d8cdf7516dedde99311cc2
|
7
|
+
data.tar.gz: 731103d69c985551f972c87a3b387b2ef544af23bf1250c40eeacf815d2f37e63f442125ef9a6b630bd30a9f765b15e23ac2d02895474262fcbefe997e5c9434
|
data/lib/config/pagy.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Pagy initializer file (5.9.
|
3
|
+
# Pagy initializer file (5.9.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
|
|
@@ -188,12 +188,17 @@
|
|
188
188
|
|
189
189
|
|
190
190
|
# Rails
|
191
|
-
|
192
|
-
# Rails: extras assets path required by the helpers that use javascript
|
191
|
+
# Enable the .js file required by the helpers that use javascript
|
193
192
|
# (pagy*_nav_js, pagy*_combo_nav_js, and pagy_items_selector_js)
|
194
193
|
# See https://ddnexus.github.io/pagy/extras#javascript
|
194
|
+
|
195
|
+
# With the asset pipeline
|
196
|
+
# Sprockets need to look into the pagy javascripts dir, so add it to the assets paths
|
195
197
|
# Rails.application.config.assets.paths << Pagy.root.join('javascripts')
|
196
198
|
|
199
|
+
# With jsbuilding-rails / esbuild
|
200
|
+
# Create/refresh a link in app/javascript/pagy pointing to the pagy.js (or pagy-module.js)
|
201
|
+
# FileUtils.ln_sf(Pagy.root.join('javascripts', 'pagy.js'), Rails.root.join('app', 'javascript'))
|
197
202
|
|
198
203
|
# I18n
|
199
204
|
|
data/lib/javascripts/pagy-dev.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
2
|
+
window.Pagy = (() => {
|
3
3
|
// The observer instance for responsive navs
|
4
4
|
const rjsObserver = new ResizeObserver(entries => entries.forEach(e => e.target.querySelectorAll(".pagy-rjs").forEach(el => el.pagyRender())));
|
5
5
|
// Init the *_nav_js helpers
|
@@ -82,7 +82,7 @@ const 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: "5.9.
|
85
|
+
version: "5.9.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 @@ const Pagy = (() => {
|
|
111
111
|
}
|
112
112
|
};
|
113
113
|
})();
|
114
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWNBLE1BQU0sSUFBSSxHQUFHLENBQUMsR0FBRyxFQUFFO0lBQ2YsNENBQTRDO0lBQzVDLE1BQU0sV0FBVyxHQUFHLElBQUksY0FBYyxDQUFDLE9BQU8sQ0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gICAgICBjb25zdCBmaWxsSW4gICAgPSAobGluazpzdHJpbmcsIHBhZ2U6c3RyaW5nLCBsYWJlbDpzdHJpbmcpOnN0cmluZyA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluay5yZXBsYWNlKC9fX3BhZ3lfcGFnZV9fL2csIHBhZ2UpLnJlcGxhY2UoL19fcGFneV9sYWJlbF9fL2csIGxhYmVsKTtcbiAgICAgICAgKGVsLnBhZ3lSZW5kZXIgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIGNvbnN0IHdpZHRoID0gd2lkdGhzLmZpbmQodyA9PiB3IDwgY29udGFpbmVyLmNsaWVudFdpZHRoKSB8fCAwO1xuICAgICAgICAgICAgaWYgKHdpZHRoID09PSBsYXN0V2lkdGgpIHsgcmV0dXJuIH0gLy8gbm8gY2hhbmdlOiBhYm9ydFxuICAgICAgICAgICAgbGV0IGh0bWwgICAgID0gdGFncy5iZWZvcmU7XG4gICAgICAgICAgICBjb25zdCBzZXJpZXMgPSBzZXF1ZWxzW3dpZHRoLnRvU3RyaW5nKCldO1xuICAgICAgICAgICAgY29uc3QgbGFiZWxzID0gbGFiZWxTZXF1ZWxzPy5bd2lkdGgudG9TdHJpbmcoKV0gPz8gc2VyaWVzLm1hcChsID0+IGwudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGkgaW4gc2VyaWVzKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgaXRlbSAgPSBzZXJpZXNbaV07XG4gICAgICAgICAgICAgICAgY29uc3QgbGFiZWwgPSBsYWJlbHNbaV07XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0cmltUGFyYW0gPT09IFwic3RyaW5nXCIgJiYgaXRlbSA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBodG1sICs9IHRyaW0oZmlsbEluKHRhZ3MubGluaywgaXRlbS50b1N0cmluZygpLCBsYWJlbCksIHRyaW1QYXJhbSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgaXRlbSA9PT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgICAgICBodG1sICs9IGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbSA9PT0gXCJnYXBcIikge1xuICAgICAgICAgICAgICAgICAgICBodG1sICs9IHRhZ3MuZ2FwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7IC8vIGFjdGl2ZSBwYWdlXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gZmlsbEluKHRhZ3MuYWN0aXZlLCBpdGVtLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaHRtbCArPSB0YWdzLmFmdGVyOyAgIC8vIGVzbGludC1kaXNhYmxlLWxpbmUgYWxpZ24tYXNzaWdubWVudHMvYWxpZ24tYXNzaWdubWVudHNcbiAgICAgICAgICAgIGVsLmlubmVySFRNTCA9IFwiXCI7XG4gICAgICAgICAgICBlbC5pbnNlcnRBZGphY2VudEhUTUwoXCJhZnRlcmJlZ2luXCIsIGh0bWwpO1xuICAgICAgICAgICAgbGFzdFdpZHRoID0gd2lkdGg7XG4gICAgICAgIH0pKCk7XG4gICAgICAgIGlmIChlbC5jbGFzc0xpc3QuY29udGFpbnMoXCJwYWd5LXJqc1wiKSkgeyByanNPYnNlcnZlci5vYnNlcnZlKGNvbnRhaW5lcikgfVxuICAgIH07XG5cbiAgICAvLyBJbml0IHRoZSAqX2NvbWJvX25hdl9qcyBoZWxwZXJzXG4gICAgY29uc3QgaW5pdENvbWJvID0gKGVsOkVsZW1lbnQsIFtsaW5rLCB0cmltUGFyYW1dOkNvbWJvQXJncykgPT5cbiAgICAgICAgaW5pdElucHV0KGVsLCBpbnB1dFZhbHVlID0+IFtpbnB1dFZhbHVlLCBsaW5rLnJlcGxhY2UoL19fc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gc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
|
114
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9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bGFiZWwgPSBsYWJlbHNbaV07XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0cmltUGFyYW0gPT09IFwic3RyaW5nXCIgJiYgaXRlbSA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBodG1sICs9IHRyaW0oZmlsbEluKHRhZ3MubGluaywgaXRlbS50b1N0cmluZygpLCBsYWJlbCksIHRyaW1QYXJhbSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgaXRlbSA9PT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgICAgICBodG1sICs9IGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbSA9PT0gXCJnYXBcIikge1xuICAgICAgICAgICAgICAgICAgICBodG1sICs9IHRhZ3MuZ2FwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7IC8vIGFjdGl2ZSBwYWdlXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gZmlsbEluKHRhZ3MuYWN0aXZlLCBpdGVtLCBsYWJlbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaHRtbCArPSB0YWdzLmFmdGVyOyAgIC8vIGVzbGludC1kaXNhYmxlLWxpbmUgYWxpZ24tYXNzaWdubWVudHMvYWxpZ24tYXNzaWdubWVudHNcbiAgICAgICAgICAgIGVsLmlubmVySFRNTCA9IFwiXCI7XG4gICAgICAgICAgICBlbC5pbnNlcnRBZGphY2VudEhUTUwoXCJhZnRlcmJlZ2luXCIsIGh0bWwpO1xuICAgICAgICAgICAgbGFzdFdpZHRoID0gd2lkdGg7XG4gICAgICAgIH0pKCk7XG4gICAgICAgIGlmIChlbC5jbGFzc0xpc3QuY29udGFpbnMoXCJwYWd5LXJqc1wiKSkgeyByanNPYnNlcnZlci5vYnNlcnZlKGNvbnRhaW5lcikgfVxuICAgIH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woXCJbZGF0YS1wYWd5XVwiKTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgZWwgb2YgZWxlbWVudHMpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB1aW50OGFycmF5ICAgICAgICAgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
|
@@ -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: "5.9.
|
84
|
+
version: "5.9.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;
|
data/lib/javascripts/pagy.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(){function n(n){if(Array.isArray(n))return n}function e(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(r,a){return n(r)||e(r)||t()}var a,o,i,c,u,f,l=(a=new ResizeObserver((function(n){return n.forEach((function(n){return n.target.querySelectorAll(".pagy-rjs").forEach((function(n){return n.pagyRender()}))}))})),o=function(n,e){var t,o=r(e),i=o[0],c=o[1],u=o[2],l=o[3],p=null!==(t=n.parentElement)&&void 0!==t?t:n,s=Object.keys(c).map((function(n){return parseInt(n)})).sort((function(n,e){return e-n})),y=-1,g=function(n,e,t){return n.replace(/__pagy_page__/g,e).replace(/__pagy_label__/g,t)};(n.pagyRender=function(){var e=s.find((function(n){return n<p.clientWidth}))||0;if(e!==y){var t,r=i.before,a=c[e.toString()],o=null!==(t=null==u?void 0:u[e.toString()])&&void 0!==t?t:a.map((function(n){return n.toString()}));for(var v in a){var d=a[v],_=o[v];r+="string"==typeof l&&1===d?f(g(i.link,d.toString(),_),l):"number"==typeof d?g(i.link,d.toString(),_):"gap"===d?i.gap:g(i.active,d,_)}r+=i.after,n.innerHTML="",n.insertAdjacentHTML("afterbegin",r),y=e}})(),n.classList.contains("pagy-rjs")&&a.observe(p)},i=function(n,e){var t=r(e),a=t[0],o=t[1];return u(n,(function(n){return[n,a.replace(/__pagy_page__/,n)]}),o)},c=function(n,e){var t=r(e),a=t[0],o=t[1],i=t[2];u(n,(function(n){var e=Math.max(Math.ceil(a/parseInt(n)),1).toString();return[e,o.replace(/__pagy_page__/,e).replace(/__pagy_items__/,n)]}),i)},u=function(n,e,t){var a=n.querySelector("input"),o=a.value,i=function(){if(a.value!==o){var i=r([a.min,a.value,a.max].map((function(n){return parseInt(n)||0}))),c=i[0],u=i[1],l=i[2];if(u<c||u>l)return a.value=o,void a.select();var p=r(e(a.value)),s=p[0],y=p[1];"string"==typeof t&&"1"===s&&(y=f(y,t)),n.insertAdjacentHTML("afterbegin",y),n.querySelector("a").click()}};["change","focus"].forEach((function(n){return a.addEventListener(n,a.select)})),a.addEventListener("focusout",i),a.addEventListener("keypress",(function(n){"Enter"===n.key&&i()}))},f=function(n,e){return n.replace(new RegExp("[?&]".concat(e,"=1\\b(?!&)|\\b").concat(e,"=1&")),"")},{version:"5.9.
|
1
|
+
!function(){function n(n){if(Array.isArray(n))return n}function e(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}function t(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(r,a){return n(r)||e(r)||t()}var a,o,i,c,u,f,l=(a=new ResizeObserver((function(n){return n.forEach((function(n){return n.target.querySelectorAll(".pagy-rjs").forEach((function(n){return n.pagyRender()}))}))})),o=function(n,e){var t,o=r(e),i=o[0],c=o[1],u=o[2],l=o[3],p=null!==(t=n.parentElement)&&void 0!==t?t:n,s=Object.keys(c).map((function(n){return parseInt(n)})).sort((function(n,e){return e-n})),y=-1,g=function(n,e,t){return n.replace(/__pagy_page__/g,e).replace(/__pagy_label__/g,t)};(n.pagyRender=function(){var e=s.find((function(n){return n<p.clientWidth}))||0;if(e!==y){var t,r=i.before,a=c[e.toString()],o=null!==(t=null==u?void 0:u[e.toString()])&&void 0!==t?t:a.map((function(n){return n.toString()}));for(var v in a){var d=a[v],_=o[v];r+="string"==typeof l&&1===d?f(g(i.link,d.toString(),_),l):"number"==typeof d?g(i.link,d.toString(),_):"gap"===d?i.gap:g(i.active,d,_)}r+=i.after,n.innerHTML="",n.insertAdjacentHTML("afterbegin",r),y=e}})(),n.classList.contains("pagy-rjs")&&a.observe(p)},i=function(n,e){var t=r(e),a=t[0],o=t[1];return u(n,(function(n){return[n,a.replace(/__pagy_page__/,n)]}),o)},c=function(n,e){var t=r(e),a=t[0],o=t[1],i=t[2];u(n,(function(n){var e=Math.max(Math.ceil(a/parseInt(n)),1).toString();return[e,o.replace(/__pagy_page__/,e).replace(/__pagy_items__/,n)]}),i)},u=function(n,e,t){var a=n.querySelector("input"),o=a.value,i=function(){if(a.value!==o){var i=r([a.min,a.value,a.max].map((function(n){return parseInt(n)||0}))),c=i[0],u=i[1],l=i[2];if(u<c||u>l)return a.value=o,void a.select();var p=r(e(a.value)),s=p[0],y=p[1];"string"==typeof t&&"1"===s&&(y=f(y,t)),n.insertAdjacentHTML("afterbegin",y),n.querySelector("a").click()}};["change","focus"].forEach((function(n){return a.addEventListener(n,a.select)})),a.addEventListener("focusout",i),a.addEventListener("keypress",(function(n){"Enter"===n.key&&i()}))},f=function(n,e){return n.replace(new RegExp("[?&]".concat(e,"=1\\b(?!&)|\\b").concat(e,"=1&")),"")},{version:"5.9.1",init:function(r){var a,u=(r instanceof Element?r:document).querySelectorAll("[data-pagy]"),f=!0,l=!1,p=void 0;try{for(var s,y=u[Symbol.iterator]();!(f=(s=y.next()).done);f=!0){var g=s.value;try{var v=Uint8Array.from(atob(g.getAttribute("data-pagy")),(function(n){return n.charCodeAt(0)})),d=n(a=JSON.parse((new TextDecoder).decode(v)))||e(a)||t(),_=d[0],b=d.slice(1);"nav"===_?o(g,b):"combo"===_?i(g,b):"selector"===_?c(g,b):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",g,_)}catch(n){console.warn("Skipped Pagy.init() for: %o\n%s",g,n)}}}catch(n){l=!0,p=n}finally{try{f||null==y.return||y.return()}finally{if(l)throw p}}}});window.Pagy=l}();
|
data/lib/pagy.rb
CHANGED
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: 5.9.
|
4
|
+
version: 5.9.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-01-
|
11
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|