@iobroker/dm-gui-components 8.0.9 → 9.0.0

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 (64) hide show
  1. package/README.md +3 -0
  2. package/build/Communication.d.ts +10 -36
  3. package/build/Communication.js +90 -67
  4. package/build/Communication.js.map +1 -1
  5. package/build/DeviceActionButton.d.ts +3 -3
  6. package/build/DeviceActionButton.js +2 -2
  7. package/build/DeviceActionButton.js.map +1 -1
  8. package/build/DeviceCard.d.ts +28 -9
  9. package/build/DeviceCard.js +161 -63
  10. package/build/DeviceCard.js.map +1 -1
  11. package/build/DeviceControl.d.ts +5 -5
  12. package/build/DeviceControl.js.map +1 -1
  13. package/build/DeviceImageUpload.d.ts +2 -1
  14. package/build/DeviceImageUpload.js +1 -1
  15. package/build/DeviceImageUpload.js.map +1 -1
  16. package/build/DeviceList.d.ts +5 -7
  17. package/build/DeviceList.js +96 -86
  18. package/build/DeviceList.js.map +1 -1
  19. package/build/DeviceStatus.d.ts +7 -4
  20. package/build/DeviceStatus.js +37 -30
  21. package/build/DeviceStatus.js.map +1 -1
  22. package/build/InstanceActionButton.d.ts +1 -1
  23. package/build/InstanceActionButton.js.map +1 -1
  24. package/build/StateOrObjectHandler.d.ts +10 -0
  25. package/build/StateOrObjectHandler.js +141 -0
  26. package/build/StateOrObjectHandler.js.map +1 -0
  27. package/build/TooltipButton.d.ts +1 -0
  28. package/build/TooltipButton.js +4 -3
  29. package/build/TooltipButton.js.map +1 -1
  30. package/build/Utils.d.ts +1 -2
  31. package/build/Utils.js.map +1 -1
  32. package/build/hooks.d.ts +3 -0
  33. package/build/hooks.js +10 -0
  34. package/build/hooks.js.map +1 -0
  35. package/build/i18n/de.json +2 -1
  36. package/build/i18n/en.json +1 -0
  37. package/build/i18n/es.json +1 -0
  38. package/build/i18n/fr.json +1 -0
  39. package/build/i18n/it.json +1 -0
  40. package/build/i18n/nl.json +1 -0
  41. package/build/i18n/pl.json +1 -0
  42. package/build/i18n/pt.json +1 -0
  43. package/build/i18n/ru.json +1 -0
  44. package/build/i18n/uk.json +1 -0
  45. package/build/i18n/zh-cn.json +1 -0
  46. package/build/protocol/DmProtocolBase.d.ts +29 -0
  47. package/build/protocol/DmProtocolBase.js +12 -0
  48. package/build/protocol/DmProtocolBase.js.map +1 -0
  49. package/build/protocol/DmProtocolV1.d.ts +12 -0
  50. package/build/protocol/DmProtocolV1.js +22 -0
  51. package/build/protocol/DmProtocolV1.js.map +1 -0
  52. package/build/protocol/DmProtocolV2.d.ts +5 -0
  53. package/build/protocol/DmProtocolV2.js +11 -0
  54. package/build/protocol/DmProtocolV2.js.map +1 -0
  55. package/build/protocol/DmProtocolV3.d.ts +12 -0
  56. package/build/protocol/DmProtocolV3.js +28 -0
  57. package/build/protocol/DmProtocolV3.js.map +1 -0
  58. package/build/protocol/UnknownDmProtocol.d.ts +13 -0
  59. package/build/protocol/UnknownDmProtocol.js +20 -0
  60. package/build/protocol/UnknownDmProtocol.js.map +1 -0
  61. package/build/protocol/api.d.ts +2 -0
  62. package/build/protocol/api.js +2 -0
  63. package/build/protocol/api.js.map +1 -0
  64. package/package.json +8 -7
