ecoportal-api-v2 1.1.8 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.markdownlint.json +4 -0
  3. data/.rubocop.yml +1 -1
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +501 -374
  6. data/ecoportal-api-v2.gemspec +13 -12
  7. data/lib/ecoportal/api/common/concerns/benchmarkable.rb +47 -34
  8. data/lib/ecoportal/api/common/concerns/threadable.rb +41 -0
  9. data/lib/ecoportal/api/common/concerns.rb +1 -0
  10. data/lib/ecoportal/api/common/content/array_model.rb +6 -3
  11. data/lib/ecoportal/api/common/content/class_helpers.rb +12 -8
  12. data/lib/ecoportal/api/common/content/collection_model.rb +7 -7
  13. data/lib/ecoportal/api/common/content/wrapped_response.rb +11 -11
  14. data/lib/ecoportal/api/v2/page/component/reference_field.rb +17 -13
  15. data/lib/ecoportal/api/v2/page/component.rb +7 -4
  16. data/lib/ecoportal/api/v2/page/force.rb +1 -1
  17. data/lib/ecoportal/api/v2/page/stages.rb +5 -6
  18. data/lib/ecoportal/api/v2/page.rb +26 -22
  19. data/lib/ecoportal/api/v2/pages/page_stage/task.rb +63 -0
  20. data/lib/ecoportal/api/v2/pages/page_stage/tasks.rb +69 -0
  21. data/lib/ecoportal/api/v2/pages/page_stage.rb +30 -22
  22. data/lib/ecoportal/api/v2/pages/stages.rb +3 -4
  23. data/lib/ecoportal/api/v2/pages.rb +24 -14
  24. data/lib/ecoportal/api/v2/people.rb +2 -3
  25. data/lib/ecoportal/api/v2/registers.rb +28 -13
  26. data/lib/ecoportal/api/v2/s3/data.rb +27 -0
  27. data/lib/ecoportal/api/v2/s3/files/batch_upload.rb +110 -0
  28. data/lib/ecoportal/api/v2/s3/files/poll.rb +82 -0
  29. data/lib/ecoportal/api/v2/s3/files/poll_status.rb +52 -0
  30. data/lib/ecoportal/api/v2/s3/files.rb +132 -0
  31. data/lib/ecoportal/api/v2/s3/upload.rb +154 -0
  32. data/lib/ecoportal/api/v2/s3.rb +66 -0
  33. data/lib/ecoportal/api/v2.rb +10 -3
  34. data/lib/ecoportal/api/v2_version.rb +1 -1
  35. metadata +55 -54
data/CHANGELOG.md CHANGED
@@ -1,694 +1,821 @@
1
1
  # Change Log
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
5
+ ## [2.0.6] - 2024-08-xx
6
+
7
+ ### Added
8
+
9
+ ### Changed
10
+
11
+ ### Fixed
12
+
13
+ ## [2.0.5] - 2024-08-07
14
+
15
+ ### Fixed
16
+
17
+ - Use correct endpoint to update page-stages
18
+
19
+ ## [2.0.4] - 2024-08-07
20
+
21
+ ### Added
22
+
23
+ - Ability to `submit!` and `sign_off!`
24
+
25
+ ## [2.0.0] - 2024-08-01
26
+
27
+ ### Added
28
+
29
+ - File upload to S3 and register it to ecoPortal
30
+ - `Ecoportal::API::Common::Content::DoubleModel`
31
+ - Allow update on `external_id`
32
+
33
+ ### Changed
34
+
35
+ - require `ruby 3`
36
+
4
37
  ## [1.1.8] - 2024-03-23
5
38
 
6
39
  ### Changed
7
- - A lot of code tidy up
40
+
41
+ - A lot of code tidy up
8
42
 
9
43
  ### Fixed
10
- - `Ecoportal::API::Common::Conent::CollectionModel`
11
- - correct `item` `klass` resolution
44
+
45
+ - `Ecoportal::API::Common::Conent::CollectionModel`
46
+ - correct `item` `klass` resolution
12
47
 
13
48
  ## [1.1.7] - 2024-03-13
14
49
 
15
50
  ### Added
16
- - `Ecoportal::API::Common::Concerns::Benchmarkable`
17
- - `Ecoportal::API::Common::Conent::CollectionModel`
18
- - added ability to define **default** value for `read_only`
51
+
52
+ - `Ecoportal::API::Common::Concerns::Benchmarkable`
53
+ - `Ecoportal::API::Common::Conent::CollectionModel`
54
+ - added ability to define **default** value for `read_only`
19
55
 
20
56
  ### Fixed
21
- - `Ecoportal::API::Common::Content::CollectionModel` tidied up item `klass` scoping
22
- - **added** some benchmarking too
23
- - memoize `@_items`
57
+
58
+ - `Ecoportal::API::Common::Content::CollectionModel` tidied up item `klass` scoping
59
+ - **added** some benchmarking too
60
+ - memoize `@_items`
24
61
 
25
62
  ## [1.1.6] - 2024-02-29
26
63
 
27
64
  ### Added
28
- - A bit of **specs** on object retrieval for `Ecoportal::API::Common::Conent::CollectionModel`
29
- - `Ecoportal::API::Registers::PageResult` exposed `membranes`
30
- - with new object `Ecoportal::API::Registers::PageResult::MembraneDroplet`
65
+
66
+ - A bit of **specs** on object retrieval for `Ecoportal::API::Common::Conent::CollectionModel`
67
+ - `Ecoportal::API::Registers::PageResult` exposed `membranes`
68
+ - with new object `Ecoportal::API::Registers::PageResult::MembraneDroplet`
31
69
 
32
70
  ### Fixed
33
- - `Ecoportal::API::Common::Conent::CollectionModel`
71
+
72
+ - `Ecoportal::API::Common::Conent::CollectionModel`
34
73
 
35
74
  ## [1.1.5] - 2024-02-03
36
75
 
37
76
  ### Changed
38
- - Upgrade gem dependencies
77
+
78
+ - Upgrade gem dependencies
39
79
 
40
80
  ## [1.1.4] - 2024-02-01
41
81
 
42
82
  ### Added
43
- - Support for new fields
44
- - `Ecoportal::API::V2::Page::Component::ActionsField`
45
- - `Ecoportal::API::V2::Page::Component::MailboxField`
83
+
84
+ - Support for new fields
85
+ - `Ecoportal::API::V2::Page::Component::ActionsField`
86
+ - `Ecoportal::API::V2::Page::Component::MailboxField`
46
87
 
47
88
  ## [1.1.3] - 2023-06-28
48
89
 
49
90
  ### Added
50
- - `Ecoportal::API::V2::Page::Component::ContractorEntitiesField`
51
- - Added support for contractor entities fields.
91
+
92
+ - `Ecoportal::API::V2::Page::Component::ContractorEntitiesField`
93
+ - Added support for contractor entities fields.
52
94
 
53
95
  ## [1.1.2] - 2023-04-17
54
96
 
55
97
  ### Changed
56
- - Require ruby version `2.7.2`
57
- - Soften max version on **gem** dependencies
58
- - Upgrade core `ecoportal-api` gem
98
+
99
+ - Require ruby version `2.7.2`
100
+ - Soften max version on **gem** dependencies
101
+ - Upgrade core `ecoportal-api` gem
59
102
 
60
103
  ### Fixed
61
- - `Ecoportal::API::Common::Content::DoubleModel` was not copying `doc` at root level
104
+
105
+ - `Ecoportal::API::Common::Content::DoubleModel` was not copying `doc` at root level
62
106
 
63
107
  ## [1.1.1] - 2023-03-09
64
108
 
65
109
  ### Added
110
+
66
111
  ### Changed
67
- - upgraded core gem `ecoportal-api`
112
+
113
+ - upgraded core gem `ecoportal-api`
68
114
 
69
115
  ### Fixed
70
116
 
71
117
  ## [1.0.1] - 2023-02-24
72
118
 
73
119
  ### Added
74
- - Allowed `read_only` mode to support `emdeds_many` with item class without `method_key`
75
- - `Ecoportal::API::Common::Content::DoubleModel`
76
- - `Ecoportal::API::Common::Content::CollectionModel`
77
- - `Ecoportal::API::Common::Content::ArrayModel`
120
+
121
+ - Allowed `read_only` mode to support `emdeds_many` with item class without `method_key`
122
+ - `Ecoportal::API::Common::Content::DoubleModel`
123
+ - `Ecoportal::API::Common::Content::CollectionModel`
124
+ - `Ecoportal::API::Common::Content::ArrayModel`
78
125
 
79
126
  ### Changed
80
- - It is a risky change (so treated as a **braking change**)
127
+
128
+ - It is a risky change (so treated as a **braking change**)
81
129
 
82
130
  ## [0.9.7] - 2022-11-29
83
131
 
84
132
  ### Added
85
- - `Ecoportal::API::V2::Page::Component::ReferenceField` added methods `#delete` and `#clear`
133
+
134
+ - `Ecoportal::API::V2::Page::Component::ReferenceField` added methods `#delete` and `#clear`
86
135
 
