react-cron-generator 2.0.10 → 2.0.12

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/build/index.js CHANGED
@@ -26,16 +26,56 @@ var cronstrueI18n = {exports: {}};
26
26
  this.monthStartIndexZero = monthStartIndexZero;
27
27
  }
28
28
  CronParser.prototype.parse = function () {
29
- var parsed = this.extractParts(this.expression);
29
+ var _a;
30
+ var parsed;
31
+ var expression = (_a = this.expression) !== null && _a !== void 0 ? _a : '';
32
+ if (expression.startsWith('@')) {
33
+ var special = this.parseSpecial(this.expression);
34
+ parsed = this.extractParts(special);
35
+ }
36
+ else {
37
+ parsed = this.extractParts(this.expression);
38
+ }
30
39
  this.normalize(parsed);
31
40
  this.validate(parsed);
32
41
  return parsed;
33
42
  };
43
+ CronParser.prototype.parseSpecial = function (expression) {
44
+ var specialExpressions = {
45
+ '@yearly': '0 0 1 1 *',
46
+ '@annually': '0 0 1 1 *',
47
+ '@monthly': '0 0 1 * *',
48
+ '@weekly': '0 0 * * 0',
49
+ '@daily': '0 0 * * *',
50
+ '@midnight': '0 0 * * *',
51
+ '@hourly': '0 * * * *'
52
+ };
53
+ var special = specialExpressions[expression];
54
+ if (!special) {
55
+ throw new Error('Unknown special expression.');
56
+ }
57
+ return special;
58
+ };
34
59
  CronParser.prototype.extractParts = function (expression) {
35
60
  if (!this.expression) {
36
- throw new Error("Expression is empty");
61
+ throw new Error("cron expression is empty");
37
62
  }
38
63
  var parsed = expression.trim().split(/[ ]+/);
64
+ for (var i = 0; i < parsed.length; i++) {
65
+ if (parsed[i].includes(",")) {
66
+ var arrayElement = parsed[i]
67
+ .split(",")
68
+ .map(function (item) { return item.trim(); })
69
+ .filter(function (item) { return item !== ""; })
70
+ .map(function (item) { return (!isNaN(Number(item)) ? Number(item) : item); })
71
+ .filter(function (item) { return item !== null && item !== ""; });
72
+ if (arrayElement.length === 0) {
73
+ arrayElement.push("*");
74
+ }
75
+ arrayElement.sort(function (a, b) { return (a !== null && b !== null ? a - b : 0); });
76
+ parsed[i] = arrayElement.map(function (item) { return (item !== null ? item.toString() : ""); }).join(",");
77
+ }
78
+ }
39
79
  if (parsed.length < 5) {
40
80
  throw new Error("Expression has only ".concat(parsed.length, " part").concat(parsed.length == 1 ? "" : "s", ". At least 5 parts are required."));
41
81
  }
@@ -413,9 +453,26 @@ var cronstrueI18n = {exports: {}};
413
453
  else if (s.indexOf("L") > -1) {
414
454
  exp = exp.replace("L", "");
415
455
  }
456
+ var parsedExp = parseInt(exp);
457
+ if (_this.options.tzOffset) {
458
+ var hourExpression = _this.expressionParts[2];
459
+ var hour = parseInt(hourExpression) + (_this.options.tzOffset ? _this.options.tzOffset : 0);
460
+ if (hour >= 24) {
461
+ parsedExp++;
462
+ }
463
+ else if (hour < 0) {
464
+ parsedExp--;
465
+ }
466
+ if (parsedExp > 6) {
467
+ parsedExp = 0;
468
+ }
469
+ else if (parsedExp < 0) {
470
+ parsedExp = 6;
471
+ }
472
+ }
416
473
  var description = _this.i18n.daysOfTheWeekInCase
417
- ? _this.i18n.daysOfTheWeekInCase(form)[parseInt(exp)]
418
- : daysOfWeekNames[parseInt(exp)];
474
+ ? _this.i18n.daysOfTheWeekInCase(form)[parsedExp]
475
+ : daysOfWeekNames[parsedExp];
419
476
  if (s.indexOf("#") > -1) {
420
477
  var dayOfWeekOfMonthDescription = null;
421
478
  var dayOfWeekOfMonthNumber = s.substring(s.indexOf("#") + 1);
@@ -635,7 +692,25 @@ var cronstrueI18n = {exports: {}};
635
692
  return description;
636
693
  };
637
694
  ExpressionDescriptor.prototype.formatTime = function (hourExpression, minuteExpression, secondExpression) {
638
- var hour = parseInt(hourExpression) + (this.options.tzOffset ? this.options.tzOffset : 0);
695
+ var hourOffset = 0;
696
+ var minuteOffset = 0;
697
+ if (this.options.tzOffset) {
698
+ hourOffset = this.options.tzOffset > 0 ? Math.floor(this.options.tzOffset) : Math.ceil(this.options.tzOffset);
699
+ minuteOffset = (parseFloat((this.options.tzOffset % 1).toFixed(2)));
700
+ if (minuteOffset != 0) {
701
+ minuteOffset *= 60;
702
+ }
703
+ }
704
+ var hour = parseInt(hourExpression) + (hourOffset);
705
+ var minute = parseInt(minuteExpression) + (minuteOffset);
706
+ if (minute >= 60) {
707
+ minute -= 60;
708
+ hour += 1;
709
+ }
710
+ else if (minute < 0) {
711
+ minute += 60;
712
+ hour -= 1;
713
+ }
639
714
  if (hour >= 24) {
640
715
  hour = hour - 24;
641
716
  }
@@ -654,7 +729,6 @@ var cronstrueI18n = {exports: {}};
654
729
  hour = 12;
655
730
  }
656
731
  }
