@acorex/components 3.0.44 → 3.0.48

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 (59) hide show
  1. package/acorex-components.metadata.json +1 -1
  2. package/bundles/acorex-components.umd.js +212 -102
  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/calendar/calendar-box/calendar-box.component.js +4 -4
  7. package/esm2015/lib/checkbox/checkbox.component.js +17 -17
  8. package/esm2015/lib/date-picker/date-picker.component.js +5 -4
  9. package/esm2015/lib/number-box/number-box.component.js +16 -6
  10. package/esm2015/lib/property-editor/editors/color-editor/color.editor.js +2 -2
  11. package/esm2015/lib/property-editor/editors/column-editor/column.editor.js +2 -2
  12. package/esm2015/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.js +2 -2
  13. package/esm2015/lib/property-editor/editors/date-editor/date.editor.js +2 -2
  14. package/esm2015/lib/property-editor/editors/number-editor/number.editor.js +2 -2
  15. package/esm2015/lib/property-editor/editors/range-editor/range.editor.js +2 -2
  16. package/esm2015/lib/property-editor/editors/selectbox-editor/selectbox.editor.js +22 -12
  17. package/esm2015/lib/property-editor/editors/switch-editor/number.editor.js +2 -2
  18. package/esm2015/lib/property-editor/editors/text-editor/text.editor.js +2 -2
  19. package/esm2015/lib/property-editor/editors/time-editor/time.editor.js +2 -2
  20. package/esm2015/lib/property-editor/property-editor-renderer.directive.js +83 -37
  21. package/esm2015/lib/property-editor/property-editor.class.js +18 -4
  22. package/esm2015/lib/query-builder/query-builder-group.component.js +2 -1
  23. package/esm2015/lib/query-builder/query-builder.service.js +4 -1
  24. package/esm2015/lib/selectbox/selectbox.component.js +6 -3
  25. package/esm2015/lib/selection-list/selection-list.component.js +6 -7
  26. package/esm2015/lib/tab-strip/tab-strip.component.js +11 -9
  27. package/esm2015/lib/tree-view/tree-view.component.js +12 -4
  28. package/esm5/lib/calendar/calendar-box/calendar-box.component.js +4 -4
  29. package/esm5/lib/checkbox/checkbox.component.js +17 -18
  30. package/esm5/lib/date-picker/date-picker.component.js +5 -4
  31. package/esm5/lib/number-box/number-box.component.js +16 -6
  32. package/esm5/lib/property-editor/editors/color-editor/color.editor.js +2 -2
  33. package/esm5/lib/property-editor/editors/column-editor/column.editor.js +2 -2
  34. package/esm5/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.js +2 -2
  35. package/esm5/lib/property-editor/editors/date-editor/date.editor.js +2 -2
  36. package/esm5/lib/property-editor/editors/number-editor/number.editor.js +2 -2
  37. package/esm5/lib/property-editor/editors/range-editor/range.editor.js +2 -2
  38. package/esm5/lib/property-editor/editors/selectbox-editor/selectbox.editor.js +26 -12
  39. package/esm5/lib/property-editor/editors/switch-editor/number.editor.js +2 -2
  40. package/esm5/lib/property-editor/editors/text-editor/text.editor.js +2 -2
  41. package/esm5/lib/property-editor/editors/time-editor/time.editor.js +2 -2
  42. package/esm5/lib/property-editor/property-editor-renderer.directive.js +89 -39
  43. package/esm5/lib/property-editor/property-editor.class.js +24 -4
  44. package/esm5/lib/query-builder/query-builder-group.component.js +2 -1
  45. package/esm5/lib/query-builder/query-builder.service.js +4 -1
  46. package/esm5/lib/selectbox/selectbox.component.js +6 -3
  47. package/esm5/lib/selection-list/selection-list.component.js +3 -4
  48. package/esm5/lib/tab-strip/tab-strip.component.js +11 -9
  49. package/esm5/lib/tree-view/tree-view.component.js +12 -4
  50. package/fesm2015/acorex-components.js +200 -103
  51. package/fesm2015/acorex-components.js.map +1 -1
  52. package/fesm5/acorex-components.js +213 -103
  53. package/fesm5/acorex-components.js.map +1 -1
  54. package/lib/number-box/number-box.component.d.ts +1 -0
  55. package/lib/property-editor/editors/selectbox-editor/selectbox.editor.d.ts +7 -4
  56. package/lib/property-editor/property-editor-renderer.directive.d.ts +5 -3
  57. package/lib/property-editor/property-editor.class.d.ts +4 -2
  58. package/lib/tree-view/tree-view.component.d.ts +1 -0
  59. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata, __param, __awaiter, __asyncValues } from 'tslib';
2
2
  import { Input, Component, EventEmitter, ContentChildren, QueryList, Output, ViewChild, ContentChild, ElementRef, ɵɵdefineInjectable, ɵɵinject, Injectable, ComponentFactoryResolver, Injector, NgZone, Inject, RendererFactory2, INJECTOR, TemplateRef, ApplicationRef, ChangeDetectorRef, HostListener, ViewEncapsulation, NgModule, ChangeDetectionStrategy, Attribute, Directive, ViewContainerRef, Renderer2, ViewChildren } from '@angular/core';
3
- import { AXTranslator, AXHtmlUtil, AXRenderService, AXConfig, AXDateTime, AXDateTimeRange, AXCoreModule, AXMenuItem, AXTranslatorModule, AXObjectUtil, AXScrollModule, getPropByPath, AXColorUtil } from '@acorex/core';
3
+ import { AXTranslator, AXHtmlUtil, AXRenderService, AXConfig, AXDateTime, AXDateTimeRange, AXCoreModule, AXMenuItem, AXTranslatorModule, AXObjectUtil, AXScrollModule, setPropByPath, AXEventService, AXColorUtil } from '@acorex/core';
4
4
  import { OverlayContainer, Overlay, ScrollStrategyOptions, OverlayPositionBuilder, OverlayKeyboardDispatcher, OverlayModule } from '@angular/cdk/overlay';
