katalyst-tables 3.3.2 → 3.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/katalyst/tables/query/input_component.html.erb +1 -0
- data/app/components/katalyst/tables/query/input_component.rb +4 -0
- data/app/models/concerns/katalyst/tables/collection/query.rb +3 -3
- data/config/locales/tables.en.yml +2 -0
- data/{app/models → lib}/katalyst/tables/collection/type/helpers/delegate.rb +2 -0
- data/{app/models → lib}/katalyst/tables/collection/type/value.rb +2 -0
- data/{app/models → lib}/katalyst/tables/collection/type.rb +16 -0
- data/lib/katalyst/tables/collection.rb +11 -0
- data/lib/katalyst/tables.rb +6 -0
- metadata +17 -16
- /data/{app/models → lib}/katalyst/tables/collection/type/boolean.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/date.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/enum.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/float.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/helpers/extensions.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/helpers/multiple.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/helpers/range.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/integer.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/query.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/search.rb +0 -0
- /data/{app/models → lib}/katalyst/tables/collection/type/string.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d7d6dcd92a6643324d8dbc5cf4c94981dc44d4a1a9735cc9ea3fc3af7527ef3
|
4
|
+
data.tar.gz: 85a3f731c82146be98b237e3bfe79c8ee412629cf4115928b04ed8e701306be5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70b38e57a58ffb9d4bc1ba4d5044edd9624e90261e576b95a854aba4622fb9ed2e1b1b184643d244cfdb6647bb9509aa7e6402dd06a149bc32b6ad6ddc623883
|
7
|
+
data.tar.gz: c6d0d0810eaaf9b742789008375979f793953c979f0a8a1fbb436b84d06958cb0b24b9aecccb0070b5158f899858de252c63f5aeb72b97ffe038387cf04146af
|
@@ -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
|
@@ -30,9 +30,9 @@ module Katalyst
|
|
30
30
|
|
31
31
|
def examples_for(key)
|
32
32
|
key = key.to_s
|
33
|
-
|
34
|
-
if respond_to?(
|
35
|
-
public_send(
|
33
|
+
examples_method = "#{key.parameterize.underscore}_examples"
|
34
|
+
if respond_to?(examples_method)
|
35
|
+
public_send(examples_method)
|
36
36
|
elsif @attributes.key?(key)
|
37
37
|
@attributes[key].type.examples_for(unscoped_items, @attributes[key])
|
38
38
|
end
|
@@ -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
|
data/lib/katalyst/tables.rb
CHANGED
@@ -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.
|
4
|
+
version: 3.3.4
|
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-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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|