@acorex/components 3.0.53 → 3.0.54

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.
Files changed (33) hide show
  1. package/acorex-components.metadata.json +1 -1
  2. package/bundles/acorex-components.umd.js +85 -42
  3. package/bundles/acorex-components.umd.js.map +1 -1
  4. package/bundles/acorex-components.umd.min.js +1 -1
  5. package/bundles/acorex-components.umd.min.js.map +1 -1
  6. package/esm2015/lib/base/element.class.js +1 -9
  7. package/esm2015/lib/calendar/calendar-box/calendar-box.component.js +13 -2
  8. package/esm2015/lib/date-picker/date-picker.component.js +11 -2
  9. package/esm2015/lib/dropdown/dropdown.component.js +5 -1
  10. package/esm2015/lib/number-box/number-box.component.js +2 -2
  11. package/esm2015/lib/password-box/password-box.component.js +2 -2
  12. package/esm2015/lib/selectbox/selectbox.component.js +56 -29
  13. package/esm2015/lib/textarea/textarea.component.js +2 -2
  14. package/esm2015/lib/textbox/textbox.component.js +2 -2
  15. package/esm5/lib/base/element.class.js +1 -9
  16. package/esm5/lib/calendar/calendar-box/calendar-box.component.js +13 -2
  17. package/esm5/lib/date-picker/date-picker.component.js +11 -2
  18. package/esm5/lib/dropdown/dropdown.component.js +5 -1
  19. package/esm5/lib/number-box/number-box.component.js +2 -2
  20. package/esm5/lib/password-box/password-box.component.js +2 -2
  21. package/esm5/lib/selectbox/selectbox.component.js +56 -29
  22. package/esm5/lib/textarea/textarea.component.js +2 -2
  23. package/esm5/lib/textbox/textbox.component.js +2 -2
  24. package/fesm2015/acorex-components.js +85 -42
  25. package/fesm2015/acorex-components.js.map +1 -1
  26. package/fesm5/acorex-components.js +85 -42
  27. package/fesm5/acorex-components.js.map +1 -1
  28. package/lib/base/element.class.d.ts +0 -2
  29. package/lib/calendar/calendar-box/calendar-box.component.d.ts +1 -0
  30. package/lib/date-picker/date-picker.component.d.ts +1 -0
  31. package/lib/dropdown/dropdown.component.d.ts +1 -0
  32. package/lib/selectbox/selectbox.component.d.ts +6 -0
  33. package/package.json +1 -1
@@ -713,14 +713,6 @@
713
713
  core.Input(),
714
714
  __metadata("design:type", String)
715
715
  ], AXBaseTextComponent.prototype, "placeholder", void 0);
716
- __decorate([
717
- core.Input(),
718
- __metadata("design:type", String)
719
- ], AXBaseTextComponent.prototype, "autocomplete", void 0);
720
- __decorate([
721
- core.Input(),
722
- __metadata("design:type", String)
723
- ], AXBaseTextComponent.prototype, "name", void 0);
724
716
  __decorate([
725
717
  core.Output(),
726
718
  __metadata("design:type", core.EventEmitter)
@@ -1298,6 +1290,7 @@
1298
1290
  this.size = 'md';
1299
1291
  this.selectableHoliday = true;
1300
1292
  this.dayStyle = [];
1293
+ this.dayMinMaxResoan = '';
1301
1294
  this.showTodayButton = false;
1302
1295
  this.matrix = [];
1303
1296
  this.rotated = false;
@@ -1405,7 +1398,13 @@
1405
1398
  return this.dayStyle.find(function (c) { return c.date.split('T')[0] == date.toISOString().split('T')[0]; }).text;
1406
1399
  }
1407
1400
  else {
1408
- return '';
1401
+ if ((this.min && this.max && date.compaireNew(new core$1.AXDateTime(this.min, this.type), 'YMD', this.type) === -1) ||
1402
+ date.compaireNew(new core$1.AXDateTime(this.max, this.type), 'YMD', this.type) === 1) {
1403
+ return this.dayMinMaxResoan;
1404
+ }
1405
+ else {
1406
+ return '';
1407
+ }
1409
1408
  }
1410
1409
  };
1411
1410
  AXCalendarBoxComponent.prototype.ngOnInit = function () {
@@ -1692,6 +1691,10 @@
1692
1691
  core.Input(),
1693
1692
  __metadata("design:type", Object)
1694
1693
  ], AXCalendarBoxComponent.prototype, "dayStyle", void 0);