657
- var minute = minuteExpression;
658
732
  var second = "";
659
733
  if (secondExpression) {
660
734
  second = ":".concat(("00" + secondExpression).substring(secondExpression.length));
@@ -999,7 +1073,7 @@ var cronstrueI18n = {exports: {}};
999
1073
  return null;
1000
1074
  };
1001
1075
  ar.prototype.use24HourTimeFormatByDefault = function () {
1002
- return false;
1076
+ return true;
1003
1077
  };
1004
1078
  ar.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
1005
1079
  return "حدث خطأ في إنشاء وصف المصطلح٠ تأكد من تركيب مصطلح الكرون";
@@ -1187,7 +1261,7 @@ var cronstrueI18n = {exports: {}};
1187
1261
  return null;
1188
1262
  };
1189
1263
  be.prototype.use24HourTimeFormatByDefault = function () {
1190
- return true;
1264
+ return false;
1191
1265
  };
1192
1266
  be.prototype.everyMinute = function () {
1193
1267
  return "кожную хвіліну";
@@ -1563,7 +1637,7 @@ var cronstrueI18n = {exports: {}};
1563
1637
  return null;
1564
1638
  };
1565
1639
  ca.prototype.use24HourTimeFormatByDefault = function () {
1566
- return false;
1640
+ return true;
1567
1641
  };
1568
1642
  ca.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
1569
1643
  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 +2565,7 @@ var cronstrueI18n = {exports: {}};
2491
2565
  return null;
2492
2566
  };
2493
2567
  es.prototype.use24HourTimeFormatByDefault = function () {
2494
- return false;
2568
+ return true;
2495
2569
  };
2496
2570
  es.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
2497
2571
  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 +2916,7 @@ var cronstrueI18n = {exports: {}};
2842
2916
  function fi() {
2843
2917
  }
2844
2918
  fi.prototype.use24HourTimeFormatByDefault = function () {
2845
- return false;
2919
+ return true;
2846
2920
  };
2847
2921
  fi.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
2848
2922
  return "Virhe kuvauksen generoinnissa. Tarkista cron-syntaksi.";
@@ -3408,7 +3482,7 @@ var cronstrueI18n = {exports: {}};
3408
3482
  return null;
3409
3483
  };
3410
3484
  hu.prototype.use24HourTimeFormatByDefault = function () {
3411
- return false;
3485
+ return true;
3412
3486
  };
3413
3487
  hu.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
3414
3488
  return "Hiba történt a kifejezésleírás generálásakor. Ellenőrizze a cron kifejezés szintaxisát.";
@@ -3596,7 +3670,7 @@ var cronstrueI18n = {exports: {}};
3596
3670
  return null;
3597
3671
  };
