@iobroker/json-config 7.1.1 → 7.1.2
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/build/JsonConfig.d.ts +6 -10
- package/build/JsonConfig.js +30 -26
- package/build/JsonConfig.js.map +1 -1
- package/build/JsonConfigComponent/ChipInput.d.ts +13 -14
- package/build/JsonConfigComponent/ChipInput.js +26 -21
- package/build/JsonConfigComponent/ChipInput.js.map +1 -1
- package/build/JsonConfigComponent/ConfigAccordion.d.ts +4 -4
- package/build/JsonConfigComponent/ConfigAccordion.js +44 -38
- package/build/JsonConfigComponent/ConfigAccordion.js.map +1 -1
- package/build/JsonConfigComponent/ConfigAlive.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigAlive.js +17 -8
- package/build/JsonConfigComponent/ConfigAlive.js.map +1 -1
- package/build/JsonConfigComponent/ConfigAutocomplete.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigAutocomplete.js +13 -10
- package/build/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
- package/build/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js +31 -22
- package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCRON.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigCRON.js +5 -5
- package/build/JsonConfigComponent/ConfigCRON.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCertCollection.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigCertCollection.js +9 -9
- package/build/JsonConfigComponent/ConfigCertCollection.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCertificateSelect.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigCertificateSelect.js +6 -6
- package/build/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCertificates.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigCertificates.js +17 -14
- package/build/JsonConfigComponent/ConfigCertificates.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCheckLicense.d.ts +19 -7
- package/build/JsonConfigComponent/ConfigCheckLicense.js +34 -24
- package/build/JsonConfigComponent/ConfigCheckLicense.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCheckbox.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigCheckbox.js +19 -9
- package/build/JsonConfigComponent/ConfigCheckbox.js.map +1 -1
- package/build/JsonConfigComponent/ConfigChip.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigChip.js +20 -10
- package/build/JsonConfigComponent/ConfigChip.js.map +1 -1
- package/build/JsonConfigComponent/ConfigColor.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigColor.js +18 -11
- package/build/JsonConfigComponent/ConfigColor.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCoordinates.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigCoordinates.js +49 -41
- package/build/JsonConfigComponent/ConfigCoordinates.js.map +1 -1
- package/build/JsonConfigComponent/ConfigCustom.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigCustom.js +13 -13
- package/build/JsonConfigComponent/ConfigCustom.js.map +1 -1
- package/build/JsonConfigComponent/ConfigDatePicker.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigDatePicker.js +3 -3
- package/build/JsonConfigComponent/ConfigDatePicker.js.map +1 -1
- package/build/JsonConfigComponent/ConfigDeviceManager.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigDeviceManager.js +2 -2
- package/build/JsonConfigComponent/ConfigDeviceManager.js.map +1 -1
- package/build/JsonConfigComponent/ConfigFile.d.ts +8 -5
- package/build/JsonConfigComponent/ConfigFile.js +16 -15
- package/build/JsonConfigComponent/ConfigFile.js.map +1 -1
- package/build/JsonConfigComponent/ConfigFileSelector.d.ts +4 -4
- package/build/JsonConfigComponent/ConfigFileSelector.js +66 -47
- package/build/JsonConfigComponent/ConfigFileSelector.js.map +1 -1
- package/build/JsonConfigComponent/ConfigFunc.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigFunc.js +8 -10
- package/build/JsonConfigComponent/ConfigFunc.js.map +1 -1
- package/build/JsonConfigComponent/ConfigGeneric.d.ts +7 -7
- package/build/JsonConfigComponent/ConfigGeneric.js +35 -38
- package/build/JsonConfigComponent/ConfigGeneric.js.map +1 -1
- package/build/JsonConfigComponent/ConfigIP.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigIP.js +10 -11
- package/build/JsonConfigComponent/ConfigIP.js.map +1 -1
- package/build/JsonConfigComponent/ConfigImageSendTo.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigImageSendTo.js +6 -5
- package/build/JsonConfigComponent/ConfigImageSendTo.js.map +1 -1
- package/build/JsonConfigComponent/ConfigImageUpload.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigImageUpload.js +23 -12
- package/build/JsonConfigComponent/ConfigImageUpload.js.map +1 -1
- package/build/JsonConfigComponent/ConfigInstanceSelect.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigInstanceSelect.js +37 -23
- package/build/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -1
- package/build/JsonConfigComponent/ConfigInterface.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigInterface.js +20 -20
- package/build/JsonConfigComponent/ConfigInterface.js.map +1 -1
- package/build/JsonConfigComponent/ConfigJsonEditor.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigJsonEditor.js +10 -8
- package/build/JsonConfigComponent/ConfigJsonEditor.js.map +1 -1
- package/build/JsonConfigComponent/ConfigLanguage.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigLanguage.js +17 -9
- package/build/JsonConfigComponent/ConfigLanguage.js.map +1 -1
- package/build/JsonConfigComponent/ConfigLicense.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigLicense.js +29 -14
- package/build/JsonConfigComponent/ConfigLicense.js.map +1 -1
- package/build/JsonConfigComponent/ConfigNumber.d.ts +3 -5
- package/build/JsonConfigComponent/ConfigNumber.js +12 -9
- package/build/JsonConfigComponent/ConfigNumber.js.map +1 -1
- package/build/JsonConfigComponent/ConfigObjectId.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigObjectId.js +6 -6
- package/build/JsonConfigComponent/ConfigObjectId.js.map +1 -1
- package/build/JsonConfigComponent/ConfigPanel.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigPanel.js +48 -44
- package/build/JsonConfigComponent/ConfigPanel.js.map +1 -1
- package/build/JsonConfigComponent/ConfigPassword.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigPassword.js +24 -13
- package/build/JsonConfigComponent/ConfigPassword.js.map +1 -1
- package/build/JsonConfigComponent/ConfigPattern.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigPattern.js +8 -8
- package/build/JsonConfigComponent/ConfigPattern.js.map +1 -1
- package/build/JsonConfigComponent/ConfigPort.d.ts +3 -5
- package/build/JsonConfigComponent/ConfigPort.js +20 -16
- package/build/JsonConfigComponent/ConfigPort.js.map +1 -1
- package/build/JsonConfigComponent/ConfigQrCode.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigQrCode.js +2 -2
- package/build/JsonConfigComponent/ConfigQrCode.js.map +1 -1
- package/build/JsonConfigComponent/ConfigRoom.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigRoom.js +11 -10
- package/build/JsonConfigComponent/ConfigRoom.js.map +1 -1
- package/build/JsonConfigComponent/ConfigSelect.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigSelect.js +16 -10
- package/build/JsonConfigComponent/ConfigSelect.js.map +1 -1
- package/build/JsonConfigComponent/ConfigSelectSendTo.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigSelectSendTo.js +34 -28
- package/build/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
- package/build/JsonConfigComponent/ConfigSendto.d.ts +5 -5
- package/build/JsonConfigComponent/ConfigSendto.js +34 -22
- package/build/JsonConfigComponent/ConfigSendto.js.map +1 -1
- package/build/JsonConfigComponent/ConfigSetState.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigSetState.js +7 -6
- package/build/JsonConfigComponent/ConfigSetState.js.map +1 -1
- package/build/JsonConfigComponent/ConfigSlider.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigSlider.js +7 -5
- package/build/JsonConfigComponent/ConfigSlider.js.map +1 -1
- package/build/JsonConfigComponent/ConfigState.d.ts +3 -3
- package/build/JsonConfigComponent/ConfigState.js +64 -55
- package/build/JsonConfigComponent/ConfigState.js.map +1 -1
- package/build/JsonConfigComponent/ConfigStaticDivider.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigStaticDivider.js +10 -8
- package/build/JsonConfigComponent/ConfigStaticDivider.js.map +1 -1
- package/build/JsonConfigComponent/ConfigStaticHeader.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigStaticHeader.js +6 -6
- package/build/JsonConfigComponent/ConfigStaticHeader.js.map +1 -1
- package/build/JsonConfigComponent/ConfigStaticImage.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigStaticImage.js +6 -4
- package/build/JsonConfigComponent/ConfigStaticImage.js.map +1 -1
- package/build/JsonConfigComponent/ConfigStaticText.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigStaticText.js +33 -26
- package/build/JsonConfigComponent/ConfigStaticText.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTable.d.ts +6 -6
- package/build/JsonConfigComponent/ConfigTable.js +122 -100
- package/build/JsonConfigComponent/ConfigTable.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTabs.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigTabs.js +6 -5
- package/build/JsonConfigComponent/ConfigTabs.js.map +1 -1
- package/build/JsonConfigComponent/ConfigText.d.ts +3 -5
- package/build/JsonConfigComponent/ConfigText.js +24 -19
- package/build/JsonConfigComponent/ConfigText.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTextSendTo.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigTextSendTo.js +18 -15
- package/build/JsonConfigComponent/ConfigTextSendTo.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTimePicker.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigTimePicker.js +7 -4
- package/build/JsonConfigComponent/ConfigTimePicker.js.map +1 -1
- package/build/JsonConfigComponent/ConfigTopic.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigTopic.js +3 -3
- package/build/JsonConfigComponent/ConfigTopic.js.map +1 -1
- package/build/JsonConfigComponent/ConfigUUID.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigUUID.js +6 -6
- package/build/JsonConfigComponent/ConfigUUID.js.map +1 -1
- package/build/JsonConfigComponent/ConfigUser.d.ts +2 -2
- package/build/JsonConfigComponent/ConfigUser.js +25 -19
- package/build/JsonConfigComponent/ConfigUser.js.map +1 -1
- package/build/JsonConfigComponent/Icons.d.ts +2 -2
- package/build/JsonConfigComponent/Icons.js +1 -1
- package/build/JsonConfigComponent/Icons.js.map +1 -1
- package/build/JsonConfigComponent/index.d.ts +7 -10
- package/build/JsonConfigComponent/index.js +14 -11
- package/build/JsonConfigComponent/index.js.map +1 -1
- package/build/JsonConfigComponent/wrapper/Components/CustomModal.d.ts +3 -3
- package/build/JsonConfigComponent/wrapper/Components/CustomModal.js +10 -10
- package/build/JsonConfigComponent/wrapper/Components/CustomModal.js.map +1 -1
- package/build/JsonConfigComponent/wrapper/Components/Editor.d.ts +2 -2
- package/build/JsonConfigComponent/wrapper/Components/Editor.js +3 -3
- package/build/JsonConfigComponent/wrapper/Components/Editor.js.map +1 -1
- package/build/Utils.js +74 -60
- package/build/Utils.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/types.d.ts +173 -43
- package/package.json +26 -25
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, {} from 'react';
|
|
2
2
|
import { Autocomplete, TextField } from '@mui/material';
|
|
3
3
|
import { I18n } from '@iobroker/adapter-react-v5';
|
|
4
4
|
import ConfigGeneric, {} from './ConfigGeneric';
|
|
@@ -7,34 +7,39 @@ class ConfigAutocompleteSendTo extends ConfigGeneric {
|
|
|
7
7
|
_context;
|
|
8
8
|
askInstance() {
|
|
9
9
|
const value = ConfigGeneric.getValue(this.props.data, this.props.attr);
|
|
10
|
-
const selectOptions = this.props.schema.options
|
|
11
|
-
this.props.schema.options.map((item) =>
|
|
12
|
-
:
|
|
13
|
-
[];
|
|
10
|
+
const selectOptions = this.props.schema.options
|
|
11
|
+
? this.props.schema.options.map((item) => typeof item === 'string' ? { label: item, value: item } : JSON.parse(JSON.stringify(item)))
|
|
12
|
+
: [];
|
|
14
13
|
if (this.props.alive) {
|
|
15
14
|
let data = this.props.schema.data;
|
|
16
15
|
if (data === undefined && this.props.schema.jsonData) {
|
|
17
|
-
|
|
16
|
+
const dataStr = this.getPattern(this.props.schema.jsonData);
|
|
18
17
|
try {
|
|
19
|
-
if (typeof
|
|
20
|
-
data = JSON.parse(
|
|
18
|
+
if (typeof dataStr === 'string') {
|
|
19
|
+
data = JSON.parse(dataStr);
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
catch {
|
|
24
|
-
console.error(`Cannot parse json data: ${data}`);
|
|
23
|
+
console.error(`Cannot parse json data: ${JSON.stringify(data)}`);
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
if (data === undefined) {
|
|
28
27
|
data = null;
|
|
29
28
|
}
|
|
30
|
-
this.props.socket
|
|
29
|
+
void this.props.socket
|
|
30
|
+
.sendTo(`${this.props.adapterName}.${this.props.instance}`, this.props.schema.command || 'send', data)
|
|
31
31
|
.then((list) => {
|
|
32
32
|
if (list && Array.isArray(list)) {
|
|
33
|
-
list.forEach(item => selectOptions.push(typeof item === 'string'
|
|
33
|
+
list.forEach(item => selectOptions.push(typeof item === 'string'
|
|
34
|
+
? { label: item, value: item }
|
|
35
|
+
: JSON.parse(JSON.stringify(item))));
|
|
34
36
|
}
|
|
35
37
|
// if __different
|
|
36
38
|
if (Array.isArray(value)) {
|
|
37
|
-
selectOptions.unshift({
|
|
39
|
+
selectOptions.unshift({
|
|
40
|
+
label: I18n.t(ConfigGeneric.DIFFERENT_LABEL),
|
|
41
|
+
value: ConfigGeneric.DIFFERENT_VALUE,
|
|
42
|
+
});
|
|
38
43
|
this.setState({ value: ConfigGeneric.DIFFERENT_VALUE, selectOptions });
|
|
39
44
|
}
|
|
40
45
|
else {
|
|
@@ -44,7 +49,10 @@ class ConfigAutocompleteSendTo extends ConfigGeneric {
|
|
|
44
49
|
}
|
|
45
50
|
else if (Array.isArray(value)) {
|
|
46
51
|
// if __different
|
|
47
|
-
selectOptions.unshift({
|
|
52
|
+
selectOptions.unshift({
|
|
53
|
+
label: I18n.t(ConfigGeneric.DIFFERENT_LABEL),
|
|
54
|
+
value: ConfigGeneric.DIFFERENT_VALUE,
|
|
55
|
+
});
|
|
48
56
|
this.setState({ value: ConfigGeneric.DIFFERENT_VALUE, selectOptions });
|
|
49
57
|
}
|
|
50
58
|
else {
|
|
@@ -54,7 +62,7 @@ class ConfigAutocompleteSendTo extends ConfigGeneric {
|
|
|
54
62
|
getContext() {
|
|
55
63
|
const context = {};
|
|
56
64
|
if (Array.isArray(this.props.schema.alsoDependsOn)) {
|
|
57
|
-
this.props.schema.alsoDependsOn.forEach(attr => context[attr] = ConfigGeneric.getValue(this.props.data, attr));
|
|
65
|
+
this.props.schema.alsoDependsOn.forEach(attr => (context[attr] = ConfigGeneric.getValue(this.props.data, attr)));
|
|
58
66
|
}
|
|
59
67
|
return JSON.stringify(context);
|
|
60
68
|
}
|
|
@@ -78,9 +86,10 @@ class ConfigAutocompleteSendTo extends ConfigGeneric {
|
|
|
78
86
|
options.unshift(item);
|
|
79
87
|
}
|
|
80
88
|
else {
|
|
81
|
-
item =
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
item =
|
|
90
|
+
this.state.value !== null &&
|
|
91
|
+
this.state.value !== undefined &&
|
|
92
|
+
options.find((item) => item.value == this.state.value); // let "==" be and not ===
|
|
84
93
|
if (this.state.value !== null && this.state.value !== undefined && !item && this.props.schema.freeSolo) {
|
|
85
94
|
item = { value: this.state.value, label: this.state.value };
|
|
86
95
|
options.push(item);
|
|
@@ -88,16 +97,16 @@ class ConfigAutocompleteSendTo extends ConfigGeneric {
|
|
|
88
97
|
item = item || null;
|
|
89
98
|
}
|
|
90
99
|
if (!options.length) {
|
|
91
|
-
return React.createElement(TextField, { variant: "standard", fullWidth: true, value: this.state.value === null || this.state.value === undefined ? '' : this.state.value, error: !!error, disabled: disabled, slotProps: {
|
|
100
|
+
return (React.createElement(TextField, { variant: "standard", fullWidth: true, value: this.state.value === null || this.state.value === undefined ? '' : this.state.value, error: !!error, disabled: disabled, slotProps: {
|
|
92
101
|
htmlInput: {
|
|
93
102
|
maxLength: this.props.schema.maxLength || this.props.schema.max || undefined,
|
|
94
103
|
},
|
|
95
104
|
}, onChange: e => {
|
|
96
105
|
const value = e.target.value;
|
|
97
106
|
this.setState({ value }, () => this.onChange(this.props.attr, (value || '').trim()));
|
|
98
|
-
}, placeholder: this.getText(this.props.schema.placeholder), label: this.getText(this.props.schema.label), helperText: this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation) });
|
|
107
|
+
}, placeholder: this.getText(this.props.schema.placeholder), label: this.getText(this.props.schema.label), helperText: this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation) }));
|
|
99
108
|
}
|
|
100
|
-
return React.createElement(Autocomplete, { value: item, fullWidth: true, freeSolo: !!this.props.schema.freeSolo, options: options,
|
|
109
|
+
return (React.createElement(Autocomplete, { value: item, fullWidth: true, freeSolo: !!this.props.schema.freeSolo, options: options,
|
|
101
110
|
// autoComplete
|
|
102
111
|
getOptionLabel: option => option?.label ?? '', onInputChange: e => {
|
|
103
112
|
if (!e || !this.props.schema.freeSolo) {
|
|
@@ -112,10 +121,10 @@ class ConfigAutocompleteSendTo extends ConfigGeneric {
|
|
|
112
121
|
if (val !== this.state.value) {
|
|
113
122
|
this.setState({ value: val }, () => this.onChange(this.props.attr, val));
|
|
114
123
|
}
|
|
115
|
-
}, renderInput: params => React.createElement(TextField, { variant: "standard", ...params,
|
|
124
|
+
}, renderInput: params => (React.createElement(TextField, { variant: "standard", ...params,
|
|
116
125
|
// inputProps are important and will be given in params
|
|
117
126
|
// inputProps={{maxLength: this.props.schema.maxLength || this.props.schema.max || undefined}}
|
|
118
|
-
error: !!error, placeholder: this.getText(this.props.schema.placeholder), label: this.getText(this.props.schema.label), helperText: this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation), disabled: disabled }) });
|
|
127
|
+
error: !!error, placeholder: this.getText(this.props.schema.placeholder), label: this.getText(this.props.schema.label), helperText: this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation), disabled: disabled })) }));
|
|
119
128
|
}
|
|
120
129
|
}
|
|
121
130
|
export default ConfigAutocompleteSendTo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigAutocompleteSendTo.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigAutocompleteSendTo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigAutocompleteSendTo.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigAutocompleteSendTo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGlD,OAAO,aAAa,EAAE,EAA2B,MAAM,iBAAiB,CAAC;AAOzE,MAAM,wBAAyB,SAAQ,aAAqE;IAChG,WAAW,GAAG,KAAK,CAAC;IAEpB,QAAQ,CAAqB;IAErC,WAAW;QACP,MAAM,KAAK,GAAG,aAAa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CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAC3E,IAAI,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;oBAC3B,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;gBAC7E,CAAC;YACL,CAAC,EACD,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC,CACnB,oBAAC,SAAS,IACN,OAAO,EAAC,UAAU,KACd,MAAM;gBACV,uDAAuD;gBACvD,8FAA8F;gBAC9F,KAAK,EAAE,CAAC,CAAC,KAAK,EACd,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,EACxD,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAC5C,UAAU,EAAE,IAAI,CAAC,UAAU,CACvB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EACtB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAC1B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAClC,EACD,QAAQ,EAAE,QAAQ,GACpB,CACL,GACH,CACL,CAAC;IACN,CAAC;CACJ;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import type { ConfigItemCRON } from '#JC/types';
|
|
3
3
|
import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
|
|
4
4
|
interface ConfigCRONProps extends ConfigGenericProps {
|
|
@@ -8,7 +8,7 @@ interface ConfigCRONState extends ConfigGenericState {
|
|
|
8
8
|
showDialog?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare class ConfigCRON extends ConfigGeneric<ConfigCRONProps, ConfigCRONState> {
|
|
11
|
-
componentDidMount():
|
|
12
|
-
renderItem(error: string, disabled: boolean):
|
|
11
|
+
componentDidMount(): void;
|
|
12
|
+
renderItem(error: string, disabled: boolean): JSX.Element;
|
|
13
13
|
}
|
|
14
14
|
export default ConfigCRON;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InputLabel, FormControl, Button, TextField
|
|
1
|
+
import React, {} from 'react';
|
|
2
|
+
import { InputLabel, FormControl, Button, TextField } from '@mui/material';
|
|
3
3
|
import { Cron as DialogCron, I18n } from '@iobroker/adapter-react-v5';
|
|
4
4
|
import ConfigGeneric, {} from './ConfigGeneric';
|
|
5
5
|
const styles = {
|
|
@@ -16,7 +16,7 @@ const styles = {
|
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
18
|
class ConfigCRON extends ConfigGeneric {
|
|
19
|
-
|
|
19
|
+
componentDidMount() {
|
|
20
20
|
super.componentDidMount();
|
|
21
21
|
const { data, attr } = this.props;
|
|
22
22
|
const value = ConfigGeneric.getValue(data, attr) || '';
|
|
@@ -25,7 +25,7 @@ class ConfigCRON extends ConfigGeneric {
|
|
|
25
25
|
renderItem(error, disabled /* , defaultValue */) {
|
|
26
26
|
const { schema, attr } = this.props;
|
|
27
27
|
const { value, showDialog } = this.state;
|
|
28
|
-
return React.createElement(FormControl, { style: styles.fullWidth, variant: "standard" },
|
|
28
|
+
return (React.createElement(FormControl, { style: styles.fullWidth, variant: "standard" },
|
|
29
29
|
schema.label ? React.createElement(InputLabel, { shrink: true }, this.getText(schema.label)) : null,
|
|
30
30
|
React.createElement("div", { style: styles.flex },
|
|
31
31
|
React.createElement(TextField, { variant: "standard", fullWidth: true, value: value ?? '', error: !!error, disabled: disabled, placeholder: this.getText(schema.placeholder), label: this.getText(schema.label), helperText: this.renderHelp(schema.help, schema.helpLink, schema.noTranslation), onChange: e => {
|
|
@@ -33,7 +33,7 @@ class ConfigCRON extends ConfigGeneric {
|
|
|
33
33
|
this.setState({ value: value_ }, () => this.onChange(attr, value_));
|
|
34
34
|
} }),
|
|
35
35
|
React.createElement(Button, { color: "grey", style: styles.button, size: "small", variant: "outlined", onClick: () => this.setState({ showDialog: true }) }, "...")),
|
|
36
|
-
showDialog ? React.createElement(DialogCron, { title: I18n.t('ra_Define schedule'), simple: schema.simple, complex: schema.complex, cron: value, onClose: () => this.setState({ showDialog: false }), cancel: I18n.t('ra_Cancel'), ok: I18n.t('ra_Ok'), theme: this.props.theme, onOk: value_ => this.setState({ showDialog: false, value: value_ }, () => this.onChange(attr, value_)) }) : null);
|
|
36
|
+
showDialog ? (React.createElement(DialogCron, { title: I18n.t('ra_Define schedule'), simple: schema.simple, complex: schema.complex, cron: value, onClose: () => this.setState({ showDialog: false }), cancel: I18n.t('ra_Cancel'), ok: I18n.t('ra_Ok'), theme: this.props.theme, onOk: value_ => this.setState({ showDialog: false, value: value_ }, () => this.onChange(attr, value_)) })) : null));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
export default ConfigCRON;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigCRON.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigCRON.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigCRON.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigCRON.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,IAAI,EAAE,MAAM,4BAA4B,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,EACvB,IAAI,EAAE,MAAM,CAAC,EAAE,CACX,IAAI,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,GAE5F,CACL,CAAC,CAAC,CAAC,IAAI,CACE,CACjB,CAAC;IACN,CAAC;CACJ;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import type { ConfigItemCertCollection } from '#JC/types';
|
|
3
3
|
import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
|
|
4
4
|
interface ConfigCertCollectionProps extends ConfigGenericProps {
|
|
@@ -9,6 +9,6 @@ interface ConfigCertCollectionState extends ConfigGenericState {
|
|
|
9
9
|
}
|
|
10
10
|
declare class ConfigCertCollection extends ConfigGeneric<ConfigCertCollectionProps, ConfigCertCollectionState> {
|
|
11
11
|
componentDidMount(): Promise<void>;
|
|
12
|
-
renderItem(error: unknown, disabled: boolean):
|
|
12
|
+
renderItem(error: unknown, disabled: boolean): JSX.Element;
|
|
13
13
|
}
|
|
14
14
|
export default ConfigCertCollection;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InputLabel, MenuItem, FormControl, Select, FormHelperText
|
|
1
|
+
import React, {} from 'react';
|
|
2
|
+
import { InputLabel, MenuItem, FormControl, Select, FormHelperText } from '@mui/material';
|
|
3
3
|
import { I18n } from '@iobroker/adapter-react-v5';
|
|
4
4
|
import ConfigGeneric, {} from './ConfigGeneric';
|
|
5
5
|
class ConfigCertCollection extends ConfigGeneric {
|
|
@@ -20,13 +20,13 @@ class ConfigCertCollection extends ConfigGeneric {
|
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
22
|
const leCollection = (ConfigGeneric.getValue(this.props.data, this.props.schema.leCollectionName || 'leCollection') || 'false').toString();
|
|
23
|
-
return React.createElement(FormControl, { style: { width: '100%' }, variant: "standard" },
|
|
24
|
-
this.props.schema.label ? React.createElement(InputLabel, { shrink: true }, this.getText(this.props.schema.label)) : null,
|
|
25
|
-
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: leCollection, onChange: e => this.onChange(this.props.schema.leCollectionName || 'leCollection', e.target.value === 'false' ? false :
|
|
26
|
-
React.createElement(MenuItem, { key: "_false", value: "false", style: { fontWeight: 'bold' } }, I18n.t(
|
|
27
|
-
React.createElement(MenuItem, { key: "_true", value: "true", style: { fontWeight: 'bold' } }, I18n.t(
|
|
28
|
-
this.state.collectionsOptions?.map(item => React.createElement(MenuItem, { key: item, value: item }, item))),
|
|
29
|
-
this.props.schema.help ? React.createElement(FormHelperText, null, this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)) : null);
|
|
23
|
+
return (React.createElement(FormControl, { style: { width: '100%' }, variant: "standard" },
|
|
24
|
+
this.props.schema.label ? (React.createElement(InputLabel, { shrink: true }, this.getText(this.props.schema.label))) : null,
|
|
25
|
+
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: leCollection, onChange: e => this.onChange(this.props.schema.leCollectionName || 'leCollection', e.target.value === 'false' ? false : e.target.value === 'true' ? true : e.target.value) },
|
|
26
|
+
React.createElement(MenuItem, { key: "_false", value: "false", style: { fontWeight: 'bold' } }, I18n.t("ra_Do not use let's encrypt")),
|
|
27
|
+
React.createElement(MenuItem, { key: "_true", value: "true", style: { fontWeight: 'bold' } }, I18n.t("ra_Use all available let's encrypt certificates")),
|
|
28
|
+
this.state.collectionsOptions?.map(item => (React.createElement(MenuItem, { key: item, value: item }, item)))),
|
|
29
|
+
this.props.schema.help ? (React.createElement(FormHelperText, null, this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation))) : null));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
export default ConfigCertCollection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigCertCollection.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigCertCollection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigCertCollection.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigCertCollection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAqBlG,MAAM,oBAAqB,SAAQ,aAAmE;IAClG,KAAK,CAAC,iBAAiB;QACnB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,kBAA4B,CAAC;QACjC,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;QACvF,IAAI,qBAAqB,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;YAC7C,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAC5B,qBAAqB,CAAC,MAAM,CAAC,WAA6C,CAC7E,CAAC;QACN,CAAC;aAAM,CAAC;YACJ,kBAAkB,GAAG,EAAE,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,UAAU,CAAC,KAAc,EAAE,QAAiB,CAAC,oBAAoB;QAC7D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC;QAChB,CAAC;Q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ACZ,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,IAE5B,IAAI,CAAC,CAAC,CAAC,iDAAiD,CAAC,CACnD;gBACV,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACxC,oBAAC,QAAQ,IACL,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,IAAI,IAEV,IAAI,CACE,CACd,CAAC,CACG;YACR,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CACtB,oBAAC,cAAc,QACV,IAAI,CAAC,UAAU,CACZ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EACtB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAC1B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAClC,CACY,CACpB,CAAC,CAAC,CAAC,IAAI,CACE,CACjB,CAAC;IACN,CAAC;CACJ;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import type { ConfigItemCertificateSelect } from '#JC/types';
|
|
3
3
|
import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
|
|
4
4
|
interface ConfigCertificateSelectProps extends ConfigGenericProps {
|
|
@@ -12,6 +12,6 @@ interface ConfigCertificateSelectState extends ConfigGenericState {
|
|
|
12
12
|
}
|
|
13
13
|
declare class ConfigCertificateSelect extends ConfigGeneric<ConfigCertificateSelectProps, ConfigCertificateSelectState> {
|
|
14
14
|
componentDidMount(): Promise<void>;
|
|
15
|
-
renderItem(error: unknown, disabled: boolean):
|
|
15
|
+
renderItem(error: unknown, disabled: boolean): JSX.Element | null;
|
|
16
16
|
}
|
|
17
17
|
export default ConfigCertificateSelect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InputLabel, MenuItem, FormControl, Select, FormHelperText
|
|
1
|
+
import React, {} from 'react';
|
|
2
|
+
import { InputLabel, MenuItem, FormControl, Select, FormHelperText } from '@mui/material';
|
|
3
3
|
import { I18n } from '@iobroker/adapter-react-v5';
|
|
4
4
|
import ConfigGeneric, {} from './ConfigGeneric';
|
|
5
5
|
class ConfigCertificateSelect extends ConfigGeneric {
|
|
@@ -31,10 +31,10 @@ class ConfigCertificateSelect extends ConfigGeneric {
|
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
33
|
const item = this.state.selectOptions?.find(_item => _item.value === this.state.value);
|
|
34
|
-
return React.createElement(FormControl, { style: { width: '100%' }, variant: "standard" },
|
|
35
|
-
this.props.schema.label ? React.createElement(InputLabel, { shrink: true }, this.getText(this.props.schema.label)) : null,
|
|
36
|
-
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: this.state.value, renderValue: () => this.getText(item?.label, this.props.schema.noTranslation !== false), onChange: e => this.setState({ value: e.target.value }, () => this.onChange(this.props.attr, this.state.value)) }, this.state.selectOptions?.map(item_ => React.createElement(MenuItem, { key: item_.value, value: item_.value, style: item_.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {} }, this.getText(item_.label, this.props.schema.noTranslation !== false)))),
|
|
37
|
-
this.props.schema.help ? React.createElement(FormHelperText, null, this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)) : null);
|
|
34
|
+
return (React.createElement(FormControl, { style: { width: '100%' }, variant: "standard" },
|
|
35
|
+
this.props.schema.label ? (React.createElement(InputLabel, { shrink: true }, this.getText(this.props.schema.label))) : null,
|
|
36
|
+
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: this.state.value, renderValue: () => this.getText(item?.label, this.props.schema.noTranslation !== false), onChange: e => this.setState({ value: e.target.value }, () => this.onChange(this.props.attr, this.state.value)) }, this.state.selectOptions?.map(item_ => (React.createElement(MenuItem, { key: item_.value, value: item_.value, style: item_.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {} }, this.getText(item_.label, this.props.schema.noTranslation !== false))))),
|
|
37
|
+
this.props.schema.help ? (React.createElement(FormHelperText, null, this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation))) : null));
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
export default ConfigCertificateSelect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigCertificateSelect.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigCertificateSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigCertificateSelect.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigCertificateSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAUlG,MAAM,uBAAwB,SAAQ,aAAyE;IAC3G,KAAK,CAAC,iBAAiB;QACnB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,MAAM,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvE,kEAAkE;QAClE,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;QAE/D,MAAM,aAAa,GAAuC,YAAY;aACjE,MAAM,CAAC,EAAE,CAAC,EAAE;YACT,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WA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,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,IAEtE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,KAAK,KAAK,CAAC,CAC9D,CACd,CAAC,CACG;YACR,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CACtB,oBAAC,cAAc,QACV,IAAI,CAAC,UAAU,CACZ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EACtB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAC1B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAClC,CACY,CACpB,CAAC,CAAC,CAAC,IAAI,CACE,CACjB,CAAC;IACN,CAAC;CACJ;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import type { ConfigItemCertificates } from '#JC/types';
|
|
3
3
|
import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
|
|
4
4
|
interface ConfigCertificatesProps extends ConfigGenericProps {
|
|
@@ -21,6 +21,6 @@ interface ConfigCertificatesState extends ConfigGenericState {
|
|
|
21
21
|
}
|
|
22
22
|
declare class ConfigCertificates extends ConfigGeneric<ConfigCertificatesProps, ConfigCertificatesState> {
|
|
23
23
|
componentDidMount(): Promise<void>;
|
|
24
|
-
renderItem(error: unknown, disabled: boolean):
|
|
24
|
+
renderItem(error: unknown, disabled: boolean): JSX.Element | null;
|
|
25
25
|
}
|
|
26
26
|
export default ConfigCertificates;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InputLabel, MenuItem, FormControl, Select
|
|
1
|
+
import React, {} from 'react';
|
|
2
|
+
import { InputLabel, MenuItem, FormControl, Select } from '@mui/material';
|
|
3
3
|
import { I18n } from '@iobroker/adapter-react-v5';
|
|
4
4
|
import ConfigGeneric, {} from './ConfigGeneric';
|
|
5
5
|
const styles = {
|
|
@@ -31,8 +31,7 @@ class ConfigCertificates extends ConfigGeneric {
|
|
|
31
31
|
else {
|
|
32
32
|
collectionsOptions = null;
|
|
33
33
|
}
|
|
34
|
-
certificates
|
|
35
|
-
.forEach(el => {
|
|
34
|
+
certificates.forEach(el => {
|
|
36
35
|
if (el.type === 'public') {
|
|
37
36
|
certsPublicOptions.push({ label: el.name, value: el.name });
|
|
38
37
|
}
|
|
@@ -69,24 +68,28 @@ class ConfigCertificates extends ConfigGeneric {
|
|
|
69
68
|
const itemCertPublic = this.state.certsPublicOptions?.find(item => item.value === certPublic);
|
|
70
69
|
const itemCertPrivate = this.state.certsPrivateOptions?.find(item => item.value === certPrivate);
|
|
71
70
|
const itemCertChained = this.state.certsChainOptions?.find(item => item.value === certChained);
|
|
72
|
-
return React.createElement("div", { style: styles.fullWidth },
|
|
73
|
-
this.state.collectionsOptions ? React.createElement(FormControl, { style: styles.leWidth, variant: "standard" },
|
|
71
|
+
return (React.createElement("div", { style: styles.fullWidth },
|
|
72
|
+
this.state.collectionsOptions ? (React.createElement(FormControl, { style: styles.leWidth, variant: "standard" },
|
|
74
73
|
React.createElement(InputLabel, { shrink: true }, "Let's encrypt"),
|
|
75
|
-
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: leCollection, onChange: e => this.onChange(this.props.schema.leCollectionName || 'leCollection', e.target.value === 'false'
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: leCollection, onChange: e => this.onChange(this.props.schema.leCollectionName || 'leCollection', e.target.value === 'false'
|
|
75
|
+
? false
|
|
76
|
+
: e.target.value === 'true'
|
|
77
|
+
? true
|
|
78
|
+
: e.target.value) },
|
|
79
|
+
React.createElement(MenuItem, { key: "_false", value: "false", style: { fontWeight: 'bold' } }, I18n.t("ra_Do not use let's encrypt")),
|
|
80
|
+
React.createElement(MenuItem, { key: "_true", value: "true", style: { fontWeight: 'bold' } }, I18n.t("ra_Use all available let's encrypt certificates")),
|
|
81
|
+
this.state.collectionsOptions?.map(item => (React.createElement(MenuItem, { key: item, value: item }, item)))))) : null,
|
|
79
82
|
this.state.collectionsOptions ? React.createElement("br", null) : null,
|
|
80
|
-
this.state.collectionsOptions && leCollection !== 'false' ? React.createElement("div", null, I18n.t('ra_Fallback custom certificates')) : null,
|
|
83
|
+
this.state.collectionsOptions && leCollection !== 'false' ? (React.createElement("div", null, I18n.t('ra_Fallback custom certificates'))) : null,
|
|
81
84
|
React.createElement(FormControl, { style: styles.certWidth, variant: "standard" },
|
|
82
85
|
React.createElement(InputLabel, { shrink: true }, I18n.t('ra_Public certificate')),
|
|
83
|
-
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: certPublic || '', renderValue: () => this.getText(itemCertPublic?.label), onChange: e => this.onChange(this.props.schema.certPublicName || 'certPublic', e.target.value) }, this.state.certsPublicOptions?.map((item, i) => React.createElement(MenuItem, { key: `${item.value}_${i}`, value: item.value, style: item.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {} }, this.getText(item.label))))),
|
|
86
|
+
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: certPublic || '', renderValue: () => this.getText(itemCertPublic?.label), onChange: e => this.onChange(this.props.schema.certPublicName || 'certPublic', e.target.value) }, this.state.certsPublicOptions?.map((item, i) => (React.createElement(MenuItem, { key: `${item.value}_${i}`, value: item.value, style: item.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {} }, this.getText(item.label)))))),
|
|
84
87
|
React.createElement(FormControl, { style: styles.certWidth, variant: "standard" },
|
|
85
88
|
React.createElement(InputLabel, { shrink: true }, I18n.t('ra_Private certificate')),
|
|
86
|
-
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: certPrivate || '', renderValue: () => this.getText(itemCertPrivate?.label), onChange: e => this.onChange(this.props.schema.certPrivateName || 'certPrivate', e.target.value) }, this.state.certsPrivateOptions?.map((item, i) => React.createElement(MenuItem, { key: `${item.value}_${i}`, value: item.value, style: item.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {} }, this.getText(item.label))))),
|
|
89
|
+
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: certPrivate || '', renderValue: () => this.getText(itemCertPrivate?.label), onChange: e => this.onChange(this.props.schema.certPrivateName || 'certPrivate', e.target.value) }, this.state.certsPrivateOptions?.map((item, i) => (React.createElement(MenuItem, { key: `${item.value}_${i}`, value: item.value, style: item.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {} }, this.getText(item.label)))))),
|
|
87
90
|
React.createElement(FormControl, { style: styles.certWidth, variant: "standard" },
|
|
88
91
|
React.createElement(InputLabel, { shrink: true }, I18n.t('ra_Chained certificate')),
|
|
89
|
-
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: certChained || '', renderValue: () => this.getText(itemCertChained?.label), onChange: e => this.onChange(this.props.schema.certChainedName || 'certChained', e.target.value) }, this.state.certsChainOptions?.map((item, i) => React.createElement(MenuItem, { key: `${item.value}_${i}`, value: item.value, style: item.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {} }, this.getText(item.label))))));
|
|
92
|
+
React.createElement(Select, { variant: "standard", error: !!error, displayEmpty: true, disabled: !!disabled, value: certChained || '', renderValue: () => this.getText(itemCertChained?.label), onChange: e => this.onChange(this.props.schema.certChainedName || 'certChained', e.target.value) }, this.state.certsChainOptions?.map((item, i) => (React.createElement(MenuItem, { key: `${item.value}_${i}`, value: item.value, style: item.value === ConfigGeneric.NONE_VALUE ? { opacity: 0.5 } : {} }, this.getText(item.label))))))));
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
export default ConfigCertificates;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigCertificates.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigCertificates.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigCertificates.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigCertificates.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAElG,MAAM,MAAM,GAAwC;IAChD,SAAS,EAAE;QACP,KAAK,EAAE,MAAM;KAChB;IACD,OAAO,EAAE;QACL,KAAK,EAAE,GAAG;QACV,YAAY,EAAE,EAAE;KACnB;IACD,SAAS,EAAE;QACP,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,EAAE;KAClB;CACJ,CAAC;AAaF,MAAM,kBAAmB,SAAQ,aAA+D;IAC5F,KAAK,CAAC,iBAAiB;QACnB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,kEAAkE;QAClE,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;QAC/D,MAAM,kBAAkB,GAAuC,EAAE,CAAC;QAClE,MAAM,mBAAmB,GAAuC,EAAE,CAAC;QACnE,MAAM,iBAAiB,GAAuC,EAAE,CAAC;QAEjE,IAAI,kBAAkB,GAAoB,EAAE,CAAC;QAC7C,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;QACvF,IAAI,qBAAqB,EAAE,MAAM,EAAE,WAAW,E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EAAE,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,IAErE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,CACd,CAAC,CACG,CACC,CACZ,CACT,CAAC;IACN,CAAC;CACJ;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import type { ConfigItemCheckLicense } from '#JC/types';
|
|
3
3
|
import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
|
|
4
4
|
export interface License {
|
|
@@ -37,15 +37,27 @@ interface ConfigCheckLicenseState extends ConfigGenericState {
|
|
|
37
37
|
askForUpdate: boolean;
|
|
38
38
|
}
|
|
39
39
|
declare class ConfigCheckLicense extends ConfigGeneric<ConfigCheckLicenseProps, ConfigCheckLicenseState> {
|
|
40
|
-
componentDidMount():
|
|
41
|
-
renderErrorDialog():
|
|
42
|
-
renderMessageDialog():
|
|
43
|
-
static parseJwt(token: string):
|
|
40
|
+
componentDidMount(): void;
|
|
41
|
+
renderErrorDialog(): JSX.Element | null;
|
|
42
|
+
renderMessageDialog(): JSX.Element | null;
|
|
43
|
+
static parseJwt(token: string): {
|
|
44
|
+
exp: number;
|
|
45
|
+
iat: number;
|
|
46
|
+
name: string;
|
|
47
|
+
email: string;
|
|
48
|
+
uuid: string;
|
|
49
|
+
version: string;
|
|
50
|
+
invoice: string;
|
|
51
|
+
/** @deprecated use validTill */
|
|
52
|
+
valid_till: string;
|
|
53
|
+
validTill: string;
|
|
54
|
+
[key: string]: string | number;
|
|
55
|
+
} | null;
|
|
44
56
|
static isVersionValid(version: string, rule: string, invoice: string, adapterName: string): boolean;
|
|
45
57
|
findInLicenseManager(adapterName: string): Promise<LicenseResult[]>;
|
|
46
58
|
checkLicense(license: string, adapterName: string): Promise<void>;
|
|
47
|
-
renderAskForUpdate():
|
|
59
|
+
renderAskForUpdate(): JSX.Element | null;
|
|
48
60
|
_onClick(secondRun?: boolean): Promise<void>;
|
|
49
|
-
renderItem():
|
|
61
|
+
renderItem(): JSX.Element;
|
|
50
62
|
}
|
|
51
63
|
export default ConfigCheckLicense;
|