@iobroker/adapter-react-v5 7.2.4 → 7.2.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 +6 -6
- package/build/AdminConnection.d.ts +1 -0
- package/build/AdminConnection.js +2 -0
- package/build/AdminConnection.js.map +1 -0
- package/{src/Components/404.tsx → build/Components/404.js} +14 -39
- package/build/Components/404.js.map +1 -0
- package/{Components → build/Components}/ColorPicker.d.ts +2 -2
- package/{Components → build/Components}/ColorPicker.js +50 -65
- package/build/Components/ColorPicker.js.map +1 -0
- package/{Components → build/Components}/ComplexCron.d.ts +2 -2
- package/{Components → build/Components}/ComplexCron.js +43 -71
- package/build/Components/ComplexCron.js.map +1 -0
- package/{Components → build/Components}/CopyToClipboard.d.ts +1 -2
- package/{src/Components/CopyToClipboard.tsx → build/Components/CopyToClipboard.js} +20 -38
- package/build/Components/CopyToClipboard.js.map +1 -0
- package/{Components → build/Components}/CustomModal.d.ts +3 -3
- package/build/Components/CustomModal.js +60 -0
- package/build/Components/CustomModal.js.map +1 -0
- package/{Components → build/Components}/FileBrowser.d.ts +2 -2
- package/{Components → build/Components}/FileBrowser.js +229 -236
- package/build/Components/FileBrowser.js.map +1 -0
- package/build/Components/FileViewer.d.ts +48 -0
- package/build/Components/FileViewer.js +277 -0
- package/build/Components/FileViewer.js.map +1 -0
- package/{Components → build/Components}/Icon.d.ts +1 -1
- package/build/Components/Icon.js +140 -0
- package/build/Components/Icon.js.map +1 -0
- package/{Components → build/Components}/IconPicker.d.ts +2 -2
- package/build/Components/IconPicker.js +73 -0
- package/build/Components/IconPicker.js.map +1 -0
- package/{Components → build/Components}/IconSelector.d.ts +3 -3
- package/{Components → build/Components}/IconSelector.js +29 -57
- package/build/Components/IconSelector.js.map +1 -0
- package/{Components → build/Components}/Image.d.ts +2 -2
- package/{Components → build/Components}/Image.js +16 -22
- package/build/Components/Image.js.map +1 -0
- package/{Components → build/Components}/Loader.d.ts +2 -2
- package/{Components → build/Components}/Loader.js +15 -40
- package/build/Components/Loader.js.map +1 -0
- package/{Components → build/Components}/Loaders/MV.d.ts +2 -2
- package/build/Components/Loaders/MV.js +61 -0
- package/build/Components/Loaders/MV.js.map +1 -0
- package/{Components → build/Components}/Loaders/PT.d.ts +2 -2
- package/{Components → build/Components}/Loaders/PT.js +10 -35
- package/build/Components/Loaders/PT.js.map +1 -0
- package/{Components → build/Components}/Loaders/Vendor.d.ts +2 -2
- package/build/Components/Loaders/Vendor.js +52 -0
- package/build/Components/Loaders/Vendor.js.map +1 -0
- package/{Components → build/Components}/Logo.d.ts +2 -2
- package/build/Components/Logo.js +108 -0
- package/build/Components/Logo.js.map +1 -0
- package/{Components → build/Components}/MDUtils.d.ts +1 -2
- package/{Components → build/Components}/MDUtils.js +4 -9
- package/build/Components/MDUtils.js.map +1 -0
- package/{Components → build/Components}/ObjectBrowser.d.ts +4 -4
- package/{Components → build/Components}/ObjectBrowser.js +1152 -1116
- package/build/Components/ObjectBrowser.js.map +1 -0
- package/{Components → build/Components}/Router.d.ts +1 -2
- package/{Components → build/Components}/Router.js +6 -7
- package/build/Components/Router.js.map +1 -0
- package/{Components → build/Components}/SaveCloseButtons.d.ts +2 -2
- package/build/Components/SaveCloseButtons.js +65 -0
- package/build/Components/SaveCloseButtons.js.map +1 -0
- package/{Components → build/Components}/Schedule.d.ts +2 -2
- package/{Components → build/Components}/Schedule.js +242 -257
- package/build/Components/Schedule.js.map +1 -0
- package/{Components → build/Components}/SelectWithIcon.d.ts +2 -2
- package/build/Components/SelectWithIcon.js +135 -0
- package/build/Components/SelectWithIcon.js.map +1 -0
- package/build/Components/SimpleCron/cronText.js +15 -0
- package/build/Components/SimpleCron/cronText.js.map +1 -0
- package/{Components → build/Components}/SimpleCron/index.d.ts +2 -2
- package/{Components → build/Components}/SimpleCron/index.js +55 -58
- package/build/Components/SimpleCron/index.js.map +1 -0
- package/{Components → build/Components}/TabContainer.d.ts +2 -2
- package/build/Components/TabContainer.js +23 -0
- package/build/Components/TabContainer.js.map +1 -0
- package/{Components → build/Components}/TabContent.d.ts +3 -2
- package/build/Components/TabContent.js +20 -0
- package/build/Components/TabContent.js.map +1 -0
- package/build/Components/TabHeader.d.ts +6 -0
- package/build/Components/TabHeader.js +6 -0
- package/build/Components/TabHeader.js.map +1 -0
- package/{Components → build/Components}/TableResize.d.ts +2 -2
- package/{src/Components/TableResize.tsx → build/Components/TableResize.js} +64 -134
- package/build/Components/TableResize.js.map +1 -0
- package/{Components → build/Components}/TextWithIcon.d.ts +2 -2
- package/{src/Components/TextWithIcon.tsx → build/Components/TextWithIcon.js} +30 -75
- package/build/Components/TextWithIcon.js.map +1 -0
- package/{Components → build/Components}/ToggleThemeMenu.d.ts +1 -1
- package/build/Components/ToggleThemeMenu.js +13 -0
- package/build/Components/ToggleThemeMenu.js.map +1 -0
- package/{Components → build/Components}/TreeTable.d.ts +3 -3
- package/{Components → build/Components}/TreeTable.js +87 -99
- package/build/Components/TreeTable.js.map +1 -0
- package/{Components → build/Components}/UploadImage.d.ts +2 -2
- package/{Components → build/Components}/UploadImage.js +46 -69
- package/build/Components/UploadImage.js.map +1 -0
- package/{Components → build/Components}/Utils.d.ts +2 -2
- package/{Components → build/Components}/Utils.js +47 -60
- package/build/Components/Utils.js.map +1 -0
- package/build/Components/withWidth.d.ts +2 -0
- package/build/Components/withWidth.js +22 -0
- package/build/Components/withWidth.js.map +1 -0
- package/build/Connection.d.ts +1 -0
- package/build/Connection.js +2 -0
- package/build/Connection.js.map +1 -0
- package/{Dialogs → build/Dialogs}/ComplexCron.d.ts +2 -2
- package/build/Dialogs/ComplexCron.js +85 -0
- package/build/Dialogs/ComplexCron.js.map +1 -0
- package/{Dialogs → build/Dialogs}/Confirm.d.ts +2 -2
- package/build/Dialogs/Confirm.js +83 -0
- package/build/Dialogs/Confirm.js.map +1 -0
- package/{Dialogs → build/Dialogs}/Cron.d.ts +2 -2
- package/build/Dialogs/Cron.js +72 -0
- package/build/Dialogs/Cron.js.map +1 -0
- package/{Dialogs → build/Dialogs}/Error.d.ts +2 -2
- package/build/Dialogs/Error.js +27 -0
- package/build/Dialogs/Error.js.map +1 -0
- package/{Dialogs → build/Dialogs}/Message.d.ts +2 -2
- package/build/Dialogs/Message.js +29 -0
- package/build/Dialogs/Message.js.map +1 -0
- package/{Dialogs → build/Dialogs}/SelectFile.d.ts +2 -2
- package/build/Dialogs/SelectFile.js +116 -0
- package/build/Dialogs/SelectFile.js.map +1 -0
- package/{Dialogs → build/Dialogs}/SelectID.d.ts +3 -3
- package/{Dialogs → build/Dialogs}/SelectID.js +28 -53
- package/build/Dialogs/SelectID.js.map +1 -0
- package/{Dialogs → build/Dialogs}/SimpleCron.d.ts +2 -2
- package/build/Dialogs/SimpleCron.js +46 -0
- package/build/Dialogs/SimpleCron.js.map +1 -0
- package/build/Dialogs/TextInput.d.ts +2 -0
- package/build/Dialogs/TextInput.js +31 -0
- package/build/Dialogs/TextInput.js.map +1 -0
- package/{GenericApp.d.ts → build/GenericApp.d.ts} +2 -3
- package/{GenericApp.js → build/GenericApp.js} +162 -176
- package/build/GenericApp.js.map +1 -0
- package/{LegacyConnection.d.ts → build/LegacyConnection.d.ts} +69 -4
- package/{LegacyConnection.js → build/LegacyConnection.js} +106 -99
- package/build/LegacyConnection.js.map +1 -0
- package/{Prompt.d.ts → build/Prompt.d.ts} +1 -1
- package/{Prompt.js → build/Prompt.js} +3 -4
- package/build/Prompt.js.map +1 -0
- package/build/Theme.d.ts +5 -0
- package/{Theme.js → build/Theme.js} +37 -32
- package/build/Theme.js.map +1 -0
- package/build/assets/devices/parseNames.d.ts +0 -0
- package/build/assets/devices/parseNames.js +35 -0
- package/build/assets/devices/parseNames.js.map +1 -0
- package/build/assets/rooms/parseNames.d.ts +0 -0
- package/build/assets/rooms/parseNames.js +35 -0
- package/build/assets/rooms/parseNames.js.map +1 -0
- package/build/dictionary.d.ts +1 -0
- package/build/dictionary.js +25 -0
- package/build/dictionary.js.map +1 -0
- package/build/i18n/de.json +449 -0
- package/build/i18n/en.json +449 -0
- package/build/i18n/es.json +449 -0
- package/build/i18n/fr.json +449 -0
- package/build/i18n/it.json +449 -0
- package/build/i18n/nl.json +449 -0
- package/build/i18n/pl.json +449 -0
- package/build/i18n/pt.json +449 -0
- package/build/i18n/ru.json +449 -0
- package/build/i18n/uk.json +449 -0
- package/build/i18n/zh-cn.json +449 -0
- package/{i18n.d.ts → build/i18n.d.ts} +2 -2
- package/{i18n.js → build/i18n.js} +9 -11
- package/build/i18n.js.map +1 -0
- package/build/icons/IconAdapter.d.ts +3 -0
- package/build/icons/IconAdapter.js +6 -0
- package/build/icons/IconAdapter.js.map +1 -0
- package/build/icons/IconAlias.d.ts +3 -0
- package/build/icons/IconAlias.js +6 -0
- package/build/icons/IconAlias.js.map +1 -0
- package/build/icons/IconChannel.d.ts +3 -0
- package/build/icons/IconChannel.js +9 -0
- package/build/icons/IconChannel.js.map +1 -0
- package/build/icons/IconClearFilter.d.ts +3 -0
- package/build/icons/IconClearFilter.js +7 -0
- package/build/icons/IconClearFilter.js.map +1 -0
- package/build/icons/IconClosed.d.ts +3 -0
- package/build/icons/IconClosed.js +6 -0
- package/build/icons/IconClosed.js.map +1 -0
- package/build/icons/IconCopy.d.ts +3 -0
- package/build/icons/IconCopy.js +5 -0
- package/build/icons/IconCopy.js.map +1 -0
- package/build/icons/IconDevice.d.ts +3 -0
- package/build/icons/IconDevice.js +15 -0
- package/build/icons/IconDevice.js.map +1 -0
- package/build/icons/IconDocument.d.ts +3 -0
- package/build/icons/IconDocument.js +6 -0
- package/build/icons/IconDocument.js.map +1 -0
- package/build/icons/IconDocumentReadOnly.d.ts +3 -0
- package/build/icons/IconDocumentReadOnly.js +7 -0
- package/build/icons/IconDocumentReadOnly.js.map +1 -0
- package/build/icons/IconExpert.d.ts +3 -0
- package/build/icons/IconExpert.js +6 -0
- package/build/icons/IconExpert.js.map +1 -0
- package/build/icons/IconFx.d.ts +3 -0
- package/build/icons/IconFx.js +5 -0
- package/build/icons/IconFx.js.map +1 -0
- package/build/icons/IconInstance.d.ts +3 -0
- package/build/icons/IconInstance.js +6 -0
- package/build/icons/IconInstance.js.map +1 -0
- package/build/icons/IconLogout.d.ts +3 -0
- package/build/icons/IconLogout.js +6 -0
- package/build/icons/IconLogout.js.map +1 -0
- package/build/icons/IconNoIcon.d.ts +3 -0
- package/build/icons/IconNoIcon.js +5 -0
- package/build/icons/IconNoIcon.js.map +1 -0
- package/build/icons/IconOpen.d.ts +3 -0
- package/build/icons/IconOpen.js +6 -0
- package/build/icons/IconOpen.js.map +1 -0
- package/{icons → build/icons}/IconProps.d.ts +1 -1
- package/build/icons/IconProps.js +2 -0
- package/build/icons/IconProps.js.map +1 -0
- package/build/icons/IconState.d.ts +3 -0
- package/build/icons/IconState.js +6 -0
- package/build/icons/IconState.js.map +1 -0
- package/build/index.d.ts +67 -0
- package/build/index.js +67 -0
- package/build/index.js.map +1 -0
- package/{types.d.ts → build/types.d.ts} +1 -1
- package/package.json +84 -48
- package/AdminConnection.d.ts +0 -2
- package/AdminConnection.js +0 -4
- package/Components/404.js +0 -101
- package/Components/CopyToClipboard.js +0 -163
- package/Components/CustomModal.js +0 -88
- package/Components/FileViewer.d.ts +0 -10
- package/Components/FileViewer.js +0 -305
- package/Components/Icon.js +0 -148
- package/Components/IconPicker.js +0 -98
- package/Components/Loaders/MV.js +0 -66
- package/Components/Loaders/Vendor.js +0 -77
- package/Components/Logo.js +0 -117
- package/Components/SaveCloseButtons.js +0 -69
- package/Components/SelectWithIcon.js +0 -168
- package/Components/SimpleCron/cronText.js +0 -19
- package/Components/TabContainer.js +0 -25
- package/Components/TabContent.js +0 -21
- package/Components/TabHeader.d.ts +0 -6
- package/Components/TabHeader.js +0 -11
- package/Components/TableResize.js +0 -226
- package/Components/TextWithIcon.js +0 -119
- package/Components/ToggleThemeMenu.js +0 -18
- package/Components/withWidth.d.ts +0 -3
- package/Components/withWidth.js +0 -27
- package/Connection.d.ts +0 -3
- package/Connection.js +0 -8
- package/Dialogs/ComplexCron.js +0 -90
- package/Dialogs/Confirm.js +0 -111
- package/Dialogs/Cron.js +0 -100
- package/Dialogs/Error.js +0 -55
- package/Dialogs/Message.js +0 -57
- package/Dialogs/SelectFile.js +0 -119
- package/Dialogs/SimpleCron.js +0 -51
- package/Dialogs/TextInput.d.ts +0 -3
- package/Dialogs/TextInput.js +0 -35
- package/Theme.d.ts +0 -6
- package/i18n/de.json +0 -449
- package/i18n/en.json +0 -449
- package/i18n/es.json +0 -449
- package/i18n/fr.json +0 -449
- package/i18n/it.json +0 -449
- package/i18n/nl.json +0 -449
- package/i18n/pl.json +0 -449
- package/i18n/pt.json +0 -449
- package/i18n/ru.json +0 -449
- package/i18n/uk.json +0 -449
- package/i18n/zh-cn.json +0 -449
- package/icons/IconAdapter.d.ts +0 -4
- package/icons/IconAdapter.js +0 -10
- package/icons/IconAlias.d.ts +0 -4
- package/icons/IconAlias.js +0 -10
- package/icons/IconChannel.d.ts +0 -4
- package/icons/IconChannel.js +0 -13
- package/icons/IconClearFilter.d.ts +0 -4
- package/icons/IconClearFilter.js +0 -11
- package/icons/IconClosed.d.ts +0 -4
- package/icons/IconClosed.js +0 -10
- package/icons/IconCopy.d.ts +0 -4
- package/icons/IconCopy.js +0 -9
- package/icons/IconDevice.d.ts +0 -4
- package/icons/IconDevice.js +0 -19
- package/icons/IconDocument.d.ts +0 -4
- package/icons/IconDocument.js +0 -10
- package/icons/IconDocumentReadOnly.d.ts +0 -4
- package/icons/IconDocumentReadOnly.js +0 -11
- package/icons/IconExpert.d.ts +0 -4
- package/icons/IconExpert.js +0 -10
- package/icons/IconFx.d.ts +0 -4
- package/icons/IconFx.js +0 -9
- package/icons/IconInstance.d.ts +0 -4
- package/icons/IconInstance.js +0 -10
- package/icons/IconLogout.d.ts +0 -4
- package/icons/IconLogout.js +0 -10
- package/icons/IconNoIcon.d.ts +0 -4
- package/icons/IconNoIcon.js +0 -9
- package/icons/IconOpen.d.ts +0 -4
- package/icons/IconOpen.js +0 -10
- package/icons/IconProps.js +0 -2
- package/icons/IconState.d.ts +0 -4
- package/icons/IconState.js +0 -10
- package/index.d.ts +0 -128
- package/index.js +0 -215
- package/src/AdminConnection.tsx +0 -3
- package/src/Components/ColorPicker.tsx +0 -343
- package/src/Components/ComplexCron.tsx +0 -561
- package/src/Components/CustomModal.tsx +0 -170
- package/src/Components/FileBrowser.tsx +0 -2560
- package/src/Components/FileViewer.tsx +0 -412
- package/src/Components/Icon.tsx +0 -238
- package/src/Components/IconPicker.tsx +0 -165
- package/src/Components/IconSelector.tsx +0 -2220
- package/src/Components/Image.tsx +0 -193
- package/src/Components/Loader.tsx +0 -328
- package/src/Components/Logo.tsx +0 -176
- package/src/Components/MDUtils.tsx +0 -104
- package/src/Components/ObjectBrowser.tsx +0 -8947
- package/src/Components/Router.tsx +0 -90
- package/src/Components/SaveCloseButtons.tsx +0 -117
- package/src/Components/Schedule.tsx +0 -1998
- package/src/Components/SelectWithIcon.tsx +0 -239
- package/src/Components/TabContainer.tsx +0 -57
- package/src/Components/TabContent.tsx +0 -38
- package/src/Components/TabHeader.tsx +0 -20
- package/src/Components/ToggleThemeMenu.tsx +0 -52
- package/src/Components/TreeTable.tsx +0 -1002
- package/src/Components/UploadImage.tsx +0 -643
- package/src/Components/Utils.tsx +0 -1802
- package/src/Components/loader.css +0 -231
- package/src/Components/withWidth.tsx +0 -32
- package/src/Connection.tsx +0 -5
- package/src/Dialogs/ComplexCron.tsx +0 -163
- package/src/Dialogs/Confirm.tsx +0 -185
- package/src/Dialogs/Cron.tsx +0 -192
- package/src/Dialogs/Error.tsx +0 -67
- package/src/Dialogs/Message.tsx +0 -73
- package/src/Dialogs/SelectFile.tsx +0 -280
- package/src/Dialogs/SelectID.tsx +0 -310
- package/src/Dialogs/SimpleCron.tsx +0 -101
- package/src/Dialogs/TextInput.tsx +0 -99
- package/src/GenericApp.tsx +0 -1076
- package/src/LegacyConnection.tsx +0 -3720
- package/src/Prompt.tsx +0 -22
- package/src/Theme.tsx +0 -472
- package/src/icons/IconAdapter.tsx +0 -22
- package/src/icons/IconAlias.tsx +0 -22
- package/src/icons/IconChannel.tsx +0 -60
- package/src/icons/IconClearFilter.tsx +0 -24
- package/src/icons/IconClosed.tsx +0 -22
- package/src/icons/IconCopy.tsx +0 -21
- package/src/icons/IconDevice.tsx +0 -126
- package/src/icons/IconDocument.tsx +0 -22
- package/src/icons/IconDocumentReadOnly.tsx +0 -27
- package/src/icons/IconExpert.tsx +0 -26
- package/src/icons/IconFx.tsx +0 -38
- package/src/icons/IconInstance.tsx +0 -22
- package/src/icons/IconLogout.tsx +0 -32
- package/src/icons/IconNoIcon.tsx +0 -21
- package/src/icons/IconOpen.tsx +0 -22
- package/src/icons/IconProps.tsx +0 -16
- package/src/icons/IconState.tsx +0 -38
- package/src/index.css +0 -56
- /package/{Components → build/Components}/404.d.ts +0 -0
- /package/{Components → build/Components}/SimpleCron/cronText.d.ts +0 -0
- /package/{assets → build/assets}/devices.json +0 -0
- /package/{assets → build/assets}/lamp_ceiling.svg +0 -0
- /package/{assets → build/assets}/lamp_table.svg +0 -0
- /package/{assets → build/assets}/no_icon.svg +0 -0
- /package/{assets → build/assets}/rooms.json +0 -0
- /package/{index.css → build/index.css} +0 -0
- /package/{tasks.js → tasksExample.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
declare class Router<P = {}, S = {}> extends Component<P, S> {
|
|
2
|
+
export declare class Router<P = {}, S = {}> extends Component<P, S> {
|
|
3
3
|
protected onHashChangedBound: () => void;
|
|
4
4
|
constructor(props: P);
|
|
5
5
|
componentDidMount(): void;
|
|
@@ -19,4 +19,3 @@ declare class Router<P = {}, S = {}> extends Component<P, S> {
|
|
|
19
19
|
*/
|
|
20
20
|
static doNavigate(tab: string | undefined | null, dialog?: string | null, id?: string | null, arg?: string | null): void;
|
|
21
21
|
}
|
|
22
|
-
export default Router;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
1
|
+
import { Component } from 'react';
|
|
4
2
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
5
|
-
class Router extends
|
|
3
|
+
export class Router extends Component {
|
|
4
|
+
onHashChangedBound;
|
|
6
5
|
constructor(props) {
|
|
7
6
|
super(props);
|
|
8
7
|
this.onHashChangedBound = this.onHashChanged.bind(this);
|
|
@@ -27,9 +26,9 @@ class Router extends react_1.Component {
|
|
|
27
26
|
try {
|
|
28
27
|
return item ? decodeURIComponent(item) : '';
|
|
29
28
|
}
|
|
30
|
-
catch
|
|
29
|
+
catch {
|
|
31
30
|
console.error(`Router: Cannot decode ${item}`);
|
|
32
|
-
return item
|
|
31
|
+
return item;
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
34
|
// #tabName/dialogName/deviceId
|
|
@@ -75,4 +74,4 @@ class Router extends react_1.Component {
|
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
|
-
|
|
77
|
+
//# sourceMappingURL=Router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Router.js","sourceRoot":"./src/","sources":["Components/Router.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,mEAAmE;AACnE,MAAM,OAAO,MAAuB,SAAQ,SAAe;IAC7C,kBAAkB,CAAa;IAEzC,YAAY,KAAQ;QAChB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAED,iBAAiB;QACb,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACnE,CAAC;IAED,oBAAoB;QAChB,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,CA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AAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC7B,CAAC;QACD,IAAI,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YACjB,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QACvB,CAAC;aAAM,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YACtB,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QACvB,CAAC;QAED,IAAI,GAAG,EAAE,CAAC;YACN,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;YACjB,IAAI,MAAM,EAAE,CAAC;gBACT,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC;gBAErB,IAAI,EAAE,EAAE,CAAC;oBACL,IAAI,IAAI,IAAI,EAAE,EAAE,CAAC;oBACjB,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;wBACpB,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;oBACtB,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;QACD,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YAChC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;QAChC,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { Component } from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport class Router<P = {}, S = {}> extends Component<P, S> {\n protected onHashChangedBound: () => void;\n\n constructor(props: P) {\n super(props);\n this.onHashChangedBound = this.onHashChanged.bind(this);\n }\n\n componentDidMount(): void {\n window.addEventListener('hashchange', this.onHashChangedBound);\n }\n\n componentWillUnmount(): void {\n window.removeEventListener('hashchange', this.onHashChangedBound);\n }\n\n // eslint-disable-next-line class-methods-use-this\n onHashChanged(): void {\n // override this function\n }\n\n /**\n * Gets the location object.\n */\n static getLocation(): { tab: string; dialog: string; id: string; arg: string } {\n let hash = window.location.hash;\n hash = hash.replace(/^#/, '');\n const parts = hash.split('/').map(item => {\n try {\n return item ? decodeURIComponent(item) : '';\n } catch {\n console.error(`Router: Cannot decode ${item}`);\n return item;\n }\n });\n // #tabName/dialogName/deviceId\n return {\n tab: parts[0] || '',\n dialog: parts[1] || '',\n id: parts[2] || '',\n arg: parts[3] || '',\n };\n }\n\n /**\n * Navigate to a new location. Any parameters that are not set will be taken from the current location.\n */\n static doNavigate(\n tab: string | undefined | null,\n dialog?: string | null,\n id?: string | null,\n arg?: string | null,\n ): void {\n let hash = '';\n const location = Router.getLocation();\n if (arg !== undefined && !id) {\n id = location.id;\n }\n if (id && !dialog) {\n dialog = location.dialog;\n }\n if (dialog && !tab) {\n tab = location.tab;\n } else if (tab === null) {\n tab = location.tab;\n }\n\n if (tab) {\n hash = `#${tab}`;\n if (dialog) {\n hash += `/${dialog}`;\n\n if (id) {\n hash += `/${id}`;\n if (arg !== undefined) {\n hash += `/${arg}`;\n }\n }\n }\n }\n if (window.location.hash !== hash) {\n window.location.hash = hash;\n }\n }\n}\n"]}
|
|
@@ -12,9 +12,9 @@ interface SaveCloseButtonsProps {
|
|
|
12
12
|
changed: boolean;
|
|
13
13
|
error?: boolean;
|
|
14
14
|
}
|
|
15
|
-
declare class SaveCloseButtons extends React.Component<SaveCloseButtonsProps> {
|
|
15
|
+
export declare class SaveCloseButtons extends React.Component<SaveCloseButtonsProps> {
|
|
16
16
|
private readonly isIFrame;
|
|
17
17
|
constructor(props: SaveCloseButtonsProps);
|
|
18
18
|
render(): JSX.Element;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
2
|
+
import React, {} from 'react';
|
|
3
|
+
import { Fab, Toolbar } from '@mui/material';
|
|
4
|
+
import { Save as IconSave, Close as IconClose } from '@mui/icons-material';
|
|
5
|
+
import { I18n } from '../i18n';
|
|
6
|
+
const styles = {
|
|
7
|
+
buttonIcon: {
|
|
8
|
+
marginRight: 8,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export class SaveCloseButtons extends React.Component {
|
|
12
|
+
isIFrame;
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(props);
|
|
15
|
+
const newReact = props.newReact === undefined ? true : props.newReact;
|
|
16
|
+
if (props.isIFrame !== undefined) {
|
|
17
|
+
this.isIFrame = props.isIFrame;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
try {
|
|
21
|
+
this.isIFrame = !newReact && window.self !== window.top;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
this.isIFrame = !newReact;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
const noTextOnButtons = this.props.noTextOnButtons;
|
|
30
|
+
const buttonStyle = {
|
|
31
|
+
borderRadius: this.props.theme.saveToolbar.button.borderRadius || 3,
|
|
32
|
+
height: this.props.theme.saveToolbar.button.height || 32,
|
|
33
|
+
};
|
|
34
|
+
const style = {
|
|
35
|
+
bottom: this.isIFrame ? 38 : 0,
|
|
36
|
+
left: this.props.paddingLeft || 0,
|
|
37
|
+
right: 0,
|
|
38
|
+
position: 'absolute',
|
|
39
|
+
background: this.props.theme.saveToolbar.background,
|
|
40
|
+
};
|
|
41
|
+
if (this.props.dense) {
|
|
42
|
+
style.minHeight = 48;
|
|
43
|
+
}
|
|
44
|
+
if (this.props.error) {
|
|
45
|
+
buttonStyle.border = '1px solid red';
|
|
46
|
+
}
|
|
47
|
+
return (React.createElement(Toolbar
|
|
48
|
+
// position="absolute"
|
|
49
|
+
, {
|
|
50
|
+
// position="absolute"
|
|
51
|
+
style: style },
|
|
52
|
+
React.createElement(Fab, { variant: "extended", "aria-label": "Save", disabled: !this.props.changed || this.props.error, onClick: () => this.props.onSave(false), style: buttonStyle },
|
|
53
|
+
React.createElement(IconSave, { style: !noTextOnButtons ? styles.buttonIcon : undefined }),
|
|
54
|
+
!noTextOnButtons && I18n.t('ra_Save')),
|
|
55
|
+
React.createElement(Fab, { variant: "extended", "aria-label": "Save and close", disabled: !this.props.changed || this.props.error, onClick: () => this.props.onSave(true), style: { ...buttonStyle, ...{ marginLeft: 10 } } },
|
|
56
|
+
React.createElement(IconSave, { style: !noTextOnButtons ? styles.buttonIcon : undefined }),
|
|
57
|
+
!noTextOnButtons ? I18n.t('ra_Save and close') : '+',
|
|
58
|
+
noTextOnButtons && React.createElement(IconClose, null)),
|
|
59
|
+
React.createElement("div", { style: { flexGrow: 1 } }),
|
|
60
|
+
React.createElement(Fab, { variant: "extended", "aria-label": "Close", onClick: () => this.props.onClose(), style: buttonStyle },
|
|
61
|
+
React.createElement(IconClose, { style: !noTextOnButtons ? styles.buttonIcon : undefined }),
|
|
62
|
+
!noTextOnButtons && I18n.t('ra_Close'))));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=SaveCloseButtons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveCloseButtons.js","sourceRoot":"./src/","sources":["Components/SaveCloseButtons.tsx"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE3E,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,MAAM,MAAM,GAAwC;IAChD,UAAU,EAAE;QACR,WAAW,EAAE,CAAC;KACjB;CACJ,CAAC;AAqBF,MAAM,OAAO,gBAAiB,SAAQ,KAAK,CAAC,SAAgC;IACvD,QAAQ,CAAU;IAEnC,YAAY,KAA4B;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,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EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EACnC,KAAK,EAAE,WAAW;gBAElB,oBAAC,SAAS,IAAC,KAAK,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,GAAI;gBACrE,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CACrC,CACA,CACb,CAAC;IACN,CAAC;CACJ","sourcesContent":["// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React, { type JSX } from 'react';\n\nimport { Fab, Toolbar } from '@mui/material';\n\nimport { Save as IconSave, Close as IconClose } from '@mui/icons-material';\n\nimport { I18n } from '../i18n';\nimport type { IobTheme } from '../types';\n\nconst styles: Record<string, React.CSSProperties> = {\n buttonIcon: {\n marginRight: 8,\n },\n};\n\ninterface SaveCloseButtonsProps {\n /* Are the buttons without text */\n noTextOnButtons?: boolean;\n /* Theme object (from this.state.theme) */\n theme: IobTheme;\n /* bottom position 0 or 38 for iFrame */\n isIFrame?: boolean;\n /* is used in new React */\n newReact?: boolean;\n /* on Save handler */\n onSave: (close: boolean) => void;\n /* on Close handler */\n onClose: () => void;\n dense?: boolean;\n paddingLeft?: number;\n changed: boolean;\n error?: boolean;\n}\n\nexport class SaveCloseButtons extends React.Component<SaveCloseButtonsProps> {\n private readonly isIFrame: boolean;\n\n constructor(props: SaveCloseButtonsProps) {\n super(props);\n const newReact = props.newReact === undefined ? true : props.newReact;\n\n if (props.isIFrame !== undefined) {\n this.isIFrame = props.isIFrame;\n } else {\n try {\n this.isIFrame = !newReact && window.self !== window.top;\n } catch {\n this.isIFrame = !newReact;\n }\n }\n }\n\n render(): JSX.Element {\n const noTextOnButtons = this.props.noTextOnButtons;\n const buttonStyle: React.CSSProperties = {\n borderRadius: this.props.theme.saveToolbar.button.borderRadius || 3,\n height: this.props.theme.saveToolbar.button.height || 32,\n };\n\n const style: React.CSSProperties = {\n bottom: this.isIFrame ? 38 : 0,\n left: this.props.paddingLeft || 0,\n right: 0,\n position: 'absolute',\n background: this.props.theme.saveToolbar.background,\n };\n if (this.props.dense) {\n style.minHeight = 48;\n }\n\n if (this.props.error) {\n buttonStyle.border = '1px solid red';\n }\n\n return (\n <Toolbar\n // position=\"absolute\"\n style={style}\n >\n <Fab\n variant=\"extended\"\n aria-label=\"Save\"\n disabled={!this.props.changed || this.props.error}\n onClick={() => this.props.onSave(false)}\n style={buttonStyle}\n >\n <IconSave style={!noTextOnButtons ? styles.buttonIcon : undefined} />\n {!noTextOnButtons && I18n.t('ra_Save')}\n </Fab>\n <Fab\n variant=\"extended\"\n aria-label=\"Save and close\"\n disabled={!this.props.changed || this.props.error}\n onClick={() => this.props.onSave(true)}\n style={{ ...buttonStyle, ...{ marginLeft: 10 } }}\n >\n <IconSave style={!noTextOnButtons ? styles.buttonIcon : undefined} />\n {!noTextOnButtons ? I18n.t('ra_Save and close') : '+'}\n {noTextOnButtons && <IconClose />}\n </Fab>\n <div style={{ flexGrow: 1 }} />\n <Fab\n variant=\"extended\"\n aria-label=\"Close\"\n onClick={() => this.props.onClose()}\n style={buttonStyle}\n >\n <IconClose style={!noTextOnButtons ? styles.buttonIcon : undefined} />\n {!noTextOnButtons && I18n.t('ra_Close')}\n </Fab>\n </Toolbar>\n );\n }\n}\n"]}
|
|
@@ -33,7 +33,7 @@ interface ScheduleState {
|
|
|
33
33
|
schedule: ScheduleConfig;
|
|
34
34
|
desc: string;
|
|
35
35
|
}
|
|
36
|
-
declare class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
36
|
+
export declare class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
37
37
|
private readonly refFrom;
|
|
38
38
|
private readonly refTo;
|
|
39
39
|
private readonly refOnce;
|
|
@@ -59,4 +59,4 @@ declare class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
|
59
59
|
getValidSettings(): JSX.Element;
|
|
60
60
|
render(): JSX.Element;
|
|
61
61
|
}
|
|
62
|
-
export
|
|
62
|
+
export {};
|