3598
3672
  id.prototype.use24HourTimeFormatByDefault = function () {
3599
- return false;
3673
+ return true;
3600
3674
  };
3601
3675
  id.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
3602
3676
  return "Terjadi kesalahan saat membuat deskripsi ekspresi. Periksa sintaks ekspresi cron.";
@@ -3957,7 +4031,7 @@ var cronstrueI18n = {exports: {}};
3957
4031
  function ja() {
3958
4032
  }
3959
4033
  ja.prototype.use24HourTimeFormatByDefault = function () {
3960
- return false;
4034
+ return true;
3961
4035
  };
3962
4036
  ja.prototype.everyMinute = function () {
3963
4037
  return "毎分";
@@ -4204,7 +4278,7 @@ var cronstrueI18n = {exports: {}};
4204
4278
  return "%s분마다";
4205
4279
  };
4206
4280
  ko.prototype.minutesX0ThroughX1PastTheHour = function () {
4207
- return "정시 후 %s분에서 %s까지";
4281
+ return "정시 후 %s분에서 %s분까지";
4208
4282
  };
4209
4283
  ko.prototype.atX0MinutesPastTheHour = function () {
4210
4284
  return "정시 후 %s분에서";
@@ -4267,7 +4341,7 @@ var cronstrueI18n = {exports: {}};
4267
4341
  return ", %s개월마다";
4268
4342
  };
4269
4343
  ko.prototype.commaOnlyInX0 = function () {
4270
- return ", %s에서만";
4344
+ return ", %s에만";
4271
4345
  };
4272
4346
  ko.prototype.commaOnTheLastDayOfTheMonth = function () {
4273
4347
  return ", 해당 월의 마지막 날에";
@@ -4282,7 +4356,7 @@ var cronstrueI18n = {exports: {}};
4282
4356
  return "첫 번째 평일";
4283
4357
  };
4284
4358
  ko.prototype.weekdayNearestDayX0 = function () {
4285
- return "평일 가장 가까운 날 %s";
4359
+ return "%s일과 가장 가까운 평일";
4286
4360
  };
4287
4361
  ko.prototype.commaOnTheX0OfTheMonth = function () {
4288
4362
  return ", 해당 월의 %s에";
@@ -4291,7 +4365,7 @@ var cronstrueI18n = {exports: {}};
4291
4365
  return ", %s일마다";
4292
4366
  };
4293
4367
  ko.prototype.commaBetweenDayX0AndX1OfTheMonth = function () {
4294
- return ", 해당 월의 %s %s일 사이";
4368
+ return ", 해당 월의 %s일에서 %s일까지";
4295
4369
  };
4296
4370
  ko.prototype.commaOnDayX0OfTheMonth = function () {
4297
4371
  return ", 해당 월의 %s일에";
@@ -4531,7 +4605,7 @@ var cronstrueI18n = {exports: {}};
4531
4605
  return null;
4532
4606
  };
4533
4607
  nb.prototype.use24HourTimeFormatByDefault = function () {
4534
- return false;
4608
+ return true;
4535
4609
  };
4536
4610
  nb.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
4537
4611
  return "En feil inntraff ved generering av uttrykksbeskrivelse. Sjekk cron syntaks.";
@@ -4716,7 +4790,7 @@ var cronstrueI18n = {exports: {}};
4716
4790
  return null;
4717
4791
  };
4718
4792
  nl.prototype.use24HourTimeFormatByDefault = function () {
4719
- return false;
4793
+ return true;
4720
4794
  };
4721
4795
  nl.prototype.everyMinute = function () {
4722
4796
  return "elke minuut";
@@ -4728,13 +4802,13 @@ var cronstrueI18n = {exports: {}};
4728
4802
  return "Er is een fout opgetreden bij het vertalen van de gegevens. Controleer de gegevens.";
4729
4803
  };
4730
4804
  nl.prototype.atSpace = function () {
4731
- return "Op ";
4805
+ return "Om ";
4732
4806
  };
4733
4807
  nl.prototype.everyMinuteBetweenX0AndX1 = function () {
4734
4808
  return "Elke minuut tussen %s en %s";
4735
4809
  };
4736
4810
  nl.prototype.at = function () {
4737
- return "Op";
4811
+ return "Om";
4738
4812
  };
