react-cron-generator 1.3.8 → 1.3.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.
@@ -24,6 +24,7 @@ var HourlyCron = /*#__PURE__*/function (_Component) {
24
24
  _this.onHourChange = _this.onHourChange.bind(_assertThisInitialized(_this));
25
25
  _this.onAtHourChange = _this.onAtHourChange.bind(_assertThisInitialized(_this));
26
26
  _this.onAtMinuteChange = _this.onAtMinuteChange.bind(_assertThisInitialized(_this));
27
+ _this.onMinuteChange = _this.onMinuteChange.bind(_assertThisInitialized(_this));
27
28
  return _this;
28
29
  }
29
30
 
@@ -41,11 +42,23 @@ var HourlyCron = /*#__PURE__*/function (_Component) {
41
42
  value: function onHourChange(e) {
42
43
  if (this.state.every && (e.target.value > 0 && e.target.value < 24 || e.target.value === '')) {
43
44
  var val = ['0', '0', '*', '*', '*', '?', '*'];
45
+ val[1] = this.state.value[1];
44
46
  val[2] = e.target.value ? "0/".concat(e.target.value) : e.target.value;
45
47
  val[3] = '1/1';
46
48
  this.props.onChange(val);
47
49
  }
48
50
  }
51
+ }, {
52
+ key: "onMinuteChange",
53
+ value: function onMinuteChange(e) {
54
+ if (this.state.every && (e.target.value > 0 && e.target.value < 60 || e.target.value === '')) {
55
+ var val = ['0', '0', '*', '*', '*', '?', '*'];
56
+ val[1] = e.target.value;
57
+ val[2] = this.state.value[2];
58
+ val[3] = '1/1';
59
+ this.props.onChange(val);
60
+ }
61
+ }
49
62
  }, {
50
63
  key: "onAtHourChange",
51
64
  value: function onAtHourChange(e) {
@@ -88,7 +101,12 @@ var HourlyCron = /*#__PURE__*/function (_Component) {
88
101
  type: "Number",
89
102
  onChange: this.onHourChange,
90
103
  value: this.state.value[2].split('/')[1] ? this.state.value[2].split('/')[1] : ''
91
- }), /*#__PURE__*/React.createElement("span", null, translateFn('hour(s)'))), /*#__PURE__*/React.createElement("div", {
104
+ }), /*#__PURE__*/React.createElement("span", null, translateFn('hour')), /*#__PURE__*/React.createElement("input", {
105
+ disabled: !this.state.every,
106
+ type: "Number",
107
+ onChange: this.onMinuteChange,
108
+ value: this.state.value[1]
109
+ }), /*#__PURE__*/React.createElement("span", null, translateFn('minutes(s)'))), /*#__PURE__*/React.createElement("div", {
92
110
  className: "well well-small margin-right-0 margin-left-0"
93
111
  }, /*#__PURE__*/React.createElement("div", {
94
112
  className: "text_align_right",
@@ -3,7 +3,8 @@
3
3
  "day(s)": "day(s)",
4
4
  "Every week day": "Every week day",
5
5
  "Start time": "Start time",
6
- "hour(s)": "hour(s)",
6
+ "hour": "hour",
7
+ "minutes(s)":"minutes(s)",
7
8
  "At": "At",
8
9
  "minute(s)": "minute(s)",
9
10
  "Day": "Day",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-cron-generator",
3
- "version": "1.3.8",
3
+ "version": "1.3.11",
4
4
  "description": "Simple react component to generate cron expression",
5
5
  "keywords": [
6
6
  "React cron generator",
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "author": "Sojin antony",
18
18
  "dependencies": {
19
- "cronstrue": "1.92.0"
19
+ "cronstrue": "^2.11.0"
20
20
  },
21
21
  "main": "dist/index.js",
22
22
  "module": "dist/index.js",