87
136
  ### Changed
88
- - `Ecoportal::API::V2::Page::Component::ReferenceField#add`
89
- - be able to add multiple references
90
- - prevent double-ups, just in case the server doesn't handle this
137
+
138
+ - `Ecoportal::API::V2::Page::Component::ReferenceField#add`
139
+ - be able to add multiple references
140
+ - prevent double-ups, just in case the server doesn't handle this
91
141
 
92
142
  ### Fixed
93
- - `Ecoportal::API::V2::Page::Component#bindings`
143
+
144
+ - `Ecoportal::API::V2::Page::Component#bindings`
94
145
 
95
146
  ## [0.9.6] - 2022-11-18
96
147
 
97
148
  ### Added
98
- - `Ecoportal::API::V2::Page::Stage#components`
99
- - `Ecoportal::API::V2::Page::Component#replace`
100
- - `Ecoportal::API::V2::Page::Force::Binding#replace`
149
+
150
+ - `Ecoportal::API::V2::Page::Stage#components`
151
+ - `Ecoportal::API::V2::Page::Component#replace`
152
+ - `Ecoportal::API::V2::Page::Force::Binding#replace`
101
153
 
102
154
  ### Fixed
103
- - `Ecoportal::API::V2::Page::Component#bindings`
155
+
156
+ - `Ecoportal::API::V2::Page::Component#bindings`
104
157
 
105
158
  ## [0.9.5] - 2022-11-17
106
159
 
107
160
  ### Fixed
108
- - `Ecoportal::API::V2::Page::Component::ImagesField#empty?` missed to add this one.
161
+
162
+ - `Ecoportal::API::V2::Page::Component::ImagesField#empty?` missed to add this one.
109
163
 
110
164
  ## [0.9.4] - 2022-11-15
111
165
 
112
166
  ### Added
113
- - `Ecoportal::API::V2::Page::Component::ImagesField#add_image`
114
- - `empty?` method to components
167
+
168
+ - `Ecoportal::API::V2::Page::Component::ImagesField#add_image`
169
+ - `empty?` method to components
115
170
 
116
171
  ## [0.9.3] - 2022-10-11
117
172
 
118
173
  ### Added
119
- - `Ecoportal::API::V2::Page` **methods** `#mark_as_submit` and `#mark_as_sign_off`
174
+
175
+ - `Ecoportal::API::V2::Page` **methods** `#mark_as_submit` and `#mark_as_sign_off`
120
176
 
121
177
  ### Changed
122
- - `Ecoportal::API::V2::Pages#get_new`, to return an object of class `Ecoportal::API::V2::Pages::PageStage`
178
+
179
+ - `Ecoportal::API::V2::Pages#get_new`, to return an object of class `Ecoportal::API::V2::Pages::PageStage`
123
180
 
124
181
  ### Fixed
125
- - Remove debugging message
182
+
183
+ - Remove debugging message
126
184
 
127
185
  ## [0.9.2] - 2022-09-29
128
186
 
129
187
  ### Added
130
- - `Ecoportal::API::V2::Page::Component::SelectionOption#delete!`
131
- - `Ecoportal::API::V2::Page::Component#delete!`
132
- - `Ecoportal::API::V2::Page::Component#move` to move to another section or side of the same
133
- - `Ecoportal::API::V2::Page::Component#unattach!` to detach the component from any section
134
- - `Ecoportal::API::V2::Page::Component::SelectionOption#delete!`
135
- - `Ecoportal::API::V2::Page::Component::Binding#delete!`
136
- - `Ecoportal::API::V2::Page::Section#remove_component!` to simplify the removal of a field from the section
188
+
189
+ - `Ecoportal::API::V2::Page::Component::SelectionOption#delete!`
190
+ - `Ecoportal::API::V2::Page::Component#delete!`
191
+ - `Ecoportal::API::V2::Page::Component#move` to move to another section or side of the same
192
+ - `Ecoportal::API::V2::Page::Component#unattach!` to detach the component from any section
193
+ - `Ecoportal::API::V2::Page::Component::SelectionOption#delete!`
194
+ - `Ecoportal::API::V2::Page::Component::Binding#delete!`
195
+ - `Ecoportal::API::V2::Page::Section#remove_component!` to simplify the removal of a field from the section
137
196
 
138
197
  ### Changed
139
- - `Ecoportal::API::V2::Page::Component::SelectionField#options`
140
- - **added** and moved logics to `Ecoportal::API::V2::Page::Component::SelectionOptions`
141
- - `Ecoportal::API::V2::Page::Component::SelectionOption#name` to return `#value` when it's empty
198
+
199
+ - `Ecoportal::API::V2::Page::Component::SelectionField#options`
200
+ - **added** and moved logics to `Ecoportal::API::V2::Page::Component::SelectionOptions`
201
+ - `Ecoportal::API::V2::Page::Component::SelectionOption#name` to return `#value` when it's empty
142
202
 
143
203
  ### Fixed
144
- - Remove debugging message
204
+
205
+ - Remove debugging message
145
206
 
146
207
  ## [0.9.1] - 2022-09-26
147
208
 
148
209
  ### Added
149
- - `Ecoportal::API::V2::Page::Force::Helper`
210
+
211
+ - `Ecoportal::API::V2::Page::Force::Helper`
150
212
 
151
213
  ### Changed
152
- - `Ecoportal::API::V2::Page::Force`, logic around `helpers` (remote forces)
153
- - **breaking change**: `script` is not writable anymore. You should use `custom_script` instead.
214
+
215
+ - `Ecoportal::API::V2::Page::Force`, logic around `helpers` (remote forces)
216
+ - **breaking change**: `script` is not writable anymore. You should use `custom_script` instead.
154
217
 
155
218
  ## [0.8.33] - 2022-09-23
156
219
 
157
220
  ### Changed
158
- - `Ecoportal::API::Common::Content::DoubleModel#embeds_many`: added new_class name collision prevention
221
+
222
+ - `Ecoportal::API::Common::Content::DoubleModel#embeds_many`: added new_class name collision prevention
159
223
 
160
224
  ### Fixed
161
- - `Ecoportal::API::Common::ClassHelpers.new_class`: should accept `name` parameter to be a class itself
162
225
 
226
+ - `Ecoportal::API::Common::ClassHelpers.new_class`: should accept `name` parameter to be a class itself
163
227
 
164
228
  ## [0.8.32] - 2022-09-19
165
229
 
166
230
  ### Added
167
- - `Ecoportal::API::V2::Pages::PageCreateResponse` to wrap the response on creation
231
+
232
+ - `Ecoportal::API::V2::Pages::PageCreateResponse` to wrap the response on creation
168
233
 
169
234
  ### Changed
170
- - `Ecoportal::API::V2::Pages#create` to rather return a `PageCreateResponse`
235
+
236
+ - `Ecoportal::API::V2::Pages#create` to rather return a `PageCreateResponse`
171
237
 
172
238
  ### Fixed
173
- - `Ecoportal::API::V2::Pages#create` to make sure new page with no changes can be created.
174
239
 
240
+ - `Ecoportal::API::V2::Pages#create` to make sure new page with no changes can be created.
175
241
 
176
242
  ## [0.8.31] - 2022-09-15
177
243
 
178
244
  ### Added
179
- - `Ecoportal::API::Common::Content::ClassHelpers.uid` to generate a random uid
245
+
246
+ - `Ecoportal::API::Common::Content::ClassHelpers.uid` to generate a random uid
180
247
 
181
248
  ### Changed
182
- - added **inheritable attributes** to
183
- - `Ecoportal::API::Common::Content::ArrayModel` (:order_matteres, :uniq)
184
- - `Ecoportal::API::Common::Content::CollectionModel` (klass, :order_matters, :order_key, :items_key, :new_item)
185
- - `Ecoportal::API::Common::Content::DoubleModel` (:key)
186
- - moved `SecureRandom` dependency to `Ecoportal::API::Common::Content::ClassHelpers`
249
+
250
+ - added **inheritable attributes** to
251
+ - `Ecoportal::API::Common::Content::ArrayModel` (:order_matteres, :uniq)
252
+ - `Ecoportal::API::Common::Content::CollectionModel` (klass, :order_matters, :order_key, :items_key, :new_item)
253
+ - `Ecoportal::API::Common::Content::DoubleModel` (:key)
254
+ - moved `SecureRandom` dependency to `Ecoportal::API::Common::Content::ClassHelpers`
187
255
 
188
256
  ### Fixed
