tnx-shared 5.3.256 → 5.3.258

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.
@@ -8693,8 +8693,9 @@
8693
8693
  var url = plusUrl ? this.serviceUri + "/" + plusUrl + "/" + id : this.serviceUri + "/" + id;
8694
8694
  return this._http.put(url, item).toPromise();
8695
8695
  };
8696
- BaseService.prototype.delete = function (id) {
8697
- var url = this.serviceUri + "/" + id;
8696
+ BaseService.prototype.delete = function (id, plusUrl) {
8697
+ if (plusUrl === void 0) { plusUrl = ''; }
8698
+ var url = plusUrl ? this.serviceUri + "/" + plusUrl + "/" + id : this.serviceUri + "/" + id;
8698
8699
  return this._http.delete(url).toPromise();
8699
8700
  };
8700
8701
  BaseService.prototype.deleteById = function (id) {
@@ -8702,8 +8703,9 @@
8702
8703
  var url = this.serviceUri + "/" + id;
8703
8704
  return this._http.delete(url).pipe(operators.catchError(function (err) { return _this.handleError(err, _this._injector); })).toPromise();
8704
8705
  };
8705
- BaseService.prototype.deleteMany = function (lstId) {
8706
- var url = this.serviceUri + "/DeleteManyAsync/" + lstId;
8706
+ BaseService.prototype.deleteMany = function (lstId, plusUrl) {
8707
+ if (plusUrl === void 0) { plusUrl = ''; }
8708
+ var url = plusUrl ? this.serviceUri + "/DeleteManyAsync/" + plusUrl + "/" + lstId : this.serviceUri + "/DeleteManyAsync/" + lstId;
8707
8709
  return this._http.delete(url).toPromise();
8708
8710
  };
8709
8711
  BaseService.prototype.defaultGet = function (apiUrl, options) {
@@ -27540,7 +27542,7 @@
27540
27542
  };
27541
27543
  };
27542
27544
  ListBase.prototype.getPromiseDeleteItem = function (rowData) {
27543
- return this.setting.baseService.delete(rowData.id);
27545
+ return this.setting.baseService.delete(rowData.id, this.deletePlusUrl);
27544
27546
  };
27545
27547
  ListBase.prototype._delete = function (rowData) {
27546
27548
  var _this = this;
@@ -27575,7 +27577,7 @@
27575
27577
  };
27576
27578
  ListBase.prototype.getPromiseDeleteItems = function (items) {
27577
27579
  var ids = items.map(function (x) { return x.id; }).join(',');
27578
- return this.setting.baseService.deleteMany(ids);
27580
+ return this.setting.baseService.deleteMany(ids, this.deleteManyPlusUrl);
27579
27581
  };
27580
27582
  ListBase.prototype._deleteMultiple = function (items) {
27581
27583
  var _this = this;
@@ -32939,12 +32941,14 @@
32939
32941
  && this.control.autoDisplayFirst) {
32940
32942
  newValue = [this.dataSourceInternal[0].value];
32941
32943
  }
32942
- this._value = newValue;
32943
- if (oldValue.length != this._value.length) {
32944
- this.fireChangedEvent();
32945
- }
32946
- else if (this._value != oldValue) {
32947
- this.adjustValue2WayBinding();
32944
+ if (this._value !== undefined) {
32945
+ this._value = newValue;
32946
+ if (oldValue.length != this._value.length) {
32947
+ this.fireChangedEvent();
32948
+ }
32949
+ else if (!this._commonService.isSameArray(oldValue, this._value)) {
32950
+ this.adjustValue2WayBinding();
32951
+ }
32948
32952
  }
32949
32953
  }
32950
32954
  else {
@@ -32954,14 +32958,16 @@
32954
32958
  && this.control.autoDisplayFirst) {
32955
32959
  this._value = this.dataSourceInternal[0].value;
32956
32960
  }
32957
- // Lưu ý if dưới không được đổi thành oldValue != this._value
32958
- // giá trị của this._value sẽ được correcting trên (id => object) nên so sánh sẽ khác nhau
32959
- if ((oldValue != null && this._value == null)
32960
- || (oldValue == null && this._value != null)) {
32961
- this.fireChangedEvent();
32962
- }
32963
- else if (this._value != oldValue) {
32964
- this.adjustValue2WayBinding();
32961
+ if (this._value !== undefined) {
32962
+ // Lưu ý if dưới không được đổi thành oldValue != this._value
32963
+ // giá trị của this._value sẽ được correcting ở trên (id => object) nên so sánh sẽ khác nhau
32964
+ if ((oldValue != null && this._value == null)
32965
+ || (oldValue == null && this._value != null)) {
32966
+ this.fireChangedEvent();
32967
+ }
32968
+ else if (this._value != oldValue) {
32969
+ this.adjustValue2WayBinding();
32970
+ }
32965
32971
  }
32966
32972
  }
32967
32973
  this.checkReady();