@24i/bigscreen-sdk 1.0.1 → 1.0.2-alpha.2069

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": "@24i/bigscreen-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2-alpha.2069",
4
4
  "description": "SmartApps BIGscreen SDK monorepo",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -116,7 +116,9 @@ export class MenuAndContentContainer<T extends string = string>
116
116
  isMenuAvailable() {
117
117
  const { router: { current: router } } = this.props;
118
118
  const scene = router?.getActiveRoute()?.component.current as SceneWithMenuAvailability;
119
- return !!scene.constructor.isMenuEnabled;
119
+ const { isMenuEnabled } = scene.constructor;
120
+ if (typeof isMenuEnabled === 'function') return isMenuEnabled();
121
+ return !!isMenuEnabled;
120
122
  }
121
123
 
122
124
  /**
@@ -83,7 +83,7 @@ export type SceneWithMenuAvailability = IRoute & {
83
83
  /**
84
84
  * static flag - true for menu is enabled, undefined (missing) or false for disabled.
85
85
  */
86
- isMenuEnabled?: boolean,
86
+ isMenuEnabled?: boolean | (() => boolean),
87
87
  }
88
88
  };
89
89