react-cron-generator 2.0.8 → 2.0.10

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
@@ -6,7 +6,7 @@ var cronstrueI18n = {exports: {}};
6
6
  (function (module, exports) {
7
7
  (function webpackUniversalModuleDefinition(root, factory) {
8
8
  module.exports = factory();
9
- })(globalThis, function() {
9
+ })(globalThis, () => {
10
10
  return /******/ (() => { // webpackBootstrap
11
11
  /******/ var __webpack_modules__ = ({
12
12
 
@@ -234,7 +234,7 @@ var cronstrueI18n = {exports: {}};
234
234
  }
235
235
  }
236
236
  ExpressionDescriptor.toString = function (expression, _a) {
237
- var _b = _a === void 0 ? {} : _a, _c = _b.throwExceptionOnParseError, throwExceptionOnParseError = _c === void 0 ? true : _c, _d = _b.verbose, verbose = _d === void 0 ? false : _d, _e = _b.dayOfWeekStartIndexZero, dayOfWeekStartIndexZero = _e === void 0 ? true : _e, _f = _b.monthStartIndexZero, monthStartIndexZero = _f === void 0 ? false : _f, use24HourTimeFormat = _b.use24HourTimeFormat, _g = _b.locale, locale = _g === void 0 ? null : _g;
237
+ var _b = _a === void 0 ? {} : _a, _c = _b.throwExceptionOnParseError, throwExceptionOnParseError = _c === void 0 ? true : _c, _d = _b.verbose, verbose = _d === void 0 ? false : _d, _e = _b.dayOfWeekStartIndexZero, dayOfWeekStartIndexZero = _e === void 0 ? true : _e, _f = _b.monthStartIndexZero, monthStartIndexZero = _f === void 0 ? false : _f, use24HourTimeFormat = _b.use24HourTimeFormat, _g = _b.locale, locale = _g === void 0 ? null : _g, _h = _b.tzOffset, tzOffset = _h === void 0 ? 0 : _h;
238
238
  var options = {
239
239
  throwExceptionOnParseError: throwExceptionOnParseError,
240
240
  verbose: verbose,
@@ -242,6 +242,7 @@ var cronstrueI18n = {exports: {}};
242
242
  monthStartIndexZero: monthStartIndexZero,
243
243
  use24HourTimeFormat: use24HourTimeFormat,
244
244
  locale: locale,
245
+ tzOffset: tzOffset
245
246
  };
246
247
  var descripter = new ExpressionDescriptor(expression, options);
247
248
  return descripter.getFullDescription();
@@ -407,31 +408,18 @@ var cronstrueI18n = {exports: {}};
407
408
  description = this.getSegmentDescription(this.expressionParts[5], this.i18n.commaEveryDay(), function (s, form) {
408
409
  var exp = s;
409
410
  if (s.indexOf("#") > -1) {
410
- exp = s.substr(0, s.indexOf("#"));
411
+ exp = s.substring(0, s.indexOf("#"));
411
412
  }
412
413
  else if (s.indexOf("L") > -1) {
413
414
  exp = exp.replace("L", "");
414
415
  }
415
- return _this.i18n.daysOfTheWeekInCase
416
+ var description = _this.i18n.daysOfTheWeekInCase
416
417
  ? _this.i18n.daysOfTheWeekInCase(form)[parseInt(exp)]
417
418
  : daysOfWeekNames[parseInt(exp)];
418
- }, function (s) {
419
- if (parseInt(s) == 1) {
420
- return "";
421
- }
422
- else {
423
- return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0DaysOfTheWeek(s), s);
424
- }
425
- }, function (s) {
426
- var beginFrom = s.substring(0, s.indexOf("-"));
427
- var domSpecified = _this.expressionParts[3] != "*";
428
- return domSpecified ? _this.i18n.commaAndX0ThroughX1(beginFrom) : _this.i18n.commaX0ThroughX1(beginFrom);
429
- }, function (s) {
430
- var format = null;
431
419
  if (s.indexOf("#") > -1) {
420
+ var dayOfWeekOfMonthDescription = null;
432
421
  var dayOfWeekOfMonthNumber = s.substring(s.indexOf("#") + 1);
433
422
  var dayOfWeekNumber = s.substring(0, s.indexOf("#"));
434
- var dayOfWeekOfMonthDescription = null;
435
423
  switch (dayOfWeekOfMonthNumber) {
436
424
  case "1":
437
425
  dayOfWeekOfMonthDescription = _this.i18n.first(dayOfWeekNumber);
@@ -449,10 +437,25 @@ var cronstrueI18n = {exports: {}};
449
437
  dayOfWeekOfMonthDescription = _this.i18n.fifth(dayOfWeekNumber);
450
438
  break;
451
439
  }
452
- format =
453
- _this.i18n.commaOnThe(dayOfWeekOfMonthNumber) +
454
- dayOfWeekOfMonthDescription +
455
- _this.i18n.spaceX0OfTheMonth();
440
+ description = dayOfWeekOfMonthDescription + " " + description;
441
+ }
442
+ return description;
443
+ }, function (s) {
444
+ if (parseInt(s) == 1) {
445
+ return "";
446
+ }
447
+ else {
448
+ return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0DaysOfTheWeek(s), s);
449
+ }
450
+ }, function (s) {
451
+ var beginFrom = s.substring(0, s.indexOf("-"));
452
+ var domSpecified = _this.expressionParts[3] != "*";
453
+ return domSpecified ? _this.i18n.commaAndX0ThroughX1(beginFrom) : _this.i18n.commaX0ThroughX1(beginFrom);
454
+ }, function (s) {
455
+ var format = null;
456
+ if (s.indexOf("#") > -1) {
457
+ var dayOfWeekOfMonthNumber = s.substring(s.indexOf("#") + 1);
458
+ format = _this.i18n.commaOnThe(dayOfWeekOfMonthNumber).trim() + _this.i18n.spaceX0OfTheMonth();
456
459
  }
457
460
  else if (s.indexOf("L") > -1) {
458
461
  format = _this.i18n.commaOnTheLastX0OfTheMonth(s.replace("L", ""));
@@ -632,7 +635,13 @@ var cronstrueI18n = {exports: {}};
632
635
  return description;
633
636
  };
634
637
  ExpressionDescriptor.prototype.formatTime = function (hourExpression, minuteExpression, secondExpression) {
635
- var hour = parseInt(hourExpression);
638
+ var hour = parseInt(hourExpression) + (this.options.tzOffset ? this.options.tzOffset : 0);
639
+ if (hour >= 24) {
640
+ hour = hour - 24;
641
+ }
642
+ else if (hour < 0) {
643
+ hour = 24 + hour;
644
+ }
636
645
  var period = "";
637
646
  var setPeriodBeforeTime = false;
638
647
  if (!this.options.use24HourTimeFormat) {
@@ -677,7 +686,7 @@ var cronstrueI18n = {exports: {}};
677
686
 
678
687
 
679
688
  Object.defineProperty(exports, "__esModule", ({ value: true }));
680
- exports.th = exports.af = exports.hu = exports.be = exports.ca = exports.fa = exports.sw = exports.sl = exports.fi = exports.sk = exports.cs = exports.he = exports.ja = exports.zh_TW = exports.zh_CN = exports.uk = exports.tr = exports.ru = exports.ro = exports.pt_PT = exports.pt_BR = exports.pl = exports.sv = exports.nb = exports.nl = exports.ko = exports.id = exports.it = exports.fr = exports.es = exports.de = exports.da = exports.en = void 0;
689
+ exports.bg = exports.my = exports.vi = exports.ar = exports.th = exports.af = exports.hu = exports.be = exports.ca = exports.fa = exports.sw = exports.sl = exports.fi = exports.sk = exports.cs = exports.he = exports.ja = exports.zh_TW = exports.zh_CN = exports.uk = exports.tr = exports.ru = exports.ro = exports.pt_PT = exports.pt_BR = exports.pl = exports.sv = exports.nb = exports.nl = exports.ko = exports.id = exports.it = exports.fr = exports.es = exports.de = exports.da = exports.en = void 0;
681
690
  var en_1 = __webpack_require__(751);
682
691
  Object.defineProperty(exports, "en", ({ enumerable: true, get: function () { return en_1.en; } }));
683
692
  var da_1 = __webpack_require__(904);
@@ -744,6 +753,14 @@ var cronstrueI18n = {exports: {}};
744
753
  Object.defineProperty(exports, "af", ({ enumerable: true, get: function () { return af_1.af; } }));
745
754
  var th_1 = __webpack_require__(312);
746
755
  Object.defineProperty(exports, "th", ({ enumerable: true, get: function () { return th_1.th; } }));
756
+ var ar_1 = __webpack_require__(935);
757
+ Object.defineProperty(exports, "ar", ({ enumerable: true, get: function () { return ar_1.ar; } }));
758
+ var vi_1 = __webpack_require__(533);
759
+ Object.defineProperty(exports, "vi", ({ enumerable: true, get: function () { return vi_1.vi; } }));
760
+ var my_1 = __webpack_require__(863);
761
+ Object.defineProperty(exports, "my", ({ enumerable: true, get: function () { return my_1.my; } }));
762
+ var bg_1 = __webpack_require__(431);
763
+ Object.defineProperty(exports, "bg", ({ enumerable: true, get: function () { return bg_1.bg; } }));
747
764
 
748
765
 
749
766
  /***/ }),
@@ -958,6 +975,194 @@ var cronstrueI18n = {exports: {}};
958
975
  exports.af = af;
959
976
 
960
977
 
978
+ /***/ }),
979
+
980
+ /***/ 935:
981
+ /***/ ((__unused_webpack_module, exports) => {
982
+
983
+
984
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
985
+ exports.ar = void 0;
986
+ var ar = (function () {
987
+ function ar() {
988
+ }
989
+ ar.prototype.atX0SecondsPastTheMinuteGt20 = function () {
990
+ return null;
991
+ };
992
+ ar.prototype.atX0MinutesPastTheHourGt20 = function () {
993
+ return null;
994
+ };
995
+ ar.prototype.commaMonthX0ThroughMonthX1 = function () {
996
+ return null;
997
+ };
998
+ ar.prototype.commaYearX0ThroughYearX1 = function () {
999
+ return null;
1000
+ };
1001
+ ar.prototype.use24HourTimeFormatByDefault = function () {
1002
+ return false;
1003
+ };
1004
+ ar.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
1005
+ return "حدث خطأ في إنشاء وصف المصطلح٠ تأكد من تركيب مصطلح الكرون";
1006
+ };
1007
+ ar.prototype.everyMinute = function () {
1008
+ return "كل دقيقة";
1009
+ };
1010
+ ar.prototype.everyHour = function () {
1011
+ return "كل ساعة";
1012
+ };
1013
+ ar.prototype.atSpace = function () {
1014
+ return " ";
1015
+ };
1016
+ ar.prototype.everyMinuteBetweenX0AndX1 = function () {
1017
+ return "كل دقيقة بين %s و %s";
1018
+ };
1019
+ ar.prototype.at = function () {
1020
+ return "";
1021
+ };
1022
+ ar.prototype.spaceAnd = function () {
1023
+ return " و";
1024
+ };
1025
+ ar.prototype.everySecond = function () {
1026
+ return "كل ثانية";
1027
+ };
1028
+ ar.prototype.everyX0Seconds = function () {
1029
+ return "كل %s ثواني";
1030
+ };
1031
+ ar.prototype.secondsX0ThroughX1PastTheMinute = function () {
1032
+ return "الثواني %s حتى %s من بداية الدقيقة";
1033
+ };
1034
+ ar.prototype.atX0SecondsPastTheMinute = function () {
1035
+ return "الثانية %s من بداية الدقيقة";
1036
+ };
1037
+ ar.prototype.everyX0Minutes = function () {
1038
+ return "كل %s دقائق";
1039
+ };
1040
+ ar.prototype.minutesX0ThroughX1PastTheHour = function () {
1041
+ return "الدقائق %s حتى %s من بداية الساعة";
1042
+ };
1043
+ ar.prototype.atX0MinutesPastTheHour = function () {
1044
+ return "الدقيقة %s من بداية الساعة";
1045
+ };
1046
+ ar.prototype.everyX0Hours = function () {
1047
+ return "كل %s ساعات";
1048
+ };
1049
+ ar.prototype.betweenX0AndX1 = function () {
1050
+ return "بين %s و %s";
1051
+ };
1052
+ ar.prototype.atX0 = function () {
1053
+ return "%s";
1054
+ };
1055
+ ar.prototype.commaEveryDay = function () {
1056
+ return "، كل يوم";
1057
+ };
1058
+ ar.prototype.commaEveryX0DaysOfTheWeek = function () {
1059
+ return "، كل %s من أيام الأسبوع";
1060
+ };
1061
+ ar.prototype.commaX0ThroughX1 = function () {
1062
+ return "، %s حتى %s";
1063
+ };
1064
+ ar.prototype.commaAndX0ThroughX1 = function () {
1065
+ return "، و %s حتى %s";
1066
+ };
1067
+ ar.prototype.first = function () {
1068
+ return "أول";
1069
+ };
1070
+ ar.prototype.second = function () {
1071
+ return "ثاني";
1072
+ };
1073
+ ar.prototype.third = function () {
1074
+ return "ثالث";
1075
+ };
1076
+ ar.prototype.fourth = function () {
1077
+ return "رابع";
1078
+ };
1079
+ ar.prototype.fifth = function () {
1080
+ return "خامس";
1081
+ };
1082
+ ar.prototype.commaOnThe = function () {
1083
+ return "، في ال";
1084
+ };
1085
+ ar.prototype.spaceX0OfTheMonth = function () {
1086
+ return " %s من الشهر";
1087
+ };
1088
+ ar.prototype.lastDay = function () {
1089
+ return "اليوم الأخير";
1090
+ };
1091
+ ar.prototype.commaOnTheLastX0OfTheMonth = function () {
1092
+ return "، في اخر %s من الشهر";
1093
+ };
1094
+ ar.prototype.commaOnlyOnX0 = function () {
1095
+ return "، %s فقط";
1096
+ };
1097
+ ar.prototype.commaAndOnX0 = function () {
1098
+ return "، وفي %s";
1099
+ };
1100
+ ar.prototype.commaEveryX0Months = function () {
1101
+ return "، كل %s أشهر";
1102
+ };
1103
+ ar.prototype.commaOnlyInX0 = function () {
1104
+ return "، %s فقط";
1105
+ };
1106
+ ar.prototype.commaOnTheLastDayOfTheMonth = function () {
1107
+ return "، في اخر يوم من الشهر";
1108
+ };
1109
+ ar.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
1110
+ return "، في اخر يوم أسبوع من الشهر";
1111
+ };
1112
+ ar.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
1113
+ return "، %s أيام قبل اخر يوم من الشهر";
1114
+ };
1115
+ ar.prototype.firstWeekday = function () {
1116
+ return "اول ايام الأسبوع";
1117
+ };
1118
+ ar.prototype.weekdayNearestDayX0 = function () {
1119
+ return "يوم الأسبوع الأقرب ليوم %s";
1120
+ };
1121
+ ar.prototype.commaOnTheX0OfTheMonth = function () {
1122
+ return "، في %s من الشهر";
1123
+ };
1124
+ ar.prototype.commaEveryX0Days = function () {
1125
+ return "، كل %s أيام";
1126
+ };
1127
+ ar.prototype.commaBetweenDayX0AndX1OfTheMonth = function () {
1128
+ return "، بين يوم %s و %s من الشهر";
1129
+ };
1130
+ ar.prototype.commaOnDayX0OfTheMonth = function () {
1131
+ return "، في اليوم %s من الشهر";
1132
+ };
1133
+ ar.prototype.commaEveryHour = function () {
1134
+ return "، كل ساعة";
1135
+ };
1136
+ ar.prototype.commaEveryX0Years = function () {
1137
+ return "، كل %s سنوات";
1138
+ };
1139
+ ar.prototype.commaStartingX0 = function () {
1140
+ return "، بداية من %s";
1141
+ };
1142
+ ar.prototype.daysOfTheWeek = function () {
1143
+ return ["الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"];
1144
+ };
1145
+ ar.prototype.monthsOfTheYear = function () {
1146
+ return [
1147
+ "يناير",
1148
+ "فبراير",
1149
+ "مارس",
1150
+ "ابريل",
1151
+ "مايو",
1152
+ "يونيو",
1153
+ "يوليو",
1154
+ "أغسطس",
1155
+ "سبتمبر",
1156
+ "أكتوبر",
1157
+ "نوفمبر",
1158
+ "ديسمبر",
1159
+ ];
1160
+ };
1161
+ return ar;
1162
+ }());
1163
+ exports.ar = ar;
1164
+
1165
+
961
1166
  /***/ }),
962
1167
 
963
1168
  /***/ 445:
@@ -1143,6 +1348,197 @@ var cronstrueI18n = {exports: {}};
1143
1348
  exports.be = be;
1144
1349
 
1145
1350
 
1351
+ /***/ }),
1352
+
1353
+ /***/ 431:
1354
+ /***/ ((__unused_webpack_module, exports) => {
1355
+
1356
+
1357
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1358
+ exports.bg = void 0;
1359
+ var getPhraseByPlural = function (str, words) {
1360
+ var strAsNumber = str != null ? Number(str) : 0;
1361
+ return strAsNumber < 2 ? words[0] : words[1];
1362
+ };
1363
+ var getPhraseByDayOfWeek = function (str, words) {
1364
+ var strAsNumber = str != null ? Number(str) : 0;
1365
+ return words[[1, 0, 0, 1, 0, 0, 1][strAsNumber]];
1366
+ };
1367
+ var getNumberEnding = function (str, gender) {
1368
+ var strAsNumber = str != null ? Number(str) : 1;
1369
+ strAsNumber = Math.max(Math.min(strAsNumber < 10 || (strAsNumber > 20 && strAsNumber % 10 !== 0) ? strAsNumber % 10 : 3, 3), 1) - 1;
1370
+ var genderIndex = ['м', 'ж', 'ср'].indexOf(gender);
1371
+ return ['в', 'р', 'т'][strAsNumber] + ['и', 'а', 'о'][genderIndex];
1372
+ };
1373
+ var bg = (function () {
1374
+ function bg() {
1375
+ }
1376
+ bg.prototype.atX0SecondsPastTheMinuteGt20 = function () {
1377
+ return null;
1378
+ };
1379
+ bg.prototype.atX0MinutesPastTheHourGt20 = function () {
1380
+ return null;
1381
+ };
1382
+ bg.prototype.commaMonthX0ThroughMonthX1 = function () {
1383
+ return null;
1384
+ };
1385
+ bg.prototype.commaYearX0ThroughYearX1 = function () {
1386
+ return null;
1387
+ };
1388
+ bg.prototype.use24HourTimeFormatByDefault = function () {
1389
+ return true;
1390
+ };
1391
+ bg.prototype.everyMinute = function () {
1392
+ return 'всяка минута';
1393
+ };
1394
+ bg.prototype.everyHour = function () {
1395
+ return 'всеки час';
1396
+ };
1397
+ bg.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
1398
+ return 'Възникна грешка при генериране на описанието на израза. Проверете синтаксиса на cron израза.';
1399
+ };
1400
+ bg.prototype.atSpace = function () {
1401
+ return 'В ';
1402
+ };
1403
+ bg.prototype.everyMinuteBetweenX0AndX1 = function () {
1404
+ return 'Всяка минута от %s до %s';
1405
+ };
1406
+ bg.prototype.at = function () {
1407
+ return 'В';
1408
+ };
1409
+ bg.prototype.spaceAnd = function () {
1410
+ return ' и';
1411
+ };
1412
+ bg.prototype.everySecond = function () {
1413
+ return 'всяка секунда';
1414
+ };
1415
+ bg.prototype.everyX0Seconds = function (s) {
1416
+ return 'всеки %s секунди';
1417
+ };
1418
+ bg.prototype.secondsX0ThroughX1PastTheMinute = function () {
1419
+ return 'секунди от %s до %s';
1420
+ };
1421
+ bg.prototype.atX0SecondsPastTheMinute = function (s) {
1422
+ return "%s-".concat(getNumberEnding(s, 'ж'), " \u0441\u0435\u043A\u0443\u043D\u0434\u0430");
1423
+ };
1424
+ bg.prototype.everyX0Minutes = function (s) {
1425
+ return 'всеки %s минути';
1426
+ };
1427
+ bg.prototype.minutesX0ThroughX1PastTheHour = function () {
1428
+ return 'минути от %s до %s';
1429
+ };
1430
+ bg.prototype.atX0MinutesPastTheHour = function (s) {
1431
+ return "%s-".concat(getNumberEnding(s, 'ж'), " \u043C\u0438\u043D\u0443\u0442a");
1432
+ };
1433
+ bg.prototype.everyX0Hours = function (s) {
1434
+ return 'всеки %s часа';
1435
+ };
1436
+ bg.prototype.betweenX0AndX1 = function () {
1437
+ return 'от %s до %s';
1438
+ };
1439
+ bg.prototype.atX0 = function () {
1440
+ return 'в %s';
1441
+ };
1442
+ bg.prototype.commaEveryDay = function () {
1443
+ return ', всеки ден';
1444
+ };
1445
+ bg.prototype.commaEveryX0DaysOfTheWeek = function (s) {
1446
+ return getPhraseByPlural(s, [', всеки %s ден от седмицата', ', всеки %s дена от седмицата']);
1447
+ };
1448
+ bg.prototype.commaX0ThroughX1 = function (s) {
1449
+ return ', от %s до %s';
1450
+ };
1451
+ bg.prototype.commaAndX0ThroughX1 = function (s) {
1452
+ return ' и от %s до %s';
1453
+ };
1454
+ bg.prototype.first = function (s) {
1455
+ return getPhraseByDayOfWeek(s, ['первият', 'первата']);
1456
+ };
1457
+ bg.prototype.second = function (s) {
1458
+ return getPhraseByDayOfWeek(s, ['вторият', 'втората']);
1459
+ };
1460
+ bg.prototype.third = function (s) {
1461
+ return getPhraseByDayOfWeek(s, ['третият', 'третата']);
1462
+ };
1463
+ bg.prototype.fourth = function (s) {
1464
+ return getPhraseByDayOfWeek(s, ['четвертият', 'четвертата']);
1465
+ };
1466
+ bg.prototype.fifth = function (s) {
1467
+ return getPhraseByDayOfWeek(s, ['петият', 'петата']);
1468
+ };
1469
+ bg.prototype.commaOnThe = function (s) {
1470
+ return ', ';
1471
+ };
1472
+ bg.prototype.spaceX0OfTheMonth = function () {
1473
+ return ' %s на месеца';
1474
+ };
1475
+ bg.prototype.lastDay = function () {
1476
+ return 'последният ден';
1477
+ };
1478
+ bg.prototype.commaOnTheLastX0OfTheMonth = function (s) {
1479
+ return getPhraseByDayOfWeek(s, [', в последният %s от месеца', ', в последната %s отмесеца']);
1480
+ };
1481
+ bg.prototype.commaOnlyOnX0 = function (s) {
1482
+ return ', %s';
1483
+ };
1484
+ bg.prototype.commaAndOnX0 = function () {
1485
+ return ' и %s';
1486
+ };
1487
+ bg.prototype.commaEveryX0Months = function (s) {
1488
+ return ' всеки %s месеца';
1489
+ };
1490
+ bg.prototype.commaOnlyInMonthX0 = function () {
1491
+ return ', %s';
1492
+ };
1493
+ bg.prototype.commaOnlyInX0 = function () {
1494
+ return ', в %s';
1495
+ };
1496
+ bg.prototype.commaOnTheLastDayOfTheMonth = function () {
1497
+ return ', в последният ден на месеца';
1498
+ };
1499
+ bg.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
1500
+ return ', в последния делничен ден от месеца';
1501
+ };
1502
+ bg.prototype.commaDaysBeforeTheLastDayOfTheMonth = function (s) {
1503
+ return getPhraseByPlural(s, [', %s ден преди края на месеца', ', %s дена преди края на месеца']);
1504
+ };
1505
+ bg.prototype.firstWeekday = function () {
1506
+ return 'първият делничен ден';
1507
+ };
1508
+ bg.prototype.weekdayNearestDayX0 = function () {
1509
+ return 'най-близкият делничен ден до %s число';
1510
+ };
1511
+ bg.prototype.commaOnTheX0OfTheMonth = function () {
1512
+ return ', на %s число от месеца';
1513
+ };
1514
+ bg.prototype.commaEveryX0Days = function (s) {
1515
+ return getPhraseByPlural(s, [', всеки %s ден', ', всеки %s дена']);
1516
+ };
1517
+ bg.prototype.commaBetweenDayX0AndX1OfTheMonth = function (s) {
1518
+ var _a;
1519
+ var values = (_a = s === null || s === void 0 ? void 0 : s.split('-')) !== null && _a !== void 0 ? _a : [];
1520
+ return ", \u043E\u0442 %s-".concat(getNumberEnding(values[0], 'ср'), " \u0434\u043E %s-").concat(getNumberEnding(values[1], 'ср'), " \u0447\u0438\u0441\u043B\u043E \u043D\u0430 \u043C\u0435\u0441\u0435\u0446\u0430");
1521
+ };
1522
+ bg.prototype.commaOnDayX0OfTheMonth = function (s) {
1523
+ return ", \u043D\u0430 %s-".concat(getNumberEnding(s, 'ср'), " \u0447\u0438\u0441\u043B\u043E \u043E\u0442 \u043C\u0435\u0441\u0435\u0446\u0430");
1524
+ };
1525
+ bg.prototype.commaEveryX0Years = function (s) {
1526
+ return getPhraseByPlural(s, [', всяка %s година', ', всеки %s години']);
1527
+ };
1528
+ bg.prototype.commaStartingX0 = function () {
1529
+ return ', започвайки %s';
1530
+ };
1531
+ bg.prototype.daysOfTheWeek = function () {
1532
+ return ['неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота'];
1533
+ };
1534
+ bg.prototype.monthsOfTheYear = function () {
1535
+ return ['януари', 'февруари', 'март', 'април', 'май', 'юни', 'юли', 'август', 'септевмври', 'октомври', 'ноември', 'декември'];
1536
+ };
1537
+ return bg;
1538
+ }());
1539
+ exports.bg = bg;
1540
+
1541
+
1146
1542
  /***/ }),
