@zohoim/client-sdk 1.0.0-poc13 → 1.0.0-poc14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import { ModuleNames } from '../../core/constants';
|
|
1
2
|
import ModuleFactory from './ModuleFactory';
|
|
2
3
|
export default class ModuleManager {
|
|
3
4
|
constructor() {
|
|
4
5
|
this._modules = new Map();
|
|
6
|
+
this.supportedModules = [ModuleNames.CHANNELS, ModuleNames.SESSIONS];
|
|
5
7
|
}
|
|
6
8
|
|
|
7
9
|
initialize(_ref) {
|
|
8
10
|
let {
|
|
9
11
|
config
|
|
10
12
|
} = _ref;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
this.supportedModules.forEach(moduleName => {
|
|
14
|
+
const moduleConfig = config[moduleName] || {};
|
|
13
15
|
this.initializeModule({
|
|
14
16
|
moduleName,
|
|
15
17
|
config: moduleConfig
|
|
@@ -17,11 +19,11 @@ export default class ModuleManager {
|
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
initializeModule(
|
|
22
|
+
initializeModule(_ref2) {
|
|
21
23
|
let {
|
|
22
24
|
moduleName,
|
|
23
25
|
config
|
|
24
|
-
} =
|
|
26
|
+
} = _ref2;
|
|
25
27
|
const createModule = ModuleFactory[moduleName];
|
|
26
28
|
|
|
27
29
|
if (createModule) {
|