pagy 8.4.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/apps/calendar.ru +682 -2137
  3. data/apps/demo.ru +17 -13
  4. data/apps/keyset_ar.ru +236 -0
  5. data/apps/keyset_s.ru +238 -0
  6. data/apps/rails.ru +19 -15
  7. data/apps/repro.ru +17 -14
  8. data/apps/tmp/calendar.sqlite3 +0 -0
  9. data/apps/tmp/calendar.sqlite3-shm +0 -0
  10. data/apps/tmp/calendar.sqlite3-wal +0 -0
  11. data/apps/tmp/local_secret.txt +1 -0
  12. data/apps/tmp/pagy-keyset-ar.sqlite3 +0 -0
  13. data/apps/tmp/pagy-keyset-ar.sqlite3-shm +0 -0
  14. data/apps/tmp/pagy-keyset-ar.sqlite3-wal +0 -0
  15. data/apps/tmp/pagy-keyset-s.sqlite3 +0 -0
  16. data/bin/pagy +17 -12
  17. data/config/pagy.rb +32 -33
  18. data/javascripts/pagy-module.js +94 -107
  19. data/javascripts/pagy.js +4 -1
  20. data/javascripts/pagy.min.js +4 -0
  21. data/javascripts/pagy.min.js.map +10 -0
  22. data/javascripts/pagy.mjs +100 -0
  23. data/lib/optimist.rb +1 -1
  24. data/lib/pagy/b64.rb +33 -0
  25. data/lib/pagy/backend.rb +21 -17
  26. data/lib/pagy/calendar/day.rb +4 -3
  27. data/lib/pagy/calendar/month.rb +4 -3
  28. data/lib/pagy/calendar/quarter.rb +4 -3
  29. data/lib/pagy/calendar/unit.rb +103 -0
  30. data/lib/pagy/calendar/week.rb +3 -3
  31. data/lib/pagy/calendar/year.rb +4 -3
  32. data/lib/pagy/calendar.rb +54 -97
  33. data/lib/pagy/countless.rb +15 -16
  34. data/lib/pagy/extras/arel.rb +8 -10
  35. data/lib/pagy/extras/array.rb +4 -6
  36. data/lib/pagy/extras/bootstrap.rb +5 -5
  37. data/lib/pagy/extras/bulma.rb +10 -7
  38. data/lib/pagy/extras/calendar.rb +34 -5
  39. data/lib/pagy/extras/countless.rb +6 -13
  40. data/lib/pagy/extras/elasticsearch_rails.rb +15 -15
  41. data/lib/pagy/extras/gearbox.rb +26 -26
  42. data/lib/pagy/extras/headers.rb +25 -24
  43. data/lib/pagy/extras/i18n.rb +1 -1
  44. data/lib/pagy/extras/js_tools.rb +9 -9
  45. data/lib/pagy/extras/jsonapi.rb +26 -16
  46. data/lib/pagy/extras/keyset.rb +26 -0
  47. data/lib/pagy/extras/limit.rb +63 -0
  48. data/lib/pagy/extras/meilisearch.rb +11 -11
  49. data/lib/pagy/extras/metadata.rb +6 -2
  50. data/lib/pagy/extras/overflow.rb +9 -8
  51. data/lib/pagy/extras/pagy.rb +16 -16
  52. data/lib/pagy/extras/searchkick.rb +11 -11
  53. data/lib/pagy/extras/size.rb +40 -0
  54. data/lib/pagy/extras/standalone.rb +6 -6
  55. data/lib/pagy/extras/trim.rb +3 -3
  56. data/lib/pagy/frontend.rb +38 -36
  57. data/lib/pagy/i18n.rb +1 -1
  58. data/lib/pagy/keyset/active_record.rb +38 -0
  59. data/lib/pagy/keyset/sequel.rb +51 -0
  60. data/lib/pagy/keyset.rb +99 -0
  61. data/lib/pagy/url_helpers.rb +5 -5
  62. data/lib/pagy.rb +92 -94
  63. data/locales/ar.yml +9 -10
  64. data/locales/be.yml +2 -2
  65. data/locales/bg.yml +2 -2
  66. data/locales/bs.yml +2 -2
  67. data/locales/ca.yml +5 -7
  68. data/locales/ckb.yml +2 -2
  69. data/locales/cs.yml +2 -2
  70. data/locales/da.yml +2 -2
  71. data/locales/de.yml +2 -2
  72. data/locales/en.yml +2 -2
  73. data/locales/es.yml +2 -2
  74. data/locales/fr.yml +2 -2
  75. data/locales/hr.yml +2 -2
  76. data/locales/id.yml +2 -2
  77. data/locales/it.yml +2 -2
  78. data/locales/ja.yml +2 -2
  79. data/locales/km.yml +2 -2
  80. data/locales/ko.yml +2 -2
  81. data/locales/nb.yml +2 -2
  82. data/locales/nl.yml +2 -2
  83. data/locales/nn.yml +2 -2
  84. data/locales/pl.yml +2 -2
  85. data/locales/pt-BR.yml +2 -2
  86. data/locales/pt.yml +2 -2
  87. data/locales/ru.yml +2 -2
  88. data/locales/sr.yml +2 -2
  89. data/locales/sv-SE.yml +2 -2
  90. data/locales/sv.yml +2 -2
  91. data/locales/sw.yml +2 -2
  92. data/locales/ta.yml +2 -2
  93. data/locales/tr.yml +2 -2
  94. data/locales/uk.yml +2 -2
  95. data/locales/vi.yml +2 -2
  96. data/locales/zh-CN.yml +2 -2
  97. data/locales/zh-HK.yml +2 -2
  98. data/locales/zh-TW.yml +2 -2
  99. data/pkg/pagy-9.0.0.gem +0 -0
  100. metadata +27 -17
  101. data/javascripts/pagy-dev.js +0 -114
  102. data/lib/pagy/calendar/helper.rb +0 -65
  103. data/lib/pagy/extras/foundation.rb +0 -95
  104. data/lib/pagy/extras/items.rb +0 -64
  105. data/lib/pagy/extras/materialize.rb +0 -100
  106. data/lib/pagy/extras/semantic.rb +0 -94
  107. data/lib/pagy/extras/uikit.rb +0 -98
  108. /data/javascripts/{pagy-module.d.ts → pagy.d.ts} +0 -0
