mobx 6.5.0 → 6.6.2

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.
@@ -428,7 +428,7 @@
428
428
  var fieldName = prototype.constructor.name + ".prototype." + key.toString();
429
429
  var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;
430
430
  var requestedAnnotationType = annotation.annotationType_;
431
- die("Cannot apply '@" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already decorated with '@" + currentAnnotationType + "'.") + "\nRe-decorating fields is not allowed." + "\nUse '@override' decorator for methods overriden by subclass.");
431
+ die("Cannot apply '@" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already decorated with '@" + currentAnnotationType + "'.") + "\nRe-decorating fields is not allowed." + "\nUse '@override' decorator for methods overridden by subclass.");
432
432
  }
433
433
  }
434
434
  /**
@@ -1352,7 +1352,7 @@
1352
1352
  var _Symbol$toPrimitive;
1353
1353
  var CREATE = "create";
1354
1354
  _Symbol$toPrimitive = Symbol.toPrimitive;
1355
- var ObservableValue = /*#__PURE__*/function (_Atom, _Symbol$toPrimitive2) {
1355
+ var ObservableValue = /*#__PURE__*/function (_Atom) {
1356
1356
  _inheritsLoose(ObservableValue, _Atom);
1357
1357
 
1358
1358
  function ObservableValue(value, enhancer, name_, notifySpy, equals) {
@@ -1512,12 +1512,12 @@
1512
1512
  return toPrimitive(this.get());
1513
1513
  };
1514
1514
 
1515
- _proto[_Symbol$toPrimitive2] = function () {
1515
+ _proto[_Symbol$toPrimitive] = function () {
1516
1516
  return this.valueOf();
1517
1517
  };
1518
1518
 
1519
1519
  return ObservableValue;
1520
- }(Atom, _Symbol$toPrimitive);
1520
+ }(Atom);
1521
1521
  var isObservableValue = /*#__PURE__*/createInstanceofPredicate("ObservableValue", ObservableValue);
1522
1522
 
1523
1523
  var _Symbol$toPrimitive$1;
@@ -1542,7 +1542,7 @@
1542
1542
  */
1543
1543
 
1544
1544
  _Symbol$toPrimitive$1 = Symbol.toPrimitive;
1545
- var ComputedValue = /*#__PURE__*/function (_Symbol$toPrimitive2) {
1545
+ var ComputedValue = /*#__PURE__*/function () {
1546
1546
  // nodes we are looking at. Our value depends on these nodes
1547
1547
  // during tracking it's an array with new observed observers
1548
1548
  // to check for cycles
@@ -1799,12 +1799,12 @@
1799
1799
  return toPrimitive(this.get());
1800
1800
  };
1801
1801
 
1802
- _proto[_Symbol$toPrimitive2] = function () {
1802
+ _proto[_Symbol$toPrimitive$1] = function () {
1803
1803
  return this.valueOf();
1804
1804
  };
1805
1805
 
1806
1806
  return ComputedValue;
1807
- }(_Symbol$toPrimitive$1);
1807
+ }();
1808
1808
  var isComputedValue = /*#__PURE__*/createInstanceofPredicate("ComputedValue", ComputedValue);
1809
1809
 
1810
1810
  var IDerivationState_;
@@ -4484,7 +4484,7 @@
4484
4484
 
4485
4485
  _Symbol$iterator = Symbol.iterator;
4486
4486
  _Symbol$toStringTag = Symbol.toStringTag;
4487
- var ObservableMap = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTag2) {
4487
+ var ObservableMap = /*#__PURE__*/function () {
4488
4488
  // hasMap, not hashMap >-).
4489
4489
  function ObservableMap(initialData, enhancer_, name_) {
4490
4490
  var _this = this;
@@ -4768,7 +4768,7 @@
4768
4768
  });
4769
4769
  };
4770
4770
 
4771
- _proto[_Symbol$iterator2] = function () {
4771
+ _proto[_Symbol$iterator] = function () {
4772
4772
  return this.entries();
4773
4773
  };
4774
4774
 
@@ -4960,14 +4960,14 @@
4960
4960
  return this.data_.size;
4961
4961
  }
4962
4962
  }, {
4963
- key: _Symbol$toStringTag2,
4963
+ key: _Symbol$toStringTag,
4964
4964
  get: function get() {
4965
4965
  return "Map";
4966
4966
  }
4967
4967
  }]);
