@iobroker/adapter-react-v5 7.2.4 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -15
- 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 +5 -3
- package/{Components → build/Components}/FileBrowser.js +230 -236
- package/build/Components/FileBrowser.js.map +1 -0
- package/build/Components/FileViewer.d.ts +49 -0
- package/build/Components/FileViewer.js +247 -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 +1159 -1122
- 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 +45 -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} +36 -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 +5 -0
- package/build/icons/IconAdapter.js.map +1 -0
- package/build/icons/IconAlias.d.ts +3 -0
- package/build/icons/IconAlias.js +5 -0
- package/build/icons/IconAlias.js.map +1 -0
- package/build/icons/IconChannel.d.ts +3 -0
- package/build/icons/IconChannel.js +8 -0
- package/build/icons/IconChannel.js.map +1 -0
- package/build/icons/IconClearFilter.d.ts +3 -0
- package/build/icons/IconClearFilter.js +6 -0
- package/build/icons/IconClearFilter.js.map +1 -0
- package/build/icons/IconClosed.d.ts +3 -0
- package/build/icons/IconClosed.js +5 -0
- package/build/icons/IconClosed.js.map +1 -0
- package/build/icons/IconCopy.d.ts +3 -0
- package/build/icons/IconCopy.js +4 -0
- package/build/icons/IconCopy.js.map +1 -0
- package/build/icons/IconDevice.d.ts +3 -0
- package/build/icons/IconDevice.js +14 -0
- package/build/icons/IconDevice.js.map +1 -0
- package/build/icons/IconDocument.d.ts +3 -0
- package/build/icons/IconDocument.js +5 -0
- package/build/icons/IconDocument.js.map +1 -0
- package/build/icons/IconDocumentReadOnly.d.ts +3 -0
- package/build/icons/IconDocumentReadOnly.js +6 -0
- package/build/icons/IconDocumentReadOnly.js.map +1 -0
- package/build/icons/IconExpert.d.ts +3 -0
- package/build/icons/IconExpert.js +5 -0
- package/build/icons/IconExpert.js.map +1 -0
- package/build/icons/IconFx.d.ts +3 -0
- package/build/icons/IconFx.js +4 -0
- package/build/icons/IconFx.js.map +1 -0
- package/build/icons/IconInstance.d.ts +3 -0
- package/build/icons/IconInstance.js +5 -0
- package/build/icons/IconInstance.js.map +1 -0
- package/build/icons/IconLogout.d.ts +3 -0
- package/build/icons/IconLogout.js +5 -0
- package/build/icons/IconLogout.js.map +1 -0
- package/build/icons/IconNoIcon.d.ts +3 -0
- package/build/icons/IconNoIcon.js +4 -0
- package/build/icons/IconNoIcon.js.map +1 -0
- package/build/icons/IconOpen.d.ts +3 -0
- package/build/icons/IconOpen.js +5 -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 +5 -0
- package/build/icons/IconState.js.map +1 -0
- package/build/index.d.ts +76 -0
- package/build/index.js +75 -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
package/Dialogs/Cron.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const react_1 = __importDefault(require("react"));
|
|
30
|
-
const material_1 = require("@mui/material");
|
|
31
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
32
|
-
const ComplexCron_1 = __importDefault(require("../Components/ComplexCron"));
|
|
33
|
-
const SimpleCron_1 = __importStar(require("../Components/SimpleCron"));
|
|
34
|
-
const Schedule_1 = __importDefault(require("../Components/Schedule"));
|
|
35
|
-
const i18n_1 = __importDefault(require("../i18n"));
|
|
36
|
-
// Generate cron expression
|
|
37
|
-
const styles = {
|
|
38
|
-
dialogPaper: {
|
|
39
|
-
height: 'calc(100% - 96px)',
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
class DialogCron extends react_1.default.Component {
|
|
43
|
-
constructor(props) {
|
|
44
|
-
super(props);
|
|
45
|
-
let cron;
|
|
46
|
-
if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^["']/, '')[0] !== '{') {
|
|
47
|
-
cron = this.props.cron.replace(/['"]/g, '').trim();
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
cron = this.props.cron || '{}';
|
|
51
|
-
if (typeof cron === 'string') {
|
|
52
|
-
cron = cron.replace(/^["']/, '').replace(/["']\n?$/, '');
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
this.state = {
|
|
56
|
-
cron,
|
|
57
|
-
mode: this.props.simple
|
|
58
|
-
? 'simple'
|
|
59
|
-
: this.props.complex
|
|
60
|
-
? 'complex'
|
|
61
|
-
: (typeof cron === 'object' || cron[0] === '{') && !this.props.noWizard
|
|
62
|
-
? 'wizard'
|
|
63
|
-
: (0, SimpleCron_1.cron2state)(this.props.cron || '* * * * *')
|
|
64
|
-
? 'simple'
|
|
65
|
-
: 'complex',
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
handleCancel() {
|
|
69
|
-
this.props.onClose();
|
|
70
|
-
}
|
|
71
|
-
handleOk() {
|
|
72
|
-
this.props.onOk(this.state.cron);
|
|
73
|
-
this.props.onClose();
|
|
74
|
-
}
|
|
75
|
-
setMode(mode) {
|
|
76
|
-
this.setState({ mode });
|
|
77
|
-
}
|
|
78
|
-
render() {
|
|
79
|
-
return (react_1.default.createElement(material_1.Dialog, { onClose: () => { }, maxWidth: "md", fullWidth: true, sx: { '& .MuiDialog-paper': styles.dialogPaper }, open: !0, "aria-labelledby": "cron-dialog-title" },
|
|
80
|
-
react_1.default.createElement(material_1.DialogTitle, { id: "cron-dialog-title" }, this.props.title || i18n_1.default.t('ra_Define schedule...')),
|
|
81
|
-
react_1.default.createElement(material_1.DialogContent, { style: { height: '100%', overflow: 'hidden' } },
|
|
82
|
-
(this.props.simple && this.props.complex) || (!this.props.simple && !this.props.complex) ? (react_1.default.createElement("div", null,
|
|
83
|
-
!this.props.simple && !this.props.complex && !this.props.noWizard && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
84
|
-
react_1.default.createElement(material_1.Radio, { key: "wizard", checked: this.state.mode === 'wizard', onChange: () => this.setMode('wizard') }),
|
|
85
|
-
react_1.default.createElement("label", { onClick: () => this.setMode('wizard'), style: this.state.mode !== 'wizard' ? { color: 'lightgrey' } : {} }, i18n_1.default.t('sc_wizard')))),
|
|
86
|
-
((!this.props.simple && !this.props.complex) || this.props.simple) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
87
|
-
react_1.default.createElement(material_1.Radio, { key: "simple", checked: this.state.mode === 'simple', onChange: () => this.setMode('simple') }),
|
|
88
|
-
react_1.default.createElement("label", { onClick: () => this.setMode('simple'), style: this.state.mode !== 'simple' ? { color: 'lightgrey' } : {} }, i18n_1.default.t('sc_simple')))),
|
|
89
|
-
((!this.props.simple && !this.props.complex) || this.props.complex) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
90
|
-
react_1.default.createElement(material_1.Radio, { key: "complex", checked: this.state.mode === 'complex', onChange: () => this.setMode('complex') }),
|
|
91
|
-
react_1.default.createElement("label", { onClick: () => this.setMode('complex'), style: this.state.mode !== 'complex' ? { color: 'lightgrey' } : {} }, i18n_1.default.t('sc_cron')))))) : null,
|
|
92
|
-
this.state.mode === 'simple' && (react_1.default.createElement(SimpleCron_1.default, { cronExpression: this.state.cron, onChange: cron => this.setState({ cron }), language: i18n_1.default.getLanguage() })),
|
|
93
|
-
this.state.mode === 'wizard' && (react_1.default.createElement(Schedule_1.default, { theme: this.props.theme, schedule: this.state.cron, onChange: (cron) => this.setState({ cron }) })),
|
|
94
|
-
this.state.mode === 'complex' && (react_1.default.createElement(ComplexCron_1.default, { cronExpression: this.state.cron, onChange: cron => this.setState({ cron }), language: i18n_1.default.getLanguage() }))),
|
|
95
|
-
react_1.default.createElement(material_1.DialogActions, null,
|
|
96
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleOk(), color: "primary", startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
|
|
97
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleCancel(), color: "grey", startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel')))));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
exports.default = DialogCron;
|
package/Dialogs/Error.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
/**
|
|
30
|
-
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
31
|
-
*
|
|
32
|
-
* MIT License
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
36
|
-
const react_1 = __importStar(require("react"));
|
|
37
|
-
const material_1 = require("@mui/material");
|
|
38
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
39
|
-
const i18n_1 = __importDefault(require("../i18n"));
|
|
40
|
-
class DialogError extends react_1.Component {
|
|
41
|
-
handleOk() {
|
|
42
|
-
if (this.props.onClose) {
|
|
43
|
-
this.props.onClose();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
return (react_1.default.createElement(material_1.Dialog, { open: !0, maxWidth: "sm", fullWidth: this.props.fullWidth !== undefined ? this.props.fullWidth : true, onClose: () => this.handleOk(), "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description" },
|
|
48
|
-
react_1.default.createElement(material_1.DialogTitle, { id: "ar_alert_dialog_title" }, this.props.title || i18n_1.default.t('ra_Error')),
|
|
49
|
-
react_1.default.createElement(material_1.DialogContent, null,
|
|
50
|
-
react_1.default.createElement(material_1.DialogContentText, { id: "ar_alert_dialog_description" }, this.props.text || i18n_1.default.t('ra_Unknown error!'))),
|
|
51
|
-
react_1.default.createElement(material_1.DialogActions, null,
|
|
52
|
-
react_1.default.createElement(material_1.Button, { id: "ar_dialog_error_ok", variant: "contained", onClick: () => this.handleOk(), color: "primary", autoFocus: true, startIcon: react_1.default.createElement(icons_material_1.Check, null) }, i18n_1.default.t('ra_Ok')))));
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.default = DialogError;
|
package/Dialogs/Message.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
4
|
-
*
|
|
5
|
-
* MIT License
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
-
}) : function(o, v) {
|
|
22
|
-
o["default"] = v;
|
|
23
|
-
});
|
|
24
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
-
if (mod && mod.__esModule) return mod;
|
|
26
|
-
var result = {};
|
|
27
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
-
__setModuleDefault(result, mod);
|
|
29
|
-
return result;
|
|
30
|
-
};
|
|
31
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
36
|
-
const react_1 = __importStar(require("react"));
|
|
37
|
-
const material_1 = require("@mui/material");
|
|
38
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
39
|
-
const i18n_1 = __importDefault(require("../i18n"));
|
|
40
|
-
class DialogMessage extends react_1.Component {
|
|
41
|
-
handleOk() {
|
|
42
|
-
if (this.props.onClose) {
|
|
43
|
-
this.props.onClose();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
return (react_1.default.createElement(material_1.Dialog, { open: !0, maxWidth: "sm", fullWidth: this.props.fullWidth !== undefined ? this.props.fullWidth : true, onClose: () => this.handleOk(), "aria-labelledby": "ar_dialog_message_title", "aria-describedby": "ar_dialog_message_description" },
|
|
48
|
-
react_1.default.createElement(material_1.DialogTitle, { id: "ar_dialog_message_title" }, this.props.title || i18n_1.default.t('ra_Message')),
|
|
49
|
-
react_1.default.createElement(material_1.DialogContent, null,
|
|
50
|
-
react_1.default.createElement(material_1.DialogContentText, { id: "ar_dialog_message_description" },
|
|
51
|
-
react_1.default.createElement("span", { style: { marginRight: this.props.icon ? 8 : 0 } }, this.props.icon || null),
|
|
52
|
-
this.props.text)),
|
|
53
|
-
react_1.default.createElement(material_1.DialogActions, null,
|
|
54
|
-
react_1.default.createElement(material_1.Button, { id: "ar_dialog_message_ok", variant: "contained", onClick: () => this.handleOk(), color: "primary", autoFocus: true, startIcon: react_1.default.createElement(icons_material_1.Close, null) }, this.props.ok || i18n_1.default.t('ra_Close')))));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.default = DialogMessage;
|
package/Dialogs/SelectFile.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/*
|
|
7
|
-
* Copyright 2022-2024 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
8
|
-
*
|
|
9
|
-
* MIT License
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
13
|
-
const react_1 = __importDefault(require("react"));
|
|
14
|
-
const material_1 = require("@mui/material");
|
|
15
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
16
|
-
const i18n_1 = __importDefault(require("../i18n"));
|
|
17
|
-
const FileBrowser_1 = __importDefault(require("../Components/FileBrowser"));
|
|
18
|
-
const styles = {
|
|
19
|
-
headerID: {
|
|
20
|
-
fontWeight: 'bold',
|
|
21
|
-
fontStyle: 'italic',
|
|
22
|
-
},
|
|
23
|
-
dialog: {
|
|
24
|
-
height: '95%',
|
|
25
|
-
},
|
|
26
|
-
dialogMobile: {
|
|
27
|
-
// it is sx
|
|
28
|
-
padding: '4px',
|
|
29
|
-
width: '100%',
|
|
30
|
-
maxWidth: '100%',
|
|
31
|
-
maxHeight: 'calc(100% - 16px)',
|
|
32
|
-
height: '100%',
|
|
33
|
-
},
|
|
34
|
-
content: {
|
|
35
|
-
height: '100%',
|
|
36
|
-
overflow: 'hidden',
|
|
37
|
-
},
|
|
38
|
-
contentMobile: {
|
|
39
|
-
padding: '8px 4px',
|
|
40
|
-
},
|
|
41
|
-
titleRoot: {
|
|
42
|
-
whiteSpace: 'nowrap',
|
|
43
|
-
width: 'calc(100% - 72px)',
|
|
44
|
-
overflow: 'hidden',
|
|
45
|
-
display: 'inline-block',
|
|
46
|
-
textOverflow: 'ellipsis',
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
class DialogSelectFile extends react_1.default.Component {
|
|
50
|
-
constructor(props) {
|
|
51
|
-
super(props);
|
|
52
|
-
this.dialogName = this.props.dialogName || 'default';
|
|
53
|
-
this.dialogName = `SelectFile.${this.dialogName}`;
|
|
54
|
-
const filters = (window._localStorage || window.localStorage).getItem(this.dialogName) || '{}';
|
|
55
|
-
try {
|
|
56
|
-
this.filters = JSON.parse(filters);
|
|
57
|
-
}
|
|
58
|
-
catch (_a) {
|
|
59
|
-
this.filters = {};
|
|
60
|
-
}
|
|
61
|
-
if (props.filters) {
|
|
62
|
-
this.filters = Object.assign(Object.assign({}, this.filters), props.filters);
|
|
63
|
-
}
|
|
64
|
-
let selected = this.props.selected || [];
|
|
65
|
-
if (typeof selected !== 'object') {
|
|
66
|
-
selected = [selected];
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
selected = [...selected];
|
|
70
|
-
}
|
|
71
|
-
selected = selected.filter(id => id);
|
|
72
|
-
this.state = {
|
|
73
|
-
selected,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
handleCancel() {
|
|
77
|
-
this.props.onClose();
|
|
78
|
-
}
|
|
79
|
-
handleOk() {
|
|
80
|
-
this.props.onOk(this.props.multiSelect || !Array.isArray(this.state.selected)
|
|
81
|
-
? this.state.selected
|
|
82
|
-
: this.state.selected[0] || '');
|
|
83
|
-
this.props.onClose();
|
|
84
|
-
}
|
|
85
|
-
render() {
|
|
86
|
-
let title;
|
|
87
|
-
if (this.state.selected.length) {
|
|
88
|
-
if (!Array.isArray(this.state.selected) || this.state.selected.length === 1) {
|
|
89
|
-
title = [
|
|
90
|
-
react_1.default.createElement("span", { key: "selected" },
|
|
91
|
-
i18n_1.default.t('ra_Selected'),
|
|
92
|
-
"\u00A0"),
|
|
93
|
-
react_1.default.createElement("span", { key: "id", style: styles.headerID }, this.state.selected),
|
|
94
|
-
];
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
title = [
|
|
98
|
-
react_1.default.createElement("span", { key: "selected" },
|
|
99
|
-
i18n_1.default.t('ra_Selected'),
|
|
100
|
-
"\u00A0"),
|
|
101
|
-
react_1.default.createElement("span", { key: "id", style: styles.headerID }, i18n_1.default.t('%s items', this.state.selected.length)),
|
|
102
|
-
];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
title = this.props.title || i18n_1.default.t('ra_Please select file...');
|
|
107
|
-
}
|
|
108
|
-
return (react_1.default.createElement(material_1.Dialog, { onClose: () => { }, maxWidth: false, sx: { '& .MuiDialog-paper': Object.assign(Object.assign({}, styles.dialog), styles.dialogMobile) }, fullWidth: true, open: !0, "aria-labelledby": "ar_dialog_selectfile_title" },
|
|
109
|
-
react_1.default.createElement(material_1.DialogTitle, { id: "ar_dialog_selectfile_title", sx: { '&.MuiDialogTitle-root': styles.titleRoot } }, title),
|
|
110
|
-
react_1.default.createElement(material_1.DialogContent, { style: Object.assign(Object.assign({}, styles.content), styles.contentMobile) },
|
|
111
|
-
react_1.default.createElement(FileBrowser_1.default, { ready: true, imagePrefix: this.props.imagePrefix || this.props.prefix || '../', allowUpload: !!this.props.allowUpload, allowDownload: this.props.allowDownload !== false, allowCreateFolder: !!this.props.allowCreateFolder, allowDelete: !!this.props.allowDelete, allowView: this.props.allowView !== false, showViewTypeButton: this.props.showViewTypeButton !== false, showToolbar: this.props.showToolbar !== false, limitPath: this.props.limitPath, filterFiles: this.props.filterFiles, filterByType: this.props.filterByType, selected: this.props.selected, restrictToFolder: this.props.restrictToFolder, allowNonRestricted: this.props.allowNonRestricted, onSelect: (selected, isDoubleClick, isFolder) => {
|
|
112
|
-
this.setState({ selected: Array.isArray(selected) ? selected : [selected] }, () => isDoubleClick && (!this.props.selectOnlyFolders || isFolder) && this.handleOk());
|
|
113
|
-
}, t: this.props.t || i18n_1.default.t, lang: this.props.lang || i18n_1.default.getLanguage(), socket: this.props.socket, themeType: this.props.themeType, themeName: this.props.themeName, theme: this.props.theme, showExpertButton: this.props.showExpertButton, expertMode: this.props.expertMode, showTypeSelector: this.props.showTypeSelector })),
|
|
114
|
-
react_1.default.createElement(material_1.DialogActions, null,
|
|
115
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleOk(), startIcon: react_1.default.createElement(icons_material_1.Check, null), disabled: !this.state.selected.length, color: "primary" }, this.props.ok || i18n_1.default.t('ra_Ok')),
|
|
116
|
-
react_1.default.createElement(material_1.Button, { color: "grey", variant: "contained", onClick: () => this.handleCancel(), startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel')))));
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
exports.default = DialogSelectFile;
|
package/Dialogs/SimpleCron.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
9
|
-
const SimpleCron_1 = __importDefault(require("../Components/SimpleCron"));
|
|
10
|
-
const i18n_1 = __importDefault(require("../i18n"));
|
|
11
|
-
// Generates cron expression
|
|
12
|
-
const styles = {
|
|
13
|
-
dialogPaper: {
|
|
14
|
-
height: 'calc(100% - 96px)',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
class DialogSimpleCron extends react_1.default.Component {
|
|
18
|
-
constructor(props) {
|
|
19
|
-
super(props);
|
|
20
|
-
let cron;
|
|
21
|
-
if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^["']/, '')[0] !== '{') {
|
|
22
|
-
cron = this.props.cron.replace(/['"]/g, '').trim();
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
cron = this.props.cron || '{}';
|
|
26
|
-
if (typeof cron === 'string') {
|
|
27
|
-
cron = cron.replace(/^["']/, '').replace(/["']\n?$/, '');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
this.state = {
|
|
31
|
-
cron,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
handleCancel() {
|
|
35
|
-
this.props.onClose();
|
|
36
|
-
}
|
|
37
|
-
handleOk() {
|
|
38
|
-
this.props.onOk(this.state.cron);
|
|
39
|
-
this.props.onClose();
|
|
40
|
-
}
|
|
41
|
-
render() {
|
|
42
|
-
return (react_1.default.createElement(material_1.Dialog, { onClose: () => { }, maxWidth: "md", fullWidth: true, sx: { '& .MuiDialog-paper': styles.dialogPaper }, open: !0, "aria-labelledby": "cron-dialog-title" },
|
|
43
|
-
react_1.default.createElement(material_1.DialogTitle, { id: "cron-dialog-title" }, this.props.title || i18n_1.default.t('ra_Define CRON...')),
|
|
44
|
-
react_1.default.createElement(material_1.DialogContent, { style: { height: '100%', overflow: 'hidden' } },
|
|
45
|
-
react_1.default.createElement(SimpleCron_1.default, { cronExpression: this.state.cron, onChange: cron => this.setState({ cron }), language: i18n_1.default.getLanguage() })),
|
|
46
|
-
react_1.default.createElement(material_1.DialogActions, null,
|
|
47
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", disabled: !this.state.cron || this.state.cron.includes('_'), onClick: () => this.handleOk(), color: "primary", startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
|
|
48
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleCancel(), color: "grey", startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel')))));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.default = DialogSimpleCron;
|
package/Dialogs/TextInput.d.ts
DELETED
package/Dialogs/TextInput.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const material_1 = require("@mui/material");
|
|
8
|
-
const icons_material_1 = require("@mui/icons-material");
|
|
9
|
-
const i18n_1 = __importDefault(require("../i18n"));
|
|
10
|
-
const withWidth_1 = __importDefault(require("../Components/withWidth"));
|
|
11
|
-
function TextInput(props) {
|
|
12
|
-
const [text, setText] = react_1.default.useState(props.input || props.value || '');
|
|
13
|
-
const [error, setError] = react_1.default.useState('');
|
|
14
|
-
return (react_1.default.createElement(material_1.Dialog, { open: !0, onClose: () => props.onClose(null), "aria-labelledby": "form-dialog-title", fullWidth: props.fullWidth !== undefined ? props.fullWidth : false },
|
|
15
|
-
react_1.default.createElement(material_1.DialogTitle, { id: "form-dialog-title" }, props.titleText),
|
|
16
|
-
react_1.default.createElement(material_1.DialogContent, null,
|
|
17
|
-
react_1.default.createElement(material_1.DialogContentText, null, props.promptText),
|
|
18
|
-
react_1.default.createElement(material_1.TextField, { variant: "standard", autoFocus: true, margin: "dense", error: !!error, helperText: error === true || !error ? '' : error, value: text, label: props.labelText || '', type: props.type || 'text', onKeyUp: e => e.code === 'Enter' && text && props.onClose(text), onChange: e => {
|
|
19
|
-
let _error = '';
|
|
20
|
-
if (props.verify) {
|
|
21
|
-
_error = !props.verify(e.target.value);
|
|
22
|
-
}
|
|
23
|
-
if (props.rule) {
|
|
24
|
-
setText(props.rule(e.target.value));
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
setText(e.target.value);
|
|
28
|
-
}
|
|
29
|
-
setError(_error);
|
|
30
|
-
}, fullWidth: true })),
|
|
31
|
-
react_1.default.createElement(material_1.DialogActions, null,
|
|
32
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", disabled: !text || !!error, onClick: () => props.onClose(text), color: "primary", startIcon: react_1.default.createElement(icons_material_1.Check, null) }, props.applyText || i18n_1.default.t('ra_Ok')),
|
|
33
|
-
react_1.default.createElement(material_1.Button, { color: "grey", variant: "contained", onClick: () => props.onClose(null), startIcon: react_1.default.createElement(icons_material_1.Close, null) }, props.cancelText || i18n_1.default.t('ra_Cancel')))));
|
|
34
|
-
}
|
|
35
|
-
exports.default = (0, withWidth_1.default)()(TextInput);
|