@signageos/front-applet 4.11.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 +207 -0
- package/README.md +3 -0
- package/dist/bundle.js +9 -0
- package/dist/bundle.js.map +1 -0
- package/docs/README.md +5 -0
- package/docs/js-api/js-api-introduction.md +73 -0
- package/docs/js-api/js-applet-basics.md +294 -0
- package/docs/js-api/js-applet-resources.md +172 -0
- package/docs/js-api/js-browser.md +170 -0
- package/docs/js-api/js-command.md +208 -0
- package/docs/js-api/js-display.md +48 -0
- package/docs/js-api/js-file-system.md +568 -0
- package/docs/js-api/js-hardware-serial.md +142 -0
- package/docs/js-api/js-hardware.md +70 -0
- package/docs/js-api/js-iframes.md +88 -0
- package/docs/js-api/js-input.md +84 -0
- package/docs/js-api/js-loading-fonts.md +138 -0
- package/docs/js-api/js-monitoring-commands.md +108 -0
- package/docs/js-api/js-monitors.md +55 -0
- package/docs/js-api/js-offline-cache-media-files.md +314 -0
- package/docs/js-api/js-offline-cache-simple-data.md +134 -0
- package/docs/js-api/js-sensors.md +70 -0
- package/docs/js-api/js-sync-playback.md +197 -0
- package/docs/js-api/js-timing.md +54 -0
- package/docs/js-api/js-video-inputs-internal-ports.md +149 -0
- package/docs/js-api/js-video-stream.md +230 -0
- package/docs/js-api/js-video.md +282 -0
- package/docs/management-api/1-js-management.md +133 -0
- package/docs/management-api/10-js-management-application.md +123 -0
- package/docs/management-api/11-js-management-network.md +185 -0
- package/docs/management-api/12-js-management-security.md +86 -0
- package/docs/management-api/13-js-management-wifi.md +357 -0
- package/docs/management-api/2-js-management-firmware.md +93 -0
- package/docs/management-api/3-js-management-remote-control.md +73 -0
- package/docs/management-api/4-js-management-power.md +94 -0
- package/docs/management-api/5-js-management-screen.md +263 -0
- package/docs/management-api/6-js-management-time.md +166 -0
- package/docs/management-api/7-js-management-volume.md +46 -0
- package/docs/management-api/8-js-management-package.md +62 -0
- package/docs/management-api/9-js-management-debug.md +53 -0
- package/es6/FrontApplet/Browser/Browser.d.ts +24 -0
- package/es6/FrontApplet/Browser/Browser.js +73 -0
- package/es6/FrontApplet/Browser/Browser.js.map +1 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.d.ts +174 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js +55 -0
- package/es6/FrontApplet/Browser/IOpenLinkOptions.js.map +1 -0
- package/es6/FrontApplet/Browser/events.d.ts +15 -0
- package/es6/FrontApplet/Browser/events.js +14 -0
- package/es6/FrontApplet/Browser/events.js.map +1 -0
- package/es6/FrontApplet/Browser/messages.d.ts +5 -0
- package/es6/FrontApplet/Browser/messages.js +3 -0
- package/es6/FrontApplet/Browser/messages.js.map +1 -0
- package/es6/FrontApplet/Command/Command.d.ts +16 -0
- package/es6/FrontApplet/Command/Command.js +68 -0
- package/es6/FrontApplet/Command/Command.js.map +1 -0
- package/es6/FrontApplet/Command/ICommand.d.ts +4 -0
- package/es6/FrontApplet/Command/ICommand.js +3 -0
- package/es6/FrontApplet/Command/ICommand.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js +3 -0
- package/es6/FrontApplet/Command/ICommandDispatchToAppletMessage.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandEvent.js +3 -0
- package/es6/FrontApplet/Command/ICommandEvent.js.map +1 -0
- package/es6/FrontApplet/Command/ICommandEventListener.d.ts +6 -0
- package/es6/FrontApplet/Command/ICommandEventListener.js +3 -0
- package/es6/FrontApplet/Command/ICommandEventListener.js.map +1 -0
- package/es6/FrontApplet/Debug/Debug.d.ts +22 -0
- package/es6/FrontApplet/Debug/Debug.js +35 -0
- package/es6/FrontApplet/Debug/Debug.js.map +1 -0
- package/es6/FrontApplet/Display/Display.d.ts +11 -0
- package/es6/FrontApplet/Display/Display.js +35 -0
- package/es6/FrontApplet/Display/Display.js.map +1 -0
- package/es6/FrontApplet/Error/AppletCommandError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletCommandError.js +11 -0
- package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletError.d.ts +7 -0
- package/es6/FrontApplet/Error/AppletError.js +10 -0
- package/es6/FrontApplet/Error/AppletError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletHardwareError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletHardwareError.js +11 -0
- package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.d.ts +8 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -0
- package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletResourcesError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletResourcesError.js +11 -0
- package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletSecurityError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletSecurityError.js +11 -0
- package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletStreamError.d.ts +8 -0
- package/es6/FrontApplet/Error/AppletStreamError.js +10 -0
- package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -0
- package/es6/FrontApplet/Error/AppletVideoError.d.ts +9 -0
- package/es6/FrontApplet/Error/AppletVideoError.js +11 -0
- package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorCodes.d.ts +18 -0
- package/es6/FrontApplet/Error/ErrorCodes.js +23 -0
- package/es6/FrontApplet/Error/ErrorCodes.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.d.ts +3 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.js +22 -0
- package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.d.ts +6 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js +10 -0
- package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -0
- package/es6/FrontApplet/Error/FileNotFoundError.d.ts +8 -0
- package/es6/FrontApplet/Error/FileNotFoundError.js +10 -0
- package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -0
- package/es6/FrontApplet/Error/SosError.d.ts +20 -0
- package/es6/FrontApplet/Error/SosError.js +22 -0
- package/es6/FrontApplet/Error/SosError.js.map +1 -0
- package/es6/FrontApplet/Error/errorHelper.d.ts +12 -0
- package/es6/FrontApplet/Error/errorHelper.js +50 -0
- package/es6/FrontApplet/Error/errorHelper.js.map +1 -0
- package/es6/FrontApplet/Exchange/Exchange.d.ts +7 -0
- package/es6/FrontApplet/Exchange/Exchange.js +28 -0
- package/es6/FrontApplet/Exchange/Exchange.js.map +1 -0
- package/es6/FrontApplet/FileSystem/FileSystem.d.ts +30 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js +210 -0
- package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.d.ts +4 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js +3 -0
- package/es6/FrontApplet/FileSystem/StorageUnitsChangedMessage.js.map +1 -0
- package/es6/FrontApplet/FileSystem/types.d.ts +66 -0
- package/es6/FrontApplet/FileSystem/types.js +20 -0
- package/es6/FrontApplet/FileSystem/types.js.map +1 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.d.ts +6 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js +46 -0
- package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -0
- package/es6/FrontApplet/FrontApplet.d.ts +56 -0
- package/es6/FrontApplet/FrontApplet.js +183 -0
- package/es6/FrontApplet/FrontApplet.js.map +1 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +30 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +92 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.d.ts +5 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js +3 -0
- package/es6/FrontApplet/Hardware/BarcodeScanner/IBarcodeScannerDataMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/Hardware.d.ts +20 -0
- package/es6/FrontApplet/Hardware/Hardware.js +51 -0
- package/es6/FrontApplet/Hardware/Hardware.js.map +1 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.d.ts +6 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js +3 -0
- package/es6/FrontApplet/Hardware/ISerialPortDataMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.d.ts +15 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js +11 -0
- package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.d.ts +5 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js +3 -0
- package/es6/FrontApplet/Hardware/Led/ISetColorMessage.js.map +1 -0
- package/es6/FrontApplet/Hardware/Led/Led.d.ts +11 -0
- package/es6/FrontApplet/Hardware/Led/Led.js +38 -0
- package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -0
- package/es6/FrontApplet/Hardware/SerialPort.d.ts +14 -0
- package/es6/FrontApplet/Hardware/SerialPort.js +45 -0
- package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -0
- package/es6/FrontApplet/Hash/generator.d.ts +1 -0
- package/es6/FrontApplet/Hash/generator.js +10 -0
- package/es6/FrontApplet/Hash/generator.js.map +1 -0
- package/es6/FrontApplet/IMessage.d.ts +6 -0
- package/es6/FrontApplet/IMessage.js +3 -0
- package/es6/FrontApplet/IMessage.js.map +1 -0
- package/es6/FrontApplet/IPostMessage.d.ts +5 -0
- package/es6/FrontApplet/IPostMessage.js +3 -0
- package/es6/FrontApplet/IPostMessage.js.map +1 -0
- package/es6/FrontApplet/Iframe/Iframe.d.ts +24 -0
- package/es6/FrontApplet/Iframe/Iframe.js +51 -0
- package/es6/FrontApplet/Iframe/Iframe.js.map +1 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.d.ts +6 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.js +3 -0
- package/es6/FrontApplet/Input/IInputKeyMessage.js.map +1 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +6 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js +3 -0
- package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +5 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.js +3 -0
- package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +1 -0
- package/es6/FrontApplet/Input/Input.d.ts +20 -0
- package/es6/FrontApplet/Input/Input.js +35 -0
- package/es6/FrontApplet/Input/Input.js.map +1 -0
- package/es6/FrontApplet/Management/App.d.ts +37 -0
- package/es6/FrontApplet/Management/App.js +50 -0
- package/es6/FrontApplet/Management/App.js.map +1 -0
- package/es6/FrontApplet/Management/Audio.d.ts +9 -0
- package/es6/FrontApplet/Management/Audio.js +40 -0
- package/es6/FrontApplet/Management/Audio.js.map +1 -0
- package/es6/FrontApplet/Management/Debug.d.ts +11 -0
- package/es6/FrontApplet/Management/Debug.js +50 -0
- package/es6/FrontApplet/Management/Debug.js.map +1 -0
- package/es6/FrontApplet/Management/Firmware.d.ts +37 -0
- package/es6/FrontApplet/Management/Firmware.js +50 -0
- package/es6/FrontApplet/Management/Firmware.js.map +1 -0
- package/es6/FrontApplet/Management/FirmwareType.d.ts +4 -0
- package/es6/FrontApplet/Management/FirmwareType.js +8 -0
- package/es6/FrontApplet/Management/FirmwareType.js.map +1 -0
- package/es6/FrontApplet/Management/IBatteryStatus.d.ts +7 -0
- package/es6/FrontApplet/Management/IBatteryStatus.js +3 -0
- package/es6/FrontApplet/Management/IBatteryStatus.js.map +1 -0
- package/es6/FrontApplet/Management/IBrightness.d.ts +6 -0
- package/es6/FrontApplet/Management/IBrightness.js +3 -0
- package/es6/FrontApplet/Management/IBrightness.js.map +1 -0
- package/es6/FrontApplet/Management/INetworkInfo.d.ts +53 -0
- package/es6/FrontApplet/Management/INetworkInfo.js +17 -0
- package/es6/FrontApplet/Management/INetworkInfo.js.map +1 -0
- package/es6/FrontApplet/Management/IOrientation.d.ts +4 -0
- package/es6/FrontApplet/Management/IOrientation.js +3 -0
- package/es6/FrontApplet/Management/IOrientation.js.map +1 -0
- package/es6/FrontApplet/Management/IWifiEvent.d.ts +11 -0
- package/es6/FrontApplet/Management/IWifiEvent.js +12 -0
- package/es6/FrontApplet/Management/IWifiEvent.js.map +1 -0
- package/es6/FrontApplet/Management/Management.d.ts +44 -0
- package/es6/FrontApplet/Management/Management.js +113 -0
- package/es6/FrontApplet/Management/Management.js.map +1 -0
- package/es6/FrontApplet/Management/Network.d.ts +26 -0
- package/es6/FrontApplet/Management/Network.js +83 -0
- package/es6/FrontApplet/Management/Network.js.map +1 -0
- package/es6/FrontApplet/Management/Package.d.ts +8 -0
- package/es6/FrontApplet/Management/Package.js +38 -0
- package/es6/FrontApplet/Management/Package.js.map +1 -0
- package/es6/FrontApplet/Management/Power.d.ts +13 -0
- package/es6/FrontApplet/Management/Power.js +78 -0
- package/es6/FrontApplet/Management/Power.js.map +1 -0
- package/es6/FrontApplet/Management/RemoteControl.d.ts +14 -0
- package/es6/FrontApplet/Management/RemoteControl.js +61 -0
- package/es6/FrontApplet/Management/RemoteControl.js.map +1 -0
- package/es6/FrontApplet/Management/Screen.d.ts +18 -0
- package/es6/FrontApplet/Management/Screen.js +114 -0
- package/es6/FrontApplet/Management/Screen.js.map +1 -0
- package/es6/FrontApplet/Management/Security.d.ts +21 -0
- package/es6/FrontApplet/Management/Security.js +56 -0
- package/es6/FrontApplet/Management/Security.js.map +1 -0
- package/es6/FrontApplet/Management/Time.d.ts +16 -0
- package/es6/FrontApplet/Management/Time.js +59 -0
- package/es6/FrontApplet/Management/Time.js.map +1 -0
- package/es6/FrontApplet/Management/Wifi.d.ts +29 -0
- package/es6/FrontApplet/Management/Wifi.js +151 -0
- package/es6/FrontApplet/Management/Wifi.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.d.ts +21 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js +16 -0
- package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.d.ts +2 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js +21 -0
- package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.d.ts +25 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js +23 -0
- package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.d.ts +5 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -0
- package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.d.ts +4 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.js +8 -0
- package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -0
- package/es6/FrontApplet/Monitors/Monitors.d.ts +16 -0
- package/es6/FrontApplet/Monitors/Monitors.js +31 -0
- package/es6/FrontApplet/Monitors/Monitors.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/Cache.d.ts +38 -0
- package/es6/FrontApplet/Offline/Cache/Cache.js +199 -0
- package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IChecksumMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IFile.d.ts +4 -0
- package/es6/FrontApplet/Offline/Cache/IFile.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IFile.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IListedContentsMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IListedFilesMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedContentMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.d.ts +6 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ILoadedFileMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContentMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.d.ts +4 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedContents.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.d.ts +6 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFileMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.js +3 -0
- package/es6/FrontApplet/Offline/Cache/ISavedFiles.js.map +1 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.d.ts +5 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js +3 -0
- package/es6/FrontApplet/Offline/Cache/IValidatedChecksumMessage.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +12 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +47 -0
- package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.d.ts +16 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.js +8 -0
- package/es6/FrontApplet/Offline/Flags/IFlag.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.d.ts +12 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.js +3 -0
- package/es6/FrontApplet/Offline/Flags/IFlagController.js.map +1 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +7 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.js +3 -0
- package/es6/FrontApplet/Offline/Flags/IFlags.js.map +1 -0
- package/es6/FrontApplet/Offline/IAddFont.d.ts +50 -0
- package/es6/FrontApplet/Offline/IAddFont.js +22 -0
- package/es6/FrontApplet/Offline/IAddFont.js.map +1 -0
- package/es6/FrontApplet/Offline/IElement.d.ts +7 -0
- package/es6/FrontApplet/Offline/IElement.js +6 -0
- package/es6/FrontApplet/Offline/IElement.js.map +1 -0
- package/es6/FrontApplet/Offline/IFileType.d.ts +3 -0
- package/es6/FrontApplet/Offline/IFileType.js +4 -0
- package/es6/FrontApplet/Offline/IFileType.js.map +1 -0
- package/es6/FrontApplet/Offline/ISaveFile.d.ts +49 -0
- package/es6/FrontApplet/Offline/ISaveFile.js +26 -0
- package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.d.ts +7 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +26 -0
- package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.d.ts +8 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js +3 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFile.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.d.ts +8 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js +3 -0
- package/es6/FrontApplet/Offline/LoadFile/ILoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.d.ts +7 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +25 -0
- package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -0
- package/es6/FrontApplet/Offline/Offline.d.ts +27 -0
- package/es6/FrontApplet/Offline/Offline.js +105 -0
- package/es6/FrontApplet/Offline/Offline.js.map +1 -0
- package/es6/FrontApplet/Offline/Types.d.ts +7 -0
- package/es6/FrontApplet/Offline/Types.js +9 -0
- package/es6/FrontApplet/Offline/Types.js.map +1 -0
- package/es6/FrontApplet/Sensors/Proximity.d.ts +16 -0
- package/es6/FrontApplet/Sensors/Proximity.js +36 -0
- package/es6/FrontApplet/Sensors/Proximity.js.map +1 -0
- package/es6/FrontApplet/Sensors/Sensors.d.ts +11 -0
- package/es6/FrontApplet/Sensors/Sensors.js +18 -0
- package/es6/FrontApplet/Sensors/Sensors.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamEvent.d.ts +6 -0
- package/es6/FrontApplet/Stream/IStreamEvent.js +3 -0
- package/es6/FrontApplet/Stream/IStreamEvent.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.d.ts +5 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.js +3 -0
- package/es6/FrontApplet/Stream/IStreamEventListener.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamMessage.d.ts +6 -0
- package/es6/FrontApplet/Stream/IStreamMessage.js +3 -0
- package/es6/FrontApplet/Stream/IStreamMessage.js.map +1 -0
- package/es6/FrontApplet/Stream/IStreamProperties.d.ts +10 -0
- package/es6/FrontApplet/Stream/IStreamProperties.js +3 -0
- package/es6/FrontApplet/Stream/IStreamProperties.js.map +1 -0
- package/es6/FrontApplet/Stream/Stream.d.ts +22 -0
- package/es6/FrontApplet/Stream/Stream.js +131 -0
- package/es6/FrontApplet/Stream/Stream.js.map +1 -0
- package/es6/FrontApplet/Stream/StreamProtocol.d.ts +9 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js +13 -0
- package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -0
- package/es6/FrontApplet/Stream/streamEvents.d.ts +8 -0
- package/es6/FrontApplet/Stream/streamEvents.js +3 -0
- package/es6/FrontApplet/Stream/streamEvents.js.map +1 -0
- package/es6/FrontApplet/Sync/ISyncEvent.d.ts +4 -0
- package/es6/FrontApplet/Sync/ISyncEvent.js +3 -0
- package/es6/FrontApplet/Sync/ISyncEvent.js.map +1 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.d.ts +7 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.js +3 -0
- package/es6/FrontApplet/Sync/ISyncSetValueMessage.js.map +1 -0
- package/es6/FrontApplet/Sync/Sync.d.ts +20 -0
- package/es6/FrontApplet/Sync/Sync.js +102 -0
- package/es6/FrontApplet/Sync/Sync.js.map +1 -0
- package/es6/FrontApplet/Sync/syncEvents.d.ts +6 -0
- package/es6/FrontApplet/Sync/syncEvents.js +3 -0
- package/es6/FrontApplet/Sync/syncEvents.js.map +1 -0
- package/es6/FrontApplet/Timing/Timing.d.ts +10 -0
- package/es6/FrontApplet/Timing/Timing.js +16 -0
- package/es6/FrontApplet/Timing/Timing.js.map +1 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +2 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js +4 -0
- package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.js.map +1 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +11 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js +33 -0
- package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.d.ts +6 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.js +3 -0
- package/es6/FrontApplet/Touch/ITouchEventMessage.js.map +1 -0
- package/es6/FrontApplet/Touch/Touch.d.ts +13 -0
- package/es6/FrontApplet/Touch/Touch.js +54 -0
- package/es6/FrontApplet/Touch/Touch.js.map +1 -0
- package/es6/FrontApplet/Validate/Validate.d.ts +43 -0
- package/es6/FrontApplet/Validate/Validate.js +266 -0
- package/es6/FrontApplet/Validate/Validate.js.map +1 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.d.ts +8 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js +140 -0
- package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoEvent.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoEvent.js +6 -0
- package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoEventListener.d.ts +5 -0
- package/es6/FrontApplet/Video/IVideoEventListener.js +3 -0
- package/es6/FrontApplet/Video/IVideoEventListener.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoMessage.d.ts +4 -0
- package/es6/FrontApplet/Video/IVideoMessage.js +3 -0
- package/es6/FrontApplet/Video/IVideoMessage.js.map +1 -0
- package/es6/FrontApplet/Video/IVideoProperties.d.ts +8 -0
- package/es6/FrontApplet/Video/IVideoProperties.js +3 -0
- package/es6/FrontApplet/Video/IVideoProperties.js.map +1 -0
- package/es6/FrontApplet/Video/Video.d.ts +39 -0
- package/es6/FrontApplet/Video/Video.js +242 -0
- package/es6/FrontApplet/Video/Video.js.map +1 -0
- package/es6/FrontApplet/createFrontApplet.d.ts +2 -0
- package/es6/FrontApplet/createFrontApplet.js +9 -0
- package/es6/FrontApplet/createFrontApplet.js.map +1 -0
- package/es6/Monitoring/Console/consoleCommands.d.ts +6 -0
- package/es6/Monitoring/Console/consoleCommands.js +4 -0
- package/es6/Monitoring/Console/consoleCommands.js.map +1 -0
- package/es6/Monitoring/Html/htmlCommands.d.ts +9 -0
- package/es6/Monitoring/Html/htmlCommands.js +5 -0
- package/es6/Monitoring/Html/htmlCommands.js.map +1 -0
- package/es6/Monitoring/Montoring.d.ts +12 -0
- package/es6/Monitoring/Montoring.js +159 -0
- package/es6/Monitoring/Montoring.js.map +1 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.d.ts +20 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js +7 -0
- package/es6/Monitoring/Offline/Cache/offlineCacheCommands.js.map +1 -0
- package/es6/Monitoring/Timing/timingCommands.d.ts +4 -0
- package/es6/Monitoring/Timing/timingCommands.js +4 -0
- package/es6/Monitoring/Timing/timingCommands.js.map +1 -0
- package/es6/Monitoring/Video/videoCommands.d.ts +10 -0
- package/es6/Monitoring/Video/videoCommands.js +4 -0
- package/es6/Monitoring/Video/videoCommands.js.map +1 -0
- package/es6/Monitoring/monitoringCommands.d.ts +8 -0
- package/es6/Monitoring/monitoringCommands.js +5 -0
- package/es6/Monitoring/monitoringCommands.js.map +1 -0
- package/es6/Sensors/IButton.d.ts +9 -0
- package/es6/Sensors/IButton.js +8 -0
- package/es6/Sensors/IButton.js.map +1 -0
- package/es6/Sensors/IRfidAntenna.d.ts +10 -0
- package/es6/Sensors/IRfidAntenna.js +8 -0
- package/es6/Sensors/IRfidAntenna.js.map +1 -0
- package/es6/bundle.d.ts +12 -0
- package/es6/bundle.js +13 -0
- package/es6/bundle.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import IPostMessage from "FrontApplet/IPostMessage";
|
|
2
|
+
export default interface Exchange<TResponse> {
|
|
3
|
+
postMessage: IPostMessage<TResponse>;
|
|
4
|
+
messageNameToType(name: string): string;
|
|
5
|
+
createNamespaced<TNamespacedResponse>(namespace: string): Exchange<TNamespacedResponse>;
|
|
6
|
+
}
|
|
7
|
+
export declare function createExchange<TResponse>(messagePrefix: string, postMessage: IPostMessage<any>): Exchange<TResponse>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
function createExchange(messagePrefix, postMessage) {
|
|
13
|
+
const messageNameToType = (name) => {
|
|
14
|
+
return [messagePrefix, name].join('.');
|
|
15
|
+
};
|
|
16
|
+
const typedPostMessage = (message) => __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
const type = messageNameToType(message.type);
|
|
18
|
+
message = Object.assign(Object.assign({}, message), { type });
|
|
19
|
+
return postMessage(message);
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
messageNameToType,
|
|
23
|
+
postMessage: typedPostMessage,
|
|
24
|
+
createNamespaced: (namespace) => createExchange(messageNameToType(namespace), postMessage)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.createExchange = createExchange;
|
|
28
|
+
//# sourceMappingURL=Exchange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Exchange.js","sourceRoot":"","sources":["../../../src/FrontApplet/Exchange/Exchange.ts"],"names":[],"mappings":";;;;;;;;;;;AASA,SAAgB,cAAc,CAC7B,aAAqB,EACrB,WAA8B;IAE9B,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;QAC1C,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC,CAAC;IACF,MAAM,gBAAgB,GAAG,CAAO,OAAiB,EAAsB,EAAE;QACxE,MAAM,IAAI,GAAG,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7C,OAAO,mCACH,OAAO,KACV,IAAI,GACJ,CAAC;QACF,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC,CAAA,CAAC;IACF,OAAO;QACN,iBAAiB;QACjB,WAAW,EAAE,gBAAgB;QAC7B,gBAAgB,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,cAAc,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC;KAClG,CAAC;AACH,CAAC;AApBD,wCAoBC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import IPostMessage from '../IPostMessage';
|
|
2
|
+
import { IStorageUnit, IFilePath, IFile, IHeaders, ICopyFileOptions, IMoveFileOptions } from './types';
|
|
3
|
+
import StorageUnitsChangedMessage from './StorageUnitsChangedMessage';
|
|
4
|
+
export default class FileSystem {
|
|
5
|
+
private messagePrefix;
|
|
6
|
+
private postMessage;
|
|
7
|
+
static MESSAGE_PREFIX: string;
|
|
8
|
+
private eventEmitter;
|
|
9
|
+
constructor(messagePrefix: string, postMessage: IPostMessage<any>);
|
|
10
|
+
listStorageUnits(): Promise<IStorageUnit[]>;
|
|
11
|
+
onStorageUnitsChanged(listener: () => void): void;
|
|
12
|
+
removeStorageUnitsChangedListener(listener: () => void): void;
|
|
13
|
+
removeAllListeners(): void;
|
|
14
|
+
listFiles(directoryPath: IFilePath): Promise<IFilePath[]>;
|
|
15
|
+
exists(filePath: IFilePath): Promise<boolean>;
|
|
16
|
+
getFile(filePath: IFilePath): Promise<IFile | null>;
|
|
17
|
+
writeFile(filePath: IFilePath, contents: string): Promise<void>;
|
|
18
|
+
readFile(filePath: IFilePath): Promise<string>;
|
|
19
|
+
copyFile(sourceFilePath: IFilePath, destinationFilePath: IFilePath, options?: ICopyFileOptions): Promise<void>;
|
|
20
|
+
moveFile(sourceFilePath: IFilePath, destinationFilePath: IFilePath, options?: IMoveFileOptions): Promise<void>;
|
|
21
|
+
deleteFile(filePath: IFilePath, recursive: boolean): Promise<void>;
|
|
22
|
+
downloadFile(filePath: IFilePath, sourceUri: string, headers?: IHeaders): Promise<void>;
|
|
23
|
+
extractFile(archiveFilePath: IFilePath, destinationDirectoryPath: IFilePath, method: string): Promise<void>;
|
|
24
|
+
getFileChecksum(filePath: IFilePath, hashType: string): Promise<string>;
|
|
25
|
+
createDirectory(directoryPath: IFilePath): Promise<void>;
|
|
26
|
+
isDirectory(filePath: IFilePath): Promise<boolean>;
|
|
27
|
+
link(sourceFilePath: IFilePath, destinationFilePath: IFilePath): Promise<void>;
|
|
28
|
+
handleMessageData(data: StorageUnitsChangedMessage): void;
|
|
29
|
+
private getMessage;
|
|
30
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const events_1 = require("events");
|
|
13
|
+
const types_1 = require("./types");
|
|
14
|
+
const Validate_1 = require("../Validate/Validate");
|
|
15
|
+
const EVENT_STORAGE_UNITS_CHANGED = 'storage_units_changed';
|
|
16
|
+
class FileSystem {
|
|
17
|
+
constructor(messagePrefix, postMessage) {
|
|
18
|
+
this.messagePrefix = messagePrefix;
|
|
19
|
+
this.postMessage = postMessage;
|
|
20
|
+
this.eventEmitter = new events_1.EventEmitter();
|
|
21
|
+
}
|
|
22
|
+
listStorageUnits() {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const { storageUnits } = yield this.postMessage({
|
|
25
|
+
type: this.getMessage('list_storage_units'),
|
|
26
|
+
});
|
|
27
|
+
return storageUnits;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
onStorageUnitsChanged(listener) {
|
|
31
|
+
Validate_1.default({ listener }).required().function();
|
|
32
|
+
this.eventEmitter.addListener(EVENT_STORAGE_UNITS_CHANGED, listener);
|
|
33
|
+
}
|
|
34
|
+
removeStorageUnitsChangedListener(listener) {
|
|
35
|
+
Validate_1.default({ listener }).required().function();
|
|
36
|
+
this.eventEmitter.removeListener(EVENT_STORAGE_UNITS_CHANGED, listener);
|
|
37
|
+
}
|
|
38
|
+
removeAllListeners() {
|
|
39
|
+
this.eventEmitter.removeAllListeners(EVENT_STORAGE_UNITS_CHANGED);
|
|
40
|
+
}
|
|
41
|
+
listFiles(directoryPath) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
Validate_1.default({ directoryPath }).required().object(types_1.VIFilePath);
|
|
44
|
+
const { files } = yield this.postMessage({
|
|
45
|
+
type: this.getMessage('list_files'),
|
|
46
|
+
directoryPath,
|
|
47
|
+
});
|
|
48
|
+
return files;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
exists(filePath) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
Validate_1.default({ filePath }).required().object(types_1.VIFilePath);
|
|
54
|
+
const { exists } = yield this.postMessage({
|
|
55
|
+
type: this.getMessage('exists'),
|
|
56
|
+
filePath,
|
|
57
|
+
});
|
|
58
|
+
return exists;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
getFile(filePath) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
Validate_1.default({ filePath }).required().object(types_1.VIFilePath);
|
|
64
|
+
const { file } = yield this.postMessage({
|
|
65
|
+
type: this.getMessage('get_file'),
|
|
66
|
+
filePath,
|
|
67
|
+
});
|
|
68
|
+
return file;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
writeFile(filePath, contents) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
Validate_1.default({ filePath }).required().object(types_1.VIFilePath);
|
|
74
|
+
yield this.postMessage({
|
|
75
|
+
type: this.getMessage('write_file'),
|
|
76
|
+
filePath,
|
|
77
|
+
contents,
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
readFile(filePath) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
Validate_1.default({ filePath }).required().object(types_1.VIFilePath);
|
|
84
|
+
const { contents } = yield this.postMessage({
|
|
85
|
+
type: this.getMessage('read_file'),
|
|
86
|
+
filePath,
|
|
87
|
+
});
|
|
88
|
+
return contents;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
copyFile(sourceFilePath, destinationFilePath, options = {}) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
Validate_1.default({ sourceFilePath }).required().object(types_1.VIFilePath);
|
|
94
|
+
Validate_1.default({ destinationFilePath }).required().object(types_1.VIFilePath);
|
|
95
|
+
Validate_1.default({ options }).required().object(types_1.VICopyFileOptions);
|
|
96
|
+
yield this.postMessage({
|
|
97
|
+
type: this.getMessage('copy_file'),
|
|
98
|
+
sourceFilePath,
|
|
99
|
+
destinationFilePath,
|
|
100
|
+
options,
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
moveFile(sourceFilePath, destinationFilePath, options = {}) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
Validate_1.default({ sourceFilePath }).required().object(types_1.VIFilePath);
|
|
107
|
+
Validate_1.default({ destinationFilePath }).required().object(types_1.VIFilePath);
|
|
108
|
+
Validate_1.default({ options }).required().object(types_1.VIMoveFileOptions);
|
|
109
|
+
yield this.postMessage({
|
|
110
|
+
type: this.getMessage('move_file'),
|
|
111
|
+
sourceFilePath,
|
|
112
|
+
destinationFilePath,
|
|
113
|
+
options,
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
deleteFile(filePath, recursive) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
Validate_1.default({ filePath }).required().object(types_1.VIFilePath);
|
|
120
|
+
Validate_1.default({ recursive }).required().boolean();
|
|
121
|
+
yield this.postMessage({
|
|
122
|
+
type: this.getMessage('delete_file'),
|
|
123
|
+
filePath,
|
|
124
|
+
recursive,
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
downloadFile(filePath, sourceUri, headers) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
Validate_1.default({ filePath }).required().object(types_1.VIFilePath);
|
|
131
|
+
Validate_1.default({ sourceUri }).required().uri();
|
|
132
|
+
Validate_1.default({ headers }).object();
|
|
133
|
+
yield this.postMessage({
|
|
134
|
+
type: this.getMessage('download_file'),
|
|
135
|
+
filePath,
|
|
136
|
+
sourceUri,
|
|
137
|
+
headers,
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
extractFile(archiveFilePath, destinationDirectoryPath, method) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
Validate_1.default({ archiveFilePath }).required().object(types_1.VIFilePath);
|
|
144
|
+
Validate_1.default({ destinationDirectoryPath }).object(types_1.VIFilePath);
|
|
145
|
+
Validate_1.default({ method }).required().string();
|
|
146
|
+
yield this.postMessage({
|
|
147
|
+
type: this.getMessage('extract_file'),
|
|
148
|
+
archiveFilePath,
|
|
149
|
+
destinationDirectoryPath,
|
|
150
|
+
method,
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
getFileChecksum(filePath, hashType) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
Validate_1.default({ filePath }).required().object(types_1.VIFilePath);
|
|
157
|
+
Validate_1.default({ hashType }).required().string();
|
|
158
|
+
const { checksum } = yield this.postMessage({
|
|
159
|
+
type: this.getMessage('get_file_checksum'),
|
|
160
|
+
filePath,
|
|
161
|
+
hashType,
|
|
162
|
+
});
|
|
163
|
+
return checksum;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
createDirectory(directoryPath) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
Validate_1.default({ directoryPath }).required().object(types_1.VIFilePath);
|
|
169
|
+
yield this.postMessage({
|
|
170
|
+
type: this.getMessage('create_directory'),
|
|
171
|
+
directoryPath,
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
isDirectory(filePath) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
Validate_1.default({ filePath }).required().object(types_1.VIFilePath);
|
|
178
|
+
const { isDirectory } = yield this.postMessage({
|
|
179
|
+
type: this.getMessage('is_directory'),
|
|
180
|
+
filePath,
|
|
181
|
+
});
|
|
182
|
+
return isDirectory;
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
link(sourceFilePath, destinationFilePath) {
|
|
186
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
+
Validate_1.default({ sourceFilePath }).required().object(types_1.VIFilePath);
|
|
188
|
+
Validate_1.default({ destinationFilePath }).required().object(types_1.VIFilePath);
|
|
189
|
+
yield this.postMessage({
|
|
190
|
+
type: this.getMessage('link'),
|
|
191
|
+
sourceFilePath,
|
|
192
|
+
destinationFilePath,
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
handleMessageData(data) {
|
|
197
|
+
switch (data.type) {
|
|
198
|
+
case this.getMessage('storage_units_changed'):
|
|
199
|
+
this.eventEmitter.emit(EVENT_STORAGE_UNITS_CHANGED);
|
|
200
|
+
break;
|
|
201
|
+
default:
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
getMessage(name) {
|
|
205
|
+
return this.messagePrefix + '.' + FileSystem.MESSAGE_PREFIX + '.' + name;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
exports.default = FileSystem;
|
|
209
|
+
FileSystem.MESSAGE_PREFIX = 'file_system';
|
|
210
|
+
//# sourceMappingURL=FileSystem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileSystem.js","sourceRoot":"","sources":["../../../src/FrontApplet/FileSystem/FileSystem.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAsC;AAEtC,mCAUiB;AAEjB,mDAA4C;AAE5C,MAAM,2BAA2B,GAAG,uBAAuB,CAAC;AAE5D,MAAqB,UAAU;IAM9B,YACS,aAAqB,EACrB,WAA8B;QAD9B,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAmB;QAEtC,IAAI,CAAC,YAAY,GAAG,IAAI,qBAAY,EAAE,CAAC;IACxC,CAAC;IAEY,gBAAgB;;YAC5B,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAI,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C,IAAI,EAAE;YAClB,KAAK,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC;gBAC5C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;gBACpD,MAAM;YACP,QAAQ;SACR;IACF,CAAC;IAEO,UAAU,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,aAAa,GAAG,GAAG,GAAG,UAAU,CAAC,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;IAC1E,CAAC;;AA1LF,6BA2LC;AAzLc,yBAAc,GAAW,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageUnitsChangedMessage.js","sourceRoot":"","sources":["../../../src/FrontApplet/FileSystem/StorageUnitsChangedMessage.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface IStorageUnit {
|
|
2
|
+
type: string;
|
|
3
|
+
capacity: number;
|
|
4
|
+
freeSpace: number;
|
|
5
|
+
usableSpace: number;
|
|
6
|
+
removable: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const VIStorageUnit: {
|
|
9
|
+
type: string;
|
|
10
|
+
capacity: string;
|
|
11
|
+
freeSpace: string;
|
|
12
|
+
usableSpace: string;
|
|
13
|
+
removable: string;
|
|
14
|
+
};
|
|
15
|
+
export interface IFile {
|
|
16
|
+
localUri: string;
|
|
17
|
+
imageThumbnailUriTemplate?: string;
|
|
18
|
+
videoThumbnailUriTemplate?: string;
|
|
19
|
+
createdAt?: number;
|
|
20
|
+
lastModifiedAt?: number;
|
|
21
|
+
sizeBytes?: number;
|
|
22
|
+
mimeType?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IVideoFile extends IFile {
|
|
25
|
+
videoDurationMs?: number;
|
|
26
|
+
videoResolution?: {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
30
|
+
videoFramerate?: number;
|
|
31
|
+
videoBitrate?: number;
|
|
32
|
+
videoCodec?: string;
|
|
33
|
+
audioBitrate?: number;
|
|
34
|
+
audioCodec?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface IHeaders {
|
|
37
|
+
[key: string]: string;
|
|
38
|
+
}
|
|
39
|
+
export interface IFilePath {
|
|
40
|
+
storageUnit: IStorageUnit;
|
|
41
|
+
filePath: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const VIFilePath: {
|
|
44
|
+
storageUnit: {
|
|
45
|
+
object: {
|
|
46
|
+
type: string;
|
|
47
|
+
capacity: string;
|
|
48
|
+
freeSpace: string;
|
|
49
|
+
usableSpace: string;
|
|
50
|
+
removable: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
filePath: string;
|
|
54
|
+
};
|
|
55
|
+
export interface ICopyFileOptions {
|
|
56
|
+
overwrite?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export declare const VICopyFileOptions: {
|
|
59
|
+
overwrite: string;
|
|
60
|
+
};
|
|
61
|
+
export interface IMoveFileOptions {
|
|
62
|
+
overwrite?: boolean;
|
|
63
|
+
}
|
|
64
|
+
export declare const VIMoveFileOptions: {
|
|
65
|
+
overwrite: string;
|
|
66
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VIStorageUnit = {
|
|
4
|
+
type: 'string',
|
|
5
|
+
capacity: 'number',
|
|
6
|
+
freeSpace: 'number',
|
|
7
|
+
usableSpace: 'number',
|
|
8
|
+
removable: 'boolean',
|
|
9
|
+
};
|
|
10
|
+
exports.VIFilePath = {
|
|
11
|
+
storageUnit: { 'object': exports.VIStorageUnit },
|
|
12
|
+
filePath: 'string',
|
|
13
|
+
};
|
|
14
|
+
exports.VICopyFileOptions = {
|
|
15
|
+
overwrite: '?boolean',
|
|
16
|
+
};
|
|
17
|
+
exports.VIMoveFileOptions = {
|
|
18
|
+
overwrite: '?boolean',
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/FrontApplet/FileSystem/types.ts"],"names":[],"mappings":";;AAQa,QAAA,aAAa,GAAG;IAC5B,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,SAAS;CACpB,CAAC;AAkCW,QAAA,UAAU,GAAG;IACzB,WAAW,EAAE,EAAC,QAAQ,EAAE,qBAAa,EAAC;IACtC,QAAQ,EAAE,QAAQ;CAClB,CAAC;AAMW,QAAA,iBAAiB,GAAG;IAChC,SAAS,EAAE,UAAU;CACrB,CAAC;AAMW,QAAA,iBAAiB,GAAG;IAChC,SAAS,EAAE,UAAU;CACrB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IFontFaceProperties } from '../Offline/IAddFont';
|
|
2
|
+
export declare const generateFontUid: (uid: string, format: "svg" | "woff2" | "eot" | "woff" | "ttf") => string;
|
|
3
|
+
export declare const fontFaceGenerator: (window: Window, fontFaceProps: IFontFaceProperties) => {
|
|
4
|
+
setFormat: (format: "svg" | "woff2" | "eot" | "woff" | "ttf", uri: string) => void;
|
|
5
|
+
generateStyleElement: () => HTMLStyleElement;
|
|
6
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateFontUid = (uid, format) => uid + '.' + format;
|
|
4
|
+
exports.fontFaceGenerator = (window, fontFaceProps) => {
|
|
5
|
+
const fontFamily = `font-family: '${fontFaceProps.fontFamily}';`;
|
|
6
|
+
const fontStretch = (fontFaceProps.fontStretch) ? `font-stretch: ${fontFaceProps.fontStretch};` : '';
|
|
7
|
+
const fontStyle = (fontFaceProps.fontStyle) ? `font-style: ${fontFaceProps.fontStyle};` : '';
|
|
8
|
+
const fontWeight = (fontFaceProps.fontWeight) ? `font-weight: ${fontFaceProps.fontWeight};` : '';
|
|
9
|
+
const unicodeRange = (fontFaceProps.unicodeRange) ? `unicode-range: ${fontFaceProps.unicodeRange};` : '';
|
|
10
|
+
let sources = [];
|
|
11
|
+
let srcCompatMode = '';
|
|
12
|
+
const setFormat = (format, uri) => {
|
|
13
|
+
switch (format) {
|
|
14
|
+
case 'woff':
|
|
15
|
+
sources.push(`url('${uri}') format('woff')`);
|
|
16
|
+
break;
|
|
17
|
+
case 'woff2':
|
|
18
|
+
sources.push(`url('${uri}') format('woff2')`);
|
|
19
|
+
break;
|
|
20
|
+
case 'ttf':
|
|
21
|
+
sources.push(`url('${uri}') format('truetype')`);
|
|
22
|
+
break;
|
|
23
|
+
case 'svg':
|
|
24
|
+
sources.push(`url('${uri}#svgFontName') format('svg')`);
|
|
25
|
+
break;
|
|
26
|
+
case 'eot':
|
|
27
|
+
srcCompatMode = `src: url('${uri}');`;
|
|
28
|
+
sources.push(`url('${uri}?#iefix') format('embedded-opentype')`);
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
console.warn(`Not supported font format: ${format}`);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const generateStyleElement = () => {
|
|
35
|
+
const src = 'src: ' + sources.join(', ');
|
|
36
|
+
const styleBody = `@font-face {${fontFamily}${fontStretch}${fontStyle}${fontWeight}${unicodeRange}${srcCompatMode}${src} }`;
|
|
37
|
+
const styleComponent = window.document.createElement('style');
|
|
38
|
+
styleComponent.innerHTML = styleBody;
|
|
39
|
+
return styleComponent;
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
setFormat,
|
|
43
|
+
generateStyleElement
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=fontFaceGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fontFaceGenerator.js","sourceRoot":"","sources":["../../../src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,CAAC,CAAC;gBACjD,MAAM;YACP,KAAK,KAAK;gBACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,8BAA8B,CAAC,CAAC;gBACxD,MAAM;YACP,KAAK,KAAK;gBACT,aAAa,GAAG,aAAa,GAAG,KAAK,CAAC;gBACtC,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,uCAAuC,CAAC,CAAC;gBACjE,MAAM;YACP;gBACC,OAAO,CAAC,IAAI,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAC;SACtD;IACF,CAAC,CAAC;IAEF,MAAM,oBAAoB,GAAG,GAAG,EAAE;QACjC,MAAM,GAAG,GAAG,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,SAAS,GAAG,eAAe,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,GAAG,IAAI,CAAC;QAC5H,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9D,cAAc,CAAC,SAAS,GAAG,SAAS,CAAC;QACrC,OAAO,cAAc,CAAC;IACvB,CAAC,CAAC;IAEF,OAAO;QACN,SAAS;QACT,oBAAoB;KACpB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import IMessage from './IMessage';
|
|
2
|
+
import Video from './Video/Video';
|
|
3
|
+
import Stream from './Stream/Stream';
|
|
4
|
+
import Offline from './Offline/Offline';
|
|
5
|
+
import Command from './Command/Command';
|
|
6
|
+
import Hardware from './Hardware/Hardware';
|
|
7
|
+
import Browser from './Browser/Browser';
|
|
8
|
+
import Iframe from './Iframe/Iframe';
|
|
9
|
+
import Touch from './Touch/Touch';
|
|
10
|
+
import Input from './Input/Input';
|
|
11
|
+
import Debug, { WeinreData } from './Debug/Debug';
|
|
12
|
+
import Display from './Display/Display';
|
|
13
|
+
import Timing from './Timing/Timing';
|
|
14
|
+
import Sync from './Sync/Sync';
|
|
15
|
+
import FileSystem from './FileSystem/FileSystem';
|
|
16
|
+
import Management from './Management/Management';
|
|
17
|
+
import Monitors from './Monitors/Monitors';
|
|
18
|
+
import Sensors from './Sensors/Sensors';
|
|
19
|
+
export default class FrontApplet {
|
|
20
|
+
readonly window: Window & WeinreData;
|
|
21
|
+
private messagePrefix;
|
|
22
|
+
config: any | null;
|
|
23
|
+
authHash: string | null;
|
|
24
|
+
appletVersion: string | null;
|
|
25
|
+
readonly debug: Debug;
|
|
26
|
+
readonly display: Display;
|
|
27
|
+
readonly apiJsUri: string;
|
|
28
|
+
readonly stream: Stream;
|
|
29
|
+
readonly video: Video;
|
|
30
|
+
readonly command: Command;
|
|
31
|
+
readonly hardware: Hardware;
|
|
32
|
+
readonly offline: Offline;
|
|
33
|
+
readonly browser: Browser;
|
|
34
|
+
readonly iframe: Iframe;
|
|
35
|
+
readonly touch: Touch;
|
|
36
|
+
readonly input: Input;
|
|
37
|
+
readonly timing: Timing;
|
|
38
|
+
readonly sync: Sync;
|
|
39
|
+
readonly fileSystem: FileSystem;
|
|
40
|
+
readonly management: Management;
|
|
41
|
+
readonly monitors: Monitors;
|
|
42
|
+
readonly sensors: Sensors;
|
|
43
|
+
private readyEmitter;
|
|
44
|
+
private invocationResponseEmitter;
|
|
45
|
+
private javascriptLoadFileController;
|
|
46
|
+
constructor(window: Window & WeinreData, messagePrefix: string);
|
|
47
|
+
postMessage(data: IMessage): Promise<any>;
|
|
48
|
+
onReady(listener?: () => void): Promise<void>;
|
|
49
|
+
restore(): void;
|
|
50
|
+
private forwardRestoreToFrontAppletWindows;
|
|
51
|
+
private removeMediaListeners;
|
|
52
|
+
private checkIfReady;
|
|
53
|
+
private handleMessage;
|
|
54
|
+
private getMessage;
|
|
55
|
+
private startPinging;
|
|
56
|
+
}
|