data/apps/repro.ru CHANGED
@@ -15,7 +15,7 @@
15
15
  # DOC
16
16
  # https://ddnexus.github.io/pagy/playground/#1-repro-app
17
17
 
18
- VERSION = '8.4.0'
18
+ VERSION = '9.0.0'
19
19
 
20
20
  require 'bundler/inline'
21
21
  require 'bundler'
@@ -31,26 +31,29 @@ end
31
31
  # Edit this section adding/removing the extras and Pagy::DEFAULT as needed
32
32
  # pagy initializer
33
33
  require 'pagy/extras/pagy'
34
- require 'pagy/extras/items'
34
+ require 'pagy/extras/limit'
35
35
  require 'pagy/extras/overflow'
36
36
  Pagy::DEFAULT[:overflow] = :empty_page
37
- Pagy::DEFAULT[:size] = [1, 4, 4, 1]
38
37
  Pagy::DEFAULT.freeze
39
38
 
40
39
  require 'sinatra/base'
41
40
  # Sinatra application
42
41
  class PagyRepro < Sinatra::Base
43
- PAGY_JS = "pagy#{'-dev' if ENV['DEBUG']}.js".freeze
44
-
45
42
  configure do
46
43
  enable :inline_templates
47
44
  end
48
45
  include Pagy::Backend
49
- # Serve pagy.js or pagy-dev.js
50
- get("/#{PAGY_JS}") do
51
- content_type 'application/javascript'
52
- send_file Pagy.root.join('javascripts', PAGY_JS)
46
+
47
+ get('/javascripts/:file') do
48
+ format = params[:file].split('.').last
49
+ if format == 'js'
50
+ content_type 'application/javascript'
51
+ elsif format == 'map'
52
+ content_type 'application/json'
53
+ end
54
+ send_file Pagy.root.join('javascripts', params[:file])
53
55
  end
56
+
54
57
  # Edit this action as needed
55
58
  get '/' do
56
59
  collection = MockCollection.new
@@ -96,7 +99,7 @@ __END__
96
99
  <html>
97
100
  <head>
98
101
  <title>Pagy Repro App</title>
99
- <script src="<%= %(/#{PAGY_JS}) %>"></script>
102
+ <script src="javascripts/pagy.min.js"></script>
100
103
  <script>
101
104
  window.addEventListener("load", Pagy.init);
102
105
  </script>
@@ -104,7 +107,7 @@ __END__
104
107
  <style type="text/css">
105
108
  @media screen { html, body {
106
109
  font-size: 1rem;
107
- line-heigth: 1.2s;
110
+ line-height: 1.2s;
108
111
  padding: 0;
109
112
  margin: 0;
110
113
  } }
@@ -161,13 +164,13 @@ __END__
161
164
 
162
165
  <h4>pagy_nav_js</h4>
163
166
  <%= pagy_nav_js(@pagy, id: 'nav-js-responsive', aria_label: 'Pages nav_js_responsove',
164
- steps: { 0 => [1,1,1,1], 500 => [1,3,3,1], 750 => [1,5,5,1], 1000 => [2,6,6,2] }) %>
167
+ steps: { 0 => 5, 500 => 7, 750 => 9, 1000 => 11 }) %>
165
168
 
166
169
  <h4>pagy_combo_nav_js</h4>
167
170
  <%= pagy_combo_nav_js(@pagy, id: 'combo-nav-js', aria_label: 'Pages combo_nav_js') %>
168
171
 
169
- <h4>pagy_items_selector_js</h4>
170
- <%= pagy_items_selector_js(@pagy, id: 'items-selector-js') %>
172
+ <h4>pagy_limit_selector_js</h4>
173
+ <%= pagy_limit_selector_js(@pagy, id: 'limit-selector-js') %>
171
174
 
172
175
  <h4>pagy_info</h4>
173
176
  <%= pagy_info(@pagy, id: 'pagy-info') %>
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ 0db96a70cc96bc7061757f38eec002ce6b14c6d987c4373d79a9f48bdcb0a26f4e00c88eec7a18c496d2779eb277f8b4a85f41dcac4c85482c7d5dd7cf05ba87
Binary file
Binary file
Binary file
Binary file
data/bin/pagy CHANGED
@@ -1,8 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- VERSION = '8.4.0'
5
- APPS = %w[repro rails demo calendar].freeze
4
+ VERSION = '9.0.0'
5
+ APPS = %w[repro rails demo calendar keyset_ar keyset_s].freeze
6
+ LINUX = RbConfig::CONFIG['host_os'].include?('linux')
7
+ HOST = '0.0.0.0'
8
+ PORT = '8000'
6
9
 
7
10
  require_relative '../lib/optimist'
8
11
  opts = Optimist.options do
@@ -14,23 +17,27 @@ opts = Optimist.options do
14
17
  rails Reproduce rails related issues
15
18
  demo Showcase all the helpers and styles
16
19
  calendar Showcase the calendar; reproduce related issues
20
+ keyset_ar Showcase the keyset ActiveRecord pagination
21
+ keyset_s Showcase the keyset Sequel pagination
17
22
  USAGE
18
23
  pagy APP [options] Showcase APP from the installed gem
