@iobroker/adapter-react-v5 6.0.19 → 6.1.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/Components/Icon.js +1 -1
- package/Components/IconPicker.js +1 -1
- package/Components/MDUtils.js +6 -0
- package/Components/Schedule.d.ts +1 -1
- package/Components/Schedule.js +5 -5
- package/Components/SimpleCron/cronText.d.ts +9 -0
- package/Components/SimpleCron/cronText.js +11 -44
- package/Components/SimpleCron/index.js +34 -31
- package/Components/TextWithIcon.js +1 -1
- package/Components/TreeTable.d.ts +1 -1
- package/Components/TreeTable.js +5 -5
- package/Components/UploadImage.js +2 -2
- package/Dialogs/Confirm.d.ts +1 -0
- package/GenericApp.d.ts +2 -2
- package/GenericApp.js +2 -2
- package/README.md +6 -0
- package/i18n/de.json +2 -1
- package/i18n/en.json +1 -0
- package/i18n/es.json +2 -1
- package/i18n/fr.json +2 -1
- package/i18n/it.json +2 -1
- package/i18n/nl.json +2 -1
- package/i18n/pl.json +2 -1
- package/i18n/pt.json +2 -1
- package/i18n/ru.json +2 -1
- package/i18n/uk.json +2 -1
- package/i18n/zh-cn.json +2 -1
- package/package.json +4 -3
- package/Components/SimpleCron/cron2text.d.ts +0 -6
- package/Components/SimpleCron/cron2text.js +0 -492
- package/Components/SimpleCron/jquery.cron.locale.d.ts +0 -29
- package/Components/SimpleCron/jquery.cron.locale.js +0 -532
package/Components/Icon.js
CHANGED
|
@@ -8,10 +8,10 @@ exports.getSelectIdIcon = getSelectIdIcon;
|
|
|
8
8
|
exports.default = Icon;
|
|
9
9
|
const react_1 = __importDefault(require("react"));
|
|
10
10
|
const react_inlinesvg_1 = __importDefault(require("react-inlinesvg"));
|
|
11
|
+
const material_1 = require("@mui/material");
|
|
11
12
|
const icons_material_1 = require("@mui/icons-material");
|
|
12
13
|
const IconAlias_1 = __importDefault(require("../icons/IconAlias"));
|
|
13
14
|
const Utils_1 = __importDefault(require("./Utils"));
|
|
14
|
-
const material_1 = require("@mui/material");
|
|
15
15
|
function getSystemIcon(obj) {
|
|
16
16
|
let icon;
|
|
17
17
|
const id = obj === null || obj === void 0 ? void 0 : obj._id;
|
package/Components/IconPicker.js
CHANGED
|
@@ -93,7 +93,7 @@ const IconPicker = (props) => {
|
|
|
93
93
|
react_1.default.createElement(icons_material_1.Clear, null)))
|
|
94
94
|
:
|
|
95
95
|
(!props.disabled && react_1.default.createElement(IconSelector_1.default, { icons: props.icons, onlyRooms: props.onlyRooms, onlyDevices: props.onlyDevices, onSelect: (base64) => props.onChange(base64), t: i18n_1.default.t, lang: i18n_1.default.getLanguage() })),
|
|
96
|
-
!props.disabled && react_1.default.createElement("div", Object.assign({}, getRootProps(), { style: Object.assign({}, styles.dragField, isDragActive ? { backgroundColor: 'rgba(0, 255, 0, 0.1)' } : { cursor: 'pointer' }) }),
|
|
96
|
+
!props.disabled && react_1.default.createElement("div", Object.assign({}, getRootProps(), { style: Object.assign(Object.assign({}, styles.dragField), (isDragActive ? { backgroundColor: 'rgba(0, 255, 0, 0.1)' } : { cursor: 'pointer' })) }),
|
|
97
97
|
react_1.default.createElement("input", Object.assign({}, getInputProps())),
|
|
98
98
|
isDragActive ?
|
|
99
99
|
react_1.default.createElement("span", { style: styles.text }, i18n_1.default.t('ra_Drop the files here...')) :
|
package/Components/MDUtils.js
CHANGED
|
@@ -3,6 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/**
|
|
7
|
+
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
8
|
+
*
|
|
9
|
+
* MIT License
|
|
10
|
+
*
|
|
11
|
+
* */
|
|
6
12
|
const CopyToClipboard_1 = __importDefault(require("./CopyToClipboard"));
|
|
7
13
|
class MDUtils {
|
|
8
14
|
static text2link(text) {
|
package/Components/Schedule.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ declare class Schedule extends Component<ScheduleProps, ScheduleState> {
|
|
|
45
45
|
static state2text(schedule: string | ScheduleConfig): string;
|
|
46
46
|
getTimePeriodElements(): React.JSX.Element;
|
|
47
47
|
getTimeExactElements(): React.JSX.Element;
|
|
48
|
-
getDivider(): React.JSX.Element;
|
|
48
|
+
static getDivider(): React.JSX.Element;
|
|
49
49
|
getPeriodModes(): React.JSX.Element[];
|
|
50
50
|
getPeriodSettingsMinutes(): React.JSX.Element;
|
|
51
51
|
getPeriodSettingsWeekdays(): React.JSX.Element[];
|
package/Components/Schedule.js
CHANGED
|
@@ -656,7 +656,7 @@ class Schedule extends react_1.Component {
|
|
|
656
656
|
this.onChange(_schedule);
|
|
657
657
|
}, InputLabelProps: { shrink: true }, margin: "normal" })));
|
|
658
658
|
}
|
|
659
|
-
getDivider() {
|
|
659
|
+
static getDivider() {
|
|
660
660
|
return react_1.default.createElement("hr", { style: styles.hr });
|
|
661
661
|
}
|
|
662
662
|
getPeriodModes() {
|
|
@@ -667,7 +667,7 @@ class Schedule extends react_1.Component {
|
|
|
667
667
|
}
|
|
668
668
|
return [
|
|
669
669
|
// ----- once ---
|
|
670
|
-
react_1.default.createElement("div", { key: "once", style: Object.assign({}, styles.rowDiv, styles.rowOnce) },
|
|
670
|
+
react_1.default.createElement("div", { key: "once", style: Object.assign(Object.assign({}, styles.rowDiv), styles.rowOnce) },
|
|
671
671
|
react_1.default.createElement("div", { style: styles.modeDiv },
|
|
672
672
|
react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Radio, { style: styles.inputRadio, checked: !!isOnce, onClick: () => {
|
|
673
673
|
const _schedule = JSON.parse(JSON.stringify(this.state.schedule));
|
|
@@ -1172,7 +1172,7 @@ class Schedule extends react_1.Component {
|
|
|
1172
1172
|
const schedule = this.state.schedule;
|
|
1173
1173
|
// ----- from ---
|
|
1174
1174
|
return react_1.default.createElement("div", { style: styles.rowDiv },
|
|
1175
|
-
react_1.default.createElement("div", { style: Object.assign({}, styles.modeDiv, { verticalAlign: 'middle' }) },
|
|
1175
|
+
react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.modeDiv), { verticalAlign: 'middle' }) },
|
|
1176
1176
|
react_1.default.createElement("span", { style: { fontWeight: 'bold', paddingRight: 10 } }, i18n_1.default.t('sch_valid')),
|
|
1177
1177
|
react_1.default.createElement("span", null, i18n_1.default.t('sch_validFrom'))),
|
|
1178
1178
|
react_1.default.createElement("div", { style: styles.settingsDiv },
|
|
@@ -1229,10 +1229,10 @@ class Schedule extends react_1.Component {
|
|
|
1229
1229
|
react_1.default.createElement("h5", null, i18n_1.default.t('sch_time')),
|
|
1230
1230
|
this.getTimePeriodElements(),
|
|
1231
1231
|
this.getTimeExactElements(),
|
|
1232
|
-
|
|
1232
|
+
Schedule.getDivider(),
|
|
1233
1233
|
react_1.default.createElement("h5", null, i18n_1.default.t('sch_period')),
|
|
1234
1234
|
this.getPeriodModes(),
|
|
1235
|
-
!this.state.schedule.period.once &&
|
|
1235
|
+
!this.state.schedule.period.once && Schedule.getDivider(),
|
|
1236
1236
|
!this.state.schedule.period.once && this.getValidSettings()));
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
import 'cronstrue/locales/fr';
|
|
2
|
+
import 'cronstrue/locales/es';
|
|
3
|
+
import 'cronstrue/locales/de';
|
|
4
|
+
import 'cronstrue/locales/it';
|
|
5
|
+
import 'cronstrue/locales/ru';
|
|
6
|
+
import 'cronstrue/locales/zh_CN';
|
|
7
|
+
import 'cronstrue/locales/uk';
|
|
8
|
+
import 'cronstrue/locales/pt_BR';
|
|
9
|
+
import 'cronstrue/locales/pl';
|
|
1
10
|
declare function convertCronToText(cron: string, lang?: ioBroker.Languages): string;
|
|
2
11
|
export default convertCronToText;
|
|
@@ -3,50 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
text = text.replace(/ (\d{1,2}) в Феврале/, ' $1го числа в Феврале');
|
|
17
|
-
text = text.replace(/ (\d{1,2}) в Марте/, ' $1го числа в Марте');
|
|
18
|
-
text = text.replace(/ (\d{1,2}) в Апреле/, ' $1го числа в Апреле');
|
|
19
|
-
text = text.replace(/ (\d{1,2}) в Майе/, ' $1го числа в Майе');
|
|
20
|
-
text = text.replace(/ (\d{1,2}) в Июне/, ' $1го числа в Июне');
|
|
21
|
-
text = text.replace(/ (\d{1,2}) в Июле/, ' $1го числа в Июле');
|
|
22
|
-
text = text.replace(/ (\d{1,2}) в Августе/, ' $1го числа в Августе');
|
|
23
|
-
text = text.replace(/ (\d{1,2}) в Сентябре/, ' $1го числа в Сентябре');
|
|
24
|
-
text = text.replace(/ (\d{1,2}) в Октябре/, ' $1го числа в Октябре');
|
|
25
|
-
text = text.replace(/ (\d{1,2}) в Ноябре/, ' $1го числа в Ноябре');
|
|
26
|
-
text = text.replace(/ (\d{1,2}) в Декабре/, ' $1го числа в Декабре');
|
|
27
|
-
text = text.replace('Каждую(ый) 0 минуту', 'Каждые ноль минут');
|
|
28
|
-
text = text.replace(/Каждую\(ый\) ([\d\sи,]+) минуту/, 'Каждую $1 минуту');
|
|
29
|
-
text = text.replace(/каждой\(го\) ([\d\sи,]+) минуту/, 'каждой $1 минуты');
|
|
30
|
-
text = text.replace('каждой(го) минут(у)', 'каждой минуты');
|
|
31
|
-
text = text.replace(' 0 часа(ов)', ' 0 часов');
|
|
32
|
-
text = text.replace(' 1 часа(ов)', ' 1 час');
|
|
33
|
-
text = text.replace(' 2 часа(ов)', ' 2 часа');
|
|
34
|
-
text = text.replace(' 3 часа(ов)', ' 3 часа');
|
|
35
|
-
text = text.replace(' 4 часа(ов)', ' 4 часа');
|
|
36
|
-
text = text.replace(/ (\d{1,2}) часа\(ов\)/, ' $1 часов');
|
|
37
|
-
text = text.replace('Jede(r) Sekunde', 'Jede Sekunde');
|
|
38
|
-
text = text.replace(/Jede\(r\) ([\d\sund,]+) Sekunde/, 'Jede $1 Sekunde');
|
|
39
|
-
text = text.replace('Jede(r) Minute', 'Jede Minute');
|
|
40
|
-
text = text.replace('Jede Minuten', 'Jede Minute');
|
|
41
|
-
text = text.replace('Jede(r) Stunde', 'Jede Stunde');
|
|
42
|
-
text = text.replace(/Jede\(r\) ([\d\sund,]+) Minute/, 'Jede $1 Minute');
|
|
43
|
-
text = text.replace('Jede Sekunde in Minuten', 'Jede Sekunde in jeder Minute');
|
|
44
|
-
return text;
|
|
45
|
-
}
|
|
6
|
+
const cronstrue_1 = __importDefault(require("cronstrue"));
|
|
7
|
+
require("cronstrue/locales/fr");
|
|
8
|
+
require("cronstrue/locales/es");
|
|
9
|
+
require("cronstrue/locales/de");
|
|
10
|
+
require("cronstrue/locales/it");
|
|
11
|
+
require("cronstrue/locales/ru");
|
|
12
|
+
require("cronstrue/locales/zh_CN");
|
|
13
|
+
require("cronstrue/locales/uk");
|
|
14
|
+
require("cronstrue/locales/pt_BR");
|
|
15
|
+
require("cronstrue/locales/pl");
|
|
46
16
|
function convertCronToText(cron, lang) {
|
|
47
|
-
|
|
48
|
-
const locale = (lang && jquery_cron_locale_1.default[lang]) || jquery_cron_locale_1.default.en;
|
|
49
|
-
const text = (0, cron2text_1.default)(cron, withSeconds, locale);
|
|
50
|
-
return correctCasus(text /* , withSeconds */);
|
|
17
|
+
return cronstrue_1.default.toString(cron, { locale: lang });
|
|
51
18
|
}
|
|
52
19
|
exports.default = convertCronToText;
|
|
@@ -59,6 +59,36 @@ const DEFAULT_STATE = {
|
|
|
59
59
|
unit: PERIODIC_TYPES.minutes,
|
|
60
60
|
},
|
|
61
61
|
};
|
|
62
|
+
function text2weekdays(text) {
|
|
63
|
+
if (text === '*') {
|
|
64
|
+
return [0, 1, 2, 3, 4, 5, 6];
|
|
65
|
+
}
|
|
66
|
+
const parts = text.split(',');
|
|
67
|
+
const list = [];
|
|
68
|
+
parts.forEach(part => {
|
|
69
|
+
const _parts = part.split('-');
|
|
70
|
+
if (_parts.length === 2) {
|
|
71
|
+
const start = parseInt(_parts[0], 10);
|
|
72
|
+
const end = parseInt(_parts[1], 10);
|
|
73
|
+
for (let day = start; day <= end; day++) {
|
|
74
|
+
if (!list.includes(day === 7 ? 0 : day)) {
|
|
75
|
+
list.push(day === 7 ? 0 : day);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
if (part === '7') {
|
|
81
|
+
part = '0';
|
|
82
|
+
}
|
|
83
|
+
const numPart = parseInt(part, 10);
|
|
84
|
+
if (!list.includes(numPart)) {
|
|
85
|
+
list.push(numPart);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
list.sort();
|
|
90
|
+
return list;
|
|
91
|
+
}
|
|
62
92
|
function cron2state(cron, force) {
|
|
63
93
|
cron = cron.replace(/['"]/g, '').trim();
|
|
64
94
|
const cronParts = cron.split(' ');
|
|
@@ -159,7 +189,7 @@ function cron2state(cron, force) {
|
|
|
159
189
|
unit: PERIODIC_TYPES.seconds,
|
|
160
190
|
timeFrom: parseInt(options.hours.split('-')[0], 10),
|
|
161
191
|
timeTo: parseInt(options.hours.split('-')[1], 10),
|
|
162
|
-
weekdays:
|
|
192
|
+
weekdays: text2weekdays(options.dow),
|
|
163
193
|
},
|
|
164
194
|
};
|
|
165
195
|
}
|
|
@@ -177,7 +207,7 @@ function cron2state(cron, force) {
|
|
|
177
207
|
unit: PERIODIC_TYPES.minutes,
|
|
178
208
|
timeFrom: parseInt(options.hours.split('-')[0], 10),
|
|
179
209
|
timeTo: parseInt(options.hours.split('-')[1], 10),
|
|
180
|
-
weekdays:
|
|
210
|
+
weekdays: text2weekdays(options.dow),
|
|
181
211
|
},
|
|
182
212
|
};
|
|
183
213
|
}
|
|
@@ -192,7 +222,7 @@ function cron2state(cron, force) {
|
|
|
192
222
|
mode: 'specific',
|
|
193
223
|
specific: {
|
|
194
224
|
time: `${padding(parseInt(options.hours, 10))}:${padding(parseInt(options.minutes, 10))}`,
|
|
195
|
-
weekdays:
|
|
225
|
+
weekdays: text2weekdays(options.dow),
|
|
196
226
|
},
|
|
197
227
|
};
|
|
198
228
|
}
|
|
@@ -286,34 +316,7 @@ class SimpleCron extends react_1.default.Component {
|
|
|
286
316
|
return text.join(',');
|
|
287
317
|
}
|
|
288
318
|
static text2weekdays(text) {
|
|
289
|
-
|
|
290
|
-
return [0, 1, 2, 3, 4, 5, 6];
|
|
291
|
-
}
|
|
292
|
-
const parts = text.split(',');
|
|
293
|
-
const list = [];
|
|
294
|
-
parts.forEach(part => {
|
|
295
|
-
const _parts = part.split('-');
|
|
296
|
-
if (_parts.length === 2) {
|
|
297
|
-
const start = parseInt(_parts[0], 10);
|
|
298
|
-
const end = parseInt(_parts[1], 10);
|
|
299
|
-
for (let day = start; day <= end; day++) {
|
|
300
|
-
if (!list.includes(day === 7 ? 0 : day)) {
|
|
301
|
-
list.push(day === 7 ? 0 : day);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
else {
|
|
306
|
-
if (part === '7') {
|
|
307
|
-
part = '0';
|
|
308
|
-
}
|
|
309
|
-
const numPart = parseInt(part, 10);
|
|
310
|
-
if (!list.includes(numPart)) {
|
|
311
|
-
list.push(numPart);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
list.sort();
|
|
316
|
-
return list;
|
|
319
|
+
return text2weekdays(text);
|
|
317
320
|
}
|
|
318
321
|
static state2cron(state) {
|
|
319
322
|
let cron = '* * * * *';
|
|
@@ -110,7 +110,7 @@ const TextWithIcon = (props) => {
|
|
|
110
110
|
color: Utils_1.default.getInvertedColor(item === null || item === void 0 ? void 0 : item.color, props.themeType || 'light', true) || undefined,
|
|
111
111
|
backgroundColor: item === null || item === void 0 ? void 0 : item.color,
|
|
112
112
|
} : {};
|
|
113
|
-
return react_1.default.createElement("div", { style: Object.assign({}, props.style, styles.div, style), className: Utils_1.default.clsx(props.className, (_g = props.moreClasses) === null || _g === void 0 ? void 0 : _g.root), title: props.title || item.value },
|
|
113
|
+
return react_1.default.createElement("div", { style: Object.assign(Object.assign(Object.assign({}, (props.style || undefined)), styles.div), (style || undefined)), className: Utils_1.default.clsx(props.className, (_g = props.moreClasses) === null || _g === void 0 ? void 0 : _g.root), title: props.title || item.value },
|
|
114
114
|
(item === null || item === void 0 ? void 0 : item.icon) ? react_1.default.createElement(Icon_1.default, { src: item === null || item === void 0 ? void 0 : item.icon, className: (_h = props.moreClasses) === null || _h === void 0 ? void 0 : _h.icon, style: styles.icon }) : null,
|
|
115
115
|
react_1.default.createElement("div", { style: styles.text, className: (_j = props.moreClasses) === null || _j === void 0 ? void 0 : _j.text }, item === null || item === void 0 ? void 0 : item.name));
|
|
116
116
|
};
|
|
@@ -70,7 +70,7 @@ declare class TreeTable extends Component<TreeTableProps, TreeTableState> {
|
|
|
70
70
|
renderCellEditObjectID(col: Column, val: string): React.JSX.Element;
|
|
71
71
|
static renderCellNonEdit(item: Record<string, any>, col: Column): any;
|
|
72
72
|
renderCell(item: Record<string, any>, col: Column, level: number, i: number): React.JSX.Element;
|
|
73
|
-
renderCellWithSubField(item: Record<string, any>, col: Column): React.JSX.Element;
|
|
73
|
+
static renderCellWithSubField(item: Record<string, any>, col: Column): React.JSX.Element;
|
|
74
74
|
renderLine(item: Record<string, any>, level?: number): React.JSX.Element | React.JSX.Element[] | null;
|
|
75
75
|
handleRequestSort(property: string): void;
|
|
76
76
|
renderHead(): React.JSX.Element;
|
package/Components/TreeTable.js
CHANGED
|
@@ -91,8 +91,8 @@ const styles = {
|
|
|
91
91
|
},
|
|
92
92
|
cellHeader: {
|
|
93
93
|
fontWeight: 'bold',
|
|
94
|
-
background: (theme) => theme.palette.mode === 'dark' ? '#888' : '#888',
|
|
95
|
-
color: (theme) => theme.palette.mode === 'dark' ? '#EEE' : '#111',
|
|
94
|
+
background: (theme) => (theme.palette.mode === 'dark' ? '#888' : '#888'),
|
|
95
|
+
color: (theme) => (theme.palette.mode === 'dark' ? '#EEE' : '#111'),
|
|
96
96
|
height: 48,
|
|
97
97
|
wordBreak: 'break-word',
|
|
98
98
|
whiteSpace: 'pre',
|
|
@@ -347,13 +347,13 @@ class TreeTable extends react_1.Component {
|
|
|
347
347
|
}
|
|
348
348
|
return react_1.default.createElement(material_1.TableCell, { key: col.field, style: Object.assign(Object.assign(Object.assign({}, styles.cell), (level ? styles.cellSecondary : undefined)), col.cellStyle), component: "th" }, TreeTable.renderCellNonEdit(item, col));
|
|
349
349
|
}
|
|
350
|
-
renderCellWithSubField(item, col) {
|
|
350
|
+
static renderCellWithSubField(item, col) {
|
|
351
351
|
const main = getAttr(item, col.field, col.lookup);
|
|
352
352
|
if (col.subField) {
|
|
353
353
|
const sub = getAttr(item, col.subField, col.subLookup);
|
|
354
354
|
return react_1.default.createElement("div", null,
|
|
355
355
|
react_1.default.createElement("div", { style: styles.mainText }, main),
|
|
356
|
-
react_1.default.createElement("div", { style: Object.assign({}, styles.subText, col.subStyle ||
|
|
356
|
+
react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.subText), (col.subStyle || undefined)) }, sub));
|
|
357
357
|
}
|
|
358
358
|
return react_1.default.createElement("div", null,
|
|
359
359
|
react_1.default.createElement("div", { style: styles.mainText }, main));
|
|
@@ -389,7 +389,7 @@ class TreeTable extends react_1.Component {
|
|
|
389
389
|
this.setState({ opened: _opened });
|
|
390
390
|
}, size: "small" }, opened ? react_1.default.createElement(icons_material_1.ExpandMore, null) : react_1.default.createElement(icons_material_1.NavigateNext, null)) : null),
|
|
391
391
|
react_1.default.createElement(material_1.TableCell, { scope: "row", style: Object.assign(Object.assign(Object.assign(Object.assign({}, styles.cell), (level ? styles.cellSecondary : undefined)), this.props.columns[0].cellStyle), { paddingLeft: levelShift * level }) }, this.props.columns[0].subField ?
|
|
392
|
-
|
|
392
|
+
TreeTable.renderCellWithSubField(item, this.props.columns[0])
|
|
393
393
|
:
|
|
394
394
|
getAttr(item, this.props.columns[0].field, this.props.columns[0].lookup)),
|
|
395
395
|
this.props.columns.map((col, ii) => (!ii && !col.hidden ? null : this.renderCell(item, col, level, i))),
|
|
@@ -482,9 +482,9 @@ class UploadImage extends react_1.Component {
|
|
|
482
482
|
else {
|
|
483
483
|
this.onDrop(acceptedFiles);
|
|
484
484
|
}
|
|
485
|
-
} }, ({ getRootProps, getInputProps }) => react_1.default.createElement("div", Object.assign({ style: Object.assign({}, styles.uploadDiv, uploadFile === 'dragging' ? styles.uploadDivDragging :
|
|
485
|
+
} }, ({ getRootProps, getInputProps }) => react_1.default.createElement("div", Object.assign({ style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, styles.uploadDiv), (uploadFile === 'dragging' ? styles.uploadDivDragging : undefined)), styles.dropZone), (disabled ? styles.disabledOpacity : undefined)), (!icon ? styles.dropZoneEmpty : undefined)) }, getRootProps()),
|
|
486
486
|
react_1.default.createElement("input", Object.assign({}, getInputProps())),
|
|
487
|
-
react_1.default.createElement("div", { style: Object.assign({}, styles.uploadCenterDiv, error ? styles.error :
|
|
487
|
+
react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.uploadCenterDiv), (error ? styles.error : undefined)) },
|
|
488
488
|
!icon ? react_1.default.createElement("div", { style: styles.uploadCenterTextAndIcon },
|
|
489
489
|
react_1.default.createElement(fa_1.FaFileUpload, { style: styles.uploadCenterIcon }),
|
|
490
490
|
react_1.default.createElement("div", { style: styles.uploadCenterText }, uploadFile === 'dragging' ? i18n_1.default.t('ra_Drop file here') :
|
package/Dialogs/Confirm.d.ts
CHANGED
package/GenericApp.d.ts
CHANGED
|
@@ -78,8 +78,8 @@ declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TStat
|
|
|
78
78
|
* Get the theme type
|
|
79
79
|
*/
|
|
80
80
|
getThemeType(currentTheme: IobTheme): ThemeType;
|
|
81
|
-
onThemeChanged(
|
|
82
|
-
onToggleExpertMode(
|
|
81
|
+
onThemeChanged(_newThemeName: string): void;
|
|
82
|
+
onToggleExpertMode(_expertMode: boolean): void;
|
|
83
83
|
/**
|
|
84
84
|
* Changes the current theme
|
|
85
85
|
* */
|
package/GenericApp.js
CHANGED
|
@@ -415,9 +415,9 @@ class GenericApp extends Router_1.default {
|
|
|
415
415
|
getThemeType(currentTheme) {
|
|
416
416
|
return currentTheme.palette.mode;
|
|
417
417
|
}
|
|
418
|
-
onThemeChanged(
|
|
418
|
+
onThemeChanged(_newThemeName) {
|
|
419
419
|
}
|
|
420
|
-
onToggleExpertMode(
|
|
420
|
+
onToggleExpertMode(_expertMode) {
|
|
421
421
|
}
|
|
422
422
|
/**
|
|
423
423
|
* Changes the current theme
|
package/README.md
CHANGED
|
@@ -781,6 +781,12 @@ The best practice is to replace `padding` with `p` and `margin` with `m`, so you
|
|
|
781
781
|
-->
|
|
782
782
|
|
|
783
783
|
## Changelog
|
|
784
|
+
### 6.1.1 (2024-07-16)
|
|
785
|
+
* (bluefox) Added translations
|
|
786
|
+
|
|
787
|
+
### 6.1.0 (2024-07-15)
|
|
788
|
+
* (bluefox) Replace by CRON to text the package to `cronstrue`
|
|
789
|
+
|
|
784
790
|
### 6.0.19 (2024-07-14)
|
|
785
791
|
* (bluefox) added some packages for federation
|
|
786
792
|
|
package/i18n/de.json
CHANGED
|
@@ -426,5 +426,6 @@
|
|
|
426
426
|
"sc_everyN_dow": "jeden x-ten Tag der Woche",
|
|
427
427
|
"sc_every_dow": "jeden Tag der Woche",
|
|
428
428
|
"sc_specific_dow": "bestimmte(r) Tag(e) der Woche",
|
|
429
|
-
"ra_Name": "Name"
|
|
429
|
+
"ra_Name": "Name",
|
|
430
|
+
"ra_import data from %s file": "Daten aus %s-Datei importieren"
|
|
430
431
|
}
|
package/i18n/en.json
CHANGED
|
@@ -417,6 +417,7 @@
|
|
|
417
417
|
"ra_You can export all objects or just the selected branch.": "You can export all objects or just the selected branch.",
|
|
418
418
|
"ra_Do not export values of states": "Do not export values of states",
|
|
419
419
|
"ra_Selected %s object(s)": "Selected %s object(s)",
|
|
420
|
+
"ra_import data from %s file": "Import data from %s file",
|
|
420
421
|
"ra_create_device": "Create device",
|
|
421
422
|
"ra_create_channel": "Create channel",
|
|
422
423
|
"ra_create_state": "Create state",
|
package/i18n/es.json
CHANGED
|
@@ -426,5 +426,6 @@
|
|
|
426
426
|
"sc_everyN_dow": "cada enésimo día de la semana",
|
|
427
427
|
"sc_every_dow": "Cada día de la semana",
|
|
428
428
|
"sc_specific_dow": "día(s) específico(s) de la semana",
|
|
429
|
-
"ra_Name": "Nombre"
|
|
429
|
+
"ra_Name": "Nombre",
|
|
430
|
+
"ra_import data from %s file": "Importar datos del archivo %s"
|
|
430
431
|
}
|
package/i18n/fr.json
CHANGED
|
@@ -426,5 +426,6 @@
|
|
|
426
426
|
"sc_everyN_dow": "chaque Nième jour de la semaine",
|
|
427
427
|
"sc_every_dow": "Chaque jour de la semaine",
|
|
428
428
|
"sc_specific_dow": "jour(s) spécifique(s) de la semaine",
|
|
429
|
-
"ra_Name": "Nom"
|
|
429
|
+
"ra_Name": "Nom",
|
|
430
|
+
"ra_import data from %s file": "Importer des données à partir du fichier %s"
|
|
430
431
|
}
|
package/i18n/it.json
CHANGED
|
@@ -426,5 +426,6 @@
|
|
|
426
426
|
"sc_everyN_dow": "ogni Nesimo giorno della settimana",
|
|
427
427
|
"sc_every_dow": "Tutti i giorni della settimana",
|
|
428
428
|
"sc_specific_dow": "giorno/i specifico/i della settimana",
|
|
429
|
-
"ra_Name": "Nome"
|
|
429
|
+
"ra_Name": "Nome",
|
|
430
|
+
"ra_import data from %s file": "Importa dati dal file %s"
|
|
430
431
|
}
|
package/i18n/nl.json
CHANGED
|
@@ -426,5 +426,6 @@
|
|
|
426
426
|
"sc_everyN_dow": "elke N-de dag van de week",
|
|
427
427
|
"sc_every_dow": "elke dag van de week",
|
|
428
428
|
"sc_specific_dow": "specifieke dag(en) van de week",
|
|
429
|
-
"ra_Name": "Naam"
|
|
429
|
+
"ra_Name": "Naam",
|
|
430
|
+
"ra_import data from %s file": "Importeer gegevens uit %s bestand"
|
|
430
431
|
}
|
package/i18n/pl.json
CHANGED
|
@@ -426,5 +426,6 @@
|
|
|
426
426
|
"sc_everyN_dow": "w każdy N-ty dzień tygodnia",
|
|
427
427
|
"sc_every_dow": "każdy dzień tygodnia",
|
|
428
428
|
"sc_specific_dow": "określone dni tygodnia",
|
|
429
|
-
"ra_Name": "Nazwa"
|
|
429
|
+
"ra_Name": "Nazwa",
|
|
430
|
+
"ra_import data from %s file": "Importuj dane z pliku %s"
|
|
430
431
|
}
|
package/i18n/pt.json
CHANGED
|
@@ -426,5 +426,6 @@
|
|
|
426
426
|
"sc_everyN_dow": "todo enésimo dia da semana",
|
|
427
427
|
"sc_every_dow": "todos os dias da semana",
|
|
428
428
|
"sc_specific_dow": "dia(s) específico(s) da semana",
|
|
429
|
-
"ra_Name": "Nome"
|
|
429
|
+
"ra_Name": "Nome",
|
|
430
|
+
"ra_import data from %s file": "Importar dados do arquivo %s"
|
|
430
431
|
}
|
package/i18n/ru.json
CHANGED
|
@@ -426,5 +426,6 @@
|
|
|
426
426
|
"sc_everyN_dow": "каждый N-й день недели",
|
|
427
427
|
"sc_every_dow": "Каждый день недели",
|
|
428
428
|
"sc_specific_dow": "конкретный день(а) недели",
|
|
429
|
-
"ra_Name": "Имя"
|
|
429
|
+
"ra_Name": "Имя",
|
|
430
|
+
"ra_import data from %s file": "Импортировать данные из файла %s"
|
|
430
431
|
}
|
package/i18n/uk.json
CHANGED
package/i18n/zh-cn.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/adapter-react-v5",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "React classes to develop admin interfaces for ioBroker with react.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Denis Haev (bluefox)",
|
|
@@ -33,10 +33,11 @@
|
|
|
33
33
|
"@iobroker/types": "^6.0.8",
|
|
34
34
|
"@iobroker/js-controller-common": "^6.0.8",
|
|
35
35
|
"@iobroker/js-controller-common-db": "^6.0.8",
|
|
36
|
-
"@mui/icons-material": "^5.16.
|
|
37
|
-
"@mui/material": "^5.16.
|
|
36
|
+
"@mui/icons-material": "^5.16.2",
|
|
37
|
+
"@mui/material": "^5.16.2",
|
|
38
38
|
"@mui/x-date-pickers": "^7.10.0",
|
|
39
39
|
"@sentry/browser": "^8.17.0",
|
|
40
|
+
"cronstrue": "^2.50.0",
|
|
40
41
|
"react-color": "^2.19.3",
|
|
41
42
|
"react-colorful": "^5.6.1",
|
|
42
43
|
"react-cropper": "^2.3.3",
|