adb-shared 6.0.8 → 6.0.9
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/esm2022/lib/components/adb-buttons/help-button.component.mjs +20 -7
- package/esm2022/lib/components/adb-filter-section/filter-section.component.mjs +3 -3
- package/fesm2022/adb-shared.mjs +20 -6
- package/fesm2022/adb-shared.mjs.map +1 -1
- package/lib/components/adb-buttons/help-button.component.d.ts +4 -2
- package/package.json +1 -1
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import { Component, Input } from "@angular/core";
|
|
1
|
+
import { Component, HostListener, Input } from "@angular/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@angular/common";
|
|
4
|
-
import * as i2 from "../../directives/click-outside.directive";
|
|
5
4
|
export class AdbHelpButtonComponent {
|
|
5
|
+
onClickDoc(event) {
|
|
6
|
+
const target = event.target;
|
|
7
|
+
const parent = target.parentElement;
|
|
8
|
+
const clickedInside = this.elementRef.nativeElement.contains(parent);
|
|
9
|
+
if (!clickedInside) {
|
|
10
|
+
this.showHelp = false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
6
13
|
constructor(elementRef) {
|
|
7
14
|
this.elementRef = elementRef;
|
|
8
15
|
this.showHelp = false;
|
|
16
|
+
this.buttonType = false;
|
|
9
17
|
this.label = '';
|
|
10
18
|
}
|
|
11
19
|
ngOnInit() {
|
|
12
20
|
this.id = +Math.floor(Math.random() * Date.now());
|
|
13
21
|
}
|
|
14
|
-
|
|
22
|
+
onClose() {
|
|
15
23
|
const node = this.elementRef.nativeElement.parentNode;
|
|
16
24
|
if (node) {
|
|
17
25
|
if (this.showHelp) {
|
|
@@ -24,12 +32,17 @@ export class AdbHelpButtonComponent {
|
|
|
24
32
|
this.showHelp = !this.showHelp;
|
|
25
33
|
}
|
|
26
34
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AdbHelpButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: AdbHelpButtonComponent, selector: "adb-help-button", inputs: { label: "label" }, ngImport: i0, template: "<
|
|
35
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: AdbHelpButtonComponent, selector: "adb-help-button", inputs: { buttonType: "buttonType", label: "label" }, host: { listeners: { "document:click": "onClickDoc($event)" } }, ngImport: i0, template: "<button type=\"button\" id=\"help-button\" tabindex=\"-1\"\r\n class=\"w-auto d-flex gap-1 align-items-baseline\" [ngClass]=\"buttonType?'btn btn-outline-primary':'btn btn-invisible p-0'\"\r\n [attr.aria-controls]=\"id\" attr.aria-label=\"Help\" [attr.aria-expanded]=\"showHelp\" (click)=\"onClose()\">\r\n <span [id]=\"buttonType?'help-icon':''\" class=\"fas fa-question-circle text-primary\"></span>\r\n {{label}}\r\n</button>\r\n<div>\r\n <div *ngIf=\"showHelp\" [id]=\"id\" class=\"position-absolute start-0 w-100 adb-plate-primary text-start shadow \" style=\"z-index:4\">\r\n <div class=\"d-flex align-items-center\">\r\n <div><ng-content></ng-content></div>\r\n <div class=\"ms-auto align-self-start d-flex align-items-start\">\r\n <button type=\"button\" class=\"btn-close p-1\" data-bs-dismiss=\"modal\" aria-label=\"Close\" (click)=\"showHelp=false\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
28
36
|
}
|
|
29
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AdbHelpButtonComponent, decorators: [{
|
|
30
38
|
type: Component,
|
|
31
|
-
args: [{ selector: 'adb-help-button', template: "<
|
|
32
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
39
|
+
args: [{ selector: 'adb-help-button', template: "<button type=\"button\" id=\"help-button\" tabindex=\"-1\"\r\n class=\"w-auto d-flex gap-1 align-items-baseline\" [ngClass]=\"buttonType?'btn btn-outline-primary':'btn btn-invisible p-0'\"\r\n [attr.aria-controls]=\"id\" attr.aria-label=\"Help\" [attr.aria-expanded]=\"showHelp\" (click)=\"onClose()\">\r\n <span [id]=\"buttonType?'help-icon':''\" class=\"fas fa-question-circle text-primary\"></span>\r\n {{label}}\r\n</button>\r\n<div>\r\n <div *ngIf=\"showHelp\" [id]=\"id\" class=\"position-absolute start-0 w-100 adb-plate-primary text-start shadow \" style=\"z-index:4\">\r\n <div class=\"d-flex align-items-center\">\r\n <div><ng-content></ng-content></div>\r\n <div class=\"ms-auto align-self-start d-flex align-items-start\">\r\n <button type=\"button\" class=\"btn-close p-1\" data-bs-dismiss=\"modal\" aria-label=\"Close\" (click)=\"showHelp=false\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>" }]
|
|
40
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { buttonType: [{
|
|
41
|
+
type: Input
|
|
42
|
+
}], label: [{
|
|
33
43
|
type: Input
|
|
44
|
+
}], onClickDoc: [{
|
|
45
|
+
type: HostListener,
|
|
46
|
+
args: ['document:click', ['$event']]
|
|
34
47
|
}] } });
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscC1idXR0b24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXJ0ZGF0YS1zaGFyZWQvc3JjL2xpYi9jb21wb25lbnRzL2F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IHNob3dIZWxwID0gZmFsc2U7XHJcbiAgICBASW5wdXQoKSBidXR0b25UeXBlID0gZmFsc2U7XHJcbiAgICBASW5wdXQoKSBsYWJlbCA9ICcnO1xyXG4gICAgaWQ6IG51bWJlcjtcclxuXHJcbiAgICBASG9zdExpc3RlbmVyKCdkb2N1bWVudDpjbGljaycsIFsnJGV2ZW50J10pXHJcbiAgICBwdWJsaWMgb25DbGlja0RvYyhldmVudDogTW91c2VFdmVudCkge1xyXG4gICAgICAgIGNvbnN0IHRhcmdldCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRWxlbWVudDtcclxuICAgICAgICBjb25zdCBwYXJlbnQgPSB0YXJnZXQucGFyZW50RWxlbWVudDtcclxuICAgICAgICBjb25zdCBjbGlja2VkSW5zaWRlID0gdGhpcy5lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuY29udGFpbnMocGFyZW50KTtcclxuICAgICAgICBpZiAoIWNsaWNrZWRJbnNpZGUpIHtcclxuICAgICAgICAgICAgdGhpcy5zaG93SGVscCA9IGZhbHNlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcblxyXG4gICAgY29uc3RydWN0b3IocHJpdmF0ZSBlbGVtZW50UmVmOiBFbGVtZW50UmVmKSB7XHJcbiAgICB9XHJcblxyXG4gICAgbmdPbkluaXQoKTogdm9pZCB7XHJcbiAgICAgICAgdGhpcy5pZCA9ICsgTWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogRGF0ZS5ub3coKSlcclxuICAgIH1cclxuXHJcbiAgICBvbkNsb3NlKCk6IHZvaWQge1xyXG4gICAgICAgIGNvbnN0IG5vZGUgPSB0aGlzLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5wYXJlbnROb2RlO1xyXG4gICAgICAgIGlmIChub2RlKSB7XHJcbiAgICAgICAgICAgIGlmICh0aGlzLnNob3dIZWxwKSB7XHJcbiAgICAgICAgICAgICAgICBub2RlLmNsYXNzTGlzdC5yZW1vdmUoJ3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bGlnbi1pdGVtcy1jZW50ZXJcIj5cclxuICAgICAgICAgICAgPGRpdj48bmctY29udGVudD48L25nLWNvbnRlbnQ+PC9kaXY+XHJcbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJtcy1hdXRvIGFsaWduLXNlbGYtc3RhcnQgZC1mbGV4IGFsaWduLWl0ZW1zLXN0YXJ0XCI+XHJcbiAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBjbGFzcz1cImJ0bi1jbG9zZSBwLTFcIiBkYXRhLWJzLWRpc21pc3M9XCJtb2RhbFwiIGFyaWEtbGFiZWw9XCJDbG9zZVwiIChjbGljayk9XCJzaG93SGVscD1mYWxzZVwiPjwvYnV0dG9uPlxyXG4gICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICA8L2Rpdj5cclxuICAgIDwvZGl2PlxyXG48L2Rpdj4iXX0=
|
|
@@ -12,11 +12,11 @@ export class FilterSectionComponent {
|
|
|
12
12
|
ngOnDestroy() {
|
|
13
13
|
}
|
|
14
14
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: FilterSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: FilterSectionComponent, selector: "adb-filter-section", inputs: { titleResource: "titleResource", count: "count", expanded: "expanded" }, ngImport: i0, template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\"\r\n class=\"btn btn-invisible px-1 bg-white\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex justify-content-between align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n <div class=\"badge bg-dark\" *ngIf=\"count > 0\">{{count}}</div>\r\n </div>\r\n</button>\r\n<div class=\"
|
|
15
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: FilterSectionComponent, selector: "adb-filter-section", inputs: { titleResource: "titleResource", count: "count", expanded: "expanded" }, ngImport: i0, template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\"\r\n class=\"btn btn-invisible px-1 bg-white\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex justify-content-between align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n <div class=\"badge bg-dark\" *ngIf=\"count > 0\">{{count}}</div>\r\n </div>\r\n</button>\r\n<div class=\"px-3 pb-3 border-bottom\" [id]=\"id\" *ngIf=\"expanded\">\r\n <ng-content></ng-content>\r\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
16
16
|
}
|
|
17
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: FilterSectionComponent, decorators: [{
|
|
18
18
|
type: Component,
|
|
19
|
-
args: [{ selector: 'adb-filter-section', template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\"\r\n class=\"btn btn-invisible px-1 bg-white\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex justify-content-between align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n <div class=\"badge bg-dark\" *ngIf=\"count > 0\">{{count}}</div>\r\n </div>\r\n</button>\r\n<div class=\"
|
|
19
|
+
args: [{ selector: 'adb-filter-section', template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\"\r\n class=\"btn btn-invisible px-1 bg-white\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex justify-content-between align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n <div class=\"badge bg-dark\" *ngIf=\"count > 0\">{{count}}</div>\r\n </div>\r\n</button>\r\n<div class=\"px-3 pb-3 border-bottom\" [id]=\"id\" *ngIf=\"expanded\">\r\n <ng-content></ng-content>\r\n</div>" }]
|
|
20
20
|
}], propDecorators: { titleResource: [{
|
|
21
21
|
type: Input
|
|
22
22
|
}], count: [{
|
|
@@ -24,4 +24,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
|
24
24
|
}], expanded: [{
|
|
25
25
|
type: Input
|
|
26
26
|
}] } });
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLXNlY3Rpb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXJ0ZGF0YS1zaGFyZWQvc3JjL2xpYi9jb21wb25lbnRzL2FkYi1maWx0ZXItc2VjdGlvbi9maWx0ZXItc2VjdGlvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hcnRkYXRhLXNoYXJlZC9zcmMvbGliL2NvbXBvbmVudHMvYWRiLWZpbHRlci1zZWN0aW9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yLWJvdHRvbVwiIFtpZF09XCJpZFwiICpuZ0lmPVwiZXhwYW5kZWRcIj5cclxuICAgIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cclxuPC9kaXY+Il19
|
package/fesm2022/adb-shared.mjs
CHANGED
|
@@ -1733,15 +1733,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
|
1733
1733
|
}] });
|
|
1734
1734
|
|
|
1735
1735
|
class AdbHelpButtonComponent {
|
|
1736
|
+
onClickDoc(event) {
|
|
1737
|
+
const target = event.target;
|
|
1738
|
+
const parent = target.parentElement;
|
|
1739
|
+
const clickedInside = this.elementRef.nativeElement.contains(parent);
|
|
1740
|
+
if (!clickedInside) {
|
|
1741
|
+
this.showHelp = false;
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1736
1744
|
constructor(elementRef) {
|
|
1737
1745
|
this.elementRef = elementRef;
|
|
1738
1746
|
this.showHelp = false;
|
|
1747
|
+
this.buttonType = false;
|
|
1739
1748
|
this.label = '';
|
|
1740
1749
|
}
|
|
1741
1750
|
ngOnInit() {
|
|
1742
1751
|
this.id = +Math.floor(Math.random() * Date.now());
|
|
1743
1752
|
}
|
|
1744
|
-
|
|
1753
|
+
onClose() {
|
|
1745
1754
|
const node = this.elementRef.nativeElement.parentNode;
|
|
1746
1755
|
if (node) {
|
|
1747
1756
|
if (this.showHelp) {
|
|
@@ -1754,13 +1763,18 @@ class AdbHelpButtonComponent {
|
|
|
1754
1763
|
this.showHelp = !this.showHelp;
|
|
1755
1764
|
}
|
|
1756
1765
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AdbHelpButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1757
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: AdbHelpButtonComponent, selector: "adb-help-button", inputs: { label: "label" }, ngImport: i0, template: "<
|
|
1766
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: AdbHelpButtonComponent, selector: "adb-help-button", inputs: { buttonType: "buttonType", label: "label" }, host: { listeners: { "document:click": "onClickDoc($event)" } }, ngImport: i0, template: "<button type=\"button\" id=\"help-button\" tabindex=\"-1\"\r\n class=\"w-auto d-flex gap-1 align-items-baseline\" [ngClass]=\"buttonType?'btn btn-outline-primary':'btn btn-invisible p-0'\"\r\n [attr.aria-controls]=\"id\" attr.aria-label=\"Help\" [attr.aria-expanded]=\"showHelp\" (click)=\"onClose()\">\r\n <span [id]=\"buttonType?'help-icon':''\" class=\"fas fa-question-circle text-primary\"></span>\r\n {{label}}\r\n</button>\r\n<div>\r\n <div *ngIf=\"showHelp\" [id]=\"id\" class=\"position-absolute start-0 w-100 adb-plate-primary text-start shadow \" style=\"z-index:4\">\r\n <div class=\"d-flex align-items-center\">\r\n <div><ng-content></ng-content></div>\r\n <div class=\"ms-auto align-self-start d-flex align-items-start\">\r\n <button type=\"button\" class=\"btn-close p-1\" data-bs-dismiss=\"modal\" aria-label=\"Close\" (click)=\"showHelp=false\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1758
1767
|
}
|
|
1759
1768
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AdbHelpButtonComponent, decorators: [{
|
|
1760
1769
|
type: Component,
|
|
1761
|
-
args: [{ selector: 'adb-help-button', template: "<
|
|
1762
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
1770
|
+
args: [{ selector: 'adb-help-button', template: "<button type=\"button\" id=\"help-button\" tabindex=\"-1\"\r\n class=\"w-auto d-flex gap-1 align-items-baseline\" [ngClass]=\"buttonType?'btn btn-outline-primary':'btn btn-invisible p-0'\"\r\n [attr.aria-controls]=\"id\" attr.aria-label=\"Help\" [attr.aria-expanded]=\"showHelp\" (click)=\"onClose()\">\r\n <span [id]=\"buttonType?'help-icon':''\" class=\"fas fa-question-circle text-primary\"></span>\r\n {{label}}\r\n</button>\r\n<div>\r\n <div *ngIf=\"showHelp\" [id]=\"id\" class=\"position-absolute start-0 w-100 adb-plate-primary text-start shadow \" style=\"z-index:4\">\r\n <div class=\"d-flex align-items-center\">\r\n <div><ng-content></ng-content></div>\r\n <div class=\"ms-auto align-self-start d-flex align-items-start\">\r\n <button type=\"button\" class=\"btn-close p-1\" data-bs-dismiss=\"modal\" aria-label=\"Close\" (click)=\"showHelp=false\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>" }]
|
|
1771
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { buttonType: [{
|
|
1772
|
+
type: Input
|
|
1773
|
+
}], label: [{
|
|
1763
1774
|
type: Input
|
|
1775
|
+
}], onClickDoc: [{
|
|
1776
|
+
type: HostListener,
|
|
1777
|
+
args: ['document:click', ['$event']]
|
|
1764
1778
|
}] } });
|
|
1765
1779
|
|
|
1766
1780
|
class AdbButtonsModule {
|
|
@@ -1976,11 +1990,11 @@ class FilterSectionComponent {
|
|
|
1976
1990
|
ngOnDestroy() {
|
|
1977
1991
|
}
|
|
1978
1992
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: FilterSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1979
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: FilterSectionComponent, selector: "adb-filter-section", inputs: { titleResource: "titleResource", count: "count", expanded: "expanded" }, ngImport: i0, template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\"\r\n class=\"btn btn-invisible px-1 bg-white\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex justify-content-between align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n <div class=\"badge bg-dark\" *ngIf=\"count > 0\">{{count}}</div>\r\n </div>\r\n</button>\r\n<div class=\"
|
|
1993
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: FilterSectionComponent, selector: "adb-filter-section", inputs: { titleResource: "titleResource", count: "count", expanded: "expanded" }, ngImport: i0, template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\"\r\n class=\"btn btn-invisible px-1 bg-white\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex justify-content-between align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n <div class=\"badge bg-dark\" *ngIf=\"count > 0\">{{count}}</div>\r\n </div>\r\n</button>\r\n<div class=\"px-3 pb-3 border-bottom\" [id]=\"id\" *ngIf=\"expanded\">\r\n <ng-content></ng-content>\r\n</div>", dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
1980
1994
|
}
|
|
1981
1995
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: FilterSectionComponent, decorators: [{
|
|
1982
1996
|
type: Component,
|
|
1983
|
-
args: [{ selector: 'adb-filter-section', template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\"\r\n class=\"btn btn-invisible px-1 bg-white\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex justify-content-between align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n <div class=\"badge bg-dark\" *ngIf=\"count > 0\">{{count}}</div>\r\n </div>\r\n</button>\r\n<div class=\"
|
|
1997
|
+
args: [{ selector: 'adb-filter-section', template: "<button [attr.aria-expanded]=\"expanded\" [attr.aria-controls]=\"id\"\r\n class=\"btn btn-invisible px-1 bg-white\" (click)=\"expanded = !expanded\">\r\n <div class=\"d-flex justify-content-between align-items-center gap-1 flex-wrap \">\r\n <div class=\"d-flex align-items-center\">\r\n <i class=\"fas fa-fw\" [ngClass]=\"expanded?'fa-chevron-down':'fa-chevron-right'\"></i>\r\n {{titleResource|translate}}\r\n </div>\r\n <div class=\"badge bg-dark\" *ngIf=\"count > 0\">{{count}}</div>\r\n </div>\r\n</button>\r\n<div class=\"px-3 pb-3 border-bottom\" [id]=\"id\" *ngIf=\"expanded\">\r\n <ng-content></ng-content>\r\n</div>" }]
|
|
1984
1998
|
}], propDecorators: { titleResource: [{
|
|
1985
1999
|
type: Input
|
|
1986
2000
|
}], count: [{
|