forest_admin_datasource_toolkit 1.0.0.pre.beta.68 → 1.0.0.pre.beta.70
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/forest_admin_datasource_toolkit/components/actions/action_field.rb +4 -2
- data/lib/forest_admin_datasource_toolkit/components/actions/action_field_factory.rb +4 -0
- data/lib/forest_admin_datasource_toolkit/components/actions/action_layout_element.rb +9 -0
- data/lib/forest_admin_datasource_toolkit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba5e890be37b6df871a6838cdc56f996a7ccd4fd7177641d899ee2b154fef5ef
|
4
|
+
data.tar.gz: cfb24313d4da3745ddb1f2bd468e109465c7b523f10b41aea11bc90ecb2522b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8deb273f997354e2e90dd734c6efbc7e19f3f19f2baaaf69d30cf58be6b94cb194d71a294cb8443efb4116944182bbd211356558123edfff56198c1394fd326f
|
7
|
+
data.tar.gz: 8a4a2a0ce2855c51ce75c8e6aba9026a561ff272373bd71405b50a880b01356d592df48a864659188ac85f305c262d8872dc7b3d318098bac308eb5e7b6abe92
|
@@ -4,11 +4,12 @@ module ForestAdminDatasourceToolkit
|
|
4
4
|
class ActionField
|
5
5
|
attr_accessor :value, :watch_changes
|
6
6
|
attr_reader :type, :label, :description, :is_required, :is_read_only, :enum_values, :collection_name, :widget,
|
7
|
-
:placeholder
|
7
|
+
:placeholder, :id
|
8
8
|
|
9
9
|
def initialize(
|
10
10
|
type:,
|
11
|
-
label
|
11
|
+
label: nil,
|
12
|
+
id: nil,
|
12
13
|
description: nil,
|
13
14
|
is_required: false,
|
14
15
|
is_read_only: false,
|
@@ -21,6 +22,7 @@ module ForestAdminDatasourceToolkit
|
|
21
22
|
)
|
22
23
|
@type = type
|
23
24
|
@label = label
|
25
|
+
@id = id
|
24
26
|
@description = description
|
25
27
|
@is_required = is_required
|
26
28
|
@is_read_only = is_read_only
|
@@ -18,6 +18,10 @@ module ForestAdminDatasourceToolkit
|
|
18
18
|
ActionLayoutElement::SeparatorElement.new(**field)
|
19
19
|
when 'HtmlBlock'
|
20
20
|
ActionLayoutElement::HtmlBlockElement.new(**field)
|
21
|
+
when 'Row'
|
22
|
+
return ActionLayoutElement::RowElement.new(**field) unless field[:fields].empty?
|
23
|
+
|
24
|
+
nil
|
21
25
|
end
|
22
26
|
end
|
23
27
|
|
@@ -43,6 +43,15 @@ module ForestAdminDatasourceToolkit
|
|
43
43
|
super(component: 'Separator', **options)
|
44
44
|
end
|
45
45
|
end
|
46
|
+
|
47
|
+
class RowElement < BaseLayoutElement
|
48
|
+
attr_accessor :fields
|
49
|
+
|
50
|
+
def initialize(fields:, **options)
|
51
|
+
super(component: 'Row', **options)
|
52
|
+
@fields = fields
|
53
|
+
end
|
54
|
+
end
|
46
55
|
end
|
47
56
|
end
|
48
57
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_admin_datasource_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.beta.
|
4
|
+
version: 1.0.0.pre.beta.70
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-09-
|
12
|
+
date: 2024-09-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|