structures 1.4.0 copy "structures: ^1.4.0" to clipboard
structures: ^1.4.0 copied to clipboard

Commonly used standalone data structures, types and extensions that simplify application logic development.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.4.0 #

Released on 14/09/2023 #

Changed

  • FieldValue is now a Entry instead. to minimize confusion with Value.
  • FieldDate is now a DateEntry instead.
  • FieldText is now a TextEntry instead.

1.3.2 #

Released on 29/08/2023 #

Fixed

  • Missing deepEquals.

1.3.1 #

Released on 25/08/2023 #

Updated

  • Removed unnecessary dependencies.

1.3.0 #

Released on 25/08/2023 #

Updated

  • Improved the LiveValue implementation by switching from Validation to the Either data type
  • Enhanced error handling capabilities.
  • Enhanced the titleCase function to handle both snake case and camel case inputs, improving naming consistency.

Changed

  • Streamlined the Failure structure for simplicity. It now contains only the fields reason and suggestion.
  • This change increases readability and maintainability of failure handling.
  • Added properties of FailureOrigin directly to Failure for a more direct error tracing approach.

Removed

  • Eliminated unnecessary FailureMessage and FailureOrigin types,
  • Consolidated failure-related information into the simplified Failure type.

1.2.0 #

27/06/2023 #

Updated

  • New structure for structure package.
  • Updated structure package to use Either instead of Validation.
  • Updated readme.

1.1.1 #

21/02/2023 #

Fixed

  • Removed old references from Readme
  • updated readme

1.1.0 #

21/02/2023 #

Fixed

  • Changelog versioning

Changed

  • Field now has a name property, and label can show * when the field isRequired.
  • Success has been removed from Validation, as it is no longer required with use of Either.
  • ValidableField and Validatable are also removed as they are no longer required.
  • AdapterFactory is now ModelFactory.

Added

  • Model class to define a model.

1.0.0 #

13/02/2023 #

Fixed

  • LiveValue.update now uses deep equality to check if the value has changed. This fixes a bug where the value was updated even if the value was the same.

Added

  • Better documentation of classes and methods.
  • FailureMessage class to hold reason and suggestion for a failure.
  • LiveFailureMessage extension to Value that holds FailureMessage.
  • FailureOrigin class to hold the origin of a failure for context, and logging.
  • Field class to define properties of a field, like label, hint, etc.
  • ValidatableField interface to define a field that can be validated.

Changed

  • Validation now has Success and Failure as subclasses.
  • Sucess("data") is now Success(data: "data"), data is now a named parameter.
  • Failure is now complete concrete class, no longer abstract, just like Success.
  • Either is now a full either monad.
  • Emptiable is now has a isDefined and isUndefine methods, and a none constant.
  • Time is now RealTime extension.

Removed

  • IdentityExtension is now removed, as it is not needed anymore.

0.1.0 #

24/01/2023 #

Changed

  • Upgraded Validation.
  • updated validatable.
  • updated documentation.

0.0.14 #

04/01/2023 #

Changed

  • Live.listen now default to notifying if notified.
  • Added a runOnAttach to Live.listen to explicitly turn on running when the listener is first added.
  • ChoiceList now allows any arbitrary list of items, not need to extend AChoice.

Added

  • VoidCallack
  • ValueObserverCallback
  • ValueConsumerCallback
  • Value.onValue method, that enables adding a listener that takes the new changed value.
  • Value.onValue method, that enables adding a listener that takes the oldValue and the new changed value.
  • Value<List<T>> extensions that provide list accessors methods/fields without .value.
  • Value<Map<I,T>> extensions that provide Map accessors methods/fields without .value.
  • LiveValue<List<T>> extensions that give list mutating methods/fields without .value and update.
  • LiveValue<Map<I,T>> extensions that give Map mutating methods/fields without .value and update.

0.0.13 #

07/12/2022 #

Changed

  • LiveValue to never be const to avoid literal overwrite bug

Added

  • An experimental api for turn any list of items into a ChoiceList

0.0.12 #

30/11/2022 #

Changed

  • Fixes wrong index

0.0.12 #

30/11/2022 #

Fixed

  • Fixes wrong index, value shared update

0.0.11 #

28/11/2022 #

Fixed

  • ChoiceList double updates bug

Added

  • Live ChoiceList index for observing currently selected index

0.0.10 #

28/11/2022 #

Fixed

  • ChoiceList double updates bug

Added

  • Live ChoiceList index for observing currently selected index

0.0.9 #

28/11/2022 #

Updated

  • Make Choice observable by default
  • Improved Choice list usage info

Added

  • Experimental Memory object
  • More tests

0.0.8 #

27/11/2022 #

Fixed

  • Choice generics

0.0.7 #

27/11/2022 #

Updated

  • Choice, to add reactive properties
  • ChoiceList , to add new Choice

0.0.6 #

24/11/2022 #

Added

  • Update docs

0.0.5 #

24/11/2022 #

Added

  • Choice abstract class
  • ChoiceList fix length List<T> implementation
  • Added ChoiceList methods to use on Choice item with a given id
    • select(id)
    • unselect(id)
    • toggle(id)
    • get(id)
  • Added ChoiceList methods to use on Choice item at a given index
    • selectIndex(index)
    • unselectIndex(index)
    • toggleIndex(index)

0.0.4 #

23/11/2022 #

Added

  • Choice
  • ChoiceList

0.0.3 #

21/11/2022 #

Added

  • Choice

0.0.2 #

21/11/2022 #

Added

  • Selectable class interface
    • asSelected
    • asUnSelected
    • isSelected
    • toggle
  • SelectableList class
    • select(index)
    • unSelect(index)
    • toggle(index)

0.0.1 #

20/11/2022 #

Added

  • Selectable structure for dealing with selectable Lists

0.0.0-dev.2 #

31/10/2022 #

Changed

  • Collection version number

0.0.0-dev.1 #

31/10/2022 #

Added

  • Initial template scaffold.
  • GitHub workflow
  • String Validator
  • Adapter Factory
  • Either
  • Emptiable interface
  • Live listenable interface
  • List extension including map2, map3 with index
  • LiveValue a reactive listenable with value
  • Generic notifier with const constructor
  • A simple (maybe simplistic 😄) Pair type
  • A Time module class
  • Validation module
  • Validatable interface
  • A Generic Value interface
  • Value Types interfaces
4
likes
130
points
176
downloads

Publisher

verified publisherluminucx.com

Weekly Downloads

Commonly used standalone data structures, types and extensions that simplify application logic development.

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

collection, intl, logger, meta

More

Packages that depend on structures