1694
+ __decorate([
1695
+ core.Input(),
1696
+ __metadata("design:type", Object)
1697
+ ], AXCalendarBoxComponent.prototype, "dayMinMaxResoan", void 0);
1695
1698
  __decorate([
1696
1699
  core.Input('showTodayButton'),
1697
1700
  __metadata("design:type", Boolean)
@@ -4727,7 +4730,7 @@
4727
4730
  AXTextBoxComponent = AXTextBoxComponent_1 = __decorate([
4728
4731
  core.Component({
4729
4732
  selector: 'ax-text-box',
4730
- 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 </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 [autocomplete]=\"autocomplete\" [name]=\"name\" class=\"ax {{size}}\" [attr.type]=\"type\" [attr.maxlength]=\"maxLength\"\r\n [textMask]=\"{mask: mask || false, showMask : showMask, keepCharPositions:maskKeepCharPositions,guide:maskGuid,placeholderChar:maskPlaceholder}\"\r\n [(ngModel)]=\"value\" placeholder=\"{{placeholder}}\" [readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [ngClass]=\"setTextAlign()\" [class.clear]=\"value && allowClear\" (focus)=\"handleInputFocus($event)\"\r\n (blur)=\"handleInputBlur($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\" icon=\"far fa-times\" type=\"danger blank\" (click)=\"clear()\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </div>\r\n</div>",
4733
+ 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 </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 class=\"ax {{size}}\" [attr.type]=\"type\" [attr.maxlength]=\"maxLength\"\r\n [textMask]=\"{mask: mask || false, showMask : showMask, keepCharPositions:maskKeepCharPositions,guide:maskGuid,placeholderChar:maskPlaceholder}\"\r\n [(ngModel)]=\"value\" placeholder=\"{{placeholder}}\" [readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [ngClass]=\"setTextAlign()\" [class.clear]=\"value && allowClear\" (focus)=\"handleInputFocus($event)\"\r\n (blur)=\"handleInputBlur($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\" icon=\"far fa-times\" type=\"danger blank\" (click)=\"clear()\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </div>\r\n</div>",
4731
4734
  encapsulation: core.ViewEncapsulation.None,
4732
4735
  changeDetection: core.ChangeDetectionStrategy.OnPush,
4733
4736
  host: { style: 'width: 100%' },
@@ -5582,6 +5585,10 @@
5582
5585
  enumerable: true,
5583
5586
  configurable: true
5584
5587
  });
5588
+ AXDropdownComponent.prototype.updatePosition = function () {
5589
+ var _a;
5590
+ (_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.updatePosition();
5591
+ };
5585
5592
  AXDropdownComponent.prototype.focus = function () { };
5586
5593
  AXDropdownComponent.ctorParameters = function () { return [
5587
5594
  { type: core.ChangeDetectorRef },
@@ -5662,6 +5669,7 @@
5662
5669
  _this.ref = ref;
5663
5670
  _this.cdr = cdr;
5664
5671
  _this.dayStyle = [];
5672
+ _this.dayMinMaxResoan = '';
5665
5673
  // mmddyyyy: any = [/[0-1]/, /[0-9]/, '-', /[0-1]/, /[0-9]/, '-', /[0-9]/, /[0-9]/, /[0-9]/, /[0-9]/];
5666
5674
  _this.yyyyMMdd = [/[1-2]/, /[0-9]/, /[0-9]/, /[0-9]/, '-', /[0-1]/, /[0-9]/, '-', /[0-3]/, /[0-9]/];
5667
5675
  _this.ddMMyyyy = [/[0-3]/, /[0-9]/, '-', /[0-1]/, /[0-9]/, '-', /[1-9]/, /[0-9]/, /[0-9]/, /[0-9]/];
@@ -5755,6 +5763,7 @@
5755
5763
  return { year: y, monnth: m, day: d };
5756
5764
  };
5757
5765
  AXDatePickerComponent.prototype.textChange = function (e) {
5766
+ debugger;
5758
5767
  this.text = e.value;
5759
5768
  if (this.text && this.text.indexOf('_') === -1 && this.text.length == 10) {
5760
5769
  this.userChange = e.isUserChange;
@@ -5822,6 +5831,9 @@
5822
5831
  }, 100);
5823
5832
  }
5824
5833
  }
5834
+ else {
5835
+ this.text = '';
5836
+ }
5825
5837
  this.userChange = false;
5826
5838
  },
5827
5839
  enumerable: true,
@@ -6317,6 +6329,10 @@
6317
6329
  core.Input(),
6318
6330
  __metadata("design:type", Object)
6319
6331
  ], AXDatePickerComponent.prototype, "dayStyle", void 0);
6332
+ __decorate([
6333
+ core.Input(),
6334
+ __metadata("design:type", Object)
6335
+ ], AXDatePickerComponent.prototype, "dayMinMaxResoan", void 0);
6320
6336
  __decorate([
6321
6337
  core.ContentChild(AXValidation, { static: true }),
6322
6338
  __metadata("design:type", AXValidation)
@@ -6403,7 +6419,7 @@
6403
6419
  AXDatePickerComponent = AXDatePickerComponent_1 = __decorate([
6404
6420
  core.Component({
6405
6421
  selector: 'ax-date-picker',
6406
- template: "<ax-drop-down [readonly]=\"readonly\" [fitParent]=\"true\" [size]=\"size\" [showDropDownButton]=\"false\" icon=\"far fa-calendar-alt\" #dropdown maxHeight=\"unset\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container header>\r\n <ax-text-box #input [textAlign]=\"textAlign\" [(value)]=\"text\" [readonly]=\"false\" [textMask]=\"dateType\" [disabled]=\"disabled\" [placeholder]=\"placeholder\" [size]=\"size\" (onkey)=\"handleKeyPress($event)\" (onFocus)=\"handleInputFocus()\" (click)=\"handleClick()\"\r\n (onBlur)=\"handleInputBlur()\" (onValueChanged)=\"textChange($event)\"></ax-text-box>\r\n </ng-container>\r\n <ng-container panel>\r\n <ax-calendar-box *ngIf=\"_renderPicker\" [showTodayButton]=\"showTodayButton\" [selectableHoliday]=\"selectableHoliday\" [min]=\"min\" [max]=\"max\" [size]=\"size\" (onClick)=\"onClick($event)\" (onValueChanged)=\"onDateChange($event)\" [type]=\"type\" [(value)]=\"value\"\r\n [dayStyle]=\"dayStyle\">\r\n </ax-calendar-box>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button end *ngIf=\"allowClear && value\" [disabled]=\"disabled\" icon=\"far fa-times icon\" type=\"blank danger\" (click)=\"clear()\" [size]=\"size\" [tabIndex]=\"-1\">\r\n </ax-button>\r\n <ax-button end icon=\"far fa-calendar-alt icon\" type=\"light blank\" (click)=\"handleButtonClick()\" [disabled]=\"disabled\" [size]=\"size\" [tabIndex]=\"-1\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n\r\n</ax-drop-down>",
6422
+ template: "<ax-drop-down [readonly]=\"readonly\" [fitParent]=\"true\" [size]=\"size\" [showDropDownButton]=\"false\"\r\n icon=\"far fa-calendar-alt\" #dropdown maxHeight=\"unset\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container header>\r\n <ax-text-box #input [textAlign]=\"textAlign\" [(value)]=\"text\" [readonly]=\"false\" [textMask]=\"dateType\"\r\n [disabled]=\"disabled\" [placeholder]=\"placeholder\" [size]=\"size\" (onkey)=\"handleKeyPress($event)\"\r\n (onFocus)=\"handleInputFocus()\" (click)=\"handleClick()\" (onBlur)=\"handleInputBlur()\"\r\n (onValueChanged)=\"textChange($event)\"></ax-text-box>\r\n </ng-container>\r\n <ng-container panel>\r\n <ax-calendar-box *ngIf=\"_renderPicker\" [showTodayButton]=\"showTodayButton\"\r\n [selectableHoliday]=\"selectableHoliday\" [min]=\"min\" [max]=\"max\" [size]=\"size\" (onClick)=\"onClick($event)\"\r\n (onValueChanged)=\"onDateChange($event)\" [type]=\"type\" [(value)]=\"value\" [dayStyle]=\"dayStyle\"\r\n [dayMinMaxResoan]=\"dayMinMaxResoan\">\r\n </ax-calendar-box>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button end *ngIf=\"allowClear && value\" [disabled]=\"disabled\" icon=\"far fa-times icon\" type=\"blank danger\"\r\n (click)=\"clear()\" [size]=\"size\" [tabIndex]=\"-1\">\r\n </ax-button>\r\n <ax-button end icon=\"far fa-calendar-alt icon\" type=\"light blank\" (click)=\"handleButtonClick()\"\r\n [disabled]=\"disabled\" [size]=\"size\" [tabIndex]=\"-1\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n\r\n</ax-drop-down>",
6407
6423
  encapsulation: core.ViewEncapsulation.None,
6408
6424
  providers: [{ provide: AXValidatableComponent, useExisting: AXDatePickerComponent_1 }],
6409
6425
  host: { style: 'width: 100%' },
@@ -8287,7 +8303,7 @@
8287
8303
  AXNumberBoxComponent = AXNumberBoxComponent_1 = __decorate([
8288
8304
  core.Component({
8289
8305
  selector: 'ax-number-box',
8290
- 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 [autocomplete]=\"autocomplete\" [name]=\"name\" #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 && !readonly\" >\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",
8306
+ 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 && !readonly\" >\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",
8291
8307
  changeDetection: core.ChangeDetectionStrategy.OnPush,
8292
8308
  host: { style: 'width: 100%' },
8293
8309
  providers: [{ provide: AXValidatableComponent, useExisting: AXNumberBoxComponent_1 }]
@@ -8385,7 +8401,7 @@
8385
8401
  AXPasswordBoxComponent = AXPasswordBoxComponent_1 = __decorate([
8386
8402
  core.Component({
8387
8403
  selector: 'ax-password-box',
8388
- template: "<div class=\"ax form-item\" [class.disabled]=\"disabled\" [attr.id]=\"uid\">\r\n <div class=\"ax items-wrapper\">\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </div>\r\n <div class=\"content\" #content>\r\n <div class=\"ax input form-control {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\" [class.icon]=\"icon\">\r\n <input [autocomplete]=\"autocomplete\" [name]=\"name\" #input [type]=\"type\" class=\"ax {{size}}\" value=\"{{value}}\" placeholder=\"{{placeholder}}\"\r\n [readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [ngClass]=\"setTextAlign()\" [class.clear]=\"value && allowClear\">\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\" icon=\"fas fa-times\" type=\"danger blank\" (click)=\"clear()\" [tabIndex]=\"-1\"></ax-button>\r\n <ax-button [disabled]=\"disabled\" [icon]=\"eyeIcon\" type=\"light blank\" size=\"{{size}}\" (click)=\"handleShowPassword()\" [tabIndex]=\"-1\">\r\n <!-- <i class=\"\" [ngClass]=\"{'fa-eye': type === 'password','fa-eye-slash':type === 'text'}\"></i> -->\r\n </ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </div>\r\n</div>\r\n",
8404
+ template: "<div class=\"ax form-item\" [class.disabled]=\"disabled\" [attr.id]=\"uid\">\r\n <div class=\"ax items-wrapper\">\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </div>\r\n <div class=\"content\" #content>\r\n <div class=\"ax input form-control {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\" [class.icon]=\"icon\">\r\n <input #input [type]=\"type\" class=\"ax {{size}}\" value=\"{{value}}\" placeholder=\"{{placeholder}}\"\r\n [readonly]=\"readonly\" [disabled]=\"disabled\"\r\n [ngClass]=\"setTextAlign()\" [class.clear]=\"value && allowClear\">\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\" icon=\"fas fa-times\" type=\"danger blank\" (click)=\"clear()\" [tabIndex]=\"-1\"></ax-button>\r\n <ax-button [disabled]=\"disabled\" [icon]=\"eyeIcon\" type=\"light blank\" size=\"{{size}}\" (click)=\"handleShowPassword()\" [tabIndex]=\"-1\">\r\n <!-- <i class=\"\" [ngClass]=\"{'fa-eye': type === 'password','fa-eye-slash':type === 'text'}\"></i> -->\r\n </ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </div>\r\n</div>\r\n",
8389
8405
  encapsulation: core.ViewEncapsulation.None,
8390
8406
  changeDetection: core.ChangeDetectionStrategy.OnPush,
8391
8407
  host: { style: 'width: 100%' },
@@ -8642,6 +8658,7 @@
8642
8658
  _this.allowSearch = true;
8643
8659
  _this.textField = 'text';
8644
8660
  _this.valueField = 'value';
8661
+ _this.disabledField = 'disabled';
8645
8662
  _this.mode = 'single';
8646
8663
  _this.itemRemove = false;
8647
8664
  _this.itemsChange = new core.EventEmitter();
@@ -8813,6 +8830,17 @@
8813
8830
  }
8814
8831
  }
8815
8832
  };
8833
+ AXSelectBoxComponent.prototype.isItemDisabled = function (item) {
8834
+ if (item[this.disabledField] == true) {
8835
+ return true;
8836
+ }
8837
+ else if (this.disabledCallback) {
8838
+ return this.disabledCallback({ item: item, index: -1 });
8839
+ }
8840
+ else {
8841
+ return false;
8842
+ }
8843
+ };
8816
8844
  AXSelectBoxComponent.prototype.onButtonClick = function (e) {
8817
8845
  console.log('onButtonClick', e);
8818
8846
  };
@@ -8860,6 +8888,7 @@
8860
8888
  Object.defineProperty(AXSelectBoxComponent.prototype, "selectedValues", {
8861
8889
  get: function () {
8862
8890
  var _this = this;
8891
+ debugger;
8863
8892
  if (this.mode === 'single') {
8864
8893
  return this._selectedItems.map(function (c) { return c[_this.valueField]; })[0];
8865
8894
  }
@@ -8946,6 +8975,8 @@
8946
8975
  }
8947
8976
  };
8948
8977
  AXSelectBoxComponent.prototype.emitSelectionChangedEvent = function () {
8978
+ debugger;
8979
+ this.selectedValuesChange.emit(this.selectedValues);
8949
8980
  this.selectionChanged.emit(new AXSelectBoxSelectionChangedEvent(this, this.selectedItems, this.selectedValues));
8950
8981
  };
8951
8982
  AXSelectBoxComponent.prototype.ngAfterViewInit = function () {
@@ -9063,6 +9094,7 @@
9063
9094
  }
9064
9095
  this.cdr.markForCheck();
9065
9096
  this.cdr.detectChanges();
9097
+ this.dropdown.updatePosition();
9066
9098
  };
9067
9099
  // private params: AXDataSourceReadParams = {};
9068
9100
  AXSelectBoxComponent.prototype.fetch = function (params) {
@@ -9121,37 +9153,39 @@
9121
9153
  };
9122
9154
  AXSelectBoxComponent.prototype.handleItemClick = function (e, item) {
9123
9155
  var _this = this;
9124
- var value = item[this.valueField];
9125
- if (this.mode === 'single') {
9126
- // this.selectedValues = value;
9127
- this.setSelectedValues(value, true);
9128
- }
9129
- else {
9130
- var exists = this.selectedValues.slice(0);
9131
- if (exists.includes(value)) {
9132
- if (this.allowNull == true || (this.allowNull == false && this.selectedItems.length > 1)) {
9133
- this.handleItemRemoveClick(item);
9134
- }
9156
+ if (this.isItemDisabled(item) == false) {
9157
+ var value = item[this.valueField];
9158
+ if (this.mode === 'single') {
9159
+ // this.selectedValues = value;
9160
+ this.setSelectedValues(value, true);
9135
9161
  }
9136
9162
  else {
9137
- exists.push(value);
9138
- // this.selectedValues = exists;
9139
- this.setSelectedValues(exists, true);
9163
+ var exists = this.selectedValues.slice(0);
9164
+ if (exists.includes(value)) {
9165
+ if (this.allowNull == true || (this.allowNull == false && this.selectedItems.length > 1)) {
9166
+ this.handleItemRemoveClick(item);
9167
+ }
9168
+ }
9169
+ else {
9170
+ exists.push(value);
9171
+ // this.selectedValues = exists;
9172
+ this.setSelectedValues(exists, true);
9173
+ }
9140
9174
  }
9141
- }
9142
- if (this.mode == 'single') {
9143
- this.text = '';
9144
- this.dropdown.close();
9145
- this.cdr.markForCheck();
9146
- }
9147
- // if (e.stopPropagation() == undefined) {
9148
- // e.stopPropagation();
9149
- // }
9150
- setTimeout(function () {
9151
- if (_this.serchBox) {
9152
- _this.serchBox.focus();
9175
+ if (this.mode == 'single') {
9176
+ this.text = '';
9177
+ this.dropdown.close();
9178
+ this.cdr.markForCheck();
9153
9179
  }
9154
- }, 0);
9180
+ // if (e.stopPropagation() == undefined) {
9181
+ // e.stopPropagation();
9182
+ // }
9183
+ setTimeout(function () {
9184
+ if (_this.serchBox) {
9185
+ _this.serchBox.focus();
9186
+ }
9187
+ }, 0);
9188
+ }
9155
9189
  e.stopPropagation();
9156
9190
  };
9157
9191
  AXSelectBoxComponent.prototype.handleKeyEventSearch = function (e) {
@@ -9320,6 +9354,7 @@
9320
9354
  if (e.key === 'Backspace' &&
9321
9355
  e.type === 'keydown' &&
9322
9356
  ((this.allowNull === true && this.selectedItems.length > 0) || (this.allowNull === false && this.selectedItems.length > 1))) {
9357
+ debugger;
9323
9358
  this.selectedItems.pop();
9324
9359
  this.emitSelectionChangedEvent();
9325
9360
  }
@@ -9581,6 +9616,10 @@
9581
9616
  core.ViewChild('d', { static: true }),
9582
9617
  __metadata("design:type", AXDropdownComponent)
9583
9618
  ], AXSelectBoxComponent.prototype, "dropdown", void 0);
9619
+ __decorate([
9620
+ core.Input(),
9621
+ __metadata("design:type", Function)
9622
+ ], AXSelectBoxComponent.prototype, "disabledCallback", void 0);
9584
9623
  __decorate([
9585
9624
  core.Input(),
9586
9625
  __metadata("design:type", Boolean)
@@ -9593,6 +9632,10 @@
9593
9632
  core.Input(),
9594
9633
  __metadata("design:type", String)
9595
9634
  ], AXSelectBoxComponent.prototype, "valueField", void 0);
9635
+ __decorate([
9636
+ core.Input(),
9637
+ __metadata("design:type", String)
9638
+ ], AXSelectBoxComponent.prototype, "disabledField", void 0);
9596
9639
  __decorate([
9597
9640
  core.Input(),
9598
9641
  __metadata("design:type", String)
@@ -9639,7 +9682,7 @@
9639
9682
  AXSelectBoxComponent = AXSelectBoxComponent_1 = __decorate([
9640
9683
  core.Component({
9641
9684
  selector: 'ax-select-box',
9642
- template: "<ax-drop-down [size]=\"size\" [rtl]=\"rtl\" [showDropDownButton]=\"showDropDownButton\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" #d (dropdownToggle)=\"dropdownToggleSelecBox($event)\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container header>\r\n <div class=\"ax chips-container\" [horizontalScroll]=\"40\">\r\n <div class=\"chips\" [class.chips-blank]=\"mode === 'single'\" [title]=\"item[textField]\"\r\n *ngFor=\"let item of selectedItems\">\r\n <span class=\"chips-text\">\r\n {{item[textField]}}\r\n </span>\r\n <span class=\"close-icon\" (click)=\"handleItemRemoveClick(item)\"\r\n *ngIf=\"(readonly!=true || itemRemove ==true)&& disabled!=true && (allowNull==true || (selectedItems.length > 1))\">\r\n <i class=\"far fa-times-circle close\"></i>\r\n </span>\r\n </div>\r\n <div class=\"search-wrapper\" (click)=\"onTextBoxClick($event)\">\r\n <ax-text-box #textBoxSelectBox [textAlign]=\"textAlign\"\r\n [placeholder]=\"selectedItems.length == 0 ? placeholder : ''\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" (onkey)=\"handleKeyEvent($event)\" [size]=\"size\"\r\n (onFocus)=\"onFocusTextBox($event)\">\r\n </ax-text-box>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container end>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container panel>\r\n <div *ngIf=\"allowSearch\" class=\"search-wrapper\" style=\"padding: 0.7em;\">\r\n <ax-search-box #serchBox [(value)]=\"text\" (onkey)=\"handleKeyEventSearch($event)\"\r\n (textChanged)=\"textChanged($event)\" (onButtonClick)=\"textChanged($event)\">\r\n </ax-search-box>\r\n </div>\r\n <div class=\"ax list-container\">\r\n <div #listContainer style=\"max-height: 300px;overflow-y: auto;width: 100%;\" (scroll)=\"scrolled($event)\">\r\n <ng-container *ngIf=\"getItems().length>0; then thenTemplate; else elseTemplate\"></ng-container>\r\n <ng-template #thenTemplate>\r\n <div class=\"list-item\" *ngFor=\"let item of getItems();let i = index\"\r\n [class.focused]=\"i==currentfocusedIndex\" [class.selected]=\"isItemSelected(item)\"\r\n (click)=\"handleItemClick($event,item)\">\r\n <div style=\"display: flex;\">\r\n <ax-check-box *ngIf=\"showCheckBox\" [size]=\"size\" [value]=\"isItemSelected(item)\"\r\n [disabled]=\"!allowNull && selectedItems.length === 1 && isItemSelected(item)\"\r\n (onClick)=\"handleItemClick($event,item)\">\r\n </ax-check-box>\r\n <ng-container *ngIf=\"rowTemplate; else elseTemplate\">\r\n <div style=\"white-space: nowrap;text-overflow: ellipsis;overflow: hidden;\"\r\n [title]=\"item[textField]\"\r\n [ngStyle]=\"(showCheckBox) ? {'padding-inline-start': '0.5rem'}:''\">\r\n <ng-container *ngTemplateOutlet=\"rowTemplate; context:{ $implicit: item }\">\r\n </ng-container>\r\n </div>\r\n\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <div style=\"white-space: nowrap;text-overflow: ellipsis;overflow: hidden;\"\r\n [title]=\"item[textField]\"\r\n [ngStyle]=\"(showCheckBox) ? {'padding-inline-start': '0.5rem'}:''\">\r\n {{ item[textField] }}\r\n </div>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </ng-template>\r\n <div *ngIf=\"showLoading\" class=\"ax-pad-sm\" style=\"text-align: center;\">\r\n <i class=\"far fa-spinner-third fa-pulse fa-2x\" style=\"color: var(--ax-primary-color);\"></i>\r\n\r\n </div>\r\n <!-- <ax-loading-indicator ></ax-loading-indicator> -->\r\n <ng-template #elseTemplate>\r\n <ng-container *ngIf=\"showLoading == true; then searchTemplate else noDataTemplate\"></ng-container>\r\n <ng-template #searchTemplate>\r\n <div class=\"list-item\">\r\n {{'common.searching' | trans}}\r\n </div>\r\n </ng-template>\r\n <ng-template #noDataTemplate>\r\n <div class=\"list-item\">\r\n {{'common.noDataFound' | trans}}\r\n </div>\r\n </ng-template>\r\n\r\n </ng-template>\r\n\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n\r\n</ax-drop-down>",
9685
+ template: "<ax-drop-down [size]=\"size\" [rtl]=\"rtl\" [showDropDownButton]=\"showDropDownButton\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" #d (dropdownToggle)=\"dropdownToggleSelecBox($event)\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container header>\r\n <div class=\"ax chips-container\" [horizontalScroll]=\"40\">\r\n <div class=\"chips\" [class.chips-blank]=\"mode === 'single'\" [title]=\"item[textField]\"\r\n *ngFor=\"let item of selectedItems\">\r\n <span class=\"chips-text\">\r\n {{item[textField]}}\r\n </span>\r\n <span class=\"close-icon\" (click)=\"handleItemRemoveClick(item)\"\r\n *ngIf=\"(readonly!=true || itemRemove ==true)&& disabled!=true && (allowNull==true || (selectedItems.length > 1))\">\r\n <i class=\"far fa-times-circle close\"></i>\r\n </span>\r\n </div>\r\n <div class=\"search-wrapper\" (click)=\"onTextBoxClick($event)\">\r\n <ax-text-box #textBoxSelectBox [textAlign]=\"textAlign\"\r\n [placeholder]=\"selectedItems.length == 0 ? placeholder : ''\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" (onkey)=\"handleKeyEvent($event)\" [size]=\"size\"\r\n (onFocus)=\"onFocusTextBox($event)\">\r\n </ax-text-box>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container end>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container panel>\r\n <div *ngIf=\"allowSearch\" class=\"search-wrapper\" style=\"padding: 0.7em;\">\r\n <ax-search-box #serchBox [(value)]=\"text\" (onkey)=\"handleKeyEventSearch($event)\"\r\n (textChanged)=\"textChanged($event)\" (onButtonClick)=\"textChanged($event)\">\r\n </ax-search-box>\r\n </div>\r\n <div class=\"ax list-container\">\r\n <div #listContainer style=\"max-height: 300px;overflow-y: auto;width: 100%;\" (scroll)=\"scrolled($event)\">\r\n <ng-container *ngIf=\"getItems().length>0; then thenTemplate; else elseTemplate\"></ng-container>\r\n <ng-template #thenTemplate>\r\n <div [class.ax-state-disabled]=\"isItemDisabled(item)\" class=\"list-item\"\r\n *ngFor=\"let item of getItems();let i = index\" [class.focused]=\"i==currentfocusedIndex\"\r\n [class.selected]=\"isItemSelected(item)\" (click)=\"handleItemClick($event,item)\">\r\n <div style=\"display: flex;\">\r\n <ax-check-box *ngIf=\"showCheckBox\" [size]=\"size\" [value]=\"isItemSelected(item)\"\r\n [disabled]=\"(!allowNull && selectedItems.length === 1 && isItemSelected(item)) || isItemDisabled(item)\"\r\n (onClick)=\"handleItemClick($event,item)\">\r\n </ax-check-box>\r\n <ng-container *ngIf=\"rowTemplate; else elseTemplate\">\r\n <div style=\"white-space: nowrap;text-overflow: ellipsis;overflow: hidden;\"\r\n [title]=\"item[textField]\"\r\n [ngStyle]=\"(showCheckBox) ? {'padding-inline-start': '0.5rem'}:''\">\r\n <ng-container *ngTemplateOutlet=\"rowTemplate; context:{ $implicit: item }\">\r\n </ng-container>\r\n </div>\r\n\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <div style=\"white-space: nowrap;text-overflow: ellipsis;overflow: hidden;\"\r\n [title]=\"item[textField]\"\r\n [ngStyle]=\"(showCheckBox) ? {'padding-inline-start': '0.5rem'}:''\">\r\n {{ item[textField] }}\r\n </div>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </ng-template>\r\n <div *ngIf=\"showLoading\" class=\"ax-pad-sm\" style=\"text-align: center;\">\r\n <i class=\"far fa-spinner-third fa-pulse fa-2x\" style=\"color: var(--ax-primary-color);\"></i>\r\n\r\n </div>\r\n <!-- <ax-loading-indicator ></ax-loading-indicator> -->\r\n <ng-template #elseTemplate>\r\n <ng-container *ngIf=\"showLoading == true; then searchTemplate else noDataTemplate\"></ng-container>\r\n <ng-template #searchTemplate>\r\n <div class=\"list-item\">\r\n {{'common.searching' | trans}}\r\n </div>\r\n </ng-template>\r\n <ng-template #noDataTemplate>\r\n <div class=\"list-item\">\r\n {{'common.noDataFound' | trans}}\r\n </div>\r\n </ng-template>\r\n\r\n </ng-template>\r\n\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n\r\n</ax-drop-down>",
9643
9686
  encapsulation: core.ViewEncapsulation.None,
9644
9687
  changeDetection: core.ChangeDetectionStrategy.OnPush,
9645
9688
  host: { style: 'width: 100%' },
@@ -12131,7 +12174,7 @@
12131
12174
  AXTextAreaComponent = AXTextAreaComponent_1 = __decorate([
12132
12175
  core.Component({
12133
12176
  selector: 'ax-text-area',
12134
- template: "<div class=\"ax form-item {{size}}\" [class.disabled]=\"disabled\" [attr.id]=\"uid\">\r\n <div class=\"content\">\r\n <div class=\"ax input {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\">\r\n <textarea [name]=\"name\" [attr.maxlength]=\"maxLength\" rows=\"{{rows}}\" cols=\"{{cols}}\" #input type=\"text\"\r\n class=\"ax icon {{size}}\" [ngClass]=\"setTextAlign()\" placeholder=\"{{placeholder}}\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" value=\"{{value}}\"></textarea>\r\n </div>\r\n </div>\r\n <div class=\"ax buttons\">\r\n <ng-content select=\"ax-button\">\r\n </ng-content>\r\n </div>\r\n</div>",
12177
+ template: "<div class=\"ax form-item {{size}}\" [class.disabled]=\"disabled\" [attr.id]=\"uid\">\r\n <div class=\"content\">\r\n <div class=\"ax input {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\">\r\n <textarea [attr.maxlength]=\"maxLength\" rows=\"{{rows}}\" cols=\"{{cols}}\" #input type=\"text\"\r\n class=\"ax icon {{size}}\" [ngClass]=\"setTextAlign()\" placeholder=\"{{placeholder}}\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" value=\"{{value}}\"></textarea>\r\n </div>\r\n </div>\r\n <div class=\"ax buttons\">\r\n <ng-content select=\"ax-button\">\r\n </ng-content>\r\n </div>\r\n</div>",
12135
12178
  encapsulation: core.ViewEncapsulation.None,
12136
12179
  changeDetection: core.ChangeDetectionStrategy.OnPush,
12137
12180
  host: { style: 'width: 100%' },