4739
4813
  nl.prototype.spaceAnd = function () {
4740
4814
  return " en";
@@ -4767,7 +4841,7 @@ var cronstrueI18n = {exports: {}};
4767
4841
  return "tussen %s en %s";
4768
4842
  };
4769
4843
  nl.prototype.atX0 = function () {
4770
- return "op %s";
4844
+ return "om %s";
4771
4845
  };
4772
4846
  nl.prototype.commaEveryDay = function () {
4773
4847
  return ", elke dag";
@@ -5086,7 +5160,7 @@ var cronstrueI18n = {exports: {}};
5086
5160
  return null;
5087
5161
  };
5088
5162
  pt_BR.prototype.use24HourTimeFormatByDefault = function () {
5089
- return false;
5163
+ return true;
5090
5164
  };
5091
5165
  pt_BR.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
5092
5166
  return "Ocorreu um erro ao gerar a descrição da expressão Cron.";
@@ -6424,7 +6498,7 @@ var cronstrueI18n = {exports: {}};
6424
6498
  return null;
6425
6499
  };
6426
6500
  sw.prototype.use24HourTimeFormatByDefault = function () {
6427
- return false;
6501
+ return true;
6428
6502
  };
6429
6503
  sw.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
6430
6504
  return "Kuna tatizo wakati wa kutunga msemo. Angalia cron expression syntax.";
@@ -7167,7 +7241,7 @@ var cronstrueI18n = {exports: {}};
7167
7241
  return null;
7168
7242
  };
7169
7243
  vi.prototype.use24HourTimeFormatByDefault = function () {
7170
- return false;
7244
+ return true;
7171
7245
  };
7172
7246
  vi.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
7173
7247
  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.";
@@ -7460,7 +7534,7 @@ var cronstrueI18n = {exports: {}};
7460
7534
  return ", 仅%s";
7461
7535
  };
7462
7536
  zh_CN.prototype.commaAndOnX0 = function () {
7463
- return ", 并且为%s";
7537
+ return ", 或者为%s";
7464
7538
  };
7465
7539
  zh_CN.prototype.commaEveryX0Months = function () {
7466
7540
  return ", 每隔 %s 个月";
@@ -7545,7 +7619,7 @@ var cronstrueI18n = {exports: {}};
7545
7619
  return ", 從 %s 年至 %s 年";
7546
7620
  };
7547
7621
  zh_TW.prototype.use24HourTimeFormatByDefault = function () {
7548
- return false;
7622
+ return true;
7549
7623
  };
7550
7624
  zh_TW.prototype.everyMinute = function () {
7551
7625
  return "每分鐘";
@@ -7641,7 +7715,7 @@ var cronstrueI18n = {exports: {}};
7641
7715
  return ", 僅在 %s";
7642
7716
  };
7643
7717
  zh_TW.prototype.commaAndOnX0 = function () {
7644
- return ", %s";
7718
+ return ", %s";
7645
7719
  };
7646
7720
  zh_TW.prototype.commaEveryX0Months = function () {
7647
7721
  return ", 每 %s 月";
@@ -7865,6 +7939,9 @@ var i18n = cronstrueWithLocales;
7865
7939
 
7866
7940
  const MinutesCron = (props) => {
7867
7941
  const onChange = (e) => {
7942
+ if (props.disabled) {
7943
+ return;
7944
+ }
7868
7945
  if ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 60) || e.target.value === '') {
7869
7946
  let val = ['0', '*', '*', '*', '*', '?', '*'];
7870
7947
  val[1] = e.target.value ? `0/${e.target.value}` : val[1];
@@ -7872,7 +7949,7 @@ const MinutesCron = (props) => {
7872
7949
  }
7873
7950
  };
7874
7951
  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)')] })));
7952
+ 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
7953
  };
7877
7954
 
7878
7955
  const MinutesSelect = (props) => {
@@ -7883,7 +7960,7 @@ const MinutesSelect = (props) => {
7883
7960
  }
7884
7961
  return options;
7885
7962
  };
7886
- return (jsx("select", Object.assign({ disabled: props.disabled === true ? true : false, className: "minutes", onChange: props.onChange, value: props.value }, { children: buildOptions() })));
7963
+ return (jsx("select", Object.assign({ disabled: props.disabled, className: "minutes", onChange: props.onChange, value: props.value }, { children: buildOptions() })));
7887
7964
  };
