@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,48 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { withStyles } from '@mui/styles';
|
|
4
|
-
|
|
5
|
-
import ConfigGeneric from './ConfigGeneric';
|
|
6
|
-
|
|
7
|
-
const styles = () => ({
|
|
8
|
-
fullWidth: {
|
|
9
|
-
height: '100%',
|
|
10
|
-
width: '100%',
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
class ConfigStaticImage extends ConfigGeneric {
|
|
15
|
-
renderItem() {
|
|
16
|
-
let src = this.props.schema.src;
|
|
17
|
-
if (src && !src.startsWith('.') &&
|
|
18
|
-
!src.startsWith('http') &&
|
|
19
|
-
!src.startsWith(`adapter/${this.props.adapterName}/`) &&
|
|
20
|
-
!src.startsWith(`./adapter/${this.props.adapterName}/`)
|
|
21
|
-
) {
|
|
22
|
-
src = `adapter/${this.props.adapterName}/${src}`;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26
|
-
return <img
|
|
27
|
-
className={this.props.classes.fullWidth}
|
|
28
|
-
src={src}
|
|
29
|
-
style={this.props.schema.href ? { cursor: 'pointer' } : {}}
|
|
30
|
-
onClick={this.props.schema.href ? () => this.props.schema.href && window.open(this.props.schema.href, '_blank') : null}
|
|
31
|
-
alt=""
|
|
32
|
-
/>;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
ConfigStaticImage.propTypes = {
|
|
37
|
-
socket: PropTypes.object.isRequired,
|
|
38
|
-
themeType: PropTypes.string,
|
|
39
|
-
themeName: PropTypes.string,
|
|
40
|
-
style: PropTypes.object,
|
|
41
|
-
className: PropTypes.string,
|
|
42
|
-
data: PropTypes.object.isRequired,
|
|
43
|
-
schema: PropTypes.object,
|
|
44
|
-
onError: PropTypes.func,
|
|
45
|
-
onChange: PropTypes.func,
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default withStyles(styles)(ConfigStaticImage);
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { withStyles } from '@mui/styles';
|
|
4
|
-
|
|
5
|
-
import { Button } from '@mui/material';
|
|
6
|
-
|
|
7
|
-
import { Utils } from '@iobroker/adapter-react-v5';
|
|
8
|
-
|
|
9
|
-
import ConfigGeneric from './ConfigGeneric';
|
|
10
|
-
|
|
11
|
-
const styles = theme => ({
|
|
12
|
-
fullWidth: {
|
|
13
|
-
height: '100%',
|
|
14
|
-
width: '100%',
|
|
15
|
-
},
|
|
16
|
-
link: {
|
|
17
|
-
textDecoration: 'underline',
|
|
18
|
-
color: theme.palette.mode === 'dark' ? '#4dabf5' : '#254e72',
|
|
19
|
-
cursor: 'pointer',
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
class ConfigStaticText extends ConfigGeneric {
|
|
24
|
-
renderItem(error, disabled) {
|
|
25
|
-
if (this.props.schema.button) {
|
|
26
|
-
const icon = this.getIcon();
|
|
27
|
-
return <Button
|
|
28
|
-
variant={this.props.schema.variant || undefined}
|
|
29
|
-
color={this.props.schema.color || 'grey'}
|
|
30
|
-
className={this.props.classes.fullWidth}
|
|
31
|
-
disabled={disabled}
|
|
32
|
-
startIcon={icon}
|
|
33
|
-
onClick={this.props.schema.href ? () => {
|
|
34
|
-
// calculate one more time just before call
|
|
35
|
-
const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;
|
|
36
|
-
href && window.open(href, '_blank');
|
|
37
|
-
} : null}
|
|
38
|
-
>
|
|
39
|
-
{this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}
|
|
40
|
-
</Button>;
|
|
41
|
-
}
|
|
42
|
-
let text = this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation);
|
|
43
|
-
if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {
|
|
44
|
-
text = Utils.renderTextWithA(text);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return <span
|
|
48
|
-
className={this.props.schema.href ? this.props.classes.link : ''}
|
|
49
|
-
onClick={this.props.schema.href ? () => {
|
|
50
|
-
// calculate one more time just before call
|
|
51
|
-
const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;
|
|
52
|
-
href && window.open(href, '_blank');
|
|
53
|
-
} : null}
|
|
54
|
-
>
|
|
55
|
-
{text}
|
|
56
|
-
</span>;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
ConfigStaticText.propTypes = {
|
|
61
|
-
socket: PropTypes.object.isRequired,
|
|
62
|
-
themeType: PropTypes.string,
|
|
63
|
-
themeName: PropTypes.string,
|
|
64
|
-
style: PropTypes.object,
|
|
65
|
-
className: PropTypes.string,
|
|
66
|
-
data: PropTypes.object.isRequired,
|
|
67
|
-
schema: PropTypes.object,
|
|
68
|
-
onError: PropTypes.func,
|
|
69
|
-
onChange: PropTypes.func,
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export default withStyles(styles)(ConfigStaticText);
|