structures 1.0.0
structures: ^1.0.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.0.0 #
Fixed
LiveValue.updatenow 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.
FailureMessageclass to hold reason and suggestion for a failure.LiveFailureMessageextension toValuethat holdsFailureMessage.FailureOriginclass to hold the origin of a failure for context, and logging.Fieldclass to define properties of a field, like label, hint, etc.ValidatableFieldinterface to define a field that can be validated.
Changed
Validationnow hasSuccessandFailureas subclasses.Sucess("data")is nowSuccess(data: "data"), data is now a named parameter.Failureis now complete concrete class, no longer abstract, just likeSuccess.Eitheris now a full either monad.Emptiableis now has aisDefinedandisUndefinemethods, and anoneconstant.Timeis nowRealTimeextension.
Removed
IdentityExtensionis now removed, as it is not needed anymore.
0.0.14 #
04/01/2023 #
Changed
Live.listennow default to notifying if notified.- Added a
runOnAttachtoLive.listento explicitly turn on running when the listener is first added. ChoiceListnow allows any arbitrary list of items, not need to extendAChoice.
Added
VoidCallackValueObserverCallbackValueConsumerCallbackValue.onValuemethod, that enables adding a listener that takes the new changed value.Value.onValuemethod, 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.valueandupdate.LiveValue<Map<I,T>>extensions that give Map mutating methods/fields without.valueandupdate.
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 #
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.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.2 #
21/11/2022 #
Added
- Selectable class interface
asSelectedasUnSelectedisSelectedtoggle
- SelectableList class
select(index)unSelect(index)toggle(index)
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