@signageos/front-applet 6.2.0 → 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.
Files changed (55) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +3 -1
  3. package/dist/bundle.js +1 -1
  4. package/dist/bundle.js.map +1 -1
  5. package/docs/{js-api/js-applet-basics.md → applet-basics.md} +38 -99
  6. package/docs/{js-api → content}/js-applet-resources.md +10 -28
  7. package/docs/{js-api → content}/js-browser.md +24 -36
  8. package/docs/{js-api → content}/js-command.md +33 -91
  9. package/docs/{js-api/js-api-debug.md → content/js-debug.md} +2 -3
  10. package/docs/{js-api → content}/js-device-info.md +4 -5
  11. package/docs/{js-api → content}/js-display.md +18 -10
  12. package/docs/{js-api → content}/js-file-system.md +17 -30
  13. package/docs/{js-api/js-loading-fonts.md → content/js-fonts.md} +21 -44
  14. package/docs/{js-api → content}/js-hardware.md +6 -9
  15. package/docs/{js-api → content}/js-iframes.md +3 -3
  16. package/docs/{js-api → content}/js-input.md +2 -3
  17. package/docs/{js-api → content}/js-offline-cache-media-files.md +26 -83
  18. package/docs/{js-api → content}/js-offline-cache-simple-data.md +12 -17
  19. package/docs/{js-api → content}/js-osd.md +0 -2
  20. package/docs/{js-api → content}/js-proof-of-play.md +4 -6
  21. package/docs/{js-api → content}/js-sensors.md +3 -3
  22. package/docs/{js-api/js-hardware-serial.md → content/js-serial.md} +13 -18
  23. package/docs/{js-api → content}/js-sync-playback.md +30 -70
  24. package/docs/{js-api → content}/js-video-inputs-internal-ports.md +16 -34
  25. package/docs/{js-api → content}/js-video-stream.md +49 -85
  26. package/docs/{js-api → content}/js-video.md +25 -75
  27. package/docs/index.md +97 -0
  28. package/docs/{management-api/10-js-management-application.md → management/js-management-application.md} +16 -32
  29. package/docs/{management-api/7-js-management-volume.md → management/js-management-audio.md} +4 -6
  30. package/docs/{management-api/9-js-management-debug.md → management/js-management-debug.md} +5 -18
  31. package/docs/{management-api/2-js-management-firmware.md → management/js-management-firmware.md} +11 -25
  32. package/docs/{management-api/1-js-management.md → management/js-management-management.md} +67 -56
  33. package/docs/{js-api/js-monitoring-commands.md → management/js-management-monitoring-commands.md} +5 -6
  34. package/docs/{js-api/js-monitors.md → management/js-management-monitors.md} +9 -9
  35. package/docs/{management-api/11-js-management-network.md → management/js-management-network.md} +17 -43
  36. package/docs/{management-api/2-js-management-os.md → management/js-management-os.md} +2 -3
  37. package/docs/{management-api/8-js-management-package.md → management/js-management-package.md} +4 -6
  38. package/docs/{management-api/4-js-management-power.md → management/js-management-power.md} +10 -15
  39. package/docs/{management-api/14-js-management-proxy.md → management/js-management-proxy.md} +4 -6
  40. package/docs/{management-api/3-js-management-remote-control.md → management/js-management-remote-control.md} +5 -20
  41. package/docs/{management-api/5-js-management-screen.md → management/js-management-screen.md} +27 -81
  42. package/docs/{management-api/12-js-management-security.md → management/js-management-security.md} +6 -9
  43. package/docs/{management-api/6-js-management-time.md → management/js-management-time.md} +19 -26
  44. package/docs/{management-api/13-js-management-wifi.md → management/js-management-wifi.md} +38 -47
  45. package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +4 -0
  46. package/es6/FrontApplet/Browser/IOpenLinkOptions.js +1 -0
  47. package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -1
  48. package/es6/FrontApplet/Input/IInput.d.ts +11 -0
  49. package/es6/FrontApplet/Input/IInput.js +3 -0
  50. package/es6/FrontApplet/Input/IInput.js.map +1 -0
  51. package/es6/FrontApplet/Input/Input.d.ts +5 -1
  52. package/es6/FrontApplet/Input/Input.js +6 -0
  53. package/es6/FrontApplet/Input/Input.js.map +1 -1
  54. package/package.json +7 -4
  55. package/docs/js-api/js-api-introduction.md +0 -91