189
- - `Ecoportal::API::V2::Page::Component::SelectionOption#numeric!` fix conversion
190
- - `Ecoportal::API::Common::Content::ClassHelpers`, `new_class`
191
- - **Added** parameter `namespace` (default: the class `inherits` parameter): it's purpose is to define the namespace where the new class will sit
192
- - **Fixed** also the namespace where the new class constant will sit (it was using always the source class `self`)
193
- - **Improved** `name` parameter to have a default value that is randomized. This is useful when we just want to do something like `SomeClass.new_class`, where the name of the new class doesn't really matter.
194
- - **Fixed** lost reference of class resolvers when using `embeds_many`
195
- - `Ecoportal::API::Common::Content::ClassHelpers`, `resolve_class` accepts now a `Hash` with `key` referrer class, and `value` any of the previously accepted ones (i.e. `Symbol` or `String`). To this purpose, `source_class` parameter has been added.
196
- - This has been natively wrapped in `Ecoportal::API::Common::Content::DoubleModel.embeds_many`, as it naturally shares the `class_resolver` with a third party class that loses the reference.
257
+
258
+ - `Ecoportal::API::V2::Page::Component::SelectionOption#numeric!` fix conversion
259
+ - `Ecoportal::API::Common::Content::ClassHelpers`, `new_class`
260
+ - **Added** parameter `namespace` (default: the class `inherits` parameter): it's purpose is to define the namespace where the new class will sit
261
+ - **Fixed** also the namespace where the new class constant will sit (it was using always the source class `self`)
262
+ - **Improved** `name` parameter to have a default value that is randomized. This is useful when we just want to do something like `SomeClass.new_class`, where the name of the new class doesn't really matter.
263
+ - **Fixed** lost reference of class resolvers when using `embeds_many`
264
+ - `Ecoportal::API::Common::Content::ClassHelpers`, `resolve_class` accepts now a `Hash` with `key` referrer class, and `value` any of the previously accepted ones (i.e. `Symbol` or `String`). To this purpose, `source_class` parameter has been added.
265
+ - This has been natively wrapped in `Ecoportal::API::Common::Content::DoubleModel.embeds_many`, as it naturally shares the `class_resolver` with a third party class that loses the reference.
197
266
 
198
267
  ## [0.8.30] - 2022-07-11
199
268
 
200
269
  ### Added
201
- - `Ecoportal::API::V2::Page::MoultCounter`
202
- - Available on `Ecoportal::API::V2::Pages::PageStage`
203
- - `Ecoportal::API::V2::Page::Component#Law` added support for `LawField` content
204
- - where `Ecoportal::API::V2::Page::Component#LawField` has many of
205
- - `Ecoportal::API::V2::Component` added parameter `any_length:` for
206
- - `#ref` and `#indexable_label` (aiming to enhance data exportability)
270
+
271
+ - `Ecoportal::API::V2::Page::MoultCounter`
272
+ - Available on `Ecoportal::API::V2::Pages::PageStage`
273
+ - `Ecoportal::API::V2::Page::Component#Law` added support for `LawField` content
274
+ - where `Ecoportal::API::V2::Page::Component#LawField` has many of
275
+ - `Ecoportal::API::V2::Component` added parameter `any_length:` for
276
+ - `#ref` and `#indexable_label` (aiming to enhance data exportability)
207
277
 
208
278
  ### Changed
209
- - Reviewed `to_s` method on multiple components, to ensure smooth export
279
+
280
+ - Reviewed `to_s` method on multiple components, to ensure smooth export
210
281
 
211
282
  ### Fixed
212
- - `Ecoportal::API::V2::Pages::PageStage#uid`
213
- - Should check if `mould_conter` exists
214
- - Should return `id` if `mould_counter` does not exist
215
- - **Exports**
216
- - `Ecoportal::API::V2::Pages::Component::PeopleField#to_s`: fix type conversion
217
- - `Ecoportal::API::V2::Pages::Component::DateField#to_s`: make time to work to the local timezone where the client script runs
283
+
284
+ - `Ecoportal::API::V2::Pages::PageStage#uid`
285
+ - Should check if `mould_conter` exists
286
+ - Should return `id` if `mould_counter` does not exist
287
+ - **Exports**
288
+ - `Ecoportal::API::V2::Pages::Component::PeopleField#to_s`: fix type conversion
289
+ - `Ecoportal::API::V2::Pages::Component::DateField#to_s`: make time to work to the local timezone where the client script runs
218
290
 
219
291
  ## [0.8.29] - 2022-07-07
220
292
 
221
293
  ### Added
222
- - `Ecoportal::API::V2::Page::Component::ActionField#permitted_person_schema_ids`
223
- - Integration for the new feature
224
- - `Ecoportal::API::V2::Pages::PageStage#uid` new method for directly rendering the uid
294
+
295
+ - `Ecoportal::API::V2::Page::Component::ActionField#permitted_person_schema_ids`
296
+ - Integration for the new feature
297
+ - `Ecoportal::API::V2::Pages::PageStage#uid` new method for directly rendering the uid
225
298
 
226
299
  ### Changed
227
- - `Ecoportal::API::V2::Page::Component::PeopleField#configure_permits`
228
- - Allow for `can_view` to prevent unnecessary errors
300
+
301
+ - `Ecoportal::API::V2::Page::Component::PeopleField#configure_permits`
302
+ - Allow for `can_view` to prevent unnecessary errors
229
303
 
230
304
  ### Fixed
231
- - `Ecoportal::API::V2::Page::PermissionFlags#configure` fixed typo
305
+
306
+ - `Ecoportal::API::V2::Page::PermissionFlags#configure` fixed typo
232
307
 
233
308
  ## [0.8.28] - 2022-05-31
234
309
 
235
310
  ### Added
236
- - `Ecoportal::API::V2::Page::Component::File` added `label`
237
- - `Ecoportal::API::V2::Page::Component::Image` added `upload_id` and `file_file_name`
311
+
312
+ - `Ecoportal::API::V2::Page::Component::File` added `label`
313
+ - `Ecoportal::API::V2::Page::Component::Image` added `upload_id` and `file_file_name`
238
314
 
239
315
  ## [0.8.27] - 2022-04-25
240
316
 
241
317
  ### Added
