evmux-app-framework 0.0.35 → 0.0.37

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evmux-app-framework",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,6 +25,7 @@ export const availableRequests = {
25
25
  setFastActionButtons: "setFastActionButtons",
26
26
  createNewLayer: "createNewLayer",
27
27
  listScenes: "listScenes",
28
+ switchScene: "switchScene",
28
29
  removeSizeCatcher: "removeSizeCatcher",
29
30
  openSideBarSettings: "openSideBarSettings"
30
31
 
@@ -7,7 +7,7 @@ import {availableRequests} from './AppsObserver'
7
7
 
8
8
  canHandleRequest(requestObj)
9
9
  {
10
- const supportedRequests = [availableRequests.createNewLayer, availableRequests.removeSizeCatcher, availableRequests.listScenes];
10
+ const supportedRequests = [availableRequests.createNewLayer, availableRequests.removeSizeCatcher, availableRequests.listScenes, availableRequests.switchScene];
11
11
  return supportedRequests.includes(requestObj.request);
12
12
  }
13
13
 
@@ -26,4 +26,10 @@ import {availableRequests} from './AppsObserver'
26
26
  userAppInstanceId: "26c6f221-b278-46c8-a69c-ce8379766e24"
27
27
  }
28
28
  }
29
+
30
+ async switchScene(requestObj) {
31
+ return {
32
+ userAppInstanceId: "26c6f221-b278-46c8-a69c-ce8379766e24"
33
+ }
34
+ }
29
35
  }
@@ -47,4 +47,18 @@ export default class EvmuxAppsApiScene {
47
47
  return this.evmuxAppsApi._postMessageManager.sendRequestAsync(reqObj);
48
48
  }
49
49
 
50
+ async switchScene(paramsObject = {}) {
51
+
52
+ let reqObj = {
53
+ request: availableRequests.switchScene,
54
+ userAppInstanceId: this.evmuxAppsApi._userAppInstanceId,
55
+ componentId: this.evmuxAppsApi._componentId,
56
+ data: {
57
+ paramsObject
58
+ }
59
+ }
60
+
61
+ return this.evmuxAppsApi._postMessageManager.sendRequestAsync(reqObj);
62
+ }
63
+
50
64
  }