added stateMachine to stateMachine communication
This commit is contained in:
@ -2,15 +2,20 @@
|
||||
import { getCompositeStore } from './compositeStores';
|
||||
|
||||
export const coreServices = {
|
||||
updateStore: (mappings: Record<string, string>) => {
|
||||
for (const [mappingString, value] of Object.entries(mappings)) {
|
||||
const [storeID, key] = mappingString.replace('@', '').split(':');
|
||||
const store = getCompositeStore(storeID);
|
||||
store.update(storeData => {
|
||||
storeData[key] = value;
|
||||
return storeData;
|
||||
});
|
||||
}
|
||||
// updateComposite: (mappings: Record<string, string>) => {
|
||||
// for (const [mappingString, value] of Object.entries(mappings)) {
|
||||
// const [storeID, key] = mappingString.replace('@', '').split(':');
|
||||
// const store = getCompositeStore(storeID);
|
||||
// store.update(storeData => {
|
||||
// storeData[key] = value;
|
||||
// return storeData;
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
subscribeComposite: (mappingString: string) => {
|
||||
const [storeID] = mappingString.replace('@', '').split(':');
|
||||
const store = getCompositeStore(storeID);
|
||||
return store;
|
||||
},
|
||||
testAlert: () => {
|
||||
alert("core service alert")
|
||||
|
Reference in New Issue
Block a user