satis 1.0.68 → 1.0.70

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: a777d25ac010446a7e69a55f9d0468ce45a462e7d69df395673f3e1d7ad40e84
4
- data.tar.gz: 1857b13676a3952e4afcc709df9eacfbea2d97c475837676ba9a4141ede7c2da
3
+ metadata.gz: 03c106e3c85f9b929d8857c93d5b3453f306f0c9557d1cc084dd763dd2bd849b
4
+ data.tar.gz: e0e8799e598ac7e0f8825a88194125df5ff140c425c751438f7971f1bb7857d9
5
5
  SHA512:
6
- metadata.gz: 8b739ca26a38df0d714339b0c09ad14ed5c25b0a352fd4a0a8a6a8c26292e314da3388d81f0a63d92a39c7808d4d2c9a2c20837579fcd2256b50aec4ad8f41ea
7
- data.tar.gz: 98ec19c8bfb70f0ce66875b9ad15a2ca3233e1b576971a5cce7c4bd7f7eb1ddff9dedf14a3d7b93ca92ff85f1441f1dec6e995f5889e69be022da1063658ec87
6
+ metadata.gz: 73c6b212d40768e612fba5f20870fc99fdb0c544095d8aee622ae76ea0addb833ce361404e2be1c2bd74e288afd50ca8f1f9318cb0ce3bef992c90c7004975e3
7
+ data.tar.gz: '08a42c0b640f4f6fe1223d7e1ec046b91ae0cdae1fcf98146efbf6e82b0e180e011c0962d617ace24162cd46225a671ab06e955e6eb062eb47092a3b7eb5480d'
@@ -4,4 +4,4 @@
4
4
  dd.text-sm.text-gray-900.dark:text-gray-300
5
5
  - if options[:icon]
6
6
  i.mr-1 class=options[:icon]
7
- = content || options[:content] || @placeholder
7
+ = content || string_contents
@@ -14,6 +14,28 @@ module Satis
14
14
  @icon = options[:icon]
15
15
  @placeholder = options[:placeholder] || '—'
16
16
  end
17
+
18
+ def string_contents
19
+ @content = options[:content]
20
+ @content = @content.call if @content.respond_to?(:call)
21
+
22
+ case @content.presence
23
+ when Time
24
+ @content.strftime('%Y-%m-%d %H:%M')
25
+ when ActiveRecord::Base
26
+ @content.try(:human_name) || @content.try(:name) || "#{@content.class} ##{@content.id}"
27
+ when Symbol
28
+ @content.to_s.humanize
29
+ when ActiveSupport::SafeBuffer
30
+ @content
31
+ when String
32
+ @content.humanize
33
+ when nil
34
+ @placeholder
35
+ else
36
+ @content
37
+ end
38
+ end
17
39
  end
18
40
  end
19
41
  end
@@ -13,11 +13,11 @@
13
13
  = yield(nested_form)
14
14
  .col-span-1.flex.justify-center.items-center.association
15
15
  .h-full.w-1.border-r.border-dashed
16
- a.text-primary-600.bg-white.dark:bg-gray-800 href="#" data-action='click->satis-fields-for#addAssociation' style="margin-left: -7px;"
16
+ a.text-primary-600.nested-fields_action href="#" data-action='click->satis-fields-for#addAssociation'
17
17
  i.fal.fa-plus
18
18
  .hidden.col-span-1.flex.justify-center.items-center.association
19
19
  .h-full.w-1.border-r.border-dashed
20
- a.text-primary-600.bg-white.dark:bg-gray-800 href="#" data-action='click->satis-fields-for#removeAssociation' style="margin-left: -7px;"
20
+ a.text-primary-600.nested-fields_action href="#" data-action='click->satis-fields-for#removeAssociation'
21
21
  i.fal.fa-trash
22
22
 
23
23
  = form.rails_fields_for collection do |nested_form|
@@ -29,7 +29,7 @@
29
29
  = yield(nested_form)
30
30
  .col-span-1.flex.justify-center.items-center
31
31
  .h-full.w-1.border-r.border-dashed
32
- a.text-primary-600.bg-white.dark:bg-gray-800 href="#" data-action='click->satis-fields-for#removeAssociation' style="margin-left: -7px;"
32
+ a.text-primary-600.nested-fields_action href="#" data-action='click->satis-fields-for#removeAssociation'
33
33
  i.fal.fa-trash
34
34
 
35
35
  span data-satis-fields-for-target='insertionPoint'
data/lib/satis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Satis
2
- VERSION = "1.0.68"
2
+ VERSION = "1.0.70"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: satis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.68
4
+ version: 1.0.70
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-22 00:00:00.000000000 Z
11
+ date: 2023-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: strong_migrations
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.4'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.4'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: auxilium
71
85
  requirement: !ruby/object:Gem::Requirement