@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.
@@ -7435,7 +7435,7 @@ var AXNumberBoxComponent = /** @class */ (function (_super) {
7435
7435
  _this.showCounter = true;
7436
7436
  _this.scrollWeel = true;
7437
7437
  _this.showDoubleCounter = false;
7438
- _this.maxLength = 16;
7438
+ _this.maxLength = 18;
7439
7439
  _this.userQuestionUpdate = new Subject();
7440
7440
  _this.userEdite = false;
7441
7441
  _this.findDots = false;
@@ -7567,6 +7567,14 @@ var AXNumberBoxComponent = /** @class */ (function (_super) {
7567
7567
  enumerable: true,
7568
7568
  configurable: true
7569
7569
  });
7570
+ AXNumberBoxComponent.prototype.calcSeparator = function (num) {
7571
+ if (this.showSeparator) {
7572
+ return num + (+(num / 3));
7573
+ }
7574
+ else {
7575
+ return num;
7576
+ }
7577
+ };
7570
7578
  AXNumberBoxComponent.prototype.addCommas2 = function (x) {
7571
7579
  return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
7572
7580
  };
@@ -7850,13 +7858,20 @@ var AXNumberBoxComponent = /** @class */ (function (_super) {
7850
7858
  }, 50);
7851
7859
  };
7852
7860
  AXNumberBoxComponent.prototype.checkMinMax = function (text) {
7853
- if (this.min !== null) {
7854
- if (+text < this.min) {
7861
+ var number;
7862
+ if (text.indexOf(',') > 0) {
7863
+ number = Number(text.replaceAll(',', ''));
7864
+ }
7865
+ else {
7866
+ number = Number(text);
7867
+ }
7868
+ if (!!this.min) {
7869
+ if (number < this.min) {
7855
7870
  this.value = '';
7856
7871
  }
7857
7872
  }
7858
- if (this.max !== null) {
7859
- if (+text > this.max) {
7873
+ if (!!this.max) {
7874
+ if (number > this.max) {
7860
7875
  this.value = '';
7861
7876
  }
7862
7877
  }
@@ -8044,7 +8059,7 @@ var AXNumberBoxComponent = /** @class */ (function (_super) {
8044
8059
  AXNumberBoxComponent = AXNumberBoxComponent_1 = __decorate([
8045
8060
  Component({
8046
8061
  selector: 'ax-number-box',
8047
- 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",
8062
+ 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",
8048
8063
  changeDetection: ChangeDetectionStrategy.OnPush,
8049
8064
  host: { style: 'width: 100%' },
8050
8065
  providers: [{ provide: AXValidatableComponent, useExisting: AXNumberBoxComponent_1 }]
@@ -9591,7 +9606,6 @@ var AXQueryBuilderRuleComponent = /** @class */ (function () {
9591
9606
  };
9592
9607
  AXQueryBuilderRuleComponent.prototype.captionChange = function (e) {
9593
9608
  var _this = this;
9594
- debugger;
9595
9609
  if (e.selectedItems[0]) {
9596
9610
  this.rule.caption = e.selectedItems[0].caption;
9597
9611
  this.rule.dataField = e.selectedItems[0].dataField;
@@ -13563,7 +13577,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13563
13577
  //seletedKeyFields set id of nodes and parents
13564
13578
  //selectedFieldName set name of fields that set selectes
13565
13579
  _this.selectedFieldName = null;
13566
- _this.selectNodesRecursive = true;
13580
+ _this.selectNodesRecursive = 'all';
13567
13581
  _this.seletedKeyFields = [];
13568
13582
  _this.keyField = 'id';
13569
13583
  _this.hasChildField = 'child';
@@ -13635,6 +13649,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13635
13649
  }
13636
13650
  if (item.select == true) {
13637
13651
  if (this.selectionMode === 'multiple') {
13652
+ this.selectedParents = this.selectedParents.filter(function (c) { return c[_this.keyField] !== item[_this.keyField]; });
13638
13653
  this.selectedParents.push(item);
13639
13654
  }
13640
13655
  else {
@@ -13689,13 +13704,14 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13689
13704
  }
13690
13705
  node.itemData.item = c; //TO DO
13691
13706
  node.itemData.selected = item.select === true ? item.select : false;
13707
+ node.itemData.indeterminate = item.select === null ? true : false;
13692
13708
  node.itemData.hasChild = item[this.hasChildField];
13693
13709
  node.parent = item.parentNode === undefined ? null : this.makeNode(item.parentNode, false);
13694
13710
  return node;
13695
13711
  };
13696
13712
  AXTreeViewComponent.prototype.changeChildSelect = function (item, s) {
13697
13713
  var _this = this;
13698
- if (this.selectNodesRecursive) {
13714
+ if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'childs') {
13699
13715
  item.select = s;
13700
13716
  if (item[this.hasChildField] === true && item[this.childField] && item[this.childField].length > 0) {
13701
13717
  item[this.childField].forEach(function (elm) {
@@ -13728,7 +13744,8 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13728
13744
  }
13729
13745
  };
13730
13746
  AXTreeViewComponent.prototype.changeParentSelect = function (item) {
13731
- if (this.selectNodesRecursive) {
13747
+ var _this = this;
13748
+ if (this.selectNodesRecursive == 'all' || this.selectNodesRecursive == 'parents') {
13732
13749
  var allselect = true;
13733
13750
  var alldeselect = true;
13734
13751
  var oneselect = false;
@@ -13752,9 +13769,13 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13752
13769
  }
13753
13770
  if (oneselect || (isindeterminate && !allselect)) {
13754
13771
  item.select = null;
13772
+ this.selectedParents = this.selectedParents.filter(function (c) { return c[_this.keyField] !== item[_this.keyField]; });
13773
+ this.selectedParents.push(item);
13755
13774
  }
13756
13775
  if (allselect === true) {
13757
13776
  item.select = true;
13777
+ this.selectedParents = this.selectedParents.filter(function (c) { return c[_this.keyField] !== item[_this.keyField]; });
13778
+ this.selectedParents.push(item);
13758
13779
  }
13759
13780
  if (alldeselect === true) {
13760
13781
  item.select = false;
@@ -13871,6 +13892,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13871
13892
  else {
13872
13893
  _this.itemRow = _this.listLoad.filter(function (c) { return c.requestId === _data.data.requestId; })[0];
13873
13894
  _this.listLoad = _this.listLoad.filter(function (c) { return c.requestId !== _data.data.requestId; });
13895
+ _this.itemRow.loaded = true;
13874
13896
  if (_this.itemRow !== undefined) {
13875
13897
  _this.hideLoading(_this.itemRow);
13876
13898
  var result_1 = _data.data.result;
@@ -13891,7 +13913,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13891
13913
  if (_this.selectionLevel == 'parents' && result_1[i][_this.hasChildField] == false) {
13892
13914
  result_1[i].disabledCheckBox = true;
13893
13915
  }
13894
- if (_this.selectionMode !== 'single' && _this.selectNodesRecursive) {
13916
+ if (_this.selectionMode !== 'single' && (_this.selectNodesRecursive == 'all' || _this.selectNodesRecursive == 'childs')) {
13895
13917
  result_1[i].select = _this.itemRow.select === (undefined || null) ? false : _this.itemRow.select;
13896
13918
  if (_this.itemRow.select === true && _this.selectionMode == 'multiple' && result_1[i][_this.hasChildField] === false) {
13897
13919
  _this.selectedItems = _this.selectedItems.filter(function (c) { return c[_this.keyField] !== result_1[i][_this.keyField]; });
@@ -14176,7 +14198,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
14176
14198
  ], AXTreeViewComponent.prototype, "selectedFieldName", void 0);
14177
14199
  __decorate([
14178
14200
  Input(),
14179
- __metadata("design:type", Boolean)
14201
+ __metadata("design:type", String)
14180
14202
  ], AXTreeViewComponent.prototype, "selectNodesRecursive", void 0);
14181
14203
  __decorate([
14182
14204
  Input(),