ngx-tethys 19.1.0 → 19.1.1
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/CHANGELOG.md +9 -0
- package/fesm2022/ngx-tethys-tabs.mjs +54 -61
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/tabs/tabs.component.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [19.1.1](https://github.com/atinc/ngx-tethys/compare/19.1.0...19.1.1) (2025-09-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **tabs:** fix thyActiveTab is number bug and optimize doc [@wumeimin](https://github.com/wumeimin) ([#3553](https://github.com/atinc/ngx-tethys/issues/3553)) ([f7727eb](https://github.com/atinc/ngx-tethys/commit/f7727eba8243305395f9a0197d9a881ce460e756))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
5
14
|
# [19.1.0](https://github.com/atinc/ngx-tethys/compare/19.1.0-next.12...19.1.0) (2025-08-29)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -1,51 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input,
|
|
2
|
+
import { input, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewChild, ContentChild, inject, ChangeDetectorRef, ElementRef, QueryList, DestroyRef, model, linkedSignal, ContentChildren, NgModule } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
4
|
-
import { coerceBooleanProperty, isString } from 'ngx-tethys/util';
|
|
5
|
-
import { fromEvent } from 'rxjs';
|
|
6
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
5
|
import { ThyNav, ThyNavItemDirective, ThyNavModule } from 'ngx-tethys/nav';
|
|
6
|
+
import { coerceBooleanProperty, isNumber } from 'ngx-tethys/util';
|
|
7
|
+
import { fromEvent } from 'rxjs';
|
|
8
8
|
import { ThyIconModule } from 'ngx-tethys/icon';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* 选项卡的选项组件
|
|
12
|
-
* @name thy-tab
|
|
13
|
-
*/
|
|
14
|
-
class ThyTab {
|
|
15
|
-
constructor() {
|
|
16
|
-
/**
|
|
17
|
-
* 选项标题
|
|
18
|
-
*/
|
|
19
|
-
this.thyTitle = input(undefined);
|
|
20
|
-
/**
|
|
21
|
-
* 选项的唯一标识
|
|
22
|
-
*/
|
|
23
|
-
this.id = input(undefined);
|
|
24
|
-
/**
|
|
25
|
-
* 是否禁用选项
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
|
-
this.thyDisabled = input(false, { transform: coerceBooleanProperty });
|
|
29
|
-
}
|
|
30
|
-
ngOnInit() { }
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyTab, isStandalone: true, selector: "thy-tab", inputs: { thyTitle: { classPropertyName: "thyTitle", publicName: "thyTitle", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "titleTemplateRef", first: true, predicate: ["title"], descendants: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0, template: ` <ng-template #content><ng-content></ng-content></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
33
|
-
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTab, decorators: [{
|
|
35
|
-
type: Component,
|
|
36
|
-
args: [{
|
|
37
|
-
selector: 'thy-tab',
|
|
38
|
-
template: ` <ng-template #content><ng-content></ng-content></ng-template> `,
|
|
39
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
40
|
-
}]
|
|
41
|
-
}], ctorParameters: () => [], propDecorators: { titleTemplateRef: [{
|
|
42
|
-
type: ContentChild,
|
|
43
|
-
args: ['title']
|
|
44
|
-
}], content: [{
|
|
45
|
-
type: ViewChild,
|
|
46
|
-
args: ['content', { static: true }]
|
|
47
|
-
}] } });
|
|
48
|
-
|
|
49
10
|
/**
|
|
50
11
|
* @private
|
|
51
12
|
*/
|
|
@@ -88,6 +49,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
88
49
|
}]
|
|
89
50
|
}] });
|
|
90
51
|
|
|
52
|
+
/**
|
|
53
|
+
* 选项卡的选项组件
|
|
54
|
+
* @name thy-tab
|
|
55
|
+
*/
|
|
56
|
+
class ThyTab {
|
|
57
|
+
constructor() {
|
|
58
|
+
/**
|
|
59
|
+
* 选项标题
|
|
60
|
+
*/
|
|
61
|
+
this.thyTitle = input(undefined);
|
|
62
|
+
/**
|
|
63
|
+
* 选项的唯一标识
|
|
64
|
+
*/
|
|
65
|
+
this.id = input(undefined);
|
|
66
|
+
/**
|
|
67
|
+
* 是否禁用选项
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
this.thyDisabled = input(false, { transform: coerceBooleanProperty });
|
|
71
|
+
}
|
|
72
|
+
ngOnInit() { }
|
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyTab, isStandalone: true, selector: "thy-tab", inputs: { thyTitle: { classPropertyName: "thyTitle", publicName: "thyTitle", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "titleTemplateRef", first: true, predicate: ["title"], descendants: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0, template: ` <ng-template #content><ng-content></ng-content></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
75
|
+
}
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTab, decorators: [{
|
|
77
|
+
type: Component,
|
|
78
|
+
args: [{
|
|
79
|
+
selector: 'thy-tab',
|
|
80
|
+
template: ` <ng-template #content><ng-content></ng-content></ng-template> `,
|
|
81
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
82
|
+
}]
|
|
83
|
+
}], ctorParameters: () => [], propDecorators: { titleTemplateRef: [{
|
|
84
|
+
type: ContentChild,
|
|
85
|
+
args: ['title']
|
|
86
|
+
}], content: [{
|
|
87
|
+
type: ViewChild,
|
|
88
|
+
args: ['content', { static: true }]
|
|
89
|
+
}] } });
|
|
90
|
+
|
|
91
91
|
/**
|
|
92
92
|
* 选项卡切换组件
|
|
93
93
|
* @name thy-tabs
|
|
@@ -129,19 +129,14 @@ class ThyTabs {
|
|
|
129
129
|
* 响应式,自动计算宽度存放 thyNavItem,并添加更多弹框
|
|
130
130
|
*/
|
|
131
131
|
this.thyResponsive = input(false, { transform: coerceBooleanProperty });
|
|
132
|
-
this.activeTabIndex =
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const value = this.thyActiveTab();
|
|
136
|
-
if (isString(value)) {
|
|
137
|
-
this.activeTabId = value;
|
|
138
|
-
this.activeTabIndex = undefined;
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
this.activeTabIndex = value;
|
|
142
|
-
this.activeTabId = undefined;
|
|
143
|
-
}
|
|
132
|
+
this.activeTabIndex = linkedSignal(() => {
|
|
133
|
+
const activeTab = this.thyActiveTab();
|
|
134
|
+
return isNumber(activeTab) ? activeTab : undefined;
|
|
144
135
|
});
|
|
136
|
+
this.activeTabId = linkedSignal(() => {
|
|
137
|
+
return this.thyActiveTab() ?? undefined;
|
|
138
|
+
});
|
|
139
|
+
this.transitionStarted = false;
|
|
145
140
|
}
|
|
146
141
|
ngOnInit() {
|
|
147
142
|
const tabsContent = this.el.nativeElement.querySelector('.thy-tabs-content');
|
|
@@ -155,7 +150,7 @@ class ThyTabs {
|
|
|
155
150
|
ngAfterContentInit() {
|
|
156
151
|
this.tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {
|
|
157
152
|
this.thyAnimated() && (this.transitionStarted = true);
|
|
158
|
-
this.activeTabIndex
|
|
153
|
+
this.activeTabIndex.set(data.length - 1);
|
|
159
154
|
this.cd.markForCheck();
|
|
160
155
|
});
|
|
161
156
|
}
|
|
@@ -164,7 +159,7 @@ class ThyTabs {
|
|
|
164
159
|
}
|
|
165
160
|
getTabContentMarginLeft() {
|
|
166
161
|
if (this.tabPaneAnimated) {
|
|
167
|
-
return `${-(this.activeTabIndex || 0) * 100}%`;
|
|
162
|
+
return `${-(this.activeTabIndex() || 0) * 100}%`;
|
|
168
163
|
}
|
|
169
164
|
return '';
|
|
170
165
|
}
|
|
@@ -172,14 +167,12 @@ class ThyTabs {
|
|
|
172
167
|
if (tab.thyDisabled()) {
|
|
173
168
|
return;
|
|
174
169
|
}
|
|
175
|
-
this.
|
|
176
|
-
this.thyAnimated() && (this.transitionStarted = this.activeTabIndex !== index);
|
|
177
|
-
this.activeTabIndex = index;
|
|
170
|
+
this.thyAnimated() && (this.transitionStarted = this.activeTabIndex() !== index);
|
|
178
171
|
const id = tab.id();
|
|
179
172
|
this.thyActiveTab.set(id ? id : index);
|
|
180
173
|
}
|
|
181
174
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTabs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
182
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyTabs, isStandalone: true, selector: "thy-tabs", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyActiveTab: { classPropertyName: "thyActiveTab", publicName: "thyActiveTab", isSignal: true, isRequired: false, transformFunction: null }, thyExtra: { classPropertyName: "thyExtra", publicName: "thyExtra", isSignal: true, isRequired: false, transformFunction: null }, thyPosition: { classPropertyName: "thyPosition", publicName: "thyPosition", isSignal: true, isRequired: false, transformFunction: null }, thyAnimated: { classPropertyName: "thyAnimated", publicName: "thyAnimated", isSignal: true, isRequired: false, transformFunction: null }, thyResponsive: { classPropertyName: "thyResponsive", publicName: "thyResponsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyActiveTab: "thyActiveTabChange" }, host: { properties: { "class.thy-tabs-top": "thyPosition() === 'top'", "class.thy-tabs-left": "thyPosition() === 'left'", "style.overflow": "transitionStarted ? \"hidden\" : null" }, classAttribute: "thy-tabs" }, queries: [{ propertyName: "tabs", predicate: ThyTab, descendants: true }], ngImport: i0, template: "<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType()\"\n [thySize]=\"thySize()\"\n [thyExtra]=\"thyExtra()\"\n [thyVertical]=\"thyPosition() === 'left'\"\n [thyResponsive]=\"thyResponsive()\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id()\"\n [thyNavItemDisabled]=\"tab.thyDisabled()\"\n [thyNavItemActive]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle() }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n", dependencies: [{ kind: "component", type: ThyNav, selector: "thy-nav", inputs: ["thyType", "thySize", "thyHorizontal", "thyVertical", "thyFill", "thyResponsive", "thyPauseReCalculate", "thyInsideClosable", "thyPopoverOptions", "thyExtra"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["id", "thyNavItemActive", "thyNavLinkActive", "thyNavItemDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyTabContent, selector: "thy-tab-content, [thyTabContent]", inputs: ["content", "active", "tabPaneAnimated"], exportAs: ["thyTabContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
175
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyTabs, isStandalone: true, selector: "thy-tabs", inputs: { thyType: { classPropertyName: "thyType", publicName: "thyType", isSignal: true, isRequired: false, transformFunction: null }, thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyActiveTab: { classPropertyName: "thyActiveTab", publicName: "thyActiveTab", isSignal: true, isRequired: false, transformFunction: null }, thyExtra: { classPropertyName: "thyExtra", publicName: "thyExtra", isSignal: true, isRequired: false, transformFunction: null }, thyPosition: { classPropertyName: "thyPosition", publicName: "thyPosition", isSignal: true, isRequired: false, transformFunction: null }, thyAnimated: { classPropertyName: "thyAnimated", publicName: "thyAnimated", isSignal: true, isRequired: false, transformFunction: null }, thyResponsive: { classPropertyName: "thyResponsive", publicName: "thyResponsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyActiveTab: "thyActiveTabChange" }, host: { properties: { "class.thy-tabs-top": "thyPosition() === 'top'", "class.thy-tabs-left": "thyPosition() === 'left'", "style.overflow": "transitionStarted ? \"hidden\" : null" }, classAttribute: "thy-tabs" }, queries: [{ propertyName: "tabs", predicate: ThyTab, descendants: true }], ngImport: i0, template: "<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType()\"\n [thySize]=\"thySize()\"\n [thyExtra]=\"thyExtra()\"\n [thyVertical]=\"thyPosition() === 'left'\"\n [thyResponsive]=\"thyResponsive()\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id()\"\n [thyNavItemDisabled]=\"tab.thyDisabled()\"\n [thyNavItemActive]=\"(tab.id() && activeTabId() && tab.id() === activeTabId()) ?? i === activeTabIndex()\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle() }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id() && activeTabId() && tab.id() === activeTabId()) ?? i === activeTabIndex()\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n", dependencies: [{ kind: "component", type: ThyNav, selector: "thy-nav", inputs: ["thyType", "thySize", "thyHorizontal", "thyVertical", "thyFill", "thyResponsive", "thyPauseReCalculate", "thyInsideClosable", "thyPopoverOptions", "thyExtra"] }, { kind: "directive", type: ThyNavItemDirective, selector: "[thyNavLink],[thyNavItem]", inputs: ["id", "thyNavItemActive", "thyNavLinkActive", "thyNavItemDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyTabContent, selector: "thy-tab-content, [thyTabContent]", inputs: ["content", "active", "tabPaneAnimated"], exportAs: ["thyTabContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
183
176
|
}
|
|
184
177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyTabs, decorators: [{
|
|
185
178
|
type: Component,
|
|
@@ -188,7 +181,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
188
181
|
'[class.thy-tabs-top]': `thyPosition() === 'top'`,
|
|
189
182
|
'[class.thy-tabs-left]': `thyPosition() === 'left'`,
|
|
190
183
|
'[style.overflow]': `transitionStarted ? "hidden" : null`
|
|
191
|
-
}, imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent], template: "<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType()\"\n [thySize]=\"thySize()\"\n [thyExtra]=\"thyExtra()\"\n [thyVertical]=\"thyPosition() === 'left'\"\n [thyResponsive]=\"thyResponsive()\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id()\"\n [thyNavItemDisabled]=\"tab.thyDisabled()\"\n [thyNavItemActive]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle() }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n" }]
|
|
184
|
+
}, imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent], template: "<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType()\"\n [thySize]=\"thySize()\"\n [thyExtra]=\"thyExtra()\"\n [thyVertical]=\"thyPosition() === 'left'\"\n [thyResponsive]=\"thyResponsive()\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id()\"\n [thyNavItemDisabled]=\"tab.thyDisabled()\"\n [thyNavItemActive]=\"(tab.id() && activeTabId() && tab.id() === activeTabId()) ?? i === activeTabIndex()\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle() }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id() && activeTabId() && tab.id() === activeTabId()) ?? i === activeTabIndex()\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n" }]
|
|
192
185
|
}], ctorParameters: () => [], propDecorators: { tabs: [{
|
|
193
186
|
type: ContentChildren,
|
|
194
187
|
args: [ThyTab, { descendants: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-tabs.mjs","sources":["../../../src/tabs/tab.component.ts","../../../src/tabs/tab-content.component.ts","../../../src/tabs/tabs.component.ts","../../../src/tabs/tabs.component.html","../../../src/tabs/tabs.module.ts","../../../src/tabs/ngx-tethys-tabs.ts"],"sourcesContent":["import { Component, OnInit, ChangeDetectionStrategy, ViewChild, TemplateRef, ContentChild, input } from '@angular/core';\nimport { coerceBooleanProperty, ThyBooleanInput } from 'ngx-tethys/util';\n\n/**\n * 选项卡的选项组件\n * @name thy-tab\n */\n@Component({\n selector: 'thy-tab',\n template: ` <ng-template #content><ng-content></ng-content></ng-template> `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThyTab implements OnInit {\n /**\n * 自定义选项标题的模板\n * @type TemplateRef\n */\n @ContentChild('title') titleTemplateRef: TemplateRef<unknown>;\n\n @ViewChild('content', { static: true }) content: TemplateRef<HTMLElement>;\n\n /**\n * 选项标题\n */\n readonly thyTitle = input<string>(undefined);\n\n /**\n * 选项的唯一标识\n */\n readonly id = input<string>(undefined);\n\n /**\n * 是否禁用选项\n * @default false\n */\n readonly thyDisabled = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, input } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { coerceBooleanProperty, ThyBooleanInput } from 'ngx-tethys/util';\n\n/**\n * @private\n */\n@Component({\n selector: 'thy-tab-content, [thyTabContent]',\n exportAs: 'thyTabContent',\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (active()) {\n <ng-template [ngTemplateOutlet]=\"content()\"></ng-template>\n }\n `,\n host: {\n class: 'thy-tab-content',\n '[attr.aria-hidden]': '!active()',\n '[attr.tabindex]': 'active() ? 0 : -1',\n '[style.visibility]': 'tabPaneAnimated() ? active() ? null : \"hidden\" : null',\n '[style.height]': 'tabPaneAnimated() ? active() ? null : 0 : null',\n '[style.overflow-y]': 'tabPaneAnimated() ? active() ? null : \"none\" : null',\n '[style.display]': '!tabPaneAnimated() ? active() ? null : \"none\" : null'\n },\n imports: [NgTemplateOutlet]\n})\nexport class ThyTabContent {\n readonly content = input<TemplateRef<void> | null>(null);\n\n readonly active = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n readonly tabPaneAnimated = input<boolean, ThyBooleanInput>(true, { transform: coerceBooleanProperty });\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n ElementRef,\n OnInit,\n QueryList,\n TemplateRef,\n effect,\n inject,\n input,\n output,\n model\n} from '@angular/core';\nimport { coerceBooleanProperty, isString, ThyBooleanInput } from 'ngx-tethys/util';\nimport { fromEvent } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThyTab } from './tab.component';\nimport { ThyActiveTabInfo, ThyTabActiveEvent } from './types';\nimport { ThyTabContent } from './tab-content.component';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ThyNav, ThyNavItemDirective } from 'ngx-tethys/nav';\n\nexport type ThyTabsSize = 'lg' | 'md' | 'sm';\n\nexport type ThyTabsType = 'pulled' | 'tabs' | 'pills' | 'lite';\n\nexport type ThyTabsPosition = 'top' | 'left';\n\n/**\n * 选项卡切换组件\n * @name thy-tabs\n */\n@Component({\n selector: 'thy-tabs',\n templateUrl: './tabs.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tabs',\n '[class.thy-tabs-top]': `thyPosition() === 'top'`,\n '[class.thy-tabs-left]': `thyPosition() === 'left'`,\n '[style.overflow]': `transitionStarted ? \"hidden\" : null`\n },\n imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent]\n})\nexport class ThyTabs implements OnInit, AfterContentInit {\n private cd = inject(ChangeDetectorRef);\n private el = inject(ElementRef);\n\n @ContentChildren(ThyTab, { descendants: true }) tabs = new QueryList<ThyTab>();\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * 标签类型\n * @type 'pulled' | 'tabs' | 'pills' | 'lite'\n */\n readonly thyType = input<ThyTabsType>('tabs');\n\n /**\n * 选项卡的大小\n * @type 'lg' | 'md' | 'sm'\n */\n readonly thySize = input<ThyTabsSize>('md');\n\n /**\n * 激活的项\n */\n readonly thyActiveTab = model<ThyActiveTabInfo>(0);\n\n /**\n * 附加操作\n */\n readonly thyExtra = input<TemplateRef<unknown>>(undefined);\n\n /**\n * 选项卡的位置\n * @type 'top' | 'left'\n */\n readonly thyPosition = input<ThyTabsPosition>('top');\n\n /**\n * 是否使用动画切换 Tabs\n */\n readonly thyAnimated = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n /**\n * 响应式,自动计算宽度存放 thyNavItem,并添加更多弹框\n */\n readonly thyResponsive = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n activeTabIndex: number = 0;\n\n activeTabId: string;\n\n transitionStarted: boolean = false;\n\n constructor() {\n effect(() => {\n const value = this.thyActiveTab();\n if (isString(value)) {\n this.activeTabId = value;\n this.activeTabIndex = undefined;\n } else {\n this.activeTabIndex = value;\n this.activeTabId = undefined;\n }\n });\n }\n\n ngOnInit(): void {\n const tabsContent = this.el.nativeElement.querySelector('.thy-tabs-content');\n fromEvent(tabsContent, 'transitionend')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.transitionStarted = false;\n this.cd.markForCheck();\n });\n }\n\n ngAfterContentInit() {\n this.tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {\n this.thyAnimated() && (this.transitionStarted = true);\n this.activeTabIndex = data.length - 1;\n this.cd.markForCheck();\n });\n }\n\n get tabPaneAnimated(): boolean {\n return this.thyPosition() === 'top' && this.thyAnimated();\n }\n\n getTabContentMarginLeft(): string {\n if (this.tabPaneAnimated) {\n return `${-(this.activeTabIndex || 0) * 100}%`;\n }\n return '';\n }\n\n activeTab(tab: ThyTab, index: number) {\n if (tab.thyDisabled()) {\n return;\n }\n this.activeTabId = tab.id() || null;\n this.thyAnimated() && (this.transitionStarted = this.activeTabIndex !== index);\n this.activeTabIndex = index;\n const id = tab.id();\n this.thyActiveTab.set(id ? id : index);\n }\n}\n","<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType()\"\n [thySize]=\"thySize()\"\n [thyExtra]=\"thyExtra()\"\n [thyVertical]=\"thyPosition() === 'left'\"\n [thyResponsive]=\"thyResponsive()\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id()\"\n [thyNavItemDisabled]=\"tab.thyDisabled()\"\n [thyNavItemActive]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle() }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id() && activeTabId && tab.id() === activeTabId) ?? i === activeTabIndex\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyTabs } from './tabs.component';\nimport { ThyTab } from './tab.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyNavModule } from 'ngx-tethys/nav';\nimport { ThyTabContent } from './tab-content.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyNavModule, ThyTabs, ThyTab, ThyTabContent],\n exports: [ThyTabs, ThyTab]\n})\nexport class ThyTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;AAGG;MAMU,MAAM,CAAA;AAyBf,IAAA,WAAA,GAAA;AAhBA;;AAEG;AACM,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,SAAS,CAAC;AAE5C;;AAEG;AACM,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,SAAS,CAAC;AAEtC;;;AAGG;QACM,IAAW,CAAA,WAAA,GAAG,KAAK,CAA2B,KAAK,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;;AAInG,IAAA,QAAQ;8GA3BC,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,kqBAHL,CAAiE,+DAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGlE,MAAM,EAAA,UAAA,EAAA,CAAA;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AAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAHZ,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CACzE,EAAA,OAAA,EAAA,CAAA,OAAO,EAAE,MAAM,CAAA,EAAA,CAAA,CAAA;AAEhB,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,aAAa,YAHZ,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAGnD,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM;AAC5B,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-tabs.mjs","sources":["../../../src/tabs/tab-content.component.ts","../../../src/tabs/tab.component.ts","../../../src/tabs/tabs.component.ts","../../../src/tabs/tabs.component.html","../../../src/tabs/tabs.module.ts","../../../src/tabs/ngx-tethys-tabs.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, input } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { coerceBooleanProperty, ThyBooleanInput } from 'ngx-tethys/util';\n\n/**\n * @private\n */\n@Component({\n selector: 'thy-tab-content, [thyTabContent]',\n exportAs: 'thyTabContent',\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (active()) {\n <ng-template [ngTemplateOutlet]=\"content()\"></ng-template>\n }\n `,\n host: {\n class: 'thy-tab-content',\n '[attr.aria-hidden]': '!active()',\n '[attr.tabindex]': 'active() ? 0 : -1',\n '[style.visibility]': 'tabPaneAnimated() ? active() ? null : \"hidden\" : null',\n '[style.height]': 'tabPaneAnimated() ? active() ? null : 0 : null',\n '[style.overflow-y]': 'tabPaneAnimated() ? active() ? null : \"none\" : null',\n '[style.display]': '!tabPaneAnimated() ? active() ? null : \"none\" : null'\n },\n imports: [NgTemplateOutlet]\n})\nexport class ThyTabContent {\n readonly content = input<TemplateRef<void> | null>(null);\n\n readonly active = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n readonly tabPaneAnimated = input<boolean, ThyBooleanInput>(true, { transform: coerceBooleanProperty });\n}\n","import { Component, OnInit, ChangeDetectionStrategy, ViewChild, TemplateRef, ContentChild, input } from '@angular/core';\nimport { coerceBooleanProperty, ThyBooleanInput } from 'ngx-tethys/util';\n\n/**\n * 选项卡的选项组件\n * @name thy-tab\n */\n@Component({\n selector: 'thy-tab',\n template: ` <ng-template #content><ng-content></ng-content></ng-template> `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThyTab implements OnInit {\n /**\n * 自定义选项标题的模板\n * @type TemplateRef\n */\n @ContentChild('title') titleTemplateRef: TemplateRef<unknown>;\n\n @ViewChild('content', { static: true }) content: TemplateRef<HTMLElement>;\n\n /**\n * 选项标题\n */\n readonly thyTitle = input<string>(undefined);\n\n /**\n * 选项的唯一标识\n */\n readonly id = input<string>(undefined);\n\n /**\n * 是否禁用选项\n * @default false\n */\n readonly thyDisabled = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n DestroyRef,\n ElementRef,\n inject,\n input,\n linkedSignal,\n model,\n OnInit,\n QueryList,\n TemplateRef\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThyNav, ThyNavItemDirective } from 'ngx-tethys/nav';\nimport { coerceBooleanProperty, isNumber, ThyBooleanInput } from 'ngx-tethys/util';\nimport { fromEvent } from 'rxjs';\nimport { ThyTabContent } from './tab-content.component';\nimport { ThyTab } from './tab.component';\nimport { ThyActiveTabInfo } from './types';\n\nexport type ThyTabsSize = 'lg' | 'md' | 'sm';\n\nexport type ThyTabsType = 'pulled' | 'tabs' | 'pills' | 'lite';\n\nexport type ThyTabsPosition = 'top' | 'left';\n\n/**\n * 选项卡切换组件\n * @name thy-tabs\n */\n@Component({\n selector: 'thy-tabs',\n templateUrl: './tabs.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-tabs',\n '[class.thy-tabs-top]': `thyPosition() === 'top'`,\n '[class.thy-tabs-left]': `thyPosition() === 'left'`,\n '[style.overflow]': `transitionStarted ? \"hidden\" : null`\n },\n imports: [ThyNav, ThyNavItemDirective, NgTemplateOutlet, ThyTabContent]\n})\nexport class ThyTabs implements OnInit, AfterContentInit {\n private cd = inject(ChangeDetectorRef);\n private el = inject(ElementRef);\n\n @ContentChildren(ThyTab, { descendants: true }) tabs = new QueryList<ThyTab>();\n\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * 标签类型\n * @type 'pulled' | 'tabs' | 'pills' | 'lite'\n */\n readonly thyType = input<ThyTabsType>('tabs');\n\n /**\n * 选项卡的大小\n * @type 'lg' | 'md' | 'sm'\n */\n readonly thySize = input<ThyTabsSize>('md');\n\n /**\n * 激活的项\n */\n readonly thyActiveTab = model<ThyActiveTabInfo>(0);\n\n /**\n * 附加操作\n */\n readonly thyExtra = input<TemplateRef<unknown>>(undefined);\n\n /**\n * 选项卡的位置\n * @type 'top' | 'left'\n */\n readonly thyPosition = input<ThyTabsPosition>('top');\n\n /**\n * 是否使用动画切换 Tabs\n */\n readonly thyAnimated = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n /**\n * 响应式,自动计算宽度存放 thyNavItem,并添加更多弹框\n */\n readonly thyResponsive = input<boolean, ThyBooleanInput>(false, { transform: coerceBooleanProperty });\n\n readonly activeTabIndex = linkedSignal(() => {\n const activeTab = this.thyActiveTab();\n return isNumber(activeTab) ? activeTab : undefined;\n });\n\n readonly activeTabId = linkedSignal(() => {\n return this.thyActiveTab() ?? undefined;\n });\n\n transitionStarted: boolean = false;\n\n constructor() {}\n\n ngOnInit(): void {\n const tabsContent = this.el.nativeElement.querySelector('.thy-tabs-content');\n fromEvent(tabsContent, 'transitionend')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.transitionStarted = false;\n this.cd.markForCheck();\n });\n }\n\n ngAfterContentInit() {\n this.tabs.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {\n this.thyAnimated() && (this.transitionStarted = true);\n this.activeTabIndex.set(data.length - 1);\n this.cd.markForCheck();\n });\n }\n\n get tabPaneAnimated(): boolean {\n return this.thyPosition() === 'top' && this.thyAnimated();\n }\n\n getTabContentMarginLeft(): string {\n if (this.tabPaneAnimated) {\n return `${-(this.activeTabIndex() || 0) * 100}%`;\n }\n return '';\n }\n\n activeTab(tab: ThyTab, index: number) {\n if (tab.thyDisabled()) {\n return;\n }\n this.thyAnimated() && (this.transitionStarted = this.activeTabIndex() !== index);\n const id = tab.id();\n this.thyActiveTab.set(id ? id : index);\n }\n}\n","<!-- tabs nav -->\n<thy-nav\n class=\"thy-tabs-nav\"\n [thyType]=\"thyType()\"\n [thySize]=\"thySize()\"\n [thyExtra]=\"thyExtra()\"\n [thyVertical]=\"thyPosition() === 'left'\"\n [thyResponsive]=\"thyResponsive()\">\n @for (tab of tabs; track $index; let i = $index) {\n <a\n href=\"javascript:;\"\n thyNavItem\n [id]=\"tab.id()\"\n [thyNavItemDisabled]=\"tab.thyDisabled()\"\n [thyNavItemActive]=\"(tab.id() && activeTabId() && tab.id() === activeTabId()) ?? i === activeTabIndex()\"\n (click)=\"activeTab(tab, i)\">\n @if (tab.titleTemplateRef) {\n <ng-template [ngTemplateOutlet]=\"tab.titleTemplateRef\"></ng-template>\n } @else {\n {{ tab.thyTitle() }}\n }\n </a>\n }\n</thy-nav>\n<!-- tabs content -->\n<div class=\"thy-tabs-content\" [class.thy-tabs-content-animated]=\"tabPaneAnimated\" [style.margin-left]=\"getTabContentMarginLeft()\">\n @for (tab of tabs; track $index; let i = $index) {\n <div\n thyTabContent\n [active]=\"(tab.id() && activeTabId() && tab.id() === activeTabId()) ?? i === activeTabIndex()\"\n [content]=\"tab.content\"\n [tabPaneAnimated]=\"tabPaneAnimated\"></div>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyTabs } from './tabs.component';\nimport { ThyTab } from './tab.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyNavModule } from 'ngx-tethys/nav';\nimport { ThyTabContent } from './tab-content.component';\n\n@NgModule({\n imports: [CommonModule, ThyIconModule, ThyNavModule, ThyTabs, ThyTab, ThyTabContent],\n exports: [ThyTabs, ThyTab]\n})\nexport class ThyTabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAIA;;AAEG;MAuBU,aAAa,CAAA;AAtB1B,IAAA,WAAA,GAAA;AAuBa,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAA2B,IAAI,CAAC;QAE/C,IAAM,CAAA,MAAA,GAAG,KAAK,CAA2B,KAAK,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;QAErF,IAAe,CAAA,eAAA,GAAG,KAAK,CAA2B,IAAI,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;AACzG;8GANY,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,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AAA,EAAA,CAAA,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;;MEvCrC,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,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,aAAa,EAHZ,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CACzE,EAAA,OAAA,EAAA,CAAA,OAAO,EAAE,MAAM,CAAA,EAAA,CAAA,CAAA;AAEhB,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,aAAa,YAHZ,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAGnD,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC;AACpF,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM;AAC5B,iBAAA;;;ACXD;;AAEG;;;;"}
|
package/fesm2022/ngx-tethys.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys.mjs","sources":["../../../src/version.ts","../../../src/ngx-tethys.ts"],"sourcesContent":["import { Version } from '@angular/core';\n\nexport const VERSION = new Version('19.1.
|
|
1
|
+
{"version":3,"file":"ngx-tethys.mjs","sources":["../../../src/version.ts","../../../src/ngx-tethys.ts"],"sourcesContent":["import { Version } from '@angular/core';\n\nexport const VERSION = new Version('19.1.1');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;MAEa,OAAO,GAAG,IAAI,OAAO,CAAC,QAAQ;;ACF3C;;AAEG;;;;"}
|
package/package.json
CHANGED
package/schematics/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "19.1.
|
|
1
|
+
export declare const VERSION = "19.1.1";
|
package/schematics/version.js
CHANGED
package/tabs/tabs.component.d.ts
CHANGED
|
@@ -45,8 +45,8 @@ export declare class ThyTabs implements OnInit, AfterContentInit {
|
|
|
45
45
|
* 响应式,自动计算宽度存放 thyNavItem,并添加更多弹框
|
|
46
46
|
*/
|
|
47
47
|
readonly thyResponsive: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
48
|
-
activeTabIndex: number
|
|
49
|
-
activeTabId:
|
|
48
|
+
readonly activeTabIndex: import("@angular/core").WritableSignal<number>;
|
|
49
|
+
readonly activeTabId: import("@angular/core").WritableSignal<ThyActiveTabInfo>;
|
|
50
50
|
transitionStarted: boolean;
|
|
51
51
|
constructor();
|
|
52
52
|
ngOnInit(): void;
|