plutonium 0.19.5 → 0.19.7

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: b27651d25eebb89d108051b5f2afb8f1703587eb91c84207cc4ec0862b4d45c2
4
- data.tar.gz: 44e3394e35c5f2fe1c811a29697fc7e59e7224e296a8d2fdb707c33098a85eca
3
+ metadata.gz: 3df0f828455b7b089d1b37ded391dce4f0a6a686ffece56ed924d58a06c1186c
4
+ data.tar.gz: 4920459f99392f14f070d51d30261c1e7066d8edba8a4c8f9220b5f5ff74c08a
5
5
  SHA512:
6
- metadata.gz: c9ad4898ae89e4e0095a802357a2f4323c3025bc0bc7f2fb9543829ee23923f08ae632e764df357d3ce29a23a53a151a6399f2c7fd2c6d90b01ce21f3c5d7b3c
7
- data.tar.gz: 06b6ecf29c1e65831a5f40dcc8d32a6110aa02e24ddadc053bc40e88cebd0230738854d11e40e5e29b770df0fe6f4b8b39d684d732b497f3503f41401cd5ee1a
6
+ metadata.gz: 5aac0589c1a66546d09e4e86730710f18f0466701a9baa7574df3e34c4c84e9403bbed71db3eb81034f903a2be7994ad96f541d5843671a4d6aed07b67ab7f63
7
+ data.tar.gz: 92b2e0dc58a7a075149069227f7fa9cdc32a8ab0136ccaa61f00480d6793ea8b64304a26d27b51c18db2df8ea86e1c6a7d5ea0fbe0cf5d8a1476443fb7cab6ab
@@ -16,7 +16,7 @@ module Plutonium
16
16
 
17
17
  def slim_select_tag(**attributes, &)
18
18
  attributes[:data_controller] = tokens(attributes[:data_controller], "slim-select")
19
- select_tag(**attributes, class!: "", &)
19
+ select_tag(**attributes, required: false, class!: "", &)
20
20
  end
21
21
 
22
22
  def flatpickr_tag(**, &)
@@ -53,11 +53,16 @@ module Plutonium
53
53
 
54
54
  field_options = resource_definition.defined_fields[name] ? resource_definition.defined_fields[name][:options].dup : {}
55
55
 
56
+ display_definition = resource_definition.defined_displays[name] || {}
57
+ display_options = display_definition[:options] || {}
58
+
56
59
  column_definition = resource_definition.defined_columns[name] || {}
57
60
  column_options = column_definition[:options] || {}
58
61
 
59
- tag = column_options[:as] || field_options[:as]
60
- tag_attributes = column_options.except(:wrapper, :as, :align)
62
+ tag = column_options[:as] || display_definition[:as] || field_options[:as]
63
+ display_tag_attributes = display_options.except(:wrapper, :as)
64
+ column_tag_attributes = column_options.except(:wrapper, :as, :align)
65
+ tag_attributes = display_tag_attributes.merge(column_tag_attributes)
61
66
  tag_block = column_definition[:block] || ->(wrapped_object, key) {
62
67
  f = wrapped_object.field(key)
63
68
  tag ||= f.inferred_field_component
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.19.5"
2
+ VERSION = "0.19.7"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.5
4
+ version: 0.19.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-24 00:00:00.000000000 Z
11
+ date: 2025-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk