@signageos/front-applet 8.1.2 → 8.1.3
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/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/docs/sos/browser.md +66 -14
- package/docs/sos/command.md +52 -6
- package/docs/sos/debug.md +17 -2
- package/docs/sos/deviceInfo.md +27 -0
- package/docs/sos/display.md +34 -3
- package/docs/sos/fileSystem.md +1135 -59
- package/docs/sos/input.md +42 -1
- package/docs/sos/native/mdc.md +65 -19
- package/docs/sos/offline/cache.md +8 -2
- package/es6/FrontApplet/Browser/Browser.d.ts +25 -9
- package/es6/FrontApplet/Browser/Browser.js +25 -9
- package/es6/FrontApplet/Browser/Browser.js.map +1 -1
- package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +7 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -1
- package/es6/FrontApplet/Browser/events.d.ts +6 -0
- package/es6/FrontApplet/Browser/events.js.map +1 -1
- package/es6/FrontApplet/Command/Command.d.ts +15 -6
- package/es6/FrontApplet/Command/Command.js +15 -6
- package/es6/FrontApplet/Command/Command.js.map +1 -1
- package/es6/FrontApplet/Command/ICommand.d.ts +7 -0
- package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -0
- package/es6/FrontApplet/Debug/Debug.d.ts +11 -3
- package/es6/FrontApplet/Debug/Debug.js +11 -3
- package/es6/FrontApplet/Debug/Debug.js.map +1 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +15 -0
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +16 -2
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
- package/es6/FrontApplet/Display/Display.d.ts +22 -14
- package/es6/FrontApplet/Display/Display.js +22 -14
- package/es6/FrontApplet/Display/Display.js.map +1 -1
- package/es6/FrontApplet/Display/IDisplay.d.ts +4 -0
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +429 -41
- package/es6/FrontApplet/FileSystem/FileSystem.js +427 -39
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
- package/es6/FrontApplet/FileSystem/HashAlgorithm.d.ts +4 -1
- package/es6/FrontApplet/FileSystem/types.d.ts +46 -0
- package/es6/FrontApplet/FileSystem/types.js.map +1 -1
- package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +9 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js +6 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -1
- package/es6/FrontApplet/Input/Input.d.ts +17 -1
- package/es6/FrontApplet/Input/Input.js +17 -1
- package/es6/FrontApplet/Input/Input.js.map +1 -1
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +32 -11
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +14 -11
- package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,11 @@ const events_1 = require("events");
|
|
|
7
7
|
const Validate_1 = __importDefault(require("../Validate/Validate"));
|
|
8
8
|
/**
|
|
9
9
|
* The `sos.debug` API groups together methods for checking the state of remote debug mode.
|
|
10
|
+
*
|
|
11
|
+
* :::note
|
|
12
|
+
* - This debug is not the "native debug" of the device, but rather a remote debug mode that allows you to connect to the device using Weinre.
|
|
13
|
+
* - State of the remote debug mode or native debug mode can be changed via Cloud Control or [Rest API](https://developers-staging.signageos.io/api/#tag/DeviceDebug/paths/~1v1~1device~1%7BdeviceUid%7D~1debug/put).
|
|
14
|
+
* :::
|
|
10
15
|
*/
|
|
11
16
|
class Debug extends events_1.EventEmitter {
|
|
12
17
|
window;
|
|
@@ -22,8 +27,9 @@ class Debug extends events_1.EventEmitter {
|
|
|
22
27
|
this.postMessage = postMessage;
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
25
|
-
* The `isRemoteDebugEnabled()` method returns the state of the
|
|
30
|
+
* The `isRemoteDebugEnabled()` method returns the state of the Device debug mode.
|
|
26
31
|
*
|
|
32
|
+
* @returens {Promise<boolean>} Resolves to `true` if the remote debug mode is enabled, otherwise `false`.
|
|
27
33
|
* @since 5.8.0
|
|
28
34
|
*/
|
|
29
35
|
async isRemoteDebugEnabled() {
|
|
@@ -33,9 +39,11 @@ class Debug extends events_1.EventEmitter {
|
|
|
33
39
|
return isEnabled;
|
|
34
40
|
}
|
|
35
41
|
/**
|
|
36
|
-
* The `onRemoteDebugChanged()` method sets up a listener, which is called whenever the state of the
|
|
42
|
+
* The `onRemoteDebugChanged()` method sets up a listener, which is called whenever the state of the Device debug mode is changed.
|
|
37
43
|
*
|
|
38
|
-
* @
|
|
44
|
+
* @param listener The listener to be called when the state of the remote debug mode is changed.
|
|
45
|
+
* @returns {void} Resolves when the listener is successfully set up.
|
|
46
|
+
* @since 5.8.0
|
|
39
47
|
*/
|
|
40
48
|
onRemoteDebugChanged(listener) {
|
|
41
49
|
(0, Validate_1.default)({ listener }).required().function();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Debug.js","sourceRoot":"","sources":["../../../src/FrontApplet/Debug/Debug.ts"],"names":[],"mappings":";;;;;AAAA,mCAAsC;AAEtC,oEAA4C;AAG5C
|
|
1
|
+
{"version":3,"file":"Debug.js","sourceRoot":"","sources":["../../../src/FrontApplet/Debug/Debug.ts"],"names":[],"mappings":";;;;;AAAA,mCAAsC;AAEtC,oEAA4C;AAG5C;;;;;;;GAOG;AACH,MAAqB,KAAM,SAAQ,qBAAY;IAM7B;IACR;IACA;IAPF,MAAM,CAAC,cAAc,GAAW,OAAO,CAAC;IACxC,MAAM,CAAC,aAAa,GAAW,eAAe,CAAC;IAEtD,gBAAgB;IAChB,YACiB,MAA2B,EACnC,aAAqB,EACrB,WAA8B;QAEtC,KAAK,EAAE,CAAC;QAJQ,WAAM,GAAN,MAAM,CAAqB;QACnC,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IAGvC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,oBAAoB;QAChC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAC5C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;SAC1C,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;;;;;OAMG;IACI,oBAAoB,CAAC,QAA8C;QACzE,IAAA,kBAAQ,EAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC;QAC7C,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,gBAAgB;IACT,iBAAiB,CAAC,IAA4B;QACpD,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;gBAChC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;oBAC9B,OAAO,EAAE,IAAI,CAAC,OAAO;iBACrB,CAAC,CAAC;gBACH,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;oBAClB,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC;oBACvC,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,CAAC;oBACrC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;wBACjC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;wBAC5D,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,8BAA8B,CAAC;wBACvD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;wBAE9C,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;oBACnC,CAAC;gBACF,CAAC;qBAAM,CAAC;oBACP,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,SAAS,CAAC;oBACxC,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,SAAS,CAAC;gBACxC,CAAC;gBACD,MAAM;YACP,QAAQ;QACT,CAAC;IACF,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,KAAK,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IACrE,CAAC;;AAnEF,wBAoEC"}
|
|
@@ -14,6 +14,11 @@ export default class DeviceInfo implements IDeviceInfo {
|
|
|
14
14
|
* The `getLocation()` method returns location of the device. Location is requested from server on application start, automatically
|
|
15
15
|
* updated when changed and persisted in local storage.
|
|
16
16
|
*
|
|
17
|
+
* :::note
|
|
18
|
+
* Location can be set only in CloudControl on Device Info page, or via Rest API.
|
|
19
|
+
* :::
|
|
20
|
+
*
|
|
21
|
+
* @returns {Promise<IDeviceLocation | null>} A promise that resolves to the device location or `null` if not set.
|
|
17
22
|
* @since 5.2.0
|
|
18
23
|
*/
|
|
19
24
|
getLocation(): Promise<IDeviceLocation | null>;
|
|
@@ -21,6 +26,11 @@ export default class DeviceInfo implements IDeviceInfo {
|
|
|
21
26
|
* The `getOrganizationTags()` method returns all tags assigned to the device. Tags are requested from server on application start, automatically
|
|
22
27
|
* updated when changed and persisted in local storage.
|
|
23
28
|
*
|
|
29
|
+
* :::note
|
|
30
|
+
* Tags can be set only in CloudControl on Device Info page, or via Rest API.
|
|
31
|
+
* :::
|
|
32
|
+
*
|
|
33
|
+
* @returns {Promise<IOrganizationTag[]>} A promise that resolves to an array of organization tags.
|
|
24
34
|
* @since 5.2.0
|
|
25
35
|
*/
|
|
26
36
|
getOrganizationTags(): Promise<IOrganizationTag[]>;
|
|
@@ -28,7 +38,12 @@ export default class DeviceInfo implements IDeviceInfo {
|
|
|
28
38
|
* The `getDeviceName()` method returns a name of the device. Name is requested from server on application start, automatically
|
|
29
39
|
* updated when changed and persisted in local storage.
|
|
30
40
|
*
|
|
41
|
+
* @returns {Promise<string>} A promise that resolves to the device name.
|
|
31
42
|
* @since 6.6.0
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* const deviceName = await sos.deviceInfo.getDeviceName();
|
|
46
|
+
* console.log(`Device name is: ${deviceName}`);
|
|
32
47
|
*/
|
|
33
48
|
getDeviceName(): Promise<string>;
|
|
34
49
|
private getMessage;
|
|
@@ -17,6 +17,11 @@ class DeviceInfo {
|
|
|
17
17
|
* The `getLocation()` method returns location of the device. Location is requested from server on application start, automatically
|
|
18
18
|
* updated when changed and persisted in local storage.
|
|
19
19
|
*
|
|
20
|
+
* :::note
|
|
21
|
+
* Location can be set only in CloudControl on Device Info page, or via Rest API.
|
|
22
|
+
* :::
|
|
23
|
+
*
|
|
24
|
+
* @returns {Promise<IDeviceLocation | null>} A promise that resolves to the device location or `null` if not set.
|
|
20
25
|
* @since 5.2.0
|
|
21
26
|
*/
|
|
22
27
|
async getLocation() {
|
|
@@ -27,6 +32,11 @@ class DeviceInfo {
|
|
|
27
32
|
* The `getOrganizationTags()` method returns all tags assigned to the device. Tags are requested from server on application start, automatically
|
|
28
33
|
* updated when changed and persisted in local storage.
|
|
29
34
|
*
|
|
35
|
+
* :::note
|
|
36
|
+
* Tags can be set only in CloudControl on Device Info page, or via Rest API.
|
|
37
|
+
* :::
|
|
38
|
+
*
|
|
39
|
+
* @returns {Promise<IOrganizationTag[]>} A promise that resolves to an array of organization tags.
|
|
30
40
|
* @since 5.2.0
|
|
31
41
|
*/
|
|
32
42
|
async getOrganizationTags() {
|
|
@@ -37,11 +47,15 @@ class DeviceInfo {
|
|
|
37
47
|
* The `getDeviceName()` method returns a name of the device. Name is requested from server on application start, automatically
|
|
38
48
|
* updated when changed and persisted in local storage.
|
|
39
49
|
*
|
|
50
|
+
* @returns {Promise<string>} A promise that resolves to the device name.
|
|
40
51
|
* @since 6.6.0
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* const deviceName = await sos.deviceInfo.getDeviceName();
|
|
55
|
+
* console.log(`Device name is: ${deviceName}`);
|
|
41
56
|
*/
|
|
42
57
|
async getDeviceName() {
|
|
43
|
-
|
|
44
|
-
return deviceName;
|
|
58
|
+
return this.geDeviceNameFromTittle();
|
|
45
59
|
}
|
|
46
60
|
getMessage(name) {
|
|
47
61
|
return [this.messagePrefix, DeviceInfo.MESSAGE_PREFIX, name].join('.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceInfo.js","sourceRoot":"","sources":["../../../src/FrontApplet/DeviceInfo/DeviceInfo.ts"],"names":[],"mappings":";;AAGA;;;GAGG;AACH,MAAqB,UAAU;IAKrB;IACA;IALF,MAAM,CAAC,cAAc,GAAW,aAAa,CAAC;IAErD,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ
|
|
1
|
+
{"version":3,"file":"DeviceInfo.js","sourceRoot":"","sources":["../../../src/FrontApplet/DeviceInfo/DeviceInfo.ts"],"names":[],"mappings":";;AAGA;;;GAGG;AACH,MAAqB,UAAU;IAKrB;IACA;IALF,MAAM,CAAC,cAAc,GAAW,aAAa,CAAC;IAErD,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;;;;;;;OAUG;IACI,KAAK,CAAC,WAAW;QACvB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACvF,OAAO,QAAQ,CAAC;IACjB,CAAC;IAED;;;;;;;;;;OAUG;IACI,KAAK,CAAC,mBAAmB;QAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;QAC5F,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;;;;;;;OAUG;IACI,KAAK,CAAC,aAAa;QACzB,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC;IACtC,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC;IAEO,sBAAsB;QAC7B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC5C,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM,aAAa,GAAG,YAAY,CAAC,aAAc,CAAC;QAClD,OAAO,aAAa,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC;IACvE,CAAC;;AAjEF,6BAkEC"}
|
|
@@ -3,6 +3,25 @@ import IDisplay, { DisplayCapability } from './IDisplay';
|
|
|
3
3
|
/**
|
|
4
4
|
* The `sos.display` API groups together methods for getting information about the device. Primarily to find out which
|
|
5
5
|
* features it supports.
|
|
6
|
+
*
|
|
7
|
+
* <details>
|
|
8
|
+
* <summary>List of all display capabilities</summary>
|
|
9
|
+
* | Capability | Description |
|
|
10
|
+
* |:------------|:-------------|
|
|
11
|
+
* | `FILE_SYSTEM_INTERNAL_STORAGE` | If device supports internal storage |
|
|
12
|
+
* | `FILE_SYSTEM_EXTERNAL_STORAGE` | If device supports external storage |
|
|
13
|
+
* | `FILE_SYSTEM_FILE_CHECKSUM` | If device supports file checksum calculation |
|
|
14
|
+
* | `FILE_SYSTEM_LINK` | If device supports file system `link()` |
|
|
15
|
+
* | `FILE_SYSTEM_CREATE_ARCHIVE` | If device supports creating archives in the file system |
|
|
16
|
+
* | `FILE_SYSTEM_ARCHIVE_EXTRACT_INFO` | If device can determine a total size of a potentially extracted archive |
|
|
17
|
+
* | `TIMERS_PROPRIETARY` | If device supports proprietary timers |
|
|
18
|
+
* | `VIDEO_4K` | If device supports 4K video playback |
|
|
19
|
+
* | `BROWSER` | If device supports opening browser |
|
|
20
|
+
* | `SERIAL` | If device supports serial port communication |
|
|
21
|
+
* | `BARCODE_SCANNER` | If device supports barcode scanner setup |
|
|
22
|
+
* | `FRONT_OSD` | If device supports Front OSD (our on-screen display) |
|
|
23
|
+
* | `PROXIMITY_SENSOR` | If device supports proximity sensor |
|
|
24
|
+
* </details>
|
|
6
25
|
*/
|
|
7
26
|
declare class Display implements IDisplay {
|
|
8
27
|
private messagePrefix;
|
|
@@ -12,20 +31,9 @@ declare class Display implements IDisplay {
|
|
|
12
31
|
/** @internal */
|
|
13
32
|
constructor(messagePrefix: string, postMessage: IPostMessage<any>);
|
|
14
33
|
/**
|
|
15
|
-
* The `supports()` method determines whether a queried capability is supported.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* - 'FILE_SYSTEM_EXTERNAL_STORAGE' - @todo
|
|
19
|
-
* - 'FILE_SYSTEM_FILE_CHECKSUM' - @todo
|
|
20
|
-
* - 'FILE_SYSTEM_LINK' - @todo
|
|
21
|
-
* - 'TIMERS_PROPRIETARY' - @todo
|
|
22
|
-
* - 'VIDEO_4K' - @todo
|
|
23
|
-
* - 'SERIAL' - @todo
|
|
24
|
-
* - 'BARCODE_SCANNER' - @todo
|
|
25
|
-
* - 'FRONT_OSD' - @todo
|
|
26
|
-
* - 'FILE_SYSTEM_CREATE_ARCHIVE' - @todo
|
|
27
|
-
* - 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' - Device can determine a total size of a potentially extracted archive
|
|
28
|
-
*
|
|
34
|
+
* The `supports()` method determines whether a queried capability is supported by the device.
|
|
35
|
+
* @param capability - The capability to check for support.
|
|
36
|
+
* @returns {Promise<boolean>} Resolves to `true` if the capability is supported, otherwise `false`.
|
|
29
37
|
* @since 3.1.0
|
|
30
38
|
*/
|
|
31
39
|
supports(capability: DisplayCapability): Promise<boolean>;
|
|
@@ -7,6 +7,25 @@ const Validate_1 = __importDefault(require("../Validate/Validate"));
|
|
|
7
7
|
/**
|
|
8
8
|
* The `sos.display` API groups together methods for getting information about the device. Primarily to find out which
|
|
9
9
|
* features it supports.
|
|
10
|
+
*
|
|
11
|
+
* <details>
|
|
12
|
+
* <summary>List of all display capabilities</summary>
|
|
13
|
+
* | Capability | Description |
|
|
14
|
+
* |:------------|:-------------|
|
|
15
|
+
* | `FILE_SYSTEM_INTERNAL_STORAGE` | If device supports internal storage |
|
|
16
|
+
* | `FILE_SYSTEM_EXTERNAL_STORAGE` | If device supports external storage |
|
|
17
|
+
* | `FILE_SYSTEM_FILE_CHECKSUM` | If device supports file checksum calculation |
|
|
18
|
+
* | `FILE_SYSTEM_LINK` | If device supports file system `link()` |
|
|
19
|
+
* | `FILE_SYSTEM_CREATE_ARCHIVE` | If device supports creating archives in the file system |
|
|
20
|
+
* | `FILE_SYSTEM_ARCHIVE_EXTRACT_INFO` | If device can determine a total size of a potentially extracted archive |
|
|
21
|
+
* | `TIMERS_PROPRIETARY` | If device supports proprietary timers |
|
|
22
|
+
* | `VIDEO_4K` | If device supports 4K video playback |
|
|
23
|
+
* | `BROWSER` | If device supports opening browser |
|
|
24
|
+
* | `SERIAL` | If device supports serial port communication |
|
|
25
|
+
* | `BARCODE_SCANNER` | If device supports barcode scanner setup |
|
|
26
|
+
* | `FRONT_OSD` | If device supports Front OSD (our on-screen display) |
|
|
27
|
+
* | `PROXIMITY_SENSOR` | If device supports proximity sensor |
|
|
28
|
+
* </details>
|
|
10
29
|
*/
|
|
11
30
|
class Display {
|
|
12
31
|
messagePrefix;
|
|
@@ -19,20 +38,9 @@ class Display {
|
|
|
19
38
|
this.postMessage = postMessage;
|
|
20
39
|
}
|
|
21
40
|
/**
|
|
22
|
-
* The `supports()` method determines whether a queried capability is supported.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* - 'FILE_SYSTEM_EXTERNAL_STORAGE' - @todo
|
|
26
|
-
* - 'FILE_SYSTEM_FILE_CHECKSUM' - @todo
|
|
27
|
-
* - 'FILE_SYSTEM_LINK' - @todo
|
|
28
|
-
* - 'TIMERS_PROPRIETARY' - @todo
|
|
29
|
-
* - 'VIDEO_4K' - @todo
|
|
30
|
-
* - 'SERIAL' - @todo
|
|
31
|
-
* - 'BARCODE_SCANNER' - @todo
|
|
32
|
-
* - 'FRONT_OSD' - @todo
|
|
33
|
-
* - 'FILE_SYSTEM_CREATE_ARCHIVE' - @todo
|
|
34
|
-
* - 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' - Device can determine a total size of a potentially extracted archive
|
|
35
|
-
*
|
|
41
|
+
* The `supports()` method determines whether a queried capability is supported by the device.
|
|
42
|
+
* @param capability - The capability to check for support.
|
|
43
|
+
* @returns {Promise<boolean>} Resolves to `true` if the capability is supported, otherwise `false`.
|
|
36
44
|
* @since 3.1.0
|
|
37
45
|
*/
|
|
38
46
|
async supports(capability) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Display.js","sourceRoot":"","sources":["../../../src/FrontApplet/Display/Display.ts"],"names":[],"mappings":";;;;;AACA,oEAA4C;AAG5C
|
|
1
|
+
{"version":3,"file":"Display.js","sourceRoot":"","sources":["../../../src/FrontApplet/Display/Display.ts"],"names":[],"mappings":";;;;;AACA,oEAA4C;AAG5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO;IAOH;IACA;IAPF,MAAM,CAAC,cAAc,GAAW,SAAS,CAAC;IAE1C,OAAO,GAAW,SAAU,CAAC;IAEpC,gBAAgB;IAChB,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;IACpC,CAAC;IAEJ;;;;;OAKG;IACI,KAAK,CAAC,QAAQ,CAAC,UAA6B;QAClD,IAAA,kBAAQ,EAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC;YAC3C,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;YACjC,UAAU;SACV,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IACjB,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,OAAO,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IACvE,CAAC;;AAGF,kBAAe,OAAO,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { AnyString } from '../../utils/types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the capabilities that a display can support.
|
|
4
|
+
* These capabilities are used to determine if a specific feature is available on the display.
|
|
5
|
+
*/
|
|
2
6
|
export type DisplayCapability = 'FILE_SYSTEM_INTERNAL_STORAGE' | 'FILE_SYSTEM_EXTERNAL_STORAGE' | 'FILE_SYSTEM_FILE_CHECKSUM' | 'FILE_SYSTEM_LINK' | 'TIMERS_PROPRIETARY' | 'VIDEO_4K' | 'SERIAL' | 'BARCODE_SCANNER' | 'FRONT_OSD' | 'FILE_SYSTEM_CREATE_ARCHIVE' | 'FILE_SYSTEM_ARCHIVE_EXTRACT_INFO' | 'BROWSER' | 'PROXIMITY_SENSOR' | AnyString;
|
|
3
7
|
export default interface IDisplay {
|
|
4
8
|
supports(capability: DisplayCapability): Promise<boolean>;
|