diff --git a/404.html b/404.html index 6812f37ea..e331c5cf6 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="/pagy/resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="/pagy/resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="/pagy/resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="/pagy/resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="/pagy/resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="/pagy/resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="/pagy/resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/categories/backend/index.html b/categories/backend/index.html index d2b464af0..202bf6eba 100644 --- a/categories/backend/index.html +++ b/categories/backend/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/categories/class/index.html b/categories/class/index.html index b596d4993..8007345c7 100644 --- a/categories/class/index.html +++ b/categories/class/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/categories/core/index.html b/categories/core/index.html index 7d6ddad62..ee7e292ec 100644 --- a/categories/core/index.html +++ b/categories/core/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/categories/extra/index.html b/categories/extra/index.html index 095306495..a9dfa9985 100644 --- a/categories/extra/index.html +++ b/categories/extra/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/categories/feature/index.html b/categories/feature/index.html index 516fd80af..1d519e622 100644 --- a/categories/feature/index.html +++ b/categories/feature/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/categories/frontend/index.html b/categories/frontend/index.html index d40dd0e90..ab65d5b09 100644 --- a/categories/frontend/index.html +++ b/categories/frontend/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/categories/index.html b/categories/index.html index cd9ee9def..22b658196 100644 --- a/categories/index.html +++ b/categories/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/categories/module/index.html b/categories/module/index.html index 35adb172d..c0bb846cc 100644 --- a/categories/module/index.html +++ b/categories/module/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/categories/search/index.html b/categories/search/index.html index d5421b41c..d24733013 100644 --- a/categories/search/index.html +++ b/categories/search/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -28,11 +28,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/changelog/index.html b/changelog/index.html index 9e7c5d126..fabe2b305 100644 --- a/changelog/index.html +++ b/changelog/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,11 +31,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/changelog_legacy/index.html b/changelog_legacy/index.html index f06b113ff..6e3efbe85 100644 --- a/changelog_legacy/index.html +++ b/changelog_legacy/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,11 +31,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/aria/index.html b/docs/api/aria/index.html index e47dc2c3e..30fde446c 100644 --- a/docs/api/aria/index.html +++ b/docs/api/aria/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/backend/index.html b/docs/api/backend/index.html index 8df1b3e0b..8ede578a9 100644 --- a/docs/api/backend/index.html +++ b/docs/api/backend/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/calendar/index.html b/docs/api/calendar/index.html index 9d276eef1..e4d7383e2 100644 --- a/docs/api/calendar/index.html +++ b/docs/api/calendar/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/console/index.html b/docs/api/console/index.html index b3786a2aa..17d1bc2a4 100644 --- a/docs/api/console/index.html +++ b/docs/api/console/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> @@ -286,10 +286,11 @@ <h1> ### then you can use it like inside an app pagy, items = pagy_array((1..1000).to_a, page: 3) -pagy_navs(pagy) -=> "<nav class=\"pagy-nav pagination\" role=\"navigation\" aria-label=\"pager\"><span class=\"page prev\"><a href=\"http://www.example.com/subdir?page=2&items=20\" rel=\"prev\" aria-label=\"previous\">&lsaquo;&nbsp;Prev</a></span> <span class=\"page\"><a href=\"http://www.example.com/subdir?page=1&items=20\" >1</a></span> <span class=\"page\"><a href=\"http://www.example.com/subdir?page=2&items=20\" rel=\"prev\" >2</a></span> <span class=\"page active\">3</span> <span class=\"page\"><a href=\"http://www.example.com/subdir?page=4&items=20\" rel=\"next\" >4</a></span> <span class=\"page\"><a href=\"http://www.example.com/subdir?page=5&items=20\" >5</a></span> <span class=\"page\"><a href=\"http://www.example.com/subdir?page=6&items=20\" >6</a></span> <span class=\"page\"><a href=\"http://www.example.com/subdir?page=7&items=20\" >7</a></span> <span class=\"page gap\">&hellip;</span> <span class=\"page\"><a href=\"http://www.example.com/subdir?page=50&items=20\" >50</a></span> <span class=\"page next\"><a href=\"http://www.example.com/subdir?page=4&items=20\" rel=\"next\" aria-label=\"next\">Next&nbsp;&rsaquo;</a></span></nav>" +pagy_nav(pagy) +=> [#<Pagy:0x00007fdff0234880 @count=1000, @from=41, @in=20, @items=20, @last=50, @next=4, @offset=40, @outset=0, @page=3, @prev=2, @to=60, @vars={:page=>3, :items=>20, :outset=>0, :size=>7, :cycle=>false, :count_args=>[:all], :page_param=>:page, :url=>"http://www.example.com/subdir", :count=>1000}>, [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60]] +=> "<nav class=\"pagy nav\" aria-label=\"Pages\"><a href=\"http://www.example.com/subdir?page=2\" aria-label=\"Previous\">&lt;</a><a href=\"http://www.example.com/subdir?page=1\">1</a><a href=\"http://www.example.com/subdir?page=2\">2</a><a role=\"link\" aria-disabled=\"true\" aria-current=\"page\" class=\"current\">3</a><a href=\"http://www.example.com/subdir?page=4\">4</a><a href=\"http://www.example.com/subdir?page=5\">5</a><a href=\"http://www.example.com/subdir?page=6\">6</a><a href=\"http://www.example.com/subdir?page=7\">7</a><a href=\"http://www.example.com/subdir?page=4\" aria-label=\"Next\">&gt;</a></nav>" -pagy_metadata(pagy) +pagy_metadata(pagy)pagy_metadata(pagy) => { :scaffold_url => "http://www.example.com/subdir?page=__pagy_page__", :first_url => "http://www.example.com/subdir?page=1", @@ -300,12 +301,41 @@ <h1> :count => 1000, :page => 3, :items => 20, - :vars => - { :page => 3, - :items => 20, - :outset => 0, - :size => [1, 4, 4, 1], - ...</code></pre> + :vars => { :page => 3, + :items => 20, + :outset => 0, + :size => 7, + :cycle => false, + :count_args => [:all], + :page_param => :page, + :url => "http://www.example.com/subdir", + :metadata => [:scaffold_url, + :first_url, + :prev_url, + :page_url, + :next_url, + :last_url, + :count, + :page, + :items, + :vars, + :pages, + :last, + :in, + :from, + :to, + :prev, + :next, + :series], + :count => 1000 }, + :pages => 50, + :last => 50, + :in => 20, + :from => 41, + :to => 60, + :prev => 2, + :next => 4, + :series => [1, 2, "3", 4, 5, 6, 7] }</code></pre> </doc-codeblock></div> </doc-tab> <doc-tab v-cloak id="rails-console"> diff --git a/docs/api/countless/index.html b/docs/api/countless/index.html index 947cf0f7f..b5611b125 100644 --- a/docs/api/countless/index.html +++ b/docs/api/countless/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,11 +31,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> @@ -336,7 +336,7 @@ <h2> </h2> </doc-anchor-target> <p>Instead of basing all the internal calculations on the <code v-pre>:count</code> variable (passed with the constructor), this class uses the number -of actually retrieved items to deduce the pagination variables.</p> +of actually retrieved items to derive the pagination variables.</p> <p>The retrieved items number can be passed in a second step to the <code v-pre>finalize</code> method, which allows pagy to determine if there is a <code v-pre>next</code> page, or if the current page is the <code v-pre>last</code> page, or if the current request should raise a <code v-pre>Pagy::OverflowError</code> exception.</p> diff --git a/docs/api/frontend/index.html b/docs/api/frontend/index.html index ef7551e37..4fe84a1a0 100644 --- a/docs/api/frontend/index.html +++ b/docs/api/frontend/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/i18n/index.html b/docs/api/i18n/index.html index bd81ce1fa..ddcf28efd 100644 --- a/docs/api/i18n/index.html +++ b/docs/api/i18n/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/javascript/ajax/index.html b/docs/api/javascript/ajax/index.html index e6e536327..46d7d8a4b 100644 --- a/docs/api/javascript/ajax/index.html +++ b/docs/api/javascript/ajax/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/javascript/combo-navs/index.html b/docs/api/javascript/combo-navs/index.html index cb2d2c1b6..4f1f4b585 100644 --- a/docs/api/javascript/combo-navs/index.html +++ b/docs/api/javascript/combo-navs/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/javascript/index.html b/docs/api/javascript/index.html index 744190889..9d889d76a 100644 --- a/docs/api/javascript/index.html +++ b/docs/api/javascript/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,11 +31,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/javascript/navs/index.html b/docs/api/javascript/navs/index.html index 55727a911..bf1909890 100644 --- a/docs/api/javascript/navs/index.html +++ b/docs/api/javascript/navs/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/javascript/setup/index.html b/docs/api/javascript/setup/index.html index 2a30fffbc..456831d4a 100644 --- a/docs/api/javascript/setup/index.html +++ b/docs/api/javascript/setup/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/pagy/index.html b/docs/api/pagy/index.html index 7cf74fb20..84441ba8e 100644 --- a/docs/api/pagy/index.html +++ b/docs/api/pagy/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/api/stylesheets/index.html b/docs/api/stylesheets/index.html index d82fb61bd..4fa9b9406 100644 --- a/docs/api/stylesheets/index.html +++ b/docs/api/stylesheets/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> @@ -287,7 +287,7 @@ <h2> </div> <div class="pr-5 ml-3 w-full"> <p>You don't need any stylesheet if you use a frontend extra like: -<a href="../../extras/bootstrap/">bootstrap</a>, <a href="../../extras/bulma/">bulma</a></p> +<a href="../../extras/bootstrap/">bootstrap</a> and <a href="../../extras/bulma/">bulma</a></p> </div> </div> </div> @@ -303,7 +303,7 @@ <h3> <li>The output of <code v-pre>pagy_nav</code> and <code v-pre>pagy_nav_js</code> are a series of <code v-pre>a</code> tags inside a wrapper <code v-pre>nav</code> tag</li> <li>The disabled links are so because they are missing the <code v-pre>href</code> attributes</li> <li>The <code v-pre>pagy nav</code> and <code v-pre>pagy nav-js</code> classes are assigned to the <code v-pre>nav</code> tag</li> -<li>The <code v-pre>current</code>, <code v-pre>gap</code> classes are assigned to the specific <code v-pre>a</code> tags</li> +<li>The <code v-pre>current</code> and <code v-pre>gap</code> classes are assigned to the specific <code v-pre>a</code> tags</li> </ul> <div class="flex mb-6"> <div class="shrink-0 w-1 rounded-tl rounded-bl bg-blue-500 dark:bg-blue-400"></div> diff --git a/docs/extras/arel/index.html b/docs/extras/arel/index.html index 06afd9f4b..352e1c5ff 100644 --- a/docs/extras/arel/index.html +++ b/docs/extras/arel/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/array/index.html b/docs/extras/array/index.html index f165cde77..ab5857a7e 100644 --- a/docs/extras/array/index.html +++ b/docs/extras/array/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/bootstrap/index.html b/docs/extras/bootstrap/index.html index b9a76501d..5c4da0254 100644 --- a/docs/extras/bootstrap/index.html +++ b/docs/extras/bootstrap/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/bulma/index.html b/docs/extras/bulma/index.html index 4785b4d2c..3e42a658a 100644 --- a/docs/extras/bulma/index.html +++ b/docs/extras/bulma/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/calendar/index.html b/docs/extras/calendar/index.html index 9c7ad8ad6..77731f5a5 100644 --- a/docs/extras/calendar/index.html +++ b/docs/extras/calendar/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/countless/index.html b/docs/extras/countless/index.html index a57c7f3d5..5e309a50e 100644 --- a/docs/extras/countless/index.html +++ b/docs/extras/countless/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/elasticsearch_rails/index.html b/docs/extras/elasticsearch_rails/index.html index 32c6cab4b..c2571cad4 100644 --- a/docs/extras/elasticsearch_rails/index.html +++ b/docs/extras/elasticsearch_rails/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/gearbox/index.html b/docs/extras/gearbox/index.html index 709707a74..f63b8e32f 100644 --- a/docs/extras/gearbox/index.html +++ b/docs/extras/gearbox/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/headers/index.html b/docs/extras/headers/index.html index 7af471aaa..f5de0ce64 100644 --- a/docs/extras/headers/index.html +++ b/docs/extras/headers/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/i18n/index.html b/docs/extras/i18n/index.html index c643db981..4ff1770a2 100644 --- a/docs/extras/i18n/index.html +++ b/docs/extras/i18n/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/items/index.html b/docs/extras/items/index.html index b05393734..578dd052d 100644 --- a/docs/extras/items/index.html +++ b/docs/extras/items/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> @@ -458,7 +458,7 @@ <h2> <p>When the items number is changed with the selector, pagy will reload the pagination UI using the selected items per page. It will also request the <em>right</em> page number calculated in order to contain the first item of the previously displayed page. That way the new displayed page will roughly show the same items in the collection before the items change.</p> -<p>This method can take an extra <code v-pre>id</code> argument, which is used to build the <code v-pre>id</code> attribute of the <code v-pre>nav</code> tag.</p> +<p>This method can take an extra <code v-pre>id</code> argument, which is used as the <code v-pre>id</code> attribute of the wrapper <code v-pre>span</code> tag.</p> </div> </div> </div> diff --git a/docs/extras/jsonapi/index.html b/docs/extras/jsonapi/index.html index 176aab30a..5cac3758e 100644 --- a/docs/extras/jsonapi/index.html +++ b/docs/extras/jsonapi/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/meilisearch/index.html b/docs/extras/meilisearch/index.html index 39f154a4a..f191eb65d 100644 --- a/docs/extras/meilisearch/index.html +++ b/docs/extras/meilisearch/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/metadata/index.html b/docs/extras/metadata/index.html index 72068fca9..be73f5aec 100644 --- a/docs/extras/metadata/index.html +++ b/docs/extras/metadata/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/overflow/index.html b/docs/extras/overflow/index.html index dc8663ba7..36914b2d1 100644 --- a/docs/extras/overflow/index.html +++ b/docs/extras/overflow/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/pagy/index.html b/docs/extras/pagy/index.html index a8b546df8..8aef2df15 100644 --- a/docs/extras/pagy/index.html +++ b/docs/extras/pagy/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/searchkick/index.html b/docs/extras/searchkick/index.html index 91a6ccdc1..19cf97c3c 100644 --- a/docs/extras/searchkick/index.html +++ b/docs/extras/searchkick/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/standalone/index.html b/docs/extras/standalone/index.html index dc979fcae..7e8013f1d 100644 --- a/docs/extras/standalone/index.html +++ b/docs/extras/standalone/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/extras/tailwind/index.html b/docs/extras/tailwind/index.html index 3b05b6d68..d36bcf306 100644 --- a/docs/extras/tailwind/index.html +++ b/docs/extras/tailwind/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,11 +31,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> @@ -271,7 +271,7 @@ <h1> </div> <p>Tailwind allows to apply styles to any DOM element, so you don't actually need any special extra to produce a different output. -You can use the standard pagy helpers and <code v-pre>@apply</code> the tailwind classes by just using the <a href="../../api/stylesheets/#pagy-tailwind-css">pagy.tailwind.css</a> stylesheet file.</p> +You can use the standard pagy helpers and the <a href="../../api/stylesheets/#pagy-tailwind-css">pagy.tailwind.css</a> stylesheet file (that <code v-pre>@apply</code> the tailwind classes to the pagy output)</p> <!-- Required only on API pages --> diff --git a/docs/extras/trim/index.html b/docs/extras/trim/index.html index e6bd9dc8e..9cd312073 100644 --- a/docs/extras/trim/index.html +++ b/docs/extras/trim/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/how-to/index.html b/docs/how-to/index.html index 2712b9b5a..7a96053e5 100644 --- a/docs/how-to/index.html +++ b/docs/how-to/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/migration-guide/index.html b/docs/migration-guide/index.html index 09fd3ac6d..f73948536 100644 --- a/docs/migration-guide/index.html +++ b/docs/migration-guide/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/prerequisites/index.html b/docs/prerequisites/index.html index 3e20ae353..4466edc9a 100644 --- a/docs/prerequisites/index.html +++ b/docs/prerequisites/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,11 +31,11 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/docs/troubleshooting/index.html b/docs/troubleshooting/index.html index 41d7e632f..78eb39599 100644 --- a/docs/troubleshooting/index.html +++ b/docs/troubleshooting/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -12,7 +12,7 @@ <!-- Primary Meta Tags --> <title>Troubleshooting | Pagy</title> <meta name="title" content="Troubleshooting | Pagy"> - <meta name="description" content="When using LIMIT, it is important to use an ORDER BY clause that constrains the result rows into a unique order. Otherwise you"> + <meta name="description" content="the PostgreSQL Documentation"> <!-- Canonical --> <link rel="canonical" href="https://ddnexus.github.io/pagy/docs/troubleshooting/"> @@ -21,22 +21,22 @@ <meta property="og:type" content="website"> <meta property="og:url" content="https://ddnexus.github.io/pagy/docs/troubleshooting/"> <meta property="og:title" content="Troubleshooting | Pagy"> - <meta property="og:description" content="When using LIMIT, it is important to use an ORDER BY clause that constrains the result rows into a unique order. Otherwise you"> + <meta property="og:description" content="the PostgreSQL Documentation"> <!-- Twitter --> <meta property="twitter:card" content="summary_large_image"> <meta property="twitter:url" content="https://ddnexus.github.io/pagy/docs/troubleshooting/"> <meta property="twitter:title" content="Troubleshooting | Pagy"> - <meta property="twitter:description" content="When using LIMIT, it is important to use an ORDER BY clause that constrains the result rows into a unique order. Otherwise you"> + <meta property="twitter:description" content="the PostgreSQL Documentation"> <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> @@ -299,7 +299,8 @@ <h5>Don't Paginate Unordered PostgreSQL Collections!</h5> </svg> </div> <div class="pr-5 ml-3 w-full"> - <h5>From the <a href="https://www.postgresql.org/docs/16/queries-limit.html#:%7E:text=When%20using%20LIMIT,ORDER%20BY">PostgreSQL Documentation</a></h5> + <h5>From</h5> +<p>the <a href="https://www.postgresql.org/docs/16/queries-limit.html#:%7E:text=When%20using%20LIMIT,ORDER%20BY">PostgreSQL Documentation</a></p> <p>When using LIMIT, it is important to use an ORDER BY clause that constrains the result rows into a unique order. Otherwise you will get an unpredictable subset of the query's rows.</p> </div> @@ -346,7 +347,7 @@ <h5>Ensure the PostgreSQL collection is ordered!</h5> <div class="pr-5 ml-3 w-full"> <h5>Don't rely on ARIA default with multiple nav elements!</h5> <p>Pagy sets the <code v-pre>aria-label</code> attribute of its <code v-pre>nav</code> elements with the translated and pluralized <code v-pre>pagy.aria_label.nav</code> that finds in -the locale files. That would be (always) <code v-pre>"Pages"</code> for the <code v-pre>en</code> locale.</p> +the locale files. That would be (always) <code v-pre>"Page"/"Pages"</code> for the <code v-pre>en</code> locale.</p> <p>Since the <code v-pre>nav</code> or <code v-pre>role="navigation"</code> elements of a HTML document are considered <code v-pre>landmark roles</code>, they should be uniquely aria-identified in the page.</p> </div> @@ -425,7 +426,7 @@ <h5>Easily check the native component attributes!</h5> </svg> </div> <div class="pr-5 ml-3 w-full"> -<p>In the specific <code v-pre>bootstrap</code> example you could add the class with:</p> +<p>In the specific <code v-pre>bootstrap</code> example you could override the default bootstrap <code v-pre>"pagination"</code> class by adding other classes with:</p> <div class="codeblock-wrapper"><doc-codeblock> <pre class="language-ruby"><code v-pre class="language-ruby">@pagy, @records = pagy_bootstrap_nav(collection, classes: 'pagination my-class')</code></pre> </doc-codeblock></div> diff --git a/index.html b/index.html index 61040c89b..c10ccbd2f 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -33,12 +33,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> @@ -269,8 +269,8 @@ <h1> </doc-anchor-target> <p><span><a href="https://rubygems.org/gems/pagy"><img src="https://img.shields.io/gem/v/pagy.svg?label=Pagy&colorA=99004d&colorB=cc0066" alt="Gem Version" /></a></span> <span> <a href="https://endoflife.date/ruby"><img src="https://img.shields.io/badge/Ruby-EOL-ruby.svg?colorA=99004d&colorB=cc0066" alt="Ruby" /></a></span> <span> -<a href="https://github.com/ddnexus/pagy/actions/workflows/ruby-test.yml?query=branch%3Amaster"><img src="https://github.com/ddnexus/pagy/actions/workflows/ruby-test.yml/badge.svg?branch=master" alt="Ruby Test" /></a></span> <span> -<a href="https://github.com/ddnexus/pagy/actions/workflows/e2e-test.yml?query=branch%3Amaster"><img src="https://github.com/ddnexus/pagy/actions/workflows/e2e-test.yml/badge.svg?branch=master" alt="E2E Test" /></a></span> <span> +<a href="https://github.com/ddnexus/pagy/actions/workflows/ruby-test.yml"><img src="https://github.com/ddnexus/pagy/actions/workflows/ruby-test.yml/badge.svg?branch=master" alt="Ruby Test" /></a></span> <span> +<a href="https://github.com/ddnexus/pagy/actions/workflows/e2e-test.yml"><img src="https://github.com/ddnexus/pagy/actions/workflows/e2e-test.yml/badge.svg?branch=master" alt="E2E Test" /></a></span> <span> <img src="https://img.shields.io/badge/Coverage-100%25-coverage.svg?colorA=1f7a1f&colorB=2aa22a" alt="Coverage" /></span> <span> <img src="https://img.shields.io/badge/Rubocop-passing-rubocop.svg?colorA=1f7a1f&colorB=2aa22a" alt="Rubocop Status" /></span> <span> <a href="http://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-mit.svg?colorA=1f7a1f&colorB=2aa22a" alt="MIT license" /></a></span> <span> diff --git a/playground/index.html b/playground/index.html index 925172b09..bf2d2a81c 100644 --- a/playground/index.html +++ b/playground/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/quick-start/index.html b/quick-start/index.html index 61c3db373..ae8c45280 100644 --- a/quick-start/index.html +++ b/quick-start/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="turbo-root" content="/pagy"> - <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767666573479"> + <meta name="turbo-cache-control" content="no-cache" data-turbo-track="reload" data-track-token="3.5.0.767674440946"> <!-- See retype.com --> <meta name="generator" content="Retype 3.5.0"> @@ -31,12 +31,12 @@ <script data-cfasync="false">(function () { var el = document.documentElement, m = localStorage.getItem("doc_theme"), wm = window.matchMedia; if (m === "dark" || (!m && wm && wm("(prefers-color-scheme: dark)").matches)) { el.classList.add("dark") } else { el.classList.remove("dark") } })();</script> - <link href="../resources/css/retype.css?v=3.5.0.767666573479" rel="stylesheet"> + <link href="../resources/css/retype.css?v=3.5.0.767674440946" rel="stylesheet"> - <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> + <script data-cfasync="false" src="../resources/js/config.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> <script data-cfasync="false" src="../resources/js/retype.js?v=3.5.0" data-turbo-eval="false" defer></script> - <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767666573479" data-turbo-eval="false" defer></script> - <script id="prism-js" data-cfasync="false" src="../resources/js/prism.js?v=3.5.0.767666573479" defer></script> + <script id="lunr-js" data-cfasync="false" src="../resources/js/lunr.js?v=3.5.0.767674440946" data-turbo-eval="false" defer></script> + <script id="prism-js" data-cfasync="false" src="../resources/js/prism.js?v=3.5.0.767674440946" defer></script> </head> <body> <div id="docs-app" class="relative text-base antialiased text-gray-700 bg-white font-body dark:bg-dark-850 dark:text-dark-300"> diff --git a/resources/js/config.js b/resources/js/config.js index ed3dcf556..b7f0639b8 100644 --- a/resources/js/config.js +++ b/resources/js/config.js @@ -1 +1 @@ -var __DOCS_CONFIG__ = {"id":"Z1LVw0oBjNNmNQVQNNmNovx9hQ288m0v6L1","key":"972PD0w6T/ih2H04RfDk7lQK1vKuliYFIuAr+oC37mQ.QJlO9soAJswscK8AzY31dLgNvgClrbueUKKYS0bjd4j8HNoSHN4PTZQgeEX0NVqrBeljVt3wOtX0tVfirILePw.1426","base":"/pagy/","host":"ddnexus.github.io","version":"1.0.0","useRelativePaths":true,"documentName":"index.html","appendDocumentName":false,"trailingSlash":true,"preloadSearch":false,"cacheBustingToken":"3.5.0.767666573479","cacheBustingStrategy":"query","sidebarFilterPlaceholder":"Filter","toolbarFilterPlaceholder":"Filter","showSidebarFilter":true,"filterNotFoundMsg":"No member names found containing the query \"{query}\"","maxHistoryItems":15,"homeIcon":"<path d=\"M12.97 2.59a1.5 1.5 0 00-1.94 224 0l-7.5 6.363A1.5 1.5 0 003 10.097V19.5A1.5 1.5 0 004.5 21h4.75a.75.75 0 00.75-.75V14h4v6.25c0 .414.336.75.75.75h4.75a1.5 1.5 0 001.5-1.5v-9.403a1.5 1.5 0 00-.53-1.144l-7.5-6.363z\"></path>","access":[{"value":"public","label":"Public"},{"value":"protected","label":"Protected"}],"toolbarLinks":[{"id":"fields","label":"Fields"},{"id":"properties","label":"Properties"},{"id":"methods","label":"Methods"},{"id":"events","label":"Events"}],"sidebar":[{"n":"/","l":"Home","s":"<path d=\"M11.03 2.59a1.501 1.501 0 0 1 1.94 0l7.5 6.363a1.5 1.5 0 0 1 .53 1.144V19.5a1.5 1.5 0 0 1-1.5 1.5h-5.75a.75.75 0 0 1-.75-.75V14h-2v6.25a.75.75 0 0 1-.75.75H4.5A1.5 1.5 0 0 1 3 19.5v-9.403c0-.44.194-.859.53-1.144ZM12 3.734l-7.5 6.363V19.5h5v-6.25a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v6.25h5v-9.403Z\"/>"},{"n":"quick-start","l":"Quick Start","s":"<path d=\"M20.322.75h1.176a1.75 1.75 0 0 1 1.75 1.749v1.177a10.75 10.75 0 0 1-2.925 7.374l-1.228 1.304a23.699 23.699 0 0 1-1.596 1.542v5.038c0 .615-.323 1.184-.85 1.5l-4.514 2.709a.75.75 0 0 1-1.12-.488l-.963-4.572a1.305 1.305 0 0 1-.14-.129L8.04 15.96l-1.994-1.873a1.305 1.305 0 0 1-.129-.14l-4.571-.963a.75.75 0 0 1-.49-1.12l2.71-4.514c.316-.527.885-.85 1.5-.85h5.037a23.668 23.668 0 0 1 1.542-1.594l1.304-1.23A10.753 10.753 0 0 1 20.321.75Zm-6.344 4.018v-.001l-1.304 1.23a22.275 22.275 0 0 0-3.255 3.851l-2.193 3.29 1.859 1.744a.545.545 0 0 1 .034.034l1.743 1.858 3.288-2.192a22.263 22.263 0 0 0 3.854-3.257l1.228-1.303a9.251 9.251 0 0 0 2.517-6.346V2.5a.25.25 0 0 0-.25-.25h-1.177a9.252 9.252 0 0 0-6.344 2.518ZM6.5 21c-1.209 1.209-3.901 1.445-4.743 1.49a.236.236 0 0 1-.18-.067.236.236 0 0 1-.067-.18c.045-.842.281-3.534 1.49-4.743.9-.9 2.6-.9 3.5 0 .9.9.9 2.6 0 3.5Zm-.592-8.588L8.17 9.017c.23-.346.47-.685.717-1.017H5.066a.25.25 0 0 0-.214.121l-2.167 3.612ZM16 15.112c-.333.248-.672.487-1.018.718l-3.393 2.262.678 3.223 3.612-2.167a.25.25 0 0 0 .121-.214ZM17.5 8a1.5 1.5 0 1 1-3.001-.001A1.5 1.5 0 0 1 17.5 8Z\"/>"},{"n":"playground","l":"Try the demo now! \uD83C\uDD95","s":"<path d=\"M9.5 15.584V8.416a.5.5 0 0 1 .77-.42l5.576 3.583a.5.5 0 0 1 0 .842l-5.576 3.584a.5.5 0 0 1-.77-.42Z\"/><path d=\"M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11-9.5A9.5 9.5 0 0 0 2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5Z\"/>"},{"n":"docs","l":"Documentation","c":false,"i":[{"n":"prerequisites","l":"Prerequisites","s":"<path d=\"M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z\"/><path d=\"m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z\"/>"},{"n":"migration-guide","l":"Migrate from other gems","s":"<path d=\"M1.513 1.96a1.374 1.374 0 0 1 1.499-.21l19.335 9.215a1.147 1.147 0 0 1 0 2.07L3.012 22.25a1.374 1.374 0 0 1-1.947-1.46L2.49 12 1.065 3.21a1.375 1.375 0 0 1 .448-1.25Zm2.375 10.79-1.304 8.042L21.031 12 2.584 3.208l1.304 8.042h7.362a.75.75 0 0 1 0 1.5Z\"/>"},{"n":"how-to","l":"How To","s":"<path d=\"M7.875 2.292a.114.114 0 0 0-.032.018A7.239 7.239 0 0 0 4.75 8.25a7.248 7.248 0 0 0 3.654 6.297c.57.327.982.955.941 1.682v.002l-.317 6.058a.75.75 0 1 1-1.498-.078l.317-6.062v-.004c.006-.09-.047-.215-.188-.296A8.749 8.749 0 0 1 3.25 8.25a8.738 8.738 0 0 1 3.732-7.169 1.547 1.547 0 0 1 1.709-.064c.484.292.809.835.809 1.46v4.714a.25.25 0 0 0 .119.213l2.25 1.385c.08.05.182.05.262 0l2.25-1.385a.25.25 0 0 0 .119-.213V2.478c0-.626.325-1.169.81-1.461a1.547 1.547 0 0 1 1.708.064 8.741 8.741 0 0 1 3.732 7.17 8.747 8.747 0 0 1-4.41 7.598c-.14.081-.193.206-.188.296v.004l.318 6.062a.75.75 0 1 1-1.498.078l-.317-6.058v-.002c-.041-.727.37-1.355.94-1.682A7.247 7.247 0 0 0 19.25 8.25a7.239 7.239 0 0 0-3.093-5.94.114.114 0 0 0-.032-.018l-.01-.001c-.003 0-.014 0-.031.01-.036.022-.084.079-.084.177V7.19c0 .608-.315 1.172-.833 1.49l-2.25 1.385a1.75 1.75 0 0 1-1.834 0l-2.25-1.384A1.752 1.752 0 0 1 8 7.192V2.477c0-.098-.048-.155-.084-.176a.068.068 0 0 0-.031-.011l-.01.001Z\"/>"},{"n":"api","l":"API","c":false,"i":[{"n":"aria","l":"ARIA Attributes"},{"n":"pagy","l":"Pagy"},{"n":"backend","l":"Pagy::Backend"},{"n":"calendar","l":"Pagy::Calendar"},{"n":"console","l":"Pagy::Console"},{"n":"countless","l":"Pagy::Countless"},{"n":"frontend","l":"Pagy::Frontend"},{"n":"i18n","l":"Pagy::I18n"},{"n":"stylesheets","l":"Stylesheets"},{"n":"javascript","l":"Javascript","i":[{"n":"setup","l":"Setup"},{"n":"navs","l":"Navs"},{"n":"combo-navs","l":"Combo Navs"},{"n":"ajax","l":"AJAX"}]}],"s":"<path d=\"M12.876.64V.639l8.25 4.763c.541.313.875.89.875 1.515v9.525a1.75 1.75 0 0 1-.875 1.516l-8.25 4.762a1.748 1.748 0 0 1-1.75 0l-8.25-4.763a1.75 1.75 0 0 1-.875-1.515V6.917c0-.625.334-1.202.875-1.515L11.126.64a1.748 1.748 0 0 1 1.75 0Zm-1 1.298L4.251 6.34l7.75 4.474 7.75-4.474-7.625-4.402a.248.248 0 0 0-.25 0Zm.875 19.123 7.625-4.402a.25.25 0 0 0 .125-.216V7.639l-7.75 4.474ZM3.501 7.64v8.803c0 .09.048.172.125.216l7.625 4.402v-8.947Z\"/>"},{"n":"extras","l":"Extras","c":false,"i":[{"n":"arel","l":"Arel"},{"n":"array","l":"Array"},{"n":"bootstrap","l":"Bootstrap"},{"n":"bulma","l":"Bulma"},{"n":"calendar","l":"Calendar"},{"n":"countless","l":"Countless"},{"n":"elasticsearch_rails","l":"Elasticsearch Rails"},{"n":"gearbox","l":"Gearbox"},{"n":"headers","l":"Headers"},{"n":"i18n","l":"I18n"},{"n":"items","l":"Items"},{"n":"jsonapi","l":"Jsonapi"},{"n":"meilisearch","l":"Meilisearch"},{"n":"metadata","l":"Metadata"},{"n":"overflow","l":"Overflow"},{"n":"pagy","l":"Pagy"},{"n":"searchkick","l":"Searchkick"},{"n":"standalone","l":"Standalone"},{"n":"tailwind","l":"Tailwind"},{"n":"trim","l":"Trim"}],"s":"<path d=\"M12.75 7.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z\"/><path d=\"M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Z\"/>"},{"n":"troubleshooting","l":"Troubleshooting","s":"<path d=\"M13 17.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm-.25-8.25a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5Z\"/><path d=\"M9.836 3.244c.963-1.665 3.365-1.665 4.328 0l8.967 15.504c.963 1.667-.24 3.752-2.165 3.752H3.034c-1.926 0-3.128-2.085-2.165-3.752Zm3.03.751a1.002 1.002 0 0 0-1.732 0L2.168 19.499A1.002 1.002 0 0 0 3.034 21h17.932a1.002 1.002 0 0 0 .866-1.5L12.866 3.994Z\"/>"}],"s":"<path d=\"M0 3.75A.75.75 0 0 1 .75 3h7.497c1.566 0 2.945.8 3.751 2.014A4.495 4.495 0 0 1 15.75 3h7.5a.75.75 0 0 1 .75.75v15.063a.752.752 0 0 1-.755.75l-7.682-.052a3 3 0 0 0-2.142.878l-.89.891a.75.75 0 0 1-1.061 0l-.902-.901a2.996 2.996 0 0 0-2.121-.879H.75a.75.75 0 0 1-.75-.75Zm12.75 15.232a4.503 4.503 0 0 1 2.823-.971l6.927.047V4.5h-6.75a3 3 0 0 0-3 3ZM11.247 7.497a3 3 0 0 0-3-2.997H1.5V18h6.947c1.018 0 2.006.346 2.803.98Z\"/>"},{"n":"changelog","l":"CHANGELOG","s":"<path d=\"M10 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2Zm-.5-2a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5V4a.5.5 0 0 0-.5-.5H10a.5.5 0 0 0-.5.5ZM6.17 4.165a.75.75 0 0 1-.335 1.006c-.228.114-.295.177-.315.201a.035.035 0 0 0-.008.016.423.423 0 0 0-.012.112v13c0 .07.008.102.012.112a.03.03 0 0 0 .008.016c.02.024.087.087.315.201a.749.749 0 1 1-.67 1.342c-.272-.136-.58-.315-.81-.598C4.1 19.259 4 18.893 4 18.5v-13c0-.393.1-.759.355-1.073.23-.283.538-.462.81-.598a.75.75 0 0 1 1.006.336ZM2.15 5.624a.75.75 0 0 1-.274 1.025c-.15.087-.257.17-.32.245C1.5 6.96 1.5 6.99 1.5 7v10c0 .01 0 .04.056.106.063.074.17.158.32.245a.75.75 0 0 1-.752 1.298C.73 18.421 0 17.907 0 17V7c0-.907.73-1.42 1.124-1.65a.75.75 0 0 1 1.025.274Z\"/>"}],"search":{"mode":0,"minChars":2,"maxResults":20,"placeholder":"Search","hotkeys":["k"],"noResultsFoundMsg":"Sorry, no results found.","recognizeLanguages":true,"languages":[0],"preload":false},"resources":{"History_Title_Label":"History","History_ClearLink_Label":"Clear","History_NoHistory_Label":"No history items","API_AccessFilter_Label":"Access","API_ParameterSection_Label":"PARAMETERS","API_SignatureSection_Label":"SIGNATURE","API_CopyHint_Label":"Copy","API_CopyNameHint_Label":"Copy name","API_CopyLinkHint_Label":"Copy link","API_CopiedAckHint_Label":"Copied!","API_MoreOverloads_Label":"more","API_MoreDropdownItems_Label":"More","API_OptionalParameter_Label":"optional","API_DefaultParameterValue_Label":"Default value","API_InheritedFilter_Label":"Inherited","Search_Input_Placeholder":"Search","Toc_Contents_Label":"Contents","Toc_RelatedClasses_Label":"Related Classes","History_JustNowTime_Label":"just now","History_AgoTime_Label":"ago","History_YearTime_Label":"y","History_MonthTime_Label":"mo","History_DayTime_Label":"d","History_HourTime_Label":"h","History_MinuteTime_Label":"m","History_SecondTime_Label":"s"}}; +var __DOCS_CONFIG__ = {"id":"prc8PLWQ9kFxCfIFwl288FIm+SGMEu8gsme","key":"Z66T82grmNDvt+ngpgfy68xzE61gJMytMgJ3fua/oOQ.UCwfd2nszKSwbaEDFIW0g+BRbtQ6xCMcMzWNMDDv6XAVn8Q+1CJvLY96dGlkRR/jux+FsPlegwnMFll6UhRkEQ.1515","base":"/pagy/","host":"ddnexus.github.io","version":"1.0.0","useRelativePaths":true,"documentName":"index.html","appendDocumentName":false,"trailingSlash":true,"preloadSearch":false,"cacheBustingToken":"3.5.0.767674440946","cacheBustingStrategy":"query","sidebarFilterPlaceholder":"Filter","toolbarFilterPlaceholder":"Filter","showSidebarFilter":true,"filterNotFoundMsg":"No member names found containing the query \"{query}\"","maxHistoryItems":15,"homeIcon":"<path d=\"M12.97 2.59a1.5 1.5 0 00-1.94 224 0l-7.5 6.363A1.5 1.5 0 003 10.097V19.5A1.5 1.5 0 004.5 21h4.75a.75.75 0 00.75-.75V14h4v6.25c0 .414.336.75.75.75h4.75a1.5 1.5 0 001.5-1.5v-9.403a1.5 1.5 0 00-.53-1.144l-7.5-6.363z\"></path>","access":[{"value":"public","label":"Public"},{"value":"protected","label":"Protected"}],"toolbarLinks":[{"id":"fields","label":"Fields"},{"id":"properties","label":"Properties"},{"id":"methods","label":"Methods"},{"id":"events","label":"Events"}],"sidebar":[{"n":"/","l":"Home","s":"<path d=\"M11.03 2.59a1.501 1.501 0 0 1 1.94 0l7.5 6.363a1.5 1.5 0 0 1 .53 1.144V19.5a1.5 1.5 0 0 1-1.5 1.5h-5.75a.75.75 0 0 1-.75-.75V14h-2v6.25a.75.75 0 0 1-.75.75H4.5A1.5 1.5 0 0 1 3 19.5v-9.403c0-.44.194-.859.53-1.144ZM12 3.734l-7.5 6.363V19.5h5v-6.25a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v6.25h5v-9.403Z\"/>"},{"n":"quick-start","l":"Quick Start","s":"<path d=\"M20.322.75h1.176a1.75 1.75 0 0 1 1.75 1.749v1.177a10.75 10.75 0 0 1-2.925 7.374l-1.228 1.304a23.699 23.699 0 0 1-1.596 1.542v5.038c0 .615-.323 1.184-.85 1.5l-4.514 2.709a.75.75 0 0 1-1.12-.488l-.963-4.572a1.305 1.305 0 0 1-.14-.129L8.04 15.96l-1.994-1.873a1.305 1.305 0 0 1-.129-.14l-4.571-.963a.75.75 0 0 1-.49-1.12l2.71-4.514c.316-.527.885-.85 1.5-.85h5.037a23.668 23.668 0 0 1 1.542-1.594l1.304-1.23A10.753 10.753 0 0 1 20.321.75Zm-6.344 4.018v-.001l-1.304 1.23a22.275 22.275 0 0 0-3.255 3.851l-2.193 3.29 1.859 1.744a.545.545 0 0 1 .034.034l1.743 1.858 3.288-2.192a22.263 22.263 0 0 0 3.854-3.257l1.228-1.303a9.251 9.251 0 0 0 2.517-6.346V2.5a.25.25 0 0 0-.25-.25h-1.177a9.252 9.252 0 0 0-6.344 2.518ZM6.5 21c-1.209 1.209-3.901 1.445-4.743 1.49a.236.236 0 0 1-.18-.067.236.236 0 0 1-.067-.18c.045-.842.281-3.534 1.49-4.743.9-.9 2.6-.9 3.5 0 .9.9.9 2.6 0 3.5Zm-.592-8.588L8.17 9.017c.23-.346.47-.685.717-1.017H5.066a.25.25 0 0 0-.214.121l-2.167 3.612ZM16 15.112c-.333.248-.672.487-1.018.718l-3.393 2.262.678 3.223 3.612-2.167a.25.25 0 0 0 .121-.214ZM17.5 8a1.5 1.5 0 1 1-3.001-.001A1.5 1.5 0 0 1 17.5 8Z\"/>"},{"n":"playground","l":"Try the demo now! \uD83C\uDD95","s":"<path d=\"M9.5 15.584V8.416a.5.5 0 0 1 .77-.42l5.576 3.583a.5.5 0 0 1 0 .842l-5.576 3.584a.5.5 0 0 1-.77-.42Z\"/><path d=\"M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11-9.5A9.5 9.5 0 0 0 2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5Z\"/>"},{"n":"docs","l":"Documentation","c":false,"i":[{"n":"prerequisites","l":"Prerequisites","s":"<path d=\"M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z\"/><path d=\"m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z\"/>"},{"n":"migration-guide","l":"Migrate from other gems","s":"<path d=\"M1.513 1.96a1.374 1.374 0 0 1 1.499-.21l19.335 9.215a1.147 1.147 0 0 1 0 2.07L3.012 22.25a1.374 1.374 0 0 1-1.947-1.46L2.49 12 1.065 3.21a1.375 1.375 0 0 1 .448-1.25Zm2.375 10.79-1.304 8.042L21.031 12 2.584 3.208l1.304 8.042h7.362a.75.75 0 0 1 0 1.5Z\"/>"},{"n":"how-to","l":"How To","s":"<path d=\"M7.875 2.292a.114.114 0 0 0-.032.018A7.239 7.239 0 0 0 4.75 8.25a7.248 7.248 0 0 0 3.654 6.297c.57.327.982.955.941 1.682v.002l-.317 6.058a.75.75 0 1 1-1.498-.078l.317-6.062v-.004c.006-.09-.047-.215-.188-.296A8.749 8.749 0 0 1 3.25 8.25a8.738 8.738 0 0 1 3.732-7.169 1.547 1.547 0 0 1 1.709-.064c.484.292.809.835.809 1.46v4.714a.25.25 0 0 0 .119.213l2.25 1.385c.08.05.182.05.262 0l2.25-1.385a.25.25 0 0 0 .119-.213V2.478c0-.626.325-1.169.81-1.461a1.547 1.547 0 0 1 1.708.064 8.741 8.741 0 0 1 3.732 7.17 8.747 8.747 0 0 1-4.41 7.598c-.14.081-.193.206-.188.296v.004l.318 6.062a.75.75 0 1 1-1.498.078l-.317-6.058v-.002c-.041-.727.37-1.355.94-1.682A7.247 7.247 0 0 0 19.25 8.25a7.239 7.239 0 0 0-3.093-5.94.114.114 0 0 0-.032-.018l-.01-.001c-.003 0-.014 0-.031.01-.036.022-.084.079-.084.177V7.19c0 .608-.315 1.172-.833 1.49l-2.25 1.385a1.75 1.75 0 0 1-1.834 0l-2.25-1.384A1.752 1.752 0 0 1 8 7.192V2.477c0-.098-.048-.155-.084-.176a.068.068 0 0 0-.031-.011l-.01.001Z\"/>"},{"n":"api","l":"API","c":false,"i":[{"n":"aria","l":"ARIA Attributes"},{"n":"pagy","l":"Pagy"},{"n":"backend","l":"Pagy::Backend"},{"n":"calendar","l":"Pagy::Calendar"},{"n":"console","l":"Pagy::Console"},{"n":"countless","l":"Pagy::Countless"},{"n":"frontend","l":"Pagy::Frontend"},{"n":"i18n","l":"Pagy::I18n"},{"n":"stylesheets","l":"Stylesheets"},{"n":"javascript","l":"Javascript","i":[{"n":"setup","l":"Setup"},{"n":"navs","l":"Navs"},{"n":"combo-navs","l":"Combo Navs"},{"n":"ajax","l":"AJAX"}]}],"s":"<path d=\"M12.876.64V.639l8.25 4.763c.541.313.875.89.875 1.515v9.525a1.75 1.75 0 0 1-.875 1.516l-8.25 4.762a1.748 1.748 0 0 1-1.75 0l-8.25-4.763a1.75 1.75 0 0 1-.875-1.515V6.917c0-.625.334-1.202.875-1.515L11.126.64a1.748 1.748 0 0 1 1.75 0Zm-1 1.298L4.251 6.34l7.75 4.474 7.75-4.474-7.625-4.402a.248.248 0 0 0-.25 0Zm.875 19.123 7.625-4.402a.25.25 0 0 0 .125-.216V7.639l-7.75 4.474ZM3.501 7.64v8.803c0 .09.048.172.125.216l7.625 4.402v-8.947Z\"/>"},{"n":"extras","l":"Extras","c":false,"i":[{"n":"arel","l":"Arel"},{"n":"array","l":"Array"},{"n":"bootstrap","l":"Bootstrap"},{"n":"bulma","l":"Bulma"},{"n":"calendar","l":"Calendar"},{"n":"countless","l":"Countless"},{"n":"elasticsearch_rails","l":"Elasticsearch Rails"},{"n":"gearbox","l":"Gearbox"},{"n":"headers","l":"Headers"},{"n":"i18n","l":"I18n"},{"n":"items","l":"Items"},{"n":"jsonapi","l":"Jsonapi"},{"n":"meilisearch","l":"Meilisearch"},{"n":"metadata","l":"Metadata"},{"n":"overflow","l":"Overflow"},{"n":"pagy","l":"Pagy"},{"n":"searchkick","l":"Searchkick"},{"n":"standalone","l":"Standalone"},{"n":"tailwind","l":"Tailwind"},{"n":"trim","l":"Trim"}],"s":"<path d=\"M12.75 7.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z\"/><path d=\"M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Z\"/>"},{"n":"troubleshooting","l":"Troubleshooting","s":"<path d=\"M13 17.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm-.25-8.25a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5Z\"/><path d=\"M9.836 3.244c.963-1.665 3.365-1.665 4.328 0l8.967 15.504c.963 1.667-.24 3.752-2.165 3.752H3.034c-1.926 0-3.128-2.085-2.165-3.752Zm3.03.751a1.002 1.002 0 0 0-1.732 0L2.168 19.499A1.002 1.002 0 0 0 3.034 21h17.932a1.002 1.002 0 0 0 .866-1.5L12.866 3.994Z\"/>"}],"s":"<path d=\"M0 3.75A.75.75 0 0 1 .75 3h7.497c1.566 0 2.945.8 3.751 2.014A4.495 4.495 0 0 1 15.75 3h7.5a.75.75 0 0 1 .75.75v15.063a.752.752 0 0 1-.755.75l-7.682-.052a3 3 0 0 0-2.142.878l-.89.891a.75.75 0 0 1-1.061 0l-.902-.901a2.996 2.996 0 0 0-2.121-.879H.75a.75.75 0 0 1-.75-.75Zm12.75 15.232a4.503 4.503 0 0 1 2.823-.971l6.927.047V4.5h-6.75a3 3 0 0 0-3 3ZM11.247 7.497a3 3 0 0 0-3-2.997H1.5V18h6.947c1.018 0 2.006.346 2.803.98Z\"/>"},{"n":"changelog","l":"CHANGELOG","s":"<path d=\"M10 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2Zm-.5-2a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5V4a.5.5 0 0 0-.5-.5H10a.5.5 0 0 0-.5.5ZM6.17 4.165a.75.75 0 0 1-.335 1.006c-.228.114-.295.177-.315.201a.035.035 0 0 0-.008.016.423.423 0 0 0-.012.112v13c0 .07.008.102.012.112a.03.03 0 0 0 .008.016c.02.024.087.087.315.201a.749.749 0 1 1-.67 1.342c-.272-.136-.58-.315-.81-.598C4.1 19.259 4 18.893 4 18.5v-13c0-.393.1-.759.355-1.073.23-.283.538-.462.81-.598a.75.75 0 0 1 1.006.336ZM2.15 5.624a.75.75 0 0 1-.274 1.025c-.15.087-.257.17-.32.245C1.5 6.96 1.5 6.99 1.5 7v10c0 .01 0 .04.056.106.063.074.17.158.32.245a.75.75 0 0 1-.752 1.298C.73 18.421 0 17.907 0 17V7c0-.907.73-1.42 1.124-1.65a.75.75 0 0 1 1.025.274Z\"/>"}],"search":{"mode":0,"minChars":2,"maxResults":20,"placeholder":"Search","hotkeys":["k"],"noResultsFoundMsg":"Sorry, no results found.","recognizeLanguages":true,"languages":[0],"preload":false},"resources":{"History_Title_Label":"History","History_ClearLink_Label":"Clear","History_NoHistory_Label":"No history items","API_AccessFilter_Label":"Access","API_ParameterSection_Label":"PARAMETERS","API_SignatureSection_Label":"SIGNATURE","API_CopyHint_Label":"Copy","API_CopyNameHint_Label":"Copy name","API_CopyLinkHint_Label":"Copy link","API_CopiedAckHint_Label":"Copied!","API_MoreOverloads_Label":"more","API_MoreDropdownItems_Label":"More","API_OptionalParameter_Label":"optional","API_DefaultParameterValue_Label":"Default value","API_InheritedFilter_Label":"Inherited","Search_Input_Placeholder":"Search","Toc_Contents_Label":"Contents","Toc_RelatedClasses_Label":"Related Classes","History_JustNowTime_Label":"just now","History_AgoTime_Label":"ago","History_YearTime_Label":"y","History_MonthTime_Label":"mo","History_DayTime_Label":"d","History_HourTime_Label":"h","History_MinuteTime_Label":"m","History_SecondTime_Label":"s"}}; diff --git a/resources/js/search.json b/resources/js/search.json index 43a05ee5f..0b39f41be 100644 --- a/resources/js/search.json +++ b/resources/js/search.json @@ -1 +1 @@ -[[{"l":"Pagy","p":["Gem Version Ruby Ruby Test E2E Test Coverage Rubocop Status MIT license CII Best Practices Commits Downloads Stars"]},{"i":"the-best-pagination-ruby-gem","l":"\uD83C\uDFC6 The Best Pagination Ruby Gem \uD83E\uDD47"},{"i":"-whats-new-in-80-","l":"✴ What's new in 8.0+ ✴","p":["WARNING: The foundation, materialize, semantic and uikit CSS extras have been discontinued and will be removed in v9 (See the details)","New Pagy Playground to showcase, clone and develop pagy APPs without any setup on your side (try the pagy demo)","New :max_pages variable to limit the pagination regardless the actual count","Better frontend helpers","See the Changelog for possible breaking changes"]},{"i":"#","p":["Each dot in the visualization above represents the resources that Pagy consumes for one full rendering. The other gems consume hundreds of times as much for the same rendering.","The IPS/Kb ratio is calculated out of speed (IPS) and Memory (Kb): it shows how well each gem uses each Kb of memory it allocates/consumes.","Notice: the above charts refers to the comparison of the basic pagy v3.0.0 helper with will_paginate v3.1.7 and kaminari v1.1.1.","While it's not up-to-date, you can expect roughly similar results with the latest versions, maybe a bit less dramatic in performance due to the multiple features added to pagy since v3 (e.g. customizable and translated aria-labels). However, consider that the difference become A LOT bigger in favor of pagy if you use *nav_js helpers, Pagy::Countless or JSON and client side pagination that are not part of the comparison because missing in the other gems.","See the Detailed Gems Comparison for full details."]},{"i":"it-does-it-all-better","l":"\uD83E\uDD29 It does it all. Better.","p":["It works in any environment With Rack frameworks (Rails, Sinatra, Padrino, etc.) or in pure ruby without Rack","It works with any collection With any ORM, any DB, any search gem, elasticsearch_rails, meilisearch, searchkick, ransack, and just about any list, even if you cannot count it","It supports all kinds of pagination calendar, countless, geared, incremental, auto-incremental, infinite, headers, JSON, cursor","It supports the most popular CSS Frameworks and APIs bootstrap, bulma, tailwind, JSON:API","It supports faster client-side rendering With classic or innovative UI components (see Javascript Components) or by serving JSON to your favorite Javascript framework","It has 100% of test coverage for Ruby, HTML and Javascript E2E ( see Pagy Workflows CI)"]},{"l":"Code Structure","p":["Pagy has a very slim core code very easy to understand and use.","It has a quite fat set of optional extras that you can explicitly require for very efficient and modular customization ( see extras)","It has no dependencies: it produces its own HTML, URLs, i18n with its own specialized and fast code","Its methods are accessible and overridable right where you use them (no pesky monkey-patching needed)"]},{"l":"Unlike the other gems","p":["Pagy is very modular and does not load any unnecessary code ( see why...)_","It doesn't impose limits even with collections|scopes that already used limit and offset ( see how...)","It raises Pagy::OverflowError exceptions that you can rescue from ( see how...) or use the overflow extra for a few ready to use common behaviors","It does not impose any difficult-to-override logic or output"]},{"i":"it-s-easy-to-use-and-customize","l":"\uD83D\uDE0E It's easy to use and customize","p":["(See all the Backend Tools)","(See all the CSS Framework Extras)","(See all the Search Extras)","(See the Quick Start)","calendar extra","Extras add special options and manage different components, behaviors, Frontend or Backend environments... usually by just requiring them (and optionally overriding some default).","Optionally set your defaults in the pagy initializer:","Or, choose from the following view helpers:","pagy_combo_nav_js","pagy_combo_nav_js(@pagy)","pagy_info","pagy_info(@pagy)","pagy_items_selector_js","pagy_nav","pagy_nav_js","pagy_nav_js(@pagy)","pagy_nav(@calendar[:year]) pagy_nav(@calendar[:month])(other units: :quarter, :week, :day and custom)","pagy_nav(@pagy)","Preview (Bootstrap Style shown)","View Helper Name"]},{"l":"Backend Extras","p":["arel: Provides better performance of grouped ActiveRecord collections","array: Paginate arrays efficiently.","calendar: Add pagination filtering by calendar time unit (year, quarter, month, week, day, custom)","countless: Paginate without the need of any count, saving one query per rendering","elasticsearch_rails: Paginate ElasticsearchRails response objects","headers: Add RFC-8288 compliant http response headers (and other helpers) useful for API pagination","jsonapi: Implement the JSON:API specifications for pagination","meilisearch: Paginate Meilisearch results","metadata: Provides the pagination metadata to Javascript frameworks like Vue.js, react.js, etc.","searchkick: Paginate Searchkick::Results objects"]},{"l":"Frontend Extras","p":["bootstrap: Add nav helpers for the Bootstrap pagination component","bulma: Add nav helpers for the Bulma CSS pagination component","pagy: Adds the pagy styled versions of the javascript-powered nav helpers and other components to support countless or navless pagination (incremental, auto-incremental, infinite pagination).","tailwind: Ready to use style snippet for Tailwind CSS"]},{"l":"Extra Features and Tools","p":["Pagy::Console: Use pagy in the irb/rails console even without any app nor configuration","gearbox: Automatically change the number of items per page depending on the page number","i18n: Use the I18n gem instead of the faster pagy-i18n implementation","items: Allow the client to request a custom number of items per page with an optional selector UI","overflow: Allow easy handling of overflowing pages","standalone: Use pagy without any request object, nor Rack environment/gem, nor any defined params method","trim: Remove the page=1 param from the first page link","See also the How To Page"]},{"i":"it-s-well-documented-and-supported","l":"\uD83E\uDD13 It's well documented and supported"},{"l":"Documentation","p":["Migrate from WillPaginate and Kaminari(practical guide)","Quick Start","How To (quick recipes)","Changelog","Deprecations","How Pagy's Docs work?"]},{"l":"Support","p":["Discussions","Issues"]},{"l":"Posts and tutorials","p":["Benchmarks and Memory Profiles Source(Rails app repository)","Build Load More Pagination with Pagy and Rails Hotwire by Maful. ( This tutorial shows how you can turbo_stream with GET requests).","Building a dynamic data grid with search and filters using rails, hotwire and ransack by Benito Serna.","Detailed Gems Comparison(charts and analysis)","Endless Scroll / Infinite Loading with Turbo Streams & Stimulus by Stefan Wienert.","Faster Pagination with Pagy introductory tutorial by Sirajus Salekin","Handling Pagination When POSTing Complex Search Forms by Ben Koshy.","How to make your pagination links sticky + bounce at the bottom of your page by Ben Koshy.","How to Override pagy methods only in specific circumstances by Ben Koshy.","Integrating Pagy with Hanami by Paweł Świątkowski","Migrate from WillPaginate and Kaminari(practical guide)","Pagination and infinite scrolling with Rails and the Hotwire stack by David Colby","Pagination for Beginners: What is it? Why bother? by Ben Koshy.","Pagination with Hotwire by Jonathan Greenberg","Pagination with Pagy by Tiago Franco","Quick guide for Pagy with Sinatra and Sequel by Victor Afanasev","Stateful Tabs with Pagy by Chris Seelus","한국어 튜토리얼","日本語の投稿"]},{"l":"Screencasts"},{"i":"top-contributors","l":"Top \uD83D\uDCAF Contributors"},{"i":"credits","l":"\uD83D\uDC4F Credits","p":["Many thanks to:","Ben Koshy for his contributions to the documentation, user support and interaction with external frameworks","GoRails for the great Pagy Screencast and their top notch Rails Episodes","Imaginary Cloud for continually publishing high-interest articles and helping to share Pagy when it just started","JetBrains for their free OpenSource license project","The Stargazers for showing their support"]},{"i":"repository-info","l":"\uD83D\uDCE6 Repository Info","p":["See Contributing","Pagy follows the Semantic Versioning 2.0.0. Please, check the Changelog for breaking changes introduced by mayor versions. Using pessimistic version constraint in your Gemfile will ensure smooth upgrades.","The master branch is the latest rubygem-published release. It also contains docs and comment changes that don't affect the published code. It is never force-pushed.","The dev branch is the development branch with the new code that will be merged in the next release. It could be force-pushed.","Expect any other branch to be internal, experimental, force-pushed, rebased and/or deleted even without merging."]},{"i":"related-projects","l":"\uD83D\uDC9E Related Projects","p":["Search rubygems.org"]},{"i":"license","l":"\uD83D\uDCC3 License","p":["MIT"]}],[{"l":"Quick Start","p":["If you want to just try Pagy before using it in your own app, you have a couple of alternatives...","Run the interactive demo from your terminal:","...and point your browser to http://0.0.0.0:8000","Interact with every method, helper and extra in a IRB console without any setup:","...and use it without any app"]},{"l":"1. Install","p":["If you use Bundler, add the gem in the Gemfile, optionally avoiding the next major version with breaking changes ( see RubyGem Specifiers):","If you don't use Bundler, install and require the Pagy gem:"]},{"l":"2. Configure","p":["Download the configuration file linked below and save it into the config/initializers dir","Quick Start","Download the configuration file linked below and require it when your app starts","Uncomment/edit the pagy.rb file in order to explicitly require the extras you need and eventually customize the static Pagy::DEFAULT variables in the same file.","You can further customize the variables per instance, by explicitly passing any variable to the Pagy*.new constructor or to any pagy* backend/controller method."]},{"l":"3. Backend Setup","p":["For search backends see: elasticsearch_rails, meilisearch, searchkick, ransack.","You may also use the calendar, countless, geared, incremental, auto-incremental, infinite pagination"]},{"l":"4. Render the pagination","p":["Your pagination is rendered on the server","For native pagy helpers (used also with tailwind), you can integrate the Pagy Stylesheets","For different CSS frameworks and different helpers (static, responsive, compact, etc.), you can look at the bootstrap, bulma extras","Your pagination is rendered by Vue.js, react.js, ...","Your API is consumed by some client"]}],[{"l":"Pagy Playground","p":["You can showcase, clone and develop a few pagy APPs without the need to setup anything on your side!","Depending on your environment you may need to prepend bundle exec in all the examples shown."]},{"l":"Pagy Apps","p":["We have a few single-file apps ready to run in your browser for various purposes: they are all tested and used to run the E2e Test workflow."]},{"l":"1. Repro App","p":["You can use this app as a starting point to try pagy or reproduce issues, in order to get support or file bugs reports.","You should find the ./repro.ru cloned app file in the current dir. Feel free to rename or move it as you like.","This command runs your rackup app with a puma server, with rerun that auto-restart it when it changes:","Point a browser to http://0.0.0.0:8000","Edit it at will.","Bundler installs the required gems during the first run. After that you can skip the rubygem checks by passing the --no-istall flag"]},{"l":"2. Rails App","p":["You can use this app as a starting point to reproduce rails related pagy issues. It has the same usage as the Repro App. i.e.:"]},{"l":"3. Demo App","p":["This is the interactive showcase for all the pagy helpers and CSS styles.","Run the interactive demo from your terminal:","...and point your browser to http://0.0.0.0:8000","Run pagy clone demo to inspect the app file","If you want to see how your CSSs changes look, you can follow the same usage as the Repro App to iterate through changes."]},{"l":"4. Calendar App","p":["This is the interactive showcase/repro for the calendar extra:","Run the interactive demo from your terminal:","...and point your browser to http://0.0.0.0:8000","Run pagy clone calendar to inspect the app file.","If you need to reproduce any calendar related issue, you can follow the same usage as the Repro App."]},{"l":"Troubleshooting"},{"l":"Bundler inline","p":["All the pagy apps use bundler/inline.","Depending on your environment you might get this message for some gem:","If bundle exec doesn't solve it, then try bundle update and gem cleanup.","If after that you get into another error:","then gem pristine GEMNAME should solve the problem."]},{"l":"Rerun","p":["Rerun is used for restarting your app automatically during development.","That's very convenient, but it may still have some rough edges:","Your app is in a dir with looping simlinks, and the listen gem cannot handle it.","It might not work properly or it may require additional dependencies.","Pass the --no-rerun option to work with rackup only."]}],[{"l":"Prerequisites"},{"l":"Ruby","p":["Pagy follows the ruby end-of-life supported rubies."]},{"l":"Working environments","p":["Your app uses a Rack based framework (Rails, Sinatra, Padrino, etc.)","Use pagy normally","Your app does not use a Rack based framework.","Use the standalone extra","With or without any app nor configuration","Use the Pagy::Console"]},{"l":"Supported collections","p":["Out of the box pagy supports ActiveRecord::Relation, array, elasticsearch_rails, searchkick and meilisearch collections.","In order to paginate other collections, search for \"paginate\" in the search field above."]}],[{"i":"migrate-willpaginatekaminari","l":"Migrate WillPaginate/Kaminari","p":["This page tries to cover most of the standard changes you will need to make in order to to migrate from a legacy pagination, however, if the legacy pagination is highly customized you may need more digging into the Pagy documentation.","Feel free to ask via Pagy Support if you need help."]},{"l":"Steps","p":["The Pagy API is quite different from other pagination gems, so there is not always a one-to-one correlation between the changes you will have to make, however, if you split the process in the following general steps it should be quite simple.","Removing the legacy code, trying to convert the statements that have a direct relation with Pagy","Running the app so to raise exceptions in order to find legacy code that may still be in place","When the app runs without errors, adjusting the pagination to look and work as before: just many times faster and using many times less memory"]},{"l":"Removing the old code","p":["In this step you will search statements from legacy pagination gems, remove them and possibly write the equivalent Pagy statements if that makes sense for Pagy:","If it makes sense, you should add the equivalent Pagy statement and remove the legacy statement(s).","If it doesn't make sense, then just remove the legacy statement.","Don't worry about missing something in this step: if anything won't work as before the next steps will fix it."]},{"l":"Preparation","p":["Download the pagy initializer: you will edit it during the process. Migrate from other gems","Replace the legacy gem with gem pagy in the Gemfile and bundle, or install and require the gem if you don't use bundler.","Ensure that the legacy gem will not get loaded anymore (or it could mask some old statement still in place and not converted)","Add the include Pagy::Backend statement to the application controller.","Add the include Pagy::Frontend statement to the application helper.","Keep handy the legacy gem doc and the Pagy API doc in parallel."]},{"l":"Application-wide search and replace","p":["Search for the class name of the pagination gem to migrate from, for example WillPaginate or Kaminari. You should find most of the code relative to global gem configuration, or monkey patching.","For example, the following configuration are equivalent:","Remove all the legacy settings of the old gem(s) and uncomment and edit the new settings in the pagy.rb initializer (see How to configure pagy)."]},{"l":"Cleanup the Models","p":["One of the most noticeable difference between the legacy gems and Pagy is that Pagy doesn't mess at all with the models.","The other gems are careless about adding methods, scopes, and even configuration settings to them, so you will find different kinds of statements scattered around in your models. You should remove them all and eventually add the equivalent code where it makes sense to Pagy, which of course is absolutely not in the models.","For example, you may want to search for keywords like per_page, per and such, which are actually configuration settings. They should either go into the pagy.rb initializer if they are global to the app, or into the specific pagy call in the controller if they are specific to an action.","If the app uses the page scope in some of its methods or scopes in some model, that should be removed (including removing the argument used to pass the page number to the method/scope), leaving the rest of the scope in place. Search where the app uses the already paginated scope in the controllers, and use the scope in a regular pagy statement. For example:"]},{"l":"Search and replace in the Controllers","p":["In the controllers, the occurrence of statements from legacy pagination should have a one-to-one relationship with the Pagy pagination, so you should be able to go through each of them and convert them quite easily.","Search for keywords like page and paginate statements and use the pagy method instead. For example:"]},{"l":"Search and replace in the Views","p":["Also in the views, the occurrence of statements from legacy pagination should have a one-to-one relationship with the Pagy pagination, so you should be able to go through each of them and convert them quite easily.","Search for keywords like will_paginate and paginate statement and use one of the pagy_nav methods. For example:"]},{"l":"Find the remaining code","p":["If the app has tests it's time to run them. If not, start the app and navigate through its pages.","If anything of the old code is still in place you should get some exception. In that case, just remove the old code and retry until there will be no exception."]},{"l":"Fine tuning","p":["If the app is working and displays the pagination, it's time to adjust Pagy as you need, but if the old pagination was using custom items (e.g. custom params, urls, links, html elements, etc.) it will likely not work without some possibly easy adjustment.","Please take a look at the topics in the how-to documentation: that should cover most of your custom needs."]},{"l":"CSS","p":["The css styling that you may have applied to the pagination elements may need some minor change. However if the app uses the pagination from bootstrap (or some other framework), the same CSSs should work seamlessly with the pagy nav helpers."]},{"l":"I18n","p":["If the app uses I18n you should follow the Pagy::I18n documentation."]}],[{"l":"How To","p":["This page contains the practical tips and examples to get the job done with Pagy. If there is something missing, or some topic that you think should be added, fixed or explained better, please open an issue."]},{"l":"Control the items per page","p":["You can control the items per page with the items variable. (Default 20)","You can set its default in the pagy.rb initializer (see How to configure pagy). For example:","You can also pass it as an instance variable to the Pagy.new method or to the pagy controller method:","The defined :items variable overrides any limit already set in ActiveRecord collections:","See also a couple of extras that handle the :items in some special way:","gearbox: Automatically change the number of items per page depending on the page number","items: Allow the client to request a custom number of items per page with an optional selector UI"]},{"l":"Control the page links","p":["You can control the number and position of the page links in the navigation through the :size variable or override the series method."]},{"l":"Simple nav","p":["You can set the :size variable to a single positive Integer to represent the total number of page links rendered. The current page will be placed as centered as possible in the series.","For example:","Setting the :size variable as a single integer has a few advantages over the classic way. It uses a simpler and faster algorithm, the series length is more constant, cleaner and less confusing to the user. On the other hand it does not allow the user to jump to the first or last page of a long series, which may or may not be a limitation. For example: with a navigation using Pagy::Countless or Calendar it is a clear advantage."]},{"l":"Classic nav","p":["You can set the :size variable to an array of 4 integers in order to specify which and how many page links to show.","The default is [1,4,4,1], which means that you will get 1 initial page, 4 pages before the current page, 4 pages after the current page, and 1 final page.","As usual you can set the :size variable as a global default by using the Pagy::DEFAULT hash or pass it directly to the pagy method.","The navigation links will contain the number of pages set in the variables:","size[0]... size[1] current page size[2]... size[3]- e.g.:","As you can see by the result of the series method, you get 3 initial pages, 1 :gap(series interrupted), 4 pages before the current page, the current :page(which is a string), 4 pages after the current page, another :gap and 3 final pages.","You can easily try different options (also asymmetrical) in a console by changing the :size. Just check the series array to see what it contains when used in combination with different core variables."]},{"l":"Skip the page links","p":["If you want to skip the generation of the page links, just set the :size variable to an empty array:"]},{"l":"Customize the series","p":["If changing the :size is not enough for your requirements (e.g. if you need to add intermediate segments or midpoints in place of gaps) you should override the series method. See more details and examples here."]},{"l":"Pass the page number","p":["You don't need to explicitly pass the page number to the pagy method, because it is pulled in by the pagy_get_vars(which is called internally by the pagy method). However you can force a page number by just passing it to the pagy method. For example:","That will explicitly set the :page variable, overriding the default behavior (which usually pulls the page number from the params[:page])."]},{"l":"Customize the dictionary","p":["Pagy composes its output strings using standard i18n dictionaries. That can be used to change the language and customize your specific app.","If you are ok with the default supported locale dictionaries just refer to Pagy::I18n.","If you want to customize the translations or some specific output, you should edit the relevant entries in the pagy dictionary.","If you explicitly use the i18n extra, override the pagy target entries in your own custom dictionary (refer to the I18n official documentation).","If you don't use the above extra (and rely on the pagy faster code) you can copy and edit the dictionary files that your app uses and configure pagy to use them."]},{"l":"Customize the ARIA labels","p":["You can customize the aria-label attributes of all the pagy helpers by passing the :aria_label string ( See pagy_nav)","You can also replace the pagy.aria_label.nav strings in the dictionary, as well as the pagy.aria_label.prev and the pagy.aria_label.next.","See more details in the ARIA attributes Page."]},{"l":"Customize the page param","p":["Pagy uses the :page_param variable to determine the param it should get the page number from and create the URL for. Its default is set as Pagy::DEFAULT[:page_param] = :page, hence it will get the page number from the params[:page] and will create page URLs like ./?page=3 by default.","You may want to customize that, for example to make it more readable in your language, or because you need to paginate different collections in the same action. Depending on the scope of the customization, you have a couple of options:","Pagy::DEFAULT[:page_param] = :custom_param will be used as the global default","pagy(scope, page_param: :custom_param) or Pagy.new(count:100, page_param: :custom_param) will be used for a single instance (overriding the global default)","You can also override the pagy_get_page if you need some special way to get the page number."]},{"l":"Customize the link attributes","p":["If you need to customize some HTML attribute of the page links, you may not need to override the pagy_nav* helper. It might be enough to pass some extra attribute string with the :anchor_string variable. For example:","See more advanced details about The anchor_string variable"]},{"l":"Customize the params","p":["When you need to add some custom param or alter the params embedded in the URLs of the page links, you can set the variable :params to a Hash of params to add to the URL, or a Proc that can edit/add/delete the request params.","If it is a Proc it will receive the key-stringified params hash complete with the page param and it should return a possibly modified version of it.","An example using except and merge!:","You can also use the :fragment variable to add a fragment the URLs of the pages:","For performance reasons the :fragment string must include the #!"]},{"l":"Customize the URL","p":["When you need something more radical with the URL than just massaging the params, you should override the pagy_url_for right in your helper.","If you are also using the trim extra you should also override the pagy_trim method or the Pagy.trim javascript function.","The following are a couple of examples."]},{"l":"Enable fancy-routes","p":["The following is a Rails-specific alternative that supports fancy-routes (e.g. get 'your_route(/:page)' ... that produce paths like your_route/23 instead of your_route?page=23):","The above overridden method is quite slower than the original because it passes through the rails helpers. However that gets mitigated by the internal usage of pagy_anchor which calls the method only once even in the presence of many pages."]},{"l":"POST with page links","p":["You may need to POST a very complex search form that would generate an URL potentially too long to be handled by a browser, and your page links may need to use POST and not GET. In that case you can try this simple solution:","That would produce links that look like e.g. a href=22/a. Then you can attach a javascript \"click\" event on the page links. When triggered, the href content (i.e. the page number) should get copied to a hidden page input and the form should be posted.","For a broader tutorial about this topic see Handling Pagination When POSTing Complex Search Forms by Ben Koshy."]},{"l":"Customize the item name","p":["The pagy_info and the pagy_items_selector_js helpers use the \"item\"/\"items\" generic name in their output. You can change that by editing the values of the pagy.item_name i18n key in the dictionary files that your app is using.","Besides you can also pass the :item_name by passing an already pluralized string directly to the helper call:"]},{"l":"Customize CSS styles","p":["For all its own interactive helpers the pagy gem includes a few stylesheets that you can customize.","Besides that, pagy provides a few frontend extras for bootstrap, bulma and tailwind that come with a decent styling provided by their respective framework.","If you need to further customize the styles provided by the extras, you don't necessary need to override the helpers in most of them: here are a few alternatives:","Check wether the specific extra offers customization (e.g. bulma)","Define the CSS styles to apply to the pagy CSS classes","If sass/scss is available: extend the pagy CSS classes with some framework defined class, using the @extend sass/scss directive","Use the jQuery addClass method","Use a couple of lines of plain javascript"]},{"i":"override-css-rules-in-element-style-attribute","l":"Override CSS rules in element \"style\" attribute","p":["In order to get a decent default look, a couple of helpers (i.e. pagy*_combo_nav_js, pagy*_items_selector_js) assign element style attributes to one or more tags. You can override their rules in your own stylesheets by using the attribute [style] selector and !important. Here is an example for overriding the width of the input element:"]},{"l":"Override pagy methods","p":["You include the pagy modules in your controllers and helpers, so if you want to override any of them, you can redefine them right in your code, where you included them.","You can read more details in the nice How to Override pagy methods only in specific circumstances mini-post by Ben Koshy.","Also, consider that you can use prepend if you need to do it globally:"]},{"i":"override-pagy_get_count-use-count_documents-with-mongoid","l":"Override pagy_get_count: use count_documents with Mongoid"},{"l":"Paginate an Array","p":["See the array extra."]},{"l":"Paginate ActiveRecord collections","p":["Pagy works out of the box with ActiveRecord collections, however here are a few specific cases that might be treated differently:"]},{"l":"Grouped collection","p":["For better performance of grouped ActiveRecord collection counts, you may want to take a look at the arel extra."]},{"l":"Decorated collection","p":["Do it in 2 steps: first get the page of records without decoration, and then apply the decoration to it. For example:"]},{"i":"custom-scope-count","l":"Custom scope/count","p":["Your scope might become complex and the default pagy collection.count(:all) may not get the actual count. In that case you can get the right count in a couple of ways:"]},{"l":"Ransack results","p":["Ransack result returns an ActiveRecord collection, which can be paginated out of the box. For example:"]},{"l":"PostgreSQL Collections","p":["Always order your colections!"]},{"l":"Paginate for generic API clients","p":["When your app is a service that doesn't need to serve any UI, but provides an API to some sort of client, you can serve the pagination metadata as HTTP headers added to your response.","In that case you don't need the Pagy::Frontend nor any frontend extra. You should only require the headers extra and use its helpers to add the headers to your responses."]},{"i":"paginate-with-jsonapi","l":"Paginate with JSON:API","p":["See the jsonapi extra."]},{"l":"Paginate for Javascript Frameworks","p":["If your app uses ruby as pure backend and some javascript frameworks as the frontend (e.g. Vue.js, react.js, ...), then you may want to generate the whole pagination UI directly in javascript (with your own code or using some available javascript module).","In that case you don't need the Pagy::Frontend nor any frontend extra. You should only require the metadata extra and pass the pagination metadata in your JSON response."]},{"l":"Paginate search framework results","p":["Pagy has a few of extras for gems returning search results:","elasticsearch_rails","searchkick","meilisearch"]},{"l":"Paginate by id instead of offset","p":["With particular requirements/environment an id-based pagination might work better than a classical offset-based pagination, You can use an interesting approach proposed here."]},{"l":"Paginate by date instead of a fixed number of items","p":["Use the calendar extra that adds pagination filtering by calendar time unit (year, quarter, month, week, day)."]},{"l":"Paginate multiple independent collections","p":["By default pagy tries to derive parameters and variables from the request and the collection, so you don't have to explicitly pass it to the pagy* method. That is very handy, but assumes you are paginating a single collection per request.","When you need to paginate multiple collections in a single request, you need to explicitly differentiate the pagination objects. You have the following commong ways to do so:"]},{"l":"Pass the request path","p":["By default pagy generates its links reusing the same request_path of the request, however if you want to generate links pointing to a different controller/path, you should explicitly pass the targeted :request_path. For example:","Path customization typically required when rendering multiple @pagy instances in the same view. e.g.:"]},{"l":"Use separate turbo frames actions","p":["If you're using hotwire( turbo-rails being the Rails implementation), another way of maintaining independent contexts is using separate turbo frames actions. Just wrap each independent context in a turbo_frame_tag and ensure a matching turbo_frame_tag is returned:","Consider Benito Serna's implementation of turbo-frames (on Rails) using search forms with the Ransack gem along with a corresponding demo app for a similar implementation of the above logic."]},{"i":"use-different-page-param-s","l":"Use different page_param(s)","p":["You can also paginate multiple model in the same request by simply using multiple :page_param:","You can easily wrap your existing pagination with the pagy_calendar method. Here are a few examples adding :year and :month to different existing statements.","Then follow the calendar extra documentation for more details."]},{"i":"paginate-only-max_pages-regardless-the-count","l":"Paginate only max_pages, regardless the count","p":["In order to limit the pagination to a maximum number of pages, you can pass the :max_pages variable.","For example:","If the @pagy.count in the example is 10_000, the pages served without :max_pages would be 500, but with:max_pages: 50 pagy would serve only the first 50 pages of your collection.","That works at the Pagy/ Pagy::Countless level, so it works with any combination of collection/extra, including items, gearbox and search extras, however it makes no sense in Pagy::Calendar unit objects (which ignore it).","The items and gearbox extras serve a variabe number of items per page. If your goal is limiting the pagination to a max number of records (instead of pages), you have to keep into account how you configure the items range."]},{"l":"Paginate pre-offset and pre-limited collections","p":["With the other pagination gems you cannot paginate a subset of a collection that you got using offset and limit. With Pagy it is as simple as just adding the :outset variable, set to the initial offset. For example:","Assuming the :items default of 20, you will get the pages with the right records you are expecting. The first page from record 101 to 120 of the main collection, and the last page from 401 to 415 of the main collection. Besides the from and to attribute readers will correctly return the numbers relative to the subset that you are paginating, i.e. from 1 to 20 for the first page and from 301 to 315 for the last page."]},{"l":"Paginate non-ActiveRecord collections","p":["The pagy_get_vars method works out of the box with ActiveRecord collections; for other collections (e.g. mongoid, etc.) you might want to change the :count_args default to suite your ORM count method:","or in extreme cases you may need to override it in your controller."]},{"l":"Paginate collections with metadata","p":["When your collection is already paginated and contains count and pagination metadata, you don't need any pagy* controller method. For example this is a Tmdb API search result object, but you can apply the same principle to any other type of collection metadata:","As you can see it contains the pagination metadata that you can use to setup the pagination with pagy:"]},{"l":"Paginate Any Collection","p":["Pagy doesn't need to know anything about the kind of collection you paginate. It can paginate any collection, because every collection knows its count and has a way to extract a chunk of items given a start/offset and a per-page/limit. It does not matter if it is an Array or an ActiveRecord scope or something else: the simple mechanism is the same:","Create a Pagy object using the count of the collection to paginate","Get the page of items from the collection using the start/offset and the per-page/limit ( pagy.offset and pagy.items)","Here is an example with an array. (Please, notice that this is only a convenient example, but you should use the array extra to paginate arrays).","This is basically what the pagy method included in your controller does for you in one go:","Then of course, regardless the kind of collection, you can render the navigation links in your view:","See the Pagy::Backend API documentation for more details."]},{"i":"use-the-pagy_nav-helpers","l":"Use the pagy_nav* helpers","p":["These helpers take the Pagy object and return the HTML string with the pagination links, which are wrapped in a nav tag and are ready to use in your view. For example:","The frontend extras add a few other helpers that you can use the same way, in order to get added features"]},{"l":"Skip single page navs","p":["Unlike other gems, Pagy does not decide for you that the nav of a single page of results must not be rendered. You may want it rendered... or maybe you don't. If you don't... wrap it in a condition and use the pagy_nav* only if @pagy.pages 1 is true. For example:"]},{"i":"skip-page1-param","l":"Skip page=1 param","p":["By default Pagy generates all the page links including the page param. If you want to remove the page=1 param from the first page link, just require the trim extra."]},{"i":"deal-with-a-slow-collection-count","l":"Deal with a slow collection COUNT(*)","p":["Every pagination gem needs the collection count in order to calculate all the other variables involved in the pagination. If you use a storage system like any SQL DB, there is no way to paginate and provide a full nav system without executing an extra query to get the collection count. That is usually not a problem if your DB is well organized and maintained, but that may not be always the case.","Sometimes you may have to deal with some not very efficient legacy apps/DBs that you cannot totally control. In that case the extra count query may affect the performance of the app quite badly.","You have 2 possible solutions in order to improve the performance."]},{"l":"Cache the count","p":["Depending on the nature of the app, a possible cheap solution would be caching the count of the collection, and Pagy makes that really simple.","Pagy gets the collection count through its pagy_get_count method, so you can override it in your controller. Here is an example using the rails cache:","That may work very well with static (or almost static) DBs, where there is not much writing and mostly reading. Less so with more DB writing, and probably not particularly useful with a DB in constant change."]},{"l":"Avoid the count","p":["When the count caching is not an option, you may want to use the countless extra, which totally avoid the need for a count query, still providing an acceptable subset of the full pagination features."]},{"l":"Use AJAX","p":["You can trigger ajax render in rails by customizing the link attributes.","See also Using AJAX."]},{"l":"Maximize Performance","p":["Here are some tips that will help choosing the best way to use Pagy, depending on your requirements and environment."]},{"i":"consider-the-nav-js","l":"Consider the nav_js","p":["If you need the classic pagination bar with links and info, then you have a couple of choices, depending on your environment:","Add the oj gem to your gemfile and use any pagy*_nav_js helper (see Javascript). That uses client side rendering and it is faster and lighter than using any pagy*_nav helper (40x faster, 36x lighter and 1,410x more efficient than Kaminari). Notice: the oj gem is not a requirement but helps the performance when it is available."]},{"i":"consider-the-combo-nav-js","l":"Consider the combo_nav_js","p":["If you don't have strict requirements but still need to give the user total feedback and control on the page to display, then consider the pagy*_combo_nav_js helpers. They are faster and lighter, and even more when the oj gem is available. That gives you the best performance with nav info and UI (48x faster, 48x lighter and 2,270x more efficient than Kaminari) also saving real estate."]},{"l":"Consider the countless extra","p":["If your requirements allow to use the countless extra (minimal or automatic UI) you can save one query per page, and drastically boost the efficiency eliminating the nav info and almost all the UI. Take a look at the examples in the pagy extra."]},{"i":"consider-the-arel-extra-and-or-the-fast-page-gem","l":"Consider the Arel extra and/or the fast_page gem","p":["You can improve the performance for grouped collections with the arel extra, and queries on big data with fast_page."]},{"l":"Ignore Brakeman UnescapedOutputs false positives warnings","p":["Pagy output html safe HTML, however, being an agnostic pagination gem it does not use the specific html_safe rails helper on its output. That is noted by the Brakeman gem, that will raise a warning.","You can avoid the warning adding it to the brakeman.ignore file. More details here and here."]},{"i":"handle-pagyoverflowerror-exceptions","l":"Handle Pagy::OverflowError exceptions","p":["Pass an overflowing :page number and Pagy will raise a Pagy::OverflowError exception.","This often happens because users/clients paginate over the end of the record set or records go deleted and a user went to a stale page.","You can handle the exception by using the overflow extra which provides easy and ready to use solutions for a few common cases, or you can rescue the exception manually and do whatever fits better.","Here are a few options for manually handling the error in apps:","Do nothing and let the page render a 500","Rescue and render a 404","Rescue and redirect to the last known page (Notice: the overflow extra provides the same behavior without redirecting)","All Pagy exceptions are subclasses of ArgumentError, so if you need to rescue_from ArgumentError, ... along with rescue_from Pagy::OverflowError, ... then the Pagy::OverflowError line should go BEFORE the ArgumentError line or it will never get rescued."]},{"l":"Test with Pagy","p":["Pagy has 100% test coverage.","You only need to test pagy if you have overridden methods.","If you need to test pagination, remember:","Pagy::DEFAULT should be set by your initializer and be frozen. You can test that your code cannot change it.","You can override defaults - i.e. any pagy variable can be passed to a pagy constructor. For example:"]},{"l":"Using your pagination templates","p":["The pagy nav helpers are not only a lot faster than templates, but accept dynamic arguments and comply with ARIA and I18n standards. Using your own templates is possible, but it's likely just reinventing a slower wheel.","If you really need to use your own templates, you absolutely can. Here is a static example that doesn't use any other helper nor dictionary file for the sake of simplicity, however feel free to add your dynamic variables and use any helper and dictionary entries as you need:","You can use it as usual: just remember to pass the :pagy local set to the @pagy object:","You may want to look at the actual output interactively by running:","...and point your browser at http://0.0.0.0:8000/template","You may want to read also the Pagy::Frontend API documentation for complete control over your templates."]}],[{"l":"ARIA Attributes","p":["Since version 7.0.0 pagy has introduced a consistent set of ARIA compliant attributes in all its pagy*_nav helpers.","Pagy provides the customizable aria-label for the root element of its helpers. It is usually a nav element, but for the few helper styles that use a different root element, pagy adds a role=navigation attribute to it.","The default string for the aria-label of the root element is \"Page\" / \"Pages\" (translated and pluralized according to the total page number). It's arguably a better description of the nav content than just \"Pagination\" (also difficult to translate in certain languages).","Please, check the pagy.aria_label.nav in the locale files used by your app to be already correctly translated and pluralized. If it's not, please, post your translation in the issue linked in the file itself. Thank you!","Since the nav or role=navigation elements of a HTML document are considered landmark roles, they should be uniquely aria-identified in the page.","If you use more than one pagy helper in the same page, you should not rely on the default (that would otherwise generate a non-valid document), instead, you should pass your own (possibly translated and pluralized) aria-label string. For example:","Links to the previous and next pages are rendered as \"<\" and \">\" and are aria-labelled as translated Previous and Next. You can edit both the link texts and the aria-labels by editing the pagy.prev, pagy.next, pagy.aria_label.prev and pagy.aria_label.next values in the locale files.","The page links don't have any aria-label attribute by design, because their text is a simple number (read by the readers in their native language) and an explicit attribute would be redundant and inefficient.","All the disabled links have the aria-disabled=true attribute.","The current page is marked with the aria-current=page attribute.","The role=link is added to the link elements of the styles that don't use an a element or don't have a href attribute."]}],[{"l":"Pagy","p":["The scope of the Pagy class is keeping track of the all integers and variables involved in the pagination. It basically takes a few integers (such as the count of the collection, the page number, the items per page, ...), does some simple arithmetic and creates a very small object that allocates less than 3k of memory."]},{"l":"Synopsis"},{"l":"Global Default","p":["The Pagy::DEFAULT is a globally available hash used to set defaults variables. It is a constant for easy access, but it is mutable to allow customizable defaults. You can override it in the pagy.rb initializer file in order to set your own application global defaults. After you are done, you should freeze it, so it will not change accidentally. It gets merged with the variables passed with the new method every times a Pagy instance gets created.","You will typically use it in a pagy.rb initializer file to pass defaults values. For example:"]},{"l":"Methods"},{"i":"pagy-root","l":"`Pagy.root`","p":["This method returns the pathname of the pagy/gem root dir. It is useful to get the absolute path of locale and javascript files installed with the gem."]},{"i":"pagy-new-vars","l":"`Pagy.new(vars)`","p":["Notice: If you use the Pagy::Backend its pagy method will instantiate and return the Pagy object for you.","The Pagy.new method accepts a single hash of variables that will be merged with the Pagy::DEFAULT hash and will be used to create the object."]},{"i":"series-size-vars-size","l":"`series(size: @vars[:size], _**)`","p":["This method is the core of the pagination. It returns an array containing the page numbers and the :gap items to be rendered with the navigation links (e.g. [1, :gap, 7, 8, 9, 10, 11, :gap, 36]). It accepts an optional size keyword argument (only useful for extras), defaulted on the :size variable.","A :gap is added only where the series is missing at least two pages. When the series is missing only one page, the :gap is replaced with the page link of the actual missing page. That's because the page link uses the same space of the ... gap but it is more useful.","The nav helpers basically loop through this array and render the correct item by simply checking its type:","if the item is an Integer then it is a page link","if the item is a String then it is the current page","if the item is the :gap symbol then it is a gap in the series","That is self-contained, simple and efficient.","This method returns an empty array if the passed size(i.e. the :size variable) is set to an empty Array. Useful to totally skip the generation of page links in the frontend.","It can also return a simpler array without gaps if the passed :size is a single positive Integer. It may be a faster and cleaner solution very useful in certain contexts (see the Simple Nav)","`label`","Label for the current page. Its only function in the Pagy class is supporting the API of various frontend methods that require labelling for Pagy::Calendar instances. It returns the current page label that will get displayed in the helpers.","`label_for(page)`","Label for any page. Its only function in the Pagy class is supporting the API of various frontend methods that require labelling for Pagy::Calendar instances. It returns the page label that will get displayed in the helpers."]},{"l":"Variables","p":["All the variables passed to the new method are merged with the Pagy::DEFAULT hash and are kept in the object, passed around with it and accessible through the pagy.vars hash.","They can be set globally by using the Pagy::DEFAULT hash or passed to the Pagy.new method and are accessible through the vars reader.","Pagy replaces the blank values of the passed variables with their default values coming from the Pagy::DEFAULT hash. It also applies to_i on the values expected to be integers, so you can use values from request params without any problem. For example: pagy(some_scope, items: params[:items]) will work without any additional cleanup."]},{"i":"variables-1","l":"Variables","p":[":anchor_string",":count",":count_args",":cycle",":fragment",":items",":jsonapi",":max_pages",":outset",":page",":page_param",":params",":request_path",":size","[:all]","0","1","20","7","Allows overriding the request.path for pagination links. Pass the path only (not the absolute url). (see Pass the request path)","Default","Description","Enable cycling/circular/infinite pagination: true sets next to 1 when the current page is the last page","Enable jsonapi compliance of the pagy query params","Extras may add and document their own variables","false","It can be a Hash of params to add to the URL, or a Proc that can edit/add/delete the request params (see Customize the params)","nil","Paginate only :max_pages. (see Paginate only max_pages)","The arbitrary fragment string (including the \"#\") to add to the url. (see Customize the params)","The arguments passed to the collection.count. You may want to set it to [] in ORMs different than ActiveRecord","The extra attributes string (formatted as a valid HTML attr=value) added to the page links (see Customize the link attributes)","The initial offset of the collection to paginate: pass it only if the collection had an offset","The name of the page param name used in the url. (see Customize the page param)","The only mandatory instance variable to be passed is the :count of the collection to paginate: all the other variables are optional and have sensible defaults. Of course you will also have to pass the page or you will always get the default page number 1. For performance reasons, only the instance variables get validated.","The requested number of items for the page","The requested page number: extracted from the request.params, or forced by passing a variable","The size of the page links to show: can be an array of 4 items or the integer of the total page size. (see also Control the page links)","The total count of the collection to paginate (mandatory argument)","Variable"]},{"l":"Attribute Readers","p":["Alias for last(cardinal meaning)","count","Description","from","in","items","last","next","offset","page","pages","Pagy exposes all its internal instance variables through a few readers. They all return integers (or nil), except the vars hash (which contains all the input variables):","prev","Reader","The collection :count","The collection-position of the first item in the page (:outset excluded)","The collection-position of the last item in the page (:outset excluded)","The current page number","The next page number or nil if there is no next page","The number of items skipped from the collection in order to get the start of the current page (:outset included)","The number of the items in the page","The number of the last page in the collection (ordinal meaning)","The previous page number or nil if there is no previous page","The requested number of items for the page","The variables hash","to","vars"]},{"l":"Lowest limit analysis","p":["[1]","===","0","1","Attribute","count","from","in","in, from and to of an empty page are all 0","last","last is always at least 1","next","nil","page","prev","prev and next of a single page (not necessary an empty one) are both nil(i.e. there is no other page)","series","The lowest possible limit of the pagination is reached when the collection has 0 count. In that case the Pagy object created has the following peculiar attributes:","the series array contains always at least the page # 1, which for a single page is also the current page, thus a string. With size: [] the series method returns []","there is always a page# 1 in the pagination, even if it's empty","to","Value","Which means:"]},{"l":"Exceptions"},{"i":"pagy-variableerror","l":"`Pagy::VariableError`","p":["A subclass of ArgumentError that offers a few information for easy exception handling when some of the variable passed to the constructor is not valid.","Mostly useful if you want to rescue from bad user input (e.g. illegal URL manipulation)."]},{"i":"pagy-overflowerror","l":"`Pagy::OverflowError`","p":["A subclass of Pagy::VariableError: it is raised when the :page variable exceeds the maximum possible value calculated for the :count, i.e. the :page variable is in the correct range, but it's not consistent with the current :count. That may happen when the :count has been reduced after a page link has been generated (e.g. some record has been just removed from the DB). See also the overflow extra."]}],[{"i":"#","p":["This module provides the base functionality for the backend."]},{"i":"pagybackend","l":"Pagy::Backend","p":["This module provides a generic pagination method ( pagy) that works with ActiveRecord out of the box. For any other collection (e.g. Sequel, Mongoid, ...) you may need to override some sub-method or write your own Pagy methods.","For overriding convenience, the pagy method calls two sub-methods that you may need to override in order to customize it for any type of collection (e.g. different ORM types, etc.).","Keep in mind that the whole module is basically providing a single functionality: getting a Pagy instance and the paginated items. You could re-write the whole module as one single and simpler method specific to your need, eventually gaining a few IPS in the process. If you seek a bit more performance you are encouraged to write your own Pagy methods.","Check also the array, searchkick, elasticsearch_rails and meilisearch extras for specific backend customizations."]},{"l":"Synopsis"},{"l":"Methods","p":["All the methods in this module are prefixed with the pagy_ string, to avoid any possible conflict with your own methods when you include the module in your controller. They are also all private, so they will not be available as actions. The methods prefixed with the pagy_get_ string are sub-methods/getter methods that are intended to be overridden, not used directly.","Please, keep in mind that overriding any method is very easy with Pagy. Indeed you can do it right where you are using it: no need of monkey-patching or perform any tricky gimmickry."]},{"i":"pagy-collection-vars-nil","l":"`pagy(collection, vars=nil)`","p":["This is the main method of this module. It takes a collection object (e.g. a scope), and an optional hash of variables (passed to the Pagy.new method) and returns the Pagy instance and the page of records. For example:","The built-in pagy method is designed to be easy to customize by overriding any of the two sub-methods that it calls internally. You can independently change the default variables ( pagy_get_vars) and/or the default page of items from the collection pagy_get_items).","If you need to use multiple different types of collections in the same app or action, you may want to define some alternative and self contained custom pagy method. (see Writing your own Pagy methods)"]},{"i":"pagy-get-vars-collection-vars","l":"`pagy_get_vars(collection, vars)`","p":["Sub-method called only by the pagy method, it returns the hash of variables used to initialize the Pagy object.","Override it if you need to add or change some variable. For example you may want to add the :item_name in order to customize the output (see How to customize the item name).","If you override it, remember that :count and :page are the only 2 required Pagy core variables, so be careful not to remove them from the returned hash.","See also the How To page for some usage examples."]},{"i":"pagy-get-count-collection-vars","l":"`pagy_get_count(collection, vars)`","p":["Get the count from the collection, considering also the :count_args variable. Override it if you need to calculate the count in some special way, or cache it. e.g. overriding pagy_get_count when using mongoid."]},{"i":"pagy-get-page-vars","l":"`pagy_get_page(vars)`","p":["Get the page from the param ,looking at the :page_param variable. See also Customize the page_param."]},{"i":"pagy-get-items-collection-pagy","l":"`pagy_get_items(collection, pagy)`","p":["Sub-method called only by the pagy method, it returns the page items (i.e. the records belonging to the current page).","Here is its source (it works with most ORMs like ActiveRecord, Sequel, Mongoid, ...):","Override it if the extraction of the items from your collection works in a different way. For example, if you need to paginate an array:","In order to paginate arrays, you may want to use the array extra."]},{"l":"Writing your own Pagy methods","p":["Sometimes you may need to paginate different kinds of collections (that require different overriding) in the same controller, so using one single pagy method would not be an option.","In that case you can define a number of pagy_* custom methods specific for each collection.","For example: here is a pagy method that doesn't call any sub-method, that may be enough for your needs:","You can easily write a pagy method for any possible environment: please read how to Paginate Any Collection for details.","If you write some useful backend customizations, please let us know if you can submit a PR for a specific extra or if you need any help to do it."]}],[{"i":"pagycalendar","l":"Pagy::Calendar","p":["This is a Pagy subclass that provides pagination filtering by time in order to support the Calendar extra.","It requires the activesupport gem, which you have to require in your Gemfile only if your app does not use Rails.","The Pagy::Calendar::* subclasses provide support for the calendar extra and are meant to be used with standard, non-calendar Pagy classes and never alone (because they could generate a very high number of items per page). The class APIs are documented here, however you should not need to use them directly because they are required and used internally by the extra."]},{"l":"Overview","p":["The pagy Pagy::Calendar::* instances split a time period into pages of equal time unit. For example: with Pagy::Calendar::Year you will have one page per each different calendar year so each page can be filtered to contain all the records that fall into the specific page/year. The Pagy::Calendar::Quarter, Pagy::Calendar::Month, Pagy::Calendar::Week and Pagy::Calendar::Day classes have the same functions for their respective time units.","Each page is also conveniently labeled in the navigation bar with the specific Time period it refers to.","This classes respects the natural calendar units, not the duration of a unit. If you paginate by year, each page will be a calendar year starting January 1st and ending December 31st, not a period starting and ending at two arbitrary dates one year apart. All the classes follow the same principle. Time units with no records are displayed as empty pages."]},{"l":"Variables","p":["Being subclasses of Pagy, the Pagy::Calendar::* classes share most of their superclass infrastructure and variables, however they use a completely different way to paginate (e.g.: no :count nor :items variables) and they have a few extra core variables.","The following variables are specific to Pagy::Calendar::* instances:","Variable","Description","Default",":period","Required two items Array with the calendar starting and ending local TimeWithZone objects","nil",":order","Order of pagination: it can be:asc or :desc",":asc",":format","String containing the strftime extendable format used for labelling (each subclass has its own default)","Notice: For the Pagy::Calendar::Quarter the :format variable can contain a non-standard %q format which is substituted with the quarter (1-4)."]},{"l":"DEFAULT variables","p":["The calendar defaults are not part of the Pagy::DEFAULT variables. Each subclass has its own Pagy::Calendar::*::DEFAULT variable hash that you can set independently. See the pagy initializer file for details."]},{"l":"Attribute Readers","p":["Reader","Description","from","The local TimeWithZone of the start of the current page","to","The local TimeWithZone of the end of the current page","order","The :order variable"]},{"l":"About from and to objects","p":["The from is the beginning of the current time unit. Notice that for the first page it falls BEFORE the starting of the :period.","The to is the beginning of the next time unit. Notice that for the last page it falls AFTER the ending of the :period.","The cases for first and last pages have no effect when you use the from/ to as a collection filter, since the collection is already filtered by the :period so there are no records outside it."]},{"l":"Time conversions","p":["This classes can use the recommended ActiveSupport::TimeWithZone class or the ruby Time class for all their time calculations.","Since they are meant to be used in the UI, they use the user/server local time in order to make sense for the UI. For that reason their input (the :period variable) and output (the from and to accessors) are always local time.","If you use ActiveRecord, your app should set the Time.zone for your user or your server. Then you can convert an UTC time from the storage to a local TimeWithZone object for the calendar very easily with:","You can also convert from local to UTC time with local_time.utc, however, when you use it as an argument in a scope, ActiveRecord converts it for you."]},{"l":"First weekday","p":["Set the Date.beginning_of_week toto the symbol of the first day of the week (e.g. Date.beginning_of_week = :sunday). Notice the default is :monday consistently with the ISO-8601 standard (and Rails)."]},{"l":"Methods"},{"i":"label-opts","l":"`label(opts = {})`","p":["This method uses the :format variable to generate the current page label with the specific TimeWithZone period it refers to. It accepts an optional :format keyword argument for overriding."]},{"i":"label-for-page-opts","l":"`label_for(page, opts = {})`","p":["This method takes a page number argument ( Integer or String) and uses the :format variable to generate its label with the specific Time period it refers to. It accepts an optional :format keyword argument for overriding."]},{"l":"Custom units","p":["You can define your own custom unit of any time length. For example you may want to add a unit of 2 months (i.e. a \"bimester\" unit), which should define a Pagy::Calendar::Bimester class.","In order to allow its full integration, you should also insert your :bimester unit symbol in the Pagy::Calendar::UNITS list, between :quarter and :month, which will keep the list in desc order of duration.","You can also implement your own custom substitution formats for your custom units, by overriding the label_for(page, opts)."]}],[{"i":"pagyconsole","l":"Pagy::Console","p":["Allows you to test Pagy in an irb with an environment stubbed for you:","Standard pagination requires a: controller, model, view and request object to work i.e. you need an environment. Pagy::Console gives you that environment.","Avoid using rails console with Pagy::Console.","Use irb instead. However, if you need rails console please ensure you temporarily \"unfreeze\" the Pagy::DEFAULT hash, in your pagy.rb config file, otherwise you'll receive a \"can't modify frozen Hash\" exception:","Now, refer to the instructions in the irb tab."]},{"i":"pagyconsole-module","l":"Pagy::Console module","p":["The pagy console uses the standalone extra and sets the Pagy::DEFAULT[:url] variable default to http://www.example.com/subdir in order to activate the standalone mode.","Include the module in your console window in order to include also the Pagy::Backend and Pagy::Frontend modules."]},{"i":"pagy-extras-extras","l":"`pagy_extras(*extras)`","p":["Simple utility method to save some typing in the console. It will require the extras arguments. For example:","You will be able to use any frontend or backend method implemented by pagy and the required extras right away."]}],[{"i":"pagycountless","l":"Pagy::Countless","p":["This is a Pagy subclass that provides pagination without the need of any :count.","That may be especially useful in the following scenarios:","slow COUNT(*) query - result of large tables or poorly optimized DBs","large collections of items where the count is missing or irrelevant","minimalistic UI, infinite scrolling, APIs that don't benefit from a nav-bar","when the full nav-bar is not a requirement and/or performance is more desirable","This class provides support for extras that don't need the full set of pagination support or need to avoid the :count variable ( e.g. the countless extra). The class API is documented here, however you should not need to use this class directly because it is required and used internally by the extra."]},{"l":"Caveats","p":["In this class the :count variable is always nil, hence some feature that depends on it may have limited or no support:"]},{"l":"Features with limited support"},{"l":"Nav bar","p":["The nav bar links after the current page cannot be fully displayed because a couple of items of the :size array depends on the count, so they have some limitations.","Regardless the actual :size value:","vars[:size][2] is capped at 1 (we know only if the next page exists)","vars[:size][3] is set to 0 (we don't know the total pages)","A few examples:","[1,4,4,1] would be treated like [ 1,4,1,0]","[1,4,3,4] would be treated like [ 1,4,1,0]","[1,4,0,0] would be treated like [ 1,4,0,0]","The series method reflects on the above."]},{"i":"overflow-variable","l":":overflow variable","p":["The available values for the :overflow variable are :empty_page and :exception, missing the :last_page(which is not known in case of an exception)."]},{"l":"Features without support","p":["The pagy_info and all the *_combo_nav_js helpers that use the total count are not supported."]},{"l":"How countless pagination works","p":["Instead of basing all the internal calculations on the :count variable (passed with the constructor), this class uses the number of actually retrieved items to deduce the pagination variables.","The retrieved items number can be passed in a second step to the finalize method, which allows pagy to determine if there is a next page, or if the current page is the last page, or if the current request should raise a Pagy::OverflowError exception.","Retrieving these variables may be useful to supply a UI as complete as possible, when used with classic helpers, and can be skipped when it's not needed (like for navless pagination, infinite-scroll, etc.). See the countless extra for more details."]},{"l":"Methods","p":["The construction of the final Pagy::Countless object is split into 2 steps: the regular initialize method and the finalize method, which will use the retrieved items number to calculate the rest of the pagination integers."]},{"i":"pagy-countless-new-vars","l":"`Pagy::Countless.new(vars)`","p":["The initial constructor takes the usual hash of variables, calculating only the requested items and the offset, useful to query the page of items."]},{"i":"finalize-fetched-size","l":"`finalize(fetched_size)`","p":["The actual calculation of all the internal variables for the pagination is calculated using the size of the fetched items. The method returns the finalized instance object."]}],[{"i":"pagyfrontend","l":"Pagy::Frontend","p":["This module provides a few methods to deal with the navigation aspect of the pagination.","You will usually include it in some helper module, making its methods available (and overridable) in your views.","You can extend this module with a few more nav helpers (see the extras doc for more details)"]},{"l":"Synopsis"},{"l":"Methods","p":["All the methods in this module are prefixed with the pagy_ string in order to avoid any possible conflict with your own methods when you include the module in your helper. The methods prefixed with the pagy_get_ string are sub-methods/getter methods that are intended to be overridden and not used directly.","Please, keep in mind that overriding any method is very easy with Pagy. Indeed you can do it right where you are using it: no need of monkey-patching or tricky gimmickry."]},{"i":"pagy-nav-pagy-vars","l":"`pagy_nav(pagy, **vars)`","p":["This method takes the Pagy object and returns the HTML string with the pagination links, which are wrapped in a nav tag and are ready to use in your view. For example:","The method accepts also a few optional keyword arguments variables:",":id: the id HTML attribute to the nav tag (omitted by default)",":aria_label: an already pluralized string for the aria-label attribute of the nav, that will be used in place of the default pagy.aria_label.nav defined)",":size which use the passed value instead of the :size variable of the instance","See also ARIA Attributes."]},{"i":"pagy-info-pagy-vars","l":"`pagy_info(pagy, **vars)`","p":["This method provides the info about the content of the current pagination. For example:","Will produce something like:","Displaying items 476-500 of 1000 in total","The method accepts also a few optional keyword arguments variables:",":id: the id HTML attribute to the span tag wrapping the info",":item_name an already pluralized string that will be used in place of the default item/items","Displaying Products 476-500 of 1000 in total","(see Customizing the item name)"]},{"i":"pagy-url-for-pagy-page-absolute-false","l":"`pagy_url_for(pagy, page, absolute: false)`","p":["This method is called internally in order to produce the url of a page by passing it its number. For standard usage it works out of the box and you can just ignore it.","See also How to customize the URL and How to customize the params."]},{"i":"pagy-anchor-pagy","l":"`pagy_anchor(pagy)`","p":["This method is called internally to get a very specialized and fast proc that produce the HTML anchor elements (i.e. a tags) for the pages.","For standard usage you may just need to read How to customize the link attributes, for advanced usage see below.","You need this section only if you are going to override a pagy_nav* helper AND you need to customize the HTML attributes of the link tags.","This method is not intended to be overridden, however you could just replace it in your overridden pagy_nav* helpers with some generic helper like the rails link_to. If you intend to do so, be sure to have a very good reason, since using pagy_anchor is a lot faster than the rails link_to(benchmarked at ~ 22x faster using ~ 18x less memory on a 20 links nav).","This method returns a specialized proc that you call to produce the page a tags. The reason it is a two steps process instead of a single method call is performance. Indeed the method calls the potentially expensive pagy_url_for only once and generates the proc, then calling the proc will just interpolates the strings passed to it.","Here is how you should use it: in your helper call the method to get the proc (just once):","Then call the a proc to get the links (multiple times):","If you need to add some HTML attribute to ALL the page links, you can set the :anchor_string variable.","For performance reasons, the :anchor_string string must be formatted as valid HTML attribute/value pairs because it will get inserted verbatim in the HTML of the a tag.","Be careful not to pass some attribute that is already added by the helper. That would generate a duplicate HTML attribute which is invalid html (although handled by all mayor browsers by ignoring all the duplicates but the first)."]},{"i":"pagy-t-key-vars","l":"`pagy_t(key, vars={})`","p":["This method is similar to the I18n.t and its equivalent rails t helper. It is called internally from the helpers in order to get the interpolated strings out of a YAML dictionary file. (see the Pagy::I18n doc for details)"]}],[{"i":"pagyi18n","l":"Pagy::I18n","p":["Use the i18n gem instead of the faster pagy-i18n implementation.","The pagy_t translation method is ~ 18x faster and uses ~ 10x less memory than the standard i18n gem!","See i18n extra if you need to use the slower standard i18n gem instead."]},{"i":"dictionarieslocales","l":"Dictionaries/locales","p":["Pagy provides many ready-to-use dictionaries for different locales/languages usable with single or multi languages apps.","All the pagy strings are stored in the dictionary files of its locales, ready to be customized and/or used with or without the I18n gem. The files follow the same structure of the standard locale files for the i18n gem.","If you are using pagy with some language missing from the locales, please, submit your translation!"]},{"l":"Configuration","p":["If your app uses only the default en language or if you use the i18n extra you don't need to configure anything for this module.","If you need to load different built-in locales, and/or custom dictionary files or even non built-in language and pluralization, you can do it all by passing a few arguments to the Pagy::I18n.load method."]},{"l":"Synopsis","p":["Use only one load statement or you will get a FrozenError exception","You should use a custom :pluralize proc only for pluralization types not included in the built-in pluralization rules (stored in the Pagy::I18n::P11n::RULE hash).","The :pluralize proc should receive the count as a single argument and should return the plural type string (e.g. something like 'one' or 'other', depending on the passed count)."]},{"l":"Setting the request locale in multi-language apps","p":["When you configure multiple locales (i.e. this does not apply to single locale apps), you must also set the locale at each request. You usually do that in the application controller, by checking the :locale param. For example, in a rails app you should do something like:","If the @pagy_locale is nil or missing pagy will serve the first locale you set in the configuration."]},{"l":"Adding the model translations","p":["If you use the pagy_info OR pagy_items_selector_js AND you also want to use the specific model names instead of the generic \" items\" string, THEN you may need to add entries for the models in the pagy dictionary files. For example:","(See also the pagy_info method and How to customize the item name)"]},{"l":"Contribute a language","p":["If you wish to add a new locale to pagy ( see existing locales in the lib/locales directory) please follow the locales readme instructions here.."]}],[{"l":"Stylesheets"},{"l":"Overview","p":["For all its own interactive helpers shown above, the pagy gem includes a few stylesheets files that you can download, link or copy.","You don't need any stylesheet if you use a frontend extra like: bootstrap, bulma"]},{"l":"HTML Structure","p":["In order to ensure a minimalistic valid output, still complete with all the ARIA attributes, we use a single line with the minimum number of tags and class attributes that can identify all the parts of the nav bars:","The output of pagy_nav and pagy_nav_js are a series of a tags inside a wrapper nav tag","The disabled links are so because they are missing the href attributes","The pagy nav and pagy nav-js classes are assigned to the nav tag","The current, gap classes are assigned to the specific a tags","The stylesheets target the disabled a tags by using the pagy a:not([href]) selector","You can make the gap look like the other pages by removing the :not(.gap)","You can target the previous and next links by using pagy a:first-child and pagy a:last-child pseudo classes","You can totally transform the stylesheets below by just editing the content inside the curly brackets, usually leaving the rest untouched.","Stylesheets"]}],[{"l":"Javascript"},{"l":"Overview","p":["A few helpers use Javascript and offer some extra feature and require some extra setup."]},{"l":"Advantages","p":["Better performance and resource usage (see Maximizing Performance)","Client-side rendering","Optional responsiveness"]},{"l":"Helpers","p":["bootstrap_nav_js","pagy_nav_js","pagy_bootstrap_nav_js","pagy_bulma_nav_js","See Pagy Navs","bootstrap_combo_nav_js","Navigation and pagination info combined.","pagy_combo_nav_js","pagy_bootstrap_combo_nav_js","pagy_bulma_combo_nav_js","See Pagy Combo Navs","pagy_items_selector_js","Choose items numbers, per page.","This helper is only available in one style.","See: Items"]}],[{"l":"Javascript Setup","p":["A javascript setup is required only for the pagy*_js helpers. Just using something like anchor_string: 'data-remote=true' in any other helper works out of the box.","Add the oj gem to your gemfile for faster performance."]},{"i":"how-does-it-work","l":"How does it work?","p":["All the pagy*_js helpers render their component on the client side. The helper methods render just a minimal HTML tag that contains a data-pagy attribute.","Your app should serve or bundle a small javascript file that will take care of converting the data embedded in the data-pagy attribute and make it work in the browser.","We don't publish a npm package, because it would not support automatic sync with the gem version."]},{"l":"1. Pick a Javascript File","p":["and_chr 103","and_ff 101","and_qq 10.4","and_uc 12.12","android 103","chrome 101","chrome 102","chrome 103","edge 102","edge 103","ES6 module to use with webpacker, esbuild, parcel, etc.","firefox 101","firefox 102","firefox 91","ios_saf 12.2-12.5","ios_saf 14.0-14.4","ios_saf 14.5-14.8","ios_saf 15.2-15.3","ios_saf 15.4","ios_saf 15.5","It contains the source map to debug typescript","It works only on new browsers","It's an IIFE file meant to be loaded as is, directly in your production pages and without any further processing","kaios 2.5","Large size","Minified (~ 2k) and polyfilled to work also with quite old browsers","op_mini all","op_mob 64","opera 85","opera 86","opera 87","safari 15.5","Setup","You can generate custom targeted pagy.js files for the browsers you want to support by changing the browserslist query in src/package.json, then compile it with cd src npm run build.","You need to debug the javascript helpers","Your app needs standard script or old browser compatibility","Your app uses modern build tools"]},{"l":"2. Configure","p":["Depending on your environment you have a few ways of configuring your app:"]},{"l":"Rails with assets pipeline","p":["In older versions of Rails, you can configure the app to look into the installed pagy gem javascript files:"]},{"l":"Builders","p":["In order to bundle the pagy-module.js your builder has to find it either with a link or local copy, or by looking into the pagy javascript path:","You can create a symlink or a copy of the pagy-module.js file (available in the pagy gem) into an app compiled dir and use it as a regular app file. That way any builder will pick it up. For example:","Prepend the NODE_PATH environment variable to the scripts.build command:","Ensure that the erb loader is installed:","Generate a local pagy javascript file using erb with webpacker:","where YOUR_EVENT_LISTENER is the load event that works with your app ( e.g. turbo:load, turbolinks:load, load, ...).","Configure the plugins[resolve]:"]},{"l":"Non-Rails apps","p":["Just ensure Pagy.root.join('javascripts', 'pagy.js') is served with the page."]},{"l":"3. Initialize Pagy","p":["After the helper is loaded you have to initialize Pagy to make it work:","Import and use the pagy module:"]},{"l":"Caveats","p":["If Javascript is disabled in the client browser, certain helpers will be useless. Consider implementing your own HTML fallback:","The pagy*_js helpers are tightly coupled with the javascript code, so any partial overriding on one side, would be quite fragile and might break in a next release."]}],[{"l":"Javascript Navs","p":["The following pagy*_nav_js helpers:","pagy_nav_js","pagy_bootstrap_nav_js","pagy_bulma_nav_js","look like a normal pagy*_nav but have a few added features:","Client-side rendering","Optional responsiveness","Better performance and resource usage (see Maximizing Performance)","Here is a screenshot (from the bootstrap extra) showing responsiveness at different widths:","bootstrap_nav_js"]},{"l":"Synopsis","p":["See Setup Javascript."]},{"l":"Variables","p":["Variable","Description","Default",":steps","Hash variable to control multiple pagy :size at different widths","false","The pagy_*nav_js elements are automatically re-rendered on window resize. However, if the container width changes without being triggered by a window resize, you need to explicitly re-render:"]},{"i":"how-to-use-the-steps-variable","l":"How to use the :steps variable","p":["The :steps is an optional non-core variable used by the pagy*_nav_js navs. If it's false, the pagy*_nav_js will behave exactly as a static pagy*_nav respecting the single :size variable, just faster and lighter. If it's defined as a hash, it allows you to control multiple pagy :size at different widths.","You can set the :steps as a hash where the keys are integers representing the widths in pixels and the values are the Pagy :size variables to be applied for that width.","As usual, depending on the scope of the customization, you can set the variables globally or for a single pagy instance, or even pass it to the pagy*_nav_js helper as an optional keyword argument.","For example:","The above statement means that from 0 to 540 pixels width, Pagy will use the 5 size (orginating a simple nav without gaps), from 540 to 720 it will use the [3,5,5,3] size and over 720 it will use the [5,7,7,5] size. (Read more about the :size variable in the How to control the page links section).","You can set any number of steps with any arbitrary width/size. The only requirement is that the :steps hash must contain always the 0 width or a Pagy::VariableError exception will be raised.","Setting the widths and sizes can create a nice transition between widths or some apparently erratic behavior.","Here is what you should consider/ensure:","The pagy size changes in discrete :steps, defined by the width/size pairs.","The automatic transition from one size to another depends on the width available to the pagy nav. That width is the internal available width of its container (excluding eventual horizontal padding).","You should ensure that - for each step - each pagy :size produces a nav that can be contained in its width.","You should ensure that the minimum internal width for the container div be equal (or a bit bigger) to the smaller positive width. ( 540 pixels in our previous example).","If the container width snaps to specific widths in discrete steps, you should sync the quantity and widths of the pagy :steps to the quantity and internal widths for each discrete step of the container."]},{"l":"Methods"},{"i":"pagy-nav-js-pagy-vars","l":"`pagy*_nav_js(pagy, **vars)`","p":["The method accepts also the same optional keyword arguments variables of the pagy_nav(pagy, **vars)"]}],[{"l":"Javascript Combo Navs","p":["The following pagy*_combo_nav_js offer an alternative pagination UI that combines navigation and pagination info in a single compact element:","pagy_combo_nav_js","pagy_bootstrap_combo_nav_js","pagy_bulma_combo_nav_js","They are the fastest and lightest nav on modern environments, recommended when you care about efficiency and server load ( see Maximizing Performance).","Here is a screenshot (from the bootstrap extra):","bootstrap_combo_nav_js"]},{"l":"Synopsis","p":["See Setup Javascript."]},{"l":"Methods"},{"i":"pagy-combo-nav-js-pagy-vars","l":"`pagy*_combo_nav_js(pagy, **vars)`","p":["The method accepts also the same optional keyword arguments variables of the pagy_nav(pagy, **vars)"]}],[{"l":"Using AJAX","p":["If you AJAX-render any of the javascript helpers mentioned above, you should also execute Pagy.init(container_element); in the javascript template. Here is an example for an AJAX-rendered pagy_bootstrap_nav_js:","The document.getElementById('container') argument will re-init the pagy elements just AJAX-rendered in the container div. If you miss it, it will not work."]}],[{"l":"Arel Extra","p":["Provides better performance of grouped ActiveRecord collections.","Add a specialized pagination for collections from sql databases with GROUP BY clauses by computing the total number of results with COUNT(*) OVER ().","Tested against MySQL (8.0.17) and Postgres (11.5). Before using in a different database, make sure the sql COUNT(*) OVER () performs a count of all the lines after the GROUP BY clause is applied."]},{"l":"Synopsis"},{"l":"Methods"},{"i":"pagy-arel-collection-vars-nil","l":"`pagy_arel(collection, vars=nil)`","p":["This method is the same as the generic pagy method, but with improved speed for SQL GROUP BY collections. (see the pagy doc)"]},{"i":"pagy-arel-get-vars-collection","l":"`pagy_arel_get_vars(collection)`","p":["This sub-method is the same as the pagy_get_vars sub-method, but it is called only by the pagy_arel method. (see the pagy_get_vars doc)."]},{"i":"pagy-arel-count-collection","l":"`pagy_arel_count(collection)`","p":["This sub-method it is called only by the pagy_get_vars method. It will detect which query to perform based on the active record groups (sql GROUP BY s). In case there aren't group values performs a normal .count(:all), otherwise it will perform a COUNT(*) OVER (). The last tells database to perform a count of all the lines after the GROUP BY clause is applied."]}],[{"l":"Array Extra","p":["Paginate arrays efficiently.","Do not use pagy_array with any persistent storage collection (database, elastic search, Meilisearch etc)!","Use with collections that are already loaded in memory. (e.g. arrays of cached indices, keys of hashes, pointers, etc.)."]},{"l":"Synopsis"},{"l":"Methods"},{"i":"pagy-array-array-vars-nil","l":"`pagy_array(array, vars=nil)`","p":["This method is the same as the generic pagy method, but specialized for an Array. (see the pagy doc)"]},{"i":"pagy-array-get-vars-array","l":"`pagy_array_get_vars(array)`","p":["This sub-method is the same as the pagy_get_vars sub-method, but it is called only by the pagy_array method. (see the pagy_get_vars doc)."]}],[{"l":"Bootstrap Extra","p":["Add nav helpers for the Bootstrap pagination component."]},{"l":"Synopsis","p":["See: Javascript if you use pagy_bootstrap_nav_js or pagy_bootstrap_combo_nav_js."]},{"l":"Methods","p":["This extra adds 3 nav helpers to the Pagy::Frontend module.","You can customize them by overriding in your own view helper(s)."]},{"i":"pagy-bootstrap-nav-pagy-vars","l":"`pagy_bootstrap_nav(pagy, **vars)`","p":["pagy_bootstrap_nav","This method is the same as the pagy_nav, but customized for Bootstrap.","See: pagy_nav(pagy, **vars)."]},{"i":"pagy-bootstrap-nav-js-pagy-vars","l":"`pagy_bootstrap_nav_js(pagy, **vars)`","p":["bootstrap_nav_js: Responsive nav.","See: Javascript Navs."]},{"i":"pagy-bootstrap-combo-nav-js-pagy-vars","l":"`pagy_bootstrap_combo_nav_js(pagy, **vars)`","p":["bootstrap_combo_nav_js","See: Javascript Combo Navs."]}],[{"l":"Bulma Extra","p":["Add nav helpers for the Bulma CSS pagination component."]},{"l":"Synopsis","p":["See Javascript if you use pagy_bulma_nav_js or pagy_bulma_combo_nav_js."]},{"l":"Methods","p":["This extra adds 3 nav helpers to the Pagy::Frontend module.","You can customize them by overriding in your own view helper(s)."]},{"i":"pagy-bulma-nav-pagy","l":"`pagy_bulma_nav(pagy)`","p":["bulma_nav - medium view size","This method is the same as the pagy_nav, but customized for Bulma.","See the pagy_nav(pagy, **vars) documentation."]},{"i":"pagy-bulma-nav-js-pagy-vars","l":"`pagy_bulma_nav_js(pagy, **vars)`","p":["Warning: Bootstrap style shown above as a representative example - the responsive pagy_bulma_nav_js looks like the pagy_bulma_nav helper.","It's rendered on the client, with optional responsiveness. See the Javascript Navs documentation for more information."]},{"i":"pagy-bulma-combo-nav-js-pagy-vars","l":"`pagy_bulma_combo_nav_js(pagy, **vars)`","p":["bulma_combo_nav_js","See the Javascript Combo Navs documentation."]}],[{"l":"Calendar Extra","p":["Add pagination filtering by calendar time unit: year, quarter, month, week, day and your own custom time units.","This extra adds single or multiple chained calendar navs that act as calendar filters on the collection records, placing each record in its time unit.","calendar_app"]},{"l":"Use cases","p":["This extra makes sense when the result to paginate have some time continuity and you want to provide a simple chronological browsing. For example: a movie catalog could allow the user to browse all the movies by year, or you may want to browse a long list of events by jumping and narrowing between years, months, days.","On the other hand it does not make much sense for the result of a search that hits just a few sparse records scattered over a possibly long period of time. For that case the calendar extra has an :active flag that can be used to inactivate the calendar and fallback to the regular pagination. No need to maintain different UIs for wide browsing and narrow searching."]},{"l":"Synopsis","p":["See also a few examples about How to wrap existing pagination with pagy_calendar."]},{"l":"Usage","p":["Since the time can be stored or calculated in many different ways in different collections, this extra requires you to implement a couple of simple methods in your app and configure the objects that it creates and coordinates for you.","The whole usage boils down to these steps:","Configure the pagy_calendar method in your action","Define the pagy_calendar_period method in your controller","Define the pagy_calendar_filter method in your controller","Use it in your UI"]},{"l":"Variables and Accessors","p":["See Pagy::Calendar"]},{"l":"Methods","p":["All the methods in this module are prefixed with the pagy_calendar string in order to avoid any possible conflict with your own methods when you include the module in your controller. They are also all private, so they will not be available as actions."]},{"i":"pagy-calendar-collection-configuration","l":"`pagy_calendar(collection, configuration)`","p":["Besides the usual pagy variables, you can add a :backend variable, set to the name of the backend extra method that you want to use for managing the collection:","If the :pagy key/value is omitted, a default Pagy instance will be created by the default :pagy backend method.","It also provides the showtime helper method that returns the DateTime of the smallest time unit currently shown in your calendar. For example:","It filters the collection by the selected time units in the configuration(e.g. year, month, day, ...), and forwards it to the wrapped method.","It returns an array with one more item than the usual two:","Notice that the collection argument must be exactly what you would pass to the wrapped backend method.","The :page, :page_param, :params and :period variables for the calendar objects are managed automatically by the extra. Setting them explicitly has no effect. (See also Calendar params for solutions in case of conflicts)","The @calendar is the hash of the generated Pagy::Calendar::* objects that can be used in the UI.","The calendar configuration determines the calendar objects generated. These are used for filtering the collection to the selected time units.","The calendar is active by default, however you can add an optional :active boolean flag to the configuration hash in order to switch it ON or OFF, depending on its usefulness in different conditions (see the Use cases).","The collection argument (from ActiveRecord, ElasticSearchRails, Searchkick, Meilisearch, ...) is filtered by the pagy_calendar_filter and forwarded to the wrapped method for its final pagination, so ensure that you pass the same type of argument expected by the wrapped method.","The configuration argument must be a Hash structure with the keys representing the type of configuration and the values being the Hash of the variables that you want to pass for the creation of the specific pagy object (or a boolean for the Active flag).","The configuration hash can be composed by the following types of configuration:","This is the optional configuration of the final pagination object (produced by the wrapped method) which is always used regardless the value of the Active flag.","This method wraps one or more levels of calendar filtering on top of another backend pagination method ( e.g. pagy, pagy_arel, pagy_array, pagy_searchkick, pagy_elasticsearch_rails, pagy_meilisearch, ...).","You can add one or more levels with keys like :year, :quarter, :month, :week, :day. Each key must be set to the hash of the variables that will be used to initialize the relative Pagy::Calendar::* object. Use an empty hash for default values. E.g.: year: {}, month: {}, ....","You can pass one optional :pagy key, set to the hash of the variables to initialize the Pagy object. It has none of the restriction mentioned in the Calendar configuration."]},{"i":"pagy-calendar-period-collection","l":"`pagy_calendar_period(collection)`","p":["This method must be implemented by the application.","It receives a collection argument that must not be changed by the method, but can be used to return the starting and ending local TimeWithZone objects array defining the calendar :period. See the Pagy::Calendar Variables for details.","Depending on the type of storage, the collection argument can contain a different kind of object:","If you use ActiveRecord the collection is going to be an ActiveRecord::Relation object. You can use it to return the starting and ending local TimeWithZone objects array. Here are a few examples with the created_at field (but you can pull the time from anywhere):","See also Time conversion for details.","If you use ElasticSearchRails, Searchkick, Meilisearch the collection argument is just the Array of the captured search arguments that you passed to the Model.pagy_search method. That array is what pagy uses internally to setup its variables before passing it to the standard Model.search method to do the actual search.","So you should use what you need from the collection array and do your own Model.search(...) in order to get the starting and ending local TimeWithZone objects array to return."]},{"i":"pagy-calendar-filter-collection-from-to","l":"`pagy_calendar_filter(collection, from, to)`","p":["This method must be implemented by the application.","It receives the main collection and must return a filtered version of it using the from and to local Time objects.","You should filter your collection with a logic equivalent to storage_time = from storage_time to, adapted to the time zone and syntax of your storage.","Depending on the type of storage, the collection argument can contain a different kind of object:","If you use ActiveRecord the collection is going to be an ActiveRecord::Relation object that you can easily filter. Here is an example with the created_at field again (but you can use anything, of course):","See also Time conversion for details.","If you use ElasticSearchRails, Searchkick, Meilisearch the collection argument is just the Array of the captured search arguments that you passed to the Model.pagy_search method. That array is what pagy uses internally to setup its variables before passing it to the standard Model.search method to do the actual search.","So in order to filter the actual search with the from and to local TimeWithZone objects, you should simply return the same array with the filtering added to its relevant item. Pagy will use it to do the actual (filtered) search."]},{"l":"Customization"},{"l":"Order","p":["If you set :order to :desc, you will get the page units in descendent order (e.g. May, then April, then March, ...), but keep in mind that you still have to desc-order the records in the collection since pagy has no control over that (indeed it's your own collection scope)."]},{"l":"Beginning of week","p":["If you use the :week time unit, consider that the first day of the week could be different for different locales.","You may want to adjust it by setting the Date.beginning_of_week variable to the symbol of the first day of the week ( e.g. Date.beginning_of_week = :sunday). Notice the default is :monday consistently with the ISO-8601 standard (and Rails)."]},{"l":"Calendar params","p":["This extra handles the request params of its objects automatically, and you should not need to customize them unless they conflict with other params in your requests. In that case you have a couple of alternatives:","Renaming the conflicting param of your app","Passing a custom :page_param to the Pagy configuration. That will internally rename the :page_param vars and update the :params procs of all the calendar objects accordingly."]},{"l":"View","p":["You can use the calendar objects with any pagy_*nav and pagy_*nav_js helpers in your views.","The pagy_*combo_nav_js keeps into account only page numbers and not labels, so it is not very useful (if at all) with Pagy::Calendar::* objects."]},{"i":"pagy-calendar-url-at-calendar-time-opts","l":"`pagy_calendar_url_at(@calendar, time, **opts)`","p":["This helper takes the @calendar and a TimeWithZone objects and returns the url complete with all the params for the pages in each bars that include the passed time.","For example: pagy_calendar_url_at(@calendar, Time.zone.now) will select the the bars pointing to today.","If time is outside the pagination range it raises a Pagy::Calendar::OutOfRangeError, however you can pass the option fit_time: true to avoid the error and get the url to the page closest to the passed time argument (first or last page)."]},{"l":"Label format","p":["Each page link in the calendar navs is conveniently labeled with the specific Time period it refers to. You can change the time format to your needs by setting the :format variable to a standard strftime format. (See the Pagy::Calendar variables)","You can also get the label method with e.g.: @calendar[:month].label, which might be useful to use in your UI."]},{"l":"I18n localization","p":["Pagy implements its own faster version of the i18n translate method (see pagy_t), but does not provide any built-in localize method. If you need localization of calendar labels in other locales, you should delegate it to the I18n gem, so that a change in the global I18n.locale will automatically localize all the time labels accordingly.","You have a couple of options:","Use the i18n extra, which delegates the translation and localization to the I18n gem. Notice however that you would lose the performance gain offered by the built-in pagy_t translation.","Uncomment the block in the calendar section in the pagy initializer, which will add the localization from the I18n gem without using the i18n extra, so preserving the builtin pagy_t translation."]},{"l":"Caveats","p":["Calendar pages with no records are accessible but empty: you may want to display some message when @records.empty?."]}],[{"l":"Countless Extra","p":["Paginate without the need of any count, saving one query per rendering."]},{"l":"Setup"},{"l":"Modes","p":["This extra uses the Pagy::Countless subclass internally. You can use it in two different modes by enabling the :countless_minimal variable (or not).","Your app needs a full classic pagination UI","This mode retrieves items + 1 and uses the number of retrieved items to calculate the variables. It then removes the eventual extra item from the result, so deducing whether there is a next page or not without the need of an extra query.","The @records collection is an eager-loaded Array of records.","The @pagy object can be used with any supported helper.","Your app uses no or limited pagination UI","This mode is enabled by the :countless_minimal variable.","The @records collection is a regular scope.","The @pagy object cannot be used with any helpers.","The collection is over when @records.size @pagy.vars[:items]"]},{"l":"Variables","p":["Variable","Description","Default",":countless_minimal","enable the countless minimal mode","false"]},{"l":"Methods"},{"i":"pagy-countless-collection-vars-nil","l":"`pagy_countless(collection, vars=nil)`","p":["This method is the same as the generic pagy method (see the pagy doc), however its returned objects will depend on the value of the :countless_minimal variable (see Modes)"]},{"i":"pagy-countless-get-vars-collection-vars","l":"`pagy_countless_get_vars(_collection, vars)`","p":["This sub-method is similar to the pagy_get_vars sub-method, but it is called only by the pagy_countless method. (see the pagy_get_vars doc)."]},{"i":"pagy-countless-get-items-collection-pagy","l":"`pagy_countless_get_items(collection, pagy)`","p":["This sub-method is similar to the pagy_get_items sub-method, but it is called only by the pagy_countless method. (see the pagy_get_items doc)."]}],[{"l":"Elasticsearch Rails Extra","p":["Paginate ElasticsearchRails response objects."]},{"l":"Setup"},{"l":"Modes","p":["This extra offers two ways to paginate ElasticsearchRails response objects.","You use the pagy_search method in place of the search method.","Pagy creates its object out of your result."]},{"l":"Variables","p":["Variable","Description","Default",":elasticsearch_rails_pagy_search","customizable name of the pagy search method",":pagy_search",":elasticsearch_rails_search","customizable name of the original search method",":search"]},{"l":"Methods"},{"i":"pagy-elasticsearchrails-pagy-search","l":"`Pagy::ElasticsearchRails.pagy_search(...)`","p":["This method accepts the same arguments of the search method and you must use it in its place in active mode."]},{"i":"pagy-new-from-elasticsearch-rails-response-vars","l":"`Pagy.new_from_elasticsearch_rails(response, vars={})`","p":["This constructor accepts an Elasticsearch::Model::Response::Response, plus the optional pagy variables. It automatically sets the :items, :page and :count pagy variables extracted/calculated out of it."]},{"i":"pagy-elasticsearch-rails-pagy-search-args-vars","l":"`pagy_elasticsearch_rails(pagy_search_args, vars={})`","p":["This method is similar to the generic pagy method, but specialized for Elasticsearch Rails (see the pagy doc).","It expects to receive YourModel.pagy_search(...) result and returns the paginated response."]},{"i":"pagy-elasticsearch-rails-get-vars-array","l":"`pagy_elasticsearch_rails_get_vars(array)`","p":["This sub-method is similar to the pagy_get_vars sub-method, but it is called only by the pagy_elasticsearch_rails method. (see the pagy_get_vars doc)."]}],[{"l":"Gearbox Extra","p":["Automatically change the number of items per page depending on the page number.","Instead of generating all the pages with a fixed number of items, the app can serve pages with an increasing number of items in order to speed things up for wild-browsing and improving the user experience.","You can set this up by simply setting the :gearbox_items variable to an array of integers. For example, you would set the gearbox_items to [10, 20, 40, 80] to have page 1 with 10 items, page 2 with 20, page 3 with 40 and all the other pages with 80 items.","The content of the array is not restricted neither in length nor in direction: you can pass any arbitrary sequence of integer you like, although it makes more sense to have an increasing progression of items."]},{"l":"Interaction with other extras","p":["Even after requiring this extra, the regular fixed pagination is still supported: you have just to temporarily disable gearbox with gearbox_extra: false in the instances that need the fixed pagination.","You can also use it in presence of the items extra if you follow a simple logic. The gearbox extra automatically handles the items per page, while the items extra allows the user to explicitly request a specific number of items. That's why the items extra takes priority over the gearbox extra if both are enabled.","If you want to use the gearbox in some instances, you can temporarily set items_extra: false and the gearbox will be used instead. That is a common scenario when you use the items extra in an API controller, while you want to use the gearbox in an infinite scroll pagination in another controller."]},{"l":"Caveats","p":["This extra cannot be used with Pagy::Calendar::* objects, which are paginated by period.","The search extras ( elasticserch_rails, meilisearch and searchkick) are based on storages with built-in linear pagination, which is inconsistent with the gearbox."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":gearbox_extra","enable or disable the feature","true",":gearbox_items","array of positive integers","[15, 30, 60, 100]"]},{"l":"Methods","p":["The gearbox extra overrides the setup_items_var and the setup_pages_vars methods in the Pagy class. You don't have to use them directly."]},{"l":"Credits","p":["The idea behind this extra comes from the Geared Pagination.","The main differences are:","Pagy is not tied to ActiveRecord so it works in any environment","The pagy-cursor pagination is a pagy-extra implemented in its own gem","Pagy is many many many times faster!"]}],[{"l":"Headers Extra","p":["Add RFC-8288 compliant http response headers (and other helpers) useful for API pagination. It also follows the header casing introduced by rack version 3+(see https://github.com/rack/rack/issues/1592)."]},{"l":"Synopsis"},{"l":"Suggestions","p":["Instead of explicitly merging the headers before each rendering, if you use rails you can get them automatically merged ( application-wide and when @pagy is available), by adding an after_action in your application controller:","If your code in different actions is similar enough, you can encapsulate the statements in a custom pagy_render method in your application controller. For example:"]},{"l":"Headers","p":["This extra generates the standard link header defined in the RFC-8288, and adds 4 customizable headers useful for pagination: current-page, page-items, total-pages and total-count headers."]},{"l":"Customize the header names","p":["If you are replacing any of the existing API-pagination gems in some already working app, you may want to customize the header names so you will not have to change the client app that consumes them. You can do so by using the :headers variable ( see variables below)"]},{"l":"Countless Pagination","p":["If your requirements allow to save one count-query per rendering by using the pagy_countless constructor, the headers will not have the rel=last link, the total-count and the total-pages that are unknown with countless pagination.","Example of HTTP headers produced from a Pagy::Countless object:"]},{"l":"Variables","p":["Variable","Description","Default",":headers","Hash variable to customize/suppress the optional headers","{ page: 'current-page', items: 'page-items', count: 'total-count', pages: 'total-pages' }","As usual, depending on the scope of the customization, you can set the variables globally or for a single pagy instance.","For example, the following will change the header names and will suppress the :pages('Total-Pages') header:"]},{"l":"Methods"},{"i":"pagy-headers-merge-pagy","l":"`pagy_headers_merge(pagy)`","p":["This method relies on the response method in your controller returning a Rack::Response object.","You should use it before rendering: it simply merges the pagy_headers to the response.headers internally.","If your app doesn't implement the response object that way, you should override the pagy_headers_merge method in your controller or use the pagy_headers method directly."]},{"i":"pagy-headers-pagy","l":"`pagy_headers(pagy)`","p":["This method generates a hash of RFC-8288 compliant http headers to send with the response. It is internally used by the pagy_headers_merge method, so you usually don't need to use it directly. However, if you need to edit the headers that pagy generates (for example adding extra link headers), you can override it in your own controller."]},{"i":"pagy-headers-hash-pagy","l":"`pagy_headers_hash(pagy)`","p":["This method generates a hash structure of the headers, useful only if you want to include the headers as metadata within your JSON. For example:","For a more complete set of metadata you should use the metadata extra."]}],[{"l":"I18n Extra","p":["Use the i18n standard gem for the translations of the pagy strings.","It delegates translations and localization of the calendar time labels to the i18n gem (which should obviously be installed).","A change in the global I18n.locale will automatically translate and localize all Pagy output accordingly.","You should have some very good reasons to use the i18n gem instead of the pagy implementation, because the i18n gem is ~ 18x slower and uses ~ 10x more memory than the Pagy::I18n default implementation.","Having the i18n gem already installed and configured in your app might not count as a good reason, because, besides being faster and lighter, the Pagy::I18n is super easy to configure and doesn't require any change in the i18n of the rest of your app."]},{"l":"Synopsis"}],[{"l":"Items Extra","p":["Allow the client to request a custom number of items per page with an optional selector UI. It is useful with APIs or user-customizable UIs.","Run the interactive demo from your terminal:","...and point your browser at http://0.0.0.0:8000","It works also with the countless, searchkick, elasticsearch_rails and meilisearch extras."]},{"l":"Synopsis"},{"l":"Default usage"},{"l":"Custom usage","p":["See Javascript(only if you use the pagy_items_selector_js UI)"]},{"l":"Variables","p":[":items",":items_extra",":items_param",":max_items","100","As a global default:","Default","Description","Enable or disable the feature","For a single instance (overriding the global default):","The :max_items is used to cap the number of items to that max. It is set to 100 by default. If you don't want to limit the max requested number of items per page, you can set it to nil.","The max items allowed to be requested. Set it to nil for no limit.","The name of the items param used in the url.","This extra uses the :items_param variable to determine the param it should get the number of :items from.","true","Variable","You can override the items that the client sends with the params by passing the :items explicitly. For example:","You can use the :items_extra variable to opt-out of the feature even when the extra is required.","You may want to customize the variables. Depending on the scope of the customization, you have a couple of options:"]},{"l":"Methods","p":["The items extra adds the pagy_items_selector_js helper to the Pagy::Frontend module."]},{"i":"pagy-items-selector-js-pagy-vars","l":"`pagy_items_selector_js(pagy, **vars)`","p":["This helper provides an items selector UI, which allows the user to select any arbitrary number of items per page (below the :max_items number) in a numeric input field. It looks like:","Show items per page","It returns an empty string if the :items_extra is false.","The method accepts also a few optional keyword arguments variables:",":id which adds the id HTML attribute to the nav tag",":item_name an already pluralized string that will be used in place of the default item/items","Show Products per page","(see How to customize the item name)","When the items number is changed with the selector, pagy will reload the pagination UI using the selected items per page. It will also request the right page number calculated in order to contain the first item of the previously displayed page. That way the new displayed page will roughly show the same items in the collection before the items change.","This method can take an extra id argument, which is used to build the id attribute of the nav tag."]}],[{"l":"Jsonapi Extra","p":["Implements the JSON:API specifications for pagination.","When enabled, the query params used in the pagy URLs are nested under the page param, as specified by the Query Parameter Family e.g. https://example.com/products?page[number]=2page[size]=30."]},{"l":"Synopsis"},{"l":"Default usage"},{"l":"Custom usage"},{"l":"Variables","p":["Variable","Description","Default",":jsonapi","Enable or disable the feature","true","You can use the :jsonapi variable to opt-out of the feature even when the extra is required."]},{"i":"interaction-with-other-featuresextras","l":"Interaction with other features/extras","p":["This extra just nests the :page and :items params under the JSON:API reserved :page param. You may want to customize the :page_param and the :items params as shown in the Synopsis.","You may also want to use it with the items extra in order to allow the client to request a specific number of items per page and capping it to a max number.","It works also with the countless, searchkick, elasticsearch_rails and meilisearch extras.","It does not make sense (and doesn't work) with the Calendar extra."]},{"l":"Methods","p":["The jsonapi extra adds the pagy_jsonapi_links helper to the Pagy::Backend module."]},{"i":"pagy-jsonapi-links-pagy-opts","l":"`pagy_jsonapi_links(pagy, **opts)`","p":["This helper provides the JSON:API links for pagination as a hash of first, last, prev, next paths. You can pass the option asbsolute: true to get an absolute URL instead."]}],[{"l":"Meilisearch Extra","p":["Paginate Meilisearch results."]},{"l":"Setup"},{"l":"Modes","p":["This extra offers two ways to paginate Meilisearch objects:","You use the pagy_search method in place of the ms_search method.","Pagy creates its object out of your result."]},{"l":"Variables","p":["Variable","Description","Default",":meilisearch_pagy_search","customizable name of the pagy search method",":pagy_search",":meilisearch_search","customizable name of the original search method",":ms_search"]},{"l":"Methods"},{"i":"pagy-meilisearch-pagy-search","l":"`Pagy::Meilisearch.pagy_search(...)`","p":["This method accepts the same arguments of the ms_search method and you must use it in its place in active mode."]},{"i":"pagy-new-from-meilisearch-results-vars","l":"`Pagy.new_from_meilisearch(results, vars={})`","p":["This constructor accepts a Meiliserch object, plus the optional pagy variables. It automatically sets the :items, :page and :count pagy variables extracted/calculated out of it."]},{"i":"pagy-meilisearch-pagy-search-args-vars","l":"`pagy_meilisearch(pagy_search_args, vars={})`","p":["This method is similar to the generic pagy method, but specialized for Meilisearch. (see the pagy doc)","It expects to receive YourModel.pagy_search(...) result and returns the paginated response."]},{"i":"pagy-meilisearch-get-vars-array","l":"`pagy_meilisearch_get_vars(array)`","p":["This sub-method is similar to the pagy_get_vars sub-method, but it is called only by the pagy_meilisearch method. (see the pagy_get_vars doc)."]}],[{"l":"Metadata Extra","p":["Provide the pagination metadata to Javascript frameworks like Vue.js, react.js, etc.","It adds a single method to the backend that you can serve as JSON to your favorite javascript framework."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":metadata","Array of names used to control the returned metadata","[ :scaffold_url, :first_url, :prev_url, :page_url, :next_url, :last_url, :count, :page, :items, :vars, :pages, :last, :from, :to, :prev, :next, :series ]","As usual, depending on the scope of the customization, you can set the :metadata variable globally or for a single pagy instance.","IMPORTANT: Don't rely on the broad default! You should explicitly set the :metadata variable with only the keys that you will actually use in the frontend, for obvious performance reasons. Besides you can also add other pagy method names not included in the default."]},{"i":"the-scaffold_url-key","l":"The :scaffold_url key","p":["This is a special url string that you can use as the scaffold to build real page urls in your frontend (instead of producing them on the backend).","It is a pagination url/path (complete with all the params) containing the __pagy_page__ placeholder in place of the page number (e.g. '/foo?page=__pagy_page__bar=baz')","You can generate all the actual links on the frontend by simply replacing the placeholder with the actual page number you want to link to.","In javascript you can do something like:","This is particularly useful when you want to build some dynamic pagination UI (e.g. similar to what the pagy_*combo_js generates), but right in your frontend app, saving backend resources with obvious performance benefits.","For simple cases you might want to use the other few :*_url metadata directly, instead of using the :scaffold_url."]},{"l":"Methods","p":["This extra adds a single method to the Pagy::Backend(available in your controllers)."]},{"i":"pagy-metadata-pagy-absolute-nil","l":"`pagy_metadata(pagy, absolute: nil)`","p":["This method returns a hash with the keys/values defined by the :metadata variable. When true, the absolute boolean argument will cause all the :*_url metadata to be absolute instead of relative."]}],[{"l":"Overflow Extra","p":["Allow easy handling of overflowing pages (i.e. requested page > count).","It internally rescues Pagy::OverflowError exceptions offering the following ready to use behaviors/modes: :empty_page, :last_page, and :exception."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":overflow","the modes in case of overflowing page (:last_page, :empty_page or :exception)",":empty_page","Set the variables - either globally, or locally:"]},{"l":"Modes","p":["The modes accepted by the :overflow variable:",":empty_page",":last_page",":exception","Useful for APIs, where clients expect an empty page, in order to stop requesting more pages. This is the default mode.","Paginate exactly as if the last page has been requested.","The :last_page mode is not available for Pagy::Countless instances because the last page is not known.","For example:","You can rescue from the exception and implement your own custom mode even in presence of this extra."]},{"l":"Methods"},{"i":"overflow","l":"`overflow?`","p":["Use this method in order to know if the requested page is overflowing. The original requested page is available as pagy.vars[:page](useful when used with the :last_page mode, in case you want to give some feedback about the rescue to the user/client)."]},{"l":"Errors","p":["See How to handle Pagy::OverflowError exceptions"]}],[{"l":"Pagy Extra","p":["Adds the pagy styled versions of the javascript-powered navs and a few other components to support countless or navless pagination (incremental, auto-incremental, infinite pagination)."]},{"l":"Synopsis","p":["See Javascript."]},{"l":"Methods"},{"i":"pagy-nav-pagy-vars","l":"`pagy_nav(pagy, **vars)`","p":["This method is defined in the Pagy::Frontend module for efficiency, but referred here for consistency with the other frontend extras and the same type of components here.","See pagy_nav(pagy, **vars)."]},{"i":"pagy-nav-js-pagy-vars","l":"`pagy_nav_js(pagy, **vars)`","p":["See Javascript Navs."]},{"i":"pagy-combo-nav-js-pagy-vars","l":"`pagy_combo_nav_js(pagy, **vars)`","p":["See Javascript Combo Navs."]},{"i":"pagy-info-pagy-vars","l":"`pagy_info(pagy, **vars)`","p":["This method is defined in the Pagy::Frontend module for efficiency, but referred here for consistency with the same type of components here.","See pagy_info(pagy, **vars)."]},{"i":"pagy-prev-url-pagy-absolute-false","l":"`pagy_prev_url(pagy, absolute: false)`","p":["Return the previous page URL string or nil. Useful to build minimalistic UIs that don't use nav bar links (e.g. countless extra)."]},{"i":"pagy-next-url-pagy-absolute-false","l":"`pagy_next_url(pagy, absolute: false)`","p":["Return the previous page URL string or nil. Useful to build minimalistic UIs that don't use nav bar links (e.g. countless extra)."]},{"i":"pagy-prev-a-pagy-text-pagy-t-pagy-prev-aria-label-pagy-t-pagy-aria-label-prev","l":"`pagy_prev_a(pagy, text: pagy_t('pagy.prev'), aria_label: pagy_t('pagy.aria_label.prev))`","p":["Return the enabled/disabled previous page anchor tag. It is the same prev link string which is part of the pagy_nav helper.","Useful to build minimalistic helpers UIs that don't use nav bar links (e.g. countless extra)."]},{"i":"pagy-next-a-pagy-text-pagy-t-pagy-next-aria-label-pagy-t-pagy-aria-label-prev","l":"`pagy_next_a(pagy, text: pagy_t('pagy.next'), , aria_label: pagy_t('pagy.aria_label.prev))`","p":["Return the enabled/disabled next page anchor tag. It is the same next link string which is part of the pagy_nav helper.","Useful to build minimalistic helpers UIs that don't use nav bar links (e.g. countless extra)."]},{"i":"pagy-prev-link-pagy","l":"`pagy_prev_link(pagy)`","p":["Conditionally return the previous page link tag. Useful to add the link tag to the HTML head."]},{"i":"pagy-next-link-pagy","l":"`pagy_next_link(pagy)`","p":["Conditionally return the next page link tag. Useful to add the link tag to the HTML head."]},{"l":"Support for alternative pagination types and features","p":["Besides the classic pagy*_nav pagination, the pagy*_nav_js and the pagy*_combo_nav_js UI components, Pagy offers a few helpers to support a few alternative types of pagination and related features."]},{"l":"Countless","p":["You can totally avoid one query per render by using the countless extra. It has a few limitation, but still supports navbar links (see also Pagy::Countless for more details)."]},{"i":"navlessincremental","l":"Navless/incremental","p":["If you don't need the navbar you can just set the :size variable to an empty value and the page links will be skipped from the rendering. That works with Pagy and Pagy:Countless instances. All the *nav helpers will render only the prev and next links/buttons, allowing for a manual incremental pagination.","You can also use the pagy_prev_html, pagy_next_html mostly useful if you also use the countless extra.","Here is a basic example that uses pagy_countless(saving one query per render):"]},{"l":"Auto-incremental","p":["Automatic incremental pagination (sometimes improperly called \"infinite-scroll\" pagination) is a UI-less pagination that loads the next page at the end of the listing.","Depending on your environment, there are a few ways to implement it. You can find a simple generic example below, or some more modern specific technique shown in the following posts:","Endless Scroll / Infinite Loading with Turbo Streams & Stimulus by Stefan Wienert","Pagination with Hotwire by Jonathan Greenberg","For a plain old javascript example, we are going to use the same Incremental code above with just a couple of changes:","1. Hide the link in _next_link.html.erb by adding a style attribute:","2. Add a javascript that will click the link when the listing-bottom appears in the viewport on load/resize/scroll. It will keep the page filled with results, one page at a time:"]},{"i":"circularinfinite","l":"Circular/Infinite","p":["This type of pagination sets the next page to 1 when the current page is the last page, allowing an infinite loop through the pages.","For example, it is often used to show a few suggestions of \"similar products\" in a horizontal stripe of just a few pages of a few items each. Clicking on next will continue to loop through.","For example:","Passing a forced :count of 25 will generate 5 pages of 5 items each that will always have a next page. Regardless the actual collection count, you will show the first 25 items of the collection, looping in stripes of 5 items each.","You may want to combine it with something like:"]}],[{"l":"Searchkick Extra","p":["Paginate Searchkick::Results objects."]},{"l":"Synopsis"},{"l":"Setup"},{"l":"Modes","p":["This extra offers two ways to paginate Searchkick::Results objects:","You use the pagy_search method in place of the search method.","Pagy creates its object out of your result."]},{"l":"Variables","p":["Variable","Description","Default",":searchkick_pagy_search","customizable name of the pagy search method",":pagy_search",":searchkick_search","customizable name of the original search method",":search"]},{"l":"Methods"},{"i":"pagy-searchkick-pagy-search","l":"`Pagy::Searchkick.pagy_search(...)`","p":["This method accepts the same arguments of the search method and you must use it in its place in active mode."]},{"i":"pagy-new-from-searchkick-results-vars","l":"`Pagy.new_from_searchkick(results, vars={})`","p":["This constructor accepts a Searchkick::Results as the first argument, plus the optional pagy variables. It automatically sets the :items, :page and :count pagy variables extracted/calculated out of it."]},{"i":"pagy-searchkick-pagy-search-args-vars","l":"`pagy_searchkick(pagy_search_args, vars={})`","p":["This method is similar to the generic pagy method, but specialized for Searchkick. (see the pagy doc)","It expects to receive YourModel.pagy_search(...) result and returns the paginated response."]},{"i":"pagy-searchkick-get-vars-array","l":"`pagy_searchkick_get_vars(array)`","p":["This sub-method is similar to the pagy_get_vars sub-method, but it is called only by the pagy_searchkick method. (see the pagy_get_vars doc)."]}],[{"l":"Standalone Extra","p":["Use pagy completely standalone.","You can use pagy without any request object, nor Rack environment/gem, nor any defined params method, even in the irb/rails console without an app (see the Pagy::Console module).","You may need it in order to paginate a collection outside of a regular rack request or controller, like in an unconventional API module, or in the irb/rails console or for testing/playing with backend and frontend methods.","You trigger the standalone mode by setting an :url variable, which will be used directly and verbatim, instead of extracting it from the request Rack::Request object. You can also pass other params by using the :params variable as usual. That will be used to produce the final URLs in the usual way.","This extra will also create a dummy params method (if not already defined) in the module where you will include the Pagy::Backend(usually a controller)."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":url","url string (can be absolute or relative)","nil","You can use the :params variable to add params to the final URLs."]},{"l":"Methods"},{"i":"overridden-pagy-url-for","l":"Overridden `pagy_url_for`","p":["The standalone extra overrides the pagy_url_for method used internally. If it finds a set :url variable it assumes there is no request object, so it uses the :url variable verbatim to produce the final URL, only adding the query string, composed by merging the :page param to the :params variable. If there is no :url variable set it works like usual, i.e. it uses the rake request object to extract the base_url, path from the request, merging the params returned from the params controller method, the :params variable and the :page param to it."]},{"i":"dummy-params-method","l":"Dummy `params` method","p":["This extra creates a dummy params method (if not already defined) in the module where you include the Pagy::Backend(usually a controller). The method is called by pagy to retrieve backend variables coming from the request, and expects a hash, so the dummy param method returns an empty hash avoiding an error."]}],[{"l":"Tailwind Style","p":["Tailwind allows to apply styles to any DOM element, so you don't actually need any special extra to produce a different output. You can use the standard pagy helpers and @apply the tailwind classes by just using the pagy.tailwind.css stylesheet file."]}],[{"l":"Trim Extra","p":["Remove the page=1 param from the link of the first page.","This extra is needed only for very specific scenarios, for example if you need to avoid frontend cache duplicates of the first page."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":trim_extra","enable or disable the feature","true","You can use the :trim_extra variable to opt-out of trimming even when the extra is required (trimming by default).","You can set the Pagy::DEFAULT[:trim_extra] default to false if you want to explicitly pass the trim_extra: true variable in order to trim the page param."]},{"l":"Methods","p":["The trim extra overrides the pagy_anchor method in the Pagy::Frontend module."]},{"i":"pagy-anchor-pagy","l":"`pagy_anchor(pagy)`","p":["This method overrides the pagy_anchor using the pagy_trim to process the link to the first page."]},{"i":"pagy-trim-pagy-a","l":"`pagy_trim(pagy, a)`","p":["Sub-method called only by the pagy_anchor method, it removes the the :page_param param from the first page link ( usually page=1).","Override this method if you are customizing the urls.","If you use a pagy_*nav_js helper you should customize also the Pagy.trim javascript function."]}],[{"l":"Troubleshooting"},{"i":"records-may-randomly-repeat-in-different-pages-or-be-missing","l":"Records may randomly repeat in different pages (or be missing)","p":["When using LIMIT, it is important to use an ORDER BY clause that constrains the result rows into a unique order. Otherwise you will get an unpredictable subset of the query's rows."]},{"l":"Invalid HTML","p":["Pagy sets the aria-label attribute of its nav elements with the translated and pluralized pagy.aria_label.nav that finds in the locale files. That would be (always) Pages for the en locale.","Since the nav or role=navigation elements of a HTML document are considered landmark roles, they should be uniquely aria-identified in the page.","The class attribute with a value of pagination is already added by the pagy_bootstrap_nav so it's a duplicate HTML attribute which is invalid html.","In the specific bootstrap example you could add the class with:"]}],[{"l":"CHANGELOG"},{"l":"Breaking Changes","p":["If you upgrade from version 8.0.0 see the following:","Breaking changes in version 8.0.0","Breaking changes in version 7.0.0","Breaking changes in version 6.0.0","Breaking changes in version 5.0.0","Breaking changes in version 4.0.0","Breaking changes in version 3.0.0","Breaking changes in version 2.0.0","Breaking changes in version 1.0.0"]},{"l":"Deprecations","p":["The foundation, materialize, semantic and uikit CSS extras have been discontinued and will be removed in v9(See the details)","Protected method Pagy#setup_pages_var. Use Pagy#setup_last_var instead"]},{"i":"version-830","l":"Version 8.3.0","p":["Discontinue foundation materialize, semantic and uikit CSS extras","Improve playground:","Add install option (automated in pagy development)","Fix HTML validation for all apps","Remove unused styles from the demo app","Hardcode version in pagy.gemspec"]},{"i":"version-822","l":"Version 8.2.2","p":["Add nav translation for ko (closes #592) (#690)"]},{"i":"version-821","l":"Version 8.2.1","p":["Fix empty page param raising error (closes #689)"]},{"i":"version-820","l":"Version 8.2.0","p":["Fix the '#pagy_url_for' method for calendar pagination (#688)","Extend the use of pagy_get_page to the arel, array and countless extras","Add the pagy_get_count method to the backend"]},{"i":"version-812","l":"Version 8.1.2","p":["Added \"da\" locale for aria_label.nav (closes #583)"]},{"i":"version-811","l":"Version 8.1.1","p":["Fixed broken aria-label for disabled links in Foundation (#685)","Simplification of input variables and defaults: params and request_path are not instance variables"]},{"i":"version-810","l":"Version 8.1.0","p":["Implement max_pages to limit the pagination regardless the actual count","Improve efficiency of params in pagy_url_for","Remove nil variables from DEFAULT","Removed redundant @pages, aliased with @last"]},{"i":"version-802","l":"Version 8.0.2","p":["Minor change in rails app and RM run config","Fix canonical gem root:","Correct script.build: \"NODE_PATH=\"$(bundle show 'pagy')/javascripts\"","Move pagy.gemspec inside the gem root dir","Fix for Turbo not intercepting changes in window.location","Use require_relative for gem/lib files","Complete translation of aria.nav for \"ru\" locale (close #599)","Docs improvement and fixes"]},{"i":"version-801","l":"Version 8.0.1","p":["Reorganize the gem root dir: it was the lib dir (containing everything), now is the gem dir (containing lib and everything else).","Fix broken link in README"]},{"i":"version-800","l":"Version 8.0.0"},{"i":"breaking-changes-1","l":"Breaking changes","p":["Renamed/removed the following arguments for all the helpers:","Search pagy_id:, replace with id:","Search nav_aria_label:, replace with aria_label:","The nav_i18n_key has been removed: pass the interpolated/pluralized value as the aria_label: argument","The item_i18n_key has been removed: pass the interpolated/pluralized value as the item_name: argument","The link_extra: has been removed: its cumulative mechanism was confusing and error prone. The :anchor_string pagy variable substitutes it, however it's not an helper argument anymore, so you can assign it as the DEFAULT[:anchor_string] and/or pass it as any other pagy variable at object construction. ( See customize the link attributes)","HTML structure, classes and internal methods have been changed: they may break your views if you used custom stylesheets, templates or helper overrides. See the complete changes below if you notice any cosmetic changes or get some exception.","The navs and support extras has been merged into the new pagy extra. Search for extra/navs and extras/support and replace with extras/pagy(remove the duplicate if you used both)","The build path for javascript builders has been updated to the canonical paths for gems, and has moved from the lib to the gem root. Notice that the correct setup in package json was still wrongly wrapped in the gem dir for 8.0.0-8.0.1, and it has finally been fixed in 8.0.2 (sorry for that):","8.0.0-8.0.1 only: build: NODE_PATH=\\$(bundle show 'pagy')/gem/javascripts\\ your original command","8.0.2+: build: NODE_PATH=\\$(bundle show 'pagy')/javascripts\\ your original command"]},{"l":"Changes","p":["All the *combo-nav_js of the framework extras use simpler structure and improve the look and feel consistently with their respective frameworks","All the frontend extra have been normalized and are totally consistent with each other; a few may add the classes: argument to a few components, when the framework allows it.","All the pagy helper root classes have been changed according to the following rule. For example:","and so on for all the helpers","Better code issue template","Created the pagy playground system of apps working with the pagy executable.","Docs Improvements","Fix broken link of pagy.rb in docs (closes #668, #669)","HTML changes","Internal renaming FrontendHelpers> JSTools","LEGACY CHANGELOG >>>","pagy-bootstrap-nav-js> pagy-bootstrap nav-js","pagy-nav> pagy nav","Streamlined HTML and CSS helper structure. You may want to look at the actual output by running the pagy demo","The *combo_nav_js and pagy_items_selector_js helpers use a more efficient code","The active class of the *nav/*nav_js links as been renamed as current","The classes: and aria_label: keyword arguments have been added to the returned lambda","The current and gap classes are assigned to the specific a tags","The disabled links are so because they are missing the href attributes. (They also have the role=link and aria-disabled=true attributes)","The disabled, prev, next and pagy-combo-input link classes have been removed (see the stylesheets for details)","The extra positional argument of the returned lambda has been removed","The gap in the nav bars is a disabled anchor element ( a tag without a href attribute)","The internal prev_aria_label_attr and next_aria_label_attr methods have been removed","The label//label and b//b wrappers in the dictionary files have been removed","The link_extra: key argument has been removed","The nav_aria_label_attr method has been renamed as nav_aria_label","The pagy_link_proc method (only used internally or in your custom overriding) has been renamed to pagy_anchor and it works slighty differently:","The pagy_nav and pagy_nav_js helpers output a series of a tags inside a wrapper nav tag (nothing else)","The pagy_prev_html and pagy_next_html have been renamed as pagy_prev_a and pagy_next_a","The pagy_prev_link_tag and pagy_next_link_tag have been renamed as pagy_prev_link and pagy_next_link","The rel=prev and rel=next attributes have been dropped (they are obsolete)","The src/pagy.ts and relative built javascript files have been adapted to the above changes","The stylesheets are a lot simpler as a consequence of the changes above"]}]] \ No newline at end of file +[[{"l":"Pagy","p":["Gem Version Ruby Ruby Test E2E Test Coverage Rubocop Status MIT license CII Best Practices Commits Downloads Stars"]},{"i":"the-best-pagination-ruby-gem","l":"\uD83C\uDFC6 The Best Pagination Ruby Gem \uD83E\uDD47"},{"i":"-whats-new-in-80-","l":"✴ What's new in 8.0+ ✴","p":["WARNING: The foundation, materialize, semantic and uikit CSS extras have been discontinued and will be removed in v9 (See the details)","New Pagy Playground to showcase, clone and develop pagy APPs without any setup on your side (try the pagy demo)","New :max_pages variable to limit the pagination regardless the actual count","Better frontend helpers","See the Changelog for possible breaking changes"]},{"i":"#","p":["Each dot in the visualization above represents the resources that Pagy consumes for one full rendering. The other gems consume hundreds of times as much for the same rendering.","The IPS/Kb ratio is calculated out of speed (IPS) and Memory (Kb): it shows how well each gem uses each Kb of memory it allocates/consumes.","Notice: the above charts refers to the comparison of the basic pagy v3.0.0 helper with will_paginate v3.1.7 and kaminari v1.1.1.","While it's not up-to-date, you can expect roughly similar results with the latest versions, maybe a bit less dramatic in performance due to the multiple features added to pagy since v3 (e.g. customizable and translated aria-labels). However, consider that the difference become A LOT bigger in favor of pagy if you use *nav_js helpers, Pagy::Countless or JSON and client side pagination that are not part of the comparison because missing in the other gems.","See the Detailed Gems Comparison for full details."]},{"i":"it-does-it-all-better","l":"\uD83E\uDD29 It does it all. Better.","p":["It works in any environment With Rack frameworks (Rails, Sinatra, Padrino, etc.) or in pure ruby without Rack","It works with any collection With any ORM, any DB, any search gem, elasticsearch_rails, meilisearch, searchkick, ransack, and just about any list, even if you cannot count it","It supports all kinds of pagination calendar, countless, geared, incremental, auto-incremental, infinite, headers, JSON, cursor","It supports the most popular CSS Frameworks and APIs bootstrap, bulma, tailwind, JSON:API","It supports faster client-side rendering With classic or innovative UI components (see Javascript Components) or by serving JSON to your favorite Javascript framework","It has 100% of test coverage for Ruby, HTML and Javascript E2E ( see Pagy Workflows CI)"]},{"l":"Code Structure","p":["Pagy has a very slim core code very easy to understand and use.","It has a quite fat set of optional extras that you can explicitly require for very efficient and modular customization ( see extras)","It has no dependencies: it produces its own HTML, URLs, i18n with its own specialized and fast code","Its methods are accessible and overridable right where you use them (no pesky monkey-patching needed)"]},{"l":"Unlike the other gems","p":["Pagy is very modular and does not load any unnecessary code ( see why...)_","It doesn't impose limits even with collections|scopes that already used limit and offset ( see how...)","It raises Pagy::OverflowError exceptions that you can rescue from ( see how...) or use the overflow extra for a few ready to use common behaviors","It does not impose any difficult-to-override logic or output"]},{"i":"it-s-easy-to-use-and-customize","l":"\uD83D\uDE0E It's easy to use and customize","p":["(See all the Backend Tools)","(See all the CSS Framework Extras)","(See all the Search Extras)","(See the Quick Start)","calendar extra","Extras add special options and manage different components, behaviors, Frontend or Backend environments... usually by just requiring them (and optionally overriding some default).","Optionally set your defaults in the pagy initializer:","Or, choose from the following view helpers:","pagy_combo_nav_js","pagy_combo_nav_js(@pagy)","pagy_info","pagy_info(@pagy)","pagy_items_selector_js","pagy_nav","pagy_nav_js","pagy_nav_js(@pagy)","pagy_nav(@calendar[:year]) pagy_nav(@calendar[:month])(other units: :quarter, :week, :day and custom)","pagy_nav(@pagy)","Preview (Bootstrap Style shown)","View Helper Name"]},{"l":"Backend Extras","p":["arel: Provides better performance of grouped ActiveRecord collections","array: Paginate arrays efficiently.","calendar: Add pagination filtering by calendar time unit (year, quarter, month, week, day, custom)","countless: Paginate without the need of any count, saving one query per rendering","elasticsearch_rails: Paginate ElasticsearchRails response objects","headers: Add RFC-8288 compliant http response headers (and other helpers) useful for API pagination","jsonapi: Implement the JSON:API specifications for pagination","meilisearch: Paginate Meilisearch results","metadata: Provides the pagination metadata to Javascript frameworks like Vue.js, react.js, etc.","searchkick: Paginate Searchkick::Results objects"]},{"l":"Frontend Extras","p":["bootstrap: Add nav helpers for the Bootstrap pagination component","bulma: Add nav helpers for the Bulma CSS pagination component","pagy: Adds the pagy styled versions of the javascript-powered nav helpers and other components to support countless or navless pagination (incremental, auto-incremental, infinite pagination).","tailwind: Ready to use style snippet for Tailwind CSS"]},{"l":"Extra Features and Tools","p":["Pagy::Console: Use pagy in the irb/rails console even without any app nor configuration","gearbox: Automatically change the number of items per page depending on the page number","i18n: Use the I18n gem instead of the faster pagy-i18n implementation","items: Allow the client to request a custom number of items per page with an optional selector UI","overflow: Allow easy handling of overflowing pages","standalone: Use pagy without any request object, nor Rack environment/gem, nor any defined params method","trim: Remove the page=1 param from the first page link","See also the How To Page"]},{"i":"it-s-well-documented-and-supported","l":"\uD83E\uDD13 It's well documented and supported"},{"l":"Documentation","p":["Migrate from WillPaginate and Kaminari(practical guide)","Quick Start","How To (quick recipes)","Changelog","Deprecations","How Pagy's Docs work?"]},{"l":"Support","p":["Discussions","Issues"]},{"l":"Posts and tutorials","p":["Benchmarks and Memory Profiles Source(Rails app repository)","Build Load More Pagination with Pagy and Rails Hotwire by Maful. ( This tutorial shows how you can turbo_stream with GET requests).","Building a dynamic data grid with search and filters using rails, hotwire and ransack by Benito Serna.","Detailed Gems Comparison(charts and analysis)","Endless Scroll / Infinite Loading with Turbo Streams & Stimulus by Stefan Wienert.","Faster Pagination with Pagy introductory tutorial by Sirajus Salekin","Handling Pagination When POSTing Complex Search Forms by Ben Koshy.","How to make your pagination links sticky + bounce at the bottom of your page by Ben Koshy.","How to Override pagy methods only in specific circumstances by Ben Koshy.","Integrating Pagy with Hanami by Paweł Świątkowski","Migrate from WillPaginate and Kaminari(practical guide)","Pagination and infinite scrolling with Rails and the Hotwire stack by David Colby","Pagination for Beginners: What is it? Why bother? by Ben Koshy.","Pagination with Hotwire by Jonathan Greenberg","Pagination with Pagy by Tiago Franco","Quick guide for Pagy with Sinatra and Sequel by Victor Afanasev","Stateful Tabs with Pagy by Chris Seelus","한국어 튜토리얼","日本語の投稿"]},{"l":"Screencasts"},{"i":"top-contributors","l":"Top \uD83D\uDCAF Contributors"},{"i":"credits","l":"\uD83D\uDC4F Credits","p":["Many thanks to:","Ben Koshy for his contributions to the documentation, user support and interaction with external frameworks","GoRails for the great Pagy Screencast and their top notch Rails Episodes","Imaginary Cloud for continually publishing high-interest articles and helping to share Pagy when it just started","JetBrains for their free OpenSource license project","The Stargazers for showing their support"]},{"i":"repository-info","l":"\uD83D\uDCE6 Repository Info","p":["See Contributing","Pagy follows the Semantic Versioning 2.0.0. Please, check the Changelog for breaking changes introduced by mayor versions. Using pessimistic version constraint in your Gemfile will ensure smooth upgrades.","The master branch is the latest rubygem-published release. It also contains docs and comment changes that don't affect the published code. It is never force-pushed.","The dev branch is the development branch with the new code that will be merged in the next release. It could be force-pushed.","Expect any other branch to be internal, experimental, force-pushed, rebased and/or deleted even without merging."]},{"i":"related-projects","l":"\uD83D\uDC9E Related Projects","p":["Search rubygems.org"]},{"i":"license","l":"\uD83D\uDCC3 License","p":["MIT"]}],[{"l":"Quick Start","p":["If you want to just try Pagy before using it in your own app, you have a couple of alternatives...","Run the interactive demo from your terminal:","...and point your browser to http://0.0.0.0:8000","Interact with every method, helper and extra in a IRB console without any setup:","...and use it without any app"]},{"l":"1. Install","p":["If you use Bundler, add the gem in the Gemfile, optionally avoiding the next major version with breaking changes ( see RubyGem Specifiers):","If you don't use Bundler, install and require the Pagy gem:"]},{"l":"2. Configure","p":["Download the configuration file linked below and save it into the config/initializers dir","Quick Start","Download the configuration file linked below and require it when your app starts","Uncomment/edit the pagy.rb file in order to explicitly require the extras you need and eventually customize the static Pagy::DEFAULT variables in the same file.","You can further customize the variables per instance, by explicitly passing any variable to the Pagy*.new constructor or to any pagy* backend/controller method."]},{"l":"3. Backend Setup","p":["For search backends see: elasticsearch_rails, meilisearch, searchkick, ransack.","You may also use the calendar, countless, geared, incremental, auto-incremental, infinite pagination"]},{"l":"4. Render the pagination","p":["Your pagination is rendered on the server","For native pagy helpers (used also with tailwind), you can integrate the Pagy Stylesheets","For different CSS frameworks and different helpers (static, responsive, compact, etc.), you can look at the bootstrap, bulma extras","Your pagination is rendered by Vue.js, react.js, ...","Your API is consumed by some client"]}],[{"l":"Pagy Playground","p":["You can showcase, clone and develop a few pagy APPs without the need to setup anything on your side!","Depending on your environment you may need to prepend bundle exec in all the examples shown."]},{"l":"Pagy Apps","p":["We have a few single-file apps ready to run in your browser for various purposes: they are all tested and used to run the E2e Test workflow."]},{"l":"1. Repro App","p":["You can use this app as a starting point to try pagy or reproduce issues, in order to get support or file bugs reports.","You should find the ./repro.ru cloned app file in the current dir. Feel free to rename or move it as you like.","This command runs your rackup app with a puma server, with rerun that auto-restart it when it changes:","Point a browser to http://0.0.0.0:8000","Edit it at will.","Bundler installs the required gems during the first run. After that you can skip the rubygem checks by passing the --no-istall flag"]},{"l":"2. Rails App","p":["You can use this app as a starting point to reproduce rails related pagy issues. It has the same usage as the Repro App. i.e.:"]},{"l":"3. Demo App","p":["This is the interactive showcase for all the pagy helpers and CSS styles.","Run the interactive demo from your terminal:","...and point your browser to http://0.0.0.0:8000","Run pagy clone demo to inspect the app file","If you want to see how your CSSs changes look, you can follow the same usage as the Repro App to iterate through changes."]},{"l":"4. Calendar App","p":["This is the interactive showcase/repro for the calendar extra:","Run the interactive demo from your terminal:","...and point your browser to http://0.0.0.0:8000","Run pagy clone calendar to inspect the app file.","If you need to reproduce any calendar related issue, you can follow the same usage as the Repro App."]},{"l":"Troubleshooting"},{"l":"Bundler inline","p":["All the pagy apps use bundler/inline.","Depending on your environment you might get this message for some gem:","If bundle exec doesn't solve it, then try bundle update and gem cleanup.","If after that you get into another error:","then gem pristine GEMNAME should solve the problem."]},{"l":"Rerun","p":["Rerun is used for restarting your app automatically during development.","That's very convenient, but it may still have some rough edges:","Your app is in a dir with looping simlinks, and the listen gem cannot handle it.","It might not work properly or it may require additional dependencies.","Pass the --no-rerun option to work with rackup only."]}],[{"l":"Prerequisites"},{"l":"Ruby","p":["Pagy follows the ruby end-of-life supported rubies."]},{"l":"Working environments","p":["Your app uses a Rack based framework (Rails, Sinatra, Padrino, etc.)","Use pagy normally","Your app does not use a Rack based framework.","Use the standalone extra","With or without any app nor configuration","Use the Pagy::Console"]},{"l":"Supported collections","p":["Out of the box pagy supports ActiveRecord::Relation, array, elasticsearch_rails, searchkick and meilisearch collections.","In order to paginate other collections, search for \"paginate\" in the search field above."]}],[{"i":"migrate-willpaginatekaminari","l":"Migrate WillPaginate/Kaminari","p":["This page tries to cover most of the standard changes you will need to make in order to to migrate from a legacy pagination, however, if the legacy pagination is highly customized you may need more digging into the Pagy documentation.","Feel free to ask via Pagy Support if you need help."]},{"l":"Steps","p":["The Pagy API is quite different from other pagination gems, so there is not always a one-to-one correlation between the changes you will have to make, however, if you split the process in the following general steps it should be quite simple.","Removing the legacy code, trying to convert the statements that have a direct relation with Pagy","Running the app so to raise exceptions in order to find legacy code that may still be in place","When the app runs without errors, adjusting the pagination to look and work as before: just many times faster and using many times less memory"]},{"l":"Removing the old code","p":["In this step you will search statements from legacy pagination gems, remove them and possibly write the equivalent Pagy statements if that makes sense for Pagy:","If it makes sense, you should add the equivalent Pagy statement and remove the legacy statement(s).","If it doesn't make sense, then just remove the legacy statement.","Don't worry about missing something in this step: if anything won't work as before the next steps will fix it."]},{"l":"Preparation","p":["Download the pagy initializer: you will edit it during the process. Migrate from other gems","Replace the legacy gem with gem pagy in the Gemfile and bundle, or install and require the gem if you don't use bundler.","Ensure that the legacy gem will not get loaded anymore (or it could mask some old statement still in place and not converted)","Add the include Pagy::Backend statement to the application controller.","Add the include Pagy::Frontend statement to the application helper.","Keep handy the legacy gem doc and the Pagy API doc in parallel."]},{"l":"Application-wide search and replace","p":["Search for the class name of the pagination gem to migrate from, for example WillPaginate or Kaminari. You should find most of the code relative to global gem configuration, or monkey patching.","For example, the following configuration are equivalent:","Remove all the legacy settings of the old gem(s) and uncomment and edit the new settings in the pagy.rb initializer (see How to configure pagy)."]},{"l":"Cleanup the Models","p":["One of the most noticeable difference between the legacy gems and Pagy is that Pagy doesn't mess at all with the models.","The other gems are careless about adding methods, scopes, and even configuration settings to them, so you will find different kinds of statements scattered around in your models. You should remove them all and eventually add the equivalent code where it makes sense to Pagy, which of course is absolutely not in the models.","For example, you may want to search for keywords like per_page, per and such, which are actually configuration settings. They should either go into the pagy.rb initializer if they are global to the app, or into the specific pagy call in the controller if they are specific to an action.","If the app uses the page scope in some of its methods or scopes in some model, that should be removed (including removing the argument used to pass the page number to the method/scope), leaving the rest of the scope in place. Search where the app uses the already paginated scope in the controllers, and use the scope in a regular pagy statement. For example:"]},{"l":"Search and replace in the Controllers","p":["In the controllers, the occurrence of statements from legacy pagination should have a one-to-one relationship with the Pagy pagination, so you should be able to go through each of them and convert them quite easily.","Search for keywords like page and paginate statements and use the pagy method instead. For example:"]},{"l":"Search and replace in the Views","p":["Also in the views, the occurrence of statements from legacy pagination should have a one-to-one relationship with the Pagy pagination, so you should be able to go through each of them and convert them quite easily.","Search for keywords like will_paginate and paginate statement and use one of the pagy_nav methods. For example:"]},{"l":"Find the remaining code","p":["If the app has tests it's time to run them. If not, start the app and navigate through its pages.","If anything of the old code is still in place you should get some exception. In that case, just remove the old code and retry until there will be no exception."]},{"l":"Fine tuning","p":["If the app is working and displays the pagination, it's time to adjust Pagy as you need, but if the old pagination was using custom items (e.g. custom params, urls, links, html elements, etc.) it will likely not work without some possibly easy adjustment.","Please take a look at the topics in the how-to documentation: that should cover most of your custom needs."]},{"l":"CSS","p":["The css styling that you may have applied to the pagination elements may need some minor change. However if the app uses the pagination from bootstrap (or some other framework), the same CSSs should work seamlessly with the pagy nav helpers."]},{"l":"I18n","p":["If the app uses I18n you should follow the Pagy::I18n documentation."]}],[{"l":"How To","p":["This page contains the practical tips and examples to get the job done with Pagy. If there is something missing, or some topic that you think should be added, fixed or explained better, please open an issue."]},{"l":"Control the items per page","p":["You can control the items per page with the items variable. (Default 20)","You can set its default in the pagy.rb initializer (see How to configure pagy). For example:","You can also pass it as an instance variable to the Pagy.new method or to the pagy controller method:","The defined :items variable overrides any limit already set in ActiveRecord collections:","See also a couple of extras that handle the :items in some special way:","gearbox: Automatically change the number of items per page depending on the page number","items: Allow the client to request a custom number of items per page with an optional selector UI"]},{"l":"Control the page links","p":["You can control the number and position of the page links in the navigation through the :size variable or override the series method."]},{"l":"Simple nav","p":["You can set the :size variable to a single positive Integer to represent the total number of page links rendered. The current page will be placed as centered as possible in the series.","For example:","Setting the :size variable as a single integer has a few advantages over the classic way. It uses a simpler and faster algorithm, the series length is more constant, cleaner and less confusing to the user. On the other hand it does not allow the user to jump to the first or last page of a long series, which may or may not be a limitation. For example: with a navigation using Pagy::Countless or Calendar it is a clear advantage."]},{"l":"Classic nav","p":["You can set the :size variable to an array of 4 integers in order to specify which and how many page links to show.","The default is [1,4,4,1], which means that you will get 1 initial page, 4 pages before the current page, 4 pages after the current page, and 1 final page.","As usual you can set the :size variable as a global default by using the Pagy::DEFAULT hash or pass it directly to the pagy method.","The navigation links will contain the number of pages set in the variables:","size[0]... size[1] current page size[2]... size[3]- e.g.:","As you can see by the result of the series method, you get 3 initial pages, 1 :gap(series interrupted), 4 pages before the current page, the current :page(which is a string), 4 pages after the current page, another :gap and 3 final pages.","You can easily try different options (also asymmetrical) in a console by changing the :size. Just check the series array to see what it contains when used in combination with different core variables."]},{"l":"Skip the page links","p":["If you want to skip the generation of the page links, just set the :size variable to an empty array:"]},{"l":"Customize the series","p":["If changing the :size is not enough for your requirements (e.g. if you need to add intermediate segments or midpoints in place of gaps) you should override the series method. See more details and examples here."]},{"l":"Pass the page number","p":["You don't need to explicitly pass the page number to the pagy method, because it is pulled in by the pagy_get_vars(which is called internally by the pagy method). However you can force a page number by just passing it to the pagy method. For example:","That will explicitly set the :page variable, overriding the default behavior (which usually pulls the page number from the params[:page])."]},{"l":"Customize the dictionary","p":["Pagy composes its output strings using standard i18n dictionaries. That can be used to change the language and customize your specific app.","If you are ok with the default supported locale dictionaries just refer to Pagy::I18n.","If you want to customize the translations or some specific output, you should edit the relevant entries in the pagy dictionary.","If you explicitly use the i18n extra, override the pagy target entries in your own custom dictionary (refer to the I18n official documentation).","If you don't use the above extra (and rely on the pagy faster code) you can copy and edit the dictionary files that your app uses and configure pagy to use them."]},{"l":"Customize the ARIA labels","p":["You can customize the aria-label attributes of all the pagy helpers by passing the :aria_label string ( See pagy_nav)","You can also replace the pagy.aria_label.nav strings in the dictionary, as well as the pagy.aria_label.prev and the pagy.aria_label.next.","See more details in the ARIA attributes Page."]},{"l":"Customize the page param","p":["Pagy uses the :page_param variable to determine the param it should get the page number from and create the URL for. Its default is set as Pagy::DEFAULT[:page_param] = :page, hence it will get the page number from the params[:page] and will create page URLs like ./?page=3 by default.","You may want to customize that, for example to make it more readable in your language, or because you need to paginate different collections in the same action. Depending on the scope of the customization, you have a couple of options:","Pagy::DEFAULT[:page_param] = :custom_param will be used as the global default","pagy(scope, page_param: :custom_param) or Pagy.new(count:100, page_param: :custom_param) will be used for a single instance (overriding the global default)","You can also override the pagy_get_page if you need some special way to get the page number."]},{"l":"Customize the link attributes","p":["If you need to customize some HTML attribute of the page links, you may not need to override the pagy_nav* helper. It might be enough to pass some extra attribute string with the :anchor_string variable. For example:","See more advanced details about The anchor_string variable"]},{"l":"Customize the params","p":["When you need to add some custom param or alter the params embedded in the URLs of the page links, you can set the variable :params to a Hash of params to add to the URL, or a Proc that can edit/add/delete the request params.","If it is a Proc it will receive the key-stringified params hash complete with the page param and it should return a possibly modified version of it.","An example using except and merge!:","You can also use the :fragment variable to add a fragment the URLs of the pages:","For performance reasons the :fragment string must include the #!"]},{"l":"Customize the URL","p":["When you need something more radical with the URL than just massaging the params, you should override the pagy_url_for right in your helper.","If you are also using the trim extra you should also override the pagy_trim method or the Pagy.trim javascript function.","The following are a couple of examples."]},{"l":"Enable fancy-routes","p":["The following is a Rails-specific alternative that supports fancy-routes (e.g. get 'your_route(/:page)' ... that produce paths like your_route/23 instead of your_route?page=23):","The above overridden method is quite slower than the original because it passes through the rails helpers. However that gets mitigated by the internal usage of pagy_anchor which calls the method only once even in the presence of many pages."]},{"l":"POST with page links","p":["You may need to POST a very complex search form that would generate an URL potentially too long to be handled by a browser, and your page links may need to use POST and not GET. In that case you can try this simple solution:","That would produce links that look like e.g. a href=22/a. Then you can attach a javascript \"click\" event on the page links. When triggered, the href content (i.e. the page number) should get copied to a hidden page input and the form should be posted.","For a broader tutorial about this topic see Handling Pagination When POSTing Complex Search Forms by Ben Koshy."]},{"l":"Customize the item name","p":["The pagy_info and the pagy_items_selector_js helpers use the \"item\"/\"items\" generic name in their output. You can change that by editing the values of the pagy.item_name i18n key in the dictionary files that your app is using.","Besides you can also pass the :item_name by passing an already pluralized string directly to the helper call:"]},{"l":"Customize CSS styles","p":["For all its own interactive helpers the pagy gem includes a few stylesheets that you can customize.","Besides that, pagy provides a few frontend extras for bootstrap, bulma and tailwind that come with a decent styling provided by their respective framework.","If you need to further customize the styles provided by the extras, you don't necessary need to override the helpers in most of them: here are a few alternatives:","Check wether the specific extra offers customization (e.g. bulma)","Define the CSS styles to apply to the pagy CSS classes","If sass/scss is available: extend the pagy CSS classes with some framework defined class, using the @extend sass/scss directive","Use the jQuery addClass method","Use a couple of lines of plain javascript"]},{"i":"override-css-rules-in-element-style-attribute","l":"Override CSS rules in element \"style\" attribute","p":["In order to get a decent default look, a couple of helpers (i.e. pagy*_combo_nav_js, pagy*_items_selector_js) assign element style attributes to one or more tags. You can override their rules in your own stylesheets by using the attribute [style] selector and !important. Here is an example for overriding the width of the input element:"]},{"l":"Override pagy methods","p":["You include the pagy modules in your controllers and helpers, so if you want to override any of them, you can redefine them right in your code, where you included them.","You can read more details in the nice How to Override pagy methods only in specific circumstances mini-post by Ben Koshy.","Also, consider that you can use prepend if you need to do it globally:"]},{"i":"override-pagy_get_count-use-count_documents-with-mongoid","l":"Override pagy_get_count: use count_documents with Mongoid"},{"l":"Paginate an Array","p":["See the array extra."]},{"l":"Paginate ActiveRecord collections","p":["Pagy works out of the box with ActiveRecord collections, however here are a few specific cases that might be treated differently:"]},{"l":"Grouped collection","p":["For better performance of grouped ActiveRecord collection counts, you may want to take a look at the arel extra."]},{"l":"Decorated collection","p":["Do it in 2 steps: first get the page of records without decoration, and then apply the decoration to it. For example:"]},{"i":"custom-scope-count","l":"Custom scope/count","p":["Your scope might become complex and the default pagy collection.count(:all) may not get the actual count. In that case you can get the right count in a couple of ways:"]},{"l":"Ransack results","p":["Ransack result returns an ActiveRecord collection, which can be paginated out of the box. For example:"]},{"l":"PostgreSQL Collections","p":["Always order your colections!"]},{"l":"Paginate for generic API clients","p":["When your app is a service that doesn't need to serve any UI, but provides an API to some sort of client, you can serve the pagination metadata as HTTP headers added to your response.","In that case you don't need the Pagy::Frontend nor any frontend extra. You should only require the headers extra and use its helpers to add the headers to your responses."]},{"i":"paginate-with-jsonapi","l":"Paginate with JSON:API","p":["See the jsonapi extra."]},{"l":"Paginate for Javascript Frameworks","p":["If your app uses ruby as pure backend and some javascript frameworks as the frontend (e.g. Vue.js, react.js, ...), then you may want to generate the whole pagination UI directly in javascript (with your own code or using some available javascript module).","In that case you don't need the Pagy::Frontend nor any frontend extra. You should only require the metadata extra and pass the pagination metadata in your JSON response."]},{"l":"Paginate search framework results","p":["Pagy has a few of extras for gems returning search results:","elasticsearch_rails","searchkick","meilisearch"]},{"l":"Paginate by id instead of offset","p":["With particular requirements/environment an id-based pagination might work better than a classical offset-based pagination, You can use an interesting approach proposed here."]},{"l":"Paginate by date instead of a fixed number of items","p":["Use the calendar extra that adds pagination filtering by calendar time unit (year, quarter, month, week, day)."]},{"l":"Paginate multiple independent collections","p":["By default pagy tries to derive parameters and variables from the request and the collection, so you don't have to explicitly pass it to the pagy* method. That is very handy, but assumes you are paginating a single collection per request.","When you need to paginate multiple collections in a single request, you need to explicitly differentiate the pagination objects. You have the following commong ways to do so:"]},{"l":"Pass the request path","p":["By default pagy generates its links reusing the same request_path of the request, however if you want to generate links pointing to a different controller/path, you should explicitly pass the targeted :request_path. For example:","Path customization typically required when rendering multiple @pagy instances in the same view. e.g.:"]},{"l":"Use separate turbo frames actions","p":["If you're using hotwire( turbo-rails being the Rails implementation), another way of maintaining independent contexts is using separate turbo frames actions. Just wrap each independent context in a turbo_frame_tag and ensure a matching turbo_frame_tag is returned:","Consider Benito Serna's implementation of turbo-frames (on Rails) using search forms with the Ransack gem along with a corresponding demo app for a similar implementation of the above logic."]},{"i":"use-different-page-param-s","l":"Use different page_param(s)","p":["You can also paginate multiple model in the same request by simply using multiple :page_param:","You can easily wrap your existing pagination with the pagy_calendar method. Here are a few examples adding :year and :month to different existing statements.","Then follow the calendar extra documentation for more details."]},{"i":"paginate-only-max_pages-regardless-the-count","l":"Paginate only max_pages, regardless the count","p":["In order to limit the pagination to a maximum number of pages, you can pass the :max_pages variable.","For example:","If the @pagy.count in the example is 10_000, the pages served without :max_pages would be 500, but with:max_pages: 50 pagy would serve only the first 50 pages of your collection.","That works at the Pagy/ Pagy::Countless level, so it works with any combination of collection/extra, including items, gearbox and search extras, however it makes no sense in Pagy::Calendar unit objects (which ignore it).","The items and gearbox extras serve a variabe number of items per page. If your goal is limiting the pagination to a max number of records (instead of pages), you have to keep into account how you configure the items range."]},{"l":"Paginate pre-offset and pre-limited collections","p":["With the other pagination gems you cannot paginate a subset of a collection that you got using offset and limit. With Pagy it is as simple as just adding the :outset variable, set to the initial offset. For example:","Assuming the :items default of 20, you will get the pages with the right records you are expecting. The first page from record 101 to 120 of the main collection, and the last page from 401 to 415 of the main collection. Besides the from and to attribute readers will correctly return the numbers relative to the subset that you are paginating, i.e. from 1 to 20 for the first page and from 301 to 315 for the last page."]},{"l":"Paginate non-ActiveRecord collections","p":["The pagy_get_vars method works out of the box with ActiveRecord collections; for other collections (e.g. mongoid, etc.) you might want to change the :count_args default to suite your ORM count method:","or in extreme cases you may need to override it in your controller."]},{"l":"Paginate collections with metadata","p":["When your collection is already paginated and contains count and pagination metadata, you don't need any pagy* controller method. For example this is a Tmdb API search result object, but you can apply the same principle to any other type of collection metadata:","As you can see it contains the pagination metadata that you can use to setup the pagination with pagy:"]},{"l":"Paginate Any Collection","p":["Pagy doesn't need to know anything about the kind of collection you paginate. It can paginate any collection, because every collection knows its count and has a way to extract a chunk of items given a start/offset and a per-page/limit. It does not matter if it is an Array or an ActiveRecord scope or something else: the simple mechanism is the same:","Create a Pagy object using the count of the collection to paginate","Get the page of items from the collection using the start/offset and the per-page/limit ( pagy.offset and pagy.items)","Here is an example with an array. (Please, notice that this is only a convenient example, but you should use the array extra to paginate arrays).","This is basically what the pagy method included in your controller does for you in one go:","Then of course, regardless the kind of collection, you can render the navigation links in your view:","See the Pagy::Backend API documentation for more details."]},{"i":"use-the-pagy_nav-helpers","l":"Use the pagy_nav* helpers","p":["These helpers take the Pagy object and return the HTML string with the pagination links, which are wrapped in a nav tag and are ready to use in your view. For example:","The frontend extras add a few other helpers that you can use the same way, in order to get added features"]},{"l":"Skip single page navs","p":["Unlike other gems, Pagy does not decide for you that the nav of a single page of results must not be rendered. You may want it rendered... or maybe you don't. If you don't... wrap it in a condition and use the pagy_nav* only if @pagy.pages 1 is true. For example:"]},{"i":"skip-page1-param","l":"Skip page=1 param","p":["By default Pagy generates all the page links including the page param. If you want to remove the page=1 param from the first page link, just require the trim extra."]},{"i":"deal-with-a-slow-collection-count","l":"Deal with a slow collection COUNT(*)","p":["Every pagination gem needs the collection count in order to calculate all the other variables involved in the pagination. If you use a storage system like any SQL DB, there is no way to paginate and provide a full nav system without executing an extra query to get the collection count. That is usually not a problem if your DB is well organized and maintained, but that may not be always the case.","Sometimes you may have to deal with some not very efficient legacy apps/DBs that you cannot totally control. In that case the extra count query may affect the performance of the app quite badly.","You have 2 possible solutions in order to improve the performance."]},{"l":"Cache the count","p":["Depending on the nature of the app, a possible cheap solution would be caching the count of the collection, and Pagy makes that really simple.","Pagy gets the collection count through its pagy_get_count method, so you can override it in your controller. Here is an example using the rails cache:","That may work very well with static (or almost static) DBs, where there is not much writing and mostly reading. Less so with more DB writing, and probably not particularly useful with a DB in constant change."]},{"l":"Avoid the count","p":["When the count caching is not an option, you may want to use the countless extra, which totally avoid the need for a count query, still providing an acceptable subset of the full pagination features."]},{"l":"Use AJAX","p":["You can trigger ajax render in rails by customizing the link attributes.","See also Using AJAX."]},{"l":"Maximize Performance","p":["Here are some tips that will help choosing the best way to use Pagy, depending on your requirements and environment."]},{"i":"consider-the-nav-js","l":"Consider the nav_js","p":["If you need the classic pagination bar with links and info, then you have a couple of choices, depending on your environment:","Add the oj gem to your gemfile and use any pagy*_nav_js helper (see Javascript). That uses client side rendering and it is faster and lighter than using any pagy*_nav helper (40x faster, 36x lighter and 1,410x more efficient than Kaminari). Notice: the oj gem is not a requirement but helps the performance when it is available."]},{"i":"consider-the-combo-nav-js","l":"Consider the combo_nav_js","p":["If you don't have strict requirements but still need to give the user total feedback and control on the page to display, then consider the pagy*_combo_nav_js helpers. They are faster and lighter, and even more when the oj gem is available. That gives you the best performance with nav info and UI (48x faster, 48x lighter and 2,270x more efficient than Kaminari) also saving real estate."]},{"l":"Consider the countless extra","p":["If your requirements allow to use the countless extra (minimal or automatic UI) you can save one query per page, and drastically boost the efficiency eliminating the nav info and almost all the UI. Take a look at the examples in the pagy extra."]},{"i":"consider-the-arel-extra-and-or-the-fast-page-gem","l":"Consider the Arel extra and/or the fast_page gem","p":["You can improve the performance for grouped collections with the arel extra, and queries on big data with fast_page."]},{"l":"Ignore Brakeman UnescapedOutputs false positives warnings","p":["Pagy output html safe HTML, however, being an agnostic pagination gem it does not use the specific html_safe rails helper on its output. That is noted by the Brakeman gem, that will raise a warning.","You can avoid the warning adding it to the brakeman.ignore file. More details here and here."]},{"i":"handle-pagyoverflowerror-exceptions","l":"Handle Pagy::OverflowError exceptions","p":["Pass an overflowing :page number and Pagy will raise a Pagy::OverflowError exception.","This often happens because users/clients paginate over the end of the record set or records go deleted and a user went to a stale page.","You can handle the exception by using the overflow extra which provides easy and ready to use solutions for a few common cases, or you can rescue the exception manually and do whatever fits better.","Here are a few options for manually handling the error in apps:","Do nothing and let the page render a 500","Rescue and render a 404","Rescue and redirect to the last known page (Notice: the overflow extra provides the same behavior without redirecting)","All Pagy exceptions are subclasses of ArgumentError, so if you need to rescue_from ArgumentError, ... along with rescue_from Pagy::OverflowError, ... then the Pagy::OverflowError line should go BEFORE the ArgumentError line or it will never get rescued."]},{"l":"Test with Pagy","p":["Pagy has 100% test coverage.","You only need to test pagy if you have overridden methods.","If you need to test pagination, remember:","Pagy::DEFAULT should be set by your initializer and be frozen. You can test that your code cannot change it.","You can override defaults - i.e. any pagy variable can be passed to a pagy constructor. For example:"]},{"l":"Using your pagination templates","p":["The pagy nav helpers are not only a lot faster than templates, but accept dynamic arguments and comply with ARIA and I18n standards. Using your own templates is possible, but it's likely just reinventing a slower wheel.","If you really need to use your own templates, you absolutely can. Here is a static example that doesn't use any other helper nor dictionary file for the sake of simplicity, however feel free to add your dynamic variables and use any helper and dictionary entries as you need:","You can use it as usual: just remember to pass the :pagy local set to the @pagy object:","You may want to look at the actual output interactively by running:","...and point your browser at http://0.0.0.0:8000/template","You may want to read also the Pagy::Frontend API documentation for complete control over your templates."]}],[{"l":"ARIA Attributes","p":["Since version 7.0.0 pagy has introduced a consistent set of ARIA compliant attributes in all its pagy*_nav helpers.","Pagy provides the customizable aria-label for the root element of its helpers. It is usually a nav element, but for the few helper styles that use a different root element, pagy adds a role=navigation attribute to it.","The default string for the aria-label of the root element is \"Page\" / \"Pages\" (translated and pluralized according to the total page number). It's arguably a better description of the nav content than just \"Pagination\" (also difficult to translate in certain languages).","Please, check the pagy.aria_label.nav in the locale files used by your app to be already correctly translated and pluralized. If it's not, please, post your translation in the issue linked in the file itself. Thank you!","Since the nav or role=navigation elements of a HTML document are considered landmark roles, they should be uniquely aria-identified in the page.","If you use more than one pagy helper in the same page, you should not rely on the default (that would otherwise generate a non-valid document), instead, you should pass your own (possibly translated and pluralized) aria-label string. For example:","Links to the previous and next pages are rendered as \"<\" and \">\" and are aria-labelled as translated Previous and Next. You can edit both the link texts and the aria-labels by editing the pagy.prev, pagy.next, pagy.aria_label.prev and pagy.aria_label.next values in the locale files.","The page links don't have any aria-label attribute by design, because their text is a simple number (read by the readers in their native language) and an explicit attribute would be redundant and inefficient.","All the disabled links have the aria-disabled=true attribute.","The current page is marked with the aria-current=page attribute.","The role=link is added to the link elements of the styles that don't use an a element or don't have a href attribute."]}],[{"l":"Pagy","p":["The scope of the Pagy class is keeping track of the all integers and variables involved in the pagination. It basically takes a few integers (such as the count of the collection, the page number, the items per page, ...), does some simple arithmetic and creates a very small object that allocates less than 3k of memory."]},{"l":"Synopsis"},{"l":"Global Default","p":["The Pagy::DEFAULT is a globally available hash used to set defaults variables. It is a constant for easy access, but it is mutable to allow customizable defaults. You can override it in the pagy.rb initializer file in order to set your own application global defaults. After you are done, you should freeze it, so it will not change accidentally. It gets merged with the variables passed with the new method every times a Pagy instance gets created.","You will typically use it in a pagy.rb initializer file to pass defaults values. For example:"]},{"l":"Methods"},{"i":"pagy-root","l":"`Pagy.root`","p":["This method returns the pathname of the pagy/gem root dir. It is useful to get the absolute path of locale and javascript files installed with the gem."]},{"i":"pagy-new-vars","l":"`Pagy.new(vars)`","p":["Notice: If you use the Pagy::Backend its pagy method will instantiate and return the Pagy object for you.","The Pagy.new method accepts a single hash of variables that will be merged with the Pagy::DEFAULT hash and will be used to create the object."]},{"i":"series-size-vars-size","l":"`series(size: @vars[:size], _**)`","p":["This method is the core of the pagination. It returns an array containing the page numbers and the :gap items to be rendered with the navigation links (e.g. [1, :gap, 7, 8, 9, 10, 11, :gap, 36]). It accepts an optional size keyword argument (only useful for extras), defaulted on the :size variable.","A :gap is added only where the series is missing at least two pages. When the series is missing only one page, the :gap is replaced with the page link of the actual missing page. That's because the page link uses the same space of the ... gap but it is more useful.","The nav helpers basically loop through this array and render the correct item by simply checking its type:","if the item is an Integer then it is a page link","if the item is a String then it is the current page","if the item is the :gap symbol then it is a gap in the series","That is self-contained, simple and efficient.","This method returns an empty array if the passed size(i.e. the :size variable) is set to an empty Array. Useful to totally skip the generation of page links in the frontend.","It can also return a simpler array without gaps if the passed :size is a single positive Integer. It may be a faster and cleaner solution very useful in certain contexts (see the Simple Nav)","`label`","Label for the current page. Its only function in the Pagy class is supporting the API of various frontend methods that require labelling for Pagy::Calendar instances. It returns the current page label that will get displayed in the helpers.","`label_for(page)`","Label for any page. Its only function in the Pagy class is supporting the API of various frontend methods that require labelling for Pagy::Calendar instances. It returns the page label that will get displayed in the helpers."]},{"l":"Variables","p":["All the variables passed to the new method are merged with the Pagy::DEFAULT hash and are kept in the object, passed around with it and accessible through the pagy.vars hash.","They can be set globally by using the Pagy::DEFAULT hash or passed to the Pagy.new method and are accessible through the vars reader.","Pagy replaces the blank values of the passed variables with their default values coming from the Pagy::DEFAULT hash. It also applies to_i on the values expected to be integers, so you can use values from request params without any problem. For example: pagy(some_scope, items: params[:items]) will work without any additional cleanup."]},{"i":"variables-1","l":"Variables","p":[":anchor_string",":count",":count_args",":cycle",":fragment",":items",":jsonapi",":max_pages",":outset",":page",":page_param",":params",":request_path",":size","[:all]","0","1","20","7","Allows overriding the request.path for pagination links. Pass the path only (not the absolute url). (see Pass the request path)","Default","Description","Enable cycling/circular/infinite pagination: true sets next to 1 when the current page is the last page","Enable jsonapi compliance of the pagy query params","Extras may add and document their own variables","false","It can be a Hash of params to add to the URL, or a Proc that can edit/add/delete the request params (see Customize the params)","nil","Paginate only :max_pages. (see Paginate only max_pages)","The arbitrary fragment string (including the \"#\") to add to the url. (see Customize the params)","The arguments passed to the collection.count. You may want to set it to [] in ORMs different than ActiveRecord","The extra attributes string (formatted as a valid HTML attr=value) added to the page links (see Customize the link attributes)","The initial offset of the collection to paginate: pass it only if the collection had an offset","The name of the page param name used in the url. (see Customize the page param)","The only mandatory instance variable to be passed is the :count of the collection to paginate: all the other variables are optional and have sensible defaults. Of course you will also have to pass the page or you will always get the default page number 1. For performance reasons, only the instance variables get validated.","The requested number of items for the page","The requested page number: extracted from the request.params, or forced by passing a variable","The size of the page links to show: can be an array of 4 items or the integer of the total page size. (see also Control the page links)","The total count of the collection to paginate (mandatory argument)","Variable"]},{"l":"Attribute Readers","p":["Alias for last(cardinal meaning)","count","Description","from","in","items","last","next","offset","page","pages","Pagy exposes all its internal instance variables through a few readers. They all return integers (or nil), except the vars hash (which contains all the input variables):","prev","Reader","The collection :count","The collection-position of the first item in the page (:outset excluded)","The collection-position of the last item in the page (:outset excluded)","The current page number","The next page number or nil if there is no next page","The number of items skipped from the collection in order to get the start of the current page (:outset included)","The number of the items in the page","The number of the last page in the collection (ordinal meaning)","The previous page number or nil if there is no previous page","The requested number of items for the page","The variables hash","to","vars"]},{"l":"Lowest limit analysis","p":["[1]","===","0","1","Attribute","count","from","in","in, from and to of an empty page are all 0","last","last is always at least 1","next","nil","page","prev","prev and next of a single page (not necessary an empty one) are both nil(i.e. there is no other page)","series","The lowest possible limit of the pagination is reached when the collection has 0 count. In that case the Pagy object created has the following peculiar attributes:","the series array contains always at least the page # 1, which for a single page is also the current page, thus a string. With size: [] the series method returns []","there is always a page# 1 in the pagination, even if it's empty","to","Value","Which means:"]},{"l":"Exceptions"},{"i":"pagy-variableerror","l":"`Pagy::VariableError`","p":["A subclass of ArgumentError that offers a few information for easy exception handling when some of the variable passed to the constructor is not valid.","Mostly useful if you want to rescue from bad user input (e.g. illegal URL manipulation)."]},{"i":"pagy-overflowerror","l":"`Pagy::OverflowError`","p":["A subclass of Pagy::VariableError: it is raised when the :page variable exceeds the maximum possible value calculated for the :count, i.e. the :page variable is in the correct range, but it's not consistent with the current :count. That may happen when the :count has been reduced after a page link has been generated (e.g. some record has been just removed from the DB). See also the overflow extra."]}],[{"i":"#","p":["This module provides the base functionality for the backend."]},{"i":"pagybackend","l":"Pagy::Backend","p":["This module provides a generic pagination method ( pagy) that works with ActiveRecord out of the box. For any other collection (e.g. Sequel, Mongoid, ...) you may need to override some sub-method or write your own Pagy methods.","For overriding convenience, the pagy method calls two sub-methods that you may need to override in order to customize it for any type of collection (e.g. different ORM types, etc.).","Keep in mind that the whole module is basically providing a single functionality: getting a Pagy instance and the paginated items. You could re-write the whole module as one single and simpler method specific to your need, eventually gaining a few IPS in the process. If you seek a bit more performance you are encouraged to write your own Pagy methods.","Check also the array, searchkick, elasticsearch_rails and meilisearch extras for specific backend customizations."]},{"l":"Synopsis"},{"l":"Methods","p":["All the methods in this module are prefixed with the pagy_ string, to avoid any possible conflict with your own methods when you include the module in your controller. They are also all private, so they will not be available as actions. The methods prefixed with the pagy_get_ string are sub-methods/getter methods that are intended to be overridden, not used directly.","Please, keep in mind that overriding any method is very easy with Pagy. Indeed you can do it right where you are using it: no need of monkey-patching or perform any tricky gimmickry."]},{"i":"pagy-collection-vars-nil","l":"`pagy(collection, vars=nil)`","p":["This is the main method of this module. It takes a collection object (e.g. a scope), and an optional hash of variables (passed to the Pagy.new method) and returns the Pagy instance and the page of records. For example:","The built-in pagy method is designed to be easy to customize by overriding any of the two sub-methods that it calls internally. You can independently change the default variables ( pagy_get_vars) and/or the default page of items from the collection pagy_get_items).","If you need to use multiple different types of collections in the same app or action, you may want to define some alternative and self contained custom pagy method. (see Writing your own Pagy methods)"]},{"i":"pagy-get-vars-collection-vars","l":"`pagy_get_vars(collection, vars)`","p":["Sub-method called only by the pagy method, it returns the hash of variables used to initialize the Pagy object.","Override it if you need to add or change some variable. For example you may want to add the :item_name in order to customize the output (see How to customize the item name).","If you override it, remember that :count and :page are the only 2 required Pagy core variables, so be careful not to remove them from the returned hash.","See also the How To page for some usage examples."]},{"i":"pagy-get-count-collection-vars","l":"`pagy_get_count(collection, vars)`","p":["Get the count from the collection, considering also the :count_args variable. Override it if you need to calculate the count in some special way, or cache it. e.g. overriding pagy_get_count when using mongoid."]},{"i":"pagy-get-page-vars","l":"`pagy_get_page(vars)`","p":["Get the page from the param ,looking at the :page_param variable. See also Customize the page_param."]},{"i":"pagy-get-items-collection-pagy","l":"`pagy_get_items(collection, pagy)`","p":["Sub-method called only by the pagy method, it returns the page items (i.e. the records belonging to the current page).","Here is its source (it works with most ORMs like ActiveRecord, Sequel, Mongoid, ...):","Override it if the extraction of the items from your collection works in a different way. For example, if you need to paginate an array:","In order to paginate arrays, you may want to use the array extra."]},{"l":"Writing your own Pagy methods","p":["Sometimes you may need to paginate different kinds of collections (that require different overriding) in the same controller, so using one single pagy method would not be an option.","In that case you can define a number of pagy_* custom methods specific for each collection.","For example: here is a pagy method that doesn't call any sub-method, that may be enough for your needs:","You can easily write a pagy method for any possible environment: please read how to Paginate Any Collection for details.","If you write some useful backend customizations, please let us know if you can submit a PR for a specific extra or if you need any help to do it."]}],[{"i":"pagycalendar","l":"Pagy::Calendar","p":["This is a Pagy subclass that provides pagination filtering by time in order to support the Calendar extra.","It requires the activesupport gem, which you have to require in your Gemfile only if your app does not use Rails.","The Pagy::Calendar::* subclasses provide support for the calendar extra and are meant to be used with standard, non-calendar Pagy classes and never alone (because they could generate a very high number of items per page). The class APIs are documented here, however you should not need to use them directly because they are required and used internally by the extra."]},{"l":"Overview","p":["The pagy Pagy::Calendar::* instances split a time period into pages of equal time unit. For example: with Pagy::Calendar::Year you will have one page per each different calendar year so each page can be filtered to contain all the records that fall into the specific page/year. The Pagy::Calendar::Quarter, Pagy::Calendar::Month, Pagy::Calendar::Week and Pagy::Calendar::Day classes have the same functions for their respective time units.","Each page is also conveniently labeled in the navigation bar with the specific Time period it refers to.","This classes respects the natural calendar units, not the duration of a unit. If you paginate by year, each page will be a calendar year starting January 1st and ending December 31st, not a period starting and ending at two arbitrary dates one year apart. All the classes follow the same principle. Time units with no records are displayed as empty pages."]},{"l":"Variables","p":["Being subclasses of Pagy, the Pagy::Calendar::* classes share most of their superclass infrastructure and variables, however they use a completely different way to paginate (e.g.: no :count nor :items variables) and they have a few extra core variables.","The following variables are specific to Pagy::Calendar::* instances:","Variable","Description","Default",":period","Required two items Array with the calendar starting and ending local TimeWithZone objects","nil",":order","Order of pagination: it can be:asc or :desc",":asc",":format","String containing the strftime extendable format used for labelling (each subclass has its own default)","Notice: For the Pagy::Calendar::Quarter the :format variable can contain a non-standard %q format which is substituted with the quarter (1-4)."]},{"l":"DEFAULT variables","p":["The calendar defaults are not part of the Pagy::DEFAULT variables. Each subclass has its own Pagy::Calendar::*::DEFAULT variable hash that you can set independently. See the pagy initializer file for details."]},{"l":"Attribute Readers","p":["Reader","Description","from","The local TimeWithZone of the start of the current page","to","The local TimeWithZone of the end of the current page","order","The :order variable"]},{"l":"About from and to objects","p":["The from is the beginning of the current time unit. Notice that for the first page it falls BEFORE the starting of the :period.","The to is the beginning of the next time unit. Notice that for the last page it falls AFTER the ending of the :period.","The cases for first and last pages have no effect when you use the from/ to as a collection filter, since the collection is already filtered by the :period so there are no records outside it."]},{"l":"Time conversions","p":["This classes can use the recommended ActiveSupport::TimeWithZone class or the ruby Time class for all their time calculations.","Since they are meant to be used in the UI, they use the user/server local time in order to make sense for the UI. For that reason their input (the :period variable) and output (the from and to accessors) are always local time.","If you use ActiveRecord, your app should set the Time.zone for your user or your server. Then you can convert an UTC time from the storage to a local TimeWithZone object for the calendar very easily with:","You can also convert from local to UTC time with local_time.utc, however, when you use it as an argument in a scope, ActiveRecord converts it for you."]},{"l":"First weekday","p":["Set the Date.beginning_of_week toto the symbol of the first day of the week (e.g. Date.beginning_of_week = :sunday). Notice the default is :monday consistently with the ISO-8601 standard (and Rails)."]},{"l":"Methods"},{"i":"label-opts","l":"`label(opts = {})`","p":["This method uses the :format variable to generate the current page label with the specific TimeWithZone period it refers to. It accepts an optional :format keyword argument for overriding."]},{"i":"label-for-page-opts","l":"`label_for(page, opts = {})`","p":["This method takes a page number argument ( Integer or String) and uses the :format variable to generate its label with the specific Time period it refers to. It accepts an optional :format keyword argument for overriding."]},{"l":"Custom units","p":["You can define your own custom unit of any time length. For example you may want to add a unit of 2 months (i.e. a \"bimester\" unit), which should define a Pagy::Calendar::Bimester class.","In order to allow its full integration, you should also insert your :bimester unit symbol in the Pagy::Calendar::UNITS list, between :quarter and :month, which will keep the list in desc order of duration.","You can also implement your own custom substitution formats for your custom units, by overriding the label_for(page, opts)."]}],[{"i":"pagyconsole","l":"Pagy::Console","p":["Allows you to test Pagy in an irb with an environment stubbed for you:","Standard pagination requires a: controller, model, view and request object to work i.e. you need an environment. Pagy::Console gives you that environment.","Avoid using rails console with Pagy::Console.","Use irb instead. However, if you need rails console please ensure you temporarily \"unfreeze\" the Pagy::DEFAULT hash, in your pagy.rb config file, otherwise you'll receive a \"can't modify frozen Hash\" exception:","Now, refer to the instructions in the irb tab."]},{"i":"pagyconsole-module","l":"Pagy::Console module","p":["The pagy console uses the standalone extra and sets the Pagy::DEFAULT[:url] variable default to http://www.example.com/subdir in order to activate the standalone mode.","Include the module in your console window in order to include also the Pagy::Backend and Pagy::Frontend modules."]},{"i":"pagy-extras-extras","l":"`pagy_extras(*extras)`","p":["Simple utility method to save some typing in the console. It will require the extras arguments. For example:","You will be able to use any frontend or backend method implemented by pagy and the required extras right away."]}],[{"i":"pagycountless","l":"Pagy::Countless","p":["This is a Pagy subclass that provides pagination without the need of any :count.","That may be especially useful in the following scenarios:","slow COUNT(*) query - result of large tables or poorly optimized DBs","large collections of items where the count is missing or irrelevant","minimalistic UI, infinite scrolling, APIs that don't benefit from a nav-bar","when the full nav-bar is not a requirement and/or performance is more desirable","This class provides support for extras that don't need the full set of pagination support or need to avoid the :count variable ( e.g. the countless extra). The class API is documented here, however you should not need to use this class directly because it is required and used internally by the extra."]},{"l":"Caveats","p":["In this class the :count variable is always nil, hence some feature that depends on it may have limited or no support:"]},{"l":"Features with limited support"},{"l":"Nav bar","p":["The nav bar links after the current page cannot be fully displayed because a couple of items of the :size array depends on the count, so they have some limitations.","Regardless the actual :size value:","vars[:size][2] is capped at 1 (we know only if the next page exists)","vars[:size][3] is set to 0 (we don't know the total pages)","A few examples:","[1,4,4,1] would be treated like [ 1,4,1,0]","[1,4,3,4] would be treated like [ 1,4,1,0]","[1,4,0,0] would be treated like [ 1,4,0,0]","The series method reflects on the above."]},{"i":"overflow-variable","l":":overflow variable","p":["The available values for the :overflow variable are :empty_page and :exception, missing the :last_page(which is not known in case of an exception)."]},{"l":"Features without support","p":["The pagy_info and all the *_combo_nav_js helpers that use the total count are not supported."]},{"l":"How countless pagination works","p":["Instead of basing all the internal calculations on the :count variable (passed with the constructor), this class uses the number of actually retrieved items to derive the pagination variables.","The retrieved items number can be passed in a second step to the finalize method, which allows pagy to determine if there is a next page, or if the current page is the last page, or if the current request should raise a Pagy::OverflowError exception.","Retrieving these variables may be useful to supply a UI as complete as possible, when used with classic helpers, and can be skipped when it's not needed (like for navless pagination, infinite-scroll, etc.). See the countless extra for more details."]},{"l":"Methods","p":["The construction of the final Pagy::Countless object is split into 2 steps: the regular initialize method and the finalize method, which will use the retrieved items number to calculate the rest of the pagination integers."]},{"i":"pagy-countless-new-vars","l":"`Pagy::Countless.new(vars)`","p":["The initial constructor takes the usual hash of variables, calculating only the requested items and the offset, useful to query the page of items."]},{"i":"finalize-fetched-size","l":"`finalize(fetched_size)`","p":["The actual calculation of all the internal variables for the pagination is calculated using the size of the fetched items. The method returns the finalized instance object."]}],[{"i":"pagyfrontend","l":"Pagy::Frontend","p":["This module provides a few methods to deal with the navigation aspect of the pagination.","You will usually include it in some helper module, making its methods available (and overridable) in your views.","You can extend this module with a few more nav helpers (see the extras doc for more details)"]},{"l":"Synopsis"},{"l":"Methods","p":["All the methods in this module are prefixed with the pagy_ string in order to avoid any possible conflict with your own methods when you include the module in your helper. The methods prefixed with the pagy_get_ string are sub-methods/getter methods that are intended to be overridden and not used directly.","Please, keep in mind that overriding any method is very easy with Pagy. Indeed you can do it right where you are using it: no need of monkey-patching or tricky gimmickry."]},{"i":"pagy-nav-pagy-vars","l":"`pagy_nav(pagy, **vars)`","p":["This method takes the Pagy object and returns the HTML string with the pagination links, which are wrapped in a nav tag and are ready to use in your view. For example:","The method accepts also a few optional keyword arguments variables:",":id: the id HTML attribute to the nav tag (omitted by default)",":aria_label: an already pluralized string for the aria-label attribute of the nav, that will be used in place of the default pagy.aria_label.nav defined)",":size which use the passed value instead of the :size variable of the instance","See also ARIA Attributes."]},{"i":"pagy-info-pagy-vars","l":"`pagy_info(pagy, **vars)`","p":["This method provides the info about the content of the current pagination. For example:","Will produce something like:","Displaying items 476-500 of 1000 in total","The method accepts also a few optional keyword arguments variables:",":id: the id HTML attribute to the span tag wrapping the info",":item_name an already pluralized string that will be used in place of the default item/items","Displaying Products 476-500 of 1000 in total","(see Customizing the item name)"]},{"i":"pagy-url-for-pagy-page-absolute-false","l":"`pagy_url_for(pagy, page, absolute: false)`","p":["This method is called internally in order to produce the url of a page by passing it its number. For standard usage it works out of the box and you can just ignore it.","See also How to customize the URL and How to customize the params."]},{"i":"pagy-anchor-pagy","l":"`pagy_anchor(pagy)`","p":["This method is called internally to get a very specialized and fast proc that produce the HTML anchor elements (i.e. a tags) for the pages.","For standard usage you may just need to read How to customize the link attributes, for advanced usage see below.","You need this section only if you are going to override a pagy_nav* helper AND you need to customize the HTML attributes of the link tags.","This method is not intended to be overridden, however you could just replace it in your overridden pagy_nav* helpers with some generic helper like the rails link_to. If you intend to do so, be sure to have a very good reason, since using pagy_anchor is a lot faster than the rails link_to(benchmarked at ~ 22x faster using ~ 18x less memory on a 20 links nav).","This method returns a specialized proc that you call to produce the page a tags. The reason it is a two steps process instead of a single method call is performance. Indeed the method calls the potentially expensive pagy_url_for only once and generates the proc, then calling the proc will just interpolates the strings passed to it.","Here is how you should use it: in your helper call the method to get the proc (just once):","Then call the a proc to get the links (multiple times):","If you need to add some HTML attribute to ALL the page links, you can set the :anchor_string variable.","For performance reasons, the :anchor_string string must be formatted as valid HTML attribute/value pairs because it will get inserted verbatim in the HTML of the a tag.","Be careful not to pass some attribute that is already added by the helper. That would generate a duplicate HTML attribute which is invalid html (although handled by all mayor browsers by ignoring all the duplicates but the first)."]},{"i":"pagy-t-key-vars","l":"`pagy_t(key, vars={})`","p":["This method is similar to the I18n.t and its equivalent rails t helper. It is called internally from the helpers in order to get the interpolated strings out of a YAML dictionary file. (see the Pagy::I18n doc for details)"]}],[{"i":"pagyi18n","l":"Pagy::I18n","p":["Use the i18n gem instead of the faster pagy-i18n implementation.","The pagy_t translation method is ~ 18x faster and uses ~ 10x less memory than the standard i18n gem!","See i18n extra if you need to use the slower standard i18n gem instead."]},{"i":"dictionarieslocales","l":"Dictionaries/locales","p":["Pagy provides many ready-to-use dictionaries for different locales/languages usable with single or multi languages apps.","All the pagy strings are stored in the dictionary files of its locales, ready to be customized and/or used with or without the I18n gem. The files follow the same structure of the standard locale files for the i18n gem.","If you are using pagy with some language missing from the locales, please, submit your translation!"]},{"l":"Configuration","p":["If your app uses only the default en language or if you use the i18n extra you don't need to configure anything for this module.","If you need to load different built-in locales, and/or custom dictionary files or even non built-in language and pluralization, you can do it all by passing a few arguments to the Pagy::I18n.load method."]},{"l":"Synopsis","p":["Use only one load statement or you will get a FrozenError exception","You should use a custom :pluralize proc only for pluralization types not included in the built-in pluralization rules (stored in the Pagy::I18n::P11n::RULE hash).","The :pluralize proc should receive the count as a single argument and should return the plural type string (e.g. something like 'one' or 'other', depending on the passed count)."]},{"l":"Setting the request locale in multi-language apps","p":["When you configure multiple locales (i.e. this does not apply to single locale apps), you must also set the locale at each request. You usually do that in the application controller, by checking the :locale param. For example, in a rails app you should do something like:","If the @pagy_locale is nil or missing pagy will serve the first locale you set in the configuration."]},{"l":"Adding the model translations","p":["If you use the pagy_info OR pagy_items_selector_js AND you also want to use the specific model names instead of the generic \" items\" string, THEN you may need to add entries for the models in the pagy dictionary files. For example:","(See also the pagy_info method and How to customize the item name)"]},{"l":"Contribute a language","p":["If you wish to add a new locale to pagy ( see existing locales in the lib/locales directory) please follow the locales readme instructions here.."]}],[{"l":"Stylesheets"},{"l":"Overview","p":["For all its own interactive helpers shown above, the pagy gem includes a few stylesheets files that you can download, link or copy.","You don't need any stylesheet if you use a frontend extra like: bootstrap and bulma"]},{"l":"HTML Structure","p":["In order to ensure a minimalistic valid output, still complete with all the ARIA attributes, we use a single line with the minimum number of tags and class attributes that can identify all the parts of the nav bars:","The output of pagy_nav and pagy_nav_js are a series of a tags inside a wrapper nav tag","The disabled links are so because they are missing the href attributes","The pagy nav and pagy nav-js classes are assigned to the nav tag","The current and gap classes are assigned to the specific a tags","The stylesheets target the disabled a tags by using the pagy a:not([href]) selector","You can make the gap look like the other pages by removing the :not(.gap)","You can target the previous and next links by using pagy a:first-child and pagy a:last-child pseudo classes","You can totally transform the stylesheets below by just editing the content inside the curly brackets, usually leaving the rest untouched.","Stylesheets"]}],[{"l":"Javascript"},{"l":"Overview","p":["A few helpers use Javascript and offer some extra feature and require some extra setup."]},{"l":"Advantages","p":["Better performance and resource usage (see Maximizing Performance)","Client-side rendering","Optional responsiveness"]},{"l":"Helpers","p":["bootstrap_nav_js","pagy_nav_js","pagy_bootstrap_nav_js","pagy_bulma_nav_js","See Pagy Navs","bootstrap_combo_nav_js","Navigation and pagination info combined.","pagy_combo_nav_js","pagy_bootstrap_combo_nav_js","pagy_bulma_combo_nav_js","See Pagy Combo Navs","pagy_items_selector_js","Choose items numbers, per page.","This helper is only available in one style.","See: Items"]}],[{"l":"Javascript Setup","p":["A javascript setup is required only for the pagy*_js helpers. Just using something like anchor_string: 'data-remote=true' in any other helper works out of the box.","Add the oj gem to your gemfile for faster performance."]},{"i":"how-does-it-work","l":"How does it work?","p":["All the pagy*_js helpers render their component on the client side. The helper methods render just a minimal HTML tag that contains a data-pagy attribute.","Your app should serve or bundle a small javascript file that will take care of converting the data embedded in the data-pagy attribute and make it work in the browser.","We don't publish a npm package, because it would not support automatic sync with the gem version."]},{"l":"1. Pick a Javascript File","p":["and_chr 103","and_ff 101","and_qq 10.4","and_uc 12.12","android 103","chrome 101","chrome 102","chrome 103","edge 102","edge 103","ES6 module to use with webpacker, esbuild, parcel, etc.","firefox 101","firefox 102","firefox 91","ios_saf 12.2-12.5","ios_saf 14.0-14.4","ios_saf 14.5-14.8","ios_saf 15.2-15.3","ios_saf 15.4","ios_saf 15.5","It contains the source map to debug typescript","It works only on new browsers","It's an IIFE file meant to be loaded as is, directly in your production pages and without any further processing","kaios 2.5","Large size","Minified (~ 2k) and polyfilled to work also with quite old browsers","op_mini all","op_mob 64","opera 85","opera 86","opera 87","safari 15.5","Setup","You can generate custom targeted pagy.js files for the browsers you want to support by changing the browserslist query in src/package.json, then compile it with cd src npm run build.","You need to debug the javascript helpers","Your app needs standard script or old browser compatibility","Your app uses modern build tools"]},{"l":"2. Configure","p":["Depending on your environment you have a few ways of configuring your app:"]},{"l":"Rails with assets pipeline","p":["In older versions of Rails, you can configure the app to look into the installed pagy gem javascript files:"]},{"l":"Builders","p":["In order to bundle the pagy-module.js your builder has to find it either with a link or local copy, or by looking into the pagy javascript path:","You can create a symlink or a copy of the pagy-module.js file (available in the pagy gem) into an app compiled dir and use it as a regular app file. That way any builder will pick it up. For example:","Prepend the NODE_PATH environment variable to the scripts.build command:","Ensure that the erb loader is installed:","Generate a local pagy javascript file using erb with webpacker:","where YOUR_EVENT_LISTENER is the load event that works with your app ( e.g. turbo:load, turbolinks:load, load, ...).","Configure the plugins[resolve]:"]},{"l":"Non-Rails apps","p":["Just ensure Pagy.root.join('javascripts', 'pagy.js') is served with the page."]},{"l":"3. Initialize Pagy","p":["After the helper is loaded you have to initialize Pagy to make it work:","Import and use the pagy module:"]},{"l":"Caveats","p":["If Javascript is disabled in the client browser, certain helpers will be useless. Consider implementing your own HTML fallback:","The pagy*_js helpers are tightly coupled with the javascript code, so any partial overriding on one side, would be quite fragile and might break in a next release."]}],[{"l":"Javascript Navs","p":["The following pagy*_nav_js helpers:","pagy_nav_js","pagy_bootstrap_nav_js","pagy_bulma_nav_js","look like a normal pagy*_nav but have a few added features:","Client-side rendering","Optional responsiveness","Better performance and resource usage (see Maximizing Performance)","Here is a screenshot (from the bootstrap extra) showing responsiveness at different widths:","bootstrap_nav_js"]},{"l":"Synopsis","p":["See Setup Javascript."]},{"l":"Variables","p":["Variable","Description","Default",":steps","Hash variable to control multiple pagy :size at different widths","false","The pagy_*nav_js elements are automatically re-rendered on window resize. However, if the container width changes without being triggered by a window resize, you need to explicitly re-render:"]},{"i":"how-to-use-the-steps-variable","l":"How to use the :steps variable","p":["The :steps is an optional non-core variable used by the pagy*_nav_js navs. If it's false, the pagy*_nav_js will behave exactly as a static pagy*_nav respecting the single :size variable, just faster and lighter. If it's defined as a hash, it allows you to control multiple pagy :size at different widths.","You can set the :steps as a hash where the keys are integers representing the widths in pixels and the values are the Pagy :size variables to be applied for that width.","As usual, depending on the scope of the customization, you can set the variables globally or for a single pagy instance, or even pass it to the pagy*_nav_js helper as an optional keyword argument.","For example:","The above statement means that from 0 to 540 pixels width, Pagy will use the 5 size (orginating a simple nav without gaps), from 540 to 720 it will use the [3,5,5,3] size and over 720 it will use the [5,7,7,5] size. (Read more about the :size variable in the How to control the page links section).","You can set any number of steps with any arbitrary width/size. The only requirement is that the :steps hash must contain always the 0 width or a Pagy::VariableError exception will be raised.","Setting the widths and sizes can create a nice transition between widths or some apparently erratic behavior.","Here is what you should consider/ensure:","The pagy size changes in discrete :steps, defined by the width/size pairs.","The automatic transition from one size to another depends on the width available to the pagy nav. That width is the internal available width of its container (excluding eventual horizontal padding).","You should ensure that - for each step - each pagy :size produces a nav that can be contained in its width.","You should ensure that the minimum internal width for the container div be equal (or a bit bigger) to the smaller positive width. ( 540 pixels in our previous example).","If the container width snaps to specific widths in discrete steps, you should sync the quantity and widths of the pagy :steps to the quantity and internal widths for each discrete step of the container."]},{"l":"Methods"},{"i":"pagy-nav-js-pagy-vars","l":"`pagy*_nav_js(pagy, **vars)`","p":["The method accepts also the same optional keyword arguments variables of the pagy_nav(pagy, **vars)"]}],[{"l":"Javascript Combo Navs","p":["The following pagy*_combo_nav_js offer an alternative pagination UI that combines navigation and pagination info in a single compact element:","pagy_combo_nav_js","pagy_bootstrap_combo_nav_js","pagy_bulma_combo_nav_js","They are the fastest and lightest nav on modern environments, recommended when you care about efficiency and server load ( see Maximizing Performance).","Here is a screenshot (from the bootstrap extra):","bootstrap_combo_nav_js"]},{"l":"Synopsis","p":["See Setup Javascript."]},{"l":"Methods"},{"i":"pagy-combo-nav-js-pagy-vars","l":"`pagy*_combo_nav_js(pagy, **vars)`","p":["The method accepts also the same optional keyword arguments variables of the pagy_nav(pagy, **vars)"]}],[{"l":"Using AJAX","p":["If you AJAX-render any of the javascript helpers mentioned above, you should also execute Pagy.init(container_element); in the javascript template. Here is an example for an AJAX-rendered pagy_bootstrap_nav_js:","The document.getElementById('container') argument will re-init the pagy elements just AJAX-rendered in the container div. If you miss it, it will not work."]}],[{"l":"Arel Extra","p":["Provides better performance of grouped ActiveRecord collections.","Add a specialized pagination for collections from sql databases with GROUP BY clauses by computing the total number of results with COUNT(*) OVER ().","Tested against MySQL (8.0.17) and Postgres (11.5). Before using in a different database, make sure the sql COUNT(*) OVER () performs a count of all the lines after the GROUP BY clause is applied."]},{"l":"Synopsis"},{"l":"Methods"},{"i":"pagy-arel-collection-vars-nil","l":"`pagy_arel(collection, vars=nil)`","p":["This method is the same as the generic pagy method, but with improved speed for SQL GROUP BY collections. (see the pagy doc)"]},{"i":"pagy-arel-get-vars-collection","l":"`pagy_arel_get_vars(collection)`","p":["This sub-method is the same as the pagy_get_vars sub-method, but it is called only by the pagy_arel method. (see the pagy_get_vars doc)."]},{"i":"pagy-arel-count-collection","l":"`pagy_arel_count(collection)`","p":["This sub-method it is called only by the pagy_get_vars method. It will detect which query to perform based on the active record groups (sql GROUP BY s). In case there aren't group values performs a normal .count(:all), otherwise it will perform a COUNT(*) OVER (). The last tells database to perform a count of all the lines after the GROUP BY clause is applied."]}],[{"l":"Array Extra","p":["Paginate arrays efficiently.","Do not use pagy_array with any persistent storage collection (database, elastic search, Meilisearch etc)!","Use with collections that are already loaded in memory. (e.g. arrays of cached indices, keys of hashes, pointers, etc.)."]},{"l":"Synopsis"},{"l":"Methods"},{"i":"pagy-array-array-vars-nil","l":"`pagy_array(array, vars=nil)`","p":["This method is the same as the generic pagy method, but specialized for an Array. (see the pagy doc)"]},{"i":"pagy-array-get-vars-array","l":"`pagy_array_get_vars(array)`","p":["This sub-method is the same as the pagy_get_vars sub-method, but it is called only by the pagy_array method. (see the pagy_get_vars doc)."]}],[{"l":"Bootstrap Extra","p":["Add nav helpers for the Bootstrap pagination component."]},{"l":"Synopsis","p":["See: Javascript if you use pagy_bootstrap_nav_js or pagy_bootstrap_combo_nav_js."]},{"l":"Methods","p":["This extra adds 3 nav helpers to the Pagy::Frontend module.","You can customize them by overriding in your own view helper(s)."]},{"i":"pagy-bootstrap-nav-pagy-vars","l":"`pagy_bootstrap_nav(pagy, **vars)`","p":["pagy_bootstrap_nav","This method is the same as the pagy_nav, but customized for Bootstrap.","See: pagy_nav(pagy, **vars)."]},{"i":"pagy-bootstrap-nav-js-pagy-vars","l":"`pagy_bootstrap_nav_js(pagy, **vars)`","p":["bootstrap_nav_js: Responsive nav.","See: Javascript Navs."]},{"i":"pagy-bootstrap-combo-nav-js-pagy-vars","l":"`pagy_bootstrap_combo_nav_js(pagy, **vars)`","p":["bootstrap_combo_nav_js","See: Javascript Combo Navs."]}],[{"l":"Bulma Extra","p":["Add nav helpers for the Bulma CSS pagination component."]},{"l":"Synopsis","p":["See Javascript if you use pagy_bulma_nav_js or pagy_bulma_combo_nav_js."]},{"l":"Methods","p":["This extra adds 3 nav helpers to the Pagy::Frontend module.","You can customize them by overriding in your own view helper(s)."]},{"i":"pagy-bulma-nav-pagy","l":"`pagy_bulma_nav(pagy)`","p":["bulma_nav - medium view size","This method is the same as the pagy_nav, but customized for Bulma.","See the pagy_nav(pagy, **vars) documentation."]},{"i":"pagy-bulma-nav-js-pagy-vars","l":"`pagy_bulma_nav_js(pagy, **vars)`","p":["Warning: Bootstrap style shown above as a representative example - the responsive pagy_bulma_nav_js looks like the pagy_bulma_nav helper.","It's rendered on the client, with optional responsiveness. See the Javascript Navs documentation for more information."]},{"i":"pagy-bulma-combo-nav-js-pagy-vars","l":"`pagy_bulma_combo_nav_js(pagy, **vars)`","p":["bulma_combo_nav_js","See the Javascript Combo Navs documentation."]}],[{"l":"Calendar Extra","p":["Add pagination filtering by calendar time unit: year, quarter, month, week, day and your own custom time units.","This extra adds single or multiple chained calendar navs that act as calendar filters on the collection records, placing each record in its time unit.","calendar_app"]},{"l":"Use cases","p":["This extra makes sense when the result to paginate have some time continuity and you want to provide a simple chronological browsing. For example: a movie catalog could allow the user to browse all the movies by year, or you may want to browse a long list of events by jumping and narrowing between years, months, days.","On the other hand it does not make much sense for the result of a search that hits just a few sparse records scattered over a possibly long period of time. For that case the calendar extra has an :active flag that can be used to inactivate the calendar and fallback to the regular pagination. No need to maintain different UIs for wide browsing and narrow searching."]},{"l":"Synopsis","p":["See also a few examples about How to wrap existing pagination with pagy_calendar."]},{"l":"Usage","p":["Since the time can be stored or calculated in many different ways in different collections, this extra requires you to implement a couple of simple methods in your app and configure the objects that it creates and coordinates for you.","The whole usage boils down to these steps:","Configure the pagy_calendar method in your action","Define the pagy_calendar_period method in your controller","Define the pagy_calendar_filter method in your controller","Use it in your UI"]},{"l":"Variables and Accessors","p":["See Pagy::Calendar"]},{"l":"Methods","p":["All the methods in this module are prefixed with the pagy_calendar string in order to avoid any possible conflict with your own methods when you include the module in your controller. They are also all private, so they will not be available as actions."]},{"i":"pagy-calendar-collection-configuration","l":"`pagy_calendar(collection, configuration)`","p":["Besides the usual pagy variables, you can add a :backend variable, set to the name of the backend extra method that you want to use for managing the collection:","If the :pagy key/value is omitted, a default Pagy instance will be created by the default :pagy backend method.","It also provides the showtime helper method that returns the DateTime of the smallest time unit currently shown in your calendar. For example:","It filters the collection by the selected time units in the configuration(e.g. year, month, day, ...), and forwards it to the wrapped method.","It returns an array with one more item than the usual two:","Notice that the collection argument must be exactly what you would pass to the wrapped backend method.","The :page, :page_param, :params and :period variables for the calendar objects are managed automatically by the extra. Setting them explicitly has no effect. (See also Calendar params for solutions in case of conflicts)","The @calendar is the hash of the generated Pagy::Calendar::* objects that can be used in the UI.","The calendar configuration determines the calendar objects generated. These are used for filtering the collection to the selected time units.","The calendar is active by default, however you can add an optional :active boolean flag to the configuration hash in order to switch it ON or OFF, depending on its usefulness in different conditions (see the Use cases).","The collection argument (from ActiveRecord, ElasticSearchRails, Searchkick, Meilisearch, ...) is filtered by the pagy_calendar_filter and forwarded to the wrapped method for its final pagination, so ensure that you pass the same type of argument expected by the wrapped method.","The configuration argument must be a Hash structure with the keys representing the type of configuration and the values being the Hash of the variables that you want to pass for the creation of the specific pagy object (or a boolean for the Active flag).","The configuration hash can be composed by the following types of configuration:","This is the optional configuration of the final pagination object (produced by the wrapped method) which is always used regardless the value of the Active flag.","This method wraps one or more levels of calendar filtering on top of another backend pagination method ( e.g. pagy, pagy_arel, pagy_array, pagy_searchkick, pagy_elasticsearch_rails, pagy_meilisearch, ...).","You can add one or more levels with keys like :year, :quarter, :month, :week, :day. Each key must be set to the hash of the variables that will be used to initialize the relative Pagy::Calendar::* object. Use an empty hash for default values. E.g.: year: {}, month: {}, ....","You can pass one optional :pagy key, set to the hash of the variables to initialize the Pagy object. It has none of the restriction mentioned in the Calendar configuration."]},{"i":"pagy-calendar-period-collection","l":"`pagy_calendar_period(collection)`","p":["This method must be implemented by the application.","It receives a collection argument that must not be changed by the method, but can be used to return the starting and ending local TimeWithZone objects array defining the calendar :period. See the Pagy::Calendar Variables for details.","Depending on the type of storage, the collection argument can contain a different kind of object:","If you use ActiveRecord the collection is going to be an ActiveRecord::Relation object. You can use it to return the starting and ending local TimeWithZone objects array. Here are a few examples with the created_at field (but you can pull the time from anywhere):","See also Time conversion for details.","If you use ElasticSearchRails, Searchkick, Meilisearch the collection argument is just the Array of the captured search arguments that you passed to the Model.pagy_search method. That array is what pagy uses internally to setup its variables before passing it to the standard Model.search method to do the actual search.","So you should use what you need from the collection array and do your own Model.search(...) in order to get the starting and ending local TimeWithZone objects array to return."]},{"i":"pagy-calendar-filter-collection-from-to","l":"`pagy_calendar_filter(collection, from, to)`","p":["This method must be implemented by the application.","It receives the main collection and must return a filtered version of it using the from and to local Time objects.","You should filter your collection with a logic equivalent to storage_time = from storage_time to, adapted to the time zone and syntax of your storage.","Depending on the type of storage, the collection argument can contain a different kind of object:","If you use ActiveRecord the collection is going to be an ActiveRecord::Relation object that you can easily filter. Here is an example with the created_at field again (but you can use anything, of course):","See also Time conversion for details.","If you use ElasticSearchRails, Searchkick, Meilisearch the collection argument is just the Array of the captured search arguments that you passed to the Model.pagy_search method. That array is what pagy uses internally to setup its variables before passing it to the standard Model.search method to do the actual search.","So in order to filter the actual search with the from and to local TimeWithZone objects, you should simply return the same array with the filtering added to its relevant item. Pagy will use it to do the actual (filtered) search."]},{"l":"Customization"},{"l":"Order","p":["If you set :order to :desc, you will get the page units in descendent order (e.g. May, then April, then March, ...), but keep in mind that you still have to desc-order the records in the collection since pagy has no control over that (indeed it's your own collection scope)."]},{"l":"Beginning of week","p":["If you use the :week time unit, consider that the first day of the week could be different for different locales.","You may want to adjust it by setting the Date.beginning_of_week variable to the symbol of the first day of the week ( e.g. Date.beginning_of_week = :sunday). Notice the default is :monday consistently with the ISO-8601 standard (and Rails)."]},{"l":"Calendar params","p":["This extra handles the request params of its objects automatically, and you should not need to customize them unless they conflict with other params in your requests. In that case you have a couple of alternatives:","Renaming the conflicting param of your app","Passing a custom :page_param to the Pagy configuration. That will internally rename the :page_param vars and update the :params procs of all the calendar objects accordingly."]},{"l":"View","p":["You can use the calendar objects with any pagy_*nav and pagy_*nav_js helpers in your views.","The pagy_*combo_nav_js keeps into account only page numbers and not labels, so it is not very useful (if at all) with Pagy::Calendar::* objects."]},{"i":"pagy-calendar-url-at-calendar-time-opts","l":"`pagy_calendar_url_at(@calendar, time, **opts)`","p":["This helper takes the @calendar and a TimeWithZone objects and returns the url complete with all the params for the pages in each bars that include the passed time.","For example: pagy_calendar_url_at(@calendar, Time.zone.now) will select the the bars pointing to today.","If time is outside the pagination range it raises a Pagy::Calendar::OutOfRangeError, however you can pass the option fit_time: true to avoid the error and get the url to the page closest to the passed time argument (first or last page)."]},{"l":"Label format","p":["Each page link in the calendar navs is conveniently labeled with the specific Time period it refers to. You can change the time format to your needs by setting the :format variable to a standard strftime format. (See the Pagy::Calendar variables)","You can also get the label method with e.g.: @calendar[:month].label, which might be useful to use in your UI."]},{"l":"I18n localization","p":["Pagy implements its own faster version of the i18n translate method (see pagy_t), but does not provide any built-in localize method. If you need localization of calendar labels in other locales, you should delegate it to the I18n gem, so that a change in the global I18n.locale will automatically localize all the time labels accordingly.","You have a couple of options:","Use the i18n extra, which delegates the translation and localization to the I18n gem. Notice however that you would lose the performance gain offered by the built-in pagy_t translation.","Uncomment the block in the calendar section in the pagy initializer, which will add the localization from the I18n gem without using the i18n extra, so preserving the builtin pagy_t translation."]},{"l":"Caveats","p":["Calendar pages with no records are accessible but empty: you may want to display some message when @records.empty?."]}],[{"l":"Countless Extra","p":["Paginate without the need of any count, saving one query per rendering."]},{"l":"Setup"},{"l":"Modes","p":["This extra uses the Pagy::Countless subclass internally. You can use it in two different modes by enabling the :countless_minimal variable (or not).","Your app needs a full classic pagination UI","This mode retrieves items + 1 and uses the number of retrieved items to calculate the variables. It then removes the eventual extra item from the result, so deducing whether there is a next page or not without the need of an extra query.","The @records collection is an eager-loaded Array of records.","The @pagy object can be used with any supported helper.","Your app uses no or limited pagination UI","This mode is enabled by the :countless_minimal variable.","The @records collection is a regular scope.","The @pagy object cannot be used with any helpers.","The collection is over when @records.size @pagy.vars[:items]"]},{"l":"Variables","p":["Variable","Description","Default",":countless_minimal","enable the countless minimal mode","false"]},{"l":"Methods"},{"i":"pagy-countless-collection-vars-nil","l":"`pagy_countless(collection, vars=nil)`","p":["This method is the same as the generic pagy method (see the pagy doc), however its returned objects will depend on the value of the :countless_minimal variable (see Modes)"]},{"i":"pagy-countless-get-vars-collection-vars","l":"`pagy_countless_get_vars(_collection, vars)`","p":["This sub-method is similar to the pagy_get_vars sub-method, but it is called only by the pagy_countless method. (see the pagy_get_vars doc)."]},{"i":"pagy-countless-get-items-collection-pagy","l":"`pagy_countless_get_items(collection, pagy)`","p":["This sub-method is similar to the pagy_get_items sub-method, but it is called only by the pagy_countless method. (see the pagy_get_items doc)."]}],[{"l":"Elasticsearch Rails Extra","p":["Paginate ElasticsearchRails response objects."]},{"l":"Setup"},{"l":"Modes","p":["This extra offers two ways to paginate ElasticsearchRails response objects.","You use the pagy_search method in place of the search method.","Pagy creates its object out of your result."]},{"l":"Variables","p":["Variable","Description","Default",":elasticsearch_rails_pagy_search","customizable name of the pagy search method",":pagy_search",":elasticsearch_rails_search","customizable name of the original search method",":search"]},{"l":"Methods"},{"i":"pagy-elasticsearchrails-pagy-search","l":"`Pagy::ElasticsearchRails.pagy_search(...)`","p":["This method accepts the same arguments of the search method and you must use it in its place in active mode."]},{"i":"pagy-new-from-elasticsearch-rails-response-vars","l":"`Pagy.new_from_elasticsearch_rails(response, vars={})`","p":["This constructor accepts an Elasticsearch::Model::Response::Response, plus the optional pagy variables. It automatically sets the :items, :page and :count pagy variables extracted/calculated out of it."]},{"i":"pagy-elasticsearch-rails-pagy-search-args-vars","l":"`pagy_elasticsearch_rails(pagy_search_args, vars={})`","p":["This method is similar to the generic pagy method, but specialized for Elasticsearch Rails (see the pagy doc).","It expects to receive YourModel.pagy_search(...) result and returns the paginated response."]},{"i":"pagy-elasticsearch-rails-get-vars-array","l":"`pagy_elasticsearch_rails_get_vars(array)`","p":["This sub-method is similar to the pagy_get_vars sub-method, but it is called only by the pagy_elasticsearch_rails method. (see the pagy_get_vars doc)."]}],[{"l":"Gearbox Extra","p":["Automatically change the number of items per page depending on the page number.","Instead of generating all the pages with a fixed number of items, the app can serve pages with an increasing number of items in order to speed things up for wild-browsing and improving the user experience.","You can set this up by simply setting the :gearbox_items variable to an array of integers. For example, you would set the gearbox_items to [10, 20, 40, 80] to have page 1 with 10 items, page 2 with 20, page 3 with 40 and all the other pages with 80 items.","The content of the array is not restricted neither in length nor in direction: you can pass any arbitrary sequence of integer you like, although it makes more sense to have an increasing progression of items."]},{"l":"Interaction with other extras","p":["Even after requiring this extra, the regular fixed pagination is still supported: you have just to temporarily disable gearbox with gearbox_extra: false in the instances that need the fixed pagination.","You can also use it in presence of the items extra if you follow a simple logic. The gearbox extra automatically handles the items per page, while the items extra allows the user to explicitly request a specific number of items. That's why the items extra takes priority over the gearbox extra if both are enabled.","If you want to use the gearbox in some instances, you can temporarily set items_extra: false and the gearbox will be used instead. That is a common scenario when you use the items extra in an API controller, while you want to use the gearbox in an infinite scroll pagination in another controller."]},{"l":"Caveats","p":["This extra cannot be used with Pagy::Calendar::* objects, which are paginated by period.","The search extras ( elasticserch_rails, meilisearch and searchkick) are based on storages with built-in linear pagination, which is inconsistent with the gearbox."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":gearbox_extra","enable or disable the feature","true",":gearbox_items","array of positive integers","[15, 30, 60, 100]"]},{"l":"Methods","p":["The gearbox extra overrides the setup_items_var and the setup_pages_vars methods in the Pagy class. You don't have to use them directly."]},{"l":"Credits","p":["The idea behind this extra comes from the Geared Pagination.","The main differences are:","Pagy is not tied to ActiveRecord so it works in any environment","The pagy-cursor pagination is a pagy-extra implemented in its own gem","Pagy is many many many times faster!"]}],[{"l":"Headers Extra","p":["Add RFC-8288 compliant http response headers (and other helpers) useful for API pagination. It also follows the header casing introduced by rack version 3+(see https://github.com/rack/rack/issues/1592)."]},{"l":"Synopsis"},{"l":"Suggestions","p":["Instead of explicitly merging the headers before each rendering, if you use rails you can get them automatically merged ( application-wide and when @pagy is available), by adding an after_action in your application controller:","If your code in different actions is similar enough, you can encapsulate the statements in a custom pagy_render method in your application controller. For example:"]},{"l":"Headers","p":["This extra generates the standard link header defined in the RFC-8288, and adds 4 customizable headers useful for pagination: current-page, page-items, total-pages and total-count headers."]},{"l":"Customize the header names","p":["If you are replacing any of the existing API-pagination gems in some already working app, you may want to customize the header names so you will not have to change the client app that consumes them. You can do so by using the :headers variable ( see variables below)"]},{"l":"Countless Pagination","p":["If your requirements allow to save one count-query per rendering by using the pagy_countless constructor, the headers will not have the rel=last link, the total-count and the total-pages that are unknown with countless pagination.","Example of HTTP headers produced from a Pagy::Countless object:"]},{"l":"Variables","p":["Variable","Description","Default",":headers","Hash variable to customize/suppress the optional headers","{ page: 'current-page', items: 'page-items', count: 'total-count', pages: 'total-pages' }","As usual, depending on the scope of the customization, you can set the variables globally or for a single pagy instance.","For example, the following will change the header names and will suppress the :pages('Total-Pages') header:"]},{"l":"Methods"},{"i":"pagy-headers-merge-pagy","l":"`pagy_headers_merge(pagy)`","p":["This method relies on the response method in your controller returning a Rack::Response object.","You should use it before rendering: it simply merges the pagy_headers to the response.headers internally.","If your app doesn't implement the response object that way, you should override the pagy_headers_merge method in your controller or use the pagy_headers method directly."]},{"i":"pagy-headers-pagy","l":"`pagy_headers(pagy)`","p":["This method generates a hash of RFC-8288 compliant http headers to send with the response. It is internally used by the pagy_headers_merge method, so you usually don't need to use it directly. However, if you need to edit the headers that pagy generates (for example adding extra link headers), you can override it in your own controller."]},{"i":"pagy-headers-hash-pagy","l":"`pagy_headers_hash(pagy)`","p":["This method generates a hash structure of the headers, useful only if you want to include the headers as metadata within your JSON. For example:","For a more complete set of metadata you should use the metadata extra."]}],[{"l":"I18n Extra","p":["Use the i18n standard gem for the translations of the pagy strings.","It delegates translations and localization of the calendar time labels to the i18n gem (which should obviously be installed).","A change in the global I18n.locale will automatically translate and localize all Pagy output accordingly.","You should have some very good reasons to use the i18n gem instead of the pagy implementation, because the i18n gem is ~ 18x slower and uses ~ 10x more memory than the Pagy::I18n default implementation.","Having the i18n gem already installed and configured in your app might not count as a good reason, because, besides being faster and lighter, the Pagy::I18n is super easy to configure and doesn't require any change in the i18n of the rest of your app."]},{"l":"Synopsis"}],[{"l":"Items Extra","p":["Allow the client to request a custom number of items per page with an optional selector UI. It is useful with APIs or user-customizable UIs.","Run the interactive demo from your terminal:","...and point your browser at http://0.0.0.0:8000","It works also with the countless, searchkick, elasticsearch_rails and meilisearch extras."]},{"l":"Synopsis"},{"l":"Default usage"},{"l":"Custom usage","p":["See Javascript(only if you use the pagy_items_selector_js UI)"]},{"l":"Variables","p":[":items",":items_extra",":items_param",":max_items","100","As a global default:","Default","Description","Enable or disable the feature","For a single instance (overriding the global default):","The :max_items is used to cap the number of items to that max. It is set to 100 by default. If you don't want to limit the max requested number of items per page, you can set it to nil.","The max items allowed to be requested. Set it to nil for no limit.","The name of the items param used in the url.","This extra uses the :items_param variable to determine the param it should get the number of :items from.","true","Variable","You can override the items that the client sends with the params by passing the :items explicitly. For example:","You can use the :items_extra variable to opt-out of the feature even when the extra is required.","You may want to customize the variables. Depending on the scope of the customization, you have a couple of options:"]},{"l":"Methods","p":["The items extra adds the pagy_items_selector_js helper to the Pagy::Frontend module."]},{"i":"pagy-items-selector-js-pagy-vars","l":"`pagy_items_selector_js(pagy, **vars)`","p":["This helper provides an items selector UI, which allows the user to select any arbitrary number of items per page (below the :max_items number) in a numeric input field. It looks like:","Show items per page","It returns an empty string if the :items_extra is false.","The method accepts also a few optional keyword arguments variables:",":id which adds the id HTML attribute to the nav tag",":item_name an already pluralized string that will be used in place of the default item/items","Show Products per page","(see How to customize the item name)","When the items number is changed with the selector, pagy will reload the pagination UI using the selected items per page. It will also request the right page number calculated in order to contain the first item of the previously displayed page. That way the new displayed page will roughly show the same items in the collection before the items change.","This method can take an extra id argument, which is used as the id attribute of the wrapper span tag."]}],[{"l":"Jsonapi Extra","p":["Implements the JSON:API specifications for pagination.","When enabled, the query params used in the pagy URLs are nested under the page param, as specified by the Query Parameter Family e.g. https://example.com/products?page[number]=2page[size]=30."]},{"l":"Synopsis"},{"l":"Default usage"},{"l":"Custom usage"},{"l":"Variables","p":["Variable","Description","Default",":jsonapi","Enable or disable the feature","true","You can use the :jsonapi variable to opt-out of the feature even when the extra is required."]},{"i":"interaction-with-other-featuresextras","l":"Interaction with other features/extras","p":["This extra just nests the :page and :items params under the JSON:API reserved :page param. You may want to customize the :page_param and the :items params as shown in the Synopsis.","You may also want to use it with the items extra in order to allow the client to request a specific number of items per page and capping it to a max number.","It works also with the countless, searchkick, elasticsearch_rails and meilisearch extras.","It does not make sense (and doesn't work) with the Calendar extra."]},{"l":"Methods","p":["The jsonapi extra adds the pagy_jsonapi_links helper to the Pagy::Backend module."]},{"i":"pagy-jsonapi-links-pagy-opts","l":"`pagy_jsonapi_links(pagy, **opts)`","p":["This helper provides the JSON:API links for pagination as a hash of first, last, prev, next paths. You can pass the option asbsolute: true to get an absolute URL instead."]}],[{"l":"Meilisearch Extra","p":["Paginate Meilisearch results."]},{"l":"Setup"},{"l":"Modes","p":["This extra offers two ways to paginate Meilisearch objects:","You use the pagy_search method in place of the ms_search method.","Pagy creates its object out of your result."]},{"l":"Variables","p":["Variable","Description","Default",":meilisearch_pagy_search","customizable name of the pagy search method",":pagy_search",":meilisearch_search","customizable name of the original search method",":ms_search"]},{"l":"Methods"},{"i":"pagy-meilisearch-pagy-search","l":"`Pagy::Meilisearch.pagy_search(...)`","p":["This method accepts the same arguments of the ms_search method and you must use it in its place in active mode."]},{"i":"pagy-new-from-meilisearch-results-vars","l":"`Pagy.new_from_meilisearch(results, vars={})`","p":["This constructor accepts a Meiliserch object, plus the optional pagy variables. It automatically sets the :items, :page and :count pagy variables extracted/calculated out of it."]},{"i":"pagy-meilisearch-pagy-search-args-vars","l":"`pagy_meilisearch(pagy_search_args, vars={})`","p":["This method is similar to the generic pagy method, but specialized for Meilisearch. (see the pagy doc)","It expects to receive YourModel.pagy_search(...) result and returns the paginated response."]},{"i":"pagy-meilisearch-get-vars-array","l":"`pagy_meilisearch_get_vars(array)`","p":["This sub-method is similar to the pagy_get_vars sub-method, but it is called only by the pagy_meilisearch method. (see the pagy_get_vars doc)."]}],[{"l":"Metadata Extra","p":["Provide the pagination metadata to Javascript frameworks like Vue.js, react.js, etc.","It adds a single method to the backend that you can serve as JSON to your favorite javascript framework."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":metadata","Array of names used to control the returned metadata","[ :scaffold_url, :first_url, :prev_url, :page_url, :next_url, :last_url, :count, :page, :items, :vars, :pages, :last, :from, :to, :prev, :next, :series ]","As usual, depending on the scope of the customization, you can set the :metadata variable globally or for a single pagy instance.","IMPORTANT: Don't rely on the broad default! You should explicitly set the :metadata variable with only the keys that you will actually use in the frontend, for obvious performance reasons. Besides you can also add other pagy method names not included in the default."]},{"i":"the-scaffold_url-key","l":"The :scaffold_url key","p":["This is a special url string that you can use as the scaffold to build real page urls in your frontend (instead of producing them on the backend).","It is a pagination url/path (complete with all the params) containing the __pagy_page__ placeholder in place of the page number (e.g. '/foo?page=__pagy_page__bar=baz')","You can generate all the actual links on the frontend by simply replacing the placeholder with the actual page number you want to link to.","In javascript you can do something like:","This is particularly useful when you want to build some dynamic pagination UI (e.g. similar to what the pagy_*combo_js generates), but right in your frontend app, saving backend resources with obvious performance benefits.","For simple cases you might want to use the other few :*_url metadata directly, instead of using the :scaffold_url."]},{"l":"Methods","p":["This extra adds a single method to the Pagy::Backend(available in your controllers)."]},{"i":"pagy-metadata-pagy-absolute-nil","l":"`pagy_metadata(pagy, absolute: nil)`","p":["This method returns a hash with the keys/values defined by the :metadata variable. When true, the absolute boolean argument will cause all the :*_url metadata to be absolute instead of relative."]}],[{"l":"Overflow Extra","p":["Allow easy handling of overflowing pages (i.e. requested page > count).","It internally rescues Pagy::OverflowError exceptions offering the following ready to use behaviors/modes: :empty_page, :last_page, and :exception."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":overflow","the modes in case of overflowing page (:last_page, :empty_page or :exception)",":empty_page","Set the variables - either globally, or locally:"]},{"l":"Modes","p":["The modes accepted by the :overflow variable:",":empty_page",":last_page",":exception","Useful for APIs, where clients expect an empty page, in order to stop requesting more pages. This is the default mode.","Paginate exactly as if the last page has been requested.","The :last_page mode is not available for Pagy::Countless instances because the last page is not known.","For example:","You can rescue from the exception and implement your own custom mode even in presence of this extra."]},{"l":"Methods"},{"i":"overflow","l":"`overflow?`","p":["Use this method in order to know if the requested page is overflowing. The original requested page is available as pagy.vars[:page](useful when used with the :last_page mode, in case you want to give some feedback about the rescue to the user/client)."]},{"l":"Errors","p":["See How to handle Pagy::OverflowError exceptions"]}],[{"l":"Pagy Extra","p":["Adds the pagy styled versions of the javascript-powered navs and a few other components to support countless or navless pagination (incremental, auto-incremental, infinite pagination)."]},{"l":"Synopsis","p":["See Javascript."]},{"l":"Methods"},{"i":"pagy-nav-pagy-vars","l":"`pagy_nav(pagy, **vars)`","p":["This method is defined in the Pagy::Frontend module for efficiency, but referred here for consistency with the other frontend extras and the same type of components here.","See pagy_nav(pagy, **vars)."]},{"i":"pagy-nav-js-pagy-vars","l":"`pagy_nav_js(pagy, **vars)`","p":["See Javascript Navs."]},{"i":"pagy-combo-nav-js-pagy-vars","l":"`pagy_combo_nav_js(pagy, **vars)`","p":["See Javascript Combo Navs."]},{"i":"pagy-info-pagy-vars","l":"`pagy_info(pagy, **vars)`","p":["This method is defined in the Pagy::Frontend module for efficiency, but referred here for consistency with the same type of components here.","See pagy_info(pagy, **vars)."]},{"i":"pagy-prev-url-pagy-absolute-false","l":"`pagy_prev_url(pagy, absolute: false)`","p":["Return the previous page URL string or nil. Useful to build minimalistic UIs that don't use nav bar links (e.g. countless extra)."]},{"i":"pagy-next-url-pagy-absolute-false","l":"`pagy_next_url(pagy, absolute: false)`","p":["Return the previous page URL string or nil. Useful to build minimalistic UIs that don't use nav bar links (e.g. countless extra)."]},{"i":"pagy-prev-a-pagy-text-pagy-t-pagy-prev-aria-label-pagy-t-pagy-aria-label-prev","l":"`pagy_prev_a(pagy, text: pagy_t('pagy.prev'), aria_label: pagy_t('pagy.aria_label.prev))`","p":["Return the enabled/disabled previous page anchor tag. It is the same prev link string which is part of the pagy_nav helper.","Useful to build minimalistic helpers UIs that don't use nav bar links (e.g. countless extra)."]},{"i":"pagy-next-a-pagy-text-pagy-t-pagy-next-aria-label-pagy-t-pagy-aria-label-prev","l":"`pagy_next_a(pagy, text: pagy_t('pagy.next'), , aria_label: pagy_t('pagy.aria_label.prev))`","p":["Return the enabled/disabled next page anchor tag. It is the same next link string which is part of the pagy_nav helper.","Useful to build minimalistic helpers UIs that don't use nav bar links (e.g. countless extra)."]},{"i":"pagy-prev-link-pagy","l":"`pagy_prev_link(pagy)`","p":["Conditionally return the previous page link tag. Useful to add the link tag to the HTML head."]},{"i":"pagy-next-link-pagy","l":"`pagy_next_link(pagy)`","p":["Conditionally return the next page link tag. Useful to add the link tag to the HTML head."]},{"l":"Support for alternative pagination types and features","p":["Besides the classic pagy*_nav pagination, the pagy*_nav_js and the pagy*_combo_nav_js UI components, Pagy offers a few helpers to support a few alternative types of pagination and related features."]},{"l":"Countless","p":["You can totally avoid one query per render by using the countless extra. It has a few limitation, but still supports navbar links (see also Pagy::Countless for more details)."]},{"i":"navlessincremental","l":"Navless/incremental","p":["If you don't need the navbar you can just set the :size variable to an empty value and the page links will be skipped from the rendering. That works with Pagy and Pagy:Countless instances. All the *nav helpers will render only the prev and next links/buttons, allowing for a manual incremental pagination.","You can also use the pagy_prev_html, pagy_next_html mostly useful if you also use the countless extra.","Here is a basic example that uses pagy_countless(saving one query per render):"]},{"l":"Auto-incremental","p":["Automatic incremental pagination (sometimes improperly called \"infinite-scroll\" pagination) is a UI-less pagination that loads the next page at the end of the listing.","Depending on your environment, there are a few ways to implement it. You can find a simple generic example below, or some more modern specific technique shown in the following posts:","Endless Scroll / Infinite Loading with Turbo Streams & Stimulus by Stefan Wienert","Pagination with Hotwire by Jonathan Greenberg","For a plain old javascript example, we are going to use the same Incremental code above with just a couple of changes:","1. Hide the link in _next_link.html.erb by adding a style attribute:","2. Add a javascript that will click the link when the listing-bottom appears in the viewport on load/resize/scroll. It will keep the page filled with results, one page at a time:"]},{"i":"circularinfinite","l":"Circular/Infinite","p":["This type of pagination sets the next page to 1 when the current page is the last page, allowing an infinite loop through the pages.","For example, it is often used to show a few suggestions of \"similar products\" in a horizontal stripe of just a few pages of a few items each. Clicking on next will continue to loop through.","For example:","Passing a forced :count of 25 will generate 5 pages of 5 items each that will always have a next page. Regardless the actual collection count, you will show the first 25 items of the collection, looping in stripes of 5 items each.","You may want to combine it with something like:"]}],[{"l":"Searchkick Extra","p":["Paginate Searchkick::Results objects."]},{"l":"Synopsis"},{"l":"Setup"},{"l":"Modes","p":["This extra offers two ways to paginate Searchkick::Results objects:","You use the pagy_search method in place of the search method.","Pagy creates its object out of your result."]},{"l":"Variables","p":["Variable","Description","Default",":searchkick_pagy_search","customizable name of the pagy search method",":pagy_search",":searchkick_search","customizable name of the original search method",":search"]},{"l":"Methods"},{"i":"pagy-searchkick-pagy-search","l":"`Pagy::Searchkick.pagy_search(...)`","p":["This method accepts the same arguments of the search method and you must use it in its place in active mode."]},{"i":"pagy-new-from-searchkick-results-vars","l":"`Pagy.new_from_searchkick(results, vars={})`","p":["This constructor accepts a Searchkick::Results as the first argument, plus the optional pagy variables. It automatically sets the :items, :page and :count pagy variables extracted/calculated out of it."]},{"i":"pagy-searchkick-pagy-search-args-vars","l":"`pagy_searchkick(pagy_search_args, vars={})`","p":["This method is similar to the generic pagy method, but specialized for Searchkick. (see the pagy doc)","It expects to receive YourModel.pagy_search(...) result and returns the paginated response."]},{"i":"pagy-searchkick-get-vars-array","l":"`pagy_searchkick_get_vars(array)`","p":["This sub-method is similar to the pagy_get_vars sub-method, but it is called only by the pagy_searchkick method. (see the pagy_get_vars doc)."]}],[{"l":"Standalone Extra","p":["Use pagy completely standalone.","You can use pagy without any request object, nor Rack environment/gem, nor any defined params method, even in the irb/rails console without an app (see the Pagy::Console module).","You may need it in order to paginate a collection outside of a regular rack request or controller, like in an unconventional API module, or in the irb/rails console or for testing/playing with backend and frontend methods.","You trigger the standalone mode by setting an :url variable, which will be used directly and verbatim, instead of extracting it from the request Rack::Request object. You can also pass other params by using the :params variable as usual. That will be used to produce the final URLs in the usual way.","This extra will also create a dummy params method (if not already defined) in the module where you will include the Pagy::Backend(usually a controller)."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":url","url string (can be absolute or relative)","nil","You can use the :params variable to add params to the final URLs."]},{"l":"Methods"},{"i":"overridden-pagy-url-for","l":"Overridden `pagy_url_for`","p":["The standalone extra overrides the pagy_url_for method used internally. If it finds a set :url variable it assumes there is no request object, so it uses the :url variable verbatim to produce the final URL, only adding the query string, composed by merging the :page param to the :params variable. If there is no :url variable set it works like usual, i.e. it uses the rake request object to extract the base_url, path from the request, merging the params returned from the params controller method, the :params variable and the :page param to it."]},{"i":"dummy-params-method","l":"Dummy `params` method","p":["This extra creates a dummy params method (if not already defined) in the module where you include the Pagy::Backend(usually a controller). The method is called by pagy to retrieve backend variables coming from the request, and expects a hash, so the dummy param method returns an empty hash avoiding an error."]}],[{"l":"Tailwind Style","p":["Tailwind allows to apply styles to any DOM element, so you don't actually need any special extra to produce a different output. You can use the standard pagy helpers and the pagy.tailwind.css stylesheet file (that @apply the tailwind classes to the pagy output)"]}],[{"l":"Trim Extra","p":["Remove the page=1 param from the link of the first page.","This extra is needed only for very specific scenarios, for example if you need to avoid frontend cache duplicates of the first page."]},{"l":"Synopsis"},{"l":"Variables","p":["Variable","Description","Default",":trim_extra","enable or disable the feature","true","You can use the :trim_extra variable to opt-out of trimming even when the extra is required (trimming by default).","You can set the Pagy::DEFAULT[:trim_extra] default to false if you want to explicitly pass the trim_extra: true variable in order to trim the page param."]},{"l":"Methods","p":["The trim extra overrides the pagy_anchor method in the Pagy::Frontend module."]},{"i":"pagy-anchor-pagy","l":"`pagy_anchor(pagy)`","p":["This method overrides the pagy_anchor using the pagy_trim to process the link to the first page."]},{"i":"pagy-trim-pagy-a","l":"`pagy_trim(pagy, a)`","p":["Sub-method called only by the pagy_anchor method, it removes the the :page_param param from the first page link ( usually page=1).","Override this method if you are customizing the urls.","If you use a pagy_*nav_js helper you should customize also the Pagy.trim javascript function."]}],[{"l":"Troubleshooting"},{"i":"records-may-randomly-repeat-in-different-pages-or-be-missing","l":"Records may randomly repeat in different pages (or be missing)","p":["the PostgreSQL Documentation","When using LIMIT, it is important to use an ORDER BY clause that constrains the result rows into a unique order. Otherwise you will get an unpredictable subset of the query's rows."]},{"l":"Invalid HTML","p":["Pagy sets the aria-label attribute of its nav elements with the translated and pluralized pagy.aria_label.nav that finds in the locale files. That would be (always) Page/Pages for the en locale.","Since the nav or role=navigation elements of a HTML document are considered landmark roles, they should be uniquely aria-identified in the page.","The class attribute with a value of pagination is already added by the pagy_bootstrap_nav so it's a duplicate HTML attribute which is invalid html.","In the specific bootstrap example you could override the default bootstrap pagination class by adding other classes with:"]}],[{"l":"CHANGELOG"},{"l":"Breaking Changes","p":["If you upgrade from version 8.0.0 see the following:","Breaking changes in version 8.0.0","Breaking changes in version 7.0.0","Breaking changes in version 6.0.0","Breaking changes in version 5.0.0","Breaking changes in version 4.0.0","Breaking changes in version 3.0.0","Breaking changes in version 2.0.0","Breaking changes in version 1.0.0"]},{"l":"Deprecations","p":["The foundation, materialize, semantic and uikit CSS extras have been discontinued and will be removed in v9(See the details)","Protected method Pagy#setup_pages_var. Use Pagy#setup_last_var instead"]},{"i":"version-830","l":"Version 8.3.0","p":["Discontinue foundation materialize, semantic and uikit CSS extras","Improve playground:","Add install option (automated in pagy development)","Fix HTML validation for all apps","Remove unused styles from the demo app","Hardcode version in pagy.gemspec"]},{"i":"version-822","l":"Version 8.2.2","p":["Add nav translation for ko (closes #592) (#690)"]},{"i":"version-821","l":"Version 8.2.1","p":["Fix empty page param raising error (closes #689)"]},{"i":"version-820","l":"Version 8.2.0","p":["Fix the '#pagy_url_for' method for calendar pagination (#688)","Extend the use of pagy_get_page to the arel, array and countless extras","Add the pagy_get_count method to the backend"]},{"i":"version-812","l":"Version 8.1.2","p":["Added \"da\" locale for aria_label.nav (closes #583)"]},{"i":"version-811","l":"Version 8.1.1","p":["Fixed broken aria-label for disabled links in Foundation (#685)","Simplification of input variables and defaults: params and request_path are not instance variables"]},{"i":"version-810","l":"Version 8.1.0","p":["Implement max_pages to limit the pagination regardless the actual count","Improve efficiency of params in pagy_url_for","Remove nil variables from DEFAULT","Removed redundant @pages, aliased with @last"]},{"i":"version-802","l":"Version 8.0.2","p":["Minor change in rails app and RM run config","Fix canonical gem root:","Correct script.build: \"NODE_PATH=\"$(bundle show 'pagy')/javascripts\"","Move pagy.gemspec inside the gem root dir","Fix for Turbo not intercepting changes in window.location","Use require_relative for gem/lib files","Complete translation of aria.nav for \"ru\" locale (close #599)","Docs improvement and fixes"]},{"i":"version-801","l":"Version 8.0.1","p":["Reorganize the gem root dir: it was the lib dir (containing everything), now is the gem dir (containing lib and everything else).","Fix broken link in README"]},{"i":"version-800","l":"Version 8.0.0"},{"i":"breaking-changes-1","l":"Breaking changes","p":["Renamed/removed the following arguments for all the helpers:","Search pagy_id:, replace with id:","Search nav_aria_label:, replace with aria_label:","The nav_i18n_key has been removed: pass the interpolated/pluralized value as the aria_label: argument","The item_i18n_key has been removed: pass the interpolated/pluralized value as the item_name: argument","The link_extra: has been removed: its cumulative mechanism was confusing and error prone. The :anchor_string pagy variable substitutes it, however it's not an helper argument anymore, so you can assign it as the DEFAULT[:anchor_string] and/or pass it as any other pagy variable at object construction. ( See customize the link attributes)","HTML structure, classes and internal methods have been changed: they may break your views if you used custom stylesheets, templates or helper overrides. See the complete changes below if you notice any cosmetic changes or get some exception.","The navs and support extras has been merged into the new pagy extra. Search for extra/navs and extras/support and replace with extras/pagy(remove the duplicate if you used both)","The build path for javascript builders has been updated to the canonical paths for gems, and has moved from the lib to the gem root. Notice that the correct setup in package json was still wrongly wrapped in the gem dir for 8.0.0-8.0.1, and it has finally been fixed in 8.0.2 (sorry for that):","8.0.0-8.0.1 only: build: NODE_PATH=\\$(bundle show 'pagy')/gem/javascripts\\ your original command","8.0.2+: build: NODE_PATH=\\$(bundle show 'pagy')/javascripts\\ your original command"]},{"l":"Changes","p":["All the *combo-nav_js of the framework extras use simpler structure and improve the look and feel consistently with their respective frameworks","All the frontend extra have been normalized and are totally consistent with each other; a few may add the classes: argument to a few components, when the framework allows it.","All the pagy helper root classes have been changed according to the following rule. For example:","and so on for all the helpers","Better code issue template","Created the pagy playground system of apps working with the pagy executable.","Docs Improvements","Fix broken link of pagy.rb in docs (closes #668, #669)","HTML changes","Internal renaming FrontendHelpers> JSTools","LEGACY CHANGELOG >>>","pagy-bootstrap-nav-js> pagy-bootstrap nav-js","pagy-nav> pagy nav","Streamlined HTML and CSS helper structure. You may want to look at the actual output by running the pagy demo","The *combo_nav_js and pagy_items_selector_js helpers use a more efficient code","The active class of the *nav/*nav_js links as been renamed as current","The classes: and aria_label: keyword arguments have been added to the returned lambda","The current and gap classes are assigned to the specific a tags","The disabled links are so because they are missing the href attributes. (They also have the role=link and aria-disabled=true attributes)","The disabled, prev, next and pagy-combo-input link classes have been removed (see the stylesheets for details)","The extra positional argument of the returned lambda has been removed","The gap in the nav bars is a disabled anchor element ( a tag without a href attribute)","The internal prev_aria_label_attr and next_aria_label_attr methods have been removed","The label//label and b//b wrappers in the dictionary files have been removed","The link_extra: key argument has been removed","The nav_aria_label_attr method has been renamed as nav_aria_label","The pagy_link_proc method (only used internally or in your custom overriding) has been renamed to pagy_anchor and it works slighty differently:","The pagy_nav and pagy_nav_js helpers output a series of a tags inside a wrapper nav tag (nothing else)","The pagy_prev_html and pagy_next_html have been renamed as pagy_prev_a and pagy_next_a","The pagy_prev_link_tag and pagy_next_link_tag have been renamed as pagy_prev_link and pagy_next_link","The rel=prev and rel=next attributes have been dropped (they are obsolete)","The src/pagy.ts and relative built javascript files have been adapted to the above changes","The stylesheets are a lot simpler as a consequence of the changes above"]}]] \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 51b516854..31ba6f362 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