1147
1543
 
1148
1544
  /***/ 708:
@@ -2652,7 +3048,7 @@ var cronstrueI18n = {exports: {}};
2652
3048
  return null;
2653
3049
  };
2654
3050
  fr.prototype.use24HourTimeFormatByDefault = function () {
2655
- return false;
3051
+ return true;
2656
3052
  };
2657
3053
  fr.prototype.everyMinute = function () {
2658
3054
  return "toutes les minutes";
@@ -3923,6 +4319,194 @@ var cronstrueI18n = {exports: {}};
3923
4319
  exports.ko = ko;
3924
4320
 
3925
4321
 
4322
+ /***/ }),
4323
+
4324
+ /***/ 863:
4325
+ /***/ ((__unused_webpack_module, exports) => {
4326
+
4327
+
4328
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
4329
+ exports.my = void 0;
4330
+ var my = (function () {
4331
+ function my() {
4332
+ }
4333
+ my.prototype.atX0SecondsPastTheMinuteGt20 = function () {
4334
+ return null;
4335
+ };
4336
+ my.prototype.atX0MinutesPastTheHourGt20 = function () {
4337
+ return null;
4338
+ };
4339
+ my.prototype.commaMonthX0ThroughMonthX1 = function () {
4340
+ return null;
4341
+ };
4342
+ my.prototype.commaYearX0ThroughYearX1 = function () {
4343
+ return null;
4344
+ };
4345
+ my.prototype.use24HourTimeFormatByDefault = function () {
4346
+ return false;
4347
+ };
4348
+ my.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
4349
+ return "Terdapat ralat semasa menjana penerangan ungkapan. Sila periksa sintaks ungkapan cron.";
4350
+ };
4351
+ my.prototype.everyMinute = function () {
4352
+ return "setiap minit";
4353
+ };
4354
+ my.prototype.everyHour = function () {
4355
+ return "setiap jam";
4356
+ };
4357
+ my.prototype.atSpace = function () {
4358
+ return "Pada ";
4359
+ };
4360
+ my.prototype.everyMinuteBetweenX0AndX1 = function () {
4361
+ return "Setiap minit antara %s dan %s";
4362
+ };
4363
+ my.prototype.at = function () {
4364
+ return "Pada";
4365
+ };
4366
+ my.prototype.spaceAnd = function () {
4367
+ return " dan";
4368
+ };
4369
+ my.prototype.everySecond = function () {
4370
+ return "setiap saat";
4371
+ };
4372
+ my.prototype.everyX0Seconds = function () {
4373
+ return "setiap %s saat";
4374
+ };
4375
+ my.prototype.secondsX0ThroughX1PastTheMinute = function () {
4376
+ return "saat ke %s hingga %s selepas minit";
4377
+ };
4378
+ my.prototype.atX0SecondsPastTheMinute = function () {
4379
+ return "pada %s saat selepas minit";
4380
+ };
4381
+ my.prototype.everyX0Minutes = function () {
4382
+ return "setiap %s minit";
4383
+ };
4384
+ my.prototype.minutesX0ThroughX1PastTheHour = function () {
4385
+ return "minit ke %s hingga %s selepas jam";
4386
+ };
4387
+ my.prototype.atX0MinutesPastTheHour = function () {
4388
+ return "pada %s minit selepas jam";
4389
+ };
4390
+ my.prototype.everyX0Hours = function () {
4391
+ return "setiap %s jam";
4392
+ };
4393
+ my.prototype.betweenX0AndX1 = function () {
4394
+ return "antara %s dan %s";
4395
+ };
4396
+ my.prototype.atX0 = function () {
4397
+ return "pada %s";
4398
+ };
4399
+ my.prototype.commaEveryDay = function () {
4400
+ return ", setiap hari";
4401
+ };
4402
+ my.prototype.commaEveryX0DaysOfTheWeek = function () {
4403
+ return ", setiap %s hari dalam minggu";
4404
+ };
4405
+ my.prototype.commaX0ThroughX1 = function () {
4406
+ return ", %s hingga %s";
4407
+ };
4408
+ my.prototype.commaAndX0ThroughX1 = function () {
4409
+ return ", dan %s hingga %s";
4410
+ };
4411
+ my.prototype.first = function () {
4412
+ return "pertama";
4413
+ };
4414
+ my.prototype.second = function () {
4415
+ return "kedua";
4416
+ };
4417
+ my.prototype.third = function () {
4418
+ return "ketiga";
4419
+ };
4420
+ my.prototype.fourth = function () {
4421
+ return "keempat";
4422
+ };
4423
+ my.prototype.fifth = function () {
4424
+ return "kelima";
4425
+ };
4426
+ my.prototype.commaOnThe = function () {
4427
+ return ", pada ";
4428
+ };
4429
+ my.prototype.spaceX0OfTheMonth = function () {
4430
+ return " %s pada bulan";
4431
+ };
4432
+ my.prototype.lastDay = function () {
4433
+ return "hari terakhir";
4434
+ };
4435
+ my.prototype.commaOnTheLastX0OfTheMonth = function () {
4436
+ return ", pada %s terakhir bulan";
4437
+ };
4438
+ my.prototype.commaOnlyOnX0 = function () {
4439
+ return ", hanya pada %s";
4440
+ };
4441
+ my.prototype.commaAndOnX0 = function () {
4442
+ return ", dan pada %s";
4443
+ };
4444
+ my.prototype.commaEveryX0Months = function () {
4445
+ return ", setiap bulan %s";
4446
+ };
4447
+ my.prototype.commaOnlyInX0 = function () {
4448
+ return ", hanya pada %s";
4449
+ };
4450
+ my.prototype.commaOnTheLastDayOfTheMonth = function () {
4451
+ return ", pada hari terakhir bulan";
4452
+ };
4453
+ my.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
4454
+ return ", pada minggu terakhir bulan";
4455
+ };
4456
+ my.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
4457
+ return ", %s hari sebelum hari terakhir bulan";
4458
+ };
4459
+ my.prototype.firstWeekday = function () {
4460
+ return "hari pertama minggu bekerja";
4461
+ };
4462
+ my.prototype.weekdayNearestDayX0 = function () {
4463
+ return "hari bekerja yang terdekat dengan %s";
4464
+ };
4465
+ my.prototype.commaOnTheX0OfTheMonth = function () {
4466
+ return ", pada %s bulan";
4467
+ };
4468
+ my.prototype.commaEveryX0Days = function () {
4469
+ return ", setiap %s hari";
4470
+ };
4471
+ my.prototype.commaBetweenDayX0AndX1OfTheMonth = function () {
4472
+ return ", antara hari %s dan %s dalam bulan";
4473
+ };
4474
+ my.prototype.commaOnDayX0OfTheMonth = function () {
4475
+ return ", pada hari %s dalam bulan";
4476
+ };
4477
+ my.prototype.commaEveryHour = function () {
4478
+ return ", setiap jam";
4479
+ };
4480
+ my.prototype.commaEveryX0Years = function () {
4481
+ return ", setiap %s tahun";
4482
+ };
4483
+ my.prototype.commaStartingX0 = function () {
4484
+ return ", bermula %s";
4485
+ };
4486
+ my.prototype.daysOfTheWeek = function () {
4487
+ return ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"];
4488
+ };
4489
+ my.prototype.monthsOfTheYear = function () {
4490
+ return [
4491
+ "Januari",
4492
+ "Februari",
4493
+ "Mac",
4494
+ "April",
4495
+ "Mei",
4496
+ "Jun",
4497
+ "Julai",
4498
+ "Ogos",
4499
+ "September",
4500
+ "Oktober",
4501
+ "November",
4502
+ "Disember",
4503
+ ];
4504
+ };
4505
+ return my;
4506
+ }());
4507
+ exports.my = my;
4508
+
4509
+
3926
4510
  /***/ }),