242
- - `Ecoportal::API::Common::Content::CollectionModel#clear`
243
- - It calls `#delete!` on each item from an `Array` copy
244
- - `Ecoportal::API::V2::Page::Components#add`
245
- - Now it allows to use a `Hash` _doc_ model to create the `Component`
246
- - `Ecoportal::API::V2::Page::Component::SelectionField` **added** some methods:
247
- - `#numeric?`, `#text?` to check the `data_type` of the _selection options_
248
- - `#switch_type!` to switch the `data_type` between `txt` and `num`
249
- - `#deselect` to mark as `false` the property `selected` of some _selection option_
250
- - `#name` counterpart of `#value`
251
- - `#values` and `#names` they return always an `Array` (no matter if the field is **not** `multiple`)
252
- - `#options_by_value` which returns a `Hash` with all the options by their `value`
253
- - `#options_by_name` which returns a `Hash` with all the options by their `name`
254
- - `Ecoportal::API::V2::Page::Component` **added** some methods:
255
- - `#forces`, `#bindings` and `#bindings?` to check if a _Component_ has bindings in what forces and what those bindings are.
256
- - `Ecoportal::API::V2::Page::Force#bind` to add a _binding_
257
- - `Ecoportal::API::V2::Page::Force::Binding` **added** a couple of methods:
258
- - `#force` to refer to the _Force_ object of a binding
259
- - `#reference` to retrieve the _component_ or _section_ the binding refers to
260
- - `Ecoportal::API::V2::Page::Force::Bindings` **added** some methods:
261
- - `#force` to refer to the _Force_ object of the bindings
262
- - `#by_name` and `#by_reference` to obtain a `Hash` with all the _bindings_
263
- - `#reference?` to check if a _section_ or _component_ have a binding to the _force_
264
- - `#get_by_reference` to retrieve an `Array` with all the _bindings_ to one _section_ or _component_
265
- - `Ecoportal::API::V2::Page::Forces#bindings_by_reference`
266
- - For (script) **optimization** purposes. It gets all the _bindings_ as a `Hash` of _reference_ to `Array<Binding>`
267
- - `Ecoportal::API::V2::Page::Section` **added** some methods:
268
- - `#shared?` to know if the _section_ is shared by multiple stages
269
- - `#bindings` to obtain the _bindings_ of the _section_ in any _force_
270
- - `#forces` all the _forces_ that this _section_ has a _binding_ to
271
- - `#bindings?` whether or not the _section_ has any force _binding_
272
- - `Ecoportal::API::V2::Page::Sections` **added** some methods:
273
- - `#any_shared?` whether or not there are shared sections
274
- - `#move` to **move** the _section_ to some specific position
275
-
276
- ### Changed
277
- - `ecoportal-api` dependency upgrade
278
- - `Ecoportal::API::V2::Page::PermissionFlags#configure`
279
- - Added option to pass a `Hash` with pairs `Symbol`, `Boolean`
280
- - `flags.configure {subscribed: true}`
281
- - `Ecoportal::API::Common::Content::ModelHelpers#same_string?`
282
- - Added parameter `mild:` to compare the strings with only alphabetic characters
283
- - `Ecoportal::API::V2::Page::Component::SelectionField` **added** some methods:
284
- - `#selected` **added** parameters to modify the _returned_ value
285
- - `by_name:` and `by_value:` to return a `Hash`
286
- - `value:` and `name:` which combines respectively with the above, to cast them in the `Hash`
287
- - `Ecoportal::API::V2::Page::Sections#get_by_heading`
288
- - added `mild:` option to allow more flexibility on searches
289
-
290
- ### Fixed
291
- - `Ecoportall::API::Common::Content::DoubleModel#dirty?`
292
- - It was checking that `#as_update` equaled `{}`. Now it also checks on `null` too.
293
- - `Ecoportal::API::V2::Page::Component::SelectionOption#numeric!`
294
- - It was using `to_i` which would return `0` when the source `value` was not numeric.
295
- - Now it uses `Float(value)`, provided that it can throw an exception
296
- - `Ecoportal::API::V2::Pages::Stages#get`
297
- - The _page_ `id` and `stage_id` were used exchanged in the message
298
- - `Ecoportal::API::V2::Page::Forces` fixed the `weight` (position) scoping
299
- - It was not positioning correctly
300
- - `Ecoportal::API::V2::Page::Sections` fixed the `weight` (position) scoping
301
- - It was not positioning correctly
318
+
319
+ - `Ecoportal::API::Common::Content::CollectionModel#clear`
320
+ - It calls `#delete!` on each item from an `Array` copy
321
+ - `Ecoportal::API::V2::Page::Components#add`
322
+ - Now it allows to use a `Hash` _doc_ model to create the `Component`
323
+ - `Ecoportal::API::V2::Page::Component::SelectionField` **added** some methods:
324
+ - `#numeric?`, `#text?` to check the `data_type` of the _selection options_
325
+ - `#switch_type!` to switch the `data_type` between `txt` and `num`
326
+ - `#deselect` to mark as `false` the property `selected` of some _selection option_
327
+ - `#name` counterpart of `#value`
328
+ - `#values` and `#names` they return always an `Array` (no matter if the field is **not** `multiple`)
329
+ - `#options_by_value` which returns a `Hash` with all the options by their `value`
330
+ - `#options_by_name` which returns a `Hash` with all the options by their `name`
331
+ - `Ecoportal::API::V2::Page::Component` **added** some methods:
332
+ - `#forces`, `#bindings` and `#bindings?` to check if a _Component_ has bindings in what forces and what those bindings are.
333
+ - `Ecoportal::API::V2::Page::Force#bind` to add a _binding_
334
+ - `Ecoportal::API::V2::Page::Force::Binding` **added** a couple of methods:
335
+ - `#force` to refer to the _Force_ object of a binding
336
+ - `#reference` to retrieve the _component_ or _section_ the binding refers to
337
+ - `Ecoportal::API::V2::Page::Force::Bindings` **added** some methods:
338
+ - `#force` to refer to the _Force_ object of the bindings
339
+ - `#by_name` and `#by_reference` to obtain a `Hash` with all the _bindings_
340
+ - `#reference?` to check if a _section_ or _component_ have a binding to the _force_
341
+ - `#get_by_reference` to retrieve an `Array` with all the _bindings_ to one _section_ or _component_
342
+ - `Ecoportal::API::V2::Page::Forces#bindings_by_reference`
343
+ - For (script) **optimization** purposes. It gets all the _bindings_ as a `Hash` of _reference_ to `Array<Binding>`
344
+ - `Ecoportal::API::V2::Page::Section` **added** some methods:
345
+ - `#shared?` to know if the _section_ is shared by multiple stages
346
+ - `#bindings` to obtain the _bindings_ of the _section_ in any _force_
347
+ - `#forces` all the _forces_ that this _section_ has a _binding_ to
348
+ - `#bindings?` whether or not the _section_ has any force _binding_
349
+ - `Ecoportal::API::V2::Page::Sections` **added** some methods:
350
+ - `#any_shared?` whether or not there are shared sections
351
+ - `#move` to **move** the _section_ to some specific position
352
+
353
+ ### Changed
354
+
355
+ - `ecoportal-api` dependency upgrade
356
+ - `Ecoportal::API::V2::Page::PermissionFlags#configure`
357
+ - Added option to pass a `Hash` with pairs `Symbol`, `Boolean`
358
+ - `flags.configure {subscribed: true}`
359
+ - `Ecoportal::API::Common::Content::ModelHelpers#same_string?`
360
+ - Added parameter `mild:` to compare the strings with only alphabetic characters
361
+ - `Ecoportal::API::V2::Page::Component::SelectionField` **added** some methods:
362
+ - `#selected` **added** parameters to modify the _returned_ value
363
+ - `by_name:` and `by_value:` to return a `Hash`
364
+ - `value:` and `name:` which combines respectively with the above, to cast them in the `Hash`
365
+ - `Ecoportal::API::V2::Page::Sections#get_by_heading`
366
+ - added `mild:` option to allow more flexibility on searches
367
+
368
+ ### Fixed
369
+
370
+ - `Ecoportall::API::Common::Content::DoubleModel#dirty?`
371
+ - It was checking that `#as_update` equaled `{}`. Now it also checks on `null` too.
372
+ - `Ecoportal::API::V2::Page::Component::SelectionOption#numeric!`
373
+ - It was using `to_i` which would return `0` when the source `value` was not numeric.
374
+ - Now it uses `Float(value)`, provided that it can throw an exception
375
+ - `Ecoportal::API::V2::Pages::Stages#get`
376
+ - The _page_ `id` and `stage_id` were used exchanged in the message
377
+ - `Ecoportal::API::V2::Page::Forces` fixed the `weight` (position) scoping
378
+ - It was not positioning correctly
379
+ - `Ecoportal::API::V2::Page::Sections` fixed the `weight` (position) scoping
380
+ - It was not positioning correctly
302
381
 
303
382
  ## [0.8.26] - 2022-03-25
304
383
 
305
384
  ### Added
306
- `Ecoportal::API::V2::Page::Stage#add_permit`
307
- `Ecoportal::API::V2::Page::Permit.new_doc`
385
+
386
+ `Ecoportal::API::V2::Page::Stage#add_permit`
387
+ `Ecoportal::API::V2::Page::Permit.new_doc`
308
388
 
309
389
  ## [0.8.25] - 2022-02-04
310
390
 
311
391
  ### Added
312
- - `Ecoportal::API::V2::Page::Component::ReferenceField#add` to add new references
392
+
393
+ - `Ecoportal::API::V2::Page::Component::ReferenceField#add` to add new references
313
394
 
314
395
  ### Changed
315
- - `Ecoportal::API::Common::Content::HashDiffPatch#patch_data`
316
- - Added support for model objects with no `patch_ver` (so diffs are calculated as well)
396
+
397
+ - `Ecoportal::API::Common::Content::HashDiffPatch#patch_data`
398
+ - Added support for model objects with no `patch_ver` (so diffs are calculated as well)
317
399
 
318
400
  ## [0.8.24] - 2022-01-05
319
401
 
320
402
  ### Fixed
321
- - `Ecoportal::API::V2::Page#stages?` do not generate an object to this purpose
322
- - `Ecoportal::API::V2::Registers#search` fix typo in print feedback
403
+
404
+ - `Ecoportal::API::V2::Page#stages?` do not generate an object to this purpose
405
+ - `Ecoportal::API::V2::Registers#search` fix typo in print feedback
323
406
 
324
407
  ## [0.8.23] - 2021-12-24
325
408
 
326
409
  ### Added
327
- - `Ecoportal::API::V2::Registers#search` added more feedback on what is going on
410
+
411
+ - `Ecoportal::API::V2::Registers#search` added more feedback on what is going on
328
412
 
329
413
  ## [0.8.22] - 2021-12-23
330
414
 
331
415
  ### Fixed
332
- - `Ecoportal::API::V2::Page::Section#add_component` was not using correctly `before` and `after`
333
- - It was not correctly translating them into the existing component
416
+
417
+ - `Ecoportal::API::V2::Page::Section#add_component` was not using correctly `before` and `after`
418
+ - It was not correctly translating them into the existing component
334
419
 
335
420
  ## [0.8.21] - 2021-12-15
336
421
 
337
422
  ### Added
338
- - To children of `Ecoportal::API::V2::Page::Component` added method `#to_s` (for exporting)
339
- - `Ecoportal::API::V2::Page::Component::ReferenceField`
340
- - added `#references` (the lookup results)
341
- - added `#reference_ids` (the `ids` of the referenced oozes)
423
+
424
+ - To children of `Ecoportal::API::V2::Page::Component` added method `#to_s` (for exporting)
425
+ - `Ecoportal::API::V2::Page::Component::ReferenceField`
426
+ - added `#references` (the lookup results)
427
+ - added `#reference_ids` (the `ids` of the referenced oozes)
342
428
 
343
429
  ### Changed
344
- - Re-exposed `Ecoportal::API::V2::Stages#ordered`
430
+
431
+ - Re-exposed `Ecoportal::API::V2::Stages#ordered`
345
432
 
