@onehat/data 1.19.39 → 1.19.41

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.19.39",
3
+ "version": "1.19.41",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -53,6 +53,13 @@ export default class BooleanProperty extends Property {
53
53
  return Parsers.ParseBool(this.parsedValue); // Use a Parser instead of a Formatter to make sure we submit it as an actual boolean primitive value
54
54
  }
55
55
 
56
+ toggle = () => {
57
+ if (this.isDestroyed) {
58
+ throw Error('this.toggle is no longer valid. Property has been destroyed.');
59
+ }
60
+ this.parsedValue = !this.parsedValue;
61
+ }
62
+
56
63
  };
57
64
 
58
65
  BooleanProperty.className = 'Boolean';
@@ -346,7 +346,7 @@ class OneBuildRepository extends AjaxRepository {
346
346
  return duplicateEntity;
347
347
  }
348
348
 
349
- loadOneAdditionalRecord = async (id) => {
349
+ loadOneAdditionalEntity = async (id) => {
350
350
  const entity = await this.getSingleEntityFromServer(id);
351
351
  if (!entity) {
352
352
  this.throwError('entity not found');