@iobroker/json-config 6.17.13 → 6.17.14
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/package.json +27 -27
- package/src/JsonConfig.tsx +0 -710
- package/src/JsonConfigComponent/ChipInput.tsx +0 -752
- package/src/JsonConfigComponent/ConfigAccordion.tsx +0 -278
- package/src/JsonConfigComponent/ConfigAlive.tsx +0 -74
- package/src/JsonConfigComponent/ConfigAutocomplete.tsx +0 -108
- package/src/JsonConfigComponent/ConfigAutocompleteSendTo.tsx +0 -183
- package/src/JsonConfigComponent/ConfigCRON.jsx +0 -101
- package/src/JsonConfigComponent/ConfigCertCollection.tsx +0 -102
- package/src/JsonConfigComponent/ConfigCertificateSelect.tsx +0 -92
- package/src/JsonConfigComponent/ConfigCertificates.tsx +0 -202
- package/src/JsonConfigComponent/ConfigCheckLicense.jsx +0 -662
- package/src/JsonConfigComponent/ConfigCheckbox.tsx +0 -67
- package/src/JsonConfigComponent/ConfigChip.jsx +0 -81
- package/src/JsonConfigComponent/ConfigColor.tsx +0 -86
- package/src/JsonConfigComponent/ConfigCoordinates.tsx +0 -234
- package/src/JsonConfigComponent/ConfigCustom.tsx +0 -246
- package/src/JsonConfigComponent/ConfigDatePicker.tsx +0 -48
- package/src/JsonConfigComponent/ConfigDeviceManager.tsx +0 -33
- package/src/JsonConfigComponent/ConfigFile.jsx +0 -181
- package/src/JsonConfigComponent/ConfigFileSelector.jsx +0 -520
- package/src/JsonConfigComponent/ConfigFunc.jsx +0 -90
- package/src/JsonConfigComponent/ConfigGeneric.tsx +0 -1027
- package/src/JsonConfigComponent/ConfigIP.jsx +0 -96
- package/src/JsonConfigComponent/ConfigImageSendTo.jsx +0 -79
- package/src/JsonConfigComponent/ConfigImageUpload.jsx +0 -114
- package/src/JsonConfigComponent/ConfigInstanceSelect.jsx +0 -172
- package/src/JsonConfigComponent/ConfigInterface.jsx +0 -112
- package/src/JsonConfigComponent/ConfigJsonEditor.jsx +0 -103
- package/src/JsonConfigComponent/ConfigLanguage.tsx +0 -153
- package/src/JsonConfigComponent/ConfigLicense.jsx +0 -148
- package/src/JsonConfigComponent/ConfigNumber.tsx +0 -207
- package/src/JsonConfigComponent/ConfigObjectId.jsx +0 -113
- package/src/JsonConfigComponent/ConfigPanel.tsx +0 -360
- package/src/JsonConfigComponent/ConfigPassword.jsx +0 -160
- package/src/JsonConfigComponent/ConfigPattern.jsx +0 -50
- package/src/JsonConfigComponent/ConfigPort.tsx +0 -232
- package/src/JsonConfigComponent/ConfigRoom.jsx +0 -90
- package/src/JsonConfigComponent/ConfigSelect.jsx +0 -124
- package/src/JsonConfigComponent/ConfigSelectSendTo.tsx +0 -251
- package/src/JsonConfigComponent/ConfigSendto.tsx +0 -340
- package/src/JsonConfigComponent/ConfigSetState.jsx +0 -116
- package/src/JsonConfigComponent/ConfigSlider.jsx +0 -97
- package/src/JsonConfigComponent/ConfigStaticDivider.jsx +0 -51
- package/src/JsonConfigComponent/ConfigStaticHeader.jsx +0 -63
- package/src/JsonConfigComponent/ConfigStaticImage.jsx +0 -48
- package/src/JsonConfigComponent/ConfigStaticText.jsx +0 -72
- package/src/JsonConfigComponent/ConfigTable.tsx +0 -1040
- package/src/JsonConfigComponent/ConfigTabs.tsx +0 -150
- package/src/JsonConfigComponent/ConfigText.tsx +0 -188
- package/src/JsonConfigComponent/ConfigTextSendTo.tsx +0 -102
- package/src/JsonConfigComponent/ConfigTimePicker.tsx +0 -63
- package/src/JsonConfigComponent/ConfigTopic.jsx +0 -78
- package/src/JsonConfigComponent/ConfigUUID.tsx +0 -55
- package/src/JsonConfigComponent/ConfigUser.jsx +0 -104
- package/src/JsonConfigComponent/index.tsx +0 -435
- package/src/JsonConfigComponent/wrapper/Components/CustomModal.jsx +0 -145
- package/src/JsonConfigComponent/wrapper/Components/Editor.jsx +0 -65
- package/src/Utils.jsx +0 -1683
- package/src/index.tsx +0 -14
- package/src/types.d.ts +0 -372
|
@@ -1,65 +0,0 @@
|
|
|
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);
|