react-cron-generator
Advanced tools
Comparing version 1.3.9 to 1.3.10
@@ -27,2 +27,3 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
_this.onAtMinuteChange = _this.onAtMinuteChange.bind(_assertThisInitialized(_this)); | ||
_this.onMinuteChange = _this.onMinuteChange.bind(_assertThisInitialized(_this)); | ||
return _this; | ||
@@ -45,2 +46,3 @@ } | ||
var val = ['0', '0', '*', '*', '*', '?', '*']; | ||
val[1] = this.state.value[1]; | ||
val[2] = e.target.value ? "0/".concat(e.target.value) : e.target.value; | ||
@@ -52,2 +54,13 @@ val[3] = '1/1'; | ||
}, { | ||
key: "onMinuteChange", | ||
value: function onMinuteChange(e) { | ||
if (this.state.every && (e.target.value > 0 && e.target.value < 24 || e.target.value === '')) { | ||
var val = ['0', '0', '*', '*', '*', '?', '*']; | ||
val[1] = e.target.value; | ||
val[2] = this.state.value[2]; | ||
val[3] = '1/1'; | ||
this.props.onChange(val); | ||
} | ||
} | ||
}, { | ||
key: "onAtHourChange", | ||
@@ -94,3 +107,8 @@ value: function onAtHourChange(e) { | ||
value: this.state.value[2].split('/')[1] ? this.state.value[2].split('/')[1] : '' | ||
}), /*#__PURE__*/React.createElement("span", null, translateFn('hour(s)'))), /*#__PURE__*/React.createElement("div", { | ||
}), /*#__PURE__*/React.createElement("span", null, translateFn('hour')), /*#__PURE__*/React.createElement("input", { | ||
disabled: !this.state.every, | ||
type: "Number", | ||
onChange: this.onMinuteChange, | ||
value: this.state.value[1] | ||
}), /*#__PURE__*/React.createElement("span", null, translateFn('minutes(s)'))), /*#__PURE__*/React.createElement("div", { | ||
className: "well well-small margin-right-0 margin-left-0" | ||
@@ -97,0 +115,0 @@ }, /*#__PURE__*/React.createElement("div", { |
@@ -6,3 +6,4 @@ { | ||
"Start time": "Start time", | ||
"hour(s)": "hour(s)", | ||
"hour": "hour", | ||
"minutes(s)":"minutes(s)", | ||
"At": "At", | ||
@@ -9,0 +10,0 @@ "minute(s)": "minute(s)", |
{ | ||
"name": "react-cron-generator", | ||
"version": "1.3.9", | ||
"version": "1.3.10", | ||
"description": "Simple react component to generate cron expression", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46135
1117