@praxisui/tabs 8.0.0-beta.2 → 8.0.0-beta.20
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/README.md +76 -12
- package/fesm2022/praxisui-tabs.mjs +545 -87
- package/index.d.ts +34 -3
- package/package.json +8 -4
- package/src/lib/praxis-tabs-config-editor.json-api.md +597 -0
- package/src/lib/praxis-tabs.json-api.md +976 -0
- package/src/lib/quick-setup/tabs-quick-setup.json-api.md +491 -0
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, Provider } from '@angular/core';
|
|
3
3
|
import { MatTabChangeEvent } from '@angular/material/tabs';
|
|
4
|
-
import { AiCapability, WidgetDefinition, WidgetEventEnvelope, WidgetEventPathSegment, PraxisI18nConfig, ComponentDocMeta, ComponentMetadataRegistry, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog } from '@praxisui/core';
|
|
4
|
+
import { AiCapability, WidgetDefinition, WidgetEventEnvelope, WidgetEventPathSegment, PraxisI18nConfig, ComponentDocMeta, ComponentMetadataRegistry, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog, ComponentAuthoringManifest } from '@praxisui/core';
|
|
5
5
|
import { FormGroup } from '@angular/forms';
|
|
6
6
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
7
7
|
import { BaseAiAdapter, PatchResult } from '@praxisui/ai';
|
|
@@ -81,9 +81,11 @@ interface TabMetadata {
|
|
|
81
81
|
ariaLabel?: string;
|
|
82
82
|
ariaLabelledby?: string;
|
|
83
83
|
textLabel?: string;
|
|
84
|
+
icon?: string;
|
|
84
85
|
labelClass?: string | string[];
|
|
85
86
|
bodyClass?: string | string[];
|
|
86
87
|
disabled?: boolean;
|
|
88
|
+
visible?: boolean;
|
|
87
89
|
content?: any[];
|
|
88
90
|
widgets?: WidgetDefinition[];
|
|
89
91
|
isActive?: boolean;
|
|
@@ -106,8 +108,10 @@ interface TabNavMetadata {
|
|
|
106
108
|
interface TabLinkMetadata {
|
|
107
109
|
id?: string;
|
|
108
110
|
label: string;
|
|
111
|
+
icon?: string;
|
|
109
112
|
active?: boolean;
|
|
110
113
|
disabled?: boolean;
|
|
114
|
+
visible?: boolean;
|
|
111
115
|
disableRipple?: boolean;
|
|
112
116
|
fitInkBarToContent?: boolean;
|
|
113
117
|
content?: any[];
|
|
@@ -140,6 +144,7 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
140
144
|
config: TabsMetadata | null;
|
|
141
145
|
tabsId: string;
|
|
142
146
|
componentInstanceId?: string;
|
|
147
|
+
set selectedIndex(index: number | null | undefined);
|
|
143
148
|
enableCustomization: boolean;
|
|
144
149
|
form: FormGroup | null;
|
|
145
150
|
context: Record<string, any> | null;
|
|
@@ -155,6 +160,7 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
155
160
|
protected selectedIndexSignal: i0.WritableSignal<number>;
|
|
156
161
|
private groupLoaded;
|
|
157
162
|
private navLoaded;
|
|
163
|
+
private controlledSelectedIndex?;
|
|
158
164
|
private readonly destroy$;
|
|
159
165
|
private readonly widgetDefinitionCache;
|
|
160
166
|
ngOnInit(): void;
|
|
@@ -163,9 +169,23 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
163
169
|
isNavMode(): boolean;
|
|
164
170
|
effectiveAnimationDuration(): string;
|
|
165
171
|
getNavActive(i: number): boolean;
|
|
172
|
+
protected visibleNavLinkEntries(): Array<{
|
|
173
|
+
link: TabLinkMetadata;
|
|
174
|
+
index: number;
|
|
175
|
+
}>;
|
|
176
|
+
protected visibleTabEntries(): Array<{
|
|
177
|
+
tab: TabMetadata;
|
|
178
|
+
index: number;
|
|
179
|
+
}>;
|
|
180
|
+
protected selectedVisibleNavIndex(): number;
|
|
181
|
+
protected selectedVisibleTabIndex(): number;
|
|
182
|
+
protected onVisibleTabIndexChange(index: number): void;
|
|
166
183
|
onNavClick(i: number): void;
|
|
167
184
|
onNavDrop(event: CdkDragDrop<any>): void;
|
|
185
|
+
protected onVisibleNavDrop(event: CdkDragDrop<any>): void;
|
|
168
186
|
onSelectedIndexChange(index: number): void;
|
|
187
|
+
private applySelectedIndex;
|
|
188
|
+
private reapplyControlledSelectedIndex;
|
|
169
189
|
closeTab(index: number): void;
|
|
170
190
|
moveTab(index: number, delta: number): void;
|
|
171
191
|
openEditor(): void;
|
|
@@ -178,6 +198,7 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
178
198
|
private applyTabsAuthoringPlan;
|
|
179
199
|
private storageKey;
|
|
180
200
|
private syncSelectionFromConfig;
|
|
201
|
+
private pruneLoadedIndexes;
|
|
181
202
|
private persistConfig;
|
|
182
203
|
private componentKeyId;
|
|
183
204
|
private warnMissingId;
|
|
@@ -187,6 +208,14 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
187
208
|
protected groupContentReady(index: number): boolean;
|
|
188
209
|
protected navContentReady(index: number): boolean;
|
|
189
210
|
protected isEmptyGlobal(): boolean;
|
|
211
|
+
protected trackVisibleNavLink(index: number, entry: {
|
|
212
|
+
link: TabLinkMetadata;
|
|
213
|
+
index: number;
|
|
214
|
+
}): string;
|
|
215
|
+
protected trackVisibleTab(index: number, entry: {
|
|
216
|
+
tab: TabMetadata;
|
|
217
|
+
index: number;
|
|
218
|
+
}): string;
|
|
190
219
|
protected trackNavLink(index: number, link: TabLinkMetadata): string;
|
|
191
220
|
protected trackTab(index: number, tab: TabMetadata): string;
|
|
192
221
|
protected trackWidgetDefinition(index: number, widget: WidgetDefinition): string;
|
|
@@ -200,7 +229,7 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
200
229
|
protected styleCss(): string | null;
|
|
201
230
|
private cloneWidgetDefinition;
|
|
202
231
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTabs, never>;
|
|
203
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTabs, "praxis-tabs", never, { "config": { "alias": "config"; "required": false; }; "tabsId": { "alias": "tabsId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "form": { "alias": "form"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, { "animationDone": "animationDone"; "focusChange": "focusChange"; "selectedIndexChange": "selectedIndexChange"; "selectedTabChange": "selectedTabChange"; "indexFocused": "indexFocused"; "selectFocusedIndex": "selectFocusedIndex"; "widgetEvent": "widgetEvent"; }, never, never, true, never>;
|
|
232
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTabs, "praxis-tabs", never, { "config": { "alias": "config"; "required": false; }; "tabsId": { "alias": "tabsId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "form": { "alias": "form"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, { "animationDone": "animationDone"; "focusChange": "focusChange"; "selectedIndexChange": "selectedIndexChange"; "selectedTabChange": "selectedTabChange"; "indexFocused": "indexFocused"; "selectFocusedIndex": "selectFocusedIndex"; "widgetEvent": "widgetEvent"; }, never, never, true, never>;
|
|
204
233
|
}
|
|
205
234
|
|
|
206
235
|
declare const PRAXIS_TABS_I18N_NAMESPACE = "praxisTabs";
|
|
@@ -412,5 +441,7 @@ interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
|
412
441
|
}
|
|
413
442
|
declare const TABS_AI_CAPABILITIES: CapabilityCatalog;
|
|
414
443
|
|
|
415
|
-
|
|
444
|
+
declare const PRAXIS_TABS_AUTHORING_MANIFEST: ComponentAuthoringManifest;
|
|
445
|
+
|
|
446
|
+
export { PRAXIS_TABS_AUTHORING_MANIFEST, PRAXIS_TABS_COMPONENT_METADATA, PRAXIS_TABS_I18N_CONFIG, PRAXIS_TABS_I18N_NAMESPACE, PraxisTabs, PraxisTabsConfigEditor, TABS_AI_CAPABILITIES, buildTabsApplyPlan, createPraxisTabsI18nConfig, createTabsAuthoringDocument, normalizeTabsAuthoringDocument, providePraxisTabsI18n, providePraxisTabsMetadata, serializeTabsAuthoringDocument, toCanonicalTabsConfig, validateTabsAuthoringDocument };
|
|
416
447
|
export type { Capability, CapabilityCatalog, CapabilityCategory, TabGroupMetadata, TabLinkMetadata, TabMetadata, TabNavMetadata, TabsAccessibilityConfig, TabsAppearanceConfig, TabsApplyPlan, TabsAuthoringBindings, TabsAuthoringDocument, TabsBehaviorConfig, TabsBindingsDiff, TabsEditorDiagnostic, TabsEditorDiagnosticLevel, TabsEditorDocumentKind, TabsEventConfig, TabsMetadata, TabsRuntimeContext, TabsRuntimePlan, TabsStyleTokens, ValueKind };
|
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/tabs",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.20",
|
|
4
4
|
"description": "Configurable tabs (group and nav) for Praxis UI with metadata-driven content and runtime editor.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
8
|
"@angular/material": "^20.0.0",
|
|
9
9
|
"@angular/cdk": "^20.0.0",
|
|
10
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
11
|
-
"@praxisui/dynamic-fields": "^8.0.0-beta.
|
|
12
|
-
"@praxisui/settings-panel": "^8.0.0-beta.
|
|
10
|
+
"@praxisui/core": "^8.0.0-beta.20",
|
|
11
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.20",
|
|
12
|
+
"@praxisui/settings-panel": "^8.0.0-beta.20",
|
|
13
|
+
"@angular/forms": "^20.0.0",
|
|
14
|
+
"@angular/router": "^20.0.0",
|
|
15
|
+
"@praxisui/ai": "^8.0.0-beta.20",
|
|
16
|
+
"rxjs": "~7.8.0"
|
|
13
17
|
},
|
|
14
18
|
"dependencies": {
|
|
15
19
|
"tslib": "^2.3.0",
|