openproject-primer_view_components 0.84.0 → 0.84.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/components/primer/open_project/pagination.rb +7 -2
- data/lib/primer/view_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cde4b26b0af3fa4b8b0689fae12e47b45959a7d96372a40766bf16c63ff67226
|
|
4
|
+
data.tar.gz: 9f711442fb711737bbc170328789ea4e09c5ccdf97d97397f42afdd584a96296
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa0cb40dbd2e6025a90f90d4e6dd779836af165869da03a462067edbbaf45ba25923691d9d8325383cc8e0f8dd040dc306f02099240ac2a170e66d77c33fc995
|
|
7
|
+
data.tar.gz: 638fcd5734d19d9ac0c565ce3f72bb57fc4d0f932bf741216d6cdca723fbff8a9f2ee938856e88882adaf89ff9a7377e7609d514930c18e3fe1dafa34e017e88
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 0.84.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#432](https://github.com/opf/primer_view_components/pull/432) [`3285c51`](https://github.com/opf/primer_view_components/commit/3285c51b142a39d8f6ebaf202afda9550f3f6831) Thanks [@HDinger](https://github.com/HDinger)! - Allow link_arguments for pagination links
|
|
8
|
+
|
|
3
9
|
## 0.84.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -29,6 +29,7 @@ module Primer
|
|
|
29
29
|
margin_page_count: DEFAULT_MARGIN_PAGE_COUNT,
|
|
30
30
|
show_pages: true,
|
|
31
31
|
surrounding_page_count: DEFAULT_SURROUNDING_PAGE_COUNT,
|
|
32
|
+
link_arguments: {},
|
|
32
33
|
**system_arguments
|
|
33
34
|
)
|
|
34
35
|
@page_count = cast_integer!(page_count, "page_count")
|
|
@@ -37,6 +38,7 @@ module Primer
|
|
|
37
38
|
@margin_page_count = cast_integer!(margin_page_count, "margin_page_count")
|
|
38
39
|
@show_pages = show_pages
|
|
39
40
|
@surrounding_page_count = cast_integer!(surrounding_page_count, "surrounding_page_count")
|
|
41
|
+
@link_arguments = link_arguments
|
|
40
42
|
@system_arguments = system_arguments
|
|
41
43
|
|
|
42
44
|
@system_arguments[:tag] = :nav
|
|
@@ -71,6 +73,7 @@ module Primer
|
|
|
71
73
|
raise ArgumentError, "href_builder must respond to #call" unless href_builder.respond_to?(:call)
|
|
72
74
|
raise ArgumentError, "show_pages must be a boolean" unless [true, false].include?(show_pages)
|
|
73
75
|
raise ArgumentError, "current_page can't be larger than page_count" if current_page > page_count
|
|
76
|
+
raise ArgumentError, "link_arguments must be a Hash" unless @link_arguments.is_a?(Hash)
|
|
74
77
|
end
|
|
75
78
|
|
|
76
79
|
def default_href_builder(page_num)
|
|
@@ -240,7 +243,8 @@ module Primer
|
|
|
240
243
|
props.merge!(
|
|
241
244
|
rel: key_string,
|
|
242
245
|
href: href_builder.call(page[:num]),
|
|
243
|
-
"aria-label": I18n.t("pagination.#{key_string}_page")
|
|
246
|
+
"aria-label": I18n.t("pagination.#{key_string}_page"),
|
|
247
|
+
**@link_arguments
|
|
244
248
|
)
|
|
245
249
|
end
|
|
246
250
|
|
|
@@ -250,7 +254,8 @@ module Primer
|
|
|
250
254
|
|
|
251
255
|
props.merge!(
|
|
252
256
|
href: href_builder.call(page[:num]),
|
|
253
|
-
"aria-label": page[:precedes_break] ? I18n.t("pagination.page_with_more", number: page[:num]) : I18n.t("pagination.page", number: page[:num])
|
|
257
|
+
"aria-label": page[:precedes_break] ? I18n.t("pagination.page_with_more", number: page[:num]) : I18n.t("pagination.page", number: page[:num]),
|
|
258
|
+
**@link_arguments
|
|
254
259
|
)
|
|
255
260
|
|
|
256
261
|
props[:"aria-current"] = "page" if page[:selected]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openproject-primer_view_components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.84.
|
|
4
|
+
version: 0.84.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitHub Open Source
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-03-
|
|
12
|
+
date: 2026-03-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: actionview
|