pagy 6.4.3 → 6.4.4

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: d735bd913097d18ef56cf2d583541f36c3db1be7f5e743330b05c21096f89630
4
- data.tar.gz: 9de3e027d87f417d35d9090cb134a31a5a2b57627eaf8ab4185fb598d590a89c
3
+ metadata.gz: e8c8fac51748a753e2c37f9643a02e76a2f213f5254e0eb03541a8a54729c748
4
+ data.tar.gz: dc5b6c8308c095e0791a291bc10ae916bdf64a0f7f423a4c55c72b5b36b3b6e1
5
5
  SHA512:
6
- metadata.gz: aea91291f2c53e1e80d37931ddd8faa92cf757ff985733f43d083f55ffbe74d610e405d2c6e577ff60281f9bdee7ac553dc1be703c5d40f003bfb15a38ac3f59
7
- data.tar.gz: 9de55391277a90d808bd855cbf83b02bafcac4677766b97b4d3f9b0dd845fba5edf10bb4da73fea918badd0a7ce89a61bc06c04f16ae3a6588b99d85cf02dc86
6
+ metadata.gz: 2d654da92f631e9b2b49d4d949a4dd8a24acdca8316039957a835e1c0e1426e64ba3158657cd7749f676a6ec9a6edec22470f0d53381fbe28e49ce5fd493b357
7
+ data.tar.gz: b6ef0c3a86370d9867c6666926072a737905dd3d04a371f5d152c2847c0696168bf33e7fb350885ecf6f19d9d186feb31154bd31e14fba4030933e0908bf1b6a
data/lib/config/pagy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (6.4.3)
3
+ # Pagy initializer file (6.4.4)
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
 
