@iobroker/gui-components 10.3.5 → 10.3.6
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/README.md +7 -1
- package/build/Components/ObjectBrowser/ObjectBrowserClass.d.ts +10 -0
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js +31 -4
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js.map +1 -1
- package/build/Components/ObjectBrowser/contextMenu.js +3 -1
- package/build/Components/ObjectBrowser/contextMenu.js.map +1 -1
- package/build/Components/ObjectBrowser/renderLeaf.js +4 -2
- package/build/Components/ObjectBrowser/renderLeaf.js.map +1 -1
- package/build/Components/Router.d.ts +14 -0
- package/build/Components/Router.js +21 -2
- package/build/Components/Router.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectBrowserClass.js","sourceRoot":"./src/","sources":["Components/ObjectBrowser/ObjectBrowserClass.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,6HAA6H;AAC7H,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM;AACN,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC,CAAC,4CAA4C;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EACH,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,OAAO,EACP,MAAM,EACN,kBAAkB,EAClB,OAAO,EACP,0BAA0B,EAC1B,cAAc,GACjB,MAAM,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AAC,0BAA0B,CAAC,IAAI,CAAC;YACxC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC;YACrC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC;YAClC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC;YAC9B,IAAI,CAAC,iBAAiB,EAAE;YACxB,IAAI,CAAC,kBAAkB,EAAE;YACzB,IAAI,CAAC,kBAAkB,EAAE;YACzB,IAAI,CAAC,qBAAqB,EAAE;YAC5B,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;YACtF,IAAI,CAAC,KAAK,CAAC,iBAAiB;gBACzB,IAAI,CAAC,KAAK,CAAC,wBAAwB;gBACnC,IAAI,CAAC,KAAK,CAAC,wBAAwB;gBACnC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CACvE,CAClB,CAAC;IACN,CAAC;;AAGL,qGAAqG;AACrG,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC","sourcesContent":["/**\n * Copyright 2020-2026, Denis Haev <dogafox@gmail.com>\n *\n * MIT License\n *\n * The object browser itself: state, socket subscriptions, the tree and the rendering.\n * The dialogs, the toolbar, the rows and the context menu live in the sibling files of this\n * directory and get this instance as the first argument. Because of that, the members of this\n * class are not private, even if they are not intended to be used outside of the object browser.\n */\n/* eslint-disable react/no-unused-class-component-methods -- the members are used by the sibling modules of this directory */\nimport React, { Component, createRef, type JSX } from 'react';\n\nimport { Box, LinearProgress } from '@mui/material';\n\n// own\nimport { Connection } from '../../Connection';\nimport { Utils } from '../Utils'; // @iobroker/gui-components/Components/Utils\nimport { TabContainer } from '../TabContainer';\nimport { TabContent } from '../TabContent';\nimport { TabHeader } from '../TabHeader';\nimport {\n ROW_HEIGHT,\n applyFilter,\n buildTree,\n findNode,\n formatValue,\n generateFile,\n getName,\n colVar,\n widthFromContainer,\n growVar,\n getSelectIdIconFromObjects,\n setCustomValue,\n} from './utils';\nimport { HistoryChart } from './HistoryChart';\nimport type { Width } from '../../types';\nimport type {\n ObjectBrowserProps,\n AdapterColumn,\n ObjectBrowserFilter,\n ObjectBrowserNavigation,\n ObjectBrowserPossibleColumns,\n ObjectBrowserState,\n TreeInfo,\n TreeItem,\n CustomAdminColumnStored,\n ObjectEvent,\n ioBrokerObjectForExport,\n} from './types';\nimport { styles } from './styles';\nimport * as dialogs from './dialogs';\nimport * as toolbar from './toolbar';\nimport * as leaf from './renderLeaf';\nimport * as contextMenu from './contextMenu';\nimport {\n DEFAULT_DATE_FORMAT,\n DEFAULT_FILTER,\n ITEM_LEVEL,\n MIN_COLUMN_WIDTHS,\n SCREEN_WIDTHS,\n type ScreenWidth,\n type ScreenWidthOne,\n} from './constants';\n\nexport { getSelectIdIconFromObjects, type ObjectBrowserFilter };\n\ndeclare module '@mui/material/Button' {\n interface ButtonPropsColorOverrides {\n grey: true;\n }\n}\n\nlet objectsAlreadyLoaded = false;\n\nexport class ObjectBrowserClass extends Component<ObjectBrowserProps, ObjectBrowserState> {\n // do not define the type as null to save the performance, so we must check it every time\n info: TreeInfo = {\n funcEnums: [],\n roomEnums: [],\n roles: [],\n ids: [],\n types: [],\n objects: {},\n customs: [],\n enums: [],\n hasSomeCustoms: false,\n aliasesMap: {},\n };\n localStorage: Storage = ((window as any)._localStorage as Storage) || window.localStorage;\n /**\n * Own copy of the screen widths. The widths, that the user stored for THIS dialog, must not leak\n * into the other instances of the object browser (the constant is a module singleton).\n */\n private readonly screenWidths: ScreenWidth = JSON.parse(JSON.stringify(SCREEN_WIDTHS)) as ScreenWidth;\n private readonly tableRef: React.RefObject<HTMLDivElement | null>;\n /** Watches the width of the table container to detect the width class */\n private resizeObserver: ResizeObserver | null = null;\n private observedContainer: HTMLDivElement | null = null;\n /** Width class for which the columns were calculated the last time */\n private lastCalculatedWidth: Width | null = null;\n /** States view for which the columns were calculated the last time */\n private lastCalculatedStatesView: boolean | null = null;\n private pausedSubscribes: boolean = false;\n /** The tree was rebuilt while subscribes were paused, so the filter must be re-applied on resume */\n private treeRebuiltWhilePaused: boolean = false;\n /** Time of the first object change since the last tree rebuild (upper bound for the rebuild delay) */\n private objectsUpdateFirstTs: number = 0;\n\n /**\n * Counts up on every render that can change ANY row - a new filter, other columns, another\n * theme, a different selection, a rebuilt tree. A state change does NOT count it up: it only\n * concerns the rows whose value changed. Together with `rowStateVersion` this is the memo key\n * of a row (see `renderRow`), so a value that ticks every second no longer rebuilds the whole\n * table.\n *\n * Whether a render concerns every row is decided in `render` and not by a flag that the caller\n * sets: React may batch the render of a state change with a `setState` (a click) or with new\n * props, and a flag would then keep every row as it was, although the selection has changed.\n */\n renderEpoch: number = 0;\n\n /**\n * Set by every `forceUpdate()`: something changed that is not visible in `state` or `props` (a\n * rebuilt tree, other column widths), so every row has to be built again. Only\n * `updateRowsOnly` renders without it\n */\n private rowsInvalid: boolean = true;\n\n /** `state` and `props` of the last render: a render with the same two cannot concern every row */\n private lastRenderedState: ObjectBrowserState | null = null;\n private lastRenderedProps: ObjectBrowserProps | null = null;\n\n /**\n * row id -> the states the row showed when it was built last: its own value and the status\n * states of a device (online, offline, error). The subscriptions that are still needed are\n * collected from the rows of the window (see `checkUnsubscribes`) - a row that is served from\n * the memo is not built again, but its entry here is still valid\n */\n readonly rowStates: Record<string, Set<string>> = {};\n\n /**\n * state id -> the rows that show this state although it is not their own: a device shows the\n * status of its `statusStates`. A change of such a state has to render those rows as well\n */\n private readonly stateDependents: Record<string, Set<string>> = {};\n\n /**\n * Rows that are rendered above and below the visible area, so that scrolling does not run into\n * a gap before the next render\n */\n private static readonly OVERSCAN_ROWS: number = 12;\n\n /** Every row of the table in the order in which it is shown (see `flattenItems`) */\n private flatRows: leaf.FlatItem[] = [];\n\n /**\n * Where every row of `flatRows` begins, in pixels. One entry longer than `flatRows`: the last\n * one is the height of the whole table\n */\n private rowOffsets: number[] = [0];\n\n /** A row measured another height than `rowOffsets` expected: calculate them again */\n private rowOffsetsInvalid: boolean = false;\n\n /** id -> the height the row really had. Only rows that are not `ROW_HEIGHT` high end up here */\n private readonly measuredHeights: Record<string, number> = {};\n\n /** Scroll position and height of the table container, the two values the window is cut from */\n private scrollTop: number = 0;\n private viewportHeight: number = 0;\n private scrollFrame: number | null = null;\n /** First and last row of the last rendered window, to notice that scrolling moved it */\n private windowFirst: number = 0;\n private windowLast: number = 0;\n\n /** id -> how often the state of this row has changed. Part of the memo key of the row */\n readonly rowStateVersion: Record<string, number> = {};\n\n private stateVersionCounter: number = 0;\n private selectFirst: string;\n /** Last navigation that was applied from `navigateTo` or reported via `onNavigateTo` (loop guard). */\n private lastNav: ObjectBrowserNavigation | null = null;\n /** True while applying `navigateTo`, so the derived-state watcher does not echo it back. */\n private applyingNav: boolean = false;\n root: TreeItem | null = null;\n readonly states: Record<string, ioBroker.State> = {};\n subscribes: Set<string> = new Set();\n private unsubscribeTimer: ReturnType<typeof setTimeout> | null = null;\n private statesUpdateTimer: ReturnType<typeof setTimeout> | null = null;\n private objectsUpdateTimer: ReturnType<typeof setTimeout> | null = null;\n /** Columns that are visible in the auto mode. Depends on the width of the container */\n visibleCols: ObjectBrowserPossibleColumns[];\n readonly texts: Record<string, string>;\n readonly possibleCols: ObjectBrowserPossibleColumns[];\n readonly imagePrefix: string;\n adapterColumns: AdapterColumn[] = [];\n private styleTheme: string = '';\n edit: {\n val: string | number | boolean | null;\n q: number;\n ack: boolean;\n id: string;\n } = {\n id: '',\n val: '',\n q: 0,\n ack: false,\n };\n readonly levelPadding: number;\n private customWidth: boolean = false;\n private resizerNextName: string | null = null;\n private resizerActiveName: string | null = null;\n private resizerCurrentWidths: Record<string, number> = {};\n private resizeLeft: boolean = false;\n private resizerOldWidth: number = 0;\n private resizerMin: number = 0;\n private resizerNextMin: number = 0;\n private resizerOldWidthNext: number = 0;\n private resizerPosition: number = 0;\n private resizerActiveDiv: HTMLDivElement | null = null;\n private resizerNextDiv: HTMLDivElement | null = null;\n /**\n * The column widths the user stored for this dialog, as they were written to\n * `<dialogName>.table`. They are kept independently of the width class, because the class is\n * only known after the container was measured and changes when the window is resized.\n */\n private storedColumnWidths: Record<string, number> | null = null;\n systemConfig: ioBroker.SystemConfigObject | null = null;\n public objects!: Record<string, ioBroker.Object>;\n defaultHistory: string = '';\n private ctrlPressed = false;\n columnsVisibility: {\n id?: number | string;\n name?: number | string;\n type?: number;\n role?: number;\n room?: number;\n func?: number;\n changedFrom?: number;\n qualityCode?: number;\n timestamp?: number;\n lastChange?: number;\n val?: number;\n buttons?: number;\n } = {};\n changedIds: null | string[] = null;\n contextMenu: null | { item: any; ts: number } = null;\n styles: {\n cellIdIconFolder?: React.CSSProperties;\n cellIdIconDocument?: React.CSSProperties;\n iconDeviceError?: React.CSSProperties;\n iconDeviceConnected?: React.CSSProperties;\n iconDeviceDisconnected?: React.CSSProperties;\n cellButtonsButtonWithCustoms?: React.CSSProperties;\n invertedBackground?: React.CSSProperties;\n invertedBackgroundFlex?: React.CSSProperties;\n contextMenuEdit?: React.CSSProperties;\n contextMenuEditValue?: React.CSSProperties;\n contextMenuView?: React.CSSProperties;\n contextMenuCustom?: React.CSSProperties;\n contextMenuACL?: React.CSSProperties;\n contextMenuRoom?: React.CSSProperties;\n contextMenuRole?: React.CSSProperties;\n contextMenuDelete?: React.CSSProperties;\n filterInput?: React.CSSProperties;\n iconCopy?: React.CSSProperties;\n aliasReadWrite?: React.CSSProperties;\n aliasAlone?: React.CSSProperties;\n } = {};\n private expertMode: boolean = false;\n customColumnDialog: null | {\n value: boolean | number | string;\n type: 'boolean' | 'number' | 'string';\n initValue: boolean | number | string;\n } = null;\n\n constructor(props: ObjectBrowserProps) {\n super(props);\n\n const lastSelectedItemStr: string =\n this.localStorage.getItem(`${props.dialogName || 'App'}.objectSelected`) || '';\n\n this.selectFirst = '';\n\n this.expertMode = !!this.props.expertMode;\n\n if (lastSelectedItemStr.startsWith('[')) {\n try {\n const lastSelectedItems = JSON.parse(lastSelectedItemStr) as string[];\n this.selectFirst = lastSelectedItems[0] || '';\n } catch {\n // ignore\n }\n } else {\n this.selectFirst = lastSelectedItemStr;\n }\n\n let expanded: string[];\n const expandedStr = this.localStorage.getItem(`${props.dialogName || 'App'}.objectExpanded`) || '[]';\n try {\n expanded = JSON.parse(expandedStr);\n } catch {\n expanded = [];\n }\n\n let filter: ObjectBrowserFilter;\n const filterStr: string = props.defaultFilters\n ? ''\n : this.localStorage.getItem(`${props.dialogName || 'App'}.objectFilter`) || '';\n if (filterStr) {\n try {\n filter = JSON.parse(filterStr);\n } catch {\n filter = { ...DEFAULT_FILTER };\n }\n } else if (props.defaultFilters && typeof props.defaultFilters === 'object') {\n filter = { ...props.defaultFilters };\n } else {\n filter = { ...DEFAULT_FILTER };\n }\n // Migrate old filters to new one\n if (typeof filter.room === 'string' && filter.room) {\n filter.room = [filter.room].filter(s => s);\n if (!filter.room.length) {\n delete filter.room;\n }\n }\n if (typeof filter.func === 'string' && filter.func) {\n filter.func = [filter.func].filter(s => s);\n if (!filter.func.length) {\n delete filter.func;\n }\n }\n if (typeof filter.role === 'string' && filter.role) {\n filter.role = [filter.role].filter(s => s);\n if (!filter.role.length) {\n delete filter.role;\n }\n }\n if (typeof filter.type === 'string') {\n filter.type = [filter.type].filter(s => s);\n if (!filter.type.length) {\n delete filter.type;\n }\n }\n if (typeof filter.custom === 'string') {\n filter.custom = [filter.custom].filter(s => s);\n if (!filter.custom.length) {\n delete filter.custom;\n }\n }\n\n filter.expertMode =\n props.expertMode !== undefined\n ? props.expertMode\n : (((window as any)._sessionStorage as Storage) || window.sessionStorage).getItem('App.expertMode') ===\n 'true';\n this.tableRef = createRef();\n\n this.visibleCols = props.columns || this.screenWidths[props.width || 'lg'].fields;\n // remove type column if only one type must be selected\n if (props.types && props.types.length === 1) {\n const pos = this.visibleCols.indexOf('type');\n if (pos !== -1) {\n this.visibleCols.splice(pos, 1);\n }\n }\n\n this.possibleCols = this.screenWidths.xl.fields;\n\n let customDialog = null;\n\n if (props.router) {\n const location = props.router.getLocation();\n if (location.id && location.dialog === 'customs') {\n customDialog = [location.id];\n this.pauseSubscribe(true);\n }\n }\n\n let selected: string[];\n if (!Array.isArray(props.selected)) {\n selected = [props.selected || ''];\n } else {\n selected = props.selected;\n }\n selected = selected.map(id => id.replace(/[\"']/g, '')).filter(id => id);\n\n this.selectFirst = selected.length && selected[0] ? selected[0] : this.selectFirst;\n\n const columnsStr = this.localStorage.getItem(`${props.dialogName || 'App'}.columns`);\n let columns: ObjectBrowserPossibleColumns[] | null;\n try {\n columns = columnsStr ? JSON.parse(columnsStr) : null;\n } catch {\n columns = null;\n }\n\n let columnsWidths = null; // this.localStorage.getItem(`${props.dialogName || 'App'}.columnsWidths`);\n try {\n columnsWidths = columnsWidths ? JSON.parse(columnsWidths) : {};\n } catch {\n columnsWidths = {};\n }\n\n this.imagePrefix = props.imagePrefix || '.';\n let foldersFirst: boolean;\n const foldersFirstStr = this.localStorage.getItem(`${props.dialogName || 'App'}.foldersFirst`);\n\n if (foldersFirstStr === 'false') {\n foldersFirst = false;\n } else if (foldersFirstStr === 'true') {\n foldersFirst = true;\n } else {\n foldersFirst = props.foldersFirst === undefined ? true : props.foldersFirst;\n }\n\n let statesView = false;\n try {\n statesView = this.props.objectStatesView\n ? JSON.parse(this.localStorage.getItem(`${props.dialogName || 'App'}.objectStatesView`) || '') || false\n : false;\n } catch {\n // ignore\n }\n\n this.state = {\n aliasMenu: '',\n beautifyJsonExport: true,\n columns,\n columnsAuto: this.localStorage.getItem(`${props.dialogName || 'App'}.columnsAuto`) !== 'false',\n columnsDialogTransparent: 100,\n columnsEditCustomDialog: null,\n columnsForAdmin: null,\n columnsSelectorShow: false,\n columnsWidths,\n customColumnDialogValueChanged: false,\n customDialog,\n depth: 0,\n editObjectAlias: false, // open the edit object dialog on alias tab\n editObjectDialog: '',\n enumDialog: null,\n excludeSystemRepositoriesFromExport: true,\n excludeTranslations: false,\n expandAllVisible: false,\n expanded,\n filter,\n filterKey: 0,\n containerWidth: props.width || 'lg',\n focused: this.localStorage.getItem(`${props.dialogName || 'App'}.focused`) || '',\n foldersFirst,\n linesEnabled: this.localStorage.getItem(`${props.dialogName || 'App'}.lines`) === 'true',\n loaded: false,\n noStatesByExportImport: false,\n roleDialog: null,\n selected,\n selectedNonObject: this.localStorage.getItem(`${props.dialogName || 'App'}.selectedNonObject`) || '',\n showAliasEditor: '',\n showAllExportOptions: false,\n showContextMenu: null,\n showDescription: this.localStorage.getItem(`${props.dialogName || 'App'}.desc`) !== 'false',\n showExportDialog: false,\n showImportDialog: false,\n showImportMenu: null,\n showRenameDialog: null,\n statesView,\n toast: '',\n tooltipInfo: null,\n viewFileDialog: '',\n };\n\n this.texts = {\n name: props.t('ra_Name'),\n categories: props.t('ra_Categories'),\n value: props.t('ra_tooltip_value'),\n ack: props.t('ra_tooltip_ack'),\n ts: props.t('ra_tooltip_ts'),\n lc: props.t('ra_tooltip_lc'),\n from: props.t('ra_tooltip_from'),\n user: props.t('ra_tooltip_user'),\n c: props.t('ra_tooltip_comment'),\n quality: props.t('ra_tooltip_quality'),\n editObject: props.t('ra_tooltip_editObject'),\n deleteObject: props.t('ra_tooltip_deleteObject'),\n customConfig: props.t('ra_tooltip_customConfig'),\n copyState: props.t('ra_tooltip_copyState'),\n editState: props.t('ra_tooltip_editState'),\n ctrlForLink: props.t('ra_tooltip_ctrlForLink'),\n close: props.t('ra_Close'),\n filter_id: props.t('ra_filter_id'),\n filter_name: props.t('ra_filter_name'),\n filter_type: props.t('ra_filter_type'),\n filter_role: props.t('ra_filter_role'),\n filter_room: props.t('ra_filter_room'),\n filter_func: props.t('ra_filter_func'),\n filter_custom: props.t('ra_filter_customs'), //\n filterCustomsWithout: props.t('ra_filter_customs_without'), //\n objectChangedByUser: props.t('ra_object_changed_by_user'), // Object last changed at\n objectChangedBy: props.t('ra_object_changed_by'), // Object changed by\n objectChangedFrom: props.t('ra_state_changed_from'), // Object changed from\n stateChangedBy: props.t('ra_state_changed_by'), // State changed by\n stateChangedFrom: props.t('ra_state_changed_from'), // State changed from\n ownerGroup: props.t('ra_Owner group'),\n ownerUser: props.t('ra_Owner user'),\n showAll: props.t('ra_show_all'),\n deviceError: props.t('ra_Error'),\n deviceDisconnected: props.t('ra_Disconnected'),\n deviceConnected: props.t('ra_Connected'),\n\n aclOwner_read_object: props.t('ra_aclOwner_read_object'),\n aclOwner_read_state: props.t('ra_aclOwner_read_state'),\n aclOwner_write_object: props.t('ra_aclOwner_write_object'),\n aclOwner_write_state: props.t('ra_aclOwner_write_state'),\n aclGroup_read_object: props.t('ra_aclGroup_read_object'),\n aclGroup_read_state: props.t('ra_aclGroup_read_state'),\n aclGroup_write_object: props.t('ra_aclGroup_write_object'),\n aclGroup_write_state: props.t('ra_aclGroup_write_state'),\n aclEveryone_read_object: props.t('ra_aclEveryone_read_object'),\n aclEveryone_read_state: props.t('ra_aclEveryone_read_state'),\n aclEveryone_write_object: props.t('ra_aclEveryone_write_object'),\n aclEveryone_write_state: props.t('ra_aclEveryone_write_state'),\n\n create: props.t('ra_Create'),\n createBooleanState: props.t('ra_create_boolean_state'),\n createNumberState: props.t('ra_create_number_state'),\n createStringState: props.t('ra_create_string_state'),\n createState: props.t('ra_create_state'),\n createChannel: props.t('ra_create_channel'),\n createDevice: props.t('ra_create_device'),\n createFolder: props.t('ra_Create folder'),\n };\n\n this.levelPadding = props.levelPadding || ITEM_LEVEL;\n\n const resizerCurrentWidthsStr = this.localStorage.getItem(`${this.props.dialogName || 'App'}.table`);\n if (resizerCurrentWidthsStr) {\n try {\n const parsed: Record<string, number> = JSON.parse(resizerCurrentWidthsStr);\n const storedColumnWidths: Record<string, number> = {};\n Object.keys(parsed).forEach(id => {\n // widths stored by an older version, where the header had an own width\n storedColumnWidths[id === 'nameHeader' ? 'name' : id] = parsed[id];\n });\n this.storedColumnWidths = storedColumnWidths;\n // The resizer has to start from the stored widths too. Without them the next drag\n // would write only the two columns it touched back to the storage, and every other\n // width the user had set would be lost.\n this.resizerCurrentWidths = { ...storedColumnWidths };\n } catch {\n this.storedColumnWidths = null;\n }\n }\n\n this.applyStoredWidths();\n\n this.calculateColumnsVisibility();\n }\n\n /**\n * Write the stored column widths into the width class that is active now.\n *\n * Every width class has its own default widths, and the class of the object browser is only\n * known after its container was measured - in the constructor it is still the initial guess.\n * The stored widths must therefore be applied again whenever the class changes, otherwise the\n * table falls back to the defaults of the new class and the user sees their widths reset.\n */\n applyStoredWidths(): void {\n if (!this.storedColumnWidths) {\n return;\n }\n const screen = this.screenWidths[this.width || 'lg'];\n const storedColumnWidths = this.storedColumnWidths;\n Object.keys(storedColumnWidths).forEach(id => {\n if (id === 'id') {\n screen.idWidth = storedColumnWidths.id;\n } else if ((screen.widths as Record<string, number>)[id] !== undefined) {\n // A column that this width class does not know keeps its place; only the widths of\n // the columns the class actually shows may be overwritten.\n (screen.widths as Record<string, number>)[id] = storedColumnWidths[id];\n }\n });\n\n this.customWidth = true;\n }\n\n async loadAllObjects(update?: boolean): Promise<void> {\n const props = this.props;\n\n try {\n await new Promise<void>(resolve => {\n this.setState({ updating: true }, () => resolve());\n });\n\n const objects =\n (props.objectsWorker\n ? await props.objectsWorker.getObjects(update)\n : await props.socket.getObjects(update, true)) || {};\n if (props.types && Connection.isWeb()) {\n for (let i = 0; i < props.types.length; i++) {\n // admin has ALL objects\n // web has only state, channel, device, enum, and system.config\n if (\n props.types[i] === 'state' ||\n props.types[i] === 'channel' ||\n props.types[i] === 'device' ||\n props.types[i] === 'enum'\n ) {\n continue;\n }\n const moreObjects = await props.socket.getObjectViewSystem(props.types[i]);\n Object.assign(objects || {}, moreObjects as Record<string, ioBroker.Object>);\n }\n }\n\n this.systemConfig ||=\n (objects?.['system.config'] as ioBroker.SystemConfigObject) ||\n (await props.socket.getObject('system.config'));\n\n this.systemConfig.common ||= {} as ioBroker.SystemConfigCommon;\n this.systemConfig.common.defaultNewAcl ||= {\n object: 0,\n state: 0,\n file: 0,\n owner: 'system.user.admin',\n ownerGroup: 'system.group.administrator',\n };\n this.systemConfig.common.defaultNewAcl.owner ||= 'system.user.admin';\n this.systemConfig.common.defaultNewAcl.ownerGroup ||= 'system.group.administrator';\n if (typeof this.systemConfig.common.defaultNewAcl.state !== 'number') {\n // TODO: may be convert here from string\n this.systemConfig.common.defaultNewAcl.state = 0x664;\n }\n if (typeof this.systemConfig.common.defaultNewAcl.object !== 'number') {\n // TODO: may be convert here from string\n this.systemConfig.common.defaultNewAcl.state = 0x664;\n }\n\n if (typeof props.filterFunc === 'function') {\n this.objects = {};\n const filterFunc: (obj: ioBroker.Object) => boolean = props.filterFunc;\n\n Object.keys(objects).forEach(id => {\n try {\n if (filterFunc(objects[id])) {\n this.objects[id] = objects[id];\n } else {\n const type = objects[id] && objects[id].type;\n // include \"folder\" types too for icons and names of nodes\n if (\n type &&\n (type === 'channel' ||\n type === 'device' ||\n type === 'folder' ||\n type === 'adapter' ||\n type === 'instance')\n ) {\n this.objects[id] = objects[id];\n }\n }\n } catch (e) {\n console.log(`Error by filtering of \"${id}\": ${e}`);\n }\n });\n } else if (props.types) {\n this.objects = {};\n const propsTypes = props.types;\n\n Object.keys(objects).forEach(id => {\n const type = objects[id]?.type;\n // include \"folder\" types too\n if (\n type &&\n (type === 'channel' ||\n type === 'device' ||\n type === 'enum' ||\n type === 'folder' ||\n type === 'adapter' ||\n type === 'instance' ||\n propsTypes.includes(type))\n ) {\n this.objects[id] = objects[id];\n }\n });\n } else {\n this.objects = objects;\n }\n\n if (props.setObjectsReference) {\n props.setObjectsReference(this.objects);\n }\n\n // read default history\n this.defaultHistory = this.systemConfig.common.defaultHistory;\n if (this.defaultHistory) {\n props.socket\n .getState(`system.adapter.${this.defaultHistory}.alive`)\n .then(state => {\n if (!state?.val) {\n this.defaultHistory = '';\n }\n })\n .catch(e => window.alert(`Cannot get state: ${e}`));\n }\n\n const columnsForAdmin = await this.getAdditionalColumns();\n this.calculateColumnsVisibility(null, null, columnsForAdmin);\n\n const { info, root } = buildTree(this.objects, {\n imagePrefix: props.imagePrefix,\n root: props.root,\n lang: props.lang,\n themeType: props.themeType,\n });\n this.root = root;\n this.info = info;\n\n // Show first selected item\n const node = this.state.selected?.length && findNode(this.root, this.state.selected[0]);\n\n // If the selected ID is not visible, reset filter\n if (\n node &&\n !applyFilter(\n node,\n this.state.filter,\n props.lang,\n this.objects,\n undefined,\n undefined,\n props.customFilter,\n props.types,\n )\n ) {\n // reset filter\n this.setState({ filter: { ...DEFAULT_FILTER }, columnsForAdmin }, () => {\n this.doFilter();\n this.setState({ loaded: true, updating: false }, () =>\n this.expandAllSelected(() => {\n this.onAfterSelect();\n this.applyInitialNavigateTo();\n }),\n );\n });\n } else {\n this.doFilter();\n this.setState({ loaded: true, updating: false, columnsForAdmin }, () =>\n this.expandAllSelected(() => {\n this.onAfterSelect();\n this.applyInitialNavigateTo();\n }),\n );\n }\n } catch (error) {\n this.showError(error);\n }\n }\n\n expandAllSelected(cb?: () => void): void {\n const expanded = [...this.state.expanded];\n let changed = false;\n this.state.selected.forEach(id => {\n const parts = id.split('.');\n const path = [];\n for (let i = 0; i < parts.length - 1; i++) {\n path.push(parts[i]);\n if (!expanded.includes(path.join('.'))) {\n expanded.push(path.join('.'));\n changed = true;\n }\n }\n });\n if (changed) {\n expanded.sort();\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n this.setState({ expanded }, cb);\n } else if (cb) {\n cb();\n }\n }\n\n /**\n * @param isDouble is double click\n */\n private onAfterSelect(isDouble?: boolean): void {\n if (this.state.selected?.length && this.state.selected[0]) {\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectSelected`, this.state.selected[0]);\n\n // remove a task to select the pre-selected item if now we want to see another object\n if (this.selectFirst && this.selectFirst !== this.state.selected[0]) {\n this.selectFirst = '';\n }\n\n // If the this.state.selected[0] filtered out, disable the filter\n const item = this.findItem(this.state.selected[0]);\n if (item?.data && !item.data.visible && !item.data.hasVisibleChildren) {\n // If the selected ID is not visible, reset filter\n this.clearFilter();\n }\n\n if (this.state.selected.length === 1 && this.objects[this.state.selected[0]]) {\n const name = Utils.getObjectName(this.objects, this.state.selected[0], null, {\n language: this.props.lang,\n });\n this.props.onSelect?.(this.state.selected, name, isDouble);\n } else if (this.state.selected.length === 1 && this.props.allowNonObjects) {\n this.props.onSelect?.(this.state.selected, null, isDouble);\n } else {\n // we have more than one state\n // Check if all IDs are objects\n if (!this.props.allowNonObjects || !this.state.selected.find(id => !this.objects[id])) {\n this.props.onSelect?.(this.state.selected, null, isDouble);\n }\n }\n } else {\n this.localStorage.removeItem(`${this.props.dialogName || 'App'}.objectSelected`);\n\n if (this.state.selected.length) {\n this.setState({ selected: [] }, () => {\n if (this.props.onSelect) {\n if (this.state.focused && this.props.allowNonObjects) {\n // remove a task to select the pre-selected item if now we want to see another object\n if (this.selectFirst && this.selectFirst !== this.state.selected[0]) {\n this.selectFirst = '';\n }\n this.props.onSelect([this.state.focused], null, isDouble);\n } else {\n this.props.onSelect([], '');\n }\n }\n });\n } else if (this.props.onSelect) {\n if (this.state.focused && this.props.allowNonObjects) {\n // remove a task to select the pre-selected item if now we want to see another object\n if (this.selectFirst && this.selectFirst !== this.state.selected[0]) {\n this.selectFirst = '';\n }\n this.props.onSelect([this.state.focused], null, isDouble);\n } else {\n this.props.onSelect([], '');\n }\n }\n }\n }\n\n // This function is used\n private static getDerivedStateFromProps(\n props: ObjectBrowserProps,\n state: ObjectBrowserState,\n ): Partial<ObjectBrowserState> | null {\n const newState: Partial<ObjectBrowserState> = {};\n let changed = false;\n if (props.expertMode !== undefined && props.expertMode !== state.filter.expertMode) {\n changed = true;\n newState.filter = { ...state.filter };\n newState.filter.expertMode = props.expertMode;\n }\n return changed ? newState : null;\n }\n\n /**\n * Called when component is mounted.\n */\n async componentDidMount(): Promise<void> {\n await this.loadAllObjects(!objectsAlreadyLoaded);\n if (this.props.objectsWorker) {\n this.props.objectsWorker.registerHandler(this.onObjectChangeFromWorker);\n } else {\n await this.props.socket.subscribeObject('*', this.onObjectChange);\n }\n\n objectsAlreadyLoaded = true;\n\n window.addEventListener('contextmenu', this.onContextMenu, true);\n window.addEventListener('keydown', this.onKeyPress, true);\n window.addEventListener('keyup', this.onKeyPress, true);\n\n this.observeContainerWidth();\n this.measureRenderedRows();\n\n // Inform dialog that all objects are loaded\n if (this.props.onAllLoaded) {\n setTimeout(() => {\n this.props.onAllLoaded?.();\n }, 100);\n }\n }\n\n onKeyPress = (event: KeyboardEvent): void => {\n if (event.type === 'keydown' && event.ctrlKey && !this.ctrlPressed) {\n this.ctrlPressed = true;\n if (this.tableRef.current) {\n this.tableRef.current.className = 'highlight-link';\n }\n } else if (event.type === 'keyup' && !event.ctrlKey && this.ctrlPressed) {\n this.ctrlPressed = false;\n if (this.tableRef.current) {\n this.tableRef.current.className = '';\n }\n }\n };\n\n /**\n * Called when component is unmounted.\n */\n componentWillUnmount(): void {\n window.removeEventListener('contextmenu', this.onContextMenu, true);\n window.removeEventListener('keydown', this.onKeyPress, true);\n window.removeEventListener('keyup', this.onKeyPress, true);\n\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n this.observedContainer = null;\n\n if (this.scrollFrame !== null) {\n window.cancelAnimationFrame(this.scrollFrame);\n this.scrollFrame = null;\n }\n\n // the timers must not fire after the component was destroyed\n if (this.unsubscribeTimer) {\n clearTimeout(this.unsubscribeTimer);\n this.unsubscribeTimer = null;\n }\n if (this.statesUpdateTimer) {\n clearTimeout(this.statesUpdateTimer);\n this.statesUpdateTimer = null;\n }\n if (this.objectsUpdateTimer) {\n clearTimeout(this.objectsUpdateTimer);\n this.objectsUpdateTimer = null;\n }\n\n if (this.props.objectsWorker) {\n this.props.objectsWorker.unregisterHandler(this.onObjectChangeFromWorker, true);\n } else {\n void this.props.socket\n .unsubscribeObject('*', this.onObjectChange)\n .catch(e => console.error(`Cannot unsubscribe *: ${e}`));\n }\n\n // remove all subscribes\n this.subscribes.forEach(pattern => {\n // console.log(`- unsubscribe ${pattern}`);\n this.props.socket.unsubscribeState(pattern, this.onStateChange);\n });\n\n this.subscribes.clear();\n this.objects = {};\n }\n\n /**\n * Show the deletion dialog for a given object\n */\n showDeleteDialog(options: { id: string; obj: ioBroker.Object; item: TreeItem }): void {\n const { id, obj, item } = options;\n\n // calculate the number of children\n const keys = Object.keys(this.objects);\n keys.sort();\n let count = 0;\n const start = `${id}.`;\n for (let i = 0; i < keys.length; i++) {\n if (keys[i].startsWith(start)) {\n count++;\n } else if (keys[i] > start) {\n break;\n }\n }\n\n this.props.onObjectDelete?.(id, !!item.children?.length, !obj.common?.dontDelete, count + 1);\n }\n\n /**\n * Context menu handler.\n */\n onContextMenu = (e: MouseEvent): void => {\n // console.log(`CONTEXT MENU: ${this.contextMenu ? Date.now() - this.contextMenu.ts : 'false'}`);\n if (this.contextMenu && Date.now() - this.contextMenu.ts < 2000) {\n e.preventDefault();\n this.setState({\n showContextMenu: {\n item: this.contextMenu.item,\n position: { left: e.clientX + 2, top: e.clientY - 6 },\n },\n });\n } else if (this.state.showContextMenu) {\n e.preventDefault();\n this.setState({ showContextMenu: null });\n }\n this.contextMenu = null;\n };\n\n /**\n * Called when component is mounted.\n */\n refreshComponent(): void {\n // remove all subscribes\n this.subscribes.forEach(pattern => {\n // console.log(`- unsubscribe ${pattern}`);\n this.props.socket.unsubscribeState(pattern, this.onStateChange);\n });\n\n this.subscribes.clear();\n\n this.loadAllObjects(true)\n .then(() => console.log('updated!'))\n .catch(e => this.showError(e));\n }\n\n /**\n * Renders the error dialog.\n */\n renderErrorDialog(): JSX.Element | null {\n return dialogs.renderErrorDialog(this);\n }\n\n /**\n * Show the error dialog.\n */\n showError(error: any): void {\n this.setState({\n error:\n typeof error === 'object'\n ? error && typeof error.toString === 'function'\n ? error.toString()\n : JSON.stringify(error)\n : error,\n });\n }\n\n /**\n * Called when an item is selected/deselected.\n */\n onSelect(toggleItem: string, isDouble?: boolean, cb?: () => void): void {\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.focused`, toggleItem);\n\n if (!this.props.multiSelect) {\n if (\n this.objects[toggleItem] &&\n (!this.props.types || this.props.types.includes(this.objects[toggleItem].type))\n ) {\n this.localStorage.removeItem(`${this.props.dialogName || 'App'}.selectedNonObject`);\n if (this.state.selected[0] !== toggleItem) {\n this.setState({ selected: [toggleItem], selectedNonObject: '', focused: toggleItem }, () => {\n this.onAfterSelect(isDouble);\n if (cb) {\n cb();\n }\n });\n } else if (isDouble && this.props.onSelect) {\n this.onAfterSelect(isDouble);\n }\n } else {\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.selectedNonObject`, toggleItem);\n this.setState({ selected: [], selectedNonObject: toggleItem, focused: toggleItem }, () => {\n this.onAfterSelect();\n if (cb) {\n cb();\n }\n });\n }\n } else if (\n this.objects[toggleItem] &&\n (!this.props.types || this.props.types.includes(this.objects[toggleItem].type))\n ) {\n this.localStorage.removeItem(`${this.props.dialogName || 'App'}.selectedNonObject`);\n\n const selected = [...this.state.selected];\n const pos = selected.indexOf(toggleItem);\n if (pos === -1) {\n selected.push(toggleItem);\n selected.sort();\n } else if (!isDouble) {\n selected.splice(pos, 1);\n }\n\n this.setState({ selected, selectedNonObject: '', focused: toggleItem }, () => {\n this.onAfterSelect(isDouble);\n if (cb) {\n cb();\n }\n });\n }\n }\n\n /**\n * Renders the columns' selector.\n */\n renderColumnsSelectorDialog(): JSX.Element | null {\n return dialogs.renderColumnsSelectorDialog(this);\n }\n\n private async getAdditionalColumns(): Promise<Record<string, CustomAdminColumnStored[]> | null> {\n try {\n const instances = await this.props.socket.getAdapters();\n\n let columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null = null;\n // find all additional columns\n instances.forEach(obj => (columnsForAdmin = this.parseObjectForAdmins(columnsForAdmin, obj)));\n\n return columnsForAdmin;\n } catch (err) {\n // window.alert('Cannot get adapters: ' + e);\n // Object browser in Web has no additional columns\n console.error(`Cannot get adapters: ${err}`);\n return null;\n }\n }\n\n /**\n * Remember that a row shows a state. Called while the row is built (see `renderLeaf`)\n *\n * @param rowId the row\n * @param stateId the state it shows: its own or one of its status states\n */\n recordState(rowId: string, stateId: string): void {\n (this.rowStates[rowId] ||= new Set()).add(stateId);\n if (stateId !== rowId) {\n (this.stateDependents[stateId] ||= new Set()).add(rowId);\n }\n }\n\n private checkUnsubscribes(): void {\n // Only the states of the rows in the window are needed. Rows that scrolled away are not\n // rendered anymore, so their states are unsubscribed as well\n const needed = new Set<string>();\n for (let i = this.windowFirst; i < this.windowLast; i++) {\n const rowId = this.flatRows[i]?.item.data.id;\n this.rowStates[rowId]?.forEach(id => needed.add(id));\n }\n // Remove unused subscriptions\n for (const id of [...this.subscribes]) {\n if (!needed.has(id)) {\n this.unsubscribe(id);\n delete this.stateDependents[id];\n }\n }\n }\n\n /**\n * Find an item.\n */\n findItem(id: string, _parts?: string[], _root?: TreeItem | null, _partyId?: string): TreeItem | null {\n _parts ||= id.split('.');\n _root ||= this.root;\n if (!_root || !_parts.length) {\n return null;\n }\n\n _partyId = (_partyId ? `${_partyId}.` : '') + _parts.shift();\n\n if (_root.children) {\n const item = _root.children.find(i => i.data.id === _partyId);\n if (item) {\n if (item.data.id === id) {\n return item;\n }\n if (_parts.length) {\n return this.findItem(id, _parts, item, _partyId);\n }\n } else {\n return null;\n }\n }\n\n return null;\n }\n\n /**\n * Called when a state changes.\n */\n onStateChange = (id: string, state?: ioBroker.State | null): void => {\n // console.log(`> stateChange ${id}`);\n const oldState = this.states[id];\n if (\n state &&\n oldState &&\n state.val === oldState.val &&\n state.ack === oldState.ack &&\n state.q === oldState.q &&\n state.ts === oldState.ts &&\n state.lc === oldState.lc &&\n state.from === oldState.from\n ) {\n // echo of the already known state: nothing that is displayed can have changed\n // (`from` is compared too, because it is shown in the `changedFrom` column)\n return;\n }\n if (this.states[id]) {\n const item = this.findItem(id);\n if (item?.data.state) {\n item.data.state = undefined;\n }\n }\n if (state) {\n this.states[id] = state;\n } else {\n delete this.states[id];\n }\n // only this row has to be rendered again - and the rows that show this state as their status\n const version = ++this.stateVersionCounter;\n this.rowStateVersion[id] = version;\n this.stateDependents[id]?.forEach(rowId => (this.rowStateVersion[rowId] = version));\n\n if (!this.pausedSubscribes) {\n if (!this.statesUpdateTimer) {\n this.statesUpdateTimer = setTimeout(() => {\n this.statesUpdateTimer = null;\n this.updateRowsOnly();\n }, 300);\n }\n } else if (this.statesUpdateTimer) {\n clearTimeout(this.statesUpdateTimer);\n this.statesUpdateTimer = null;\n }\n };\n\n private parseObjectForAdmins(\n columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null,\n obj: ioBroker.AdapterObject,\n ): Record<string, CustomAdminColumnStored[]> | null {\n if (obj.common?.adminColumns && obj.common.name) {\n const columns: string | (string | ioBroker.CustomAdminColumn)[] = obj.common.adminColumns;\n let aColumns: (string | ioBroker.CustomAdminColumn)[] | undefined;\n if (columns && typeof columns !== 'object') {\n aColumns = [columns];\n } else if (columns) {\n aColumns = columns as (string | ioBroker.CustomAdminColumn)[];\n }\n let cColumns: CustomAdminColumnStored[] | null | undefined;\n if (columns) {\n cColumns = aColumns\n ?.map((_item: string | ioBroker.CustomAdminColumn) => {\n if (typeof _item !== 'object') {\n return { path: _item, name: _item.split('.').pop() } as CustomAdminColumnStored;\n }\n const item: ioBroker.CustomAdminColumn = _item;\n // string => array\n if (item.objTypes && typeof item.objTypes !== 'object') {\n item.objTypes = [item.objTypes];\n } else if (!item.objTypes) {\n item.objTypes = undefined;\n }\n\n if (!item.name && item.path) {\n return {\n path: item.path,\n name: item.path.split('.').pop(),\n width: item.width,\n edit: !!item.edit,\n type: item.type,\n objTypes: item.objTypes,\n } as CustomAdminColumnStored;\n }\n if (!item.path) {\n console.warn(`Admin columns for ${obj._id} ignored, because path not found`);\n return null;\n }\n return {\n path: item.path,\n name: getName(item.name || '', this.props.lang),\n width: item.width,\n edit: !!item.edit,\n type: item.type,\n objTypes: item.objTypes,\n };\n })\n .filter((item: CustomAdminColumnStored | null) => item) as CustomAdminColumnStored[];\n } else {\n cColumns = null;\n }\n\n if (cColumns && cColumns.length) {\n columnsForAdmin ||= {};\n columnsForAdmin[obj.common.name] = cColumns.sort((a, b) =>\n a.path > b.path ? -1 : a.path < b.path ? 1 : 0,\n );\n }\n } else if (obj.common && obj.common.name && columnsForAdmin && columnsForAdmin[obj.common.name]) {\n delete columnsForAdmin[obj.common.name];\n }\n return columnsForAdmin;\n }\n\n onObjectChangeFromWorker = (events: ObjectEvent[]): void => {\n if (Array.isArray(events)) {\n let newState: { columnsForAdmin: Record<string, CustomAdminColumnStored[] | null> | null } | null = null;\n events.forEach(event => {\n const { newInnerState, filtered } = this.processOnObjectChangeElement(event.id, event.obj);\n if (filtered) {\n return;\n }\n if (newInnerState && newState) {\n Object.assign(newState, newInnerState);\n } else {\n newState = newInnerState;\n }\n });\n\n if (newState) {\n this.setState(newState);\n }\n this.afterObjectUpdated();\n }\n };\n\n onObjectChange = (id: string, obj?: ioBroker.Object | null): void => {\n const { newInnerState, filtered } = this.processOnObjectChangeElement(id, obj);\n if (filtered) {\n return;\n }\n\n if (newInnerState) {\n this.setState(newInnerState);\n }\n this.afterObjectUpdated();\n };\n\n afterObjectUpdated(): void {\n if (!this.objects) {\n return;\n }\n if (this.objectsUpdateTimer) {\n // collect a burst of object changes into one rebuild: wait for a quiet period,\n // but do not postpone the rebuild forever while changes keep arriving\n if (Date.now() - this.objectsUpdateFirstTs >= 2000) {\n return;\n }\n clearTimeout(this.objectsUpdateTimer);\n } else {\n this.objectsUpdateFirstTs = Date.now();\n }\n this.objectsUpdateTimer = setTimeout(() => {\n this.objectsUpdateTimer = null;\n const { info, root } = buildTree(this.objects, {\n imagePrefix: this.props.imagePrefix,\n root: this.props.root,\n lang: this.props.lang,\n themeType: this.props.themeType,\n });\n this.root = root;\n this.info = info;\n if (!this.pausedSubscribes) {\n this.doFilter(true);\n } else {\n // the new tree has no visibility flags yet; re-apply the filter when the dialog is closed\n this.treeRebuiltWhilePaused = true;\n }\n }, 500);\n }\n\n // This function is called when the user changes the alias of an object.\n // It updates the aliasMap and returns true if the aliasMap has changed.\n updateAliases(aliasId: string): void {\n if (!this.objects || !this.info?.aliasesMap || !aliasId?.startsWith('alias.')) {\n return;\n }\n // Rebuild aliases map\n const aliasesIds = Object.keys(this.objects).filter(id => id.startsWith('alias.0'));\n\n this.info.aliasesMap = {};\n\n for (const id of aliasesIds) {\n const obj = this.objects[id];\n if (obj?.common?.alias?.id) {\n if (typeof obj.common.alias.id === 'string') {\n const usedId = obj.common.alias.id;\n if (!this.info.aliasesMap[usedId]) {\n this.info.aliasesMap[usedId] = [id];\n } else if (!this.info.aliasesMap[usedId].includes(id)) {\n this.info.aliasesMap[usedId].push(id);\n }\n } else {\n const readId = obj.common.alias.id.read;\n if (readId) {\n if (!this.info.aliasesMap[readId]) {\n this.info.aliasesMap[readId] = [id];\n } else if (!this.info.aliasesMap[readId].includes(id)) {\n this.info.aliasesMap[readId].push(id);\n }\n }\n const writeId = obj.common.alias.id.write;\n if (writeId) {\n if (!this.info.aliasesMap[writeId]) {\n this.info.aliasesMap[writeId] = [id];\n } else if (!this.info.aliasesMap[writeId].includes(id)) {\n this.info.aliasesMap[writeId].push(id);\n }\n }\n }\n }\n }\n }\n\n /**\n * Processes a single element in regard to certain filters, columns for admin and updates object dict\n *\n * @param id The id of the object\n * @param obj The object itself\n * @returns Returns an object containing the new state (if any) and whether the object was filtered.\n */\n processOnObjectChangeElement(\n id: string,\n obj?: ioBroker.Object | null,\n ): {\n filtered: boolean;\n newInnerState: null | { columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null };\n } {\n // console.log(`> objectChange ${id}`);\n const type = obj?.type;\n\n // If the object is filtered out, we don't need to update the React state\n if (\n obj &&\n typeof this.props.filterFunc === 'function' &&\n !this.props.filterFunc(obj) &&\n type !== 'channel' &&\n type !== 'device' &&\n type !== 'folder' &&\n type !== 'adapter' &&\n type !== 'instance'\n ) {\n return { newInnerState: null, filtered: true };\n }\n\n let newInnerState = null;\n if (id.startsWith('system.adapter.') && obj?.type === 'adapter') {\n const columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null = JSON.parse(\n JSON.stringify(this.state.columnsForAdmin),\n );\n\n this.parseObjectForAdmins(columnsForAdmin, obj);\n\n if (JSON.stringify(this.state.columnsForAdmin) !== JSON.stringify(columnsForAdmin)) {\n newInnerState = { columnsForAdmin };\n }\n }\n\n this.objects ||= {};\n\n if (obj) {\n this.objects[id] = obj;\n } else if (this.objects[id]) {\n delete this.objects[id];\n }\n\n this.updateAliases(id);\n\n return { newInnerState, filtered: false };\n }\n\n subscribe(id: string): void {\n if (!this.subscribes.has(id)) {\n this.subscribes.add(id);\n // console.log(`+ subscribe ${id}`);\n if (!this.pausedSubscribes) {\n this.props.socket\n .subscribeState(id, this.onStateChange)\n .catch(e => console.error(`Cannot subscribe on state ${id}: ${e}`));\n }\n }\n }\n\n unsubscribe(id: string): void {\n if (this.subscribes.has(id)) {\n this.subscribes.delete(id);\n if (this.states[id]) {\n delete this.states[id];\n }\n // console.log(`- unsubscribe ${id}`);\n this.props.socket.unsubscribeState(id, this.onStateChange);\n\n if (this.pausedSubscribes) {\n console.warn('Unsubscribe during pause?');\n }\n }\n }\n\n pauseSubscribe(isPause: boolean): void {\n if (!this.pausedSubscribes && isPause) {\n this.pausedSubscribes = true;\n this.subscribes.forEach(id => this.props.socket.unsubscribeState(id, this.onStateChange));\n } else if (this.pausedSubscribes && !isPause) {\n this.pausedSubscribes = false;\n this.subscribes.forEach(id => this.props.socket.subscribeState(id, this.onStateChange));\n if (this.treeRebuiltWhilePaused) {\n // without this filter run, no node of the rebuilt tree is marked visible and the browser stays empty\n this.treeRebuiltWhilePaused = false;\n this.doFilter(true);\n }\n }\n }\n\n clearFilter(): void {\n if (JSON.stringify(this.state.filter) !== JSON.stringify(DEFAULT_FILTER)) {\n this.setState({ filter: { ...DEFAULT_FILTER }, filterKey: this.state.filterKey + 1 }, () => {\n this.doFilter();\n this.props.onFilterChanged?.({ ...DEFAULT_FILTER });\n });\n }\n }\n\n isFilterEmpty(): boolean {\n return (\n !!this.state.filter.id ||\n !!this.state.filter.name ||\n !!this.state.filter.room?.length ||\n !!this.state.filter.func?.length ||\n !!this.state.filter.role?.length ||\n !!this.state.filter.type?.length ||\n !!this.state.filter.custom?.length\n );\n }\n\n onExpandAll(root?: TreeItem, expanded?: string[]): void {\n const _root: TreeItem | null = root || this.root;\n expanded ||= [];\n\n _root?.children?.forEach((item: TreeItem) => {\n if (item.data.sumVisibility) {\n expanded.push(item.data.id);\n this.onExpandAll(item, expanded);\n }\n });\n\n if (_root === this.root) {\n expanded.sort();\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n\n this.setState({ expanded });\n }\n }\n\n onCollapseAll(): void {\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify([]));\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectSelected`, '[]');\n this.setState({ expanded: [], depth: 0, selected: [] }, () => this.onAfterSelect());\n }\n\n private expandDepth(root: TreeItem, depth: number, expanded: string[], expandedSet?: Set<string>): void {\n if (!this.root) {\n throw new Error('No root');\n }\n root ||= this.root;\n expandedSet ||= new Set(expanded);\n if (depth > 0) {\n root.children?.forEach(item => {\n if (item.data.sumVisibility) {\n if (!expandedSet.has(item.data.id)) {\n expanded.push(item.data.id);\n expandedSet.add(item.data.id);\n }\n if (depth - 1 > 0) {\n this.expandDepth(item, depth - 1, expanded, expandedSet);\n }\n }\n });\n }\n }\n\n private static collapseDepth(depth: number, expanded: string[]): string[] {\n return expanded.filter(id => id.split('.').length <= depth);\n }\n\n onExpandVisible(): void {\n if (this.state.depth < 9) {\n const depth = this.state.depth + 1;\n const expanded = [...this.state.expanded];\n if (this.root) {\n this.expandDepth(this.root, depth, expanded);\n expanded.sort();\n }\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n this.setState({ depth, expanded });\n }\n }\n\n onStatesViewVisible(): void {\n const statesView = !this.state.statesView;\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectStatesView`, JSON.stringify(statesView));\n this.setState({ statesView });\n }\n\n onCollapseVisible(): void {\n if (this.state.depth > 0) {\n const depth = this.state.depth - 1;\n const expanded = ObjectBrowserClass.collapseDepth(depth, this.state.expanded);\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n this.setState({ depth, expanded });\n }\n }\n\n private getEnumsForId = (id: string): ioBroker.EnumObject[] | undefined => {\n const result: ioBroker.EnumObject[] = [];\n this.info.enums.forEach(_id => {\n if (this.objects[_id]?.common?.members?.includes(id)) {\n const enumItem: ioBroker.EnumObject = {\n _id: this.objects[_id]._id,\n common: JSON.parse(JSON.stringify(this.objects[_id].common)) as ioBroker.EnumCommon,\n native: this.objects[_id].native,\n type: 'enum',\n };\n if (enumItem.common) {\n delete enumItem.common.members;\n delete enumItem.common.custom;\n // @ts-expect-error deprecated attribute\n delete enumItem.common.mobile;\n }\n result.push(enumItem);\n }\n });\n\n return result.length ? result : undefined;\n };\n\n private _createAllEnums = async (enums: (string | ioBroker.EnumObject)[], objId: string): Promise<void> => {\n for (let e = 0; e < enums.length; e++) {\n const item: string | ioBroker.EnumObject = enums[e];\n let id: string;\n let newObj: ioBroker.EnumObject | undefined;\n\n // some admin version delivered enums as string\n if (typeof item === 'object') {\n newObj = item;\n id = newObj._id;\n } else {\n id = item;\n }\n\n let oldObj: ioBroker.EnumObject | undefined = this.objects[id] as ioBroker.EnumObject | undefined;\n // if enum does not exist\n if (!oldObj) {\n // create a new one\n oldObj =\n newObj ||\n ({\n _id: id,\n common: {\n name: id.split('.').pop(),\n members: [],\n },\n native: {},\n type: 'enum',\n } as ioBroker.EnumObject);\n\n oldObj.common ||= {} as ioBroker.EnumCommon;\n oldObj.common.members = [objId];\n oldObj.type = 'enum';\n\n await this.props.socket.setObject(id, oldObj);\n } else if (!oldObj.common?.members?.includes(objId)) {\n oldObj.common ||= {} as ioBroker.EnumCommon;\n oldObj.type = 'enum';\n oldObj.common.members ||= [];\n // add the missing object\n oldObj.common.members.push(objId);\n oldObj.common.members.sort();\n await this.props.socket.setObject(id, oldObj);\n }\n }\n };\n\n private async loadObjects(objs: Record<string, ioBrokerObjectForExport>): Promise<void> {\n if (objs) {\n for (const id in objs) {\n if (!Object.prototype.hasOwnProperty.call(objs, id) || !objs[id]) {\n continue;\n }\n const obj = objs[id];\n let enums = null;\n let val;\n let ack;\n if (obj?.common?.enums) {\n enums = obj.common.enums;\n delete obj.common.enums;\n } else {\n enums = null;\n }\n\n if (obj.val || obj.val === 0) {\n val = obj.val;\n delete obj.val;\n }\n if (obj.ack !== undefined) {\n ack = obj.ack;\n delete obj.ack;\n }\n try {\n await this.props.socket.setObject(id, obj);\n if (enums) {\n await this._createAllEnums(enums, obj._id);\n }\n if (obj.type === 'state') {\n if (val !== undefined && val !== null) {\n try {\n await this.props.socket.setState(obj._id, val, ack !== undefined ? ack : true);\n } catch (e) {\n window.alert(`Cannot set state \"${obj._id} with ${val}\": ${e}`);\n }\n } else {\n try {\n const state = await this.props.socket.getState(obj._id);\n if (!state || state.val === null) {\n try {\n await this.props.socket.setState(\n obj._id,\n !obj.common || obj.common.def === undefined ? null : obj.common.def,\n true,\n );\n } catch (e) {\n window.alert(`Cannot set state \"${obj._id}\": ${e}`);\n }\n }\n } catch (e) {\n window.alert(`Cannot read state \"${obj._id}\": ${e}`);\n }\n }\n }\n } catch (error) {\n window.alert(error);\n }\n }\n }\n }\n\n _getSelectedIdsForExport(): string[] {\n if (this.state.selected.length || this.state.selectedNonObject) {\n const result = [];\n const keys = Object.keys(this.objects);\n keys.sort();\n const id = this.state.selected[0] || this.state.selectedNonObject;\n const idDot = `${id}.`;\n const idLen = idDot.length;\n for (let k = 0; k < keys.length; k++) {\n const key = keys[k];\n if (id === key || key.startsWith(idDot)) {\n result.push(key);\n }\n if (key.substring(0, idLen) > idDot) {\n break;\n }\n }\n\n return result;\n }\n return [];\n }\n\n /**\n * Exports the selected objects based on the given options and triggers file generation\n */\n async _exportObjects(\n /** Options to filter/reduce the output */\n options: {\n /** Whether all objects should be exported or only the selected ones */\n isAll?: boolean;\n /** Whether the output should be beautified */\n beautify?: boolean;\n /** Whether \"system.repositories\" should be excluded */\n excludeSystemRepositories?: boolean;\n /** Whether translations should be reduced to only the english value */\n excludeTranslations?: boolean;\n /** Whether the values of the states should be not included */\n noStatesByExportImport?: boolean;\n },\n ): Promise<void> {\n if (options.isAll) {\n generateFile('allObjects.json', this.objects, options);\n return;\n }\n if (!(this.state.selected.length || this.state.selectedNonObject)) {\n window.alert(this.props.t('ra_Save of objects-tree is not possible'));\n return;\n }\n const result: Record<string, ioBrokerObjectForExport> = {};\n const id = this.state.selected[0] || this.state.selectedNonObject;\n const ids = this._getSelectedIdsForExport();\n\n for (const key of ids) {\n result[key] = JSON.parse(JSON.stringify(this.objects[key])) as ioBrokerObjectForExport;\n // read states values\n if (result[key]?.type === 'state' && !options.noStatesByExportImport) {\n const state = await this.props.socket.getState(key);\n if (state) {\n result[key].val = state.val;\n result[key].ack = state.ack;\n }\n }\n // add enum information\n if (result[key].common) {\n const enums = this.getEnumsForId(key);\n if (enums) {\n result[key].common.enums = enums;\n }\n }\n }\n\n generateFile(`${id}.json`, result, options);\n }\n\n renderExportDialog(): JSX.Element | null {\n return dialogs.renderExportDialog(this);\n }\n\n renderRenameDialog(): JSX.Element | null {\n return dialogs.renderRenameDialog(this);\n }\n\n async parseJsonFile(contents: string): Promise<void> {\n try {\n const json = JSON.parse(contents);\n const len = Object.keys(json).length;\n const id = json._id;\n // it could be a single object or many objects\n if (id === undefined && len) {\n // many objects\n await this.loadObjects(json as Record<string, ioBrokerObjectForExport>);\n window.alert(this.props.t('ra_%s object(s) processed', len));\n } else {\n // it is only one object in form\n // {\n // \"_id\": \"xxx\",\n // \"common\": \"yyy\",\n // \"native\": \"zzz\"\n // \"val\": JSON.stringify(value)\n // \"ack\": true\n // }\n if (!id) {\n return window.alert(this.props.t('ra_Invalid structure'));\n }\n try {\n let enums;\n let val;\n let ack;\n if (json.common.enums) {\n enums = json.common.enums;\n delete json.common.enums;\n }\n if (json.val) {\n val = json.val;\n delete json.val;\n }\n if (json.ack !== undefined) {\n ack = json.ack;\n delete json.ack;\n }\n await this.props.socket.setObject(json._id, json);\n\n if (json.type === 'state') {\n if (val !== undefined && val !== null) {\n await this.props.socket.setState(json._id, val, ack === undefined ? true : ack);\n } else {\n const state = await this.props.socket.getState(json._id);\n if (!state || state.val === null || state.val === undefined) {\n await this.props.socket.setState(\n json._id,\n json.common.def === undefined ? null : json.common.def,\n true,\n );\n }\n }\n }\n if (enums) {\n await this._createAllEnums(enums, json._id);\n }\n\n window.alert(this.props.t('ra_%s was imported', json._id));\n } catch (err) {\n window.alert(err);\n }\n }\n } catch (err) {\n window.alert(err);\n }\n }\n private handleJsonUpload(evt: Event): void {\n const target = evt.target as HTMLInputElement;\n const f = target.files?.length && target.files[0];\n if (f) {\n const r = new FileReader();\n r.onload = (e): void => {\n this.parseJsonFile(e.target?.result as string).catch(e => console.log(`Cannot parse file: ${e}`));\n };\n r.readAsText(f);\n } else {\n window.alert(this.props.t('ra_Failed to open JSON File'));\n }\n }\n\n toolTipObjectCreating = (): JSX.Element[] | string => {\n const { t } = this.props;\n\n let value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={2}>{t('ra_Folder → State')}</div>,\n <div key={3}>{t('ra_Folder → Channel → State')}</div>,\n <div key={4}>{t('ra_Folder → Device → Channel → State')}</div>,\n <div key={5}>{t('ra_Device → Channel → State')}</div>,\n <div key={6}>{t('ra_Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={8}>{t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}</div>,\n <div key={9}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n\n if (this.state.selected.length || this.state.selectedNonObject) {\n const id = this.state.selected[0] || this.state.selectedNonObject;\n if (id.split('.').length < 2 || (this.objects[id] && this.objects[id]?.type === 'state')) {\n // show default tooltip\n } else if (this.state.filter.expertMode) {\n switch (this.objects[id]?.type) {\n case 'device':\n value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={5}>{t('ra_Device → Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={8}>\n {t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}\n </div>,\n <div key={9}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n break;\n case 'folder':\n value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={2}>{t('ra_Folder → State')}</div>,\n <div key={3}>{t('ra_Folder → Channel → State')}</div>,\n <div key={4}>{t('ra_Folder → Device → Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={8}>\n {t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}\n </div>,\n <div key={9}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n break;\n case 'channel':\n value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={1}>{t('ra_Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={8}>\n {t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}\n </div>,\n <div key={9}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n break;\n default:\n break;\n }\n } else if (id.startsWith('alias.0') || id.startsWith('0_userdata')) {\n value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={2}>{t('ra_Folder → State')}</div>,\n <div key={3}>{t('ra_Folder → Channel → State')}</div>,\n <div key={4}>{t('ra_Folder → Device → Channel → State')}</div>,\n <div key={5}>{t('ra_Device → Channel → State')}</div>,\n <div key={6}>{t('ra_Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={7}>\n {t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}\n </div>,\n <div key={8}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n }\n }\n\n return value.length ? value : t('ra_Add new child object to selected parent');\n };\n\n onOpenFile(): void {\n const input = document.createElement('input');\n input.setAttribute('type', 'file');\n input.setAttribute('id', 'files');\n input.setAttribute('opacity', '0');\n input.addEventListener('change', (e: Event) => this.handleJsonUpload(e), false);\n input.click();\n }\n\n renderInputJsonDialog(): JSX.Element | null {\n return dialogs.renderInputJsonDialog(this);\n }\n\n /**\n * Renders the toolbar.\n */\n getToolbar(): JSX.Element {\n return toolbar.getToolbar(this);\n }\n\n toggleExpanded(id: string): void {\n const expanded: string[] = JSON.parse(JSON.stringify(this.state.expanded));\n const pos = expanded.indexOf(id);\n if (pos === -1) {\n expanded.push(id);\n expanded.sort();\n } else {\n expanded.splice(pos, 1);\n }\n\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n\n this.setState({ expanded });\n }\n\n onCopy(e: React.MouseEvent, text: string | undefined): void {\n e.stopPropagation();\n e.preventDefault();\n if (text) {\n Utils.copyToClipboard(text);\n if (text.length < 50) {\n this.setState({ toast: this.props.t('ra_Copied %s', text) });\n } else {\n this.setState({ toast: this.props.t('ra_Copied') });\n }\n }\n }\n\n renderTooltipAccessControl(acl: ioBroker.StateACL): null | JSX.Element {\n return leaf.renderTooltipAccessControl(this, acl);\n }\n\n renderColumnButtons(id: string, item: TreeItem): (JSX.Element | null)[] | JSX.Element | null {\n return leaf.renderColumnButtons(this, id, item);\n }\n\n getTooltipInfo(id: string, cb?: () => void): void {\n const obj = this.objects[id];\n const state = this.states[id];\n\n const { valFull, fileViewer } = formatValue({\n state,\n obj: obj as ioBroker.StateObject,\n texts: this.texts,\n dateFormat: this.props.dateFormat || this.systemConfig?.common.dateFormat || DEFAULT_DATE_FORMAT,\n isFloatComma:\n this.props.isFloatComma === undefined\n ? (this.systemConfig?.common.isFloatComma ?? true)\n : this.props.isFloatComma,\n full: true,\n });\n const valFullRx: JSX.Element[] = [];\n\n valFull?.forEach(_item => {\n if (_item.t === this.texts.quality && state.q) {\n valFullRx.push(\n <div\n style={styles.cellValueTooltipBoth}\n key={_item.t}\n >\n {_item.t}\n : \n {_item.v}\n </div>,\n );\n // <div style={styles.cellValueTooltipValue} key={item.t + '_v'}>{item.v}</div>,\n if (!_item.nbr) {\n valFullRx.push(<br key={`${_item.t}_br`} />);\n }\n } else {\n valFullRx.push(\n <div\n style={styles.cellValueTooltipTitle}\n key={_item.t}\n >\n {_item.t}\n : \n </div>,\n );\n valFullRx.push(\n <div\n style={styles.cellValueTooltipValue}\n key={`${_item.t}_v`}\n >\n {_item.v}\n </div>,\n );\n if (!_item.nbr) {\n valFullRx.push(<br key={`${_item.t}_br`} />);\n }\n }\n });\n const role = obj?.common?.role || '';\n\n if (fileViewer === 'image') {\n valFullRx.push(\n <img\n style={styles.cellValueTooltipImage}\n src={state.val as string}\n alt={id}\n />,\n );\n } else if (role === 'url' || role === 'url.self' || role === 'url.blank') {\n // Show comment about \"Hold Ctrl/⌘ key to open the link\"\n valFullRx.unshift(\n <div\n key=\"ctrl\"\n style={{ textDecoration: 'underline', fontWeight: 'bold' }}\n >\n {this.texts.ctrlForLink}\n </div>,\n );\n } else if (this.defaultHistory && obj?.common?.custom?.[this.defaultHistory]) {\n const isNumber = typeof state?.val === 'number';\n const isBoolean = obj.common.type === 'boolean' || typeof state?.val === 'boolean';\n valFullRx.push(\n <HistoryChart\n key=\"chart\"\n socket={this.props.socket}\n id={id}\n instance={this.defaultHistory}\n t={this.props.t}\n isBoolean={isBoolean}\n isFloatComma={\n this.props.isFloatComma === undefined\n ? (this.systemConfig?.common.isFloatComma ?? true)\n : this.props.isFloatComma\n }\n current={\n isNumber || isBoolean\n ? { ts: state.ts, val: typeof state.val === 'boolean' ? +state.val : (state.val as number) }\n : null\n }\n />,\n );\n }\n\n this.setState({ tooltipInfo: { el: valFullRx, id } }, () => cb && cb());\n }\n\n private _syncEnum(id: string, enumIds: string[], newArray: string[], cb: () => void): void {\n if (!enumIds?.length) {\n if (cb) {\n cb();\n }\n return;\n }\n const enumId = enumIds.pop() || '';\n const promises = [];\n if (this.info.objects[enumId]?.common) {\n if (this.info.objects[enumId].common.members?.length) {\n const pos = this.info.objects[enumId].common.members.indexOf(id);\n if (pos !== -1 && !newArray.includes(enumId)) {\n // delete it from members\n const obj: ioBroker.Object = JSON.parse(JSON.stringify(this.info.objects[enumId]));\n obj.common.members.splice(pos, 1);\n promises.push(\n this.props.socket\n .setObject(enumId, obj)\n .then(() => (this.info.objects[enumId] = obj))\n .catch(e => this.showError(e)),\n );\n }\n }\n\n // add to it\n if (newArray.includes(enumId) && !this.info.objects[enumId].common.members?.includes(id)) {\n // add to object\n const obj: ioBroker.Object = JSON.parse(JSON.stringify(this.info.objects[enumId]));\n obj.common.members ||= [];\n obj.common.members.push(id);\n obj.common.members.sort();\n promises.push(\n this.props.socket\n .setObject(enumId, obj)\n .then(() => (this.info.objects[enumId] = obj))\n .catch(e => this.showError(e)),\n );\n }\n }\n\n void Promise.all(promises).then(() => {\n setTimeout(() => this._syncEnum(id, enumIds, newArray, cb), 0);\n });\n }\n\n syncEnum(id: string, enumName: 'func' | 'room', newArray: string[]): Promise<void> {\n const toCheck = [...this.info[enumName === 'func' ? 'funcEnums' : 'roomEnums']];\n\n return new Promise<void>(resolve => {\n this._syncEnum(id, toCheck, newArray, () => {\n // force update of an object\n resolve();\n });\n });\n }\n\n onColumnsEditCustomDialogClose(isSave?: boolean): void {\n // cannot be null\n const customColumnDialog: {\n value: boolean | number | string;\n type: 'boolean' | 'number' | 'string';\n initValue: boolean | number | string;\n } = this.customColumnDialog as {\n value: boolean | number | string;\n type: 'boolean' | 'number' | 'string';\n initValue: boolean | number | string;\n };\n\n if (isSave) {\n let value: string | number | boolean = customColumnDialog.value;\n if (customColumnDialog.type === 'boolean') {\n value = value === 'true' || value === true;\n } else if (customColumnDialog.type === 'number') {\n value = parseFloat(value as any as string);\n }\n const it = this.state.columnsEditCustomDialog?.it;\n this.customColumnDialog = null;\n this.props.socket\n .getObject(this.state.columnsEditCustomDialog?.obj?._id || '')\n .then(obj => {\n if (obj && it && setCustomValue(obj, it, value)) {\n return this.props.socket.setObject(obj._id, obj);\n }\n throw new Error(this.props.t('ra_Cannot update attribute, because not found in the object'));\n })\n .then(() => this.setState({ columnsEditCustomDialog: null }))\n .catch(e => this.showError(e));\n } else {\n this.customColumnDialog = null;\n this.setState({ columnsEditCustomDialog: null });\n }\n }\n\n /**\n * Renders a custom value.\n */\n renderCustomValue(obj: ioBroker.Object, it: AdapterColumn, item: TreeItem): JSX.Element | null {\n return leaf.renderCustomValue(this, obj, it, item);\n }\n\n renderAliasLink(id: string, index?: number, customStyle?: Record<string, any>): JSX.Element | null {\n return leaf.renderAliasLink(this, id, index, customStyle);\n }\n\n /**\n * Renders one row of the table.\n */\n renderLeaf(\n item: TreeItem,\n isExpanded: boolean | undefined,\n counter: { count: number },\n ): { row: JSX.Element; details: JSX.Element | null } {\n return leaf.renderLeaf(this, item, isExpanded, counter);\n }\n\n /**\n * Renders an item.\n */\n renderItem(root: TreeItem, isExpanded: boolean | undefined, counter?: { count: number }): (JSX.Element | null)[] {\n return leaf.renderItem(this, root, isExpanded, counter);\n }\n\n calculateColumnsVisibility(\n aColumnsAuto?: boolean | null,\n aColumns?: string[] | null,\n aColumnsForAdmin?: Record<string, CustomAdminColumnStored[]> | null,\n aColumnsWidths?: Record<string, number>,\n ): void {\n let columnsWidths: Record<string, number> = aColumnsWidths || this.state.columnsWidths;\n const columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null =\n aColumnsForAdmin || this.state.columnsForAdmin;\n const columns: string[] = aColumns || this.state.columns || [];\n const columnsAuto: boolean = typeof aColumnsAuto !== 'boolean' ? this.state.columnsAuto : aColumnsAuto;\n\n columnsWidths = JSON.parse(JSON.stringify(columnsWidths));\n Object.keys(columnsWidths).forEach(name => {\n if (columnsWidths[name]) {\n columnsWidths[name] = parseInt(columnsWidths[name] as any as string, 10) || 0;\n }\n });\n\n this.adapterColumns = [];\n\n // In the auto mode the visible columns depend on the width of the container\n if (!this.props.columns) {\n this.visibleCols = [...this.screenWidths[this.width].fields];\n // remove type column if only one type must be selected\n if (this.props.types && this.props.types.length === 1) {\n const pos = this.visibleCols.indexOf('type');\n if (pos !== -1) {\n this.visibleCols.splice(pos, 1);\n }\n }\n }\n\n const WIDTHS = this.screenWidths[this.width].widths;\n\n if (columnsAuto) {\n this.columnsVisibility = {\n id: this.screenWidths[this.width || 'lg'].idWidth,\n name: this.visibleCols.includes('name') ? WIDTHS.name || 0 : 0,\n type: this.visibleCols.includes('type') ? WIDTHS.type || 0 : 0,\n role: this.visibleCols.includes('role') ? WIDTHS.role || 0 : 0,\n room: this.visibleCols.includes('room') ? WIDTHS.room || 0 : 0,\n func: this.visibleCols.includes('func') ? WIDTHS.func || 0 : 0,\n changedFrom: this.visibleCols.includes('changedFrom') ? WIDTHS.changedFrom || 0 : 0,\n qualityCode: this.visibleCols.includes('qualityCode') ? WIDTHS.qualityCode || 0 : 0,\n timestamp: this.visibleCols.includes('timestamp') ? WIDTHS.timestamp || 0 : 0,\n lastChange: this.visibleCols.includes('lastChange') ? WIDTHS.lastChange || 0 : 0,\n val: this.visibleCols.includes('val') ? WIDTHS.val || 0 : 0,\n buttons: this.visibleCols.includes('buttons') ? WIDTHS.buttons || 0 : 0,\n };\n\n // in xs name is not visible\n if (this.columnsVisibility.name && !this.customWidth) {\n let widthSum: number = (this.columnsVisibility.id as number) || 0; // id is always visible\n if (this.state.statesView) {\n widthSum += this.columnsVisibility.changedFrom || 0;\n widthSum += this.columnsVisibility.qualityCode || 0;\n widthSum += this.columnsVisibility.timestamp || 0;\n widthSum += this.columnsVisibility.lastChange || 0;\n } else {\n widthSum += this.columnsVisibility.type || 0;\n widthSum += this.columnsVisibility.role || 0;\n widthSum += this.columnsVisibility.room || 0;\n widthSum += this.columnsVisibility.func || 0;\n }\n widthSum += this.columnsVisibility.val || 0;\n widthSum += this.columnsVisibility.buttons || 0;\n this.columnsVisibility.name = `calc(100% - ${widthSum + 5}px)`;\n } else if (!this.customWidth) {\n // Calculate the width of ID\n let widthSum = 0; // id is always visible\n if (this.state.statesView) {\n widthSum += this.columnsVisibility.changedFrom || 0;\n widthSum += this.columnsVisibility.qualityCode || 0;\n widthSum += this.columnsVisibility.timestamp || 0;\n widthSum += this.columnsVisibility.lastChange || 0;\n } else {\n widthSum += this.columnsVisibility.type || 0;\n widthSum += this.columnsVisibility.role || 0;\n widthSum += this.columnsVisibility.room || 0;\n widthSum += this.columnsVisibility.func || 0;\n }\n widthSum += this.columnsVisibility.val || 0;\n widthSum += this.columnsVisibility.buttons || 0;\n this.columnsVisibility.id = `calc(100% - ${widthSum + 5}px)`;\n }\n } else {\n const width = this.width || 'lg';\n /**\n * A row shows either type/role/room/function or the four columns of the states view,\n * never both. A column of the set that is not shown must have the width zero, so that\n * the ID column, which fills the rest of the row, gets the right place.\n */\n const shown = (name: string, inStatesView: boolean): boolean =>\n !!this.state.statesView === inStatesView && columns.includes(name);\n /** Width of one column: what the user set for it, else the default of the width class */\n const widthOf = (name: string): number =>\n columnsWidths[name] || (WIDTHS as Record<string, number>)[name] || 0;\n /**\n * The width classes below `lg` do not define the columns of the states view, but the\n * user can select them by hand there too, so they fall back to the widest class.\n */\n const statesWidthOf = (name: string): number =>\n widthOf(name) || (this.screenWidths.xl.widths as Record<string, number>)[name] || 0;\n\n this.columnsVisibility = {\n id: columnsWidths.id || this.screenWidths[width].idWidth,\n name: columns.includes('name') ? widthOf('name') : 0,\n type: shown('type', false) ? widthOf('type') : 0,\n role: shown('role', false) ? widthOf('role') : 0,\n room: shown('room', false) ? widthOf('room') : 0,\n func: shown('func', false) ? widthOf('func') : 0,\n // The states view columns were missing here completely: their checkboxes in the\n // configuration dialog had no effect, and the header showed them although no row\n // had a cell for them.\n changedFrom: shown('changedFrom', true) ? statesWidthOf('changedFrom') : 0,\n qualityCode: shown('qualityCode', true) ? statesWidthOf('qualityCode') : 0,\n timestamp: shown('timestamp', true) ? statesWidthOf('timestamp') : 0,\n lastChange: shown('lastChange', true) ? statesWidthOf('lastChange') : 0,\n };\n let widthSum: number = this.columnsVisibility.id as number; // id is always visible\n if (this.columnsVisibility.name) {\n // Only one of the two sets has a width, so both may be added up\n widthSum += this.columnsVisibility.type || 0;\n widthSum += this.columnsVisibility.role || 0;\n widthSum += this.columnsVisibility.room || 0;\n widthSum += this.columnsVisibility.func || 0;\n widthSum += this.columnsVisibility.changedFrom || 0;\n widthSum += this.columnsVisibility.qualityCode || 0;\n widthSum += this.columnsVisibility.timestamp || 0;\n widthSum += this.columnsVisibility.lastChange || 0;\n }\n\n if (columnsForAdmin && columns) {\n Object.keys(columnsForAdmin)\n .sort()\n .forEach(adapter =>\n columnsForAdmin[adapter].forEach(column => {\n const id = `_${adapter}_${column.path}`;\n if (columns.includes(id)) {\n const item: AdapterColumn = {\n adapter,\n id: `_${adapter}_${column.path}`,\n name: column.name,\n path: column.path.split('.'),\n pathText: column.path,\n };\n if (column.edit) {\n item.edit = true;\n if (column.type) {\n item.type = column.type as 'number' | 'boolean' | 'string';\n }\n if (column.objTypes) {\n item.objTypes = column.objTypes;\n }\n }\n\n this.adapterColumns.push(item);\n (this.columnsVisibility as Record<string, number>)[id] =\n columnsWidths[item.id] ||\n column.width ||\n this.screenWidths[width].widths.func ||\n this.screenWidths.xl.widths.func ||\n 0;\n widthSum += (this.columnsVisibility as Record<string, number>)[id];\n } else {\n (this.columnsVisibility as Record<string, number>)[id] = 0;\n }\n }),\n );\n }\n this.adapterColumns.sort((a, b) => (a.id > b.id ? -1 : a.id < b.id ? 1 : 0));\n this.columnsVisibility.val = columns.includes('val')\n ? columnsWidths.val || WIDTHS.val || this.screenWidths.xl.widths.val\n : 0;\n\n // do not show buttons if not desired\n if (!this.props.columns || this.props.columns.includes('buttons')) {\n this.columnsVisibility.buttons = columns.includes('buttons')\n ? columnsWidths.buttons || WIDTHS.buttons || this.screenWidths.xl.widths.buttons\n : 0;\n widthSum += this.columnsVisibility.buttons || 0;\n }\n\n if (this.columnsVisibility.name && !columnsWidths.name) {\n widthSum += this.columnsVisibility.val || 0;\n this.columnsVisibility.name = `calc(100% - ${widthSum}px)`;\n } else {\n const newWidth = Object.keys(this.columnsVisibility).reduce((accumulator: number, name: string) => {\n // do not summarize strings\n if (\n name === 'id' ||\n typeof (this.columnsVisibility as Record<string, number | string>)[name] === 'string' ||\n !(this.columnsVisibility as Record<string, number | string>)[name]\n ) {\n return accumulator;\n }\n return accumulator + (this.columnsVisibility as Record<string, number>)[name];\n }, 0);\n this.columnsVisibility.id = `calc(100% - ${newWidth}px)`;\n }\n }\n }\n\n /**\n * The width class of the object browser. It is measured from the container and not from the\n * window, so the browser shows the right columns if it is used in a narrow panel or dialog too.\n * `props.width` overwrites the measured value.\n */\n get width(): Width {\n return this.props.width || this.state.containerWidth;\n }\n\n /** Watch the width of the table container to detect the width class (see `width`) */\n observeContainerWidth(): void {\n const container = this.tableRef.current;\n if (!container || this.observedContainer === container) {\n return;\n }\n this.resizeObserver?.disconnect();\n this.observedContainer = container;\n this.resizeObserver = new ResizeObserver(entries => {\n // the height decides how many rows are rendered (see `getWindow`)\n this.setViewportHeight(entries[0].contentRect.height);\n this.setContainerWidth(entries[0].contentRect.width);\n });\n this.resizeObserver.observe(container);\n // measure immediately, so the first render after mounting shows the right columns\n this.setViewportHeight(container.clientHeight);\n this.setContainerWidth(container.clientWidth);\n }\n\n /** Store the height of the container: it decides how many rows the window holds */\n setViewportHeight(viewportHeight: number): void {\n if (Math.abs(this.viewportHeight - viewportHeight) < 1) {\n return;\n }\n this.viewportHeight = viewportHeight;\n const { first, last } = this.getWindow();\n if (first !== this.windowFirst || last !== this.windowLast) {\n this.updateRowsOnly();\n }\n }\n\n /** Store the width class of the container if it changed */\n setContainerWidth(containerWidth: number): void {\n const width = widthFromContainer(containerWidth, this.props.theme);\n if (width !== this.state.containerWidth) {\n // the columns are recalculated in `render`, as soon as the width class changed\n this.setState({ containerWidth: width });\n }\n }\n\n /**\n * The height a row needs.\n *\n * A row with an alias is higher than the others, and what a row really measured beats the\n * estimate - the table has to know the height of rows it does not render at the moment,\n * otherwise the scrollbar does not fit the content.\n */\n private rowHeight(item: TreeItem): number {\n const id = item.data.id;\n // the root itself has no row, only its children have one\n if (!id) {\n return 0;\n }\n const measured = this.measuredHeights[id];\n if (measured) {\n return measured;\n }\n const common = this.objects[id]?.common as ioBroker.StateCommon | undefined;\n if (id.startsWith('alias.') && common?.alias?.id) {\n // see `tableRowAlias` and `tableRowAliasReadWrite` in styles.ts\n return typeof common.alias.id === 'object' ? ROW_HEIGHT + 22 : ROW_HEIGHT + 10;\n }\n return ROW_HEIGHT;\n }\n\n /** All rows in the order in which they are shown, and where each of them begins */\n private buildFlatRows(): void {\n this.flatRows = this.root ? leaf.flattenItems(this, this.root) : [];\n this.calculateRowOffsets();\n }\n\n /** Where every row begins - again after a row measured another height than was expected */\n private calculateRowOffsets(): void {\n this.rowOffsetsInvalid = false;\n const offsets: number[] = new Array(this.flatRows.length + 1);\n offsets[0] = 0;\n for (let i = 0; i < this.flatRows.length; i++) {\n offsets[i + 1] = offsets[i] + this.rowHeight(this.flatRows[i].item);\n }\n this.rowOffsets = offsets;\n }\n\n /** The row that covers this position (binary search over `rowOffsets`) */\n private findRowAt(position: number): number {\n let low = 0;\n let high = this.flatRows.length - 1;\n while (low < high) {\n const middle = (low + high + 1) >> 1;\n if (this.rowOffsets[middle] <= position) {\n low = middle;\n } else {\n high = middle - 1;\n }\n }\n return low;\n }\n\n /**\n * The rows that are rendered: the visible ones plus `OVERSCAN_ROWS` above and below.\n *\n * A tree with a few thousand open rows costs a fifth of a second of blocked main thread for\n * every change that concerns all rows - selecting a row, a filter, folding a node - because\n * every row is built anew. Only the rows around the visible area are rendered now, so that\n * work no longer grows with the size of the tree.\n */\n private getWindow(): { first: number; last: number } {\n const count = this.flatRows.length;\n if (!count) {\n return { first: 0, last: 0 };\n }\n // until the container was measured (the very first render) render a screen full of rows\n const height = this.viewportHeight || 1_000;\n const first = Math.max(0, this.findRowAt(this.scrollTop) - ObjectBrowserClass.OVERSCAN_ROWS);\n const last = Math.min(count, this.findRowAt(this.scrollTop + height) + 1 + ObjectBrowserClass.OVERSCAN_ROWS);\n return { first, last };\n }\n\n /** The table was scrolled: move the window of rendered rows, at most once per frame */\n private readonly onTableScroll = (): void => {\n if (this.scrollFrame !== null) {\n return;\n }\n this.scrollFrame = window.requestAnimationFrame(() => {\n this.scrollFrame = null;\n const container = this.tableRef.current;\n if (!container) {\n return;\n }\n this.scrollTop = container.scrollTop;\n const { first, last } = this.getWindow();\n if (first !== this.windowFirst || last !== this.windowLast) {\n // scrolling changes no row, so the rows that stay in the window keep their output\n this.updateRowsOnly();\n }\n });\n };\n\n /**\n * Remember how high the rendered rows really are.\n *\n * Rows are not all `ROW_HEIGHT` high (an alias is higher, the focused row of the narrow view\n * has no fixed height at all), and a row outside the window cannot be measured - so every row\n * that was rendered once keeps its measured height for the calculation of the window.\n */\n private measureRenderedRows(): void {\n const container = this.tableRef.current;\n if (!container) {\n return;\n }\n const heights: Record<string, number> = {};\n for (const child of Array.from(container.children) as HTMLElement[]) {\n // the details panel of the narrow view follows its row and belongs to its height\n const detailsOf = child.dataset.detailsOf;\n if (detailsOf) {\n if (heights[detailsOf]) {\n heights[detailsOf] += child.offsetHeight;\n }\n continue;\n }\n // with drag and drop enabled the row sits inside a wrapper\n const row = (child.id ? child : child.firstElementChild) as HTMLElement | null;\n if (row?.id && row.offsetHeight) {\n heights[row.id] = row.offsetHeight;\n }\n }\n let changed = false;\n for (const id of Object.keys(heights)) {\n if (Math.abs((this.measuredHeights[id] || ROW_HEIGHT) - heights[id]) > 0.5) {\n this.measuredHeights[id] = heights[id];\n changed = true;\n }\n }\n if (changed) {\n // the rows kept their content, only the calculated positions move\n this.rowOffsetsInvalid = true;\n this.updateRowsOnly();\n }\n }\n\n /**\n * All column widths as CSS variables of the table container. The header and every row read the\n * widths from here (see `colWidth`), so they can never get out of sync, and the resizer can\n * change a width by writing one variable instead of re-rendering all rows.\n */\n getColumnWidthVariables(): React.CSSProperties {\n const variables: Record<string, string> = {};\n Object.keys(this.columnsVisibility).forEach(name => {\n const width = (this.columnsVisibility as Record<string, number | string | undefined>)[name];\n if (typeof width === 'string') {\n // `calc(100% - 500px)`: this column takes the remaining place. A percentage cannot be\n // used here, because the width of the row depends on the columns and would be\n // circular - the column grows instead and keeps its minimal width if the place is\n // not sufficient (then the table scrolls horizontally).\n // `100%` (mobile view) must not reserve any place, `calc(100% - 500px)` keeps a minimum\n variables[colVar(name)] = width === '100%' ? '0px' : `${MIN_COLUMN_WIDTHS[name] || 100}px`;\n variables[growVar(name)] = '1';\n } else {\n variables[colVar(name)] = `${width || 0}px`;\n variables[growVar(name)] = '0';\n }\n });\n return variables;\n }\n\n /** Set the width of one column without re-rendering the rows */\n setColumnWidth(name: string, width: number): void {\n (this.columnsVisibility as Record<string, number | string>)[name] = width;\n this.tableRef.current?.style.setProperty(colVar(name), `${width}px`);\n }\n\n resizerMouseMove = (e: MouseEvent): void => {\n if (this.resizerActiveDiv) {\n let width: number;\n let widthNext: number;\n if (this.resizeLeft) {\n width = this.resizerOldWidth - e.clientX + this.resizerPosition;\n widthNext = this.resizerOldWidthNext + e.clientX - this.resizerPosition;\n } else {\n width = this.resizerOldWidth + e.clientX - this.resizerPosition;\n widthNext = this.resizerOldWidthNext - e.clientX + this.resizerPosition;\n }\n\n if (\n this.resizerActiveName &&\n this.resizerNextName &&\n (!this.resizerMin || width > this.resizerMin) &&\n (!this.resizerNextMin || widthNext > this.resizerNextMin)\n ) {\n this.resizerCurrentWidths[this.resizerActiveName] = width;\n this.resizerCurrentWidths[this.resizerNextName] = widthNext;\n\n // Only two CSS variables are written - the header and all rows follow immediately,\n // without a re-render of the table\n this.setColumnWidth(this.resizerActiveName, width);\n this.setColumnWidth(this.resizerNextName, widthNext);\n\n this.customWidth = true;\n }\n }\n };\n\n resizerMouseUp = (): void => {\n // Remember the new widths for the other width classes as well: the drag only changed two CSS\n // variables, the width class of the container may change at any time afterwards.\n this.storedColumnWidths = { ...this.resizerCurrentWidths };\n this.applyStoredWidths();\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.table`, JSON.stringify(this.resizerCurrentWidths));\n this.resizerActiveName = null;\n this.resizerNextName = null;\n this.resizerActiveDiv = null;\n this.resizerNextDiv = null;\n window.removeEventListener('mousemove', this.resizerMouseMove);\n window.removeEventListener('mouseup', this.resizerMouseUp);\n };\n\n resizerMouseDown = (e: React.MouseEvent<HTMLDivElement>): void => {\n this.resizerCurrentWidths ||= {};\n this.resizerActiveDiv = (e.target as HTMLDivElement).parentNode as HTMLDivElement;\n this.resizerActiveName = this.resizerActiveDiv.dataset.name || null;\n if (this.resizerActiveName) {\n let i = 0;\n if ((e.target as HTMLDivElement).dataset.left === 'true') {\n this.resizeLeft = true;\n this.resizerNextDiv = this.resizerActiveDiv.previousElementSibling as HTMLDivElement;\n let handle: HTMLDivElement | null = this.resizerNextDiv.querySelector('.iob-ob-resize-handler');\n while (this.resizerNextDiv && !handle && i < 10) {\n this.resizerNextDiv = this.resizerNextDiv.previousElementSibling as HTMLDivElement;\n handle = this.resizerNextDiv.querySelector('.iob-ob-resize-handler');\n i++;\n }\n if (handle?.dataset.left !== 'true') {\n this.resizerNextDiv = this.resizerNextDiv.nextElementSibling as HTMLDivElement;\n }\n } else {\n this.resizeLeft = false;\n this.resizerNextDiv = this.resizerActiveDiv.nextElementSibling as HTMLDivElement;\n /* while (this.resizerNextDiv && !this.resizerNextDiv.querySelector('.iob-ob-resize-handler') && i < 10) {\n this.resizerNextDiv = this.resizerNextDiv.nextElementSibling;\n i++;\n } */\n }\n if (!this.resizerNextDiv) {\n // The column is the last one of the row, there is no neighbour to take the place from\n this.resizerActiveDiv = null;\n this.resizerActiveName = null;\n return;\n }\n this.resizerNextName = this.resizerNextDiv.dataset.name || null;\n\n this.resizerMin = parseInt(this.resizerActiveDiv.dataset.min as string, 10) || 0;\n this.resizerNextMin = parseInt(this.resizerNextDiv.dataset.min as string, 10) || 0;\n\n this.resizerPosition = e.clientX;\n\n this.resizerCurrentWidths[this.resizerActiveName] = this.resizerActiveDiv.offsetWidth;\n this.resizerOldWidth = this.resizerCurrentWidths[this.resizerActiveName];\n\n if (this.resizerNextName) {\n this.resizerCurrentWidths[this.resizerNextName] = this.resizerNextDiv.offsetWidth;\n this.resizerOldWidthNext = this.resizerCurrentWidths[this.resizerNextName];\n }\n\n window.addEventListener('mousemove', this.resizerMouseMove);\n window.addEventListener('mouseup', this.resizerMouseUp);\n }\n };\n\n /**\n * Handle keyboard events for navigation\n */\n navigateKeyPress(event: React.KeyboardEvent): void {\n const selectedId = this.state.selectedNonObject || this.state.selected[0];\n\n if (!selectedId) {\n return;\n }\n\n if (event.code === 'ArrowUp' || event.code === 'ArrowDown') {\n event.preventDefault();\n // every row of the table, not only the rendered ones (see `getWindow`)\n const ids: string[] = this.flatRows.map(row => row.item.data.id).filter(id => !!id);\n const idx = ids.indexOf(selectedId);\n const newIdx = event.code === 'ArrowDown' ? idx + 1 : idx - 1;\n const newId = ids[newIdx] || selectedId;\n this.onSelect(newId);\n this.scrollToItem(newId);\n }\n\n if (event.code === 'ArrowRight' || event.code === 'ArrowLeft') {\n this.toggleExpanded(selectedId);\n }\n\n if (event.code === 'Delete' && this.root && selectedId) {\n const item = ObjectBrowserClass.getItemFromRoot(this.root, selectedId);\n if (item) {\n const { obj } = item.data;\n if (obj && !obj.common?.dontDelete) {\n this.showDeleteDialog({ id: selectedId, obj, item });\n }\n }\n }\n }\n\n /**\n * Find the id from the root\n *\n * @param root The current root\n * @param id The object id to find\n */\n private static getItemFromRoot(root: TreeItem, id: string): TreeItem | null {\n const idArr = id.split('.');\n let currId = '';\n let _root: TreeItem | null | undefined = root;\n\n for (let i = 0; i < idArr.length; i++) {\n const idEntry = idArr[i];\n currId = currId ? `${currId}.${idEntry}` : idEntry;\n let found = false;\n if (_root.children) {\n for (let j = 0; j < _root.children.length; j++) {\n if (_root.children[j].data.id === currId) {\n _root = _root.children[j];\n found = true;\n break;\n }\n }\n }\n if (!found) {\n return null;\n }\n }\n\n return _root || null;\n }\n\n resizerReset = (): void => {\n this.customWidth = false;\n this.storedColumnWidths = null;\n this.resizerCurrentWidths = {};\n // Back to the defaults of every width class, not only of the one that is active now - the\n // stored widths had been applied to every class the user had the browser open in.\n Object.keys(SCREEN_WIDTHS).forEach(width => {\n this.screenWidths[width as Width] = JSON.parse(\n JSON.stringify(SCREEN_WIDTHS[width as Width]),\n ) as ScreenWidthOne;\n });\n this.calculateColumnsVisibility();\n this.localStorage.removeItem(`${this.props.dialogName || 'App'}.table`);\n this.forceUpdate();\n };\n\n /**\n * Render the right handle for resizing\n */\n renderHandleRight(): JSX.Element {\n return toolbar.renderHandleRight(this);\n }\n\n // --- Routing (navigateTo / onNavigateTo) ---\n // The browser never reads the URL itself; the parent drives it via `navigateTo` and is informed\n // of user navigation via `onNavigateTo`. All URL parsing/writing lives in the parent component.\n\n /** Derive the current navigation target from the dialog/selection state. */\n private getStateNav(): ObjectBrowserNavigation | null {\n if (this.state.editObjectDialog) {\n return { mode: 'edit', id: this.state.editObjectDialog };\n }\n if (this.state.customDialog && this.state.customDialog.length === 1 && !this.state.customDialogAll) {\n return { mode: 'settings', id: this.state.customDialog[0] };\n }\n if (this.state.viewFileDialog) {\n return { mode: 'viewFile', id: this.state.viewFileDialog };\n }\n if (this.state.selected.length === 1 && this.state.selected[0]) {\n return { mode: 'select', id: this.state.selected[0] };\n }\n return null;\n }\n\n private static navEqual(a: ObjectBrowserNavigation | null, b: ObjectBrowserNavigation | null): boolean {\n if (!a || !b) {\n return !a && !b;\n }\n return a.mode === b.mode && a.id === b.id;\n }\n\n /** Apply a navigation target coming from the parent (`navigateTo`): select + open the dialog. */\n private applyNavigateTo(nav: ObjectBrowserNavigation | null): void {\n this.applyingNav = true;\n const done = (): void => {\n this.applyingNav = false;\n };\n if (!nav?.id) {\n // No target: just close any open dialog (keep the current selection).\n this.setState({ editObjectDialog: '', customDialog: null, viewFileDialog: '' }, done);\n return;\n }\n const { id } = nav;\n const open = (): void => {\n if (nav.mode === 'edit') {\n this.setState(\n { editObjectDialog: id, editObjectAlias: false, customDialog: null, viewFileDialog: '' },\n done,\n );\n } else if (nav.mode === 'settings') {\n this.setState(\n { customDialog: [id], customDialogAll: false, editObjectDialog: '', viewFileDialog: '' },\n done,\n );\n } else if (nav.mode === 'viewFile') {\n this.setState({ viewFileDialog: id, editObjectDialog: '', customDialog: null }, done);\n } else {\n this.setState({ editObjectDialog: '', customDialog: null, viewFileDialog: '' }, done);\n }\n };\n // Select the target (if needed), expand to it and scroll into view, then open the dialog.\n if (this.state.selected.length === 1 && this.state.selected[0] === id) {\n open();\n } else {\n this.onSelect(id, false, () =>\n this.expandAllSelected(() => {\n this.scrollToItem(id);\n open();\n }),\n );\n }\n }\n\n /** Apply the initial `navigateTo` after the tree has loaded (called from componentDidMount). */\n private applyInitialNavigateTo(): void {\n const nav = this.props.navigateTo ?? null;\n if (nav?.id) {\n this.lastNav = nav;\n this.applyNavigateTo(nav);\n } else {\n // Don't push the restored-from-localStorage selection into the URL on load.\n this.lastNav = this.getStateNav();\n }\n }\n\n /** Reconcile `navigateTo` (parent/URL) with the browser's selection/dialog state. */\n private reconcileNavigation(prevProps: ObjectBrowserProps): void {\n if (this.props.navigateTo === undefined && !this.props.onNavigateTo) {\n return; // routing not used by this consumer\n }\n if (this.applyingNav) {\n return; // currently applying a target; ignore the intermediate state\n }\n const propNav = this.props.navigateTo ?? null;\n const stateNav = this.getStateNav();\n if (ObjectBrowserClass.navEqual(propNav, stateNav)) {\n this.lastNav = stateNav;\n return;\n }\n if (!ObjectBrowserClass.navEqual(propNav, prevProps.navigateTo ?? null)) {\n // The parent (URL) drove a change → apply it to the browser.\n this.lastNav = propNav;\n this.applyNavigateTo(propNav);\n } else if (!ObjectBrowserClass.navEqual(stateNav, this.lastNav)) {\n // The user changed selection/dialog → report it so the parent can update the URL.\n this.lastNav = stateNav;\n this.props.onNavigateTo?.(stateNav);\n }\n }\n\n /**\n * Called when component is updated.\n */\n componentDidUpdate(prevProps: ObjectBrowserProps): void {\n // the table is rendered only after the objects are loaded\n this.observeContainerWidth();\n this.measureRenderedRows();\n\n if (this.tableRef.current && this.selectFirst) {\n this.scrollToItem(this.selectFirst);\n }\n this.reconcileNavigation(prevProps);\n }\n\n /**\n * Scrolls to a row.\n *\n * The row does not have to be rendered: only the rows around the visible area are (see\n * `getWindow`), so the position is taken from the flat list of all rows and the row is brought\n * into the middle of the table by scrolling there.\n */\n scrollToItem(id: string): void {\n this.selectFirst = '';\n\n const node = window.document.getElementById(id);\n if (node) {\n node.scrollIntoView({\n behavior: 'auto',\n block: 'center',\n inline: 'center',\n });\n return;\n }\n\n const container = this.tableRef.current;\n const index = this.flatRows.findIndex(row => row.item.data.id === id);\n if (!container || index === -1) {\n return;\n }\n const middle = this.rowOffsets[index] - Math.max(0, (this.viewportHeight - ROW_HEIGHT) / 2);\n container.scrollTop = Math.max(0, middle);\n // the scroll event moves the window, and the row is rendered with the next frame\n }\n\n onUpdate(valAck: {\n val: ioBroker.StateValue;\n ack: boolean;\n q: ioBroker.STATE_QUALITY[keyof ioBroker.STATE_QUALITY];\n expire: number | undefined;\n }): void {\n this.props.socket\n .setState(this.edit.id, {\n val: valAck.val,\n ack: valAck.ack,\n q: valAck.q || 0,\n expire: valAck.expire || undefined,\n })\n .catch(e => this.showError(`Cannot write value: ${e}`));\n }\n\n showAddDataPointDialog(id: string, initialType: ioBroker.ObjectType, initialStateType?: ioBroker.CommonType): void {\n this.setState({\n showContextMenu: null,\n modalNewObj: {\n id,\n initialType,\n initialStateType,\n },\n });\n }\n\n /** Renders the aliases list for one state (if more than 2) */\n\n doFilter(doNotStore?: boolean): void {\n if (!this.objects || !this.root) {\n return;\n }\n\n if (!doNotStore) {\n this.localStorage.setItem(\n `${this.props.dialogName || 'App'}.objectFilter`,\n JSON.stringify(this.state.filter),\n );\n }\n\n const counter = { count: 0 };\n\n applyFilter(\n this.root,\n this.state.filter,\n this.props.lang,\n this.objects,\n undefined,\n counter,\n this.props.customFilter,\n this.props.types,\n );\n\n if (counter.count < 500 && !this.state.expandAllVisible) {\n setTimeout(() => this.setState({ expandAllVisible: true }));\n } else if (counter.count >= 500 && this.state.expandAllVisible) {\n setTimeout(() => this.setState({ expandAllVisible: false }));\n } else {\n this.forceUpdate();\n }\n }\n\n /**\n * Renders the browser and every row again: whoever calls it has changed something that is not\n * visible in `state` or `props`, so the rows cannot keep their output\n */\n override forceUpdate(callback?: () => void): void {\n this.rowsInvalid = true;\n super.forceUpdate(callback);\n }\n\n /**\n * Renders the browser, but keeps the output of every row that did not change: a state changed\n * (see `rowStateVersion`), the table was scrolled or a row measured another height\n */\n private updateRowsOnly(): void {\n super.forceUpdate();\n }\n\n /**\n * The rendering method of this component.\n */\n render(): JSX.Element {\n // Every row is built again, if anything changed that concerns all of them: `state`, `props`\n // or whatever a `forceUpdate()` stands for. Otherwise the render only moved the window or\n // showed new values, and the rows keep their output (see `renderRow`)\n const fullRender =\n this.rowsInvalid || this.state !== this.lastRenderedState || this.props !== this.lastRenderedProps;\n this.rowsInvalid = false;\n this.lastRenderedState = this.state;\n this.lastRenderedProps = this.props;\n if (fullRender) {\n this.renderEpoch++;\n }\n if (this.unsubscribeTimer) {\n clearTimeout(this.unsubscribeTimer);\n }\n\n if (this.styleTheme !== this.props.themeType) {\n this.styles = {\n cellIdIconFolder: Utils.getStyle(this.props.theme, styles.cellIdIconFolder),\n cellIdIconDocument: Utils.getStyle(this.props.theme, styles.cellIdIconDocument),\n iconDeviceError: Utils.getStyle(this.props.theme, styles.iconDeviceError),\n iconDeviceConnected: Utils.getStyle(this.props.theme, styles.iconDeviceConnected),\n iconDeviceDisconnected: Utils.getStyle(this.props.theme, styles.iconDeviceDisconnected),\n cellButtonsButtonWithCustoms: Utils.getStyle(this.props.theme, styles.cellButtonsButtonWithCustoms),\n invertedBackground: Utils.getStyle(this.props.theme, styles.invertedBackground),\n invertedBackgroundFlex: Utils.getStyle(this.props.theme, styles.invertedBackgroundFlex),\n contextMenuEdit: Utils.getStyle(this.props.theme, styles.contextMenuEdit),\n contextMenuEditValue: Utils.getStyle(this.props.theme, styles.contextMenuEditValue),\n contextMenuView: Utils.getStyle(this.props.theme, styles.contextMenuView),\n contextMenuCustom: Utils.getStyle(this.props.theme, styles.contextMenuCustom),\n contextMenuACL: Utils.getStyle(this.props.theme, styles.contextMenuACL),\n contextMenuRoom: Utils.getStyle(this.props.theme, styles.contextMenuRoom),\n contextMenuRole: Utils.getStyle(this.props.theme, styles.contextMenuRole),\n contextMenuDelete: Utils.getStyle(this.props.theme, styles.contextMenuDelete),\n filterInput: Utils.getStyle(this.props.theme, styles.headerCellInput, styles.filterInput),\n iconCopy: Utils.getStyle(\n this.props.theme,\n styles.cellButtonsValueButton,\n styles.cellButtonsValueButtonCopy,\n ),\n aliasReadWrite: Utils.getStyle(this.props.theme, styles.cellIdAlias, styles.cellIdAliasReadWrite),\n aliasAlone: Utils.getStyle(this.props.theme, styles.cellIdAlias, styles.cellIdAliasAlone),\n };\n this.styleTheme = this.props.themeType;\n }\n\n this.unsubscribeTimer = setTimeout(() => {\n this.unsubscribeTimer = null;\n this.checkUnsubscribes();\n }, 200);\n\n if (this.expertMode !== !!this.state.filter.expertMode) {\n this.expertMode = !!this.state.filter.expertMode;\n this.doFilter(true);\n }\n\n if (!this.state.loaded) {\n return <LinearProgress key={`${this.props.dialogName}_c`} />;\n }\n\n // the container was resized into another width class => other columns are visible, and the\n // stored widths have to be written into the defaults of the new class.\n // The states view shows other columns too, so it has to be recalculated as well.\n if (this.lastCalculatedWidth !== this.width || this.lastCalculatedStatesView !== this.state.statesView) {\n this.lastCalculatedWidth = this.width;\n this.lastCalculatedStatesView = this.state.statesView;\n this.applyStoredWidths();\n this.calculateColumnsVisibility();\n }\n\n // Only the rows around the visible area are rendered - see `getWindow`. The rows that are\n // not rendered are replaced by two spacers, so the scrollbar keeps the size of the table\n if (fullRender || !this.flatRows.length) {\n // a state change cannot add or remove a row, and scrolling does not either\n this.buildFlatRows();\n } else if (this.rowOffsetsInvalid) {\n this.calculateRowOffsets();\n }\n const { first, last } = this.getWindow();\n this.windowFirst = first;\n this.windowLast = last;\n const items: JSX.Element[] = [];\n for (let i = first; i < last; i++) {\n items.push(leaf.renderRow(this, this.flatRows[i].item, this.flatRows[i].isExpanded));\n }\n const spaceAbove = this.rowOffsets[first];\n const spaceBelow = this.rowOffsets[this.flatRows.length] - this.rowOffsets[last];\n\n return (\n <TabContainer\n key={this.props.dialogName}\n styles={{ root: this.props.style }}\n >\n <style>\n {`\n@keyframes newValueAnimation-light {\n 0% {\n color: #00f900;\n }\n 80% {\n color: #008000;\n }\n 100% {\n color: #000;\n }\n}\n@keyframes newValueAnimation-dark {\n 0% {\n color: #00f900;\n }\n 80% {\n color: #008000;\n }\n 100% {\n color: #fff;\n }\n}\n.newValueBrowser-dark {\n animation: newValueAnimation-dark 2s ease-in-out;\n}\n.newValueBrowser-light {\n animation: newValueAnimation-light 2s ease-in-out;\n}\n.highlight-link .iob-link {\n text-decoration: underline;\n cursor: pointer;\n}\n`}\n </style>\n <TabHeader>{this.getToolbar()}</TabHeader>\n <TabContent>\n {/* The header is a part of the scrolling container and sticks to its top, so it is\n always aligned with the rows and does not need to be synchronized with them. */}\n <Box\n style={{ ...styles.tableDiv, ...this.getColumnWidthVariables() }}\n ref={this.tableRef}\n onKeyDown={event => this.navigateKeyPress(event)}\n onScroll={this.onTableScroll}\n >\n {toolbar.renderHeader(this)}\n {spaceAbove ? <div style={{ height: spaceAbove }} /> : null}\n {items}\n {spaceBelow ? <div style={{ height: spaceBelow }} /> : null}\n </Box>\n </TabContent>\n {contextMenu.renderContextMenu(this)}\n {dialogs.renderAliasMenu(this)}\n {dialogs.renderToast(this)}\n {dialogs.renderColumnsEditCustomDialog(this)}\n {this.renderColumnsSelectorDialog()}\n {dialogs.renderCustomDialog(this)}\n {dialogs.renderEditValueDialog(this)}\n {dialogs.renderEditObjectDialog(this)}\n {dialogs.renderViewObjectFileDialog(this)}\n {dialogs.renderAliasEditorDialog(this)}\n {dialogs.renderEditRoleDialog(this)}\n {dialogs.renderEnumDialog(this)}\n {this.renderErrorDialog()}\n {this.renderExportDialog()}\n {this.renderRenameDialog()}\n {this.renderInputJsonDialog()}\n {this.state.modalNewObj && this.props.modalNewObject && this.props.modalNewObject(this)}\n {this.state.modalEditOfAccess &&\n this.state.modalEditOfAccessObjData &&\n this.props.modalEditOfAccessControl &&\n this.props.modalEditOfAccessControl(this, this.state.modalEditOfAccessObjData)}\n </TabContainer>\n );\n }\n}\n\n// The width class is measured from the container (see `ObjectBrowserClass.width`), so this component\n// does not need the `withWidth` HOC (which measures the window) anymore.\nexport const ObjectBrowser = ObjectBrowserClass;\n"]}
|
|
1
|
+
{"version":3,"file":"ObjectBrowserClass.js","sourceRoot":"./src/","sources":["Components/ObjectBrowser/ObjectBrowserClass.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,6HAA6H;AAC7H,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM;AACN,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC,CAAC,4CAA4C;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CA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AAK,CAAC,wBAAwB;gBACnC,IAAI,CAAC,KAAK,CAAC,wBAAwB;gBACnC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CACvE,CAClB,CAAC;IACN,CAAC;;AAGL,qGAAqG;AACrG,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC","sourcesContent":["/**\n * Copyright 2020-2026, Denis Haev <dogafox@gmail.com>\n *\n * MIT License\n *\n * The object browser itself: state, socket subscriptions, the tree and the rendering.\n * The dialogs, the toolbar, the rows and the context menu live in the sibling files of this\n * directory and get this instance as the first argument. Because of that, the members of this\n * class are not private, even if they are not intended to be used outside of the object browser.\n */\n/* eslint-disable react/no-unused-class-component-methods -- the members are used by the sibling modules of this directory */\nimport React, { Component, createRef, type JSX } from 'react';\n\nimport { Box, LinearProgress } from '@mui/material';\n\n// own\nimport { Connection } from '../../Connection';\nimport { Utils } from '../Utils'; // @iobroker/gui-components/Components/Utils\nimport { TabContainer } from '../TabContainer';\nimport { TabContent } from '../TabContent';\nimport { TabHeader } from '../TabHeader';\nimport {\n ROW_HEIGHT,\n applyFilter,\n buildTree,\n findNode,\n formatValue,\n generateFile,\n getName,\n colVar,\n widthFromContainer,\n growVar,\n getSelectIdIconFromObjects,\n setCustomValue,\n} from './utils';\nimport { HistoryChart } from './HistoryChart';\nimport type { Width } from '../../types';\nimport type {\n ObjectBrowserProps,\n AdapterColumn,\n ObjectBrowserFilter,\n ObjectBrowserNavigation,\n ObjectBrowserPossibleColumns,\n ObjectBrowserState,\n TreeInfo,\n TreeItem,\n CustomAdminColumnStored,\n ObjectEvent,\n ioBrokerObjectForExport,\n} from './types';\nimport { styles } from './styles';\nimport * as dialogs from './dialogs';\nimport * as toolbar from './toolbar';\nimport * as leaf from './renderLeaf';\nimport * as contextMenu from './contextMenu';\nimport {\n DEFAULT_DATE_FORMAT,\n DEFAULT_FILTER,\n ITEM_LEVEL,\n MIN_COLUMN_WIDTHS,\n SCREEN_WIDTHS,\n type ScreenWidth,\n type ScreenWidthOne,\n} from './constants';\n\nexport { getSelectIdIconFromObjects, type ObjectBrowserFilter };\n\ndeclare module '@mui/material/Button' {\n interface ButtonPropsColorOverrides {\n grey: true;\n }\n}\n\nlet objectsAlreadyLoaded = false;\n\n/**\n * The namespaces whose objects a user creates themselves. Only these may be deleted without the\n * expert mode; see {@link ObjectBrowserClass.isDeleteAllowed}.\n */\nconst USER_OWNED_NAMESPACES = ['0_userdata.', 'alias.'];\n\nexport class ObjectBrowserClass extends Component<ObjectBrowserProps, ObjectBrowserState> {\n // do not define the type as null to save the performance, so we must check it every time\n info: TreeInfo = {\n funcEnums: [],\n roomEnums: [],\n roles: [],\n ids: [],\n types: [],\n objects: {},\n customs: [],\n enums: [],\n hasSomeCustoms: false,\n aliasesMap: {},\n };\n localStorage: Storage = ((window as any)._localStorage as Storage) || window.localStorage;\n /**\n * Own copy of the screen widths. The widths, that the user stored for THIS dialog, must not leak\n * into the other instances of the object browser (the constant is a module singleton).\n */\n private readonly screenWidths: ScreenWidth = JSON.parse(JSON.stringify(SCREEN_WIDTHS)) as ScreenWidth;\n private readonly tableRef: React.RefObject<HTMLDivElement | null>;\n /** Watches the width of the table container to detect the width class */\n private resizeObserver: ResizeObserver | null = null;\n private observedContainer: HTMLDivElement | null = null;\n /** Width class for which the columns were calculated the last time */\n private lastCalculatedWidth: Width | null = null;\n /** States view for which the columns were calculated the last time */\n private lastCalculatedStatesView: boolean | null = null;\n private pausedSubscribes: boolean = false;\n /** The tree was rebuilt while subscribes were paused, so the filter must be re-applied on resume */\n private treeRebuiltWhilePaused: boolean = false;\n /** Time of the first object change since the last tree rebuild (upper bound for the rebuild delay) */\n private objectsUpdateFirstTs: number = 0;\n\n /**\n * Counts up on every render that can change ANY row - a new filter, other columns, another\n * theme, a different selection, a rebuilt tree. A state change does NOT count it up: it only\n * concerns the rows whose value changed. Together with `rowStateVersion` this is the memo key\n * of a row (see `renderRow`), so a value that ticks every second no longer rebuilds the whole\n * table.\n *\n * Whether a render concerns every row is decided in `render` and not by a flag that the caller\n * sets: React may batch the render of a state change with a `setState` (a click) or with new\n * props, and a flag would then keep every row as it was, although the selection has changed.\n */\n renderEpoch: number = 0;\n\n /**\n * Set by every `forceUpdate()`: something changed that is not visible in `state` or `props` (a\n * rebuilt tree, other column widths), so every row has to be built again. Only\n * `updateRowsOnly` renders without it\n */\n private rowsInvalid: boolean = true;\n\n /** `state` and `props` of the last render: a render with the same two cannot concern every row */\n private lastRenderedState: ObjectBrowserState | null = null;\n private lastRenderedProps: ObjectBrowserProps | null = null;\n\n /**\n * row id -> the states the row showed when it was built last: its own value and the status\n * states of a device (online, offline, error). The subscriptions that are still needed are\n * collected from the rows of the window (see `checkUnsubscribes`) - a row that is served from\n * the memo is not built again, but its entry here is still valid\n */\n readonly rowStates: Record<string, Set<string>> = {};\n\n /**\n * state id -> the rows that show this state although it is not their own: a device shows the\n * status of its `statusStates`. A change of such a state has to render those rows as well\n */\n private readonly stateDependents: Record<string, Set<string>> = {};\n\n /**\n * Rows that are rendered above and below the visible area, so that scrolling does not run into\n * a gap before the next render\n */\n private static readonly OVERSCAN_ROWS: number = 12;\n\n /** Every row of the table in the order in which it is shown (see `flattenItems`) */\n private flatRows: leaf.FlatItem[] = [];\n\n /**\n * Where every row of `flatRows` begins, in pixels. One entry longer than `flatRows`: the last\n * one is the height of the whole table\n */\n private rowOffsets: number[] = [0];\n\n /** A row measured another height than `rowOffsets` expected: calculate them again */\n private rowOffsetsInvalid: boolean = false;\n\n /** id -> the height the row really had. Only rows that are not `ROW_HEIGHT` high end up here */\n private readonly measuredHeights: Record<string, number> = {};\n\n /** Scroll position and height of the table container, the two values the window is cut from */\n private scrollTop: number = 0;\n private viewportHeight: number = 0;\n private scrollFrame: number | null = null;\n /** First and last row of the last rendered window, to notice that scrolling moved it */\n private windowFirst: number = 0;\n private windowLast: number = 0;\n\n /** id -> how often the state of this row has changed. Part of the memo key of the row */\n readonly rowStateVersion: Record<string, number> = {};\n\n private stateVersionCounter: number = 0;\n private selectFirst: string;\n /** Last navigation that was applied from `navigateTo` or reported via `onNavigateTo` (loop guard). */\n private lastNav: ObjectBrowserNavigation | null = null;\n /** True while applying `navigateTo`, so the derived-state watcher does not echo it back. */\n private applyingNav: boolean = false;\n root: TreeItem | null = null;\n readonly states: Record<string, ioBroker.State> = {};\n subscribes: Set<string> = new Set();\n private unsubscribeTimer: ReturnType<typeof setTimeout> | null = null;\n private statesUpdateTimer: ReturnType<typeof setTimeout> | null = null;\n private objectsUpdateTimer: ReturnType<typeof setTimeout> | null = null;\n /** Columns that are visible in the auto mode. Depends on the width of the container */\n visibleCols: ObjectBrowserPossibleColumns[];\n readonly texts: Record<string, string>;\n readonly possibleCols: ObjectBrowserPossibleColumns[];\n readonly imagePrefix: string;\n adapterColumns: AdapterColumn[] = [];\n private styleTheme: string = '';\n edit: {\n val: string | number | boolean | null;\n q: number;\n ack: boolean;\n id: string;\n } = {\n id: '',\n val: '',\n q: 0,\n ack: false,\n };\n readonly levelPadding: number;\n private customWidth: boolean = false;\n private resizerNextName: string | null = null;\n private resizerActiveName: string | null = null;\n private resizerCurrentWidths: Record<string, number> = {};\n private resizeLeft: boolean = false;\n private resizerOldWidth: number = 0;\n private resizerMin: number = 0;\n private resizerNextMin: number = 0;\n private resizerOldWidthNext: number = 0;\n private resizerPosition: number = 0;\n private resizerActiveDiv: HTMLDivElement | null = null;\n private resizerNextDiv: HTMLDivElement | null = null;\n /**\n * The column widths the user stored for this dialog, as they were written to\n * `<dialogName>.table`. They are kept independently of the width class, because the class is\n * only known after the container was measured and changes when the window is resized.\n */\n private storedColumnWidths: Record<string, number> | null = null;\n systemConfig: ioBroker.SystemConfigObject | null = null;\n public objects!: Record<string, ioBroker.Object>;\n defaultHistory: string = '';\n private ctrlPressed = false;\n columnsVisibility: {\n id?: number | string;\n name?: number | string;\n type?: number;\n role?: number;\n room?: number;\n func?: number;\n changedFrom?: number;\n qualityCode?: number;\n timestamp?: number;\n lastChange?: number;\n val?: number;\n buttons?: number;\n } = {};\n changedIds: null | string[] = null;\n contextMenu: null | { item: any; ts: number } = null;\n styles: {\n cellIdIconFolder?: React.CSSProperties;\n cellIdIconDocument?: React.CSSProperties;\n iconDeviceError?: React.CSSProperties;\n iconDeviceConnected?: React.CSSProperties;\n iconDeviceDisconnected?: React.CSSProperties;\n cellButtonsButtonWithCustoms?: React.CSSProperties;\n invertedBackground?: React.CSSProperties;\n invertedBackgroundFlex?: React.CSSProperties;\n contextMenuEdit?: React.CSSProperties;\n contextMenuEditValue?: React.CSSProperties;\n contextMenuView?: React.CSSProperties;\n contextMenuCustom?: React.CSSProperties;\n contextMenuACL?: React.CSSProperties;\n contextMenuRoom?: React.CSSProperties;\n contextMenuRole?: React.CSSProperties;\n contextMenuDelete?: React.CSSProperties;\n filterInput?: React.CSSProperties;\n iconCopy?: React.CSSProperties;\n aliasReadWrite?: React.CSSProperties;\n aliasAlone?: React.CSSProperties;\n } = {};\n private expertMode: boolean = false;\n customColumnDialog: null | {\n value: boolean | number | string;\n type: 'boolean' | 'number' | 'string';\n initValue: boolean | number | string;\n } = null;\n\n constructor(props: ObjectBrowserProps) {\n super(props);\n\n const lastSelectedItemStr: string =\n this.localStorage.getItem(`${props.dialogName || 'App'}.objectSelected`) || '';\n\n this.selectFirst = '';\n\n this.expertMode = !!this.props.expertMode;\n\n if (lastSelectedItemStr.startsWith('[')) {\n try {\n const lastSelectedItems = JSON.parse(lastSelectedItemStr) as string[];\n this.selectFirst = lastSelectedItems[0] || '';\n } catch {\n // ignore\n }\n } else {\n this.selectFirst = lastSelectedItemStr;\n }\n\n let expanded: string[];\n const expandedStr = this.localStorage.getItem(`${props.dialogName || 'App'}.objectExpanded`) || '[]';\n try {\n expanded = JSON.parse(expandedStr);\n } catch {\n expanded = [];\n }\n\n let filter: ObjectBrowserFilter;\n const filterStr: string = props.defaultFilters\n ? ''\n : this.localStorage.getItem(`${props.dialogName || 'App'}.objectFilter`) || '';\n if (filterStr) {\n try {\n filter = JSON.parse(filterStr);\n } catch {\n filter = { ...DEFAULT_FILTER };\n }\n } else if (props.defaultFilters && typeof props.defaultFilters === 'object') {\n filter = { ...props.defaultFilters };\n } else {\n filter = { ...DEFAULT_FILTER };\n }\n // Migrate old filters to new one\n if (typeof filter.room === 'string' && filter.room) {\n filter.room = [filter.room].filter(s => s);\n if (!filter.room.length) {\n delete filter.room;\n }\n }\n if (typeof filter.func === 'string' && filter.func) {\n filter.func = [filter.func].filter(s => s);\n if (!filter.func.length) {\n delete filter.func;\n }\n }\n if (typeof filter.role === 'string' && filter.role) {\n filter.role = [filter.role].filter(s => s);\n if (!filter.role.length) {\n delete filter.role;\n }\n }\n if (typeof filter.type === 'string') {\n filter.type = [filter.type].filter(s => s);\n if (!filter.type.length) {\n delete filter.type;\n }\n }\n if (typeof filter.custom === 'string') {\n filter.custom = [filter.custom].filter(s => s);\n if (!filter.custom.length) {\n delete filter.custom;\n }\n }\n\n filter.expertMode =\n props.expertMode !== undefined\n ? props.expertMode\n : (((window as any)._sessionStorage as Storage) || window.sessionStorage).getItem('App.expertMode') ===\n 'true';\n this.tableRef = createRef();\n\n this.visibleCols = props.columns || this.screenWidths[props.width || 'lg'].fields;\n // remove type column if only one type must be selected\n if (props.types && props.types.length === 1) {\n const pos = this.visibleCols.indexOf('type');\n if (pos !== -1) {\n this.visibleCols.splice(pos, 1);\n }\n }\n\n this.possibleCols = this.screenWidths.xl.fields;\n\n let customDialog = null;\n\n if (props.router) {\n const location = props.router.getLocation();\n if (location.id && location.dialog === 'customs') {\n customDialog = [location.id];\n this.pauseSubscribe(true);\n }\n }\n\n let selected: string[];\n if (!Array.isArray(props.selected)) {\n selected = [props.selected || ''];\n } else {\n selected = props.selected;\n }\n selected = selected.map(id => id.replace(/[\"']/g, '')).filter(id => id);\n\n this.selectFirst = selected.length && selected[0] ? selected[0] : this.selectFirst;\n\n const columnsStr = this.localStorage.getItem(`${props.dialogName || 'App'}.columns`);\n let columns: ObjectBrowserPossibleColumns[] | null;\n try {\n columns = columnsStr ? JSON.parse(columnsStr) : null;\n } catch {\n columns = null;\n }\n\n let columnsWidths = null; // this.localStorage.getItem(`${props.dialogName || 'App'}.columnsWidths`);\n try {\n columnsWidths = columnsWidths ? JSON.parse(columnsWidths) : {};\n } catch {\n columnsWidths = {};\n }\n\n this.imagePrefix = props.imagePrefix || '.';\n let foldersFirst: boolean;\n const foldersFirstStr = this.localStorage.getItem(`${props.dialogName || 'App'}.foldersFirst`);\n\n if (foldersFirstStr === 'false') {\n foldersFirst = false;\n } else if (foldersFirstStr === 'true') {\n foldersFirst = true;\n } else {\n foldersFirst = props.foldersFirst === undefined ? true : props.foldersFirst;\n }\n\n let statesView = false;\n try {\n statesView = this.props.objectStatesView\n ? JSON.parse(this.localStorage.getItem(`${props.dialogName || 'App'}.objectStatesView`) || '') || false\n : false;\n } catch {\n // ignore\n }\n\n this.state = {\n aliasMenu: '',\n beautifyJsonExport: true,\n columns,\n columnsAuto: this.localStorage.getItem(`${props.dialogName || 'App'}.columnsAuto`) !== 'false',\n columnsDialogTransparent: 100,\n columnsEditCustomDialog: null,\n columnsForAdmin: null,\n columnsSelectorShow: false,\n columnsWidths,\n customColumnDialogValueChanged: false,\n customDialog,\n depth: 0,\n editObjectAlias: false, // open the edit object dialog on alias tab\n editObjectDialog: '',\n enumDialog: null,\n excludeSystemRepositoriesFromExport: true,\n excludeTranslations: false,\n expandAllVisible: false,\n expanded,\n filter,\n filterKey: 0,\n containerWidth: props.width || 'lg',\n focused: this.localStorage.getItem(`${props.dialogName || 'App'}.focused`) || '',\n foldersFirst,\n linesEnabled: this.localStorage.getItem(`${props.dialogName || 'App'}.lines`) === 'true',\n loaded: false,\n noStatesByExportImport: false,\n roleDialog: null,\n selected,\n selectedNonObject: this.localStorage.getItem(`${props.dialogName || 'App'}.selectedNonObject`) || '',\n showAliasEditor: '',\n showAllExportOptions: false,\n showContextMenu: null,\n showDescription: this.localStorage.getItem(`${props.dialogName || 'App'}.desc`) !== 'false',\n showExportDialog: false,\n showImportDialog: false,\n showImportMenu: null,\n showRenameDialog: null,\n statesView,\n toast: '',\n tooltipInfo: null,\n viewFileDialog: '',\n };\n\n this.texts = {\n name: props.t('ra_Name'),\n categories: props.t('ra_Categories'),\n value: props.t('ra_tooltip_value'),\n ack: props.t('ra_tooltip_ack'),\n ts: props.t('ra_tooltip_ts'),\n lc: props.t('ra_tooltip_lc'),\n from: props.t('ra_tooltip_from'),\n user: props.t('ra_tooltip_user'),\n c: props.t('ra_tooltip_comment'),\n quality: props.t('ra_tooltip_quality'),\n editObject: props.t('ra_tooltip_editObject'),\n deleteObject: props.t('ra_tooltip_deleteObject'),\n customConfig: props.t('ra_tooltip_customConfig'),\n copyState: props.t('ra_tooltip_copyState'),\n editState: props.t('ra_tooltip_editState'),\n ctrlForLink: props.t('ra_tooltip_ctrlForLink'),\n close: props.t('ra_Close'),\n filter_id: props.t('ra_filter_id'),\n filter_name: props.t('ra_filter_name'),\n filter_type: props.t('ra_filter_type'),\n filter_role: props.t('ra_filter_role'),\n filter_room: props.t('ra_filter_room'),\n filter_func: props.t('ra_filter_func'),\n filter_custom: props.t('ra_filter_customs'), //\n filterCustomsWithout: props.t('ra_filter_customs_without'), //\n objectChangedByUser: props.t('ra_object_changed_by_user'), // Object last changed at\n objectChangedBy: props.t('ra_object_changed_by'), // Object changed by\n objectChangedFrom: props.t('ra_state_changed_from'), // Object changed from\n stateChangedBy: props.t('ra_state_changed_by'), // State changed by\n stateChangedFrom: props.t('ra_state_changed_from'), // State changed from\n ownerGroup: props.t('ra_Owner group'),\n ownerUser: props.t('ra_Owner user'),\n showAll: props.t('ra_show_all'),\n deviceError: props.t('ra_Error'),\n deviceDisconnected: props.t('ra_Disconnected'),\n deviceConnected: props.t('ra_Connected'),\n\n aclOwner_read_object: props.t('ra_aclOwner_read_object'),\n aclOwner_read_state: props.t('ra_aclOwner_read_state'),\n aclOwner_write_object: props.t('ra_aclOwner_write_object'),\n aclOwner_write_state: props.t('ra_aclOwner_write_state'),\n aclGroup_read_object: props.t('ra_aclGroup_read_object'),\n aclGroup_read_state: props.t('ra_aclGroup_read_state'),\n aclGroup_write_object: props.t('ra_aclGroup_write_object'),\n aclGroup_write_state: props.t('ra_aclGroup_write_state'),\n aclEveryone_read_object: props.t('ra_aclEveryone_read_object'),\n aclEveryone_read_state: props.t('ra_aclEveryone_read_state'),\n aclEveryone_write_object: props.t('ra_aclEveryone_write_object'),\n aclEveryone_write_state: props.t('ra_aclEveryone_write_state'),\n\n create: props.t('ra_Create'),\n createBooleanState: props.t('ra_create_boolean_state'),\n createNumberState: props.t('ra_create_number_state'),\n createStringState: props.t('ra_create_string_state'),\n createState: props.t('ra_create_state'),\n createChannel: props.t('ra_create_channel'),\n createDevice: props.t('ra_create_device'),\n createFolder: props.t('ra_Create folder'),\n };\n\n this.levelPadding = props.levelPadding || ITEM_LEVEL;\n\n const resizerCurrentWidthsStr = this.localStorage.getItem(`${this.props.dialogName || 'App'}.table`);\n if (resizerCurrentWidthsStr) {\n try {\n const parsed: Record<string, number> = JSON.parse(resizerCurrentWidthsStr);\n const storedColumnWidths: Record<string, number> = {};\n Object.keys(parsed).forEach(id => {\n // widths stored by an older version, where the header had an own width\n storedColumnWidths[id === 'nameHeader' ? 'name' : id] = parsed[id];\n });\n this.storedColumnWidths = storedColumnWidths;\n // The resizer has to start from the stored widths too. Without them the next drag\n // would write only the two columns it touched back to the storage, and every other\n // width the user had set would be lost.\n this.resizerCurrentWidths = { ...storedColumnWidths };\n } catch {\n this.storedColumnWidths = null;\n }\n }\n\n this.applyStoredWidths();\n\n this.calculateColumnsVisibility();\n }\n\n /**\n * Write the stored column widths into the width class that is active now.\n *\n * Every width class has its own default widths, and the class of the object browser is only\n * known after its container was measured - in the constructor it is still the initial guess.\n * The stored widths must therefore be applied again whenever the class changes, otherwise the\n * table falls back to the defaults of the new class and the user sees their widths reset.\n */\n applyStoredWidths(): void {\n if (!this.storedColumnWidths) {\n return;\n }\n const screen = this.screenWidths[this.width || 'lg'];\n const storedColumnWidths = this.storedColumnWidths;\n Object.keys(storedColumnWidths).forEach(id => {\n if (id === 'id') {\n screen.idWidth = storedColumnWidths.id;\n } else if ((screen.widths as Record<string, number>)[id] !== undefined) {\n // A column that this width class does not know keeps its place; only the widths of\n // the columns the class actually shows may be overwritten.\n (screen.widths as Record<string, number>)[id] = storedColumnWidths[id];\n }\n });\n\n this.customWidth = true;\n }\n\n async loadAllObjects(update?: boolean): Promise<void> {\n const props = this.props;\n\n try {\n await new Promise<void>(resolve => {\n this.setState({ updating: true }, () => resolve());\n });\n\n const objects =\n (props.objectsWorker\n ? await props.objectsWorker.getObjects(update)\n : await props.socket.getObjects(update, true)) || {};\n if (props.types && Connection.isWeb()) {\n for (let i = 0; i < props.types.length; i++) {\n // admin has ALL objects\n // web has only state, channel, device, enum, and system.config\n if (\n props.types[i] === 'state' ||\n props.types[i] === 'channel' ||\n props.types[i] === 'device' ||\n props.types[i] === 'enum'\n ) {\n continue;\n }\n const moreObjects = await props.socket.getObjectViewSystem(props.types[i]);\n Object.assign(objects || {}, moreObjects as Record<string, ioBroker.Object>);\n }\n }\n\n this.systemConfig ||=\n (objects?.['system.config'] as ioBroker.SystemConfigObject) ||\n (await props.socket.getObject('system.config'));\n\n this.systemConfig.common ||= {} as ioBroker.SystemConfigCommon;\n this.systemConfig.common.defaultNewAcl ||= {\n object: 0,\n state: 0,\n file: 0,\n owner: 'system.user.admin',\n ownerGroup: 'system.group.administrator',\n };\n this.systemConfig.common.defaultNewAcl.owner ||= 'system.user.admin';\n this.systemConfig.common.defaultNewAcl.ownerGroup ||= 'system.group.administrator';\n if (typeof this.systemConfig.common.defaultNewAcl.state !== 'number') {\n // TODO: may be convert here from string\n this.systemConfig.common.defaultNewAcl.state = 0x664;\n }\n if (typeof this.systemConfig.common.defaultNewAcl.object !== 'number') {\n // TODO: may be convert here from string\n this.systemConfig.common.defaultNewAcl.state = 0x664;\n }\n\n if (typeof props.filterFunc === 'function') {\n this.objects = {};\n const filterFunc: (obj: ioBroker.Object) => boolean = props.filterFunc;\n\n Object.keys(objects).forEach(id => {\n try {\n if (filterFunc(objects[id])) {\n this.objects[id] = objects[id];\n } else {\n const type = objects[id] && objects[id].type;\n // include \"folder\" types too for icons and names of nodes\n if (\n type &&\n (type === 'channel' ||\n type === 'device' ||\n type === 'folder' ||\n type === 'adapter' ||\n type === 'instance')\n ) {\n this.objects[id] = objects[id];\n }\n }\n } catch (e) {\n console.log(`Error by filtering of \"${id}\": ${e}`);\n }\n });\n } else if (props.types) {\n this.objects = {};\n const propsTypes = props.types;\n\n Object.keys(objects).forEach(id => {\n const type = objects[id]?.type;\n // include \"folder\" types too\n if (\n type &&\n (type === 'channel' ||\n type === 'device' ||\n type === 'enum' ||\n type === 'folder' ||\n type === 'adapter' ||\n type === 'instance' ||\n propsTypes.includes(type))\n ) {\n this.objects[id] = objects[id];\n }\n });\n } else {\n this.objects = objects;\n }\n\n if (props.setObjectsReference) {\n props.setObjectsReference(this.objects);\n }\n\n // read default history\n this.defaultHistory = this.systemConfig.common.defaultHistory;\n if (this.defaultHistory) {\n props.socket\n .getState(`system.adapter.${this.defaultHistory}.alive`)\n .then(state => {\n if (!state?.val) {\n this.defaultHistory = '';\n }\n })\n .catch(e => window.alert(`Cannot get state: ${e}`));\n }\n\n const columnsForAdmin = await this.getAdditionalColumns();\n this.calculateColumnsVisibility(null, null, columnsForAdmin);\n\n const { info, root } = buildTree(this.objects, {\n imagePrefix: props.imagePrefix,\n root: props.root,\n lang: props.lang,\n themeType: props.themeType,\n });\n this.root = root;\n this.info = info;\n\n // Show first selected item\n const node = this.state.selected?.length && findNode(this.root, this.state.selected[0]);\n\n // If the selected ID is not visible, reset filter\n if (\n node &&\n !applyFilter(\n node,\n this.state.filter,\n props.lang,\n this.objects,\n undefined,\n undefined,\n props.customFilter,\n props.types,\n )\n ) {\n // reset filter\n this.setState({ filter: { ...DEFAULT_FILTER }, columnsForAdmin }, () => {\n this.doFilter();\n this.setState({ loaded: true, updating: false }, () =>\n this.expandAllSelected(() => {\n this.onAfterSelect();\n this.applyInitialNavigateTo();\n }),\n );\n });\n } else {\n this.doFilter();\n this.setState({ loaded: true, updating: false, columnsForAdmin }, () =>\n this.expandAllSelected(() => {\n this.onAfterSelect();\n this.applyInitialNavigateTo();\n }),\n );\n }\n } catch (error) {\n this.showError(error);\n }\n }\n\n expandAllSelected(cb?: () => void): void {\n const expanded = [...this.state.expanded];\n let changed = false;\n this.state.selected.forEach(id => {\n const parts = id.split('.');\n const path = [];\n for (let i = 0; i < parts.length - 1; i++) {\n path.push(parts[i]);\n if (!expanded.includes(path.join('.'))) {\n expanded.push(path.join('.'));\n changed = true;\n }\n }\n });\n if (changed) {\n expanded.sort();\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n this.setState({ expanded }, cb);\n } else if (cb) {\n cb();\n }\n }\n\n /**\n * @param isDouble is double click\n */\n private onAfterSelect(isDouble?: boolean): void {\n if (this.state.selected?.length && this.state.selected[0]) {\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectSelected`, this.state.selected[0]);\n\n // remove a task to select the pre-selected item if now we want to see another object\n if (this.selectFirst && this.selectFirst !== this.state.selected[0]) {\n this.selectFirst = '';\n }\n\n // If the this.state.selected[0] filtered out, disable the filter\n const item = this.findItem(this.state.selected[0]);\n if (item?.data && !item.data.visible && !item.data.hasVisibleChildren) {\n // If the selected ID is not visible, reset filter\n this.clearFilter();\n }\n\n if (this.state.selected.length === 1 && this.objects[this.state.selected[0]]) {\n const name = Utils.getObjectName(this.objects, this.state.selected[0], null, {\n language: this.props.lang,\n });\n this.props.onSelect?.(this.state.selected, name, isDouble);\n } else if (this.state.selected.length === 1 && this.props.allowNonObjects) {\n this.props.onSelect?.(this.state.selected, null, isDouble);\n } else {\n // we have more than one state\n // Check if all IDs are objects\n if (!this.props.allowNonObjects || !this.state.selected.find(id => !this.objects[id])) {\n this.props.onSelect?.(this.state.selected, null, isDouble);\n }\n }\n } else {\n this.localStorage.removeItem(`${this.props.dialogName || 'App'}.objectSelected`);\n\n if (this.state.selected.length) {\n this.setState({ selected: [] }, () => {\n if (this.props.onSelect) {\n if (this.state.focused && this.props.allowNonObjects) {\n // remove a task to select the pre-selected item if now we want to see another object\n if (this.selectFirst && this.selectFirst !== this.state.selected[0]) {\n this.selectFirst = '';\n }\n this.props.onSelect([this.state.focused], null, isDouble);\n } else {\n this.props.onSelect([], '');\n }\n }\n });\n } else if (this.props.onSelect) {\n if (this.state.focused && this.props.allowNonObjects) {\n // remove a task to select the pre-selected item if now we want to see another object\n if (this.selectFirst && this.selectFirst !== this.state.selected[0]) {\n this.selectFirst = '';\n }\n this.props.onSelect([this.state.focused], null, isDouble);\n } else {\n this.props.onSelect([], '');\n }\n }\n }\n }\n\n // This function is used\n private static getDerivedStateFromProps(\n props: ObjectBrowserProps,\n state: ObjectBrowserState,\n ): Partial<ObjectBrowserState> | null {\n const newState: Partial<ObjectBrowserState> = {};\n let changed = false;\n if (props.expertMode !== undefined && props.expertMode !== state.filter.expertMode) {\n changed = true;\n newState.filter = { ...state.filter };\n newState.filter.expertMode = props.expertMode;\n }\n return changed ? newState : null;\n }\n\n /**\n * Called when component is mounted.\n */\n async componentDidMount(): Promise<void> {\n await this.loadAllObjects(!objectsAlreadyLoaded);\n if (this.props.objectsWorker) {\n this.props.objectsWorker.registerHandler(this.onObjectChangeFromWorker);\n } else {\n await this.props.socket.subscribeObject('*', this.onObjectChange);\n }\n\n objectsAlreadyLoaded = true;\n\n window.addEventListener('contextmenu', this.onContextMenu, true);\n window.addEventListener('keydown', this.onKeyPress, true);\n window.addEventListener('keyup', this.onKeyPress, true);\n\n this.observeContainerWidth();\n this.measureRenderedRows();\n\n // Inform dialog that all objects are loaded\n if (this.props.onAllLoaded) {\n setTimeout(() => {\n this.props.onAllLoaded?.();\n }, 100);\n }\n }\n\n onKeyPress = (event: KeyboardEvent): void => {\n if (event.type === 'keydown' && event.ctrlKey && !this.ctrlPressed) {\n this.ctrlPressed = true;\n if (this.tableRef.current) {\n this.tableRef.current.className = 'highlight-link';\n }\n } else if (event.type === 'keyup' && !event.ctrlKey && this.ctrlPressed) {\n this.ctrlPressed = false;\n if (this.tableRef.current) {\n this.tableRef.current.className = '';\n }\n }\n };\n\n /**\n * Called when component is unmounted.\n */\n componentWillUnmount(): void {\n window.removeEventListener('contextmenu', this.onContextMenu, true);\n window.removeEventListener('keydown', this.onKeyPress, true);\n window.removeEventListener('keyup', this.onKeyPress, true);\n\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n this.observedContainer = null;\n\n if (this.scrollFrame !== null) {\n window.cancelAnimationFrame(this.scrollFrame);\n this.scrollFrame = null;\n }\n\n // the timers must not fire after the component was destroyed\n if (this.unsubscribeTimer) {\n clearTimeout(this.unsubscribeTimer);\n this.unsubscribeTimer = null;\n }\n if (this.statesUpdateTimer) {\n clearTimeout(this.statesUpdateTimer);\n this.statesUpdateTimer = null;\n }\n if (this.objectsUpdateTimer) {\n clearTimeout(this.objectsUpdateTimer);\n this.objectsUpdateTimer = null;\n }\n\n if (this.props.objectsWorker) {\n this.props.objectsWorker.unregisterHandler(this.onObjectChangeFromWorker, true);\n } else {\n void this.props.socket\n .unsubscribeObject('*', this.onObjectChange)\n .catch(e => console.error(`Cannot unsubscribe *: ${e}`));\n }\n\n // remove all subscribes\n this.subscribes.forEach(pattern => {\n // console.log(`- unsubscribe ${pattern}`);\n this.props.socket.unsubscribeState(pattern, this.onStateChange);\n });\n\n this.subscribes.clear();\n this.objects = {};\n }\n\n /**\n * May this object be deleted without the expert mode?\n *\n * Deleting an object of an adapter can stop that adapter from working, and the adapter creates it\n * again on the next start anyway. So outside the expert mode only the objects a user makes\n * themselves can be deleted - those in `0_userdata.*` and `alias.*` (ioBroker.admin#3639).\n *\n * @param id ID of the object\n */\n isDeleteAllowed(id: string): boolean {\n return this.state.filter.expertMode || USER_OWNED_NAMESPACES.some(prefix => id.startsWith(prefix));\n }\n\n /**\n * Show the deletion dialog for a given object\n */\n showDeleteDialog(options: { id: string; obj: ioBroker.Object; item: TreeItem }): void {\n const { id, obj, item } = options;\n\n if (!this.isDeleteAllowed(id)) {\n return;\n }\n\n // calculate the number of children\n const keys = Object.keys(this.objects);\n keys.sort();\n let count = 0;\n const start = `${id}.`;\n for (let i = 0; i < keys.length; i++) {\n if (keys[i].startsWith(start)) {\n count++;\n } else if (keys[i] > start) {\n break;\n }\n }\n\n this.props.onObjectDelete?.(id, !!item.children?.length, !obj.common?.dontDelete, count + 1);\n }\n\n /**\n * Context menu handler.\n */\n onContextMenu = (e: MouseEvent): void => {\n // console.log(`CONTEXT MENU: ${this.contextMenu ? Date.now() - this.contextMenu.ts : 'false'}`);\n if (this.contextMenu && Date.now() - this.contextMenu.ts < 2000) {\n e.preventDefault();\n this.setState({\n showContextMenu: {\n item: this.contextMenu.item,\n position: { left: e.clientX + 2, top: e.clientY - 6 },\n },\n });\n } else if (this.state.showContextMenu) {\n e.preventDefault();\n this.setState({ showContextMenu: null });\n }\n this.contextMenu = null;\n };\n\n /**\n * Called when component is mounted.\n */\n refreshComponent(): void {\n // remove all subscribes\n this.subscribes.forEach(pattern => {\n // console.log(`- unsubscribe ${pattern}`);\n this.props.socket.unsubscribeState(pattern, this.onStateChange);\n });\n\n this.subscribes.clear();\n\n this.loadAllObjects(true)\n .then(() => console.log('updated!'))\n .catch(e => this.showError(e));\n }\n\n /**\n * Renders the error dialog.\n */\n renderErrorDialog(): JSX.Element | null {\n return dialogs.renderErrorDialog(this);\n }\n\n /**\n * Show the error dialog.\n */\n showError(error: any): void {\n this.setState({\n error:\n typeof error === 'object'\n ? error && typeof error.toString === 'function'\n ? error.toString()\n : JSON.stringify(error)\n : error,\n });\n }\n\n /**\n * Called when an item is selected/deselected.\n */\n onSelect(toggleItem: string, isDouble?: boolean, cb?: () => void): void {\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.focused`, toggleItem);\n\n // `objects` only exists once the tree has been read. A selection can arrive before that -\n // from the URL, through `navigateTo` - and must not throw; such an ID is treated like one\n // that is not in the tree, and `applyInitialNavigateTo` selects it properly after the load.\n const obj = this.objects?.[toggleItem];\n\n if (!this.props.multiSelect) {\n if (obj && (!this.props.types || this.props.types.includes(obj.type))) {\n this.localStorage.removeItem(`${this.props.dialogName || 'App'}.selectedNonObject`);\n if (this.state.selected[0] !== toggleItem) {\n this.setState({ selected: [toggleItem], selectedNonObject: '', focused: toggleItem }, () => {\n this.onAfterSelect(isDouble);\n if (cb) {\n cb();\n }\n });\n } else if (isDouble && this.props.onSelect) {\n this.onAfterSelect(isDouble);\n }\n } else {\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.selectedNonObject`, toggleItem);\n this.setState({ selected: [], selectedNonObject: toggleItem, focused: toggleItem }, () => {\n this.onAfterSelect();\n if (cb) {\n cb();\n }\n });\n }\n } else if (obj && (!this.props.types || this.props.types.includes(obj.type))) {\n this.localStorage.removeItem(`${this.props.dialogName || 'App'}.selectedNonObject`);\n\n const selected = [...this.state.selected];\n const pos = selected.indexOf(toggleItem);\n if (pos === -1) {\n selected.push(toggleItem);\n selected.sort();\n } else if (!isDouble) {\n selected.splice(pos, 1);\n }\n\n this.setState({ selected, selectedNonObject: '', focused: toggleItem }, () => {\n this.onAfterSelect(isDouble);\n if (cb) {\n cb();\n }\n });\n }\n }\n\n /**\n * Renders the columns' selector.\n */\n renderColumnsSelectorDialog(): JSX.Element | null {\n return dialogs.renderColumnsSelectorDialog(this);\n }\n\n private async getAdditionalColumns(): Promise<Record<string, CustomAdminColumnStored[]> | null> {\n try {\n const instances = await this.props.socket.getAdapters();\n\n let columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null = null;\n // find all additional columns\n instances.forEach(obj => (columnsForAdmin = this.parseObjectForAdmins(columnsForAdmin, obj)));\n\n return columnsForAdmin;\n } catch (err) {\n // window.alert('Cannot get adapters: ' + e);\n // Object browser in Web has no additional columns\n console.error(`Cannot get adapters: ${err}`);\n return null;\n }\n }\n\n /**\n * Remember that a row shows a state. Called while the row is built (see `renderLeaf`)\n *\n * @param rowId the row\n * @param stateId the state it shows: its own or one of its status states\n */\n recordState(rowId: string, stateId: string): void {\n (this.rowStates[rowId] ||= new Set()).add(stateId);\n if (stateId !== rowId) {\n (this.stateDependents[stateId] ||= new Set()).add(rowId);\n }\n }\n\n private checkUnsubscribes(): void {\n // Only the states of the rows in the window are needed. Rows that scrolled away are not\n // rendered anymore, so their states are unsubscribed as well\n const needed = new Set<string>();\n for (let i = this.windowFirst; i < this.windowLast; i++) {\n const rowId = this.flatRows[i]?.item.data.id;\n this.rowStates[rowId]?.forEach(id => needed.add(id));\n }\n // Remove unused subscriptions\n for (const id of [...this.subscribes]) {\n if (!needed.has(id)) {\n this.unsubscribe(id);\n delete this.stateDependents[id];\n }\n }\n }\n\n /**\n * Find an item.\n */\n findItem(id: string, _parts?: string[], _root?: TreeItem | null, _partyId?: string): TreeItem | null {\n _parts ||= id.split('.');\n _root ||= this.root;\n if (!_root || !_parts.length) {\n return null;\n }\n\n _partyId = (_partyId ? `${_partyId}.` : '') + _parts.shift();\n\n if (_root.children) {\n const item = _root.children.find(i => i.data.id === _partyId);\n if (item) {\n if (item.data.id === id) {\n return item;\n }\n if (_parts.length) {\n return this.findItem(id, _parts, item, _partyId);\n }\n } else {\n return null;\n }\n }\n\n return null;\n }\n\n /**\n * Called when a state changes.\n */\n onStateChange = (id: string, state?: ioBroker.State | null): void => {\n // console.log(`> stateChange ${id}`);\n const oldState = this.states[id];\n if (\n state &&\n oldState &&\n state.val === oldState.val &&\n state.ack === oldState.ack &&\n state.q === oldState.q &&\n state.ts === oldState.ts &&\n state.lc === oldState.lc &&\n state.from === oldState.from\n ) {\n // echo of the already known state: nothing that is displayed can have changed\n // (`from` is compared too, because it is shown in the `changedFrom` column)\n return;\n }\n if (this.states[id]) {\n const item = this.findItem(id);\n if (item?.data.state) {\n item.data.state = undefined;\n }\n }\n if (state) {\n this.states[id] = state;\n } else {\n delete this.states[id];\n }\n // only this row has to be rendered again - and the rows that show this state as their status\n const version = ++this.stateVersionCounter;\n this.rowStateVersion[id] = version;\n this.stateDependents[id]?.forEach(rowId => (this.rowStateVersion[rowId] = version));\n\n if (!this.pausedSubscribes) {\n if (!this.statesUpdateTimer) {\n this.statesUpdateTimer = setTimeout(() => {\n this.statesUpdateTimer = null;\n this.updateRowsOnly();\n }, 300);\n }\n } else if (this.statesUpdateTimer) {\n clearTimeout(this.statesUpdateTimer);\n this.statesUpdateTimer = null;\n }\n };\n\n private parseObjectForAdmins(\n columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null,\n obj: ioBroker.AdapterObject,\n ): Record<string, CustomAdminColumnStored[]> | null {\n if (obj.common?.adminColumns && obj.common.name) {\n const columns: string | (string | ioBroker.CustomAdminColumn)[] = obj.common.adminColumns;\n let aColumns: (string | ioBroker.CustomAdminColumn)[] | undefined;\n if (columns && typeof columns !== 'object') {\n aColumns = [columns];\n } else if (columns) {\n aColumns = columns as (string | ioBroker.CustomAdminColumn)[];\n }\n let cColumns: CustomAdminColumnStored[] | null | undefined;\n if (columns) {\n cColumns = aColumns\n ?.map((_item: string | ioBroker.CustomAdminColumn) => {\n if (typeof _item !== 'object') {\n return { path: _item, name: _item.split('.').pop() } as CustomAdminColumnStored;\n }\n const item: ioBroker.CustomAdminColumn = _item;\n // string => array\n if (item.objTypes && typeof item.objTypes !== 'object') {\n item.objTypes = [item.objTypes];\n } else if (!item.objTypes) {\n item.objTypes = undefined;\n }\n\n if (!item.name && item.path) {\n return {\n path: item.path,\n name: item.path.split('.').pop(),\n width: item.width,\n edit: !!item.edit,\n type: item.type,\n objTypes: item.objTypes,\n } as CustomAdminColumnStored;\n }\n if (!item.path) {\n console.warn(`Admin columns for ${obj._id} ignored, because path not found`);\n return null;\n }\n return {\n path: item.path,\n name: getName(item.name || '', this.props.lang),\n width: item.width,\n edit: !!item.edit,\n type: item.type,\n objTypes: item.objTypes,\n };\n })\n .filter((item: CustomAdminColumnStored | null) => item) as CustomAdminColumnStored[];\n } else {\n cColumns = null;\n }\n\n if (cColumns && cColumns.length) {\n columnsForAdmin ||= {};\n columnsForAdmin[obj.common.name] = cColumns.sort((a, b) =>\n a.path > b.path ? -1 : a.path < b.path ? 1 : 0,\n );\n }\n } else if (obj.common && obj.common.name && columnsForAdmin && columnsForAdmin[obj.common.name]) {\n delete columnsForAdmin[obj.common.name];\n }\n return columnsForAdmin;\n }\n\n onObjectChangeFromWorker = (events: ObjectEvent[]): void => {\n if (Array.isArray(events)) {\n let newState: { columnsForAdmin: Record<string, CustomAdminColumnStored[] | null> | null } | null = null;\n events.forEach(event => {\n const { newInnerState, filtered } = this.processOnObjectChangeElement(event.id, event.obj);\n if (filtered) {\n return;\n }\n if (newInnerState && newState) {\n Object.assign(newState, newInnerState);\n } else {\n newState = newInnerState;\n }\n });\n\n if (newState) {\n this.setState(newState);\n }\n this.afterObjectUpdated();\n }\n };\n\n onObjectChange = (id: string, obj?: ioBroker.Object | null): void => {\n const { newInnerState, filtered } = this.processOnObjectChangeElement(id, obj);\n if (filtered) {\n return;\n }\n\n if (newInnerState) {\n this.setState(newInnerState);\n }\n this.afterObjectUpdated();\n };\n\n afterObjectUpdated(): void {\n if (!this.objects) {\n return;\n }\n if (this.objectsUpdateTimer) {\n // collect a burst of object changes into one rebuild: wait for a quiet period,\n // but do not postpone the rebuild forever while changes keep arriving\n if (Date.now() - this.objectsUpdateFirstTs >= 2000) {\n return;\n }\n clearTimeout(this.objectsUpdateTimer);\n } else {\n this.objectsUpdateFirstTs = Date.now();\n }\n this.objectsUpdateTimer = setTimeout(() => {\n this.objectsUpdateTimer = null;\n const { info, root } = buildTree(this.objects, {\n imagePrefix: this.props.imagePrefix,\n root: this.props.root,\n lang: this.props.lang,\n themeType: this.props.themeType,\n });\n this.root = root;\n this.info = info;\n if (!this.pausedSubscribes) {\n this.doFilter(true);\n } else {\n // the new tree has no visibility flags yet; re-apply the filter when the dialog is closed\n this.treeRebuiltWhilePaused = true;\n }\n }, 500);\n }\n\n // This function is called when the user changes the alias of an object.\n // It updates the aliasMap and returns true if the aliasMap has changed.\n updateAliases(aliasId: string): void {\n if (!this.objects || !this.info?.aliasesMap || !aliasId?.startsWith('alias.')) {\n return;\n }\n // Rebuild aliases map\n const aliasesIds = Object.keys(this.objects).filter(id => id.startsWith('alias.0'));\n\n this.info.aliasesMap = {};\n\n for (const id of aliasesIds) {\n const obj = this.objects[id];\n if (obj?.common?.alias?.id) {\n if (typeof obj.common.alias.id === 'string') {\n const usedId = obj.common.alias.id;\n if (!this.info.aliasesMap[usedId]) {\n this.info.aliasesMap[usedId] = [id];\n } else if (!this.info.aliasesMap[usedId].includes(id)) {\n this.info.aliasesMap[usedId].push(id);\n }\n } else {\n const readId = obj.common.alias.id.read;\n if (readId) {\n if (!this.info.aliasesMap[readId]) {\n this.info.aliasesMap[readId] = [id];\n } else if (!this.info.aliasesMap[readId].includes(id)) {\n this.info.aliasesMap[readId].push(id);\n }\n }\n const writeId = obj.common.alias.id.write;\n if (writeId) {\n if (!this.info.aliasesMap[writeId]) {\n this.info.aliasesMap[writeId] = [id];\n } else if (!this.info.aliasesMap[writeId].includes(id)) {\n this.info.aliasesMap[writeId].push(id);\n }\n }\n }\n }\n }\n }\n\n /**\n * Processes a single element in regard to certain filters, columns for admin and updates object dict\n *\n * @param id The id of the object\n * @param obj The object itself\n * @returns Returns an object containing the new state (if any) and whether the object was filtered.\n */\n processOnObjectChangeElement(\n id: string,\n obj?: ioBroker.Object | null,\n ): {\n filtered: boolean;\n newInnerState: null | { columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null };\n } {\n // console.log(`> objectChange ${id}`);\n const type = obj?.type;\n\n // If the object is filtered out, we don't need to update the React state\n if (\n obj &&\n typeof this.props.filterFunc === 'function' &&\n !this.props.filterFunc(obj) &&\n type !== 'channel' &&\n type !== 'device' &&\n type !== 'folder' &&\n type !== 'adapter' &&\n type !== 'instance'\n ) {\n return { newInnerState: null, filtered: true };\n }\n\n let newInnerState = null;\n if (id.startsWith('system.adapter.') && obj?.type === 'adapter') {\n const columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null = JSON.parse(\n JSON.stringify(this.state.columnsForAdmin),\n );\n\n this.parseObjectForAdmins(columnsForAdmin, obj);\n\n if (JSON.stringify(this.state.columnsForAdmin) !== JSON.stringify(columnsForAdmin)) {\n newInnerState = { columnsForAdmin };\n }\n }\n\n this.objects ||= {};\n\n if (obj) {\n this.objects[id] = obj;\n } else if (this.objects[id]) {\n delete this.objects[id];\n }\n\n this.updateAliases(id);\n\n return { newInnerState, filtered: false };\n }\n\n subscribe(id: string): void {\n if (!this.subscribes.has(id)) {\n this.subscribes.add(id);\n // console.log(`+ subscribe ${id}`);\n if (!this.pausedSubscribes) {\n this.props.socket\n .subscribeState(id, this.onStateChange)\n .catch(e => console.error(`Cannot subscribe on state ${id}: ${e}`));\n }\n }\n }\n\n unsubscribe(id: string): void {\n if (this.subscribes.has(id)) {\n this.subscribes.delete(id);\n if (this.states[id]) {\n delete this.states[id];\n }\n // console.log(`- unsubscribe ${id}`);\n this.props.socket.unsubscribeState(id, this.onStateChange);\n\n if (this.pausedSubscribes) {\n console.warn('Unsubscribe during pause?');\n }\n }\n }\n\n pauseSubscribe(isPause: boolean): void {\n if (!this.pausedSubscribes && isPause) {\n this.pausedSubscribes = true;\n this.subscribes.forEach(id => this.props.socket.unsubscribeState(id, this.onStateChange));\n } else if (this.pausedSubscribes && !isPause) {\n this.pausedSubscribes = false;\n this.subscribes.forEach(id => this.props.socket.subscribeState(id, this.onStateChange));\n if (this.treeRebuiltWhilePaused) {\n // without this filter run, no node of the rebuilt tree is marked visible and the browser stays empty\n this.treeRebuiltWhilePaused = false;\n this.doFilter(true);\n }\n }\n }\n\n clearFilter(): void {\n if (JSON.stringify(this.state.filter) !== JSON.stringify(DEFAULT_FILTER)) {\n this.setState({ filter: { ...DEFAULT_FILTER }, filterKey: this.state.filterKey + 1 }, () => {\n this.doFilter();\n this.props.onFilterChanged?.({ ...DEFAULT_FILTER });\n });\n }\n }\n\n isFilterEmpty(): boolean {\n return (\n !!this.state.filter.id ||\n !!this.state.filter.name ||\n !!this.state.filter.room?.length ||\n !!this.state.filter.func?.length ||\n !!this.state.filter.role?.length ||\n !!this.state.filter.type?.length ||\n !!this.state.filter.custom?.length\n );\n }\n\n onExpandAll(root?: TreeItem, expanded?: string[]): void {\n const _root: TreeItem | null = root || this.root;\n expanded ||= [];\n\n _root?.children?.forEach((item: TreeItem) => {\n if (item.data.sumVisibility) {\n expanded.push(item.data.id);\n this.onExpandAll(item, expanded);\n }\n });\n\n if (_root === this.root) {\n expanded.sort();\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n\n this.setState({ expanded });\n }\n }\n\n onCollapseAll(): void {\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify([]));\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectSelected`, '[]');\n this.setState({ expanded: [], depth: 0, selected: [] }, () => this.onAfterSelect());\n }\n\n private expandDepth(root: TreeItem, depth: number, expanded: string[], expandedSet?: Set<string>): void {\n if (!this.root) {\n throw new Error('No root');\n }\n root ||= this.root;\n expandedSet ||= new Set(expanded);\n if (depth > 0) {\n root.children?.forEach(item => {\n if (item.data.sumVisibility) {\n if (!expandedSet.has(item.data.id)) {\n expanded.push(item.data.id);\n expandedSet.add(item.data.id);\n }\n if (depth - 1 > 0) {\n this.expandDepth(item, depth - 1, expanded, expandedSet);\n }\n }\n });\n }\n }\n\n private static collapseDepth(depth: number, expanded: string[]): string[] {\n return expanded.filter(id => id.split('.').length <= depth);\n }\n\n onExpandVisible(): void {\n if (this.state.depth < 9) {\n const depth = this.state.depth + 1;\n const expanded = [...this.state.expanded];\n if (this.root) {\n this.expandDepth(this.root, depth, expanded);\n expanded.sort();\n }\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n this.setState({ depth, expanded });\n }\n }\n\n onStatesViewVisible(): void {\n const statesView = !this.state.statesView;\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectStatesView`, JSON.stringify(statesView));\n this.setState({ statesView });\n }\n\n onCollapseVisible(): void {\n if (this.state.depth > 0) {\n const depth = this.state.depth - 1;\n const expanded = ObjectBrowserClass.collapseDepth(depth, this.state.expanded);\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n this.setState({ depth, expanded });\n }\n }\n\n private getEnumsForId = (id: string): ioBroker.EnumObject[] | undefined => {\n const result: ioBroker.EnumObject[] = [];\n this.info.enums.forEach(_id => {\n if (this.objects[_id]?.common?.members?.includes(id)) {\n const enumItem: ioBroker.EnumObject = {\n _id: this.objects[_id]._id,\n common: JSON.parse(JSON.stringify(this.objects[_id].common)) as ioBroker.EnumCommon,\n native: this.objects[_id].native,\n type: 'enum',\n };\n if (enumItem.common) {\n delete enumItem.common.members;\n delete enumItem.common.custom;\n // @ts-expect-error deprecated attribute\n delete enumItem.common.mobile;\n }\n result.push(enumItem);\n }\n });\n\n return result.length ? result : undefined;\n };\n\n private _createAllEnums = async (enums: (string | ioBroker.EnumObject)[], objId: string): Promise<void> => {\n for (let e = 0; e < enums.length; e++) {\n const item: string | ioBroker.EnumObject = enums[e];\n let id: string;\n let newObj: ioBroker.EnumObject | undefined;\n\n // some admin version delivered enums as string\n if (typeof item === 'object') {\n newObj = item;\n id = newObj._id;\n } else {\n id = item;\n }\n\n let oldObj: ioBroker.EnumObject | undefined = this.objects[id] as ioBroker.EnumObject | undefined;\n // if enum does not exist\n if (!oldObj) {\n // create a new one\n oldObj =\n newObj ||\n ({\n _id: id,\n common: {\n name: id.split('.').pop(),\n members: [],\n },\n native: {},\n type: 'enum',\n } as ioBroker.EnumObject);\n\n oldObj.common ||= {} as ioBroker.EnumCommon;\n oldObj.common.members = [objId];\n oldObj.type = 'enum';\n\n await this.props.socket.setObject(id, oldObj);\n } else if (!oldObj.common?.members?.includes(objId)) {\n oldObj.common ||= {} as ioBroker.EnumCommon;\n oldObj.type = 'enum';\n oldObj.common.members ||= [];\n // add the missing object\n oldObj.common.members.push(objId);\n oldObj.common.members.sort();\n await this.props.socket.setObject(id, oldObj);\n }\n }\n };\n\n private async loadObjects(objs: Record<string, ioBrokerObjectForExport>): Promise<void> {\n if (objs) {\n for (const id in objs) {\n if (!Object.prototype.hasOwnProperty.call(objs, id) || !objs[id]) {\n continue;\n }\n const obj = objs[id];\n let enums = null;\n let val;\n let ack;\n if (obj?.common?.enums) {\n enums = obj.common.enums;\n delete obj.common.enums;\n } else {\n enums = null;\n }\n\n if (obj.val || obj.val === 0) {\n val = obj.val;\n delete obj.val;\n }\n if (obj.ack !== undefined) {\n ack = obj.ack;\n delete obj.ack;\n }\n try {\n await this.props.socket.setObject(id, obj);\n if (enums) {\n await this._createAllEnums(enums, obj._id);\n }\n if (obj.type === 'state') {\n if (val !== undefined && val !== null) {\n try {\n await this.props.socket.setState(obj._id, val, ack !== undefined ? ack : true);\n } catch (e) {\n window.alert(`Cannot set state \"${obj._id} with ${val}\": ${e}`);\n }\n } else {\n try {\n const state = await this.props.socket.getState(obj._id);\n if (!state || state.val === null) {\n try {\n await this.props.socket.setState(\n obj._id,\n !obj.common || obj.common.def === undefined ? null : obj.common.def,\n true,\n );\n } catch (e) {\n window.alert(`Cannot set state \"${obj._id}\": ${e}`);\n }\n }\n } catch (e) {\n window.alert(`Cannot read state \"${obj._id}\": ${e}`);\n }\n }\n }\n } catch (error) {\n window.alert(error);\n }\n }\n }\n }\n\n _getSelectedIdsForExport(): string[] {\n if (this.state.selected.length || this.state.selectedNonObject) {\n const result = [];\n const keys = Object.keys(this.objects);\n keys.sort();\n const id = this.state.selected[0] || this.state.selectedNonObject;\n const idDot = `${id}.`;\n const idLen = idDot.length;\n for (let k = 0; k < keys.length; k++) {\n const key = keys[k];\n if (id === key || key.startsWith(idDot)) {\n result.push(key);\n }\n if (key.substring(0, idLen) > idDot) {\n break;\n }\n }\n\n return result;\n }\n return [];\n }\n\n /**\n * Exports the selected objects based on the given options and triggers file generation\n */\n async _exportObjects(\n /** Options to filter/reduce the output */\n options: {\n /** Whether all objects should be exported or only the selected ones */\n isAll?: boolean;\n /** Whether the output should be beautified */\n beautify?: boolean;\n /** Whether \"system.repositories\" should be excluded */\n excludeSystemRepositories?: boolean;\n /** Whether translations should be reduced to only the english value */\n excludeTranslations?: boolean;\n /** Whether the values of the states should be not included */\n noStatesByExportImport?: boolean;\n },\n ): Promise<void> {\n if (options.isAll) {\n generateFile('allObjects.json', this.objects, options);\n return;\n }\n if (!(this.state.selected.length || this.state.selectedNonObject)) {\n window.alert(this.props.t('ra_Save of objects-tree is not possible'));\n return;\n }\n const result: Record<string, ioBrokerObjectForExport> = {};\n const id = this.state.selected[0] || this.state.selectedNonObject;\n const ids = this._getSelectedIdsForExport();\n\n for (const key of ids) {\n result[key] = JSON.parse(JSON.stringify(this.objects[key])) as ioBrokerObjectForExport;\n // read states values\n if (result[key]?.type === 'state' && !options.noStatesByExportImport) {\n const state = await this.props.socket.getState(key);\n if (state) {\n result[key].val = state.val;\n result[key].ack = state.ack;\n }\n }\n // add enum information\n if (result[key].common) {\n const enums = this.getEnumsForId(key);\n if (enums) {\n result[key].common.enums = enums;\n }\n }\n }\n\n generateFile(`${id}.json`, result, options);\n }\n\n renderExportDialog(): JSX.Element | null {\n return dialogs.renderExportDialog(this);\n }\n\n renderRenameDialog(): JSX.Element | null {\n return dialogs.renderRenameDialog(this);\n }\n\n async parseJsonFile(contents: string): Promise<void> {\n try {\n const json = JSON.parse(contents);\n const len = Object.keys(json).length;\n const id = json._id;\n // it could be a single object or many objects\n if (id === undefined && len) {\n // many objects\n await this.loadObjects(json as Record<string, ioBrokerObjectForExport>);\n window.alert(this.props.t('ra_%s object(s) processed', len));\n } else {\n // it is only one object in form\n // {\n // \"_id\": \"xxx\",\n // \"common\": \"yyy\",\n // \"native\": \"zzz\"\n // \"val\": JSON.stringify(value)\n // \"ack\": true\n // }\n if (!id) {\n return window.alert(this.props.t('ra_Invalid structure'));\n }\n try {\n let enums;\n let val;\n let ack;\n if (json.common.enums) {\n enums = json.common.enums;\n delete json.common.enums;\n }\n if (json.val) {\n val = json.val;\n delete json.val;\n }\n if (json.ack !== undefined) {\n ack = json.ack;\n delete json.ack;\n }\n await this.props.socket.setObject(json._id, json);\n\n if (json.type === 'state') {\n if (val !== undefined && val !== null) {\n await this.props.socket.setState(json._id, val, ack === undefined ? true : ack);\n } else {\n const state = await this.props.socket.getState(json._id);\n if (!state || state.val === null || state.val === undefined) {\n await this.props.socket.setState(\n json._id,\n json.common.def === undefined ? null : json.common.def,\n true,\n );\n }\n }\n }\n if (enums) {\n await this._createAllEnums(enums, json._id);\n }\n\n window.alert(this.props.t('ra_%s was imported', json._id));\n } catch (err) {\n window.alert(err);\n }\n }\n } catch (err) {\n window.alert(err);\n }\n }\n private handleJsonUpload(evt: Event): void {\n const target = evt.target as HTMLInputElement;\n const f = target.files?.length && target.files[0];\n if (f) {\n const r = new FileReader();\n r.onload = (e): void => {\n this.parseJsonFile(e.target?.result as string).catch(e => console.log(`Cannot parse file: ${e}`));\n };\n r.readAsText(f);\n } else {\n window.alert(this.props.t('ra_Failed to open JSON File'));\n }\n }\n\n toolTipObjectCreating = (): JSX.Element[] | string => {\n const { t } = this.props;\n\n let value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={2}>{t('ra_Folder → State')}</div>,\n <div key={3}>{t('ra_Folder → Channel → State')}</div>,\n <div key={4}>{t('ra_Folder → Device → Channel → State')}</div>,\n <div key={5}>{t('ra_Device → Channel → State')}</div>,\n <div key={6}>{t('ra_Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={8}>{t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}</div>,\n <div key={9}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n\n if (this.state.selected.length || this.state.selectedNonObject) {\n const id = this.state.selected[0] || this.state.selectedNonObject;\n if (id.split('.').length < 2 || (this.objects[id] && this.objects[id]?.type === 'state')) {\n // show default tooltip\n } else if (this.state.filter.expertMode) {\n switch (this.objects[id]?.type) {\n case 'device':\n value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={5}>{t('ra_Device → Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={8}>\n {t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}\n </div>,\n <div key={9}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n break;\n case 'folder':\n value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={2}>{t('ra_Folder → State')}</div>,\n <div key={3}>{t('ra_Folder → Channel → State')}</div>,\n <div key={4}>{t('ra_Folder → Device → Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={8}>\n {t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}\n </div>,\n <div key={9}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n break;\n case 'channel':\n value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={1}>{t('ra_Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={8}>\n {t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}\n </div>,\n <div key={9}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n break;\n default:\n break;\n }\n } else if (id.startsWith('alias.0') || id.startsWith('0_userdata')) {\n value = [\n <div key={1}>{t('ra_Only following structures of objects are available:')}</div>,\n <div key={2}>{t('ra_Folder → State')}</div>,\n <div key={3}>{t('ra_Folder → Channel → State')}</div>,\n <div key={4}>{t('ra_Folder → Device → Channel → State')}</div>,\n <div key={5}>{t('ra_Device → Channel → State')}</div>,\n <div key={6}>{t('ra_Channel → State')}</div>,\n <div\n key={7}\n style={{ height: 10 }}\n />,\n <div key={7}>\n {t('ra_Non-experts may create new objects only in \"0_userdata.0\" or \"alias.0\".')}\n </div>,\n <div key={8}>\n {t(\n 'ra_The experts may create objects everywhere but from second level (e.g. \"vis.0\" or \"javascript.0\").',\n )}\n </div>,\n ];\n }\n }\n\n return value.length ? value : t('ra_Add new child object to selected parent');\n };\n\n onOpenFile(): void {\n const input = document.createElement('input');\n input.setAttribute('type', 'file');\n input.setAttribute('id', 'files');\n input.setAttribute('opacity', '0');\n input.addEventListener('change', (e: Event) => this.handleJsonUpload(e), false);\n input.click();\n }\n\n renderInputJsonDialog(): JSX.Element | null {\n return dialogs.renderInputJsonDialog(this);\n }\n\n /**\n * Renders the toolbar.\n */\n getToolbar(): JSX.Element {\n return toolbar.getToolbar(this);\n }\n\n toggleExpanded(id: string): void {\n const expanded: string[] = JSON.parse(JSON.stringify(this.state.expanded));\n const pos = expanded.indexOf(id);\n if (pos === -1) {\n expanded.push(id);\n expanded.sort();\n } else {\n expanded.splice(pos, 1);\n }\n\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectExpanded`, JSON.stringify(expanded));\n\n this.setState({ expanded });\n }\n\n onCopy(e: React.MouseEvent, text: string | undefined): void {\n e.stopPropagation();\n e.preventDefault();\n if (text) {\n Utils.copyToClipboard(text);\n if (text.length < 50) {\n this.setState({ toast: this.props.t('ra_Copied %s', text) });\n } else {\n this.setState({ toast: this.props.t('ra_Copied') });\n }\n }\n }\n\n renderTooltipAccessControl(acl: ioBroker.StateACL): null | JSX.Element {\n return leaf.renderTooltipAccessControl(this, acl);\n }\n\n renderColumnButtons(id: string, item: TreeItem): (JSX.Element | null)[] | JSX.Element | null {\n return leaf.renderColumnButtons(this, id, item);\n }\n\n getTooltipInfo(id: string, cb?: () => void): void {\n const obj = this.objects[id];\n const state = this.states[id];\n\n const { valFull, fileViewer } = formatValue({\n state,\n obj: obj as ioBroker.StateObject,\n texts: this.texts,\n dateFormat: this.props.dateFormat || this.systemConfig?.common.dateFormat || DEFAULT_DATE_FORMAT,\n isFloatComma:\n this.props.isFloatComma === undefined\n ? (this.systemConfig?.common.isFloatComma ?? true)\n : this.props.isFloatComma,\n full: true,\n });\n const valFullRx: JSX.Element[] = [];\n\n valFull?.forEach(_item => {\n if (_item.t === this.texts.quality && state.q) {\n valFullRx.push(\n <div\n style={styles.cellValueTooltipBoth}\n key={_item.t}\n >\n {_item.t}\n : \n {_item.v}\n </div>,\n );\n // <div style={styles.cellValueTooltipValue} key={item.t + '_v'}>{item.v}</div>,\n if (!_item.nbr) {\n valFullRx.push(<br key={`${_item.t}_br`} />);\n }\n } else {\n valFullRx.push(\n <div\n style={styles.cellValueTooltipTitle}\n key={_item.t}\n >\n {_item.t}\n : \n </div>,\n );\n valFullRx.push(\n <div\n style={styles.cellValueTooltipValue}\n key={`${_item.t}_v`}\n >\n {_item.v}\n </div>,\n );\n if (!_item.nbr) {\n valFullRx.push(<br key={`${_item.t}_br`} />);\n }\n }\n });\n const role = obj?.common?.role || '';\n\n if (fileViewer === 'image') {\n valFullRx.push(\n <img\n style={styles.cellValueTooltipImage}\n src={state.val as string}\n alt={id}\n />,\n );\n } else if (role === 'url' || role === 'url.self' || role === 'url.blank') {\n // Show comment about \"Hold Ctrl/⌘ key to open the link\"\n valFullRx.unshift(\n <div\n key=\"ctrl\"\n style={{ textDecoration: 'underline', fontWeight: 'bold' }}\n >\n {this.texts.ctrlForLink}\n </div>,\n );\n } else if (this.defaultHistory && obj?.common?.custom?.[this.defaultHistory]) {\n const isNumber = typeof state?.val === 'number';\n const isBoolean = obj.common.type === 'boolean' || typeof state?.val === 'boolean';\n valFullRx.push(\n <HistoryChart\n key=\"chart\"\n socket={this.props.socket}\n id={id}\n instance={this.defaultHistory}\n t={this.props.t}\n isBoolean={isBoolean}\n isFloatComma={\n this.props.isFloatComma === undefined\n ? (this.systemConfig?.common.isFloatComma ?? true)\n : this.props.isFloatComma\n }\n current={\n isNumber || isBoolean\n ? { ts: state.ts, val: typeof state.val === 'boolean' ? +state.val : (state.val as number) }\n : null\n }\n />,\n );\n }\n\n this.setState({ tooltipInfo: { el: valFullRx, id } }, () => cb && cb());\n }\n\n private _syncEnum(id: string, enumIds: string[], newArray: string[], cb: () => void): void {\n if (!enumIds?.length) {\n if (cb) {\n cb();\n }\n return;\n }\n const enumId = enumIds.pop() || '';\n const promises = [];\n if (this.info.objects[enumId]?.common) {\n if (this.info.objects[enumId].common.members?.length) {\n const pos = this.info.objects[enumId].common.members.indexOf(id);\n if (pos !== -1 && !newArray.includes(enumId)) {\n // delete it from members\n const obj: ioBroker.Object = JSON.parse(JSON.stringify(this.info.objects[enumId]));\n obj.common.members.splice(pos, 1);\n promises.push(\n this.props.socket\n .setObject(enumId, obj)\n .then(() => (this.info.objects[enumId] = obj))\n .catch(e => this.showError(e)),\n );\n }\n }\n\n // add to it\n if (newArray.includes(enumId) && !this.info.objects[enumId].common.members?.includes(id)) {\n // add to object\n const obj: ioBroker.Object = JSON.parse(JSON.stringify(this.info.objects[enumId]));\n obj.common.members ||= [];\n obj.common.members.push(id);\n obj.common.members.sort();\n promises.push(\n this.props.socket\n .setObject(enumId, obj)\n .then(() => (this.info.objects[enumId] = obj))\n .catch(e => this.showError(e)),\n );\n }\n }\n\n void Promise.all(promises).then(() => {\n setTimeout(() => this._syncEnum(id, enumIds, newArray, cb), 0);\n });\n }\n\n syncEnum(id: string, enumName: 'func' | 'room', newArray: string[]): Promise<void> {\n const toCheck = [...this.info[enumName === 'func' ? 'funcEnums' : 'roomEnums']];\n\n return new Promise<void>(resolve => {\n this._syncEnum(id, toCheck, newArray, () => {\n // force update of an object\n resolve();\n });\n });\n }\n\n onColumnsEditCustomDialogClose(isSave?: boolean): void {\n // cannot be null\n const customColumnDialog: {\n value: boolean | number | string;\n type: 'boolean' | 'number' | 'string';\n initValue: boolean | number | string;\n } = this.customColumnDialog as {\n value: boolean | number | string;\n type: 'boolean' | 'number' | 'string';\n initValue: boolean | number | string;\n };\n\n if (isSave) {\n let value: string | number | boolean = customColumnDialog.value;\n if (customColumnDialog.type === 'boolean') {\n value = value === 'true' || value === true;\n } else if (customColumnDialog.type === 'number') {\n value = parseFloat(value as any as string);\n }\n const it = this.state.columnsEditCustomDialog?.it;\n this.customColumnDialog = null;\n this.props.socket\n .getObject(this.state.columnsEditCustomDialog?.obj?._id || '')\n .then(obj => {\n if (obj && it && setCustomValue(obj, it, value)) {\n return this.props.socket.setObject(obj._id, obj);\n }\n throw new Error(this.props.t('ra_Cannot update attribute, because not found in the object'));\n })\n .then(() => this.setState({ columnsEditCustomDialog: null }))\n .catch(e => this.showError(e));\n } else {\n this.customColumnDialog = null;\n this.setState({ columnsEditCustomDialog: null });\n }\n }\n\n /**\n * Renders a custom value.\n */\n renderCustomValue(obj: ioBroker.Object, it: AdapterColumn, item: TreeItem): JSX.Element | null {\n return leaf.renderCustomValue(this, obj, it, item);\n }\n\n renderAliasLink(id: string, index?: number, customStyle?: Record<string, any>): JSX.Element | null {\n return leaf.renderAliasLink(this, id, index, customStyle);\n }\n\n /**\n * Renders one row of the table.\n */\n renderLeaf(\n item: TreeItem,\n isExpanded: boolean | undefined,\n counter: { count: number },\n ): { row: JSX.Element; details: JSX.Element | null } {\n return leaf.renderLeaf(this, item, isExpanded, counter);\n }\n\n /**\n * Renders an item.\n */\n renderItem(root: TreeItem, isExpanded: boolean | undefined, counter?: { count: number }): (JSX.Element | null)[] {\n return leaf.renderItem(this, root, isExpanded, counter);\n }\n\n calculateColumnsVisibility(\n aColumnsAuto?: boolean | null,\n aColumns?: string[] | null,\n aColumnsForAdmin?: Record<string, CustomAdminColumnStored[]> | null,\n aColumnsWidths?: Record<string, number>,\n ): void {\n let columnsWidths: Record<string, number> = aColumnsWidths || this.state.columnsWidths;\n const columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null =\n aColumnsForAdmin || this.state.columnsForAdmin;\n const columns: string[] = aColumns || this.state.columns || [];\n const columnsAuto: boolean = typeof aColumnsAuto !== 'boolean' ? this.state.columnsAuto : aColumnsAuto;\n\n columnsWidths = JSON.parse(JSON.stringify(columnsWidths));\n Object.keys(columnsWidths).forEach(name => {\n if (columnsWidths[name]) {\n columnsWidths[name] = parseInt(columnsWidths[name] as any as string, 10) || 0;\n }\n });\n\n this.adapterColumns = [];\n\n // In the auto mode the visible columns depend on the width of the container\n if (!this.props.columns) {\n this.visibleCols = [...this.screenWidths[this.width].fields];\n // remove type column if only one type must be selected\n if (this.props.types && this.props.types.length === 1) {\n const pos = this.visibleCols.indexOf('type');\n if (pos !== -1) {\n this.visibleCols.splice(pos, 1);\n }\n }\n }\n\n const WIDTHS = this.screenWidths[this.width].widths;\n\n if (columnsAuto) {\n this.columnsVisibility = {\n id: this.screenWidths[this.width || 'lg'].idWidth,\n name: this.visibleCols.includes('name') ? WIDTHS.name || 0 : 0,\n type: this.visibleCols.includes('type') ? WIDTHS.type || 0 : 0,\n role: this.visibleCols.includes('role') ? WIDTHS.role || 0 : 0,\n room: this.visibleCols.includes('room') ? WIDTHS.room || 0 : 0,\n func: this.visibleCols.includes('func') ? WIDTHS.func || 0 : 0,\n changedFrom: this.visibleCols.includes('changedFrom') ? WIDTHS.changedFrom || 0 : 0,\n qualityCode: this.visibleCols.includes('qualityCode') ? WIDTHS.qualityCode || 0 : 0,\n timestamp: this.visibleCols.includes('timestamp') ? WIDTHS.timestamp || 0 : 0,\n lastChange: this.visibleCols.includes('lastChange') ? WIDTHS.lastChange || 0 : 0,\n val: this.visibleCols.includes('val') ? WIDTHS.val || 0 : 0,\n buttons: this.visibleCols.includes('buttons') ? WIDTHS.buttons || 0 : 0,\n };\n\n // in xs name is not visible\n if (this.columnsVisibility.name && !this.customWidth) {\n let widthSum: number = (this.columnsVisibility.id as number) || 0; // id is always visible\n if (this.state.statesView) {\n widthSum += this.columnsVisibility.changedFrom || 0;\n widthSum += this.columnsVisibility.qualityCode || 0;\n widthSum += this.columnsVisibility.timestamp || 0;\n widthSum += this.columnsVisibility.lastChange || 0;\n } else {\n widthSum += this.columnsVisibility.type || 0;\n widthSum += this.columnsVisibility.role || 0;\n widthSum += this.columnsVisibility.room || 0;\n widthSum += this.columnsVisibility.func || 0;\n }\n widthSum += this.columnsVisibility.val || 0;\n widthSum += this.columnsVisibility.buttons || 0;\n this.columnsVisibility.name = `calc(100% - ${widthSum + 5}px)`;\n } else if (!this.customWidth) {\n // Calculate the width of ID\n let widthSum = 0; // id is always visible\n if (this.state.statesView) {\n widthSum += this.columnsVisibility.changedFrom || 0;\n widthSum += this.columnsVisibility.qualityCode || 0;\n widthSum += this.columnsVisibility.timestamp || 0;\n widthSum += this.columnsVisibility.lastChange || 0;\n } else {\n widthSum += this.columnsVisibility.type || 0;\n widthSum += this.columnsVisibility.role || 0;\n widthSum += this.columnsVisibility.room || 0;\n widthSum += this.columnsVisibility.func || 0;\n }\n widthSum += this.columnsVisibility.val || 0;\n widthSum += this.columnsVisibility.buttons || 0;\n this.columnsVisibility.id = `calc(100% - ${widthSum + 5}px)`;\n }\n } else {\n const width = this.width || 'lg';\n /**\n * A row shows either type/role/room/function or the four columns of the states view,\n * never both. A column of the set that is not shown must have the width zero, so that\n * the ID column, which fills the rest of the row, gets the right place.\n */\n const shown = (name: string, inStatesView: boolean): boolean =>\n !!this.state.statesView === inStatesView && columns.includes(name);\n /** Width of one column: what the user set for it, else the default of the width class */\n const widthOf = (name: string): number =>\n columnsWidths[name] || (WIDTHS as Record<string, number>)[name] || 0;\n /**\n * The width classes below `lg` do not define the columns of the states view, but the\n * user can select them by hand there too, so they fall back to the widest class.\n */\n const statesWidthOf = (name: string): number =>\n widthOf(name) || (this.screenWidths.xl.widths as Record<string, number>)[name] || 0;\n\n this.columnsVisibility = {\n id: columnsWidths.id || this.screenWidths[width].idWidth,\n name: columns.includes('name') ? widthOf('name') : 0,\n type: shown('type', false) ? widthOf('type') : 0,\n role: shown('role', false) ? widthOf('role') : 0,\n room: shown('room', false) ? widthOf('room') : 0,\n func: shown('func', false) ? widthOf('func') : 0,\n // The states view columns were missing here completely: their checkboxes in the\n // configuration dialog had no effect, and the header showed them although no row\n // had a cell for them.\n changedFrom: shown('changedFrom', true) ? statesWidthOf('changedFrom') : 0,\n qualityCode: shown('qualityCode', true) ? statesWidthOf('qualityCode') : 0,\n timestamp: shown('timestamp', true) ? statesWidthOf('timestamp') : 0,\n lastChange: shown('lastChange', true) ? statesWidthOf('lastChange') : 0,\n };\n let widthSum: number = this.columnsVisibility.id as number; // id is always visible\n if (this.columnsVisibility.name) {\n // Only one of the two sets has a width, so both may be added up\n widthSum += this.columnsVisibility.type || 0;\n widthSum += this.columnsVisibility.role || 0;\n widthSum += this.columnsVisibility.room || 0;\n widthSum += this.columnsVisibility.func || 0;\n widthSum += this.columnsVisibility.changedFrom || 0;\n widthSum += this.columnsVisibility.qualityCode || 0;\n widthSum += this.columnsVisibility.timestamp || 0;\n widthSum += this.columnsVisibility.lastChange || 0;\n }\n\n if (columnsForAdmin && columns) {\n Object.keys(columnsForAdmin)\n .sort()\n .forEach(adapter =>\n columnsForAdmin[adapter].forEach(column => {\n const id = `_${adapter}_${column.path}`;\n if (columns.includes(id)) {\n const item: AdapterColumn = {\n adapter,\n id: `_${adapter}_${column.path}`,\n name: column.name,\n path: column.path.split('.'),\n pathText: column.path,\n };\n if (column.edit) {\n item.edit = true;\n if (column.type) {\n item.type = column.type as 'number' | 'boolean' | 'string';\n }\n if (column.objTypes) {\n item.objTypes = column.objTypes;\n }\n }\n\n this.adapterColumns.push(item);\n (this.columnsVisibility as Record<string, number>)[id] =\n columnsWidths[item.id] ||\n column.width ||\n this.screenWidths[width].widths.func ||\n this.screenWidths.xl.widths.func ||\n 0;\n widthSum += (this.columnsVisibility as Record<string, number>)[id];\n } else {\n (this.columnsVisibility as Record<string, number>)[id] = 0;\n }\n }),\n );\n }\n this.adapterColumns.sort((a, b) => (a.id > b.id ? -1 : a.id < b.id ? 1 : 0));\n this.columnsVisibility.val = columns.includes('val')\n ? columnsWidths.val || WIDTHS.val || this.screenWidths.xl.widths.val\n : 0;\n\n // do not show buttons if not desired\n if (!this.props.columns || this.props.columns.includes('buttons')) {\n this.columnsVisibility.buttons = columns.includes('buttons')\n ? columnsWidths.buttons || WIDTHS.buttons || this.screenWidths.xl.widths.buttons\n : 0;\n widthSum += this.columnsVisibility.buttons || 0;\n }\n\n if (this.columnsVisibility.name && !columnsWidths.name) {\n widthSum += this.columnsVisibility.val || 0;\n this.columnsVisibility.name = `calc(100% - ${widthSum}px)`;\n } else {\n const newWidth = Object.keys(this.columnsVisibility).reduce((accumulator: number, name: string) => {\n // do not summarize strings\n if (\n name === 'id' ||\n typeof (this.columnsVisibility as Record<string, number | string>)[name] === 'string' ||\n !(this.columnsVisibility as Record<string, number | string>)[name]\n ) {\n return accumulator;\n }\n return accumulator + (this.columnsVisibility as Record<string, number>)[name];\n }, 0);\n this.columnsVisibility.id = `calc(100% - ${newWidth}px)`;\n }\n }\n }\n\n /**\n * The width class of the object browser. It is measured from the container and not from the\n * window, so the browser shows the right columns if it is used in a narrow panel or dialog too.\n * `props.width` overwrites the measured value.\n */\n get width(): Width {\n return this.props.width || this.state.containerWidth;\n }\n\n /** Watch the width of the table container to detect the width class (see `width`) */\n observeContainerWidth(): void {\n const container = this.tableRef.current;\n if (!container || this.observedContainer === container) {\n return;\n }\n this.resizeObserver?.disconnect();\n this.observedContainer = container;\n this.resizeObserver = new ResizeObserver(entries => {\n // the height decides how many rows are rendered (see `getWindow`)\n this.setViewportHeight(entries[0].contentRect.height);\n this.setContainerWidth(entries[0].contentRect.width);\n });\n this.resizeObserver.observe(container);\n // measure immediately, so the first render after mounting shows the right columns\n this.setViewportHeight(container.clientHeight);\n this.setContainerWidth(container.clientWidth);\n }\n\n /** Store the height of the container: it decides how many rows the window holds */\n setViewportHeight(viewportHeight: number): void {\n if (Math.abs(this.viewportHeight - viewportHeight) < 1) {\n return;\n }\n this.viewportHeight = viewportHeight;\n const { first, last } = this.getWindow();\n if (first !== this.windowFirst || last !== this.windowLast) {\n this.updateRowsOnly();\n }\n }\n\n /** Store the width class of the container if it changed */\n setContainerWidth(containerWidth: number): void {\n const width = widthFromContainer(containerWidth, this.props.theme);\n if (width !== this.state.containerWidth) {\n // the columns are recalculated in `render`, as soon as the width class changed\n this.setState({ containerWidth: width });\n }\n }\n\n /**\n * The height a row needs.\n *\n * A row with an alias is higher than the others, and what a row really measured beats the\n * estimate - the table has to know the height of rows it does not render at the moment,\n * otherwise the scrollbar does not fit the content.\n */\n private rowHeight(item: TreeItem): number {\n const id = item.data.id;\n // the root itself has no row, only its children have one\n if (!id) {\n return 0;\n }\n const measured = this.measuredHeights[id];\n if (measured) {\n return measured;\n }\n const common = this.objects[id]?.common as ioBroker.StateCommon | undefined;\n if (id.startsWith('alias.') && common?.alias?.id) {\n // see `tableRowAlias` and `tableRowAliasReadWrite` in styles.ts\n return typeof common.alias.id === 'object' ? ROW_HEIGHT + 22 : ROW_HEIGHT + 10;\n }\n return ROW_HEIGHT;\n }\n\n /** All rows in the order in which they are shown, and where each of them begins */\n private buildFlatRows(): void {\n this.flatRows = this.root ? leaf.flattenItems(this, this.root) : [];\n this.calculateRowOffsets();\n }\n\n /** Where every row begins - again after a row measured another height than was expected */\n private calculateRowOffsets(): void {\n this.rowOffsetsInvalid = false;\n const offsets: number[] = new Array(this.flatRows.length + 1);\n offsets[0] = 0;\n for (let i = 0; i < this.flatRows.length; i++) {\n offsets[i + 1] = offsets[i] + this.rowHeight(this.flatRows[i].item);\n }\n this.rowOffsets = offsets;\n }\n\n /** The row that covers this position (binary search over `rowOffsets`) */\n private findRowAt(position: number): number {\n let low = 0;\n let high = this.flatRows.length - 1;\n while (low < high) {\n const middle = (low + high + 1) >> 1;\n if (this.rowOffsets[middle] <= position) {\n low = middle;\n } else {\n high = middle - 1;\n }\n }\n return low;\n }\n\n /**\n * The rows that are rendered: the visible ones plus `OVERSCAN_ROWS` above and below.\n *\n * A tree with a few thousand open rows costs a fifth of a second of blocked main thread for\n * every change that concerns all rows - selecting a row, a filter, folding a node - because\n * every row is built anew. Only the rows around the visible area are rendered now, so that\n * work no longer grows with the size of the tree.\n */\n private getWindow(): { first: number; last: number } {\n const count = this.flatRows.length;\n if (!count) {\n return { first: 0, last: 0 };\n }\n // until the container was measured (the very first render) render a screen full of rows\n const height = this.viewportHeight || 1_000;\n const first = Math.max(0, this.findRowAt(this.scrollTop) - ObjectBrowserClass.OVERSCAN_ROWS);\n const last = Math.min(count, this.findRowAt(this.scrollTop + height) + 1 + ObjectBrowserClass.OVERSCAN_ROWS);\n return { first, last };\n }\n\n /** The table was scrolled: move the window of rendered rows, at most once per frame */\n private readonly onTableScroll = (): void => {\n if (this.scrollFrame !== null) {\n return;\n }\n this.scrollFrame = window.requestAnimationFrame(() => {\n this.scrollFrame = null;\n const container = this.tableRef.current;\n if (!container) {\n return;\n }\n this.scrollTop = container.scrollTop;\n const { first, last } = this.getWindow();\n if (first !== this.windowFirst || last !== this.windowLast) {\n // scrolling changes no row, so the rows that stay in the window keep their output\n this.updateRowsOnly();\n }\n });\n };\n\n /**\n * Remember how high the rendered rows really are.\n *\n * Rows are not all `ROW_HEIGHT` high (an alias is higher, the focused row of the narrow view\n * has no fixed height at all), and a row outside the window cannot be measured - so every row\n * that was rendered once keeps its measured height for the calculation of the window.\n */\n private measureRenderedRows(): void {\n const container = this.tableRef.current;\n if (!container) {\n return;\n }\n const heights: Record<string, number> = {};\n for (const child of Array.from(container.children) as HTMLElement[]) {\n // the details panel of the narrow view follows its row and belongs to its height\n const detailsOf = child.dataset.detailsOf;\n if (detailsOf) {\n if (heights[detailsOf]) {\n heights[detailsOf] += child.offsetHeight;\n }\n continue;\n }\n // with drag and drop enabled the row sits inside a wrapper\n const row = (child.id ? child : child.firstElementChild) as HTMLElement | null;\n if (row?.id && row.offsetHeight) {\n heights[row.id] = row.offsetHeight;\n }\n }\n let changed = false;\n for (const id of Object.keys(heights)) {\n if (Math.abs((this.measuredHeights[id] || ROW_HEIGHT) - heights[id]) > 0.5) {\n this.measuredHeights[id] = heights[id];\n changed = true;\n }\n }\n if (changed) {\n // the rows kept their content, only the calculated positions move\n this.rowOffsetsInvalid = true;\n this.updateRowsOnly();\n }\n }\n\n /**\n * All column widths as CSS variables of the table container. The header and every row read the\n * widths from here (see `colWidth`), so they can never get out of sync, and the resizer can\n * change a width by writing one variable instead of re-rendering all rows.\n */\n getColumnWidthVariables(): React.CSSProperties {\n const variables: Record<string, string> = {};\n Object.keys(this.columnsVisibility).forEach(name => {\n const width = (this.columnsVisibility as Record<string, number | string | undefined>)[name];\n if (typeof width === 'string') {\n // `calc(100% - 500px)`: this column takes the remaining place. A percentage cannot be\n // used here, because the width of the row depends on the columns and would be\n // circular - the column grows instead and keeps its minimal width if the place is\n // not sufficient (then the table scrolls horizontally).\n // `100%` (mobile view) must not reserve any place, `calc(100% - 500px)` keeps a minimum\n variables[colVar(name)] = width === '100%' ? '0px' : `${MIN_COLUMN_WIDTHS[name] || 100}px`;\n variables[growVar(name)] = '1';\n } else {\n variables[colVar(name)] = `${width || 0}px`;\n variables[growVar(name)] = '0';\n }\n });\n return variables;\n }\n\n /** Set the width of one column without re-rendering the rows */\n setColumnWidth(name: string, width: number): void {\n (this.columnsVisibility as Record<string, number | string>)[name] = width;\n this.tableRef.current?.style.setProperty(colVar(name), `${width}px`);\n }\n\n resizerMouseMove = (e: MouseEvent): void => {\n if (this.resizerActiveDiv) {\n let width: number;\n let widthNext: number;\n if (this.resizeLeft) {\n width = this.resizerOldWidth - e.clientX + this.resizerPosition;\n widthNext = this.resizerOldWidthNext + e.clientX - this.resizerPosition;\n } else {\n width = this.resizerOldWidth + e.clientX - this.resizerPosition;\n widthNext = this.resizerOldWidthNext - e.clientX + this.resizerPosition;\n }\n\n if (\n this.resizerActiveName &&\n this.resizerNextName &&\n (!this.resizerMin || width > this.resizerMin) &&\n (!this.resizerNextMin || widthNext > this.resizerNextMin)\n ) {\n this.resizerCurrentWidths[this.resizerActiveName] = width;\n this.resizerCurrentWidths[this.resizerNextName] = widthNext;\n\n // Only two CSS variables are written - the header and all rows follow immediately,\n // without a re-render of the table\n this.setColumnWidth(this.resizerActiveName, width);\n this.setColumnWidth(this.resizerNextName, widthNext);\n\n this.customWidth = true;\n }\n }\n };\n\n resizerMouseUp = (): void => {\n // Remember the new widths for the other width classes as well: the drag only changed two CSS\n // variables, the width class of the container may change at any time afterwards.\n this.storedColumnWidths = { ...this.resizerCurrentWidths };\n this.applyStoredWidths();\n this.localStorage.setItem(`${this.props.dialogName || 'App'}.table`, JSON.stringify(this.resizerCurrentWidths));\n this.resizerActiveName = null;\n this.resizerNextName = null;\n this.resizerActiveDiv = null;\n this.resizerNextDiv = null;\n window.removeEventListener('mousemove', this.resizerMouseMove);\n window.removeEventListener('mouseup', this.resizerMouseUp);\n };\n\n resizerMouseDown = (e: React.MouseEvent<HTMLDivElement>): void => {\n this.resizerCurrentWidths ||= {};\n this.resizerActiveDiv = (e.target as HTMLDivElement).parentNode as HTMLDivElement;\n this.resizerActiveName = this.resizerActiveDiv.dataset.name || null;\n if (this.resizerActiveName) {\n let i = 0;\n if ((e.target as HTMLDivElement).dataset.left === 'true') {\n this.resizeLeft = true;\n this.resizerNextDiv = this.resizerActiveDiv.previousElementSibling as HTMLDivElement;\n let handle: HTMLDivElement | null = this.resizerNextDiv.querySelector('.iob-ob-resize-handler');\n while (this.resizerNextDiv && !handle && i < 10) {\n this.resizerNextDiv = this.resizerNextDiv.previousElementSibling as HTMLDivElement;\n handle = this.resizerNextDiv.querySelector('.iob-ob-resize-handler');\n i++;\n }\n if (handle?.dataset.left !== 'true') {\n this.resizerNextDiv = this.resizerNextDiv.nextElementSibling as HTMLDivElement;\n }\n } else {\n this.resizeLeft = false;\n this.resizerNextDiv = this.resizerActiveDiv.nextElementSibling as HTMLDivElement;\n /* while (this.resizerNextDiv && !this.resizerNextDiv.querySelector('.iob-ob-resize-handler') && i < 10) {\n this.resizerNextDiv = this.resizerNextDiv.nextElementSibling;\n i++;\n } */\n }\n if (!this.resizerNextDiv) {\n // The column is the last one of the row, there is no neighbour to take the place from\n this.resizerActiveDiv = null;\n this.resizerActiveName = null;\n return;\n }\n this.resizerNextName = this.resizerNextDiv.dataset.name || null;\n\n this.resizerMin = parseInt(this.resizerActiveDiv.dataset.min as string, 10) || 0;\n this.resizerNextMin = parseInt(this.resizerNextDiv.dataset.min as string, 10) || 0;\n\n this.resizerPosition = e.clientX;\n\n this.resizerCurrentWidths[this.resizerActiveName] = this.resizerActiveDiv.offsetWidth;\n this.resizerOldWidth = this.resizerCurrentWidths[this.resizerActiveName];\n\n if (this.resizerNextName) {\n this.resizerCurrentWidths[this.resizerNextName] = this.resizerNextDiv.offsetWidth;\n this.resizerOldWidthNext = this.resizerCurrentWidths[this.resizerNextName];\n }\n\n window.addEventListener('mousemove', this.resizerMouseMove);\n window.addEventListener('mouseup', this.resizerMouseUp);\n }\n };\n\n /**\n * Handle keyboard events for navigation\n */\n navigateKeyPress(event: React.KeyboardEvent): void {\n const selectedId = this.state.selectedNonObject || this.state.selected[0];\n\n if (!selectedId) {\n return;\n }\n\n if (event.code === 'ArrowUp' || event.code === 'ArrowDown') {\n event.preventDefault();\n // every row of the table, not only the rendered ones (see `getWindow`)\n const ids: string[] = this.flatRows.map(row => row.item.data.id).filter(id => !!id);\n const idx = ids.indexOf(selectedId);\n const newIdx = event.code === 'ArrowDown' ? idx + 1 : idx - 1;\n const newId = ids[newIdx] || selectedId;\n this.onSelect(newId);\n this.scrollToItem(newId);\n }\n\n if (event.code === 'ArrowRight' || event.code === 'ArrowLeft') {\n this.toggleExpanded(selectedId);\n }\n\n if (event.code === 'Delete' && this.root && selectedId) {\n const item = ObjectBrowserClass.getItemFromRoot(this.root, selectedId);\n if (item) {\n const { obj } = item.data;\n if (obj && !obj.common?.dontDelete) {\n this.showDeleteDialog({ id: selectedId, obj, item });\n }\n }\n }\n }\n\n /**\n * Find the id from the root\n *\n * @param root The current root\n * @param id The object id to find\n */\n private static getItemFromRoot(root: TreeItem, id: string): TreeItem | null {\n const idArr = id.split('.');\n let currId = '';\n let _root: TreeItem | null | undefined = root;\n\n for (let i = 0; i < idArr.length; i++) {\n const idEntry = idArr[i];\n currId = currId ? `${currId}.${idEntry}` : idEntry;\n let found = false;\n if (_root.children) {\n for (let j = 0; j < _root.children.length; j++) {\n if (_root.children[j].data.id === currId) {\n _root = _root.children[j];\n found = true;\n break;\n }\n }\n }\n if (!found) {\n return null;\n }\n }\n\n return _root || null;\n }\n\n resizerReset = (): void => {\n this.customWidth = false;\n this.storedColumnWidths = null;\n this.resizerCurrentWidths = {};\n // Back to the defaults of every width class, not only of the one that is active now - the\n // stored widths had been applied to every class the user had the browser open in.\n Object.keys(SCREEN_WIDTHS).forEach(width => {\n this.screenWidths[width as Width] = JSON.parse(\n JSON.stringify(SCREEN_WIDTHS[width as Width]),\n ) as ScreenWidthOne;\n });\n this.calculateColumnsVisibility();\n this.localStorage.removeItem(`${this.props.dialogName || 'App'}.table`);\n this.forceUpdate();\n };\n\n /**\n * Render the right handle for resizing\n */\n renderHandleRight(): JSX.Element {\n return toolbar.renderHandleRight(this);\n }\n\n // --- Routing (navigateTo / onNavigateTo) ---\n // The browser never reads the URL itself; the parent drives it via `navigateTo` and is informed\n // of user navigation via `onNavigateTo`. All URL parsing/writing lives in the parent component.\n\n /** Derive the current navigation target from the dialog/selection state. */\n private getStateNav(): ObjectBrowserNavigation | null {\n if (this.state.editObjectDialog) {\n return { mode: 'edit', id: this.state.editObjectDialog };\n }\n if (this.state.customDialog && this.state.customDialog.length === 1 && !this.state.customDialogAll) {\n return { mode: 'settings', id: this.state.customDialog[0] };\n }\n if (this.state.viewFileDialog) {\n return { mode: 'viewFile', id: this.state.viewFileDialog };\n }\n if (this.state.selected.length === 1 && this.state.selected[0]) {\n return { mode: 'select', id: this.state.selected[0] };\n }\n return null;\n }\n\n private static navEqual(a: ObjectBrowserNavigation | null, b: ObjectBrowserNavigation | null): boolean {\n if (!a || !b) {\n return !a && !b;\n }\n return a.mode === b.mode && a.id === b.id;\n }\n\n /** Apply a navigation target coming from the parent (`navigateTo`): select + open the dialog. */\n private applyNavigateTo(nav: ObjectBrowserNavigation | null): void {\n if (!this.objects) {\n // The tree is still being read. `applyInitialNavigateTo` runs once it is there and takes\n // the target from the props again, so nothing is lost by waiting here.\n return;\n }\n this.applyingNav = true;\n const done = (): void => {\n this.applyingNav = false;\n };\n if (!nav?.id) {\n // No target: just close any open dialog (keep the current selection).\n this.setState({ editObjectDialog: '', customDialog: null, viewFileDialog: '' }, done);\n return;\n }\n const { id } = nav;\n const open = (): void => {\n if (nav.mode === 'edit') {\n this.setState(\n { editObjectDialog: id, editObjectAlias: false, customDialog: null, viewFileDialog: '' },\n done,\n );\n } else if (nav.mode === 'settings') {\n this.setState(\n { customDialog: [id], customDialogAll: false, editObjectDialog: '', viewFileDialog: '' },\n done,\n );\n } else if (nav.mode === 'viewFile') {\n this.setState({ viewFileDialog: id, editObjectDialog: '', customDialog: null }, done);\n } else {\n this.setState({ editObjectDialog: '', customDialog: null, viewFileDialog: '' }, done);\n }\n };\n // Select the target (if needed), expand to it and scroll into view, then open the dialog.\n if (this.state.selected.length === 1 && this.state.selected[0] === id) {\n open();\n } else {\n this.onSelect(id, false, () =>\n this.expandAllSelected(() => {\n this.scrollToItem(id);\n open();\n }),\n );\n }\n }\n\n /** Apply the initial `navigateTo` after the tree has loaded (called from componentDidMount). */\n private applyInitialNavigateTo(): void {\n const nav = this.props.navigateTo ?? null;\n if (nav?.id) {\n this.lastNav = nav;\n this.applyNavigateTo(nav);\n } else {\n // Don't push the restored-from-localStorage selection into the URL on load.\n this.lastNav = this.getStateNav();\n }\n }\n\n /** Reconcile `navigateTo` (parent/URL) with the browser's selection/dialog state. */\n private reconcileNavigation(prevProps: ObjectBrowserProps): void {\n if (this.props.navigateTo === undefined && !this.props.onNavigateTo) {\n return; // routing not used by this consumer\n }\n if (this.applyingNav) {\n return; // currently applying a target; ignore the intermediate state\n }\n const propNav = this.props.navigateTo ?? null;\n const stateNav = this.getStateNav();\n if (ObjectBrowserClass.navEqual(propNav, stateNav)) {\n this.lastNav = stateNav;\n return;\n }\n if (!ObjectBrowserClass.navEqual(propNav, prevProps.navigateTo ?? null)) {\n // The parent (URL) drove a change → apply it to the browser.\n this.lastNav = propNav;\n this.applyNavigateTo(propNav);\n } else if (!ObjectBrowserClass.navEqual(stateNav, this.lastNav)) {\n // The user changed selection/dialog → report it so the parent can update the URL.\n this.lastNav = stateNav;\n this.props.onNavigateTo?.(stateNav);\n }\n }\n\n /**\n * Called when component is updated.\n */\n componentDidUpdate(prevProps: ObjectBrowserProps): void {\n // the table is rendered only after the objects are loaded\n this.observeContainerWidth();\n this.measureRenderedRows();\n\n if (this.tableRef.current && this.selectFirst) {\n this.scrollToItem(this.selectFirst);\n }\n this.reconcileNavigation(prevProps);\n }\n\n /**\n * Scrolls to a row.\n *\n * The row does not have to be rendered: only the rows around the visible area are (see\n * `getWindow`), so the position is taken from the flat list of all rows and the row is brought\n * into the middle of the table by scrolling there.\n */\n scrollToItem(id: string): void {\n this.selectFirst = '';\n\n const node = window.document.getElementById(id);\n if (node) {\n node.scrollIntoView({\n behavior: 'auto',\n block: 'center',\n inline: 'center',\n });\n return;\n }\n\n const container = this.tableRef.current;\n const index = this.flatRows.findIndex(row => row.item.data.id === id);\n if (!container || index === -1) {\n return;\n }\n const middle = this.rowOffsets[index] - Math.max(0, (this.viewportHeight - ROW_HEIGHT) / 2);\n container.scrollTop = Math.max(0, middle);\n // the scroll event moves the window, and the row is rendered with the next frame\n }\n\n onUpdate(valAck: {\n val: ioBroker.StateValue;\n ack: boolean;\n q: ioBroker.STATE_QUALITY[keyof ioBroker.STATE_QUALITY];\n expire: number | undefined;\n }): void {\n this.props.socket\n .setState(this.edit.id, {\n val: valAck.val,\n ack: valAck.ack,\n q: valAck.q || 0,\n expire: valAck.expire || undefined,\n })\n .catch(e => this.showError(`Cannot write value: ${e}`));\n }\n\n showAddDataPointDialog(id: string, initialType: ioBroker.ObjectType, initialStateType?: ioBroker.CommonType): void {\n this.setState({\n showContextMenu: null,\n modalNewObj: {\n id,\n initialType,\n initialStateType,\n },\n });\n }\n\n /** Renders the aliases list for one state (if more than 2) */\n\n doFilter(doNotStore?: boolean): void {\n if (!this.objects || !this.root) {\n return;\n }\n\n if (!doNotStore) {\n this.localStorage.setItem(\n `${this.props.dialogName || 'App'}.objectFilter`,\n JSON.stringify(this.state.filter),\n );\n }\n\n const counter = { count: 0 };\n\n applyFilter(\n this.root,\n this.state.filter,\n this.props.lang,\n this.objects,\n undefined,\n counter,\n this.props.customFilter,\n this.props.types,\n );\n\n if (counter.count < 500 && !this.state.expandAllVisible) {\n setTimeout(() => this.setState({ expandAllVisible: true }));\n } else if (counter.count >= 500 && this.state.expandAllVisible) {\n setTimeout(() => this.setState({ expandAllVisible: false }));\n } else {\n this.forceUpdate();\n }\n }\n\n /**\n * Renders the browser and every row again: whoever calls it has changed something that is not\n * visible in `state` or `props`, so the rows cannot keep their output\n */\n override forceUpdate(callback?: () => void): void {\n this.rowsInvalid = true;\n super.forceUpdate(callback);\n }\n\n /**\n * Renders the browser, but keeps the output of every row that did not change: a state changed\n * (see `rowStateVersion`), the table was scrolled or a row measured another height\n */\n private updateRowsOnly(): void {\n super.forceUpdate();\n }\n\n /**\n * The rendering method of this component.\n */\n render(): JSX.Element {\n // Every row is built again, if anything changed that concerns all of them: `state`, `props`\n // or whatever a `forceUpdate()` stands for. Otherwise the render only moved the window or\n // showed new values, and the rows keep their output (see `renderRow`)\n const fullRender =\n this.rowsInvalid || this.state !== this.lastRenderedState || this.props !== this.lastRenderedProps;\n this.rowsInvalid = false;\n this.lastRenderedState = this.state;\n this.lastRenderedProps = this.props;\n if (fullRender) {\n this.renderEpoch++;\n }\n if (this.unsubscribeTimer) {\n clearTimeout(this.unsubscribeTimer);\n }\n\n if (this.styleTheme !== this.props.themeType) {\n this.styles = {\n cellIdIconFolder: Utils.getStyle(this.props.theme, styles.cellIdIconFolder),\n cellIdIconDocument: Utils.getStyle(this.props.theme, styles.cellIdIconDocument),\n iconDeviceError: Utils.getStyle(this.props.theme, styles.iconDeviceError),\n iconDeviceConnected: Utils.getStyle(this.props.theme, styles.iconDeviceConnected),\n iconDeviceDisconnected: Utils.getStyle(this.props.theme, styles.iconDeviceDisconnected),\n cellButtonsButtonWithCustoms: Utils.getStyle(this.props.theme, styles.cellButtonsButtonWithCustoms),\n invertedBackground: Utils.getStyle(this.props.theme, styles.invertedBackground),\n invertedBackgroundFlex: Utils.getStyle(this.props.theme, styles.invertedBackgroundFlex),\n contextMenuEdit: Utils.getStyle(this.props.theme, styles.contextMenuEdit),\n contextMenuEditValue: Utils.getStyle(this.props.theme, styles.contextMenuEditValue),\n contextMenuView: Utils.getStyle(this.props.theme, styles.contextMenuView),\n contextMenuCustom: Utils.getStyle(this.props.theme, styles.contextMenuCustom),\n contextMenuACL: Utils.getStyle(this.props.theme, styles.contextMenuACL),\n contextMenuRoom: Utils.getStyle(this.props.theme, styles.contextMenuRoom),\n contextMenuRole: Utils.getStyle(this.props.theme, styles.contextMenuRole),\n contextMenuDelete: Utils.getStyle(this.props.theme, styles.contextMenuDelete),\n filterInput: Utils.getStyle(this.props.theme, styles.headerCellInput, styles.filterInput),\n iconCopy: Utils.getStyle(\n this.props.theme,\n styles.cellButtonsValueButton,\n styles.cellButtonsValueButtonCopy,\n ),\n aliasReadWrite: Utils.getStyle(this.props.theme, styles.cellIdAlias, styles.cellIdAliasReadWrite),\n aliasAlone: Utils.getStyle(this.props.theme, styles.cellIdAlias, styles.cellIdAliasAlone),\n };\n this.styleTheme = this.props.themeType;\n }\n\n this.unsubscribeTimer = setTimeout(() => {\n this.unsubscribeTimer = null;\n this.checkUnsubscribes();\n }, 200);\n\n if (this.expertMode !== !!this.state.filter.expertMode) {\n this.expertMode = !!this.state.filter.expertMode;\n this.doFilter(true);\n }\n\n if (!this.state.loaded) {\n return <LinearProgress key={`${this.props.dialogName}_c`} />;\n }\n\n // the container was resized into another width class => other columns are visible, and the\n // stored widths have to be written into the defaults of the new class.\n // The states view shows other columns too, so it has to be recalculated as well.\n if (this.lastCalculatedWidth !== this.width || this.lastCalculatedStatesView !== this.state.statesView) {\n this.lastCalculatedWidth = this.width;\n this.lastCalculatedStatesView = this.state.statesView;\n this.applyStoredWidths();\n this.calculateColumnsVisibility();\n }\n\n // Only the rows around the visible area are rendered - see `getWindow`. The rows that are\n // not rendered are replaced by two spacers, so the scrollbar keeps the size of the table\n if (fullRender || !this.flatRows.length) {\n // a state change cannot add or remove a row, and scrolling does not either\n this.buildFlatRows();\n } else if (this.rowOffsetsInvalid) {\n this.calculateRowOffsets();\n }\n const { first, last } = this.getWindow();\n this.windowFirst = first;\n this.windowLast = last;\n const items: JSX.Element[] = [];\n for (let i = first; i < last; i++) {\n items.push(leaf.renderRow(this, this.flatRows[i].item, this.flatRows[i].isExpanded));\n }\n const spaceAbove = this.rowOffsets[first];\n const spaceBelow = this.rowOffsets[this.flatRows.length] - this.rowOffsets[last];\n\n return (\n <TabContainer\n key={this.props.dialogName}\n styles={{ root: this.props.style }}\n >\n <style>\n {`\n@keyframes newValueAnimation-light {\n 0% {\n color: #00f900;\n }\n 80% {\n color: #008000;\n }\n 100% {\n color: #000;\n }\n}\n@keyframes newValueAnimation-dark {\n 0% {\n color: #00f900;\n }\n 80% {\n color: #008000;\n }\n 100% {\n color: #fff;\n }\n}\n.newValueBrowser-dark {\n animation: newValueAnimation-dark 2s ease-in-out;\n}\n.newValueBrowser-light {\n animation: newValueAnimation-light 2s ease-in-out;\n}\n.highlight-link .iob-link {\n text-decoration: underline;\n cursor: pointer;\n}\n`}\n </style>\n <TabHeader>{this.getToolbar()}</TabHeader>\n <TabContent>\n {/* The header is a part of the scrolling container and sticks to its top, so it is\n always aligned with the rows and does not need to be synchronized with them. */}\n <Box\n style={{ ...styles.tableDiv, ...this.getColumnWidthVariables() }}\n ref={this.tableRef}\n onKeyDown={event => this.navigateKeyPress(event)}\n onScroll={this.onTableScroll}\n >\n {toolbar.renderHeader(this)}\n {spaceAbove ? <div style={{ height: spaceAbove }} /> : null}\n {items}\n {spaceBelow ? <div style={{ height: spaceBelow }} /> : null}\n </Box>\n </TabContent>\n {contextMenu.renderContextMenu(this)}\n {dialogs.renderAliasMenu(this)}\n {dialogs.renderToast(this)}\n {dialogs.renderColumnsEditCustomDialog(this)}\n {this.renderColumnsSelectorDialog()}\n {dialogs.renderCustomDialog(this)}\n {dialogs.renderEditValueDialog(this)}\n {dialogs.renderEditObjectDialog(this)}\n {dialogs.renderViewObjectFileDialog(this)}\n {dialogs.renderAliasEditorDialog(this)}\n {dialogs.renderEditRoleDialog(this)}\n {dialogs.renderEnumDialog(this)}\n {this.renderErrorDialog()}\n {this.renderExportDialog()}\n {this.renderRenameDialog()}\n {this.renderInputJsonDialog()}\n {this.state.modalNewObj && this.props.modalNewObject && this.props.modalNewObject(this)}\n {this.state.modalEditOfAccess &&\n this.state.modalEditOfAccessObjData &&\n this.props.modalEditOfAccessControl &&\n this.props.modalEditOfAccessControl(this, this.state.modalEditOfAccessObjData)}\n </TabContainer>\n );\n }\n}\n\n// The width class is measured from the container (see `ObjectBrowserClass.width`), so this component\n// does not need the `withWidth` HOC (which measures the window) anymore.\nexport const ObjectBrowser = ObjectBrowserClass;\n"]}
|