7888
7965
 
7889
7966
  const HourSelect = (props) => {
@@ -7894,7 +7971,7 @@ const HourSelect = (props) => {
7894
7971
  }
7895
7972
  return options;
7896
7973
  };
7897
- return (jsx("select", Object.assign({ disabled: props.disabled === true ? true : false, className: "hours", onChange: props.onChange, value: props.value }, { children: buildOptions() })));
7974
+ return (jsx("select", Object.assign({ disabled: props.disabled, className: "hours", onChange: props.onChange, value: props.value }, { children: buildOptions() })));
7898
7975
  };
7899
7976
 
7900
7977
  const DailyCron = (props) => {
@@ -7903,15 +7980,24 @@ const DailyCron = (props) => {
7903
7980
  setState(Object.assign(Object.assign({}, state), { every: props.value[3] !== '?' }));
7904
7981
  }, []);
7905
7982
  const onDayChange = (e) => {
7983
+ if (props.disabled) {
7984
+ return;
7985
+ }
7906
7986
  if (!e.target.value || (parseInt(e.target.value) > 0 && parseInt(e.target.value) < 32)) {
7907
7987
  // props.value = ['0', getValueByIndex(1), getValueByIndex(1),'*','*','?','*'];
7908
7988
  onValueChange(3, (e.target.value ? `1/${e.target.value}` : e.target.value));
7909
7989
  }
7910
7990
  };
7911
7991
  const onAtHourChange = (e) => {
7992
+ if (props.disabled) {
7993
+ return;
7994
+ }
7912
7995
  onValueChange(2, e.target.value);
7913
7996
  };
7914
7997
  const onAtMinuteChange = (e) => {
7998
+ if (props.disabled) {
7999
+ return;
8000
+ }
7915
8001
  onValueChange(1, e.target.value);
7916
8002
  };
7917
8003
  const onValueChange = (cronPosition, value) => {
@@ -7920,7 +8006,11 @@ const DailyCron = (props) => {
7920
8006
  props.onChange(val);
7921
8007
  };
7922
8008
  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) => { setState(Object.assign(Object.assign({}, state), { every: true })); props.onChange(); }, value: "1", name: "DailyRadio", checked: state.every }), jsx("span", { children: translateFn('Every') }), jsx("input", { disabled: !state.every, 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) => { 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 }), jsx("span", { children: translateFn('Every week day') })] })), jsx("span", { children: translateFn('Start time') }), jsx(HourSelect, { onChange: onAtHourChange, value: props.value[2] }), jsx(MinutesSelect, { onChange: onAtMinuteChange, value: props.value[1] })] })));
8009
+ 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) {
8010
+ return;
8011
+ } 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) {
8012
+ return;
8013
+ } 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
8014
  };
7925
8015
 
7926
8016
  const HourlyCron = (props) => {
@@ -7931,7 +8021,7 @@ const HourlyCron = (props) => {
7931
8021
  }
7932
8022
  }, []);
7933
8023
  const onHourChange = (e) => {
7934
- if (state.every && ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 24) || e.target.value === '')) {
8024
+ if (!props.disabled && state.every && ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 24) || e.target.value === '')) {
7935
8025
  let val = ['0', '0', '*', '*', '*', '?', '*'];
7936
8026
  val[1] = props.value[1];
7937
8027
  val[2] = e.target.value ? `0/${e.target.value}` : e.target.value;
@@ -7940,7 +8030,7 @@ const HourlyCron = (props) => {
7940
8030
  }
7941
8031
  };
