@acorex/components 5.1.5 → 5.1.7
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/search-bar/search-bar.component.mjs +18 -27
- package/esm2020/lib/search-bar/search-bar.module.mjs +40 -5
- package/fesm2015/acorex-components.mjs +49 -24
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs +49 -24
- package/fesm2020/acorex-components.mjs.map +1 -1
- package/lib/search-bar/search-bar.component.d.ts +7 -10
- package/lib/search-bar/search-bar.module.d.ts +2 -1
- package/package.json +1 -1
|
@@ -10300,13 +10300,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
10300
10300
|
}] } });
|
|
10301
10301
|
|
|
10302
10302
|
class AXSearchBarComponent {
|
|
10303
|
-
constructor(
|
|
10304
|
-
this.ref = ref;
|
|
10303
|
+
constructor(cdr) {
|
|
10305
10304
|
this.cdr = cdr;
|
|
10306
10305
|
this.size = 'md';
|
|
10307
10306
|
this.disabled = false;
|
|
10308
10307
|
this.fitParent = false;
|
|
10309
|
-
this.
|
|
10308
|
+
this.popoverWidth = '60%';
|
|
10310
10309
|
this.rtl = AXConfig.get('layout.rtl');
|
|
10311
10310
|
this.loadOnInit = false;
|
|
10312
10311
|
this.onValueChange = new EventEmitter();
|
|
@@ -10349,7 +10348,7 @@ class AXSearchBarComponent {
|
|
|
10349
10348
|
this.cdr.detectChanges();
|
|
10350
10349
|
}
|
|
10351
10350
|
handleButtonClick() {
|
|
10352
|
-
this.
|
|
10351
|
+
this.searchPopover.open();
|
|
10353
10352
|
}
|
|
10354
10353
|
async handleValueChange(e) {
|
|
10355
10354
|
await this._handleInitVlaue(e);
|
|
@@ -10367,7 +10366,7 @@ class AXSearchBarComponent {
|
|
|
10367
10366
|
this.form.validate().then((c) => {
|
|
10368
10367
|
if (c.result) {
|
|
10369
10368
|
this._filterItems = JSON.parse(JSON.stringify(this._filterItemsClone.filter((el) => el.value != null && el.value != '')));
|
|
10370
|
-
this.
|
|
10369
|
+
this.searchPopover.close();
|
|
10371
10370
|
this.onSearchValue.emit(this._filterItems);
|
|
10372
10371
|
}
|
|
10373
10372
|
});
|
|
@@ -10378,7 +10377,7 @@ class AXSearchBarComponent {
|
|
|
10378
10377
|
});
|
|
10379
10378
|
this._filterItems = [];
|
|
10380
10379
|
this._filterItemsClone = [];
|
|
10381
|
-
this.
|
|
10380
|
+
this.searchPopover.close();
|
|
10382
10381
|
this.onSearchValue.emit(this._filterItems);
|
|
10383
10382
|
}
|
|
10384
10383
|
renderCol(e) {
|
|
@@ -10419,14 +10418,6 @@ class AXSearchBarComponent {
|
|
|
10419
10418
|
return item.textValue;
|
|
10420
10419
|
}
|
|
10421
10420
|
}
|
|
10422
|
-
ngOnInit() { }
|
|
10423
|
-
ngAfterViewInit() {
|
|
10424
|
-
setTimeout(() => {
|
|
10425
|
-
if (!this.dropdown.dropdownWidth) {
|
|
10426
|
-
this.dropdown.dropdownWidth = '600px';
|
|
10427
|
-
}
|
|
10428
|
-
});
|
|
10429
|
-
}
|
|
10430
10421
|
_handleTextValue(dataItem) {
|
|
10431
10422
|
let text = '';
|
|
10432
10423
|
if (Array.isArray(dataItem.value)) {
|
|
@@ -10510,14 +10501,14 @@ class AXSearchBarComponent {
|
|
|
10510
10501
|
}
|
|
10511
10502
|
}
|
|
10512
10503
|
}
|
|
10513
|
-
AXSearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, deps: [{ token: i0.
|
|
10514
|
-
AXSearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXSearchBarComponent, selector: "ax-search-bar", inputs: { size: "size", disabled: "disabled", fitParent: "fitParent",
|
|
10504
|
+
AXSearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10505
|
+
AXSearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXSearchBarComponent, selector: "ax-search-bar", inputs: { size: "size", disabled: "disabled", fitParent: "fitParent", popoverWidth: "popoverWidth", rtl: "rtl", loadOnInit: "loadOnInit", items: "items" }, outputs: { onValueChange: "onValueChange", onSearchValue: "onSearchValue" }, viewQueries: [{ propertyName: "searchPopover", first: true, predicate: ["searchPop"], descendants: true }, { propertyName: "form", first: true, predicate: AXValidationFormComponent, descendants: true }, { propertyName: "_editors", predicate: AXPropertyEditorRendererDirective, descendants: true }], ngImport: i0, template: "<div class=\"d-flex align-items-center\">\r\n <ax-button #searchBtnTarget end icon=\"far fa-sliders-h icon\" [selected]=\"_filterItems.length ? true:false\"\r\n [type]=\" _filterItems.length ? 'primary':'primary outline'\" [disabled]=\"disabled\" [size]=\"size\" [tabIndex]=\"-1\"\r\n (click)=\"handleButtonClick()\"> {{'common.search' | trans}} <span *ngIf=\"_filterItems.length\"\r\n class=\"search-count\">{{_filterItems.length}}</span></ax-button>\r\n</div>\r\n\r\n<ax-popover #searchPop [target]=\"searchBtnTarget\"\r\n [position]=\"{originX:'center',originY:'bottom',overlayX:'center',overlayY:'top',offsetY:50,offsetX:10}\">\r\n <div class=\"panel-box ax-dropdown-container-bordered\" [ngStyle]=\"{'width' : popoverWidth }\">\r\n <ax-validation-form #form>\r\n <ng-container *ngFor=\"let item of _items\">\r\n <div class=\"row\">\r\n <ng-container *ngFor=\"let prop of item.items\">\r\n <div *ngIf=\"prop.property.visible != false\" class=\"{{renderCol(prop.property.col)}}\">\r\n <div>\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 </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\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</ax-popover>", styles: [".panel-box{padding:1rem}.panel-box .footer-button{margin-top:1rem;display:flex;align-items:center;gap:.5rem}.search-count{background:rgba(255,255,255,.2);border-radius:50%;color:var(--ax-white-color);padding:.125rem;width:1.75rem;height:1.75rem;font-size:.875rem;display:inline-flex;align-items:center;justify-content:center;-webkit-margin-start:.5rem;margin-inline-start:.5rem}\n"], components: [{ type: AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }, { type: AXPopoverComponent, selector: "ax-popover", inputs: ["target", "position", "openMode", "closeMode", "visible"] }, { type: AXValidationFormComponent, selector: "ax-validation-form", inputs: ["validateOn"], outputs: ["onInit"] }, { type: AXLabelComponent, selector: "ax-label", inputs: ["size"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: AXPropertyEditorRendererDirective, selector: "[ax-property-editor-renderer]", inputs: ["property", "validationForm", "context", "host", "groupId"], outputs: ["onValueChange"] }], pipes: { "trans": i1$2.AXTranslatorPipe } });
|
|
10515
10506
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, decorators: [{
|
|
10516
10507
|
type: Component,
|
|
10517
|
-
args: [{ selector: 'ax-search-bar', template: "<div>\r\n <ax-
|
|
10518
|
-
}], ctorParameters: function () { return [{ type: i0.
|
|
10508
|
+
args: [{ selector: 'ax-search-bar', template: "<div class=\"d-flex align-items-center\">\r\n <ax-button #searchBtnTarget end icon=\"far fa-sliders-h icon\" [selected]=\"_filterItems.length ? true:false\"\r\n [type]=\" _filterItems.length ? 'primary':'primary outline'\" [disabled]=\"disabled\" [size]=\"size\" [tabIndex]=\"-1\"\r\n (click)=\"handleButtonClick()\"> {{'common.search' | trans}} <span *ngIf=\"_filterItems.length\"\r\n class=\"search-count\">{{_filterItems.length}}</span></ax-button>\r\n</div>\r\n\r\n<ax-popover #searchPop [target]=\"searchBtnTarget\"\r\n [position]=\"{originX:'center',originY:'bottom',overlayX:'center',overlayY:'top',offsetY:50,offsetX:10}\">\r\n <div class=\"panel-box ax-dropdown-container-bordered\" [ngStyle]=\"{'width' : popoverWidth }\">\r\n <ax-validation-form #form>\r\n <ng-container *ngFor=\"let item of _items\">\r\n <div class=\"row\">\r\n <ng-container *ngFor=\"let prop of item.items\">\r\n <div *ngIf=\"prop.property.visible != false\" class=\"{{renderCol(prop.property.col)}}\">\r\n <div>\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 </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\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</ax-popover>", styles: [".panel-box{padding:1rem}.panel-box .footer-button{margin-top:1rem;display:flex;align-items:center;gap:.5rem}.search-count{background:rgba(255,255,255,.2);border-radius:50%;color:var(--ax-white-color);padding:.125rem;width:1.75rem;height:1.75rem;font-size:.875rem;display:inline-flex;align-items:center;justify-content:center;-webkit-margin-start:.5rem;margin-inline-start:.5rem}\n"] }]
|
|
10509
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { searchPopover: [{
|
|
10519
10510
|
type: ViewChild,
|
|
10520
|
-
args: ['
|
|
10511
|
+
args: ['searchPop']
|
|
10521
10512
|
}], _editors: [{
|
|
10522
10513
|
type: ViewChildren,
|
|
10523
10514
|
args: [AXPropertyEditorRendererDirective]
|
|
@@ -10530,7 +10521,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
10530
10521
|
type: Input
|
|
10531
10522
|
}], fitParent: [{
|
|
10532
10523
|
type: Input
|
|
10533
|
-
}],
|
|
10524
|
+
}], popoverWidth: [{
|
|
10534
10525
|
type: Input
|
|
10535
10526
|
}], rtl: [{
|
|
10536
10527
|
type: Input
|
|
@@ -13564,15 +13555,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
13564
13555
|
class AXSearchBarModule {
|
|
13565
13556
|
}
|
|
13566
13557
|
AXSearchBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13567
|
-
AXSearchBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, declarations: [AXSearchBarComponent], imports: [CommonModule,
|
|
13568
|
-
|
|
13558
|
+
AXSearchBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, declarations: [AXSearchBarComponent], imports: [CommonModule,
|
|
13559
|
+
FormsModule,
|
|
13560
|
+
AXDropdownModule,
|
|
13561
|
+
AXButtonModule,
|
|
13562
|
+
AXTextBoxModule,
|
|
13563
|
+
AXProppertyEditorModule,
|
|
13564
|
+
AXFormGroupModule,
|
|
13565
|
+
AXLabelModule,
|
|
13566
|
+
AXTranslatorModule,
|
|
13567
|
+
AXValidationModule,
|
|
13568
|
+
AXPopoverModule], exports: [AXSearchBarComponent] });
|
|
13569
|
+
AXSearchBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, providers: [], imports: [[
|
|
13570
|
+
CommonModule,
|
|
13571
|
+
FormsModule,
|
|
13572
|
+
AXDropdownModule,
|
|
13573
|
+
AXButtonModule,
|
|
13574
|
+
AXTextBoxModule,
|
|
13575
|
+
AXProppertyEditorModule,
|
|
13576
|
+
AXFormGroupModule,
|
|
13577
|
+
AXLabelModule,
|
|
13578
|
+
AXTranslatorModule,
|
|
13579
|
+
AXValidationModule,
|
|
13580
|
+
AXPopoverModule
|
|
13581
|
+
]] });
|
|
13569
13582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarModule, decorators: [{
|
|
13570
13583
|
type: NgModule,
|
|
13571
13584
|
args: [{
|
|
13572
13585
|
declarations: [AXSearchBarComponent],
|
|
13573
|
-
imports: [
|
|
13586
|
+
imports: [
|
|
13587
|
+
CommonModule,
|
|
13588
|
+
FormsModule,
|
|
13589
|
+
AXDropdownModule,
|
|
13590
|
+
AXButtonModule,
|
|
13591
|
+
AXTextBoxModule,
|
|
13592
|
+
AXProppertyEditorModule,
|
|
13593
|
+
AXFormGroupModule,
|
|
13594
|
+
AXLabelModule,
|
|
13595
|
+
AXTranslatorModule,
|
|
13596
|
+
AXValidationModule,
|
|
13597
|
+
AXPopoverModule
|
|
13598
|
+
],
|
|
13574
13599
|
exports: [AXSearchBarComponent],
|
|
13575
|
-
providers: []
|
|
13600
|
+
providers: []
|
|
13576
13601
|
}]
|
|
13577
13602
|
}] });
|
|
13578
13603
|
|