346
433
  ### Fixed
347
- - `Ecoportal::API::V2::Page::Component::ImagesField#images` typo in `klass`
434
+
435
+ - `Ecoportal::API::V2::Page::Component::ImagesField#images` typo in `klass`
348
436
 
349
437
  ## [0.8.20] - 2021-12-09
350
438
 
351
439
  ### Changed
352
- - `Ecoportal::API::V2::Pages::PageStage#permits` removed
353
- - The reason is that it should be changed using the `Stage#permits` instead
354
- - Upgraded `ecoportal-api` gem dependency
440
+
441
+ - `Ecoportal::API::V2::Pages::PageStage#permits` removed
442
+ - The reason is that it should be changed using the `Stage#permits` instead
443
+ - Upgraded `ecoportal-api` gem dependency
355
444
 
356
445
  ### Fixed
357
- - `Ecoportal::API::V2::Page::Stage#sections` typo
446
+
447
+ - `Ecoportal::API::V2::Page::Stage#sections` typo
358
448
 
359
449
  ## [0.8.19] - 2021-09-29
360
450
 
361
451
  ### Changed
362
- - Moved validation of components multi-section from `PageStage` to `Page`
363
- - Removed validation from `PageStage#as_update`
364
- - This means that the validation will not run natively, but in the client lib
452
+
453
+ - Moved validation of components multi-section from `PageStage` to `Page`
454
+ - Removed validation from `PageStage#as_update`
455
+ - This means that the validation will not run natively, but in the client lib
365
456
 
366
457
  ### Fixed
367
- - `Ecoportal::V2::Page::Stage#section?` fixed typo
368
- - `Ecoportal::V2::Page::Stage`
369
- - `#attached?` added missing code
370
- - `#component?` fixed typo
458
+
459
+ - `Ecoportal::V2::Page::Stage#section?` fixed typo
460
+ - `Ecoportal::V2::Page::Stage`
461
+ - `#attached?` added missing code
462
+ - `#component?` fixed typo
371
463
 
372
464
  ## [0.8.18] - 2021-09-29
373
465
 
374
466
  ### Fixed
375
- - typo in `PageStage#validate`
467
+
468
+ - typo in `PageStage#validate`
376
469
 
377
470
  ## [0.8.17] - 2021-09-29
378
471
 
379
472
  ### Fixed
380
- - Typo in `Section#attached?`
473
+
474
+ - Typo in `Section#attached?`
381
475
 
382
476
  ## [0.8.15] - 2021-09-29
383
477
 
384
478
  ### Fixed
385
- - Typo in `Section#component?`
479
+
480
+ - Typo in `Section#component?`
386
481
 
387
482
  ## [0.8.14] - 2021-09-28
388
483
 
389
484
  ### Added
390
- - `Ecoportal::API::Common::Content::CollectionModel`
391
- - `#_doc_pos` for clarity
392
- - `#include?` to check if an element is present in the collection
393
- - `Ecoportal::API::V2::Page::Stage#section?` check if section belongs to stage
394
- - `Ecoportal::API::V2::Page::Sections`
395
- - `#get_by_id`
396
- - `#unattached` sections that are not attached to any stage
397
- - `Ecoportal::API::V2::Page::Section`
398
- - `#add_component` **added** parameter `before`: to cover case where you want to add it at the beginning
399
- - `#component?` **widened** parameter type
400
- - `#stages` stages where this section is attached
401
- - `attached?` whether or not the section is attached
402
- - `Ecoportal::API::V2::Page::Component`
403
- - `#attached?` whether or not the field is attached to some section
404
- - `#multi_section?` if the field is attached to more than one section :/
405
- - **added** support for `forces`
406
- - `Ecoportal::API::V2::Page::Force`
407
- - `Ecoportal::API::V2::Page::Forces`
408
- - `Ecoportal::API::V2::Page::Force::Binding`
409
- - `Ecoportal::API::V2::Page::Force::Bindings`
410
- - **added** shortcut to `#ooze` throughout all the model
411
- - **validations** in some methods
412
- - `Ecoportal::API::V2::Page::Stage#add_section`: section should be in `ooze.sections`
413
- - `Ecoportal::API::V2::Page::Section#add_component`: component should be in `ooze.components`
414
- - `Ecoportal::API::V2::Page::Force::Bindings#add`:
415
- - section to be in `ooze.sections`
416
- - component to be in `ooze.components`
417
- - `Ecoportal::API::V2::Pages::PageStage#as_update` on page instances, it checks that
418
- - Fields do not belong to more than one section
419
- - Fields belong at least to one section
420
- - Sections belong to at least one stage
421
-
422
- ### Fixed
423
- - `Ecoportal::API::Common::Content::ArrayModel#insert_one` was not inserting when not found. Should insert at least at the end.
485
+
486
+ - `Ecoportal::API::Common::Content::CollectionModel`
487
+ - `#_doc_pos` for clarity
488
+ - `#include?` to check if an element is present in the collection
489
+ - `Ecoportal::API::V2::Page::Stage#section?` check if section belongs to stage
490
+ - `Ecoportal::API::V2::Page::Sections`
491
+ - `#get_by_id`
492
+ - `#unattached` sections that are not attached to any stage
493
+ - `Ecoportal::API::V2::Page::Section`
494
+ - `#add_component` **added** parameter `before`: to cover case where you want to add it at the beginning
495
+ - `#component?` **widened** parameter type
496
+ - `#stages` stages where this section is attached
497
+ - `attached?` whether or not the section is attached
498
+ - `Ecoportal::API::V2::Page::Component`
499
+ - `#attached?` whether or not the field is attached to some section
500
+ - `#multi_section?` if the field is attached to more than one section :/
501
+ - **added** support for `forces`
502
+ - `Ecoportal::API::V2::Page::Force`
503
+ - `Ecoportal::API::V2::Page::Forces`
504
+ - `Ecoportal::API::V2::Page::Force::Binding`
505
+ - `Ecoportal::API::V2::Page::Force::Bindings`
506
+ - **added** shortcut to `#ooze` throughout all the model
507
+ - **validations** in some methods
508
+ - `Ecoportal::API::V2::Page::Stage#add_section`: section should be in `ooze.sections`
509
+ - `Ecoportal::API::V2::Page::Section#add_component`: component should be in `ooze.components`
510
+ - `Ecoportal::API::V2::Page::Force::Bindings#add`:
511
+ - section to be in `ooze.sections`
512
+ - component to be in `ooze.components`
513
+ - `Ecoportal::API::V2::Pages::PageStage#as_update` on page instances, it checks that
514
+ - Fields do not belong to more than one section
515
+ - Fields belong at least to one section
516
+ - Sections belong to at least one stage
517
+
518
+ ### Fixed
519
+
520
+ - `Ecoportal::API::Common::Content::ArrayModel#insert_one` was not inserting when not found. Should insert at least at the end.
424
521
 
425
522
  ## [0.8.13] - 2021-09-03
426
523
 
427
524
  ### Fixed
428
- - `Ecoportal::API::V2::Page::Sections`
429
- - `weight` fixing should only happen on entire page, **not** on stage sections that could change the order of section shared with other stages
430
- - `#scope_weight` was not excluding the section when using `weight` of the last one
431
- - Several classes with `embeds_many` were performing the `ordering` of those elements in the wrong way
432
- - `Ecoportall::API::Common::Content::DoubleModel`
433
- - `#replace_original_doc` had a couple of typos
434
- - `#replace_doc` should only remove the variable referring to the current object and only if `new_doc` is `nil`
435
- - `Ecoportal::API::Common::Content::CollectionModel` on insertion and deletion it was removing instance variable objects.
436
- - There was no need for this approach, as the only necessary thing is to just keep those variable instances up to date in the correct unique access point to do so.
437
- - Aside note: the reason why this was initially designed this way is because there were some difficulties to identify the existing elements in the subjacent model. Once `#passkey` as added, this difficulty could be overcome.
438
- - `Ecoportal::API::Common::Content::ArrayModel` on initialize, default `doc` should be an `Array`
525
+
526
+ - `Ecoportal::API::V2::Page::Sections`
527
+ - `weight` fixing should only happen on entire page, **not** on stage sections that could change the order of section shared with other stages
528
+ - `#scope_weight` was not excluding the section when using `weight` of the last one
529
+ - Several classes with `embeds_many` were performing the `ordering` of those elements in the wrong way
530
+ - `Ecoportall::API::Common::Content::DoubleModel`
531
+ - `#replace_original_doc` had a couple of typos
532
+ - `#replace_doc` should only remove the variable referring to the current object and only if `new_doc` is `nil`
533
+ - `Ecoportal::API::Common::Content::CollectionModel` on insertion and deletion it was removing instance variable objects.
534
+ - There was no need for this approach, as the only necessary thing is to just keep those variable instances up to date in the correct unique access point to do so.
535
+ - Aside note: the reason why this was initially designed this way is because there were some difficulties to identify the existing elements in the subjacent model. Once `#passkey` as added, this difficulty could be overcome.
536
+ - `Ecoportal::API::Common::Content::ArrayModel` on initialize, default `doc` should be an `Array`
439
537
 
