@acorex/components 16.18.29 → 16.18.30
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,8 +14,15 @@ export class AXTabStripComponent {
|
|
14
14
|
maxWidth;
|
15
15
|
items = [];
|
16
16
|
onTabChanged = new EventEmitter();
|
17
|
-
handleClick(i) {
|
17
|
+
handleClick(i, e) {
|
18
18
|
if (!i.disable) {
|
19
|
+
if (this.maxWidth) {
|
20
|
+
const clickedItem = e.target;
|
21
|
+
clickedItem.scrollIntoView({
|
22
|
+
behavior: 'smooth',
|
23
|
+
inline: 'center',
|
24
|
+
});
|
25
|
+
}
|
19
26
|
this.items.forEach((c) => (c.active = false));
|
20
27
|
i.active = true;
|
21
28
|
this.onTabChanged.emit({
|
@@ -26,11 +33,11 @@ export class AXTabStripComponent {
|
|
26
33
|
}
|
27
34
|
}
|
28
35
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.7", ngImport: i0, type: AXTabStripComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
29
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.7", type: AXTabStripComponent, selector: "ax-tab-strip", inputs: { maxWidth: "maxWidth", items: "items" }, outputs: { onTabChanged: "onTabChanged" }, ngImport: i0, template: "<ul\n class=\"tab-strip-container\"\n [ngClass]=\"{ 'tab-strip-custom-width': maxWidth }\"\n [style.max-width]=\"maxWidth\"\n>\n <ng-container *ngFor=\"let item of items\">\n <li\n *ngIf=\"!!item.visible || item.visible == undefined\"\n [class.active]=\"item.active\"\n [class.disabled]=\"item.disable\"\n (click)=\"handleClick(item)\"\n >\n {{ item.text }}\n </li>\n </ng-container>\n</ul>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
36
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.7", type: AXTabStripComponent, selector: "ax-tab-strip", inputs: { maxWidth: "maxWidth", items: "items" }, outputs: { onTabChanged: "onTabChanged" }, ngImport: i0, template: "<ul\n class=\"tab-strip-container\"\n [ngClass]=\"{ 'tab-strip-custom-width': maxWidth }\"\n [style.max-width]=\"maxWidth\"\n>\n <ng-container *ngFor=\"let item of items\">\n <li\n *ngIf=\"!!item.visible || item.visible == undefined\"\n [class.active]=\"item.active\"\n [class.disabled]=\"item.disable\"\n (click)=\"handleClick(item, $event)\"\n >\n {{ item.text }}\n </li>\n </ng-container>\n</ul>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
30
37
|
}
|
31
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.7", ngImport: i0, type: AXTabStripComponent, decorators: [{
|
32
39
|
type: Component,
|
33
|
-
args: [{ selector: 'ax-tab-strip', template: "<ul\n class=\"tab-strip-container\"\n [ngClass]=\"{ 'tab-strip-custom-width': maxWidth }\"\n [style.max-width]=\"maxWidth\"\n>\n <ng-container *ngFor=\"let item of items\">\n <li\n *ngIf=\"!!item.visible || item.visible == undefined\"\n [class.active]=\"item.active\"\n [class.disabled]=\"item.disable\"\n (click)=\"handleClick(item)\"\n >\n {{ item.text }}\n </li>\n </ng-container>\n</ul>\n" }]
|
40
|
+
args: [{ selector: 'ax-tab-strip', template: "<ul\n class=\"tab-strip-container\"\n [ngClass]=\"{ 'tab-strip-custom-width': maxWidth }\"\n [style.max-width]=\"maxWidth\"\n>\n <ng-container *ngFor=\"let item of items\">\n <li\n *ngIf=\"!!item.visible || item.visible == undefined\"\n [class.active]=\"item.active\"\n [class.disabled]=\"item.disable\"\n (click)=\"handleClick(item, $event)\"\n >\n {{ item.text }}\n </li>\n </ng-container>\n</ul>\n" }]
|
34
41
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { maxWidth: [{
|
35
42
|
type: Input
|
36
43
|
}], items: [{
|
@@ -38,4 +45,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.7", ngImpor
|
|
38
45
|
}], onTabChanged: [{
|
39
46
|
type: Output
|
40
47
|
}] } });
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLXN0cmlwLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9zcmMvbGliL3RhYi1zdHJpcC90YWItc3RyaXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3NyYy9saWIvdGFiLXN0cmlwL3RhYi1zdHJpcC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUVULEtBQUssRUFDTCxNQUFNLEVBQ04sWUFBWSxFQUNaLFVBQVUsR0FDWCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7OztBQWVuRCxNQUFNLE9BQU8sc0JBQXVCLFNBQVEsV0FBVztJQUNyRCxXQUFXLENBQWlCO0NBQzdCO0FBTUQsTUFBTSxPQUFPLG1CQUFtQjtJQUNWO0lBQXBCLFlBQW9CLEdBQWU7UUFBZixRQUFHLEdBQUgs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WluZXIgKm5nRm9yPVwibGV0IGl0ZW0gb2YgaXRlbXNcIj5cbiAgICA8bGlcbiAgICAgICpuZ0lmPVwiISFpdGVtLnZpc2libGUgfHwgaXRlbS52aXNpYmxlID09IHVuZGVmaW5lZFwiXG4gICAgICBbY2xhc3MuYWN0aXZlXT1cIml0ZW0uYWN0aXZlXCJcbiAgICAgIFtjbGFzcy5kaXNhYmxlZF09XCJpdGVtLmRpc2FibGVcIlxuICAgICAgKGNsaWNrKT1cImhhbmRsZUNsaWNrKGl0ZW0sICRldmVudClcIlxuICAgID5cbiAgICAgIHt7IGl0ZW0udGV4dCB9fVxuICAgIDwvbGk+XG4gIDwvbmctY29udGFpbmVyPlxuPC91bD5cbiJdfQ==
|
@@ -15627,8 +15627,15 @@ class AXTabStripComponent {
|
|
15627
15627
|
maxWidth;
|
15628
15628
|
items = [];
|
15629
15629
|
onTabChanged = new EventEmitter();
|
15630
|
-
handleClick(i) {
|
15630
|
+
handleClick(i, e) {
|
15631
15631
|
if (!i.disable) {
|
15632
|
+
if (this.maxWidth) {
|
15633
|
+
const clickedItem = e.target;
|
15634
|
+
clickedItem.scrollIntoView({
|
15635
|
+
behavior: 'smooth',
|
15636
|
+
inline: 'center',
|
15637
|
+
});
|
15638
|
+
}
|
15632
15639
|
this.items.forEach((c) => (c.active = false));
|
15633
15640
|
i.active = true;
|
15634
15641
|
this.onTabChanged.emit({
|
@@ -15639,11 +15646,11 @@ class AXTabStripComponent {
|
|
15639
15646
|
}
|
15640
15647
|
}
|
15641
15648
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.7", ngImport: i0, type: AXTabStripComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
15642
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.7", type: AXTabStripComponent, selector: "ax-tab-strip", inputs: { maxWidth: "maxWidth", items: "items" }, outputs: { onTabChanged: "onTabChanged" }, ngImport: i0, template: "<ul\n class=\"tab-strip-container\"\n [ngClass]=\"{ 'tab-strip-custom-width': maxWidth }\"\n [style.max-width]=\"maxWidth\"\n>\n <ng-container *ngFor=\"let item of items\">\n <li\n *ngIf=\"!!item.visible || item.visible == undefined\"\n [class.active]=\"item.active\"\n [class.disabled]=\"item.disable\"\n (click)=\"handleClick(item)\"\n >\n {{ item.text }}\n </li>\n </ng-container>\n</ul>\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
15649
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.7", type: AXTabStripComponent, selector: "ax-tab-strip", inputs: { maxWidth: "maxWidth", items: "items" }, outputs: { onTabChanged: "onTabChanged" }, ngImport: i0, template: "<ul\n class=\"tab-strip-container\"\n [ngClass]=\"{ 'tab-strip-custom-width': maxWidth }\"\n [style.max-width]=\"maxWidth\"\n>\n <ng-container *ngFor=\"let item of items\">\n <li\n *ngIf=\"!!item.visible || item.visible == undefined\"\n [class.active]=\"item.active\"\n [class.disabled]=\"item.disable\"\n (click)=\"handleClick(item, $event)\"\n >\n {{ item.text }}\n </li>\n </ng-container>\n</ul>\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
15643
15650
|
}
|
15644
15651
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.7", ngImport: i0, type: AXTabStripComponent, decorators: [{
|
15645
15652
|
type: Component,
|
15646
|
-
args: [{ selector: 'ax-tab-strip', template: "<ul\n class=\"tab-strip-container\"\n [ngClass]=\"{ 'tab-strip-custom-width': maxWidth }\"\n [style.max-width]=\"maxWidth\"\n>\n <ng-container *ngFor=\"let item of items\">\n <li\n *ngIf=\"!!item.visible || item.visible == undefined\"\n [class.active]=\"item.active\"\n [class.disabled]=\"item.disable\"\n (click)=\"handleClick(item)\"\n >\n {{ item.text }}\n </li>\n </ng-container>\n</ul>\n" }]
|
15653
|
+
args: [{ selector: 'ax-tab-strip', template: "<ul\n class=\"tab-strip-container\"\n [ngClass]=\"{ 'tab-strip-custom-width': maxWidth }\"\n [style.max-width]=\"maxWidth\"\n>\n <ng-container *ngFor=\"let item of items\">\n <li\n *ngIf=\"!!item.visible || item.visible == undefined\"\n [class.active]=\"item.active\"\n [class.disabled]=\"item.disable\"\n (click)=\"handleClick(item, $event)\"\n >\n {{ item.text }}\n </li>\n </ng-container>\n</ul>\n" }]
|
15647
15654
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { maxWidth: [{
|
15648
15655
|
type: Input
|
15649
15656
|
}], items: [{
|