package/README.md CHANGED
@@ -23,6 +23,9 @@ render() {
23
23
  -->
24
24
 
25
25
  ## Changelog
26
+ ### 9.0.0 (2026-03-01)
27
+ - (@UncleSamSwiss) Implemented v3 protocol: added support to use states and objects as values
28
+
26
29
  ### 8.0.9 (2026-01-28)
27
30
  - (@GermanBluefox) Analyze API version and do not show anything if version is higher than supported
28
31
 
@@ -1,6 +1,7 @@
1
+ import { type Connection, type IobTheme, type ThemeName, type ThemeType } from '@iobroker/adapter-react-v5';
1
2
  import React, { Component } from 'react';
2
- import { type Connection, type ThemeName, type ThemeType, type IobTheme } from '@iobroker/adapter-react-v5';
3
- import type { ActionBase, ControlBase, ControlState, DeviceInfo, InstanceDetails, JsonFormSchema, ActionButton } from '@iobroker/dm-utils';
3
+ import type { ActionBase, ActionButton, CommunicationForm, ControlBase, ControlState, InstanceDetails, ProgressUpdate } from './protocol/api';
4
+ import type { CommandName, LoadDevicesCallback, Message } from './protocol/DmProtocolBase';
4
5
  declare module '@mui/material/Button' {
5
6
  interface ButtonPropsColorOverrides {
6
7
  grey: true;
@@ -18,19 +19,6 @@ export type CommunicationProps = {
18
19
  isFloatComma: boolean;
19
20
  dateFormat: string;
20
21
  };
21
- interface CommunicationForm {
22
- title?: ioBroker.StringOrTranslated | null | undefined;
23
- label?: ioBroker.StringOrTranslated | null | undefined;
24
- noTranslation?: boolean;
25
- schema: JsonFormSchema;
26
- data?: Record<string, any>;
27
- buttons?: (ActionButton | 'apply' | 'cancel' | 'close')[];
28
- maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
29
- /** Minimal width of the dialog */
30
- minWidth?: number;
31
- /** Always allow the apply button. Even when nothing was changed */
32
- ignoreApplyDisabled?: boolean;
33
- }
34
22
  interface CommunicationFormInState extends CommunicationForm {
35
23
  handleClose?: (data?: Record<string, any>) => void;
36
24
  originalData: string;
@@ -54,31 +42,17 @@ export type CommunicationState = {
54
42
  handleClose: (confirmation?: boolean) => void;
55
43
  } | null;
56
44
  form: CommunicationFormInState | null;
57
- progress: {
58
- open: boolean;
59
- indeterminate: boolean;
60
- } | {
61
- open: boolean;
62
- progress: number;
63
- } | null;
45
+ progress: ProgressUpdate | null;
64
46
  showConfirmation: InputAction | null;
65
47
  showInput: InputAction | null;
66
48
  inputValue: string | boolean | number | null;
49
+ selectedInstance: string;
67
50
  };
68
- interface Message {
69
- actionId?: string;
70
- deviceId?: string;
71
- value?: unknown;
72
- origin?: string;
73
- confirm?: boolean;
74
- data?: any;
75
- /** Inform backend, how long the frontend will wait for an answer */
76
- timeout?: number;
77
- }
78
51
  /**
79
- * Device List Component
52
+ * Communication Component
80
53
  */
81
54
  export default class Communication<P extends CommunicationProps, S extends CommunicationState> extends Component<P, S> {
55
+ private protocol;
82
56
  private responseTimeout;
83
57
  instanceHandler: (action: ActionBase) => () => void;
84
58
  deviceHandler: (deviceId: string, action: ActionBase, refresh: () => void) => () => void;
@@ -87,13 +61,13 @@ export default class Communication<P extends CommunicationProps, S extends Commu
87
61
  constructor(props: P);
88
62
  componentWillUnmount(): void;
89
63
  loadData(): void;
90
- sendActionToInstance: (command: `dm:${string}`, messageToSend: Message, refresh?: () => void) => void;
91
- sendControlToInstance: (command: string, messageToSend: {
64
+ sendActionToInstance: (command: CommandName, messageToSend: Message, refresh?: () => void) => void;
65
+ sendControlToInstance: (command: CommandName, messageToSend: {
92
66
  deviceId: string;
93
67
  controlId: string;
94
68
  state?: ControlState;
95
69
  }) => Promise<null | ioBroker.State>;
96
- loadDevices(): Promise<DeviceInfo[]>;
70
+ loadDevices(callback: LoadDevicesCallback): Promise<void>;
97
71
  loadInstanceInfos(): Promise<InstanceDetails>;
98
72
  renderMessageDialog(): React.JSX.Element | null;
99
73
  renderConfirmDialog(): React.JSX.Element | null;
@@ -1,13 +1,18 @@
1
- import React, { Component } from 'react';
2
- import { Backdrop, Box, Button, Checkbox, CircularProgress, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, FormControl, FormControlLabel, Grid2, IconButton, Input, InputAdornment, InputLabel, LinearProgress, MenuItem, Select, Slider, Snackbar, TextField, Typography, } from '@mui/material';
3
- import { Close, Check, ContentCopy } from '@mui/icons-material';
4
1
  import { I18n, Icon, Utils, } from '@iobroker/adapter-react-v5';
5
- import { getTranslation } from './Utils';
2
+ import { Check, Close, ContentCopy } from '@mui/icons-material';
3
+ import { Backdrop, Box, Button, Checkbox, CircularProgress, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, FormControl, FormControlLabel, Grid2, IconButton, Input, InputAdornment, InputLabel, LinearProgress, MenuItem, Select, Slider, Snackbar, TextField, Typography, } from '@mui/material';
4
+ import React, { Component } from 'react';
6
5
  import JsonConfig from './JsonConfig';
6
+ import { DmProtocolV1 } from './protocol/DmProtocolV1';
7
+ import { DmProtocolV2 } from './protocol/DmProtocolV2';
8
+ import { DmProtocolV3 } from './protocol/DmProtocolV3';
9
+ import { UnknownDmProtocol } from './protocol/UnknownDmProtocol';
10
+ import { getTranslation } from './Utils';
7
11
  /**
8
- * Device List Component
12
+ * Communication Component
9
13
  */
10
14
  export default class Communication extends Component {
15
+ protocol = new UnknownDmProtocol();
11
16
  responseTimeout = null;
12
17
  // eslint-disable-next-line react/no-unused-class-component-methods
13
18
  instanceHandler;
@@ -29,6 +34,7 @@ export default class Communication extends Component {
29
34
  showConfirmation: null,
30
35
  showInput: null,
31
36
  inputValue: null,
37
+ selectedInstance: this.props.selectedInstance ?? (window.localStorage.getItem('dmSelectedInstance') || ''),
32
38
  };
33
39
  // eslint-disable-next-line react/no-unused-class-component-methods
34
40
  this.instanceHandler = action => () => {
@@ -76,39 +82,39 @@ export default class Communication extends Component {
76
82
  sendActionToInstance = (command, messageToSend, refresh) => {
77
83
  const send = async () => {
78
84
  this.setState({ showSpinner: true });
79
- if (!this.props.selectedInstance) {
80
- throw new Error('No instance selected');
81
- }
82
85
  this.responseTimeout = setTimeout(() => {
83
86
  this.setState({ showSpinner: false });
84
87
  window.alert(I18n.t('ra_No response from the backend'));
85
88
  }, messageToSend.timeout || 5000);
86
- const response = await this.props.socket.sendTo(this.props.selectedInstance, command, messageToSend);
89
+ const response = await this.protocol.sendAction(command, messageToSend);
87
90
  if (this.responseTimeout) {
88
91
  clearTimeout(this.responseTimeout);
89
92
  this.responseTimeout = null;
90
93
  }
91
94
  const type = response.type;
92
- console.log(`Response: ${response.type}`);
93
- switch (type) {
94
- case 'message':
95
- console.log(`Message received: ${response.message}`);
96
- if (response.message) {
95
+ console.log(`Response: ${type}`);
96
+ switch (response.type) {
97
+ case 'message': {
98
+ const message = getTranslation(response.message);
99
+ console.log(`Message received: ${message}`);
100
+ if (message) {
97
101
  this.setState({
98
102
  message: {
99
- message: response.message,
103
+ message,
100
104
  handleClose: () => this.setState({ message: null }, () => this.sendActionToInstance('dm:actionProgress', { origin: response.origin }, refresh)),
101
105
  },
102
106
  showSpinner: false,
103
107
  });
104
108
  }
105
109
  break;
106
- case 'confirm':
107
- console.log(`Confirm received: ${response.confirm}`);
108
- if (response.confirm) {
110
+ }
111
+ case 'confirm': {
112
+ const message = getTranslation(response.confirm);
113
+ console.log(`Confirm received: ${message}`);
114
+ if (message) {
109
115
  this.setState({
110
116
  confirm: {
111
- message: response.confirm,
117
+ message: message,
112
118
  handleClose: (confirm) => this.setState({ confirm: null }, () => this.sendActionToInstance('dm:actionProgress', {
113
119
  origin: response.origin,
114
120
  confirm,
@@ -118,6 +124,7 @@ export default class Communication extends Component {
118
124
  });
119
125
  }
120
126
  break;
127
+ }
121
128
  case 'form':
122
129
  console.log('Form received');
123
130
  if (response.form) {
@@ -149,8 +156,12 @@ export default class Communication extends Component {
149
156
  }
150
157
  break;
151
158
  case 'progress':
159
+ console.log('Progress received', response.progress);
152
160
  if (response.progress) {
153
- if (this.state.progress) {
161
+ if (response.progress.open === false) {
162
+ this.setState({ progress: null, showSpinner: false });
163
+ }
164
+ else if (this.state.progress) {
154
165
  const progress = { ...this.state.progress, ...response.progress };
155
166
  this.setState({ progress, showSpinner: false });
156
167
  }
@@ -162,20 +173,20 @@ export default class Communication extends Component {
162
173
  break;
163
174
  case 'result':
164
175
  console.log('Response content', response.result);
165
- if (response.result.refresh) {
166
- if (response.result.refresh === true) {
176
+ if ('refresh' in response.result && response.result.refresh) {
177
+ if (response.result.refresh === true || response.result.refresh === 'all') {
167
178
  console.log('Refreshing all');
168
179
  this.loadData();
169
180
  }
170
181
  else if (response.result.refresh === 'instance') {
171
- console.log(`Refreshing instance infos: ${this.props.selectedInstance}`);
182
+ console.log(`Refreshing instance infos: ${this.state.selectedInstance}`);
172
183
  }
173
- else if (response.result.refresh === 'device') {
184
+ else if (response.result.refresh === 'devices') {
174
185
  if (!refresh) {
175
- console.log('No refresh function provided to refresh "device"');
186
+ console.log('No refresh function provided to refresh "devices"');
176
187
  }
177
188
  else {
178
- console.log(`Refreshing device infos: ${this.props.selectedInstance}`);
189
+ console.log(`Refreshing device infos: ${this.state.selectedInstance}`);
179
190
  refresh();
180
191
  }
181
192
  }
@@ -183,7 +194,7 @@ export default class Communication extends Component {
183
194
  console.log('Not refreshing anything');
184
195
  }
185
196
  }
186
- if (response.result.error) {
197
+ if ('error' in response.result && response.result.error) {
187
198
  console.error(`Error: ${response.result.error.message}`);
188
199
  this.setState({ showToast: response.result.error.message, showSpinner: false });
189
200
  }
@@ -200,15 +211,12 @@ export default class Communication extends Component {
200
211
  void send().catch(console.error);
201
212
  };
202
213
  sendControlToInstance = async (command, messageToSend) => {
203
- if (!this.props.selectedInstance) {
204
- throw new Error('No instance selected');
205
- }
206
- const response = await this.props.socket.sendTo(this.props.selectedInstance, command, messageToSend);
214
+ const response = await this.protocol.sendControl(command, messageToSend);
207
215
  const type = response.type;
208
216
  console.log(`Response: ${response.type}`);
209
217
  if (response.type === 'result') {
210
218
  console.log('Response content', response.result);
211
- if (response.result.error) {
219
+ if ('error' in response.result) {
212
220
  console.error(`Error: ${response.result.error.message}`);
213
221
  this.setState({ showToast: response.result.error.message });
214
222
  }
@@ -222,39 +230,52 @@ export default class Communication extends Component {
222
230
  return null;
223
231
  };
224
232
  // eslint-disable-next-line react/no-unused-class-component-methods
225
- loadDevices() {
226
- if (!this.props.selectedInstance) {
227
- throw new Error('No instance selected');
228
- }
229
- return this.props.socket.sendTo(this.props.selectedInstance, 'dm:listDevices');
233
+ loadDevices(callback) {
234
+ return this.protocol.loadDevices(callback);
230
235
  }
231
236
  // eslint-disable-next-line react/no-unused-class-component-methods
232
- loadInstanceInfos() {
233
- if (!this.props.selectedInstance) {
237
+ async loadInstanceInfos() {
238
+ if (!this.state.selectedInstance) {
234
239
  throw new Error('No instance selected');
235
240
  }
236
- return this.props.socket.sendTo(this.props.selectedInstance, 'dm:instanceInfo');
241
+ const details = await this.props.socket.sendTo(this.state.selectedInstance, 'dm:instanceInfo');
242
+ console.log('Instance details of', this.state.selectedInstance, details);
243
+ if (details.apiVersion === 'v1') {
244
+ this.protocol = new DmProtocolV1(this.state.selectedInstance, this.props.socket);
245
+ }
246
+ else if (details.apiVersion === 'v2') {
247
+ this.protocol = new DmProtocolV2(this.state.selectedInstance, this.props.socket);
248
+ }
249
+ else if (details.apiVersion === 'v3') {
250
+ this.protocol = new DmProtocolV3(this.state.selectedInstance, this.props.socket);
251
+ }
252
+ else {
253
+ this.protocol = new UnknownDmProtocol();
254
+ }
255
+ return this.protocol.convertInstanceDetails(details);
237
256
  }
238
257
  renderMessageDialog() {
239
258
  if (!this.state.message) {
240
259
  return null;
241
260
  }
242
- return (React.createElement(Dialog, { open: !0, onClose: () => this.state.message?.handleClose(), hideBackdrop: true, "aria-describedby": "message-dialog-description" },
261
+ const message = this.state.message;
262
+ return (React.createElement(Dialog, { open: !0, onClose: () => message.handleClose(), hideBackdrop: true, "aria-describedby": "message-dialog-description" },
243
263
  React.createElement(DialogContent, null,
244
- React.createElement(DialogContentText, { id: "message-dialog-description" }, this.state.message?.message)),
264
+ React.createElement(DialogContentText, { id: "message-dialog-description" }, message.message)),
245
265
  React.createElement(DialogActions, null,
246
- React.createElement(Button, { color: "primary", onClick: () => this.state.message?.handleClose(), variant: "contained", autoFocus: true }, getTranslation('okButtonText')))));
266
+ React.createElement(Button, { color: "primary", onClick: () => message.handleClose(), variant: "contained", autoFocus: true }, getTranslation('okButtonText')))));
247
267
  }
248
268
  renderConfirmDialog() {
249
269
  if (!this.state.confirm) {
250
270
  return null;
251
271
  }
252
- return (React.createElement(Dialog, { open: !0, onClose: () => this.state.confirm?.handleClose(), hideBackdrop: true, "aria-describedby": "confirm-dialog-description" },
272
+ const confirm = this.state.confirm;
273
+ return (React.createElement(Dialog, { open: !0, onClose: () => confirm.handleClose(), hideBackdrop: true, "aria-describedby": "confirm-dialog-description" },
253
274
  React.createElement(DialogContent, null,
254
- React.createElement(DialogContentText, { id: "confirm-dialog-description" }, getTranslation(this.state.confirm?.message))),
275
+ React.createElement(DialogContentText, { id: "confirm-dialog-description" }, getTranslation(confirm.message))),
255
276
  React.createElement(DialogActions, null,
256
- React.createElement(Button, { variant: "contained", color: "primary", onClick: () => this.state.confirm?.handleClose(true), autoFocus: true }, getTranslation('yesButtonText')),
257
- React.createElement(Button, { variant: "contained", color: "grey", onClick: () => this.state.confirm?.handleClose(false), autoFocus: true }, getTranslation('noButtonText')))));
277
+ React.createElement(Button, { variant: "contained", color: "primary", onClick: () => confirm.handleClose(true), autoFocus: true }, getTranslation('yesButtonText')),
278
+ React.createElement(Button, { variant: "contained", color: "grey", onClick: () => confirm.handleClose(false), autoFocus: true }, getTranslation('noButtonText')))));
258
279
  }
259
280
  renderSnackbar() {
260
281
  return (React.createElement(Snackbar, { open: !!this.state.showToast, autoHideDuration: 6_000, onClose: () => this.setState({ showToast: null }), message: this.state.showToast }));
@@ -288,13 +309,14 @@ export default class Communication extends Component {
288
309
  if (!this.state.form?.schema) {
289
310
  return null;
290
311
  }
291
- if (!this.props.selectedInstance) {
312
+ if (!this.state.selectedInstance) {
292
313
  throw new Error('No instance selected');
293
314
  }
315
+ const form = this.state.form;
294
316
  let buttons;
295
- if (this.state.form.buttons) {
317
+ if (form.buttons) {
296
318
  buttons = [];
297
- this.state.form.buttons.forEach((button) => {
319
+ form.buttons.forEach((button) => {
298
320
  if (typeof button === 'object' && button.type === 'copyToClipboard') {
299
321
  buttons.push(React.createElement(Button, { key: "copyToClipboard", variant: button.variant || 'outlined', color: button.color === 'primary'
300
322
  ? 'primary'
@@ -306,8 +328,8 @@ export default class Communication extends Component {
306
328
  : undefined,
307
329
  ...(button.style || undefined),
308
330
  }, onClick: () => {
309
- if (button.copyToClipboardAttr && this.state.form.data) {
310
- const val = this.state.form.data[button.copyToClipboardAttr];
331
+ if (button.copyToClipboardAttr && form.data) {
332
+ const val = form.data[button.copyToClipboardAttr];
311
333
  if (typeof val === 'string') {
312
334
  Utils.copyToClipboard(val);
313
335
  }
@@ -316,8 +338,8 @@ export default class Communication extends Component {
316
338
  }
317
339
  window.alert(I18n.t('copied'));
318
340
  }
319
- else if (this.state.form?.data) {
320
- Utils.copyToClipboard(JSON.stringify(this.state.form.data, null, 2));
341
+ else if (form.data) {
342
+ Utils.copyToClipboard(JSON.stringify(form.data, null, 2));
321
343
  window.alert(I18n.t('copied'));
322
344
  }
323
345
  else {
@@ -336,18 +358,15 @@ export default class Communication extends Component {
336
358
  else {
337
359
  buttons = [this.getOkButton(), this.getCancelButton()];
338
360
  }
339
- return (React.createElement(Dialog, { open: !0, onClose: () => this.state.form.handleClose?.(), hideBackdrop: true, fullWidth: true, sx: {
361
+ return (React.createElement(Dialog, { onClose: () => form.handleClose?.(), hideBackdrop: true, fullWidth: true, open: true, sx: {
340
362
  '& .MuiDialog-paper': {
341
- minWidth: this.state.form.minWidth || undefined,
363
+ minWidth: form.minWidth || undefined,
342
364
  },
343
- }, maxWidth: this.state.form.maxWidth || 'md' },
344
- this.state.form?.title ? (React.createElement(DialogTitle, null, getTranslation(this.state.form?.label || this.state.form?.title, this.state.form.noTranslation))) : null,
365
+ }, maxWidth: form.maxWidth || 'md' },
366
+ form.title ? (React.createElement(DialogTitle, null, getTranslation(form.label || form.title, form.noTranslation))) : null,
345
367
  React.createElement(DialogContent, null,
346
- React.createElement(JsonConfig, { instanceId: this.props.selectedInstance, schema: this.state.form.schema, data: this.state.form.data || {}, socket: this.props.socket, onChange: (data) => {
368
+ React.createElement(JsonConfig, { instanceId: this.state.selectedInstance, schema: form.schema, data: form.data || {}, socket: this.props.socket, onChange: (data) => {
347
369
  console.log('handleFormChange', { data });
348
- const form = {
349
- ...this.state.form,
350
- };
351
370
  if (form) {
352
371
  form.data = data;
353
372
  form.changed = JSON.stringify(data) !== form.originalData;
@@ -357,10 +376,14 @@ export default class Communication extends Component {
357
376
  React.createElement(DialogActions, null, buttons)));
358
377
  }
359
378
  renderProgressDialog() {
360
- if (!this.state.progress?.open) {
379
+ if (!this.state.progress) {
361
380
  return null;
362
381
  }
363
- return (React.createElement(Dialog, { open: !0, onClose: () => { }, hideBackdrop: true }, this.state.progress.indeterminate ? (React.createElement(LinearProgress, { variant: "indeterminate" })) : (React.createElement(LinearProgress, { variant: "determinate", value: this.state.progress.progress || 0 }))));
382
+ return (React.createElement(Dialog, { onClose: () => { }, hideBackdrop: true, open: true },
383
+ this.state.progress.title && React.createElement(DialogTitle, null, getTranslation(this.state.progress.title)),
384
+ React.createElement(DialogContent, null,
385
+ this.state.progress.label && (React.createElement(DialogContentText, null, getTranslation(this.state.progress.label))),
386
+ React.createElement(LinearProgress, { variant: this.state.progress.indeterminate ? 'indeterminate' : 'determinate', value: this.state.progress.value }))));
364
387
  }
365
388
  // eslint-disable-next-line class-methods-use-this
366
389
  renderContent() {
@@ -370,14 +393,14 @@ export default class Communication extends Component {
370
393
  if (!this.state.showSpinner) {
371
394
  return null;
372
395
  }
373
- return (React.createElement(Backdrop, { style: { zIndex: 1000 }, open: !0 },
396
+ return (React.createElement(Backdrop, { style: { zIndex: 1000 }, open: true },
374
397
  React.createElement(CircularProgress, null)));
375
398
  }
376
399
  renderConfirmationDialog() {
377
400
  if (!this.state.showConfirmation) {
378
401
  return null;
379
402
  }
380
- return (React.createElement(Dialog, { open: !0, onClose: () => this.setState({ showConfirmation: null }) },
403
+ return (React.createElement(Dialog, { onClose: () => this.setState({ showConfirmation: null }), open: true },
381
404
  React.createElement(DialogTitle, null, getTranslation(this.state.showConfirmation.confirmation === true
382
405
  ? getTranslation('areYouSureText')
383
406
  : getTranslation(this.state.showConfirmation.confirmation))),
@@ -453,7 +476,7 @@ export default class Communication extends Component {
453
476
  okDisabled = !this.state.inputValue;
454
477
  }
455
478
  }
456
- return (React.createElement(Dialog, { open: !0, onClose: () => this.setState({ showInput: null }) },
479
+ return (React.createElement(Dialog, { onClose: () => this.setState({ showInput: null }), open: true },
457
480
  React.createElement(DialogTitle, null, getTranslation('pleaseEnterValueText')),
458
481
  React.createElement(DialogContent, null,
459
482
  this.state.showInput.inputBefore.type === 'text' ||