@testgorilla/tgo-ui 10.2.0 → 10.4.0
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/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +3 -2
- package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +85 -6
- package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
- package/mcp/catalog.json +1 -1
- package/package.json +1 -1
- package/types/testgorilla-tgo-ui-components-side-panel.d.ts +2 -1
- package/types/testgorilla-tgo-ui-components-tabs.d.ts +42 -2
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ declare enum SidePanelAnimationState {
|
|
|
11
11
|
ClosedRight = "closedRight",
|
|
12
12
|
ClosedLeft = "closedLeft"
|
|
13
13
|
}
|
|
14
|
-
type SidePanelSize = 'small' | 'large';
|
|
14
|
+
type SidePanelSize = 'small' | 'large' | 'x-large';
|
|
15
15
|
declare class SidePanelConfig {
|
|
16
16
|
title: string;
|
|
17
17
|
position: SidePanelPosition;
|
|
@@ -59,6 +59,7 @@ declare class SidePanelComponent {
|
|
|
59
59
|
size: _angular_core.WritableSignal<SidePanelSize | undefined>;
|
|
60
60
|
isSmall: _angular_core.Signal<boolean>;
|
|
61
61
|
isLarge: _angular_core.Signal<boolean>;
|
|
62
|
+
isXLarge: _angular_core.Signal<boolean>;
|
|
62
63
|
animation: _angular_core.Signal<SidePanelAnimationState.Open | SidePanelAnimationState.ClosedRight | SidePanelAnimationState.ClosedLeft>;
|
|
63
64
|
private readonly sidePanelService;
|
|
64
65
|
sidePanelConfig: SidePanelConfig;
|
|
@@ -28,6 +28,7 @@ interface Tab {
|
|
|
28
28
|
order?: number;
|
|
29
29
|
skeletonTheme?: NgxSkeletonLoaderConfigTheme;
|
|
30
30
|
isSkeletonAiTheme?: boolean;
|
|
31
|
+
isLabelLoading?: boolean;
|
|
31
32
|
}
|
|
32
33
|
type TabsType = 'underlined' | 'filled';
|
|
33
34
|
declare const TAB_HEADER_SIZE: {
|
|
@@ -51,6 +52,7 @@ declare class TabDirective implements OnInit {
|
|
|
51
52
|
order: _angular_core.InputSignal<number | undefined>;
|
|
52
53
|
skeletonTheme: _angular_core.InputSignal<NgxSkeletonLoaderConfigTheme | undefined>;
|
|
53
54
|
isSkeletonAiTheme: _angular_core.InputSignal<boolean | undefined>;
|
|
55
|
+
isLabelLoading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
54
56
|
private readonly tabsComponent;
|
|
55
57
|
private readonly template;
|
|
56
58
|
private readonly syncProps;
|
|
@@ -58,7 +60,7 @@ declare class TabDirective implements OnInit {
|
|
|
58
60
|
ngOnInit(): void;
|
|
59
61
|
private addTab;
|
|
60
62
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabDirective, never>;
|
|
61
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabDirective, "ng-template[uiTab]", never, { "tabLabel": { "alias": "tabLabel"; "required": true; "isSignal": true; }; "tabName": { "alias": "tabName"; "required": true; "isSignal": true; }; "iconLeft": { "alias": "iconLeft"; "required": false; "isSignal": true; }; "iconRight": { "alias": "iconRight"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "canLeave": { "alias": "canLeave"; "required": false; "isSignal": true; }; "linkUrl": { "alias": "linkUrl"; "required": false; "isSignal": true; }; "order": { "alias": "order"; "required": false; "isSignal": true; }; "skeletonTheme": { "alias": "skeletonTheme"; "required": false; "isSignal": true; }; "isSkeletonAiTheme": { "alias": "isSkeletonAiTheme"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
63
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabDirective, "ng-template[uiTab]", never, { "tabLabel": { "alias": "tabLabel"; "required": true; "isSignal": true; }; "tabName": { "alias": "tabName"; "required": true; "isSignal": true; }; "iconLeft": { "alias": "iconLeft"; "required": false; "isSignal": true; }; "iconRight": { "alias": "iconRight"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "canLeave": { "alias": "canLeave"; "required": false; "isSignal": true; }; "linkUrl": { "alias": "linkUrl"; "required": false; "isSignal": true; }; "order": { "alias": "order"; "required": false; "isSignal": true; }; "skeletonTheme": { "alias": "skeletonTheme"; "required": false; "isSignal": true; }; "isSkeletonAiTheme": { "alias": "isSkeletonAiTheme"; "required": false; "isSignal": true; }; "isLabelLoading": { "alias": "isLabelLoading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
declare class TabsComponent implements AfterViewInit {
|
|
@@ -111,6 +113,23 @@ declare class TabsComponent implements AfterViewInit {
|
|
|
111
113
|
applicationTheme: ApplicationTheme;
|
|
112
114
|
tabHeaderSize: _angular_core.InputSignal<TabHeaderSize>;
|
|
113
115
|
isLoading: _angular_core.InputSignal<boolean>;
|
|
116
|
+
/**
|
|
117
|
+
* Name of the tab to show. Applied as tabs register, so a tab requested before the
|
|
118
|
+
* projected `ng-template uiTab` children exist — a deep link, a query param — is still
|
|
119
|
+
* honoured on first paint, with no need to call `selectTab()` from a lifecycle hook.
|
|
120
|
+
*
|
|
121
|
+
* This is a request, not live state: it is applied when the value changes and once more as
|
|
122
|
+
* soon as the named tab registers, but a later click or a change to the tab list will not
|
|
123
|
+
* snap the selection back to it. An unknown name is a no-op — while tabs are still
|
|
124
|
+
* registering every name is unknown, so it cannot warn or throw. Bind a name the consumer
|
|
125
|
+
* has already validated.
|
|
126
|
+
*
|
|
127
|
+
* Applying it does not emit `selectedTab` / `selectedTabIndex` (the consumer supplied the
|
|
128
|
+
* value, so echoing it back would double-handle it) and does not consult the current tab's
|
|
129
|
+
* `canLeave` — declarative selection is the consumer's own decision, so it owns any
|
|
130
|
+
* guarding around the value it binds. User-driven switches still honour `canLeave`.
|
|
131
|
+
*/
|
|
132
|
+
readonly selectedTabName: _angular_core.InputSignal<string | null>;
|
|
114
133
|
selectedTabIndex: EventEmitter<number>;
|
|
115
134
|
selectedTab: EventEmitter<Tab>;
|
|
116
135
|
tabGroup: MatTabGroup;
|
|
@@ -119,11 +138,32 @@ declare class TabsComponent implements AfterViewInit {
|
|
|
119
138
|
protected tabIndexMap: Record<string, number>;
|
|
120
139
|
private insertionCounter;
|
|
121
140
|
private tabTransitionInProgress;
|
|
141
|
+
private requestedTabName;
|
|
122
142
|
constructor(defaultAppTheme: ApplicationTheme, isMobile$: Observable<boolean>, cdr: ChangeDetectorRef);
|
|
123
143
|
ngAfterViewInit(): void;
|
|
124
144
|
addTab(tab: Tab): void;
|
|
125
145
|
private sortTabs;
|
|
126
146
|
private updateTabIndexMap;
|
|
147
|
+
private get activeTabName();
|
|
148
|
+
/**
|
|
149
|
+
* `tabIndex` stores a position, but the selection it stands for is a tab identity, and
|
|
150
|
+
* adding, removing or re-ordering tabs shifts positions. Without re-resolving the index
|
|
151
|
+
* from the name, `tabIndex` keeps pointing at whatever tab now sits at that position —
|
|
152
|
+
* MatTabGroup re-derives its own selection from the active tab, so the body stays correct
|
|
153
|
+
* while this component's `aria-selected` and click gating silently drift onto a different
|
|
154
|
+
* tab. Falls back to clamping when the active tab is the one that went away.
|
|
155
|
+
*/
|
|
156
|
+
private reconcileTabIndex;
|
|
157
|
+
/**
|
|
158
|
+
* Applies `selectedTabName` once the named tab is known, then clears the request so later
|
|
159
|
+
* clicks and tab list changes are not overridden by a stale value. Stays armed while the
|
|
160
|
+
* name is unresolved, because a requested tab can register after the input is set — either
|
|
161
|
+
* with the rest of a subtree that renders late, or later still if it is behind its own
|
|
162
|
+
* condition — so `addTab()` retries until it resolves.
|
|
163
|
+
*
|
|
164
|
+
* Silent by design — see the doc on `selectedTabName`.
|
|
165
|
+
*/
|
|
166
|
+
private applyRequestedTabName;
|
|
127
167
|
onTabChange(index: number): void;
|
|
128
168
|
selectTab(tabName: string): void;
|
|
129
169
|
indexOf(tabName: string): number;
|
|
@@ -131,7 +171,7 @@ declare class TabsComponent implements AfterViewInit {
|
|
|
131
171
|
removeTab(tabName: string): void;
|
|
132
172
|
updateTab(tabName: string, tab: Partial<Omit<Tab, 'tabName'>>): void;
|
|
133
173
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabsComponent, [{ optional: true; }, null, null]>;
|
|
134
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabsComponent, "ui-tabs", never, { "companyColor": { "alias": "companyColor"; "required": false; }; "type": { "alias": "type"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "headerContentPadding": { "alias": "headerContentPadding"; "required": false; }; "dynamicHeight": { "alias": "dynamicHeight"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "tabHeaderSize": { "alias": "tabHeaderSize"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; }, { "selectedTabIndex": "selectedTabIndex"; "selectedTab": "selectedTab"; }, never, never, true, never>;
|
|
174
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabsComponent, "ui-tabs", never, { "companyColor": { "alias": "companyColor"; "required": false; }; "type": { "alias": "type"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "headerContentPadding": { "alias": "headerContentPadding"; "required": false; }; "dynamicHeight": { "alias": "dynamicHeight"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "tabHeaderSize": { "alias": "tabHeaderSize"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "selectedTabName": { "alias": "selectedTabName"; "required": false; "isSignal": true; }; }, { "selectedTabIndex": "selectedTabIndex"; "selectedTab": "selectedTab"; }, never, never, true, never>;
|
|
135
175
|
static ngAcceptInputType_headerContentPadding: number;
|
|
136
176
|
static ngAcceptInputType_dynamicHeight: unknown;
|
|
137
177
|
}
|