440
538
  ## [0.8.12] - 2021-08-30
441
539
 
442
540
  ### Added
443
- - `Ecoportal::API::V2::Pages::PageStage#current_stage`
541
+
542
+ - `Ecoportal::API::V2::Pages::PageStage#current_stage`
444
543
 
445
544
  ### Fixed
446
- - `Ecoportal::API::Common::Content::DocHelpers#get_body` typo and wrong parameters on call.
447
- - `Ecoportal::API::V2::Pages#update` should always return `Result` object.
448
- - `Ecoportal::API::V2::Registers#search` was not using `cursor_id` to iterate.
545
+
546
+ - `Ecoportal::API::Common::Content::DocHelpers#get_body` typo and wrong parameters on call.
547
+ - `Ecoportal::API::V2::Pages#update` should always return `Result` object.
548
+ - `Ecoportal::API::V2::Registers#search` was not using `cursor_id` to iterate.
449
549
 
450
550
  ## [0.8.11] - 2021-08-27
451
551
 
452
552
  ### Added
453
- - `Ecoportal::API::V2::Page#stages?`
454
- - `Ecoportal::API::V2::Pages::PageStage#current_stage_id`
455
- - `Ecoportal::API::V2::Registers#search` added option keyed parameter `:only_first`
456
- - which will make the method return the first `Ecoportal::API::V2::Registers::SearchResults`
457
- - This has been **added** with the aim of knowing how many results out of how many entries.
458
553
 
459
- ### Changed
460
- - `Ecoportal::API::V2::Pages::PageStage#update` won't update unless there's something to update.
554
+ - `Ecoportal::API::V2::Page#stages?`
555
+ - `Ecoportal::API::V2::Pages::PageStage#current_stage_id`
556
+ - `Ecoportal::API::V2::Registers#search` added option keyed parameter `:only_first`
557
+ - which will make the method return the first `Ecoportal::API::V2::Registers::SearchResults`
558
+ - This has been **added** with the aim of knowing how many results out of how many entries.
461
559
 
462
- ### Fixed
560
+ ### Changed
463
561
 
562
+ - `Ecoportal::API::V2::Pages::PageStage#update` won't update unless there's something to update.
464
563
 
465
564
  ## [0.8.10] - 2021-08-22
466
565
 
467
566
  ### Added
468
- - `Ecoportal::API::Common::Content::CollectionModel#[]` now supports position as well
469
- - `Ecoportal::API::V2::Page::Component::FilesField#add_file`: support for adding files
470
- - `Ecoportal::API::V2::Page::Component::PeopleField#viewable_fields`: support for managing `viewable_fields`
567
+
568
+ - `Ecoportal::API::Common::Content::CollectionModel#[]` now supports position as well
569
+ - `Ecoportal::API::V2::Page::Component::FilesField#add_file`: support for adding files
570
+ - `Ecoportal::API::V2::Page::Component::PeopleField#viewable_fields`: support for managing `viewable_fields`
471
571
 
472
572
  ### Changed
473
573
 
474
574
  ### Fixed
475
- - `Ecoportal::API::V2::Page::Component::FilesField`: was not requiring `File`
476
- - `Ecoportal::API::V2::Page::Component::NumberField#value`: it was missing :/
477
- - `Ecoportal::API::Common::Content::HashDiffPatch` did not support nested objects in Arrays, where the nested object wouldn't have a `patch_ver`. This **fix** allows for it
478
- - `Ecoportal::API::Common::Content::DoubleModel.passforced` to define `methods` that should always be present. This allows to define `patch_ver` as a forced `key` in models that have it
479
- - The enforcement (`self.class.enforce!`) happens on `initialize`
480
- - `passenforced` subjacent model `forced_model_keys` is inheritable
481
- - `Ecoportal::API::Common::Content::CollectionModel`:
482
- - Method `upsert!` was not working fine the parameters `pos`, `before` and `after`
483
- - Method `delete!` did not support position
575
+
576
+ - `Ecoportal::API::V2::Page::Component::FilesField`: was not requiring `File`
577
+ - `Ecoportal::API::V2::Page::Component::NumberField#value`: it was missing :/
578
+ - `Ecoportal::API::Common::Content::HashDiffPatch` did not support nested objects in Arrays, where the nested object wouldn't have a `patch_ver`. This **fix** allows for it
579
+ - `Ecoportal::API::Common::Content::DoubleModel.passforced` to define `methods` that should always be present. This allows to define `patch_ver` as a forced `key` in models that have it
580
+ - The enforcement (`self.class.enforce!`) happens on `initialize`
581
+ - `passenforced` subjacent model `forced_model_keys` is inheritable
582
+ - `Ecoportal::API::Common::Content::CollectionModel`:
583
+ - Method `upsert!` was not working fine the parameters `pos`, `before` and `after`
584
+ - Method `delete!` did not support position
484
585
 
485
586
  ## [0.8.9] - 2021-08-16
486
587
 
487
588
  ### Added
488
- - `Ecoportal::API::Common::Content::ModelHelpers`
489
- - Starting with `#same_string?`, this lib aims to offer a full set of helper comparers.
490
- - `Ecoportal::API::V2::Page::Components#get_by_id`
491
- - In future changes, method `[]` might be overriding the method of the parent class `CollectionModel`.
492
- - `Ecoportal::API::V2::Page::PermissionFlags` to offer support to `can_permission`, `subscribed`, etc.
493
- - `Ecoportal::API::V2::Page::Section#add_component` super handy helper to add fields to sections.
494
- - `Ecoportal::API::V2::Page::Component::PeopleField#delete` to remove people using their ids.
495
- - `Ecoportal::API::V2::Page::Component::GeoField` **added** suport for `#coordinates`
496
- - With embedded object `Ecoportal::API::V2::Page::Component::GeoCoordinates`
497
- - `#configure` method, to all the `Component` types (but `ChartField` s)
498
- - This method allows to quickly set field properties.
499
- - `Ecoportal::API::V2::Page::Sections#between`, aiming to obtain sections between two other ones
500
589
 
590
+ - `Ecoportal::API::Common::Content::ModelHelpers`
591
+ - Starting with `#same_string?`, this lib aims to offer a full set of helper comparers.
592
+ - `Ecoportal::API::V2::Page::Components#get_by_id`
593
+ - In future changes, method `[]` might be overriding the method of the parent class `CollectionModel`.
594
+ - `Ecoportal::API::V2::Page::PermissionFlags` to offer support to `can_permission`, `subscribed`, etc.
595
+ - `Ecoportal::API::V2::Page::Section#add_component` super handy helper to add fields to sections.
596
+ - `Ecoportal::API::V2::Page::Component::PeopleField#delete` to remove people using their ids.
597
+ - `Ecoportal::API::V2::Page::Component::GeoField` **added** suport for `#coordinates`
598
+ - With embedded object `Ecoportal::API::V2::Page::Component::GeoCoordinates`
599
+ - `#configure` method, to all the `Component` types (but `ChartField` s)
600
+ - This method allows to quickly set field properties.
601
+ - `Ecoportal::API::V2::Page::Sections#between`, aiming to obtain sections between two other ones
501
602
 
502
603
  ### Changed
503
- - `Ecoportal::API::V2::Page::Section` real support for `split` sections (right vs left)
504
- - This is actually a **FIX**
505
- - `Ecoportal::API::V2::Page::Component::DateField#create_event`
506
- - Now it switches to _allow future dates_
507
- - `Ecoportal::API::V2::Page::Component::SelectionField#add_option`, the `name` parameter is now optional
508
- - This change aims to make it consistent with the back-end.
509
- - To its actual `Boolean` type some properties
510
- - All `Component` types
604
+
605
+ - `Ecoportal::API::V2::Page::Section` real support for `split` sections (right vs left)
606
+ - This is actually a **FIX**
607
+ - `Ecoportal::API::V2::Page::Component::DateField#create_event`
608
+ - Now it switches to _allow future dates_
609
+ - `Ecoportal::API::V2::Page::Component::SelectionField#add_option`, the `name` parameter is now optional
610
+ - This change aims to make it consistent with the back-end.
611
+ - To its actual `Boolean` type some properties
612
+ - All `Component` types
511
613
 
512
614
  ### Fixed
