@iobroker/adapter-react-v5 4.10.1 → 4.10.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/Components/CustomModal.d.ts +24 -2
- package/Components/CustomModal.js +77 -145
- package/Components/FileBrowser.d.ts +68 -130
- package/Components/FileBrowser.js +1405 -1987
- package/Components/FileViewer.d.ts +9 -82
- package/Components/FileViewer.js +248 -321
- package/Components/IconSelector.d.ts +28 -22
- package/Components/IconSelector.js +2122 -2073
- package/Components/Loader.d.ts +8 -3
- package/Components/Loader.js +4 -2
- package/Components/Loaders/MV.d.ts +12 -0
- package/Components/Loaders/MV.js +51 -0
- package/Components/Loaders/PT.d.ts +19 -38
- package/Components/Loaders/PT.js +153 -78
- package/Components/Loaders/Vendor.d.ts +19 -31
- package/Components/Loaders/Vendor.js +61 -79
- package/Components/SelectWithIcon.d.ts +23 -20
- package/Components/SelectWithIcon.js +143 -204
- package/Components/types.d.ts +0 -47
- package/Dialogs/Error.d.ts +3 -5
- package/Dialogs/Error.js +1 -3
- package/Dialogs/SelectFile.d.ts +53 -170
- package/Dialogs/SelectFile.js +100 -257
- package/README.md +3 -0
- package/icons/IconClearFilter.js.map +1 -1
- package/icons/IconClosed.js.map +1 -1
- package/icons/IconCopy.js.map +1 -1
- package/icons/IconDocumentReadOnly.js.map +1 -1
- package/icons/IconExpert.d.ts +10 -36
- package/icons/IconExpert.js +8 -42
- package/index.d.ts +2 -0
- package/index.js +5 -2
- package/package.json +2 -2
- package/types.d.ts +9 -7
- package/Components/CustomModal.js.map +0 -1
- package/Components/FileBrowser.js.map +0 -1
- package/Components/FileViewer.js.map +0 -1
- package/Components/IconSelector.js.map +0 -1
- package/Components/Loaders/PT.js.map +0 -1
- package/Components/Loaders/Vendor.js.map +0 -1
- package/Components/SelectWithIcon.js.map +0 -1
- package/Dialogs/SelectFile.js.map +0 -1
- package/icons/IconExpert.js.map +0 -1
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
declare const _default: React.JSXElementConstructor<Omit<PropTypes.InferProps<{
|
|
2
|
-
t: PropTypes.Validator<(...args: any[]) => any>;
|
|
3
|
-
lang: PropTypes.Validator<string>;
|
|
4
|
-
themeType: PropTypes.Requireable<string>;
|
|
5
|
-
value: PropTypes.Requireable<string>;
|
|
6
|
-
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
8
|
-
list: PropTypes.Requireable<object>;
|
|
9
|
-
options: PropTypes.Requireable<object>;
|
|
10
|
-
different: PropTypes.Requireable<NonNullable<string | boolean>>;
|
|
11
|
-
label: PropTypes.Requireable<string>;
|
|
12
|
-
fullWidth: PropTypes.Requireable<boolean>;
|
|
13
|
-
className: PropTypes.Requireable<string>;
|
|
14
|
-
style: PropTypes.Requireable<object>;
|
|
15
|
-
removePrefix: PropTypes.Requireable<string>;
|
|
16
|
-
allowNone: PropTypes.Requireable<boolean>;
|
|
17
|
-
inputProps: PropTypes.Requireable<object>;
|
|
18
|
-
}>, "classes"> & import("@mui/styles").StyledComponentProps<"icon" | "different"> & object>;
|
|
19
|
-
export default _default;
|
|
20
|
-
import PropTypes from 'prop-types';
|
|
21
1
|
import React from 'react';
|
|
2
|
+
import { ThemeType, Translator } from '../types';
|
|
3
|
+
interface SelectWithIconProps {
|
|
4
|
+
t: Translator;
|
|
5
|
+
lang: ioBroker.Languages;
|
|
6
|
+
themeType: ThemeType;
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange: (id: string) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
list?: ioBroker.Object[] | Record<string, ioBroker.Object>;
|
|
11
|
+
options?: Record<string, any>;
|
|
12
|
+
different?: string | boolean;
|
|
13
|
+
label?: string;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
removePrefix?: string;
|
|
18
|
+
allowNone?: boolean;
|
|
19
|
+
inputProps: any;
|
|
20
|
+
classes: Record<string, string>;
|
|
21
|
+
dense?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: React.JSXElementConstructor<Omit<SelectWithIconProps, "classes"> & import("@mui/styles").StyledComponentProps<string> & object>;
|
|
24
|
+
export default _default;
|
|
@@ -1,214 +1,153 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
7
17
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return {
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const react_1 = __importStar(require("react"));
|
|
30
|
+
const styles_1 = require("@mui/styles");
|
|
31
|
+
const material_1 = require("@mui/material");
|
|
32
|
+
const Icon_1 = __importDefault(require("./Icon"));
|
|
33
|
+
const Utils_1 = __importDefault(require("./Utils"));
|
|
34
|
+
const i18n_1 = __importDefault(require("../i18n"));
|
|
35
|
+
const styles = {
|
|
27
36
|
different: {
|
|
28
|
-
|
|
37
|
+
opacity: 0.5,
|
|
29
38
|
},
|
|
30
39
|
icon: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
};
|
|
40
|
+
width: 16,
|
|
41
|
+
height: 16,
|
|
42
|
+
marginRight: 8,
|
|
43
|
+
},
|
|
36
44
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
45
|
+
class SelectWithIcon extends react_1.Component {
|
|
46
|
+
constructor(props) {
|
|
47
|
+
super(props);
|
|
48
|
+
this.timeout = null;
|
|
49
|
+
if (props.different) {
|
|
50
|
+
this.wordDifferent = props.t('ra___different__');
|
|
51
|
+
}
|
|
52
|
+
let list;
|
|
53
|
+
if (Array.isArray(props.list || props.options)) {
|
|
54
|
+
list = (props.list || props.options)
|
|
55
|
+
.map(obj => {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
return ({
|
|
58
|
+
name: Utils_1.default.getObjectNameFromObj(obj, props.lang)
|
|
59
|
+
.replace('system.group.', '')
|
|
60
|
+
.replace('system.user.', '')
|
|
61
|
+
.replace('enum.rooms.', '')
|
|
62
|
+
.replace('enum.functions.', ''),
|
|
63
|
+
value: obj._id,
|
|
64
|
+
icon: (_a = obj.common) === null || _a === void 0 ? void 0 : _a.icon,
|
|
65
|
+
color: (_b = obj.common) === null || _b === void 0 ? void 0 : _b.color,
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
list = Object.values((props.list || props.options))
|
|
71
|
+
.map(obj => {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
return ({
|
|
74
|
+
name: Utils_1.default.getObjectNameFromObj(obj, props.lang)
|
|
75
|
+
.replace('system.group.', '')
|
|
76
|
+
.replace('system.user.', '')
|
|
77
|
+
.replace('enum.rooms.', '')
|
|
78
|
+
.replace('enum.functions.', ''),
|
|
79
|
+
value: obj._id,
|
|
80
|
+
icon: (_a = obj.common) === null || _a === void 0 ? void 0 : _a.icon,
|
|
81
|
+
color: (_b = obj.common) === null || _b === void 0 ? void 0 : _b.color,
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (props.different && props.value === props.different) {
|
|
86
|
+
list.unshift({ value: props.different, name: this.wordDifferent || '' });
|
|
87
|
+
}
|
|
88
|
+
if (props.allowNone) {
|
|
89
|
+
list.unshift({ value: '', name: i18n_1.default.t('ra_none') });
|
|
90
|
+
}
|
|
91
|
+
this.state = {
|
|
92
|
+
list,
|
|
65
93
|
};
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
if (_this.props.different && _this.props.value === _this.props.different) {
|
|
69
|
-
list.unshift({
|
|
70
|
-
value: _this.props.different,
|
|
71
|
-
name: _this.wordDifferent
|
|
72
|
-
});
|
|
73
94
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
})) {
|
|
92
|
-
this.timeout = this.timeout || setTimeout(function () {
|
|
93
|
-
_this2.timeout = null;
|
|
94
|
-
var list = JSON.parse(JSON.stringify(_this2.state.list));
|
|
95
|
-
list.unshift({
|
|
96
|
-
value: '',
|
|
97
|
-
name: _i18n["default"].t('ra_none')
|
|
98
|
-
});
|
|
99
|
-
_this2.setState({
|
|
100
|
-
list: list
|
|
101
|
-
});
|
|
102
|
-
}, 100);
|
|
103
|
-
} else if (!this.props.allowNone && this.state.list.find(function (obj) {
|
|
104
|
-
return obj.value === '';
|
|
105
|
-
})) {
|
|
106
|
-
this.timeout = this.timeout || setTimeout(function () {
|
|
107
|
-
_this2.timeout = null;
|
|
108
|
-
var list = JSON.parse(JSON.stringify(_this2.state.list));
|
|
109
|
-
var i = _this2.state.list.findIndex(function (obj) {
|
|
110
|
-
return obj.value === '';
|
|
111
|
-
});
|
|
112
|
-
list.splice(i, 1);
|
|
113
|
-
_this2.setState({
|
|
114
|
-
list: list
|
|
115
|
-
});
|
|
116
|
-
}, 100);
|
|
117
|
-
}
|
|
118
|
-
var item = this.state.list.find(function (it) {
|
|
119
|
-
return it.value === _this2.props.value || _this2.props.removePrefix && it.value.replace(_this2.props.removePrefix, '') === _this2.props.value;
|
|
120
|
-
});
|
|
121
|
-
var style = this.props.value === this.props.different ? {} : {
|
|
122
|
-
color: (item === null || item === void 0 ? void 0 : item.color) || undefined,
|
|
123
|
-
backgroundColor: _Utils["default"].getInvertedColor(item === null || item === void 0 ? void 0 : item.color, this.props.themeType)
|
|
124
|
-
};
|
|
125
|
-
if (this.props.dense && this.props.style) {
|
|
126
|
-
Object.assign(style, this.props.style);
|
|
127
|
-
}
|
|
128
|
-
var select = /*#__PURE__*/_react["default"].createElement(_material.Select, {
|
|
129
|
-
variant: "standard",
|
|
130
|
-
disabled: this.props.disabled,
|
|
131
|
-
value: this.props.value,
|
|
132
|
-
inputProps: this.props.inputProps,
|
|
133
|
-
renderValue: function renderValue( /* value */
|
|
134
|
-
) {
|
|
135
|
-
return /*#__PURE__*/_react["default"].createElement("span", null, item !== null && item !== void 0 && item.icon ? /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
136
|
-
src: item === null || item === void 0 ? void 0 : item.icon,
|
|
137
|
-
className: _this2.props.classes.icon
|
|
138
|
-
}) : null, item === null || item === void 0 ? void 0 : item.name);
|
|
139
|
-
},
|
|
140
|
-
classes: {
|
|
141
|
-
root: _Utils["default"].clsx(this.props.value === this.props.different ? this.props.classes.different : '', this.props.dense ? this.props.className : '')
|
|
142
|
-
},
|
|
143
|
-
style: style,
|
|
144
|
-
onChange: function onChange(el) {
|
|
145
|
-
if (_this2.props.different && el.target.value !== _this2.props.different) {
|
|
146
|
-
var pos = null;
|
|
147
|
-
for (var i = 0; i < _this2.state.list.length; i++) {
|
|
148
|
-
if (_this2.state.list[i].value === _this2.props.different) {
|
|
149
|
-
pos = i;
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
if (pos !== null) {
|
|
154
|
-
var list = _Utils["default"].clone(_this2.state.list);
|
|
155
|
-
list.splice(pos, 1);
|
|
156
|
-
_this2.setState({
|
|
157
|
-
list: list
|
|
158
|
-
}, function () {
|
|
159
|
-
return _this2.props.onChange(el.target.value);
|
|
160
|
-
});
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
_this2.props.onChange(_this2.props.removePrefix ? el.target.value.replace(_this2.props.removePrefix, '') : el.target.value);
|
|
95
|
+
render() {
|
|
96
|
+
if (this.props.allowNone && !this.state.list.find(obj => obj.value === '')) {
|
|
97
|
+
this.timeout = this.timeout || setTimeout(() => {
|
|
98
|
+
this.timeout = null;
|
|
99
|
+
const list = JSON.parse(JSON.stringify(this.state.list));
|
|
100
|
+
list.unshift({ value: '', name: i18n_1.default.t('ra_none') });
|
|
101
|
+
this.setState({ list });
|
|
102
|
+
}, 100);
|
|
103
|
+
}
|
|
104
|
+
else if (!this.props.allowNone && this.state.list.find(obj => obj.value === '')) {
|
|
105
|
+
this.timeout = this.timeout || setTimeout(() => {
|
|
106
|
+
this.timeout = null;
|
|
107
|
+
const list = JSON.parse(JSON.stringify(this.state.list));
|
|
108
|
+
const i = this.state.list.findIndex(obj => obj.value === '');
|
|
109
|
+
list.splice(i, 1);
|
|
110
|
+
this.setState({ list });
|
|
111
|
+
}, 100);
|
|
165
112
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
113
|
+
const item = this.state.list.find(it => it.value === this.props.value || (this.props.removePrefix && it.value.replace(this.props.removePrefix, '') === this.props.value));
|
|
114
|
+
const style = this.props.value === this.props.different ? {} : {
|
|
115
|
+
color: (item === null || item === void 0 ? void 0 : item.color) || undefined,
|
|
116
|
+
backgroundColor: Utils_1.default.getInvertedColor((item === null || item === void 0 ? void 0 : item.color) || '', this.props.themeType),
|
|
117
|
+
};
|
|
118
|
+
if (this.props.dense && this.props.style) {
|
|
119
|
+
Object.assign(style, this.props.style);
|
|
120
|
+
}
|
|
121
|
+
const select = react_1.default.createElement(material_1.Select, { variant: "standard", disabled: this.props.disabled, value: this.props.value, inputProps: this.props.inputProps, renderValue: ( /* value */) => react_1.default.createElement("span", null,
|
|
122
|
+
(item === null || item === void 0 ? void 0 : item.icon) ? react_1.default.createElement(Icon_1.default, { src: item === null || item === void 0 ? void 0 : item.icon, className: this.props.classes.icon }) : null, item === null || item === void 0 ? void 0 :
|
|
123
|
+
item.name), classes: {
|
|
124
|
+
root: Utils_1.default.clsx(this.props.value === this.props.different ? this.props.classes.different : '', this.props.dense ? this.props.className : ''),
|
|
125
|
+
}, style: style, onChange: el => {
|
|
126
|
+
if (this.props.different && el.target.value !== this.props.different) {
|
|
127
|
+
let pos = null;
|
|
128
|
+
for (let i = 0; i < this.state.list.length; i++) {
|
|
129
|
+
if (this.state.list[i].value === this.props.different) {
|
|
130
|
+
pos = i;
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (pos !== null) {
|
|
135
|
+
const list = Utils_1.default.clone(this.state.list);
|
|
136
|
+
list.splice(pos, 1);
|
|
137
|
+
this.setState({ list }, () => this.props.onChange(el.target.value));
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
this.props.onChange(this.props.removePrefix ? el.target.value.replace(this.props.removePrefix, '') : el.target.value);
|
|
142
|
+
} }, this.state.list.map(el => react_1.default.createElement(material_1.MenuItem, { className: this.props.different && el.value === this.props.different ? this.props.classes.different : '', style: this.props.different && el.value === this.props.different ? {} : { color: el.color || undefined, backgroundColor: Utils_1.default.getInvertedColor(el.color || '', this.props.themeType) }, key: el.value, value: el.value },
|
|
143
|
+
el.icon ? react_1.default.createElement(Icon_1.default, { src: el.icon, className: this.props.classes.icon }) : null,
|
|
144
|
+
el.name)));
|
|
145
|
+
if (this.props.dense) {
|
|
146
|
+
return select;
|
|
147
|
+
}
|
|
148
|
+
return react_1.default.createElement(material_1.FormControl, { variant: "standard", fullWidth: !!this.props.fullWidth, style: this.props.style, className: this.props.className },
|
|
149
|
+
react_1.default.createElement(material_1.InputLabel, null, this.props.label),
|
|
150
|
+
select);
|
|
189
151
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}(_react.Component);
|
|
193
|
-
SelectWithIcon.propTypes = {
|
|
194
|
-
t: _propTypes["default"].func.isRequired,
|
|
195
|
-
lang: _propTypes["default"].string.isRequired,
|
|
196
|
-
themeType: _propTypes["default"].string,
|
|
197
|
-
value: _propTypes["default"].string,
|
|
198
|
-
onChange: _propTypes["default"].func.isRequired,
|
|
199
|
-
disabled: _propTypes["default"].bool,
|
|
200
|
-
list: _propTypes["default"].oneOfType([_propTypes["default"].array, _propTypes["default"].object]),
|
|
201
|
-
// one of "list"(Array) or "options"(object) is required
|
|
202
|
-
options: _propTypes["default"].oneOfType([_propTypes["default"].array, _propTypes["default"].object]),
|
|
203
|
-
// one of "list"(Array) or "options"(object) is required
|
|
204
|
-
different: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].bool]),
|
|
205
|
-
label: _propTypes["default"].string,
|
|
206
|
-
fullWidth: _propTypes["default"].bool,
|
|
207
|
-
className: _propTypes["default"].string,
|
|
208
|
-
style: _propTypes["default"].object,
|
|
209
|
-
removePrefix: _propTypes["default"].string,
|
|
210
|
-
allowNone: _propTypes["default"].bool,
|
|
211
|
-
inputProps: _propTypes["default"].object
|
|
212
|
-
};
|
|
213
|
-
var _default = exports["default"] = (0, _styles.withStyles)(styles)(SelectWithIcon);
|
|
214
|
-
//# sourceMappingURL=SelectWithIcon.js.map
|
|
152
|
+
}
|
|
153
|
+
exports.default = (0, styles_1.withStyles)(styles)(SelectWithIcon);
|
package/Components/types.d.ts
CHANGED
|
@@ -2,53 +2,6 @@ import { Translator, Width } from '../types';
|
|
|
2
2
|
import Connection from '../Connection';
|
|
3
3
|
import Router from './Router';
|
|
4
4
|
|
|
5
|
-
export interface FileBrowserProps {
|
|
6
|
-
/** The key to identify this component. */
|
|
7
|
-
key?: string;
|
|
8
|
-
/** Additional styling for this component. */
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
/** The CSS class name. */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** Translation function. */
|
|
13
|
-
t: Translator;
|
|
14
|
-
/** The selected language. */
|
|
15
|
-
lang: ioBroker.Languages;
|
|
16
|
-
/** The socket connection. */
|
|
17
|
-
socket: Connection;
|
|
18
|
-
/** Is the component data ready. */
|
|
19
|
-
ready?: boolean;
|
|
20
|
-
/** Is expert mode enabled? (default: false) */
|
|
21
|
-
expertMode?: boolean;
|
|
22
|
-
/** Show the toolbar? (default: false) */
|
|
23
|
-
showToolbar?: boolean;
|
|
24
|
-
/** Allow upload of new files? (default: false) */
|
|
25
|
-
allowUpload?: boolean;
|
|
26
|
-
/** Allow download of files? (default: false) */
|
|
27
|
-
allowDownload?: boolean;
|
|
28
|
-
/** Allow creation of new folders? (default: false) */
|
|
29
|
-
allowCreateFolder?: boolean;
|
|
30
|
-
/** Allow deleting files? (default: false) */
|
|
31
|
-
allowDelete?: boolean;
|
|
32
|
-
/** Allow viewing files? (default: false) */
|
|
33
|
-
allowView?: boolean;
|
|
34
|
-
/** Prefix (default: '.') */
|
|
35
|
-
imagePrefix?: string;
|
|
36
|
-
/** Show the expert button? */
|
|
37
|
-
showExpertButton?: boolean;
|
|
38
|
-
/** Type of view */
|
|
39
|
-
viewType?: 'Table' | 'Tile';
|
|
40
|
-
/** Show the buttons to switch the view from table to tile? (default: false) */
|
|
41
|
-
showViewTypeButton?: boolean;
|
|
42
|
-
/** The ID of the selected file. */
|
|
43
|
-
selected?: string;
|
|
44
|
-
/** The file extensions to show, like ['png', 'svg', 'bmp', 'jpg', 'jpeg', 'gif']. */
|
|
45
|
-
filterFiles?: string[];
|
|
46
|
-
/** The file extension categories to show. */
|
|
47
|
-
filterByType?: 'images' | 'code' | 'txt';
|
|
48
|
-
/** Callback for file selection. */
|
|
49
|
-
onSelect?: (id: string, isDoubleClick?: boolean) => void;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
5
|
export interface ObjectBrowserTableFilter {
|
|
53
6
|
id?: string;
|
|
54
7
|
name?: string;
|
package/Dialogs/Error.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ interface DialogErrorProps {
|
|
|
10
10
|
text: string | React.JSX.Element;
|
|
11
11
|
onClose?: () => void;
|
|
12
12
|
classes?: {
|
|
13
|
-
titleBackground
|
|
14
|
-
titleColor
|
|
13
|
+
titleBackground?: string;
|
|
14
|
+
titleColor?: string;
|
|
15
15
|
};
|
|
16
16
|
fullWidth?: boolean;
|
|
17
17
|
}
|
|
@@ -25,6 +25,4 @@ declare class DialogError extends Component<DialogErrorProps> {
|
|
|
25
25
|
handleOk(): void;
|
|
26
26
|
render(): React.JSX.Element;
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
declare const _export: typeof DialogError;
|
|
30
|
-
export default _export;
|
|
28
|
+
export default DialogError;
|
package/Dialogs/Error.js
CHANGED
|
@@ -56,6 +56,4 @@ class DialogError extends react_1.Component {
|
|
|
56
56
|
react_1.default.createElement(material_1.Button, { id: "ar_dialog_error_ok", variant: "contained", onClick: () => this.handleOk(), color: "primary", autoFocus: true, startIcon: react_1.default.createElement(icons_material_1.Check, null) }, i18n_1.default.t('ra_Ok'))));
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
const _export = DialogError;
|
|
61
|
-
exports.default = _export;
|
|
59
|
+
exports.default = DialogError;
|