@onehat/data 1.8.14 → 1.8.17
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/package.json +8 -8
- package/src/Entity.js +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onehat/data",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.17",
|
|
4
4
|
"description": "JS data modeling package with adapters for many storage mediums.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@onehat/events": "^1.6.5",
|
|
39
39
|
"accounting-js": "^1.1.1",
|
|
40
|
-
"axios": "^0.
|
|
41
|
-
"chrono-node": "^2.3.
|
|
42
|
-
"fast-xml-parser": "^
|
|
40
|
+
"axios": "^0.27.2",
|
|
41
|
+
"chrono-node": "^2.3.9",
|
|
42
|
+
"fast-xml-parser": "^4.0.9",
|
|
43
43
|
"he": "^1.2.0",
|
|
44
|
-
"js-base64": "^3.
|
|
44
|
+
"js-base64": "^3.7.2",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
46
|
-
"moment": "^2.29.
|
|
46
|
+
"moment": "^2.29.4",
|
|
47
47
|
"numeral": "^2.0.6",
|
|
48
|
-
"qs": "^6.
|
|
49
|
-
"relative-time-parser": "^1.0.
|
|
48
|
+
"qs": "^6.11.0",
|
|
49
|
+
"relative-time-parser": "^1.0.15",
|
|
50
50
|
"uuid": "^8.3.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
package/src/Entity.js
CHANGED
|
@@ -1297,6 +1297,10 @@ class Entity extends EventEmitter {
|
|
|
1297
1297
|
if (this.isFrozen) {
|
|
1298
1298
|
return;
|
|
1299
1299
|
}
|
|
1300
|
+
|
|
1301
|
+
// Save destroyed properties
|
|
1302
|
+
this.destroyedProperties = this.displayValues;
|
|
1303
|
+
|
|
1300
1304
|
this._id = this.id; // save id, so we can query it later--even on a destroyed entity
|
|
1301
1305
|
|
|
1302
1306
|
// parent objects
|
|
@@ -1318,10 +1322,7 @@ class Entity extends EventEmitter {
|
|
|
1318
1322
|
}
|
|
1319
1323
|
|
|
1320
1324
|
get [Symbol.toStringTag]() {
|
|
1321
|
-
|
|
1322
|
-
throw Error('this.toStringTag is no longer valid. Entity has been destroyed.');
|
|
1323
|
-
}
|
|
1324
|
-
return 'Entity {' + this.id + '} - ' + this.displayValue;
|
|
1325
|
+
return 'Entity {' + this.id + '} - ' + (this.isDestroyed ? 'destroyed' : this.displayValue);
|
|
1325
1326
|
}
|
|
1326
1327
|
|
|
1327
1328
|
get toJSON() {
|