katalyst-tables 2.6.0.beta → 2.6.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.
- checksums.yaml +4 -4
- data/app/components/concerns/katalyst/tables/has_table_content.rb +1 -1
- data/app/components/concerns/katalyst/tables/orderable.rb +1 -1
- data/app/components/concerns/katalyst/tables/selectable.rb +1 -1
- data/app/components/katalyst/tables/body_row_component.rb +2 -2
- data/app/components/katalyst/tables/header_row_component.rb +2 -2
- data/app/components/katalyst/tables/selectable/form_component.html.erb +1 -1
- data/app/components/katalyst/turbo/pagy_nav_component.rb +3 -3
- data/app/components/katalyst/turbo/table_component.rb +1 -1
- data/app/controllers/concerns/katalyst/tables/backend.rb +2 -2
- data/app/helpers/katalyst/tables/frontend.rb +2 -2
- data/app/models/katalyst/tables/collection/sort_form.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b0dbb74e9e136164208e3154bbf3b6eef1b237f0713da1f7226eaaddf746eea
|
4
|
+
data.tar.gz: f0280c84efe451fc2675ee956512d836c7f327721554eb2bd045dad93d52b6a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a160f19dd7203d220f57daeeccbc6fe3d17c2fcd70d7575a0946c23a8f47df9b352a8d3904db7420908a5d54a8b2e75378f117f82b8c4a345b12ae2a6b04383
|
7
|
+
data.tar.gz: 2183b212df664cab3edd7cef511355172e322f4526ca6239cc60fa752faf162f72c16a9e65e7b63c448c3126316e9dd118e20a7c837948b94b0fc44f33a7bb02
|
@@ -119,7 +119,7 @@ module Katalyst
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def call
|
122
|
-
form_with(id
|
122
|
+
form_with(id:, url:, method: :patch, data: { controller: FORM_CONTROLLER }) do |form|
|
123
123
|
form.button(hidden: "")
|
124
124
|
end
|
125
125
|
end
|
@@ -24,8 +24,8 @@ module Katalyst
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
def cell(attribute,
|
28
|
-
with_column(@table.body_cell_component.new(@table, @record, attribute, **
|
27
|
+
def cell(attribute, **, &)
|
28
|
+
with_column(@table.body_cell_component.new(@table, @record, attribute, **), &)
|
29
29
|
end
|
30
30
|
|
31
31
|
def header?
|
@@ -24,8 +24,8 @@ module Katalyst
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
def cell(attribute,
|
28
|
-
with_column(@table.header_cell_component.new(@table, attribute, link: @link_attributes, **
|
27
|
+
def cell(attribute, **, &)
|
28
|
+
with_column(@table.header_cell_component.new(@table, attribute, link: @link_attributes, **), &)
|
29
29
|
end
|
30
30
|
|
31
31
|
def header?
|
@@ -6,17 +6,17 @@ module Katalyst
|
|
6
6
|
include Tables::TurboReplaceable
|
7
7
|
|
8
8
|
def initialize(id:, **options)
|
9
|
-
super(
|
9
|
+
super(id:, **options)
|
10
10
|
end
|
11
11
|
|
12
12
|
def id
|
13
|
-
pagy_options[:
|
13
|
+
pagy_options[:id]
|
14
14
|
end
|
15
15
|
|
16
16
|
private
|
17
17
|
|
18
18
|
def pagy_options
|
19
|
-
super.merge(
|
19
|
+
super.merge(anchor_string: "data-turbo-stream")
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -21,8 +21,8 @@ module Katalyst
|
|
21
21
|
column, direction = params[:sort]&.split
|
22
22
|
direction = "asc" unless SortForm::DIRECTIONS.include?(direction)
|
23
23
|
|
24
|
-
SortForm.new(column
|
25
|
-
direction:
|
24
|
+
SortForm.new(column:,
|
25
|
+
direction:)
|
26
26
|
.apply(collection)
|
27
27
|
end
|
28
28
|
|
@@ -4,9 +4,9 @@ module Katalyst
|
|
4
4
|
module Tables
|
5
5
|
# View Helper for generating HTML tables. Include in your ApplicationHelper, or similar.
|
6
6
|
module Frontend
|
7
|
-
def table_with(collection:, component: nil,
|
7
|
+
def table_with(collection:, component: nil, **, &)
|
8
8
|
component ||= default_table_component_class
|
9
|
-
render(component.new(collection
|
9
|
+
render(component.new(collection:, **), &)
|
10
10
|
end
|
11
11
|
|
12
12
|
private
|
@@ -16,7 +16,7 @@ module Katalyst
|
|
16
16
|
|
17
17
|
default = SortForm.parse(default).to_param if default.present?
|
18
18
|
|
19
|
-
SortForm.new(column
|
19
|
+
SortForm.new(column:, direction:, default:)
|
20
20
|
end
|
21
21
|
|
22
22
|
def initialize(column: nil, direction: nil, default: nil)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katalyst-tables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.0
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katalyst Interactive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katalyst-html-attributes
|
@@ -114,12 +114,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 3.
|
117
|
+
version: 3.2.0
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- - "
|
120
|
+
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
122
|
+
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubygems_version: 3.4.19
|
125
125
|
signing_key:
|