katalyst-tables 2.6.0.beta → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10815e05f743cbe5d5c21845bf15e94318b2f0302c5466f55dc8094a34330fc9
4
- data.tar.gz: 0ded18dae608cee47f68ac143e55a63a58c7c36b5c2bfeb10add6ebd67771f32
3
+ metadata.gz: 6b0dbb74e9e136164208e3154bbf3b6eef1b237f0713da1f7226eaaddf746eea
4
+ data.tar.gz: f0280c84efe451fc2675ee956512d836c7f327721554eb2bd045dad93d52b6a3
5
5
  SHA512:
6
- metadata.gz: 4dc10673cee47c520e1b15f564f5ea532510d54923b97e13c5e49559fe2c474cb962b8955102182b2874889127012d74794efa99a9494aec1fedc0532ddea02a
7
- data.tar.gz: 2f65c7295d432fb3ada59eeb6d0c1dbc50aee134613ae922b583e738a5c7adc3fa83e1f3edc8833b96ae6642e6c88d0b492039cc0f30a72178997be211604d7f
6
+ metadata.gz: 3a160f19dd7203d220f57daeeccbc6fe3d17c2fcd70d7575a0946c23a8f47df9b352a8d3904db7420908a5d54a8b2e75378f117f82b8c4a345b12ae2a6b04383
7
+ data.tar.gz: 2183b212df664cab3edd7cef511355172e322f4526ca6239cc60fa752faf162f72c16a9e65e7b63c448c3126316e9dd118e20a7c837948b94b0fc44f33a7bb02
@@ -33,7 +33,7 @@ module Katalyst
33
33
 
34
34
  def row_renderer
35
35
  @row_renderer ||= RowRenderer.new(@lookup_context,
36
- collection: collection,
36
+ collection:,
37
37
  as: @as,
38
38
  partial: @partial,
39
39
  variants: [:row],
@@ -119,7 +119,7 @@ module Katalyst
119
119
  end
120
120
 
121
121
  def call
122
- form_with(id: id, url: url, method: :patch, data: { controller: FORM_CONTROLLER }) do |form|
122
+ form_with(id:, url:, method: :patch, data: { controller: FORM_CONTROLLER }) do |form|
123
123
  form.button(hidden: "")
124
124
  end
125
125
  end
@@ -73,7 +73,7 @@ module Katalyst
73
73
  def selection
74
74
  id = @record.public_send(@table.selection.primary_key)
75
75
  params = {
76
- id: id,
76
+ id:,
77
77
  }
78
78
  cell(:_selection,
79
79
  class: "selection",
@@ -24,8 +24,8 @@ module Katalyst
24
24
  end
25
25
  end
26
26
 
27
- def cell(attribute, **options, &block)
28
- with_column(@table.body_cell_component.new(@table, @record, attribute, **options), &block)
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, **options, &block)
28
- with_column(@table.header_cell_component.new(@table, attribute, link: @link_attributes, **options), &block)
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?
@@ -1,5 +1,5 @@
1
1
  <%= form_with(method: :patch,
2
- id: id,
2
+ id:,
3
3
  class: "tables--selection--form",
4
4
  data: { controller: form_controller },
5
5
  html: { hidden: "" }) do |form| %>
@@ -6,17 +6,17 @@ module Katalyst
6
6
  include Tables::TurboReplaceable
7
7
 
8
8
  def initialize(id:, **options)
9
- super(pagy_id: id, **options)
9
+ super(id:, **options)
10
10
  end
11
11
 
12
12
  def id
13
- pagy_options[:pagy_id]
13
+ pagy_options[:id]
14
14
  end
15
15
 
16
16
  private
17
17
 
18
18
  def pagy_options
19
- super.merge(link_extra: "data-turbo-stream")
19
+ super.merge(anchor_string: "data-turbo-stream")
20
20
  end
21
21
  end
22
22
  end
@@ -18,7 +18,7 @@ module Katalyst
18
18
 
19
19
  @id = id
20
20
 
21
- super(collection: collection, header: header, id: id, **options)
21
+ super(collection:, header:, id:, **options)
22
22
  end
23
23
 
24
24
  private
@@ -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: column,
25
- direction: 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, **options, &block)
7
+ def table_with(collection:, component: nil, **, &)
8
8
  component ||= default_table_component_class
9
- render(component.new(collection: collection, **options), &block)
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: column, direction: direction, default: default)
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.beta
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-02-05 00:00:00.000000000 Z
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.0.0
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: 1.3.1
122
+ version: '0'
123
123
  requirements: []
124
124
  rubygems_version: 3.4.19
125
125
  signing_key: