plutonium 0.18.7 → 0.18.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3bc75122683cce879de19c0ba79d14c3f47529c9ae8184f6cc1ef5e0f7ac533
4
- data.tar.gz: 3af762cf2fd2ad8543d4bf3030ccaf5280549fc74491fc4427edf8cf258ed514
3
+ metadata.gz: db09e7efd9881620723c20ca5a7ca66da36abc10f6eaa11cdf35e0b02b2202e4
4
+ data.tar.gz: e03d61dda513fc33bf487179e55bcacfdd1964197c9eb4559ffb68ed1644b28b
5
5
  SHA512:
6
- metadata.gz: 30c19b4400f82a0480d59fce7f45c47fbc021d61c7e1d67c9649d5bc445c335a112af0b0f83080a33bbdbf2a128bce6ea4470dda1ed9150a332202535d167b4c
7
- data.tar.gz: d7aff561f705bd229113bada8b189b4000a483cc258e7f085bf4a016e7c48fd763f6e418ad06889491598ccfc449d818157634f360c064bf52a764d28fb4f3d0
6
+ metadata.gz: 8cb1f9b6bc8ad83001cd8a70ce9a56d62d47a20a88fe10c32292866075b24759c402444920f6ec0000b3f12f08e79cb66a39f305d30ebc1e3ba015e2de680643
7
+ data.tar.gz: a04dc1fd9bf280c1574a3c1c71a1da9de2a6474a514f6cc1503c214250d40d5ef2a6350205906ddbac9ee497b73beef84095662d9222f1805b7254e6560205eb
@@ -7,6 +7,8 @@ module Plutonium
7
7
  include Plutonium::UI::Component::Behaviour
8
8
 
9
9
  class Builder < Builder
10
+ include Plutonium::UI::Display::Options::InferredTypes
11
+
10
12
  def association_tag(**, &)
11
13
  create_component(Plutonium::UI::Display::Components::Association, :association, **, &)
12
14
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Plutonium
4
+ module UI
5
+ module Display
6
+ module Options
7
+ module InferredTypes
8
+ private
9
+
10
+ def infer_field_component
11
+ case inferred_field_type
12
+ when :attachment
13
+ :attachment
14
+ else
15
+ super
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -32,6 +32,7 @@ module Plutonium
32
32
  create_component(Components::Uppy, :uppy, **, &)
33
33
  end
34
34
  alias_method :file_tag, :uppy_tag
35
+ alias_method :attachment_tag, :uppy_tag
35
36
 
36
37
  def secure_association_tag(**attributes, &)
37
38
  attributes[:data_controller] = tokens(attributes[:data_controller], "slim-select") # TODO: put this behind a config
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.18.7"
2
+ VERSION = "0.18.8"
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.7
4
+ version: 0.18.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
@@ -814,6 +814,7 @@ files:
814
814
  - lib/plutonium/ui/display/components/association.rb
815
815
  - lib/plutonium/ui/display/components/attachment.rb
816
816
  - lib/plutonium/ui/display/components/markdown.rb
817
+ - lib/plutonium/ui/display/options/inferred_types.rb
817
818
  - lib/plutonium/ui/display/resource.rb
818
819
  - lib/plutonium/ui/display/theme.rb
819
820
  - lib/plutonium/ui/dyna_frame/content.rb