@sumaris-net/ngx-components 1.11.10 → 1.11.11
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/bundles/sumaris-net.ngx-components.umd.js +20 -18
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +18 -16
- package/fesm2015/sumaris-net.ngx-components.js +17 -15
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor.class.d.ts +4 -3
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -27425,13 +27425,16 @@
|
|
|
27425
27425
|
});
|
|
27426
27426
|
});
|
|
27427
27427
|
};
|
|
27428
|
+
AppEntityEditor.prototype.canUserWrite = function (data, opts) {
|
|
27429
|
+
return this.dataService.canUserWrite(data, opts);
|
|
27430
|
+
};
|
|
27428
27431
|
AppEntityEditor.prototype.startListenRemoteChanges = function () {
|
|
27429
27432
|
var _this = this;
|
|
27430
27433
|
// Skip if disable, or already listening
|
|
27431
27434
|
if (this._listenChangesSubscription || !this._enableListenChanges || this.isNewData)
|
|
27432
27435
|
return;
|
|
27433
27436
|
// Listen for changes on server
|
|
27434
|
-
this._listenChangesSubscription = this.
|
|
27437
|
+
this._listenChangesSubscription = this.listenChanges(this.data.id, { interval: this._listenIntervalInSeconds })
|
|
27435
27438
|
.pipe(operators.filter(isNotNil))
|
|
27436
27439
|
.subscribe(function (data) {
|
|
27437
27440
|
if (data.updateDate && data.updateDate.isAfter(_this.data.updateDate)) {
|
|
@@ -27784,6 +27787,19 @@
|
|
|
27784
27787
|
});
|
|
27785
27788
|
});
|
|
27786
27789
|
};
|
|
27790
|
+
AppEntityEditor.prototype.unload = function () {
|
|
27791
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
27792
|
+
return __generator(this, function (_c) {
|
|
27793
|
+
this.stopListenRemoteChanges();
|
|
27794
|
+
this.form.reset();
|
|
27795
|
+
this.registerForms();
|
|
27796
|
+
this._dirty = false;
|
|
27797
|
+
this.data = null;
|
|
27798
|
+
this.saving = false;
|
|
27799
|
+
return [2 /*return*/];
|
|
27800
|
+
});
|
|
27801
|
+
});
|
|
27802
|
+
};
|
|
27787
27803
|
AppEntityEditor.prototype.goBack = function (event) {
|
|
27788
27804
|
var _a;
|
|
27789
27805
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -27833,10 +27849,6 @@
|
|
|
27833
27849
|
if (!opts || opts.emitEvent !== false)
|
|
27834
27850
|
this.markForCheck();
|
|
27835
27851
|
};
|
|
27836
|
-
/* -- public abstract methods (to override) -- */
|
|
27837
|
-
AppEntityEditor.prototype.canUserWrite = function (data, opts) {
|
|
27838
|
-
return this.dataService.canUserWrite(data, opts);
|
|
27839
|
-
};
|
|
27840
27852
|
/* -- protected methods -- */
|
|
27841
27853
|
/**
|
|
27842
27854
|
* Return undefined to keep same tab
|
|
@@ -27846,19 +27858,6 @@
|
|
|
27846
27858
|
var nextTabIndex = this.selectedTabIndex + 1;
|
|
27847
27859
|
return nextTabIndex < this.tabCount ? nextTabIndex : undefined;
|
|
27848
27860
|
};
|
|
27849
|
-
AppEntityEditor.prototype.unload = function () {
|
|
27850
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
27851
|
-
return __generator(this, function (_c) {
|
|
27852
|
-
this.stopListenRemoteChanges();
|
|
27853
|
-
this.form.reset();
|
|
27854
|
-
this.registerForms();
|
|
27855
|
-
this._dirty = false;
|
|
27856
|
-
this.data = null;
|
|
27857
|
-
this.saving = false;
|
|
27858
|
-
return [2 /*return*/];
|
|
27859
|
-
});
|
|
27860
|
-
});
|
|
27861
|
-
};
|
|
27862
27861
|
AppEntityEditor.prototype.onBeforeEntityLoad = function () {
|
|
27863
27862
|
return __awaiter(this, void 0, void 0, function () {
|
|
27864
27863
|
return __generator(this, function (_c) {
|
|
@@ -27982,6 +27981,9 @@
|
|
|
27982
27981
|
}
|
|
27983
27982
|
return parentUrl;
|
|
27984
27983
|
};
|
|
27984
|
+
AppEntityEditor.prototype.listenChanges = function (id, opts) {
|
|
27985
|
+
return this.dataService.listenChanges(this.data.id, opts);
|
|
27986
|
+
};
|
|
27985
27987
|
AppEntityEditor.prototype.markForCheck = function () {
|
|
27986
27988
|
this.cd.markForCheck();
|
|
27987
27989
|
};
|