dataflux 1.10.2 → 1.10.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/Obj.js +7 -3
- package/dist/ObserverStore.js +6 -3
- package/dist/dataflux.min.js +1 -1
- package/dist/dataflux.min.js.map +1 -1
- package/package.json +7 -7
package/dist/Obj.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -15,6 +13,8 @@ var _SubObj = _interopRequireDefault(require("./SubObj"));
|
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
15
|
|
|
16
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17
|
+
|
|
18
18
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
19
19
|
|
|
20
20
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -77,7 +77,11 @@ var Obj = /*#__PURE__*/function (_BasicObj) {
|
|
|
77
77
|
_defineProperty(_assertThisInitialized(_this), "set", function (attribute, value, hidden) {
|
|
78
78
|
if (Array.isArray(value) && _this.getModel().options.deep) {
|
|
79
79
|
value = value.map(function (i) {
|
|
80
|
-
|
|
80
|
+
if (["boolean", "string", "number"].includes(_typeof(i))) {
|
|
81
|
+
return i;
|
|
82
|
+
} else {
|
|
83
|
+
return i !== null && i !== void 0 && i.getId ? i : new _SubObj["default"](_assertThisInitialized(_this), "property", i, _this.getModel());
|
|
84
|
+
}
|
|
81
85
|
});
|
|
82
86
|
}
|
|
83
87
|
|
package/dist/ObserverStore.js
CHANGED
|
@@ -193,9 +193,12 @@ var ObserverStore = /*#__PURE__*/function (_PersistentStore) {
|
|
|
193
193
|
_this._subscribed[type][id] = _this._subscribed[type][id].filter(function (i) {
|
|
194
194
|
return i.subKey !== key;
|
|
195
195
|
});
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
|
|
197
|
+
if (_this._subscribed[type]["*"]) {
|
|
198
|
+
_this._subscribed[type]["*"] = _this._subscribed[type]["*"].filter(function (i) {
|
|
199
|
+
return i.subKey !== key;
|
|
200
|
+
});
|
|
201
|
+
}
|
|
199
202
|
|
|
200
203
|
if (_this._subscribed[type][id].length === 0) {
|
|
201
204
|
delete _this._subscribed[type][id];
|