@praxisui/tabs 8.0.0-beta.2 → 8.0.0-beta.21
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 +85 -12
- package/fesm2022/praxisui-tabs.mjs +1471 -98
- package/index.d.ts +119 -7
- 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 +978 -0
- package/src/lib/quick-setup/tabs-quick-setup.json-api.md +491 -0
package/index.d.ts
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, Provider } from '@angular/core';
|
|
2
|
+
import { OnInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, Provider, AfterViewInit } 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, SettingsValueProvider as SettingsValueProvider$1, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog, ComponentAuthoringManifest } from '@praxisui/core';
|
|
5
5
|
import { FormGroup } from '@angular/forms';
|
|
6
6
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
7
|
-
import { BaseAiAdapter, PatchResult } from '@praxisui/ai';
|
|
7
|
+
import { BaseAiAdapter, PatchResult, PraxisAssistantTurnViewState, PraxisAssistantShellLayout, PraxisAssistantShellLabels, PraxisAssistantSessionSnapshot, PraxisAssistantShellQuickReply, PraxisAssistantShellMessage } from '@praxisui/ai';
|
|
8
8
|
import { BehaviorSubject } from 'rxjs';
|
|
9
9
|
import { SettingsValueProvider } from '@praxisui/settings-panel';
|
|
10
10
|
|
|
11
11
|
declare class TabsAiAdapter extends BaseAiAdapter<TabsMetadata> {
|
|
12
12
|
private tabs;
|
|
13
13
|
componentName: string;
|
|
14
|
+
componentId: string;
|
|
15
|
+
componentType: string;
|
|
14
16
|
constructor(tabs: PraxisTabs);
|
|
15
17
|
getCurrentConfig(): TabsMetadata;
|
|
16
18
|
getCapabilities(): AiCapability[];
|
|
19
|
+
getDataProfile(): Record<string, any>;
|
|
20
|
+
getSchemaFields(): Record<string, any>[];
|
|
21
|
+
getAuthoringContext(): Record<string, any>;
|
|
17
22
|
getRuntimeState(): Record<string, any>;
|
|
18
23
|
createSnapshot(): TabsMetadata;
|
|
19
24
|
restoreSnapshot(snapshot: TabsMetadata): Promise<void>;
|
|
@@ -81,9 +86,11 @@ interface TabMetadata {
|
|
|
81
86
|
ariaLabel?: string;
|
|
82
87
|
ariaLabelledby?: string;
|
|
83
88
|
textLabel?: string;
|
|
89
|
+
icon?: string;
|
|
84
90
|
labelClass?: string | string[];
|
|
85
91
|
bodyClass?: string | string[];
|
|
86
92
|
disabled?: boolean;
|
|
93
|
+
visible?: boolean;
|
|
87
94
|
content?: any[];
|
|
88
95
|
widgets?: WidgetDefinition[];
|
|
89
96
|
isActive?: boolean;
|
|
@@ -106,8 +113,10 @@ interface TabNavMetadata {
|
|
|
106
113
|
interface TabLinkMetadata {
|
|
107
114
|
id?: string;
|
|
108
115
|
label: string;
|
|
116
|
+
icon?: string;
|
|
109
117
|
active?: boolean;
|
|
110
118
|
disabled?: boolean;
|
|
119
|
+
visible?: boolean;
|
|
111
120
|
disableRipple?: boolean;
|
|
112
121
|
fitInkBarToContent?: boolean;
|
|
113
122
|
content?: any[];
|
|
@@ -135,11 +144,17 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
135
144
|
private readonly snack;
|
|
136
145
|
private readonly componentKeys;
|
|
137
146
|
private readonly logger;
|
|
147
|
+
private readonly cdr;
|
|
148
|
+
private readonly aiApi;
|
|
149
|
+
private readonly assistantSessions;
|
|
150
|
+
private readonly aiTurnOrchestrator;
|
|
138
151
|
private readonly route;
|
|
152
|
+
private readonly aiAssistantSessionEffect;
|
|
139
153
|
private warnedMissingId;
|
|
140
154
|
config: TabsMetadata | null;
|
|
141
155
|
tabsId: string;
|
|
142
156
|
componentInstanceId?: string;
|
|
157
|
+
set selectedIndex(index: number | null | undefined);
|
|
143
158
|
enableCustomization: boolean;
|
|
144
159
|
form: FormGroup | null;
|
|
145
160
|
context: Record<string, any> | null;
|
|
@@ -151,10 +166,18 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
151
166
|
selectFocusedIndex: EventEmitter<number>;
|
|
152
167
|
widgetEvent: EventEmitter<WidgetEventEnvelope>;
|
|
153
168
|
aiAdapter: TabsAiAdapter;
|
|
169
|
+
aiAssistantOpen: boolean;
|
|
170
|
+
aiAssistantPrompt: string;
|
|
171
|
+
aiAssistantViewState: PraxisAssistantTurnViewState | null;
|
|
172
|
+
aiAssistantLayout: PraxisAssistantShellLayout;
|
|
173
|
+
readonly aiAssistantLabels: Partial<PraxisAssistantShellLabels>;
|
|
174
|
+
private aiAssistantController;
|
|
175
|
+
private aiAssistantStateSubscription;
|
|
154
176
|
protected currentNavIndex: i0.WritableSignal<number>;
|
|
155
177
|
protected selectedIndexSignal: i0.WritableSignal<number>;
|
|
156
178
|
private groupLoaded;
|
|
157
179
|
private navLoaded;
|
|
180
|
+
private controlledSelectedIndex?;
|
|
158
181
|
private readonly destroy$;
|
|
159
182
|
private readonly widgetDefinitionCache;
|
|
160
183
|
ngOnInit(): void;
|
|
@@ -163,12 +186,51 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
163
186
|
isNavMode(): boolean;
|
|
164
187
|
effectiveAnimationDuration(): string;
|
|
165
188
|
getNavActive(i: number): boolean;
|
|
189
|
+
protected visibleNavLinkEntries(): Array<{
|
|
190
|
+
link: TabLinkMetadata;
|
|
191
|
+
index: number;
|
|
192
|
+
}>;
|
|
193
|
+
protected visibleTabEntries(): Array<{
|
|
194
|
+
tab: TabMetadata;
|
|
195
|
+
index: number;
|
|
196
|
+
}>;
|
|
197
|
+
protected selectedVisibleNavIndex(): number;
|
|
198
|
+
protected selectedVisibleTabIndex(): number;
|
|
199
|
+
protected onVisibleTabIndexChange(index: number): void;
|
|
166
200
|
onNavClick(i: number): void;
|
|
167
201
|
onNavDrop(event: CdkDragDrop<any>): void;
|
|
202
|
+
protected onVisibleNavDrop(event: CdkDragDrop<any>): void;
|
|
168
203
|
onSelectedIndexChange(index: number): void;
|
|
204
|
+
private applySelectedIndex;
|
|
205
|
+
private reapplyControlledSelectedIndex;
|
|
169
206
|
closeTab(index: number): void;
|
|
170
207
|
moveTab(index: number, delta: number): void;
|
|
171
208
|
openEditor(): void;
|
|
209
|
+
openAiAssistant(): void;
|
|
210
|
+
openAiAssistantFromSession(session: PraxisAssistantSessionSnapshot): void;
|
|
211
|
+
closeAiAssistant(): void;
|
|
212
|
+
onAiAssistantPromptChange(prompt: string): void;
|
|
213
|
+
onAiAssistantSubmit(prompt: string): void;
|
|
214
|
+
onAiAssistantApply(): void;
|
|
215
|
+
onAiAssistantRetry(): void;
|
|
216
|
+
onAiAssistantCancel(): void;
|
|
217
|
+
onAiAssistantQuickReply(reply: PraxisAssistantShellQuickReply): void;
|
|
218
|
+
onAiAssistantEditMessage(message: PraxisAssistantShellMessage): void;
|
|
219
|
+
onAiAssistantResendMessage(message: PraxisAssistantShellMessage): void;
|
|
220
|
+
onAiAssistantLayoutChange(layout: PraxisAssistantShellLayout): void;
|
|
221
|
+
private initializeAiAssistantController;
|
|
222
|
+
private buildAiAssistantContextItems;
|
|
223
|
+
private buildAiAssistantContextSnapshot;
|
|
224
|
+
private syncAiAssistantSession;
|
|
225
|
+
private hasAiAssistantSessionState;
|
|
226
|
+
private resolveAiAssistantSessionId;
|
|
227
|
+
private resolveAiAssistantOwnerId;
|
|
228
|
+
private resolveAiAssistantRouteKey;
|
|
229
|
+
private resolveAiAssistantSummary;
|
|
230
|
+
private resolveAiAssistantBadge;
|
|
231
|
+
private resolveAiAssistantIcon;
|
|
232
|
+
private collectContentFieldNames;
|
|
233
|
+
private collectTabsCounts;
|
|
172
234
|
addEmptyTab(): void;
|
|
173
235
|
/** Clears persisted tabs configuration to fallback to defaults */
|
|
174
236
|
resetPreferences(): void;
|
|
@@ -178,6 +240,7 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
178
240
|
private applyTabsAuthoringPlan;
|
|
179
241
|
private storageKey;
|
|
180
242
|
private syncSelectionFromConfig;
|
|
243
|
+
private pruneLoadedIndexes;
|
|
181
244
|
private persistConfig;
|
|
182
245
|
private componentKeyId;
|
|
183
246
|
private warnMissingId;
|
|
@@ -187,6 +250,14 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
187
250
|
protected groupContentReady(index: number): boolean;
|
|
188
251
|
protected navContentReady(index: number): boolean;
|
|
189
252
|
protected isEmptyGlobal(): boolean;
|
|
253
|
+
protected trackVisibleNavLink(index: number, entry: {
|
|
254
|
+
link: TabLinkMetadata;
|
|
255
|
+
index: number;
|
|
256
|
+
}): string;
|
|
257
|
+
protected trackVisibleTab(index: number, entry: {
|
|
258
|
+
tab: TabMetadata;
|
|
259
|
+
index: number;
|
|
260
|
+
}): string;
|
|
190
261
|
protected trackNavLink(index: number, link: TabLinkMetadata): string;
|
|
191
262
|
protected trackTab(index: number, tab: TabMetadata): string;
|
|
192
263
|
protected trackWidgetDefinition(index: number, widget: WidgetDefinition): string;
|
|
@@ -200,7 +271,7 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
200
271
|
protected styleCss(): string | null;
|
|
201
272
|
private cloneWidgetDefinition;
|
|
202
273
|
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>;
|
|
274
|
+
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
275
|
}
|
|
205
276
|
|
|
206
277
|
declare const PRAXIS_TABS_I18N_NAMESPACE = "praxisTabs";
|
|
@@ -258,6 +329,7 @@ interface TabsApplyPlan {
|
|
|
258
329
|
declare class PraxisTabsConfigEditor implements SettingsValueProvider {
|
|
259
330
|
private registry;
|
|
260
331
|
private readonly i18n;
|
|
332
|
+
set document(value: TabsAuthoringDocument | null | undefined);
|
|
261
333
|
primaryMode: 'group' | 'nav';
|
|
262
334
|
editedDocument: TabsAuthoringDocument;
|
|
263
335
|
editedConfig: TabsMetadata;
|
|
@@ -331,6 +403,7 @@ declare class PraxisTabsConfigEditor implements SettingsValueProvider {
|
|
|
331
403
|
isValid$: BehaviorSubject<boolean>;
|
|
332
404
|
isBusy$: BehaviorSubject<boolean>;
|
|
333
405
|
constructor(data: any, registry: ComponentMetadataRegistry);
|
|
406
|
+
private initializeDocument;
|
|
334
407
|
private inferPrimaryMode;
|
|
335
408
|
setPrimaryMode(mode: 'group' | 'nav'): void;
|
|
336
409
|
private updateDirty;
|
|
@@ -373,7 +446,44 @@ declare class PraxisTabsConfigEditor implements SettingsValueProvider {
|
|
|
373
446
|
onTabWidgetDrop(tabIndex: number, event: CdkDragDrop<WidgetDefinition[]>): void;
|
|
374
447
|
onLinkWidgetDrop(linkIndex: number, event: CdkDragDrop<WidgetDefinition[]>): void;
|
|
375
448
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTabsConfigEditor, never>;
|
|
376
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTabsConfigEditor, "praxis-tabs-config-editor", never, {}, {}, never, never, true, never>;
|
|
449
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTabsConfigEditor, "praxis-tabs-config-editor", never, { "document": { "alias": "document"; "required": false; }; }, {}, never, never, true, never>;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
interface PraxisTabsWidgetEditorInputs {
|
|
453
|
+
config?: TabsMetadata | null;
|
|
454
|
+
tabsId?: string | null;
|
|
455
|
+
componentInstanceId?: string | null;
|
|
456
|
+
[key: string]: unknown;
|
|
457
|
+
}
|
|
458
|
+
interface PraxisTabsWidgetEditorValue {
|
|
459
|
+
inputs: PraxisTabsWidgetEditorInputs;
|
|
460
|
+
}
|
|
461
|
+
declare class PraxisTabsWidgetConfigEditor implements SettingsValueProvider$1, AfterViewInit, OnDestroy {
|
|
462
|
+
set inputs(value: PraxisTabsWidgetEditorInputs | null);
|
|
463
|
+
get inputs(): PraxisTabsWidgetEditorInputs | null;
|
|
464
|
+
set widgetKey(value: string | undefined);
|
|
465
|
+
get widgetKey(): string | undefined;
|
|
466
|
+
tabsEditor?: PraxisTabsConfigEditor;
|
|
467
|
+
readonly isDirty$: BehaviorSubject<boolean>;
|
|
468
|
+
readonly isValid$: BehaviorSubject<boolean>;
|
|
469
|
+
readonly isBusy$: BehaviorSubject<boolean>;
|
|
470
|
+
private readonly subscription;
|
|
471
|
+
private readonly emptyConfig;
|
|
472
|
+
private _inputs;
|
|
473
|
+
private _widgetKey?;
|
|
474
|
+
editorDocument: TabsAuthoringDocument;
|
|
475
|
+
get config(): TabsMetadata;
|
|
476
|
+
get tabsId(): string | null | undefined;
|
|
477
|
+
get componentInstanceId(): string | null | undefined;
|
|
478
|
+
ngAfterViewInit(): void;
|
|
479
|
+
ngOnDestroy(): void;
|
|
480
|
+
getSettingsValue(): PraxisTabsWidgetEditorValue;
|
|
481
|
+
onSave(): PraxisTabsWidgetEditorValue;
|
|
482
|
+
reset(): void;
|
|
483
|
+
private buildValue;
|
|
484
|
+
private createDocument;
|
|
485
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTabsWidgetConfigEditor, never>;
|
|
486
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTabsWidgetConfigEditor, "praxis-tabs-widget-config-editor", never, { "inputs": { "alias": "inputs"; "required": false; }; "widgetKey": { "alias": "widgetKey"; "required": false; }; }, {}, never, never, true, never>;
|
|
377
487
|
}
|
|
378
488
|
|
|
379
489
|
declare function createTabsAuthoringDocument(source: {
|
|
@@ -412,5 +522,7 @@ interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
|
412
522
|
}
|
|
413
523
|
declare const TABS_AI_CAPABILITIES: CapabilityCatalog;
|
|
414
524
|
|
|
415
|
-
|
|
416
|
-
|
|
525
|
+
declare const PRAXIS_TABS_AUTHORING_MANIFEST: ComponentAuthoringManifest;
|
|
526
|
+
|
|
527
|
+
export { PRAXIS_TABS_AUTHORING_MANIFEST, PRAXIS_TABS_COMPONENT_METADATA, PRAXIS_TABS_I18N_CONFIG, PRAXIS_TABS_I18N_NAMESPACE, PraxisTabs, PraxisTabsConfigEditor, PraxisTabsWidgetConfigEditor, TABS_AI_CAPABILITIES, buildTabsApplyPlan, createPraxisTabsI18nConfig, createTabsAuthoringDocument, normalizeTabsAuthoringDocument, providePraxisTabsI18n, providePraxisTabsMetadata, serializeTabsAuthoringDocument, toCanonicalTabsConfig, validateTabsAuthoringDocument };
|
|
528
|
+
export type { Capability, CapabilityCatalog, CapabilityCategory, PraxisTabsWidgetEditorInputs, PraxisTabsWidgetEditorValue, 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.21",
|
|
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.21",
|
|
11
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.21",
|
|
12
|
+
"@praxisui/settings-panel": "^8.0.0-beta.21",
|
|
13
|
+
"@angular/forms": "^20.0.0",
|
|
14
|
+
"@angular/router": "^20.0.0",
|
|
15
|
+
"@praxisui/ai": "^8.0.0-beta.21",
|
|
16
|
+
"rxjs": "~7.8.0"
|
|
13
17
|
},
|
|
14
18
|
"dependencies": {
|
|
15
19
|
"tslib": "^2.3.0",
|