@iobroker/adapter-react-v5 4.13.2 → 4.13.4
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/ColorPicker.js +54 -54
- package/Components/ColorPicker.js.map +1 -1
- package/Components/ComplexCron.js.map +1 -1
- package/Components/FileBrowser.js +3 -3
- package/Components/FileViewer.js +9 -16
- package/Components/Loader.js +223 -223
- package/Components/Loaders/PT.css +108 -108
- package/Components/Loaders/PT.js +103 -103
- package/Components/Loaders/Vendor.css +13 -13
- package/Components/Loaders/Vendor.js +7 -7
- package/Components/ObjectBrowser.d.ts +2 -2
- package/Components/ObjectBrowser.js +359 -351
- package/Components/ObjectBrowser.js.map +1 -1
- package/Components/TabContent.d.ts +3 -7
- package/Components/TabContent.js +1 -3
- package/Components/TableResize.d.ts +20 -13
- package/Components/TableResize.js +244 -262
- package/Components/TreeTable.js +70 -70
- package/Components/TreeTable.js.map +1 -1
- package/Components/UploadImage.js +305 -305
- package/Components/loader.css +221 -221
- package/Components/types.d.ts +82 -82
- package/Components/withWidth.js +2 -2
- package/Components/withWidth.js.map +1 -1
- package/Connection.js.map +1 -1
- package/GenericApp.js +49 -49
- package/LICENSE +22 -22
- package/LegacyConnection.d.ts +4 -0
- package/LegacyConnection.js +14 -0
- package/Prompt.js +7 -7
- package/README.md +1105 -1101
- 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/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/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
- package/Components/404.js.map +0 -1
- package/Components/CustomModal.js.map +0 -1
- package/Components/FileBrowser.js.map +0 -1
- package/Components/FileViewer.js.map +0 -1
- package/Components/Icon.js.map +0 -1
- package/Components/IconPicker.js.map +0 -1
- package/Components/IconSelector.js.map +0 -1
- package/Components/Image.js.map +0 -1
- package/Components/JsonConfigComponent/ChipInput.d.ts +0 -12
- package/Components/JsonConfigComponent/ChipInput.js +0 -763
- package/Components/JsonConfigComponent/ChipInput.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAccordion.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigAccordion.js +0 -348
- package/Components/JsonConfigComponent/ConfigAccordion.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAlive.d.ts +0 -10
- package/Components/JsonConfigComponent/ConfigAlive.js +0 -105
- package/Components/JsonConfigComponent/ConfigAlive.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +0 -37
- package/Components/JsonConfigComponent/ConfigAutocomplete.js +0 -73
- package/Components/JsonConfigComponent/ConfigAutocomplete.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +0 -131
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCRON.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigCRON.js +0 -157
- package/Components/JsonConfigComponent/ConfigCRON.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCertCollection.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCertCollection.js +0 -128
- package/Components/JsonConfigComponent/ConfigCertCollection.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js +0 -149
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCertificates.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCertificates.js +0 -284
- package/Components/JsonConfigComponent/ConfigCertificates.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCheckLicense.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigCheckLicense.js +0 -821
- package/Components/JsonConfigComponent/ConfigCheckLicense.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigCheckbox.js +0 -40
- package/Components/JsonConfigComponent/ConfigCheckbox.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigChip.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigChip.js +0 -120
- package/Components/JsonConfigComponent/ConfigChip.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigColor.d.ts +0 -22
- package/Components/JsonConfigComponent/ConfigColor.js +0 -120
- package/Components/JsonConfigComponent/ConfigColor.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCoordinates.js +0 -265
- package/Components/JsonConfigComponent/ConfigCoordinates.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCustom.d.ts +0 -26
- package/Components/JsonConfigComponent/ConfigCustom.js +0 -316
- package/Components/JsonConfigComponent/ConfigCustom.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigDatePicker.js +0 -91
- package/Components/JsonConfigComponent/ConfigDatePicker.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigDeviceManager.d.ts +0 -6
- package/Components/JsonConfigComponent/ConfigDeviceManager.js +0 -18
- package/Components/JsonConfigComponent/ConfigFile.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigFile.js +0 -228
- package/Components/JsonConfigComponent/ConfigFile.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigFileSelector.js +0 -625
- package/Components/JsonConfigComponent/ConfigFileSelector.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigFunc.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigFunc.js +0 -124
- package/Components/JsonConfigComponent/ConfigFunc.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigGeneric.d.ts +0 -95
- package/Components/JsonConfigComponent/ConfigGeneric.js +0 -646
- package/Components/JsonConfigComponent/ConfigIP.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigIP.js +0 -130
- package/Components/JsonConfigComponent/ConfigIP.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigImageSendTo.d.ts +0 -10
- package/Components/JsonConfigComponent/ConfigImageSendTo.js +0 -114
- package/Components/JsonConfigComponent/ConfigImageSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigImageUpload.js +0 -166
- package/Components/JsonConfigComponent/ConfigImageUpload.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js +0 -264
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigInterface.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigInterface.js +0 -146
- package/Components/JsonConfigComponent/ConfigInterface.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +0 -13
- package/Components/JsonConfigComponent/ConfigJsonEditor.js +0 -145
- package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigLanguage.d.ts +0 -7
- package/Components/JsonConfigComponent/ConfigLanguage.js +0 -110
- package/Components/JsonConfigComponent/ConfigLanguage.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigLicense.d.ts +0 -24
- package/Components/JsonConfigComponent/ConfigLicense.js +0 -183
- package/Components/JsonConfigComponent/ConfigLicense.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigNumber.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigNumber.js +0 -117
- package/Components/JsonConfigComponent/ConfigObjectId.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigObjectId.js +0 -167
- package/Components/JsonConfigComponent/ConfigObjectId.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPanel.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigPanel.js +0 -396
- package/Components/JsonConfigComponent/ConfigPanel.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPassword.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigPassword.js +0 -193
- package/Components/JsonConfigComponent/ConfigPassword.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPattern.d.ts +0 -21
- package/Components/JsonConfigComponent/ConfigPattern.js +0 -65
- package/Components/JsonConfigComponent/ConfigPattern.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPort.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigPort.js +0 -176
- package/Components/JsonConfigComponent/ConfigRoom.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigRoom.js +0 -124
- package/Components/JsonConfigComponent/ConfigRoom.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSelect.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigSelect.js +0 -159
- package/Components/JsonConfigComponent/ConfigSelect.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js +0 -272
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSendto.d.ts +0 -24
- package/Components/JsonConfigComponent/ConfigSendto.js +0 -294
- package/Components/JsonConfigComponent/ConfigSendto.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSetState.d.ts +0 -18
- package/Components/JsonConfigComponent/ConfigSetState.js +0 -185
- package/Components/JsonConfigComponent/ConfigSetState.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSlider.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigSlider.js +0 -119
- package/Components/JsonConfigComponent/ConfigSlider.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticDivider.js +0 -68
- package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticHeader.js +0 -81
- package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticImage.js +0 -71
- package/Components/JsonConfigComponent/ConfigStaticImage.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticText.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticText.js +0 -88
- package/Components/JsonConfigComponent/ConfigStaticText.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTable.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigTable.js +0 -1064
- package/Components/JsonConfigComponent/ConfigTable.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTabs.d.ts +0 -34
- package/Components/JsonConfigComponent/ConfigTabs.js +0 -162
- package/Components/JsonConfigComponent/ConfigTabs.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigText.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigText.js +0 -226
- package/Components/JsonConfigComponent/ConfigText.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +0 -10
- package/Components/JsonConfigComponent/ConfigTextSendTo.js +0 -129
- package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigTimePicker.js +0 -85
- package/Components/JsonConfigComponent/ConfigTimePicker.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTopic.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigTopic.js +0 -110
- package/Components/JsonConfigComponent/ConfigTopic.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigUUID.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigUUID.js +0 -95
- package/Components/JsonConfigComponent/ConfigUUID.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigUser.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigUser.js +0 -142
- package/Components/JsonConfigComponent/ConfigUser.js.map +0 -1
- package/Components/JsonConfigComponent/DeviceManager/Communication.d.ts +0 -63
- package/Components/JsonConfigComponent/DeviceManager/Communication.js +0 -268
- package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.d.ts +0 -11
- package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.js +0 -15
- package/Components/JsonConfigComponent/DeviceManager/DeviceCard.d.ts +0 -53
- package/Components/JsonConfigComponent/DeviceManager/DeviceCard.js +0 -340
- package/Components/JsonConfigComponent/DeviceManager/DeviceControl.d.ts +0 -45
- package/Components/JsonConfigComponent/DeviceManager/DeviceControl.js +0 -146
- package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.d.ts +0 -12
- package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.js +0 -69
- package/Components/JsonConfigComponent/DeviceManager/DeviceList.d.ts +0 -51
- package/Components/JsonConfigComponent/DeviceManager/DeviceList.js +0 -226
- package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.d.ts +0 -13
- package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.js +0 -111
- package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.d.ts +0 -7
- package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.js +0 -16
- package/Components/JsonConfigComponent/DeviceManager/JsonConfig.d.ts +0 -11
- package/Components/JsonConfigComponent/DeviceManager/JsonConfig.js +0 -94
- package/Components/JsonConfigComponent/DeviceManager/TooltipButton.d.ts +0 -10
- package/Components/JsonConfigComponent/DeviceManager/TooltipButton.js +0 -22
- package/Components/JsonConfigComponent/DeviceManager/Utils.d.ts +0 -12
- package/Components/JsonConfigComponent/DeviceManager/Utils.js +0 -158
- package/Components/JsonConfigComponent/DeviceManager/i18n/de.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/en.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/es.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/fr.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/i18n.d.ts +0 -26
- package/Components/JsonConfigComponent/DeviceManager/i18n/it.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/nl.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/pl.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/pt.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/ru.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/uk.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/zh-cn.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/index.d.ts +0 -2
- package/Components/JsonConfigComponent/DeviceManager/index.js +0 -10
- package/Components/JsonConfigComponent/DeviceManager/index.js.map +0 -1
- package/Components/JsonConfigComponent/Utils.d.ts +0 -9
- package/Components/JsonConfigComponent/Utils.js +0 -13
- package/Components/JsonConfigComponent/index.d.ts +0 -26
- package/Components/JsonConfigComponent/index.js +0 -520
- package/Components/JsonConfigComponent/index.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/AdminConnection.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/AdminConnection.js +0 -7
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/Icon.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/Icon.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/Icon.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/Utils.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/Utils.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/Utils.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/i18n.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/i18n.js +0 -10
- package/Components/JsonConfigComponent/wrapper/i18n.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js +0 -10
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js.map +0 -1
- package/Components/Loader.js.map +0 -1
- package/Components/Loaders/PT.js.map +0 -1
- package/Components/Loaders/Vendor.js.map +0 -1
- package/Components/Logo.js.map +0 -1
- package/Components/MDUtils.js.map +0 -1
- package/Components/Router.js.map +0 -1
- package/Components/SaveCloseButtons.js.map +0 -1
- package/Components/Schedule.js.map +0 -1
- package/Components/SelectWithIcon.js.map +0 -1
- package/Components/SimpleCron/cron2text.js.map +0 -1
- package/Components/SimpleCron/cronText.js.map +0 -1
- package/Components/SimpleCron/index.js.map +0 -1
- package/Components/SimpleCron/jquery.cron.locale.js.map +0 -1
- package/Components/TabContainer.js.map +0 -1
- package/Components/TabContent.js.map +0 -1
- package/Components/TabHeader.js.map +0 -1
- package/Components/TableResize.js.map +0 -1
- package/Components/TextWithIcon.js.map +0 -1
- package/Components/ToggleThemeMenu.js.map +0 -1
- package/Components/UploadImage.js.map +0 -1
- package/Components/Utils.js.map +0 -1
- package/Components/copy-to-clipboard.d.ts +0 -13
- package/Components/copy-to-clipboard.js +0 -156
- package/Components/copy-to-clipboard.js.map +0 -1
- package/Dialogs/ComplexCron.js.map +0 -1
- package/Dialogs/Confirm.js.map +0 -1
- package/Dialogs/Cron.js.map +0 -1
- package/Dialogs/Error.js.map +0 -1
- package/Dialogs/Message.js.map +0 -1
- package/Dialogs/SelectFile.js.map +0 -1
- package/Dialogs/SelectID.js.map +0 -1
- package/Dialogs/SimpleCron.js.map +0 -1
- package/Dialogs/TextInput.js.map +0 -1
- package/GenericApp.js.map +0 -1
- package/LegacyConnection.js.map +0 -1
- package/Prompt.js.map +0 -1
- package/Theme.js.map +0 -1
- package/i18n.js.map +0 -1
- package/icons/IconExpert.js.map +0 -1
|
@@ -1,340 +0,0 @@
|
|
|
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 icons_material_1 = require("@mui/icons-material");
|
|
32
|
-
const Icon_1 = __importDefault(require("../../Icon"));
|
|
33
|
-
const Utils_1 = __importDefault(require("../../Utils"));
|
|
34
|
-
const i18n_1 = __importDefault(require("../../../i18n"));
|
|
35
|
-
const DeviceActionButton_1 = __importDefault(require("./DeviceActionButton"));
|
|
36
|
-
const DeviceControl_1 = __importDefault(require("./DeviceControl"));
|
|
37
|
-
const DeviceStatus_1 = __importDefault(require("./DeviceStatus"));
|
|
38
|
-
const JsonConfig_1 = __importDefault(require("./JsonConfig"));
|
|
39
|
-
const DeviceImageUpload_1 = __importDefault(require("./DeviceImageUpload"));
|
|
40
|
-
const Utils_2 = require("./Utils");
|
|
41
|
-
const NoImageIcon = (props) => react_1.default.createElement("svg", { viewBox: "0 0 24 24", width: "24", height: "24", style: props.style, className: props.className },
|
|
42
|
-
react_1.default.createElement("path", { fill: "currentColor", d: "M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z" }));
|
|
43
|
-
function getText(text) {
|
|
44
|
-
if (typeof text === 'object') {
|
|
45
|
-
return text[i18n_1.default.getLanguage()] || text.en;
|
|
46
|
-
}
|
|
47
|
-
return text;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Device Card Component
|
|
51
|
-
*/
|
|
52
|
-
class DeviceCard extends react_1.Component {
|
|
53
|
-
constructor(props) {
|
|
54
|
-
super(props);
|
|
55
|
-
/**
|
|
56
|
-
* Refresh the device details
|
|
57
|
-
*/
|
|
58
|
-
this.refresh = () => {
|
|
59
|
-
this.setState({ details: null });
|
|
60
|
-
this.loadDetails().catch(console.error);
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Copy the device ID to the clipboard
|
|
64
|
-
* @returns {void}
|
|
65
|
-
*/
|
|
66
|
-
this.copyToClipboard = async () => {
|
|
67
|
-
const textToCopy = this.props.device.id;
|
|
68
|
-
Utils_1.default.copyToClipboard(textToCopy);
|
|
69
|
-
alert(`${(0, Utils_2.getTranslation)('copied')} ${textToCopy} ${(0, Utils_2.getTranslation)('toClipboard')}!`);
|
|
70
|
-
};
|
|
71
|
-
this.state = {
|
|
72
|
-
open: false,
|
|
73
|
-
details: null,
|
|
74
|
-
data: {},
|
|
75
|
-
icon: props.device.icon,
|
|
76
|
-
showControlDialog: false,
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
async fetchIcon() {
|
|
80
|
-
if (!this.props.device.icon) {
|
|
81
|
-
// try to load the icon from file storage
|
|
82
|
-
const fileName = `${this.props.device.manufacturer ? `${this.props.device.manufacturer}_` : ''}${this.props.device.model ? this.props.device.model : this.props.device.id}`;
|
|
83
|
-
try {
|
|
84
|
-
const file = await this.props.socket.readFile(this.props.instanceId.replace('system.adapter.', ''), `${fileName}.webp`, true);
|
|
85
|
-
this.setState({ icon: `data:image/${file.mimeType},${file}` });
|
|
86
|
-
// const response = await fetch(url);
|
|
87
|
-
// if (response.ok) {
|
|
88
|
-
// const blob = await response.blob();
|
|
89
|
-
// const reader = new FileReader();
|
|
90
|
-
// reader.onloadend = () => {
|
|
91
|
-
// setIcon(reader.result);
|
|
92
|
-
// };
|
|
93
|
-
// reader.readAsDataURL(blob);
|
|
94
|
-
// } else {
|
|
95
|
-
// throw new Error('Response not ok');
|
|
96
|
-
// }
|
|
97
|
-
}
|
|
98
|
-
catch (error) {
|
|
99
|
-
this.state.icon && this.setState({ icon: '' });
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
componentDidMount() {
|
|
104
|
-
this.fetchIcon()
|
|
105
|
-
.catch(e => console.error(e));
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Load the device details
|
|
109
|
-
*/
|
|
110
|
-
async loadDetails() {
|
|
111
|
-
console.log(`Loading device details for ${this.props.device.id}... from ${this.props.instanceId}`);
|
|
112
|
-
const details = await this.props.socket.sendTo(this.props.instanceId, 'dm:deviceDetails', this.props.device.id);
|
|
113
|
-
console.log(`Got device details for ${this.props.device.id}:`, details);
|
|
114
|
-
this.setState({ details, data: (details === null || details === void 0 ? void 0 : details.data) || {} });
|
|
115
|
-
}
|
|
116
|
-
;
|
|
117
|
-
renderDialog() {
|
|
118
|
-
if (!this.state.open || !this.state.details) {
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
return react_1.default.createElement(material_1.Dialog, { open: !0, maxWidth: "md", onClose: () => this.setState({ open: false }) },
|
|
122
|
-
react_1.default.createElement(material_1.DialogContent, null,
|
|
123
|
-
react_1.default.createElement(JsonConfig_1.default, { instanceId: this.props.instanceId, socket: this.props.socket, schema: this.state.details.schema, data: this.state.data, onChange: (data) => this.setState({ data }) })),
|
|
124
|
-
react_1.default.createElement(material_1.DialogActions, null,
|
|
125
|
-
react_1.default.createElement(material_1.Button, { disabled: !this.props.alive, variant: "contained", color: "primary", onClick: () => this.setState({ open: false }), autoFocus: true }, (0, Utils_2.getTranslation)('closeButtonText'))));
|
|
126
|
-
}
|
|
127
|
-
renderControlDialog() {
|
|
128
|
-
var _a;
|
|
129
|
-
if (!this.state.showControlDialog || !this.props.alive) {
|
|
130
|
-
return null;
|
|
131
|
-
}
|
|
132
|
-
const colors = { primary: '#111', secondary: '#888' };
|
|
133
|
-
return react_1.default.createElement(material_1.Dialog, { open: !0, onClose: () => this.setState({ showControlDialog: false }) },
|
|
134
|
-
react_1.default.createElement(material_1.DialogTitle, null,
|
|
135
|
-
this.props.title,
|
|
136
|
-
react_1.default.createElement(material_1.IconButton, { style: {
|
|
137
|
-
position: 'absolute',
|
|
138
|
-
top: 5,
|
|
139
|
-
right: 5,
|
|
140
|
-
zIndex: 10,
|
|
141
|
-
}, onClick: () => this.setState({ showControlDialog: false }) },
|
|
142
|
-
react_1.default.createElement(icons_material_1.Close, null))),
|
|
143
|
-
react_1.default.createElement(material_1.DialogContent, { style: { display: 'flex', flexDirection: 'column' } }, (_a = this.props.device.controls) === null || _a === void 0 ? void 0 : _a.map(control => react_1.default.createElement(DeviceControl_1.default, { disabled: false, key: control.id, control: control, socket: this.props.socket, colors: colors, deviceId: this.props.device.id, controlHandler: this.props.controlHandler, controlStateHandler: this.props.controlStateHandler }))));
|
|
144
|
-
}
|
|
145
|
-
renderControls() {
|
|
146
|
-
var _a, _b, _c;
|
|
147
|
-
const colors = { primary: '#111', secondary: '#888' };
|
|
148
|
-
const firstControl = (_a = this.props.device.controls) === null || _a === void 0 ? void 0 : _a[0];
|
|
149
|
-
if (((_b = this.props.device.controls) === null || _b === void 0 ? void 0 : _b.length) === 1 && firstControl && ((firstControl.type === 'icon' || firstControl.type === 'switch') && !firstControl.label)) {
|
|
150
|
-
// control can be placed in button icon
|
|
151
|
-
return react_1.default.createElement(DeviceControl_1.default, { disabled: !this.props.alive, control: firstControl, colors: colors, socket: this.props.socket, deviceId: this.props.device.id, controlHandler: this.props.controlHandler, controlStateHandler: this.props.controlStateHandler });
|
|
152
|
-
}
|
|
153
|
-
if ((_c = this.props.device.controls) === null || _c === void 0 ? void 0 : _c.length) {
|
|
154
|
-
// place button and show controls dialog
|
|
155
|
-
return react_1.default.createElement(material_1.Fab, { size: "small", disabled: !this.props.alive, onClick: () => this.setState({ showControlDialog: true }) },
|
|
156
|
-
react_1.default.createElement(icons_material_1.VideogameAsset, null));
|
|
157
|
-
}
|
|
158
|
-
return null;
|
|
159
|
-
}
|
|
160
|
-
renderActions() {
|
|
161
|
-
var _a;
|
|
162
|
-
return ((_a = this.props.device.actions) === null || _a === void 0 ? void 0 : _a.length) ? this.props.device.actions.map(a => react_1.default.createElement(DeviceActionButton_1.default, { disabled: !this.props.alive, key: a.id, deviceId: this.props.device.id, action: a, deviceHandler: this.props.deviceHandler, refresh: this.refresh })) : null;
|
|
163
|
-
}
|
|
164
|
-
renderSmall() {
|
|
165
|
-
const hasDetails = this.props.device.hasDetails;
|
|
166
|
-
const status = !this.props.device.status ? [] : Array.isArray(this.props.device.status) ? this.props.device.status : [this.props.device.status];
|
|
167
|
-
return react_1.default.createElement(material_1.Card, { sx: {
|
|
168
|
-
maxWidth: 345,
|
|
169
|
-
minWidth: 200,
|
|
170
|
-
} },
|
|
171
|
-
react_1.default.createElement(material_1.CardHeader, { sx: theme => ({
|
|
172
|
-
backgroundColor: this.props.device.color || theme.palette.secondary.main,
|
|
173
|
-
color: this.props.device.color ? Utils_1.default.invertColor(this.props.device.color, true) : theme.palette.secondary.contrastText,
|
|
174
|
-
maxWidth: 345,
|
|
175
|
-
}), avatar: react_1.default.createElement("div", null,
|
|
176
|
-
this.props.uploadImagesToInstance ? react_1.default.createElement(DeviceImageUpload_1.default, { uploadImagesToInstance: this.props.uploadImagesToInstance, deviceId: this.props.device.id, manufacturer: getText(this.props.device.manufacturer), model: getText(this.props.device.model), onImageSelect: async (imageData) => imageData && this.setState({ icon: imageData }), socket: this.props.socket }) : null,
|
|
177
|
-
this.state.icon ? react_1.default.createElement(Icon_1.default, { src: this.state.icon }) : react_1.default.createElement(NoImageIcon, null)), action: hasDetails ? react_1.default.createElement(material_1.IconButton, { "aria-label": "settings", onClick: () => {
|
|
178
|
-
if (!this.state.open) {
|
|
179
|
-
this.loadDetails().catch(console.error);
|
|
180
|
-
this.setState({ open: true });
|
|
181
|
-
}
|
|
182
|
-
} },
|
|
183
|
-
react_1.default.createElement(icons_material_1.MoreVert, null)) : null, title: this.props.title, subheader: this.props.device.manufacturer ? react_1.default.createElement("span", null,
|
|
184
|
-
react_1.default.createElement("b", { style: { marginRight: 4 } },
|
|
185
|
-
(0, Utils_2.getTranslation)('manufacturer'),
|
|
186
|
-
":"),
|
|
187
|
-
getText(this.props.device.manufacturer)) : null }),
|
|
188
|
-
react_1.default.createElement(material_1.CardContent, { style: { position: 'relative' } },
|
|
189
|
-
(status === null || status === void 0 ? void 0 : status.length) ? react_1.default.createElement("div", { style: {
|
|
190
|
-
display: 'flex',
|
|
191
|
-
position: 'absolute',
|
|
192
|
-
top: -11,
|
|
193
|
-
background: '#88888880',
|
|
194
|
-
padding: '0 8px',
|
|
195
|
-
borderRadius: 5,
|
|
196
|
-
width: 'calc(100% - 46px)',
|
|
197
|
-
} }, status.map((s, i) => react_1.default.createElement(DeviceStatus_1.default, { key: i, status: s }))) : null,
|
|
198
|
-
react_1.default.createElement("div", null,
|
|
199
|
-
react_1.default.createElement(material_1.Typography, { variant: "body1" },
|
|
200
|
-
react_1.default.createElement("div", { onClick: this.copyToClipboard },
|
|
201
|
-
react_1.default.createElement("b", null, "ID:"),
|
|
202
|
-
react_1.default.createElement("span", { style: { marginLeft: 4 } }, this.props.device.id.replace(/.*\.\d\./, ''))),
|
|
203
|
-
this.props.device.manufacturer ? react_1.default.createElement("div", null,
|
|
204
|
-
react_1.default.createElement("b", { style: { marginRight: 4 } },
|
|
205
|
-
(0, Utils_2.getTranslation)('manufacturer'),
|
|
206
|
-
":"),
|
|
207
|
-
getText(this.props.device.manufacturer)) : null,
|
|
208
|
-
this.props.device.model ? react_1.default.createElement("div", null,
|
|
209
|
-
react_1.default.createElement("b", { style: { marginRight: 4 } },
|
|
210
|
-
(0, Utils_2.getTranslation)('model'),
|
|
211
|
-
":"),
|
|
212
|
-
getText(this.props.device.model)) : null))),
|
|
213
|
-
react_1.default.createElement(material_1.CardActions, { disableSpacing: true },
|
|
214
|
-
this.renderActions(),
|
|
215
|
-
react_1.default.createElement("div", { style: { flexGrow: 1 } }),
|
|
216
|
-
this.renderControls()),
|
|
217
|
-
this.renderDialog(),
|
|
218
|
-
this.renderControlDialog());
|
|
219
|
-
}
|
|
220
|
-
renderBig() {
|
|
221
|
-
var _a;
|
|
222
|
-
const cardStyle = {
|
|
223
|
-
// backgroundColor: '#fafafa',
|
|
224
|
-
width: 300,
|
|
225
|
-
minHeight: 280,
|
|
226
|
-
margin: 10,
|
|
227
|
-
overflow: 'hidden',
|
|
228
|
-
display: 'inline-block',
|
|
229
|
-
};
|
|
230
|
-
/** @type {CSSProperties} */
|
|
231
|
-
const headerStyle = {
|
|
232
|
-
display: 'flex',
|
|
233
|
-
position: 'relative',
|
|
234
|
-
justifyContent: 'space-between',
|
|
235
|
-
minHeight: 60,
|
|
236
|
-
color: '#000',
|
|
237
|
-
padding: '0 10px 0 10px',
|
|
238
|
-
backgroundColor: '#77c7ff8c',
|
|
239
|
-
borderRadius: '4px 4px 0 0',
|
|
240
|
-
};
|
|
241
|
-
/** @type {CSSProperties} */
|
|
242
|
-
const imgAreaStyle = {
|
|
243
|
-
height: 45,
|
|
244
|
-
width: 45,
|
|
245
|
-
margin: 'auto',
|
|
246
|
-
justifyContent: 'center',
|
|
247
|
-
display: 'grid',
|
|
248
|
-
};
|
|
249
|
-
/** @type {CSSProperties} */
|
|
250
|
-
const imgStyle = {
|
|
251
|
-
zIndex: 2,
|
|
252
|
-
maxWidth: '100%',
|
|
253
|
-
maxHeight: '100%',
|
|
254
|
-
};
|
|
255
|
-
/** @type {CSSProperties} */
|
|
256
|
-
const titleStyle = {
|
|
257
|
-
color: '#333',
|
|
258
|
-
width: '100%',
|
|
259
|
-
fontSize: 16,
|
|
260
|
-
fontWeight: 'bold',
|
|
261
|
-
paddingTop: 16,
|
|
262
|
-
paddingLeft: 8,
|
|
263
|
-
whiteSpace: 'nowrap',
|
|
264
|
-
overflow: 'hidden',
|
|
265
|
-
textOverflow: 'ellipsis',
|
|
266
|
-
};
|
|
267
|
-
/** @type {CSSProperties} */
|
|
268
|
-
const detailsButtonStyle = {
|
|
269
|
-
right: 20,
|
|
270
|
-
bottom: -20,
|
|
271
|
-
position: 'absolute',
|
|
272
|
-
};
|
|
273
|
-
/** @type {CSSProperties} */
|
|
274
|
-
const bodyStyle = {
|
|
275
|
-
height: 'calc(100% - 116px)',
|
|
276
|
-
};
|
|
277
|
-
/** @type {CSSProperties} */
|
|
278
|
-
const deviceInfoStyle = {
|
|
279
|
-
padding: '20px 16px 0 16px',
|
|
280
|
-
height: 133,
|
|
281
|
-
};
|
|
282
|
-
/** @type {CSSProperties} */
|
|
283
|
-
const statusStyle = {
|
|
284
|
-
padding: '15px 15px 0 15px',
|
|
285
|
-
height: 41,
|
|
286
|
-
};
|
|
287
|
-
const status = !this.props.device.status ? [] : Array.isArray(this.props.device.status) ? this.props.device.status : [this.props.device.status];
|
|
288
|
-
return react_1.default.createElement(material_1.Paper, { style: cardStyle, key: this.props.id },
|
|
289
|
-
react_1.default.createElement("div", { style: headerStyle },
|
|
290
|
-
react_1.default.createElement("div", { style: imgAreaStyle },
|
|
291
|
-
this.props.uploadImagesToInstance ? react_1.default.createElement(DeviceImageUpload_1.default, { uploadImagesToInstance: this.props.uploadImagesToInstance, deviceId: this.props.device.id, manufacturer: getText(this.props.device.manufacturer), model: getText(this.props.device.model), onImageSelect: async (imageData) => imageData && this.setState({ icon: imageData }), socket: this.props.socket }) : null,
|
|
292
|
-
react_1.default.createElement(Icon_1.default, { src: this.state.icon, style: imgStyle })),
|
|
293
|
-
react_1.default.createElement("div", { style: titleStyle }, this.props.title),
|
|
294
|
-
this.props.device.hasDetails ? react_1.default.createElement(material_1.Fab, { disabled: !this.props.alive, size: "small", style: detailsButtonStyle, onClick: () => {
|
|
295
|
-
if (!this.state.open) {
|
|
296
|
-
this.loadDetails().catch(console.error);
|
|
297
|
-
this.setState({ open: true });
|
|
298
|
-
}
|
|
299
|
-
}, color: "primary" },
|
|
300
|
-
react_1.default.createElement(icons_material_1.MoreVert, null)) : null),
|
|
301
|
-
react_1.default.createElement("div", { style: statusStyle }, status.map((s, i) => react_1.default.createElement(DeviceStatus_1.default, { key: i, status: s }))),
|
|
302
|
-
react_1.default.createElement("div", { style: bodyStyle },
|
|
303
|
-
react_1.default.createElement(material_1.Typography, { variant: "body1", style: deviceInfoStyle },
|
|
304
|
-
react_1.default.createElement("div", { onClick: this.copyToClipboard },
|
|
305
|
-
react_1.default.createElement("b", { style: { marginRight: 4 } }, "ID:"),
|
|
306
|
-
this.props.device.id.replace(/.*\.\d\./, '')),
|
|
307
|
-
this.props.device.manufacturer ? react_1.default.createElement("div", null,
|
|
308
|
-
react_1.default.createElement("b", { style: { marginRight: 4 } },
|
|
309
|
-
(0, Utils_2.getTranslation)('manufacturer'),
|
|
310
|
-
":"),
|
|
311
|
-
getText(this.props.device.manufacturer)) : null,
|
|
312
|
-
this.props.device.model ? react_1.default.createElement("div", null,
|
|
313
|
-
react_1.default.createElement("b", { style: { marginRight: 4 } },
|
|
314
|
-
(0, Utils_2.getTranslation)('model'),
|
|
315
|
-
":"),
|
|
316
|
-
getText(this.props.device.model)) : null),
|
|
317
|
-
!!((_a = this.props.device.actions) === null || _a === void 0 ? void 0 : _a.length) && react_1.default.createElement("div", { style: {
|
|
318
|
-
flex: 1,
|
|
319
|
-
position: 'relative',
|
|
320
|
-
display: 'flex',
|
|
321
|
-
gap: 8,
|
|
322
|
-
paddingBottom: 5,
|
|
323
|
-
height: 34,
|
|
324
|
-
paddingLeft: 10,
|
|
325
|
-
paddingRight: 10,
|
|
326
|
-
} },
|
|
327
|
-
this.renderActions(),
|
|
328
|
-
react_1.default.createElement("div", { style: { flexGrow: 1 } }),
|
|
329
|
-
this.renderControls())),
|
|
330
|
-
this.renderDialog(),
|
|
331
|
-
this.renderControlDialog());
|
|
332
|
-
}
|
|
333
|
-
render() {
|
|
334
|
-
if (this.props.smallCards) {
|
|
335
|
-
return this.renderSmall();
|
|
336
|
-
}
|
|
337
|
-
return this.renderBig();
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
exports.default = DeviceCard;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import { ControlBase, ControlState } from '@iobroker/dm-utils/build/types/base';
|
|
3
|
-
interface DeviceControlProps {
|
|
4
|
-
deviceId: string;
|
|
5
|
-
control: any;
|
|
6
|
-
socket: any;
|
|
7
|
-
controlHandler: (deviceId: string, control: ControlBase, state: ControlState) => () => Promise<ioBroker.State | null>;
|
|
8
|
-
controlStateHandler: (deviceId: string, control: ControlBase) => () => Promise<ioBroker.State | null>;
|
|
9
|
-
colors: any;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
}
|
|
12
|
-
interface DeviceControlState {
|
|
13
|
-
value: any;
|
|
14
|
-
ts: number;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Device Control component
|
|
18
|
-
* @param {object} props - Parameters
|
|
19
|
-
* @param {object} props.control - Control object
|
|
20
|
-
* @param {object} props.socket - Socket object
|
|
21
|
-
* @param {object} props.controlHandler - Control handler to set the state
|
|
22
|
-
* @param {object} props.controlStateHandler - Control handler to read the state
|
|
23
|
-
* @returns {React.JSX.Element|null}
|
|
24
|
-
* @constructor
|
|
25
|
-
*/
|
|
26
|
-
export default class DeviceControl extends Component<DeviceControlProps, DeviceControlState> {
|
|
27
|
-
constructor(props: DeviceControlProps);
|
|
28
|
-
componentDidMount(): void;
|
|
29
|
-
stateHandler: (id: string, state: ioBroker.State) => Promise<void>;
|
|
30
|
-
componentWillUnmount(): void;
|
|
31
|
-
static getDerivedStateFromProps(props: DeviceControlProps, state: DeviceControlState): {
|
|
32
|
-
value: any;
|
|
33
|
-
ts: any;
|
|
34
|
-
};
|
|
35
|
-
sendControl(deviceId: string, control: ControlBase, value: ControlState): Promise<void>;
|
|
36
|
-
renderButton(): React.JSX.Element;
|
|
37
|
-
renderSwitch(): React.JSX.Element;
|
|
38
|
-
getColor(): any;
|
|
39
|
-
renderSelect(): void;
|
|
40
|
-
renderSlider(): void;
|
|
41
|
-
renderColor(): void;
|
|
42
|
-
renderIcon(): React.JSX.Element;
|
|
43
|
-
render(): React.JSX.Element;
|
|
44
|
-
}
|
|
45
|
-
export {};
|
|
@@ -1,146 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const material_1 = require("@mui/material");
|
|
28
|
-
const Utils_1 = require("./Utils");
|
|
29
|
-
/**
|
|
30
|
-
* Device Control component
|
|
31
|
-
* @param {object} props - Parameters
|
|
32
|
-
* @param {object} props.control - Control object
|
|
33
|
-
* @param {object} props.socket - Socket object
|
|
34
|
-
* @param {object} props.controlHandler - Control handler to set the state
|
|
35
|
-
* @param {object} props.controlStateHandler - Control handler to read the state
|
|
36
|
-
* @returns {React.JSX.Element|null}
|
|
37
|
-
* @constructor
|
|
38
|
-
*/
|
|
39
|
-
class DeviceControl extends react_1.Component {
|
|
40
|
-
constructor(props) {
|
|
41
|
-
var _a, _b;
|
|
42
|
-
super(props);
|
|
43
|
-
this.stateHandler = async (id, state) => {
|
|
44
|
-
if (id === this.props.control.stateId && state) {
|
|
45
|
-
// request new state
|
|
46
|
-
const newState = await (this.props.controlStateHandler(this.props.deviceId, this.props.control)());
|
|
47
|
-
if ((newState === null || newState === void 0 ? void 0 : newState.ts) && (!this.state.ts || newState.ts > this.state.ts)) {
|
|
48
|
-
this.setState({
|
|
49
|
-
value: newState.val,
|
|
50
|
-
ts: newState.ts,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
this.state = {
|
|
56
|
-
value: (_a = props.control.state) === null || _a === void 0 ? void 0 : _a.val,
|
|
57
|
-
ts: (_b = props.control.state) === null || _b === void 0 ? void 0 : _b.ts,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
componentDidMount() {
|
|
61
|
-
if (this.props.control.stateId) {
|
|
62
|
-
this.props.socket.subscribeState(this.props.control.stateId, this.stateHandler);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
componentWillUnmount() {
|
|
66
|
-
if (this.props.control.stateId) {
|
|
67
|
-
this.props.socket.unsubscribeState(this.props.control.stateId, this.stateHandler);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
static getDerivedStateFromProps(props, state) {
|
|
71
|
-
var _a, _b;
|
|
72
|
-
if (((_a = props.control.state) === null || _a === void 0 ? void 0 : _a.ts) && (!state.ts || ((_b = props.control.state) === null || _b === void 0 ? void 0 : _b.ts) > state.ts)) {
|
|
73
|
-
return {
|
|
74
|
-
value: props.control.state.val,
|
|
75
|
-
ts: props.control.state.ts,
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
async sendControl(deviceId, control, value) {
|
|
81
|
-
const result = await (this.props.controlHandler(deviceId, control, value)());
|
|
82
|
-
if ((result === null || result === void 0 ? void 0 : result.ts) && (!this.state.ts || (result === null || result === void 0 ? void 0 : result.ts) > this.state.ts)) {
|
|
83
|
-
this.setState({
|
|
84
|
-
value: result.val,
|
|
85
|
-
ts: result.ts,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
renderButton() {
|
|
90
|
-
const tooltip = (0, Utils_1.getTranslation)(this.props.control.description);
|
|
91
|
-
const icon = (0, Utils_1.renderIcon)(this.props.control, this.props.colors, this.state.value);
|
|
92
|
-
if (!this.props.control.label) {
|
|
93
|
-
return react_1.default.createElement(material_1.Fab, { disabled: this.props.disabled, title: tooltip, onClick: () => this.sendControl(this.props.deviceId, this.props.control, true) }, icon);
|
|
94
|
-
}
|
|
95
|
-
return react_1.default.createElement(material_1.Button, { disabled: this.props.disabled, title: tooltip, onClick: () => this.sendControl(this.props.deviceId, this.props.control, true), startIcon: icon }, this.props.control.label);
|
|
96
|
-
}
|
|
97
|
-
renderSwitch() {
|
|
98
|
-
const tooltip = (0, Utils_1.getTranslation)(this.props.control.description);
|
|
99
|
-
// const icon = renderIcon(this.props.control, this.props.colors, this.state.value);
|
|
100
|
-
return react_1.default.createElement(material_1.Switch, { disabled: this.props.disabled, title: tooltip, checked: this.state.value, onChange: e => this.sendControl(this.props.deviceId, this.props.control, e.target.checked) });
|
|
101
|
-
}
|
|
102
|
-
getColor() {
|
|
103
|
-
let color;
|
|
104
|
-
if (this.state.value) {
|
|
105
|
-
color = this.props.control.colorOn || 'primary';
|
|
106
|
-
}
|
|
107
|
-
else if (this.props.control.type === 'switch') {
|
|
108
|
-
color = this.props.control.color;
|
|
109
|
-
}
|
|
110
|
-
if (color === 'primary') {
|
|
111
|
-
return this.props.colors.primary;
|
|
112
|
-
}
|
|
113
|
-
if (color === 'secondary') {
|
|
114
|
-
return this.props.colors.secondary;
|
|
115
|
-
}
|
|
116
|
-
return color;
|
|
117
|
-
}
|
|
118
|
-
renderSelect() {
|
|
119
|
-
}
|
|
120
|
-
renderSlider() {
|
|
121
|
-
}
|
|
122
|
-
renderColor() {
|
|
123
|
-
}
|
|
124
|
-
renderIcon() {
|
|
125
|
-
const tooltip = (0, Utils_1.getTranslation)(this.props.control.description);
|
|
126
|
-
const icon = (0, Utils_1.renderIcon)(this.props.control, this.props.colors, this.state.value);
|
|
127
|
-
const color = this.getColor();
|
|
128
|
-
if (!this.props.control.label) {
|
|
129
|
-
return react_1.default.createElement(material_1.Fab, { disabled: this.props.disabled, size: "small", title: tooltip, color: color === this.props.colors.primary ? 'primary' : (color === this.props.colors.secondary ? 'secondary' : undefined), style: color === this.props.colors.primary || color === this.props.colors.secondary ? undefined : { color }, onClick: () => this.sendControl(this.props.deviceId, this.props.control, !this.state.value) }, icon);
|
|
130
|
-
}
|
|
131
|
-
return react_1.default.createElement(material_1.Button, { disabled: this.props.disabled, title: tooltip, color: color === this.props.colors.primary ? 'primary' : (color === this.props.colors.secondary ? 'secondary' : undefined), style: color === this.props.colors.primary || color === this.props.colors.secondary ? undefined : { color }, onClick: () => this.sendControl(this.props.deviceId, this.props.control, !this.state.value), startIcon: icon }, this.props.control.label);
|
|
132
|
-
}
|
|
133
|
-
render() {
|
|
134
|
-
if (this.props.control.type === 'button') {
|
|
135
|
-
return this.renderButton();
|
|
136
|
-
}
|
|
137
|
-
if (this.props.control.type === 'icon') {
|
|
138
|
-
return this.renderIcon();
|
|
139
|
-
}
|
|
140
|
-
if (this.props.control.type === 'switch') {
|
|
141
|
-
return this.renderSwitch();
|
|
142
|
-
}
|
|
143
|
-
return react_1.default.createElement("div", { style: { color: 'red' } }, this.props.control.type);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
exports.default = DeviceControl;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Connection } from '@iobroker/socket-client';
|
|
3
|
-
interface DeviceImageUploadProps {
|
|
4
|
-
socket: Connection;
|
|
5
|
-
manufacturer?: string;
|
|
6
|
-
model?: string;
|
|
7
|
-
deviceId: string;
|
|
8
|
-
onImageSelect: (image: string) => void;
|
|
9
|
-
uploadImagesToInstance: string;
|
|
10
|
-
}
|
|
11
|
-
declare function DeviceImageUpload(params: DeviceImageUploadProps): React.JSX.Element | null;
|
|
12
|
-
export default DeviceImageUpload;
|
|
@@ -1,69 +0,0 @@
|
|
|
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
|
-
function DeviceImageUpload(params) {
|
|
8
|
-
const { socket, manufacturer, model, deviceId, onImageSelect, uploadImagesToInstance, } = params;
|
|
9
|
-
const handleImageUpload = async (event) => {
|
|
10
|
-
const target = event.target;
|
|
11
|
-
const files = target.files;
|
|
12
|
-
if (!files || files.length === 0) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
const file = files[0];
|
|
16
|
-
if (file) {
|
|
17
|
-
const reader = new FileReader();
|
|
18
|
-
reader.onload = async (e) => {
|
|
19
|
-
if (!e.target || !e.target.result) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const img = new Image();
|
|
23
|
-
img.src = e.target.result;
|
|
24
|
-
img.onload = async () => {
|
|
25
|
-
const maxWidth = 50;
|
|
26
|
-
const maxHeight = 50;
|
|
27
|
-
let width = img.width;
|
|
28
|
-
let height = img.height;
|
|
29
|
-
if (width > height) {
|
|
30
|
-
if (width > maxWidth) {
|
|
31
|
-
height *= maxWidth / width;
|
|
32
|
-
width = maxWidth;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
else if (height > maxHeight) {
|
|
36
|
-
width *= maxHeight / height;
|
|
37
|
-
height = maxHeight;
|
|
38
|
-
}
|
|
39
|
-
const canvas = document.createElement('canvas');
|
|
40
|
-
const ctx = canvas.getContext('2d');
|
|
41
|
-
if (ctx) {
|
|
42
|
-
canvas.width = width;
|
|
43
|
-
canvas.height = height;
|
|
44
|
-
ctx.drawImage(img, 0, 0, width, height);
|
|
45
|
-
const resizedImage = canvas.toDataURL('image/webp');
|
|
46
|
-
// Build the file name from a manufacturer and model, if not available, use device id
|
|
47
|
-
const fileName = `${manufacturer ? `${manufacturer}_` : ''}${model || deviceId}`;
|
|
48
|
-
const base64Data = resizedImage.replace(/^data:image\/webp;base64,/, '');
|
|
49
|
-
const response = await socket.writeFile64(uploadImagesToInstance, fileName, base64Data);
|
|
50
|
-
console.log(`saveImage response: ${JSON.stringify(response)}`);
|
|
51
|
-
onImageSelect && onImageSelect(resizedImage);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
reader.readAsDataURL(file);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const imageUploadButtonStyle = {
|
|
59
|
-
// make the button invisible but still clickable
|
|
60
|
-
opacity: 0,
|
|
61
|
-
position: 'absolute',
|
|
62
|
-
width: '45px',
|
|
63
|
-
height: '45px',
|
|
64
|
-
zIndex: 3,
|
|
65
|
-
};
|
|
66
|
-
return react_1.default.createElement("div", null,
|
|
67
|
-
react_1.default.createElement("input", { style: imageUploadButtonStyle, type: "file", accept: "image/*", onChange: handleImageUpload }));
|
|
68
|
-
}
|
|
69
|
-
exports.default = DeviceImageUpload;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DeviceInfo, InstanceDetails } from '@iobroker/dm-utils';
|
|
3
|
-
import Communication, { CommunicationProps, CommunicationState } from './Communication';
|
|
4
|
-
interface DeviceListProps extends CommunicationProps {
|
|
5
|
-
uploadImagesToInstance?: string;
|
|
6
|
-
filter?: string;
|
|
7
|
-
embedded?: boolean;
|
|
8
|
-
title?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
smallCards?: boolean;
|
|
11
|
-
}
|
|
12
|
-
interface DeviceListState extends CommunicationState {
|
|
13
|
-
devices: DeviceInfo[];
|
|
14
|
-
filteredDevices: DeviceInfo[];
|
|
15
|
-
filter: string;
|
|
16
|
-
instanceInfo: InstanceDetails;
|
|
17
|
-
loading: boolean;
|
|
18
|
-
alive: boolean | null;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Device List Component
|
|
22
|
-
* @param {object} params - Component parameters
|
|
23
|
-
* @param {object} params.socket - socket object
|
|
24
|
-
* @param {string} params.selectedInstance - Selected instance
|
|
25
|
-
* @param {string} params.uploadImagesToInstance - Instance to upload images to
|
|
26
|
-
* @param {string} params.filter - Filter
|
|
27
|
-
* @param {string} params.empbedded - true if this list used with multiple instances and false if only with one
|
|
28
|
-
* @param {string} params.title - Title in appbar (only in non-embedded mode)
|
|
29
|
-
* @param {string} params.style - Style of devices list
|
|
30
|
-
* @returns {*[]} - Array of device cards
|
|
31
|
-
*/
|
|
32
|
-
export default class DeviceList extends Communication<DeviceListProps, DeviceListState> {
|
|
33
|
-
static i18nInitialized: boolean;
|
|
34
|
-
private lastPropsFilter;
|
|
35
|
-
private lastInstance;
|
|
36
|
-
private filterTimeout;
|
|
37
|
-
private readonly language;
|
|
38
|
-
constructor(props: DeviceListProps);
|
|
39
|
-
componentDidMount(): Promise<void>;
|
|
40
|
-
componentWillUnmount(): void;
|
|
41
|
-
aliveHandler: ioBroker.StateChangeHandler;
|
|
42
|
-
/**
|
|
43
|
-
* Load devices
|
|
44
|
-
*/
|
|
45
|
-
loadData(): void;
|
|
46
|
-
getText(text: ioBroker.StringOrTranslated): string;
|
|
47
|
-
applyFilter(): void;
|
|
48
|
-
handleFilterChange(filter: string): void;
|
|
49
|
-
renderContent(): React.JSX.Element | React.JSX.Element[] | null;
|
|
50
|
-
}
|
|
51
|
-
export {};
|