@acorex/components 4.2.43 → 4.2.45

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.
@@ -10263,7 +10263,7 @@ class AXSearchBarComponent {
10263
10263
  this._filterItems.push({
10264
10264
  name: el.property.name,
10265
10265
  title: el.property.title,
10266
- textValue: el.value,
10266
+ textValue: this.handleTextValue(el),
10267
10267
  value: el.value,
10268
10268
  component: el
10269
10269
  });
@@ -10275,7 +10275,7 @@ class AXSearchBarComponent {
10275
10275
  .value();
10276
10276
  }
10277
10277
  clearItem(name) {
10278
- this._editors.find((e) => e.property.property.name == name).clear();
10278
+ this._editors.find((x) => x.property.property.name === name).clear();
10279
10279
  }
10280
10280
  refresh() {
10281
10281
  this._items = JSON.parse(JSON.stringify(this._items));
@@ -10283,25 +10283,25 @@ class AXSearchBarComponent {
10283
10283
  handleButtonClick() {
10284
10284
  this.dropdown.toggle();
10285
10285
  }
10286
- handleValueChange(e) {
10286
+ async handleValueChange(e) {
10287
10287
  let value = [];
10288
10288
  let text = [];
10289
10289
  if (e.property.editorOptions?.valueField && e.value != null) {
10290
10290
  if (e.property.editorOptions.returnAllData) {
10291
10291
  value = e.value;
10292
- e.value.forEach(element => {
10293
- text.push(element[e.property.editorOptions.textField]);
10294
- });
10292
+ text = await this.handleTextValue(e);
10295
10293
  }
10296
10294
  else if (e.property.editorOptions?.mode == 'multiple') {
10297
- e.value.forEach(element => {
10295
+ e.value.forEach((element) => {
10298
10296
  value.push(element[e.property.editorOptions.valueField]);
10299
10297
  text.push(element[e.property.editorOptions.textField]);
10300
10298
  });
10301
10299
  }
10302
10300
  else {
10303
- value = e.value[0][e.property.editorOptions.valueField];
10304
- text = e.value[0][e.property.editorOptions.textField];
10301
+ if (e.value.length) {
10302
+ value = e.value[0][e.property.editorOptions.valueField];
10303
+ text = e.value[0][e.property.editorOptions.textField];
10304
+ }
10305
10305
  }
10306
10306
  }
10307
10307
  else {
@@ -10311,7 +10311,7 @@ class AXSearchBarComponent {
10311
10311
  const findEl = this._filterItemsClone.find((el) => el.name == e.property.name);
10312
10312
  if (findEl) {
10313
10313
  findEl.value = value;
10314
- findEl.textValue = text.toString();
10314
+ findEl.textValue = text ? text.toString() : null;
10315
10315
  }
10316
10316
  else if (e.value != null) {
10317
10317
  this._filterItemsClone.push({
@@ -10341,9 +10341,14 @@ class AXSearchBarComponent {
10341
10341
  this._filterItems = this._filterItems.filter((el) => el.name != item.name);
10342
10342
  }
10343
10343
  search() {
10344
- this._filterItems = JSON.parse(JSON.stringify(this._filterItemsClone.filter((el) => el.value != null && el.value != '')));
10345
- this.handleButtonClick();
10346
- this.onSearchValue.emit(this._filterItems);
10344
+ this.form.validate().then((c) => {
10345
+ if (c.result) {
10346
+ this._filterItems = JSON.parse(JSON.stringify(this._filterItemsClone.filter((el) => el.value != null && el.value != '')));
10347
+ this.handleButtonClick();
10348
+ console.log(this._filterItems);
10349
+ this.onSearchValue.emit(this._filterItems);
10350
+ }
10351
+ });
10347
10352
  }
10348
10353
  clear() {
10349
10354
  this._editors.forEach((e) => {
@@ -10379,19 +10384,50 @@ class AXSearchBarComponent {
10379
10384
  }
10380
10385
  return className.toString().replace(/,/, ' ');
10381
10386
  }
10387
+ _handleShowTitleSelected(item) {
10388
+ if (item.component.property.editorClass !== 'ax/editors/check') {
10389
+ return item.title + ':';
10390
+ }
10391
+ }
10392
+ _handleShowValueSelected(item) {
10393
+ if (item.component.property.editorClass === 'ax/editors/check') {
10394
+ return item.title;
10395
+ }
10396
+ else {
10397
+ return item.textValue;
10398
+ }
10399
+ }
10382
10400
  ngOnInit() { }
10401
+ handleTextValue(dataItem) {
10402
+ if (dataItem.value.length) {
10403
+ let text = '';
10404
+ dataItem.value.forEach((element, index) => {
10405
+ text +=
10406
+ index === dataItem.value.length - 1
10407
+ ? element[dataItem.property.editorOptions.textField]
10408
+ : element[dataItem.property.editorOptions.textField] + ',';
10409
+ });
10410
+ return text;
10411
+ }
10412
+ else {
10413
+ return;
10414
+ }
10415
+ }
10383
10416
  }
10384
10417
  AXSearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
10385
- AXSearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXSearchBarComponent, selector: "ax-search-bar", inputs: { size: "size", disabled: "disabled", items: "items", rtl: "rtl" }, outputs: { onValueChange: "onValueChange", onSearchValue: "onSearchValue" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }, { propertyName: "_editors", predicate: AXPropertyEditorRendererDirective, descendants: true }], ngImport: i0, template: "<ax-drop-down [fitParent]=\"true\" [size]=\"size\" [showDropDownButton]=\"false\" icon=\"far fa-sliders-h\" #dropdown\r\n 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 <div class=\"ax chips-container\">\r\n <div class=\"chips\" *ngFor=\"let item of _filterItems\">\r\n <span class=\"chips-text\">\r\n <b>{{item.title}} :</b> {{item.textValue}}\r\n </span>\r\n <span class=\"close-icon\" (click)=\"handleItemRemoveClick(item)\">\r\n <i class=\"far fa-times close\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container panel>\r\n <div class=\"panel-box\">\r\n <div *ngFor=\"let item of _items\" class=\"row\">\r\n <div *ngFor=\"let prop of item.items\" class=\"{{renderCol(prop.property.col)}}\">\r\n <!-- <ax-form-group> -->\r\n <div *ngIf=\"prop.property.visible != false\">\r\n <ax-label>{{prop.property.title}}</ax-label>\r\n <ng-container ax-property-editor-renderer [property]=\"prop\" [context]=\"_context\"\r\n (onValueChange)=\"handleValueChange($event)\"></ng-container>\r\n </div>\r\n <!-- </ax-form-group> -->\r\n </div>\r\n </div>\r\n <div class=\"footer-button\">\r\n <ax-button (click)=\"search()\">{{'common.search' | trans}}</ax-button>\r\n <ax-button type=\"blank danger\" (click)=\"clear()\">{{'dataGrid.clearFilter' | trans}}</ax-button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button end icon=\"far fa-sliders-h icon\" type=\"light blank\" [disabled]=\"disabled\" [size]=\"size\"\r\n [tabIndex]=\"-1\" (click)=\"handleButtonClick()\">{{'common.search' | trans}}</ax-button>\r\n </ng-container>\r\n\r\n</ax-drop-down>\r\n", styles: [".ax.chips-container{height:100%}.panel-box{padding:1rem}.panel-box .footer-button{margin-top:1rem;display:flex;align-items:center;gap:.5rem}\n"], components: [{ type: AXDropdownComponent, selector: "ax-drop-down", inputs: ["rtl", "readonly", "loading"], outputs: ["dropdownToggle", "onButtonClick"] }, { type: AXLabelComponent, selector: "ax-label", inputs: ["size"] }, { type: AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }], directives: [{ type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: AXPropertyEditorRendererDirective, selector: "[ax-property-editor-renderer]", inputs: ["property", "validationForm", "context", "host", "groupId"], outputs: ["onValueChange"] }], pipes: { "trans": i1$2.AXTranslatorPipe } });
10418
+ AXSearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXSearchBarComponent, selector: "ax-search-bar", inputs: { size: "size", disabled: "disabled", items: "items", rtl: "rtl" }, outputs: { onValueChange: "onValueChange", onSearchValue: "onSearchValue" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }, { propertyName: "form", first: true, predicate: AXValidationFormComponent, descendants: true }, { propertyName: "_editors", predicate: AXPropertyEditorRendererDirective, descendants: true }], ngImport: i0, template: "<ax-drop-down [fitParent]=\"true\" [size]=\"size\" [showDropDownButton]=\"false\" icon=\"far fa-sliders-h\" #dropdown\r\n 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 <div class=\"ax chips-container\">\r\n <div class=\"chips\" *ngFor=\"let item of _filterItems\">\r\n <span class=\"chips-text\" style=\"direction:rtl;\">\r\n <b>{{_handleShowTitleSelected(item)}}</b> {{_handleShowValueSelected(item)}}\r\n </span>\r\n <span class=\"close-icon\" (click)=\"handleItemRemoveClick(item)\">\r\n <i class=\"far fa-times close\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container panel>\r\n <div class=\"panel-box\">\r\n <ax-validation-form #form>\r\n <div *ngFor=\"let item of _items\" class=\"row\">\r\n <div *ngFor=\"let prop of item.items\" class=\"{{renderCol(prop.property.col)}}\">\r\n <!-- <ax-form-group> -->\r\n <div *ngIf=\"prop.property.visible != false\">\r\n <ax-label>{{prop.property.title}}</ax-label>\r\n <ng-container ax-property-editor-renderer [validationForm]=\"form\" [property]=\"prop\"\r\n [context]=\"_context\" (onValueChange)=\"handleValueChange($event)\"></ng-container>\r\n </div>\r\n <!-- </ax-form-group> -->\r\n </div>\r\n </div>\r\n <div class=\"footer-button\">\r\n <ax-button (click)=\"search()\">{{'common.search' | trans}}</ax-button>\r\n <ax-button type=\"blank danger\" (click)=\"clear()\">{{'dataGrid.clearFilter' | trans}}</ax-button>\r\n </div>\r\n </ax-validation-form>\r\n </div>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button end icon=\"far fa-sliders-h icon\" type=\"light blank\" [disabled]=\"disabled\" [size]=\"size\"\r\n [tabIndex]=\"-1\" (click)=\"handleButtonClick()\">{{'common.search' | trans}}</ax-button>\r\n </ng-container>\r\n\r\n</ax-drop-down>", styles: [".ax.chips-container{height:100%}.panel-box{padding:1rem}.panel-box .footer-button{margin-top:1rem;display:flex;align-items:center;gap:.5rem}\n"], components: [{ type: AXDropdownComponent, selector: "ax-drop-down", inputs: ["rtl", "readonly", "loading"], outputs: ["dropdownToggle", "onButtonClick"] }, { type: AXValidationFormComponent, selector: "ax-validation-form", inputs: ["validateOn"], outputs: ["onInit"] }, { type: AXLabelComponent, selector: "ax-label", inputs: ["size"] }, { type: AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }], directives: [{ type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: AXPropertyEditorRendererDirective, selector: "[ax-property-editor-renderer]", inputs: ["property", "validationForm", "context", "host", "groupId"], outputs: ["onValueChange"] }], pipes: { "trans": i1$2.AXTranslatorPipe } });
10386
10419
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, decorators: [{
10387
10420
  type: Component,
10388
- args: [{ selector: 'ax-search-bar', template: "<ax-drop-down [fitParent]=\"true\" [size]=\"size\" [showDropDownButton]=\"false\" icon=\"far fa-sliders-h\" #dropdown\r\n 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 <div class=\"ax chips-container\">\r\n <div class=\"chips\" *ngFor=\"let item of _filterItems\">\r\n <span class=\"chips-text\">\r\n <b>{{item.title}} :</b> {{item.textValue}}\r\n </span>\r\n <span class=\"close-icon\" (click)=\"handleItemRemoveClick(item)\">\r\n <i class=\"far fa-times close\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container panel>\r\n <div class=\"panel-box\">\r\n <div *ngFor=\"let item of _items\" class=\"row\">\r\n <div *ngFor=\"let prop of item.items\" class=\"{{renderCol(prop.property.col)}}\">\r\n <!-- <ax-form-group> -->\r\n <div *ngIf=\"prop.property.visible != false\">\r\n <ax-label>{{prop.property.title}}</ax-label>\r\n <ng-container ax-property-editor-renderer [property]=\"prop\" [context]=\"_context\"\r\n (onValueChange)=\"handleValueChange($event)\"></ng-container>\r\n </div>\r\n <!-- </ax-form-group> -->\r\n </div>\r\n </div>\r\n <div class=\"footer-button\">\r\n <ax-button (click)=\"search()\">{{'common.search' | trans}}</ax-button>\r\n <ax-button type=\"blank danger\" (click)=\"clear()\">{{'dataGrid.clearFilter' | trans}}</ax-button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button end icon=\"far fa-sliders-h icon\" type=\"light blank\" [disabled]=\"disabled\" [size]=\"size\"\r\n [tabIndex]=\"-1\" (click)=\"handleButtonClick()\">{{'common.search' | trans}}</ax-button>\r\n </ng-container>\r\n\r\n</ax-drop-down>\r\n", styles: [".ax.chips-container{height:100%}.panel-box{padding:1rem}.panel-box .footer-button{margin-top:1rem;display:flex;align-items:center;gap:.5rem}\n"] }]
10421
+ args: [{ selector: 'ax-search-bar', template: "<ax-drop-down [fitParent]=\"true\" [size]=\"size\" [showDropDownButton]=\"false\" icon=\"far fa-sliders-h\" #dropdown\r\n 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 <div class=\"ax chips-container\">\r\n <div class=\"chips\" *ngFor=\"let item of _filterItems\">\r\n <span class=\"chips-text\" style=\"direction:rtl;\">\r\n <b>{{_handleShowTitleSelected(item)}}</b> {{_handleShowValueSelected(item)}}\r\n </span>\r\n <span class=\"close-icon\" (click)=\"handleItemRemoveClick(item)\">\r\n <i class=\"far fa-times close\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container panel>\r\n <div class=\"panel-box\">\r\n <ax-validation-form #form>\r\n <div *ngFor=\"let item of _items\" class=\"row\">\r\n <div *ngFor=\"let prop of item.items\" class=\"{{renderCol(prop.property.col)}}\">\r\n <!-- <ax-form-group> -->\r\n <div *ngIf=\"prop.property.visible != false\">\r\n <ax-label>{{prop.property.title}}</ax-label>\r\n <ng-container ax-property-editor-renderer [validationForm]=\"form\" [property]=\"prop\"\r\n [context]=\"_context\" (onValueChange)=\"handleValueChange($event)\"></ng-container>\r\n </div>\r\n <!-- </ax-form-group> -->\r\n </div>\r\n </div>\r\n <div class=\"footer-button\">\r\n <ax-button (click)=\"search()\">{{'common.search' | trans}}</ax-button>\r\n <ax-button type=\"blank danger\" (click)=\"clear()\">{{'dataGrid.clearFilter' | trans}}</ax-button>\r\n </div>\r\n </ax-validation-form>\r\n </div>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button end icon=\"far fa-sliders-h icon\" type=\"light blank\" [disabled]=\"disabled\" [size]=\"size\"\r\n [tabIndex]=\"-1\" (click)=\"handleButtonClick()\">{{'common.search' | trans}}</ax-button>\r\n </ng-container>\r\n\r\n</ax-drop-down>", styles: [".ax.chips-container{height:100%}.panel-box{padding:1rem}.panel-box .footer-button{margin-top:1rem;display:flex;align-items:center;gap:.5rem}\n"] }]
10389
10422
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { dropdown: [{
10390
10423
  type: ViewChild,
10391
10424
  args: ['dropdown', { static: true }]
10392
10425
  }], _editors: [{
10393
10426
  type: ViewChildren,
10394
10427
  args: [AXPropertyEditorRendererDirective]
10428
+ }], form: [{
10429
+ type: ViewChild,
10430
+ args: [AXValidationFormComponent]
10395
10431
  }], size: [{
10396
10432
  type: Input
10397
10433
  }], disabled: [{
@@ -11569,6 +11605,7 @@ class AXNumberBoxPropertyEditorComponent extends AXProperyEditorComponent {
11569
11605
  this.minValue = null;
11570
11606
  this.maxValue = null;
11571
11607
  this.clearButton = false;
11608
+ this.showCounter = true;
11572
11609
  }
11573
11610
  handleValueChange(e) {
11574
11611
  super.handleValueChange(e.value);
@@ -11580,34 +11617,36 @@ class AXNumberBoxPropertyEditorComponent extends AXProperyEditorComponent {
11580
11617
  }
11581
11618
  AXNumberBoxPropertyEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXNumberBoxPropertyEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
11582
11619
  AXNumberBoxPropertyEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXNumberBoxPropertyEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "textBox", first: true, predicate: AXNumberBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
11583
- <ax-number-box (onValueChanged)="handleValueChange($event)"
11584
- [value]="value"
11585
- [showSeparator]="showSeparator"
11586
- [decimalNumber]="decimalNumber"
11587
- [min]="minValue"
11588
- [max]="maxValue"
11589
- [allowClear]="clearButton"
11590
- >
11591
- <ax-validation [rules]="validation?.rules">
11592
- </ax-validation>
11593
- </ax-number-box>
11594
- `, isInline: true, components: [{ type: AXNumberBoxComponent, selector: "ax-number-box", inputs: ["min", "max", "showSeparator", "showCurrency", "showCounter", "scrollWeel", "showDoubleCounter", "maxLength", "intStep", "decimalNumber", "customStep"] }, { type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
11620
+ <ax-number-box
11621
+ (onValueChanged)="handleValueChange($event)"
11622
+ [value]="value"
11623
+ [showSeparator]="showSeparator"
11624
+ [decimalNumber]="decimalNumber"
11625
+ [min]="minValue"
11626
+ [max]="maxValue"
11627
+ [allowClear]="clearButton"
11628
+ [showCounter]="showCounter"
11629
+ >
11630
+ <ax-validation [rules]="validation?.rules"> </ax-validation>
11631
+ </ax-number-box>
11632
+ `, isInline: true, components: [{ type: AXNumberBoxComponent, selector: "ax-number-box", inputs: ["min", "max", "showSeparator", "showCurrency", "showCounter", "scrollWeel", "showDoubleCounter", "maxLength", "intStep", "decimalNumber", "customStep"] }, { type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
11595
11633
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXNumberBoxPropertyEditorComponent, decorators: [{
11596
11634
  type: Component,
11597
11635
  args: [{
11598
11636
  template: `
11599
- <ax-number-box (onValueChanged)="handleValueChange($event)"
11600
- [value]="value"
11601
- [showSeparator]="showSeparator"
11602
- [decimalNumber]="decimalNumber"
11603
- [min]="minValue"
11604
- [max]="maxValue"
11605
- [allowClear]="clearButton"
11606
- >
11607
- <ax-validation [rules]="validation?.rules">
11608
- </ax-validation>
11609
- </ax-number-box>
11610
- `,
11637
+ <ax-number-box
11638
+ (onValueChanged)="handleValueChange($event)"
11639
+ [value]="value"
11640
+ [showSeparator]="showSeparator"
11641
+ [decimalNumber]="decimalNumber"
11642
+ [min]="minValue"
11643
+ [max]="maxValue"
11644
+ [allowClear]="clearButton"
11645
+ [showCounter]="showCounter"
11646
+ >
11647
+ <ax-validation [rules]="validation?.rules"> </ax-validation>
11648
+ </ax-number-box>
11649
+ `
11611
11650
  }]
11612
11651
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { textBox: [{
11613
11652
  type: ViewChild,
@@ -11801,6 +11840,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
11801
11840
  }]
11802
11841
  }], ctorParameters: function () { return []; } });
11803
11842
 
11843
+ class AXSearchBarSelectBoxEditorComponent extends AXProperyEditorComponent {
11844
+ constructor(cdr) {
11845
+ super(cdr);
11846
+ this.cdr = cdr;
11847
+ this.valueField = 'id';
11848
+ this.textField = 'text';
11849
+ this.mode = 'single';
11850
+ this.selectionDataMode = 'value';
11851
+ this.allowSearch = true;
11852
+ this.allowNull = true;
11853
+ this.disabled = false;
11854
+ this.items = [];
11855
+ this.remoteOperation = false;
11856
+ this.returnAllData = false;
11857
+ this.provideData = (e) => {
11858
+ return new Promise((resolve) => {
11859
+ const func = () => {
11860
+ if (Array.isArray(this.items)) {
11861
+ resolve(this.items.slice());
11862
+ }
11863
+ else if (typeof this.items === 'function') {
11864
+ const a = Object.assign(e, { sender: this });
11865
+ resolve(this.items(a));
11866
+ }
11867
+ else {
11868
+ resolve([]);
11869
+ }
11870
+ };
11871
+ const intVal = setInterval(() => {
11872
+ if (this.initiated) {
11873
+ func();
11874
+ clearInterval(intVal);
11875
+ }
11876
+ }, 50);
11877
+ });
11878
+ };
11879
+ }
11880
+ get filter() {
11881
+ return this._filter;
11882
+ }
11883
+ set filter(v) {
11884
+ this._filter = v;
11885
+ if (this.value && this.initiated) {
11886
+ this.value = null;
11887
+ this.selectBox?.refresh();
11888
+ }
11889
+ }
11890
+ handleValueChange(e) {
11891
+ super.handleValueChange(e.selectedItems);
11892
+ }
11893
+ ngAfterViewInit() {
11894
+ this.registerForValidationForm(this.selectBox);
11895
+ this.onRenderCompleted.emit();
11896
+ }
11897
+ }
11898
+ AXSearchBarSelectBoxEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarSelectBoxEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
11899
+ AXSearchBarSelectBoxEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXSearchBarSelectBoxEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "selectBox", first: true, predicate: AXSelectBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-select-box [mode]=\"mode\" [textField]=\"textField\" [valueField]=\"valueField\" [remoteOperation]=\"remoteOperation\"\r\n [selectedItems]=\"value\" [allowSearch]=\"allowSearch\" [allowNull]=\"allowNull\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" (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>", components: [{ type: AXSelectBoxComponent, selector: "ax-select-box", inputs: ["showDropDownButton", "rowInputTemplate", "showCheckBox", "readonly", "rtl", "disabled", "placeholder", "size", "allowNull", "textAlign", "bufferSize", "remoteOperation", "dataSource", "validation", "disabledCallback", "allowSearch", "textField", "valueField", "disabledField", "mode", "items", "selectedItems", "selectedValues"], outputs: ["dropdownToggle", "itemsChange", "onBlur", "onFocus", "selectionChanged", "selectedItemsChange", "selectedValuesChange"] }, { type: AXDataSourceComponent, selector: "ax-data-source", inputs: ["provideData", "params"] }, { type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
11900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarSelectBoxEditorComponent, decorators: [{
11901
+ type: Component,
11902
+ args: [{ template: "<ax-select-box [mode]=\"mode\" [textField]=\"textField\" [valueField]=\"valueField\" [remoteOperation]=\"remoteOperation\"\r\n [selectedItems]=\"value\" [allowSearch]=\"allowSearch\" [allowNull]=\"allowNull\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" (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>" }]
11903
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { selectBox: [{
11904
+ type: ViewChild,
11905
+ args: [AXSelectBoxComponent, { static: false }]
11906
+ }] } });
11907
+
11804
11908
  class AXSelectBoxPropertyEditorComponent extends AXProperyEditorComponent {
11805
11909
  constructor(cdr) {
11806
11910
  super(cdr);
@@ -11872,16 +11976,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
11872
11976
  }] } });
11873
11977
 
11874
11978
  class AXSelectBoxPropertyEditorModule {
11875
- constructor() {
11876
- }
11979
+ constructor() { }
11877
11980
  }
11878
11981
  AXSelectBoxPropertyEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11879
- AXSelectBoxPropertyEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, declarations: [AXSelectBoxPropertyEditorComponent], imports: [CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule], exports: [AXSelectBoxPropertyEditorComponent] });
11982
+ AXSelectBoxPropertyEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, declarations: [AXSelectBoxPropertyEditorComponent, AXSearchBarSelectBoxEditorComponent], imports: [CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule], exports: [AXSelectBoxPropertyEditorComponent] });
11880
11983
  AXSelectBoxPropertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, providers: [], imports: [[CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule]] });
11881
11984
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, decorators: [{
11882
11985
  type: NgModule,
11883
11986
  args: [{
11884
- declarations: [AXSelectBoxPropertyEditorComponent],
11987
+ declarations: [AXSelectBoxPropertyEditorComponent, AXSearchBarSelectBoxEditorComponent],
11885
11988
  imports: [CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule],
11886
11989
  exports: [AXSelectBoxPropertyEditorComponent],
11887
11990
  providers: []
@@ -11901,6 +12004,7 @@ class AXSelectionListPropertyEditorComponent extends AXProperyEditorComponent {
11901
12004
  this.direction = 'horizontal';
11902
12005
  this.textField = null;
11903
12006
  this.valueField = null;
12007
+ this.selectedItems = [];
11904
12008
  }
11905
12009
  handleValueChange(e) {
11906
12010
  super.handleValueChange(e);
@@ -11912,42 +12016,38 @@ class AXSelectionListPropertyEditorComponent extends AXProperyEditorComponent {
11912
12016
  }
11913
12017
  AXSelectionListPropertyEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectionListPropertyEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
11914
12018
  AXSelectionListPropertyEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXSelectionListPropertyEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "selectionList", first: true, predicate: AXSelectionListComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
11915
- <ax-selection-list
11916
- [disabled]="disabled"
11917
- [size]="size"
11918
- [readonly]="readonly"
11919
- [value]="value"
11920
- [items]="items"
11921
- [mode]="mode"
11922
- (selectedItemsChange)="handleValueChange($event)"
11923
- [textField]="textField"
11924
- [valueField]="valueField"
11925
- [direction]="direction"
12019
+ <ax-selection-list
12020
+ [disabled]="disabled"
12021
+ [size]="size"
12022
+ [readonly]="readonly"
12023
+ [value]="value"
12024
+ [items]="items"
12025
+ [mode]="mode"
12026
+ (selectedItemsChange)="handleValueChange($event)"
12027
+ [direction]="direction"
12028
+ [(selectedItems)]="selectedItems"
11926
12029
  >
11927
- <ax-validation [rules]="validation?.rules">
11928
- </ax-validation>
12030
+ <ax-validation [rules]="validation?.rules"> </ax-validation>
11929
12031
  </ax-selection-list>
11930
- `, isInline: true, components: [{ type: AXSelectionListComponent, selector: "ax-selection-list", inputs: ["readonly", "value", "disabled", "size", "direction", "items", "mode", "textField", "valueField", "selectedItems", "selectedValues"], outputs: ["selectedItemsChange", "selectedValuesChange"] }, { type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
12032
+ `, isInline: true, components: [{ type: AXSelectionListComponent, selector: "ax-selection-list", inputs: ["readonly", "value", "disabled", "size", "direction", "items", "mode", "textField", "valueField", "selectedItems", "selectedValues"], outputs: ["selectedItemsChange", "selectedValuesChange"] }, { type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
11931
12033
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectionListPropertyEditorComponent, decorators: [{
11932
12034
  type: Component,
11933
12035
  args: [{
11934
12036
  template: `
11935
- <ax-selection-list
11936
- [disabled]="disabled"
11937
- [size]="size"
11938
- [readonly]="readonly"
11939
- [value]="value"
11940
- [items]="items"
11941
- [mode]="mode"
11942
- (selectedItemsChange)="handleValueChange($event)"
11943
- [textField]="textField"
11944
- [valueField]="valueField"
11945
- [direction]="direction"
12037
+ <ax-selection-list
12038
+ [disabled]="disabled"
12039
+ [size]="size"
12040
+ [readonly]="readonly"
12041
+ [value]="value"
12042
+ [items]="items"
12043
+ [mode]="mode"
12044
+ (selectedItemsChange)="handleValueChange($event)"
12045
+ [direction]="direction"
12046
+ [(selectedItems)]="selectedItems"
11946
12047
  >
11947
- <ax-validation [rules]="validation?.rules">
11948
- </ax-validation>
12048
+ <ax-validation [rules]="validation?.rules"> </ax-validation>
11949
12049
  </ax-selection-list>
11950
- `,
12050
+ `
11951
12051
  }]
11952
12052
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { selectionList: [{
11953
12053
  type: ViewChild,
@@ -12078,6 +12178,8 @@ class AXTextPropertyEditorComponent extends AXProperyEditorComponent {
12078
12178
  super(cdr);
12079
12179
  this.cdr = cdr;
12080
12180
  this.clearButton = false;
12181
+ this.maskGuid = false;
12182
+ this.showMask = true;
12081
12183
  }
12082
12184
  handleValueChange(e) {
12083
12185
  super.handleValueChange(e.value);
@@ -12088,10 +12190,10 @@ class AXTextPropertyEditorComponent extends AXProperyEditorComponent {
12088
12190
  }
12089
12191
  }
12090
12192
  AXTextPropertyEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTextPropertyEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
12091
- AXTextPropertyEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXTextPropertyEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "textBox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-text-box (onValueChanged)=\"handleValueChange($event)\" [value]=\"value\" [readonly]=\"readonly\" [allowClear]=\"clearButton\">\r\n <ax-validation [rules]=\"validation?.rules\">\r\n </ax-validation>\r\n</ax-text-box>", components: [{ type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "type", "showMask", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }, { type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
12193
+ AXTextPropertyEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXTextPropertyEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "textBox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-text-box (onValueChanged)=\"handleValueChange($event)\" [value]=\"value\" [readonly]=\"readonly\"\r\n [allowClear]=\"clearButton\" [mask]=\"mask\" [maskGuid]=\"maskGuid\" [showMask]=\"showMask\">\r\n <ax-validation [rules]=\"validation?.rules\">\r\n </ax-validation>\r\n</ax-text-box>", components: [{ type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "type", "showMask", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }, { type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
12092
12194
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTextPropertyEditorComponent, decorators: [{
12093
12195
  type: Component,
12094
- args: [{ template: "<ax-text-box (onValueChanged)=\"handleValueChange($event)\" [value]=\"value\" [readonly]=\"readonly\" [allowClear]=\"clearButton\">\r\n <ax-validation [rules]=\"validation?.rules\">\r\n </ax-validation>\r\n</ax-text-box>" }]
12196
+ args: [{ template: "<ax-text-box (onValueChanged)=\"handleValueChange($event)\" [value]=\"value\" [readonly]=\"readonly\"\r\n [allowClear]=\"clearButton\" [mask]=\"mask\" [maskGuid]=\"maskGuid\" [showMask]=\"showMask\">\r\n <ax-validation [rules]=\"validation?.rules\">\r\n </ax-validation>\r\n</ax-text-box>" }]
12095
12197
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { textBox: [{
12096
12198
  type: ViewChild,
12097
12199
  args: [AXTextBoxComponent]
@@ -13255,6 +13357,10 @@ AXProppertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
13255
13357
  component: AXSelectBoxPropertyEditorComponent,
13256
13358
  path: 'ax/editors/select'
13257
13359
  },
13360
+ {
13361
+ component: AXSearchBarSelectBoxEditorComponent,
13362
+ path: 'ax/editors/selectBox'
13363
+ },
13258
13364
  {
13259
13365
  component: AXNumberBoxPropertyEditorComponent,
13260
13366
  path: 'ax/editors/number'
@@ -13278,14 +13384,15 @@ AXProppertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
13278
13384
  {
13279
13385
  component: ColumnPropertyEditorComponent,
13280
13386
  path: 'ax/editors/column'
13281
- }, {
13387
+ },
13388
+ {
13282
13389
  component: AXDatePropertyEditorComponent,
13283
13390
  path: 'ax/editors/date'
13284
13391
  },
13285
13392
  {
13286
13393
  component: AXTimePropertyEditorComponent,
13287
13394
  path: 'ax/editors/time'
13288
- },
13395
+ }
13289
13396
  ])
13290
13397
  ]] });
13291
13398
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXProppertyEditorModule, decorators: [{
@@ -13314,6 +13421,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
13314
13421
  component: AXSelectBoxPropertyEditorComponent,
13315
13422
  path: 'ax/editors/select'
13316
13423
  },
13424
+ {
13425
+ component: AXSearchBarSelectBoxEditorComponent,
13426
+ path: 'ax/editors/selectBox'
13427
+ },
13317
13428
  {
13318
13429
  component: AXNumberBoxPropertyEditorComponent,
13319
13430
  path: 'ax/editors/number'
@@ -13337,32 +13448,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
13337
13448
  {
13338
13449
  component: ColumnPropertyEditorComponent,
13339
13450
  path: 'ax/editors/column'
13340
- }, {
13451
+ },
13452
+ {
13341
13453
  component: AXDatePropertyEditorComponent,
13342
13454
  path: 'ax/editors/date'
13343
13455
  },
13344
13456
  {
13345
13457
  component: AXTimePropertyEditorComponent,
13346
13458
  path: 'ax/editors/time'
13347
- },
13459
+ }
13348
13460
  ])
13349
13461
  ],
13350
13462
  exports: [AXPropertyEditorRendererDirective],
13351
13463
  declarations: [AXPropertyEditorRendererDirective],
13352
- providers: [],
13464
+ providers: []
13353
13465
  }]
13354
13466
  }] });
13355
13467
 
13356
13468
  class AXSearchBarModule {
13357
13469
  }
13358
13470
  AXSearchBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13359
- AXSearchBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, declarations: [AXSearchBarComponent], imports: [CommonModule, FormsModule, AXDropdownModule, AXButtonModule, AXTextBoxModule, AXProppertyEditorModule, AXFormGroupModule, AXLabelModule, AXTranslatorModule], exports: [AXSearchBarComponent] });
13360
- AXSearchBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, providers: [], imports: [[CommonModule, FormsModule, AXDropdownModule, AXButtonModule, AXTextBoxModule, AXProppertyEditorModule, AXFormGroupModule, AXLabelModule, AXTranslatorModule]] });
13471
+ AXSearchBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, declarations: [AXSearchBarComponent], imports: [CommonModule, FormsModule, AXDropdownModule, AXButtonModule, AXTextBoxModule, AXProppertyEditorModule, AXFormGroupModule, AXLabelModule, AXTranslatorModule, AXValidationModule], exports: [AXSearchBarComponent] });
13472
+ AXSearchBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, providers: [], imports: [[CommonModule, FormsModule, AXDropdownModule, AXButtonModule, AXTextBoxModule, AXProppertyEditorModule, AXFormGroupModule, AXLabelModule, AXTranslatorModule, AXValidationModule]] });
13361
13473
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, decorators: [{
13362
13474
  type: NgModule,
13363
13475
  args: [{
13364
13476
  declarations: [AXSearchBarComponent],
13365
- imports: [CommonModule, FormsModule, AXDropdownModule, AXButtonModule, AXTextBoxModule, AXProppertyEditorModule, AXFormGroupModule, AXLabelModule, AXTranslatorModule],
13477
+ imports: [CommonModule, FormsModule, AXDropdownModule, AXButtonModule, AXTextBoxModule, AXProppertyEditorModule, AXFormGroupModule, AXLabelModule, AXTranslatorModule, AXValidationModule],
13366
13478
  exports: [AXSearchBarComponent],
13367
13479
  providers: [],
13368
13480
  }]