@praxisui/tabs 8.0.0-beta.20 → 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 +9 -0
- package/fesm2022/praxisui-tabs.mjs +929 -14
- package/index.d.ts +87 -6
- package/package.json +5 -5
- package/src/lib/praxis-tabs.json-api.md +5 -3
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, ComponentAuthoringManifest } 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>;
|
|
@@ -139,7 +144,12 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
139
144
|
private readonly snack;
|
|
140
145
|
private readonly componentKeys;
|
|
141
146
|
private readonly logger;
|
|
147
|
+
private readonly cdr;
|
|
148
|
+
private readonly aiApi;
|
|
149
|
+
private readonly assistantSessions;
|
|
150
|
+
private readonly aiTurnOrchestrator;
|
|
142
151
|
private readonly route;
|
|
152
|
+
private readonly aiAssistantSessionEffect;
|
|
143
153
|
private warnedMissingId;
|
|
144
154
|
config: TabsMetadata | null;
|
|
145
155
|
tabsId: string;
|
|
@@ -156,6 +166,13 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
156
166
|
selectFocusedIndex: EventEmitter<number>;
|
|
157
167
|
widgetEvent: EventEmitter<WidgetEventEnvelope>;
|
|
158
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;
|
|
159
176
|
protected currentNavIndex: i0.WritableSignal<number>;
|
|
160
177
|
protected selectedIndexSignal: i0.WritableSignal<number>;
|
|
161
178
|
private groupLoaded;
|
|
@@ -189,6 +206,31 @@ declare class PraxisTabs implements OnInit, OnChanges, OnDestroy {
|
|
|
189
206
|
closeTab(index: number): void;
|
|
190
207
|
moveTab(index: number, delta: number): void;
|
|
191
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;
|
|
192
234
|
addEmptyTab(): void;
|
|
193
235
|
/** Clears persisted tabs configuration to fallback to defaults */
|
|
194
236
|
resetPreferences(): void;
|
|
@@ -287,6 +329,7 @@ interface TabsApplyPlan {
|
|
|
287
329
|
declare class PraxisTabsConfigEditor implements SettingsValueProvider {
|
|
288
330
|
private registry;
|
|
289
331
|
private readonly i18n;
|
|
332
|
+
set document(value: TabsAuthoringDocument | null | undefined);
|
|
290
333
|
primaryMode: 'group' | 'nav';
|
|
291
334
|
editedDocument: TabsAuthoringDocument;
|
|
292
335
|
editedConfig: TabsMetadata;
|
|
@@ -360,6 +403,7 @@ declare class PraxisTabsConfigEditor implements SettingsValueProvider {
|
|
|
360
403
|
isValid$: BehaviorSubject<boolean>;
|
|
361
404
|
isBusy$: BehaviorSubject<boolean>;
|
|
362
405
|
constructor(data: any, registry: ComponentMetadataRegistry);
|
|
406
|
+
private initializeDocument;
|
|
363
407
|
private inferPrimaryMode;
|
|
364
408
|
setPrimaryMode(mode: 'group' | 'nav'): void;
|
|
365
409
|
private updateDirty;
|
|
@@ -402,7 +446,44 @@ declare class PraxisTabsConfigEditor implements SettingsValueProvider {
|
|
|
402
446
|
onTabWidgetDrop(tabIndex: number, event: CdkDragDrop<WidgetDefinition[]>): void;
|
|
403
447
|
onLinkWidgetDrop(linkIndex: number, event: CdkDragDrop<WidgetDefinition[]>): void;
|
|
404
448
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTabsConfigEditor, never>;
|
|
405
|
-
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>;
|
|
406
487
|
}
|
|
407
488
|
|
|
408
489
|
declare function createTabsAuthoringDocument(source: {
|
|
@@ -443,5 +524,5 @@ declare const TABS_AI_CAPABILITIES: CapabilityCatalog;
|
|
|
443
524
|
|
|
444
525
|
declare const PRAXIS_TABS_AUTHORING_MANIFEST: ComponentAuthoringManifest;
|
|
445
526
|
|
|
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 };
|
|
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 };
|
|
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,18 +1,18 @@
|
|
|
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
13
|
"@angular/forms": "^20.0.0",
|
|
14
14
|
"@angular/router": "^20.0.0",
|
|
15
|
-
"@praxisui/ai": "^8.0.0-beta.
|
|
15
|
+
"@praxisui/ai": "^8.0.0-beta.21",
|
|
16
16
|
"rxjs": "~7.8.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
@@ -571,9 +571,11 @@ Fluxos disponiveis:
|
|
|
571
571
|
- bootstrap rapido de `group+tabs` ou `nav+links`
|
|
572
572
|
- normaliza labels e descarta vazios
|
|
573
573
|
|
|
574
|
-
3. **
|
|
575
|
-
-
|
|
576
|
-
-
|
|
574
|
+
3. **Semantic assistant (`PraxisAiAssistantShellComponent` + `TabsAgenticAuthoringTurnFlow` + `TabsAiAdapter`)**
|
|
575
|
+
- abre shell compartilhado e registra sessao global quando `enableCustomization=true`
|
|
576
|
+
- rejeita patch JSON livre
|
|
577
|
+
- exige `componentEditPlan` manifest-backed antes de qualquer apply local
|
|
578
|
+
- roteia prompts de regra/governanca para `domain-rules/intake`
|
|
577
579
|
|
|
578
580
|
Governanca recomendada:
|
|
579
581
|
|