@streamlayer/sdk-web-core
Advanced tools
Comparing version 0.13.2 to 0.14.0
@@ -23,2 +23,5 @@ import { CoreStatus } from './store/store'; | ||
instance.sdk.initializeApp = async () => { | ||
if (instance.stores.enabled.get() === 'on') { | ||
return { enabled: true }; | ||
} | ||
instance.storeSubscribe(); | ||
@@ -43,2 +46,5 @@ instance.stores.enabled.setValue('on'); | ||
instance.sdk.disableApp = () => { | ||
if (instance.stores.enabled.get() !== 'on') { | ||
return; | ||
} | ||
instance.stores.enabled.setValue(); | ||
@@ -45,0 +51,0 @@ instance.stores.status.setValue(CoreStatus.DISABLED); |
@@ -6,2 +6,4 @@ import { StreamLayerContext } from '@streamlayer/sdk-web-interfaces'; | ||
sdkStore: CoreStoreInstance; | ||
enabled: CoreStores['enabled']; | ||
status: CoreStores['status']; | ||
organizationStore: () => CoreStores['organizationSettings']; | ||
@@ -8,0 +10,0 @@ } |
@@ -8,2 +8,4 @@ import { CoreStore } from './store'; | ||
instance.stores = instance.store.getValues(); | ||
instance.sdk.enabled = instance.stores.enabled.getStore(); | ||
instance.sdk.status = instance.stores.status.getStore(); | ||
instance.sdk.sdkStore = instance.store.getStore(); | ||
@@ -10,0 +12,0 @@ instance.sdk.organizationStore = () => instance.stores.organizationSettings.getStore(); |
@@ -42,3 +42,3 @@ { | ||
}, | ||
"version": "0.13.2", | ||
"version": "0.14.0", | ||
"type": "module", | ||
@@ -45,0 +45,0 @@ "main": "./lib/index.js", |
25019
531