19
24
  pagy clone APP Clone APP to the current dir
20
25
  pagy APPFILE [options] Develop APPFILE from local path
21
26
  EXAMPLES
22
- pagy demo Showcase demo at http://0.0.0.0:8000
27
+ pagy demo Showcase demo at http://#{HOST}:#{PORT}
23
28
  pagy clone repro Clone repro to ./repro.ru
24
- pagy ~/my-repro.ru Develop ~/my-repro.ru at http://0.0.0.0:8000
29
+ pagy ~/my-repro.ru Develop ~/my-repro.ru at#{HOST}:#{PORT}
25
30
  HEAD
26
31
  text 'Rackup options'
27
32
  opt :env, 'Environment', default: 'development'
28
- opt :host, 'Host', default: '0.0.0.0', short: :o
29
- opt :port, 'Port', default: 8000
33
+ opt :host, 'Host', default: HOST, short: :o
34
+ opt :port, 'Port', default: PORT
30
35
  opt :install, 'Install bundle for users', default: true
31
- text 'Rerun options'
32
- opt :rerun, 'Enable rerun for development', default: true
33
- opt :clear, 'Clear screen before each rerun'
36
+ if LINUX
37
+ text 'Rerun options'
38
+ opt :rerun, 'Enable rerun for development', default: true
39
+ opt :clear, 'Clear screen before each rerun'
40
+ end
34
41
  text 'Other options'
35
42
  opt :quiet, 'Quiet mode for development'
36
43
  version VERSION
@@ -38,8 +45,6 @@ end
38
45
  Optimist.educate if ARGV.empty?
39
46
 
40
47
  run_from_repo = File.exist?(File.expand_path('../pagy.gemspec', __dir__))
41
- # Never install if run from pagy repo (for pagy devs)
42
- opts[:install] = false if run_from_repo
43
48
 
44
49
  # Handles gems
45
50
  require 'bundler/inline'
@@ -48,7 +53,7 @@ Bundler.configure
48
53
  gemfile(opts[:install]) do
49
54
  source 'https://rubygems.org'
50
55
  gem 'rackup'
51
- gem 'rerun'
56
+ gem 'rerun' if LINUX
52
57
  end
53
58
 
54
59
  path = ->(app) { File.expand_path("../apps/#{app}.ru", __dir__) }
data/config/pagy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (8.4.0)
3
+ # Pagy initializer file (9.0.0)
4
4
  # Customize only what you really need and notice that the core Pagy works also without any of the following lines.
5
5
  # Should you just cherry pick part of this file, please maintain the require-order of the extras
6
6
 
@@ -10,16 +10,25 @@
10
10
  # You can set any pagy variable as a Pagy::DEFAULT. They can also be overridden per instance by just passing them to
11
11
  # Pagy.new|Pagy::Countless.new|Pagy::Calendar::*.new or any of the #pagy* controller methods
12
12
  # Here are the few that make more sense as DEFAULTs:
13
- # Pagy::DEFAULT[:items] = 20 # default
14
- # Pagy::DEFAULT[:size] = [1,4,4,1] # default in pagy < 7.0
13
+ # Pagy::DEFAULT[:limit] = 20 # default
14
+ # Pagy::DEFAULT[:size] = 7 # default
15
+ # Pagy::DEFAULT[:ends] = true # default
15
16
  # Pagy::DEFAULT[:page_param] = :page # default
16
17
  # Pagy::DEFAULT[:count_args] = [] # example for non AR ORMs
18
+ # Pagy::DEFAULT[:max_pages] = 3000 # example
17
19
 
18
20
 
19
21
  # Extras
20
22
  # See https://ddnexus.github.io/pagy/categories/extra
21
23
 
22
24
 
25
+ # Legacy Compatibility Extras
26
+
27
+ # Size extra: Enable the Array type for the `:size` variable (e.g. `size: [1,4,4,1]`)
28
+ # See https://ddnexus.github.io/pagy/docs/extras/size
29
+ # require 'pagy/extras/size' # must be required before the other extras
30
+
31
+
23
32
  # Backend Extras
24
33
 
25
34
  # Arel extra: For better performance utilizing grouped ActiveRecord collections:
@@ -33,21 +42,12 @@
33
42
  # Calendar extra: Add pagination filtering by calendar time unit (year, quarter, month, week, day)
34
43
  # See https://ddnexus.github.io/pagy/docs/extras/calendar
35
44
  # require 'pagy/extras/calendar'
36
- # Default for each unit
37
- # Pagy::Calendar::Year::DEFAULT[:order] = :asc # Time direction of pagination
38
- # Pagy::Calendar::Year::DEFAULT[:format] = '%Y' # strftime format
39
- #
40
- # Pagy::Calendar::Quarter::DEFAULT[:order] = :asc # Time direction of pagination
41
- # Pagy::Calendar::Quarter::DEFAULT[:format] = '%Y-Q%q' # strftime format
42
- #
43
- # Pagy::Calendar::Month::DEFAULT[:order] = :asc # Time direction of pagination
44
- # Pagy::Calendar::Month::DEFAULT[:format] = '%Y-%m' # strftime format
45
- #
46
- # Pagy::Calendar::Week::DEFAULT[:order] = :asc # Time direction of pagination
47
- # Pagy::Calendar::Week::DEFAULT[:format] = '%Y-%W' # strftime format
48
- #
49
- # Pagy::Calendar::Day::DEFAULT[:order] = :asc # Time direction of pagination
50
- # Pagy::Calendar::Day::DEFAULT[:format] = '%Y-%m-%d' # strftime format
45
+ # Default for each calendar unit class in IRB:
46
+ # >> Pagy::Calendar::Year::DEFAULT
47
+ # >> Pagy::Calendar::Quarter::DEFAULT
48
+ # >> Pagy::Calendar::Month::DEFAULT
49
+ # >> Pagy::Calendar::Week::DEFAULT
50
+ # >> Pagy::Calendar::Day::DEFAULT
51
51
  #
