Releases: klee-contrib/focus-core
focus-core 2.2.1
What's in it :
- Api-driver : Correcting rename function (was breaking in IE)
- Adding a noStringify option for fetch (ie to send form data)
- Improved error handling (cannot stream response twice, so xhrErrors should have deserialized data)
focus-core 2.2.0
Breaking changes :
- Numeral : the version has been updated, the initialisation has changed
- i18next : the version has been updated (no more i18next-client), the initialisation has changed. Moreover, the __variable__ declaration doesn't work anymore. You need to change to {{variable}}
What's in it :
- Re-writing all code in ES6
- Unit testing migrated in jest
- Advanced search : can now have several stores/advanced search properly separed
- #396 #399 Store : name collision with error, status are now tested
- [BUGFIX] #393 #401 ActionBuilder for list : The number of element can now be changed correctly
- [BUGFIX] Fixing reference store : adding new method
- Adding shorthand for dispatch
- Removing XHR request, now using fetch API
- Action now return data
- Adding api-driver, and fetch transformations
Dispatch
Before, to dispatch, it was needed to do :
import dispatcher from 'focus-core/dispatcher';
dispatcher.handleServerAction({
data: {
node: dataForNode
}, type: 'update'
});
Now you can do
import {dispatchData} from 'focus-core/dispatcher';
dispatchData('node', dataForNode);
// Identifier can be precised
dispatchData('node', dataForNode, identifier);
Also working for multiple node and data, with different format
import {dispatchData} from 'focus-core/dispatcher';
const toDispatch = {
node1: dataForNode1,
node2: dataForNode2
};
dispatchData(toDispatch);
// Identifier can be precised
dispatchData(toDispatch, identifier);
Fetch
Configuration from there is now native configuration for fetch (see this), except for xhrErrors
object, which is still a focus-feature for handling error.
Default behaviour should be conform to old XHR behaviour.
Api Driver
Api driver is an utility which can be used, to simplify fetch call.
Files can be generated using focus-service-generator.
Now, you can add before-fetch, and after-fetch transformations, for every request (useful for CSRF token, adding headers, ...)
You can see example there and there
focus-core 2.2.0-beta4
Since beta3 :
- Adding shorthand for dispatch
- Removing XHR request, now using fetch API
- Action now return data
- Adding api-driver, and fetch transformations
Dispatch
Before, to dispatch, it was needed to do :
import dispatcher from 'focus-core/dispatcher';
dispatcher.handleServerAction({
data: {
node: dataForNode
}, type: 'update'
});
Now you can do
import {dispatchData} from 'focus-core/dispatcher';
dispatchData('node', dataForNode);
// Identifier can be precised
dispatchData('node', dataForNode, identifier);
Also working for multiple node and data, with different format
import {dispatchData} from 'focus-core/dispatcher';
const toDispatch = {
node1: dataForNode1,
node2: dataForNode2
};
dispatchData(toDispatch);
// Identifier can be precised
dispatchData(toDispatch, identifier);
Fetch
Configuration from there is now native configuration for fetch (see this), except for xhrErrors
object, which is still a focus-feature for handling error.
Default behaviour should be conform to old XHR behaviour.
Api Driver
Api driver is an utility which can be used, to simplify fetch call.
Files can be generated using focus-service-generator.
Now, you can add before-fetch, and after-fetch transformations, for every request (useful for CSRF token, adding headers, ...)
You can see example there and there
focus-core 2.2.0-beta3
Breaking changes :
- Numeral : the version has been updated, the initialisation has changed
- i18next : the version has been updated (no more i18next-client), the initialisation has changed. Moreover, the __variable__ declaration doesn't work anymore. You need to change to {{variable}}
What's in it :
- Re-writing all code in ES6
- Unit testing migrated in jest
- Advanced search : can now have several stores/advanced search properly separed
- #396 #399 Store : name collision with error, status are now tested
- [BUGFIX] #393 #401 ActionBuilder for list : The number of element can now be changed correctly
- [BUGFIX] Fixing reference store : adding new method
Focus Core 2.1.1
On this new version, we focus on stability and bug fixes.
install with npm i -S [email protected]
The most important
Hello ! i am @GuenoleK and this is my first release !
Thanks
@Hartorn @JohnnP @damieng77 for the PR and globaly everyone for the issues/bug reports.
What's new ?
Fixes & Improvments
- CoreStore : PR #381 fixes the fact when trying to store a TypedArray in JS, ands then obtaining it, since it is neither an object or a function, neither a Immutable object.
- ReferenceBuilder & BuiltInAction : PR #383 reports @JohnnP changes form a branch which were deleted. It fixes the case where a reference get the list of an other one
- error_parsing : The PR #384 fixes the case when the variable
msgs
is null. In fact, when it was null on the function_treatGlobalErrors()
, it crashes on the error-parsing - application actionBuilder : Before the PR #386 , if there was a multiNode on a given action and then this action did get a response from the server which is an error, it only gave a global error as a general object, so it was stopped and the state did keep a loading behaviour. This PR fixes the data dispatching, so that when there is an error, the loading state will still disappear. The actionBuilder will give the good error result to each node.
Focus Core 2.0.0
PLEASE READ THE ASSOCIATED LIBRAIRY FOCUS-COMPONENT 2.0.0. RELEASE NOTE BEFORE INSTALLING IT
On this new version, we focus on stability and bug fixes.
install with
npm i -S [email protected]
Thanks
Why a tag version 2.0.0 ?
The current version of FOCUS is now stable, we decided to released a version 2.0.0. More, a new version of FOCUS libraries (version 3) is being published soon.
To be more clear in everyone's mind, here is a summary of major releases FOCUS:
- Version 1 was the FOCUS.JS library, written with
Backbone
andHandlebars
. - Version 2 is the hosted version this repository. The source code, issues and releases continue to be maintained on the github https://github.com/KleeGroup. It is based on the
React
&React-router
librairies. It is split in two sub-libs:- Focus-core that facilitate server calls, forms management, management of stores ...
- Focus-components that propose a set of web component and usec centric page templates
- Version 3 is a more mature version of the FOCUS libraires. All the developments FOCUS 3 are now accessible at this URL https://github.com/get-focus. It is based on the major libs
React
,React-router
,Redux
. It requires the use of a single application store and very strongly decouples the management of stores and the use of the component through connectors. The code is more readable and clear and components simpler to write. It is composed of three sub-libraries:- focus-application, a new librairy including the functionality needed for the implementation of an application: the application layout, management collapsible header, server calls, management of application messages, ...
- focus-components which offers all the basic web components to develop a web application. The directory structure and components is very clear. There is less ambiguity to find the right component to use.
- focus-graph that offers all the features to help manage forms in your application, and easily set up validation, formatting, and data display.
- focus-search that brings together all the capabilities to display graphics interfaces research, lists, ...
Focus v3 is currently in release candidate, and will be well soon be published.
Focus v2 is from now in stable version and will no longer be subject to changes. However, we provide an operational maintenance: Response to questions, support, and bug fixes. But feel free to continue to contribute.
What have we fixed ?
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);
});
}
};
TypeScript definitions
Focus Core 0.15.0
Come along with [email protected]
Focus Core v0.14.0
Focus Core and Focus Components are now in version 0.14.0
Focus Core v0.13.0
Focus Core and Focus Components are now in version 0.13.0