3927
4511
 
3928
4512
  /***/ 869:
@@ -4543,11 +5127,11 @@ var cronstrueI18n = {exports: {}};
4543
5127
  pt_BR.prototype.commaOnDayX0OfTheMonth = function () {
4544
5128
  return ", no dia %s do mês";
4545
5129
  };
4546
- pt_BR.prototype.commaOnlyInX0 = function () {
4547
- return ", somente em %s";
5130
+ pt_BR.prototype.commaOnlyInX0 = function (s) {
5131
+ return s && s.length > 1 && s[1] === "-" ? "somente %s" : ", somente em %s";
4548
5132
  };
4549
- pt_BR.prototype.commaOnlyOnX0 = function () {
4550
- return ", somente de %s";
5133
+ pt_BR.prototype.commaOnlyOnX0 = function (s) {
5134
+ return s && s.length > 1 && s[1] === "-" ? ", somente %s" : ", somente de %s";
4551
5135
  };
4552
5136
  pt_BR.prototype.commaAndOnX0 = function () {
4553
5137
  return ", e de %s";
@@ -6559,6 +7143,194 @@ var cronstrueI18n = {exports: {}};
6559
7143
  exports.uk = uk;
6560
7144
 
6561
7145
 
7146
+ /***/ }),
7147
+
7148
+ /***/ 533:
7149
+ /***/ ((__unused_webpack_module, exports) => {
7150
+
7151
+
7152
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
7153
+ exports.vi = void 0;
7154
+ var vi = (function () {
7155
+ function vi() {
7156
+ }
7157
+ vi.prototype.atX0SecondsPastTheMinuteGt20 = function () {
7158
+ return null;
7159
+ };
7160
+ vi.prototype.atX0MinutesPastTheHourGt20 = function () {
7161
+ return null;
7162
+ };
7163
+ vi.prototype.commaMonthX0ThroughMonthX1 = function () {
7164
+ return null;
7165
+ };
7166
+ vi.prototype.commaYearX0ThroughYearX1 = function () {
7167
+ return null;
7168
+ };
7169
+ vi.prototype.use24HourTimeFormatByDefault = function () {
7170
+ return false;
7171
+ };
7172
+ vi.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
7173
+ 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.";
7174
+ };
7175
+ vi.prototype.everyMinute = function () {
7176
+ return "mỗi phút";
7177
+ };
7178
+ vi.prototype.everyHour = function () {
7179
+ return "mỗi giờ";
7180
+ };
7181
+ vi.prototype.atSpace = function () {
7182
+ return "Vào ";
7183
+ };
7184
+ vi.prototype.everyMinuteBetweenX0AndX1 = function () {
7185
+ return "Mỗi phút giữa %s and %s";
7186
+ };
7187
+ vi.prototype.at = function () {
7188
+ return "Vào";
7189
+ };
7190
+ vi.prototype.spaceAnd = function () {
7191
+ return " và";
7192
+ };
7193
+ vi.prototype.everySecond = function () {
7194
+ return "mỗi giây";
7195
+ };
7196
+ vi.prototype.everyX0Seconds = function () {
7197
+ return "mỗi %s giây";
7198
+ };
7199
+ vi.prototype.secondsX0ThroughX1PastTheMinute = function () {
7200
+ return "giây thứ %s qua phút thứ %s";
7201
+ };
7202
+ vi.prototype.atX0SecondsPastTheMinute = function () {
7203
+ return "tại giây thứ %s của mỗi phút";
7204
+ };
7205
+ vi.prototype.everyX0Minutes = function () {
7206
+ return "mỗi %s phút";
7207
+ };
7208
+ vi.prototype.minutesX0ThroughX1PastTheHour = function () {
7209
+ return "phút thứ %s qua %s tiếng";
7210
+ };
7211
+ vi.prototype.atX0MinutesPastTheHour = function () {
7212
+ return "vào %s phút của mỗi tiếng";
7213
+ };
7214
+ vi.prototype.everyX0Hours = function () {
7215
+ return "mỗi %s tiếng";
7216
+ };
7217
+ vi.prototype.betweenX0AndX1 = function () {
7218
+ return "giữa %s và %s";
7219
+ };
7220
+ vi.prototype.atX0 = function () {
7221
+ return "vào %s";
7222
+ };
7223
+ vi.prototype.commaEveryDay = function () {
7224
+ return ", mỗi ngày";
7225
+ };
7226
+ vi.prototype.commaEveryX0DaysOfTheWeek = function () {
7227
+ return ", mỗi %s ngày trong tuần";
7228
+ };
7229
+ vi.prototype.commaX0ThroughX1 = function () {
7230
+ return ", %s đến %s";
7231
+ };
7232
+ vi.prototype.commaAndX0ThroughX1 = function () {
7233
+ return ", %s đến %s";
7234
+ };
7235
+ vi.prototype.first = function () {
7236
+ return "đầu tiên";
7237
+ };
7238
+ vi.prototype.second = function () {
7239
+ return "thứ 2";
7240
+ };
7241
+ vi.prototype.third = function () {
7242
+ return "thứ 3";
7243
+ };
7244
+ vi.prototype.fourth = function () {
7245
+ return "thứ 4";
7246
+ };
7247
+ vi.prototype.fifth = function () {
7248
+ return "thứ 5";
7249
+ };
7250
+ vi.prototype.commaOnThe = function () {
7251
+ return ", trên ";
7252
+ };
7253
+ vi.prototype.spaceX0OfTheMonth = function () {
7254
+ return " %s của tháng";
7255
+ };
7256
+ vi.prototype.lastDay = function () {
7257
+ return "ngày cuối cùng";
7258
+ };
7259
+ vi.prototype.commaOnTheLastX0OfTheMonth = function () {
7260
+ return ", vào ngày %s cuối cùng của tháng";
7261
+ };
7262
+ vi.prototype.commaOnlyOnX0 = function () {
7263
+ return ", chỉ trên %s";
7264
+ };
7265
+ vi.prototype.commaAndOnX0 = function () {
7266
+ return ", và hơn %s";
7267
+ };
7268
+ vi.prototype.commaEveryX0Months = function () {
7269
+ return ", mỗi ngày %s tháng";
7270
+ };
7271
+ vi.prototype.commaOnlyInX0 = function () {
7272
+ return ", chỉ trong %s";
7273
+ };
7274
+ vi.prototype.commaOnTheLastDayOfTheMonth = function () {
7275
+ return ", vào ngày cuối cùng của tháng";
7276
+ };
7277
+ vi.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
7278
+ return ", vào ngày cuối tuần của tháng";
7279
+ };
7280
+ vi.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
7281
+ return ", %s ngày trước ngày cuối cùng của tháng";
7282
+ };
7283
+ vi.prototype.firstWeekday = function () {
7284
+ return "ngày đầu tuần";
7285
+ };
7286
+ vi.prototype.weekdayNearestDayX0 = function () {
7287
+ return "ngày trong tuần ngày gần nhất %s";
7288
+ };
7289
+ vi.prototype.commaOnTheX0OfTheMonth = function () {
7290
+ return ", vào ngày %s của tháng";
7291
+ };
7292
+ vi.prototype.commaEveryX0Days = function () {
7293
+ return ", mỗi %s ngày";
7294
+ };
7295
+ vi.prototype.commaBetweenDayX0AndX1OfTheMonth = function () {
7296
+ return ", giữa ngày %s và %s trong tháng";
7297
+ };
7298
+ vi.prototype.commaOnDayX0OfTheMonth = function () {
7299
+ return ", vào %s ngày trong tháng";
7300
+ };
7301
+ vi.prototype.commaEveryHour = function () {
7302
+ return ", mỗi tiếng";
7303
+ };
7304
+ vi.prototype.commaEveryX0Years = function () {
7305
+ return ", mỗi %s năm";
7306
+ };
7307
+ vi.prototype.commaStartingX0 = function () {
7308
+ return ", bắt đầu %s";
7309
+ };
7310
+ vi.prototype.daysOfTheWeek = function () {
7311
+ return ["Chủ nhật", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"];
7312
+ };
7313
+ vi.prototype.monthsOfTheYear = function () {
7314
+ return [
7315
+ "Tháng 1",
7316
+ "Tháng 2",
7317
+ "Tháng 3",
7318
+ "Tháng 4",
7319
+ "Tháng 5",
7320
+ "Tháng 6",
7321
+ "Tháng 7",
7322
+ "Tháng 8",
7323
+ "Tháng 9",
7324
+ "Tháng 10",
7325
+ "Tháng 11",
7326
+ "Tháng 12",
7327
+ ];
7328
+ };
7329
+ return vi;
7330
+ }());
7331
+ exports.vi = vi;
7332
+
7333
+
6562
7334
  /***/ }),
