Commit Graph

59 Commits

Author SHA1 Message Date
Sancha Pereira 537a2f5e30 Support any type in the pushOrRemove array method 2018-08-24 16:48:47 +01:00
Sancha Pereira 1445408e11 Add new array method 2018-08-22 23:51:25 +01:00
Kai Moseley 5dccc991e0 refactor(interface): Move resetAll to top level 2018-06-13 09:47:14 +01:00
Kai Moseley db44dc69f5 feature(actions): Add reset all action 2018-06-13 09:31:37 +01:00
Kai Moseley 4925c77728 refactor(prettier): Apply prettier styling 2018-06-13 08:29:54 +01:00
Kai Moseley 4ff81b4035 feat(object-reducers): replace will now shallow merge with initial state 2017-10-17 17:28:25 +01:00
Kai Moseley 89ca4bf8fa feat(object-reducer): object reducer reset payloads can be provided
The payload for an object reset action will be applied on top of the default
state of an object.
2017-10-17 17:19:22 +01:00
Kai Moseley c0429059e8 fix(Object): Prevent removed wildcard object properties persisting when replacing/resetting 2017-09-01 11:44:22 +01:00
Kai Moseley 09e5b9c922 fix(object): retain deletions to properties/array elements 2017-08-08 16:10:41 +01:00
Kai Moseley 3afd314f5a 1.1.0 2017-08-07 08:29:46 +01:00
Kai Moseley cf0ed297a2 update batchUpdate to createCombinedAction 2017-08-07 08:25:43 +01:00
Kai Moseley 6bedb267da Implement batched updates and custom types 2017-08-06 18:06:01 +01:00
Kai Moseley a5875b273f feat(reducers): Introduce unique id to reducer actions 2017-05-07 19:01:32 +01:00
Kai Moseley a899de7144 fix(non-nested): Address issue where non-nested actions and selectors required nesting in return object 2017-05-07 18:25:26 +01:00
Kai Moseley b33e21d0b9 Prevent the wildcard key adding a default value 2017-02-27 17:26:53 +00:00
Kai Moseley bfa06ac17f Add wildcardKey type
Being able to type a known structure ahead of time is super useful. Sometimes, however, this isn't possible. What if
your application has an entirely dynamic portion, where you use data from the server to build, day, a form? In this situation
it'd be great to still be able to type. This commit introduces the basic implementation of the 'wildcardKey' type, for use
in defining an object property. At the moment, every object can have one wildcardKey which specifies a specific type (including any()) which the reducer will happily accept, if an unknown property has it. The aim is to introduce regex to this type, and the ability to use multiple instances of the type, in order to specifically craft dynamic reducer structures (e.g. all properties with _date in them will be assigned to the Type.any(), but all others must be Type.string()).
2017-02-23 09:56:43 +00:00
Kai Moseley 9534c25adc Minor tweak to flowRight dependency use 2017-02-22 10:17:03 +00:00
Kai Moseley e88f936329 Update lodash dependency 2017-02-22 10:03:36 +00:00
Kai Moseley e910c66b5f Adjust lodash imports to reduce bundle size when transpiled 2017-02-21 09:31:20 +00:00
Kai Moseley 365f95d352 Remove unnecessary ramda dependency 2017-02-21 09:09:34 +00:00
Kai Moseley de67a74ac3 Tweak to removeAtIndex interface 2017-01-24 16:25:11 +00:00
Kai Moseley 1cd4cbf6bf Add new array methods, and remove unnecessary validation calls 2017-01-22 20:13:28 +00:00
Kai Moseley ce24facd5a Add the 'any' Type for miscellaneous/uncheck values 2016-12-22 11:24:17 +00:00
Kai Moseley 7ddee47d9d Restructure for publshing 2016-12-20 10:39:23 +00:00
Kai Moseley 6f906585fe Tweak the example 2016-12-12 08:19:16 +00:00
Kai Moseley 0ab32d1fa3 Address ESLint errors 2016-12-12 08:01:21 +00:00
Kai Moseley 1cb903cfba Clean up module interface 2016-12-12 07:16:12 +00:00
Kai Moseley 84361fdae9 Improve test coverage to 100% 2016-12-11 17:24:01 +00:00
Kai Moseley a904988c75 Apply minor formatting changes 2016-12-11 15:51:42 +00:00
Kai Moseley e4a9eeabfc Increasing test coverage 2016-12-11 15:50:06 +00:00
Kai Moseley 5271513b70 Addings comments! 2016-12-11 11:33:00 +00:00
Kai Moseley 43cf6935c5 Remove longer example 2016-12-09 13:52:43 +00:00
Kai Moseley 966b7739bf Update reducer recursion to improve output structure 2016-12-06 08:17:01 +00:00
Kai Moseley b5e6f9024c Apply minor tweak to buildReducer name 2016-12-05 21:46:25 +00:00
Kai Moseley 0452b816a4 Amended resulting reducer to be an object for spreading 2016-12-05 21:44:55 +00:00
Kai Moseley 00087c751d Tweaks to flow types 2016-12-05 21:21:15 +00:00
Kai Moseley 69a0d3c616 Address flow errors 2016-12-05 18:17:56 +00:00
Kai Moseley 6ff5c56a2a Apply payload validation to initial object state 2016-12-05 16:54:15 +00:00
Kai Moseley 128c55bc52 Improve validation of the arrayReducer 2016-12-05 16:50:51 +00:00
Kai Moseley 0f7bd6efe4 Initial draft of array reducer 2016-12-04 19:25:49 +00:00
Kai Moseley 76c577ce6c ... 2016-12-04 16:30:48 +00:00
Kai Moseley 065126c761 Initial draft of array behaviors 2016-12-04 14:42:51 +00:00
Kai Moseley 8c19355486 Improve testing for shape validation 2016-12-04 14:01:08 +00:00
Kai Moseley 71cef6dee8 Polishing 2016-12-04 09:25:21 +00:00
Kai Moseley b04936697f Clean up buildReducers 2016-12-01 23:18:18 +00:00
Kai Moseley c5bbb38fbf Add validation testing, boolean type 2016-12-01 22:55:59 +00:00
Kai Moseley 54cd2d7547 Initial draft of object reducer 2016-12-01 16:23:22 +00:00
Kai Moseley 62f6adaf75 Update buildReducers 2016-12-01 14:32:22 +00:00
Kai Moseley f0db8af726 Created basic shape validation functionality 2016-11-29 16:38:18 +00:00
Kai Moseley 36b5eadc99 Clear flow errors 2016-11-29 13:57:40 +00:00