@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,226 +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
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
9
|
-
const i18n_1 = __importDefault(require("../../../i18n"));
|
|
10
|
-
const DeviceCard_1 = __importDefault(require("./DeviceCard"));
|
|
11
|
-
const Utils_1 = require("./Utils");
|
|
12
|
-
const Communication_1 = __importDefault(require("./Communication"));
|
|
13
|
-
const InstanceActionButton_1 = __importDefault(require("./InstanceActionButton"));
|
|
14
|
-
const de_json_1 = __importDefault(require("./i18n/de.json"));
|
|
15
|
-
const en_json_1 = __importDefault(require("./i18n/en.json"));
|
|
16
|
-
const ru_json_1 = __importDefault(require("./i18n/ru.json"));
|
|
17
|
-
const pt_json_1 = __importDefault(require("./i18n/pt.json"));
|
|
18
|
-
const nl_json_1 = __importDefault(require("./i18n/nl.json"));
|
|
19
|
-
const fr_json_1 = __importDefault(require("./i18n/fr.json"));
|
|
20
|
-
const it_json_1 = __importDefault(require("./i18n/it.json"));
|
|
21
|
-
const es_json_1 = __importDefault(require("./i18n/es.json"));
|
|
22
|
-
const pl_json_1 = __importDefault(require("./i18n/pl.json"));
|
|
23
|
-
const uk_json_1 = __importDefault(require("./i18n/uk.json"));
|
|
24
|
-
const zh_cn_json_1 = __importDefault(require("./i18n/zh-cn.json"));
|
|
25
|
-
/**
|
|
26
|
-
* Device List Component
|
|
27
|
-
* @param {object} params - Component parameters
|
|
28
|
-
* @param {object} params.socket - socket object
|
|
29
|
-
* @param {string} params.selectedInstance - Selected instance
|
|
30
|
-
* @param {string} params.uploadImagesToInstance - Instance to upload images to
|
|
31
|
-
* @param {string} params.filter - Filter
|
|
32
|
-
* @param {string} params.empbedded - true if this list used with multiple instances and false if only with one
|
|
33
|
-
* @param {string} params.title - Title in appbar (only in non-embedded mode)
|
|
34
|
-
* @param {string} params.style - Style of devices list
|
|
35
|
-
* @returns {*[]} - Array of device cards
|
|
36
|
-
*/
|
|
37
|
-
class DeviceList extends Communication_1.default {
|
|
38
|
-
constructor(props) {
|
|
39
|
-
super(props);
|
|
40
|
-
this.aliveHandler = (id, state) => {
|
|
41
|
-
if (id === `system.adapter.${this.props.selectedInstance}.alive`) {
|
|
42
|
-
const alive = !!(state === null || state === void 0 ? void 0 : state.val);
|
|
43
|
-
if (alive !== this.state.alive) {
|
|
44
|
-
this.setState({ alive }, () => {
|
|
45
|
-
if (alive) {
|
|
46
|
-
this.componentDidMount().catch(console.error);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
if (!DeviceList.i18nInitialized) {
|
|
53
|
-
DeviceList.i18nInitialized = true;
|
|
54
|
-
// @ts-expect-error
|
|
55
|
-
i18n_1.default.extendTranslations({
|
|
56
|
-
en: en_json_1.default,
|
|
57
|
-
de: de_json_1.default,
|
|
58
|
-
ru: ru_json_1.default,
|
|
59
|
-
pt: pt_json_1.default,
|
|
60
|
-
nl: nl_json_1.default,
|
|
61
|
-
fr: fr_json_1.default,
|
|
62
|
-
it: it_json_1.default,
|
|
63
|
-
es: es_json_1.default,
|
|
64
|
-
pl: pl_json_1.default,
|
|
65
|
-
uk: uk_json_1.default,
|
|
66
|
-
'zh-cn': zh_cn_json_1.default,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
Object.assign(this.state, {
|
|
70
|
-
devices: [],
|
|
71
|
-
filteredDevices: [],
|
|
72
|
-
filter: '',
|
|
73
|
-
instanceInfo: null,
|
|
74
|
-
loading: null,
|
|
75
|
-
alive: null,
|
|
76
|
-
});
|
|
77
|
-
this.lastPropsFilter = this.props.filter;
|
|
78
|
-
this.lastInstance = this.props.selectedInstance;
|
|
79
|
-
this.filterTimeout = null;
|
|
80
|
-
this.language = i18n_1.default.getLanguage();
|
|
81
|
-
}
|
|
82
|
-
async componentDidMount() {
|
|
83
|
-
let alive = false;
|
|
84
|
-
if (this.state.alive === null) {
|
|
85
|
-
try {
|
|
86
|
-
// check if instance is alive
|
|
87
|
-
const stateAlive = await this.props.socket.getState(`system.adapter.${this.props.selectedInstance}.alive`);
|
|
88
|
-
if (stateAlive === null || stateAlive === void 0 ? void 0 : stateAlive.val) {
|
|
89
|
-
alive = true;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
console.error(error);
|
|
94
|
-
}
|
|
95
|
-
this.setState({ alive }, () => this.props.socket.subscribeState(`system.adapter.${this.props.selectedInstance}.alive`, this.aliveHandler));
|
|
96
|
-
if (!alive) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
alive = this.state.alive;
|
|
102
|
-
}
|
|
103
|
-
if (!this.props.embedded && alive) {
|
|
104
|
-
try {
|
|
105
|
-
const instanceInfo = await this.loadInstanceInfos();
|
|
106
|
-
this.setState({ instanceInfo });
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
console.error(error);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (alive) {
|
|
113
|
-
this.loadData();
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
componentWillUnmount() {
|
|
117
|
-
this.props.socket.unsubscribeState(`system.adapter.${this.props.selectedInstance}.alive`, this.aliveHandler);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Load devices
|
|
121
|
-
*/
|
|
122
|
-
loadData() {
|
|
123
|
-
this.setState({ loading: true }, async () => {
|
|
124
|
-
console.log(`Loading devices for ${this.props.selectedInstance}...`);
|
|
125
|
-
let devices;
|
|
126
|
-
try {
|
|
127
|
-
devices = await this.loadDevices();
|
|
128
|
-
if (!devices || !Array.isArray(devices)) {
|
|
129
|
-
console.error(`Message returned from sendTo() doesn't look like one from DeviceManagement, did you accidentally handle the message in your adapter? ${JSON.stringify(devices)}`);
|
|
130
|
-
devices = [];
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
catch (error) {
|
|
134
|
-
console.error(error);
|
|
135
|
-
devices = [];
|
|
136
|
-
}
|
|
137
|
-
this.setState({ devices, loading: false }, () => this.applyFilter());
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
getText(text) {
|
|
141
|
-
if (typeof text === 'object') {
|
|
142
|
-
return text[this.language] || text.en;
|
|
143
|
-
}
|
|
144
|
-
return text;
|
|
145
|
-
}
|
|
146
|
-
applyFilter() {
|
|
147
|
-
const filter = this.props.embedded ? this.props.filter : this.state.filter;
|
|
148
|
-
// filter devices name
|
|
149
|
-
if (filter) {
|
|
150
|
-
const filteredDevices = this.state.devices.filter(device => this.getText(device.name).toLowerCase().includes(filter.toLowerCase()));
|
|
151
|
-
this.setState({ filteredDevices });
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
this.setState({ filteredDevices: this.state.devices });
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
handleFilterChange(filter) {
|
|
158
|
-
this.setState({ filter }, () => {
|
|
159
|
-
this.filterTimeout && clearTimeout(this.filterTimeout);
|
|
160
|
-
this.filterTimeout = setTimeout(() => {
|
|
161
|
-
this.filterTimeout = null;
|
|
162
|
-
this.applyFilter();
|
|
163
|
-
}, 250);
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
renderContent() {
|
|
167
|
-
var _a, _b;
|
|
168
|
-
/** @type {object} */
|
|
169
|
-
const emptyStyle = {
|
|
170
|
-
padding: 25,
|
|
171
|
-
};
|
|
172
|
-
if (this.props.embedded && this.lastPropsFilter !== this.props.filter) {
|
|
173
|
-
this.lastPropsFilter = this.props.filter;
|
|
174
|
-
setTimeout(() => this.applyFilter(), 50);
|
|
175
|
-
}
|
|
176
|
-
if (this.props.embedded && this.lastInstance !== this.props.selectedInstance) {
|
|
177
|
-
this.lastInstance = this.props.selectedInstance;
|
|
178
|
-
setTimeout(() => this.loadData(), 50);
|
|
179
|
-
}
|
|
180
|
-
let list;
|
|
181
|
-
if (!this.props.embedded && !this.state.alive) {
|
|
182
|
-
list = react_1.default.createElement("div", { style: emptyStyle },
|
|
183
|
-
react_1.default.createElement("span", null, (0, Utils_1.getTranslation)('instanceNotAlive')));
|
|
184
|
-
}
|
|
185
|
-
else if (!this.state.devices.length && this.props.selectedInstance) {
|
|
186
|
-
list = react_1.default.createElement("div", { style: emptyStyle },
|
|
187
|
-
react_1.default.createElement("span", null, (0, Utils_1.getTranslation)('noDevicesFoundText')));
|
|
188
|
-
}
|
|
189
|
-
else if (this.state.devices.length && !this.state.filteredDevices.length) {
|
|
190
|
-
list = react_1.default.createElement("div", { style: emptyStyle },
|
|
191
|
-
react_1.default.createElement("span", null, (0, Utils_1.getTranslation)('allDevicesFilteredOut')));
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
list = this.state.filteredDevices.map(device => react_1.default.createElement(DeviceCard_1.default, { alive: !!this.state.alive, key: device.id, id: device.id, title: this.getText(device.name), device: device, instanceId: this.props.selectedInstance, uploadImagesToInstance: this.props.uploadImagesToInstance, deviceHandler: this.deviceHandler, controlHandler: this.controlHandler, controlStateHandler: this.controlStateHandler, socket: this.props.socket }));
|
|
195
|
-
}
|
|
196
|
-
if (this.props.embedded) {
|
|
197
|
-
return react_1.default.createElement(react_1.default.Fragment, null,
|
|
198
|
-
this.state.loading ? react_1.default.createElement(material_1.LinearProgress, { style: { width: '100%' } }) : null,
|
|
199
|
-
list);
|
|
200
|
-
}
|
|
201
|
-
return react_1.default.createElement("div", { style: { width: '100%', height: '100%', overflow: 'hidden' } },
|
|
202
|
-
react_1.default.createElement(material_1.Toolbar, { variant: "dense", style: { backgroundColor: '#777', display: 'flex' } },
|
|
203
|
-
this.props.title,
|
|
204
|
-
this.props.selectedInstance ? react_1.default.createElement(material_1.Tooltip, { title: (0, Utils_1.getTranslation)('refreshTooltip') },
|
|
205
|
-
react_1.default.createElement("span", null,
|
|
206
|
-
react_1.default.createElement(material_1.IconButton, { onClick: () => this.loadData(), disabled: !this.state.alive, size: "small" },
|
|
207
|
-
react_1.default.createElement(icons_material_1.Refresh, null)))) : null,
|
|
208
|
-
this.state.alive && ((_b = (_a = this.state.instanceInfo) === null || _a === void 0 ? void 0 : _a.actions) === null || _b === void 0 ? void 0 : _b.length) ? react_1.default.createElement("div", { style: { marginLeft: 20 } }, this.state.instanceInfo.actions.map(action => react_1.default.createElement(InstanceActionButton_1.default, { key: action.id, action: action, instanceHandler: this.instanceHandler }))) : null,
|
|
209
|
-
react_1.default.createElement("div", { style: { flexGrow: 1 } }),
|
|
210
|
-
this.state.alive ? react_1.default.createElement(material_1.TextField, { variant: "standard", style: { width: 200 }, size: "small", label: (0, Utils_1.getTranslation)('filterLabelText'), onChange: e => this.handleFilterChange(e.target.value), value: this.state.filter, autoComplete: "off", inputProps: {
|
|
211
|
-
autoComplete: 'new-password',
|
|
212
|
-
form: { autoComplete: 'off' },
|
|
213
|
-
},
|
|
214
|
-
// eslint-disable-next-line react/jsx-no-duplicate-props
|
|
215
|
-
InputProps: {
|
|
216
|
-
endAdornment: this.state.filter ? react_1.default.createElement(material_1.InputAdornment, { position: "end" },
|
|
217
|
-
react_1.default.createElement(material_1.IconButton, { onClick: () => this.handleFilterChange(''), edge: "end" },
|
|
218
|
-
react_1.default.createElement(icons_material_1.Clear, null))) : null,
|
|
219
|
-
} }) : null),
|
|
220
|
-
react_1.default.createElement("div", { style: Object.assign({ width: '100%', height: 'calc(100% - 56px)', marginTop: 8, overflow: 'auto' }, this.props.style) },
|
|
221
|
-
this.state.loading ? react_1.default.createElement(material_1.LinearProgress, { style: { width: '100%' } }) : null,
|
|
222
|
-
list));
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
DeviceList.i18nInitialized = false;
|
|
226
|
-
exports.default = DeviceList;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface DeviceStatusProps {
|
|
3
|
-
status: any;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Device Status component
|
|
7
|
-
* @param {object} params - Parameters
|
|
8
|
-
* @param {object} params.status - Status object, e.g. { connection: 'connected', battery: 100, rssi: -50 }
|
|
9
|
-
* @returns {React.JSX.Element|null}
|
|
10
|
-
* @constructor
|
|
11
|
-
*/
|
|
12
|
-
export default function DeviceStatus(params: DeviceStatusProps): React.JSX.Element | null;
|
|
13
|
-
export {};
|
|
@@ -1,111 +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
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
9
|
-
const Utils_1 = require("./Utils");
|
|
10
|
-
/**
|
|
11
|
-
* Device Status component
|
|
12
|
-
* @param {object} params - Parameters
|
|
13
|
-
* @param {object} params.status - Status object, e.g. { connection: 'connected', battery: 100, rssi: -50 }
|
|
14
|
-
* @returns {React.JSX.Element|null}
|
|
15
|
-
* @constructor
|
|
16
|
-
*/
|
|
17
|
-
function DeviceStatus(params) {
|
|
18
|
-
if (!params.status) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
let status;
|
|
22
|
-
if (typeof params.status === 'string') {
|
|
23
|
-
status = {
|
|
24
|
-
connection: params.status,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
status = params.status;
|
|
29
|
-
}
|
|
30
|
-
/** @type {object} */
|
|
31
|
-
const iconStyleOK = {
|
|
32
|
-
fill: '#00ac00',
|
|
33
|
-
};
|
|
34
|
-
/** @type {object} */
|
|
35
|
-
const iconStyleNotOK = {
|
|
36
|
-
fill: '#ff0000',
|
|
37
|
-
};
|
|
38
|
-
/** @type {object} */
|
|
39
|
-
const iconStyleWarning = {
|
|
40
|
-
fill: '#ff9900',
|
|
41
|
-
};
|
|
42
|
-
/** @type {object} */
|
|
43
|
-
let batteryIconTooltip;
|
|
44
|
-
if (typeof status.battery === 'number') {
|
|
45
|
-
if (status.battery >= 96 && status.battery <= 100) {
|
|
46
|
-
batteryIconTooltip = react_1.default.createElement(icons_material_1.BatteryFull, { style: iconStyleOK });
|
|
47
|
-
}
|
|
48
|
-
else if (status.battery >= 90 && status.battery <= 95) {
|
|
49
|
-
batteryIconTooltip = react_1.default.createElement(icons_material_1.Battery90, { style: iconStyleOK });
|
|
50
|
-
}
|
|
51
|
-
else if (status.battery >= 80 && status.battery <= 89) {
|
|
52
|
-
batteryIconTooltip = react_1.default.createElement(icons_material_1.Battery80, { style: iconStyleOK });
|
|
53
|
-
}
|
|
54
|
-
else if (status.battery >= 60 && status.battery <= 79) {
|
|
55
|
-
batteryIconTooltip = react_1.default.createElement(icons_material_1.Battery60, { style: iconStyleOK });
|
|
56
|
-
}
|
|
57
|
-
else if (status.battery >= 50 && status.battery <= 59) {
|
|
58
|
-
batteryIconTooltip = react_1.default.createElement(icons_material_1.Battery50, { style: iconStyleOK });
|
|
59
|
-
}
|
|
60
|
-
else if (status.battery >= 30 && status.battery <= 49) {
|
|
61
|
-
batteryIconTooltip = react_1.default.createElement(icons_material_1.Battery30, { style: iconStyleOK });
|
|
62
|
-
}
|
|
63
|
-
else if (status.battery >= 20 && status.battery <= 29) {
|
|
64
|
-
batteryIconTooltip = react_1.default.createElement(icons_material_1.Battery20, { style: iconStyleNotOK });
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
batteryIconTooltip = react_1.default.createElement(icons_material_1.BatteryAlert, { style: iconStyleNotOK });
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
|
71
|
-
status.connection === 'connected' && react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
|
72
|
-
react_1.default.createElement(material_1.Tooltip, { title: (0, Utils_1.getTranslation)('connectedIconTooltip') },
|
|
73
|
-
react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' } },
|
|
74
|
-
react_1.default.createElement(icons_material_1.Link, { style: iconStyleOK })))),
|
|
75
|
-
status.connection === 'disconnected' && react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
|
76
|
-
react_1.default.createElement(material_1.Tooltip, { title: (0, Utils_1.getTranslation)('disconnectedIconTooltip') },
|
|
77
|
-
react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' } },
|
|
78
|
-
react_1.default.createElement(icons_material_1.LinkOff, { style: iconStyleNotOK })))),
|
|
79
|
-
status.rssi && react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
|
80
|
-
react_1.default.createElement(material_1.Tooltip, { title: "RSSI" },
|
|
81
|
-
react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' } },
|
|
82
|
-
react_1.default.createElement(icons_material_1.NetworkCheck, null),
|
|
83
|
-
react_1.default.createElement("p", { style: { fontSize: 'small', margin: 0 } }, status.rssi)))),
|
|
84
|
-
typeof status.battery === 'number' && react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
|
85
|
-
react_1.default.createElement(material_1.Tooltip, { title: (0, Utils_1.getTranslation)('batteryTooltip') },
|
|
86
|
-
react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' } },
|
|
87
|
-
batteryIconTooltip,
|
|
88
|
-
react_1.default.createElement("p", { style: { fontSize: 'small', margin: 0 } },
|
|
89
|
-
status.battery,
|
|
90
|
-
"%")))),
|
|
91
|
-
typeof status.battery === 'string' && react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
|
92
|
-
react_1.default.createElement(material_1.Tooltip, { title: (0, Utils_1.getTranslation)('batteryTooltip') },
|
|
93
|
-
react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' } },
|
|
94
|
-
status.battery === 'charging' ? react_1.default.createElement(icons_material_1.BatteryCharging50, null) : react_1.default.createElement(icons_material_1.BatteryFull, null),
|
|
95
|
-
status.battery !== 'charging' ? (status.battery.includes('V') || status.battery.includes('mV') ?
|
|
96
|
-
react_1.default.createElement("p", { style: { fontSize: 'small', margin: 0 } }, status.battery) :
|
|
97
|
-
react_1.default.createElement("p", { style: { fontSize: 'small', margin: 0 } },
|
|
98
|
-
react_1.default.createElement("span", { style: { marginRight: 4 } }, status.battery),
|
|
99
|
-
"mV")) : null))),
|
|
100
|
-
typeof status.battery === 'boolean' && react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
|
|
101
|
-
react_1.default.createElement(material_1.Tooltip, { title: (0, Utils_1.getTranslation)('batteryTooltip') },
|
|
102
|
-
react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' } }, status.battery ? react_1.default.createElement(icons_material_1.BatteryFull, { style: iconStyleOK }) :
|
|
103
|
-
react_1.default.createElement(icons_material_1.BatteryAlert, { style: iconStyleNotOK })))),
|
|
104
|
-
status.warning && react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center' } }, typeof status.warning === 'string' || typeof status.warning === 'object' ?
|
|
105
|
-
react_1.default.createElement(material_1.Tooltip, { title: (0, Utils_1.getTranslation)(status.warning) },
|
|
106
|
-
react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' } },
|
|
107
|
-
react_1.default.createElement(icons_material_1.Warning, { style: iconStyleWarning }))) :
|
|
108
|
-
react_1.default.createElement("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center' } },
|
|
109
|
-
react_1.default.createElement(icons_material_1.Warning, { style: iconStyleWarning }))));
|
|
110
|
-
}
|
|
111
|
-
exports.default = DeviceStatus;
|
|
@@ -1,16 +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
|
-
const TooltipButton_1 = __importDefault(require("./TooltipButton"));
|
|
8
|
-
const Utils_1 = require("./Utils");
|
|
9
|
-
function InstanceActionButton(params) {
|
|
10
|
-
const { action, instanceHandler } = params;
|
|
11
|
-
const tooltip = (0, Utils_1.getTranslation)((action === null || action === void 0 ? void 0 : action.description) ? action.description : '');
|
|
12
|
-
const title = (0, Utils_1.getTranslation)((action === null || action === void 0 ? void 0 : action.title) ? action.title : '');
|
|
13
|
-
const icon = (0, Utils_1.renderIcon)(action);
|
|
14
|
-
return react_1.default.createElement(TooltipButton_1.default, { tooltip: tooltip, label: title, disabled: action.disabled, Icon: icon, onClick: instanceHandler(action) });
|
|
15
|
-
}
|
|
16
|
-
exports.default = InstanceActionButton;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Connection } from '@iobroker/socket-client';
|
|
3
|
-
interface JsonConfigProps {
|
|
4
|
-
instanceId: string;
|
|
5
|
-
socket: Connection;
|
|
6
|
-
schema: Record<string, any>;
|
|
7
|
-
data: Record<string, any>;
|
|
8
|
-
onChange: (data: Record<string, any>) => void;
|
|
9
|
-
}
|
|
10
|
-
export default function JsonConfig(props: JsonConfigProps): React.JSX.Element | null;
|
|
11
|
-
export {};
|
|
@@ -1,94 +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 JsonConfigComponent_1 = __importDefault(require("../../JsonConfigComponent"));
|
|
31
|
-
function JsonConfig(props) {
|
|
32
|
-
const { instanceId, socket, schema, data, onChange, } = props;
|
|
33
|
-
console.log('JsonConfig', props);
|
|
34
|
-
const [error, setError] = (0, react_1.useState)();
|
|
35
|
-
if (schema === undefined) {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
const [adapterName, instance] = instanceId.split('.', 2);
|
|
39
|
-
return react_1.default.createElement(react_1.default.Fragment, null,
|
|
40
|
-
error && react_1.default.createElement("div", null, error),
|
|
41
|
-
react_1.default.createElement(JsonConfigComponent_1.default, { socket: socket, adapterName: adapterName, instance: parseInt(instance), schema: schema, data: data, onError: setError, onChange: _data => onChange(_data), embedded: true }));
|
|
42
|
-
/*
|
|
43
|
-
JSON adapter config:
|
|
44
|
-
className={classes.scroll}
|
|
45
|
-
socket={socket}
|
|
46
|
-
theme={this.props.theme}
|
|
47
|
-
themeName={this.props.themeName}
|
|
48
|
-
themeType={this.props.themeType}
|
|
49
|
-
adapterName={this.props.adapterName}
|
|
50
|
-
instance={this.props.instance}
|
|
51
|
-
isFloatComma={this.props.isFloatComma}
|
|
52
|
-
dateFormat={this.props.dateFormat}
|
|
53
|
-
schema={this.state.schema}
|
|
54
|
-
common={this.state.common}
|
|
55
|
-
data={this.state.data}
|
|
56
|
-
updateData={this.state.updateData}
|
|
57
|
-
onError={(error) => this.setState({ error })}
|
|
58
|
-
onChange={(data, changed) => this.setState({ data, changed })}
|
|
59
|
-
customs={{ configCustomEasyAccess: ConfigCustomEasyAccess }}
|
|
60
|
-
Object custom:
|
|
61
|
-
instanceObj={instanceObj}
|
|
62
|
-
customObj={customObj}
|
|
63
|
-
custom={true}
|
|
64
|
-
className={ '' }
|
|
65
|
-
adapterName={adapter}
|
|
66
|
-
instance={parseInt(instance.split('.').pop(), 10) || 0}
|
|
67
|
-
socket={this.props.socket}
|
|
68
|
-
theme={this.props.theme}
|
|
69
|
-
themeName={this.props.themeName}
|
|
70
|
-
themeType={this.props.themeType}
|
|
71
|
-
multiEdit={this.props.objectIDs.length > 1}
|
|
72
|
-
|
|
73
|
-
schema={this.jsonConfigs[adapter].json}
|
|
74
|
-
data={data}
|
|
75
|
-
onError={error =>
|
|
76
|
-
this.setState({error}, () => this.props.onError && this.props.onError(error))}
|
|
77
|
-
onValueChange={(attr, value) => {
|
|
78
|
-
console.log(attr + ' => ' + value);
|
|
79
|
-
const newValues = JSON.parse(JSON.stringify(this.state.newValues));
|
|
80
|
-
newValues[instance] = newValues[instance] || {};
|
|
81
|
-
if (this.commonConfig[instance][attr] === value) {
|
|
82
|
-
delete newValues[instance][attr];
|
|
83
|
-
if (!Object.keys(newValues[instance]).length) {
|
|
84
|
-
delete newValues[instance];
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
newValues[instance][attr] = value;
|
|
88
|
-
}
|
|
89
|
-
this.setState({newValues, hasChanges: this.isChanged(newValues)}, () =>
|
|
90
|
-
this.props.onChange && this.props.onChange(this.state.hasChanges));
|
|
91
|
-
}}
|
|
92
|
-
*/
|
|
93
|
-
}
|
|
94
|
-
exports.default = JsonConfig;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface TooltipButtonProps {
|
|
3
|
-
tooltip?: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
Icon: React.JSX.Element | null;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
}
|
|
9
|
-
export default function TooltipButton(props: TooltipButtonProps): React.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,22 +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
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
function TooltipButton(props) {
|
|
9
|
-
const { tooltip, label, disabled, Icon, onClick } = props;
|
|
10
|
-
const text = !!label && react_1.default.createElement(material_1.Typography, { variant: "button", style: { marginLeft: 4 } }, label);
|
|
11
|
-
if (tooltip) {
|
|
12
|
-
return react_1.default.createElement(material_1.Tooltip, { title: tooltip },
|
|
13
|
-
react_1.default.createElement("span", null,
|
|
14
|
-
react_1.default.createElement(material_1.IconButton, { onClick: onClick, disabled: disabled, size: "small" },
|
|
15
|
-
Icon,
|
|
16
|
-
text)));
|
|
17
|
-
}
|
|
18
|
-
return react_1.default.createElement(material_1.IconButton, { onClick: onClick, disabled: disabled, size: "small" },
|
|
19
|
-
Icon,
|
|
20
|
-
text);
|
|
21
|
-
}
|
|
22
|
-
exports.default = TooltipButton;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ControlBase } from '@iobroker/dm-utils/build/types/base';
|
|
3
|
-
export declare function renderIcon(action: ControlBase, colors?: {
|
|
4
|
-
primary: string;
|
|
5
|
-
secondary: string;
|
|
6
|
-
}, value?: string | number | boolean | null): React.JSX.Element | null;
|
|
7
|
-
/**
|
|
8
|
-
* Get Translation
|
|
9
|
-
* @param {string | object} text - Text to translate
|
|
10
|
-
* @returns {string}
|
|
11
|
-
*/
|
|
12
|
-
export declare function getTranslation(text: ioBroker.StringOrTranslated): string;
|