@sumaris-net/ngx-components 1.21.5 → 1.21.8
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 +22 -10
- 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 +19 -12
- package/fesm2015/sumaris-net.ngx-components.js +18 -11
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/editor.class.d.ts +5 -2
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -28053,10 +28053,16 @@
|
|
|
28053
28053
|
enumerable: false,
|
|
28054
28054
|
configurable: true
|
|
28055
28055
|
});
|
|
28056
|
+
Object.defineProperty(AppEditor.prototype, "editors", {
|
|
28057
|
+
get: function () {
|
|
28058
|
+
return this._children && this._children.filter(function (c) { return c instanceof AppEditor; });
|
|
28059
|
+
},
|
|
28060
|
+
enumerable: false,
|
|
28061
|
+
configurable: true
|
|
28062
|
+
});
|
|
28056
28063
|
Object.defineProperty(AppEditor.prototype, "dirty", {
|
|
28057
28064
|
get: function () {
|
|
28058
|
-
|
|
28059
|
-
return this._dirty || (((_a = this._children) === null || _a === void 0 ? void 0 : _a.findIndex(function (c) { return c.enabled && c.dirty; })) !== -1) || false;
|
|
28065
|
+
return this._dirty || (this._children && this._children.findIndex(function (c) { return c.enabled && c.dirty; }) !== -1) || false;
|
|
28060
28066
|
},
|
|
28061
28067
|
enumerable: false,
|
|
28062
28068
|
configurable: true
|
|
@@ -28074,24 +28080,21 @@
|
|
|
28074
28080
|
});
|
|
28075
28081
|
Object.defineProperty(AppEditor.prototype, "invalid", {
|
|
28076
28082
|
get: function () {
|
|
28077
|
-
|
|
28078
|
-
return (((_a = this._children) === null || _a === void 0 ? void 0 : _a.findIndex(function (c) { return c.enabled && c.invalid; })) !== -1) || false;
|
|
28083
|
+
return (this._children && this._children.findIndex(function (c) { return c.enabled && c.invalid; }) !== -1) || false;
|
|
28079
28084
|
},
|
|
28080
28085
|
enumerable: false,
|
|
28081
28086
|
configurable: true
|
|
28082
28087
|
});
|
|
28083
28088
|
Object.defineProperty(AppEditor.prototype, "pending", {
|
|
28084
28089
|
get: function () {
|
|
28085
|
-
|
|
28086
|
-
return (((_a = this._children) === null || _a === void 0 ? void 0 : _a.findIndex(function (c) { return c.enabled && c.pending; })) !== -1) || false;
|
|
28090
|
+
return (this._children && this._children.findIndex(function (c) { return c.enabled && c.pending; }) !== -1) || false;
|
|
28087
28091
|
},
|
|
28088
28092
|
enumerable: false,
|
|
28089
28093
|
configurable: true
|
|
28090
28094
|
});
|
|
28091
28095
|
Object.defineProperty(AppEditor.prototype, "loading", {
|
|
28092
28096
|
get: function () {
|
|
28093
|
-
|
|
28094
|
-
return this.loadingSubject.value || (((_a = this._children) === null || _a === void 0 ? void 0 : _a.findIndex(function (c) { return c.enabled && c.loading; })) !== -1) || false;
|
|
28097
|
+
return this.loadingSubject.value || (this._children && this._children.findIndex(function (c) { return c.enabled && c.loading; }) !== -1) || false;
|
|
28095
28098
|
},
|
|
28096
28099
|
enumerable: false,
|
|
28097
28100
|
configurable: true
|
|
@@ -28154,7 +28157,15 @@
|
|
|
28154
28157
|
AppEditor.prototype.addChildForms = function (forms) {
|
|
28155
28158
|
var _this = this;
|
|
28156
28159
|
(forms || []).forEach(function (form) { return _this.addChildForm(form); });
|
|
28157
|
-
|
|
28160
|
+
};
|
|
28161
|
+
AppEditor.prototype.removeChildForm = function (form) {
|
|
28162
|
+
if (!form)
|
|
28163
|
+
throw new Error('Trying to remove an undefined child form');
|
|
28164
|
+
var index = (this._children || []).findIndex(function (c) { return c === form; });
|
|
28165
|
+
if (index !== -1) {
|
|
28166
|
+
return this._children.splice(index, 1)[0];
|
|
28167
|
+
}
|
|
28168
|
+
return undefined;
|
|
28158
28169
|
};
|
|
28159
28170
|
AppEditor.prototype.disable = function (opts) {
|
|
28160
28171
|
var _a;
|
|
@@ -28269,11 +28280,12 @@
|
|
|
28269
28280
|
* @param opts
|
|
28270
28281
|
*/
|
|
28271
28282
|
AppEditor.prototype.unload = function (opts) {
|
|
28283
|
+
var _a;
|
|
28272
28284
|
return __awaiter(this, void 0, void 0, function () {
|
|
28273
28285
|
return __generator(this, function (_b) {
|
|
28274
28286
|
console.debug('[tab-page] Unloading data...');
|
|
28275
28287
|
this.markAsLoading();
|
|
28276
|
-
this._children.forEach(function (f) {
|
|
28288
|
+
(_a = this._children) === null || _a === void 0 ? void 0 : _a.forEach(function (f) {
|
|
28277
28289
|
if (f instanceof AppForm) {
|
|
28278
28290
|
f.reset(null, opts);
|
|
28279
28291
|
}
|