@signageos/front-applet 6.2.1 → 6.3.0
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/CHANGELOG.md +5 -0
- package/README.md +3 -1
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/docs/applet-basics.md +3 -3
- package/docs/{js-api → content}/js-browser.md +13 -10
- package/docs/{js-api → content}/js-display.md +15 -5
- package/docs/{js-api → content}/js-file-system.md +4 -16
- package/docs/{js-api → content}/js-offline-cache-simple-data.md +1 -1
- package/docs/{js-api → content}/js-sensors.md +2 -2
- package/docs/{js-api → content}/js-serial.md +1 -1
- package/docs/{js-api → content}/js-video-inputs-internal-ports.md +1 -1
- package/docs/index.md +3 -3
- package/docs/{management-api → management}/js-management-management.md +60 -20
- package/docs/{management-api → management}/js-management-network.md +3 -3
- package/docs/{management-api → management}/js-management-wifi.md +8 -8
- package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +4 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js +1 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -1
- package/es6/FrontApplet/Input/IInput.d.ts +11 -0
- package/es6/FrontApplet/Input/IInput.js +3 -0
- package/es6/FrontApplet/Input/IInput.js.map +1 -0
- package/es6/FrontApplet/Input/Input.d.ts +5 -1
- package/es6/FrontApplet/Input/Input.js +6 -0
- package/es6/FrontApplet/Input/Input.js.map +1 -1
- package/package.json +7 -4
- /package/docs/{js-api → content}/js-applet-resources.md +0 -0
- /package/docs/{js-api → content}/js-command.md +0 -0
- /package/docs/{js-api → content}/js-debug.md +0 -0
- /package/docs/{js-api → content}/js-device-info.md +0 -0
- /package/docs/{js-api → content}/js-fonts.md +0 -0
- /package/docs/{js-api → content}/js-hardware.md +0 -0
- /package/docs/{js-api → content}/js-iframes.md +0 -0
- /package/docs/{js-api → content}/js-input.md +0 -0
- /package/docs/{js-api → content}/js-offline-cache-media-files.md +0 -0
- /package/docs/{js-api → content}/js-osd.md +0 -0
- /package/docs/{js-api → content}/js-proof-of-play.md +0 -0
- /package/docs/{js-api → content}/js-sync-playback.md +0 -0
- /package/docs/{js-api → content}/js-video-stream.md +0 -0
- /package/docs/{js-api → content}/js-video.md +0 -0
- /package/docs/{management-api → management}/js-management-application.md +0 -0
- /package/docs/{management-api → management}/js-management-audio.md +0 -0
- /package/docs/{management-api → management}/js-management-debug.md +0 -0
- /package/docs/{management-api → management}/js-management-firmware.md +0 -0
- /package/docs/{management-api → management}/js-management-monitoring-commands.md +0 -0
- /package/docs/{management-api → management}/js-management-monitors.md +0 -0
- /package/docs/{management-api → management}/js-management-os.md +0 -0
- /package/docs/{management-api → management}/js-management-package.md +0 -0
- /package/docs/{management-api → management}/js-management-power.md +0 -0
- /package/docs/{management-api → management}/js-management-proxy.md +0 -0
- /package/docs/{management-api → management}/js-management-remote-control.md +0 -0
- /package/docs/{management-api → management}/js-management-screen.md +0 -0
- /package/docs/{management-api → management}/js-management-security.md +0 -0
- /package/docs/{management-api → management}/js-management-time.md +0 -0
package/docs/applet-basics.md
CHANGED
|
@@ -167,7 +167,7 @@ window.addEventListener('sos.loaded',() => {
|
|
|
167
167
|
|
|
168
168
|
## Custom variables in Applet
|
|
169
169
|
|
|
170
|
-
You can pass CUSTOM key-value variables to the Applet. To do that, add your values as a Timing configuration (over Box of [Timings API](/
|
|
170
|
+
You can pass CUSTOM key-value variables to the Applet. To do that, add your values as a Timing configuration (over Box of [Timings API](https://docs.signageos.io/hc/en-us/articles/4405238989458)). Then you can access your values via `sos.config` object.
|
|
171
171
|
|
|
172
172
|
```javascript
|
|
173
173
|
// Parsed JSON object passed to Timing for current applet & current device together
|
|
@@ -225,7 +225,7 @@ Management capabilities refer to the capabilities of the display's internal stat
|
|
|
225
225
|
|
|
226
226
|
| Capability | Description |
|
|
227
227
|
| ------------------------------ | ----------------------------------------------------------------------------------------- |
|
|
228
|
-
| `BATTERY_STATUS` | Device can [report its battery status](management/js-management#getbatterystatus). |
|
|
228
|
+
| `BATTERY_STATUS` | Device can [report its battery status](management/js-management-management#getbatterystatus). |
|
|
229
229
|
| `WIFI` | Device can [connect to a Wi-Fi](management/js-management-wifi#connect). |
|
|
230
230
|
| `WIFI_SCAN` | Device can [scan surrounding Wi-Fi devices](management/js-management-wifi#scandevices). |
|
|
231
231
|
| `WIFI_AP` | Device is capable of [becoming a Wi-Fi endpoint](management/js-management-wifi#enableap) that other devices can connect to. |
|
|
@@ -233,7 +233,7 @@ Management capabilities refer to the capabilities of the display's internal stat
|
|
|
233
233
|
| `SET_TIME` | Device can change its [time settings](management/js-management-time). |
|
|
234
234
|
| `NTP_TIME` | Device can [synchronize its time with an NTP server](management/js-management-time#setntp). |
|
|
235
235
|
| `PACKAGE_INSTALL` | It's possible to [install additional packages](management/js-management-package) on the device, managed by signageOS application. |
|
|
236
|
-
| `SET_VOLUME` | Device can change its [audio volume](management/js-management-
|
|
236
|
+
| `SET_VOLUME` | Device can change its [audio volume](management/js-management-audio). |
|
|
237
237
|
| `SET_REMOTE_CONTROL_ENABLED` | Device can [disable control via IR remote](management/js-management-remote-control) to increase security.
|
|
238
238
|
|
|
239
239
|
```javascript
|
|
@@ -13,24 +13,24 @@ description: "[Content JS API] There are several use-cases when you need to open
|
|
|
13
13
|
|
|
14
14
|
# Browser
|
|
15
15
|
|
|
16
|
-
There are several use-cases when you need to open a web browser on a touch-enabled device (also known as a tablet).
|
|
17
|
-
For these cases, you can use a custom web browser we built.
|
|
18
|
-
Default URL can be opened and even the whitelisting/blacklisting of certain domains is supported.
|
|
16
|
+
There are several use-cases when you need to open a web browser on a touch-enabled device (also known as a tablet).
|
|
17
|
+
For these cases, you can use a custom web browser we built.
|
|
18
|
+
Default URL can be opened and even the whitelisting/blacklisting of certain domains is supported.
|
|
19
19
|
|
|
20
20
|
## All methods
|
|
21
21
|
|
|
22
22
|
| Methods | Description | Supported since |
|
|
23
23
|
| ----------------- | ----------- | :---------------: |
|
|
24
24
|
| `open()` | Open page in integrated browser | 4.0.0 |
|
|
25
|
-
| `close()` | Open page in integrated browser | 4.4.0
|
|
25
|
+
| `close()` | Open page in integrated browser | 4.4.0
|
|
26
26
|
|
|
27
27
|
## open()
|
|
28
28
|
|
|
29
29
|
:::info
|
|
30
|
-
**This API is currently available on:**
|
|
30
|
+
**This API is currently available on:**
|
|
31
31
|
- Android devices with Android 5+ (Philips, Benq, Sharp, generic Android device)
|
|
32
32
|
|
|
33
|
-
**With some limitation you can use this API also on**
|
|
33
|
+
**With some limitation you can use this API also on**
|
|
34
34
|
- Samsung Tizen (SSSP 4 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
35
35
|
- LG webOS (webOS 3.0 and above); where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
36
36
|
- Raspberry Pi and NEC Compute Module; where the website is just in fullscreen without an address bar or theme options (headless mode)
|
|
@@ -51,12 +51,14 @@ Method `open()` also supports properties for browser. You can set height, width
|
|
|
51
51
|
| `aclDomains` | Array | ? |
|
|
52
52
|
| `aclMode` | String | Can be only **blacklist** or **whitelist**. |
|
|
53
53
|
| `readOnlyAddressBar` | Boolean | Accessible address bar |
|
|
54
|
-
| `coordinates` | Object | Size of browser screen (only
|
|
54
|
+
| `coordinates` | Object | Size of browser screen (only Linux) |
|
|
55
55
|
| `idleTimeout` | Number | Timeout in milliseconds for loading page |
|
|
56
56
|
| `theme` | Object | Setting custom theme for Android |
|
|
57
57
|
| `headlessMode` | Boolean | Headless mode hides the entire address bar (default) |
|
|
58
58
|
| `canUserClose` | Boolean | Whether the user can manually close the browser. Default:<br/>**Headless:** `false`<br/>**With UI:** `true` |
|
|
59
|
-
| `clearData` | Boolean | Clear cache after the browser closes. Default:<br/>**Headless:** `false`<br/>**With UI:** `true`
|
|
59
|
+
| `clearData` | Boolean | Clear cache after the browser closes. Default:<br/>**Headless:** `false`<br/>**With UI:** `true`
|
|
60
|
+
| `method` | String | Can only be **native** (which opens a new, fully sandboxed fullscreen window) or **iframe** (which opens a configurable-sized window). (only Linux) |
|
|
61
|
+
:::
|
|
60
62
|
|
|
61
63
|
|
|
62
64
|
```javascript
|
|
@@ -64,7 +66,7 @@ sos.browser.open('https://www.signageos.io', {
|
|
|
64
66
|
aclDomains: ['google.com', 'yahoo.com'],
|
|
65
67
|
aclMode: 'blacklist', // or 'whitelist'
|
|
66
68
|
readOnlyAddressBar: true,
|
|
67
|
-
coordinates: { // Supported only on
|
|
69
|
+
coordinates: { // Supported only on Linux and Android
|
|
68
70
|
x: 0,
|
|
69
71
|
y: 0,
|
|
70
72
|
height: 500,
|
|
@@ -134,6 +136,7 @@ interface IOpenLinkOptions {
|
|
|
134
136
|
headlessMode?: boolean;
|
|
135
137
|
clearData?: boolean;
|
|
136
138
|
canUserClose?: boolean;
|
|
139
|
+
method?: 'native' | 'iframe'
|
|
137
140
|
}
|
|
138
141
|
|
|
139
142
|
open(uri: string, options?: IOpenLinkOptions): void;
|
|
@@ -157,5 +160,5 @@ Although we are doing our best, following errors may occur when opening a link.
|
|
|
157
160
|
| Code | Type | Message |
|
|
158
161
|
| ---- | ---- | ------- |
|
|
159
162
|
| 40301 | AppletBrowserUriError | Property argument `uri` must be a string |
|
|
160
|
-
| 50301 | InternalBrowserOpenLinkError | Unexpected error occurred when opening `$$LINK$$`
|
|
163
|
+
| 50301 | InternalBrowserOpenLinkError | Unexpected error occurred when opening `$$LINK$$`
|
|
161
164
|
|
|
@@ -32,13 +32,23 @@ with a warning message like this one:
|
|
|
32
32
|
|
|
33
33
|
:::warning
|
|
34
34
|
* Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
|
|
35
|
-
* More info [**HERE**](/api/js/content/latest/js-display#supports).
|
|
36
35
|
:::
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
|
41
|
-
|
|
|
37
|
+
### List of capabilities
|
|
38
|
+
|
|
39
|
+
| Param | Description |
|
|
40
|
+
| ------------ | --------------- |
|
|
41
|
+
| `FILE_SYSTEM_INTERNAL_STORAGE` | |
|
|
42
|
+
| `FILE_SYSTEM_EXTERNAL_STORAGE` | |
|
|
43
|
+
| `FILE_SYSTEM_FILE_CHECKSUM` | |
|
|
44
|
+
| `FILE_SYSTEM_LINK` | |
|
|
45
|
+
| `TIMERS_PROPRIETARY` | |
|
|
46
|
+
| `VIDEO_4K` | |
|
|
47
|
+
| `SERIAL` | |
|
|
48
|
+
| `BARCODE_SCANNER` | |
|
|
49
|
+
| `FRONT_OSD` | |
|
|
50
|
+
| `FILE_SYSTEM_CREATE_ARCHIVE` | |
|
|
51
|
+
| `FILE_SYSTEM_ARCHIVE_EXTRACT_INFO` | Information about total size of all files when archive will be extracted |
|
|
42
52
|
|
|
43
53
|
### Javascript example
|
|
44
54
|
```javascript
|
|
@@ -16,7 +16,7 @@ File System API allows **low level manipulation with files and directories** in
|
|
|
16
16
|
File System API works with both in **internal and external storages** (USB flash drives, etc.).
|
|
17
17
|
|
|
18
18
|
:::warning
|
|
19
|
-
File System directory structure is **PERSISTENT** and is **NOT** automatically deleted through `Applet Reload` power action! Applet Reload only deletes `/data` directory which is reserved for simplified [Offline Cache API](
|
|
19
|
+
File System directory structure is **PERSISTENT** and is **NOT** automatically deleted through `Applet Reload` power action! Applet Reload only deletes `/data` directory which is reserved for simplified [Offline Cache API](js-offline-cache-media-files). Use `deleteFile()` to clear the device storage file system.
|
|
20
20
|
:::
|
|
21
21
|
|
|
22
22
|
<div class="row d-flex align-content-stretch force-padding-10">
|
|
@@ -35,21 +35,9 @@ File System directory structure is **PERSISTENT** and is **NOT** automatically d
|
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<div>
|
|
42
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
43
|
-
<i class="fas fa-medal svg-black"></i>
|
|
44
|
-
</div>
|
|
45
|
-
<div>
|
|
46
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Offline Cache for media files</h3>
|
|
47
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</a>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
38
|
+
:::note[Alternative file caching]
|
|
39
|
+
[Offline Cache for media files](js-offline-cache-media-files)
|
|
40
|
+
:::
|
|
53
41
|
|
|
54
42
|
## All methods
|
|
55
43
|
|
|
@@ -15,7 +15,7 @@ description: "[Content JS API] This API provides you with approach similar to th
|
|
|
15
15
|
|
|
16
16
|
Use when you need to save some data into local memory.
|
|
17
17
|
This API provides you with approach similar to the HTML5's Local Storage, but implemented internally via native device API and completely device agnostic.
|
|
18
|
-
We do not recommend using a different storage type then Offline Cache or full featured [File System API](
|
|
18
|
+
We do not recommend using a different storage type then Offline Cache or full featured [File System API](js-file-system) that will provide you with more low-level methods.
|
|
19
19
|
|
|
20
20
|
## All methods
|
|
21
21
|
|
|
@@ -62,9 +62,9 @@ For more information read [this article](https://docs.signageos.io/hc/en-us/arti
|
|
|
62
62
|
|
|
63
63
|
Sometimes you might want to use hardware that we don't support out of the box yet.
|
|
64
64
|
|
|
65
|
-
Firstly, you will need to read the documentation for the [serial API](
|
|
65
|
+
Firstly, you will need to read the documentation for the [serial API](js-serial).
|
|
66
66
|
Most often, the hardware you will decide to use connects to the device via USB and internally uses a serial communication, like RS232.
|
|
67
67
|
In that case you will use the serial API.
|
|
68
68
|
|
|
69
|
-
You can approach this any way you like, but remember that you should always implement the [interfaces defined by us](
|
|
69
|
+
You can approach this any way you like, but remember that you should always implement the [interfaces defined by us](js-sensors#sensors-interfaces).
|
|
70
70
|
That will allow for greater code reusability and readability.
|
|
@@ -21,7 +21,7 @@ Such hardware could be, for example, printers, payment terminals or sensors.
|
|
|
21
21
|
|
|
22
22
|
:::warning
|
|
23
23
|
* Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
|
|
24
|
-
* More info [**HERE**](
|
|
24
|
+
* More info [**HERE**](js-display#supports).
|
|
25
25
|
* Samsung Kiosk serial connection only works over serial ports, not over USB ports
|
|
26
26
|
:::
|
|
27
27
|
|
|
@@ -22,7 +22,7 @@ Display content from another device over HDMI, Display Port, or other port. PIP
|
|
|
22
22
|
| `stop()` | Method stops using the internal port. | 1.0.18 |
|
|
23
23
|
|
|
24
24
|
## play()
|
|
25
|
-
Method uses the same API as [video streams](
|
|
25
|
+
Method uses the same API as [video streams](js-video-stream). Instead of URL (for stream), **specify an URI of the port** to display.
|
|
26
26
|
|
|
27
27
|
### Parameters
|
|
28
28
|
|
package/docs/index.md
CHANGED
|
@@ -18,7 +18,7 @@ All APIs are standardized and available across all [supported devices](https://d
|
|
|
18
18
|
:::
|
|
19
19
|
|
|
20
20
|
:::info[Start here]
|
|
21
|
-
[Basic information about Applets](
|
|
21
|
+
[Basic information about Applets](applet-basics.md)
|
|
22
22
|
|
|
23
23
|
General information required to use the signageOS JS API
|
|
24
24
|
:::
|
|
@@ -38,13 +38,13 @@ Universal APIs for File system, access to accelerated video playback, sensor man
|
|
|
38
38
|
| [Device Info](content/js-device-info) | Device-related informations |
|
|
39
39
|
| [Display](content/js-display) | Query features supported by the display |
|
|
40
40
|
| [File system](content/js-file-system) | Full-featured file system API including ZIP and folder management |
|
|
41
|
-
| [Fonts](content/js-
|
|
41
|
+
| [Fonts](content/js-fonts) | Make it easy to load additional fonts into SoC devices |
|
|
42
42
|
| [Hardware](content/js-hardware) | Hardware-specific APIs like LED lights on Philips 10BDL |
|
|
43
43
|
| [Inputs](content/js-input) | Controller inputs like IR remote unified under one API |
|
|
44
44
|
| [iFrames](content/js-iframes) | Using JS SDK in iFrames |
|
|
45
45
|
| [Proof of Play](content/js-proof-of-play) | Proof of Play API |
|
|
46
46
|
| [Sensors](content/js-sensors) | Using sensors and IoT devices in your application |
|
|
47
|
-
| [Serial Port](content/js-
|
|
47
|
+
| [Serial Port](content/js-serial) | Control external devices via serial |
|
|
48
48
|
| [Synchronized playback](content/js-sync-playback) | API for creating synced playback and videowalls |
|
|
49
49
|
| [Video Inputs aka PiP](content/js-video-inputs-internal-ports) | Show HDMI/DP/VGA as a part of your content via PiP feature |
|
|
50
50
|
| [Video Playback](content/js-video) | Playing accelerated gapless videos via native video player |
|
|
@@ -30,21 +30,9 @@ To make the management of devices more viable and open there is a management API
|
|
|
30
30
|
| `getBrand()` | Information about device brand | 5.7.0
|
|
31
31
|
|
|
32
32
|
## Examples
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<div>
|
|
37
|
-
<div class="wide-box__image d-flex align-items-center">
|
|
38
|
-
<i class="fab fa-github svg-black"></i>
|
|
39
|
-
</div>
|
|
40
|
-
<div>
|
|
41
|
-
<h3 class="wide-box__title wide-box__title__small pl-85">Basic usage of management API</h3>
|
|
42
|
-
<div class="wide-box__description">Working example on our Github</div>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</a>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
33
|
+
:::note[GitHub Example]
|
|
34
|
+
[Basic usage of management API](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/basics)
|
|
35
|
+
:::
|
|
48
36
|
|
|
49
37
|
:::note[GitHub Example]
|
|
50
38
|
- [Getting basic management API data](https://github.com/signageos/applet-examples/blob/master/examples/management-js-api/js-management-getters/)
|
|
@@ -54,16 +42,68 @@ To make the management of devices more viable and open there is a management API
|
|
|
54
42
|
## supports()
|
|
55
43
|
Method `supports()` will show you what capabilities the deployed device currently has.
|
|
56
44
|
|
|
57
|
-
|
|
58
|
-
| Param | Type |Description |
|
|
59
|
-
| -------------- | ----------------------------- | ---------------------------- |
|
|
60
|
-
| `capability` | String | Name of capability
|
|
61
|
-
|
|
62
45
|
### Javascript example
|
|
46
|
+
|
|
63
47
|
```javascript
|
|
64
48
|
await sos.management.supports("NETWORK_INFO"); // Returns boolean
|
|
65
49
|
```
|
|
66
50
|
|
|
51
|
+
### Capabilities
|
|
52
|
+
|
|
53
|
+
| Param |
|
|
54
|
+
| -------------- |
|
|
55
|
+
| MODEL |
|
|
56
|
+
| SERIAL_NUMBER |
|
|
57
|
+
| BRAND |
|
|
58
|
+
| OS_VERSION |
|
|
59
|
+
| BATTERY_STATUS |
|
|
60
|
+
| STORAGE_UNITS |
|
|
61
|
+
| TEMPERATURE |
|
|
62
|
+
| SCREENSHOT_UPLOAD |
|
|
63
|
+
| NETWORK_INFO |
|
|
64
|
+
| WIFI |
|
|
65
|
+
| WIFI_SCAN |
|
|
66
|
+
| WIFI_AP |
|
|
67
|
+
| WIFI_STRENGTH |
|
|
68
|
+
| TIMERS_PROPRIETARY |
|
|
69
|
+
| BRIGHTNESS_SCHEDULING |
|
|
70
|
+
| TIMERS_NATIVE |
|
|
71
|
+
| SET_BRIGHTNESS |
|
|
72
|
+
| GET_BRIGHTNESS |
|
|
73
|
+
| SCREEN_RESIZE |
|
|
74
|
+
| SET_TIME |
|
|
75
|
+
| SET_TIMEZONE |
|
|
76
|
+
| GET_TIMEZONE |
|
|
77
|
+
| NTP_TIME |
|
|
78
|
+
| APP_UPGRADE |
|
|
79
|
+
| FIRMWARE_UPGRADE |
|
|
80
|
+
| PACKAGE_INSTALL |
|
|
81
|
+
| SET_VOLUME |
|
|
82
|
+
| GET_VOLUME |
|
|
83
|
+
| SET_REMOTE_CONTROL_ENABLED |
|
|
84
|
+
| SET_DEBUG |
|
|
85
|
+
| SYSTEM_REBOOT |
|
|
86
|
+
| APP_RESTART |
|
|
87
|
+
| DISPLAY_POWER |
|
|
88
|
+
| SERVLET |
|
|
89
|
+
| HARDWARE_LED_SET_COLOR |
|
|
90
|
+
| PROXIMITY_SENSOR |
|
|
91
|
+
| FACTORY_RESET |
|
|
92
|
+
| ORIENTATION_LANDSCAPE |
|
|
93
|
+
| ORIENTATION_PORTRAIT |
|
|
94
|
+
| ORIENTATION_LANDSCAPE_FLIPPED |
|
|
95
|
+
| ORIENTATION_PORTRAIT_FLIPPED |
|
|
96
|
+
| ORIENTATION_AUTO |
|
|
97
|
+
| SCHEDULE_POWER_ACTION |
|
|
98
|
+
| EXTENDED_MANAGEMENT |
|
|
99
|
+
| SYSTEM_CPU |
|
|
100
|
+
| SYSTEM_MEMORY |
|
|
101
|
+
| PROXY |
|
|
102
|
+
| AUTO_RECOVERY |
|
|
103
|
+
| PEER_RECOVERY |
|
|
104
|
+
| FILE_SYSTEM_WIPEOUT |
|
|
105
|
+
| REMOTE_DESKTOP |
|
|
106
|
+
|
|
67
107
|
## getModel()
|
|
68
108
|
Method `getModel()` will display the model of your device.
|
|
69
109
|
|
|
@@ -128,7 +128,7 @@ Manually configures a network interface.
|
|
|
128
128
|
If the interface is disabled, it will be enabled.
|
|
129
129
|
|
|
130
130
|
:::warning
|
|
131
|
-
Wi-Fi interface can be configured with this method but it has to be first enabled via the [Wi-Fi API](
|
|
131
|
+
Wi-Fi interface can be configured with this method but it has to be first enabled via the [Wi-Fi API](js-management-wifi).
|
|
132
132
|
:::
|
|
133
133
|
|
|
134
134
|
### Object properties
|
|
@@ -176,7 +176,7 @@ Configures a network interface to use DHCP to get an IP address asigned from the
|
|
|
176
176
|
If the interface is disabled, it will be enabled.
|
|
177
177
|
|
|
178
178
|
:::warning
|
|
179
|
-
Wi-Fi interface can be configured with this method but it has to be first enabled via the [Wi-Fi API](
|
|
179
|
+
Wi-Fi interface can be configured with this method but it has to be first enabled via the [Wi-Fi API](js-management-wifi).
|
|
180
180
|
:::
|
|
181
181
|
|
|
182
182
|
### Object properties
|
|
@@ -219,5 +219,5 @@ A disabled network interface can be re-enabled simply by calling either `setDHCP
|
|
|
219
219
|
|
|
220
220
|
:::warning
|
|
221
221
|
Don't use this method to disable Wi-Fi.
|
|
222
|
-
Use [Wi-Fi API](
|
|
222
|
+
Use [Wi-Fi API](js-management-wifi) to enable/disable Wi-Fi.
|
|
223
223
|
:::
|
|
@@ -17,7 +17,7 @@ Wi-Fi API allows you to configure Wi-Fi, if the device supports it.
|
|
|
17
17
|
|
|
18
18
|
:::warning
|
|
19
19
|
* Before using this API, ensure that the device supports Wi-Fi via `sos.management.supports("WIFI")`.
|
|
20
|
-
* More info about how to check it, you can find [**THERE**](
|
|
20
|
+
* More info about how to check it, you can find [**THERE**](js-management-management#supports)
|
|
21
21
|
:::
|
|
22
22
|
|
|
23
23
|
## State management
|
|
@@ -50,7 +50,7 @@ AP state is not persistent and on reboot the device will be in DISABLED state.
|
|
|
50
50
|
Different regulations apply to Wi-Fi communication in different countries.
|
|
51
51
|
Under normal circumstances, everything should work with default settings.
|
|
52
52
|
However, if you experience any problems, you might want to try changing Wi-Fi country configuration to your country.
|
|
53
|
-
See [`getCountry()`](
|
|
53
|
+
See [`getCountry()`](js-management-wifi#getcountry) and [`setCountry()`](js-management-wifi#setcountry) methods.
|
|
54
54
|
|
|
55
55
|
## All methods
|
|
56
56
|
|
|
@@ -263,7 +263,7 @@ Call a callback everytime an event is emitted.
|
|
|
263
263
|
|
|
264
264
|
| Param | Type | Required | Description |
|
|
265
265
|
| -------- | -------- | :--------------: | --------------------------------------------------- |
|
|
266
|
-
| `event` | String | <div class="red">Yes</div> | Event name. See [events](
|
|
266
|
+
| `event` | String | <div class="red">Yes</div> | Event name. See [events](js-management-wifi#events) for valid event names. |
|
|
267
267
|
| `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted
|
|
268
268
|
|
|
269
269
|
### Javascript example
|
|
@@ -282,7 +282,7 @@ Call a callback the first time an event is emitted.
|
|
|
282
282
|
|
|
283
283
|
| Param | Type | Required | Description |
|
|
284
284
|
| -------- | -------- | :------------: | ----------------------------------------------------- |
|
|
285
|
-
| `event` | String | <div class="red">Yes</div> | Event name. See [events](
|
|
285
|
+
| `event` | String | <div class="red">Yes</div> | Event name. See [events](js-management-wifi#events) for valid event names. |
|
|
286
286
|
| `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted
|
|
287
287
|
|
|
288
288
|
### Javascript example
|
|
@@ -296,12 +296,12 @@ sos.management.wifi.once('client_disconnected', () => {
|
|
|
296
296
|
```
|
|
297
297
|
|
|
298
298
|
## removeListener()
|
|
299
|
-
Remove an event listener previously registered via [`on`](
|
|
299
|
+
Remove an event listener previously registered via [`on`](js-management-wifi#on) or [`once`](js-management-wifi#once).
|
|
300
300
|
|
|
301
301
|
|
|
302
302
|
| Param | Type | Required | Description |
|
|
303
303
|
| -------- | -------- | :----------: | ------------------------------------------------------- |
|
|
304
|
-
| `event` | String | <div class="red">Yes</div> | Event name. See [events](
|
|
304
|
+
| `event` | String | <div class="red">Yes</div> | Event name. See [events](js-management-wifi#events) for valid event names. |
|
|
305
305
|
| `listener` | Method | <div class="red">Yes</div> | Callback that was previously registered
|
|
306
306
|
|
|
307
307
|
### Javascript example
|
|
@@ -319,12 +319,12 @@ sos.management.wifi.removeListener('client_connected', listener);
|
|
|
319
319
|
```
|
|
320
320
|
|
|
321
321
|
## removeAllListeners()
|
|
322
|
-
Remove all listeners previously registered via [`on`](
|
|
322
|
+
Remove all listeners previously registered via [`on`](js-management-wifi#on) or [`once`](js-management-wifi#once), either for a specific event or for all events.
|
|
323
323
|
|
|
324
324
|
|
|
325
325
|
| Param | Type | Required | Description |
|
|
326
326
|
| ---------------- | ------ | :--------: | -------------------------------------------------------- |
|
|
327
|
-
| `event` | String | <div class="yellow">No</div> | Event name. See [events](
|
|
327
|
+
| `event` | String | <div class="yellow">No</div> | Event name. See [events](js-management-wifi#events) for valid event names.
|
|
328
328
|
|
|
329
329
|
### Javascript example
|
|
330
330
|
```javascript
|
|
@@ -104,6 +104,7 @@ interface IOpenLinkOptions {
|
|
|
104
104
|
headlessMode?: boolean;
|
|
105
105
|
clearData?: boolean;
|
|
106
106
|
canUserClose?: boolean;
|
|
107
|
+
method?: 'native' | 'iframe';
|
|
107
108
|
}
|
|
108
109
|
export default IOpenLinkOptions;
|
|
109
110
|
export declare const VIOpenLinkOptions: {
|
|
@@ -179,4 +180,7 @@ export declare const VIOpenLinkOptions: {
|
|
|
179
180
|
headlessMode: string;
|
|
180
181
|
clearData: string;
|
|
181
182
|
canUserClose: string;
|
|
183
|
+
method: {
|
|
184
|
+
'?string': string[];
|
|
185
|
+
};
|
|
182
186
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOpenLinkOptions.js","sourceRoot":"","sources":["../../../src/FrontApplet/Browser/IOpenLinkOptions.ts"],"names":[],"mappings":";;;AAkCa,QAAA,OAAO,GAAG;IACtB,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;IACtC,KAAK,EAAE;QACN,SAAS,EAAE;YACV,UAAU,EAAE,SAAS;SACrB;KACD;IACD,MAAM,EAAE;QACP,SAAS,EAAE;YACV,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,SAAS;SAClB;KACD;IACD,OAAO,EAAE;QACR,SAAS,EAAE;YACV,WAAW,EAAE;gBACZ,SAAS,EAAE;oBACV,MAAM,EAAE;wBACP,SAAS,EAAE;4BACV,UAAU,EAAE,SAAS;4BACrB,IAAI,EAAE,SAAS;yBACf;qBACD;iBACD;aACD;YACD,WAAW,EAAE;gBACZ,SAAS,EAAE;oBACV,MAAM,EAAE;wBACP,SAAS,EAAE;4BACV,UAAU,EAAE,SAAS;4BACrB,IAAI,EAAE,SAAS;4BACf,IAAI,EAAE,SAAS;yBACf;qBACD;oBACD,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE;oBAC/D,IAAI,EAAE,SAAS;iBACf;aACD;YACD,QAAQ,EAAE;gBACT,SAAS,EAAE;oBACV,KAAK,EAAE,SAAS;iBAChB;aACD;SACD;KACD;CACD,CAAC;
|
|
1
|
+
{"version":3,"file":"IOpenLinkOptions.js","sourceRoot":"","sources":["../../../src/FrontApplet/Browser/IOpenLinkOptions.ts"],"names":[],"mappings":";;;AAkCa,QAAA,OAAO,GAAG;IACtB,IAAI,EAAE,EAAE,SAAS,EAAE,CA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Y,EAAE,UAAU;IACxB,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;CAC3C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import IKeyUpEventListener from './IKeyUpEventListener';
|
|
2
|
+
import IInputKeyMessage from './IInputKeyMessage';
|
|
3
|
+
import IKeyUpEvent from './IKeyUpEvent';
|
|
4
|
+
export interface IInput {
|
|
5
|
+
window: Window;
|
|
6
|
+
onKeyUp(listener: IKeyUpEventListener): void;
|
|
7
|
+
handleMessageData(data: IInputKeyMessage): void;
|
|
8
|
+
removeEventListeners(): void;
|
|
9
|
+
removeEventListener(event: string, listener: (...args: any[]) => void): void;
|
|
10
|
+
emitKeyUpEvent(event: IKeyUpEvent): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IInput.js","sourceRoot":"","sources":["../../../src/FrontApplet/Input/IInput.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import IKeyUpEventListener from './IKeyUpEventListener';
|
|
2
2
|
import IInputKeyMessage from './IInputKeyMessage';
|
|
3
|
-
|
|
3
|
+
import IKeyUpEvent from './IKeyUpEvent';
|
|
4
|
+
import { IInput } from './IInput';
|
|
5
|
+
export default class Input implements IInput {
|
|
4
6
|
readonly window: Window;
|
|
5
7
|
private messagePrefix;
|
|
6
8
|
static MESSAGE_PREFIX: string;
|
|
@@ -9,6 +11,8 @@ export default class Input {
|
|
|
9
11
|
onKeyUp(listener: IKeyUpEventListener): void;
|
|
10
12
|
handleMessageData(data: IInputKeyMessage): void;
|
|
11
13
|
removeEventListeners(): void;
|
|
14
|
+
removeEventListener(event: string, listener: (...args: any[]) => void): void;
|
|
15
|
+
emitKeyUpEvent(event: IKeyUpEvent): void;
|
|
12
16
|
private dispatchEventToParent;
|
|
13
17
|
private getMessage;
|
|
14
18
|
}
|
|
@@ -38,6 +38,12 @@ class Input {
|
|
|
38
38
|
removeEventListeners() {
|
|
39
39
|
this.eventEmitter.removeAllListeners();
|
|
40
40
|
}
|
|
41
|
+
removeEventListener(event, listener) {
|
|
42
|
+
this.eventEmitter.removeListener(event, listener);
|
|
43
|
+
}
|
|
44
|
+
emitKeyUpEvent(event) {
|
|
45
|
+
this.eventEmitter.emit('keyup', event);
|
|
46
|
+
}
|
|
41
47
|
dispatchEventToParent(event) {
|
|
42
48
|
var _a, _b, _c;
|
|
43
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/FrontApplet/Input/Input.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAsC;AAItC,mDAA4C;
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/FrontApplet/Input/Input.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAsC;AAItC,mDAA4C;AAG5C,MAAqB,KAAK;IAIzB,YAA4B,MAAc,EAAU,aAAqB;QAA7C,WAAM,GAAN,MAAM,CAAQ;QAAU,kBAAa,GAAb,aAAa,CAAQ;QACxE,IAAI,CAAC,YAAY,GAAG,IAAI,qBAAY,EAAE,CAAC;QACvC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,KAAoB,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;IACpG,CAAC;IAEM,OAAO,CAAC,QAA6B;QAC3C,kBAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC;QAC7C,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;IAEM,iBAAiB,CAAC,IAAsB;QAC9C,QAAQ,IAAI,CAAC,IAAI,EAAE;YAClB,KAAK,IAAI,CAAC,UAAU,CAAC,O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
"main": "dist/bundle.js",
|
|
5
5
|
"types": "es6/bundle.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,10 +21,13 @@
|
|
|
21
21
|
"lint:staged": "npx lint-staged",
|
|
22
22
|
"prebuild": "rm -rf dist/*",
|
|
23
23
|
"prepare": "npm run prebuild && npm run build && npm run generate-declarations && npx husky install",
|
|
24
|
-
"test": "env NODE_ENV=test
|
|
24
|
+
"test": "env NODE_ENV=test ./node_modules/mocha/bin/mocha --config .mocha/default.js",
|
|
25
|
+
"test:coverage": "npm run test:coverage:runtime && npm run test:coverage:types",
|
|
26
|
+
"test:coverage:runtime": "env NODE_ENV=test c8 ./node_modules/mocha/bin/mocha --config .mocha/transpile-only.js",
|
|
27
|
+
"test:coverage:types": "tsc --noEmit -p tsconfig.json",
|
|
25
28
|
"escheck": "es-check --module es5 dist/*.js",
|
|
26
29
|
"check": "npm run depcheck && npx --userconfig ./.npmrc @signageos/lib check-deps '.+' 'weinre'",
|
|
27
|
-
"depcheck": "depcheck --specials=tslint,webpack,mocha --parsers='*.ts:typescript,*.js:es6' --detectors='requireCallExpression,importDeclaration' --ignore-dirs='dist,packages' --ignores='@types/*,@signageos/codestyle,ts-node,source-map-support,mocha,depcheck,webpack-cli,@babel/polyfill,@babel/preset-env,es-check,debug,husky,lint-staged,c8'"
|
|
30
|
+
"depcheck": "depcheck --specials=tslint,webpack,mocha --parsers='*.ts:typescript,*.js:es6' --detectors='requireCallExpression,importDeclaration' --ignore-dirs='dist,packages' --ignores='@types/*,@signageos/codestyle,ts-node,source-map-support,mocha,depcheck,webpack-cli,@babel/polyfill,@babel/preset-env,es-check,debug,husky,lint-staged,c8,should-sinon,weinre,faker,should,sinon'"
|
|
28
31
|
},
|
|
29
32
|
"repository": {
|
|
30
33
|
"url": "git@gitlab.com:signageos/front-applet",
|
|
@@ -50,7 +53,7 @@
|
|
|
50
53
|
"es-check": "5.1.0",
|
|
51
54
|
"faker": "4.1.0",
|
|
52
55
|
"husky": "7.0.4",
|
|
53
|
-
"lint-staged": "
|
|
56
|
+
"lint-staged": "12.5.0",
|
|
54
57
|
"lodash": "4.17.21",
|
|
55
58
|
"mocha": "6.2.3",
|
|
56
59
|
"should": "13.2.3",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|