@acorex/components 3.0.28 → 3.0.32

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.
@@ -7641,7 +7641,7 @@
7641
7641
  _this.showCounter = true;
7642
7642
  _this.scrollWeel = true;
7643
7643
  _this.showDoubleCounter = false;
7644
- _this.maxLength = 16;
7644
+ _this.maxLength = 18;
7645
7645
  _this.userQuestionUpdate = new rxjs.Subject();
7646
7646
  _this.userEdite = false;
7647
7647
  _this.findDots = false;
@@ -7773,6 +7773,14 @@
7773
7773
  enumerable: true,
7774
7774
  configurable: true
7775
7775
  });
7776
+ AXNumberBoxComponent.prototype.calcSeparator = function (num) {
7777
+ if (this.showSeparator) {
7778
+ return num + (+(num / 3));
7779
+ }
7780
+ else {
7781
+ return num;
7782
+ }
7783
+ };
7776
7784
  AXNumberBoxComponent.prototype.addCommas2 = function (x) {
7777
7785
  return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
7778
7786
  };
@@ -8056,13 +8064,20 @@
8056
8064
  }, 50);
8057
8065
  };
8058
8066
  AXNumberBoxComponent.prototype.checkMinMax = function (text) {
8059
- if (this.min !== null) {
8060
- if (+text < this.min) {
8067
+ var number;
8068
+ if (text.indexOf(',') > 0) {
8069
+ number = Number(text.replaceAll(',', ''));
8070
+ }
8071
+ else {
8072
+ number = Number(text);
8073
+ }
8074
+ if (!!this.min) {
8075
+ if (number < this.min) {
8061
8076
  this.value = '';
8062
8077
  }
8063
8078
  }
8064
- if (this.max !== null) {
8065
- if (+text > this.max) {
8079
+ if (!!this.max) {
8080
+ if (number > this.max) {
8066
8081
  this.value = '';
8067
8082
  }
8068
8083
  }
@@ -8250,7 +8265,7 @@
8250
8265
  AXNumberBoxComponent = AXNumberBoxComponent_1 = __decorate([
8251
8266
  core.Component({
8252
8267
  selector: 'ax-number-box',
8253
- template: "<div class=\"ax form-item\" [class.disabled]=\"disabled\" [attr.id]=\"uid\" #fc>\r\n <div class=\"ax items-wrapper\">\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n <ax-button icon=\"far fa-plus\" type=\"success blank\" (click)=\"upStepHandel()\" [disabled]=\"disabled\" *ngIf=\"showDoubleCounter\"></ax-button>\r\n </div>\r\n <div class=\"content\" #content>\r\n <div class=\"ax form-control input {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\"\r\n [class.icon]=\"icon\">\r\n <input #input type=\"text\" class=\"ax {{size}}\" [maxlength]=\"maxLength\" [(ngModel)]=\"textValue\" placeholder=\"{{placeholder}}\"\r\n [readonly]=\"readonly\" [disabled]=\"disabled\" [ngClass]=\"setTextAlign()\"\r\n [class.clear]=\"value && allowClear\" (focus)=\"handleInputFocus($event)\" (blur)=\"handleInputBlur($event)\"\r\n (keypress)=\"handleKeyPress($event)\" (ngModelChange)=\"this.userQuestionUpdate.next($event)\"\r\n (keydown)=\"handleKeyDown($event)\" (click)=\"handleClick()\" (keyup)=\"handleKeyUp($event)\">\r\n <i class=\"{{icon}}\" *ngIf=\"icon\"></i>\r\n </div>\r\n </div>\r\n <div class=\"ax items-wrapper\">\r\n <ax-button *ngIf=\"value && allowClear\" [disabled]=\"disabled\" icon=\"far fa-times\" type=\"danger blank\"\r\n (click)=\"clear()\"></ax-button>\r\n <ax-button icon=\"far fa-minus\" type=\"danger blank\" (click)=\"downStepHandel()\" [disabled]=\"disabled\" *ngIf=\"showDoubleCounter\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n <div class=\"arrow-number\" *ngIf=\"showCounter && !showDoubleCounter\" >\r\n <ax-button type=\"light blank\" [disabled]=\"disabled\" icon=\"fas fa-angle-up\" [size]=\"size\"\r\n (mousedown)=\"upStepHandel()\" (mouseup)=\"delaySearch()\" [tabIndex]=\"-1\"></ax-button>\r\n <ax-button type=\"light blank\" [disabled]=\"disabled\" icon=\"fas fa-angle-down\" [size]=\"size\"\r\n (mousedown)=\"downStepHandel()\" (mouseup)=\"delaySearch()\" [tabIndex]=\"-1\"></ax-button>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n",
8268
+ template: "<div class=\"ax form-item\" [class.disabled]=\"disabled\" [attr.id]=\"uid\" #fc>\r\n <div class=\"ax items-wrapper\">\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n <ax-button icon=\"far fa-plus\" type=\"success blank\" (click)=\"upStepHandel()\" [disabled]=\"disabled\" *ngIf=\"showDoubleCounter\"></ax-button>\r\n </div>\r\n <div class=\"content\" #content>\r\n <div class=\"ax form-control input {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\"\r\n [class.icon]=\"icon\">\r\n <input #input type=\"text\" class=\"ax {{size}}\" [maxlength]=\"calcSeparator(maxLength)\" [(ngModel)]=\"textValue\" placeholder=\"{{placeholder}}\"\r\n [readonly]=\"readonly\" [disabled]=\"disabled\" [ngClass]=\"setTextAlign()\"\r\n [class.clear]=\"value && allowClear\" (focus)=\"handleInputFocus($event)\" (blur)=\"handleInputBlur($event)\"\r\n (keypress)=\"handleKeyPress($event)\" (ngModelChange)=\"this.userQuestionUpdate.next($event)\"\r\n (keydown)=\"handleKeyDown($event)\" (click)=\"handleClick()\" (keyup)=\"handleKeyUp($event)\">\r\n <i class=\"{{icon}}\" *ngIf=\"icon\"></i>\r\n </div>\r\n </div>\r\n <div class=\"ax items-wrapper\">\r\n <ax-button *ngIf=\"value && allowClear\" [disabled]=\"disabled\" icon=\"far fa-times\" type=\"danger blank\"\r\n (click)=\"clear()\"></ax-button>\r\n <ax-button icon=\"far fa-minus\" type=\"danger blank\" (click)=\"downStepHandel()\" [disabled]=\"disabled\" *ngIf=\"showDoubleCounter\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n <div class=\"arrow-number\" *ngIf=\"showCounter && !showDoubleCounter\" >\r\n <ax-button type=\"light blank\" [disabled]=\"disabled\" icon=\"fas fa-angle-up\" [size]=\"size\"\r\n (mousedown)=\"upStepHandel()\" (mouseup)=\"delaySearch()\" [tabIndex]=\"-1\"></ax-button>\r\n <ax-button type=\"light blank\" [disabled]=\"disabled\" icon=\"fas fa-angle-down\" [size]=\"size\"\r\n (mousedown)=\"downStepHandel()\" (mouseup)=\"delaySearch()\" [tabIndex]=\"-1\"></ax-button>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n",
8254
8269
  changeDetection: core.ChangeDetectionStrategy.OnPush,
8255
8270
  host: { style: 'width: 100%' },
8256
8271
  providers: [{ provide: AXValidatableComponent, useExisting: AXNumberBoxComponent_1 }]
@@ -9797,7 +9812,6 @@
9797
9812
  };
9798
9813
  AXQueryBuilderRuleComponent.prototype.captionChange = function (e) {
9799
9814
  var _this = this;
9800
- debugger;
9801
9815
  if (e.selectedItems[0]) {
9802
9816
  this.rule.caption = e.selectedItems[0].caption;
9803
9817
  this.rule.dataField = e.selectedItems[0].dataField;
@@ -13769,7 +13783,7 @@
13769
13783
  //seletedKeyFields set id of nodes and parents
13770
13784
  //selectedFieldName set name of fields that set selectes
13771
13785
  _this.selectedFieldName = null;
13772
- _this.selectNodesRecursive = true;
13786
+ _this.selectNodesRecursive = 'all';
13773
13787
  _this.seletedKeyFields = [];
13774
13788
  _this.keyField = 'id';
13775
13789
  _this.hasChildField = 'child';
@@ -13841,6 +13855,7 @@
13841
13855
  }
13842
13856
  if (item.select == true) {
13843
13857
  if (this.selectionMode === 'multiple') {
13858
+ this.selectedParents = this.selectedParents.filter(function (c) { return c[_this.keyField] !== item[_this.keyField]; });
13844
13859
  this.selectedParents.push(item);
13845
13860
  }
13846
13861
  else {
@@ -13895,13 +13910,14 @@
13895
13910
  }
13896
13911
  node.itemData.item = c; //TO DO
13897
13912
  node.itemData.selected = item.select === true ? item.select : false;
13913
+ node.itemData.indeterminate = item.select === null ? true : false;
13898
13914
  node.itemData.hasChild = item[this.hasChildField];
13899
13915
  node.parent = item.parentNode === undefined ? null : this.makeNode(item.parentNode, false);
13900
13916
  return node;
13901
13917
  };
13902
13918
  AXTreeViewComponent.prototype.changeChildSelect = function (item, s) {
13903
13919
  var _this = this;
13904
- if (this.selectNodesRecursive) {
13920
+ if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'childs') {
13905
13921
  item.select = s;
13906
13922
  if (item[this.hasChildField] === true && item[this.childField] && item[this.childField].length > 0) {
13907
13923
  item[this.childField].forEach(function (elm) {
@@ -13934,7 +13950,8 @@
13934
13950
  }
13935
13951
  };
13936
13952
  AXTreeViewComponent.prototype.changeParentSelect = function (item) {
13937
- if (this.selectNodesRecursive) {
13953
+ var _this = this;
13954
+ if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'parents') {
13938
13955
  var allselect = true;
13939
13956
  var alldeselect = true;
13940
13957
  var oneselect = false;
@@ -13958,9 +13975,13 @@
13958
13975
  }
13959
13976
  if (oneselect || (isindeterminate && !allselect)) {
13960
13977
  item.select = null;
13978
+ this.selectedParents = this.selectedParents.filter(function (c) { return c[_this.keyField] !== item[_this.keyField]; });
13979
+ this.selectedParents.push(item);
13961
13980
  }
13962
13981
  if (allselect === true) {
13963
13982
  item.select = true;
13983
+ this.selectedParents = this.selectedParents.filter(function (c) { return c[_this.keyField] !== item[_this.keyField]; });
13984
+ this.selectedParents.push(item);
13964
13985
  }
13965
13986
  if (alldeselect === true) {
13966
13987
  item.select = false;
@@ -14077,6 +14098,7 @@
14077
14098
  else {
14078
14099
  _this.itemRow = _this.listLoad.filter(function (c) { return c.requestId === _data.data.requestId; })[0];
14079
14100
  _this.listLoad = _this.listLoad.filter(function (c) { return c.requestId !== _data.data.requestId; });
14101
+ _this.itemRow.loaded = true;
14080
14102
  if (_this.itemRow !== undefined) {
14081
14103
  _this.hideLoading(_this.itemRow);
14082
14104
  var result_1 = _data.data.result;
@@ -14097,7 +14119,7 @@
14097
14119
  if (_this.selectionLevel == 'parents' && result_1[i][_this.hasChildField] == false) {
14098
14120
  result_1[i].disabledCheckBox = true;
14099
14121
  }
14100
- if (_this.selectionMode !== 'single' && _this.selectNodesRecursive) {
14122
+ if (_this.selectionMode !== 'single' && (_this.selectNodesRecursive == 'all' || _this.selectNodesRecursive == 'childs')) {
14101
14123
  result_1[i].select = _this.itemRow.select === (undefined || null) ? false : _this.itemRow.select;
14102
14124
  if (_this.itemRow.select === true && _this.selectionMode == 'multiple' && result_1[i][_this.hasChildField] === false) {
14103
14125
  _this.selectedItems = _this.selectedItems.filter(function (c) { return c[_this.keyField] !== result_1[i][_this.keyField]; });
@@ -14382,7 +14404,7 @@
14382
14404
  ], AXTreeViewComponent.prototype, "selectedFieldName", void 0);
14383
14405
  __decorate([
14384
14406
  core.Input(),
14385
- __metadata("design:type", Boolean)
14407
+ __metadata("design:type", String)
14386
14408
  ], AXTreeViewComponent.prototype, "selectNodesRecursive", void 0);
14387
14409
  __decorate([
14388
14410
  core.Input(),