@24i/bigscreen-sdk 1.0.1 → 1.0.2-alpha.2071
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 +2 -2
- package/packages/list/src/interface.ts +2 -0
- package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +3 -1
- package/packages/menu/src/MenuAndContentContainer/interface.ts +1 -1
- package/utils/create-export-maps/src/__tests__/createExportMaps.spec.ts +2 -2
- package/utils/create-export-maps/src/createExportMaps.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@24i/bigscreen-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2-alpha.2071",
|
|
4
4
|
"description": "SmartApps BIGscreen SDK monorepo",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -271,4 +271,4 @@
|
|
|
271
271
|
"./zapping/interface": "./packages/zapping/src/interface.ts",
|
|
272
272
|
"./zapping": "./packages/zapping/src/index.ts"
|
|
273
273
|
}
|
|
274
|
-
}
|
|
274
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Component, Reference } from '@24i/bigscreen-sdk/jsx';
|
|
2
2
|
import { IFocusable } from '@24i/bigscreen-sdk/focus';
|
|
3
3
|
import { SharedProps, SharedVariedProps, Item } from './types';
|
|
4
|
+
import { ListBase } from './Base';
|
|
4
5
|
|
|
5
6
|
export interface List<
|
|
6
7
|
T extends Item<U>, U, V extends SharedProps<T, U> = SharedProps<T, U>,
|
|
7
8
|
> extends IFocusable, Component<V> {
|
|
9
|
+
base: Reference<ListBase<T, U>>,
|
|
8
10
|
appendData(data: U[]): void,
|
|
9
11
|
prependData(data: U[]): void,
|
|
10
12
|
scrollTo(index: number): void,
|
|
@@ -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
|
-
|
|
119
|
+
const { isMenuEnabled } = scene.constructor;
|
|
120
|
+
if (typeof isMenuEnabled === 'function') return isMenuEnabled();
|
|
121
|
+
return !!isMenuEnabled;
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
/**
|
|
@@ -37,14 +37,14 @@ describe('createExportMaps', () => {
|
|
|
37
37
|
createExportMaps();
|
|
38
38
|
expect(writeFileSync).toHaveBeenCalledWith(
|
|
39
39
|
expect.stringContaining('package.json'),
|
|
40
|
-
JSON.stringify({
|
|
40
|
+
`${JSON.stringify({
|
|
41
41
|
name: 'mock-root-package',
|
|
42
42
|
exports: {
|
|
43
43
|
'./adobe-heartbeat': './packages/adobe-heartbeat/src/index.ts',
|
|
44
44
|
'./animations/mock': './packages/animations/src/__mocks__/JSAnimations.ts',
|
|
45
45
|
'./animations': './packages/animations/src/index.ts',
|
|
46
46
|
}
|
|
47
|
-
}, null, 4)
|
|
47
|
+
}, null, 4)}\n`,
|
|
48
48
|
);
|
|
49
49
|
});
|
|
50
50
|
});
|
|
@@ -52,7 +52,7 @@ const createPackageJsonMapping = () => {
|
|
|
52
52
|
exports[`./${exportAlias}`] = `./packages/${exportPath}`;
|
|
53
53
|
});
|
|
54
54
|
(packageJson.exports as Record<string, string>) = exports;
|
|
55
|
-
fs.writeFileSync(resolve('./package.json'), JSON.stringify(packageJson, null, 4));
|
|
55
|
+
fs.writeFileSync(resolve('./package.json'), `${JSON.stringify(packageJson, null, 4)}\n`);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
export const createExportMaps = () => {
|