@iobroker/adapter-react-v5 4.13.1 → 4.13.2
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/AdminConnection.js.map +1 -1
- package/Components/404.js +13 -13
- package/Components/404.js.map +1 -0
- package/Components/ColorPicker.js +54 -54
- package/Components/ColorPicker.js.map +1 -1
- package/Components/ComplexCron.js.map +1 -1
- package/Components/CustomModal.js.map +1 -0
- package/Components/FileBrowser.js +5 -1
- package/Components/FileBrowser.js.map +1 -0
- package/Components/FileViewer.js.map +1 -0
- package/Components/Icon.js.map +1 -0
- package/Components/IconPicker.js.map +1 -0
- package/Components/IconSelector.js.map +1 -0
- package/Components/Image.js.map +1 -0
- package/Components/JsonConfigComponent/ChipInput.d.ts +12 -0
- package/Components/JsonConfigComponent/ChipInput.js +763 -0
- package/Components/JsonConfigComponent/ChipInput.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigAccordion.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigAccordion.js +348 -0
- package/Components/JsonConfigComponent/ConfigAccordion.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigAlive.d.ts +10 -0
- package/Components/JsonConfigComponent/ConfigAlive.js +105 -0
- package/Components/JsonConfigComponent/ConfigAlive.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +37 -0
- package/Components/JsonConfigComponent/ConfigAutocomplete.js +73 -0
- package/Components/JsonConfigComponent/ConfigAutocomplete.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +131 -0
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCRON.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigCRON.js +157 -0
- package/Components/JsonConfigComponent/ConfigCRON.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCertCollection.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCertCollection.js +128 -0
- package/Components/JsonConfigComponent/ConfigCertCollection.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js +149 -0
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCertificates.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCertificates.js +284 -0
- package/Components/JsonConfigComponent/ConfigCertificates.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCheckLicense.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigCheckLicense.js +821 -0
- package/Components/JsonConfigComponent/ConfigCheckLicense.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigCheckbox.js +40 -0
- package/Components/JsonConfigComponent/ConfigCheckbox.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigChip.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigChip.js +120 -0
- package/Components/JsonConfigComponent/ConfigChip.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigColor.d.ts +22 -0
- package/Components/JsonConfigComponent/ConfigColor.js +120 -0
- package/Components/JsonConfigComponent/ConfigColor.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCoordinates.js +265 -0
- package/Components/JsonConfigComponent/ConfigCoordinates.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCustom.d.ts +26 -0
- package/Components/JsonConfigComponent/ConfigCustom.js +316 -0
- package/Components/JsonConfigComponent/ConfigCustom.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigDatePicker.js +91 -0
- package/Components/JsonConfigComponent/ConfigDatePicker.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigDeviceManager.d.ts +6 -0
- package/Components/JsonConfigComponent/ConfigDeviceManager.js +18 -0
- package/Components/JsonConfigComponent/ConfigFile.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigFile.js +228 -0
- package/Components/JsonConfigComponent/ConfigFile.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigFileSelector.js +625 -0
- package/Components/JsonConfigComponent/ConfigFileSelector.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigFunc.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigFunc.js +124 -0
- package/Components/JsonConfigComponent/ConfigFunc.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigGeneric.d.ts +95 -0
- package/Components/JsonConfigComponent/ConfigGeneric.js +646 -0
- package/Components/JsonConfigComponent/ConfigIP.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigIP.js +130 -0
- package/Components/JsonConfigComponent/ConfigIP.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigImageSendTo.d.ts +10 -0
- package/Components/JsonConfigComponent/ConfigImageSendTo.js +114 -0
- package/Components/JsonConfigComponent/ConfigImageSendTo.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigImageUpload.js +166 -0
- package/Components/JsonConfigComponent/ConfigImageUpload.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js +264 -0
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigInterface.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigInterface.js +146 -0
- package/Components/JsonConfigComponent/ConfigInterface.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +13 -0
- package/Components/JsonConfigComponent/ConfigJsonEditor.js +145 -0
- package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigLanguage.d.ts +7 -0
- package/Components/JsonConfigComponent/ConfigLanguage.js +110 -0
- package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigLicense.d.ts +24 -0
- package/Components/JsonConfigComponent/ConfigLicense.js +183 -0
- package/Components/JsonConfigComponent/ConfigLicense.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigNumber.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigNumber.js +117 -0
- package/Components/JsonConfigComponent/ConfigObjectId.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigObjectId.js +167 -0
- package/Components/JsonConfigComponent/ConfigObjectId.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigPanel.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigPanel.js +396 -0
- package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigPassword.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigPassword.js +193 -0
- package/Components/JsonConfigComponent/ConfigPassword.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigPattern.d.ts +21 -0
- package/Components/JsonConfigComponent/ConfigPattern.js +65 -0
- package/Components/JsonConfigComponent/ConfigPattern.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigPort.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigPort.js +176 -0
- package/Components/JsonConfigComponent/ConfigRoom.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigRoom.js +124 -0
- package/Components/JsonConfigComponent/ConfigRoom.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigSelect.js +159 -0
- package/Components/JsonConfigComponent/ConfigSelect.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js +272 -0
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigSendto.d.ts +24 -0
- package/Components/JsonConfigComponent/ConfigSendto.js +294 -0
- package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigSetState.d.ts +18 -0
- package/Components/JsonConfigComponent/ConfigSetState.js +185 -0
- package/Components/JsonConfigComponent/ConfigSetState.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigSlider.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigSlider.js +119 -0
- package/Components/JsonConfigComponent/ConfigSlider.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticDivider.js +68 -0
- package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticHeader.js +81 -0
- package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticImage.js +71 -0
- package/Components/JsonConfigComponent/ConfigStaticImage.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigStaticText.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticText.js +88 -0
- package/Components/JsonConfigComponent/ConfigStaticText.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTable.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigTable.js +1064 -0
- package/Components/JsonConfigComponent/ConfigTable.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTabs.d.ts +34 -0
- package/Components/JsonConfigComponent/ConfigTabs.js +162 -0
- package/Components/JsonConfigComponent/ConfigTabs.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigText.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigText.js +226 -0
- package/Components/JsonConfigComponent/ConfigText.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +10 -0
- package/Components/JsonConfigComponent/ConfigTextSendTo.js +129 -0
- package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigTimePicker.js +85 -0
- package/Components/JsonConfigComponent/ConfigTimePicker.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTopic.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigTopic.js +110 -0
- package/Components/JsonConfigComponent/ConfigTopic.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigUUID.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigUUID.js +95 -0
- package/Components/JsonConfigComponent/ConfigUUID.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigUser.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigUser.js +142 -0
- package/Components/JsonConfigComponent/ConfigUser.js.map +1 -0
- package/Components/JsonConfigComponent/DeviceManager/Communication.d.ts +63 -0
- package/Components/JsonConfigComponent/DeviceManager/Communication.js +268 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.d.ts +11 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.js +15 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceCard.d.ts +53 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceCard.js +340 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceControl.d.ts +45 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceControl.js +146 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.d.ts +12 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.js +69 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceList.d.ts +51 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceList.js +226 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.d.ts +13 -0
- package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.js +111 -0
- package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.d.ts +7 -0
- package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.js +16 -0
- package/Components/JsonConfigComponent/DeviceManager/JsonConfig.d.ts +11 -0
- package/Components/JsonConfigComponent/DeviceManager/JsonConfig.js +94 -0
- package/Components/JsonConfigComponent/DeviceManager/TooltipButton.d.ts +10 -0
- package/Components/JsonConfigComponent/DeviceManager/TooltipButton.js +22 -0
- package/Components/JsonConfigComponent/DeviceManager/Utils.d.ts +12 -0
- package/Components/JsonConfigComponent/DeviceManager/Utils.js +158 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/de.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/en.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/es.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/fr.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/i18n.d.ts +26 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/it.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/nl.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/pl.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/pt.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/ru.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/uk.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/i18n/zh-cn.json +21 -0
- package/Components/JsonConfigComponent/DeviceManager/index.d.ts +2 -0
- package/Components/JsonConfigComponent/DeviceManager/index.js +10 -0
- package/Components/JsonConfigComponent/DeviceManager/index.js.map +1 -0
- package/Components/JsonConfigComponent/Utils.d.ts +9 -0
- package/Components/JsonConfigComponent/Utils.js +13 -0
- package/Components/JsonConfigComponent/index.d.ts +26 -0
- package/Components/JsonConfigComponent/index.js +520 -0
- package/Components/JsonConfigComponent/index.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/AdminConnection.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/AdminConnection.js +7 -0
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Components/Icon.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Components/Icon.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Components/Icon.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Components/Utils.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Components/Utils.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Components/Utils.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js +10 -0
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/i18n.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/i18n.js +10 -0
- package/Components/JsonConfigComponent/wrapper/i18n.js.map +1 -0
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.d.ts +2 -0
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js +10 -0
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js.map +1 -0
- package/Components/Loader.js +223 -223
- package/Components/Loader.js.map +1 -0
- package/Components/Loaders/PT.css +108 -108
- package/Components/Loaders/PT.js +103 -103
- package/Components/Loaders/PT.js.map +1 -0
- package/Components/Loaders/Vendor.css +13 -13
- package/Components/Loaders/Vendor.js +7 -7
- package/Components/Loaders/Vendor.js.map +1 -0
- package/Components/Logo.js.map +1 -0
- package/Components/MDUtils.js.map +1 -0
- package/Components/ObjectBrowser.js +344 -344
- package/Components/ObjectBrowser.js.map +1 -1
- package/Components/Router.js.map +1 -0
- package/Components/SaveCloseButtons.js.map +1 -0
- package/Components/Schedule.js.map +1 -0
- package/Components/SelectWithIcon.js.map +1 -0
- package/Components/SimpleCron/cron2text.js.map +1 -0
- package/Components/SimpleCron/cronText.js.map +1 -0
- package/Components/SimpleCron/index.js.map +1 -0
- package/Components/SimpleCron/jquery.cron.locale.js.map +1 -0
- package/Components/TabContainer.js.map +1 -0
- package/Components/TabContent.js.map +1 -0
- package/Components/TabHeader.js.map +1 -0
- package/Components/TableResize.js +5 -5
- package/Components/TableResize.js.map +1 -1
- package/Components/TextWithIcon.js.map +1 -0
- package/Components/ToggleThemeMenu.js.map +1 -0
- package/Components/TreeTable.js +70 -70
- package/Components/TreeTable.js.map +1 -1
- package/Components/UploadImage.js +305 -305
- package/Components/UploadImage.js.map +1 -0
- package/Components/Utils.js.map +1 -0
- package/Components/copy-to-clipboard.d.ts +13 -0
- package/Components/copy-to-clipboard.js +156 -0
- package/Components/copy-to-clipboard.js.map +1 -0
- package/Components/loader.css +221 -221
- package/Components/types.d.ts +82 -82
- package/Components/withWidth.js.map +1 -1
- package/Connection.js.map +1 -1
- package/Dialogs/ComplexCron.js.map +1 -0
- package/Dialogs/Confirm.js.map +1 -0
- package/Dialogs/Cron.js.map +1 -0
- package/Dialogs/Error.js.map +1 -0
- package/Dialogs/Message.js.map +1 -0
- package/Dialogs/SelectFile.js.map +1 -0
- package/Dialogs/SelectID.js.map +1 -0
- package/Dialogs/SimpleCron.js.map +1 -0
- package/Dialogs/TextInput.js.map +1 -0
- package/GenericApp.d.ts +2 -2
- package/GenericApp.js +49 -49
- package/GenericApp.js.map +1 -0
- package/LICENSE +22 -22
- package/LegacyConnection.js.map +1 -0
- package/Prompt.js +7 -7
- package/Prompt.js.map +1 -0
- package/README.md +1101 -1101
- package/Theme.js.map +1 -0
- package/assets/devices/Alarm Systems.svg +18 -18
- package/assets/devices/Amplifier.svg +21 -21
- package/assets/devices/Awnings.svg +4 -4
- package/assets/devices/Battery Status.svg +4 -4
- package/assets/devices/Ceiling Spotlights.svg +15 -15
- package/assets/devices/Chandelier.svg +6 -6
- package/assets/devices/Climate.svg +11 -11
- package/assets/devices/Coffee Makers.svg +5 -5
- package/assets/devices/Cold Water.svg +31 -31
- package/assets/devices/Computer.svg +21 -21
- package/assets/devices/Consumption.svg +7 -7
- package/assets/devices/Curtains.svg +43 -43
- package/assets/devices/Dishwashers.svg +11 -11
- package/assets/devices/Doors.svg +5 -5
- package/assets/devices/Doorstep.svg +35 -35
- package/assets/devices/Dryer.svg +13 -13
- package/assets/devices/Fan.svg +20 -20
- package/assets/devices/Floor Lamps.svg +4 -4
- package/assets/devices/Garage Doors.svg +9 -9
- package/assets/devices/Gates.svg +32 -32
- package/assets/devices/Hairdryer.svg +23 -23
- package/assets/devices/Handle.svg +6 -6
- package/assets/devices/Hanging Lamps.svg +8 -8
- package/assets/devices/Heater.svg +44 -44
- package/assets/devices/Hoods.svg +11 -11
- package/assets/devices/Hot Water.svg +9 -9
- package/assets/devices/Humidity.svg +41 -41
- package/assets/devices/Iron.svg +4 -4
- package/assets/devices/Irrigation.svg +22 -22
- package/assets/devices/Led Strip.svg +30 -30
- package/assets/devices/Light.svg +29 -29
- package/assets/devices/Lightings.svg +46 -46
- package/assets/devices/Lock.svg +19 -19
- package/assets/devices/Louvre.svg +6 -6
- package/assets/devices/Mowing Machine.svg +8 -8
- package/assets/devices/Music.svg +12 -12
- package/assets/devices/Outdoor Blinds.svg +6 -6
- package/assets/devices/People.svg +19 -19
- package/assets/devices/Pool.svg +7 -7
- package/assets/devices/Power Consumption.svg +12 -12
- package/assets/devices/Printer.svg +9 -9
- package/assets/devices/Pump.svg +9 -9
- package/assets/devices/Receiver.svg +18 -18
- package/assets/devices/Sconces.svg +9 -9
- package/assets/devices/Security.svg +34 -34
- package/assets/devices/Shading.svg +4 -4
- package/assets/devices/Shutters.svg +10 -10
- package/assets/devices/SmokeDetector.svg +12 -12
- package/assets/devices/Sockets.svg +13 -13
- package/assets/devices/Speaker.svg +35 -35
- package/assets/devices/Stove.svg +11 -11
- package/assets/devices/Table Lamps.svg +11 -11
- package/assets/devices/Temperature Sensors.svg +28 -28
- package/assets/devices/Tv.svg +7 -7
- package/assets/devices/Vacuum Cleaner.svg +15 -15
- package/assets/devices/Ventilation.svg +12 -12
- package/assets/devices/Washing Machines.svg +15 -15
- package/assets/devices/Water Consumption.svg +5 -5
- package/assets/devices/Water Heater.svg +8 -8
- package/assets/devices/Water.svg +40 -40
- package/assets/devices/Weather.svg +28 -28
- package/assets/devices/Window.svg +7 -7
- package/assets/devices/list.json +993 -993
- package/assets/devices/names.txt +62 -62
- package/assets/devices/parseNames.js +34 -34
- package/assets/lamp_ceiling.svg +8 -8
- package/assets/lamp_table.svg +7 -7
- package/assets/no_icon.svg +9 -9
- package/assets/rooms/Anteroom.svg +52 -52
- package/assets/rooms/Attic.svg +21 -21
- package/assets/rooms/Balcony.svg +12 -12
- package/assets/rooms/Barn.svg +5 -5
- package/assets/rooms/Basement.svg +4 -4
- package/assets/rooms/Bathroom.svg +38 -38
- package/assets/rooms/Bedroom.svg +5 -5
- package/assets/rooms/Boiler Room.svg +12 -12
- package/assets/rooms/Carport.svg +17 -17
- package/assets/rooms/Cellar.svg +89 -89
- package/assets/rooms/Chamber.svg +9 -9
- package/assets/rooms/Corridor.svg +52 -52
- package/assets/rooms/Dining Area.svg +37 -37
- package/assets/rooms/Dining Room.svg +37 -37
- package/assets/rooms/Dining.svg +37 -37
- package/assets/rooms/Dressing Room.svg +4 -4
- package/assets/rooms/Driveway.svg +14 -14
- package/assets/rooms/Entrance.svg +44 -44
- package/assets/rooms/Equipment Room.svg +14 -14
- package/assets/rooms/Front Yard.svg +64 -64
- package/assets/rooms/Gallery.svg +13 -13
- package/assets/rooms/Garage.svg +20 -20
- package/assets/rooms/Garden.svg +12 -12
- package/assets/rooms/Ground Floor.svg +95 -95
- package/assets/rooms/Guest Bathroom.svg +32 -32
- package/assets/rooms/Guest Room.svg +5 -5
- package/assets/rooms/Gym.svg +4 -4
- package/assets/rooms/Hall.svg +19 -19
- package/assets/rooms/Home Theater.svg +7 -7
- package/assets/rooms/Kitchen.svg +17 -17
- package/assets/rooms/Laundry Room.svg +11 -11
- package/assets/rooms/Living Area.svg +10 -10
- package/assets/rooms/Living Room.svg +10 -10
- package/assets/rooms/Locker Room.svg +16 -16
- package/assets/rooms/Nursery.svg +4 -4
- package/assets/rooms/Office.svg +8 -8
- package/assets/rooms/Outdoors.svg +7 -7
- package/assets/rooms/Playroom.svg +5 -5
- package/assets/rooms/Pool.svg +7 -7
- package/assets/rooms/Rear Wall.svg +30 -30
- package/assets/rooms/Second Floor.svg +95 -95
- package/assets/rooms/Shed.svg +16 -16
- package/assets/rooms/Sleeping Area.svg +22 -22
- package/assets/rooms/Stairway.svg +4 -4
- package/assets/rooms/Stairwell.svg +15 -15
- package/assets/rooms/Storeroom.svg +4 -4
- package/assets/rooms/Summer House.svg +27 -27
- package/assets/rooms/Swimming Pool.svg +21 -21
- package/assets/rooms/Terrace.svg +6 -6
- package/assets/rooms/Toilet.svg +10 -10
- package/assets/rooms/Upstairs.svg +5 -5
- package/assets/rooms/Wardrobe.svg +60 -60
- package/assets/rooms/Washroom.svg +19 -19
- package/assets/rooms/Wc.svg +10 -10
- package/assets/rooms/Windscreen.svg +60 -60
- package/assets/rooms/Workshop.svg +22 -22
- package/assets/rooms/Workspace.svg +8 -8
- package/assets/rooms/list.json +945 -945
- package/assets/rooms/names.txt +59 -59
- package/assets/rooms/parseNames.js +34 -34
- package/craco-module-federation.js +69 -69
- package/i18n.js.map +1 -0
- package/icons/IconAdapter.js.map +1 -1
- package/icons/IconAlias.js.map +1 -1
- package/icons/IconChannel.js.map +1 -1
- package/icons/IconClearFilter.js.map +1 -1
- package/icons/IconClosed.js.map +1 -1
- package/icons/IconCopy.js +8 -8
- package/icons/IconCopy.js.map +1 -1
- package/icons/IconDevice.js.map +1 -1
- package/icons/IconDocument.js.map +1 -1
- package/icons/IconDocumentReadOnly.js.map +1 -1
- package/icons/IconExpert.js.map +1 -0
- package/icons/IconFx.js +1 -1
- package/icons/IconFx.js.map +1 -1
- package/icons/IconInstance.js.map +1 -1
- package/icons/IconLogout.js +9 -9
- package/icons/IconLogout.js.map +1 -1
- package/icons/IconNoIcon.js +8 -8
- package/icons/IconNoIcon.js.map +1 -1
- package/icons/IconOpen.js.map +1 -1
- package/icons/IconState.js.map +1 -1
- package/index.css +54 -54
- package/package.json +2 -2
- package/types.d.ts +94 -94
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const react_1 = __importStar(require("react"));
|
|
30
|
+
const material_1 = require("@mui/material");
|
|
31
|
+
const Utils_1 = require("./Utils");
|
|
32
|
+
const JsonConfig_1 = __importDefault(require("./JsonConfig"));
|
|
33
|
+
/**
|
|
34
|
+
* Device List Component
|
|
35
|
+
* @param {object} params - Component parameters
|
|
36
|
+
* @param {object} params.socket - socket object
|
|
37
|
+
* @param {string} params.selectedInstance - Selected instance
|
|
38
|
+
* @returns {*[]} - Array of device cards
|
|
39
|
+
*/
|
|
40
|
+
class Communication extends react_1.Component {
|
|
41
|
+
constructor(props) {
|
|
42
|
+
super(props);
|
|
43
|
+
this.sendActionToInstance = (command, messageToSend, refresh) => {
|
|
44
|
+
const send = async () => {
|
|
45
|
+
this.setState({ showSpinner: true });
|
|
46
|
+
/** @type {object} */
|
|
47
|
+
const response = await this.props.socket.sendTo(this.props.selectedInstance, command, messageToSend);
|
|
48
|
+
/** @type {string} */
|
|
49
|
+
const type = response.type;
|
|
50
|
+
console.log(`Response: ${response.type}`);
|
|
51
|
+
switch (type) {
|
|
52
|
+
case 'message':
|
|
53
|
+
console.log(`Message received: ${response.message}`);
|
|
54
|
+
if (response.message) {
|
|
55
|
+
this.setState({
|
|
56
|
+
message: {
|
|
57
|
+
message: response.message,
|
|
58
|
+
handleClose: () => this.setState({ message: null }, () => this.sendActionToInstance('dm:actionProgress', { origin: response.origin })),
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
case 'confirm':
|
|
64
|
+
console.log(`Confirm received: ${response.confirm}`);
|
|
65
|
+
if (response.confirm) {
|
|
66
|
+
this.setState({
|
|
67
|
+
confirm: {
|
|
68
|
+
message: response.confirm,
|
|
69
|
+
handleClose: (confirm) => this.setState({ confirm: null }, () => this.sendActionToInstance('dm:actionProgress', {
|
|
70
|
+
origin: response.origin,
|
|
71
|
+
confirm,
|
|
72
|
+
})),
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
case 'form':
|
|
78
|
+
console.log('Form received');
|
|
79
|
+
if (response.form) {
|
|
80
|
+
this.setState({
|
|
81
|
+
form: Object.assign(Object.assign({}, response.form), { handleClose: (data) => this.setState({ form: null }, () => {
|
|
82
|
+
console.log(`Form ${JSON.stringify(data)}`);
|
|
83
|
+
this.sendActionToInstance('dm:actionProgress', {
|
|
84
|
+
origin: response.origin,
|
|
85
|
+
data,
|
|
86
|
+
});
|
|
87
|
+
}) }),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
case 'progress':
|
|
92
|
+
if (response.progress) {
|
|
93
|
+
if (this.state.progress) {
|
|
94
|
+
const progress = Object.assign(Object.assign({}, this.state.progress), response.progress);
|
|
95
|
+
this.setState({ progress });
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this.setState({ progress: response.progress });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
this.sendActionToInstance('dm:actionProgress', { origin: response.origin });
|
|
102
|
+
break;
|
|
103
|
+
case 'result':
|
|
104
|
+
console.log('Response content', response.result);
|
|
105
|
+
if (response.result.refresh) {
|
|
106
|
+
if (response.result.refresh === true) {
|
|
107
|
+
this.loadData();
|
|
108
|
+
console.log('Refreshing all');
|
|
109
|
+
}
|
|
110
|
+
else if (response.result.refresh === 'instance') {
|
|
111
|
+
console.log(`Refreshing instance infos: ${this.props.selectedInstance}`);
|
|
112
|
+
}
|
|
113
|
+
else if (response.result.refresh === 'device') {
|
|
114
|
+
if (refresh) {
|
|
115
|
+
console.log(`Refreshing device infos: ${this.props.selectedInstance}`);
|
|
116
|
+
refresh();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
console.log('Not refreshing anything');
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (response.result.error) {
|
|
124
|
+
console.error(`Error: ${response.result.error}`);
|
|
125
|
+
this.setState({ showToast: response.result.error.message });
|
|
126
|
+
}
|
|
127
|
+
this.setState({ showSpinner: false });
|
|
128
|
+
break;
|
|
129
|
+
default:
|
|
130
|
+
console.log(`Unknown response type: ${type}`);
|
|
131
|
+
this.setState({ showSpinner: false });
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
send().catch(console.error);
|
|
136
|
+
};
|
|
137
|
+
this.sendControlToInstance = async (command, messageToSend) => {
|
|
138
|
+
const response = await this.props.socket.sendTo(this.props.selectedInstance, command, messageToSend);
|
|
139
|
+
const type = response.type;
|
|
140
|
+
console.log(`Response: ${response.type}`);
|
|
141
|
+
if (response.type === 'result') {
|
|
142
|
+
console.log('Response content', response.result);
|
|
143
|
+
if (response.result.error) {
|
|
144
|
+
console.error(`Error: ${response.result.error}`);
|
|
145
|
+
this.setState({ showToast: response.result.error.message });
|
|
146
|
+
}
|
|
147
|
+
else if (response.result.state !== undefined) {
|
|
148
|
+
return response.result.state;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
console.warn('Unexpected response type', type);
|
|
153
|
+
}
|
|
154
|
+
return null;
|
|
155
|
+
};
|
|
156
|
+
// @ts-expect-error
|
|
157
|
+
this.state = {
|
|
158
|
+
showSpinner: false,
|
|
159
|
+
showToast: null,
|
|
160
|
+
message: null,
|
|
161
|
+
confirm: null,
|
|
162
|
+
form: null,
|
|
163
|
+
progress: null,
|
|
164
|
+
};
|
|
165
|
+
// eslint-disable-next-line react/no-unused-class-component-methods
|
|
166
|
+
this.instanceHandler = action => () => this.sendActionToInstance('dm:instanceAction', { actionId: action.id });
|
|
167
|
+
// eslint-disable-next-line react/no-unused-class-component-methods
|
|
168
|
+
this.deviceHandler = (deviceId, action, refresh) => () => this.sendActionToInstance('dm:deviceAction', { deviceId, actionId: action.id }, refresh);
|
|
169
|
+
// eslint-disable-next-line react/no-unused-class-component-methods
|
|
170
|
+
this.controlHandler = (deviceId, control, state) => () => this.sendControlToInstance('dm:deviceControl', { deviceId, controlId: control.id, state });
|
|
171
|
+
// eslint-disable-next-line react/no-unused-class-component-methods
|
|
172
|
+
this.controlStateHandler = (deviceId, control) => () => this.sendControlToInstance('dm:deviceControlState', { deviceId, controlId: control.id });
|
|
173
|
+
this.props.registerHandler && this.props.registerHandler(() => this.loadData());
|
|
174
|
+
}
|
|
175
|
+
// eslint-disable-next-line class-methods-use-this
|
|
176
|
+
loadData() {
|
|
177
|
+
console.error('loadData not implemented');
|
|
178
|
+
}
|
|
179
|
+
// eslint-disable-next-line react/no-unused-class-component-methods
|
|
180
|
+
loadDevices() {
|
|
181
|
+
return this.props.socket.sendTo(this.props.selectedInstance, 'dm:listDevices');
|
|
182
|
+
}
|
|
183
|
+
// eslint-disable-next-line react/no-unused-class-component-methods
|
|
184
|
+
loadInstanceInfos() {
|
|
185
|
+
return this.props.socket.sendTo(this.props.selectedInstance, 'dm:instanceInfo');
|
|
186
|
+
}
|
|
187
|
+
renderMessageDialog() {
|
|
188
|
+
var _a;
|
|
189
|
+
if (!this.state.message) {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
return react_1.default.createElement(material_1.Dialog, { open: !0, onClose: () => { var _a; return (_a = this.state.message) === null || _a === void 0 ? void 0 : _a.handleClose(); }, hideBackdrop: true, "aria-describedby": "message-dialog-description" },
|
|
193
|
+
react_1.default.createElement(material_1.DialogContent, null,
|
|
194
|
+
react_1.default.createElement(material_1.DialogContentText, { id: "message-dialog-description" }, (_a = this.state.message) === null || _a === void 0 ? void 0 : _a.message)),
|
|
195
|
+
react_1.default.createElement(material_1.DialogActions, null,
|
|
196
|
+
react_1.default.createElement(material_1.Button, { onClick: () => { var _a; return (_a = this.state.message) === null || _a === void 0 ? void 0 : _a.handleClose(); }, autoFocus: true }, (0, Utils_1.getTranslation)('okButtonText'))));
|
|
197
|
+
}
|
|
198
|
+
renderConfirmDialog() {
|
|
199
|
+
var _a;
|
|
200
|
+
if (!this.state.confirm) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
return react_1.default.createElement(material_1.Dialog, { open: !0, onClose: () => { var _a; return (_a = this.state.confirm) === null || _a === void 0 ? void 0 : _a.handleClose(); }, hideBackdrop: true, "aria-describedby": "confirm-dialog-description" },
|
|
204
|
+
react_1.default.createElement(material_1.DialogContent, null,
|
|
205
|
+
react_1.default.createElement(material_1.DialogContentText, { id: "confirm-dialog-description" }, (0, Utils_1.getTranslation)((_a = this.state.confirm) === null || _a === void 0 ? void 0 : _a.message))),
|
|
206
|
+
react_1.default.createElement(material_1.DialogActions, null,
|
|
207
|
+
react_1.default.createElement(material_1.Button, { variant: "contained", color: "primary", onClick: () => { var _a; return (_a = this.state.confirm) === null || _a === void 0 ? void 0 : _a.handleClose(true); }, autoFocus: true }, (0, Utils_1.getTranslation)('yesButtonText')),
|
|
208
|
+
react_1.default.createElement(material_1.Button, { variant: "contained",
|
|
209
|
+
// @ts-expect-error
|
|
210
|
+
color: "grey", onClick: () => { var _a; return (_a = this.state.confirm) === null || _a === void 0 ? void 0 : _a.handleClose(false); }, autoFocus: true, hideBackdrop: true }, (0, Utils_1.getTranslation)('noButtonText'))));
|
|
211
|
+
}
|
|
212
|
+
renderSnackbar() {
|
|
213
|
+
return react_1.default.createElement(material_1.Snackbar, { open: !!this.state.showToast, autoHideDuration: 6000, onClose: () => this.setState({ showToast: null }), message: this.state.showToast });
|
|
214
|
+
}
|
|
215
|
+
renderFormDialog() {
|
|
216
|
+
var _a, _b;
|
|
217
|
+
if (!this.state.form || !this.state.form.schema || !this.state.form.data) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
return react_1.default.createElement(material_1.Dialog, { open: !0, onClose: () => { var _a; return ((_a = this.state.form) === null || _a === void 0 ? void 0 : _a.handleClose) && this.state.form.handleClose(); }, hideBackdrop: true },
|
|
221
|
+
((_a = this.state.form) === null || _a === void 0 ? void 0 : _a.title) ? react_1.default.createElement(material_1.DialogTitle, null, (0, Utils_1.getTranslation)((_b = this.state.form) === null || _b === void 0 ? void 0 : _b.title)) : null,
|
|
222
|
+
react_1.default.createElement(material_1.DialogContent, null,
|
|
223
|
+
react_1.default.createElement(JsonConfig_1.default, { instanceId: this.props.selectedInstance, schema: this.state.form.schema, data: this.state.form.data, socket: this.props.socket, onChange: (data) => {
|
|
224
|
+
console.log('handleFormChange', { data });
|
|
225
|
+
const form = Object.assign({}, this.state.form);
|
|
226
|
+
if (form) {
|
|
227
|
+
form.data = data;
|
|
228
|
+
this.setState({ form });
|
|
229
|
+
}
|
|
230
|
+
} })),
|
|
231
|
+
react_1.default.createElement(material_1.DialogActions, null,
|
|
232
|
+
react_1.default.createElement(material_1.Button, { variant: "contained", color: "primary", onClick: () => { var _a, _b; return ((_a = this.state.form) === null || _a === void 0 ? void 0 : _a.handleClose) && this.state.form.handleClose((_b = this.state.form) === null || _b === void 0 ? void 0 : _b.data); }, autoFocus: true }, (0, Utils_1.getTranslation)('okButtonText')),
|
|
233
|
+
react_1.default.createElement(material_1.Button, { variant: "contained",
|
|
234
|
+
// @ts-expect-error
|
|
235
|
+
color: "grey", onClick: () => { var _a; return ((_a = this.state.form) === null || _a === void 0 ? void 0 : _a.handleClose) && this.state.form.handleClose(); }, hideBackdrop: true }, (0, Utils_1.getTranslation)('cancelButtonText'))));
|
|
236
|
+
}
|
|
237
|
+
renderProgressDialog() {
|
|
238
|
+
var _a, _b;
|
|
239
|
+
if (!((_a = this.state.progress) === null || _a === void 0 ? void 0 : _a.open)) {
|
|
240
|
+
return null;
|
|
241
|
+
}
|
|
242
|
+
return react_1.default.createElement(material_1.Dialog, { open: !0, onClose: () => { }, hideBackdrop: true },
|
|
243
|
+
react_1.default.createElement(material_1.LinearProgress, { variant: "determinate", value: ((_b = this.state.progress) === null || _b === void 0 ? void 0 : _b.progress) || 0 }));
|
|
244
|
+
}
|
|
245
|
+
// eslint-disable-next-line class-methods-use-this
|
|
246
|
+
renderContent() {
|
|
247
|
+
return null;
|
|
248
|
+
}
|
|
249
|
+
renderSpinner() {
|
|
250
|
+
var _a;
|
|
251
|
+
if (!this.state.showSpinner && !((_a = this.state.progress) === null || _a === void 0 ? void 0 : _a.open) && !this.state.message && !this.state.confirm && !this.state.form) {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
return react_1.default.createElement(material_1.Backdrop, { style: { zIndex: 1000 }, open: !0 },
|
|
255
|
+
react_1.default.createElement(material_1.CircularProgress, null));
|
|
256
|
+
}
|
|
257
|
+
render() {
|
|
258
|
+
return react_1.default.createElement(react_1.default.Fragment, null,
|
|
259
|
+
this.renderSnackbar(),
|
|
260
|
+
this.renderContent(),
|
|
261
|
+
this.renderSpinner(),
|
|
262
|
+
this.renderConfirmDialog(),
|
|
263
|
+
this.renderMessageDialog(),
|
|
264
|
+
this.renderFormDialog(),
|
|
265
|
+
this.renderProgressDialog());
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
exports.default = Communication;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionBase } from '@iobroker/dm-utils/build/types/base';
|
|
3
|
+
interface DeviceActionButtonProps {
|
|
4
|
+
deviceId: string;
|
|
5
|
+
action: any;
|
|
6
|
+
refresh: () => void;
|
|
7
|
+
deviceHandler: (deviceId: string, action: ActionBase<'api'>, refresh: () => void) => () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export default function DeviceActionButton(props: DeviceActionButtonProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const TooltipButton_js_1 = __importDefault(require("./TooltipButton.js"));
|
|
8
|
+
const Utils_js_1 = require("./Utils.js");
|
|
9
|
+
function DeviceActionButton(props) {
|
|
10
|
+
const { deviceId, action, refresh, deviceHandler, disabled, } = props;
|
|
11
|
+
const tooltip = (0, Utils_js_1.getTranslation)(action.description);
|
|
12
|
+
const icon = (0, Utils_js_1.renderIcon)(action);
|
|
13
|
+
return react_1.default.createElement(TooltipButton_js_1.default, { label: action.label || (icon ? null : action.id), tooltip: tooltip, disabled: disabled || action.disabled, Icon: icon, onClick: deviceHandler(deviceId, action, refresh) });
|
|
14
|
+
}
|
|
15
|
+
exports.default = DeviceActionButton;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { Connection } from '@iobroker/socket-client';
|
|
3
|
+
import { DeviceDetails, DeviceInfo } from '@iobroker/dm-utils';
|
|
4
|
+
import { ActionBase, ControlBase, ControlState } from '@iobroker/dm-utils/build/types/base';
|
|
5
|
+
interface DeviceCardProps {
|
|
6
|
+
title?: string;
|
|
7
|
+
id: string;
|
|
8
|
+
device: DeviceInfo;
|
|
9
|
+
instanceId: string;
|
|
10
|
+
socket: Connection;
|
|
11
|
+
uploadImagesToInstance?: string;
|
|
12
|
+
deviceHandler: (deviceId: string, action: ActionBase<'api'>, refresh: () => void) => () => void;
|
|
13
|
+
controlHandler: (deviceId: string, control: ControlBase, state: ControlState) => () => Promise<ioBroker.State | null>;
|
|
14
|
+
controlStateHandler: (deviceId: string, control: ControlBase) => () => Promise<ioBroker.State | null>;
|
|
15
|
+
smallCards?: boolean;
|
|
16
|
+
alive: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface DeviceCardState {
|
|
19
|
+
open: boolean;
|
|
20
|
+
details: DeviceDetails | null;
|
|
21
|
+
data: Record<string, any>;
|
|
22
|
+
icon: string | undefined;
|
|
23
|
+
showControlDialog: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Device Card Component
|
|
27
|
+
*/
|
|
28
|
+
declare class DeviceCard extends Component<DeviceCardProps, DeviceCardState> {
|
|
29
|
+
constructor(props: DeviceCardProps);
|
|
30
|
+
fetchIcon(): Promise<void>;
|
|
31
|
+
componentDidMount(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Load the device details
|
|
34
|
+
*/
|
|
35
|
+
loadDetails(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Refresh the device details
|
|
38
|
+
*/
|
|
39
|
+
refresh: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Copy the device ID to the clipboard
|
|
42
|
+
* @returns {void}
|
|
43
|
+
*/
|
|
44
|
+
copyToClipboard: () => Promise<void>;
|
|
45
|
+
renderDialog(): React.JSX.Element;
|
|
46
|
+
renderControlDialog(): React.JSX.Element;
|
|
47
|
+
renderControls(): React.JSX.Element;
|
|
48
|
+
renderActions(): React.JSX.Element[];
|
|
49
|
+
renderSmall(): React.JSX.Element;
|
|
50
|
+
renderBig(): React.JSX.Element;
|
|
51
|
+
render(): React.JSX.Element;
|
|
52
|
+
}
|
|
53
|
+
export default DeviceCard;
|