@acorex/components 19.4.0-next.0 → 19.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,49 +1,135 @@
1
1
  import { MXBaseComponent } from '@acorex/components/common';
2
- import * as i0 from '@angular/core';
3
- import { input, model, output, Component, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, NgModule } from '@angular/core';
4
2
  import * as i1 from '@angular/common';
5
- import { CommonModule } from '@angular/common';
3
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable, inject, PLATFORM_ID, output, model, input, viewChild, Component, ChangeDetectionStrategy, ViewEncapsulation, contentChildren, signal, effect, HostBinding, NgModule } from '@angular/core';
6
+ import { Subject } from 'rxjs';
6
7
  import * as i2 from '@angular/router';
7
8
  import { RouterLink, RouterLinkActive } from '@angular/router';
8
9
 
10
+ class AXRailNavigationService {
11
+ constructor() {
12
+ this.activeItem = new Subject();
13
+ this.activeItem$ = this.activeItem.asObservable();
14
+ }
15
+ setActive(item) {
16
+ this.activeItem.next(item);
17
+ }
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXRailNavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
19
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXRailNavigationService, providedIn: 'root' }); }
20
+ }
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXRailNavigationService, decorators: [{
22
+ type: Injectable,
23
+ args: [{ providedIn: 'root' }]
24
+ }] });
25
+
9
26
  class AXRailNavigationItemComponent extends MXBaseComponent {
10
27
  constructor() {
11
28
  super(...arguments);
12
- this.href = input();
29
+ this.railNavigationService = inject(AXRailNavigationService);
30
+ this.platformId = inject(PLATFORM_ID);
31
+ this.onClick = output();
13
32
  this.isLoading = model(false);
14
33
  this.disabled = model(false);
15
34
  this.active = model(false);
16
- this.onClick = output();
35
+ this.href = input();
17
36
  this.routerLink = input();
18
37
  this.routerLinkActive = input('ax-state-active');
19
- this.routerLinkActiveOptions = input({ exact: false });
20
38
  this.target = input('_self');
39
+ this.routerLinkActiveOptions = input({ exact: false });
40
+ this.itemContainer = viewChild('itemContainer');
41
+ this.observer = null;
42
+ }
43
+ ngAfterViewInit() {
44
+ this.checkActive(this.itemContainer().nativeElement);
45
+ if (isPlatformBrowser(this.platformId)) {
46
+ this.observer = new MutationObserver((mutations) => {
47
+ mutations.forEach((mutation) => {
48
+ if (mutation.attributeName === 'class') {
49
+ this.checkActive(mutation.target);
50
+ }
51
+ });
52
+ });
53
+ this.observer.observe(this.itemContainer().nativeElement, {
54
+ attributes: true,
55
+ childList: false,
56
+ characterData: false,
57
+ });
58
+ }
59
+ }
60
+ ngOnDestroy() {
61
+ if (isPlatformBrowser(this.platformId)) {
62
+ this.observer.disconnect();
63
+ this.observer = null;
64
+ }
21
65
  }
22
66
  handleClickEvent(e) {
23
- if (this.disabled || this.isLoading())
24
- return;
25
- const event = {
67
+ this.onClick.emit({
26
68
  component: this,
27
69
  htmlElement: this.getHostElement(),
28
70
  nativeEvent: e,
29
- handled: false,
71
+ });
72
+ }
73
+ getStats() {
74
+ return {
75
+ height: this.getHostElement().clientHeight,
76
+ top: this.getHostElement().offsetTop,
30
77
  };
31
- this.onClick.emit(event);
32
- e.stopPropagation();
78
+ }
79
+ checkActive(item) {
80
+ if (item.classList.contains('ax-state-active')) {
81
+ this.railNavigationService.setActive(this);
82
+ }
33
83
  }
34
84
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXRailNavigationItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
35
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXRailNavigationItemComponent, isStandalone: false, selector: "ax-rail-navigation-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActive: { classPropertyName: "routerLinkActive", publicName: "routerLinkActive", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isLoading: "isLoadingChange", disabled: "disabledChange", active: "activeChange", onClick: "onClick" }, usesInheritance: true, ngImport: i0, template: "@if (routerLink()) {\n <a\n [target]=\"target()\"\n [routerLink]=\"routerLink()\"\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n [routerLinkActive]=\"routerLinkActive()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else if (href()) {\n <a\n [href]=\"href()\"\n [target]=\"target()\"\n class=\"ax-rail-navigation-item\"\n [class.ax-state-active]=\"active()\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else {\n <div\n class=\"ax-rail-navigation-item\"\n [class.ax-state-active]=\"active()\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </div>\n}\n\n<ng-template #railNavigationItemContent>\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-icon\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n <ng-content select=\"ng-container,ng-content\"></ng-content>\n <ng-content select=\"ax-suffix\"></ng-content>\n</ng-template>\n", styles: ["ax-rail-navigation-item{width:100%;cursor:pointer;transition:color .3s ease;color:rgba(var(--ax-color-neutral-400))}ax-rail-navigation-item:hover{color:rgba(var(--ax-color-text-default))}ax-rail-navigation-item .ax-rail-navigation-item{gap:.75rem;display:flex;align-items:center;padding-block:1rem;flex-direction:column;justify-content:center}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
85
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXRailNavigationItemComponent, isStandalone: false, selector: "ax-rail-navigation-item", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActive: { classPropertyName: "routerLinkActive", publicName: "routerLinkActive", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", isLoading: "isLoadingChange", disabled: "disabledChange", active: "activeChange" }, viewQueries: [{ propertyName: "itemContainer", first: true, predicate: ["itemContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (routerLink()) {\n <a\n #itemContainer\n [target]=\"target()\"\n [routerLink]=\"routerLink()\"\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n [routerLinkActive]=\"routerLinkActive()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else if (href()) {\n <a\n #itemContainer\n [href]=\"href()\"\n [target]=\"target()\"\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-active]=\"active()\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else {\n <div\n #itemContainer\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-active]=\"active()\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </div>\n}\n\n<ng-template #railNavigationItemContent>\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-icon\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n <ng-content select=\"ng-container,ng-content\"></ng-content>\n <ng-content select=\"ax-suffix\"></ng-content>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
36
86
  }
37
87
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXRailNavigationItemComponent, decorators: [{
38
88
  type: Component,
39
- args: [{ selector: 'ax-rail-navigation-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "@if (routerLink()) {\n <a\n [target]=\"target()\"\n [routerLink]=\"routerLink()\"\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n [routerLinkActive]=\"routerLinkActive()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else if (href()) {\n <a\n [href]=\"href()\"\n [target]=\"target()\"\n class=\"ax-rail-navigation-item\"\n [class.ax-state-active]=\"active()\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else {\n <div\n class=\"ax-rail-navigation-item\"\n [class.ax-state-active]=\"active()\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </div>\n}\n\n<ng-template #railNavigationItemContent>\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-icon\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n <ng-content select=\"ng-container,ng-content\"></ng-content>\n <ng-content select=\"ax-suffix\"></ng-content>\n</ng-template>\n", styles: ["ax-rail-navigation-item{width:100%;cursor:pointer;transition:color .3s ease;color:rgba(var(--ax-color-neutral-400))}ax-rail-navigation-item:hover{color:rgba(var(--ax-color-text-default))}ax-rail-navigation-item .ax-rail-navigation-item{gap:.75rem;display:flex;align-items:center;padding-block:1rem;flex-direction:column;justify-content:center}\n"] }]
89
+ args: [{ selector: 'ax-rail-navigation-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "@if (routerLink()) {\n <a\n #itemContainer\n [target]=\"target()\"\n [routerLink]=\"routerLink()\"\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n [routerLinkActive]=\"routerLinkActive()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else if (href()) {\n <a\n #itemContainer\n [href]=\"href()\"\n [target]=\"target()\"\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-active]=\"active()\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else {\n <div\n #itemContainer\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-active]=\"active()\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </div>\n}\n\n<ng-template #railNavigationItemContent>\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-icon\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n <ng-content select=\"ng-container,ng-content\"></ng-content>\n <ng-content select=\"ax-suffix\"></ng-content>\n</ng-template>\n" }]
40
90
  }] });
41
91
 
42
92
  class AXRailNavigationComponent extends MXBaseComponent {
93
+ #lookLocationChange;
43
94
  constructor() {
44
- super(...arguments);
95
+ super();
96
+ this.railNavigationService = inject(AXRailNavigationService);
97
+ this.indicator = viewChild('indicator');
98
+ this.railNavItems = contentChildren(AXRailNavigationItemComponent);
45
99
  this.location = input('start');
46
100
  this.look = input('with-line-color');
101
+ this.activeTab = signal(null);
102
+ this.#lookLocationChange = effect(() => {
103
+ if (this.location()) {
104
+ if (this.look() === 'with-line-color' || this.look() === 'with-line') {
105
+ setTimeout(() => {
106
+ this.setIndicatorPosition(this.activeTab());
107
+ });
108
+ }
109
+ }
110
+ });
111
+ this.railNavigationService.activeItem$.subscribe((item) => {
112
+ this.activeTab.set(item);
113
+ if (this.look() === 'with-line-color' || this.look() === 'with-line') {
114
+ this.setIndicatorPosition(item);
115
+ }
116
+ });
117
+ }
118
+ setIndicatorPosition(tabItem) {
119
+ const indicatorStyle = this.indicator().nativeElement.style;
120
+ const itemStats = tabItem.getStats();
121
+ indicatorStyle.width = ` var(--ax-rail-indicator-size)`;
122
+ indicatorStyle.height = `${itemStats.height}px`;
123
+ indicatorStyle.top = `${itemStats.top}px`;
124
+ indicatorStyle.bottom = `unset`;
125
+ if (this.location() === 'start') {
126
+ indicatorStyle.insetInlineStart = `0px`;
127
+ indicatorStyle.insetInlineEnd = `unset`;
128
+ }
129
+ if (this.location() === 'end') {
130
+ indicatorStyle.insetInlineStart = `unset`;
131
+ indicatorStyle.insetInlineEnd = `0px`;
132
+ }
47
133
  }
48
134
  get __hostClass() {
49
135
  const cssClasses = [];
@@ -51,13 +137,13 @@ class AXRailNavigationComponent extends MXBaseComponent {
51
137
  cssClasses.push(`ax-look-${this.look()}`);
52
138
  return cssClasses;
53
139
  }
54
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXRailNavigationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
55
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: AXRailNavigationComponent, isStandalone: false, selector: "ax-rail-navigation", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<ng-content select=\"ax-rail-navigation-item,ng-container,ng-content\"></ng-content>\n<div class=\"ax-suffix-container\">\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n", styles: [".ax-dark ax-rail-navigation.ax-look-with-line-color .ax-state-active{background-color:rgba(var(--ax-color-primary-100),.2)}:root{--ax-rail-width: 6rem}ax-rail-navigation{height:100%;display:flex;overflow-y:auto;align-items:center;font-size:.875rem;padding-block:1rem;flex-direction:column;width:var(--ax-rail-width);background:rgba(var(--ax-color-surface))}ax-rail-navigation .ax-suffix-container{height:100%;display:flex;align-items:end}ax-rail-navigation.ax-look-with-line.ax-start .ax-state-active,ax-rail-navigation.ax-look-with-line-color.ax-start .ax-state-active{color:rgba(var(--ax-color-text-default));border-inline-start:2px rgba(var(--ax-color-text-default)) solid}ax-rail-navigation.ax-look-with-line.ax-end .ax-state-active,ax-rail-navigation.ax-look-with-line-color.ax-end .ax-state-active{color:rgba(var(--ax-color-text-default));border-inline-end:2px rgba(var(--ax-color-text-default)) solid}ax-rail-navigation.ax-look-with-line-color .ax-state-active{background-color:rgba(var(--ax-color-primary-100))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
140
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXRailNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.3", type: AXRailNavigationComponent, isStandalone: false, selector: "ax-rail-navigation", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.__hostClass" } }, queries: [{ propertyName: "railNavItems", predicate: AXRailNavigationItemComponent, isSignal: true }], viewQueries: [{ propertyName: "indicator", first: true, predicate: ["indicator"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<ng-content select=\"ax-rail-navigation-item,ng-container,ng-content\"></ng-content>\n<div class=\"ax-suffix-container\">\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n<span class=\"ax-rail-indicator\" #indicator></span>\n", styles: [".ax-dark ax-rail-navigation.ax-look-with-line-color .ax-state-active{background-color:rgba(var(--ax-color-primary-100),.2)}:root{--ax-rail-width: 5.5rem;--ax-rail-indicator-size: 2px}ax-rail-navigation{height:100%;display:flex;overflow-y:auto;position:relative;align-items:center;font-size:.875rem;padding-block:1rem;flex-direction:column;width:var(--ax-rail-width);background:rgba(var(--ax-color-surface))}ax-rail-navigation .ax-suffix-container{height:100%;display:flex;align-items:end}ax-rail-navigation ax-rail-navigation-item{width:100%}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item{gap:.25rem;display:flex;cursor:pointer;font-weight:500;align-items:center;padding-block:.5rem;flex-direction:column;justify-content:center;transition:color .3s ease;color:rgba(var(--ax-color-text-default),.5);transition-property:background-color,font-weight;transition:.3s cubic-bezier(.4,0,.2,1)}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item ax-icon{display:flex;font-size:1.1rem;border-radius:1rem;padding:.4rem 1.2rem;justify-content:center;transition:background-color .3s cubic-bezier(.4,0,.2,1)}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item:hover{color:rgba(var(--ax-color-text-default))}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item.ax-state-disabled{cursor:not-allowed;color:rgba(var(--ax-color-text-default),.3)}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item.ax-state-disabled:hover{color:rgba(var(--ax-color-text-default),.3)}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item.ax-state-active{color:rgba(var(--ax-color-text-default))}ax-rail-navigation .ax-rail-indicator{display:none}ax-rail-navigation.ax-look-with-line .ax-rail-indicator,ax-rail-navigation.ax-look-with-line-color .ax-rail-indicator{display:block;position:absolute;transition-property:height,top;width:var(--ax-rail-indicator-size);transition:.3s cubic-bezier(.4,0,.2,1);background-color:rgba(var(--ax-color-text-default))}ax-rail-navigation.ax-look-with-line-color .ax-state-active{background-color:rgba(var(--ax-color-primary-100))}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item{color:rgba(var(--ax-color-text-default),.7)}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item:hover,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item:hover{color:rgba(var(--ax-color-text-default),.85);font-weight:700}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item:hover ax-icon,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item:hover ax-icon{background-color:rgba(var(--ax-color-text-default),.1)}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item.ax-state-active,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item.ax-state-active{color:rgba(var(--ax-color-text-default));font-weight:bolder}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item.ax-state-active ax-icon,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item.ax-state-active ax-icon{background-color:rgba(var(--ax-color-text-default),.2)}ax-rail-navigation.ax-look-pills-color .ax-state-active ax-icon{background-color:rgba(var(--ax-color-primary-400),.2)!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
56
142
  }
57
143
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXRailNavigationComponent, decorators: [{
58
144
  type: Component,
59
- args: [{ selector: 'ax-rail-navigation', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<ng-content select=\"ax-rail-navigation-item,ng-container,ng-content\"></ng-content>\n<div class=\"ax-suffix-container\">\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n", styles: [".ax-dark ax-rail-navigation.ax-look-with-line-color .ax-state-active{background-color:rgba(var(--ax-color-primary-100),.2)}:root{--ax-rail-width: 6rem}ax-rail-navigation{height:100%;display:flex;overflow-y:auto;align-items:center;font-size:.875rem;padding-block:1rem;flex-direction:column;width:var(--ax-rail-width);background:rgba(var(--ax-color-surface))}ax-rail-navigation .ax-suffix-container{height:100%;display:flex;align-items:end}ax-rail-navigation.ax-look-with-line.ax-start .ax-state-active,ax-rail-navigation.ax-look-with-line-color.ax-start .ax-state-active{color:rgba(var(--ax-color-text-default));border-inline-start:2px rgba(var(--ax-color-text-default)) solid}ax-rail-navigation.ax-look-with-line.ax-end .ax-state-active,ax-rail-navigation.ax-look-with-line-color.ax-end .ax-state-active{color:rgba(var(--ax-color-text-default));border-inline-end:2px rgba(var(--ax-color-text-default)) solid}ax-rail-navigation.ax-look-with-line-color .ax-state-active{background-color:rgba(var(--ax-color-primary-100))}\n"] }]
60
- }], propDecorators: { __hostClass: [{
145
+ args: [{ selector: 'ax-rail-navigation', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<ng-content select=\"ax-rail-navigation-item,ng-container,ng-content\"></ng-content>\n<div class=\"ax-suffix-container\">\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n<span class=\"ax-rail-indicator\" #indicator></span>\n", styles: [".ax-dark ax-rail-navigation.ax-look-with-line-color .ax-state-active{background-color:rgba(var(--ax-color-primary-100),.2)}:root{--ax-rail-width: 5.5rem;--ax-rail-indicator-size: 2px}ax-rail-navigation{height:100%;display:flex;overflow-y:auto;position:relative;align-items:center;font-size:.875rem;padding-block:1rem;flex-direction:column;width:var(--ax-rail-width);background:rgba(var(--ax-color-surface))}ax-rail-navigation .ax-suffix-container{height:100%;display:flex;align-items:end}ax-rail-navigation ax-rail-navigation-item{width:100%}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item{gap:.25rem;display:flex;cursor:pointer;font-weight:500;align-items:center;padding-block:.5rem;flex-direction:column;justify-content:center;transition:color .3s ease;color:rgba(var(--ax-color-text-default),.5);transition-property:background-color,font-weight;transition:.3s cubic-bezier(.4,0,.2,1)}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item ax-icon{display:flex;font-size:1.1rem;border-radius:1rem;padding:.4rem 1.2rem;justify-content:center;transition:background-color .3s cubic-bezier(.4,0,.2,1)}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item:hover{color:rgba(var(--ax-color-text-default))}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item.ax-state-disabled{cursor:not-allowed;color:rgba(var(--ax-color-text-default),.3)}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item.ax-state-disabled:hover{color:rgba(var(--ax-color-text-default),.3)}ax-rail-navigation ax-rail-navigation-item .ax-rail-navigation-item.ax-state-active{color:rgba(var(--ax-color-text-default))}ax-rail-navigation .ax-rail-indicator{display:none}ax-rail-navigation.ax-look-with-line .ax-rail-indicator,ax-rail-navigation.ax-look-with-line-color .ax-rail-indicator{display:block;position:absolute;transition-property:height,top;width:var(--ax-rail-indicator-size);transition:.3s cubic-bezier(.4,0,.2,1);background-color:rgba(var(--ax-color-text-default))}ax-rail-navigation.ax-look-with-line-color .ax-state-active{background-color:rgba(var(--ax-color-primary-100))}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item{color:rgba(var(--ax-color-text-default),.7)}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item:hover,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item:hover{color:rgba(var(--ax-color-text-default),.85);font-weight:700}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item:hover ax-icon,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item:hover ax-icon{background-color:rgba(var(--ax-color-text-default),.1)}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item.ax-state-active,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item.ax-state-active{color:rgba(var(--ax-color-text-default));font-weight:bolder}ax-rail-navigation.ax-look-pills .ax-rail-navigation-item.ax-state-active ax-icon,ax-rail-navigation.ax-look-pills-color .ax-rail-navigation-item.ax-state-active ax-icon{background-color:rgba(var(--ax-color-text-default),.2)}ax-rail-navigation.ax-look-pills-color .ax-state-active ax-icon{background-color:rgba(var(--ax-color-primary-400),.2)!important}\n"] }]
146
+ }], ctorParameters: () => [], propDecorators: { __hostClass: [{
61
147
  type: HostBinding,
62
148
  args: ['class']
63
149
  }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-rail-navigation.mjs","sources":["../../../../libs/components/rail-navigation/src/lib/rail-navigation-item/rail-navigation-item.component.ts","../../../../libs/components/rail-navigation/src/lib/rail-navigation-item/rail-navigation-item.component.html","../../../../libs/components/rail-navigation/src/lib/rail-navigation.component.ts","../../../../libs/components/rail-navigation/src/lib/rail-navigation.component.html","../../../../libs/components/rail-navigation/src/lib/rail-navigation.module.ts","../../../../libs/components/rail-navigation/src/acorex-components-rail-navigation.ts"],"sourcesContent":["import { MXBaseComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, input, model, output, ViewEncapsulation } from '@angular/core';\nimport { IsActiveMatchOptions, UrlTree } from '@angular/router';\n\n@Component({\n selector: 'ax-rail-navigation-item',\n templateUrl: './rail-navigation-item.component.html',\n styleUrls: ['./rail-navigation-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class AXRailNavigationItemComponent extends MXBaseComponent {\n href = input<string | null>();\n\n isLoading = model(false);\n disabled = model(false);\n active = model(false);\n\n onClick = output<any>();\n\n routerLink = input<string | any[] | UrlTree | null>();\n routerLinkActive = input<string | string[]>('ax-state-active');\n routerLinkActiveOptions = input<{ exact: boolean } | IsActiveMatchOptions>({ exact: false });\n\n target = input<'_blank' | '_self' | '_parent' | '_top'>('_self');\n\n handleClickEvent(e: MouseEvent) {\n if (this.disabled || this.isLoading()) return;\n const event = {\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n handled: false,\n };\n this.onClick.emit(event);\n e.stopPropagation();\n }\n}\n","@if (routerLink()) {\n <a\n [target]=\"target()\"\n [routerLink]=\"routerLink()\"\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n [routerLinkActive]=\"routerLinkActive()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else if (href()) {\n <a\n [href]=\"href()\"\n [target]=\"target()\"\n class=\"ax-rail-navigation-item\"\n [class.ax-state-active]=\"active()\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else {\n <div\n class=\"ax-rail-navigation-item\"\n [class.ax-state-active]=\"active()\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </div>\n}\n\n<ng-template #railNavigationItemContent>\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-icon\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n <ng-content select=\"ng-container,ng-content\"></ng-content>\n <ng-content select=\"ax-suffix\"></ng-content>\n</ng-template>\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, HostBinding, input, ViewEncapsulation } from '@angular/core';\nimport { AXRailLocation, AXRailLook } from './rail-navigation.class';\n\n@Component({\n selector: 'ax-rail-navigation',\n templateUrl: './rail-navigation.component.html',\n styleUrls: ['./rail-navigation.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class AXRailNavigationComponent extends MXBaseComponent {\n location = input<AXRailLocation>('start');\n look = input<AXRailLook>('with-line-color');\n\n @HostBinding('class')\n private get __hostClass(): string[] {\n const cssClasses: string[] = [];\n cssClasses.push(`ax-${this.location()}`);\n cssClasses.push(`ax-look-${this.look()}`);\n return cssClasses;\n }\n}\n","<ng-content select=\"ax-prefix\"></ng-content>\n<ng-content select=\"ax-rail-navigation-item,ng-container,ng-content\"></ng-content>\n<div class=\"ax-suffix-container\">\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { AXRailNavigationItemComponent } from './rail-navigation-item/rail-navigation-item.component';\nimport { AXRailNavigationComponent } from './rail-navigation.component';\n\n@NgModule({\n declarations: [AXRailNavigationComponent, AXRailNavigationItemComponent],\n imports: [CommonModule, RouterLink, RouterLinkActive],\n exports: [AXRailNavigationComponent, AXRailNavigationItemComponent],\n providers: [],\n})\nexport class AXRailNavigationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAYM,MAAO,6BAA8B,SAAQ,eAAe,CAAA;AARlE,IAAA,WAAA,GAAA;;QASE,IAAI,CAAA,IAAA,GAAG,KAAK,EAAiB;AAE7B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC;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,EAAE,gBAAgB,CAC1C,EAAA,OAAA,EAAA,CAAA,yBAAyB,EAAE,6BAA6B,CAAA,EAAA,CAAA,CAAA;AAGvD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAJvB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAIX,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,yBAAyB,EAAE,6BAA6B,CAAC;AACxE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,CAAC;AACrD,oBAAA,OAAO,EAAE,CAAC,yBAAyB,EAAE,6BAA6B,CAAC;AACnE,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-rail-navigation.mjs","sources":["../../../../libs/components/rail-navigation/src/lib/rail-navigation.service.ts","../../../../libs/components/rail-navigation/src/lib/rail-navigation-item/rail-navigation-item.component.ts","../../../../libs/components/rail-navigation/src/lib/rail-navigation-item/rail-navigation-item.component.html","../../../../libs/components/rail-navigation/src/lib/rail-navigation.component.ts","../../../../libs/components/rail-navigation/src/lib/rail-navigation.component.html","../../../../libs/components/rail-navigation/src/lib/rail-navigation.module.ts","../../../../libs/components/rail-navigation/src/acorex-components-rail-navigation.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { AXRailNavigationItemComponent } from './rail-navigation-item/rail-navigation-item.component';\n\n@Injectable({ providedIn: 'root' })\nexport class AXRailNavigationService {\n private activeItem = new Subject<AXRailNavigationItemComponent>();\n activeItem$ = this.activeItem.asObservable();\n\n setActive(item: AXRailNavigationItemComponent) {\n this.activeItem.next(item);\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n input,\n model,\n OnDestroy,\n output,\n PLATFORM_ID,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { IsActiveMatchOptions, UrlTree } from '@angular/router';\nimport { AXRailClickEvent } from '../rail-navigation.class';\nimport { AXRailNavigationService } from '../rail-navigation.service';\n\n@Component({\n selector: 'ax-rail-navigation-item',\n templateUrl: './rail-navigation-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class AXRailNavigationItemComponent extends MXBaseComponent implements AfterViewInit, OnDestroy {\n private railNavigationService = inject(AXRailNavigationService);\n private platformId = inject(PLATFORM_ID);\n\n onClick = output<AXRailClickEvent>();\n\n isLoading = model(false);\n disabled = model(false);\n active = model(false);\n\n href = input<string | null>();\n routerLink = input<string | any[] | UrlTree | null>();\n routerLinkActive = input<string | string[]>('ax-state-active');\n target = input<'_blank' | '_self' | '_parent' | '_top'>('_self');\n routerLinkActiveOptions = input<{ exact: boolean } | IsActiveMatchOptions>({ exact: false });\n\n itemContainer = viewChild<ElementRef<HTMLElement>>('itemContainer');\n\n private observer: MutationObserver | null = null;\n\n ngAfterViewInit(): void {\n this.checkActive(this.itemContainer().nativeElement);\n if (isPlatformBrowser(this.platformId)) {\n this.observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === 'class') {\n this.checkActive(mutation.target as HTMLElement);\n }\n });\n });\n this.observer.observe(this.itemContainer().nativeElement, {\n attributes: true,\n childList: false,\n characterData: false,\n });\n }\n }\n\n ngOnDestroy(): void {\n if (isPlatformBrowser(this.platformId)) {\n this.observer.disconnect();\n this.observer = null;\n }\n }\n\n handleClickEvent(e: MouseEvent) {\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n }\n\n getStats() {\n return {\n height: this.getHostElement().clientHeight,\n top: this.getHostElement().offsetTop,\n };\n }\n\n private checkActive(item: HTMLElement) {\n if (item.classList.contains('ax-state-active')) {\n this.railNavigationService.setActive(this);\n }\n }\n}\n","@if (routerLink()) {\n <a\n #itemContainer\n [target]=\"target()\"\n [routerLink]=\"routerLink()\"\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-disabled]=\"disabled()\"\n [routerLinkActive]=\"routerLinkActive()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else if (href()) {\n <a\n #itemContainer\n [href]=\"href()\"\n [target]=\"target()\"\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-active]=\"active()\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </a>\n} @else {\n <div\n #itemContainer\n class=\"ax-rail-navigation-item\"\n (click)=\"handleClickEvent($event)\"\n [class.ax-state-active]=\"active()\"\n [class.ax-state-disabled]=\"disabled()\"\n >\n <ng-container [ngTemplateOutlet]=\"railNavigationItemContent\"></ng-container>\n </div>\n}\n\n<ng-template #railNavigationItemContent>\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-icon\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n <ng-content select=\"ng-container,ng-content\"></ng-content>\n <ng-content select=\"ax-suffix\"></ng-content>\n</ng-template>\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n contentChildren,\n effect,\n ElementRef,\n HostBinding,\n inject,\n input,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXRailNavigationItemComponent } from './rail-navigation-item/rail-navigation-item.component';\nimport { AXRailLocation, AXRailLook } from './rail-navigation.class';\nimport { AXRailNavigationService } from './rail-navigation.service';\n\n@Component({\n selector: 'ax-rail-navigation',\n templateUrl: './rail-navigation.component.html',\n styleUrls: ['./rail-navigation.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class AXRailNavigationComponent extends MXBaseComponent {\n private railNavigationService = inject(AXRailNavigationService);\n\n private indicator = viewChild<ElementRef<HTMLSpanElement>>('indicator');\n railNavItems = contentChildren(AXRailNavigationItemComponent);\n\n location = input<AXRailLocation>('start');\n look = input<AXRailLook>('with-line-color');\n\n private activeTab = signal<AXRailNavigationItemComponent | null>(null);\n\n #lookLocationChange = effect(() => {\n if (this.location()) {\n if (this.look() === 'with-line-color' || this.look() === 'with-line') {\n setTimeout(() => {\n this.setIndicatorPosition(this.activeTab());\n });\n }\n }\n });\n\n constructor() {\n super();\n this.railNavigationService.activeItem$.subscribe((item) => {\n this.activeTab.set(item);\n if (this.look() === 'with-line-color' || this.look() === 'with-line') {\n this.setIndicatorPosition(item);\n }\n });\n }\n\n private setIndicatorPosition(tabItem: AXRailNavigationItemComponent) {\n const indicatorStyle = this.indicator().nativeElement.style;\n const itemStats = tabItem.getStats();\n indicatorStyle.width = ` var(--ax-rail-indicator-size)`;\n indicatorStyle.height = `${itemStats.height}px`;\n indicatorStyle.top = `${itemStats.top}px`;\n indicatorStyle.bottom = `unset`;\n if (this.location() === 'start') {\n indicatorStyle.insetInlineStart = `0px`;\n indicatorStyle.insetInlineEnd = `unset`;\n }\n if (this.location() === 'end') {\n indicatorStyle.insetInlineStart = `unset`;\n indicatorStyle.insetInlineEnd = `0px`;\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string[] {\n const cssClasses: string[] = [];\n cssClasses.push(`ax-${this.location()}`);\n cssClasses.push(`ax-look-${this.look()}`);\n return cssClasses;\n }\n}\n","<ng-content select=\"ax-prefix\"></ng-content>\n<ng-content select=\"ax-rail-navigation-item,ng-container,ng-content\"></ng-content>\n<div class=\"ax-suffix-container\">\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n<span class=\"ax-rail-indicator\" #indicator></span>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { AXRailNavigationItemComponent } from './rail-navigation-item/rail-navigation-item.component';\nimport { AXRailNavigationComponent } from './rail-navigation.component';\n\n@NgModule({\n declarations: [AXRailNavigationComponent, AXRailNavigationItemComponent],\n imports: [CommonModule, RouterLink, RouterLinkActive],\n exports: [AXRailNavigationComponent, AXRailNavigationItemComponent],\n providers: [],\n})\nexport class AXRailNavigationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAKa,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,OAAO,EAAiC;AACjE,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE;AAK7C;AAHC,IAAA,SAAS,CAAC,IAAmC,EAAA;AAC3C,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;;8GALjB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;;2FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACuB5B,MAAO,6BAA8B,SAAQ,eAAe,CAAA;AAPlE,IAAA,WAAA,GAAA;;AAQU,QAAA,I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AGvD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAJvB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAIX,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,yBAAyB,EAAE,6BAA6B,CAAC;AACxE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,CAAC;AACrD,oBAAA,OAAO,EAAE,CAAC,yBAAyB,EAAE,6BAA6B,CAAC;AACnE,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -216,10 +216,11 @@ class AXTabsComponent extends MXBaseComponent {
216
216
  this.activeTab = signal(null);
217
217
  this.#tabChange = effect(() => {
218
218
  if (this.activeTab() && this.location()) {
219
- if (this.look() === 'with-line-color' || this.look() === 'with-line')
219
+ if (this.look() === 'with-line-color' || this.look() === 'with-line') {
220
220
  setTimeout(() => {
221
221
  this.setIndicatorPosition(this.activeTab());
222
222
  });
223
+ }
223
224
  }
224
225
  });
225
226
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-tabs.mjs","sources":["../../../../libs/components/tabs/src/lib/tab-content.directive.ts","../../../../libs/components/tabs/src/lib/tab-item.component.ts","../../../../libs/components/tabs/src/lib/tabs.class.ts","../../../../libs/components/tabs/src/lib/tabs.component.ts","../../../../libs/components/tabs/src/lib/tabs.module.ts","../../../../libs/components/tabs/src/acorex-components-tabs.ts"],"sourcesContent":["import { Directive, TemplateRef, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[axTabContent]',\n exportAs: 'axTabContent',\n inputs: ['portal: axTabContent'],\n standalone: false\n})\nexport class AXTabContentDirective {\n constructor(private _viewContainerRef: ViewContainerRef) {}\n\n private _portal: TemplateRef<any> | undefined;\n public get portal(): TemplateRef<any> | undefined {\n return this._portal;\n }\n public set portal(v: TemplateRef<any> | undefined) {\n if (v) {\n this._portal = v;\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(v, null, 0);\n }\n }\n}\n","import { AXClickEvent, MXComponentOptionChanged, MXInteractiveComponent } from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostListener,\n Input,\n Output,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * @category\n * Represents an individual tab item in a tab component.\n */\n@Component({\n selector: 'ax-tab-item',\n template: `\n @if (headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n text: this.text,\n key: this.key,\n active: this.active,\n disabled: this.disabled,\n },\n }\"\n ></ng-container>\n } @else {\n <ng-content select=\"ax-prefix\"></ng-content>\n <div class=\"ax-tab-item-text\">{{ text }}</div>\n <ng-content select=\"ax-suffix\"></ng-content>\n }\n <ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n inputs: ['disabled'],\n outputs: ['disabledChange', 'onClick', 'onBlur', 'onFocus'],\n standalone: false\n})\nexport class AXTabItemComponent extends MXInteractiveComponent {\n /**\n * Defines the text content to be displayed within the component.\n */\n @Input()\n text: string;\n\n /**\n * Defines a unique identifier for the component instance.\n */\n @Input()\n key: string;\n\n @ViewChild('content')\n template: TemplateRef<unknown>;\n\n /**\n * Defines a custom template for the component's header.\n */\n @Input()\n headerTemplate: TemplateRef<unknown>;\n\n /**\n * Emits an event when the `active` state of the component changes.\n * @event\n */\n @Output()\n activeChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /**\n * Emits an event when the component is clicked.\n * @event\n */\n @Output()\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n /** @ignore */\n private _active = false;\n\n /**\n * Gets or sets the component's active state, controlling its behavior and appearance.\n * @param value {boolean}\n */\n @Input()\n public get active(): boolean {\n return this._active;\n }\n public set active(value: boolean) {\n this.setOption({\n name: 'active',\n value,\n afterCallback: () => {\n this.cdr.markForCheck();\n },\n });\n }\n\n /**\n * @ignore\n */\n @HostListener('click', ['$event'])\n private __hostClick(e: MouseEvent) {\n if (!this.disabled) {\n this.getHostElement().scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' });\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n }\n }\n\n /**\n * @ignore\n */\n protected override internalOptionChanged(option: MXComponentOptionChanged<any>): void {\n //TODO: change to hostbind\n const classListRef = this.getHostElement().classList;\n if (option.name == 'disabled') {\n option.value ? classListRef.add('ax-state-disabled') : classListRef.remove('ax-state-disabled');\n }\n if (option.name == 'active') {\n option.value ? classListRef.add('ax-state-active') : classListRef.remove('ax-state-active');\n }\n }\n\n getStats() {\n return {\n width: this.getHostElement().clientWidth,\n height: this.getHostElement().clientHeight,\n left: this.getHostElement().offsetLeft,\n top: this.getHostElement().offsetTop,\n };\n }\n}\n","import { AXEvent } from '@acorex/components/common';\nimport { AXTabItemComponent } from './tab-item.component';\n\nexport class AXTabStripChangedEvent extends AXEvent {\n tab: AXTabItemComponent;\n index: number;\n}\n\nexport type AXTabLook =\n | 'default'\n | 'pills'\n | 'pills-color'\n | 'with-line'\n | 'with-line-color'\n | 'classic'\n | 'custom';\n\nexport type AXTabLocation = 'top' | 'bottom' | 'start' | 'end';\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n effect,\n ElementRef,\n EventEmitter,\n HostBinding,\n inject,\n input,\n Input,\n NgZone,\n Output,\n QueryList,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXTabContentDirective } from './tab-content.directive';\nimport { AXTabItemComponent } from './tab-item.component';\nimport { AXTabLocation, AXTabLook, AXTabStripChangedEvent } from './tabs.class';\n\n/**\n * @category\n * A component that serves as a container for tab items.\n */\n@Component({\n selector: 'ax-tabs',\n template: `<ng-content select=\"ax-tab-item\"></ng-content><span class=\"ax-tab-indicator\" #indicator></span>`,\n styleUrl: './tabs.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class AXTabsComponent extends MXBaseComponent implements AfterViewInit, AfterContentInit {\n /**\n * @ignore\n */\n @ContentChildren(AXTabItemComponent)\n private _contentTabs!: QueryList<AXTabItemComponent>;\n\n /**\n * Sets the appearance style of the tab component.\n * @defaultValue 'default'\n */\n look = input<AXTabLook>('default');\n\n /**\n * Specifies the position of the tab component.\n * @defaultValue 'bottom'\n */\n location = input<AXTabLocation>('bottom');\n\n /**\n * @defaultValue 'false'\n * Specifies whether the component should resize to fit its parent container.\n */\n @Input()\n fitParent = false;\n\n /**\n * @defaultValue 'false'\n * Applies a minimum width constraint to the component.\n */\n @Input()\n minWidth = false;\n\n /**\n * The `AXTabContentDirective` associated with the tab.\n */\n @Input()\n content!: AXTabContentDirective;\n\n private indicator = viewChild<ElementRef<HTMLSpanElement>>('indicator');\n\n private zone = inject(NgZone);\n\n /** @ignore */\n private _isUserInteraction = false;\n\n get items(): AXTabItemComponent[] {\n return this._contentTabs.toArray();\n }\n\n /** @ignore */\n private _selectedItem!: AXTabItemComponent;\n\n /** @ignore */\n get selectedIndex(): number {\n return this.items.indexOf(this._selectedItem);\n }\n\n /** @ignore */\n get selectedItem(): AXTabItemComponent {\n return this._selectedItem;\n }\n\n private changes: ResizeObserver;\n private activeTab = signal<AXTabItemComponent>(null);\n\n #tabChange = effect(() => {\n if (this.activeTab() && this.location()) {\n if (this.look() === 'with-line-color' || this.look() === 'with-line')\n setTimeout(() => {\n this.setIndicatorPosition(this.activeTab());\n });\n }\n });\n\n /**\n * @event\n */\n @Output()\n onActiveTabChanged: EventEmitter<AXTabStripChangedEvent> = new EventEmitter<AXTabStripChangedEvent>();\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string[] {\n const cssClasses: string[] = [];\n cssClasses.push(`ax-look-${this.look()}`);\n cssClasses.push(`ax-${this.location()}`);\n if (this.fitParent) cssClasses.push(`ax-tabs-fit`);\n return cssClasses;\n }\n\n /** @ignore */\n ngAfterContentInit() {\n this._contentTabs.changes.subscribe(() => {\n this._bindOnClickEvent();\n });\n }\n\n /** @ignore */\n ngAfterViewInit() {\n this._bindOnClickEvent();\n this.zone.runOutsideAngular(() => {\n this.changes = new ResizeObserver((entries) => {\n if (entries[0].contentRect.width) {\n this.setIndicatorPosition(this.activeTab());\n this.changes.disconnect();\n }\n });\n if (this.activeTab()) this.changes.observe(this.activeTab().getHostElement());\n });\n }\n\n /** @ignore */\n private _bindOnClickEvent() {\n const selected = this.items.find((c) => c.active) || this.items[0];\n this.select(selected);\n this.items.forEach((c) => {\n if (!c.onClick.length) {\n c.onClick.subscribe((t) => {\n this._isUserInteraction = t.nativeEvent?.isTrusted;\n this.select(c);\n });\n }\n });\n }\n\n /**\n * Activates the specified tab and updates the content.\n *\n * @param {number | AXTabItemComponent}\n */\n select(tab: number | AXTabItemComponent) {\n const tabItem: AXTabItemComponent = typeof tab == 'number' ? this.items[tab] : tab;\n this.activeTab.set(tabItem);\n //\n if (!tab || this.selectedItem == tabItem) return;\n this._selectedItem = tabItem;\n //\n this.items.forEach((c) => (c.active = false));\n tabItem.active = true;\n if (this.content) {\n this.content.portal = tabItem.template;\n }\n this.cdr.markForCheck();\n this.onActiveTabChanged.emit({\n component: this,\n isUserInteraction: this._isUserInteraction,\n tab: tabItem,\n index: this.selectedIndex,\n });\n this._isUserInteraction = false;\n }\n\n private setIndicatorPosition(tabItem: AXTabItemComponent) {\n const indicatorStyle = this.indicator().nativeElement.style;\n const itemStats = tabItem.getStats();\n if (this.location() === 'top' || this.location() === 'bottom') {\n indicatorStyle.width = `${itemStats.width}px`;\n indicatorStyle.height = `var(--ax-tab-indicator-size)`;\n indicatorStyle.left = `${itemStats.left}px`;\n indicatorStyle.right = `unset`;\n if (this.location() === 'top') {\n indicatorStyle.top = `0px`;\n indicatorStyle.bottom = `unset`;\n }\n if (this.location() === 'bottom') {\n indicatorStyle.top = `unset`;\n indicatorStyle.bottom = `0px`;\n }\n }\n if (this.location() === 'start' || this.location() === 'end') {\n indicatorStyle.width = ` var(--ax-tab-indicator-size)`;\n indicatorStyle.height = `${itemStats.height}px`;\n indicatorStyle.top = `${itemStats.top}px`;\n indicatorStyle.bottom = `unset`;\n if (this.location() === 'start') {\n indicatorStyle.insetInlineStart = `0px`;\n indicatorStyle.insetInlineEnd = `unset`;\n }\n if (this.location() === 'end') {\n indicatorStyle.insetInlineStart = `unset`;\n indicatorStyle.insetInlineEnd = `0px`;\n }\n }\n }\n}\n","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXTabContentDirective } from './tab-content.directive';\nimport { AXTabItemComponent } from './tab-item.component';\nimport { AXTabsComponent } from './tabs.component';\n\nconst COMPONENT = [AXTabsComponent, AXTabItemComponent, AXTabContentDirective];\nconst MODULES = [CommonModule, PortalModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAQa,qBAAqB,CAAA;AAChC,IAAA,WAAA,CAAoB,iBAAmC,EAAA;QAAnC,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB;;AAGrC,IAAA,IAAW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO;;IAErB,IAAW,MAAM,CAAC,CAA+B,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OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,iBATN,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,CAC5D,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,EAAE,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAD3C,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAShE,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAJV,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-tabs.mjs","sources":["../../../../libs/components/tabs/src/lib/tab-content.directive.ts","../../../../libs/components/tabs/src/lib/tab-item.component.ts","../../../../libs/components/tabs/src/lib/tabs.class.ts","../../../../libs/components/tabs/src/lib/tabs.component.ts","../../../../libs/components/tabs/src/lib/tabs.module.ts","../../../../libs/components/tabs/src/acorex-components-tabs.ts"],"sourcesContent":["import { Directive, TemplateRef, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[axTabContent]',\n exportAs: 'axTabContent',\n inputs: ['portal: axTabContent'],\n standalone: false\n})\nexport class AXTabContentDirective {\n constructor(private _viewContainerRef: ViewContainerRef) {}\n\n private _portal: TemplateRef<any> | undefined;\n public get portal(): TemplateRef<any> | undefined {\n return this._portal;\n }\n public set portal(v: TemplateRef<any> | undefined) {\n if (v) {\n this._portal = v;\n this._viewContainerRef.clear();\n this._viewContainerRef.createEmbeddedView(v, null, 0);\n }\n }\n}\n","import { AXClickEvent, MXComponentOptionChanged, MXInteractiveComponent } from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostListener,\n Input,\n Output,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * @category\n * Represents an individual tab item in a tab component.\n */\n@Component({\n selector: 'ax-tab-item',\n template: `\n @if (headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n text: this.text,\n key: this.key,\n active: this.active,\n disabled: this.disabled,\n },\n }\"\n ></ng-container>\n } @else {\n <ng-content select=\"ax-prefix\"></ng-content>\n <div class=\"ax-tab-item-text\">{{ text }}</div>\n <ng-content select=\"ax-suffix\"></ng-content>\n }\n <ng-template #content>\n <ng-content select=\"ax-content\"> </ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n inputs: ['disabled'],\n outputs: ['disabledChange', 'onClick', 'onBlur', 'onFocus'],\n standalone: false\n})\nexport class AXTabItemComponent extends MXInteractiveComponent {\n /**\n * Defines the text content to be displayed within the component.\n */\n @Input()\n text: string;\n\n /**\n * Defines a unique identifier for the component instance.\n */\n @Input()\n key: string;\n\n @ViewChild('content')\n template: TemplateRef<unknown>;\n\n /**\n * Defines a custom template for the component's header.\n */\n @Input()\n headerTemplate: TemplateRef<unknown>;\n\n /**\n * Emits an event when the `active` state of the component changes.\n * @event\n */\n @Output()\n activeChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /**\n * Emits an event when the component is clicked.\n * @event\n */\n @Output()\n onClick: EventEmitter<AXClickEvent> = new EventEmitter<AXClickEvent>();\n\n /** @ignore */\n private _active = false;\n\n /**\n * Gets or sets the component's active state, controlling its behavior and appearance.\n * @param value {boolean}\n */\n @Input()\n public get active(): boolean {\n return this._active;\n }\n public set active(value: boolean) {\n this.setOption({\n name: 'active',\n value,\n afterCallback: () => {\n this.cdr.markForCheck();\n },\n });\n }\n\n /**\n * @ignore\n */\n @HostListener('click', ['$event'])\n private __hostClick(e: MouseEvent) {\n if (!this.disabled) {\n this.getHostElement().scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' });\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n }\n }\n\n /**\n * @ignore\n */\n protected override internalOptionChanged(option: MXComponentOptionChanged<any>): void {\n //TODO: change to hostbind\n const classListRef = this.getHostElement().classList;\n if (option.name == 'disabled') {\n option.value ? classListRef.add('ax-state-disabled') : classListRef.remove('ax-state-disabled');\n }\n if (option.name == 'active') {\n option.value ? classListRef.add('ax-state-active') : classListRef.remove('ax-state-active');\n }\n }\n\n getStats() {\n return {\n width: this.getHostElement().clientWidth,\n height: this.getHostElement().clientHeight,\n left: this.getHostElement().offsetLeft,\n top: this.getHostElement().offsetTop,\n };\n }\n}\n","import { AXEvent } from '@acorex/components/common';\nimport { AXTabItemComponent } from './tab-item.component';\n\nexport class AXTabStripChangedEvent extends AXEvent {\n tab: AXTabItemComponent;\n index: number;\n}\n\nexport type AXTabLook =\n | 'default'\n | 'pills'\n | 'pills-color'\n | 'with-line'\n | 'with-line-color'\n | 'classic'\n | 'custom';\n\nexport type AXTabLocation = 'top' | 'bottom' | 'start' | 'end';\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n effect,\n ElementRef,\n EventEmitter,\n HostBinding,\n inject,\n input,\n Input,\n NgZone,\n Output,\n QueryList,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXTabContentDirective } from './tab-content.directive';\nimport { AXTabItemComponent } from './tab-item.component';\nimport { AXTabLocation, AXTabLook, AXTabStripChangedEvent } from './tabs.class';\n\n/**\n * @category\n * A component that serves as a container for tab items.\n */\n@Component({\n selector: 'ax-tabs',\n template: `<ng-content select=\"ax-tab-item\"></ng-content><span class=\"ax-tab-indicator\" #indicator></span>`,\n styleUrl: './tabs.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class AXTabsComponent extends MXBaseComponent implements AfterViewInit, AfterContentInit {\n /**\n * @ignore\n */\n @ContentChildren(AXTabItemComponent)\n private _contentTabs!: QueryList<AXTabItemComponent>;\n\n /**\n * Sets the appearance style of the tab component.\n * @defaultValue 'default'\n */\n look = input<AXTabLook>('default');\n\n /**\n * Specifies the position of the tab component.\n * @defaultValue 'bottom'\n */\n location = input<AXTabLocation>('bottom');\n\n /**\n * @defaultValue 'false'\n * Specifies whether the component should resize to fit its parent container.\n */\n @Input()\n fitParent = false;\n\n /**\n * @defaultValue 'false'\n * Applies a minimum width constraint to the component.\n */\n @Input()\n minWidth = false;\n\n /**\n * The `AXTabContentDirective` associated with the tab.\n */\n @Input()\n content!: AXTabContentDirective;\n\n private indicator = viewChild<ElementRef<HTMLSpanElement>>('indicator');\n\n private zone = inject(NgZone);\n\n /** @ignore */\n private _isUserInteraction = false;\n\n get items(): AXTabItemComponent[] {\n return this._contentTabs.toArray();\n }\n\n /** @ignore */\n private _selectedItem!: AXTabItemComponent;\n\n /** @ignore */\n get selectedIndex(): number {\n return this.items.indexOf(this._selectedItem);\n }\n\n /** @ignore */\n get selectedItem(): AXTabItemComponent {\n return this._selectedItem;\n }\n\n private changes: ResizeObserver;\n private activeTab = signal<AXTabItemComponent>(null);\n\n #tabChange = effect(() => {\n if (this.activeTab() && this.location()) {\n if (this.look() === 'with-line-color' || this.look() === 'with-line') {\n setTimeout(() => {\n this.setIndicatorPosition(this.activeTab());\n });\n }\n }\n });\n\n /**\n * @event\n */\n @Output()\n onActiveTabChanged: EventEmitter<AXTabStripChangedEvent> = new EventEmitter<AXTabStripChangedEvent>();\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string[] {\n const cssClasses: string[] = [];\n cssClasses.push(`ax-look-${this.look()}`);\n cssClasses.push(`ax-${this.location()}`);\n if (this.fitParent) cssClasses.push(`ax-tabs-fit`);\n return cssClasses;\n }\n\n /** @ignore */\n ngAfterContentInit() {\n this._contentTabs.changes.subscribe(() => {\n this._bindOnClickEvent();\n });\n }\n\n /** @ignore */\n ngAfterViewInit() {\n this._bindOnClickEvent();\n this.zone.runOutsideAngular(() => {\n this.changes = new ResizeObserver((entries) => {\n if (entries[0].contentRect.width) {\n this.setIndicatorPosition(this.activeTab());\n this.changes.disconnect();\n }\n });\n if (this.activeTab()) this.changes.observe(this.activeTab().getHostElement());\n });\n }\n\n /** @ignore */\n private _bindOnClickEvent() {\n const selected = this.items.find((c) => c.active) || this.items[0];\n this.select(selected);\n this.items.forEach((c) => {\n if (!c.onClick.length) {\n c.onClick.subscribe((t) => {\n this._isUserInteraction = t.nativeEvent?.isTrusted;\n this.select(c);\n });\n }\n });\n }\n\n /**\n * Activates the specified tab and updates the content.\n *\n * @param {number | AXTabItemComponent}\n */\n select(tab: number | AXTabItemComponent) {\n const tabItem: AXTabItemComponent = typeof tab == 'number' ? this.items[tab] : tab;\n this.activeTab.set(tabItem);\n //\n if (!tab || this.selectedItem == tabItem) return;\n this._selectedItem = tabItem;\n //\n this.items.forEach((c) => (c.active = false));\n tabItem.active = true;\n if (this.content) {\n this.content.portal = tabItem.template;\n }\n this.cdr.markForCheck();\n this.onActiveTabChanged.emit({\n component: this,\n isUserInteraction: this._isUserInteraction,\n tab: tabItem,\n index: this.selectedIndex,\n });\n this._isUserInteraction = false;\n }\n\n private setIndicatorPosition(tabItem: AXTabItemComponent) {\n const indicatorStyle = this.indicator().nativeElement.style;\n const itemStats = tabItem.getStats();\n if (this.location() === 'top' || this.location() === 'bottom') {\n indicatorStyle.width = `${itemStats.width}px`;\n indicatorStyle.height = `var(--ax-tab-indicator-size)`;\n indicatorStyle.left = `${itemStats.left}px`;\n indicatorStyle.right = `unset`;\n if (this.location() === 'top') {\n indicatorStyle.top = `0px`;\n indicatorStyle.bottom = `unset`;\n }\n if (this.location() === 'bottom') {\n indicatorStyle.top = `unset`;\n indicatorStyle.bottom = `0px`;\n }\n }\n if (this.location() === 'start' || this.location() === 'end') {\n indicatorStyle.width = ` var(--ax-tab-indicator-size)`;\n indicatorStyle.height = `${itemStats.height}px`;\n indicatorStyle.top = `${itemStats.top}px`;\n indicatorStyle.bottom = `unset`;\n if (this.location() === 'start') {\n indicatorStyle.insetInlineStart = `0px`;\n indicatorStyle.insetInlineEnd = `unset`;\n }\n if (this.location() === 'end') {\n indicatorStyle.insetInlineStart = `unset`;\n indicatorStyle.insetInlineEnd = `0px`;\n }\n }\n }\n}\n","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXTabContentDirective } from './tab-content.directive';\nimport { AXTabItemComponent } from './tab-item.component';\nimport { AXTabsComponent } from './tabs.component';\n\nconst COMPONENT = [AXTabsComponent, AXTabItemComponent, AXTabContentDirective];\nconst MODULES = [CommonModule, PortalModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAQa,qBAAqB,CAAA;AAChC,IAAA,WAAA,CAAoB,iBAAmC,EAAA;QAAnC,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB;;AAGrC,IAAA,IAAW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO;;IAErB,IAAW,MAAM,CAAC,CAA+B,EAAA;QAC/C,IAAI,CAAC,EAAE;AACL,YAAA,IAAI,CAAC,OAAO,GAAG,CAAC;AAChB,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N,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,CAC5D,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,EAAE,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAD3C,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAShE,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAJV,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;AChBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/components",
3
- "version": "19.4.0-next.0",
3
+ "version": "19.4.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=19.0.0",
6
6
  "@angular/core": ">=19.0.0",
@@ -1,3 +1,4 @@
1
1
  export * from './lib/rail-navigation-item/rail-navigation-item.component';
2
+ export * from './lib/rail-navigation.class';
2
3
  export * from './lib/rail-navigation.component';
3
4
  export * from './lib/rail-navigation.module';
@@ -1,19 +1,32 @@
1
1
  import { MXBaseComponent } from '@acorex/components/common';
2
+ import { AfterViewInit, ElementRef, OnDestroy } from '@angular/core';
2
3
  import { IsActiveMatchOptions, UrlTree } from '@angular/router';
4
+ import { AXRailClickEvent } from '../rail-navigation.class';
3
5
  import * as i0 from "@angular/core";
4
- export declare class AXRailNavigationItemComponent extends MXBaseComponent {
5
- href: import("@angular/core").InputSignal<string>;
6
+ export declare class AXRailNavigationItemComponent extends MXBaseComponent implements AfterViewInit, OnDestroy {
7
+ private railNavigationService;
8
+ private platformId;
9
+ onClick: import("@angular/core").OutputEmitterRef<AXRailClickEvent>;
6
10
  isLoading: import("@angular/core").ModelSignal<boolean>;
7
11
  disabled: import("@angular/core").ModelSignal<boolean>;
8
12
  active: import("@angular/core").ModelSignal<boolean>;
9
- onClick: import("@angular/core").OutputEmitterRef<any>;
13
+ href: import("@angular/core").InputSignal<string>;
10
14
  routerLink: import("@angular/core").InputSignal<string | any[] | UrlTree>;
11
15
  routerLinkActive: import("@angular/core").InputSignal<string | string[]>;
16
+ target: import("@angular/core").InputSignal<"_blank" | "_self" | "_parent" | "_top">;
12
17
  routerLinkActiveOptions: import("@angular/core").InputSignal<{
13
18
  exact: boolean;
14
19
  } | IsActiveMatchOptions>;
15
- target: import("@angular/core").InputSignal<"_blank" | "_self" | "_parent" | "_top">;
20
+ itemContainer: import("@angular/core").Signal<ElementRef<HTMLElement>>;
21
+ private observer;
22
+ ngAfterViewInit(): void;
23
+ ngOnDestroy(): void;
16
24
  handleClickEvent(e: MouseEvent): void;
25
+ getStats(): {
26
+ height: number;
27
+ top: number;
28
+ };
29
+ private checkActive;
17
30
  static ɵfac: i0.ɵɵFactoryDeclaration<AXRailNavigationItemComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<AXRailNavigationItemComponent, "ax-rail-navigation-item", never, { "href": { "alias": "href"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "routerLinkActive": { "alias": "routerLinkActive"; "required": false; "isSignal": true; }; "routerLinkActiveOptions": { "alias": "routerLinkActiveOptions"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; }, { "isLoading": "isLoadingChange"; "disabled": "disabledChange"; "active": "activeChange"; "onClick": "onClick"; }, never, ["ax-prefix", "ax-icon", "ax-text", "ng-container,ng-content", "ax-suffix"], false, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXRailNavigationItemComponent, "ax-rail-navigation-item", never, { "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "routerLinkActive": { "alias": "routerLinkActive"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "routerLinkActiveOptions": { "alias": "routerLinkActiveOptions"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; "isLoading": "isLoadingChange"; "disabled": "disabledChange"; "active": "activeChange"; }, never, ["ax-prefix", "ax-icon", "ax-text", "ng-container,ng-content", "ax-suffix"], false, never>;
19
32
  }
@@ -1,2 +1,8 @@
1
+ import { AXRailNavigationItemComponent } from './rail-navigation-item/rail-navigation-item.component';
1
2
  export type AXRailLook = 'default' | 'pills' | 'pills-color' | 'with-line' | 'with-line-color';
2
3
  export type AXRailLocation = 'start' | 'end';
4
+ export type AXRailClickEvent = {
5
+ component: AXRailNavigationItemComponent;
6
+ htmlElement: HTMLElement;
7
+ nativeEvent: MouseEvent;
8
+ };
@@ -1,10 +1,18 @@
1
1
  import { MXBaseComponent } from '@acorex/components/common';
2
+ import { AXRailNavigationItemComponent } from './rail-navigation-item/rail-navigation-item.component';
2
3
  import { AXRailLocation, AXRailLook } from './rail-navigation.class';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class AXRailNavigationComponent extends MXBaseComponent {
6
+ #private;
7
+ private railNavigationService;
8
+ private indicator;
9
+ railNavItems: import("@angular/core").Signal<readonly AXRailNavigationItemComponent[]>;
5
10
  location: import("@angular/core").InputSignal<AXRailLocation>;
6
11
  look: import("@angular/core").InputSignal<AXRailLook>;
12
+ private activeTab;
13
+ constructor();
14
+ private setIndicatorPosition;
7
15
  private get __hostClass();
8
16
  static ɵfac: i0.ɵɵFactoryDeclaration<AXRailNavigationComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<AXRailNavigationComponent, "ax-rail-navigation", never, { "location": { "alias": "location"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; }, {}, never, ["ax-prefix", "ax-rail-navigation-item,ng-container,ng-content", "ax-suffix"], false, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXRailNavigationComponent, "ax-rail-navigation", never, { "location": { "alias": "location"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; }, {}, ["railNavItems"], ["ax-prefix", "ax-rail-navigation-item,ng-container,ng-content", "ax-suffix"], false, never>;
10
18
  }
@@ -0,0 +1,9 @@
1
+ import { AXRailNavigationItemComponent } from './rail-navigation-item/rail-navigation-item.component';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AXRailNavigationService {
4
+ private activeItem;
5
+ activeItem$: import("rxjs").Observable<AXRailNavigationItemComponent>;
6
+ setActive(item: AXRailNavigationItemComponent): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXRailNavigationService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXRailNavigationService>;
9
+ }