@acorex/components 3.0.52 → 3.0.56

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
@@ -507,14 +507,6 @@ var AXBaseTextComponent = /** @class */ (function (_super) {
507
507
  Input(),
508
508
  __metadata("design:type", String)
509
509
  ], AXBaseTextComponent.prototype, "placeholder", void 0);
510
- __decorate([
511
- Input(),
512
- __metadata("design:type", Boolean)
513
- ], AXBaseTextComponent.prototype, "autocomplete", void 0);
514
- __decorate([
515
- Input(),
516
- __metadata("design:type", String)
517
- ], AXBaseTextComponent.prototype, "name", void 0);
518
510
  __decorate([
519
511
  Output(),
520
512
  __metadata("design:type", EventEmitter)
@@ -1092,6 +1084,7 @@ var AXCalendarBoxComponent = /** @class */ (function () {
1092
1084
  this.size = 'md';
1093
1085
  this.selectableHoliday = true;
1094
1086
  this.dayStyle = [];
1087
+ this.dayMinMaxResoan = '';
1095
1088
  this.showTodayButton = false;
1096
1089
  this.matrix = [];
1097
1090
  this.rotated = false;
@@ -1199,7 +1192,13 @@ var AXCalendarBoxComponent = /** @class */ (function () {
1199
1192
  return this.dayStyle.find(function (c) { return c.date.split('T')[0] == date.toISOString().split('T')[0]; }).text;
1200
1193
  }
1201
1194
  else {
1202
- return '';
1195
+ if ((this.min && this.max && date.compaireNew(new AXDateTime(this.min, this.type), 'YMD', this.type) === -1) ||
1196
+ date.compaireNew(new AXDateTime(this.max, this.type), 'YMD', this.type) === 1) {
1197
+ return this.dayMinMaxResoan;
1198
+ }
1199
+ else {
1200
+ return '';
1201
+ }
1203
1202
  }
1204
1203
  };
1205
1204
  AXCalendarBoxComponent.prototype.ngOnInit = function () {
@@ -1486,6 +1485,10 @@ var AXCalendarBoxComponent = /** @class */ (function () {
1486
1485
  Input(),
1487
1486
  __metadata("design:type", Object)
1488
1487
  ], AXCalendarBoxComponent.prototype, "dayStyle", void 0);
1488
+ __decorate([
1489
+ Input(),
1490
+ __metadata("design:type", Object)
1491
+ ], AXCalendarBoxComponent.prototype, "dayMinMaxResoan", void 0);
1489
1492
  __decorate([
1490
1493
  Input('showTodayButton'),
1491
1494
  __metadata("design:type", Boolean)
@@ -4521,7 +4524,7 @@ var AXTextBoxComponent = /** @class */ (function (_super) {
4521
4524
  AXTextBoxComponent = AXTextBoxComponent_1 = __decorate([
4522
4525
  Component({
4523
4526
  selector: 'ax-text-box',
4524
- 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>",
4527
+ 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>",
4525
4528
  encapsulation: ViewEncapsulation.None,
4526
4529
  changeDetection: ChangeDetectionStrategy.OnPush,
4527
4530
  host: { style: 'width: 100%' },
@@ -5376,6 +5379,10 @@ var AXDropdownComponent = /** @class */ (function (_super) {
5376
5379
  enumerable: true,
5377
5380
  configurable: true
5378
5381
  });
5382
+ AXDropdownComponent.prototype.updatePosition = function () {
5383
+ var _a;
5384
+ (_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.updatePosition();
5385
+ };
5379
5386
  AXDropdownComponent.prototype.focus = function () { };
5380
5387
  AXDropdownComponent.ctorParameters = function () { return [
5381
5388
  { type: ChangeDetectorRef },
@@ -5456,6 +5463,7 @@ var AXDatePickerComponent = /** @class */ (function (_super) {
5456
5463
  _this.ref = ref;
5457
5464
  _this.cdr = cdr;
5458
5465
  _this.dayStyle = [];
5466
+ _this.dayMinMaxResoan = '';
5459
5467
  // mmddyyyy: any = [/[0-1]/, /[0-9]/, '-', /[0-1]/, /[0-9]/, '-', /[0-9]/, /[0-9]/, /[0-9]/, /[0-9]/];
5460
5468
  _this.yyyyMMdd = [/[1-2]/, /[0-9]/, /[0-9]/, /[0-9]/, '-', /[0-1]/, /[0-9]/, '-', /[0-3]/, /[0-9]/];
5461
5469
  _this.ddMMyyyy = [/[0-3]/, /[0-9]/, '-', /[0-1]/, /[0-9]/, '-', /[1-9]/, /[0-9]/, /[0-9]/, /[0-9]/];
@@ -5549,6 +5557,7 @@ var AXDatePickerComponent = /** @class */ (function (_super) {
5549
5557
  return { year: y, monnth: m, day: d };
5550
5558
  };
5551
5559
  AXDatePickerComponent.prototype.textChange = function (e) {
5560
+ debugger;
5552
5561
  this.text = e.value;
5553
5562
  if (this.text && this.text.indexOf('_') === -1 && this.text.length == 10) {
5554
5563
  this.userChange = e.isUserChange;
@@ -5616,6 +5625,9 @@ var AXDatePickerComponent = /** @class */ (function (_super) {
5616
5625
  }, 100);
5617
5626
  }
5618
5627
  }
5628
+ else {
5629
+ this.text = '';
5630
+ }
5619
5631
  this.userChange = false;
5620
5632
  },
5621
5633
  enumerable: true,
@@ -6111,6 +6123,10 @@ var AXDatePickerComponent = /** @class */ (function (_super) {
6111
6123
  Input(),
6112
6124
  __metadata("design:type", Object)
6113
6125
  ], AXDatePickerComponent.prototype, "dayStyle", void 0);
6126
+ __decorate([
6127
+ Input(),
6128
+ __metadata("design:type", Object)
6129
+ ], AXDatePickerComponent.prototype, "dayMinMaxResoan", void 0);
6114
6130
  __decorate([
6115
6131
  ContentChild(AXValidation, { static: true }),
6116
6132
  __metadata("design:type", AXValidation)
@@ -6197,7 +6213,7 @@ var AXDatePickerComponent = /** @class */ (function (_super) {
6197
6213
  AXDatePickerComponent = AXDatePickerComponent_1 = __decorate([
6198
6214
  Component({
6199
6215
  selector: 'ax-date-picker',
6200
- 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>",
6216
+ 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>",
6201
6217
  encapsulation: ViewEncapsulation.None,
6202
6218
  providers: [{ provide: AXValidatableComponent, useExisting: AXDatePickerComponent_1 }],
6203
6219
  host: { style: 'width: 100%' },
@@ -8081,7 +8097,7 @@ var AXNumberBoxComponent = /** @class */ (function (_super) {
8081
8097
  AXNumberBoxComponent = AXNumberBoxComponent_1 = __decorate([
8082
8098
  Component({
8083
8099
  selector: 'ax-number-box',
8084
- 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",
8100
+ 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",
8085
8101
  changeDetection: ChangeDetectionStrategy.OnPush,
8086
8102
  host: { style: 'width: 100%' },
8087
8103
  providers: [{ provide: AXValidatableComponent, useExisting: AXNumberBoxComponent_1 }]
@@ -8179,7 +8195,7 @@ var AXPasswordBoxComponent = /** @class */ (function (_super) {
8179
8195
  AXPasswordBoxComponent = AXPasswordBoxComponent_1 = __decorate([
8180
8196
  Component({
8181
8197
  selector: 'ax-password-box',
8182
- 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",
8198
+ 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",
8183
8199
  encapsulation: ViewEncapsulation.None,
8184
8200
  changeDetection: ChangeDetectionStrategy.OnPush,
8185
8201
  host: { style: 'width: 100%' },
@@ -8436,6 +8452,7 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
8436
8452
  _this.allowSearch = true;
8437
8453
  _this.textField = 'text';
8438
8454
  _this.valueField = 'value';
8455
+ _this.disabledField = 'disabled';
8439
8456
  _this.mode = 'single';
8440
8457
  _this.itemRemove = false;
8441
8458
  _this.itemsChange = new EventEmitter();
@@ -8607,6 +8624,17 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
8607
8624
  }
8608
8625
  }
8609
8626
  };
8627
+ AXSelectBoxComponent.prototype.isItemDisabled = function (item) {
8628
+ if (item[this.disabledField] == true) {
8629
+ return true;
8630
+ }
8631
+ else if (this.disabledCallback) {
8632
+ return this.disabledCallback({ item: item, index: -1 });
8633
+ }
8634
+ else {
8635
+ return false;
8636
+ }
8637
+ };
8610
8638
  AXSelectBoxComponent.prototype.onButtonClick = function (e) {
8611
8639
  console.log('onButtonClick', e);
8612
8640
  };
@@ -8654,6 +8682,7 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
8654
8682
  Object.defineProperty(AXSelectBoxComponent.prototype, "selectedValues", {
8655
8683
  get: function () {
8656
8684
  var _this = this;
8685
+ debugger;
8657
8686
  if (this.mode === 'single') {
8658
8687
  return this._selectedItems.map(function (c) { return c[_this.valueField]; })[0];
8659
8688
  }
@@ -8740,6 +8769,8 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
8740
8769
  }
8741
8770
  };
8742
8771
  AXSelectBoxComponent.prototype.emitSelectionChangedEvent = function () {
8772
+ debugger;
8773
+ this.selectedValuesChange.emit(this.selectedValues);
8743
8774
  this.selectionChanged.emit(new AXSelectBoxSelectionChangedEvent(this, this.selectedItems, this.selectedValues));
8744
8775
  };
8745
8776
  AXSelectBoxComponent.prototype.ngAfterViewInit = function () {
@@ -8857,6 +8888,7 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
8857
8888
  }
8858
8889
  this.cdr.markForCheck();
8859
8890
  this.cdr.detectChanges();
8891
+ this.dropdown.updatePosition();
8860
8892
  };
8861
8893
  // private params: AXDataSourceReadParams = {};
8862
8894
  AXSelectBoxComponent.prototype.fetch = function (params) {
@@ -8915,37 +8947,39 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
8915
8947
  };
8916
8948
  AXSelectBoxComponent.prototype.handleItemClick = function (e, item) {
8917
8949
  var _this = this;
8918
- var value = item[this.valueField];
8919
- if (this.mode === 'single') {
8920
- // this.selectedValues = value;
8921
- this.setSelectedValues(value, true);
8922
- }
8923
- else {
8924
- var exists = this.selectedValues.slice(0);
8925
- if (exists.includes(value)) {
8926
- if (this.allowNull == true || (this.allowNull == false && this.selectedItems.length > 1)) {
8927
- this.handleItemRemoveClick(item);
8928
- }
8950
+ if (this.isItemDisabled(item) == false) {
8951
+ var value = item[this.valueField];
8952
+ if (this.mode === 'single') {
8953
+ // this.selectedValues = value;
8954
+ this.setSelectedValues(value, true);
8929
8955
  }
8930
8956
  else {
8931
- exists.push(value);
8932
- // this.selectedValues = exists;
8933
- this.setSelectedValues(exists, true);
8957
+ var exists = this.selectedValues.slice(0);
8958
+ if (exists.includes(value)) {
8959
+ if (this.allowNull == true || (this.allowNull == false && this.selectedItems.length > 1)) {
8960
+ this.handleItemRemoveClick(item);
8961
+ }
8962
+ }
8963
+ else {
8964
+ exists.push(value);
8965
+ // this.selectedValues = exists;
8966
+ this.setSelectedValues(exists, true);
8967
+ }
8934
8968
  }
8935
- }
8936
- if (this.mode == 'single') {
8937
- this.text = '';
8938
- this.dropdown.close();
8939
- this.cdr.markForCheck();
8940
- }
8941
- // if (e.stopPropagation() == undefined) {
8942
- // e.stopPropagation();
8943
- // }
8944
- setTimeout(function () {
8945
- if (_this.serchBox) {
8946
- _this.serchBox.focus();
8969
+ if (this.mode == 'single') {
8970
+ this.text = '';
8971
+ this.dropdown.close();
8972
+ this.cdr.markForCheck();
8947
8973
  }
8948
- }, 0);
8974
+ // if (e.stopPropagation() == undefined) {
8975
+ // e.stopPropagation();
8976
+ // }
8977
+ setTimeout(function () {
8978
+ if (_this.serchBox) {
8979
+ _this.serchBox.focus();
8980
+ }
8981
+ }, 0);
8982
+ }
8949
8983
  e.stopPropagation();
8950
8984
  };
8951
8985
  AXSelectBoxComponent.prototype.handleKeyEventSearch = function (e) {
@@ -9114,6 +9148,7 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
9114
9148
  if (e.key === 'Backspace' &&
9115
9149
  e.type === 'keydown' &&
9116
9150
  ((this.allowNull === true && this.selectedItems.length > 0) || (this.allowNull === false && this.selectedItems.length > 1))) {
9151
+ debugger;
9117
9152
  this.selectedItems.pop();
9118
9153
  this.emitSelectionChangedEvent();
9119
9154
  }
@@ -9375,6 +9410,10 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
9375
9410
  ViewChild('d', { static: true }),
9376
9411
  __metadata("design:type", AXDropdownComponent)
9377
9412
  ], AXSelectBoxComponent.prototype, "dropdown", void 0);
9413
+ __decorate([
9414
+ Input(),
9415
+ __metadata("design:type", Function)
9416
+ ], AXSelectBoxComponent.prototype, "disabledCallback", void 0);
9378
9417
  __decorate([
9379
9418
  Input(),
9380
9419
  __metadata("design:type", Boolean)
@@ -9387,6 +9426,10 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
9387
9426
  Input(),
9388
9427
  __metadata("design:type", String)
9389
9428
  ], AXSelectBoxComponent.prototype, "valueField", void 0);
9429
+ __decorate([
9430
+ Input(),
9431
+ __metadata("design:type", String)
9432
+ ], AXSelectBoxComponent.prototype, "disabledField", void 0);
9390
9433
  __decorate([
9391
9434
  Input(),
9392
9435
  __metadata("design:type", String)
@@ -9433,7 +9476,7 @@ var AXSelectBoxComponent = /** @class */ (function (_super) {
9433
9476
  AXSelectBoxComponent = AXSelectBoxComponent_1 = __decorate([
9434
9477
  Component({
9435
9478
  selector: 'ax-select-box',
9436
- 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>",
9479
+ 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 (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>",
9437
9480
  encapsulation: ViewEncapsulation.None,
9438
9481
  changeDetection: ChangeDetectionStrategy.OnPush,
9439
9482
  host: { style: 'width: 100%' },
@@ -11925,7 +11968,7 @@ var AXTextAreaComponent = /** @class */ (function (_super) {
11925
11968
  AXTextAreaComponent = AXTextAreaComponent_1 = __decorate([
11926
11969
  Component({
11927
11970
  selector: 'ax-text-area',
11928
- 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>",
11971
+ 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>",
11929
11972
  encapsulation: ViewEncapsulation.None,
11930
11973
  changeDetection: ChangeDetectionStrategy.OnPush,
11931
11974
  host: { style: 'width: 100%' },