@acorex/components 4.2.37 → 4.2.38
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 +41 -7
- package/fesm2015/acorex-components.mjs +61 -19
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs +54 -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 +1 -0
- 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,19 +10278,51 @@ 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: {
|
|
10325
|
+
field: e.property?.filterOptions?.field ? e.property.filterOptions.field : null,
|
|
10292
10326
|
filters: e.property?.filterOptions?.filters ? e.property.filterOptions.filters : [],
|
|
10293
10327
|
logic: e.property?.filterOptions?.logic ? e.property.filterOptions.logic : 'and',
|
|
10294
10328
|
ignoreCase: e.property?.filterOptions?.ignoreCase ? e.property.filterOptions.ignoreCase : true,
|
|
@@ -10350,10 +10384,10 @@ class AXSearchBarComponent {
|
|
|
10350
10384
|
ngOnInit() { }
|
|
10351
10385
|
}
|
|
10352
10386
|
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.
|
|
10387
|
+
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
10388
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, decorators: [{
|
|
10355
10389
|
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.
|
|
10390
|
+
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
10391
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { dropdown: [{
|
|
10358
10392
|
type: ViewChild,
|
|
10359
10393
|
args: ['dropdown', { static: true }]
|
|
@@ -10397,6 +10431,7 @@ class AXProperyEditorComponent {
|
|
|
10397
10431
|
return this._value;
|
|
10398
10432
|
}
|
|
10399
10433
|
set value(v) {
|
|
10434
|
+
console.log('value set');
|
|
10400
10435
|
if (v !== this._value) {
|
|
10401
10436
|
this._value = v;
|
|
10402
10437
|
this.valueChange.emit(v);
|
|
@@ -11775,7 +11810,7 @@ class AXSelectBoxPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
11775
11810
|
this.cdr = cdr;
|
|
11776
11811
|
this.valueField = 'id';
|
|
11777
11812
|
this.textField = 'text';
|
|
11778
|
-
this.
|
|
11813
|
+
this.mode = 'single';
|
|
11779
11814
|
this.selectionDataMode = 'value';
|
|
11780
11815
|
this.allowSearch = true;
|
|
11781
11816
|
this.allowNull = false;
|
|
@@ -11816,18 +11851,25 @@ class AXSelectBoxPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
11816
11851
|
}
|
|
11817
11852
|
}
|
|
11818
11853
|
handleValueChange(e) {
|
|
11819
|
-
super.handleValueChange(e.
|
|
11854
|
+
super.handleValueChange(e.selectedItems);
|
|
11820
11855
|
}
|
|
11821
11856
|
ngAfterViewInit() {
|
|
11857
|
+
debugger;
|
|
11858
|
+
if (typeof this.value != 'object') {
|
|
11859
|
+
this.selectBox.selectedValues = this.value;
|
|
11860
|
+
}
|
|
11861
|
+
else {
|
|
11862
|
+
this.selectBox.selectedItems = this.value;
|
|
11863
|
+
}
|
|
11822
11864
|
this.registerForValidationForm(this.selectBox);
|
|
11823
11865
|
this.onRenderCompleted.emit();
|
|
11824
11866
|
}
|
|
11825
11867
|
}
|
|
11826
11868
|
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]=\"
|
|
11869
|
+
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
11870
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorComponent, decorators: [{
|
|
11829
11871
|
type: Component,
|
|
11830
|
-
args: [{ template: "<ax-select-box [mode]=\"
|
|
11872
|
+
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
11873
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { selectBox: [{
|
|
11832
11874
|
type: ViewChild,
|
|
11833
11875
|
args: [AXSelectBoxComponent, { static: true }]
|
|
@@ -11881,7 +11923,7 @@ AXSelectionListPropertyEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVe
|
|
|
11881
11923
|
[value]="value"
|
|
11882
11924
|
[items]="items"
|
|
11883
11925
|
[mode]="mode"
|
|
11884
|
-
(
|
|
11926
|
+
(selectedItemsChange)="handleValueChange($event)"
|
|
11885
11927
|
[textField]="textField"
|
|
11886
11928
|
[valueField]="valueField"
|
|
11887
11929
|
[direction]="direction"
|
|
@@ -11901,7 +11943,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11901
11943
|
[value]="value"
|
|
11902
11944
|
[items]="items"
|
|
11903
11945
|
[mode]="mode"
|
|
11904
|
-
(
|
|
11946
|
+
(selectedItemsChange)="handleValueChange($event)"
|
|
11905
11947
|
[textField]="textField"
|
|
11906
11948
|
[valueField]="valueField"
|
|
11907
11949
|
[direction]="direction"
|