@iobroker/adapter-react-v5 7.2.6 → 7.3.1
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 +3 -11
- package/build/Components/404.js +1 -1
- package/build/Components/404.js.map +1 -1
- package/build/Components/FileBrowser.d.ts +3 -1
- package/build/Components/FileBrowser.js +2 -1
- package/build/Components/FileBrowser.js.map +1 -1
- package/build/Components/FileViewer.d.ts +7 -6
- package/build/Components/FileViewer.js +16 -46
- package/build/Components/FileViewer.js.map +1 -1
- package/build/Components/Icon.js +1 -1
- package/build/Components/Icon.js.map +1 -1
- package/build/Components/Image.js +1 -1
- package/build/Components/Image.js.map +1 -1
- package/build/Components/ObjectBrowser.js +9 -8
- package/build/Components/ObjectBrowser.js.map +1 -1
- package/build/Components/SaveCloseButtons.js +1 -1
- package/build/Components/SaveCloseButtons.js.map +1 -1
- package/build/Components/ToggleThemeMenu.js +1 -1
- package/build/Components/ToggleThemeMenu.js.map +1 -1
- package/build/Components/UploadImage.js +1 -2
- package/build/Components/UploadImage.js.map +1 -1
- package/build/Components/withWidth.js +1 -1
- package/build/Components/withWidth.js.map +1 -1
- package/build/Dialogs/ComplexCron.js +1 -1
- package/build/Dialogs/ComplexCron.js.map +1 -1
- package/build/Dialogs/Cron.js +1 -1
- package/build/Dialogs/Cron.js.map +1 -1
- package/build/Dialogs/SelectFile.js +1 -1
- package/build/Dialogs/SelectFile.js.map +1 -1
- package/build/Dialogs/SimpleCron.js +1 -1
- package/build/Dialogs/SimpleCron.js.map +1 -1
- package/build/Dialogs/TextInput.js +1 -1
- package/build/Dialogs/TextInput.js.map +1 -1
- package/build/GenericApp.js +1 -1
- package/build/GenericApp.js.map +1 -1
- package/build/Theme.js +0 -1
- package/build/Theme.js.map +1 -1
- package/build/icons/IconAdapter.js +0 -1
- package/build/icons/IconAdapter.js.map +1 -1
- package/build/icons/IconAlias.js +0 -1
- package/build/icons/IconAlias.js.map +1 -1
- package/build/icons/IconChannel.js +0 -1
- package/build/icons/IconChannel.js.map +1 -1
- package/build/icons/IconClearFilter.js +0 -1
- package/build/icons/IconClearFilter.js.map +1 -1
- package/build/icons/IconClosed.js +0 -1
- package/build/icons/IconClosed.js.map +1 -1
- package/build/icons/IconCopy.js +0 -1
- package/build/icons/IconCopy.js.map +1 -1
- package/build/icons/IconDevice.js +0 -1
- package/build/icons/IconDevice.js.map +1 -1
- package/build/icons/IconDocument.js +0 -1
- package/build/icons/IconDocument.js.map +1 -1
- package/build/icons/IconDocumentReadOnly.js +0 -1
- package/build/icons/IconDocumentReadOnly.js.map +1 -1
- package/build/icons/IconExpert.js +0 -1
- package/build/icons/IconExpert.js.map +1 -1
- package/build/icons/IconFx.js +0 -1
- package/build/icons/IconFx.js.map +1 -1
- package/build/icons/IconInstance.js +0 -1
- package/build/icons/IconInstance.js.map +1 -1
- package/build/icons/IconLogout.js +0 -1
- package/build/icons/IconLogout.js.map +1 -1
- package/build/icons/IconNoIcon.js +0 -1
- package/build/icons/IconNoIcon.js.map +1 -1
- package/build/icons/IconOpen.js +1 -2
- package/build/icons/IconOpen.js.map +1 -1
- package/build/icons/IconState.js +1 -2
- package/build/icons/IconState.js.map +1 -1
- package/build/index.d.ts +10 -1
- package/build/index.js +10 -2
- package/build/index.js.map +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ If you want to create the configuration page with ReactJS:
|
|
|
13
13
|
- Change `name` from `src` to `ADAPTERNAME-admin` (Of course replace `ADAPTERNAME` with yours)
|
|
14
14
|
- Add to devDependencies:
|
|
15
15
|
```json
|
|
16
|
-
"@iobroker/adapter-react-v5": "^7.
|
|
16
|
+
"@iobroker/adapter-react-v5": "^7.3.1",
|
|
17
17
|
```
|
|
18
18
|
Versions can be higher.
|
|
19
19
|
So your `src/package.json` should look like:
|
|
@@ -24,18 +24,10 @@ If you want to create the configuration page with ReactJS:
|
|
|
24
24
|
"version": "0.1.0",
|
|
25
25
|
"private": true,
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@iobroker/adapter-react-v5": "^7.
|
|
27
|
+
"@iobroker/adapter-react-v5": "^7.3.1",
|
|
28
28
|
"@iobroker/build-tools": "^1.0.0",
|
|
29
|
-
"@iobroker/eslint-config": "^0.1.2",
|
|
30
|
-
"@mui/material": "^6.0.2",
|
|
31
|
-
"@mui/icons-material": "^6.0.2",
|
|
32
|
-
"@sentry/browser": "^8.28.0",
|
|
33
29
|
"babel-eslint": "^10.1.0",
|
|
34
|
-
"
|
|
35
|
-
"react": "^18.3.1",
|
|
36
|
-
"react-dom": "^18.3.1",
|
|
37
|
-
"react-scripts": "^5.0.1",
|
|
38
|
-
"react-icons": "^5.3.0"
|
|
30
|
+
"react-scripts": "^5.0.1"
|
|
39
31
|
},
|
|
40
32
|
"scripts": {
|
|
41
33
|
"start": "react-scripts start",
|
package/build/Components/404.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"404.js","sourceRoot":"./src/","sources":["Components/404.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"404.js","sourceRoot":"./src/","sources":["Components/404.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC;;;EAGE;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,GAAwB;IAChC,OAAO,EAAE;QACL,UAAU,EAAE,OAAO;QACnB,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;KACX;IACD,IAAI,EAAE;QACF,SAAS,EAAE,YAAY;QACvB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,eAAe,EAAE,SAAS;QAC1B,eAAe,EAAE,oCAAoC;QACrD,UAAU,EAAE,sCAAsC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vB;wBACK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;wBACnB,8BAAM,KAAK,EAAE,MAAM,CAAC,SAAS,UAAY,CACxC;oBACL,oBAAC,GAAG,IACA,SAAS,EAAC,GAAG,EACb,EAAE,EAAE,MAAM,CAAC,MAAM,IAEhB,IAAI,CAAC,CAAC,CAAC,+CAA+C,CAAC,CACtD;oBACN,oBAAC,GAAG,IACA,SAAS,EAAC,GAAG,EACb,EAAE,EAAE,MAAM,CAAC,MAAM,IAEhB,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,CACrB,CACJ,CACJ,CACJ,CACJ,CACT,CAAC;AACN,CAAC;AAED,eAAe,OAAO,CAAC","sourcesContent":["import React, { type JSX } from 'react';\nimport { Box } from '@mui/material';\n\n/*\nCopyright 2019 Robin Selmer\nhttps://codepen.io/robinselmer/pen/vJjbOZ\n*/\n\nimport { I18n } from '../i18n';\n\nconst styles: Record<string, any> = {\n content: {\n background: 'black',\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n },\n root: {\n boxSizing: 'border-box',\n height: '100%',\n width: '100%',\n backgroundColor: '#000000',\n backgroundImage: 'radial-gradient(#104254 , #05181c)',\n fontFamily: \"'Inconsolata', Helvetica, sans-serif\",\n fontSize: '1.5rem',\n color: 'rgba(128, 175, 255, 0.8)',\n textShadow: `0 0 1ex rgba(51, 70, 255, 1),\n 0 0 2px rgba(255, 255, 255, 0.8)`,\n },\n overlay: {\n pointerEvents: 'none',\n width: '100%',\n height: '100%',\n background: `repeating-linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0) 0,\n rgba(0, 0, 0, 0.3) 50%,\n rgba(0, 0, 0, 0) 100%)`,\n backgroundSize: 'auto 4px',\n zIndex: 99,\n '&::before': {\n content: '\"\"',\n pointerEvents: 'none',\n position: 'absolute',\n display: 'block',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: '100%',\n height: '100%',\n backgroundImage: `linear-gradient(\n 0deg,\n transparent 0%,\n rgba(32, 50, 128, 0.2) 2%,\n rgba(32, 50, 128, 0.8) 3%,\n rgba(32, 50, 128, 0.2) 3%,\n transparent 100%)`,\n backgroundRepeat: 'no-repeat',\n animation: 'scan 7.5s linear 0s infinite',\n },\n },\n\n terminal: {\n boxSizing: 'inherit',\n position: 'absolute',\n height: '100%',\n width: 'calc(100% - 8rem)',\n maxWidth: '100%',\n padding: '4rem',\n textTransform: 'uppercase',\n },\n output: {\n color: 'rgba(128, 175, 255, 0.8)',\n textShadow: `\n 0 0 1px rgba(51, 70, 255, 0.4),\n 0 0 2px rgba(255, 255, 255, 0.8)`,\n '&::before': {\n content: '\"> \"',\n },\n },\n errorCode: {\n color: 'white',\n },\n};\n\n/** Generates the 404 error page */\nfunction Page404(): JSX.Element {\n return (\n <div style={styles.content}>\n <div style={styles.root}>\n <Box\n component=\"div\"\n sx={styles.overlay}\n >\n <div style={styles.terminal}>\n <h1>\n {I18n.t('ra_Error')}\n <span style={styles.errorCode}>404</span>\n </h1>\n <Box\n component=\"p\"\n sx={styles.output}\n >\n {I18n.t('ra_The page you are looking for was not found')}\n </Box>\n <Box\n component=\"p\"\n sx={styles.output}\n >\n {I18n.t('ra_Good luck')}\n </Box>\n </div>\n </Box>\n </div>\n </div>\n );\n}\n\nexport default Page404;\n"]}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import React, { Component, type JSX } from 'react';
|
|
8
8
|
import type { Connection } from '@iobroker/socket-client';
|
|
9
9
|
import type { ThemeName, ThemeType, Translate, IobTheme } from '../types';
|
|
10
|
+
import { type FileViewerProps } from './FileViewer';
|
|
10
11
|
export interface MetaACL extends ioBroker.ObjectACL {
|
|
11
12
|
file: number;
|
|
12
13
|
}
|
|
@@ -26,7 +27,7 @@ export interface FileBrowserProps {
|
|
|
26
27
|
lang: ioBroker.Languages;
|
|
27
28
|
/** The socket connection. */
|
|
28
29
|
socket: Connection;
|
|
29
|
-
/**
|
|
30
|
+
/** Shows if the component data ready. */
|
|
30
31
|
ready?: boolean;
|
|
31
32
|
/** Is expert mode enabled? (default: false) */
|
|
32
33
|
expertMode?: boolean;
|
|
@@ -72,6 +73,7 @@ export interface FileBrowserProps {
|
|
|
72
73
|
modalEditOfAccessControl?: (obj: FileBrowserClass) => JSX.Element | null;
|
|
73
74
|
allowNonRestricted?: boolean;
|
|
74
75
|
showTypeSelector?: boolean;
|
|
76
|
+
FileViewer?: React.FC<FileViewerProps>;
|
|
75
77
|
}
|
|
76
78
|
export interface FolderOrFileItem {
|
|
77
79
|
id: string;
|
|
@@ -1534,7 +1534,8 @@ export class FileBrowserClass extends Component {
|
|
|
1534
1534
|
return null;
|
|
1535
1535
|
}
|
|
1536
1536
|
renderViewDialog() {
|
|
1537
|
-
|
|
1537
|
+
const FileViewerComponent = this.props.FileViewer || FileViewer;
|
|
1538
|
+
return this.state.viewer ? (React.createElement(FileViewerComponent, { supportSubscribes: this.supportSubscribes, key: this.state.viewer, href: this.state.viewer, formatEditFile: this.state.formatEditFile, themeType: this.props.themeType, setStateBackgroundImage: this.setStateBackgroundImage, getStyleBackgroundImage: this.getStyleBackgroundImage, t: this.props.t, socket: this.props.socket, onClose: () => this.setState({ viewer: '', formatEditFile: '' }) })) : null;
|
|
1538
1539
|
}
|
|
1539
1540
|
renderError() {
|
|
1540
1541
|
if (this.state.errorText) {
|