@@ -15,9 +15,9 @@ description: "[Management JS API] Wi-Fi API allows you to configure Wi-Fi, if th
15
15
 
16
16
  Wi-Fi API allows you to configure Wi-Fi, if the device supports it.
17
17
 
18
- ::: alert alert--warning
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**](/api/js/management/1-js-management#supports)
20
+ * More info about how to check it, you can find [**THERE**](js-management-management#supports)
21
21
  :::
22
22
 
23
23
  ## State management
@@ -27,7 +27,7 @@ Wi-Fi can be in several states. Depending on which state it is in, its behavior
27
27
  * CLIENT
28
28
  * AP
29
29
 
30
- ::: alert alert--info
30
+ :::info
31
31
  It is only allowed to switch to another state when in the DISABLED state. It is not allowed to go directly from CLIENT to AP or vice versa.
32
32
  :::
33
33
 
@@ -50,11 +50,11 @@ 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()`](/api/js/management/13-js-management-wifi#getcountry) and [`setCountry()`](/api/js/management/13-js-management-wifi#setcountry) methods.
53
+ See [`getCountry()`](js-management-wifi#getcountry) and [`setCountry()`](js-management-wifi#setcountry) methods.
54
54
 
55
55
  ## All methods
56
56
 
57
- ::: table-responsive
57
+
58
58
  | Methods | Description | Supported since |
59
59
  | -------------------- | ------------------------------------------------------------------ | :---------------: |
60
60
  | `isClientEnabled()` | Is in CLIENT state? | 4.3.0 |
@@ -71,20 +71,18 @@ See [`getCountry()`](/api/js/management/13-js-management-wifi#getcountry) and [`
71
71
  | `on()` | Call listener anytime an event is emitted | 4.3.0 |
72
72
  | `once()` | Call listener the first time an event is emitted | 4.3.0 |
73
73
  | `removeListener()` | Remove a listener previously registered via on() or once() methods | 4.3.0 |
74
- | `removeAllListeners()` | Remove all listeners | 4.3.0 |
75
- :::
74
+ | `removeAllListeners()` | Remove all listeners | 4.3.0
76
75
 
77
76
  ## Events
78
77
 
79
- ::: table-responsive
78
+
80
79
  | Event | Description |
81
80
  | ------------------- | -------------------------------------------------------- |
82
81
  | `client_enabled` | Wi-Fi was set to CLIENT state |
83
82
  | `client_connected` | Wi-Fi is in CLIENT state and connected to a network |
84
83
  | `client_disconnected` | Wi-Fi is in CLIENT state and disconnected from a network |
85
84
  | `ap_enabled` | Wi-Fi was set to AP state |
86
- | `disabled` | Wi-Fi was set to DISABLED state |
87
- :::
85
+ | `disabled` | Wi-Fi was set to DISABLED state
88
86
 
89
87
  ## Examples
90
88
  <div class="row d-flex align-content-stretch force-padding-10">
@@ -117,7 +115,7 @@ if (isClientEnabled) {
117
115
  ## enableClient()
118
116
  Sets Wi-Fi to CLIENT state, meaning it has the ability to connect to a Wi-Fi network or scan available networks in the area.
119
117
 
120
- ::: alert alert--info
118
+ :::info
121
119
  It is not allowed to call this method, when in AP state. You must first switch to **DISABLED** state.
122
120
  :::
123
121
 
@@ -141,17 +139,16 @@ if (isAPEnabled) {
141
139
  Sets Wi-Fi to AP state, meaning the device will become a Wi-Fi network that other devices can connect to.
142
140
  It will run in WPA-Personal mode. As such, it requires an SSID (network name) and password that other devices will use to connect.
143
141
 
144
- ::: alert alert--info
142
+ :::info
145
143
  * It is not allowed to call this method when in CLIENT state. You must first switch to **DISABLED** state.
146
144
  * Before calling this method, make sure the device supports Wi-Fi AP via `sos.management.supports("WIFI_AP")`
147
145
  :::
148
146
 
149
- ::: table-responsive
147
+
150
148
  | Param | Type | Required | Description |
151
149
  | -------- | ------ | :----------: | ---------------------------------------------------------------------------------------------- |
152
150
  | `ssid` | String | <div class="red">Yes</div> | Device will be visible as a Wi-Fi network with this name. Max. allowed length is 32 characters. |
153
- | `password` | String | <div class="red">Yes</div> | Devices that wish to connect to this network will use this password. Must be between 8 and 32 characters. |
154
- :::
151
+ | `password` | String | <div class="red">Yes</div> | Devices that wish to connect to this network will use this password. Must be between 8 and 32 characters.
155
152
 
156
153
  ### Javascript example
157
154
  ```javascript
@@ -169,7 +166,7 @@ await sos.management.wifi.disable();
169
166
  ## getConnectedTo()
170
167
  If connected to a Wi-Fi network, returns the name of the network. Otherwise, returns null.
171
168
 
172
- ::: alert alert--info
169
+ :::info
173
170
  It is only allowed to call this method in CLIENT state.
174
171
  :::
175
172
 
@@ -182,17 +179,16 @@ const connectedTo = await sos.management.wifi.getConnectedTo();
182
179
  ## connect()
183
180
  Connect to a network.
184
181
 
185
- ::: alert alert--info
182
+ :::info
186
183
  It is only allowed to call this method in the **CLIENT** state.
187
184
  :::
188
185
 
189
- ::: table-responsive
186
+
190
187
  | Param | Type | Required | Description |
191
188
  | ------------------- | ------ | :---------: | ---------------------------------- |
192
189
  | `ssid` | String | <div class="red">Yes</div> | Name of the network you want to connect to. |
193
190
  | `password` | String | <div class="yellow">No</div> | Network's password. |
194
- | `options` | Object | <div class="yellow">No</div> | Additional options. |
195
- :::
191
+ | `options` | Object | <div class="yellow">No</div> | Additional options.
196
192
 
197
193
  ### Javascript example
198
194
  ```javascript
@@ -209,7 +205,7 @@ await sos.management.wifi.connect('network3', 'password123', { hidden: true });
209
205
  ## disconnect()
210
206
  Disconnect from the network, if connected to one.
211
207
 
212
- ::: alert alert--info
208
+ :::info
213
209
  It is only allowed to call this method in the **CLIENT** state.
214
210
  :::
215
211
 
@@ -222,7 +218,7 @@ await sos.management.wifi.disconnect();
222
218
  ## getCountry()
223
219
  Get currently configured country code.
224
220
 
225
- ::: alert alert--info
221
+ :::info
226
222
  It is not allowed to call this method in the **DISABLED** state.
227
223
  :::
228
224
 
@@ -234,15 +230,14 @@ const countryCode = await sos.management.wifi.getCountry();
234
230
  ## setCountry()
235
231
  Configure Wi-Fi for country-specific regulations.
236
232
 
237
- ::: alert alert--info
233
+ :::info
238
234
  It is not allowed to call this method in the **DISABLED** state.
239
235
  :::
240
236
 
241
- ::: table-responsive
237
+
242
238
  | Param | Type | Required | Description |
243
239
  | ----------- | ------ | :-----------: | -------------------------------------------------------------------------------------------- |
244
- | `countryCode` | String | <div class="red">Yes</div> |2-letter country code. See this [list of countries and their codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). |
245
- :::
240
+ | `countryCode` | String | <div class="red">Yes</div> |2-letter country code. See this [list of countries and their codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).
246
241
 
247
242
  ### Javascript example
248
243
  ```javascript
@@ -252,7 +247,7 @@ await sos.management.wifi.setCountry('ES');
252
247
  ## scanDevices()
253
248
  Get list of available Wi-Fi networks in the area.
254
249
 
255
- ::: alert alert--info
250
+ :::info
256
251
  * It is only allowed to call this method in the **CLIENT** state.
257
252
  * Before calling this method, make sure the device supports scanning via `sos.management.supports("WIFI_SCAN")`
258
253
  :::
@@ -265,12 +260,11 @@ const devices = await sos.management.wifi.scanDevices();
265
260
  ## on()
266
261
  Call a callback everytime an event is emitted.
267
262
 
268
- ::: table-responsive
263
+
269
264
  | Param | Type | Required | Description |
270
265
  | -------- | -------- | :--------------: | --------------------------------------------------- |
271
- | `event` | String | <div class="red">Yes</div> | Event name. See [events](/api/js/management/13-js-management-wifi#events) for valid event names. |
272
- | `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted |
273
- :::
266
+ | `event` | String | <div class="red">Yes</div> | Event name. See [events](js-management-wifi#events) for valid event names. |
267
+ | `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted
274
268
 
275
269
  ### Javascript example
276
270
  ```javascript
@@ -285,12 +279,11 @@ sos.management.wifi.on('client_disconnected', () => {
285
279
  ## once()
286
280
  Call a callback the first time an event is emitted.
287
281
 
288
- ::: table-responsive
282
+
289
283
  | Param | Type | Required | Description |
290
284
  | -------- | -------- | :------------: | ----------------------------------------------------- |
291
- | `event` | String | <div class="red">Yes</div> | Event name. See [events](/api/js/management/13-js-management-wifi#events) for valid event names. |
292
- | `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted |
293
- :::
285
+ | `event` | String | <div class="red">Yes</div> | Event name. See [events](js-management-wifi#events) for valid event names. |
286
+ | `listener` | Method | <div class="red">Yes</div> | Callback that will be called everytime the given event is emitted
294
287
 
295
288
  ### Javascript example
296
289
  ```javascript
@@ -303,14 +296,13 @@ sos.management.wifi.once('client_disconnected', () => {
303
296
  ```
304
297
 
305
298
  ## removeListener()
306
- Remove an event listener previously registered via [`on`](/api/js/management/13-js-management-wifi#on) or [`once`](/api/js/management/13-js-management-wifi#once).
299
+ Remove an event listener previously registered via [`on`](js-management-wifi#on) or [`once`](js-management-wifi#once).
300
+
307
301
 
308
- ::: table-responsive
309
302
  | Param | Type | Required | Description |
310
303
  | -------- | -------- | :----------: | ------------------------------------------------------- |
311
- | `event` | String | <div class="red">Yes</div> | Event name. See [events](/api/js/management/13-js-management-wifi#events) for valid event names. |
312
- | `listener` | Method | <div class="red">Yes</div> | Callback that was previously registered |
313
- :::
304
+ | `event` | String | <div class="red">Yes</div> | Event name. See [events](js-management-wifi#events) for valid event names. |
305
+ | `listener` | Method | <div class="red">Yes</div> | Callback that was previously registered
314
306
 
315
307
  ### Javascript example
316
308
  ```javascript
@@ -327,13 +319,12 @@ sos.management.wifi.removeListener('client_connected', listener);
327
319
  ```
328
320
 
329
321
  ## removeAllListeners()
330
- Remove all listeners previously registered via [`on`](/api/js/management/13-js-management-wifi#on) or [`once`](/api/js/management/13-js-management-wifi#once), either for a specific event or for all events.
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
+
331
324
 
332
- ::: table-responsive
333
325
  | Param | Type | Required | Description |
334
326
  | ---------------- | ------ | :--------: | -------------------------------------------------------- |
335
- | `event` | String | <div class="yellow">No</div> | Event name. See [events](/api/js/management/13-js-management-wifi#events) for valid event names. |
336
- :::
327
+ | `event` | String | <div class="yellow">No</div> | Event name. See [events](js-management-wifi#events) for valid event names.
337
328
 
338
329
  ### Javascript example
339
330
  ```javascript
@@ -352,10 +343,10 @@ sos.management.wifi.removeAllListeners();
352
343
  ```
353
344
 
354
345
  ### FAQ
355
- - Do I need to reboot my RPi for the Wi-Fi changes to take place?<br>
346
+ - Do I need to reboot my RPi for the Wi-Fi changes to take place?<br/>
356
347
  No, the device will automatically adapt to any saved changes
357
348
 
358
- - How can I tell if the device has successfuly connected to the network?<br>
359
- Once the device starts the connecting process and sucessfully connects, 2 events will be emmited:<br>
349
+ - How can I tell if the device has successfuly connected to the network?<br/>
350
+ Once the device starts the connecting process and sucessfully connects, 2 events will be emmited:<br/>
360
351
  1. client_enabled
361
352
  1. client_connected
@@ -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
  };
@@ -65,5 +65,6 @@ exports.VIOpenLinkOptions = {
65
65
  headlessMode: '?boolean',
66
66
  clearData: '?boolean',
67
67
  canUserClose: '?boolean',
68
+ method: { '?string': ['native', 'iframe'] },
68
69
  };
69
70
  //# sourceMappingURL=IOpenLinkOptions.js.map
@@ -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;AA8BW,QAAA,iBAAiB,GAAG;IAChC,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;IAClC,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE;IAClD,kBAAkB,EAAE,UAAU;IAC9B,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE;QACZ,SAAS,EAAE;YACV,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,QAAQ;SAChB;KACD;IACD,KAAK,EAAE,EAAE,SAAS,EAAE,eAAO,EAAE;IAC7B,YAAY,EAAE,UAAU;IACxB,SAAS,EAAE,UAAU;IACrB,YAAY,EAAE,UAAU;CACxB,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,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,SA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InputKeyMessage';
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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IInput.js.map
@@ -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
- export default class Input {
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/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AI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBAC5C,MAAM;YACP,QAAQ;SACR;IACF,CAAC;IAEM,oBAAoB;QAC1B,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,CAAC;IACxC,CAAC;IAEM,mBAAmB,CAAC,KAAa,EAAE,QAAkC;QAC3E,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnD,CAAC;IAEM,cAAc,CAAC,KAAkB;QACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACxC,CAAC;IAEa,qBAAqB,CAAC,KAAoB;;;YACvD,IAAI,MAAA,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,0CAAE,QAAQ,0CAAE,aAAa,EAAE;gBACjD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;aAC7E;iBAAM;gBACN,OAAO,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;aACzD;;KACD;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,KAAK,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IACrE,CAAC;;AAlDF,wBAmDC;AAlDc,oBAAc,GAAW,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signageos/front-applet",
3
- "version": "6.2.0",
3
+ "version": "6.3.0",
4
4
  "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 c8 ./node_modules/mocha/bin/mocha --opts mocha.opts",
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": "14.0.1",
56
+ "lint-staged": "12.5.0",
54
57
  "lodash": "4.17.21",
55
58
  "mocha": "6.2.3",
56
59
  "should": "13.2.3",
@@ -1,91 +0,0 @@
1
- ---
2
- title: JS SDK Home
3
- author: Josef Kral
4
- date: 4.2.2018
5
- type: rest-api
6
- tags:
7
- - rest_api
8
- - js_api
9
- - api
10
- description: "[Content JS API] General introduction to signageOS JS API"
11
- ---
12
- # Javascript SDK for Applet development
13
-
14
- Javascript SDK gives you access to device's native features and functionalities. You can use the same functions across all devices with the same result.
15
-
16
- ::: alert alert--tip
17
- All APIs are standardized and available across all [supported devices](https://docs.signageos.io/hc/en-us/sections/4405700629266-Supported-Devices).
18
- :::
19
-
20
- ## Content-related JS APIs
21
-
22
- Content-related APIs help you with content part of your application /Applet/.
23
-
24
- Universal APIs for File system, access to accelerated video playback, sensor management and more provide you with robust tool set for creating extensive experiences.
25
-
26
- ::: table-responsive
27
- | Domain | Description |
28
- | ------ | ----------- |
29
- | **[Basic information](/api/js/content/latest/js-applet-basics)** | General information required to use the signageOS JS API |
30
- | [Applet Resources](/api/js/content/latest/js-applet-resources) | Pre-load necessary files required by your HTML5 player/Applet |
31
- | [Display](/api/js/content/latest/js-display) | Query features supported by the display |
32
- | [DeviceInfo](/api/js/content/latest/js-device-info) | Device-related informations |
33
- | [Browser](/api/js/content/latest/js-browser) | Opening managed web-browser on Android devices inc. whitelisting, blacklisting and other features |
34
- | [Command](/api/js/content/latest/js-command) | Sending business or technical logs through signageOS in secured offline-ready way |
35
- | [File system](/api/js/content/latest/js-file-system) | Full-featured file system API including ZIP and folder management |
36
- | [Fonts](/api/js/content/latest/js-loading-fonts) | Make it easy to load additional fonts into SoC devices |
37
- | [Hardware](/api/js/content/latest/js-hardware) | Hardware-specific APIs like LED lights on Philips 10BDL |
38
- | [Inputs](/api/js/content/latest/js-input) | Controller inputs like IR remote unified under one API |
39
- | [Monitors](/api/js/content/latest/js-monitors) | Information about monitors |
40
- | [Proof of Play](/api/js/content/latest/js-proof-of-play) | Proof of Play API |
41
- | [Sensors](/api/js/content/latest/js-sensors) | Using sensors and IoT devices in your application |
42
- | [Serial](/api/js/content/latest/js-hardware-serial) | Control external devices via serial |
43
- | [Synchronized playback](/api/js/content/latest/js-sync-playback) | API for creating synced playback and videowalls |
44
- | [Video Inputs aka PiP](/api/js/content/latest/js-video-inputs-internal-ports) | Show HDMI/DP/VGA as a part of your content via PiP feature |
45
- | [Video Playback](/api/js/content/latest/js-video) | Playing accelerated gapless videos via native video player |
46
- | [Video Streams](/api/js/content/latest/js-video-stream) | Playing video streams (RTSP, HLS, UDP) via native video player |
47
- :::
48
-
49
- ## Device control JS APIs
50
-
51
- Device control features exposed via Javascript APIs.
52
-
53
- ::: alert alert--tip
54
- For **Device Management** we strongly recommend using REST APIs. [See the REST API documentation here](https://api.docs.signageos.io).
55
- :::
56
-
57
- ::: table-responsive
58
- | Domain | Description |
59
- | ------ | ----------- |
60
- | [Management](/api/js/management/latest/1-js-management) | Information about the device and power action like Reboot, Restart,.. |
61
- | [Firmware](/api/js/management/latest/2-js-management-firmware) | Get FW version and upgrade FW from remote location |
62
- | [Remote Control](/api/js/management/latest/3-js-management-remote-control) | Manage IR Remote control functionality |
63
- | [Display](/api/js/management/latest/4-js-management-power) | Manage display power - timers, restart and reboot |
64
- | [Screen](/api/js/management/latest/5-js-management-screen) | Manage brightness, orientation and resolution, display on/off |
65
- | [Time](/api/js/management/latest/6-js-management-time) | Set time, timezone and get current settings |
66
- | [Volume](/api/js/management/latest/7-js-management-volume) | Control system volume level |
67
- | [Package](/api/js/management/latest/8-js-management-package) | Install and manage packages |
68
- | [Debug](/api/js/management/latest/9-js-management-debug) | Enable/disable debug mode |
69
- | [Application](/api/js/management/latest/10-js-management-application) | Get application version and upgrade application from remote location |
70
- | [Network](/api/js/management/latest/11-js-management-network) | Manage network settings |
71
- | [Security](/api/js/management/latest/12-js-management-security) | Control system security (PIN code) |
72
- | [Wi-Fi](/api/js/management/latest/13-js-management-wifi) | Manage Wi-Fi |
73
- :::
74
-
75
- # Testing Framework SDK
76
-
77
- Write and then run **automated tests** for your applet on physical devices, streamlining your development and QA efforts.
78
-
79
- See full [documentation on GitHub](https://github.com/signageos/test-framework)
80
-
81
- # Node.JS SDK
82
-
83
- Library which allows you to fully manage signageOS applets, devices, management & monitoring using Node.JS and REST API.
84
-
85
- See full [documentation on GitHub](https://github.com/signageos/sdk)
86
-
87
- # REST API
88
-
89
- Large collection of REST API endpoints for device management and monitoring.
90
-
91
- See full [documentation on Postman](https://api.docs.signageos.io)