ecoportal-api-oozes 0.6.1 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +86 -0
- data/ecoportal-api-oozes.gemspec +6 -6
- data/lib/ecoportal/api/common/content/collection_model.rb +25 -3
- data/lib/ecoportal/api/common/content/double_model.rb +27 -12
- data/lib/ecoportal/api/common/content/hash_diff_patch.rb +8 -1
- data/lib/ecoportal/api/v2.rb +27 -2
- data/lib/ecoportal/api/v2/page.rb +3 -3
- data/lib/ecoportal/api/v2/page/component.rb +11 -2
- data/lib/ecoportal/api/v2/page/component/action.rb +14 -3
- data/lib/ecoportal/api/v2/page/component/action_field.rb +40 -2
- data/lib/ecoportal/api/v2/page/component/chart_field.rb +54 -0
- data/lib/ecoportal/api/v2/page/component/chart_field/frequency.rb +29 -0
- data/lib/ecoportal/api/v2/page/component/chart_field/heatmap.rb +27 -0
- data/lib/ecoportal/api/v2/page/component/chart_field/indicator.rb +26 -0
- data/lib/ecoportal/api/v2/page/component/chart_field/multiseries.rb +31 -0
- data/lib/ecoportal/api/v2/page/component/chart_field/sankey.rb +27 -0
- data/lib/ecoportal/api/v2/page/component/chart_field/serie.rb +26 -0
- data/lib/ecoportal/api/v2/page/component/chart_field/series_config.rb +23 -0
- data/lib/ecoportal/api/v2/page/component/chart_fr_field.rb +32 -0
- data/lib/ecoportal/api/v2/page/component/checklist_field.rb +35 -2
- data/lib/ecoportal/api/v2/page/component/checklist_item.rb +10 -0
- data/lib/ecoportal/api/v2/page/component/date_field.rb +21 -0
- data/lib/ecoportal/api/v2/page/component/files_field.rb +1 -2
- data/lib/ecoportal/api/v2/page/component/gauge_field.rb +24 -1
- data/lib/ecoportal/api/v2/page/component/gauge_stop.rb +88 -0
- data/lib/ecoportal/api/v2/page/component/images_field.rb +1 -2
- data/lib/ecoportal/api/v2/page/component/people_field.rb +8 -1
- data/lib/ecoportal/api/v2/page/component/plain_text_field.rb +2 -0
- data/lib/ecoportal/api/v2/page/component/reference_field.rb +4 -0
- data/lib/ecoportal/api/v2/page/component/selection_field.rb +4 -5
- data/lib/ecoportal/api/v2/page/component/selection_option.rb +1 -0
- data/lib/ecoportal/api/v2/page/component/signature_field.rb +1 -1
- data/lib/ecoportal/api/v2/page/component/tag_field.rb +2 -0
- data/lib/ecoportal/api/v2/page/components.rb +2 -2
- data/lib/ecoportal/api/v2/page/section.rb +1 -0
- data/lib/ecoportal/api/v2/page/sections.rb +1 -1
- data/lib/ecoportal/api/v2/version.rb +1 -1
- metadata +60 -32
@@ -4,8 +4,7 @@ module Ecoportal
|
|
4
4
|
class Page
|
5
5
|
class Component
|
6
6
|
class ImagesField < Page::Component
|
7
|
-
|
8
|
-
embeds_multiple :images, klass: "Ecoportal::API::V2::Page::Image", order_key: :weight
|
7
|
+
embeds_many :images, klass: "Ecoportal::API::V2::Page::Image", order_key: :weight
|
9
8
|
end
|
10
9
|
end
|
11
10
|
end
|
@@ -4,7 +4,14 @@ module Ecoportal
|
|
4
4
|
class Page
|
5
5
|
class Component
|
6
6
|
class PeopleField < Page::Component
|
7
|
-
|
7
|
+
passthrough :is_me_button, :attach_mode
|
8
|
+
passthrough :person_schema_id
|
9
|
+
pass_reader :viewable_fields
|
10
|
+
passthrough :singular, :requires_number
|
11
|
+
passarray :people_ids
|
12
|
+
pass_reader :cached_people
|
13
|
+
passthrough :attached_people_permissions_enabled, :apply_attached_people_permissions_to
|
14
|
+
passthrough :attached_people_permissions_editable, :attached_people_permissions_flags
|
8
15
|
|
9
16
|
def add(id)
|
10
17
|
people_ids << id
|
@@ -4,6 +4,10 @@ module Ecoportal
|
|
4
4
|
class Page
|
5
5
|
class Component
|
6
6
|
class ReferenceField < Page::Component
|
7
|
+
passthrough :register_id
|
8
|
+
passthrough :hide_create, :hide_attach
|
9
|
+
passthrough :hide_metadata, :hide_dashboards
|
10
|
+
passthrough :display_fields, :display_fields_in_lookup
|
7
11
|
end
|
8
12
|
end
|
9
13
|
end
|
@@ -4,10 +4,10 @@ module Ecoportal
|
|
4
4
|
class Page
|
5
5
|
class Component
|
6
6
|
class SelectionField < Page::Component
|
7
|
-
passthrough :multiple, :
|
7
|
+
passthrough :multiple, :flat
|
8
|
+
passthrough :other, :other_desc
|
8
9
|
|
9
|
-
|
10
|
-
embeds_multiple :options, klass: "Ecoportal::API::V2::Page::Component::SelectionOption", order_key: :weight
|
10
|
+
embeds_many :options, klass: "Ecoportal::API::V2::Page::Component::SelectionOption", order_key: :weight
|
11
11
|
|
12
12
|
def select(value)
|
13
13
|
opt = options.find {|opt| opt.value == value}
|
@@ -33,9 +33,8 @@ module Ecoportal
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
# a server bug prevents to add new options to an existing field
|
37
36
|
def add_option(name:, value:, pos: NOT_USED, before: NOT_USED, after: NOT_USED)
|
38
|
-
opt_doc =
|
37
|
+
opt_doc = options.items_class.new_doc
|
39
38
|
options.upsert!(opt_doc, pos: pos, before: before, after: after) do |option|
|
40
39
|
option.name = name
|
41
40
|
option.value = value
|
@@ -21,14 +21,14 @@ module Ecoportal
|
|
21
21
|
|
22
22
|
def get_by_name(name, type: nil)
|
23
23
|
pool = type ? get_by_type(type) : self
|
24
|
-
|
24
|
+
|
25
25
|
pool.select do |comp|
|
26
26
|
comp.label.to_s.strip.downcase == name.to_s.strip.downcase
|
27
27
|
end.first
|
28
28
|
end
|
29
29
|
|
30
30
|
def add(label:, type:)
|
31
|
-
fld_doc =
|
31
|
+
fld_doc = component_class.new_doc(type: type)
|
32
32
|
upsert!(fld_doc) do |fld|
|
33
33
|
fld.label = label
|
34
34
|
yield(fld) if block_given?
|
@@ -8,7 +8,7 @@ module Ecoportal
|
|
8
8
|
self.klass = :section_class
|
9
9
|
|
10
10
|
def add(name: nil, split: false, pos: NOT_USED, before: NOT_USED, after: NOT_USED)
|
11
|
-
sec_doc =
|
11
|
+
sec_doc = section_class.new_doc(split: split)
|
12
12
|
upsert!(sec_doc, pos: pos, before: before, after: after) do |section|
|
13
13
|
section.heading = name
|
14
14
|
if prev = previous_section(section)
|
metadata
CHANGED
@@ -1,77 +1,95 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecoportal-api-oozes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oscar Segura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.1.3
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
22
|
+
version: '2.2'
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
29
|
+
version: 2.1.3
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.2'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
34
|
+
name: rspec
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3.9'
|
40
|
+
- - "<"
|
32
41
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
42
|
+
version: '4'
|
34
43
|
type: :development
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.9'
|
50
|
+
- - "<"
|
39
51
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
52
|
+
version: '4'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
54
|
+
name: rake
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
44
56
|
requirements:
|
45
|
-
- - "
|
57
|
+
- - ">="
|
46
58
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
59
|
+
version: 12.3.0
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '13'
|
48
63
|
type: :development
|
49
64
|
prerelease: false
|
50
65
|
version_requirements: !ruby/object:Gem::Requirement
|
51
66
|
requirements:
|
52
|
-
- - "
|
67
|
+
- - ">="
|
53
68
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
69
|
+
version: 12.3.0
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '13'
|
55
73
|
- !ruby/object:Gem::Dependency
|
56
74
|
name: yard
|
57
75
|
requirement: !ruby/object:Gem::Requirement
|
58
76
|
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.9'
|
62
77
|
- - ">="
|
63
78
|
- !ruby/object:Gem::Version
|
64
79
|
version: 0.9.18
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.10'
|
65
83
|
type: :development
|
66
84
|
prerelease: false
|
67
85
|
version_requirements: !ruby/object:Gem::Requirement
|
68
86
|
requirements:
|
69
|
-
- - "~>"
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: '0.9'
|
72
87
|
- - ">="
|
73
88
|
- !ruby/object:Gem::Version
|
74
89
|
version: 0.9.18
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0.10'
|
75
93
|
- !ruby/object:Gem::Dependency
|
76
94
|
name: redcarpet
|
77
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,9 +97,9 @@ dependencies:
|
|
79
97
|
- - ">="
|
80
98
|
- !ruby/object:Gem::Version
|
81
99
|
version: 3.5.0
|
82
|
-
- - "
|
100
|
+
- - "<"
|
83
101
|
- !ruby/object:Gem::Version
|
84
|
-
version: '3.
|
102
|
+
version: '3.6'
|
85
103
|
type: :development
|
86
104
|
prerelease: false
|
87
105
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -89,9 +107,9 @@ dependencies:
|
|
89
107
|
- - ">="
|
90
108
|
- !ruby/object:Gem::Version
|
91
109
|
version: 3.5.0
|
92
|
-
- - "
|
110
|
+
- - "<"
|
93
111
|
- !ruby/object:Gem::Version
|
94
|
-
version: '3.
|
112
|
+
version: '3.6'
|
95
113
|
- !ruby/object:Gem::Dependency
|
96
114
|
name: pry
|
97
115
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,20 +130,20 @@ dependencies:
|
|
112
130
|
requirements:
|
113
131
|
- - ">="
|
114
132
|
- !ruby/object:Gem::Version
|
115
|
-
version: 0.
|
116
|
-
- - "
|
133
|
+
version: 0.7.4
|
134
|
+
- - "<"
|
117
135
|
- !ruby/object:Gem::Version
|
118
|
-
version: '0.
|
136
|
+
version: '0.8'
|
119
137
|
type: :runtime
|
120
138
|
prerelease: false
|
121
139
|
version_requirements: !ruby/object:Gem::Requirement
|
122
140
|
requirements:
|
123
141
|
- - ">="
|
124
142
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.
|
126
|
-
- - "
|
143
|
+
version: 0.7.4
|
144
|
+
- - "<"
|
127
145
|
- !ruby/object:Gem::Version
|
128
|
-
version: '0.
|
146
|
+
version: '0.8'
|
129
147
|
description:
|
130
148
|
email:
|
131
149
|
- rien@ecoportal.co.nz
|
@@ -165,12 +183,22 @@ files:
|
|
165
183
|
- lib/ecoportal/api/v2/page/component.rb
|
166
184
|
- lib/ecoportal/api/v2/page/component/action.rb
|
167
185
|
- lib/ecoportal/api/v2/page/component/action_field.rb
|
186
|
+
- lib/ecoportal/api/v2/page/component/chart_field.rb
|
187
|
+
- lib/ecoportal/api/v2/page/component/chart_field/frequency.rb
|
188
|
+
- lib/ecoportal/api/v2/page/component/chart_field/heatmap.rb
|
189
|
+
- lib/ecoportal/api/v2/page/component/chart_field/indicator.rb
|
190
|
+
- lib/ecoportal/api/v2/page/component/chart_field/multiseries.rb
|
191
|
+
- lib/ecoportal/api/v2/page/component/chart_field/sankey.rb
|
192
|
+
- lib/ecoportal/api/v2/page/component/chart_field/serie.rb
|
193
|
+
- lib/ecoportal/api/v2/page/component/chart_field/series_config.rb
|
194
|
+
- lib/ecoportal/api/v2/page/component/chart_fr_field.rb
|
168
195
|
- lib/ecoportal/api/v2/page/component/checklist_field.rb
|
169
196
|
- lib/ecoportal/api/v2/page/component/checklist_item.rb
|
170
197
|
- lib/ecoportal/api/v2/page/component/date_field.rb
|
171
198
|
- lib/ecoportal/api/v2/page/component/file.rb
|
172
199
|
- lib/ecoportal/api/v2/page/component/files_field.rb
|
173
200
|
- lib/ecoportal/api/v2/page/component/gauge_field.rb
|
201
|
+
- lib/ecoportal/api/v2/page/component/gauge_stop.rb
|
174
202
|
- lib/ecoportal/api/v2/page/component/geo_field.rb
|
175
203
|
- lib/ecoportal/api/v2/page/component/image.rb
|
176
204
|
- lib/ecoportal/api/v2/page/component/images_field.rb
|