@iobroker/json-config 6.17.6 → 6.17.12
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/LICENSE +21 -21
- package/build/JsonConfig.d.ts +1 -1
- package/build/JsonConfig.js +18 -19
- package/build/JsonConfig.js.map +1 -1
- package/build/JsonConfigComponent/ChipInput.d.ts +89 -11
- package/build/JsonConfigComponent/ChipInput.js +48 -137
- package/build/JsonConfigComponent/ChipInput.js.map +1 -1
- package/build/JsonConfigComponent/ConfigAccordion.d.ts +7 -14
- package/build/JsonConfigComponent/ConfigAccordion.js +10 -21
- package/build/JsonConfigComponent/ConfigAccordion.js.map +1 -1
- package/build/JsonConfigComponent/ConfigAlive.d.ts +5 -1
- package/build/JsonConfigComponent/ConfigAlive.js +0 -1
- package/build/JsonConfigComponent/ConfigAlive.js.map +1 -1
- package/build/JsonConfigComponent/ConfigAutocomplete.d.ts +5 -29
- package/build/JsonConfigComponent/ConfigAutocomplete.js +7 -5
- package/build/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
- package/build/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +5 -14
- package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js +3 -3
- package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCRON.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigCertCollection.d.ts +7 -13
- package/build/JsonConfigComponent/ConfigCertCollection.js +8 -18
- package/build/JsonConfigComponent/ConfigCertCollection.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCertificateSelect.d.ts +7 -13
- package/build/JsonConfigComponent/ConfigCertificateSelect.js +5 -18
- package/build/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCertificates.d.ts +7 -13
- package/build/JsonConfigComponent/ConfigCertificates.js +7 -18
- package/build/JsonConfigComponent/ConfigCertificates.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCheckbox.d.ts +3 -11
- package/build/JsonConfigComponent/ConfigCheckbox.js +2 -2
- package/build/JsonConfigComponent/ConfigCheckbox.js.map +1 -1
- package/build/JsonConfigComponent/ConfigChip.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigColor.d.ts +13 -20
- package/build/JsonConfigComponent/ConfigColor.js +9 -23
- package/build/JsonConfigComponent/ConfigColor.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCoordinates.d.ts +8 -13
- package/build/JsonConfigComponent/ConfigCoordinates.js +29 -39
- package/build/JsonConfigComponent/ConfigCoordinates.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCustom.d.ts +4 -50
- package/build/JsonConfigComponent/ConfigCustom.js +0 -1
- package/build/JsonConfigComponent/ConfigCustom.js.map +1 -1
- package/build/JsonConfigComponent/ConfigDatePicker.d.ts +8 -3
- package/build/JsonConfigComponent/ConfigDatePicker.js +21 -13
- package/build/JsonConfigComponent/ConfigDatePicker.js.map +1 -1
- package/build/JsonConfigComponent/ConfigDeviceManager.d.ts +5 -1
- package/build/JsonConfigComponent/ConfigDeviceManager.js +1 -1
- package/build/JsonConfigComponent/ConfigDeviceManager.js.map +1 -1
- package/build/JsonConfigComponent/ConfigFile.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigFunc.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigGeneric.d.ts +46 -32
- package/build/JsonConfigComponent/ConfigGeneric.js +23 -12
- package/build/JsonConfigComponent/ConfigGeneric.js.map +1 -1
- package/build/JsonConfigComponent/ConfigIP.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigImageSendTo.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigInstanceSelect.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigInterface.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigJsonEditor.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigLanguage.d.ts +3 -2
- package/build/JsonConfigComponent/ConfigLanguage.js +2 -2
- package/build/JsonConfigComponent/ConfigLanguage.js.map +1 -1
- package/build/JsonConfigComponent/ConfigNumber.d.ts +3 -13
- package/build/JsonConfigComponent/ConfigNumber.js +2 -2
- package/build/JsonConfigComponent/ConfigNumber.js.map +1 -1
- package/build/JsonConfigComponent/ConfigObjectId.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigPanel.d.ts +7 -2
- package/build/JsonConfigComponent/ConfigPanel.js +5 -40
- package/build/JsonConfigComponent/ConfigPanel.js.map +1 -1
- package/build/JsonConfigComponent/ConfigPassword.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigPort.d.ts +6 -1
- package/build/JsonConfigComponent/ConfigPort.js +2 -3
- package/build/JsonConfigComponent/ConfigPort.js.map +1 -1
- package/build/JsonConfigComponent/ConfigRoom.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigSelect.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigSelectSendTo.d.ts +7 -16
- package/build/JsonConfigComponent/ConfigSelectSendTo.js +15 -61
- package/build/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
- package/build/JsonConfigComponent/ConfigSendto.d.ts +3 -20
- package/build/JsonConfigComponent/ConfigSendto.js +8 -8
- package/build/JsonConfigComponent/ConfigSendto.js.map +1 -1
- package/build/JsonConfigComponent/ConfigSetState.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigSlider.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigStaticDivider.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigStaticHeader.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigStaticImage.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigStaticText.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigTable.d.ts +4 -25
- package/build/JsonConfigComponent/ConfigTable.js +5 -4
- package/build/JsonConfigComponent/ConfigTable.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTabs.d.ts +8 -33
- package/build/JsonConfigComponent/ConfigTabs.js +10 -43
- package/build/JsonConfigComponent/ConfigTabs.js.map +1 -1
- package/build/JsonConfigComponent/ConfigText.d.ts +7 -13
- package/build/JsonConfigComponent/ConfigText.js +13 -18
- package/build/JsonConfigComponent/ConfigText.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTextSendTo.d.ts +7 -9
- package/build/JsonConfigComponent/ConfigTextSendTo.js +11 -21
- package/build/JsonConfigComponent/ConfigTextSendTo.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTimePicker.d.ts +9 -3
- package/build/JsonConfigComponent/ConfigTimePicker.js +28 -18
- package/build/JsonConfigComponent/ConfigTimePicker.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTopic.d.ts +1 -1
- package/build/JsonConfigComponent/ConfigUUID.d.ts +12 -13
- package/build/JsonConfigComponent/ConfigUUID.js +1 -6
- package/build/JsonConfigComponent/ConfigUUID.js.map +1 -1
- package/build/JsonConfigComponent/ConfigUser.d.ts +1 -1
- package/build/JsonConfigComponent/index.d.ts +66 -25
- package/build/JsonConfigComponent/index.js +48 -61
- package/build/JsonConfigComponent/index.js.map +1 -1
- package/build/index.d.ts +2 -2
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/package.json +27 -26
- package/src/JsonConfig.tsx +710 -0
- package/src/JsonConfigComponent/ChipInput.tsx +752 -0
- package/src/JsonConfigComponent/ConfigAccordion.tsx +278 -0
- package/src/JsonConfigComponent/ConfigAlive.tsx +74 -0
- package/src/JsonConfigComponent/ConfigAutocomplete.tsx +108 -0
- package/src/JsonConfigComponent/ConfigAutocompleteSendTo.tsx +183 -0
- package/src/JsonConfigComponent/ConfigCRON.jsx +101 -0
- package/src/JsonConfigComponent/ConfigCertCollection.tsx +102 -0
- package/src/JsonConfigComponent/ConfigCertificateSelect.tsx +92 -0
- package/src/JsonConfigComponent/ConfigCertificates.tsx +202 -0
- package/src/JsonConfigComponent/ConfigCheckLicense.jsx +662 -0
- package/src/JsonConfigComponent/ConfigCheckbox.tsx +67 -0
- package/src/JsonConfigComponent/ConfigChip.jsx +81 -0
- package/src/JsonConfigComponent/ConfigColor.tsx +86 -0
- package/src/JsonConfigComponent/ConfigCoordinates.tsx +234 -0
- package/src/JsonConfigComponent/ConfigCustom.tsx +246 -0
- package/src/JsonConfigComponent/ConfigDatePicker.tsx +48 -0
- package/src/JsonConfigComponent/ConfigDeviceManager.tsx +33 -0
- package/src/JsonConfigComponent/ConfigFile.jsx +181 -0
- package/src/JsonConfigComponent/ConfigFileSelector.jsx +520 -0
- package/src/JsonConfigComponent/ConfigFunc.jsx +90 -0
- package/src/JsonConfigComponent/ConfigGeneric.tsx +1027 -0
- package/src/JsonConfigComponent/ConfigIP.jsx +96 -0
- package/src/JsonConfigComponent/ConfigImageSendTo.jsx +79 -0
- package/src/JsonConfigComponent/ConfigImageUpload.jsx +114 -0
- package/src/JsonConfigComponent/ConfigInstanceSelect.jsx +172 -0
- package/src/JsonConfigComponent/ConfigInterface.jsx +112 -0
- package/src/JsonConfigComponent/ConfigJsonEditor.jsx +103 -0
- package/src/JsonConfigComponent/ConfigLanguage.tsx +153 -0
- package/src/JsonConfigComponent/ConfigLicense.jsx +148 -0
- package/src/JsonConfigComponent/ConfigNumber.tsx +207 -0
- package/src/JsonConfigComponent/ConfigObjectId.jsx +113 -0
- package/src/JsonConfigComponent/ConfigPanel.tsx +360 -0
- package/src/JsonConfigComponent/ConfigPassword.jsx +160 -0
- package/src/JsonConfigComponent/ConfigPattern.jsx +50 -0
- package/src/JsonConfigComponent/ConfigPort.tsx +232 -0
- package/src/JsonConfigComponent/ConfigRoom.jsx +90 -0
- package/src/JsonConfigComponent/ConfigSelect.jsx +124 -0
- package/src/JsonConfigComponent/ConfigSelectSendTo.tsx +251 -0
- package/src/JsonConfigComponent/ConfigSendto.tsx +340 -0
- package/src/JsonConfigComponent/ConfigSetState.jsx +116 -0
- package/src/JsonConfigComponent/ConfigSlider.jsx +97 -0
- package/src/JsonConfigComponent/ConfigStaticDivider.jsx +51 -0
- package/src/JsonConfigComponent/ConfigStaticHeader.jsx +63 -0
- package/src/JsonConfigComponent/ConfigStaticImage.jsx +48 -0
- package/src/JsonConfigComponent/ConfigStaticText.jsx +72 -0
- package/src/JsonConfigComponent/ConfigTable.tsx +1040 -0
- package/src/JsonConfigComponent/ConfigTabs.tsx +150 -0
- package/src/JsonConfigComponent/ConfigText.tsx +188 -0
- package/src/JsonConfigComponent/ConfigTextSendTo.tsx +102 -0
- package/src/JsonConfigComponent/ConfigTimePicker.tsx +63 -0
- package/src/JsonConfigComponent/ConfigTopic.jsx +78 -0
- package/src/JsonConfigComponent/ConfigUUID.tsx +55 -0
- package/src/JsonConfigComponent/ConfigUser.jsx +104 -0
- package/src/JsonConfigComponent/index.tsx +435 -0
- package/src/JsonConfigComponent/wrapper/Components/CustomModal.jsx +145 -0
- package/src/JsonConfigComponent/wrapper/Components/Editor.jsx +65 -0
- package/src/Utils.jsx +1683 -0
- package/src/index.tsx +14 -0
- package/src/types.d.ts +372 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { withStyles } from '@mui/styles';
|
|
4
|
+
|
|
5
|
+
import AceEditor from 'react-ace';
|
|
6
|
+
import 'ace-builds/src-min-noconflict/mode-json';
|
|
7
|
+
import 'ace-builds/src-min-noconflict/worker-json';
|
|
8
|
+
import 'ace-builds/src-min-noconflict/theme-clouds_midnight';
|
|
9
|
+
import 'ace-builds/src-min-noconflict/theme-chrome';
|
|
10
|
+
import 'ace-builds/src-min-noconflict/ext-language_tools';
|
|
11
|
+
|
|
12
|
+
const styles = {
|
|
13
|
+
jsonError: {
|
|
14
|
+
border: '1px solid red',
|
|
15
|
+
minHeight: 200,
|
|
16
|
+
},
|
|
17
|
+
jsonNoError: {
|
|
18
|
+
border: '1px solid #00000000',
|
|
19
|
+
minHeight: 200,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
class Editor extends Component {
|
|
24
|
+
render() {
|
|
25
|
+
return <AceEditor
|
|
26
|
+
className={this.props.error === true ? this.props.classes.jsonError : (this.props.error === false ? this.props.classes.jsonNoError : undefined)}
|
|
27
|
+
mode={this.props.mode || 'json'}
|
|
28
|
+
width="100%"
|
|
29
|
+
height="100%"
|
|
30
|
+
showPrintMargin={this.props.editValueMode}
|
|
31
|
+
showGutter={this.props.editValueMode}
|
|
32
|
+
highlightActiveLine={this.props.editValueMode}
|
|
33
|
+
defaultValue={this.props.defaultValue}
|
|
34
|
+
theme={this.props.themeType === 'dark' ? 'clouds_midnight' : 'chrome'}
|
|
35
|
+
value={this.props.value}
|
|
36
|
+
readOnly={!this.props.onChange}
|
|
37
|
+
onChange={newValue => this.props.onChange(newValue)}
|
|
38
|
+
name={this.props.name || 'UNIQUE_ID_OF_DIV1'}
|
|
39
|
+
fontSize={this.props.fontSize || 14}
|
|
40
|
+
setOptions={{
|
|
41
|
+
enableBasicAutocompletion: true,
|
|
42
|
+
enableLiveAutocompletion: true,
|
|
43
|
+
enableSnippets: true,
|
|
44
|
+
|
|
45
|
+
showLineNumbers: this.props.editValueMode,
|
|
46
|
+
tabSize: this.props.editValueMode ? 2 : undefined,
|
|
47
|
+
}}
|
|
48
|
+
editorProps={{ $blockScrolling: true }}
|
|
49
|
+
/>;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
Editor.propTypes = {
|
|
54
|
+
fontSize: PropTypes.number,
|
|
55
|
+
value: PropTypes.string,
|
|
56
|
+
defaultValue: PropTypes.string,
|
|
57
|
+
mode: PropTypes.string,
|
|
58
|
+
name: PropTypes.string,
|
|
59
|
+
onChange: PropTypes.func.isRequired,
|
|
60
|
+
themeType: PropTypes.string,
|
|
61
|
+
editValueMode: PropTypes.bool, // flag that indicates the "value edit mode"
|
|
62
|
+
error: PropTypes.bool,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default withStyles(styles)(Editor);
|