forest_admin_agent 1.0.0.pre.beta.69 → 1.0.0.pre.beta.71

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: 8465236a364793fe23ce244c6b8a26aabc7e844818cc950fb2c9ceb298a844ad
4
- data.tar.gz: d2000c5a2ef8e4ce1baa624b8b2c9d874c98b3058a7654ad8bbe968031cfb2b0
3
+ metadata.gz: 9ea6f67ffc5dc116dac48722300bd5fa6a0c40ca82b5f8af91d6efa657bb803a
4
+ data.tar.gz: 6985f9c28c16899cb14da10ce069e757eb62020d0eba7a657c27594e96eb01e2
5
5
  SHA512:
6
- metadata.gz: a716f5f168cf68784799a371836caec5854980b202bbb31e6bd76f912ef1a0e5d665af4ef7ffcbc65561559a9410bb4965e5e5d0d40ff54d3b768a8877469790
7
- data.tar.gz: ea1b44c785131d1b6075b1b6cb05c164515c39d5afeb6d2aa043b9df3ac54414f916a7ccc649fb8e324c8004a82d3f2ef765c5c22f4614380c20d99faa137968
6
+ metadata.gz: 9f2a571ab36bb1d331b8f2f783086e2089b2bdc2bd009208ad06aec5e520e6ad8227074c5eb4a2026148fa9f5687c8e9d20767ddb7782ce2d2c6bb98b0a5102a
7
+ data.tar.gz: 7aa16376f63c8ce874b8426cd2842a02300f71a75545db9b26e034d5acb93ed26b44a8485da976df4ea461d369e0b0f05d2a80f3618eadc4da1dbc26943ccfdd
@@ -58,7 +58,7 @@ module ForestAdminAgent
58
58
  def self.make_form_data(datasource, raw_data, fields)
59
59
  data = {}
60
60
  raw_data.each do |key, value|
61
- field = fields.find { |f| f.label == key }
61
+ field = fields.find { |f| f.id == key }
62
62
  # Skip fields from the default form
63
63
  next if Schema::GeneratorAction::DEFAULT_FIELDS.map { |f| f[:field] }.include?(key)
64
64
 
@@ -7,6 +7,7 @@ module ForestAdminAgent
7
7
  DEFAULT_FIELDS = [
8
8
  {
9
9
  field: 'Loading...',
10
+ label: 'Loading...',
10
11
  type: 'String',
11
12
  isReadOnly: true,
12
13
  defaultValue: 'Form is loading',
@@ -41,6 +42,8 @@ module ForestAdminAgent
41
42
  schema = {
42
43
  id: "#{collection.name}-#{action_index}-#{slug}",
43
44
  name: name,
45
+ submitButtonLabel: action.submit_button_label,
46
+ description: action.description,
44
47
  type: action.scope.downcase,
45
48
  baseUrl: nil,
46
49
  endpoint: "/forest/_actions/#{collection.name}/#{action_index}/#{slug}",
@@ -79,7 +82,8 @@ module ForestAdminAgent
79
82
  description: field.description,
80
83
  isRequired: field.is_required,
81
84
  isReadOnly: field.is_read_only,
82
- field: field.label,
85
+ field: field.id,
86
+ label: field.label,
83
87
  value: ForestValueConverter.value_to_forest(field),
84
88
  widgetEdit: GeneratorActionFieldWidget.build_widget_options(field)
85
89
  }
@@ -146,7 +150,7 @@ module ForestAdminAgent
146
150
  else
147
151
  fields << element
148
152
  # frontend rule
149
- layout << Actions::ActionLayoutElement::InputElement.new(component: 'Input', field_id: element.label)
153
+ layout << Actions::ActionLayoutElement::InputElement.new(component: 'Input', field_id: element.id)
150
154
  end
151
155
  end
152
156
 
@@ -7,7 +7,7 @@ module ForestAdminAgent
7
7
  class SchemaEmitter
8
8
  LIANA_NAME = "agent-ruby"
9
9
 
10
- LIANA_VERSION = "1.0.0-beta.69"
10
+ LIANA_VERSION = "1.0.0-beta.71"
11
11
 
12
12
  def self.get_serialized_schema(datasource)
13
13
  schema_path = Facades::Container.cache(:schema_path)
@@ -1,3 +1,3 @@
1
1
  module ForestAdminAgent
2
- VERSION = "1.0.0-beta.69"
2
+ VERSION = "1.0.0-beta.71"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.69
4
+ version: 1.0.0.pre.beta.71
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-25 00:00:00.000000000 Z
12
+ date: 2024-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport