@acorex/components 4.2.29 → 4.2.32
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/property-editor.class.mjs +6 -6
- package/esm2020/lib/search-bar/search-bar.component.mjs +18 -9
- package/fesm2015/acorex-components.mjs +23 -13
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs +22 -13
- package/fesm2020/acorex-components.mjs.map +1 -1
- package/lib/property-editor/property-editor.class.d.ts +9 -0
- package/lib/search-bar/search-bar.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -10258,7 +10258,6 @@ class AXSearchBarComponent {
|
|
|
10258
10258
|
this._context = {};
|
|
10259
10259
|
}
|
|
10260
10260
|
set items(v) {
|
|
10261
|
-
debugger;
|
|
10262
10261
|
v.forEach((el) => {
|
|
10263
10262
|
if (el.value != null) {
|
|
10264
10263
|
this._filterItems.push({
|
|
@@ -10268,10 +10267,13 @@ class AXSearchBarComponent {
|
|
|
10268
10267
|
});
|
|
10269
10268
|
}
|
|
10270
10269
|
});
|
|
10271
|
-
this._items = _.chain(v)
|
|
10270
|
+
this._items = _.chain(v)
|
|
10271
|
+
.groupBy((x) => x.property.row)
|
|
10272
|
+
.map((value, key) => ({ row: key, items: value }))
|
|
10273
|
+
.value();
|
|
10272
10274
|
}
|
|
10273
10275
|
clearItem(name) {
|
|
10274
|
-
this._editors.find(e => e.property.property.name == name).clear();
|
|
10276
|
+
this._editors.find((e) => e.property.property.name == name).clear();
|
|
10275
10277
|
}
|
|
10276
10278
|
handleButtonClick() {
|
|
10277
10279
|
this.dropdown.toggle();
|
|
@@ -10284,13 +10286,21 @@ class AXSearchBarComponent {
|
|
|
10284
10286
|
this._filterItemsClone.push({
|
|
10285
10287
|
name: e.property.name,
|
|
10286
10288
|
title: e.property.title,
|
|
10287
|
-
value: e.value
|
|
10289
|
+
value: e.value,
|
|
10290
|
+
filterOptions: {
|
|
10291
|
+
filters: e.property?.filterOptions?.filters ? e.property.filterOptions.filters : [],
|
|
10292
|
+
logic: e.property?.filterOptions?.logic ? e.property.filterOptions.logic : 'and',
|
|
10293
|
+
ignoreCase: e.property?.filterOptions?.ignoreCase ? e.property.filterOptions.ignoreCase : true,
|
|
10294
|
+
joinType: e.property?.filterOptions?.joinType ? e.property.filterOptions.joinType : 'INNER',
|
|
10295
|
+
operator: e.property?.filterOptions?.operator ? e.property.filterOptions.operator : null,
|
|
10296
|
+
truncateDate: e.property?.filterOptions?.truncateDate ? e.property.filterOptions.truncateDate : true
|
|
10297
|
+
}
|
|
10288
10298
|
});
|
|
10289
10299
|
}
|
|
10290
10300
|
this.onValueChange.emit(e);
|
|
10291
10301
|
}
|
|
10292
10302
|
handleItemRemoveClick(item) {
|
|
10293
|
-
this._editors.forEach(e => {
|
|
10303
|
+
this._editors.forEach((e) => {
|
|
10294
10304
|
if (e.property.property.name == item.name) {
|
|
10295
10305
|
e.clear();
|
|
10296
10306
|
}
|
|
@@ -10303,7 +10313,7 @@ class AXSearchBarComponent {
|
|
|
10303
10313
|
this.onSearchValue.emit(this._filterItems);
|
|
10304
10314
|
}
|
|
10305
10315
|
clear() {
|
|
10306
|
-
this._editors.forEach(e => {
|
|
10316
|
+
this._editors.forEach((e) => {
|
|
10307
10317
|
e.clear();
|
|
10308
10318
|
});
|
|
10309
10319
|
this._filterItems = [];
|
|
@@ -10336,8 +10346,7 @@ class AXSearchBarComponent {
|
|
|
10336
10346
|
}
|
|
10337
10347
|
return className.toString().replace(/,/, ' ');
|
|
10338
10348
|
}
|
|
10339
|
-
ngOnInit() {
|
|
10340
|
-
}
|
|
10349
|
+
ngOnInit() { }
|
|
10341
10350
|
}
|
|
10342
10351
|
AXSearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10343
10352
|
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.value}}\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 } });
|
|
@@ -10422,7 +10431,7 @@ class AXPropertyDecorator {
|
|
|
10422
10431
|
// @dynamic
|
|
10423
10432
|
class AXPropertyDecorators {
|
|
10424
10433
|
static register(cls, property, options) {
|
|
10425
|
-
const item = AXPropertyDecorators.REGISTRY.find(c => c.cls === cls && c.property === property);
|
|
10434
|
+
const item = AXPropertyDecorators.REGISTRY.find((c) => c.cls === cls && c.property === property);
|
|
10426
10435
|
if (item) {
|
|
10427
10436
|
item.options = options;
|
|
10428
10437
|
}
|
|
@@ -10431,14 +10440,14 @@ class AXPropertyDecorators {
|
|
|
10431
10440
|
}
|
|
10432
10441
|
}
|
|
10433
10442
|
static has(cls, property) {
|
|
10434
|
-
return AXPropertyDecorators.REGISTRY.some(c => c.cls === cls && c.property === property);
|
|
10443
|
+
return AXPropertyDecorators.REGISTRY.some((c) => c.cls === cls && c.property === property);
|
|
10435
10444
|
}
|
|
10436
10445
|
static get(cls, property) {
|
|
10437
|
-
return AXPropertyDecorators.REGISTRY.find(c => c.cls === cls && c.property === property);
|
|
10446
|
+
return AXPropertyDecorators.REGISTRY.find((c) => c.cls === cls && c.property === property);
|
|
10438
10447
|
}
|
|
10439
10448
|
static isValid(property) {
|
|
10440
10449
|
if (property) {
|
|
10441
|
-
return AXPropertyDecorators.REGISTRY.some(c => c.property === property);
|
|
10450
|
+
return AXPropertyDecorators.REGISTRY.some((c) => c.property === property);
|
|
10442
10451
|
}
|
|
10443
10452
|
return false;
|
|
10444
10453
|
}
|
|
@@ -10450,7 +10459,7 @@ class AXPropertyDecorators {
|
|
|
10450
10459
|
p.push(superClass.constructor);
|
|
10451
10460
|
superClass = Object.getPrototypeOf(superClass);
|
|
10452
10461
|
}
|
|
10453
|
-
list.push(...AXPropertyDecorators.REGISTRY.filter(c => p.includes(c.cls.constructor)));
|
|
10462
|
+
list.push(...AXPropertyDecorators.REGISTRY.filter((c) => p.includes(c.cls.constructor)));
|
|
10454
10463
|
return list;
|
|
10455
10464
|
}
|
|
10456
10465
|
}
|