update odlux and featureaggregator
[ccsdk/features.git] / sdnr / wt / odlux / apps / configurationApp / src / handlers / configurationAppRootHandler.ts
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/handlers/configurationAppRootHandler.ts b/sdnr/wt/odlux/apps/configurationApp/src/handlers/configurationAppRootHandler.ts
new file mode 100644 (file)
index 0000000..04b63d3
--- /dev/null
@@ -0,0 +1,29 @@
+import { combineActionHandler } from '../../../../framework/src/flux/middleware';
+
+import { IConnectedNetworkElementsState, connectedNetworkElementsActionHandler } from './connectedNetworkElementsHandler';
+import { IDeviceDescriptionState, deviceDescriptionHandler } from "./deviceDescriptionHandler";
+import { IViewDescriptionState, viewDescriptionHandler } from "./viewDescriptionHandler";
+import { IValueSelectorState, valueSelectorHandler } from "./valueSelectorHandler";
+
+interface IConfigurationAppStoreState {
+  connectedNetworkElements: IConnectedNetworkElementsState; // used for ne selection
+  deviceDescription: IDeviceDescriptionState;               // contains ui and device descriptions
+  viewDescription: IViewDescriptionState;                   // contains current ui description
+  valueSelector: IValueSelectorState;
+}
+
+declare module '../../../../framework/src/store/applicationStore' {
+  interface IApplicationStoreState {
+    configuration: IConfigurationAppStoreState,
+  }
+}
+
+const actionHandlers = {
+  connectedNetworkElements: connectedNetworkElementsActionHandler,
+  deviceDescription: deviceDescriptionHandler,
+  viewDescription: viewDescriptionHandler,
+  valueSelector: valueSelectorHandler,
+};
+
+export const configurationAppRootHandler = combineActionHandler<IConfigurationAppStoreState>(actionHandlers);
+export default configurationAppRootHandler;