Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use microstates library i.e. a new API #69

Closed
wants to merge 26 commits into from

Commits on Jun 5, 2018

  1. fix: start update

    Ilya Radchenko committed Jun 5, 2018
    Configuration menu
    Copy the full SHA
    f91298f View commit details
    Browse the repository at this point in the history
  2. fix: run codemods

    Ilya Radchenko committed Jun 5, 2018
    Configuration menu
    Copy the full SHA
    e7ea339 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2018

  1. fix: gut everything (mostly)

    Ilya Radchenko committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    4abb602 View commit details
    Browse the repository at this point in the history
  2. feat: start state-for implementation

    Ilya Radchenko committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    6f68d5a View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2018

  1. feat: Get a basic version working

    Ilya Radchenko committed Jun 7, 2018
    Configuration menu
    Copy the full SHA
    4703426 View commit details
    Browse the repository at this point in the history
  2. fix: update readme to use new api in examples

    Ilya Radchenko committed Jun 7, 2018
    Configuration menu
    Copy the full SHA
    a0f6d1a View commit details
    Browse the repository at this point in the history
  3. chore: tweak readme

    Ilya Radchenko committed Jun 7, 2018
    Configuration menu
    Copy the full SHA
    3bbde3a View commit details
    Browse the repository at this point in the history
  4. fix: remove unused deps

    Ilya Radchenko committed Jun 7, 2018
    Configuration menu
    Copy the full SHA
    af7cfb5 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2018

  1. feat: Add a service API

    ```js
    import { Service } from 'ember-microstates';
    
    class User {
      name = String;
      email = String;
      superuser = Boolean;
    }
    
    export default Service.extend({
      typeClass: User,
    
      defaultValue() {
        return {
          superuser: false
        };
      }
    });
    ```
    
    ```js
    import Controller from '@ember/controller';
    import { inject as service } from '@ember/service';
    import { alias } from '@ember/object/computed';
    
    export default Controller.extend({
      currentUserService: service('user'),
      user: alias('currentUserService.microstate'),
    
      actions: {
        save() {
          let userMicrostate = this.user;
          let value = userMicrostate.valueOf();
    
          alert(JSON.stringify(value));
        }
      }
    });
    ```
    
    ```hbs
    <form {{action 'save' on='submit'}}>
      <input type='text' placeholder='Name' oninput={{invoke user.name 'set' value='target.value'}}>
      <input type='text' placeholder='Email' oninput={{invoke user.email 'set' value='target.value'}}>
      <label>
        Is an admin?
        <input type='checkbox' checked={{user.state.superuser}} onchange={{invoke user.superuser 'toggle' value='target.checked'}}>
      </label>
      <button>Submit</button>
    </form>
    ```
    Ilya Radchenko committed Jun 10, 2018
    Configuration menu
    Copy the full SHA
    dcddd3b View commit details
    Browse the repository at this point in the history
  2. fix: use invoke with value or without

    Also remove a debugger
    Ilya Radchenko committed Jun 10, 2018
    Configuration menu
    Copy the full SHA
    d0f988b View commit details
    Browse the repository at this point in the history
  3. fix: update the readme for services

    Ilya Radchenko committed Jun 10, 2018
    Configuration menu
    Copy the full SHA
    32f14f3 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2018

  1. fix: use published beta microstates

    Ilya Radchenko committed Jun 12, 2018
    Configuration menu
    Copy the full SHA
    fe85e2a View commit details
    Browse the repository at this point in the history
  2. fix: don't pas anything as args if invoke value is false

    Ilya Radchenko committed Jun 12, 2018
    Configuration menu
    Copy the full SHA
    9748892 View commit details
    Browse the repository at this point in the history
  3. fix(dummy): use state on the value

    Ilya Radchenko committed Jun 12, 2018
    Configuration menu
    Copy the full SHA
    2fa9863 View commit details
    Browse the repository at this point in the history
  4. chore(dummy): add a second component using the same type

    Ilya Radchenko committed Jun 12, 2018
    Configuration menu
    Copy the full SHA
    9438c53 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2018

  1. Configuration menu
    Copy the full SHA
    0747079 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2018

  1. Works using es build

    taras committed Jun 19, 2018
    Configuration menu
    Copy the full SHA
    da4fb72 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ab84083 View commit details
    Browse the repository at this point in the history
  3. Changed to use the new API

    taras committed Jun 19, 2018
    Configuration menu
    Copy the full SHA
    05f45f7 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2018

  1. Upgraded to microstates 0.8.0

    taras committed Jun 20, 2018
    Configuration menu
    Copy the full SHA
    94ef7f7 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2018

  1. Merge branch 'update' of github.com:knownasilya/ember-microstates int…

    …o update
    Ilya Radchenko committed Jul 1, 2018
    Configuration menu
    Copy the full SHA
    4690f4a View commit details
    Browse the repository at this point in the history
  2. fix: update to use a function that takes a microstate and creates a s…

    …ervice
    Ilya Radchenko committed Jul 1, 2018
    Configuration menu
    Copy the full SHA
    cfeecfa View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2018

  1. fix: update migrostates dep

    Ilya Radchenko committed Aug 13, 2018
    Configuration menu
    Copy the full SHA
    548d6a3 View commit details
    Browse the repository at this point in the history
  2. fix: update to new version of microstates

    Remove custom function for setting up a service since microstates are much simpler to setup now.
    Ilya Radchenko committed Aug 13, 2018
    Configuration menu
    Copy the full SHA
    9d16c4e View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2018

  1. fix: update embercli and deps

    Ilya Radchenko committed Sep 11, 2018
    Configuration menu
    Copy the full SHA
    0976aa8 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2018

  1. fix: update tests a bit

    Ilya Radchenko committed Sep 12, 2018
    Configuration menu
    Copy the full SHA
    4f93e0c View commit details
    Browse the repository at this point in the history