katalyst-tables 3.3.2 → 3.3.3

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: 15f5912b36b82347b774b75d9339a7f41cff2c6d9973c51e8f5142fd829b7814
4
- data.tar.gz: da4fadb4364f0c2bf2d19a75a992ef7d00d912ca5c27d2d851fb96c32eaa7fbc
3
+ metadata.gz: d65cbfb413fd7b0af947d48bad9dc622e1c83f7a659ba4cda14ed993c9aecb7d
4
+ data.tar.gz: 280f74a21d9e14bc418b83274f338b5dc568117df255043336c18cfccea3e4d1
5
5
  SHA512:
6
- metadata.gz: 74661bd722d18e4fdac80a0979a2516b500b6ad4402d03a396ce53b3b6cee2edb5c2ad9aa70086969033189a3a4622cb4ddd907269670228fc1e2838d5973189
7
- data.tar.gz: 0262fadd6c9840db3a91575bb0ebfed71891abb00ecfcc6a73e0a87a8c666f7da85a5e60f26dc424f2e9388097812546b5900245d3f63377c524489b19272c5a
6
+ metadata.gz: 2c3500672cee22ac792eeb2f93eb3107fc94ce7f20320ced58f70a99de7f7e5a66543847615ac379a5004740ade01c553c60ef810ca8c7f854998beedb22219c
7
+ data.tar.gz: f73225573194edcab9e26a2517d6752dfdb7852c0e3284a82cd2c6fd5f47f47aeb185bece9a5f46b3c1191a0b3dfd203165b3eb68a9738e506b836afb342d280
@@ -3,6 +3,7 @@
3
3
  <%= form.text_field(
4
4
  name,
5
5
  type: :search,
6
+ placeholder:,
6
7
  autocomplete: "off",
7
8
  **html_attributes,
8
9
  ) %>
@@ -37,6 +37,10 @@ module Katalyst
37
37
 
38
38
  private
39
39
 
40
+ def placeholder
41
+ t("katalyst.tables.query.placeholder", name: collection.model_name.human.pluralize.downcase)
42
+ end
43
+
40
44
  def query_attribute
41
45
  collection.class.attribute_types.detect { |_, a| a.type == :query }&.first
42
46
  end
@@ -1,6 +1,8 @@
1
1
  en:
2
2
  katalyst:
3
3
  tables:
4
+ query:
5
+ placeholder: "Filter %{name}"
4
6
  orderable:
5
7
  value:
6
8
  "⠿"
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "katalyst/tables/collection/type/helpers/extensions"
4
+
3
5
  module Katalyst
4
6
  module Tables
5
7
  module Collection
@@ -2,6 +2,22 @@
2
2
 
3
3
  require "active_model/type"
4
4
 
5
+ require "katalyst/tables/collection/type/helpers/delegate"
6
+ require "katalyst/tables/collection/type/helpers/extensions"
7
+ require "katalyst/tables/collection/type/helpers/multiple"
8
+ require "katalyst/tables/collection/type/helpers/range"
9
+
10
+ require "katalyst/tables/collection/type/value"
11
+
12
+ require "katalyst/tables/collection/type/boolean"
13
+ require "katalyst/tables/collection/type/date"
14
+ require "katalyst/tables/collection/type/enum"
15
+ require "katalyst/tables/collection/type/float"
16
+ require "katalyst/tables/collection/type/integer"
17
+ require "katalyst/tables/collection/type/query"
18
+ require "katalyst/tables/collection/type/search"
19
+ require "katalyst/tables/collection/type/string"
20
+
5
21
  module Katalyst
6
22
  module Tables
7
23
  module Collection
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Katalyst
4
+ module Tables
5
+ module Collection
6
+ extend ActiveSupport::Autoload
7
+
8
+ autoload :Type
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "active_support"
4
+ require "active_support/rails"
3
5
  require "view_component"
4
6
  require "katalyst/html_attributes"
5
7
 
@@ -8,6 +10,10 @@ require_relative "tables/engine"
8
10
 
9
11
  module Katalyst
10
12
  module Tables
13
+ extend ActiveSupport::Autoload
14
+
15
+ autoload :Collection
16
+
11
17
  class Error < StandardError; end
12
18
 
13
19
  def self.config
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: 3.3.2
4
+ version: 3.3.3
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-06-28 00:00:00.000000000 Z
11
+ date: 2024-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katalyst-html-attributes
@@ -135,23 +135,24 @@ files:
135
135
  - app/models/katalyst/tables/collection/array.rb
136
136
  - app/models/katalyst/tables/collection/base.rb
137
137
  - app/models/katalyst/tables/collection/filter.rb
138
- - app/models/katalyst/tables/collection/type.rb
139
- - app/models/katalyst/tables/collection/type/boolean.rb
140
- - app/models/katalyst/tables/collection/type/date.rb
141
- - app/models/katalyst/tables/collection/type/enum.rb
142
- - app/models/katalyst/tables/collection/type/float.rb
143
- - app/models/katalyst/tables/collection/type/helpers/delegate.rb
144
- - app/models/katalyst/tables/collection/type/helpers/extensions.rb
145
- - app/models/katalyst/tables/collection/type/helpers/multiple.rb
146
- - app/models/katalyst/tables/collection/type/helpers/range.rb
147
- - app/models/katalyst/tables/collection/type/integer.rb
148
- - app/models/katalyst/tables/collection/type/query.rb
149
- - app/models/katalyst/tables/collection/type/search.rb
150
- - app/models/katalyst/tables/collection/type/string.rb
151
- - app/models/katalyst/tables/collection/type/value.rb
152
138
  - config/importmap.rb
153
139
  - config/locales/tables.en.yml
154
140
  - lib/katalyst/tables.rb
141
+ - lib/katalyst/tables/collection.rb
142
+ - lib/katalyst/tables/collection/type.rb
143
+ - lib/katalyst/tables/collection/type/boolean.rb
144
+ - lib/katalyst/tables/collection/type/date.rb
145
+ - lib/katalyst/tables/collection/type/enum.rb
146
+ - lib/katalyst/tables/collection/type/float.rb
147
+ - lib/katalyst/tables/collection/type/helpers/delegate.rb
148
+ - lib/katalyst/tables/collection/type/helpers/extensions.rb
149
+ - lib/katalyst/tables/collection/type/helpers/multiple.rb
150
+ - lib/katalyst/tables/collection/type/helpers/range.rb
151
+ - lib/katalyst/tables/collection/type/integer.rb
152
+ - lib/katalyst/tables/collection/type/query.rb
153
+ - lib/katalyst/tables/collection/type/search.rb
154
+ - lib/katalyst/tables/collection/type/string.rb
155
+ - lib/katalyst/tables/collection/type/value.rb
155
156
  - lib/katalyst/tables/config.rb
156
157
  - lib/katalyst/tables/engine.rb
157
158
  homepage: https://github.com/katalyst/tables