foobara-typescript-react-command-form-generator 0.0.12 → 0.0.13
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/src/typescript_react_command_form_generator.rb +10 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 467c16c27b86a4c0aede45050097f8cd67737b3276ff03dd3d303d760ba314ee
|
4
|
+
data.tar.gz: f886f32ce4b8ce156082fcb46a904e55357d68b487b56625845491c248f136b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2f7a25c256ef1c9a715de4f50b1b43408ad2f646a58a56453f07d943d4b52a5077cde055d916e72b06027c413cf1db1cbdcde27f049ed11ad270d107c9710d4
|
7
|
+
data.tar.gz: b6715c387a8a59b4ef8d3d3a2e943b122bdf4725af8b1909da152223fa61bb834e43a8cacddfd64ab1692573f94553c8255eb391f45bb36abf955d767271d809
|
data/CHANGELOG.md
CHANGED
@@ -35,11 +35,14 @@ module Foobara
|
|
35
35
|
def type_generators(type_declaration = inputs_type, initial = true)
|
36
36
|
return @type_generators if defined?(@type_generators)
|
37
37
|
|
38
|
-
generators = if type_declaration.
|
38
|
+
generators = if type_declaration.detached_entity?
|
39
39
|
# For now, we'll not bother with entity/model classes in the inputs.
|
40
40
|
# This simplifies things a bit re: form generation and setting UI
|
41
41
|
# inputs into the inputs value.
|
42
|
+
# TODO: test this path or delete it if unreachable!
|
43
|
+
# :nocov:
|
42
44
|
type_generators(type_declaration.to_type.primary_key_type, false)
|
45
|
+
# :nocov:
|
43
46
|
# generator_class = RemoteGenerator::Services::UnloadedEntityGenerator
|
44
47
|
# [generator_class.new(type_declaration.to_entity)]
|
45
48
|
elsif type_declaration.model?
|
@@ -107,9 +110,12 @@ module Foobara
|
|
107
110
|
type_declaration.attribute_declarations.each_pair do |attribute_name, attribute_declaration|
|
108
111
|
non_colliding_inputs(attribute_declaration, result, [*path, attribute_name])
|
109
112
|
end
|
110
|
-
elsif type_declaration.
|
113
|
+
elsif type_declaration.detached_entity?
|
111
114
|
# TODO: figure out how to not pass self here...
|
115
|
+
# TODO: test this path or delete it if unreachable!
|
116
|
+
# :nocov:
|
112
117
|
result << FlattenedAttribute.new(self, path, type_declaration.to_type.primary_key_type)
|
118
|
+
# :nocov:
|
113
119
|
elsif type_declaration.model?
|
114
120
|
non_colliding_inputs(type_declaration.to_type.attributes_type, result, path)
|
115
121
|
elsif type_declaration.array?
|
@@ -257,7 +263,8 @@ module Foobara
|
|
257
263
|
"parseFloat(e.target.value)"
|
258
264
|
# :nocov:
|
259
265
|
else
|
260
|
-
|
266
|
+
ts_type = generator.foobara_type_to_ts_type(type_declaration)
|
267
|
+
"e.target.value as #{ts_type}"
|
261
268
|
end
|
262
269
|
|
263
270
|
"<input
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-typescript-react-command-form-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
@@ -13,16 +13,16 @@ dependencies:
|
|
13
13
|
name: foobara-typescript-remote-command-generator
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - "
|
16
|
+
- - "<"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 0.0
|
18
|
+
version: 2.0.0
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
|
-
- - "
|
23
|
+
- - "<"
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: 0.0
|
25
|
+
version: 2.0.0
|
26
26
|
email:
|
27
27
|
- azimux@gmail.com
|
28
28
|
executables: []
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
|
-
rubygems_version: 3.6.
|
63
|
+
rubygems_version: 3.6.9
|
64
64
|
specification_version: 4
|
65
65
|
summary: Generates Typescript React forms for Foobara remote commands
|
66
66
|
test_files: []
|