@sumaris-net/ngx-components 1.23.55 → 1.23.57

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.
@@ -13818,7 +13818,7 @@
13818
13818
  function EntityStore(name, storage, policy) {
13819
13819
  this.name = name;
13820
13820
  this.storage = storage;
13821
- this._onChange = new rxjs.BehaviorSubject(false);
13821
+ this._onChange = new rxjs.BehaviorSubject(true);
13822
13822
  this._dirty = false;
13823
13823
  this.policy = policy || {};
13824
13824
  this.reset({ emitEvent: false });
@@ -13897,9 +13897,7 @@
13897
13897
  console.warn('[entity-store] WARN: Watching full entities, splited by id in entity store. This can be long! Please make sure you need full entities here.');
13898
13898
  return this._onChange
13899
13899
  .pipe(
13900
- // Wait data loaded
13901
- operators.filter(function (_) { return _this._loaded; }),
13902
- // Apply filter and sort
13900
+ // Apply filter on cache
13903
13901
  operators.map(function (_) { return _this.reduceAndSort(_this._cache, variables); }),
13904
13902
  // Then convert into full entities (using parallel jobs - /!\ can use lot of memory)
13905
13903
  operators.mergeMap(function (res) { return Promise.all((res.data || [])
@@ -13910,11 +13908,7 @@
13910
13908
  }
13911
13909
  // Load using entities array
13912
13910
  return this._onChange
13913
- .pipe(
13914
- // Wait data loaded
13915
- operators.filter(function (_) { return _this._loaded; }),
13916
- // Apply filter and sort
13917
- operators.map(function (_) { return _this.reduceAndSort(_this._cache, variables); }));
13911
+ .pipe(operators.map(function (_) { return _this.reduceAndSort(_this._cache, variables); }));
13918
13912
  };
13919
13913
  /**
13920
13914
  * WIll apply a filter, then a sort, then a page slice
@@ -13982,7 +13976,7 @@
13982
13976
  var result;
13983
13977
  console.info("[entity-storage] Saving " + entities.length + " " + this.name + "(s)");
13984
13978
  // First save, or reset using given entities
13985
- if (!this._loaded || !this._cache || (opts === null || opts === void 0 ? void 0 : opts.reset)) {
13979
+ if (isEmptyArray(this._cache) || (opts && opts.reset)) {
13986
13980
  this.setEntities(entities, { emitEvent: false });
13987
13981
  }
13988
13982
  else {
@@ -27198,6 +27192,8 @@
27198
27192
  AppTable.prototype.confirmAndForward = function (event, row) {
27199
27193
  var _this = this;
27200
27194
  var _a;
27195
+ if (!this.inlineEdition)
27196
+ return false;
27201
27197
  row = row || this.editedRow;
27202
27198
  if (!this.confirmEditCreate(event, row)) {
27203
27199
  // If pending: Wait end of validation, then loop
@@ -27771,7 +27767,7 @@
27771
27767
  };
27772
27768
  /* -- protected method -- */
27773
27769
  AppTable.prototype.editRow = function (event, row, opts) {
27774
- if (!this._enabled)
27770
+ if (!this._enabled || !this.inlineEdition)
27775
27771
  return false;
27776
27772
  if (this.editedRow === row)
27777
27773
  return true; // Already the edited row
@@ -28102,7 +28098,7 @@
28102
28098
  };
28103
28099
  AppTable.prototype.addRowToTable = function (insertAt, opts) {
28104
28100
  return __awaiter(this, void 0, void 0, function () {
28105
- var row;
28101
+ var editing, row;
28106
28102
  return __generator(this, function (_e) {
28107
28103
  switch (_e.label) {
28108
28104
  case 0:
@@ -28111,7 +28107,8 @@
28111
28107
  console.warn('[table] Cannot add new row, because the previous edited row cannot be confirmed');
28112
28108
  return [2 /*return*/, undefined];
28113
28109
  }
28114
- return [4 /*yield*/, this._dataSource.createNew(insertAt, { editing: opts === null || opts === void 0 ? void 0 : opts.editing })];
28110
+ editing = this.inlineEdition && (!opts || opts.editing !== false);
28111
+ return [4 /*yield*/, this._dataSource.createNew(insertAt, { editing: editing })];
28115
28112
  case 1:
28116
28113
  row = _e.sent();
28117
28114
  if (!row)