@@ -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.4.3",
85
+ version: "6.4.4",
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWNBLE1BQU0sSUFBSSxHQUFHLENBQUMsR0FBRyxFQUFFO0lBQ2YsNENBQTRDO0lBQzVDLE1BQU0sV0FBVyxHQUFHLElBQUksY0FBYyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQzdDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxVQUFVLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUU3Ryw0QkFBNEI7SUFDNUIsTUFBTSxPQUFPLEdBQUcsQ0FBQyxFQUFhLEVBQUUsQ0FBQyxJQUFJLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBRSxTQUFTLENBQVMsRUFBRSxFQUFFO1FBQ2hGLE1BQU0sU0FBUyxHQUFHLEVBQUUsQ0FBQyxhQUFhLElBQUksRUFBRSxDQUFDO1FBQ3pDLE1BQU0sTUFBTSxHQUFNLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxH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8vIG5vIGNoYW5nZTogYWJvcnRcbiAgICAgICAgICAgIGxldCBodG1sICAgICA9IHRhZ3MuYmVmb3JlO1xuICAgICAgICAgICAgY29uc3Qgc2VyaWVzID0gc2VxdWVsc1t3aWR0aC50b1N0cmluZygpXTtcbiAgICAgICAgICAgIGNvbnN0IGxhYmVscyA9IGxhYmVsU2VxdWVscz8uW3dpZHRoLnRvU3RyaW5nKCldID8/IHNlcmllcy5tYXAobCA9PiBsLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpIGluIHNlcmllcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJpbVBhcmFtID09PSBcInN0cmluZ1wiICYmIGl0ZW0gPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0cmltKGZpbGxJbih0YWdzLmxpbmssIGl0ZW0udG9TdHJpbmcoKSwgbGFiZWwpLCB0cmltUGFyYW0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGl0ZW0gPT09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmaWxsSW4odGFncy5saW5rLCBpdGVtLnRvU3RyaW5nKCksIGxhYmVsKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0gPT09IFwiZ2FwXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0YWdzLmdhcDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgeyAvLyBhY3RpdmUgcGFnZVxuICAgICAgICAgICAgICAgICAgICBodG1sICs9IGZpbGxJbih0YWdzLmFjdGl2ZSwgaXRlbSwgbGFiZWwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgIC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tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
114
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFneS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWNBLE1BQU0sSUFBSSxHQUFHLENBQUMsR0FBRyxFQUFFO0lBQ2YsNENBQTRDO0lBQzVDLE1BQU0sV0FBVyxHQUFHLElBQUksY0FBYyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQzdDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLGdCQUFnQixDQUFhLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVB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ikgPT4gYiAtIGEpO1xuICAgICAgICBsZXQgbGFzdFdpZHRoICAgPSAtMTtcbiAgICAgICAgY29uc3QgZmlsbEluICAgID0gKGxpbms6c3RyaW5nLCBwYWdlOnN0cmluZywgbGFiZWw6c3RyaW5nKTpzdHJpbmcgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsucmVwbGFjZSgvX19wYWd5X3BhZ2VfXy9nLCBwYWdlKS5yZXBsYWNlKC9fX3BhZ3lfbGFiZWxfXy9nLCBsYWJlbCk7XG4gICAgICAgIChlbC5wYWd5UmVuZGVyID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBjb25zdCB3aWR0aCA9IHdpZHRocy5maW5kKHcgPT4gdyA8IGNvbnRhaW5lci5jbGllbnRXaWR0aCkgfHwgMDtcbiAgICAgICAgICAgIGlmICh3aWR0aCA9PT0gbGFzdFdpZHRoKSB7IHJldHVybiB9IC8vIG5vIGNoYW5nZTogYWJvcnRcbiAgICAgICAgICAgIGxldCBodG1sICAgICA9IHRhZ3MuYmVmb3JlO1xuICAgICAgICAgICAgY29uc3Qgc2VyaWVzID0gc2VxdWVsc1t3aWR0aC50b1N0cmluZygpXTtcbiAgICAgICAgICAgIGNvbnN0IGxhYmVscyA9IGxhYmVsU2VxdWVscz8uW3dpZHRoLnRvU3RyaW5nKCldID8/IHNlcmllcy5tYXAobCA9PiBsLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpIGluIHNlcmllcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGl0ZW0gID0gc2VyaWVzW2ldO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxhYmVsID0gbGFiZWxzW2ldO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHJpbVBhcmFtID09PSBcInN0cmluZ1wiICYmIGl0ZW0gPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCArPSB0cmltKGZpbGxJbih0YWdzLmxpbmssIGl0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5ICAgICAgICAgPSBVaW50OEFycmF5LmZyb20oYXRvYihlbC5nZXRBdHRyaWJ1dGUoXCJkYXRhLXBhZ3lcIikgYXMgc3RyaW5nKSwgYyA9PiBjLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBba2V5d29yZCwgLi4uYXJnc10gPSBKU09OLnBhcnNlKChuZXcgVGV4dERlY29kZXIoKSkuZGVjb2RlKHVpbnQ4YXJyYXkpKTsgLy8gYmFzZTY0LXV0ZjggLT4gSlNPTiAtPiBBcnJheVxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5d29yZCA9PT0gXCJuYXZcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdE5hdihlbCBhcyBOYXZFbGVtZW50LCBhcmdzIGFzIE5hdkFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleXdvcmQgPT09IFwiY29tYm9cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdENvbWJvKGVsLCBhcmdzIGFzIENvbWJvQXJncyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5d29yZCA9PT0gXCJzZWxlY3RvclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VsZWN0b3IoZWwsIGFyZ3MgYXMgU2VsZWN0b3JBcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlNraXBwZWQgUGFneS5pbml0KCkgZm9yOiAlb1xcblVua25vd24ga2V5d29yZCAnJXMnXCIsIGVsLCBrZXl3b3JkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikgeyBjb25zb2xlLndhcm4oXCJTa2lwcGVkIFBhZ3kuaW5pdCgpIGZvcjogJW9cXG4lc1wiLCBlbCwgZXJyKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufSkoKTtcbiJdfQ==
@@ -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.4.3",
84
+ version: "6.4.4",
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(){let e=(()=>{let e=new ResizeObserver(e=>e.forEach(e=>e.target.querySelectorAll(".pagy-rjs").forEach(e=>e.pagyRender()))),t=(t,[r,a,n,i])=>{let l=t.parentElement??t,p=Object.keys(a).map(e=>parseInt(e)).sort((e,t)=>t-e),c=-1,s=(e,t,r)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,r);(t.pagyRender=function(){let e=p.find(e=>e<l.clientWidth)||0;if(e===c)return;let g=r.before,y=a[e.toString()],f=n?.[e.toString()]??y.map(e=>e.toString());for(let e in y){let t=y[e],a=f[e];"string"==typeof i&&1===t?g+=o(s(r.link,t.toString(),a),i):"number"==typeof t?g+=s(r.link,t.toString(),a):"gap"===t?g+=r.gap:g+=s(r.active,t,a)}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),c=e})(),t.classList.contains("pagy-rjs")&&e.observe(l)},r=(e,[t,r])=>n(e,e=>[e,t.replace(/__pagy_page__/,e)],r),a=(e,[t,r,a])=>{n(e,e=>{let a=Math.max(Math.ceil(t/parseInt(e)),1).toString(),n=r.replace(/__pagy_page__/,a).replace(/__pagy_items__/,e);return[a,n]},a)},n=(e,t,r)=>{let a=e.querySelector("input"),n=a.value,i=function(){if(a.value===n)return;let[i,l,p]=[a.min,a.value,a.max].map(e=>parseInt(e)||0);if(l<i||l>p){a.value=n,a.select();return}let[c,s]=t(a.value);"string"==typeof r&&"1"===c&&(s=o(s,r)),e.insertAdjacentHTML("afterbegin",s),e.querySelector("a").click()};["change","focus"].forEach(e=>a.addEventListener(e,a.select)),a.addEventListener("focusout",i),a.addEventListener("keypress",e=>{"Enter"===e.key&&i()})},o=(e,t)=>e.replace(RegExp(`(\\?|&amp;)${t}=1\\b(?!&amp;)|\\b${t}=1&amp;`),"");return{version:"6.4.3",init(e){for(let n of(e instanceof Element?e:document).querySelectorAll("[data-pagy]"))try{let e=Uint8Array.from(atob(n.getAttribute("data-pagy")),e=>e.charCodeAt(0)),[o,...i]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(n,i):"combo"===o?r(n,i):"selector"===o?a(n,i):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",n,o)}catch(e){console.warn("Skipped Pagy.init() for: %o\n%s",n,e)}}}})();window.Pagy=e}();
1
+ !function(){let e=(()=>{let e=new ResizeObserver(e=>e.forEach(e=>e.target.querySelectorAll(".pagy-rjs").forEach(e=>e.pagyRender()))),t=(t,[r,a,n,i])=>{let l=t.parentElement??t,p=Object.keys(a).map(e=>parseInt(e)).sort((e,t)=>t-e),c=-1,s=(e,t,r)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,r);(t.pagyRender=function(){let e=p.find(e=>e<l.clientWidth)||0;if(e===c)return;let g=r.before,y=a[e.toString()],f=n?.[e.toString()]??y.map(e=>e.toString());for(let e in y){let t=y[e],a=f[e];"string"==typeof i&&1===t?g+=o(s(r.link,t.toString(),a),i):"number"==typeof t?g+=s(r.link,t.toString(),a):"gap"===t?g+=r.gap:g+=s(r.active,t,a)}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),c=e})(),t.classList.contains("pagy-rjs")&&e.observe(l)},r=(e,[t,r])=>n(e,e=>[e,t.replace(/__pagy_page__/,e)],r),a=(e,[t,r,a])=>{n(e,e=>{let a=Math.max(Math.ceil(t/parseInt(e)),1).toString(),n=r.replace(/__pagy_page__/,a).replace(/__pagy_items__/,e);return[a,n]},a)},n=(e,t,r)=>{let a=e.querySelector("input"),n=a.value,i=function(){if(a.value===n)return;let[i,l,p]=[a.min,a.value,a.max].map(e=>parseInt(e)||0);if(l<i||l>p){a.value=n,a.select();return}let[c,s]=t(a.value);"string"==typeof r&&"1"===c&&(s=o(s,r)),e.insertAdjacentHTML("afterbegin",s),e.querySelector("a").click()};["change","focus"].forEach(e=>a.addEventListener(e,a.select)),a.addEventListener("focusout",i),a.addEventListener("keypress",e=>{"Enter"===e.key&&i()})},o=(e,t)=>e.replace(RegExp(`(\\?|&amp;)${t}=1\\b(?!&amp;)|\\b${t}=1&amp;`),"");return{version:"6.4.4",init(e){for(let n of(e instanceof Element?e:document).querySelectorAll("[data-pagy]"))try{let e=Uint8Array.from(atob(n.getAttribute("data-pagy")),e=>e.charCodeAt(0)),[o,...i]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(n,i):"combo"===o?r(n,i):"selector"===o?a(n,i):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",n,o)}catch(e){console.warn("Skipped Pagy.init() for: %o\n%s",n,e)}}}})();window.Pagy=e}();
@@ -10,8 +10,8 @@ class Pagy # :nodoc:
10
10
  module Meilisearch # :nodoc:
11
11
  # Return an array used to delay the call of #search
12
12
  # after the pagination variables are merged to the options
13
- def pagy_meilisearch(term = nil, **vars)
14
- [self, term, vars]
13
+ def pagy_meilisearch(query, params = {})
14
+ [self, query, params]
15
15
  end
16
16
  alias_method DEFAULT[:meilisearch_pagy_search], :pagy_meilisearch
17
17
  end
@@ -38,7 +38,7 @@ class Pagy # :nodoc:
38
38
  vars = pagy_meilisearch_get_vars(nil, vars)
39
39
  options[:hits_per_page] = vars[:items]
40
40
  options[:page] = vars[:page]
41
- results = model.send(:ms_search, term, **options)
41
+ results = model.send(:ms_search, term, options)
42
42
  vars[:count] = results.raw_answer['totalHits']
43
43
 
44
44
  pagy = ::Pagy.new(vars)
data/lib/pagy.rb CHANGED
@@ -5,7 +5,7 @@ require 'pathname'
5
5
 
6
6
  # Core class
7
7
  class Pagy
8
- VERSION = '6.4.3'
8
+ VERSION = '6.4.4'
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.4.3
4
+ version: 6.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-18 00:00:00.000000000 Z
11
+ date: 2024-02-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: