synchronous updateSource logic

This commit is contained in:
Lachlan Kermode
2018-12-17 17:05:07 +00:00
parent 795acac7ca
commit c10b741325
7 changed files with 295 additions and 50 deletions

View File

@@ -1,11 +1,11 @@
const initial = {
/*
* The Domain or 'domain' of this state refers to the tree of data
* available for render and display.
* Selections and filters in the 'app' subtree will operate the domain
* in mapStateToProps of the Dashboard, and deterimne which items
* in the domain will get rendered by React
*/
* The Domain or 'domain' of this state refers to the tree of data
* available for render and display.
* Selections and filters in the 'app' subtree will operate the domain
* in mapStateToProps of the Dashboard, and deterimne which items
* in the domain will get rendered by React
*/
domain: {
events: [],
narratives: [],
@@ -17,24 +17,25 @@ const initial = {
},
/*
* The 'app' subtree of this state determines the data and information to be
* displayed.
* It may refer to those the user interacts with, by selecting,
* fitlering and so on, which ultimately operate on the data to be displayed.
* Additionally, some of the 'app' flags are determined by the config file
* or by the characteristics of the client, browser, etc.
*/
* The 'app' subtree of this state determines the data and information to be
* displayed.
* It may refer to those the user interacts with, by selecting,
* fitlering and so on, which ultimately operate on the data to be displayed.
* Additionally, some of the 'app' flags are determined by the config file
* or by the characteristics of the client, browser, etc.
*/
app: {
errors: {
source: null,
},
highlighted: null,
selected: [],
source: null,
narrative: null,
filters: {
timerange: [
d3.timeParse("%Y-%m-%dT%H:%M:%S")("2013-02-23T12:00:00"),
d3.timeParse("%Y-%m-%dT%H:%M:%S")("2016-02-23T12:00:00")
d3.timeParse("%Y-%m-%dT%H:%M:%S")("2013-02-23T12:00:00"),
d3.timeParse("%Y-%m-%dT%H:%M:%S")("2016-02-23T12:00:00")
],
tags: [],
categories: [],
@@ -54,36 +55,36 @@ const initial = {
duration: 1576800,
active: false
},
{
label: '3 meses',
duration: 129600,
active: false
},
{
label: '3 días',
duration: 4320,
active: false
},
{
label: '12 horas',
duration: 720,
active: false
},
{
label: '2 horas',
duration: 120,
active: false
},
{
label: '30 min',
duration: 30,
active: false
},
{
label: '10 min',
duration: 10,
active: false
}],
{
label: '3 meses',
duration: 129600,
active: false
},
{
label: '3 días',
duration: 4320,
active: false
},
{
label: '12 horas',
duration: 720,
active: false
},
{
label: '2 horas',
duration: 120,
active: false
},
{
label: '30 min',
duration: 30,
active: false
},
{
label: '10 min',
duration: 10,
active: false
}],
features: {
USE_TAGS: process.env.features.USE_TAGS,
USE_SEARCH: process.env.features.USE_SEARCH
@@ -99,10 +100,10 @@ const initial = {
},
/*
* The 'ui' subtree of this state refers the state of the cosmetic
* elements of the application, such as color palettes of categories
* as well as dom elements to attach SVG
*/
* The 'ui' subtree of this state refers the state of the cosmetic
* elements of the application, such as color palettes of categories
* as well as dom elements to attach SVG
*/
ui: {
style: {
categories: {