513
- - `Ecoportal::API::Common::Content::HashDiffPatch` did not support `Hash` values without `id` or `patch_ver`
514
- - This fix should allow them to flow to the update
515
- - `Ecoportal::API::V2::Page::Component::ChartField` did not have `doc` for `mode` based configuration
516
- - `Ecoportal::API::Common::Content::ArrayModel#insert_one`
517
- - When `pos`, `before` & `after` were `nil` it was failing to attach the element.
518
- - `Ecoportal::API::V2::Page::Sections#add` was not adding in the correct order
519
- - `Ecoportal::API::V2::Page::Section.new_doc` was unnecessarily giving `9999` as default weight
615
+
616
+ - `Ecoportal::API::Common::Content::HashDiffPatch` did not support `Hash` values without `id` or `patch_ver`
617
+ - This fix should allow them to flow to the update
618
+ - `Ecoportal::API::V2::Page::Component::ChartField` did not have `doc` for `mode` based configuration
619
+ - `Ecoportal::API::Common::Content::ArrayModel#insert_one`
620
+ - When `pos`, `before` & `after` were `nil` it was failing to attach the element.
621
+ - `Ecoportal::API::V2::Page::Sections#add` was not adding in the correct order
622
+ - `Ecoportal::API::V2::Page::Section.new_doc` was unnecessarily giving `9999` as default weight
520
623
 
521
624
  ## [0.8.8] - 2021-08-03
522
625
 
523
626
  ### Added
524
- - `Ecoportal::API::V2::Page::Component::ChartField::Benchmark`
525
- - Support to convert selection options between numeric and text type.
526
- - Add `Permit` object to `Page` and `Stage`
627
+
628
+ - `Ecoportal::API::V2::Page::Component::ChartField::Benchmark`
629
+ - Support to convert selection options between numeric and text type.
630
+ - Add `Permit` object to `Page` and `Stage`
527
631
 
528
632
  ### Changed
529
- - Removed `Stages.ordered_stages`: detected bug with Enumerable iteration
530
633
 
634
+ - Removed `Stages.ordered_stages`: detected bug with Enumerable iteration
531
635
 
532
636
  ## [0.8.7] - 2021-05-25
533
637
 
534
638
  ### Changed
535
- - Upgrade `ecoportal-api` gem
639
+
640
+ - Upgrade `ecoportal-api` gem
536
641
 
537
642
  ### Fixed
538
- - Requiring `api/common` from 2 different ends
643
+
644
+ - Requiring `api/common` from 2 different ends
539
645
 
540
646
  ## [0.8.6] - 2021-02-23
541
647
 
542
648
  ### Added
543
- - `Ecoportal::API::V2::Page::Component::SelectionField` added methods `#numeric!` `#text!`
649
+
650
+ - `Ecoportal::API::V2::Page::Component::SelectionField` added methods `#numeric!` `#text!`
544
651
 
545
652
  ## [0.8.5] - 2021-02-22
546
653
 
547
654
  ### Changed
548
- - upgrade
549
655
 
656
+ - upgrade
550
657
 
551
658
  ## [0.8.4] - 2021-02-22
552
659
 
553
660
  ### Changed
554
- - roll back `ecoportal-api` dependency
661
+
662
+ - roll back `ecoportal-api` dependency
555
663
 
556
664
  ## [0.8.3] - 2021-02-22
557
665
 
558
666
  ### Changed
559
- - updated `rspec` for expected patch data on `delete` operation.
667
+
668
+ - updated `rspec` for expected patch data on `delete` operation.
560
669
 
561
670
  ### Fixed
562
- - More specific namespace path for `Internal::People` namespace
671
+
672
+ - More specific namespace path for `Internal::People` namespace
563
673
 
564
674
  ## [0.8.2] - 2021-02-21
565
675
 
566
676
  ### Changed
567
- - some necessary changes for the new gem to be active
677
+
678
+ - some necessary changes for the new gem to be active
568
679
 
569
680
  ## [0.8.1] - 2021-02-21
570
681
 
571
682
  ### Changed
572
- - renamed parameters (backwards incompatible change):
573
- - `Ecoportal::API::V2::Pages::Stages` methods `#get` and `#update`
574
- - updated `Ecoportal::API::V2::Pages#` accordingly
575
683
 
576
- ## MOVED TO GEM `ecoportal-api-v2` ##
684
+ - renamed parameters (backwards incompatible change):
685
+ - `Ecoportal::API::V2::Pages::Stages` methods `#get` and `#update`
686
+ - updated `Ecoportal::API::V2::Pages#` accordingly
687
+
688
+ ## MOVED TO GEM `ecoportal-api-v2`
577
689
 
578
690
  ## [0.7.5] - 2021-02-21
579
691
 
580
692
  ### Added
581
- - `Ecoportal::API::Common::ClassHelpers` added inheritable attribute values
582
- - `Ecoportal::API::V2::Pages::PageStage` added missing properties
583
- - `Ecoportal::API::V2::Page::Stages#ordered_stages` method to obtain stages in order
584
- - `Ecoportal::API::V2::Registers#search` method search pages in the register, which includes new classes:
585
- - `Ecoportal::API::V2::Registers::PageResult`
586
- - `Ecoportal::API::V2::Registers::StagesResult`
587
- - `Ecoportal::API::V2::Registers::StageResult`
588
- - `Ecoportal::API::V2::Pages#get` added parameter `stage_id:` to be able to directly obtain the stage
693
+
694
+ - `Ecoportal::API::Common::ClassHelpers` added inheritable attribute values
695
+ - `Ecoportal::API::V2::Pages::PageStage` added missing properties
696
+ - `Ecoportal::API::V2::Page::Stages#ordered_stages` method to obtain stages in order
697
+ - `Ecoportal::API::V2::Registers#search` method search pages in the register, which includes new classes:
698
+ - `Ecoportal::API::V2::Registers::PageResult`
699
+ - `Ecoportal::API::V2::Registers::StagesResult`
700
+ - `Ecoportal::API::V2::Registers::StageResult`
701
+ - `Ecoportal::API::V2::Pages#get` added parameter `stage_id:` to be able to directly obtain the stage
589
702
 
590
703
  ### Changed
591
- - Moved some classes to the new namespace `Ecoportal::API::V2::Registers`
592
- - `Ecoportal::API::V2::Registers::Register`
593
- - `Ecoportal::API::V2::Registers::Template`
704
+
705
+ - Moved some classes to the new namespace `Ecoportal::API::V2::Registers`
706
+ - `Ecoportal::API::V2::Registers::Register`
707
+ - `Ecoportal::API::V2::Registers::Template`
594
708
 
595
709
  ### Fixed
596
- - `Ecoportal::API::Common::Content::HashDiffPatch`: `deleted` operation wording and `data.patch_ver`
597
- - `Ecoportal::API::V2::Page::Component.new_doc` should delegate to child classes that have their own implementation
598
- - `Ecoportal::API::V2::Page::Component::ImagesField.new_doc` should include `layout`
599
- - `Ecoportal::API::V2::Page::Component::SignatureField.new_doc` should include `color`
710
+
711
+ - `Ecoportal::API::Common::Content::HashDiffPatch`: `deleted` operation wording and `data.patch_ver`
712
+ - `Ecoportal::API::V2::Page::Component.new_doc` should delegate to child classes that have their own implementation
713
+ - `Ecoportal::API::V2::Page::Component::ImagesField.new_doc` should include `layout`
714
+ - `Ecoportal::API::V2::Page::Component::SignatureField.new_doc` should include `color`
600
715
 
601
716
  ## [0.7.4] - 2021-02-12
602
717
 
603
718
  ### Added
604
- - `Ecoportal::API::V2::Page::Component::GaugeStop#color=` enabled setting colours using a `symbol`
605
- - `:blue`, `:blue_greyed`, `:blue_light`
606
- - `:turquoise`, `:jade`, `:green`, `:pistachio`, `:avocado`
607
- - `:yellow`, `:orange`, `:pumpkin`, `:red`, `:magenta`, `:fuchsia`, `:purple`, `:violet`
608
- - `Ecoportal::API::V2::Page::Component::GaugeStop#color_sym` to get the color as `symbol` name
609
- - added support for chart fields:
610
- - `Ecoportal::API::V2::Page::Component::ChartField` with the different `mode` types
611
- - `Ecoportal::API::V2::Page::Component::ChartFrField` (LTIFR)
719
+
720
+ - `Ecoportal::API::V2::Page::Component::GaugeStop#color=` enabled setting colours using a `symbol`
721
+ - `:blue`, `:blue_greyed`, `:blue_light`
722
+ - `:turquoise`, `:jade`, `:green`, `:pistachio`, `:avocado`
723
+ - `:yellow`, `:orange`, `:pumpkin`, `:red`, `:magenta`, `:fuchsia`, `:purple`, `:violet`
724
+ - `Ecoportal::API::V2::Page::Component::GaugeStop#color_sym` to get the color as `symbol` name
725
+ - added support for chart fields:
726
+ - `Ecoportal::API::V2::Page::Component::ChartField` with the different `mode` types
727
+ - `Ecoportal::API::V2::Page::Component::ChartFrField` (LTIFR)
612
728
 
613
729
  ### Changed