7942
8032
  const onMinuteChange = (e) => {
7943
- if (state.every && ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 60) || e.target.value === '')) {
8033
+ if (!props.disabled && state.every && ((parseInt(e.target.value) > 0 && parseInt(e.target.value) < 60) || e.target.value === '')) {
7944
8034
  let val = ['0', '0', '*', '*', '*', '?', '*'];
7945
8035
  val[1] = e.target.value;
7946
8036
  val[2] = props.value[2];
@@ -7949,33 +8039,52 @@ const HourlyCron = (props) => {
7949
8039
  }
7950
8040
  };
7951
8041
  const onAtHourChange = (e) => {
8042
+ if (props.disabled) {
8043
+ return;
8044
+ }
7952
8045
  let val = ['0', props.value[1], '*', '1/1', '*', '?', '*'];
7953
8046
  val[2] = `${e.target.value}`;
7954
8047
  props.onChange(val);
7955
8048
  };
7956
8049
  const onAtMinuteChange = (e) => {
8050
+ if (props.disabled) {
8051
+ return;
8052
+ }
7957
8053
  let val = ['0', '*', props.value[2], '1/1', '*', '?', '*'];
7958
8054
  val[1] = `${e.target.value}`;
7959
8055
  props.onChange(val);
7960
8056
  };
7961
8057
  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) => { setState(Object.assign(Object.assign({}, state), { every: true })); props.onChange(['0', '0', '0/1', '1/1', '*', '?', '*']); }, checked: state.every }), jsxs("span", { children: [translateFn('Every'), " "] }), jsx("input", { disabled: !state.every, 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, 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) => { setState({ every: false }); props.onChange(); }, checked: !state.every }), jsx("span", Object.assign({ className: "" }, { children: translateFn('At') })), jsx(HourSelect, { disabled: state.every, onChange: onAtHourChange, value: props.value[2] }), jsx(MinutesSelect, { disabled: state.every, onChange: onAtMinuteChange, value: props.value[1] })] })) }))] })) })));
8058
+ 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) {
8059
+ return;
8060
+ } 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) {
8061
+ return;
8062
+ } 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
8063
  };
7964
8064
 
7965
8065
  const WeeklyCron = (props) => {
7966
8066
  const onAtHourChange = (e) => {
8067
+ if (props.disabled) {
8068
+ return;
8069
+ }
7967
8070
  let val = props.value;
7968
8071
  val[0] = '0';
7969
8072
  val[2] = `${e.target.value}`;
7970
8073
  props.onChange(val);
7971
8074
  };
7972
8075
  const onAtMinuteChange = (e) => {
8076
+ if (props.disabled) {
8077
+ return;
8078
+ }
7973
8079
  let val = props.value;
7974
8080
  val[0] = '0';
7975
8081
  val[1] = `${e.target.value}`;
7976
8082
  props.onChange(val);
7977
8083
  };
7978
8084
  const onCheck = (e) => {
8085
+ if (props.disabled) {
8086
+ return;
8087
+ }
7979
8088
  let val = props.value;
7980
8089
  val[0] = '0';
7981
8090
  if (e.target.checked) {
@@ -8009,7 +8118,7 @@ const WeeklyCron = (props) => {
8009
8118
  val[5] = valFive;
8010
8119
  };
8011
8120
  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] })] })));
8121
+ 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
8122
  };
8014
8123
 
8015
8124
  const MonthlyCron = (props) => {
@@ -8031,6 +8140,9 @@ const MonthlyCron = (props) => {
8031
8140
  setState(Object.assign(Object.assign({}, state), { every: every }));
8032
8141
  }, []);
