dataflux 1.5.1 → 1.5.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.
- package/dist/BasicObj.js +25 -0
- package/dist/Obj.js +0 -12
- package/dist/SubObj.js +0 -5
- package/package.json +1 -1
package/dist/BasicObj.js
CHANGED
|
@@ -7,6 +7,8 @@ exports.dateRegex = exports.BasicObj = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _moment = _interopRequireDefault(require("moment/moment"));
|
|
9
9
|
|
|
10
|
+
var _uuid = require("uuid");
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
13
|
|
|
12
14
|
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); } }
|
|
@@ -21,6 +23,10 @@ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedec
|
|
|
21
23
|
|
|
22
24
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
23
25
|
|
|
26
|
+
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
|
27
|
+
|
|
28
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
|
29
|
+
|
|
24
30
|
function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
|
|
25
31
|
|
|
26
32
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
|
@@ -32,6 +38,8 @@ exports.dateRegex = dateRegex;
|
|
|
32
38
|
|
|
33
39
|
var _setHidden = /*#__PURE__*/new WeakMap();
|
|
34
40
|
|
|
41
|
+
var _id = /*#__PURE__*/new WeakMap();
|
|
42
|
+
|
|
35
43
|
var BasicObj = /*#__PURE__*/_createClass(function BasicObj(values, model) {
|
|
36
44
|
var _this = this;
|
|
37
45
|
|
|
@@ -42,6 +50,23 @@ var BasicObj = /*#__PURE__*/_createClass(function BasicObj(values, model) {
|
|
|
42
50
|
value: {}
|
|
43
51
|
});
|
|
44
52
|
|
|
53
|
+
_classPrivateFieldInitSpec(this, _id, {
|
|
54
|
+
writable: true,
|
|
55
|
+
value: null
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
_defineProperty(this, "getId", function () {
|
|
59
|
+
if (!_classPrivateFieldGet(_this, _id)) {
|
|
60
|
+
if (_this.id && (typeof _this.id === "string" || typeof _this.id === "number")) {
|
|
61
|
+
_classPrivateFieldSet(_this, _id, _this.id.toString());
|
|
62
|
+
} else {
|
|
63
|
+
_classPrivateFieldSet(_this, _id, (0, _uuid.v4)());
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return _classPrivateFieldGet(_this, _id);
|
|
68
|
+
});
|
|
69
|
+
|
|
45
70
|
_defineProperty(this, "get", function (attribute, defaultValue) {
|
|
46
71
|
var _ref, _classPrivateFieldGet2;
|
|
47
72
|
|
package/dist/Obj.js
CHANGED
|
@@ -131,18 +131,6 @@ var Obj = /*#__PURE__*/function (_BasicObj) {
|
|
|
131
131
|
return _model;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
var id;
|
|
135
|
-
|
|
136
|
-
if (_this.id && (typeof _this.id === "string" || typeof _this.id === "number")) {
|
|
137
|
-
id = _this.id.toString();
|
|
138
|
-
} else {
|
|
139
|
-
id = (0, _uuid.v4)();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
_this.getId = function () {
|
|
143
|
-
return id;
|
|
144
|
-
};
|
|
145
|
-
|
|
146
134
|
return _this;
|
|
147
135
|
}
|
|
148
136
|
|
package/dist/SubObj.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dataflux",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "DataFlux, automatically interfaces with your REST APIs to create a 2-way-synced local data store. Transparently manages data propagation in the React state.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": "dist/index.js",
|