614
- - `Ecoportal::API::Page::Component::DateField` Date objects + Timezones
615
- - `#value` should be shown in local time
616
- - `#value=` should be set by local time
617
- - `Ecoportal::API::Common::Content::DoubleModel.embeds_multiple` renamed to `embeds_many`
618
- - `Ecoportal::API::Common::Content::DoubleModel.embeds_one` removed parameter `:multiple`
619
- - Fields under `Ecoportal::API::Page::Component` that `embeds_many` should generate new elements in a standard way
620
- - added `Ecoportal::API::Common::Content::CollectionModel#items_class` method
730
+
731
+ - `Ecoportal::API::Page::Component::DateField` Date objects + Timezones
732
+ - `#value` should be shown in local time
733
+ - `#value=` should be set by local time
734
+ - `Ecoportal::API::Common::Content::DoubleModel.embeds_multiple` renamed to `embeds_many`
735
+ - `Ecoportal::API::Common::Content::DoubleModel.embeds_one` removed parameter `:multiple`
736
+ - Fields under `Ecoportal::API::Page::Component` that `embeds_many` should generate new elements in a standard way
737
+ - added `Ecoportal::API::Common::Content::CollectionModel#items_class` method
621
738
 
622
739
  ### Fixed
623
- - solved `pretty_print` name collision renaming to `Ecoportal::API::Common::Content::DoubleModel#print_pretty`
740
+
741
+ - solved `pretty_print` name collision renaming to `Ecoportal::API::Common::Content::DoubleModel#print_pretty`
624
742
 
625
743
  ## [0.7.3] - 2021-02-01
626
744
 
627
745
  ### Added
628
- - `Ecoportal::API::Common::Content::CollectionModel#delete!` finally scoped how delete should work :)
629
- - `Ecoportal::API::V2.new` better feedback on key error.
630
- - `Ecoportal::API::V2::Page::Component::SignatureField` added property `signed_by_name`
631
- - `Ecoportal::API::V2::Page::Component#required` this field property is currently supported
632
- - `Ecoportal::API::V2::Page::Component::DateField` more supported properties:
633
- * `show_time`, `today_button`, `past_only`, `create_event`, `remind_me_in`, `renews`, `renews_every`, `renews_unit`, `renews_until`
634
- - `Ecoportal::API::V2::Page::Component::ChecklistField`
635
- * added more methods: `add_item`, `ordered_items`
636
- - `Ecoportal::API::V2::Page::Component::GaugeField`
637
- * more supported properties: `max`, `active_color` and `stops`
638
- - for `stops` added class `Ecoportal::API::V2::Page::Component::GaugeStop`
639
- * added more methods: `add_stop`, `ordered_stops`
640
- - `Ecoportal::API::V2::Page::Component::ReferenceField` more supported properties:
641
- * `register_id`, `hide_create`, `hide_attach`, `hide_metadata`, `hide_dashboards`, `display_fields`, `display_fields_in_lookup`
642
- - `Ecoportal::API::V2::Page::Component::ActionField`
643
- * more supported properties:`create_actions`, `required_number_of_completed_actions`, `permits_and_rules_integration`, `add_subscribed`, `add_subscribed_to_tasks`
644
- * added more methods: `add_task`, `ordered_tasks`
645
- - `Ecoportal::API::V2::Page::Component::Action` modified, provided that some properties are `read_only`
646
- - `Ecoportal::API::V2::Page::Component::PeopleField` more supported properties:
647
- * `is_me_button`, `attach_mode`, `person_schema_id`, `viewable_fields`, `singular`, `requires_number`, `cached_people`, `attached_people_permissions_enabled`, `apply_attached_people_permissions_to`, `attached_people_permissions_editable`, `attached_people_permissions_flags`
648
- - `Ecoportal::API::V2::Page::Component::PlainTextField` more supported properties:
649
- * `multiline`, `max_length`, `exact_index`
650
- - `Ecoportal::API::V2::Page::Component::SelectionField` more supported properties:
651
- * `flat`
652
- - `Ecoportal::API::V2::Page::Component::TagField` more supported properties:
653
- * `single_select`, `use_defaults`, `tag_tree_id`, `button_text`
654
- - `Ecoportal::API::V2::Page::Section` more supported properties:
655
- * `minimized`
656
-
657
- ### Changed
658
- - upgraded `ecoportal-api` dependency
659
-
660
- ### Fixed
661
- - `Ecoportal::API::Common::Content::CollectionModel#upsert!` was not actually moving the element to the new position when it already existed
746
+
747
+ - `Ecoportal::API::Common::Content::CollectionModel#delete!` finally scoped how delete should work :)
748
+ - `Ecoportal::API::V2.new` better feedback on key error.
749
+ - `Ecoportal::API::V2::Page::Component::SignatureField` added property `signed_by_name`
750
+ - `Ecoportal::API::V2::Page::Component#required` this field property is currently supported
751
+ - `Ecoportal::API::V2::Page::Component::DateField` more supported properties:
752
+ - `show_time`, `today_button`, `past_only`, `create_event`, `remind_me_in`, `renews`, `renews_every`, `renews_unit`, `renews_until`
753
+ - `Ecoportal::API::V2::Page::Component::ChecklistField`
754
+ - added more methods: `add_item`, `ordered_items`
755
+ - `Ecoportal::API::V2::Page::Component::GaugeField`
756
+ - more supported properties: `max`, `active_color` and `stops`
757
+ - for `stops` added class `Ecoportal::API::V2::Page::Component::GaugeStop`
758
+ - added more methods: `add_stop`, `ordered_stops`
759
+ - `Ecoportal::API::V2::Page::Component::ReferenceField` more supported properties:
760
+ - `register_id`, `hide_create`, `hide_attach`, `hide_metadata`, `hide_dashboards`, `display_fields`, `display_fields_in_lookup`
761
+ - `Ecoportal::API::V2::Page::Component::ActionField`
762
+ - more supported properties:`create_actions`, `required_number_of_completed_actions`, `permits_and_rules_integration`, `add_subscribed`, `add_subscribed_to_tasks`
763
+ - added more methods: `add_task`, `ordered_tasks`
764
+ - `Ecoportal::API::V2::Page::Component::Action` modified, provided that some properties are `read_only`
765
+ - `Ecoportal::API::V2::Page::Component::PeopleField` more supported properties:
766
+ - `is_me_button`, `attach_mode`, `person_schema_id`, `viewable_fields`, `singular`, `requires_number`, `cached_people`, `attached_people_permissions_enabled`, `apply_attached_people_permissions_to`, `attached_people_permissions_editable`, `attached_people_permissions_flags`
767
+ - `Ecoportal::API::V2::Page::Component::PlainTextField` more supported properties:
768
+ - `multiline`, `max_length`, `exact_index`
769
+ - `Ecoportal::API::V2::Page::Component::SelectionField` more supported properties:
770
+ - `flat`
771
+ - `Ecoportal::API::V2::Page::Component::TagField` more supported properties:
772
+ - `single_select`, `use_defaults`, `tag_tree_id`, `button_text`
773
+ - `Ecoportal::API::V2::Page::Section` more supported properties:
774
+ - `minimized`
775
+
776
+ ### Changed
777
+
778
+ - upgraded `ecoportal-api` dependency
779
+
780
+ ### Fixed
781
+
782
+ - `Ecoportal::API::Common::Content::CollectionModel#upsert!` was not actually moving the element to the new position when it already existed
662
783
 
663
784
  ## [0.7.2] - 2020-10-07
664
785
 
665
786
  ### Added
666
- - automatic key builder
667
- - helper: `Ecoportal::API::V2::v2key` method
668
- - `user_key:` and `org_key:` as constructor methods for `Ecoportal::API::V2`
787
+
788
+ - automatic key builder
789
+ - helper: `Ecoportal::API::V2::v2key` method
790
+ - `user_key:` and `org_key:` as constructor methods for `Ecoportal::API::V2`
669
791
 
670
792
  ## [0.7.1] - 2020-10-07
671
793
 
672
794
  ### Changed
673
- - updated dependencies
795
+
796
+ - updated dependencies
674
797
 
675
798
  ## [0.7.0] - 2020-09-10
676
799
 
677
800
  ### Changed
678
- - updated dependencies
801
+
802
+ - updated dependencies
679
803
 
680
804
  ## [0.6.1] - 2020-07-11
681
805
 
682
806
  ### Added
683
- - `Ecoportal::API::Common::Content::DoubleModel#pretty_print`
807
+
808
+ - `Ecoportal::API::Common::Content::DoubleModel#pretty_print`
684
809
 
685
810
  ## [0.6.0] - 2020-07-11
686
811
 
687
812
  ### Changed
688
- - upgraded `ecoportal-api` gem
813
+
814
+ - upgraded `ecoportal-api` gem
689
815
 
690
816
  ## [0.5.9] - 2020-07-02
691
817
 
692
818
  ### Added
693
- - helper `Ecoportal::API::Common::Content::StringDigest#indexable_label`: to see the part of a label that gets indexed
694
- - this `CHANGELOG.md` file
819
+
820
+ - helper `Ecoportal::API::Common::Content::StringDigest#indexable_label`: to see the part of a label that gets indexed
821
+ - this `CHANGELOG.md` file