react-cron-generator 2.0.10 → 2.0.11
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 +1 -0
- package/build/cron-tab/custom.d.ts +1 -0
- package/build/cron-tab/daily.d.ts +1 -0
- package/build/cron-tab/hourly.d.ts +1 -0
- package/build/cron-tab/minutes.d.ts +1 -0
- package/build/cron-tab/monthly.d.ts +1 -0
- package/build/cron-tab/weekly.d.ts +1 -0
- package/build/cron.d.ts +1 -0
- package/build/index.js +143 -37
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,6 +68,7 @@ export default App;
|
|
|
68
68
|
| translateFn | translate function callback | method | No
|
|
69
69
|
| locale | locale for cronstrue | en | No
|
|
70
70
|
| options | Options for Cron component, *Must pass a valid cron value for available headers | All available headers | No
|
|
71
|
+
| disabled | Disable cron selector | false | No
|
|
71
72
|
|
|
72
73
|
|
|
73
74
|
**translateFn**
|
package/build/cron.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -33,9 +33,24 @@ var cronstrueI18n = {exports: {}};
|
|
|
33
33
|
};
|
|
34
34
|
CronParser.prototype.extractParts = function (expression) {
|
|
35
35
|
if (!this.expression) {
|
|
36
|
-
throw new Error("
|
|
36
|
+
throw new Error("cron expression is empty");
|
|
37
37
|
}
|
|
38
38
|
var parsed = expression.trim().split(/[ ]+/);
|
|
39
|
+
for (var i = 0; i < parsed.length; i++) {
|
|
40
|
+
if (parsed[i].includes(",")) {
|
|
41
|
+
var arrayElement = parsed[i]
|
|
42
|
+
.split(",")
|
|
43
|
+
.map(function (item) { return item.trim(); })
|
|
44
|
+
.filter(function (item) { return item !== ""; })
|
|
45
|
+
.map(function (item) { return (!isNaN(Number(item)) ? Number(item) : item); })
|
|
46
|
+
.filter(function (item) { return item !== null && item !== ""; });
|
|
47
|
+
if (arrayElement.length === 0) {
|
|
48
|
+
arrayElement.push("*");
|
|
49
|
+
}
|
|
50
|
+
arrayElement.sort(function (a, b) { return (a !== null && b !== null ? a - b : 0); });
|
|
51
|
+
parsed[i] = arrayElement.map(function (item) { return (item !== null ? item.toString() : ""); }).join(",");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
39
54
|
if (parsed.length < 5) {
|
|
40
55
|
throw new Error("Expression has only ".concat(parsed.length, " part").concat(parsed.length == 1 ? "" : "s", ". At least 5 parts are required."));
|
|
41
56
|
}
|
|
@@ -413,9 +428,26 @@ var cronstrueI18n = {exports: {}};
|
|
|
413
428
|
else if (s.indexOf("L") > -1) {
|
|
414
429
|
exp = exp.replace("L", "");
|
|
415
430
|
}
|
|
431
|
+
var parsedExp = parseInt(exp);
|
|
432
|
+
if (_this.options.tzOffset) {
|
|
433
|
+
var hourExpression = _this.expressionParts[2];
|
|
434
|
+
var hour = parseInt(hourExpression) + (_this.options.tzOffset ? _this.options.tzOffset : 0);
|
|
435
|
+
if (hour >= 24) {
|
|
436
|
+
parsedExp++;
|
|
437
|
+
}
|
|
438
|
+
else if (hour < 0) {
|
|
439
|
+
parsedExp--;
|
|
440
|
+
}
|
|
441
|
+
if (parsedExp > 6) {
|
|
442
|
+
parsedExp = 0;
|
|
443
|
+
}
|
|
444
|
+
else if (parsedExp < 0) {
|
|
445
|
+
parsedExp = 6;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
416
448
|
var description = _this.i18n.daysOfTheWeekInCase
|
|
417
|
-
? _this.i18n.daysOfTheWeekInCase(form)[
|
|
418
|
-
: daysOfWeekNames[
|
|
449
|
+
? _this.i18n.daysOfTheWeekInCase(form)[parsedExp]
|
|
450
|
+
: daysOfWeekNames[parsedExp];
|
|
419
451
|
if (s.indexOf("#") > -1) {
|
|
420
452
|
var dayOfWeekOfMonthDescription = null;
|
|
421
453
|
var dayOfWeekOfMonthNumber = s.substring(s.indexOf("#") + 1);
|
|
@@ -635,7 +667,25 @@ var cronstrueI18n = {exports: {}};
|
|
|
635
667
|
return description;
|
|
636
668
|
};
|
|
637
669
|
ExpressionDescriptor.prototype.formatTime = function (hourExpression, minuteExpression, secondExpression) {
|
|
638
|
-
var
|
|
670
|
+
var hourOffset = 0;
|
|
671
|
+
var minuteOffset = 0;
|
|
672
|
+
if (this.options.tzOffset) {
|
|
673
|
+
hourOffset = this.options.tzOffset > 0 ? Math.floor(this.options.tzOffset) : Math.ceil(this.options.tzOffset);
|
|
674
|
+
minuteOffset = (parseFloat((this.options.tzOffset % 1).toFixed(2)));
|
|
675
|
+
if (minuteOffset != 0) {
|
|
676
|
+
minuteOffset *= 60;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
var hour = parseInt(hourExpression) + (hourOffset);
|
|
680
|
+
var minute = parseInt(minuteExpression) + (minuteOffset);
|
|
681
|
+
if (minute >= 60) {
|
|
682
|
+
minute -= 60;
|
|
683
|
+
hour += 1;
|
|
684
|
+
}
|
|
685
|
+
else if (minute < 0) {
|
|
686
|
+
minute += 60;
|
|
687
|
+
hour -= 1;
|
|
688
|
+
}
|
|
639
689
|
if (hour >= 24) {
|
|
640
690
|
hour = hour - 24;
|
|
641
691
|
}
|
|
@@ -654,7 +704,6 @@ var cronstrueI18n = {exports: {}};
|
|
|
654
704
|
hour = 12;
|
|
655
705
|
}
|
|
656
706
|
}
|
|
657
|
-
var minute = minuteExpression;
|
|
658
707
|
var second = "";
|
|
659
708
|
if (secondExpression) {
|
|
660
709
|
second = ":".concat(("00" + secondExpression).substring(secondExpression.length));
|
|
@@ -999,7 +1048,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
999
1048
|
return null;
|
|
1000
1049
|
};
|
|
1001
1050
|
ar.prototype.use24HourTimeFormatByDefault = function () {
|
|
1002
|
-
return
|
|
1051
|
+
return true;
|
|
1003
1052
|
};
|
|
1004
1053
|
ar.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
1005
1054
|
return "حدث خطأ في إنشاء وصف المصطلح٠ تأكد من تركيب مصطلح الكرون";
|
|
@@ -1187,7 +1236,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
1187
1236
|
return null;
|
|
1188
1237
|
};
|
|
1189
1238
|
be.prototype.use24HourTimeFormatByDefault = function () {
|
|
1190
|
-
return
|
|
1239
|
+
return false;
|
|
1191
1240
|
};
|
|
1192
1241
|
be.prototype.everyMinute = function () {
|
|
1193
1242
|
return "кожную хвіліну";
|
|
@@ -1563,7 +1612,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
1563
1612
|
return null;
|
|
1564
1613
|
};
|
|
1565
1614
|
ca.prototype.use24HourTimeFormatByDefault = function () {
|
|
1566
|
-
return
|
|
1615
|
+
return true;
|
|
1567
1616
|
};
|
|
1568
1617
|
ca.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
1569
1618
|
return "S'ha produït un error mentres es generava la descripció de l'expressió. Revisi la sintaxi de la expressió de cron.";
|
|
@@ -2491,7 +2540,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
2491
2540
|
return null;
|
|
2492
2541
|
};
|
|
2493
2542
|
es.prototype.use24HourTimeFormatByDefault = function () {
|
|
2494
|
-
return
|
|
2543
|
+
return true;
|
|
2495
2544
|
};
|
|
2496
2545
|
es.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
2497
2546
|
return "Ocurrió un error mientras se generaba la descripción de la expresión. Revise la sintaxis de la expresión de cron.";
|
|
@@ -2842,7 +2891,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
2842
2891
|
function fi() {
|
|
2843
2892
|
}
|
|
2844
2893
|
fi.prototype.use24HourTimeFormatByDefault = function () {
|
|
2845
|
-
return
|
|
2894
|
+
return true;
|
|
2846
2895
|
};
|
|
2847
2896
|
fi.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
2848
2897
|
return "Virhe kuvauksen generoinnissa. Tarkista cron-syntaksi.";
|
|
@@ -3408,7 +3457,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
3408
3457
|
return null;
|
|
3409
3458
|
};
|
|
3410
3459
|
hu.prototype.use24HourTimeFormatByDefault = function () {
|
|
3411
|
-
return
|
|
3460
|
+
return true;
|
|
3412
3461
|
};
|
|
3413
3462
|
hu.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
3414
3463
|
return "Hiba történt a kifejezésleírás generálásakor. Ellenőrizze a cron kifejezés szintaxisát.";
|
|
@@ -3596,7 +3645,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
3596
3645
|
return null;
|
|
3597
3646
|
};
|
|
3598
3647
|
id.prototype.use24HourTimeFormatByDefault = function () {
|
|
3599
|
-
return
|
|
3648
|
+
return true;
|
|
3600
3649
|
};
|
|
3601
3650
|
id.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
3602
3651
|
return "Terjadi kesalahan saat membuat deskripsi ekspresi. Periksa sintaks ekspresi cron.";
|
|
@@ -3957,7 +4006,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
3957
4006
|
function ja() {
|
|
3958
4007
|
}
|
|
3959
4008
|
ja.prototype.use24HourTimeFormatByDefault = function () {
|
|
3960
|
-
return
|
|
4009
|
+
return true;
|
|
3961
4010
|
};
|
|
3962
4011
|
ja.prototype.everyMinute = function () {
|
|
3963
4012
|
return "毎分";
|
|
@@ -4204,7 +4253,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
4204
4253
|
return "%s분마다";
|
|
4205
4254
|
};
|
|
4206
4255
|
ko.prototype.minutesX0ThroughX1PastTheHour = function () {
|
|
4207
|
-
return "정시 후 %s분에서 %s
|
|
4256
|
+
return "정시 후 %s분에서 %s분까지";
|
|
4208
4257
|
};
|
|
4209
4258
|
ko.prototype.atX0MinutesPastTheHour = function () {
|
|
4210
4259
|
return "정시 후 %s분에서";
|
|
@@ -4267,7 +4316,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
4267
4316
|
return ", %s개월마다";
|
|
4268
4317
|
};
|
|
4269
4318
|
ko.prototype.commaOnlyInX0 = function () {
|
|
4270
|
-
return ", %s
|
|
4319
|
+
return ", %s에만";
|
|
4271
4320
|
};
|
|
4272
4321
|
ko.prototype.commaOnTheLastDayOfTheMonth = function () {
|
|
4273
4322
|
return ", 해당 월의 마지막 날에";
|
|
@@ -4282,7 +4331,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
4282
4331
|
return "첫 번째 평일";
|
|
4283
4332
|
};
|
|
4284
4333
|
ko.prototype.weekdayNearestDayX0 = function () {
|
|
4285
|
-
return "
|
|
4334
|
+
return "%s일과 가장 가까운 평일";
|
|
4286
4335
|
};
|
|
4287
4336
|
ko.prototype.commaOnTheX0OfTheMonth = function () {
|
|
4288
4337
|
return ", 해당 월의 %s에";
|
|
@@ -4291,7 +4340,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
4291
4340
|
return ", %s일마다";
|
|
4292
4341
|
};
|
|
4293
4342
|
ko.prototype.commaBetweenDayX0AndX1OfTheMonth = function () {
|
|
4294
|
-
return ", 해당 월의 %s
|
|
4343
|
+
return ", 해당 월의 %s일에서 %s일까지";
|
|
4295
4344
|
};
|
|
4296
4345
|
ko.prototype.commaOnDayX0OfTheMonth = function () {
|
|
4297
4346
|
return ", 해당 월의 %s일에";
|
|
@@ -4531,7 +4580,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
4531
4580
|
return null;
|
|
4532
4581
|
};
|
|
4533
4582
|
nb.prototype.use24HourTimeFormatByDefault = function () {
|
|
4534
|
-
return
|
|
4583
|
+
return true;
|
|
4535
4584
|
};
|
|
4536
4585
|
nb.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
4537
4586
|
return "En feil inntraff ved generering av uttrykksbeskrivelse. Sjekk cron syntaks.";
|
|
@@ -4716,7 +4765,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
4716
4765
|
return null;
|
|
4717
4766
|
};
|
|
4718
4767
|
nl.prototype.use24HourTimeFormatByDefault = function () {
|
|
4719
|
-
return
|
|
4768
|
+
return true;
|
|
4720
4769
|
};
|
|
4721
4770
|
nl.prototype.everyMinute = function () {
|
|
4722
4771
|
return "elke minuut";
|
|
@@ -5086,7 +5135,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
5086
5135
|
return null;
|
|
5087
5136
|
};
|
|
5088
5137
|
pt_BR.prototype.use24HourTimeFormatByDefault = function () {
|
|
5089
|
-
return
|
|
5138
|
+
return true;
|
|
5090
5139
|
};
|
|
5091
5140
|
pt_BR.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
5092
5141
|
return "Ocorreu um erro ao gerar a descrição da expressão Cron.";
|
|
@@ -6424,7 +6473,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
6424
6473
|
return null;
|
|
6425
6474
|
};
|
|
6426
6475
|
sw.prototype.use24HourTimeFormatByDefault = function () {
|
|
6427
|
-
return
|
|
6476
|
+
return true;
|
|
6428
6477
|
};
|
|
6429
6478
|
sw.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
6430
6479
|
return "Kuna tatizo wakati wa kutunga msemo. Angalia cron expression syntax.";
|
|
@@ -7167,7 +7216,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
7167
7216
|
return null;
|
|
7168
7217
|
};
|
|
7169
7218
|
vi.prototype.use24HourTimeFormatByDefault = function () {
|
|
7170
|
-
return
|
|
7219
|
+
return true;
|
|
7171
7220
|
};
|
|
7172
7221
|
vi.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
7173
7222
|
return "Đã xảy ra lỗi khi tạo mô tả biểu thức. Vui lòng kiểm tra cú pháp biểu thức cron.";
|
|
@@ -7545,7 +7594,7 @@ var cronstrueI18n = {exports: {}};
|
|
|
7545
7594
|
return ", 從 %s 年至 %s 年";
|
|
7546
7595
|
};
|
|
7547
7596
|
zh_TW.prototype.use24HourTimeFormatByDefault = function () {
|
|
7548
|
-
return
|
|
7597
|
+
return true;
|
|
7549
7598
|
};
|
|
7550
7599
|
zh_TW.prototype.everyMinute = function () {
|
|
7551
7600
|
return "每分鐘";
|
|
@@ -7865,6 +7914,9 @@ var i18n = cronstrueWithLocales;
|
|
|
7865
7914
|
|
|
7866
7915
|
const MinutesCron = (props) => {
|
|
7867
7916
|
const onChange = (e) => {
|
|
7917
|
+
if (props.disabled) {
|
|
7918
|
+
return;
|
|
7919
|
+
}
|
|
7868
7920
|
if ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 60) || e.target.value === '') {
|
|
7869
7921
|
let val = ['0', '*', '*', '*', '*', '?', '*'];
|
|
7870
7922
|
val[1] = e.target.value ? `0/${e.target.value}` : val[1];
|
|
@@ -7872,7 +7924,7 @@ const MinutesCron = (props) => {
|
|
|
7872
7924
|
}
|
|
7873
7925
|
};
|
|
7874
7926
|
const value = props.value[1].split('/')[1];
|
|
7875
|
-
return (jsxs("div", Object.assign({ className: "well" }, { children: [props.translate('Every'), " ", jsx("input", { type: "Number", onChange: onChange, value: value, min: 1, max: 60 }), " ", props.translate('minute(s)')] })));
|
|
7927
|
+
return (jsxs("div", Object.assign({ className: "well" }, { children: [props.translate('Every'), " ", jsx("input", { type: "Number", onChange: onChange, value: value, min: 1, max: 60, disabled: props.disabled }), " ", props.translate('minute(s)')] })));
|
|
7876
7928
|
};
|
|
7877
7929
|
|
|
7878
7930
|
const MinutesSelect = (props) => {
|
|
@@ -7883,7 +7935,7 @@ const MinutesSelect = (props) => {
|
|
|
7883
7935
|
}
|
|
7884
7936
|
return options;
|
|
7885
7937
|
};
|
|
7886
|
-
return (jsx("select", Object.assign({ disabled: props.disabled
|
|
7938
|
+
return (jsx("select", Object.assign({ disabled: props.disabled, className: "minutes", onChange: props.onChange, value: props.value }, { children: buildOptions() })));
|
|
7887
7939
|
};
|
|
7888
7940
|
|
|
7889
7941
|
const HourSelect = (props) => {
|
|
@@ -7894,7 +7946,7 @@ const HourSelect = (props) => {
|
|
|
7894
7946
|
}
|
|
7895
7947
|
return options;
|
|
7896
7948
|
};
|
|
7897
|
-
return (jsx("select", Object.assign({ disabled: props.disabled
|
|
7949
|
+
return (jsx("select", Object.assign({ disabled: props.disabled, className: "hours", onChange: props.onChange, value: props.value }, { children: buildOptions() })));
|
|
7898
7950
|
};
|
|
7899
7951
|
|
|
7900
7952
|
const DailyCron = (props) => {
|
|
@@ -7903,15 +7955,24 @@ const DailyCron = (props) => {
|
|
|
7903
7955
|
setState(Object.assign(Object.assign({}, state), { every: props.value[3] !== '?' }));
|
|
7904
7956
|
}, []);
|
|
7905
7957
|
const onDayChange = (e) => {
|
|
7958
|
+
if (props.disabled) {
|
|
7959
|
+
return;
|
|
7960
|
+
}
|
|
7906
7961
|
if (!e.target.value || (parseInt(e.target.value) > 0 && parseInt(e.target.value) < 32)) {
|
|
7907
7962
|
// props.value = ['0', getValueByIndex(1), getValueByIndex(1),'*','*','?','*'];
|
|
7908
7963
|
onValueChange(3, (e.target.value ? `1/${e.target.value}` : e.target.value));
|
|
7909
7964
|
}
|
|
7910
7965
|
};
|
|
7911
7966
|
const onAtHourChange = (e) => {
|
|
7967
|
+
if (props.disabled) {
|
|
7968
|
+
return;
|
|
7969
|
+
}
|
|
7912
7970
|
onValueChange(2, e.target.value);
|
|
7913
7971
|
};
|
|
7914
7972
|
const onAtMinuteChange = (e) => {
|
|
7973
|
+
if (props.disabled) {
|
|
7974
|
+
return;
|
|
7975
|
+
}
|
|
7915
7976
|
onValueChange(1, e.target.value);
|
|
7916
7977
|
};
|
|
7917
7978
|
const onValueChange = (cronPosition, value) => {
|
|
@@ -7920,7 +7981,11 @@ const DailyCron = (props) => {
|
|
|
7920
7981
|
props.onChange(val);
|
|
7921
7982
|
};
|
|
7922
7983
|
const translateFn = props.translate;
|
|
7923
|
-
return (jsxs("div", Object.assign({ className: "tab-pane" }, { children: [jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { type: "radio", onChange: (e) => {
|
|
7984
|
+
return (jsxs("div", Object.assign({ className: "tab-pane" }, { children: [jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { type: "radio", onChange: (e) => { if (props.disabled) {
|
|
7985
|
+
return;
|
|
7986
|
+
} setState(Object.assign(Object.assign({}, state), { every: true })); props.onChange(); }, value: "1", name: "DailyRadio", checked: state.every, disabled: props.disabled }), jsx("span", { children: translateFn('Every') }), jsx("input", { disabled: !state.every || props.disabled, type: "Number", maxLength: 2, onChange: onDayChange, value: props.value[3].split('/')[1] ? props.value[3].split('/')[1] : '' }), jsx("span", { children: translateFn('day(s)') })] })), jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { onChange: (e) => { if (props.disabled) {
|
|
7987
|
+
return;
|
|
7988
|
+
} setState(Object.assign(Object.assign({}, state), { every: false })); props.onChange(['0', props.value[1], props.value[2], '?', '*', 'MON-FRI', '*']); }, type: "radio", value: "2", name: "DailyRadio", checked: !state.every, disabled: props.disabled }), jsx("span", { children: translateFn('Every week day') })] })), jsx("span", { children: translateFn('Start time') }), jsx(HourSelect, { onChange: onAtHourChange, value: props.value[2], disabled: props.disabled }), jsx(MinutesSelect, { onChange: onAtMinuteChange, value: props.value[1], disabled: props.disabled })] })));
|
|
7924
7989
|
};
|
|
7925
7990
|
|
|
7926
7991
|
const HourlyCron = (props) => {
|
|
@@ -7931,7 +7996,7 @@ const HourlyCron = (props) => {
|
|
|
7931
7996
|
}
|
|
7932
7997
|
}, []);
|
|
7933
7998
|
const onHourChange = (e) => {
|
|
7934
|
-
if (state.every && ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 24) || e.target.value === '')) {
|
|
7999
|
+
if (!props.disabled && state.every && ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 24) || e.target.value === '')) {
|
|
7935
8000
|
let val = ['0', '0', '*', '*', '*', '?', '*'];
|
|
7936
8001
|
val[1] = props.value[1];
|
|
7937
8002
|
val[2] = e.target.value ? `0/${e.target.value}` : e.target.value;
|
|
@@ -7940,7 +8005,7 @@ const HourlyCron = (props) => {
|
|
|
7940
8005
|
}
|
|
7941
8006
|
};
|
|
7942
8007
|
const onMinuteChange = (e) => {
|
|
7943
|
-
if (state.every && ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 60) || e.target.value === '')) {
|
|
8008
|
+
if (!props.disabled && state.every && ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 60) || e.target.value === '')) {
|
|
7944
8009
|
let val = ['0', '0', '*', '*', '*', '?', '*'];
|
|
7945
8010
|
val[1] = e.target.value;
|
|
7946
8011
|
val[2] = props.value[2];
|
|
@@ -7949,33 +8014,52 @@ const HourlyCron = (props) => {
|
|
|
7949
8014
|
}
|
|
7950
8015
|
};
|
|
7951
8016
|
const onAtHourChange = (e) => {
|
|
8017
|
+
if (props.disabled) {
|
|
8018
|
+
return;
|
|
8019
|
+
}
|
|
7952
8020
|
let val = ['0', props.value[1], '*', '1/1', '*', '?', '*'];
|
|
7953
8021
|
val[2] = `${e.target.value}`;
|
|
7954
8022
|
props.onChange(val);
|
|
7955
8023
|
};
|
|
7956
8024
|
const onAtMinuteChange = (e) => {
|
|
8025
|
+
if (props.disabled) {
|
|
8026
|
+
return;
|
|
8027
|
+
}
|
|
7957
8028
|
let val = ['0', '*', props.value[2], '1/1', '*', '?', '*'];
|
|
7958
8029
|
val[1] = `${e.target.value}`;
|
|
7959
8030
|
props.onChange(val);
|
|
7960
8031
|
};
|
|
7961
8032
|
const translateFn = props.translate;
|
|
7962
|
-
return (jsx("div", Object.assign({ className: "tab-content" }, { children: jsxs("div", Object.assign({ className: "tab-pane active" }, { children: [jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { type: "radio", onChange: (e) => {
|
|
8033
|
+
return (jsx("div", Object.assign({ className: "tab-content" }, { children: jsxs("div", Object.assign({ className: "tab-pane active" }, { children: [jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { type: "radio", onChange: (e) => { if (props.disabled) {
|
|
8034
|
+
return;
|
|
8035
|
+
} setState(Object.assign(Object.assign({}, state), { every: true })); props.onChange(['0', '0', '0/1', '1/1', '*', '?', '*']); }, checked: state.every, disabled: props.disabled }), jsxs("span", { children: [translateFn('Every'), " "] }), jsx("input", { disabled: !state.every || props.disabled, type: "Number", onChange: onHourChange, value: props.value[2].split('/')[1] ? props.value[2].split('/')[1] : '' }), jsx("span", { children: translateFn('hour') }), jsx("input", { disabled: !state.every || props.disabled, type: "Number", onChange: onMinuteChange, value: props.value[1] }), jsx("span", { children: translateFn('minute(s)') })] })), jsx("div", Object.assign({ className: "well well-small margin-right-0 margin-left-0" }, { children: jsxs("div", Object.assign({ className: "text_align_right", style: { width: '100%' } }, { children: [jsx("input", { type: "radio", onChange: (e) => { if (props.disabled) {
|
|
8036
|
+
return;
|
|
8037
|
+
} setState({ every: false }); props.onChange(); }, checked: !state.every, disabled: props.disabled }), jsx("span", Object.assign({ className: "" }, { children: translateFn('At') })), jsx(HourSelect, { disabled: state.every || props.disabled, onChange: onAtHourChange, value: props.value[2] }), jsx(MinutesSelect, { disabled: state.every || props.disabled, onChange: onAtMinuteChange, value: props.value[1] })] })) }))] })) })));
|
|
7963
8038
|
};
|
|
7964
8039
|
|
|
7965
8040
|
const WeeklyCron = (props) => {
|
|
7966
8041
|
const onAtHourChange = (e) => {
|
|
8042
|
+
if (props.disabled) {
|
|
8043
|
+
return;
|
|
8044
|
+
}
|
|
7967
8045
|
let val = props.value;
|
|
7968
8046
|
val[0] = '0';
|
|
7969
8047
|
val[2] = `${e.target.value}`;
|
|
7970
8048
|
props.onChange(val);
|
|
7971
8049
|
};
|
|
7972
8050
|
const onAtMinuteChange = (e) => {
|
|
8051
|
+
if (props.disabled) {
|
|
8052
|
+
return;
|
|
8053
|
+
}
|
|
7973
8054
|
let val = props.value;
|
|
7974
8055
|
val[0] = '0';
|
|
7975
8056
|
val[1] = `${e.target.value}`;
|
|
7976
8057
|
props.onChange(val);
|
|
7977
8058
|
};
|
|
7978
8059
|
const onCheck = (e) => {
|
|
8060
|
+
if (props.disabled) {
|
|
8061
|
+
return;
|
|
8062
|
+
}
|
|
7979
8063
|
let val = props.value;
|
|
7980
8064
|
val[0] = '0';
|
|
7981
8065
|
if (e.target.checked) {
|
|
@@ -8009,7 +8093,7 @@ const WeeklyCron = (props) => {
|
|
|
8009
8093
|
val[5] = valFive;
|
|
8010
8094
|
};
|
|
8011
8095
|
const translateFn = props.translate;
|
|
8012
|
-
return (jsxs("div", Object.assign({ className: "container-fluid" }, { children: [jsxs("div", Object.assign({ className: "well well-small row" }, { children: [jsx("div", Object.assign({ className: "span6 col-sm-6" }, { children: jsxs("div", Object.assign({ className: "text_align_left" }, { children: [jsx("input", { className: 'min_height_auto', type: "checkbox", value: "MON", onChange: onCheck, checked: (props.value[5].search('MON') !== -1) ? true : false }), translateFn('Monday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "WED", onChange: onCheck, checked: props.value[5].search('WED') !== -1 ? true : false }), translateFn('Wednesday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "FRI", onChange: onCheck, checked: (props.value[5].search('FRI') !== -1) ? true : false }), translateFn('Friday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "SUN", onChange: onCheck, checked: props.value[5].search('SUN') !== -1 ? true : false }), translateFn('Sunday')] })) })), jsxs("div", Object.assign({ className: "span6 col-sm-6" }, { children: [jsxs("div", Object.assign({ className: "text_align_left" }, { children: [jsx("input", { className: 'min_height_auto', type: "checkbox", value: "TUE", onChange: onCheck, checked: props.value[5].search('TUE') !== -1 ? true : false }), translateFn('Tuesday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "THU", onChange: onCheck, checked: props.value[5].search('THU') !== -1 ? true : false }), translateFn('Thursday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "SAT", onChange: onCheck, checked: props.value[5].search('SAT') !== -1 ? true : false }), translateFn('Saturday')] })), jsx("br", {}), jsx("br", {})] }))] })), translateFn('Start time'), jsx(HourSelect, { onChange: onAtHourChange, value: props.value[2] }), jsx(MinutesSelect, { onChange: onAtMinuteChange, value: props.value[1] })] })));
|
|
8096
|
+
return (jsxs("div", Object.assign({ className: "container-fluid" }, { children: [jsxs("div", Object.assign({ className: "well well-small row" }, { children: [jsx("div", Object.assign({ className: "span6 col-sm-6" }, { children: jsxs("div", Object.assign({ className: "text_align_left" }, { children: [jsx("input", { className: 'min_height_auto', type: "checkbox", value: "MON", onChange: onCheck, checked: (props.value[5].search('MON') !== -1) ? true : false, disabled: props.disabled }), translateFn('Monday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "WED", onChange: onCheck, checked: props.value[5].search('WED') !== -1 ? true : false, disabled: props.disabled }), translateFn('Wednesday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "FRI", onChange: onCheck, checked: (props.value[5].search('FRI') !== -1) ? true : false, disabled: props.disabled }), translateFn('Friday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "SUN", onChange: onCheck, checked: props.value[5].search('SUN') !== -1 ? true : false, disabled: props.disabled }), translateFn('Sunday')] })) })), jsxs("div", Object.assign({ className: "span6 col-sm-6" }, { children: [jsxs("div", Object.assign({ className: "text_align_left" }, { children: [jsx("input", { className: 'min_height_auto', type: "checkbox", value: "TUE", onChange: onCheck, checked: props.value[5].search('TUE') !== -1 ? true : false, disabled: props.disabled }), translateFn('Tuesday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "THU", onChange: onCheck, checked: props.value[5].search('THU') !== -1 ? true : false, disabled: props.disabled }), translateFn('Thursday'), jsx("br", {}), jsx("input", { className: 'min_height_auto', type: "checkbox", value: "SAT", onChange: onCheck, checked: props.value[5].search('SAT') !== -1 ? true : false, disabled: props.disabled }), translateFn('Saturday')] })), jsx("br", {}), jsx("br", {})] }))] })), translateFn('Start time'), jsx(HourSelect, { onChange: onAtHourChange, value: props.value[2], disabled: props.disabled }), jsx(MinutesSelect, { onChange: onAtMinuteChange, value: props.value[1], disabled: props.disabled })] })));
|
|
8013
8097
|
};
|
|
8014
8098
|
|
|
8015
8099
|
const MonthlyCron = (props) => {
|
|
@@ -8031,6 +8115,9 @@ const MonthlyCron = (props) => {
|
|
|
8031
8115
|
setState(Object.assign(Object.assign({}, state), { every: every }));
|
|
8032
8116
|
}, []);
|
|
8033
8117
|
const onDayChange = (e) => {
|
|
8118
|
+
if (props.disabled) {
|
|
8119
|
+
return;
|
|
8120
|
+
}
|
|
8034
8121
|
if (((parseInt(e.target.value) > 0 && parseInt(e.target.value) <= 31)) || e.target.value === "") {
|
|
8035
8122
|
let val = ['0', props.value[1] === '*' ? '0' : props.value[1], props.value[2] === '*' ? '0' : props.value[2], props.value[3], '1/1', '?', '*'];
|
|
8036
8123
|
val[3] = `${e.target.value}`;
|
|
@@ -8038,6 +8125,9 @@ const MonthlyCron = (props) => {
|
|
|
8038
8125
|
}
|
|
8039
8126
|
};
|
|
8040
8127
|
const onLastDayChange = (e) => {
|
|
8128
|
+
if (props.disabled) {
|
|
8129
|
+
return;
|
|
8130
|
+
}
|
|
8041
8131
|
if (((parseInt(e.target.value) >> 0 && parseInt(e.target.value) <= 31)) || e.target.value === "") {
|
|
8042
8132
|
let val = ['0', props.value[1] === '*' ? '0' : props.value[1], props.value[2] === '*' ? '0' : props.value[2], props.value[3], '1/1', '?', '*'];
|
|
8043
8133
|
if (e.target.value === '') {
|
|
@@ -8050,26 +8140,42 @@ const MonthlyCron = (props) => {
|
|
|
8050
8140
|
}
|
|
8051
8141
|
};
|
|
8052
8142
|
const onAtHourChange = (e) => {
|
|
8143
|
+
if (props.disabled) {
|
|
8144
|
+
return;
|
|
8145
|
+
}
|
|
8053
8146
|
let val = props.value;
|
|
8054
8147
|
val[2] = `${e.target.value}`;
|
|
8055
8148
|
props.onChange(val);
|
|
8056
8149
|
};
|
|
8057
8150
|
const onAtMinuteChange = (e) => {
|
|
8151
|
+
if (props.disabled) {
|
|
8152
|
+
return;
|
|
8153
|
+
}
|
|
8058
8154
|
let val = props.value;
|
|
8059
8155
|
val[1] = `${e.target.value}`;
|
|
8060
8156
|
props.onChange(val);
|
|
8061
8157
|
};
|
|
8062
8158
|
const translateFn = props.translate;
|
|
8063
|
-
return (jsxs("div", Object.assign({ className: "tab-pane" }, { children: [jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { type: "radio", onChange: (e) => {
|
|
8159
|
+
return (jsxs("div", Object.assign({ className: "tab-pane" }, { children: [jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { type: "radio", onChange: (e) => { if (props.disabled) {
|
|
8160
|
+
return;
|
|
8161
|
+
} setState(Object.assign(Object.assign({}, state), { every: e.target.value })); props.onChange(['0', props.value[1] === '*' ? '0' : props.value[1], props.value[2] === '*' ? '0' : props.value[2], '1', '1/1', '?', '*']); }, value: "1", name: "MonthlyRadio", checked: state.every === "1" ? true : false, disabled: props.disabled }), translateFn('Day'), jsx("input", { readOnly: state.every !== "1", type: "number", value: props.value[3], onChange: onDayChange, disabled: props.disabled }), translateFn('of every month(s)')] })), jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { onChange: (e) => { if (props.disabled) {
|
|
8162
|
+
return;
|
|
8163
|
+
} setState(Object.assign(Object.assign({}, state), { every: e.target.value })); props.onChange(['0', props.value[1] === '*' ? '0' : props.value[1], props.value[2] === '*' ? '0' : props.value[2], 'L', '*', '?', '*']); }, type: "radio", value: "2", name: "DailyRadio", checked: state.every === "2" ? true : false, disabled: props.disabled }), translateFn('Last day of every month')] })), jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { onChange: (e) => { if (props.disabled) {
|
|
8164
|
+
return;
|
|
8165
|
+
} setState(Object.assign(Object.assign({}, state), { every: e.target.value })); props.onChange(['0', props.value[1] === '*' ? '0' : props.value[1], props.value[2] === '*' ? '0' : props.value[2], 'LW', '*', '?', '*']); }, type: "radio", value: "3", name: "DailyRadio", checked: state.every === "3" ? true : false, disabled: props.disabled }), translateFn('On the last weekday of every month')] })), jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { type: "radio", onChange: (e) => { if (props.disabled) {
|
|
8166
|
+
return;
|
|
8167
|
+
} setState(Object.assign(Object.assign({}, state), { every: e.target.value })); props.onChange(['0', props.value[1] === '*' ? '0' : props.value[1], props.value[2] === '*' ? '0' : props.value[2], `L-${1}`, '*', '?', '*']); }, value: "4", name: "MonthlyRadio", checked: state.every === "4" ? true : false, disabled: props.disabled }), jsx("input", { readOnly: state.every !== "4", type: "number", value: props.value[3].split('-').length && props.value[3].split('-')[1] ? props.value[3].split('-')[1] : '', onChange: onLastDayChange, disabled: props.disabled }), translateFn('day(s) before the end of the month')] })), translateFn('Start time'), jsx(HourSelect, { onChange: onAtHourChange, value: props.value[2], disabled: props.disabled }), jsx(MinutesSelect, { onChange: onAtMinuteChange, value: props.value[1], disabled: props.disabled })] })));
|
|
8064
8168
|
};
|
|
8065
8169
|
|
|
8066
8170
|
const CustomCron = (props) => {
|
|
8067
8171
|
const onChange = (e) => {
|
|
8172
|
+
if (props.disabled)
|
|
8173
|
+
return;
|
|
8068
8174
|
props.onChange(e.target.value.replace(/,/g, '!').split(" "));
|
|
8069
8175
|
};
|
|
8070
8176
|
const translateFn = props.translate;
|
|
8071
8177
|
let val = props.value.toString().replace(/,/g, ' ').replace(/!/g, ',');
|
|
8072
|
-
return (jsxs("div", Object.assign({ className: "well" }, { children: [translateFn('Expression'), " ", jsx("input", { type: "text", onChange: onChange, value: val })] })));
|
|
8178
|
+
return (jsxs("div", Object.assign({ className: "well" }, { children: [translateFn('Expression'), " ", jsx("input", { type: "text", onChange: onChange, value: val, disabled: props.disabled })] })));
|
|
8073
8179
|
};
|
|
8074
8180
|
|
|
8075
8181
|
const HEADER = {
|
|
@@ -8177,7 +8283,7 @@ function styleInject(css, ref) {
|
|
|
8177
8283
|
}
|
|
8178
8284
|
}
|
|
8179
8285
|
|
|
8180
|
-
var css_248z = ".cron_builder_bordering {\n border: 1px solid #ddd;\n border-top: none;\n text-align: center;\n padding: 10px;\n background: #fff;\n}\n.cron_builder_bordering input, .cron_builder_bordering select {\n width: 100px;\n margin-right: 10px;\n margin-left: 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n outline: none;\n padding: 0px 5px;\n min-height: 28px;\n}\n.df {\n display: flex;\n}\n.cron-builder-bg {\n background-color: #086090;\n color: white;\n text-align: center;\n margin-bottom: 4px;\n padding: 8px 0px;\n}\n.cron_builder_bordering select {\n background-color: white;\n width: 75px;\n cursor: pointer;\n padding: 4px 2px;\n border-radius: 4px;\n}\n.cron_builder_bordering select option:hover {\n background-color: #086090;\n}\n.well-small input {\n width: auto !important;\n}\n.cron_builder_bordering input[type='radio'] {\n margin-top: 0px;\n vertical-align: middle;\n}\n.cron_builder {\n border: 1px solid #d0cbcb;\n padding: 5px;\n background-color: #dddef13d;\n width: 100%;\n max-width: 600px;\n}\n.text_align_left {\n text-align: left;\n}\n.cron_builder .nav li {\n cursor: pointer;\n flex: 1 1 10px;\n text-align: center;\n width: 10px;\n display: flex;\n padding: 0px 1px;\n}\n.cron_builder .nav li a {\n color:#337ab7;\n width: 100%;\n padding: 10px;\n display: inline-block;\n border-radius: 4px 4px 0px 0px;\n}\n.cron_builder .nav-tabs .nav-link:focus, .cron_builder .nav-tabs .nav-link:hover {\n border-color: transparent transparent transparent;\n background-color: #eeeeee;\n}\n.cron_builder .nav-tabs .nav-item.show .nav-link, .cron_builder .nav-tabs .nav-link.active {\n border-color: #dee2e6 #dee2e6 #fff;\n background-color: #ffffff;\n}\n.cron_builder { \n font-size: 14px;\n}\n.cron_builder .well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 5%);\n box-shadow: inset 0 1px 1px rgb(0 0 0 / 5%);\n}\n@media screen and (max-width:767px) {\n .cron_builder .nav li {\n cursor: pointer;\n flex: 0 0 65px;\n text-align: center;\n }\n}\n\n/* ---- boostrap ----- */\n.nav.nav-tabs {\n list-style: none;\n display: flex;\n margin: 0 0;\n padding-left: 0;\n}\n.row {\n display: flex;\n}\n.col-sm-6 {\n flex: 0 0 50%;\n}\n.min_height_auto {\n min-height: auto !important;\n}\nbody {\n font-family: -apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,\"Noto Sans\",sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";\n}";
|
|
8286
|
+
var css_248z = ".cron_builder_bordering {\n border: 1px solid #ddd;\n border-top: none;\n text-align: center;\n padding: 10px;\n background: #fff;\n}\n.cron_builder_bordering input, .cron_builder_bordering select {\n width: 100px;\n margin-right: 10px;\n margin-left: 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n outline: none;\n padding: 0px 5px;\n min-height: 28px;\n}\n.df {\n display: flex;\n}\n.cron-builder-bg {\n background-color: #086090;\n color: white;\n text-align: center;\n margin-bottom: 4px;\n padding: 8px 0px;\n}\n.cron_builder_bordering select {\n background-color: white;\n width: 75px;\n cursor: pointer;\n padding: 4px 2px;\n border-radius: 4px;\n}\n.cron_builder_bordering select:disabled{\n background-color: #f5f5f5;\n cursor: default;\n}\n.cron_builder_bordering select option:hover {\n background-color: #086090;\n}\n.well-small input {\n width: auto !important;\n}\n.cron_builder_bordering input[type='radio'] {\n margin-top: 0px;\n vertical-align: middle;\n}\n.cron_builder {\n border: 1px solid #d0cbcb;\n padding: 5px;\n background-color: #dddef13d;\n width: 100%;\n max-width: 600px;\n}\n.text_align_left {\n text-align: left;\n}\n.cron_builder .nav li {\n cursor: pointer;\n flex: 1 1 10px;\n text-align: center;\n width: 10px;\n display: flex;\n padding: 0px 1px;\n}\n.cron_builder .nav li a {\n color:#337ab7;\n width: 100%;\n padding: 10px;\n display: inline-block;\n border-radius: 4px 4px 0px 0px;\n}\n.cron_builder .nav-tabs .nav-link:focus, .cron_builder .nav-tabs .nav-link:hover {\n border-color: transparent transparent transparent;\n background-color: #eeeeee;\n}\n.cron_builder .nav-tabs .nav-item.show .nav-link, .cron_builder .nav-tabs .nav-link.active {\n border-color: #dee2e6 #dee2e6 #fff;\n background-color: #ffffff;\n}\n.cron_builder .nav-tabs .nav-item.show .nav-link, .cron_builder .nav-tabs .nav-link.disabled {\n color: #6c757d;\n background-color: #ffffff;\n border-color: transparent transparent #ffffff;\n cursor: not-allowed;\n}\n.cron_builder { \n font-size: 14px;\n}\n.cron_builder .well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 5%);\n box-shadow: inset 0 1px 1px rgb(0 0 0 / 5%);\n}\n@media screen and (max-width:767px) {\n .cron_builder .nav li {\n cursor: pointer;\n flex: 0 0 65px;\n text-align: center;\n }\n}\n\n/* ---- boostrap ----- */\n.nav.nav-tabs {\n list-style: none;\n display: flex;\n margin: 0 0;\n padding-left: 0;\n}\n.row {\n display: flex;\n}\n.col-sm-6 {\n flex: 0 0 50%;\n}\n.min_height_auto {\n min-height: auto !important;\n}\nbody {\n font-family: -apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,\"Noto Sans\",sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";\n}";
|
|
8181
8287
|
styleInject(css_248z);
|
|
8182
8288
|
|
|
8183
8289
|
const defaultCron = '0 0 00 1/1 * ? *';
|
|
@@ -8238,13 +8344,13 @@ const Cron = (props) => {
|
|
|
8238
8344
|
setState(prevState);
|
|
8239
8345
|
};
|
|
8240
8346
|
const tabChanged = (tab) => {
|
|
8241
|
-
if (state.selectedTab !== tab) {
|
|
8347
|
+
if (state.selectedTab !== tab && !props.disabled) {
|
|
8242
8348
|
setState(Object.assign(Object.assign({}, state), { selectedTab: tab, value: defaultValue(tab) }));
|
|
8243
8349
|
}
|
|
8244
8350
|
};
|
|
8245
8351
|
const getHeaders = () => {
|
|
8246
8352
|
return state.headers.map((d, index) => {
|
|
8247
|
-
return jsx("li", Object.assign({ className: "nav-item" }, { children: jsx("a", Object.assign({ className: `nav-link ${state.selectedTab === d ? 'active' : ''}`, onClick: () => tabChanged(d) }, { children: translate(d) })) }), index);
|
|
8353
|
+
return jsx("li", Object.assign({ className: "nav-item" }, { children: jsx("a", Object.assign({ className: `nav-link ${state.selectedTab === d ? 'active' : ''} ${props.disabled ? "disabled" : ""}`, onClick: () => tabChanged(d) }, { children: translate(d) })) }), index);
|
|
8248
8354
|
});
|
|
8249
8355
|
};
|
|
8250
8356
|
const onValueChange = (val) => {
|
|
@@ -8286,7 +8392,7 @@ const Cron = (props) => {
|
|
|
8286
8392
|
throw new Error('Value does not match any available headers.');
|
|
8287
8393
|
}
|
|
8288
8394
|
const CronComponent = selectedMetaData.component;
|
|
8289
|
-
return jsx(CronComponent, { translate: translate, value: state.value, onChange: onValueChange });
|
|
8395
|
+
return jsx(CronComponent, { translate: translate, value: state.value, onChange: onValueChange, disabled: props.disabled });
|
|
8290
8396
|
};
|
|
8291
8397
|
const translate = (key) => {
|
|
8292
8398
|
let translatedText = key;
|