# Change Log All notable changes to this project will be documented in this file. ## [0.8.10] - 2021-08-xx ### Added - `Ecoportal::API::Common::Content::CollectionModel#[]` now supports position as well - `Ecoportal::API::V2::Page::Component::FilesField#add_file`: support for adding files - `Ecoportal::API::V2::Page::Component::PeopleField#viewable_fields`: support for managing `viewable_fields` ### Changed ### Fixed - `Ecoportal::API::V2::Page::Component::FilesField`: was not requiring `File` - `Ecoportal::API::V2::Page::Component::NumberField#value`: it was missing :/ - `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 - `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 - The enforcement (`self.class.enforce!`) happens on `initialize` - `passenforced` subjacent model `forced_model_keys` is inheritable - `Ecoportal::API::Common::Content::CollectionModel`: - Method `upsert!` was not working fine the parameters `pos`, `before` and `after` - Method `delete!` did not support position ## [0.8.9] - 2021-08-16 ### Added - `Ecoportal::API::Common::Content::ModelHelpers` - Starting with `#same_string?`, this lib aims to offer a full set of helper comparers. - `Ecoportal::API::V2::Page::Components#get_by_id` - In future changes, method `[]` might be overriding the method of the parent class `CollectionModel`. - `Ecoportal::API::V2::Page::PermissionFlags` to offer support to `can_permission`, `subscribed`, etc. - `Ecoportal::API::V2::Page::Section#add_component` super handy helper to add fields to sections. - `Ecoportal::API::V2::Page::Component::PeopleField#delete` to remove people using their ids. - `Ecoportal::API::V2::Page::Component::GeoField` **added** suport for `#coordinates` - With embedded object `Ecoportal::API::V2::Page::Component::GeoCoordinates` - `#configure` method, to all the `Component` types (but `ChartField` s) - This method allows to quickly set field properties. - `Ecoportal::API::V2::Page::Sections#between`, aiming to obtain sections between two other ones ### Changed - `Ecoportal::API::V2::Page::Section` real support for `split` sections (right vs left) - This is actually a **FIX** - `Ecoportal::API::V2::Page::Component::DateField#create_event` - Now it switches to _allow future dates_ - `Ecoportal::API::V2::Page::Component::SelectionField#add_option`, the `name` parameter is now optional - This change aims to make it consistent with the back-end. - To its actual `Boolean` type some properties - All `Component` types ### Fixed - `Ecoportal::API::Common::Content::HashDiffPatch` did not support `Hash` values without `id` or `patch_ver` - This fix should allow them to flow to the update - `Ecoportal::API::V2::Page::Component::ChartField` did not have `doc` for `mode` based configuration - `Ecoportal::API::Common::Content::ArrayModel#insert_one` - When `pos`, `before` & `after` were `nil` it was failing to attach the element. - `Ecoportal::API::V2::Page::Sections#add` was not adding in the correct order - `Ecoportal::API::V2::Page::Section.new_doc` was unnecessarily giving `9999` as default weight ## [0.8.8] - 2021-08-03 ### Added - `Ecoportal::API::V2::Page::Component::ChartField::Benchmark` - Support to convert selection options between numeric and text type. - Add `Permit` object to `Page` and `Stage` ### Changed - Removed `Stages.ordered_stages`: detected bug with Enumerable iteration ## [0.8.7] - 2021-05-25 ### Changed - Upgrade `ecoportal-api` gem ### Fixed - Requiring `api/common` from 2 different ends ## [0.8.6] - 2021-02-23 ### Added - `Ecoportal::API::V2::Page::Component::SelectionField` added methods `#numeric!` `#text!` ## [0.8.5] - 2021-02-22 ### Changed - upgrade ## [0.8.4] - 2021-02-22 ### Changed - roll back `ecoportal-api` dependency ## [0.8.3] - 2021-02-22 ### Changed - updated `rspec` for expected patch data on `delete` operation. ### Fixed - More specific namespace path for `Internal::People` namespace ## [0.8.2] - 2021-02-21 ### Changed - some necessary changes for the new gem to be active ## [0.8.1] - 2021-02-21 ### Changed - renamed parameters (backwards incompatible change): - `Ecoportal::API::V2::Pages::Stages` methods `#get` and `#update` - updated `Ecoportal::API::V2::Pages#` accordingly ## MOVED TO GEM `ecoportal-api-v2` ## ## [0.7.5] - 2021-02-21 ### Added - `Ecoportal::API::Common::ClassHelpers` added inheritable attribute values - `Ecoportal::API::V2::Pages::PageStage` added missing properties - `Ecoportal::API::V2::Page::Stages#ordered_stages` method to obtain stages in order - `Ecoportal::API::V2::Registers#search` method search pages in the register, which includes new classes: - `Ecoportal::API::V2::Registers::PageResult` - `Ecoportal::API::V2::Registers::StagesResult` - `Ecoportal::API::V2::Registers::StageResult` - `Ecoportal::API::V2::Pages#get` added parameter `stage_id:` to be able to directly obtain the stage ### Changed - Moved some classes to the new namespace `Ecoportal::API::V2::Registers` - `Ecoportal::API::V2::Registers::Register` - `Ecoportal::API::V2::Registers::Template` ### Fixed - `Ecoportal::API::Common::Content::HashDiffPatch`: `deleted` operation wording and `data.patch_ver` - `Ecoportal::API::V2::Page::Component.new_doc` should delegate to child classes that have their own implementation - `Ecoportal::API::V2::Page::Component::ImagesField.new_doc` should include `layout` - `Ecoportal::API::V2::Page::Component::SignatureField.new_doc` should include `color` ## [0.7.4] - 2021-02-12 ### Added - `Ecoportal::API::V2::Page::Component::GaugeStop#color=` enabled setting colours using a `symbol` - `:blue`, `:blue_greyed`, `:blue_light` - `:turquoise`, `:jade`, `:green`, `:pistachio`, `:avocado` - `:yellow`, `:orange`, `:pumpkin`, `:red`, `:magenta`, `:fuchsia`, `:purple`, `:violet` - `Ecoportal::API::V2::Page::Component::GaugeStop#color_sym` to get the color as `symbol` name - added support for chart fields: - `Ecoportal::API::V2::Page::Component::ChartField` with the different `mode` types - `Ecoportal::API::V2::Page::Component::ChartFrField` (LTIFR) ### Changed - `Ecoportal::API::Page::Component::DateField` Date objects + Timezones - `#value` should be shown in local time - `#value=` should be set by local time - `Ecoportal::API::Common::Content::DoubleModel.embeds_multiple` renamed to `embeds_many` - `Ecoportal::API::Common::Content::DoubleModel.embeds_one` removed parameter `:multiple` - Fields under `Ecoportal::API::Page::Component` that `embeds_many` should generate new elements in a standard way - added `Ecoportal::API::Common::Content::CollectionModel#items_class` method ### Fixed - solved `pretty_print` name collision renaming to `Ecoportal::API::Common::Content::DoubleModel#print_pretty` ## [0.7.3] - 2021-02-01 ### Added - `Ecoportal::API::Common::Content::CollectionModel#delete!` finally scoped how delete should work :) - `Ecoportal::API::V2.new` better feedback on key error. - `Ecoportal::API::V2::Page::Component::SignatureField` added property `signed_by_name` - `Ecoportal::API::V2::Page::Component#required` this field property is currently supported - `Ecoportal::API::V2::Page::Component::DateField` more supported properties: * `show_time`, `today_button`, `past_only`, `create_event`, `remind_me_in`, `renews`, `renews_every`, `renews_unit`, `renews_until` - `Ecoportal::API::V2::Page::Component::ChecklistField` * added more methods: `add_item`, `ordered_items` - `Ecoportal::API::V2::Page::Component::GaugeField` * more supported properties: `max`, `active_color` and `stops` - for `stops` added class `Ecoportal::API::V2::Page::Component::GaugeStop` * added more methods: `add_stop`, `ordered_stops` - `Ecoportal::API::V2::Page::Component::ReferenceField` more supported properties: * `register_id`, `hide_create`, `hide_attach`, `hide_metadata`, `hide_dashboards`, `display_fields`, `display_fields_in_lookup` - `Ecoportal::API::V2::Page::Component::ActionField` * more supported properties:`create_actions`, `required_number_of_completed_actions`, `permits_and_rules_integration`, `add_subscribed`, `add_subscribed_to_tasks` * added more methods: `add_task`, `ordered_tasks` - `Ecoportal::API::V2::Page::Component::Action` modified, provided that some properties are `read_only` - `Ecoportal::API::V2::Page::Component::PeopleField` more supported properties: * `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` - `Ecoportal::API::V2::Page::Component::PlainTextField` more supported properties: * `multiline`, `max_length`, `exact_index` - `Ecoportal::API::V2::Page::Component::SelectionField` more supported properties: * `flat` - `Ecoportal::API::V2::Page::Component::TagField` more supported properties: * `single_select`, `use_defaults`, `tag_tree_id`, `button_text` - `Ecoportal::API::V2::Page::Section` more supported properties: * `minimized` ### Changed - upgraded `ecoportal-api` dependency ### Fixed - `Ecoportal::API::Common::Content::CollectionModel#upsert!` was not actually moving the element to the new position when it already existed ## [0.7.2] - 2020-10-07 ### Added - automatic key builder - helper: `Ecoportal::API::V2::v2key` method - `user_key:` and `org_key:` as constructor methods for `Ecoportal::API::V2` ## [0.7.1] - 2020-10-07 ### Changed - updated dependencies ## [0.7.0] - 2020-09-10 ### Changed - updated dependencies ## [0.6.1] - 2020-07-11 ### Added - `Ecoportal::API::Common::Content::DoubleModel#pretty_print` ## [0.6.0] - 2020-07-11 ### Changed - upgraded `ecoportal-api` gem ## [0.5.9] - 2020-07-02 ### Added - helper `Ecoportal::API::Common::Content::StringDigest#indexable_label`: to see the part of a label that gets indexed - this `CHANGELOG.md` file