@acorex/components 4.2.37 → 4.2.39
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.
- package/esm2020/lib/property-editor/editors/selectbox-editor/selectbox.editor.mjs +12 -5
- package/esm2020/lib/property-editor/editors/selection-editor/selection-editor.mjs +3 -3
- package/esm2020/lib/property-editor/property-editor.class.mjs +2 -1
- package/esm2020/lib/search-bar/search-bar.component.mjs +40 -7
- package/fesm2015/acorex-components.mjs +60 -19
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs +53 -12
- package/fesm2020/acorex-components.mjs.map +1 -1
- package/lib/property-editor/editors/selectbox-editor/selectbox.editor.d.ts +1 -1
- package/lib/property-editor/property-editor.class.d.ts +7 -1
- package/lib/search-bar/search-bar.component.d.ts +3 -0
- package/package.json +1 -1
|
@@ -10264,7 +10264,9 @@ class AXSearchBarComponent {
|
|
|
10264
10264
|
this._filterItems.push({
|
|
10265
10265
|
name: el.property.name,
|
|
10266
10266
|
title: el.property.title,
|
|
10267
|
-
|
|
10267
|
+
textValue: el.value,
|
|
10268
|
+
value: el.value,
|
|
10269
|
+
component: el
|
|
10268
10270
|
});
|
|
10269
10271
|
}
|
|
10270
10272
|
});
|
|
@@ -10276,18 +10278,49 @@ class AXSearchBarComponent {
|
|
|
10276
10278
|
clearItem(name) {
|
|
10277
10279
|
this._editors.find((e) => e.property.property.name == name).clear();
|
|
10278
10280
|
}
|
|
10281
|
+
refresh() {
|
|
10282
|
+
this._items = JSON.parse(JSON.stringify(this._items));
|
|
10283
|
+
}
|
|
10279
10284
|
handleButtonClick() {
|
|
10280
10285
|
this.dropdown.toggle();
|
|
10281
10286
|
}
|
|
10282
10287
|
handleValueChange(e) {
|
|
10283
|
-
|
|
10284
|
-
|
|
10288
|
+
let value = [];
|
|
10289
|
+
let text = [];
|
|
10290
|
+
if (e.property.editorOptions?.valueField && e.value != null) {
|
|
10291
|
+
if (e.property.editorOptions.returnAllData) {
|
|
10292
|
+
value = e.value;
|
|
10293
|
+
e.value.forEach(element => {
|
|
10294
|
+
text.push(element[e.property.editorOptions.textField]);
|
|
10295
|
+
});
|
|
10296
|
+
}
|
|
10297
|
+
else if (e.property.editorOptions?.mode == 'multiple') {
|
|
10298
|
+
e.value.forEach(element => {
|
|
10299
|
+
value.push(element[e.property.editorOptions.valueField]);
|
|
10300
|
+
text.push(element[e.property.editorOptions.textField]);
|
|
10301
|
+
});
|
|
10302
|
+
}
|
|
10303
|
+
else {
|
|
10304
|
+
value = e.value[0][e.property.editorOptions.valueField];
|
|
10305
|
+
text = e.value[0][e.property.editorOptions.textField];
|
|
10306
|
+
}
|
|
10307
|
+
}
|
|
10308
|
+
else {
|
|
10309
|
+
value = e.value;
|
|
10310
|
+
text = e.value;
|
|
10311
|
+
}
|
|
10312
|
+
const findEl = this._filterItemsClone.find((el) => el.name == e.property.name);
|
|
10313
|
+
if (findEl) {
|
|
10314
|
+
findEl.value = value;
|
|
10315
|
+
findEl.textValue = text.toString();
|
|
10285
10316
|
}
|
|
10286
10317
|
else if (e.value != null) {
|
|
10287
10318
|
this._filterItemsClone.push({
|
|
10288
10319
|
name: e.property.name,
|
|
10289
10320
|
title: e.property.title,
|
|
10290
|
-
value
|
|
10321
|
+
value,
|
|
10322
|
+
textValue: text.toString(),
|
|
10323
|
+
component: e,
|
|
10291
10324
|
filterOptions: {
|
|
10292
10325
|
filters: e.property?.filterOptions?.filters ? e.property.filterOptions.filters : [],
|
|
10293
10326
|
logic: e.property?.filterOptions?.logic ? e.property.filterOptions.logic : 'and',
|
|
@@ -10350,10 +10383,10 @@ class AXSearchBarComponent {
|
|
|
10350
10383
|
ngOnInit() { }
|
|
10351
10384
|
}
|
|
10352
10385
|
AXSearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10353
|
-
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.
|
|
10386
|
+
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 } });
|
|
10354
10387
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, decorators: [{
|
|
10355
10388
|
type: Component,
|
|
10356
|
-
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.
|
|
10389
|
+
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"] }]
|
|
10357
10390
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { dropdown: [{
|
|
10358
10391
|
type: ViewChild,
|
|
10359
10392
|
args: ['dropdown', { static: true }]
|
|
@@ -10397,6 +10430,7 @@ class AXProperyEditorComponent {
|
|
|
10397
10430
|
return this._value;
|
|
10398
10431
|
}
|
|
10399
10432
|
set value(v) {
|
|
10433
|
+
console.log('value set');
|
|
10400
10434
|
if (v !== this._value) {
|
|
10401
10435
|
this._value = v;
|
|
10402
10436
|
this.valueChange.emit(v);
|
|
@@ -11775,7 +11809,7 @@ class AXSelectBoxPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
11775
11809
|
this.cdr = cdr;
|
|
11776
11810
|
this.valueField = 'id';
|
|
11777
11811
|
this.textField = 'text';
|
|
11778
|
-
this.
|
|
11812
|
+
this.mode = 'single';
|
|
11779
11813
|
this.selectionDataMode = 'value';
|
|
11780
11814
|
this.allowSearch = true;
|
|
11781
11815
|
this.allowNull = false;
|
|
@@ -11816,18 +11850,25 @@ class AXSelectBoxPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
11816
11850
|
}
|
|
11817
11851
|
}
|
|
11818
11852
|
handleValueChange(e) {
|
|
11819
|
-
super.handleValueChange(e.
|
|
11853
|
+
super.handleValueChange(e.selectedItems);
|
|
11820
11854
|
}
|
|
11821
11855
|
ngAfterViewInit() {
|
|
11856
|
+
debugger;
|
|
11857
|
+
if (typeof this.value != 'object') {
|
|
11858
|
+
this.selectBox.selectedValues = this.value;
|
|
11859
|
+
}
|
|
11860
|
+
else {
|
|
11861
|
+
this.selectBox.selectedItems = this.value;
|
|
11862
|
+
}
|
|
11822
11863
|
this.registerForValidationForm(this.selectBox);
|
|
11823
11864
|
this.onRenderCompleted.emit();
|
|
11824
11865
|
}
|
|
11825
11866
|
}
|
|
11826
11867
|
AXSelectBoxPropertyEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11827
|
-
AXSelectBoxPropertyEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXSelectBoxPropertyEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "selectBox", first: true, predicate: AXSelectBoxComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-select-box [mode]=\"
|
|
11868
|
+
AXSelectBoxPropertyEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXSelectBoxPropertyEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "selectBox", first: true, predicate: AXSelectBoxComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-select-box [mode]=\"mode\"\r\n [textField]=\"textField\" \r\n [valueField]=\"valueField\" \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>", 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"] }] });
|
|
11828
11869
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorComponent, decorators: [{
|
|
11829
11870
|
type: Component,
|
|
11830
|
-
args: [{ template: "<ax-select-box [mode]=\"
|
|
11871
|
+
args: [{ template: "<ax-select-box [mode]=\"mode\"\r\n [textField]=\"textField\" \r\n [valueField]=\"valueField\" \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>" }]
|
|
11831
11872
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { selectBox: [{
|
|
11832
11873
|
type: ViewChild,
|
|
11833
11874
|
args: [AXSelectBoxComponent, { static: true }]
|
|
@@ -11881,7 +11922,7 @@ AXSelectionListPropertyEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVe
|
|
|
11881
11922
|
[value]="value"
|
|
11882
11923
|
[items]="items"
|
|
11883
11924
|
[mode]="mode"
|
|
11884
|
-
(
|
|
11925
|
+
(selectedItemsChange)="handleValueChange($event)"
|
|
11885
11926
|
[textField]="textField"
|
|
11886
11927
|
[valueField]="valueField"
|
|
11887
11928
|
[direction]="direction"
|
|
@@ -11901,7 +11942,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11901
11942
|
[value]="value"
|
|
11902
11943
|
[items]="items"
|
|
11903
11944
|
[mode]="mode"
|
|
11904
|
-
(
|
|
11945
|
+
(selectedItemsChange)="handleValueChange($event)"
|
|
11905
11946
|
[textField]="textField"
|
|
11906
11947
|
[valueField]="valueField"
|
|
11907
11948
|
[direction]="direction"
|