@@ -48,7 +48,8 @@ import {
4848 setupConfiguration ,
4949 getVersion ,
5050 initializeApp ,
51- getPluginsConfiguration
51+ getPluginsConfiguration ,
52+ storeEpicsCache
5253} from '@js/utils/AppUtils' ;
5354
5455import {
@@ -62,6 +63,7 @@ import {
6263 gnCheckSelectedLayerPermissions ,
6364 gnSetLayersPermissions
6465} from '@js/epics' ;
66+ import timelineEpics from '@mapstore/framework/epics/timeline' ;
6567import maplayout from '@mapstore/framework/reducers/maplayout' ;
6668import 'react-widgets/dist/css/react-widgets.css' ;
6769import 'react-select/dist/react-select.css' ;
@@ -115,6 +117,18 @@ document.addEventListener('DOMContentLoaded', function() {
115117 const mapLayout = getConfigProp ( 'mapLayout' ) || { } ;
116118 setConfigProp ( 'mapLayout' , mapLayout [ query . theme ] || mapLayout [ pluginsConfigKey ] || mapLayout . viewer ) ;
117119
120+ const appEpics = {
121+ ...standardEpics ,
122+ ...configEpics ,
123+ updateMapLayoutEpic,
124+ gnCheckSelectedLayerPermissions,
125+ gnSetLayersPermissions,
126+ ...pluginsDefinition . epics ,
127+ // needed to initialize the correct time range
128+ ...timelineEpics
129+ } ;
130+
131+ storeEpicsCache ( appEpics ) ;
118132 // register custom arcgis layer
119133 import ( '@js/components/' + mapType + '/ArcGisMapServer' )
120134 . then ( ( ) => {
@@ -178,14 +192,7 @@ document.addEventListener('DOMContentLoaded', function() {
178192 annotations,
179193 ...pluginsDefinition . reducers
180194 } ,
181- appEpics : {
182- ...standardEpics ,
183- ...configEpics ,
184- updateMapLayoutEpic,
185- gnCheckSelectedLayerPermissions,
186- gnSetLayersPermissions,
187- ...pluginsDefinition . epics
188- } ,
195+ appEpics,
189196 initialActions : [
190197 // add some settings in the global state to make them accessible in the monitor state
191198 // later we could use expression in localConfig
0 commit comments