52
52
  # Uncomment the following lines, if you need calendar localization without using the I18n extra
53
53
  # module LocalizePagyCalendar
@@ -75,7 +75,7 @@
75
75
  # See http://ddnexus.github.io/pagy/extras/headers
76
76
  # require 'pagy/extras/headers'
77
77
  # Pagy::DEFAULT[:headers] = { page: 'Current-Page',
78
- # items: 'Page-Items',
78
+ # limit: 'Page-Items',
79
79
  # count: 'Total-Count',
80
80
  # pages: 'Total-Pages' } # default
81
81
 
@@ -90,8 +90,8 @@
90
90
 
91
91
  # Metadata extra: Provides the pagination metadata to Javascript frameworks like Vue.js, react.js, etc.
92
92
  # See https://ddnexus.github.io/pagy/docs/extras/metadata
93
- # you must require the frontend helpers internal extra (BEFORE the metadata extra) ONLY if you need also the :sequels
94
- # require 'pagy/extras/frontend_helpers'
93
+ # you must require the JS Tools internal extra (BEFORE the metadata extra) ONLY if you need also the :sequels
94
+ # require 'pagy/extras/js_tools'
95
95
  # require 'pagy/extras/metadata'
96
96
  # For performance reasons, you should explicitly set ONLY the metadata you use in the frontend
97
97
  # Pagy::DEFAULT[:metadata] = %i[scaffold_url page prev next last] # example
@@ -125,25 +125,25 @@
125
125
 
126
126
  # Multi size var used by the *_nav_js helpers
127
127
  # See https://ddnexus.github.io/pagy/docs/extras/pagy#steps
128
- # Pagy::DEFAULT[:steps] = { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] } # example
128
+ # Pagy::DEFAULT[:steps] = { 0 => 5, 540 => 7, 720 => 9 } # example
129
129
 
130
130
 
131
131
  # Feature Extras
132
132
 
133
- # Gearbox extra: Automatically change the number of items per page depending on the page number
133
+ # Gearbox extra: Automatically change the limit per page depending on the page number
134
134
  # See https://ddnexus.github.io/pagy/docs/extras/gearbox
135
135
  # require 'pagy/extras/gearbox'
136
136
  # set to false only if you want to make :gearbox_extra an opt-in variable
137
137
  # Pagy::DEFAULT[:gearbox_extra] = false # default true
138
- # Pagy::DEFAULT[:gearbox_items] = [15, 30, 60, 100] # default
138
+ # Pagy::DEFAULT[:gearbox_limit] = [15, 30, 60, 100] # default
139
139
 
140
- # Items extra: Allow the client to request a custom number of items per page with an optional selector UI
141
- # See https://ddnexus.github.io/pagy/docs/extras/items
142
- # require 'pagy/extras/items'
143
- # set to false only if you want to make :items_extra an opt-in variable
144
- # Pagy::DEFAULT[:items_extra] = false # default true
145
- # Pagy::DEFAULT[:items_param] = :items # default
146
- # Pagy::DEFAULT[:max_items] = 100 # default
140
+ # Limit extra: Allow the client to request a custom limit per page with an optional selector UI
141
+ # See https://ddnexus.github.io/pagy/docs/extras/limit
142
+ # require 'pagy/extras/limit'
143
+ # set to false only if you want to make :limit_extra an opt-in variable
144
+ # Pagy::DEFAULT[:limit_extra] = false # default true
145
+ # Pagy::DEFAULT[:limit_param] = :limit # default
146
+ # Pagy::DEFAULT[:limit_max] = 100 # default
147
147
 
148
148
  # Overflow extra: Allow for easy handling of overflowing pages
149
149
  # See https://ddnexus.github.io/pagy/docs/extras/overflow
@@ -167,10 +167,9 @@
167
167
  # set to false only if you want to make :jsonapi an opt-in variable
168
168
  # Pagy::DEFAULT[:jsonapi] = false # default true
169
169
 
170
-
171
170
  # Rails
172
171
  # Enable the .js file required by the helpers that use javascript
173
- # (pagy*_nav_js, pagy*_combo_nav_js, and pagy_items_selector_js)
172
+ # (pagy*_nav_js, pagy*_combo_nav_js, and pagy_limit_selector_js)
174
173
  # See https://ddnexus.github.io/pagy/docs/api/javascript
175
174
 
176
175
  # With the asset pipeline
