Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Releases: 92green/react-entity-editor

RoundRedPanda

26 Jun 03:01
Compare
Choose a tag to compare
  • Fix bug where EntityEditorStateRedux was not using id from config as it's store key
  • Operations are now passed the result of the previous operation in actionProps.
  • Readme update to reflect the ongoing nature of the development of this poor, neglected, somewhat tangled library

ParsimoniousPeacock

11 May 04:34
Compare
Choose a tag to compare
  • Results from successful or errored operations are passed into each subsequent status as a result prop.
  • react-modal is now a peer dep, and by default the modal is not applied. This might be monorepo'd into another package in future
  • State is now stored in a separate component which is composed above the EntityEditorHock by default
  • redux/EntityEditorStateReducer and redux/EntityEditorStateRedux (hock) exist to store state in redux
  • Config has changed
    • Added: composeComponents key, a function that returns an array of components to compose.
    • The modal can be added via composeComponents
    • The statusOutput option in config has been removed.
    • Removed: prompt and promptContainer
import {BaseConfig, EntityEditorState, EntityEditorHock} from 'react-entity-editor';
import EntityEditorModal from 'react-entity-editor/lib/modal/Modal';

...

// to add a modal or use a different state storage hock, add this.
BaseConfig.merge({
    composeComponents: (config) => [
        EntityEditorState(config), // or EntityEditorStateRedux(config)
        EntityEditorHock(config),
        EntityEditorModal({
            appElement: "#body"
        }) // or your own Modal hock if you prefer
    ]
});

SpotlessTahr

17 May 02:57
Compare
Choose a tag to compare

Contents

  • Adding react router 3 plugin
  • Renaming modal class name props and adding a way to assign then via config

Breaking changes

  • config.components is removed. Use config.prompt.component and config.promptContent.component instead.
  • Modal and ModalContent class name props have changed.

Additions

  • Added config.prompt.props and config.promptContent.props as a way of passing props to prompt components.

InconsequentialMoose

16 May 02:28
Compare
Choose a tag to compare

Contents

  • Changes to improve the setting of dirty state. See examples for the new preferred setup for keeping dirty state.

Breaking changes

  • operations.dirty now no longer accepts any arguments. operations.clean should be used where operations.dirty({dirty: false}) was previously used.
  • operations.go now include a clean step in their workflow by default.

Additions

  • Added operations.clean, which is equivalent to operations.dirty({dirty: false}).

Examples

  • All updated to use new API

InferiorFox

30 Apr 14:36
Compare
Choose a tag to compare

Breaking changes

  • Config: operations on tasks are now just strings on config.tasks.xxx.operation which refer to an operation, whereas they used to be a double barrel function on config.tasks.xxx.operate. The functions in the tasks accomplished nothing that can't be better achieved by operations calling other operations. See the save operation for the best example of this.
  • Config: config.operationProps now appear under a props key in the object passed as the first argument of the first function of each operation. Previously these were top-level within the object.
  • Config: config.operationProps is no longer required. When not provided this passes all of the props passed to EntityEditorHock through to the operations.
  • BaseConfig: write actions no longer set dirty state. This is now left entirely to the user, and works better this way.

Additions

  • Added ReactRouter4Config export containing react-router version 4 config, used on Ants example.
  • Added config.lifecycleMethods, where functions can be set to fire on EntityEditorHock lifecycle methods. See config/ReactRouter4Config for an example. I don't anticipate much need to use this.

Examples updates

  • Cleaned up examples, restructured components within them to be less magic, and to separate the parts of the examples that show how things are done versus those that are merely there to make the examples work.
  • Ants example fully works with router navigation protection.

WearyDonkey

28 Apr 02:47
Compare
Choose a tag to compare
  • Composed components inside of EntityEditorHock are now pure render.
  • Added stub operations to BaseConfig to warn if you haven't set them yourself.
  • Added create and update actions and matching operations to BaseConfig.
  • Bug fix: merging configs no longer merges arrays or workflows.
  • EntityEditorHock no longer passes workflow prop.
  • Can now pass passConfig prop to EntityEditorHock to force it to pass down its config. Intended for use by other higher order components.

MaleSilverfish

28 Apr 02:35
Compare
Choose a tag to compare
  • Default button class names have change from Button and Button-grey to Button-primary and Button-secondary.
  • OperationProps can now accept non-functions.
  • Now uses prop-types library.

PastMagpie

21 Apr 04:20
Compare
Choose a tag to compare
  • Pass down operation prop (partially applied) so apps can call these without associated workflows, and can call them while actions are mid-progress.
  • Replace individual abilities on abilities prop with single actionable boolean
  • Change naming of base operations to drop on prefix
  • Remove dirty actions and tasks, keep only the dirty operation now
  • Make editorState usage more in line with React's setState
  • Remove dirty: false on go operation as it's not a concern of go what dirty is. Now dirty should be set manually using operations, usually on componentWillMount and componentWillUnmount of a form component
  • Use a new button pattern in docs for less code duplication
  • Use entityEditor.names props in docs
  • Remove unused flow types

HeavyAfricanLeopard

19 Apr 00:42
Compare
Choose a tag to compare

EntityEditor higher order component now passes down a names prop containing entity names.

Names is an object that contains strings representing the names of the entity, It contains singular, plural, caplitalized singular and capitalized plural in the following object shape using "cat" as an example:

```
names = {
  item: "cat",
  items: "cats",
  Item: "Cat",
  Items: "Cats"
};
```

StrictLimpet

19 Apr 00:41
Compare
Choose a tag to compare

The API and usage are very close to the final structure now. Too many changes to name here, please follow the examples provided in the docs folder.