@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,193 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
|
-
var _styles = require("@mui/styles");
|
|
17
|
-
var _material = require("@mui/material");
|
|
18
|
-
var _iconsMaterial = require("@mui/icons-material");
|
|
19
|
-
var _i18n = _interopRequireDefault(require("./wrapper/i18n"));
|
|
20
|
-
var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
|
|
21
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
22
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
|
-
var styles = function styles(theme) {
|
|
24
|
-
return {
|
|
25
|
-
fullWidth: {
|
|
26
|
-
width: '100%',
|
|
27
|
-
display: 'inline-block'
|
|
28
|
-
},
|
|
29
|
-
halfWidth1: {
|
|
30
|
-
width: "calc(50% - ".concat(theme.spacing(0.5), ")"),
|
|
31
|
-
display: 'inline-block',
|
|
32
|
-
marginRight: theme.spacing(1)
|
|
33
|
-
},
|
|
34
|
-
halfWidth2: {
|
|
35
|
-
width: "calc(50% - ".concat(theme.spacing(0.5), ")"),
|
|
36
|
-
display: 'inline-block'
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
var PASSWORD_PLACEHOLDER = '____ppp____';
|
|
41
|
-
var ConfigPassword = /*#__PURE__*/function (_ConfigGeneric) {
|
|
42
|
-
(0, _inherits2["default"])(ConfigPassword, _ConfigGeneric);
|
|
43
|
-
var _super = _createSuper(ConfigPassword);
|
|
44
|
-
function ConfigPassword() {
|
|
45
|
-
(0, _classCallCheck2["default"])(this, ConfigPassword);
|
|
46
|
-
return _super.apply(this, arguments);
|
|
47
|
-
}
|
|
48
|
-
(0, _createClass2["default"])(ConfigPassword, [{
|
|
49
|
-
key: "componentDidMount",
|
|
50
|
-
value: function componentDidMount() {
|
|
51
|
-
(0, _get2["default"])((0, _getPrototypeOf2["default"])(ConfigPassword.prototype), "componentDidMount", this).call(this);
|
|
52
|
-
var value = _ConfigGeneric2["default"].getValue(this.props.data, this.props.attr);
|
|
53
|
-
this.setState({
|
|
54
|
-
_repeat: value ? PASSWORD_PLACEHOLDER : '',
|
|
55
|
-
_visible: false,
|
|
56
|
-
value: value ? PASSWORD_PLACEHOLDER : '',
|
|
57
|
-
_notEqual: false
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}, {
|
|
61
|
-
key: "onChangePassword",
|
|
62
|
-
value: function onChangePassword(password, repeatPassword) {
|
|
63
|
-
var _this = this;
|
|
64
|
-
if (password === undefined) {
|
|
65
|
-
password = this.state.value;
|
|
66
|
-
}
|
|
67
|
-
if (repeatPassword === undefined) {
|
|
68
|
-
repeatPassword = this.state._repeat;
|
|
69
|
-
}
|
|
70
|
-
var _notEqual = !!this.props.schema.repeat && repeatPassword !== password;
|
|
71
|
-
this.setState({
|
|
72
|
-
value: password,
|
|
73
|
-
_repeat: repeatPassword,
|
|
74
|
-
_notEqual: _notEqual
|
|
75
|
-
}, function () {
|
|
76
|
-
if (_notEqual) {
|
|
77
|
-
_this.onError(_this.props.attr, _i18n["default"].t('ra_Passwords are not equal!'));
|
|
78
|
-
} else {
|
|
79
|
-
_this.onError(_this.props.attr); // clear error
|
|
80
|
-
_this.onChange(_this.props.attr, password);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}, {
|
|
85
|
-
key: "renderItem",
|
|
86
|
-
value: function renderItem(error, disabled /* , defaultValue */) {
|
|
87
|
-
var _this2 = this;
|
|
88
|
-
if (this.state._notEqual === undefined) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
var password = /*#__PURE__*/_react["default"].createElement(_material.TextField, {
|
|
92
|
-
variant: "standard",
|
|
93
|
-
fullWidth: true,
|
|
94
|
-
type: this.state._visible && this.state.value !== PASSWORD_PLACEHOLDER ? 'text' : 'password',
|
|
95
|
-
value: this.state.value,
|
|
96
|
-
error: !!error || this.state._notEqual,
|
|
97
|
-
disabled: !!disabled,
|
|
98
|
-
onChange: function onChange(e) {
|
|
99
|
-
return _this2.onChangePassword(e.target.value);
|
|
100
|
-
},
|
|
101
|
-
label: this.getText(this.props.schema.label),
|
|
102
|
-
inputProps: {
|
|
103
|
-
autoComplete: 'new-password',
|
|
104
|
-
form: {
|
|
105
|
-
autoComplete: 'off'
|
|
106
|
-
},
|
|
107
|
-
maxLength: this.props.schema.maxLength || this.props.schema.max || undefined
|
|
108
|
-
},
|
|
109
|
-
helperText: this.state._notEqual ? _i18n["default"].t('ra_Passwords are not equal!') : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)
|
|
110
|
-
// eslint-disable-next-line react/jsx-no-duplicate-props
|
|
111
|
-
,
|
|
112
|
-
InputProps: {
|
|
113
|
-
endAdornment: this.state.value && this.state.value !== PASSWORD_PLACEHOLDER && this.props.schema.visible ? /*#__PURE__*/_react["default"].createElement(_material.InputAdornment, {
|
|
114
|
-
position: "end"
|
|
115
|
-
}, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
|
|
116
|
-
size: "large",
|
|
117
|
-
tabIndex: -1,
|
|
118
|
-
onClick: function onClick(e) {
|
|
119
|
-
e.preventDefault();
|
|
120
|
-
e.stopPropagation();
|
|
121
|
-
_this2.setState({
|
|
122
|
-
_visible: !_this2.state._visible
|
|
123
|
-
});
|
|
124
|
-
},
|
|
125
|
-
edge: "end"
|
|
126
|
-
}, this.state._visible ? /*#__PURE__*/_react["default"].createElement(_iconsMaterial.VisibilityOff, null) : /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Visibility, null))) : undefined
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
if (this.props.schema.repeat) {
|
|
130
|
-
var passwordRepeat = /*#__PURE__*/_react["default"].createElement(_material.TextField, {
|
|
131
|
-
variant: "standard",
|
|
132
|
-
fullWidth: true,
|
|
133
|
-
type: this.state._visible && this.state._repeat !== PASSWORD_PLACEHOLDER ? 'text' : 'password',
|
|
134
|
-
value: this.state._repeat,
|
|
135
|
-
error: !!error || this.state._notEqual,
|
|
136
|
-
disabled: !!disabled,
|
|
137
|
-
onChange: function onChange(e) {
|
|
138
|
-
return _this2.onChangePassword(undefined, e.target.value);
|
|
139
|
-
},
|
|
140
|
-
label: "".concat(this.getText(this.props.schema.label), " (").concat(_i18n["default"].t('ra_repeat'), ")"),
|
|
141
|
-
inputProps: {
|
|
142
|
-
autoComplete: 'new-password',
|
|
143
|
-
form: {
|
|
144
|
-
autoComplete: 'off'
|
|
145
|
-
},
|
|
146
|
-
maxLength: this.props.schema.maxLength || this.props.schema.max || undefined
|
|
147
|
-
},
|
|
148
|
-
helperText: this.state._notEqual ? _i18n["default"].t('ra_Passwords are not equal!') : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)
|
|
149
|
-
// eslint-disable-next-line react/jsx-no-duplicate-props
|
|
150
|
-
,
|
|
151
|
-
InputProps: {
|
|
152
|
-
endAdornment: this.state._repeat && this.state._repeat !== PASSWORD_PLACEHOLDER ? /*#__PURE__*/_react["default"].createElement(_material.InputAdornment, {
|
|
153
|
-
position: "end"
|
|
154
|
-
}, /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
|
|
155
|
-
size: "large",
|
|
156
|
-
tabIndex: -1,
|
|
157
|
-
onClick: function onClick(e) {
|
|
158
|
-
e.preventDefault();
|
|
159
|
-
e.stopPropagation();
|
|
160
|
-
_this2.setState({
|
|
161
|
-
_visible: !_this2.state._visible
|
|
162
|
-
});
|
|
163
|
-
},
|
|
164
|
-
edge: "end"
|
|
165
|
-
}, this.state._visible ? /*#__PURE__*/_react["default"].createElement(_iconsMaterial.VisibilityOff, null) : /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Visibility, null))) : undefined
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
169
|
-
className: this.props.classes.fullWidth
|
|
170
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
|
-
className: this.props.classes.halfWidth1
|
|
172
|
-
}, password), /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
|
-
className: this.props.classes.halfWidth2
|
|
174
|
-
}, passwordRepeat));
|
|
175
|
-
}
|
|
176
|
-
return password;
|
|
177
|
-
}
|
|
178
|
-
}]);
|
|
179
|
-
return ConfigPassword;
|
|
180
|
-
}(_ConfigGeneric2["default"]);
|
|
181
|
-
ConfigPassword.propTypes = {
|
|
182
|
-
socket: _propTypes["default"].object.isRequired,
|
|
183
|
-
themeType: _propTypes["default"].string,
|
|
184
|
-
themeName: _propTypes["default"].string,
|
|
185
|
-
style: _propTypes["default"].object,
|
|
186
|
-
className: _propTypes["default"].string,
|
|
187
|
-
data: _propTypes["default"].object.isRequired,
|
|
188
|
-
schema: _propTypes["default"].object,
|
|
189
|
-
onError: _propTypes["default"].func,
|
|
190
|
-
onChange: _propTypes["default"].func
|
|
191
|
-
};
|
|
192
|
-
var _default = exports["default"] = (0, _styles.withStyles)(styles)(ConfigPassword);
|
|
193
|
-
//# sourceMappingURL=ConfigPassword.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigPassword.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_material","_iconsMaterial","_i18n","_ConfigGeneric2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","theme","fullWidth","width","display","halfWidth1","concat","spacing","marginRight","halfWidth2","PASSWORD_PLACEHOLDER","ConfigPassword","_ConfigGeneric","_inherits2","_super","_classCallCheck2","_createClass2","key","value","componentDidMount","_get2","ConfigGeneric","getValue","props","data","attr","setState","_repeat","_visible","_notEqual","onChangePassword","password","repeatPassword","_this","undefined","state","schema","repeat","onError","I18n","t","onChange","renderItem","error","disabled","_this2","createElement","TextField","variant","type","target","label","getText","inputProps","autoComplete","form","maxLength","max","helperText","renderHelp","help","helpLink","noTranslation","InputProps","endAdornment","visible","InputAdornment","position","IconButton","size","tabIndex","onClick","preventDefault","stopPropagation","edge","VisibilityOff","Visibility","passwordRepeat","className","classes","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","style","func","_default","exports","withStyles"],"sources":["JsonConfigComponent/ConfigPassword.jsx"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withStyles } from '@mui/styles';\r\n\r\nimport {\r\n TextField,\r\n IconButton,\r\n InputAdornment,\r\n} from '@mui/material';\r\n\r\nimport { Visibility, VisibilityOff } from '@mui/icons-material';\r\n\r\nimport I18n from './wrapper/i18n';\r\n\r\nimport ConfigGeneric from './ConfigGeneric';\r\n\r\nconst styles = theme => ({\r\n fullWidth: {\r\n width: '100%',\r\n display: 'inline-block',\r\n },\r\n halfWidth1: {\r\n width: `calc(50% - ${theme.spacing(0.5)})`,\r\n display: 'inline-block',\r\n marginRight: theme.spacing(1),\r\n },\r\n halfWidth2: {\r\n width: `calc(50% - ${theme.spacing(0.5)})`,\r\n display: 'inline-block',\r\n },\r\n});\r\n\r\nconst PASSWORD_PLACEHOLDER = '____ppp____';\r\n\r\nclass ConfigPassword extends ConfigGeneric {\r\n componentDidMount() {\r\n super.componentDidMount();\r\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\r\n this.setState({\r\n _repeat: value ? PASSWORD_PLACEHOLDER : '',\r\n _visible: false,\r\n value: value ? PASSWORD_PLACEHOLDER : '',\r\n _notEqual: false,\r\n });\r\n }\r\n\r\n onChangePassword(password, repeatPassword) {\r\n if (password === undefined) {\r\n password = this.state.value;\r\n }\r\n if (repeatPassword === undefined) {\r\n repeatPassword = this.state._repeat;\r\n }\r\n const _notEqual = !!this.props.schema.repeat && repeatPassword !== password;\r\n this.setState({ value: password, _repeat: repeatPassword, _notEqual }, () => {\r\n if (_notEqual) {\r\n this.onError(this.props.attr, I18n.t('ra_Passwords are not equal!'));\r\n } else {\r\n this.onError(this.props.attr); // clear error\r\n this.onChange(this.props.attr, password);\r\n }\r\n });\r\n }\r\n\r\n renderItem(error, disabled /* , defaultValue */) {\r\n if (this.state._notEqual === undefined) {\r\n return null;\r\n }\r\n\r\n const password = <TextField\r\n variant=\"standard\"\r\n fullWidth\r\n type={this.state._visible && this.state.value !== PASSWORD_PLACEHOLDER ? 'text' : 'password'}\r\n value={this.state.value}\r\n error={!!error || this.state._notEqual}\r\n disabled={!!disabled}\r\n onChange={e => this.onChangePassword(e.target.value)}\r\n label={this.getText(this.props.schema.label)}\r\n inputProps={{\r\n autoComplete: 'new-password',\r\n form: { autoComplete: 'off' },\r\n maxLength: this.props.schema.maxLength || this.props.schema.max || undefined,\r\n }}\r\n helperText={this.state._notEqual ? I18n.t('ra_Passwords are not equal!') : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\r\n // eslint-disable-next-line react/jsx-no-duplicate-props\r\n InputProps={{\r\n endAdornment: this.state.value && this.state.value !== PASSWORD_PLACEHOLDER && this.props.schema.visible ? <InputAdornment position=\"end\">\r\n <IconButton\r\n size=\"large\"\r\n tabIndex={-1}\r\n onClick={e => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.setState({ _visible: !this.state._visible });\r\n }}\r\n edge=\"end\"\r\n >\r\n {this.state._visible ? <VisibilityOff /> : <Visibility />}\r\n </IconButton>\r\n </InputAdornment> : undefined,\r\n }}\r\n />;\r\n\r\n if (this.props.schema.repeat) {\r\n const passwordRepeat = <TextField\r\n variant=\"standard\"\r\n fullWidth\r\n type={this.state._visible && this.state._repeat !== PASSWORD_PLACEHOLDER ? 'text' : 'password'}\r\n value={this.state._repeat}\r\n error={!!error || this.state._notEqual}\r\n disabled={!!disabled}\r\n onChange={e => this.onChangePassword(undefined, e.target.value)}\r\n label={`${this.getText(this.props.schema.label)} (${I18n.t('ra_repeat')})`}\r\n inputProps={{\r\n autoComplete: 'new-password',\r\n form: { autoComplete: 'off' },\r\n maxLength: this.props.schema.maxLength || this.props.schema.max || undefined,\r\n }}\r\n helperText={this.state._notEqual ? I18n.t('ra_Passwords are not equal!') : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\r\n // eslint-disable-next-line react/jsx-no-duplicate-props\r\n InputProps={{\r\n endAdornment: this.state._repeat && this.state._repeat !== PASSWORD_PLACEHOLDER ? <InputAdornment position=\"end\">\r\n <IconButton\r\n size=\"large\"\r\n tabIndex={-1}\r\n onClick={e => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.setState({ _visible: !this.state._visible });\r\n }}\r\n edge=\"end\"\r\n >\r\n {this.state._visible ? <VisibilityOff /> : <Visibility />}\r\n </IconButton>\r\n </InputAdornment> : undefined,\r\n }}\r\n />;\r\n\r\n return <div className={this.props.classes.fullWidth}>\r\n <div className={this.props.classes.halfWidth1}>{password}</div>\r\n <div className={this.props.classes.halfWidth2}>{passwordRepeat}</div>\r\n </div>;\r\n }\r\n return password;\r\n }\r\n}\r\n\r\nConfigPassword.propTypes = {\r\n socket: PropTypes.object.isRequired,\r\n themeType: PropTypes.string,\r\n themeName: PropTypes.string,\r\n style: PropTypes.object,\r\n className: PropTypes.string,\r\n data: PropTypes.object.isRequired,\r\n schema: PropTypes.object,\r\n onError: PropTypes.func,\r\n onChange: PropTypes.func,\r\n};\r\n\r\nexport default withStyles(styles)(ConfigPassword);\r\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAMA,IAAAI,cAAA,GAAAJ,OAAA;AAEA,IAAAK,KAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEA,IAAAM,eAAA,GAAAP,sBAAA,CAAAC,OAAA;AAA4C,SAAAO,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,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nCC,SAAS,EAAEH,qBAAS,CAACI,MAAM;EAC3BC,SAAS,EAAEL,qBAAS,CAACI,MAAM;EAC3BE,KAAK,EAAEN,qBAAS,CAACC,MAAM;EACvBL,SAAS,EAAEI,qBAAS,CAACI,MAAM;EAC3B9D,IAAI,EAAE0D,qBAAS,CAACC,MAAM,CAACC,UAAU;EACjChD,MAAM,EAAE8C,qBAAS,CAACC,MAAM;EACxB7C,OAAO,EAAE4C,qBAAS,CAACO,IAAI;EACvBhD,QAAQ,EAAEyC,qBAAS,CAACO;AACxB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEa,IAAAC,kBAAU,EAAC5F,MAAM,CAAC,CAACW,cAAc,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export default ConfigPattern;
|
|
2
|
-
declare class ConfigPattern extends ConfigGeneric<import("./ConfigGeneric").ConfigGenericProps, import("./ConfigGeneric").ConfigGenericState> {
|
|
3
|
-
constructor(props: import("./ConfigGeneric").ConfigGenericProps);
|
|
4
|
-
renderItem(error: any, disabled: any): React.JSX.Element;
|
|
5
|
-
}
|
|
6
|
-
declare namespace ConfigPattern {
|
|
7
|
-
namespace propTypes {
|
|
8
|
-
let socket: PropTypes.Validator<object>;
|
|
9
|
-
let themeType: PropTypes.Requireable<string>;
|
|
10
|
-
let themeName: PropTypes.Requireable<string>;
|
|
11
|
-
let style: PropTypes.Requireable<object>;
|
|
12
|
-
let className: PropTypes.Requireable<string>;
|
|
13
|
-
let data: PropTypes.Validator<object>;
|
|
14
|
-
let schema: PropTypes.Requireable<object>;
|
|
15
|
-
let onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
|
-
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
import ConfigGeneric from './ConfigGeneric';
|
|
20
|
-
import React from 'react';
|
|
21
|
-
import PropTypes from 'prop-types';
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var _material = require("@mui/material");
|
|
16
|
-
var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
|
|
17
|
-
var _Utils = _interopRequireDefault(require("./wrapper/Components/Utils"));
|
|
18
|
-
var _IconCopy = _interopRequireDefault(require("./wrapper/icons/IconCopy"));
|
|
19
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
20
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
21
|
-
var ConfigPattern = /*#__PURE__*/function (_ConfigGeneric) {
|
|
22
|
-
(0, _inherits2["default"])(ConfigPattern, _ConfigGeneric);
|
|
23
|
-
var _super = _createSuper(ConfigPattern);
|
|
24
|
-
function ConfigPattern() {
|
|
25
|
-
(0, _classCallCheck2["default"])(this, ConfigPattern);
|
|
26
|
-
return _super.apply(this, arguments);
|
|
27
|
-
}
|
|
28
|
-
(0, _createClass2["default"])(ConfigPattern, [{
|
|
29
|
-
key: "renderItem",
|
|
30
|
-
value: function renderItem(error, disabled) {
|
|
31
|
-
var _this = this;
|
|
32
|
-
return /*#__PURE__*/_react["default"].createElement(_material.TextField, {
|
|
33
|
-
variant: "standard",
|
|
34
|
-
fullWidth: true,
|
|
35
|
-
disabled: !!disabled,
|
|
36
|
-
InputProps: {
|
|
37
|
-
endAdornment: this.props.schema.copyToClipboard ? /*#__PURE__*/_react["default"].createElement(_material.IconButton, {
|
|
38
|
-
size: "small",
|
|
39
|
-
onClick: function onClick() {
|
|
40
|
-
_Utils["default"].copyToClipboard(_this.getPattern(_this.props.schema.pattern));
|
|
41
|
-
window.alert('Copied');
|
|
42
|
-
}
|
|
43
|
-
}, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], null)) : undefined
|
|
44
|
-
},
|
|
45
|
-
value: this.getPattern(this.props.schema.pattern),
|
|
46
|
-
label: this.getText(this.props.schema.label),
|
|
47
|
-
helperText: this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}]);
|
|
51
|
-
return ConfigPattern;
|
|
52
|
-
}(_ConfigGeneric2["default"]);
|
|
53
|
-
ConfigPattern.propTypes = {
|
|
54
|
-
socket: _propTypes["default"].object.isRequired,
|
|
55
|
-
themeType: _propTypes["default"].string,
|
|
56
|
-
themeName: _propTypes["default"].string,
|
|
57
|
-
style: _propTypes["default"].object,
|
|
58
|
-
className: _propTypes["default"].string,
|
|
59
|
-
data: _propTypes["default"].object.isRequired,
|
|
60
|
-
schema: _propTypes["default"].object,
|
|
61
|
-
onError: _propTypes["default"].func,
|
|
62
|
-
onChange: _propTypes["default"].func
|
|
63
|
-
};
|
|
64
|
-
var _default = exports["default"] = ConfigPattern;
|
|
65
|
-
//# sourceMappingURL=ConfigPattern.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigPattern.js","names":["_react","_interopRequireDefault","require","_propTypes","_material","_ConfigGeneric2","_Utils","_IconCopy","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","ConfigPattern","_ConfigGeneric","_inherits2","_super","_classCallCheck2","_createClass2","key","value","renderItem","error","disabled","_this","createElement","TextField","variant","fullWidth","InputProps","endAdornment","props","schema","copyToClipboard","IconButton","size","onClick","Utils","getPattern","pattern","window","alert","undefined","label","getText","helperText","renderHelp","help","helpLink","noTranslation","ConfigGeneric","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","style","className","data","onError","func","onChange","_default","exports"],"sources":["JsonConfigComponent/ConfigPattern.jsx"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport {\r\n IconButton,\r\n TextField,\r\n} from '@mui/material';\r\n\r\nimport ConfigGeneric from './ConfigGeneric';\r\n\r\nimport Utils from './wrapper/Components/Utils';\r\nimport CopyIcon from './wrapper/icons/IconCopy';\r\n\r\nclass ConfigPattern extends ConfigGeneric {\r\n renderItem(error, disabled) {\r\n return <TextField\r\n variant=\"standard\"\r\n fullWidth\r\n disabled={!!disabled}\r\n InputProps={{\r\n endAdornment: this.props.schema.copyToClipboard ?\r\n <IconButton\r\n size=\"small\"\r\n onClick={() => {\r\n Utils.copyToClipboard(this.getPattern(this.props.schema.pattern));\r\n window.alert('Copied');\r\n }}\r\n >\r\n <CopyIcon />\r\n </IconButton>\r\n : undefined,\r\n }}\r\n value={this.getPattern(this.props.schema.pattern)}\r\n label={this.getText(this.props.schema.label)}\r\n helperText={this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}\r\n />;\r\n }\r\n}\r\n\r\nConfigPattern.propTypes = {\r\n socket: PropTypes.object.isRequired,\r\n themeType: PropTypes.string,\r\n themeName: PropTypes.string,\r\n style: PropTypes.object,\r\n className: PropTypes.string,\r\n data: PropTypes.object.isRequired,\r\n schema: PropTypes.object,\r\n onError: PropTypes.func,\r\n onChange: PropTypes.func,\r\n};\r\n\r\nexport default ConfigPattern;\r\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,eAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAgD,SAAAM,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA;AAAA,IAE1CC,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K,CAACC,MAAM,CAACgB,QAAQ,EAAE,IAAI,CAACjB,KAAK,CAACC,MAAM,CAACiB,aAAa;MAAE,CACpH,CAAC;IACN;EAAC;EAAA,OAAApC,aAAA;AAAA,EAvBuBqC,0BAAa;AA0BzCrC,aAAa,CAACsC,SAAS,GAAG;EACtBC,MAAM,EAAEC,qBAAS,CAACC,MAAM,CAACC,UAAU;EACnCC,SAAS,EAAEH,qBAAS,CAACI,MAAM;EAC3BC,SAAS,EAAEL,qBAAS,CAACI,MAAM;EAC3BE,KAAK,EAAEN,qBAAS,CAACC,MAAM;EACvBM,SAAS,EAAEP,qBAAS,CAACI,MAAM;EAC3BI,IAAI,EAAER,qBAAS,CAACC,MAAM,CAACC,UAAU;EACjCvB,MAAM,EAAEqB,qBAAS,CAACC,MAAM;EACxBQ,OAAO,EAAET,qBAAS,CAACU,IAAI;EACvBC,QAAQ,EAAEX,qBAAS,CAACU;AACxB,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEarD,aAAa"}
|
|
@@ -1,176 +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 styles_1 = require("@mui/styles");
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
const i18n_1 = __importDefault(require("./wrapper/i18n"));
|
|
10
|
-
const ConfigGeneric_1 = __importDefault(require("./ConfigGeneric"));
|
|
11
|
-
const styles = () => ({
|
|
12
|
-
indeterminate: {
|
|
13
|
-
opacity: 0.5,
|
|
14
|
-
},
|
|
15
|
-
control: {
|
|
16
|
-
flexDirection: 'row',
|
|
17
|
-
width: '100%',
|
|
18
|
-
},
|
|
19
|
-
warning: {
|
|
20
|
-
'& .Mui-error': {
|
|
21
|
-
color: 'orange',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
class ConfigPort extends ConfigGeneric_1.default {
|
|
26
|
-
async componentDidMount() {
|
|
27
|
-
super.componentDidMount();
|
|
28
|
-
let _value = ConfigGeneric_1.default.getValue(this.props.data, this.props.attr);
|
|
29
|
-
if (_value === null || _value === undefined) {
|
|
30
|
-
_value = '';
|
|
31
|
-
}
|
|
32
|
-
this.setState({ _value: _value.toString(), oldValue: _value.toString() });
|
|
33
|
-
// read all instances
|
|
34
|
-
const instances = await this.props.socket.getAdapterInstances();
|
|
35
|
-
const ownId = `system.adapter.${this.props.adapterName}.${this.props.instance}`;
|
|
36
|
-
const instanceObj = await this.props.socket.getObject(ownId);
|
|
37
|
-
const ownHostname = instanceObj === null || instanceObj === void 0 ? void 0 : instanceObj.common.host;
|
|
38
|
-
const ports = [];
|
|
39
|
-
instances
|
|
40
|
-
.forEach(instance => {
|
|
41
|
-
var _a, _b, _c, _d;
|
|
42
|
-
// ignore own instance and instances on another host
|
|
43
|
-
if (!instance || instance._id === ownId || instance.common.host !== ownHostname) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
// check port only if bind attribute is present too
|
|
47
|
-
if (!((_a = instance.native) === null || _a === void 0 ? void 0 : _a.bind)) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
// if let's encrypt is enabled and update is enabled, then add port to check
|
|
51
|
-
if ((instance === null || instance === void 0 ? void 0 : instance.native) &&
|
|
52
|
-
instance.native.secure &&
|
|
53
|
-
instance.native.leEnabled &&
|
|
54
|
-
instance.native.leUpdate) {
|
|
55
|
-
const port = parseInt(instance.native.leCheckPort || instance.native.lePort, 10);
|
|
56
|
-
port && ports.push({
|
|
57
|
-
name: `${instance._id.replace('system.adapter.', '')} (LE)`,
|
|
58
|
-
port,
|
|
59
|
-
v6bind: instance.native.bind.includes(':') ? instance.native.bind : instance.native.v6bind,
|
|
60
|
-
bind: instance.native.bind,
|
|
61
|
-
enabled: !!((_b = instance.common) === null || _b === void 0 ? void 0 : _b.enabled),
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
const port = parseInt((_c = instance === null || instance === void 0 ? void 0 : instance.native) === null || _c === void 0 ? void 0 : _c.port, 10);
|
|
65
|
-
if (port) {
|
|
66
|
-
ports.push({
|
|
67
|
-
name: instance._id.replace('system.adapter.', ''),
|
|
68
|
-
bind: instance.native.bind,
|
|
69
|
-
v6bind: instance.native.bind.includes(':') ? instance.native.bind : instance.native.v6bind,
|
|
70
|
-
port,
|
|
71
|
-
enabled: !!((_d = instance.common) === null || _d === void 0 ? void 0 : _d.enabled),
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
this.setState({ ports });
|
|
76
|
-
}
|
|
77
|
-
static getDerivedStateFromProps(props, state) {
|
|
78
|
-
const _value = ConfigGeneric_1.default.getValue(props.data, props.attr);
|
|
79
|
-
if (_value === null || _value === undefined ||
|
|
80
|
-
state.oldValue === null || state.oldValue === undefined ||
|
|
81
|
-
(_value.toString() !== parseInt(state._value, 10).toString() &&
|
|
82
|
-
_value.toString() !== state.oldValue.toString())) {
|
|
83
|
-
return { _value };
|
|
84
|
-
}
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
checkValue(value) {
|
|
88
|
-
if (value === null || value === undefined) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
const min = this.props.schema.min || 20;
|
|
92
|
-
const max = this.props.schema.max || 0xFFFF;
|
|
93
|
-
value = value.toString().trim();
|
|
94
|
-
const f = value === '' ? 0 : parseInt(value, 10);
|
|
95
|
-
if (value !== '' && Number.isNaN(f)) {
|
|
96
|
-
return 'ra_Not a number';
|
|
97
|
-
}
|
|
98
|
-
// eslint-disable-next-line no-restricted-properties
|
|
99
|
-
if (value !== '' && window.isFinite(Number(value))) {
|
|
100
|
-
if (f < min) {
|
|
101
|
-
return 'ra_Too small';
|
|
102
|
-
}
|
|
103
|
-
if (f > max) {
|
|
104
|
-
return 'ra_Too big';
|
|
105
|
-
}
|
|
106
|
-
if (value === '' || value === '-' || Number.isNaN(f)) {
|
|
107
|
-
return 'ra_Not a number';
|
|
108
|
-
}
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
return 'ra_Not a number';
|
|
112
|
-
}
|
|
113
|
-
renderItem(error, disabled) {
|
|
114
|
-
if (this.state.oldValue !== null && this.state.oldValue !== undefined) {
|
|
115
|
-
this.updateTimeout && clearTimeout(this.updateTimeout);
|
|
116
|
-
this.updateTimeout = setTimeout(() => {
|
|
117
|
-
this.updateTimeout = undefined;
|
|
118
|
-
this.setState({ oldValue: null });
|
|
119
|
-
}, 30);
|
|
120
|
-
}
|
|
121
|
-
else if (this.updateTimeout) {
|
|
122
|
-
clearTimeout(this.updateTimeout);
|
|
123
|
-
this.updateTimeout = undefined;
|
|
124
|
-
}
|
|
125
|
-
const min = this.props.schema.min || 20;
|
|
126
|
-
const max = this.props.schema.max || 0xFFFF;
|
|
127
|
-
let warning;
|
|
128
|
-
if (this.state.ports) {
|
|
129
|
-
const num = parseInt(this.state._value, 10);
|
|
130
|
-
// filter ports only with the same bind address
|
|
131
|
-
// todo: IPv6 (v6bind or '::/0')
|
|
132
|
-
const ports = this.state.ports.filter(item => !this.props.data.bind ||
|
|
133
|
-
this.props.data.bind === item.bind ||
|
|
134
|
-
this.props.data.bind === '0.0.0.0' ||
|
|
135
|
-
item.bind === '0.0.0.0');
|
|
136
|
-
let idx = ports.findIndex(item => item.port === num && item.enabled);
|
|
137
|
-
if (idx !== -1) {
|
|
138
|
-
error = i18n_1.default.t('ra_Port is already used by %s', this.state.ports[idx].name);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
idx = ports.findIndex(item => item.port === num && !item.enabled);
|
|
142
|
-
if (idx !== -1) {
|
|
143
|
-
warning = true;
|
|
144
|
-
error = i18n_1.default.t('ra_Port could be used by %s', this.state.ports[idx].name);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
if (!error && this.state._value !== null && this.state._value !== undefined) {
|
|
149
|
-
error = this.checkValue(this.state._value);
|
|
150
|
-
if (typeof error === 'string') {
|
|
151
|
-
error = i18n_1.default.t(error);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return react_1.default.createElement(material_1.TextField, { variant: "standard", type: "number", fullWidth: true, inputProps: {
|
|
155
|
-
min,
|
|
156
|
-
max,
|
|
157
|
-
readOnly: this.props.schema.readOnly || false,
|
|
158
|
-
}, value: this.state._value === null || this.state._value === undefined ? '' : this.state._value, error: !!error, disabled: !!disabled, className: warning ? this.props.classes.warning : '', onChange: e => {
|
|
159
|
-
const _value = Number(e.target.value.toString().replace(/[^0-9]/g, '')).toString();
|
|
160
|
-
const _error = this.checkValue(_value);
|
|
161
|
-
if (_error) {
|
|
162
|
-
this.onError(this.props.attr, i18n_1.default.t(_error));
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
this.onError(this.props.attr); // clear error
|
|
166
|
-
}
|
|
167
|
-
this.setState({ _value, oldValue: this.state._value }, () => {
|
|
168
|
-
if (_value.trim() === parseInt(_value, 10).toString()) {
|
|
169
|
-
this.onChange(this.props.attr, parseInt(_value, 10) || 0);
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
}, placeholder: this.getText(this.props.schema.placeholder), label: this.getText(this.props.schema.label), helperText: error && typeof error === 'string' ? error : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation) });
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
// @ts-expect-error check later on
|
|
176
|
-
exports.default = (0, styles_1.withStyles)(styles)(ConfigPort);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const _default: React.JSXElementConstructor<Omit<Pick<import("./ConfigGeneric").ConfigGenericProps, "changed" | "classes" | "disabled" | "data" | "onChange" | "onError" | "common" | "instance" | "originalData" | "instanceObj" | "customObj" | "schema" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "socket" | "adapterName" | "themeType"> & Pick<PropTypes.InferProps<{
|
|
2
|
-
socket: PropTypes.Validator<object>;
|
|
3
|
-
themeType: PropTypes.Requireable<string>;
|
|
4
|
-
themeName: PropTypes.Requireable<string>;
|
|
5
|
-
style: PropTypes.Requireable<object>;
|
|
6
|
-
className: PropTypes.Requireable<string>;
|
|
7
|
-
data: PropTypes.Validator<object>;
|
|
8
|
-
schema: PropTypes.Requireable<object>;
|
|
9
|
-
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
-
}>, "style" | "className" | "themeName"> & Pick<import("./ConfigGeneric").ConfigGenericProps, "changed" | "classes" | "disabled" | "common" | "instance" | "originalData" | "instanceObj" | "customObj" | "arrayIndex" | "globalData" | "registerOnForceUpdate" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "adapterName" | "commandRunning">, "classes"> & import("@mui/styles").StyledComponentProps<"fullWidth"> & object>;
|
|
12
|
-
export default _default;
|
|
13
|
-
import PropTypes from 'prop-types';
|
|
14
|
-
import React from 'react';
|