@@ -1,113 +1,100 @@
1
1
  const Pagy = (() => {
2
- // The observer instance for responsive navs
3
- const rjsObserver = new ResizeObserver(entries => entries.forEach(e => e.target.querySelectorAll(".pagy-rjs").forEach(el => el.pagyRender())));
4
- // Init the *_nav_js helpers
5
- const initNav = (el, [tokens, sequels, labelSequels, trimParam]) => {
6
- const container = el.parentElement ?? el;
7
- const widths = Object.keys(sequels).map(w => parseInt(w)).sort((a, b) => b - a);
8
- let lastWidth = -1;
9
- const fillIn = (a, page, label) => a.replace(/__pagy_page__/g, page).replace(/__pagy_label__/g, label);
10
- (el.pagyRender = function () {
11
- const width = widths.find(w => w < container.clientWidth) || 0;
12
- if (width === lastWidth) {
13
- return;
14
- } // no change: abort
15
- let html = tokens.before; // already trimmed in html
16
- const series = sequels[width.toString()];
17
- const labels = labelSequels?.[width.toString()] ?? series.map(l => l.toString());
18
- for (const i in series) {
19
- const item = series[i];
20
- const label = labels[i];
21
- let filled;
22
- if (typeof item === "number") {
23
- filled = fillIn(tokens.a, item.toString(), label);
24
- }
25
- else if (item === "gap") {
26
- filled = tokens.gap;
27
- }
28
- else { // active page
29
- filled = fillIn(tokens.current, item, label);
30
- }
31
- html += (typeof trimParam === "string" && item == 1) ? trim(filled, trimParam) : filled;
32
- }
33
- html += tokens.after; // eslint-disable-line align-assignments/align-assignments
34
- el.innerHTML = "";
35
- el.insertAdjacentHTML("afterbegin", html);
36
- lastWidth = width;
37
- })();
38
- if (el.classList.contains("pagy-rjs")) {
39
- rjsObserver.observe(container);
2
+ const rjsObserver = new ResizeObserver((entries) => entries.forEach((e) => e.target.querySelectorAll(".pagy-rjs").forEach((el) => el.pagyRender())));
3
+ const initNav = (el, [tokens, sequels, labelSequels, trimParam]) => {
4
+ const container = el.parentElement ?? el;
5
+ const widths = Object.keys(sequels).map((w) => parseInt(w)).sort((a, b) => b - a);
6
+ let lastWidth = -1;
7
+ const fillIn = (a, page, label) => a.replace(/__pagy_page__/g, page).replace(/__pagy_label__/g, label);
8
+ (el.pagyRender = function() {
9
+ const width = widths.find((w) => w < container.clientWidth) || 0;
10
+ if (width === lastWidth) {
11
+ return;
12
+ }
13
+ let html = tokens.before;
14
+ const series = sequels[width.toString()];
15
+ const labels = labelSequels?.[width.toString()] ?? series.map((l) => l.toString());
16
+ series.forEach((item, i) => {
17
+ const label = labels[i];
18
+ let filled;
19
+ if (typeof item === "number") {
20
+ filled = fillIn(tokens.a, item.toString(), label);
21
+ } else if (item === "gap") {
22
+ filled = tokens.gap;
23
+ } else {
24
+ filled = fillIn(tokens.current, item, label);
40
25
  }
26
+ html += typeof trimParam === "string" && item == 1 ? trim(filled, trimParam) : filled;
27
+ });
28
+ html += tokens.after;
29
+ el.innerHTML = "";
30
+ el.insertAdjacentHTML("afterbegin", html);
31
+ lastWidth = width;
32
+ })();
33
+ if (el.classList.contains("pagy-rjs")) {
34
+ rjsObserver.observe(container);
35
+ }
36
+ };
37
+ const initCombo = (el, [url_token, trimParam]) => initInput(el, (inputValue) => [inputValue, url_token.replace(/__pagy_page__/, inputValue)], trimParam);
38
+ const initSelector = (el, [from, url_token, trimParam]) => {
39
+ initInput(el, (inputValue) => {
40
+ const page = Math.max(Math.ceil(from / parseInt(inputValue)), 1).toString();
41
+ const url = url_token.replace(/__pagy_page__/, page).replace(/__pagy_items__/, inputValue);
42
+ return [page, url];
43
+ }, trimParam);
44
+ };
45
+ const initInput = (el, getVars, trimParam) => {
46
+ const input = el.querySelector("input");
47
+ const link = el.querySelector("a");
48
+ const initial = input.value;
49
+ const action = function() {
50
+ if (input.value === initial) {
51
+ return;
52
+ }
53
+ const [min, val, max] = [input.min, input.value, input.max].map((n) => parseInt(n) || 0);
54
+ if (val < min || val > max) {
55
+ input.value = initial;
56
+ input.select();
57
+ return;
58
+ }
59
+ let [page, url] = getVars(input.value);
60
+ if (typeof trimParam === "string" && page === "1") {
61
+ url = trim(url, trimParam);
62
+ }
63
+ link.href = url;
64
+ link.click();
41
65
  };
42
- // Init the *_combo_nav_js helpers
43
- const initCombo = (el, [url_token, trimParam]) => initInput(el, inputValue => [inputValue, url_token.replace(/__pagy_page__/, inputValue)], trimParam);
44
- // Init the items_selector_js helper
45
- const initSelector = (el, [from, url_token, trimParam]) => {
46
- initInput(el, inputValue => {
47
- const page = Math.max(Math.ceil(from / parseInt(inputValue)), 1).toString();
48
- const url = url_token.replace(/__pagy_page__/, page).replace(/__pagy_items__/, inputValue);
49
- return [page, url];
50
- }, trimParam);
51
- };
52
- // Init the input element
53
- const initInput = (el, getVars, trimParam) => {
54
- const input = el.querySelector("input");
55
- const link = el.querySelector("a");
56
- const initial = input.value;
57
- const action = function () {
58
- if (input.value === initial) {
59
- return;
60
- } // not changed
61
- const [min, val, max] = [input.min, input.value, input.max].map(n => parseInt(n) || 0);
62
- if (val < min || val > max) { // reset invalid/out-of-range
63
- input.value = initial;
64
- input.select();
65
- return;
66
- }
67
- let [page, url] = getVars(input.value); // eslint-disable-line prefer-const
68
- if (typeof trimParam === "string" && page === "1") {
69
- url = trim(url, trimParam);
70
- }
71
- link.href = url;
72
- link.click();
73
- };
74
- ["change", "focus"].forEach(e => input.addEventListener(e, input.select)); // auto-select
75
- input.addEventListener("focusout", action); // trigger action
76
- input.addEventListener("keypress", e => { if (e.key === "Enter") {
77
- action();
78
- } }); // trigger action
79
- };
80
- // Trim the ${page-param}=1 params in links
81
- const trim = (a, param) => a.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
82
- // Public interface
83
- return {
84
- version: "8.4.0",
85
- // Scan for elements with a "data-pagy" attribute and call their init functions with the decoded args
86
- init(arg) {
87
- const target = arg instanceof Element ? arg : document;
88
- const elements = target.querySelectorAll("[data-pagy]");
89
- for (const el of elements) {
90
- try {
91
- const uint8array = Uint8Array.from(atob(el.getAttribute("data-pagy")), c => c.charCodeAt(0));
92
- const [keyword, ...args] = JSON.parse((new TextDecoder()).decode(uint8array)); // base64-utf8 -> JSON -> Array
93
- if (keyword === "nav") {
94
- initNav(el, args);
95
- }
96
- else if (keyword === "combo") {
97
- initCombo(el, args);
98
- }
99
- else if (keyword === "selector") {
100
- initSelector(el, args);
101
- }
102
- else {
103
- console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'", el, keyword);
104
- }
105
- }
106
- catch (err) {
107
- console.warn("Skipped Pagy.init() for: %o\n%s", el, err);
108
- }
109
- }
66
+ ["change", "focus"].forEach((e) => input.addEventListener(e, () => input.select()));
67
+ input.addEventListener("focusout", action);
68
+ input.addEventListener("keypress", (e) => {
69
+ if (e.key === "Enter") {
70
+ action();
71
+ }
72
+ });
73
+ };
74
+ const trim = (a, param) => a.replace(new RegExp(`[?&]${param}=1\\b(?!&)|\\b${param}=1&`), "");
75
+ return {
76
+ version: "8.6.3",
77
+ init(arg) {
78
+ const target = arg instanceof Element ? arg : document;
79
+ const elements = target.querySelectorAll("[data-pagy]");
80
+ for (const el of elements) {
81
+ try {
82
+ const uint8array = Uint8Array.from(atob(el.getAttribute("data-pagy")), (c) => c.charCodeAt(0));
83
+ const [keyword, ...args] = JSON.parse(new TextDecoder().decode(uint8array));
84
+ if (keyword === "nav") {
85
+ initNav(el, args);
86
+ } else if (keyword === "combo") {
87
+ initCombo(el, args);
88
+ } else if (keyword === "selector") {
89
+ initSelector(el, args);
90
+ } else {
91
+ console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'", el, keyword);
92
+ }
93
+ } catch (err) {
94
+ console.warn("Skipped Pagy.init() for: %o\n%s", el, err);
110
95
  }
111
- };
96
+ }
97
+ }
98
+ };
112
99
  })();
113
100
  export default Pagy;
data/javascripts/pagy.js CHANGED
@@ -1 +1,4 @@
1
- !function(){let e=(()=>{let e=new ResizeObserver(e=>e.forEach(e=>e.target.querySelectorAll(".pagy-rjs").forEach(e=>e.pagyRender()))),t=(t,[r,a,n,l])=>{let i=t.parentElement??t,c=Object.keys(a).map(e=>parseInt(e)).sort((e,t)=>t-e),p=-1,s=(e,t,r)=>e.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,r);(t.pagyRender=function(){let e=c.find(e=>e<i.clientWidth)||0;if(e===p)return;let g=r.before,y=a[e.toString()],f=n?.[e.toString()]??y.map(e=>e.toString());for(let e in y){let t;let a=y[e],n=f[e];t="number"==typeof a?s(r.a,a.toString(),n):"gap"===a?r.gap:s(r.current,a,n),g+="string"==typeof l&&1==a?o(t,l):t}g+=r.after,t.innerHTML="",t.insertAdjacentHTML("afterbegin",g),p=e})(),t.classList.contains("pagy-rjs")&&e.observe(i)},r=(e,[t,r])=>n(e,e=>[e,t.replace(/__pagy_page__/,e)],r),a=(e,[t,r,a])=>{n(e,e=>{let a=Math.max(Math.ceil(t/parseInt(e)),1).toString(),n=r.replace(/__pagy_page__/,a).replace(/__pagy_items__/,e);return[a,n]},a)},n=(e,t,r)=>{let a=e.querySelector("input"),n=e.querySelector("a"),l=a.value,i=function(){if(a.value===l)return;let[e,i,c]=[a.min,a.value,a.max].map(e=>parseInt(e)||0);if(i<e||i>c){a.value=l,a.select();return}let[p,s]=t(a.value);"string"==typeof r&&"1"===p&&(s=o(s,r)),n.href=s,n.click()};["change","focus"].forEach(e=>a.addEventListener(e,a.select)),a.addEventListener("focusout",i),a.addEventListener("keypress",e=>{"Enter"===e.key&&i()})},o=(e,t)=>e.replace(RegExp(`[?&]${t}=1\\b(?!&)|\\b${t}=1&`),"");return{version:"8.4.0",init(e){for(let n of(e instanceof Element?e:document).querySelectorAll("[data-pagy]"))try{let e=Uint8Array.from(atob(n.getAttribute("data-pagy")),e=>e.charCodeAt(0)),[o,...l]=JSON.parse(new TextDecoder().decode(e));"nav"===o?t(n,l):"combo"===o?r(n,l):"selector"===o?a(n,l):console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",n,o)}catch(e){console.warn("Skipped Pagy.init() for: %o\n%s",n,e)}}}})();window.Pagy=e}();
1
+ window.Pagy=(()=>{const j=new ResizeObserver((B)=>B.forEach((D)=>D.target.querySelectorAll(".pagy-rjs").forEach((E)=>E.pagyRender()))),x=(B,[D,E,z,G])=>{const F=B.parentElement??B,K=Object.keys(E).map((H)=>parseInt(H)).sort((H,M)=>M-H);let L=-1;const T=(H,M,R)=>H.replace(/__pagy_page__/g,M).replace(/__pagy_label__/g,R);if((B.pagyRender=function(){const H=K.find((Q)=>Q<F.clientWidth)||0;if(H===L)return;let M=D.before;const R=E[H.toString()],X=z?.[H.toString()]??R.map((Q)=>Q.toString());R.forEach((Q,J)=>{const $=X[J];let U;if(typeof Q==="number")U=T(D.a,Q.toString(),$);else if(Q==="gap")U=D.gap;else U=T(D.current,Q,$);M+=typeof G==="string"&&Q==1?Z(U,G):U}),M+=D.after,B.innerHTML="",B.insertAdjacentHTML("afterbegin",M),L=H})(),B.classList.contains("pagy-rjs"))j.observe(F)},A=(B,[D,E])=>Y(B,(z)=>[z,D.replace(/__pagy_page__/,z)],E),C=(B,[D,E,z])=>{Y(B,(G)=>{const F=Math.max(Math.ceil(D/parseInt(G)),1).toString(),K=E.replace(/__pagy_page__/,F).replace(/__pagy_items__/,G);return[F,K]},z)},Y=(B,D,E)=>{const z=B.querySelector("input"),G=B.querySelector("a"),F=z.value,K=function(){if(z.value===F)return;const[L,T,H]=[z.min,z.value,z.max].map((X)=>parseInt(X)||0);if(T<L||T>H){z.value=F,z.select();return}let[M,R]=D(z.value);if(typeof E==="string"&&M==="1")R=Z(R,E);G.href=R,G.click()};["change","focus"].forEach((L)=>z.addEventListener(L,()=>z.select())),z.addEventListener("focusout",K),z.addEventListener("keypress",(L)=>{if(L.key==="Enter")K()})},Z=(B,D)=>B.replace(new RegExp(`[?&]${D}=1\\b(?!&)|\\b${D}=1&`),"");return{version:"8.6.3",init(B){const E=(B instanceof Element?B:document).querySelectorAll("[data-pagy]");for(let z of E)try{const G=Uint8Array.from(atob(z.getAttribute("data-pagy")),(L)=>L.charCodeAt(0)),[F,...K]=JSON.parse((new TextDecoder()).decode(G));if(F==="nav")x(z,K);else if(F==="combo")A(z,K);else if(F==="selector")C(z,K);else console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",z,F)}catch(G){console.warn("Skipped Pagy.init() for: %o\n%s",z,G)}}}})();
2
+
3
+ //# debugId=B9DC02765C7A5B6764756E2164756E21
4
+ //# sourceMappingURL=pagy.min.js.map
@@ -0,0 +1,4 @@
1
+ window.Pagy=(()=>{const j=new ResizeObserver((B)=>B.forEach((D)=>D.target.querySelectorAll(".pagy-rjs").forEach((E)=>E.pagyRender()))),x=(B,[D,E,z,G])=>{const F=B.parentElement??B,K=Object.keys(E).map((H)=>parseInt(H)).sort((H,M)=>M-H);let L=-1;const T=(H,M,R)=>H.replace(/__pagy_page__/g,M).replace(/__pagy_label__/g,R);if((B.pagyRender=function(){const H=K.find((Q)=>Q<F.clientWidth)||0;if(H===L)return;let M=D.before;const R=E[H.toString()],X=z?.[H.toString()]??R.map((Q)=>Q.toString());R.forEach((Q,J)=>{const $=X[J];let U;if(typeof Q==="number")U=T(D.a,Q.toString(),$);else if(Q==="gap")U=D.gap;else U=T(D.current,Q,$);M+=typeof G==="string"&&Q==1?Z(U,G):U}),M+=D.after,B.innerHTML="",B.insertAdjacentHTML("afterbegin",M),L=H})(),B.classList.contains("pagy-rjs"))j.observe(F)},A=(B,[D,E])=>Y(B,(z)=>[z,D.replace(/__pagy_page__/,z)],E),C=(B,[D,E,z])=>{Y(B,(G)=>{const F=Math.max(Math.ceil(D/parseInt(G)),1).toString(),K=E.replace(/__pagy_page__/,F).replace(/__pagy_limit__/,G);return[F,K]},z)},Y=(B,D,E)=>{const z=B.querySelector("input"),G=B.querySelector("a"),F=z.value,K=function(){if(z.value===F)return;const[L,T,H]=[z.min,z.value,z.max].map((X)=>parseInt(X)||0);if(T<L||T>H){z.value=F,z.select();return}let[M,R]=D(z.value);if(typeof E==="string"&&M==="1")R=Z(R,E);G.href=R,G.click()};["change","focus"].forEach((L)=>z.addEventListener(L,()=>z.select())),z.addEventListener("focusout",K),z.addEventListener("keypress",(L)=>{if(L.key==="Enter")K()})},Z=(B,D)=>B.replace(new RegExp(`[?&]${D}=1\\b(?!&)|\\b${D}=1&`),"");return{version:"9.0.0",init(B){const E=(B instanceof Element?B:document).querySelectorAll("[data-pagy]");for(let z of E)try{const G=Uint8Array.from(atob(z.getAttribute("data-pagy")),(L)=>L.charCodeAt(0)),[F,...K]=JSON.parse((new TextDecoder()).decode(G));if(F==="nav")x(z,K);else if(F==="combo")A(z,K);else if(F==="selector")C(z,K);else console.warn("Skipped Pagy.init() for: %o\nUnknown keyword '%s'",z,F)}catch(G){console.warn("Skipped Pagy.init() for: %o\n%s",z,G)}}}})();
2
+
3
+ //# debugId=69AACBBBCEE7711064756E2164756E21
4
+ //# sourceMappingURL=pagy.min.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/pagy.ts"],
4
+ "sourcesContent": [
5
+ "type NavArgs = readonly [Tokens, Sequels, null | LabelSequels, string?]\ntype ComboArgs = readonly [string, string?]\ntype SelectorArgs = readonly [number, string, string?]\ntype JsonArgs = ['nav', NavArgs] | ['combo', ComboArgs] | ['selector', SelectorArgs]\n\ninterface Tokens {\n readonly before:string\n readonly a:string\n readonly current:string\n readonly gap:string\n readonly after:string\n}\ninterface Sequels {readonly [width:string]:(string | number)[]}\ninterface LabelSequels {readonly [width:string]:string[]}\ninterface NavElement extends Element {pagyRender():void}\n\nconst Pagy = (() => {\n // The observer instance for responsive navs\n const rjsObserver = new ResizeObserver(\n entries => entries.forEach(e => e.target.querySelectorAll<NavElement>(\".pagy-rjs\")\n .forEach(el => el.pagyRender())));\n // Init the *_nav_js helpers\n const initNav = (el:NavElement, [tokens, sequels, labelSequels, trimParam]:NavArgs) => {\n const container = el.parentElement ?? el;\n const widths = Object.keys(sequels).map(w => parseInt(w)).sort((a, b) => b - a);\n let lastWidth = -1;\n const fillIn = (a:string, page:string, label:string):string =>\n a.replace(/__pagy_page__/g, page).replace(/__pagy_label__/g, label);\n (el.pagyRender = function () {\n const width = widths.find(w => w < container.clientWidth) || 0;\n if (width === lastWidth) { return } // no change: abort\n let html = tokens.before; // already trimmed in html\n const series = sequels[width.toString()];\n const labels = labelSequels?.[width.toString()] ?? series.map(l => l.toString());\n series.forEach((item, i) => {\n const label = labels[i];\n let filled;\n if (typeof item === \"number\") {\n filled = fillIn(tokens.a, item.toString(), label);\n } else if (item === \"gap\") {\n filled = tokens.gap;\n } else { // active page\n filled = fillIn(tokens.current, item, label);\n }\n html += (typeof trimParam === \"string\" && item == 1) ? trim(filled, trimParam) : filled;\n });\n html += tokens.after;\n el.innerHTML = \"\";\n el.insertAdjacentHTML(\"afterbegin\", html);\n lastWidth = width;\n })();\n if (el.classList.contains(\"pagy-rjs\")) { rjsObserver.observe(container) }\n };\n\n // Init the *_combo_nav_js helpers\n const initCombo = (el:Element, [url_token, trimParam]:ComboArgs) =>\n initInput(el, inputValue => [inputValue, url_token.replace(/__pagy_page__/, inputValue)], trimParam);\n\n // Init the limit_selector_js helper\n const initSelector = (el:Element, [from, url_token, trimParam]:SelectorArgs) => {\n initInput(el, inputValue => {\n const page = Math.max(Math.ceil(from / parseInt(inputValue)), 1).toString();\n const url = url_token.replace(/__pagy_page__/, page).replace(/__pagy_limit__/, inputValue);\n return [page, url];\n }, trimParam);\n };\n\n // Init the input element\n const initInput = (el:Element, getVars:(v:string) => [string, string], trimParam?:string) => {\n const input = el.querySelector(\"input\") as HTMLInputElement;\n const link = el.querySelector(\"a\") as HTMLAnchorElement;\n const initial = input.value;\n const action = function () {\n if (input.value === initial) { return } // not changed\n const [min, val, max] = [input.min, input.value, input.max].map(n => parseInt(n) || 0);\n if (val < min || val > max) { // reset invalid/out-of-range\n input.value = initial;\n input.select();\n return;\n }\n let [page, url] = getVars(input.value); // eslint-disable-line prefer-const\n if (typeof trimParam === \"string\" && page === \"1\") { url = trim(url, trimParam) }\n link.href = url;\n link.click();\n };\n [\"change\", \"focus\"].forEach(e => input.addEventListener(e, () => input.select())); // auto-select\n input.addEventListener(\"focusout\", action); // trigger action\n input.addEventListener(\"keypress\", e => { if (e.key === \"Enter\") { action() } }); // trigger action\n };\n\n // Trim the ${page-param}=1 params in links\n const trim = (a:string, param:string) =>\n a.replace(new RegExp(`[?&]${param}=1\\\\b(?!&)|\\\\b${param}=1&`), \"\");\n\n // Public interface\n return {\n version: \"9.0.0\",\n\n // Scan for elements with a \"data-pagy\" attribute and call their init functions with the decoded args\n init(arg?:Element) {\n const target = arg instanceof Element ? arg : document;\n const elements = target.querySelectorAll(\"[data-pagy]\");\n for (const el of elements) {\n try {\n const uint8array = Uint8Array.from(atob(el.getAttribute(\"data-pagy\") as string), c => c.charCodeAt(0));\n const [keyword, ...args] = JSON.parse((new TextDecoder()).decode(uint8array)) as JsonArgs; // base64-utf8 -> JSON -> Array\n if (keyword === \"nav\") {\n initNav(el as NavElement, args as unknown as NavArgs);\n } else if (keyword === \"combo\") {\n initCombo(el, args as unknown as ComboArgs);\n } else if (keyword === \"selector\") {\n initSelector(el, args as unknown as SelectorArgs);\n } else {\n console.warn(\"Skipped Pagy.init() for: %o\\nUnknown keyword '%s'\", el, keyword);\n }\n } catch (err) { console.warn(\"Skipped Pagy.init() for: %o\\n%s\", el, err) }\n }\n }\n };\n})();\n\nexport default Pagy;\n"
6
+ ],
7
+ "mappings": "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",
8
+ "debugId": "69AACBBBCEE7711064756E2164756E21",
9
+ "names": []
10
+ }