5
5
  import { TemplatePortal, ComponentPortal, CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
6
6
  import { merge, Subject, Observable } from 'rxjs';
@@ -1047,7 +1047,7 @@ let AXCalendarBoxComponent = class AXCalendarBoxComponent {
1047
1047
  return new AXDateTime(new Date(), this.type);
1048
1048
  }
1049
1049
  findDay(date) {
1050
- if (this.dayStyle.find((c) => c.date == date.toISOString().split('T')[0])) {
1050
+ if (this.dayStyle.find((c) => c.date.split('T')[0] == date.toISOString().split('T')[0])) {
1051
1051
  return true;
1052
1052
  }
1053
1053
  else {
@@ -1055,8 +1055,8 @@ let AXCalendarBoxComponent = class AXCalendarBoxComponent {
1055
1055
  }
1056
1056
  }
1057
1057
  getStyle(date) {
1058
- if (this.dayStyle.find((c) => c.date == date.toISOString().split('T')[0])) {
1059
- return this.dayStyle.find((c) => c.date == date.toISOString().split('T')[0]).style;
1058
+ if (this.dayStyle.find((c) => c.date.split('T')[0] == date.toISOString().split('T')[0])) {
1059
+ return this.dayStyle.find((c) => c.date.split('T')[0] == date.toISOString().split('T')[0]).style;
1060
1060
  }
1061
1061
  else {
1062
1062
  return '';
@@ -3289,7 +3289,7 @@ let AXCheckBoxComponent = class AXCheckBoxComponent extends AXBaseComponent {
3289
3289
  return this._value;
3290
3290
  }
3291
3291
  set value(v) {
3292
- if (v != this._value || v !== undefined) {
3292
+ if (v != this._value && v !== undefined) {
3293
3293
  const old = this._value;
3294
3294
  this._value = v;
3295
3295
  this.valueChange.emit(v);
@@ -3311,20 +3311,20 @@ let AXCheckBoxComponent = class AXCheckBoxComponent extends AXBaseComponent {
3311
3311
  }
3312
3312
  }
3313
3313
  handleClick(e) {
3314
- // e.preventDefault();
3315
- // e.stopPropagation();
3316
- setTimeout(() => {
3317
- if (!this.disabled && !this.readonly) {
3318
- //TODO: check intermddiate;
3319
- // this.value = !this.value;
3320
- this.onClick.emit({
3321
- component: this,
3322
- htmlElement: this.ref.nativeElement,
3323
- htmlEvent: e,
3324
- value: this.value
3325
- });
3326
- }
3327
- }, 100);
3314
+ e.preventDefault();
3315
+ e.stopPropagation();
3316
+ // setTimeout(() => {
3317
+ if (!this.disabled && !this.readonly) {
3318
+ //TODO: check intermddiate;
3319
+ this.value = !this.value;
3320
+ this.onClick.emit({
3321
+ component: this,
3322
+ htmlElement: this.ref.nativeElement,
3323
+ htmlEvent: e,
3324
+ value: this.value
3325
+ });
3326
+ }
3327
+ // }, 100);
3328
3328
  }
3329
3329
  };
3330
3330
  AXCheckBoxComponent.ctorParameters = () => [
@@ -3379,7 +3379,7 @@ __decorate([
3379
3379
  AXCheckBoxComponent = __decorate([
3380
3380
  Component({
3381
3381
  selector: 'ax-check-box',
3382
- template: "<!-- <label class=\"ax checkbox {{size}}\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n {{ label }}\r\n <input #input type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\"\r\n [disabled]=\"disabled || readonly\" />\r\n <span class=\"checkmark\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"></span>\r\n\r\n</label> -->\r\n\r\n<label for=\"{{uid}}\" class=\"ax-checkbox-container\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n <input #input type=\"checkbox\" class=\"ax-checkbox\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"\r\n id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\" [(ngModel)]=\"value\" [disabled]=\"disabled || readonly\" />\r\n <span>{{ label ? label : '&nbsp;' }}</span>\r\n</label>",
3382
+ template: "<!-- <label class=\"ax checkbox {{size}}\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n {{ label }}\r\n <input #input type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\"\r\n [disabled]=\"disabled || readonly\" />\r\n <span class=\"checkmark\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"></span>\r\n\r\n</label> -->\r\n\r\n\r\n<!-- [(ngModel)]=\"value\" -->\r\n<!-- (click)=\"handleClick($event)\" -->\r\n\r\n<label class=\"ax-checkbox-container\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\">\r\n\r\n <input #input class=\"ax-checkbox\" type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [class.checked]=\"value\"\r\n [checked]=\"value\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\" (click)=\"handleClick($event)\"\r\n [disabled]=\"disabled || readonly\" />\r\n\r\n\r\n <span>{{ label ? label : '&nbsp;' }}</span>\r\n</label>",
3383
3383
  encapsulation: ViewEncapsulation.None,
3384
3384
  changeDetection: ChangeDetectionStrategy.OnPush
3385
3385
  }),
@@ -3714,7 +3714,7 @@ let AXSelectionListComponent = class AXSelectionListComponent extends AXBaseComp
3714
3714
  this.cdr.detectChanges();
3715
3715
  }
3716
3716
  get selectedValues() {
3717
- return this._selectedItems.map(c => c[this.valueField]) || [];
3717
+ return this._selectedItems.map((c) => c[this.valueField]) || [];
3718
3718
  }
3719
3719
  set selectedValues(v) {
3720
3720
  const old = this.selectedValues;
@@ -3722,7 +3722,7 @@ let AXSelectionListComponent = class AXSelectionListComponent extends AXBaseComp
3722
3722
  v = [];
3723
3723
  }
3724
3724
  if (JSON.stringify(old) != JSON.stringify(v)) {
3725
- this.selectedItems = this.items.filter(c => v.includes(c[this.valueField]));
3725
+ this.selectedItems = this.items.filter((c) => v.includes(c[this.valueField]));
3726
3726
  this.selectedValuesChange.emit(this.selectedValues);
3727
3727
  }
3728
3728
  }
@@ -3741,13 +3741,12 @@ let AXSelectionListComponent = class AXSelectionListComponent extends AXBaseComp
3741
3741
  }
3742
3742
  }
3743
3743
  else {
3744
- this.selectedValues = this.selectedValues.filter(c => c !== value);
3744
+ this.selectedValues = this.selectedValues.filter((c) => c !== value);
3745
3745
  }
3746
3746
  }
3747
3747
  }
3748
3748
  }
3749
- focus() {
3750
- }
3749
+ focus() { }
3751
3750
  onvalueChanged(e) {
3752
3751
  if (!this.disabled) {
3753
3752
  this.selectedItemsChange.emit([e]);
@@ -3814,7 +3813,7 @@ __decorate([
3814
3813
  AXSelectionListComponent = __decorate([
3815
3814
  Component({
3816
3815
  selector: 'ax-selection-list',
3817
- template: "<ng-container *ngIf=\" mode == 'multiple'; then checkboxList; else radioButtonList\"></ng-container>\r\n<ng-template #checkboxList>\r\n <div class=\"ax selection-list {{size}}\" [ngClass]=\"direction\">\r\n <ax-check-box label=\"{{item[textField]}}\" *ngFor=\"let item of items\" [disabled]=\"disabled\" [readonly]=\"disabled\"\r\n [value]=\"selectedValues.indexOf(item[valueField])>-1\"\r\n (onValueChanged)=\"onCheckValueChange(item[valueField],$event.value)\">\r\n </ax-check-box>\r\n </div>\r\n</ng-template>\r\n<ng-template #radioButtonList>\r\n <div class=\"ax selection-list {{size}}\" [ngClass]=\"direction\">\r\n <label class=\"ax radio\" for=\"{{uid}}\" [class.disabled]=\"disabled\" [class.readonly]=\"disabled\"\r\n *ngFor=\"let item of items\" (click)=\"onvalueChanged(item)\">\r\n {{ item[textField] }}\r\n <input type=\"radio\" (change)=\"onCheckValueChange(item[valueField],true)\" [value]=\"item[valueField]\"\r\n [checked]=\"selectedValues==item[valueField]\" [name]=\"uid\" [disabled]=\"disabled\" [readonly]=\"readonly\" />\r\n <span class=\"checkmark\"></span>\r\n </label>\r\n </div>\r\n</ng-template>",
3816
+ template: "<ng-container *ngIf=\" mode == 'multiple'; then checkboxList; else radioButtonList\"></ng-container>\r\n<ng-template #checkboxList>\r\n <div class=\"ax selection-list {{size}}\" [ngClass]=\"direction\">\r\n <ax-check-box label=\"{{item[textField]}}\" *ngFor=\"let item of items\" [disabled]=\"item.disable || disabled\"\r\n [readonly]=\"item.readonly || readonly\" [value]=\"selectedValues.indexOf(item[valueField])>-1\"\r\n (onValueChanged)=\"onCheckValueChange(item[valueField],$event.value)\">\r\n </ax-check-box>\r\n </div>\r\n</ng-template>\r\n<ng-template #radioButtonList>\r\n <div class=\"ax selection-list {{size}}\" [ngClass]=\"direction\">\r\n <label class=\"ax radio\" for=\"{{uid}}\" [class.disabled]=\"disabled\" [class.readonly]=\"disabled\"\r\n *ngFor=\"let item of items\" (click)=\"onvalueChanged(item)\">\r\n {{ item[textField] }}\r\n <input type=\"radio\" (change)=\"onCheckValueChange(item[valueField],true)\" [value]=\"item[valueField]\"\r\n [checked]=\"selectedValues==item[valueField]\" [name]=\"uid\" [disabled]=\"item.disable || disabled\"\r\n [readonly]=\"item.readonly || readonly\" />\r\n <span class=\"checkmark\"></span>\r\n </label>\r\n </div>\r\n</ng-template>",
3818
3817
  encapsulation: ViewEncapsulation.None,
3819
3818
  changeDetection: ChangeDetectionStrategy.OnPush
3820
3819
  }),
@@ -5224,8 +5223,9 @@ let AXDatePickerComponent = AXDatePickerComponent_1 = class AXDatePickerComponen
5224
5223
  if (this.showToday && !this.value) {
5225
5224
  this.selectToday();
5226
5225
  }
5227
- if (this.dropdown.dropdownWidth < 200) {
5228
- this.dropdown.dropdownWidth = 200;
5226
+ console.log(Boolean(this.dropdown.dropdownWidth > 200));
5227
+ if (this.dropdown.dropdownWidth > 200) {
5228
+ this.dropdown.dropdownWidth = 250;
5229
5229
  }
5230
5230
  this.cdr.markForCheck();
5231
5231
  });
@@ -5845,7 +5845,7 @@ __decorate([
5845
5845
  AXDatePickerComponent = AXDatePickerComponent_1 = __decorate([
5846
5846
  Component({
5847
5847
  selector: 'ax-date-picker',
5848
- template: "<ax-drop-down [readonly]=\"readonly\" [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>",
5848
+ 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>",
5849
5849
  encapsulation: ViewEncapsulation.None,
5850
5850
  providers: [{ provide: AXValidatableComponent, useExisting: AXDatePickerComponent_1 }],
5851
5851
  host: { style: 'width: 100%' },
@@ -7128,7 +7128,7 @@ let AXNumberBoxComponent = AXNumberBoxComponent_1 = class AXNumberBoxComponent e
7128
7128
  }
7129
7129
  calcSeparator(num) {
7130
7130
  if (this.showSeparator) {
7131
- return num + (+(num / 3));
7131
+ return num + +(num / 3);
7132
7132
  }
7133
7133
  else {
7134
7134
  return num;
@@ -7152,9 +7152,11 @@ let AXNumberBoxComponent = AXNumberBoxComponent_1 = class AXNumberBoxComponent e
7152
7152
  if (this.disabled === false) {
7153
7153
  if (this.scrollWeel === true) {
7154
7154
  setTimeout(() => {
7155
- this.input.nativeElement.addEventListener('wheel', (e) => {
7156
- this.handleWheel(e);
7157
- });
7155
+ if (this.readonly === false) {
7156
+ this.input.nativeElement.addEventListener('wheel', (e) => {
7157
+ this.handleWheel(e);
7158
+ });
7159
+ }
7158
7160
  }, 500);
7159
7161
  }
7160
7162
  }
@@ -7563,6 +7565,14 @@ let AXNumberBoxComponent = AXNumberBoxComponent_1 = class AXNumberBoxComponent e
7563
7565
  }
7564
7566
  }
7565
7567
  }
7568
+ handleInputBlur(e) {
7569
+ this.checkMinMax(this.textValue);
7570
+ this.onBlur.emit({
7571
+ component: this,
7572
+ htmlElement: this.ref.nativeElement,
7573
+ htmlEvent: e
7574
+ });
7575
+ }
7566
7576
  };
7567
7577
  AXNumberBoxComponent.ctorParameters = () => [
7568
7578
  { type: ChangeDetectorRef },
@@ -7615,7 +7625,7 @@ __decorate([
7615
7625
  AXNumberBoxComponent = AXNumberBoxComponent_1 = __decorate([
7616
7626
  Component({
7617
7627
  selector: 'ax-number-box',
7618
- 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",
7628
+ 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",
7619
7629
  changeDetection: ChangeDetectionStrategy.OnPush,
7620
7630
  host: { style: 'width: 100%' },
7621
7631
  providers: [{ provide: AXValidatableComponent, useExisting: AXNumberBoxComponent_1 }]
@@ -7983,7 +7993,10 @@ let AXSelectBoxComponent = AXSelectBoxComponent_1 = class AXSelectBoxComponent e
7983
7993
  v = [];
7984
7994
  }
7985
7995
  // const old = this.selectedItems;
7986
- if (JSON.stringify(old) !== JSON.stringify(v)) {
7996
+ var f = differenceBy(old, v, this.valueField);
7997
+ var s = differenceBy(v, old, this.valueField);
7998
+ // if (JSON.stringify(old) !== JSON.stringify(v)) {
7999
+ if (f.length != 0 || s.length != 0) {
7987
8000
  this._selectedItems = this.mode == 'single' ? v.slice(0, 1) : [...new Set(v)]; //[...new Set(v[0])] : [...new Set(v)];
7988
8001
  this._selectedItems.forEach((c) => (c.selected = true));
7989
8002
  this.selectedItemsChange.emit(this._selectedItems);
@@ -8865,7 +8878,7 @@ __decorate([
8865
8878
  AXSelectBoxComponent = AXSelectBoxComponent_1 = __decorate([
8866
8879
  Component({
8867
8880
  selector: 'ax-select-box',
8868
- 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 </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>",
8881
+ 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>",
8869
8882
  encapsulation: ViewEncapsulation.None,
8870
8883
  changeDetection: ChangeDetectionStrategy.OnPush,
8871
8884
  host: { style: 'width: 100%' },
@@ -9458,6 +9471,7 @@ let AXQueryBuilderService = class AXQueryBuilderService {
9458
9471
  return __awaiter(this, void 0, void 0, function* () {
9459
9472
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
9460
9473
  var e_1, _a;
9474
+ ;
9461
9475
  var query;
9462
9476
  if (group.items.length > 0) {
9463
9477
  query = ' ( ';
@@ -9509,6 +9523,7 @@ let AXQueryBuilderService = class AXQueryBuilderService {
9509
9523
  codeOperator = item.operator;
9510
9524
  break;
9511
9525
  }
9526
+ ;
9512
9527
  query = query + ' ' + item.caption + ' ' + codeOperator + ' ' + item.text;
9513
9528
  }
9514
9529
  if (id !== group.items.length - 1 && query != ' ( ') {
@@ -9535,6 +9550,7 @@ let AXQueryBuilderService = class AXQueryBuilderService {
9535
9550
  let query = '';
9536
9551
  switch (type) {
9537
9552
  case 'simple':
9553
+ ;
9538
9554
  if (group.items.length > 0) {
9539
9555
  query = ' ( ';
9540
9556
  }
@@ -9673,6 +9689,7 @@ let AXQueryBuilderGroupComponent = class AXQueryBuilderGroupComponent {
9673
9689
  this.ruleChanged(null);
9674
9690
  }
9675
9691
  ruleChanged(e) {
9692
+ ;
9676
9693
  // this.group.queryString = this.qs.getQueryString(this.group, 'simple');
9677
9694
  this.qs.getQueryStringSimple(this.group).then((c) => {
9678
9695
  this.group.queryString = c;
@@ -10934,13 +10951,15 @@ let AXTabStripComponent = class AXTabStripComponent {
10934
10951
  }
10935
10952
  ngOnInit() { }
10936
10953
  handleClick(i) {
10937
- this.items.forEach((c) => (c.active = false));
10938
- i.active = true;
10939
- this.onTabChanged.emit({
10940
- component: this,
10941
- seledtedTab: i,
10942
- htmlElement: this.ref.nativeElement
10943
- });
10954
+ if (!i.disable) {
10955
+ this.items.forEach((c) => (c.active = false));
10956
+ i.active = true;
10957
+ this.onTabChanged.emit({
10958
+ component: this,
10959
+ seledtedTab: i,
10960
+ htmlElement: this.ref.nativeElement
10961
+ });
10962
+ }
10944
10963
  }
10945
10964
  };
10946
10965
  AXTabStripComponent.ctorParameters = () => [
@@ -10957,7 +10976,7 @@ __decorate([
10957
10976
  AXTabStripComponent = __decorate([
10958
10977
  Component({
10959
10978
  selector: 'ax-tab-strip',
10960
- template: "<ul class=\"tab-strip-container\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <li [class.active]=\"item.active\" (click)=\"handleClick(item)\">{{item.text}}</li>\r\n </ng-container>\r\n</ul>"
10979
+ template: "<ul class=\"tab-strip-container\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <li *ngIf=\"!!item.visible || item.visible == undefined\" [class.active]=\"item.active\"\r\n [class.disabled]=\"item.disable\" (click)=\"handleClick(item)\">{{item.text}}</li>\r\n </ng-container>\r\n</ul>"
10961
10980
  }),
10962
10981
  __metadata("design:paramtypes", [ElementRef])
10963
10982
  ], AXTabStripComponent);
@@ -13043,7 +13062,7 @@ let AXTreeViewComponent = class AXTreeViewComponent extends AXBaseComponent {
13043
13062
  }
13044
13063
  };
13045
13064
  node.parent.unSelectParent = () => {
13046
- if (item.parentNode['select'] != false) {
13065
+ if (item.parentNode['select'] == true) {
13047
13066
  this.internalSelectItem(item.parentNode, true);
13048
13067
  }
13049
13068
  };
@@ -13058,7 +13077,7 @@ let AXTreeViewComponent = class AXTreeViewComponent extends AXBaseComponent {
13058
13077
  };
13059
13078
  node.children.unSelectChilds = () => {
13060
13079
  item.childeren.forEach((element) => {
13061
- if (element['select'] != false) {
13080
+ if (element['select'] == true) {
13062
13081
  this.internalSelectItem(element, true);
13063
13082
  }
13064
13083
  });
@@ -13164,6 +13183,14 @@ let AXTreeViewComponent = class AXTreeViewComponent extends AXBaseComponent {
13164
13183
  flag
13165
13184
  });
13166
13185
  }
13186
+ nodeClick(item) {
13187
+ if (item[this.hasChildField] == true) {
13188
+ this.toggleNode(item, true);
13189
+ }
13190
+ else {
13191
+ this.internalSelectItem(item, true);
13192
+ }
13193
+ }
13167
13194
  toggleNode(item, flag = false) {
13168
13195
  //item[this.hasChildField] === false &&
13169
13196
  if (this.selectionMode === 'single' && !flag) {
@@ -13637,7 +13664,7 @@ __decorate([
13637
13664
  AXTreeViewComponent = __decorate([
13638
13665
  Component({
13639
13666
  selector: 'ax-tree-view',
13640
- template: "<ul class=\"ax treeview {{size}}\">\r\n <ng-template #recursiveList let-list>\r\n <ng-container *ngFor=\"let item of list\">\r\n <li class=\"active {{item[hasChildField] ? '':'node'}}\" [class.bordered]=\"bordered\" [class.selected]=\"item.select\" [draggable]=\"allowDrag\" (dragstart)=\"onDragStart($event, item)\" [attr.data-id]=\"item[keyField]\" (dragleave)=\"onDragEnd($event,item)\" (dragend)=drop($event)>\r\n <div axContextMenu [contextDataItem]=\"item\" [contextMenuItems]=\"contextMenuItems\" [contextMenu]=\"menu\" (onContextMenuItemClick)=\"handleOnContextMenuItem($event)\" style=\"display: flex; cursor: pointer;align-items: center;\">\r\n <div class=\"start-side\">\r\n <div *ngIf=\"item[hasChildField]\" class=\"collapse-icon\" (click)=\"handleOnNodeClick($event,item,true)\">\r\n <i class=\"fal\" [ngClass]=\"{'fa-minus': !!item.toggle , 'fa-plus': !item.toggle , 'fa-spinner fa-spin':item.loading }\"></i>\r\n </div>\r\n\r\n <ax-check-box *ngIf=\"showSelectBox\" [disabled]=\"item.disabledCheckBox\" [size]=\"size\" [indeterminate]=\"true\" [value]=\"item.select\" (onClick)=\"internalSelectItem(item)\">\r\n </ax-check-box>\r\n\r\n\r\n </div>\r\n <div class=\"text-list\" (click)=\"handleOnNodeClick($event,item)\" (dblclick)=\"itemdbClick($event,item)\">\r\n <ng-container *ngIf=\"nodeTemplate; else elseTemplate\">\r\n <ng-container *ngTemplateOutlet=\"nodeTemplate; context:{ $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n {{item.title}}\r\n </ng-template>\r\n </div>\r\n </div>\r\n <ul *ngIf=\"item.loading\">\r\n <i class=\"far \"></i>\r\n </ul>\r\n <ul class=\"child\" *ngIf=\"item.toggle\" style=\"background-color: white !important;\">\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: item.childeren }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: list }\"></ng-container>\r\n</ul>\r\n\r\n<ax-context-menu #menu></ax-context-menu>",
13667
+ template: "<ul class=\"ax treeview {{size}}\">\r\n <ng-template #recursiveList let-list>\r\n <ng-container *ngFor=\"let item of list\">\r\n <li class=\"active {{item[hasChildField] ? '':'node'}}\" [class.bordered]=\"bordered\"\r\n [class.selected]=\"item.select\" [draggable]=\"allowDrag\" (dragstart)=\"onDragStart($event, item)\"\r\n [attr.data-id]=\"item[keyField]\" (dragleave)=\"onDragEnd($event,item)\" (dragend)=drop($event)>\r\n <div axContextMenu [contextDataItem]=\"item\" [contextMenuItems]=\"contextMenuItems\" [contextMenu]=\"menu\"\r\n (onContextMenuItemClick)=\"handleOnContextMenuItem($event)\"\r\n style=\"display: flex; cursor: pointer;align-items: center;\">\r\n <div class=\"start-side\">\r\n <div *ngIf=\"item[hasChildField]\" class=\"collapse-icon\"\r\n (click)=\"handleOnNodeClick($event,item,true)\">\r\n <i class=\"fal\"\r\n [ngClass]=\"{'fa-minus': !!item.toggle , 'fa-plus': !item.toggle , 'fa-spinner fa-spin':item.loading }\"></i>\r\n </div>\r\n\r\n <ax-check-box *ngIf=\"showSelectBox\" [disabled]=\"item.disabledCheckBox\" [size]=\"size\"\r\n [indeterminate]=\"true\" [value]=\"item.select\" (onClick)=\"internalSelectItem(item)\">\r\n </ax-check-box>\r\n\r\n\r\n </div>\r\n <div class=\"text-list\" (click)=\"nodeClick(item)\" (dblclick)=\"itemdbClick($event,item)\">\r\n <ng-container *ngIf=\"nodeTemplate; else elseTemplate\">\r\n <ng-container *ngTemplateOutlet=\"nodeTemplate; context:{ $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n {{item.title}}\r\n </ng-template>\r\n </div>\r\n </div>\r\n <ul *ngIf=\"item.loading\">\r\n <i class=\"far \"></i>\r\n </ul>\r\n <ul class=\"child\" *ngIf=\"item.toggle\" style=\"background-color: white !important;\">\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: item.childeren }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: list }\"></ng-container>\r\n</ul>\r\n\r\n<ax-context-menu #menu></ax-context-menu>",
13641
13668
  encapsulation: ViewEncapsulation.None
13642
13669
  }),
13643
13670
  __metadata("design:paramtypes", [ElementRef])
@@ -13912,9 +13939,17 @@ class AXProperyEditorComponent {
13912
13939
  constructor(cdr) {
13913
13940
  this.cdr = cdr;
13914
13941
  this.readonly = false;
13915
- this.initiated = false;
13942
+ this._initiated = false;
13943
+ this._valueBound = false;
13916
13944
  this.validatableComponentRegistered = new Subject();
13917
13945
  this.valueChange = new EventEmitter();
13946
+ this.onRenderCompleted = new EventEmitter();
13947
+ this.onRenderCompleted.subscribe(() => {
13948
+ this._initiated = true;
13949
+ });
13950
+ }
13951
+ get initiated() {
13952
+ return this._initiated && this._valueBound;
13918
13953
  }
13919
13954
  registerForValidationForm(component) {
13920
13955
  this.validatableComponentRegistered.next(component);
@@ -13927,18 +13962,24 @@ class AXProperyEditorComponent {
13927
13962
  this._value = v;
13928
13963
  this.valueChange.emit(v);
13929
13964
  this.cdr.detectChanges();
13965
+ //TODO: find better solution
13966
+ setTimeout(() => {
13967
+ this._valueBound = true;
13968
+ }, 100);
13930
13969
  }
13931
13970
  }
13932
13971
  handleValueChange(v) {
13933
13972
  this.value = v;
13934
13973
  }
13935
- initiat() {
13936
- }
13937
13974
  }
13938
13975
  __decorate([
13939
13976
  Output(),
13940
13977
  __metadata("design:type", EventEmitter)
13941
13978
  ], AXProperyEditorComponent.prototype, "valueChange", void 0);
13979
+ __decorate([
13980
+ Output(),
13981
+ __metadata("design:type", EventEmitter)
13982
+ ], AXProperyEditorComponent.prototype, "onRenderCompleted", void 0);
13942
13983
  __decorate([
13943
13984
  Input(),
13944
13985
  __metadata("design:type", Object),
@@ -13995,11 +14036,12 @@ function propertyEditor(options) {
13995
14036
  }
13996
14037
 
13997
14038
  let AXPropertyEditorRendererDirective = class AXPropertyEditorRendererDirective {
13998
- constructor(target, componentFactoryResolver, renderService) {
14039
+ constructor(target, componentFactoryResolver, renderService, eventService) {
13999
14040
  this.target = target;
14000
14041
  this.componentFactoryResolver = componentFactoryResolver;
14001
14042
  this.renderService = renderService;
14002
- this.readonly = false;
14043
+ this.eventService = eventService;
14044
+ this._context = {};
14003
14045
  this.onValueChange = new EventEmitter();
14004
14046
  }
14005
14047
  get context() {
@@ -14007,9 +14049,6 @@ let AXPropertyEditorRendererDirective = class AXPropertyEditorRendererDirective
14007
14049
  }
14008
14050
  set context(v) {
14009
14051
  this._context = v;
14010
- if (v && this.instance) {
14011
- this.assignProps();
14012
- }
14013
14052
  }
14014
14053
  clear() {
14015
14054
  this.instance.value = null;
@@ -14024,52 +14063,98 @@ let AXPropertyEditorRendererDirective = class AXPropertyEditorRendererDirective
14024
14063
  const cmpRef = this.target.createComponent(factory);
14025
14064
  this.instance = cmpRef.instance;
14026
14065
  this.subscription = this.instance.valueChange.subscribe(value => {
14027
- if (this.instance.initiated === true) {
14028
- this.property.value = value;
14029
- this.onValueChange.emit(this.property);
14066
+ var _a, _b;
14067
+ this.property.value = value;
14068
+ this.onValueChange.emit(this.property);
14069
+ if ((_b = (_a = this.property) === null || _a === void 0 ? void 0 : _a.property) === null || _b === void 0 ? void 0 : _b.name) {
14070
+ setTimeout(() => {
14071
+ this.eventService.broadcast(`props-${this.groupId}-${this.property.property.name}`, this.property);
14072
+ }, 0);
14030
14073
  }
14031
14074
  });
14032
- //
14075
+ this.watchChanges();
14076
+ this.assignProps();
14077
+ this.instance.value = this.property.value;
14078
+ // this.instance.onRenderCompleted.subscribe(() => {
14079
+ // });
14033
14080
  if (this.validationForm) {
14034
14081
  this.instance.validatableComponentRegistered.subscribe(v => {
14035
14082
  this.validationForm.addWidget(v);
14036
14083
  });
14037
14084
  }
14038
- //
14039
- //setTimeout(() => {
14040
- this.instance.readonly = this.readonly;
14041
- this.assignProps();
14042
- this.instance.value = this.property.value;
14043
- this.instance.initiat();
14044
- cmpRef.changeDetectorRef.markForCheck();
14045
- //});
14046
14085
  }
14047
14086
  });
14048
14087
  }
14088
+ watchChanges() {
14089
+ var _a, _b;
14090
+ const varsRegx = /((\$\{[a-zA-Z_0-9]+\})+)/gm;
14091
+ const varNameRegx = /[a-zA-Z_0-9]+/gm;
14092
+ const options = this.property.property.editorOptions;
14093
+ if (!options) {
14094
+ return;
14095
+ }
14096
+ for (const p in options) {
14097
+ if (options.hasOwnProperty(p)) {
14098
+ const opt = options[p];
14099
+ const vars = typeof opt === 'string' ? (_a = opt) === null || _a === void 0 ? void 0 : _a.match(varsRegx) : [];
14100
+ // bind the props
14101
+ if ((_b = vars) === null || _b === void 0 ? void 0 : _b.length) {
14102
+ vars.forEach(v => {
14103
+ var _a;
14104
+ const path = ((_a = v.match(varNameRegx)) === null || _a === void 0 ? void 0 : _a.length) ? v.match(varNameRegx)[0] : null;
14105
+ if (path) {
14106
+ this.eventService.on(`props-${this.groupId}-${path}`, (e) => {
14107
+ let execCode = opt.slice();
14108
+ const params = {};
14109
+ vars.forEach(vv => {
14110
+ var _a;
14111
+ const p2 = ((_a = vv.match(varNameRegx)) === null || _a === void 0 ? void 0 : _a.length) ? vv.match(varNameRegx)[0] : null;
14112
+ params[p2] = AXObjectUtil.deepCopy(this.context[p2]) || null;
14113
+ execCode = execCode.replace(vv, `__params__.${p2}`);
14114
+ });
14115
+ const func = new Function('__params__', `try { return ${execCode}} catch(e){ console.log(e); return null; }`);
14116
+ const val = func(params);
14117
+ const keys = p.split('.');
14118
+ const prop = Object.assign({}, this.instance[keys[0]]);
14119
+ if (keys.length > 1) {
14120
+ this.instance[keys[0]] = setPropByPath(prop, p, val);
14121
+ }
14122
+ else {
14123
+ setPropByPath(this.instance, p, val);
14124
+ }
14125
+ });
14126
+ }
14127
+ });
14128
+ }
14129
+ // else {
14130
+ // this.assignProps();
14131
+ // }
14132
+ }
14133
+ }
14134
+ }
14049
14135
  assignProps() {
14136
+ var _a, _b;
14050
14137
  const options = this.property.property.editorOptions;
14051
14138
  if (!options) {
14052
14139
  return;
14053
14140
  }
14141
+ const varsRegx = /((\$\{[a-zA-Z_0-9]+\})+)/gm;
14054
14142
  for (const p in options) {
14055
14143
  if (options.hasOwnProperty(p)) {
14056
14144
  const opt = options[p];
14057
- if (typeof opt === 'string' && opt.startsWith('$$')) {
14058
- const key = opt.substring(2);
14059
- const val = getPropByPath(this.context, key);
14060
- if (val) {
14061
- this.instance[p] = typeof val === 'function' ? val({ data: this.context, host: this.host }, this.property) : val;
14062
- }
14145
+ const vars = typeof opt === 'string' ? (_a = opt) === null || _a === void 0 ? void 0 : _a.match(varsRegx) : [];
14146
+ if ((_b = vars) === null || _b === void 0 ? void 0 : _b.length) {
14147
+ continue;
14063
14148
  }
14064
14149
  else {
14065
- const res = typeof opt === 'function' ? opt({ data: this.context, host: this.host }, this.property) : opt;
14066
- if (res instanceof Promise) {
14067
- res.then(v => {
14068
- this.instance[p] = v;
14150
+ const val = typeof opt === 'function' ? opt({ data: this.context, host: this.host }, this.property) : opt;
14151
+ if (val instanceof Promise) {
14152
+ val.then(v => {
14153
+ setPropByPath(this.instance, p, val);
14069
14154
  });
14070
14155
  }
14071
14156
  else {
14072
- this.instance[p] = res;
14157
+ setPropByPath(this.instance, p, val);
14073
14158
  }
14074
14159
  }
14075
14160
  }
@@ -14084,16 +14169,13 @@ let AXPropertyEditorRendererDirective = class AXPropertyEditorRendererDirective
14084
14169
  AXPropertyEditorRendererDirective.ctorParameters = () => [
14085
14170
  { type: ViewContainerRef },
14086
14171
  { type: ComponentFactoryResolver },
14087
- { type: AXRenderService }
14172
+ { type: AXRenderService },
14173
+ { type: AXEventService }
14088
14174
  ];
14089
14175
  __decorate([
14090
14176
  Input(),
14091
14177
  __metadata("design:type", Object)
14092
14178
  ], AXPropertyEditorRendererDirective.prototype, "property", void 0);
14093
- __decorate([
14094
- Input(),
14095
- __metadata("design:type", Boolean)
14096
- ], AXPropertyEditorRendererDirective.prototype, "readonly", void 0);
14097
14179
  __decorate([
14098
14180
  Input(),
14099
14181
  __metadata("design:type", AXValidationFormComponent)
@@ -14107,6 +14189,10 @@ __decorate([
14107
14189
  Input(),
14108
14190
  __metadata("design:type", Object)
14109
14191
  ], AXPropertyEditorRendererDirective.prototype, "host", void 0);
14192
+ __decorate([
14193
+ Input(),
14194
+ __metadata("design:type", Object)
14195
+ ], AXPropertyEditorRendererDirective.prototype, "groupId", void 0);
14110
14196
  __decorate([
14111
14197
  Output(),
14112
14198
  __metadata("design:type", EventEmitter)
@@ -14117,7 +14203,8 @@ AXPropertyEditorRendererDirective = __decorate([
14117
14203
  }),
14118
14204
  __metadata("design:paramtypes", [ViewContainerRef,
14119
14205
  ComponentFactoryResolver,
14120
- AXRenderService])
14206
+ AXRenderService,
14207
+ AXEventService])
14121
14208
  ], AXPropertyEditorRendererDirective);
14122
14209
 
14123
14210
  let AXTextPropertyEditorComponent = class AXTextPropertyEditorComponent extends AXProperyEditorComponent {
@@ -14131,7 +14218,7 @@ let AXTextPropertyEditorComponent = class AXTextPropertyEditorComponent extends
14131
14218
  }
14132
14219
  ngAfterViewInit() {
14133
14220
  this.registerForValidationForm(this.textBox);
14134
- this.initiated = true;
14221
+ this.onRenderCompleted.emit();
14135
14222
  }
14136
14223
  };
14137
14224
  AXTextPropertyEditorComponent.ctorParameters = () => [
@@ -14177,8 +14264,8 @@ let AXNumberBoxPropertyEditorComponent = class AXNumberBoxPropertyEditorComponen
14177
14264
  super.handleValueChange(e.value);
14178
14265
  }
14179
14266
  ngAfterViewInit() {
14180
- this.initiated = true;
14181
14267
  this.registerForValidationForm(this.textBox);
14268
+ this.onRenderCompleted.emit();
14182
14269
  }
14183
14270
  };
14184
14271
  AXNumberBoxPropertyEditorComponent.ctorParameters = () => [
@@ -14232,16 +14319,18 @@ let AXSelectBoxPropertyEditorComponent = class AXSelectBoxPropertyEditorComponen
14232
14319
  this.selectionDataMode = 'value';
14233
14320
  this.allowSearch = true;
14234
14321
  this.allowNull = false;
14322
+ this.disabled = false;
14235
14323
  this.items = [];
14236
14324
  this.remoteOperation = false;
14237
14325
  this.provideData = (e) => {
14238
14326
  return new Promise((resolve) => {
14239
14327
  const func = () => {
14240
14328
  if (Array.isArray(this.items)) {
14241
- resolve(this.items);
14329
+ resolve(this.items.slice());
14242
14330
  }
14243
14331
  else if (typeof this.items === 'function') {
14244
- resolve(this.items(e));
14332
+ const a = Object.assign(e, { sender: this });
14333
+ resolve(this.items(a));
14245
14334
  }
14246
14335
  else {
14247
14336
  resolve([]);
@@ -14256,27 +14345,35 @@ let AXSelectBoxPropertyEditorComponent = class AXSelectBoxPropertyEditorComponen
14256
14345
  });
14257
14346
  };
14258
14347
  }
14348
+ get filter() {
14349
+ return this._filter;
14350
+ }
14351
+ set filter(v) {
14352
+ var _a;
14353
+ this._filter = v;
14354
+ if (this.value && this.initiated) {
14355
+ this.value = null;
14356
+ (_a = this.selectBox) === null || _a === void 0 ? void 0 : _a.refresh();
14357
+ }
14358
+ }
14259
14359
  handleValueChange(e) {
14260
- super.handleValueChange(e.value);
14360
+ super.handleValueChange(e.selectedValues);
14261
14361
  }
14262
14362
  ngAfterViewInit() {
14263
- this.selectBox.refresh();
14264
14363
  this.registerForValidationForm(this.selectBox);
14265
- }
14266
- initiat() {
14267
- this.initiated = true;
14364
+ this.onRenderCompleted.emit();
14268
14365
  }
14269
14366
  };
14270
14367
  AXSelectBoxPropertyEditorComponent.ctorParameters = () => [
14271
14368
  { type: ChangeDetectorRef }
14272
14369
  ];
14273
14370
  __decorate([
14274
- ViewChild(AXSelectBox2Component, { static: true }),
14275
- __metadata("design:type", AXSelectBox2Component)
14371
+ ViewChild(AXSelectBoxComponent, { static: true }),
14372
+ __metadata("design:type", AXSelectBoxComponent)
14276
14373
  ], AXSelectBoxPropertyEditorComponent.prototype, "selectBox", void 0);
14277
14374
  AXSelectBoxPropertyEditorComponent = __decorate([
14278
14375
  Component({
14279
- template: "<ax-select-box2 [selectionMode]=\"selectionMode\"\r\n [selectionDataMode]=\"selectionDataMode\" \r\n [textField]=\"textField\" \r\n [valueField]=\"valueField\" \r\n [value]=\"value\" \r\n [remoteOperation]=\"remoteOperation\"\r\n [allowSearch]=\"allowSearch\" \r\n [allowNull]=\"allowNull\"\r\n (onValueChanged)=\"handleValueChange($event)\">\r\n <ax-data-source [provideData]=\"provideData\">\r\n </ax-data-source>\r\n <ax-validation [rules]=\"validation?.rules\">\r\n </ax-validation>\r\n</ax-select-box2>"
14376
+ template: "<ax-select-box [mode]=\"selectionMode\"\r\n [textField]=\"textField\" \r\n [valueField]=\"valueField\" \r\n [selectedValues]=\"value\" \r\n [remoteOperation]=\"remoteOperation\"\r\n [allowSearch]=\"allowSearch\" \r\n [allowNull]=\"allowNull\"\r\n [readonly]=\"readonly\"\r\n [disabled]=\"disabled\"\r\n (selectionChanged)=\"handleValueChange($event)\">\r\n <ax-data-source [provideData]=\"provideData\">\r\n </ax-data-source>\r\n <ax-validation [rules]=\"validation?.rules\">\r\n </ax-validation>\r\n</ax-select-box>"
14280
14377
  }),
14281
14378
  __metadata("design:paramtypes", [ChangeDetectorRef])
14282
14379
  ], AXSelectBoxPropertyEditorComponent);
@@ -14310,7 +14407,7 @@ let AXRangePropertyEditorComponent = class AXRangePropertyEditorComponent extend
14310
14407
  this.cdr.detectChanges();
14311
14408
  }
14312
14409
  ngAfterViewInit() {
14313
- this.initiated = true;
14410
+ this.onRenderCompleted.emit();
14314
14411
  }
14315
14412
  // getRanges() {
14316
14413
  // return this.ranges.sort((a, b) => a.minValue - b.minValue);
@@ -14991,7 +15088,7 @@ let AXColorPropertyEditorComponent = class AXColorPropertyEditorComponent extend
14991
15088
  }
14992
15089
  ngAfterViewInit() {
14993
15090
  this.registerForValidationForm(this.textBox);
14994
- this.initiated = true;
15091
+ this.onRenderCompleted.emit();
14995
15092
  }
14996
15093
  };
14997
15094
  AXColorPropertyEditorComponent.ctorParameters = () => [
@@ -15050,7 +15147,7 @@ let ColumnPropertyEditorComponent = class ColumnPropertyEditorComponent extends
15050
15147
  this.columns = this.value ? JSON.parse(JSON.stringify(this.value)) : [];
15051
15148
  }
15052
15149
  ngAfterViewInit() {
15053
- this.initiated = true;
15150
+ this.onRenderCompleted.emit();
15054
15151
  }
15055
15152
  drop(event) {
15056
15153
  moveItemInArray(this.columns, event.previousIndex, event.currentIndex);
@@ -15204,8 +15301,8 @@ let AXConditionalColorPropertyEditorComponent = class AXConditionalColorProperty
15204
15301
  ].filter(c => c.dataTypes == null || c.dataTypes.includes(this.dataType));
15205
15302
  }
15206
15303
  ngAfterViewInit() {
15207
- this.initiated = true;
15208
15304
  this.cdr.detectChanges();
15305
+ this.onRenderCompleted.emit();
15209
15306
  }
15210
15307
  handleEditClick(item) {
15211
15308
  this.updateOperations();
@@ -15398,7 +15495,7 @@ let AXSwitchPropertyEditorComponent = class AXSwitchPropertyEditorComponent exte
15398
15495
  super.handleValueChange(e.value);
15399
15496
  }
15400
15497
  ngAfterViewInit() {
15401
- this.initiated = true;
15498
+ this.onRenderCompleted.emit();
15402
15499
  }
15403
15500
  };
15404
15501
  AXSwitchPropertyEditorComponent.ctorParameters = () => [
@@ -15445,8 +15542,8 @@ let AXDatePropertyEditorComponent = class AXDatePropertyEditorComponent extends
15445
15542
  super.handleValueChange(e.value);
15446
15543
  }
15447
15544
  ngAfterViewInit() {
15448
- this.initiated = true;
15449
15545
  this.registerForValidationForm(this.date);
15546
+ this.onRenderCompleted.emit();
15450
15547
  }
15451
15548
  };
15452
15549
  AXDatePropertyEditorComponent.ctorParameters = () => [
@@ -15496,8 +15593,8 @@ let AXTimePropertyEditorComponent = class AXTimePropertyEditorComponent extends
15496
15593
  super.handleValueChange((_a = e.value) === null || _a === void 0 ? void 0 : _a.time);
15497
15594
  }
15498
15595
  ngAfterViewInit() {
15499
- this.initiated = true;
15500
15596
  this.registerForValidationForm(this.time);
15597
+ this.onRenderCompleted.emit();
15501
15598
  }
15502
15599
  };
15503
15600
  AXTimePropertyEditorComponent.ctorParameters = () => [