8033
8142
  const onDayChange = (e) => {
8143
+ if (props.disabled) {
8144
+ return;
8145
+ }
8034
8146
  if (((parseInt(e.target.value) > 0 && parseInt(e.target.value) <= 31)) || e.target.value === "") {
8035
8147
  let val = ['0', props.value[1] === '*' ? '0' : props.value[1], props.value[2] === '*' ? '0' : props.value[2], props.value[3], '1/1', '?', '*'];
8036
8148
  val[3] = `${e.target.value}`;
@@ -8038,6 +8150,9 @@ const MonthlyCron = (props) => {
8038
8150
  }
8039
8151
  };
8040
8152
  const onLastDayChange = (e) => {
8153
+ if (props.disabled) {
8154
+ return;
8155
+ }
8041
8156
  if (((parseInt(e.target.value) >> 0 && parseInt(e.target.value) <= 31)) || e.target.value === "") {
8042
8157
  let val = ['0', props.value[1] === '*' ? '0' : props.value[1], props.value[2] === '*' ? '0' : props.value[2], props.value[3], '1/1', '?', '*'];
8043
8158
  if (e.target.value === '') {
@@ -8050,26 +8165,42 @@ const MonthlyCron = (props) => {
8050
8165
  }
8051
8166
  };
8052
8167
  const onAtHourChange = (e) => {
8168
+ if (props.disabled) {
8169
+ return;
8170
+ }
8053
8171
  let val = props.value;
8054
8172
  val[2] = `${e.target.value}`;
8055
8173
  props.onChange(val);
8056
8174
  };
8057
8175
  const onAtMinuteChange = (e) => {
8176
+ if (props.disabled) {
8177
+ return;
8178
+ }
8058
8179
  let val = props.value;
8059
8180
  val[1] = `${e.target.value}`;
8060
8181
  props.onChange(val);
8061
8182
  };
8062
8183
  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) => { 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 }), translateFn('Day'), jsx("input", { readOnly: state.every !== "1", type: "number", value: props.value[3], onChange: onDayChange }), translateFn('of every month(s)')] })), jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { onChange: (e) => { 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 }), translateFn('Last day of every month')] })), jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { onChange: (e) => { 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 }), translateFn('On the last weekday of every month')] })), jsxs("div", Object.assign({ className: "well well-small" }, { children: [jsx("input", { type: "radio", onChange: (e) => { 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 }), 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 }), translateFn('day(s) before the end of the month')] })), translateFn('Start time'), jsx(HourSelect, { onChange: onAtHourChange, value: props.value[2] }), jsx(MinutesSelect, { onChange: onAtMinuteChange, value: props.value[1] })] })));
8184
+ 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) {
8185
+ return;
8186
+ } 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) {
8187
+ return;
8188
+ } 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) {
8189
+ return;
8190
+ } 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) {
8191
+ return;
8192
+ } 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
8193
  };
8065
8194
 
8066
8195
  const CustomCron = (props) => {
8067
8196
  const onChange = (e) => {
8197
+ if (props.disabled)
8198
+ return;
8068
8199
  props.onChange(e.target.value.replace(/,/g, '!').split(" "));
8069
8200
  };
8070
8201
  const translateFn = props.translate;
8071
8202
  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 })] })));
8203
+ return (jsxs("div", Object.assign({ className: "well" }, { children: [translateFn('Expression'), " ", jsx("input", { type: "text", onChange: onChange, value: val, disabled: props.disabled })] })));
8073
8204
  };
8074
8205
 
8075
8206
  const HEADER = {
@@ -8177,7 +8308,7 @@ function styleInject(css, ref) {
8177
8308
  }
8178
8309
  }
8179
8310
 
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}";
8311
+ 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.cron_builder .nav.nav-tabs {\n list-style: none;\n display: flex;\n margin: 0 0;\n padding-left: 0;\n}\n.cron_builder .row {\n display: flex;\n}\n.cron_builder .col-sm-6 {\n flex: 0 0 50%;\n}\n.cron_builder .min_height_auto {\n min-height: auto !important;\n}\n.cron_builder {\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}\n";
8181
8312
  styleInject(css_248z);
8182
8313
 
8183
8314
  const defaultCron = '0 0 00 1/1 * ? *';
@@ -8238,13 +8369,13 @@ const Cron = (props) => {
8238
8369
  setState(prevState);
8239
8370
  };
8240
8371
  const tabChanged = (tab) => {
8241
- if (state.selectedTab !== tab) {
8372
+ if (state.selectedTab !== tab && !props.disabled) {
8242
8373
  setState(Object.assign(Object.assign({}, state), { selectedTab: tab, value: defaultValue(tab) }));
8243
8374
  }
8244
8375
  };
8245
8376
  const getHeaders = () => {
8246
8377
  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);
8378
+ 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
8379
  });
8249
8380
  };
8250
8381
  const onValueChange = (val) => {
@@ -8286,7 +8417,7 @@ const Cron = (props) => {
8286
8417
  throw new Error('Value does not match any available headers.');
8287
8418
  }
8288
8419
  const CronComponent = selectedMetaData.component;
8289
- return jsx(CronComponent, { translate: translate, value: state.value, onChange: onValueChange });
8420
+ return jsx(CronComponent, { translate: translate, value: state.value, onChange: onValueChange, disabled: props.disabled });
8290
8421
  };
8291
8422
  const translate = (key) => {
8292
8423
  let translatedText = key;