@onehat/data 1.19.19 → 1.19.21
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 +1 -1
- package/src/Repository/OneBuild.js +31 -1
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
33
33
|
const defaults = {
|
|
34
34
|
|
|
35
35
|
isAutoLoad: false,
|
|
36
|
-
isAutoSave:
|
|
36
|
+
isAutoSave: false,
|
|
37
37
|
|
|
38
38
|
api: {
|
|
39
39
|
get: this.name + '/get',
|
|
@@ -322,6 +322,11 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
322
322
|
params['conditions[' + idPropertyName + ']'] = id;
|
|
323
323
|
|
|
324
324
|
const data = _.merge(params, this._baseParams);
|
|
325
|
+
|
|
326
|
+
if (this.debugMode) {
|
|
327
|
+
console.log('Sending ' + url, options);
|
|
328
|
+
}
|
|
329
|
+
|
|
325
330
|
return this._send(this.methods.get, this.api.get, data)
|
|
326
331
|
.then(result => {
|
|
327
332
|
if (this.debugMode) {
|
|
@@ -497,6 +502,11 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
497
502
|
this.markLoading();
|
|
498
503
|
|
|
499
504
|
const data = _.merge({ depth }, this._baseParams, this._params);
|
|
505
|
+
|
|
506
|
+
if (this.debugMode) {
|
|
507
|
+
console.log('loadRootNodes', data);
|
|
508
|
+
}
|
|
509
|
+
|
|
500
510
|
return this._send('POST', this.name + '/getNodes', data)
|
|
501
511
|
.then((result) => {
|
|
502
512
|
if (this.debugMode) {
|
|
@@ -580,6 +590,11 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
580
590
|
this.markLoading();
|
|
581
591
|
|
|
582
592
|
const data = _.merge({ depth, nodeId: treeNode.id, }, this._baseParams, this._params);
|
|
593
|
+
|
|
594
|
+
if (this.debugMode) {
|
|
595
|
+
console.log('loadNode', data);
|
|
596
|
+
}
|
|
597
|
+
|
|
583
598
|
return this._send('POST', this.name + '/getNodes', data)
|
|
584
599
|
.then((result) => {
|
|
585
600
|
if (this.debugMode) {
|
|
@@ -655,6 +670,11 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
655
670
|
this.markLoading();
|
|
656
671
|
|
|
657
672
|
const data = _.merge({ depth, parentId: treeNode.id, }, this._baseParams, this._params);
|
|
673
|
+
|
|
674
|
+
if (this.debugMode) {
|
|
675
|
+
console.log('loadChildNodes', data);
|
|
676
|
+
}
|
|
677
|
+
|
|
658
678
|
return this._send('POST', this.name + '/getNodes', data)
|
|
659
679
|
.then((result) => {
|
|
660
680
|
if (this.debugMode) {
|
|
@@ -729,6 +749,11 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
729
749
|
}
|
|
730
750
|
|
|
731
751
|
const data = _.merge({ q, }, this._baseParams, this._params);
|
|
752
|
+
|
|
753
|
+
if (this.debugMode) {
|
|
754
|
+
console.log('searchNodes', data);
|
|
755
|
+
}
|
|
756
|
+
|
|
732
757
|
return this._send('POST', this.name + '/searchNodes', data)
|
|
733
758
|
.then((result) => {
|
|
734
759
|
if (this.debugMode) {
|
|
@@ -785,6 +810,11 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
785
810
|
const oldParentId = treeNode.parent?.id;
|
|
786
811
|
|
|
787
812
|
const data = _.merge({ nodeId: treeNode.id, parentId: newParentId, }, this._baseParams, this._params);
|
|
813
|
+
|
|
814
|
+
if (this.debugMode) {
|
|
815
|
+
console.log('moveTreeNode', data);
|
|
816
|
+
}
|
|
817
|
+
|
|
788
818
|
return this._send('POST', this.name + '/moveNode', data)
|
|
789
819
|
.then((result) => {
|
|
790
820
|
if (this.debugMode) {
|