Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

Version 3.2.0

Latest
Compare
Choose a tag to compare
@Ephrame Ephrame released this 07 Feb 12:10
· 13 commits to master since this release

On this new version, we focus on stability and bug fixes.

use npm i -S focus-graph@3.2.0 to install focus-graph in its version 3.2.0

Thanks

Thank you everyone for your bugs' reports and issues in which we have discussed. It helped us improve focus-graph

What's new ?

Improvments

  • Validation translation :
    PR #180 : Message for the validation of the domain is now translated

  • The selectForListReference :
    PR #163
    It's a new selector, you just have to give an array of the names of the reference list to have the list in the props.

  • The validator in the domain :
    PR #115 : Now you can add some options in the domain for the HTML elements
    It's possible to give some options in the validator of your domain like this :

 validator: {
        type: 'string',
        options: {
            maxLength: 200
        }
    }
  • The fetch :
    Before :
//In the file fetch.js in the folder : services
import createfocusFetchProxy from 'focus-application/fetch/fetch-proxy'
let fetch;

export const initFetch =  dispatch => {
  fetch = createfocusFetchProxy(dispatch);
}

export default (url, method, data) => {
    return fetch(url, {
        method: method,
        body: JSON.stringify(data),
        headers: {
            'Content-Type': 'application/json'
        }
    });
}


//At the initialisation of the application : 
initFetch(store.dispatch);

//For a service by example : 
import fetch from './fetch';

export const loadFinance = async ({id}) => {
    const response = await fetch(`http://localhost:9999/x/complex/${id}`)
    const data = await response.response.json();
    return data.finance;
}

After :

import focusFetch from 'focus-application/fetch/fetch-proxy'

export default {

    loadMovieCaracteristics(id) {
        return focusFetch({url: `http://localhost:8080/movies/${id}/caract`, method: 'GET'}).then((data) => {data.movId = id; return data;});
    }
}

//No initialisation 

Fixes

  • #133 : InputDate : Fix some bugs.
  • #140 : ListComponent errors : The errors by lines is better.
  • #141 : ListComponent in the fieldProvider : We can give the ListComponent to the FieldProvider.