@iobroker/adapter-react-v5 4.13.11 → 4.13.12
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/FileBrowser.d.ts +1 -1
- package/Components/FileViewer.d.ts +1 -1
- package/Components/ObjectBrowser.d.ts +61 -734
- package/Components/ObjectBrowser.js +4895 -6706
- package/Components/Router.d.ts +3 -3
- package/Components/Router.js +2 -5
- package/Components/TabContainer.d.ts +1 -1
- package/Components/Utils.js +2 -1
- package/Components/withWidth.d.ts +2 -1
- package/Components/withWidth.js +18 -30
- package/Dialogs/TextInput.d.ts +1 -1
- package/GenericApp.d.ts +1 -1
- package/LegacyConnection.d.ts +2 -2
- package/README.md +3 -0
- package/index.d.ts +1 -0
- package/index.js +5 -4
- package/package.json +8 -8
- package/Components/ObjectBrowser.js.map +0 -1
- package/Components/withWidth.js.map +0 -1
|
@@ -1,739 +1,66 @@
|
|
|
1
|
-
export default _export;
|
|
2
|
-
export type FormatValueOptions = {
|
|
3
|
-
state: ioBroker.State;
|
|
4
|
-
obj: Record<string, any>;
|
|
5
|
-
texts: Record<string, any>;
|
|
6
|
-
dateFormat: any;
|
|
7
|
-
isFloatComma: boolean;
|
|
8
|
-
};
|
|
9
|
-
export type GetValueStyleOptions = {
|
|
10
|
-
state: ioBroker.State;
|
|
11
|
-
isExpertMode: boolean;
|
|
12
|
-
isButton: boolean;
|
|
13
|
-
};
|
|
14
|
-
/** @type {typeof ObjectBrowser} */
|
|
15
|
-
declare const _export: typeof ObjectBrowser;
|
|
16
1
|
/**
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* @private
|
|
28
|
-
* @param {number} depth
|
|
29
|
-
* @param {any[]} expanded
|
|
30
|
-
*/
|
|
31
|
-
private static collapseDepth;
|
|
32
|
-
/**
|
|
33
|
-
* @private
|
|
34
|
-
* @param {any} obj
|
|
35
|
-
* @param {any} it
|
|
36
|
-
*/
|
|
37
|
-
private static getCustomValue;
|
|
38
|
-
/**
|
|
39
|
-
* @private
|
|
40
|
-
* @param {any} obj
|
|
41
|
-
* @param {any} it
|
|
42
|
-
* @param {any} value
|
|
43
|
-
*/
|
|
44
|
-
private static setCustomValue;
|
|
45
|
-
/**
|
|
46
|
-
* @param {import('./types').ObjectBrowserProps} props
|
|
47
|
-
*/
|
|
48
|
-
constructor(props: import('./types').ObjectBrowserProps);
|
|
49
|
-
lastSelectedItems: any;
|
|
50
|
-
tableRef: React.RefObject<any>;
|
|
51
|
-
filterRefs: {};
|
|
52
|
-
lastAppliedFilter: any;
|
|
53
|
-
pausedSubscribes: boolean;
|
|
54
|
-
selectedFound: boolean;
|
|
55
|
-
root: {
|
|
56
|
-
data: {
|
|
57
|
-
name: string;
|
|
58
|
-
id: string;
|
|
59
|
-
};
|
|
60
|
-
children: any[];
|
|
61
|
-
};
|
|
62
|
-
states: {};
|
|
63
|
-
subscribes: any[];
|
|
64
|
-
statesUpdateTimer: any;
|
|
65
|
-
objectsUpdateTimer: any;
|
|
66
|
-
visibleCols: any[];
|
|
67
|
-
possibleCols: string[];
|
|
68
|
-
imagePrefix: string;
|
|
69
|
-
state: {
|
|
70
|
-
loaded: boolean;
|
|
71
|
-
foldersFirst: any;
|
|
72
|
-
selected: string[];
|
|
73
|
-
selectedNonObject: any;
|
|
74
|
-
filter: any;
|
|
75
|
-
filterKey: number;
|
|
76
|
-
depth: number;
|
|
77
|
-
expandAllVisible: boolean;
|
|
78
|
-
expanded: any;
|
|
79
|
-
toast: string;
|
|
80
|
-
scrollBarWidth: number;
|
|
81
|
-
customDialog: any[];
|
|
82
|
-
editObjectDialog: string;
|
|
83
|
-
editObjectAlias: boolean;
|
|
84
|
-
viewFileDialog: string;
|
|
85
|
-
showAliasEditor: string;
|
|
86
|
-
enumDialog: any;
|
|
87
|
-
roleDialog: any;
|
|
88
|
-
statesView: boolean;
|
|
89
|
-
columns: any;
|
|
90
|
-
columnsForAdmin: any;
|
|
91
|
-
columnsSelectorShow: boolean;
|
|
92
|
-
columnsAuto: boolean;
|
|
93
|
-
columnsWidths: any;
|
|
94
|
-
columnsDialogTransparent: number;
|
|
95
|
-
columnsEditCustomDialog: any;
|
|
96
|
-
customColumnDialogValueChanged: boolean;
|
|
97
|
-
showExportDialog: boolean;
|
|
98
|
-
showAllExportOptions: boolean;
|
|
99
|
-
linesEnabled: boolean;
|
|
100
|
-
showDescription: boolean;
|
|
101
|
-
showContextMenu: any;
|
|
102
|
-
noStatesByExportImport: boolean;
|
|
103
|
-
beautifyJsonExport: boolean;
|
|
104
|
-
excludeSystemRepositoriesFromExport: boolean;
|
|
105
|
-
excludeTranslations: boolean;
|
|
106
|
-
};
|
|
107
|
-
edit: {};
|
|
108
|
-
texts: {
|
|
109
|
-
value: string;
|
|
110
|
-
ack: string;
|
|
111
|
-
ts: string;
|
|
112
|
-
lc: string;
|
|
113
|
-
from: string;
|
|
114
|
-
user: string;
|
|
115
|
-
c: string;
|
|
116
|
-
quality: string;
|
|
117
|
-
editObject: string;
|
|
118
|
-
deleteObject: string;
|
|
119
|
-
customConfig: string;
|
|
120
|
-
copyState: string;
|
|
121
|
-
editState: string;
|
|
122
|
-
close: string;
|
|
123
|
-
filter_id: string;
|
|
124
|
-
filter_name: string;
|
|
125
|
-
filter_type: string;
|
|
126
|
-
filter_role: string;
|
|
127
|
-
filter_room: string;
|
|
128
|
-
filter_func: string;
|
|
129
|
-
filter_custom: string;
|
|
130
|
-
filterCustomsWithout: string;
|
|
131
|
-
objectChangedByUser: string;
|
|
132
|
-
objectChangedBy: string;
|
|
133
|
-
objectChangedFrom: string;
|
|
134
|
-
stateChangedBy: string;
|
|
135
|
-
stateChangedFrom: string;
|
|
136
|
-
ownerGroup: string;
|
|
137
|
-
ownerUser: string;
|
|
138
|
-
deviceError: string;
|
|
139
|
-
deviceDisconnected: string;
|
|
140
|
-
deviceConnected: string;
|
|
141
|
-
aclOwner_read_object: string;
|
|
142
|
-
aclOwner_read_state: string;
|
|
143
|
-
aclOwner_write_object: string;
|
|
144
|
-
aclOwner_write_state: string;
|
|
145
|
-
aclGroup_read_object: string;
|
|
146
|
-
aclGroup_read_state: string;
|
|
147
|
-
aclGroup_write_object: string;
|
|
148
|
-
aclGroup_write_state: string;
|
|
149
|
-
aclEveryone_read_object: string;
|
|
150
|
-
aclEveryone_read_state: string;
|
|
151
|
-
aclEveryone_write_object: string;
|
|
152
|
-
aclEveryone_write_state: string;
|
|
153
|
-
create: string;
|
|
154
|
-
createBooleanState: string;
|
|
155
|
-
createNumberState: string;
|
|
156
|
-
createStringState: string;
|
|
157
|
-
createState: string;
|
|
158
|
-
createChannel: string;
|
|
159
|
-
createDevice: string;
|
|
160
|
-
createFolder: string;
|
|
161
|
-
};
|
|
162
|
-
levelPadding: any;
|
|
163
|
-
storedWidths: any;
|
|
164
|
-
customWidth: boolean;
|
|
165
|
-
loadAllObjects(update: any): Promise<void>;
|
|
166
|
-
systemConfig: any;
|
|
167
|
-
objects: any;
|
|
168
|
-
defaultHistory: any;
|
|
169
|
-
info: {
|
|
170
|
-
funcEnums: any[];
|
|
171
|
-
roomEnums: any[];
|
|
172
|
-
roles: any[];
|
|
173
|
-
ids: any[];
|
|
174
|
-
types: any[];
|
|
175
|
-
objects: any;
|
|
176
|
-
customs: string[];
|
|
177
|
-
enums: any[];
|
|
178
|
-
hasSomeCustoms: boolean;
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Check if it is a non-expert id
|
|
182
|
-
*
|
|
183
|
-
* @param id id to test
|
|
184
|
-
* @return {boolean}
|
|
185
|
-
*/
|
|
186
|
-
isNonExpertId(id: any): boolean;
|
|
187
|
-
/**
|
|
188
|
-
* @private
|
|
189
|
-
* @param {ioBroker.EmptyCallback?} cb
|
|
190
|
-
*/
|
|
191
|
-
private expandAllSelected;
|
|
192
|
-
/**
|
|
193
|
-
* @private
|
|
194
|
-
* @param {boolean} [isDouble]
|
|
195
|
-
*/
|
|
196
|
-
private onAfterSelect;
|
|
197
|
-
/**
|
|
198
|
-
* Called when component is mounted.
|
|
199
|
-
*/
|
|
200
|
-
componentDidMount(): Promise<void>;
|
|
201
|
-
/**
|
|
202
|
-
* Called when component is unmounted.
|
|
203
|
-
*/
|
|
204
|
-
componentWillUnmount(): void;
|
|
205
|
-
filterTimer: NodeJS.Timeout;
|
|
206
|
-
/** @typedef {{ id: string, obj: ioBroker.Object, item: any }} ShowDeleteDialogOptions */
|
|
207
|
-
/**
|
|
208
|
-
* Show the delete dialog for a given object
|
|
209
|
-
*
|
|
210
|
-
* @param {ShowDeleteDialogOptions} options
|
|
211
|
-
*/
|
|
212
|
-
showDeleteDialog(options: {
|
|
213
|
-
id: string;
|
|
214
|
-
obj: ioBroker.Object;
|
|
215
|
-
item: any;
|
|
216
|
-
}): void;
|
|
217
|
-
/**
|
|
218
|
-
* Context menu handler.
|
|
219
|
-
*/
|
|
220
|
-
onContextMenu: (e: any) => void;
|
|
221
|
-
contextMenu: {
|
|
222
|
-
item: any;
|
|
223
|
-
ts: number;
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* Called when component is mounted.
|
|
227
|
-
*/
|
|
228
|
-
refreshComponent(): void;
|
|
229
|
-
/**
|
|
230
|
-
* Renders the error dialog.
|
|
231
|
-
* @returns {JSX.Element | null}
|
|
232
|
-
*/
|
|
233
|
-
renderErrorDialog(): JSX.Element | null;
|
|
234
|
-
/**
|
|
235
|
-
* Show the error dialog.
|
|
236
|
-
* @param {any} error
|
|
237
|
-
*/
|
|
238
|
-
showError(error: any): void;
|
|
239
|
-
/**
|
|
240
|
-
* Called when an item is selected/deselected.
|
|
241
|
-
* @param {string} toggleItem
|
|
242
|
-
* @param {boolean} [isDouble]
|
|
243
|
-
*/
|
|
244
|
-
onSelect(toggleItem: string, isDouble?: boolean, cb: any): void;
|
|
245
|
-
/**
|
|
246
|
-
* @private
|
|
247
|
-
* @param {boolean} isLast
|
|
248
|
-
*/
|
|
249
|
-
private _renderDefinedList;
|
|
250
|
-
/**
|
|
251
|
-
* Renders the columns' selector.
|
|
252
|
-
* @returns {JSX.Element | null}
|
|
253
|
-
*/
|
|
254
|
-
renderColumnsSelectorDialog(): JSX.Element | null;
|
|
255
|
-
/**
|
|
256
|
-
* @private
|
|
257
|
-
*/
|
|
258
|
-
private getAdditionalColumns;
|
|
259
|
-
/**
|
|
260
|
-
* @private
|
|
261
|
-
*/
|
|
262
|
-
private checkUnsubscribes;
|
|
263
|
-
recordStates: any[];
|
|
264
|
-
/**
|
|
265
|
-
* Find an item.
|
|
266
|
-
* @param {string} id
|
|
267
|
-
* @param {string[] | undefined} [_parts]
|
|
268
|
-
* @param {{ data: { name: string; id: string; }; children: never[]; } | null | undefined} [_root]
|
|
269
|
-
* @param {string | undefined} [_partyId]
|
|
270
|
-
* @returns {any}
|
|
271
|
-
*/
|
|
272
|
-
findItem(id: string, _parts?: string[] | undefined, _root?: {
|
|
273
|
-
data: {
|
|
274
|
-
name: string;
|
|
275
|
-
id: string;
|
|
276
|
-
};
|
|
277
|
-
children: never[];
|
|
278
|
-
} | null | undefined, _partyId?: string | undefined): any;
|
|
279
|
-
/**
|
|
280
|
-
* Called when a state changes.
|
|
281
|
-
* @param {string} id
|
|
282
|
-
* @param {ioBroker.State} state
|
|
283
|
-
*/
|
|
284
|
-
onStateChange: (id: string, state: ioBroker.State) => void;
|
|
285
|
-
/**
|
|
286
|
-
* @private
|
|
287
|
-
* @param {{ [x: string]: any; }} columnsForAdmin
|
|
288
|
-
* @param {any} obj
|
|
289
|
-
*/
|
|
290
|
-
private parseObjectForAdmins;
|
|
291
|
-
/**
|
|
292
|
-
* @param {string} id
|
|
293
|
-
* @param {ioBroker.Object} obj
|
|
294
|
-
*/
|
|
295
|
-
onObjectChange: (id: string, obj: ioBroker.Object) => void;
|
|
296
|
-
/**
|
|
297
|
-
* Processes a single element in regard to certain filters, columns for admin and updates object dict
|
|
298
|
-
* @param id The id of the object
|
|
299
|
-
* @param obj The object itself
|
|
300
|
-
* @returns {{filtered: boolean, newInnerState: null}} Returns an object containing the new state (if any) and whether the object was filtered.
|
|
301
|
-
*/
|
|
302
|
-
processOnObjectChangeElement(id: any, obj: any): {
|
|
303
|
-
filtered: boolean;
|
|
304
|
-
newInnerState: null;
|
|
305
|
-
};
|
|
306
|
-
/**
|
|
307
|
-
* @private
|
|
308
|
-
* @param {string} id
|
|
309
|
-
*/
|
|
310
|
-
private subscribe;
|
|
311
|
-
/**
|
|
312
|
-
* @private
|
|
313
|
-
* @param {string} id
|
|
314
|
-
*/
|
|
315
|
-
private unsubscribe;
|
|
316
|
-
/**
|
|
317
|
-
* @private
|
|
318
|
-
* @param {boolean} isPause
|
|
319
|
-
*/
|
|
320
|
-
private pauseSubscribe;
|
|
321
|
-
/**
|
|
322
|
-
* @private
|
|
323
|
-
* @param {string} [name]
|
|
324
|
-
* @param {boolean} [value]
|
|
325
|
-
*/
|
|
326
|
-
private onFilter;
|
|
327
|
-
clearFilter(): void;
|
|
328
|
-
isFilterEmpty(): boolean;
|
|
329
|
-
/**
|
|
330
|
-
* @private
|
|
331
|
-
* @param {string} name
|
|
332
|
-
*/
|
|
333
|
-
private getFilterInput;
|
|
334
|
-
/**
|
|
335
|
-
* @private
|
|
336
|
-
* @param {string} name
|
|
337
|
-
* @param {any[]} values
|
|
338
|
-
*/
|
|
339
|
-
private getFilterSelect;
|
|
340
|
-
/**
|
|
341
|
-
* @private
|
|
342
|
-
*/
|
|
343
|
-
private getFilterSelectRole;
|
|
344
|
-
/**
|
|
345
|
-
* @private
|
|
346
|
-
*/
|
|
347
|
-
private getFilterSelectRoom;
|
|
348
|
-
/**
|
|
349
|
-
* @private
|
|
350
|
-
*/
|
|
351
|
-
private getFilterSelectFunction;
|
|
352
|
-
/**
|
|
353
|
-
* @private
|
|
354
|
-
*/
|
|
355
|
-
private getFilterSelectType;
|
|
356
|
-
/**
|
|
357
|
-
* @private
|
|
358
|
-
*/
|
|
359
|
-
private getFilterSelectCustoms;
|
|
360
|
-
/**
|
|
361
|
-
* @private
|
|
362
|
-
* @param {any} [root]
|
|
363
|
-
* @param {any[]} [expanded]
|
|
364
|
-
*/
|
|
365
|
-
private onExpandAll;
|
|
366
|
-
/**
|
|
367
|
-
* @private
|
|
368
|
-
*/
|
|
369
|
-
private onCollapseAll;
|
|
370
|
-
/**
|
|
371
|
-
* @private
|
|
372
|
-
* @param {any} root
|
|
373
|
-
* @param {number} depth
|
|
374
|
-
* @param {any[]} expanded
|
|
375
|
-
*/
|
|
376
|
-
private expandDepth;
|
|
377
|
-
/**
|
|
378
|
-
* @private
|
|
379
|
-
*/
|
|
380
|
-
private onExpandVisible;
|
|
381
|
-
/**
|
|
382
|
-
* @private
|
|
383
|
-
*/
|
|
384
|
-
private onStatesViewVisible;
|
|
385
|
-
/**
|
|
386
|
-
* @private
|
|
387
|
-
*/
|
|
388
|
-
private onCollapseVisible;
|
|
389
|
-
/**
|
|
390
|
-
* @private
|
|
391
|
-
* @param {string} id
|
|
392
|
-
*/
|
|
393
|
-
private getEnumsForId;
|
|
394
|
-
/**
|
|
395
|
-
* @private
|
|
396
|
-
* @param {array} enums
|
|
397
|
-
* @param {string} objId
|
|
398
|
-
*/
|
|
399
|
-
private _createAllEnums;
|
|
400
|
-
/**
|
|
401
|
-
* @private
|
|
402
|
-
* @param {any} objs
|
|
403
|
-
*/
|
|
404
|
-
private loadObjects;
|
|
405
|
-
_getSelectedIdsForExport(): string[];
|
|
406
|
-
/**
|
|
407
|
-
* Exports the selected objects based on the given options and triggers file generation
|
|
408
|
-
* @param options Options to filter/reduce the output
|
|
409
|
-
* @param options.isAll {boolean} Whether all objects should be exported or only the selected ones
|
|
410
|
-
* @param options.beautify {boolean} Whether the output should be beautified
|
|
411
|
-
* @param options.excludeSystemRepositories {boolean} Whether "system.repositories" should be excluded
|
|
412
|
-
* @param options.excludeTranslations {boolean} Whether translations should be reduced to only the english value
|
|
413
|
-
* @returns {Promise<void>}
|
|
414
|
-
* @private
|
|
415
|
-
*/
|
|
416
|
-
private _exportObjects;
|
|
417
|
-
renderExportDialog(): React.JSX.Element;
|
|
418
|
-
/**
|
|
419
|
-
* @private
|
|
420
|
-
* @param {object} evt
|
|
421
|
-
*/
|
|
422
|
-
private handleJsonUpload;
|
|
423
|
-
toolTipObjectCreating: () => string | React.JSX.Element[];
|
|
424
|
-
/**
|
|
425
|
-
* Renders the toolbar.
|
|
426
|
-
* @returns {JSX.Element}
|
|
427
|
-
*/
|
|
428
|
-
getToolbar(): JSX.Element;
|
|
429
|
-
/**
|
|
430
|
-
* @private
|
|
431
|
-
* @param {string} id
|
|
432
|
-
*/
|
|
433
|
-
private toggleExpanded;
|
|
434
|
-
/**
|
|
435
|
-
* @private
|
|
436
|
-
* @param {Event} e
|
|
437
|
-
* @param {string} text
|
|
438
|
-
*/
|
|
439
|
-
private onCopy;
|
|
440
|
-
renderTooltipAccessControl: (acl: any) => React.JSX.Element | "";
|
|
441
|
-
/**
|
|
442
|
-
* @param {string} id
|
|
443
|
-
* @param {{ data: { obj: { type: string; }; hasCustoms: any; }; }} item
|
|
444
|
-
* @param {{ cellButtonsButton: string | undefined; cellButtonsButtonAlone: any; cellButtonsButtonIcon: string | undefined; cellButtonsButtonWithCustoms: any; }} classes
|
|
445
|
-
*/
|
|
446
|
-
renderColumnButtons(id: string, item: {
|
|
447
|
-
data: {
|
|
448
|
-
obj: {
|
|
449
|
-
type: string;
|
|
450
|
-
};
|
|
451
|
-
hasCustoms: any;
|
|
2
|
+
* Copyright 2020-2024, Denis Haev <dogafox@gmail.com>
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* */
|
|
7
|
+
import React from 'react';
|
|
8
|
+
declare global {
|
|
9
|
+
interface Window {
|
|
10
|
+
sparkline: {
|
|
11
|
+
sparkline: (el: HTMLDivElement, data: number[]) => React.JSX.Element;
|
|
452
12
|
};
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
*/
|
|
496
|
-
private onColumnsEditCustomDialogClose;
|
|
497
|
-
customColumnDialog: {
|
|
498
|
-
type: any;
|
|
499
|
-
initValue: any;
|
|
500
|
-
value: any;
|
|
501
|
-
};
|
|
502
|
-
/**
|
|
503
|
-
* @private
|
|
504
|
-
*/
|
|
505
|
-
private renderColumnsEditCustomDialog;
|
|
506
|
-
/**
|
|
507
|
-
* Renders a custom value.
|
|
508
|
-
* @param {any} obj
|
|
509
|
-
* @param {any} it
|
|
510
|
-
* @param {any} item
|
|
511
|
-
* @returns {JSX.Element | null}
|
|
512
|
-
*/
|
|
513
|
-
renderCustomValue(obj: any, it: any, item: any): JSX.Element | null;
|
|
514
|
-
/**
|
|
515
|
-
* Renders a leaf.
|
|
516
|
-
* @param {any} item
|
|
517
|
-
* @param {boolean} isExpanded
|
|
518
|
-
* @param {Record<string, any>} classes
|
|
519
|
-
* @param {{ count: number; }} counter
|
|
520
|
-
* @returns {JSX.Element}
|
|
521
|
-
*/
|
|
522
|
-
renderLeaf(item: any, isExpanded: boolean, classes: Record<string, any>, counter: {
|
|
523
|
-
count: number;
|
|
524
|
-
}): JSX.Element;
|
|
525
|
-
/**
|
|
526
|
-
* Renders an item.
|
|
527
|
-
* @param {any} root
|
|
528
|
-
* @param {boolean} isExpanded
|
|
529
|
-
* @param {Record<string, any>} classes
|
|
530
|
-
* @param {{ count: any; }} [counter]
|
|
531
|
-
* @returns {JSX.Element[]}
|
|
532
|
-
*/
|
|
533
|
-
renderItem(root: any, isExpanded: boolean, classes: Record<string, any>, counter?: {
|
|
534
|
-
count: any;
|
|
535
|
-
}): JSX.Element[];
|
|
536
|
-
/**
|
|
537
|
-
* @private
|
|
538
|
-
* @param {boolean} [columnsAuto]
|
|
539
|
-
* @param {string[]} [columns]
|
|
540
|
-
* @param {any} [columnsForAdmin]
|
|
541
|
-
* @param {Record<string, number>} [columnsWidths]
|
|
542
|
-
*/
|
|
543
|
-
private calculateColumnsVisibility;
|
|
544
|
-
adapterColumns: any[];
|
|
545
|
-
columnsVisibility: {
|
|
546
|
-
id: string | number;
|
|
547
|
-
name: any;
|
|
548
|
-
nameHeader: any;
|
|
549
|
-
type: any;
|
|
550
|
-
role: any;
|
|
551
|
-
room: any;
|
|
552
|
-
func: any;
|
|
553
|
-
changedFrom: any;
|
|
554
|
-
qualityCode: any;
|
|
555
|
-
timestamp: any;
|
|
556
|
-
lastChange: any;
|
|
557
|
-
val: any;
|
|
558
|
-
buttons: any;
|
|
559
|
-
} | {
|
|
560
|
-
id: string | number;
|
|
561
|
-
name: any;
|
|
562
|
-
type: any;
|
|
563
|
-
role: any;
|
|
564
|
-
room: any;
|
|
565
|
-
func: any;
|
|
566
|
-
nameHeader?: undefined;
|
|
567
|
-
changedFrom?: undefined;
|
|
568
|
-
qualityCode?: undefined;
|
|
569
|
-
timestamp?: undefined;
|
|
570
|
-
lastChange?: undefined;
|
|
571
|
-
val?: undefined;
|
|
572
|
-
buttons?: undefined;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export interface TreeItemData {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
obj?: ioBroker.Object;
|
|
19
|
+
/** Object ID in lower case for filtering */
|
|
20
|
+
fID?: string;
|
|
21
|
+
/** translated common.name in lower case for filtering */
|
|
22
|
+
fName?: string;
|
|
23
|
+
/** Link to parent item */
|
|
24
|
+
parent?: TreeItem;
|
|
25
|
+
level?: number;
|
|
26
|
+
icon?: string | React.JSX.Element | null;
|
|
27
|
+
/** If the item existing object or generated folder */
|
|
28
|
+
generated?: boolean;
|
|
29
|
+
title?: string;
|
|
30
|
+
/** if the item has "write" button (value=true, ack=false) */
|
|
31
|
+
button?: boolean;
|
|
32
|
+
/** if the item has custom settings in `common.custom` */
|
|
33
|
+
hasCustoms?: boolean;
|
|
34
|
+
/** If this item is visible */
|
|
35
|
+
visible?: boolean;
|
|
36
|
+
/** Is any of the children visible (not only directly children) */
|
|
37
|
+
hasVisibleChildren?: boolean;
|
|
38
|
+
/** Is any of the parents visible (not only directly parent) */
|
|
39
|
+
hasVisibleParent?: boolean;
|
|
40
|
+
/** Combination of `visible || hasVisibleChildren` */
|
|
41
|
+
sumVisibility?: boolean;
|
|
42
|
+
/** translated names of enumerations (functions) where this object is the member (or the parent), divided by comma */
|
|
43
|
+
funcs?: string;
|
|
44
|
+
/** is if the enums are from parent */
|
|
45
|
+
pef?: boolean;
|
|
46
|
+
/** translated names of enumerations (rooms) where this object is the member (or the parent), divided by comma */
|
|
47
|
+
rooms?: string;
|
|
48
|
+
/** is if the enums are from parent */
|
|
49
|
+
per?: boolean;
|
|
50
|
+
lang?: ioBroker.Languages;
|
|
51
|
+
state?: {
|
|
52
|
+
valFullRx?: React.JSX.Element[] | null;
|
|
53
|
+
valTextRx?: React.JSX.Element[] | null;
|
|
54
|
+
style?: React.CSSProperties;
|
|
573
55
|
};
|
|
574
|
-
|
|
575
|
-
resizeTimeout: any;
|
|
576
|
-
resizerMouseUp: () => void;
|
|
577
|
-
resizerActiveName: any;
|
|
578
|
-
resizerNextName: any;
|
|
579
|
-
resizerActiveDiv: any;
|
|
580
|
-
resizerNextDiv: any;
|
|
581
|
-
resizerMouseDown: (e: any) => void;
|
|
582
|
-
resizerCurrentWidths: any;
|
|
583
|
-
resizeLeft: boolean;
|
|
584
|
-
resizerMin: number;
|
|
585
|
-
resizerNextMin: number;
|
|
586
|
-
resizerPosition: any;
|
|
587
|
-
resizerOldWidth: any;
|
|
588
|
-
resizerOldWidthNext: any;
|
|
589
|
-
/**
|
|
590
|
-
* Handle keyboard events for navigation
|
|
591
|
-
*
|
|
592
|
-
* @param {KeyboardEvent} event
|
|
593
|
-
*/
|
|
594
|
-
navigateKeyPress(event: KeyboardEvent): void;
|
|
595
|
-
/**
|
|
596
|
-
* Find the id from the root
|
|
597
|
-
*
|
|
598
|
-
* @param {Record<string, any>} root The current root
|
|
599
|
-
* @param {string} id the object id
|
|
600
|
-
*
|
|
601
|
-
* @returns {any}
|
|
602
|
-
*/
|
|
603
|
-
getItemFromRoot(root: Record<string, any>, id: string): any;
|
|
604
|
-
resizerReset: () => void;
|
|
605
|
-
/**
|
|
606
|
-
* Render a right handle for resizing
|
|
607
|
-
*
|
|
608
|
-
* @return {JSX.Element}
|
|
609
|
-
*/
|
|
610
|
-
renderHandleRight(): JSX.Element;
|
|
611
|
-
/**
|
|
612
|
-
* @private
|
|
613
|
-
* @returns {JSX.Element}
|
|
614
|
-
*/
|
|
615
|
-
private renderHeader;
|
|
616
|
-
/**
|
|
617
|
-
* @private
|
|
618
|
-
* @returns {JSX.Element}
|
|
619
|
-
*/
|
|
620
|
-
private renderToast;
|
|
621
|
-
/**
|
|
622
|
-
* Called when component is updated.
|
|
623
|
-
*/
|
|
624
|
-
componentDidUpdate(): void;
|
|
625
|
-
scrollToItem(id: any): void;
|
|
626
|
-
/**
|
|
627
|
-
* @private
|
|
628
|
-
* @returns {JSX.Element | null}
|
|
629
|
-
*/
|
|
630
|
-
private renderCustomDialog;
|
|
631
|
-
changedIds: any[];
|
|
632
|
-
/**
|
|
633
|
-
* @private
|
|
634
|
-
* @param {Partial<ioBroker.State>} valAck
|
|
635
|
-
*/
|
|
636
|
-
private onUpdate;
|
|
637
|
-
/**
|
|
638
|
-
* @private
|
|
639
|
-
* @returns {JSX.Element | null}
|
|
640
|
-
*/
|
|
641
|
-
private renderEditObjectDialog;
|
|
642
|
-
/**
|
|
643
|
-
* @private
|
|
644
|
-
* @returns {JSX.Element | null}
|
|
645
|
-
*/
|
|
646
|
-
private renderViewObjectFileDialog;
|
|
647
|
-
/**
|
|
648
|
-
* @private
|
|
649
|
-
* @returns {JSX.Element | null}
|
|
650
|
-
*/
|
|
651
|
-
private renderAliasEditorDialog;
|
|
652
|
-
showAddDataPointDialog(id: any, initialType: any, initialStateType: any): void;
|
|
653
|
-
/**
|
|
654
|
-
* Renders the right mouse button context menu
|
|
655
|
-
*
|
|
656
|
-
* @private
|
|
657
|
-
* @returns {JSX.Element | null}
|
|
658
|
-
*/
|
|
659
|
-
private renderContextMenu;
|
|
660
|
-
/**
|
|
661
|
-
* @private
|
|
662
|
-
* @returns {JSX.Element | null}
|
|
663
|
-
*/
|
|
664
|
-
private renderEditValueDialog;
|
|
665
|
-
/**
|
|
666
|
-
* The rendering method of this component.
|
|
667
|
-
* @returns {JSX.Element}
|
|
668
|
-
*/
|
|
669
|
-
render(): JSX.Element;
|
|
670
|
-
unsubscribeTimer: any;
|
|
671
|
-
#private;
|
|
56
|
+
aclTooltip?: null | React.JSX.Element;
|
|
672
57
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
let objectStatesView: boolean;
|
|
678
|
-
let objectImportExport: boolean;
|
|
679
|
-
let objectEditOfAccessControl: boolean;
|
|
680
|
-
function modalNewObject(): any;
|
|
681
|
-
function modalEditOfAccessControl(): any;
|
|
682
|
-
}
|
|
683
|
-
namespace propTypes {
|
|
684
|
-
export let dialogName: PropTypes.Requireable<string>;
|
|
685
|
-
export let classes: PropTypes.Requireable<object>;
|
|
686
|
-
export let defaultFilters: PropTypes.Requireable<object>;
|
|
687
|
-
export let selected: PropTypes.Requireable<NonNullable<string | any[]>>;
|
|
688
|
-
export let onSelect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
689
|
-
export let onFilterChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
690
|
-
export let socket: PropTypes.Requireable<object>;
|
|
691
|
-
export let showExpertButton: PropTypes.Requireable<boolean>;
|
|
692
|
-
export let expertMode: PropTypes.Requireable<boolean>;
|
|
693
|
-
export let imagePrefix: PropTypes.Requireable<string>;
|
|
694
|
-
export let themeName: PropTypes.Requireable<string>;
|
|
695
|
-
export let themeType: PropTypes.Requireable<string>;
|
|
696
|
-
export let theme: PropTypes.Requireable<object>;
|
|
697
|
-
export let t: PropTypes.Requireable<(...args: any[]) => any>;
|
|
698
|
-
export let lang: PropTypes.Validator<string>;
|
|
699
|
-
export let multiSelect: PropTypes.Requireable<boolean>;
|
|
700
|
-
export let notEditable: PropTypes.Requireable<boolean>;
|
|
701
|
-
export let foldersFirst: PropTypes.Requireable<boolean>;
|
|
702
|
-
export let disableColumnSelector: PropTypes.Requireable<boolean>;
|
|
703
|
-
export let isFloatComma: PropTypes.Requireable<boolean>;
|
|
704
|
-
export let dateFormat: PropTypes.Requireable<string>;
|
|
705
|
-
export let levelPadding: PropTypes.Requireable<number>;
|
|
706
|
-
export let objectCustomDialog: PropTypes.Requireable<object>;
|
|
707
|
-
let objectAddBoolean_1: PropTypes.Requireable<boolean>;
|
|
708
|
-
export { objectAddBoolean_1 as objectAddBoolean };
|
|
709
|
-
let objectEditBoolean_1: PropTypes.Requireable<boolean>;
|
|
710
|
-
export { objectEditBoolean_1 as objectEditBoolean };
|
|
711
|
-
let objectStatesView_1: PropTypes.Requireable<boolean>;
|
|
712
|
-
export { objectStatesView_1 as objectStatesView };
|
|
713
|
-
let objectImportExport_1: PropTypes.Requireable<boolean>;
|
|
714
|
-
export { objectImportExport_1 as objectImportExport };
|
|
715
|
-
let objectEditOfAccessControl_1: PropTypes.Requireable<boolean>;
|
|
716
|
-
export { objectEditOfAccessControl_1 as objectEditOfAccessControl };
|
|
717
|
-
let modalNewObject_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
718
|
-
export { modalNewObject_1 as modalNewObject };
|
|
719
|
-
let modalEditOfAccessControl_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
720
|
-
export { modalEditOfAccessControl_1 as modalEditOfAccessControl };
|
|
721
|
-
export let onObjectDelete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
722
|
-
export let customFilter: PropTypes.Requireable<object>;
|
|
723
|
-
export let objectBrowserValue: PropTypes.Requireable<object>;
|
|
724
|
-
export let objectBrowserEditObject: PropTypes.Requireable<object>;
|
|
725
|
-
export let objectBrowserAliasEditor: PropTypes.Requireable<(...args: any[]) => any>;
|
|
726
|
-
export let objectBrowserEditRole: PropTypes.Requireable<object>;
|
|
727
|
-
export let objectBrowserViewFile: PropTypes.Requireable<(...args: any[]) => any>;
|
|
728
|
-
export let router: PropTypes.Requireable<object>;
|
|
729
|
-
export let types: PropTypes.Requireable<any[]>;
|
|
730
|
-
export let columns: PropTypes.Requireable<any[]>;
|
|
731
|
-
export let root: PropTypes.Requireable<string>;
|
|
732
|
-
export let objectsWorker: PropTypes.Requireable<object>;
|
|
733
|
-
export let filterFunc: PropTypes.Requireable<(...args: any[]) => any>;
|
|
734
|
-
export let DragWrapper: PropTypes.Requireable<(...args: any[]) => any>;
|
|
735
|
-
export let dragEnabled: PropTypes.Requireable<boolean>;
|
|
736
|
-
}
|
|
58
|
+
export interface TreeItem {
|
|
59
|
+
id?: string;
|
|
60
|
+
data: TreeItemData;
|
|
61
|
+
children?: TreeItem[];
|
|
737
62
|
}
|
|
738
|
-
|
|
739
|
-
|
|
63
|
+
export declare function getSelectIdIconFromObjects(objects: Record<string, ioBroker.Object>, id: string, imagePrefix?: string): string | React.JSX.Element | null;
|
|
64
|
+
export declare const ITEM_IMAGES: Record<string, React.JSX.Element>;
|
|
65
|
+
declare const _default: (props: Record<string, any>) => React.JSX.Element;
|
|
66
|
+
export default _default;
|