@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.
Files changed (43) hide show
  1. package/Components/CustomModal.d.ts +24 -2
  2. package/Components/CustomModal.js +77 -145
  3. package/Components/FileBrowser.d.ts +68 -130
  4. package/Components/FileBrowser.js +1405 -1987
  5. package/Components/FileViewer.d.ts +9 -82
  6. package/Components/FileViewer.js +248 -321
  7. package/Components/IconSelector.d.ts +28 -22
  8. package/Components/IconSelector.js +2122 -2073
  9. package/Components/Loader.d.ts +8 -3
  10. package/Components/Loader.js +4 -2
  11. package/Components/Loaders/MV.d.ts +12 -0
  12. package/Components/Loaders/MV.js +51 -0
  13. package/Components/Loaders/PT.d.ts +19 -38
  14. package/Components/Loaders/PT.js +153 -78
  15. package/Components/Loaders/Vendor.d.ts +19 -31
  16. package/Components/Loaders/Vendor.js +61 -79
  17. package/Components/SelectWithIcon.d.ts +23 -20
  18. package/Components/SelectWithIcon.js +143 -204
  19. package/Components/types.d.ts +0 -47
  20. package/Dialogs/Error.d.ts +3 -5
  21. package/Dialogs/Error.js +1 -3
  22. package/Dialogs/SelectFile.d.ts +53 -170
  23. package/Dialogs/SelectFile.js +100 -257
  24. package/README.md +3 -0
  25. package/icons/IconClearFilter.js.map +1 -1
  26. package/icons/IconClosed.js.map +1 -1
  27. package/icons/IconCopy.js.map +1 -1
  28. package/icons/IconDocumentReadOnly.js.map +1 -1
  29. package/icons/IconExpert.d.ts +10 -36
  30. package/icons/IconExpert.js +8 -42
  31. package/index.d.ts +2 -0
  32. package/index.js +5 -2
  33. package/package.json +2 -2
  34. package/types.d.ts +9 -7
  35. package/Components/CustomModal.js.map +0 -1
  36. package/Components/FileBrowser.js.map +0 -1
  37. package/Components/FileViewer.js.map +0 -1
  38. package/Components/IconSelector.js.map +0 -1
  39. package/Components/Loaders/PT.js.map +0 -1
  40. package/Components/Loaders/Vendor.js.map +0 -1
  41. package/Components/SelectWithIcon.js.map +0 -1
  42. package/Dialogs/SelectFile.js.map +0 -1
  43. 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
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
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
- exports["default"] = void 0;
9
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
12
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
13
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
- var _react = _interopRequireWildcard(require("react"));
15
- var _propTypes = _interopRequireDefault(require("prop-types"));
16
- var _styles = require("@mui/styles");
17
- var _material = require("@mui/material");
18
- var _Icon = _interopRequireDefault(require("./Icon"));
19
- var _Utils = _interopRequireDefault(require("./Utils"));
20
- var _i18n = _interopRequireDefault(require("../i18n"));
21
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
23
- function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
24
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
25
- var styles = function styles() {
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
- opacity: 0.5
37
+ opacity: 0.5,
29
38
  },
30
39
  icon: {
31
- width: 16,
32
- height: 16,
33
- marginRight: 8
34
- }
35
- };
40
+ width: 16,
41
+ height: 16,
42
+ marginRight: 8,
43
+ },
36
44
  };
37
- var SelectWithIcon = /*#__PURE__*/function (_Component) {
38
- (0, _inherits2["default"])(SelectWithIcon, _Component);
39
- function SelectWithIcon(props) {
40
- var _this;
41
- (0, _classCallCheck2["default"])(this, SelectWithIcon);
42
- _this = _callSuper(this, SelectWithIcon, [props]);
43
- if (_this.props.different) {
44
- _this.wordDifferent = _this.props.t(_this.props.different);
45
- }
46
- var list;
47
- if (Array.isArray(_this.props.list || _this.props.options)) {
48
- list = _this.props.list.map(function (obj) {
49
- var _obj$common, _obj$common2;
50
- return {
51
- name: _Utils["default"].getObjectNameFromObj(obj, _this.props.lang).replace('system.group.', '').replace('system.user.', '').replace('enum.rooms.', '').replace('enum.functions.', ''),
52
- value: obj._id,
53
- icon: (_obj$common = obj.common) === null || _obj$common === void 0 ? void 0 : _obj$common.icon,
54
- color: (_obj$common2 = obj.common) === null || _obj$common2 === void 0 ? void 0 : _obj$common2.color
55
- };
56
- });
57
- } else {
58
- list = Object.values(_this.props.list || _this.props.options).map(function (obj) {
59
- var _obj$common3, _obj$common4;
60
- return {
61
- name: _Utils["default"].getObjectNameFromObj(obj, _this.props.lang).replace('system.group.', '').replace('system.user.', '').replace('enum.rooms.', '').replace('enum.functions.', ''),
62
- value: obj._id,
63
- icon: (_obj$common3 = obj.common) === null || _obj$common3 === void 0 ? void 0 : _obj$common3.icon,
64
- color: (_obj$common4 = obj.common) === null || _obj$common4 === void 0 ? void 0 : _obj$common4.color
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
- if (_this.props.allowNone) {
75
- list.unshift({
76
- value: '',
77
- name: _i18n["default"].t('ra_none')
78
- });
79
- }
80
- _this.state = {
81
- list: list
82
- };
83
- return _this;
84
- }
85
- (0, _createClass2["default"])(SelectWithIcon, [{
86
- key: "render",
87
- value: function render() {
88
- var _this2 = this;
89
- if (this.props.allowNone && !this.state.list.find(function (obj) {
90
- return obj.value === '';
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
- }, this.state.list.map(function (el) {
167
- return /*#__PURE__*/_react["default"].createElement(_material.MenuItem, {
168
- className: _this2.props.different && el.value === _this2.props.different ? _this2.props.classes.different : '',
169
- style: _this2.props.different && el.value === _this2.props.different ? {} : {
170
- color: el.color || undefined,
171
- backgroundColor: _Utils["default"].getInvertedColor(el.color, _this2.props.themeType)
172
- },
173
- key: el.value,
174
- value: el.value
175
- }, el.icon ? /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
176
- src: el.icon,
177
- className: _this2.props.classes.icon
178
- }) : null, el.name);
179
- }));
180
- if (this.props.dense) {
181
- return select;
182
- }
183
- return /*#__PURE__*/_react["default"].createElement(_material.FormControl, {
184
- variant: "standard",
185
- fullWidth: !!this.props.fullWidth,
186
- style: this.props.style,
187
- className: this.props.className
188
- }, /*#__PURE__*/_react["default"].createElement(_material.InputLabel, null, this.props.label), select);
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
- return SelectWithIcon;
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);
@@ -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;
@@ -10,8 +10,8 @@ interface DialogErrorProps {
10
10
  text: string | React.JSX.Element;
11
11
  onClose?: () => void;
12
12
  classes?: {
13
- titleBackground: string;
14
- titleColor: string;
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
- /** @type {typeof DialogError} */
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
- /** @type {typeof DialogError} */
60
- const _export = DialogError;
61
- exports.default = _export;
59
+ exports.default = DialogError;