6563
7335
 
6564
7336
  /***/ 419:
@@ -6770,7 +7542,7 @@ var cronstrueI18n = {exports: {}};
6770
7542
  return null;
6771
7543
  };
6772
7544
  zh_TW.prototype.commaYearX0ThroughYearX1 = function () {
6773
- return ", 从%s年至%s年";
7545
+ return ", 從 %s 年至 %s 年";
6774
7546
  };
6775
7547
  zh_TW.prototype.use24HourTimeFormatByDefault = function () {
6776
7548
  return false;
@@ -6782,7 +7554,7 @@ var cronstrueI18n = {exports: {}};
6782
7554
  return "每小時";
6783
7555
  };
6784
7556
  zh_TW.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
6785
- return "產生正規表達式描述時發生了錯誤,請檢查 cron 表達式語法。";
7557
+ return "產生表達式描述時發生了錯誤,請檢查 cron 表達式語法。";
6786
7558
  };
6787
7559
  zh_TW.prototype.atSpace = function () {
6788
7560
  return "在 ";
@@ -6878,7 +7650,7 @@ var cronstrueI18n = {exports: {}};
6878
7650
  return ", 僅在 %s";
6879
7651
  };
6880
7652
  zh_TW.prototype.commaOnlyInMonthX0 = function () {
6881
- return ", 僅在%s";
7653
+ return ", 僅在 %s";
6882
7654
  };
