@bigbinary/neeto-rules-frontend 0.2.2 → 0.2.4

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/dist/index.js CHANGED
@@ -1718,20 +1718,29 @@ var Router = /*#__PURE__*/function (_React$Component) {
1718
1718
  _this._pendingLocation = null;
1719
1719
  if (!props.staticContext) {
1720
1720
  _this.unlisten = props.history.listen(function (location) {
1721
- if (_this._isMounted) {
1722
- _this.setState({
1723
- location: location
1724
- });
1725
- } else {
1726
- _this._pendingLocation = location;
1727
- }
1721
+ _this._pendingLocation = location;
1728
1722
  });
1729
1723
  }
1730
1724
  return _this;
1731
1725
  }
1732
1726
  var _proto = Router.prototype;
1733
1727
  _proto.componentDidMount = function componentDidMount() {
1728
+ var _this2 = this;
1734
1729
  this._isMounted = true;
1730
+ if (this.unlisten) {
1731
+ // Any pre-mount location changes have been captured at
1732
+ // this point, so unregister the listener.
1733
+ this.unlisten();
1734
+ }
1735
+ if (!this.props.staticContext) {
1736
+ this.unlisten = this.props.history.listen(function (location) {
1737
+ if (_this2._isMounted) {
1738
+ _this2.setState({
1739
+ location: location
1740
+ });
1741
+ }
1742
+ });
1743
+ }
1735
1744
  if (this._pendingLocation) {
1736
1745
  this.setState({
1737
1746
  location: this._pendingLocation
@@ -55973,7 +55982,7 @@ cov_28jtkso8zg().s[34]++;
55973
55982
 
55974
55983
  function cov_19hofz0kl6() {
55975
55984
  var path = "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/NeetoRules/Element/Conditions/Fields/InputField.jsx";
55976
- var hash = "3a24f663991d871ae27f673b041819bc5355bbc0";
55985
+ var hash = "193ee35a0e125782b91b884cc1ef1faffff3b103";
55977
55986
  var global = new Function("return this")();
55978
55987
  var gcv = "__coverage__";
55979
55988
  var coverageData = {
@@ -56056,7 +56065,7 @@ function cov_19hofz0kl6() {
56056
56065
  },
56057
56066
  end: {
56058
56067
  line: 26,
56059
- column: 45
56068
+ column: 57
56060
56069
  }
56061
56070
  },
56062
56071
  "8": {
@@ -56498,7 +56507,7 @@ function cov_19hofz0kl6() {
56498
56507
  "3": [0, 0]
56499
56508
  },
56500
56509
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
56501
- hash: "3a24f663991d871ae27f673b041819bc5355bbc0"
56510
+ hash: "193ee35a0e125782b91b884cc1ef1faffff3b103"
56502
56511
  };
56503
56512
  var coverage = global[gcv] || (global[gcv] = {});
56504
56513
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -56516,7 +56525,7 @@ function cov_19hofz0kl6() {
56516
56525
  cov_19hofz0kl6();
56517
56526
  cov_19hofz0kl6().s[0]++;
56518
56527
  var InputField$1 = function InputField(_ref) {
56519
- var _condition$metadata, _errors$conditions, _errors$conditions$va, _touched$conditions, _touched$conditions$v;
56528
+ var _condition$metadata, _condition$metadata$v, _errors$conditions, _errors$conditions$va, _touched$conditions, _touched$conditions$v;
56520
56529
  var name = _ref.name,
56521
56530
  index = _ref.index,
56522
56531
  placeholder = _ref.placeholder;
@@ -56537,7 +56546,7 @@ var InputField$1 = function InputField(_ref) {
56537
56546
  return setShowInput(false);
56538
56547
  });
56539
56548
  var condition = (cov_19hofz0kl6().s[6]++, conditions.value[index]);
56540
- var valueTerm = (cov_19hofz0kl6().s[7]++, (_condition$metadata = condition.metadata) === null || _condition$metadata === void 0 ? void 0 : _condition$metadata.value);
56549
+ var valueTerm = (cov_19hofz0kl6().s[7]++, (_condition$metadata = condition.metadata) === null || _condition$metadata === void 0 ? void 0 : (_condition$metadata$v = _condition$metadata.value) === null || _condition$metadata$v === void 0 ? void 0 : _condition$metadata$v.toString());
56541
56550
  var label = (cov_19hofz0kl6().s[8]++, (cov_19hofz0kl6().b[1][0]++, valueTerm) && (cov_19hofz0kl6().b[1][1]++, valueTerm !== null && valueTerm !== void 0 && valueTerm.trim().length) ? (cov_19hofz0kl6().b[0][0]++, valueTerm) : (cov_19hofz0kl6().b[0][1]++, t("form.addValue")));
56542
56551
  var isValid = (cov_19hofz0kl6().s[9]++, (cov_19hofz0kl6().b[2][0]++, errors.conditions) && (cov_19hofz0kl6().b[2][1]++, isNotNil((_errors$conditions = errors.conditions) === null || _errors$conditions === void 0 ? void 0 : (_errors$conditions$va = _errors$conditions.value) === null || _errors$conditions$va === void 0 ? void 0 : _errors$conditions$va[index])) && (cov_19hofz0kl6().b[2][2]++, isNotNil((_touched$conditions = touched.conditions) === null || _touched$conditions === void 0 ? void 0 : (_touched$conditions$v = _touched$conditions.value) === null || _touched$conditions$v === void 0 ? void 0 : _touched$conditions$v[index])));
56543
56552
  cov_19hofz0kl6().s[10]++;