Focus Core 0.16.0
This release comes along with [email protected].
Thanks
@Hartorn, @JabX and @Tsj- for their contributions !
New features
We remove Backbone from our dependencies
The way to create the router
has changed. We get rid (internally) of the Backbone
dependency (This allow to remove big and useless dependencies like jQuery) and reduce the size of JavaScript loaded with the app.
It does not mean that your project will no longer works , you just have to update a few things on your project.
We open a pull request on the demo in order to see the things to update with this release.
Files to change => https://github.com/KleeGroup/focus-demo-app/pull/159/files
- Change the way to create a router.
Router.extend
=> becomescreateRouter(Backbone).extend
(in each router) - Set the navigate, back and start functions Router initialization
- Set the global link for a good Backbone navigation on the application link initializer
- Use of the updated components (button-back, menu)
We encourage all new projects to use React.Router instead of Backbone.
The demo app have been upgrade to use React router.
More option in CORS request
Adding an option noContentType
to CORS requests : it is useful when doing cross-domain request because some server do not accept Content-Type
header. (when the server is badly configured)
Export of the different steps of the actionBuilder
We now allow any user to reproduce the behavior of the action builder with his specific needs.
For example:
import services from '../services/campagne';
import {errorOnCall, dispatchServiceResponse} from 'focus-core/application/action-builder';
export const questionnaire = {
saveSynthese: (synthese,callerId) => {
const property =`questionnaireSynthese${synthese.type}`;
const conf = {
callerId:callerId,
node:property,
status: 'saved'
};
services.saveQuestionnaireSynthese(synthese).then(
data => {
dispatchServiceResponse(conf, data)
}, err => {
errorOnCall(conf, err);
});
}
};