6883
7655
  zh_TW.prototype.commaOnlyInYearX0 = function () {
6884
7656
  return ", 僅在 %s 年";
@@ -7411,15 +8183,6 @@ styleInject(css_248z);
7411
8183
  const defaultCron = '0 0 00 1/1 * ? *';
7412
8184
  const Cron = (props) => {
7413
8185
  const [state, setState] = useState({ value: [], headers: loadHeaders(props.options), locale: props.locale ? props.locale : 'en' });
7414
- useEffect(() => {
7415
- setValue(props.value ? props.value : "");
7416
- if (props.translateFn && !props.locale) {
7417
- console.log('Warning !!! locale not set while using translateFn');
7418
- }
7419
- // if(this.props.onRef) {
7420
- // this.props.onRef(this);
7421
- // }
7422
- }, []);
7423
8186
  useEffect(() => {
7424
8187
  let newVal = '';
7425
8188
  newVal = state.value.toString().replace(/,/g, ' ');
@@ -7427,12 +8190,15 @@ const Cron = (props) => {
7427
8190
  if (props.value !== newVal) {
7428
8191
  setValue(props.value ? props.value : "");
7429
8192
  }
8193
+ if (props.translateFn && !props.locale) {
8194
+ console.warn('Warning !!! locale not set while using translateFn');
8195
+ }
7430
8196
  }, [props.value]);
7431
8197
  useEffect(() => {
7432
- parentChange(state.value);
8198
+ state.value && state.value.length && parentChange(state.value);
7433
8199
  }, [state.value]);
7434
8200
  const setValue = (value) => {
7435
- let prevState = state;
8201
+ let prevState = Object.assign({}, state);
7436
8202
  prevState.value = value.replace(/,/g, '!').split(' ');
7437
8203
  const allHeaders = loadHeaders();
7438
8204
  if (value && value.split(' ').length === 6) {
@@ -7498,7 +8264,7 @@ const Cron = (props) => {
7498
8264
  };
7499
8265
  const getVal = () => {
7500
8266
  let val = i18n.toString(state.value.toString().replace(/,/g, ' ').replace(/!/g, ','), { throwExceptionOnParseError: false, locale: state.locale });
7501
- if (val.search('undefined') === -1) {
8267
+ if (val.search('undefined') === -1 && state.value && state.value.length) {
7502
8268
  return val;
7503
8269
  }
7504
8270
  return '-';