Skip to content

Releases: klee-contrib/focus-core

focus-core 2.2.1

05 Feb 12:46
cd74d5a
Compare
Choose a tag to compare

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

08 Nov 13:23
1055eaa
Compare
Choose a tag to compare

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

08 Nov 09:10
5091359
Compare
Choose a tag to compare
Pre-release

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

12 Sep 11:55
Compare
Choose a tag to compare
Pre-release

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

15 Dec 15:16
Compare
Choose a tag to compare

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

27 Oct 17:39
Compare
Choose a tag to compare

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

@JabX @JohnnP @Hartorn

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 and Handlebars.
  • 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 ?

  • #374 [ReferenceStore] fixes creation (now only one store is created for all reference) and adds customizable cache duration. fixes #345. Huge thank to @JabX
  • #375 and #379 Add singleton to load reference. Huge thank to @JohnnP
  • #376 Fix createStore function in CoreStore.js.Huge thank @Hartorn

Focus Core 0.16.0

17 Jun 16:34
Compare
Choose a tag to compare

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 => becomes createRouter(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

@JabX add TypeScript definitions see #354

Focus Core 0.15.0

18 May 19:29
Compare
Choose a tag to compare

Come along with [email protected]

  • Add bodyData along with data in the urlBuilder see #351
  • Add a method to update only the defined components in the application header using the built in dispatcher see #350

Focus Core v0.14.0

07 Apr 10:08
Compare
Choose a tag to compare

Focus Core and Focus Components are now in version 0.14.0

See Focus Components Release Note

Focus Core v0.13.0

07 Mar 16:28
Compare
Choose a tag to compare

Focus Core and Focus Components are now in version 0.13.0

See Focus Components Release Note