@sumaris-net/ngx-components 0.27.3 → 0.27.4
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 +11 -13
- 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/editor.class.js +1 -3
- package/esm2015/src/app/core/form/entity-editor.class.js +2 -1
- package/esm2015/src/app/core/form/form.class.js +7 -9
- package/fesm2015/sumaris-net.ngx-components.js +5 -8
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/form.class.d.ts +3 -3
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -19033,7 +19033,7 @@
|
|
|
19033
19033
|
this.error = null;
|
|
19034
19034
|
this._enable = false;
|
|
19035
19035
|
this._loading = true;
|
|
19036
|
-
this.
|
|
19036
|
+
this._$ready = new rxjs.BehaviorSubject(true);
|
|
19037
19037
|
this.i18nFieldPrefix = null;
|
|
19038
19038
|
this._subscription = new rxjs.Subscription();
|
|
19039
19039
|
this.debug = false;
|
|
@@ -19245,10 +19245,8 @@
|
|
|
19245
19245
|
}
|
|
19246
19246
|
};
|
|
19247
19247
|
AppForm.prototype.markAsReady = function (opts) {
|
|
19248
|
-
if (!this.
|
|
19249
|
-
this.
|
|
19250
|
-
if (!opts || opts.emitEvent !== false)
|
|
19251
|
-
this.markForCheck();
|
|
19248
|
+
if (!this._$ready.value) {
|
|
19249
|
+
this._$ready.next(true);
|
|
19252
19250
|
}
|
|
19253
19251
|
};
|
|
19254
19252
|
/**
|
|
@@ -19256,8 +19254,7 @@
|
|
|
19256
19254
|
* @param opts
|
|
19257
19255
|
*/
|
|
19258
19256
|
AppForm.prototype.ready = function (opts) {
|
|
19259
|
-
|
|
19260
|
-
return waitFor(function () { return _this._ready; }, opts);
|
|
19257
|
+
return firstTruePromise(this._$ready);
|
|
19261
19258
|
};
|
|
19262
19259
|
/**
|
|
19263
19260
|
* Wait form is idle (not loading)
|
|
@@ -25498,8 +25495,6 @@
|
|
|
25498
25495
|
var _a;
|
|
25499
25496
|
(_a = this._children) === null || _a === void 0 ? void 0 : _a.forEach(function (c) { return c.markAsReady(opts); });
|
|
25500
25497
|
this._$ready.next(true);
|
|
25501
|
-
if (!this.loading && (!opts || opts.emitEvent !== false))
|
|
25502
|
-
this.markForCheck();
|
|
25503
25498
|
};
|
|
25504
25499
|
AppEditor.prototype.ready = function (opts) {
|
|
25505
25500
|
return firstTruePromise(this._$ready);
|
|
@@ -26188,13 +26183,16 @@
|
|
|
26188
26183
|
opts = Object.assign({ updateRoute: this._autoUpdateRoute && idChanged && !this.loading, openTabIndex: this._autoOpenNextTab && idChanged && isNil(this.previousDataId) && this.computeNextTabIndex() }, opts);
|
|
26189
26184
|
this.data = data;
|
|
26190
26185
|
this.previousDataId = data.id || null;
|
|
26191
|
-
|
|
26192
|
-
if (!promiseOrVoid) return [3 /*break*/, 2];
|
|
26193
|
-
return [4 /*yield*/, promiseOrVoid];
|
|
26186
|
+
return [4 /*yield*/, this.ready()];
|
|
26194
26187
|
case 1:
|
|
26195
26188
|
_b.sent();
|
|
26196
|
-
|
|
26189
|
+
promiseOrVoid = this.setValue(data);
|
|
26190
|
+
if (!promiseOrVoid) return [3 /*break*/, 3];
|
|
26191
|
+
return [4 /*yield*/, promiseOrVoid];
|
|
26197
26192
|
case 2:
|
|
26193
|
+
_b.sent();
|
|
26194
|
+
_b.label = 3;
|
|
26195
|
+
case 3:
|
|
26198
26196
|
if (!opts || opts.emitEvent !== false) {
|
|
26199
26197
|
this.markAsPristine();
|
|
26200
26198
|
this.markAsUntouched();
|