4968
4968
 
4969
4969
  return ObservableMap;
4970
- }(_Symbol$iterator, _Symbol$toStringTag); // eslint-disable-next-line
4970
+ }(); // eslint-disable-next-line
4971
4971
 
4972
4972
  var isObservableMap = /*#__PURE__*/createInstanceofPredicate("ObservableMap", ObservableMap);
4973
4973
 
@@ -4993,7 +4993,7 @@
4993
4993
  var ObservableSetMarker = {};
4994
4994
  _Symbol$iterator$1 = Symbol.iterator;
4995
4995
  _Symbol$toStringTag$1 = Symbol.toStringTag;
4996
- var ObservableSet = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTag2) {
4996
+ var ObservableSet = /*#__PURE__*/function () {
4997
4997
  function ObservableSet(initialData, enhancer, name_) {
4998
4998
  if (enhancer === void 0) {
4999
4999
  enhancer = deepEnhancer;
@@ -5254,7 +5254,7 @@
5254
5254
  return "[object ObservableSet]";
5255
5255
  };
5256
5256
 
5257
- _proto[_Symbol$iterator2] = function () {
5257
+ _proto[_Symbol$iterator$1] = function () {
5258
5258
  return this.values();
5259
5259
  };
5260
5260
 
@@ -5265,14 +5265,14 @@
5265
5265
  return this.data_.size;
5266
5266
  }
5267
5267
  }, {
5268
- key: _Symbol$toStringTag2,
5268
+ key: _Symbol$toStringTag$1,
5269
5269
  get: function get() {
5270
5270
  return "Set";
5271
5271
  }
5272
5272
  }]);
5273
5273
 
5274
5274
  return ObservableSet;
5275
- }(_Symbol$iterator$1, _Symbol$toStringTag$1); // eslint-disable-next-line
5275
+ }(); // eslint-disable-next-line
5276
5276
 
5277
5277
  var isObservableSet = /*#__PURE__*/createInstanceofPredicate("ObservableSet", ObservableSet);
5278
5278
 
@@ -5989,16 +5989,18 @@
5989
5989
  var fieldName = adm.name_ + "." + key.toString();
5990
5990
  var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;
5991
5991
  var requestedAnnotationType = annotation.annotationType_;
5992
- die("Cannot apply '" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already annotated with '" + currentAnnotationType + "'.") + "\nRe-annotating fields is not allowed." + "\nUse 'override' annotation for methods overriden by subclass.");
5992
+ die("Cannot apply '" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already annotated with '" + currentAnnotationType + "'.") + "\nRe-annotating fields is not allowed." + "\nUse 'override' annotation for methods overridden by subclass.");
5993
5993
  }
5994
5994
  }
5995
5995
 
5996
+ var ENTRY_0 = /*#__PURE__*/createArrayEntryDescriptor(0);
5996
5997
  /**
5997
5998
  * This array buffer contains two lists of properties, so that all arrays
5998
5999
  * can recycle their property definitions, which significantly improves performance of creating
5999
6000
  * properties on the fly.
6000
6001
  */
6001
6002
 
6003
+
6002
6004
  var OBSERVABLE_ARRAY_BUFFER_SIZE = 0; // Typescript workaround to make sure ObservableArray extends Array
6003
6005
 
6004
6006
  var StubArray = function StubArray() {};
@@ -6044,6 +6046,12 @@
6044
6046
  allowStateChangesEnd(prev);
6045
6047
  }
6046
6048
 
6049
+ {
6050
+ // Seems that Safari won't use numeric prototype setter untill any * numeric property is
6051
+ // defined on the instance. After that it works fine, even if this property is deleted.
6052
+ Object.defineProperty(_assertThisInitialized(_this), "0", ENTRY_0);
6053
+ }
6054
+
6047
6055
  return _this;
6048
6056
  }
6049
6057
 
@@ -6433,7 +6441,7 @@
6433
6441
  * (c) Michel Weststrate 2015 - 2020
6434
6442
  * MIT Licensed
6435
6443
  *
6436
- * Welcome to the mobx sources! To get an global overview of how MobX internally works,
6444
+ * Welcome to the mobx sources! To get a global overview of how MobX internally works,
6437
6445
  * this is a good place to start:
6438
6446
  * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74
6439
6447
  *