@praxisui/page-builder 8.0.0-beta.0 → 8.0.0-beta.11
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 +51 -0
- package/fesm2022/praxisui-page-builder.mjs +2638 -17
- package/index.d.ts +315 -32
- package/package.json +4 -3
package/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
2
|
-
import * as
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { EventEmitter, OnInit, WritableSignal, InjectionToken, Provider, OnChanges, Type, SimpleChanges } from '@angular/core';
|
|
4
4
|
import { ComponentDocMeta, ComponentMetadataRegistry, WidgetShellConfig, WidgetShellAction, SettingsValueProvider as SettingsValueProvider$1, WidgetPageDefinition, WidgetPageGroupingDefinition, BUILTIN_PAGE_LAYOUT_PRESETS, BUILTIN_PAGE_THEME_PRESETS, PageIdentity, WidgetStateNode, WidgetDerivedStateNode, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog, WidgetInstance, WidgetPageStateInput, CompositionLink, DynamicWidgetPageComponent, SettingsPanelBridge } from '@praxisui/core';
|
|
5
5
|
export { WidgetShellComponent } from '@praxisui/core';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
7
|
-
import { BehaviorSubject } from 'rxjs';
|
|
7
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
8
8
|
import { FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
9
9
|
import { SettingsValueProvider } from '@praxisui/settings-panel';
|
|
10
|
+
import { AgenticAuthoringPlanRequestContract, AgenticAuthoringCandidateContract, AiJsonValue, AgenticAuthoringQuickReplyContract, AgenticAuthoringPendingClarificationContract, AiJsonObject, AgenticAuthoringComponentCapabilitiesResultContract, AgenticAuthoringComponentCapabilityCatalogContract, AgenticAuthoringComponentCapabilityContract, AgenticAuthoringComponentFieldAliasContract, AgenticAuthoringComponentCapabilityExampleContract, AgenticAuthoringAttachmentSummaryContract, AgenticAuthoringIntentResolutionRequestContract, AgenticAuthoringConversationMessageContract, AgenticAuthoringResourceCandidatesRequestContract, AgenticAuthoringResourceCandidatesResultContract, AgenticAuthoringTurnStreamStartResponseContract, AgenticAuthoringTurnStreamEnvelopeContract, PraxisAssistantShellMessage, PraxisAssistantShellQuickReply, PraxisAssistantShellAttachment, PraxisAssistantShellLayout, PraxisAssistantShellLabels, PraxisAssistantShellState, PraxisAssistantShellContextItem } from '@praxisui/ai';
|
|
10
11
|
|
|
11
12
|
declare const PLACEHOLDER = 1;
|
|
12
13
|
|
|
@@ -21,8 +22,8 @@ declare class ConfirmDialogComponent {
|
|
|
21
22
|
data: ConfirmDialogData;
|
|
22
23
|
ref: MatDialogRef<ConfirmDialogComponent, boolean>;
|
|
23
24
|
constructor(data: ConfirmDialogData, ref: MatDialogRef<ConfirmDialogComponent, boolean>);
|
|
24
|
-
static ɵfac:
|
|
25
|
-
static ɵcmp:
|
|
25
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
|
|
26
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmDialogComponent, "praxis-confirm-dialog", never, {}, {}, never, never, true, never>;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
declare class TileToolbarComponent {
|
|
@@ -31,8 +32,8 @@ declare class TileToolbarComponent {
|
|
|
31
32
|
remove: EventEmitter<void>;
|
|
32
33
|
settings: EventEmitter<void>;
|
|
33
34
|
shell: EventEmitter<void>;
|
|
34
|
-
static ɵfac:
|
|
35
|
-
static ɵcmp:
|
|
35
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TileToolbarComponent, never>;
|
|
36
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TileToolbarComponent, "praxis-tile-toolbar", never, { "selected": { "alias": "selected"; "required": false; }; "widgetType": { "alias": "widgetType"; "required": false; }; }, { "remove": "remove"; "settings": "settings"; "shell": "shell"; }, never, never, true, never>;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
declare class FloatingToolbarComponent {
|
|
@@ -45,8 +46,8 @@ declare class FloatingToolbarComponent {
|
|
|
45
46
|
settings: EventEmitter<void>;
|
|
46
47
|
preview: EventEmitter<void>;
|
|
47
48
|
save: EventEmitter<void>;
|
|
48
|
-
static ɵfac:
|
|
49
|
-
static ɵcmp:
|
|
49
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FloatingToolbarComponent, never>;
|
|
50
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FloatingToolbarComponent, "praxis-floating-toolbar", never, { "visible": { "alias": "visible"; "required": false; }; "canUndo": { "alias": "canUndo"; "required": false; }; "canRedo": { "alias": "canRedo"; "required": false; }; }, { "add": "add"; "undo": "undo"; "redo": "redo"; "settings": "settings"; "preview": "preview"; "save": "save"; }, never, ["[pdx-toolbar-extra]"], true, never>;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
interface ComponentPaletteData {
|
|
@@ -61,8 +62,8 @@ declare class ComponentPaletteDialogComponent implements OnInit {
|
|
|
61
62
|
data?: ComponentPaletteData | undefined;
|
|
62
63
|
query: string;
|
|
63
64
|
private all;
|
|
64
|
-
filtered:
|
|
65
|
-
density:
|
|
65
|
+
filtered: _angular_core.Signal<ComponentDocMeta[]>;
|
|
66
|
+
density: _angular_core.Signal<"roomy" | "dense" | "normal">;
|
|
66
67
|
constructor(dialogRef: MatDialogRef<ComponentPaletteDialogComponent, string>, registry: ComponentMetadataRegistry, data?: ComponentPaletteData | undefined);
|
|
67
68
|
ngOnInit(): void;
|
|
68
69
|
select(id: string): void;
|
|
@@ -70,8 +71,8 @@ declare class ComponentPaletteDialogComponent implements OnInit {
|
|
|
70
71
|
getPreview(m: ComponentDocMeta): string;
|
|
71
72
|
private _adjustSizeEffect;
|
|
72
73
|
private applyFilters;
|
|
73
|
-
static ɵfac:
|
|
74
|
-
static ɵcmp:
|
|
74
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComponentPaletteDialogComponent, never>;
|
|
75
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ComponentPaletteDialogComponent, "praxis-component-palette-dialog", never, {}, {}, never, never, true, never>;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
type ShellInputs = {
|
|
@@ -202,8 +203,8 @@ declare class WidgetShellEditorComponent implements SettingsValueProvider {
|
|
|
202
203
|
private findActionIndex;
|
|
203
204
|
private previewActions;
|
|
204
205
|
private loadSetInputPresets;
|
|
205
|
-
static ɵfac:
|
|
206
|
-
static ɵcmp:
|
|
206
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WidgetShellEditorComponent, [{ optional: true; }, { optional: true; }]>;
|
|
207
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WidgetShellEditorComponent, "praxis-widget-shell-editor", never, {}, {}, never, never, true, never>;
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
type EditorTabId$1 = 'canvas' | 'grouping' | 'devices' | 'context' | 'state';
|
|
@@ -317,8 +318,8 @@ declare class DynamicPageConfigEditorComponent implements OnInit, SettingsValueP
|
|
|
317
318
|
private lookupPresetLabel;
|
|
318
319
|
private defaultCanvas;
|
|
319
320
|
private clone;
|
|
320
|
-
static ɵfac:
|
|
321
|
-
static ɵcmp:
|
|
321
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicPageConfigEditorComponent, never>;
|
|
322
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicPageConfigEditorComponent, "praxis-dynamic-page-config-editor", never, { "page": { "alias": "page"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "presets": { "alias": "presets"; "required": false; }; "pagePreset": { "alias": "pagePreset"; "required": false; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
|
|
322
323
|
}
|
|
323
324
|
|
|
324
325
|
type LegacyGridOptions = {
|
|
@@ -372,10 +373,10 @@ declare class PageConfigEditorComponent implements SettingsValueProvider$1 {
|
|
|
372
373
|
protected readonly groupingKinds: readonly ["section", "tabs", "hero", "rail"];
|
|
373
374
|
protected readonly layoutPresetEntries: Array<(typeof BUILTIN_PAGE_LAYOUT_PRESETS)[string]>;
|
|
374
375
|
protected readonly themePresetEntries: Array<(typeof BUILTIN_PAGE_THEME_PRESETS)[string]>;
|
|
375
|
-
readonly page:
|
|
376
|
-
readonly identity:
|
|
377
|
-
readonly layoutCompatOptions:
|
|
378
|
-
readonly pageChange:
|
|
376
|
+
readonly page: _angular_core.InputSignal<string | PageDefinition | null>;
|
|
377
|
+
readonly identity: _angular_core.InputSignal<PageIdentity | null>;
|
|
378
|
+
readonly layoutCompatOptions: _angular_core.InputSignal<any>;
|
|
379
|
+
readonly pageChange: _angular_core.OutputEmitterRef<PageDefinition>;
|
|
379
380
|
readonly form: FormGroup<{
|
|
380
381
|
cols: FormControl<number | null>;
|
|
381
382
|
rowHeight: FormControl<number | null>;
|
|
@@ -415,10 +416,10 @@ declare class PageConfigEditorComponent implements SettingsValueProvider$1 {
|
|
|
415
416
|
groupingOverridesJson: FormControl<string>;
|
|
416
417
|
widgetOverridesJson: FormControl<string>;
|
|
417
418
|
}>;
|
|
418
|
-
readonly contextError:
|
|
419
|
-
readonly layoutError:
|
|
420
|
-
readonly stateError:
|
|
421
|
-
readonly activeTab:
|
|
419
|
+
readonly contextError: _angular_core.WritableSignal<string | null>;
|
|
420
|
+
readonly layoutError: _angular_core.WritableSignal<string | null>;
|
|
421
|
+
readonly stateError: _angular_core.WritableSignal<string | null>;
|
|
422
|
+
readonly activeTab: _angular_core.WritableSignal<EditorTabId>;
|
|
422
423
|
readonly shellPresetEntries: Array<{
|
|
423
424
|
id: string;
|
|
424
425
|
label: string;
|
|
@@ -512,8 +513,8 @@ declare class PageConfigEditorComponent implements SettingsValueProvider$1 {
|
|
|
512
513
|
private buildOperatorOptions;
|
|
513
514
|
private buildOptions;
|
|
514
515
|
private clone;
|
|
515
|
-
static ɵfac:
|
|
516
|
-
static ɵcmp:
|
|
516
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PageConfigEditorComponent, never>;
|
|
517
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PageConfigEditorComponent, "praxis-page-config-editor", never, { "page": { "alias": "page"; "required": false; "isSignal": true; }; "identity": { "alias": "identity"; "required": false; "isSignal": true; }; "layoutCompatOptions": { "alias": "layoutCompatOptions"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
|
|
517
518
|
}
|
|
518
519
|
|
|
519
520
|
/**
|
|
@@ -539,6 +540,220 @@ interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
|
539
540
|
}
|
|
540
541
|
declare const PAGE_BUILDER_AI_CAPABILITIES: CapabilityCatalog;
|
|
541
542
|
|
|
543
|
+
type PageBuilderAgenticAuthoringProvider = 'openai' | 'gemini' | string;
|
|
544
|
+
interface PageBuilderAgenticAuthoringOptions {
|
|
545
|
+
baseUrl?: string;
|
|
546
|
+
headersFactory?: () => Record<string, string | undefined>;
|
|
547
|
+
defaultHeaders?: Record<string, string>;
|
|
548
|
+
eventSourceFactory?: PageBuilderAgenticAuthoringEventSourceFactory;
|
|
549
|
+
streamConnectionErrorGraceMs?: number;
|
|
550
|
+
}
|
|
551
|
+
interface PageBuilderAgenticAuthoringEventSource {
|
|
552
|
+
onmessage: ((event: MessageEvent<string>) => void) | null;
|
|
553
|
+
onerror: ((event: Event) => void) | null;
|
|
554
|
+
addEventListener?(type: string, listener: (event: MessageEvent<string>) => void): void;
|
|
555
|
+
close(): void;
|
|
556
|
+
}
|
|
557
|
+
type PageBuilderAgenticAuthoringEventSourceFactory = (url: string) => PageBuilderAgenticAuthoringEventSource;
|
|
558
|
+
interface PageBuilderAgenticAuthoringTurnStreamConnectionError {
|
|
559
|
+
readonly praxisAgenticTurnStreamConnectionError: true;
|
|
560
|
+
readonly cause: unknown;
|
|
561
|
+
}
|
|
562
|
+
interface PageBuilderAgenticAuthoringPromptRequest extends Omit<AgenticAuthoringPlanRequestContract, 'currentPage' | 'intentResolution'> {
|
|
563
|
+
provider?: PageBuilderAgenticAuthoringProvider | null;
|
|
564
|
+
currentPage?: unknown;
|
|
565
|
+
selectedWidgetKey?: string | null;
|
|
566
|
+
intentResolution?: PageBuilderAgenticAuthoringIntentResolutionResult | null;
|
|
567
|
+
componentCapabilities?: PageBuilderAgenticAuthoringComponentCapabilitiesResult | null;
|
|
568
|
+
attachmentSummaries?: PageBuilderAgenticAuthoringAttachmentSummary[];
|
|
569
|
+
}
|
|
570
|
+
interface PageBuilderAgenticAuthoringIntentResolutionRequest extends Omit<AgenticAuthoringIntentResolutionRequestContract, 'currentPage'> {
|
|
571
|
+
provider?: PageBuilderAgenticAuthoringProvider | null;
|
|
572
|
+
currentPage?: unknown;
|
|
573
|
+
componentCapabilities?: PageBuilderAgenticAuthoringComponentCapabilitiesResult | null;
|
|
574
|
+
attachmentSummaries?: PageBuilderAgenticAuthoringAttachmentSummary[];
|
|
575
|
+
}
|
|
576
|
+
interface PageBuilderAgenticAuthoringTurnStreamRequest {
|
|
577
|
+
userPrompt: string;
|
|
578
|
+
targetApp?: string | null;
|
|
579
|
+
targetComponentId?: string | null;
|
|
580
|
+
currentRoute?: string | null;
|
|
581
|
+
provider?: PageBuilderAgenticAuthoringProvider | null;
|
|
582
|
+
model?: string | null;
|
|
583
|
+
apiKey?: string | null;
|
|
584
|
+
currentPage?: unknown;
|
|
585
|
+
selectedWidgetKey?: string | null;
|
|
586
|
+
sessionId?: string | null;
|
|
587
|
+
clientTurnId?: string | null;
|
|
588
|
+
conversationMessages?: PageBuilderAgenticAuthoringConversationMessage[];
|
|
589
|
+
pendingClarification?: PageBuilderAgenticAuthoringPendingClarification | null;
|
|
590
|
+
componentCapabilities?: PageBuilderAgenticAuthoringComponentCapabilitiesResult | null;
|
|
591
|
+
attachmentSummaries?: PageBuilderAgenticAuthoringAttachmentSummary[];
|
|
592
|
+
contextHints?: AiJsonObject | null;
|
|
593
|
+
}
|
|
594
|
+
type PageBuilderAgenticAuthoringConversationMessage = AgenticAuthoringConversationMessageContract;
|
|
595
|
+
type PageBuilderAgenticAuthoringPendingClarification = AgenticAuthoringPendingClarificationContract;
|
|
596
|
+
type PageBuilderAgenticAuthoringQuickReply = AgenticAuthoringQuickReplyContract;
|
|
597
|
+
type PageBuilderAgenticAuthoringAttachmentSummary = AgenticAuthoringAttachmentSummaryContract;
|
|
598
|
+
interface PageBuilderAgenticAuthoringCandidate extends AgenticAuthoringCandidateContract {
|
|
599
|
+
resourcePath: string;
|
|
600
|
+
operation: string;
|
|
601
|
+
schemaUrl: string;
|
|
602
|
+
submitUrl: string;
|
|
603
|
+
submitMethod: string;
|
|
604
|
+
score: number;
|
|
605
|
+
reason: string;
|
|
606
|
+
evidence: string[];
|
|
607
|
+
[key: string]: AiJsonValue | undefined;
|
|
608
|
+
}
|
|
609
|
+
interface PageBuilderAgenticAuthoringResourceCandidatesRequest extends AgenticAuthoringResourceCandidatesRequestContract {
|
|
610
|
+
}
|
|
611
|
+
interface PageBuilderAgenticAuthoringResourceCandidatesResult extends Omit<AgenticAuthoringResourceCandidatesResultContract, 'candidates'> {
|
|
612
|
+
valid: boolean;
|
|
613
|
+
tool: string;
|
|
614
|
+
retrievalQuery: string;
|
|
615
|
+
artifactKind: string;
|
|
616
|
+
assistantMessage?: string | null;
|
|
617
|
+
candidates: PageBuilderAgenticAuthoringCandidate[];
|
|
618
|
+
quickReplies?: PageBuilderAgenticAuthoringQuickReply[];
|
|
619
|
+
warnings: string[];
|
|
620
|
+
}
|
|
621
|
+
interface PageBuilderAgenticAuthoringTarget {
|
|
622
|
+
widgetKey: string;
|
|
623
|
+
componentId: string;
|
|
624
|
+
resourcePath: string;
|
|
625
|
+
schemaUrl: string;
|
|
626
|
+
submitUrl: string;
|
|
627
|
+
submitMethod: string;
|
|
628
|
+
}
|
|
629
|
+
interface PageBuilderAgenticAuthoringGateResult {
|
|
630
|
+
gateId: string;
|
|
631
|
+
status: string;
|
|
632
|
+
messages: string[];
|
|
633
|
+
}
|
|
634
|
+
interface PageBuilderAgenticAuthoringComponentFieldAlias extends AgenticAuthoringComponentFieldAliasContract {
|
|
635
|
+
field: string;
|
|
636
|
+
aliases: string[];
|
|
637
|
+
}
|
|
638
|
+
interface PageBuilderAgenticAuthoringComponentCapability extends Omit<AgenticAuthoringComponentCapabilityContract, 'fieldAliases' | 'examples'> {
|
|
639
|
+
id: string;
|
|
640
|
+
changeKind: string;
|
|
641
|
+
triggerTerms: string[];
|
|
642
|
+
fieldAliases: PageBuilderAgenticAuthoringComponentFieldAlias[];
|
|
643
|
+
examples?: PageBuilderAgenticAuthoringComponentCapabilityExample[];
|
|
644
|
+
}
|
|
645
|
+
interface PageBuilderAgenticAuthoringComponentCapabilityExample extends AgenticAuthoringComponentCapabilityExampleContract {
|
|
646
|
+
prompt: string;
|
|
647
|
+
intent: string;
|
|
648
|
+
configHints: string[];
|
|
649
|
+
}
|
|
650
|
+
interface PageBuilderAgenticAuthoringComponentCapabilityCatalog extends Omit<AgenticAuthoringComponentCapabilityCatalogContract, 'capabilities'> {
|
|
651
|
+
componentId: string;
|
|
652
|
+
version: string;
|
|
653
|
+
capabilities: PageBuilderAgenticAuthoringComponentCapability[];
|
|
654
|
+
}
|
|
655
|
+
interface PageBuilderAgenticAuthoringComponentCapabilitiesResult extends Omit<AgenticAuthoringComponentCapabilitiesResultContract, 'catalogs'> {
|
|
656
|
+
version: string;
|
|
657
|
+
catalogs: PageBuilderAgenticAuthoringComponentCapabilityCatalog[];
|
|
658
|
+
}
|
|
659
|
+
interface PageBuilderAgenticAuthoringIntentResolutionResult {
|
|
660
|
+
valid: boolean;
|
|
661
|
+
operationKind: string;
|
|
662
|
+
artifactKind: string;
|
|
663
|
+
changeKind: string;
|
|
664
|
+
authoringProfile: string;
|
|
665
|
+
targetApp: string;
|
|
666
|
+
targetComponentId: string;
|
|
667
|
+
target: PageBuilderAgenticAuthoringTarget | null;
|
|
668
|
+
selectedCandidate: PageBuilderAgenticAuthoringCandidate | null;
|
|
669
|
+
candidates: PageBuilderAgenticAuthoringCandidate[];
|
|
670
|
+
gate: PageBuilderAgenticAuthoringGateResult;
|
|
671
|
+
effectivePrompt?: string | null;
|
|
672
|
+
assistantMessage?: string | null;
|
|
673
|
+
quickReplies?: PageBuilderAgenticAuthoringQuickReply[];
|
|
674
|
+
pendingClarification?: PageBuilderAgenticAuthoringPendingClarification | null;
|
|
675
|
+
clarificationQuestions: string[];
|
|
676
|
+
warnings: string[];
|
|
677
|
+
failureCodes: string[];
|
|
678
|
+
currentPageSummary: unknown;
|
|
679
|
+
llmDiagnostics?: AiJsonObject | null;
|
|
680
|
+
}
|
|
681
|
+
interface PageBuilderMinimalFormPlanResult {
|
|
682
|
+
valid: boolean;
|
|
683
|
+
failureCodes: string[];
|
|
684
|
+
warnings: string[];
|
|
685
|
+
minimalFormPlan: unknown;
|
|
686
|
+
}
|
|
687
|
+
interface PageBuilderCompiledFormPatch {
|
|
688
|
+
profileId?: string;
|
|
689
|
+
catalogReleaseId?: string;
|
|
690
|
+
builderVersion?: string;
|
|
691
|
+
patch?: {
|
|
692
|
+
page?: BuilderPageDefinition;
|
|
693
|
+
};
|
|
694
|
+
[key: string]: unknown;
|
|
695
|
+
}
|
|
696
|
+
interface PageBuilderPreviewDiagnostics {
|
|
697
|
+
derivedCurrentPageSummary?: boolean;
|
|
698
|
+
targetWidgetKey?: string;
|
|
699
|
+
operationKind?: string;
|
|
700
|
+
changeKind?: string;
|
|
701
|
+
fieldScopeDecision?: string;
|
|
702
|
+
}
|
|
703
|
+
interface PageBuilderPreviewResult {
|
|
704
|
+
valid: boolean;
|
|
705
|
+
failureCodes: string[];
|
|
706
|
+
warnings: string[];
|
|
707
|
+
minimalFormPlan: unknown;
|
|
708
|
+
uiCompositionPlan?: unknown;
|
|
709
|
+
compiledFormPatch: PageBuilderCompiledFormPatch;
|
|
710
|
+
diagnostics?: PageBuilderPreviewDiagnostics | null;
|
|
711
|
+
assistantMessage?: string | null;
|
|
712
|
+
}
|
|
713
|
+
type PageBuilderAgenticAuthoringTurnStreamStartResponse = AgenticAuthoringTurnStreamStartResponseContract;
|
|
714
|
+
type PageBuilderAgenticAuthoringTurnStreamEvent = AgenticAuthoringTurnStreamEnvelopeContract;
|
|
715
|
+
interface PageBuilderApplyRequest {
|
|
716
|
+
compiledFormPatch: PageBuilderCompiledFormPatch;
|
|
717
|
+
componentId: string;
|
|
718
|
+
componentType?: string;
|
|
719
|
+
scope?: 'user' | 'tenant';
|
|
720
|
+
tags?: Record<string, unknown>;
|
|
721
|
+
ifMatch?: string;
|
|
722
|
+
}
|
|
723
|
+
interface PageBuilderApplyResult {
|
|
724
|
+
applied: boolean;
|
|
725
|
+
componentType: string;
|
|
726
|
+
componentId: string;
|
|
727
|
+
environment?: string;
|
|
728
|
+
scope: 'user' | 'tenant' | string;
|
|
729
|
+
version: number;
|
|
730
|
+
etag?: string;
|
|
731
|
+
payload: BuilderPageDefinition;
|
|
732
|
+
tags?: Record<string, unknown>;
|
|
733
|
+
warnings: string[];
|
|
734
|
+
}
|
|
735
|
+
declare const PAGE_BUILDER_AGENTIC_AUTHORING_OPTIONS: InjectionToken<PageBuilderAgenticAuthoringOptions>;
|
|
736
|
+
declare class PageBuilderAgenticAuthoringService {
|
|
737
|
+
private readonly http;
|
|
738
|
+
private readonly options;
|
|
739
|
+
private readonly baseUrl;
|
|
740
|
+
private readonly headersFactory;
|
|
741
|
+
getComponentCapabilities(): Observable<PageBuilderAgenticAuthoringComponentCapabilitiesResult>;
|
|
742
|
+
previewPage(request: PageBuilderAgenticAuthoringPromptRequest): Observable<PageBuilderPreviewResult>;
|
|
743
|
+
resolveIntent(request: PageBuilderAgenticAuthoringIntentResolutionRequest): Observable<PageBuilderAgenticAuthoringIntentResolutionResult>;
|
|
744
|
+
searchResourceCandidates(request: PageBuilderAgenticAuthoringResourceCandidatesRequest): Observable<PageBuilderAgenticAuthoringResourceCandidatesResult>;
|
|
745
|
+
streamTurn(request: PageBuilderAgenticAuthoringTurnStreamRequest): Observable<PageBuilderAgenticAuthoringTurnStreamEvent>;
|
|
746
|
+
applyPage(request: PageBuilderApplyRequest): Observable<PageBuilderApplyResult>;
|
|
747
|
+
private buildHeaders;
|
|
748
|
+
private connectTurnStream;
|
|
749
|
+
private streamConnectionError;
|
|
750
|
+
private buildStreamUrl;
|
|
751
|
+
private createEventSource;
|
|
752
|
+
private formatEtag;
|
|
753
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PageBuilderAgenticAuthoringService, never>;
|
|
754
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PageBuilderAgenticAuthoringService>;
|
|
755
|
+
}
|
|
756
|
+
|
|
542
757
|
type LegacyLayoutOptions = {
|
|
543
758
|
cols?: number;
|
|
544
759
|
rowHeight?: number;
|
|
@@ -567,6 +782,7 @@ type BuilderCanvasLayout = {
|
|
|
567
782
|
rowUnit?: string;
|
|
568
783
|
gap?: string;
|
|
569
784
|
autoRows?: 'fixed' | 'content';
|
|
785
|
+
collisionPolicy?: 'block' | 'swap';
|
|
570
786
|
items: Record<string, BuilderCanvasItem>;
|
|
571
787
|
};
|
|
572
788
|
type BuilderPageDefinition = Omit<WidgetPageDefinition, 'widgets'> & {
|
|
@@ -596,24 +812,56 @@ declare const PAGE_BUILDER_WIDGET_AI_CATALOGS: InjectionToken<Record<string, AiC
|
|
|
596
812
|
|
|
597
813
|
declare function providePageBuilderWidgetAiCatalogs(): Provider;
|
|
598
814
|
|
|
815
|
+
interface AgenticAuthoringQuickReply extends PraxisAssistantShellQuickReply {
|
|
816
|
+
kind: string;
|
|
817
|
+
}
|
|
599
818
|
declare class DynamicPageBuilderComponent implements OnChanges {
|
|
600
819
|
private dialog;
|
|
601
820
|
private settingsPanel;
|
|
602
821
|
private readonly i18n;
|
|
603
822
|
private readonly componentMetadata;
|
|
823
|
+
private readonly agenticAuthoring;
|
|
824
|
+
private readonly agenticTurnOrchestrator;
|
|
604
825
|
runtime?: DynamicWidgetPageComponent;
|
|
605
826
|
page?: WidgetPageDefinition | string;
|
|
606
827
|
context?: Record<string, unknown> | null;
|
|
607
828
|
strictValidation: boolean;
|
|
829
|
+
autoPersist: boolean;
|
|
608
830
|
enableCustomization: boolean;
|
|
609
831
|
showSettingsButton: boolean;
|
|
610
832
|
pageIdentity?: PageIdentity;
|
|
611
833
|
componentInstanceId?: string;
|
|
612
834
|
pageEditorComponent: Type<any> | undefined;
|
|
835
|
+
enableAgenticAuthoring: boolean;
|
|
836
|
+
agenticAuthoringProvider?: string;
|
|
837
|
+
agenticAuthoringModel?: string;
|
|
838
|
+
agenticAuthoringApiKey?: string;
|
|
839
|
+
agenticAuthoringComponentId?: string;
|
|
840
|
+
agenticAuthoringScope: 'user' | 'tenant';
|
|
841
|
+
agenticAuthoringEtag?: string;
|
|
842
|
+
agenticAuthoringIncludeLlmDiagnostics: boolean;
|
|
843
|
+
agenticAuthoringEnableStreaming: boolean;
|
|
613
844
|
pageChange: EventEmitter<WidgetPageDefinition>;
|
|
614
|
-
|
|
615
|
-
readonly
|
|
845
|
+
agenticAuthoringApplied: EventEmitter<PageBuilderApplyResult>;
|
|
846
|
+
readonly currentPage: _angular_core.WritableSignal<WidgetPageDefinition>;
|
|
847
|
+
readonly connectionsViewerOpen: _angular_core.WritableSignal<boolean>;
|
|
848
|
+
readonly agenticAuthoringOpen: _angular_core.WritableSignal<boolean>;
|
|
849
|
+
readonly agenticAuthoringPrompt: _angular_core.WritableSignal<string>;
|
|
850
|
+
readonly agenticAuthoringBusy: _angular_core.WritableSignal<boolean>;
|
|
851
|
+
readonly agenticAuthoringStatus: _angular_core.WritableSignal<string>;
|
|
852
|
+
readonly agenticAuthoringError: _angular_core.WritableSignal<string>;
|
|
853
|
+
readonly agenticAuthoringPreviewResult: _angular_core.WritableSignal<PageBuilderPreviewResult | null>;
|
|
854
|
+
readonly agenticAuthoringLastEtag: _angular_core.WritableSignal<string | null>;
|
|
855
|
+
readonly agenticAuthoringConversation: _angular_core.WritableSignal<PraxisAssistantShellMessage[]>;
|
|
856
|
+
readonly agenticAuthoringQuickReplies: _angular_core.WritableSignal<AgenticAuthoringQuickReply[]>;
|
|
857
|
+
readonly agenticAuthoringAttachments: _angular_core.WritableSignal<PraxisAssistantShellAttachment[]>;
|
|
858
|
+
readonly agenticAuthoringLlmDiagnostics: _angular_core.WritableSignal<Record<string, unknown> | null>;
|
|
859
|
+
readonly agenticAuthoringEditingMessageId: _angular_core.WritableSignal<string | null>;
|
|
860
|
+
readonly agenticAuthoringPanelLayout: _angular_core.WritableSignal<PraxisAssistantShellLayout>;
|
|
616
861
|
private previewMode;
|
|
862
|
+
private agenticComponentCapabilities?;
|
|
863
|
+
private agenticComponentCapabilitiesPromise?;
|
|
864
|
+
private agenticTurnController?;
|
|
617
865
|
constructor(dialog: MatDialog, settingsPanel: SettingsPanelBridge | null);
|
|
618
866
|
ngOnChanges(changes: SimpleChanges): void;
|
|
619
867
|
showSettings(): boolean;
|
|
@@ -624,15 +872,50 @@ declare class DynamicPageBuilderComponent implements OnChanges {
|
|
|
624
872
|
addWidget(type: string): void;
|
|
625
873
|
openPageSettings(): void;
|
|
626
874
|
saveCurrentPage(): void;
|
|
875
|
+
applyConfigFromAdapter(config: PageBuilderConfig): void;
|
|
876
|
+
private createAdapterHost;
|
|
877
|
+
toggleAgenticAuthoring(): void;
|
|
878
|
+
agenticAuthoringShellLabels(): Partial<PraxisAssistantShellLabels>;
|
|
879
|
+
agenticAuthoringShellState(): PraxisAssistantShellState;
|
|
880
|
+
agenticAuthoringContextItems(): PraxisAssistantShellContextItem[];
|
|
881
|
+
previewAgenticAuthoring(): Promise<void>;
|
|
882
|
+
submitAgenticQuickReply(reply: PraxisAssistantShellQuickReply): Promise<void>;
|
|
883
|
+
private agenticQuickReplyVisiblePrompt;
|
|
884
|
+
private isResourceQuickReply;
|
|
885
|
+
private describeResourceContext;
|
|
886
|
+
attachAgenticContext(): void;
|
|
887
|
+
addAgenticAttachments(attachments: readonly PraxisAssistantShellAttachment[]): void;
|
|
888
|
+
removeAgenticAttachment(attachment: PraxisAssistantShellAttachment): void;
|
|
889
|
+
editAgenticMessage(message: PraxisAssistantShellMessage): void;
|
|
890
|
+
resendAgenticMessage(message: PraxisAssistantShellMessage): Promise<void>;
|
|
891
|
+
persistAgenticAuthoring(): Promise<void>;
|
|
892
|
+
private loadAgenticComponentCapabilities;
|
|
893
|
+
private ensureAgenticTurnController;
|
|
894
|
+
private applyAgenticPreviewLocally;
|
|
895
|
+
private applyAgenticTurnState;
|
|
896
|
+
private consumeAgenticTurn;
|
|
897
|
+
agenticAuthoringDiagnosticsTop(): number;
|
|
898
|
+
agenticAuthoringLlmDiagnosticsText(): string;
|
|
899
|
+
private resolveAgenticLlmDiagnostics;
|
|
900
|
+
private toRecord;
|
|
901
|
+
private resolvePreviewCompiledFormPatch;
|
|
627
902
|
focusCanvasWidget(widgetKey: string): void;
|
|
628
903
|
private parsePage;
|
|
629
904
|
private clonePage;
|
|
630
905
|
private defaultInputsFor;
|
|
906
|
+
private resolveAgenticComponentId;
|
|
907
|
+
private resolveSelectedWidgetKey;
|
|
908
|
+
private formatAgenticFailures;
|
|
909
|
+
private describeAgenticPreviewFailure;
|
|
910
|
+
private describeAgenticPreviewStatus;
|
|
911
|
+
private isAgenticTableContractError;
|
|
912
|
+
private appendAgenticMessage;
|
|
913
|
+
private describeAgenticError;
|
|
631
914
|
private cloneValue;
|
|
632
915
|
tx(key: string, fallback: string): string;
|
|
633
|
-
static ɵfac:
|
|
634
|
-
static ɵcmp:
|
|
916
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicPageBuilderComponent, [null, { optional: true; }]>;
|
|
917
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicPageBuilderComponent, "praxis-dynamic-page-builder", never, { "page": { "alias": "page"; "required": false; }; "context": { "alias": "context"; "required": false; }; "strictValidation": { "alias": "strictValidation"; "required": false; }; "autoPersist": { "alias": "autoPersist"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "showSettingsButton": { "alias": "showSettingsButton"; "required": false; }; "pageIdentity": { "alias": "pageIdentity"; "required": false; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "pageEditorComponent": { "alias": "pageEditorComponent"; "required": false; }; "enableAgenticAuthoring": { "alias": "enableAgenticAuthoring"; "required": false; }; "agenticAuthoringProvider": { "alias": "agenticAuthoringProvider"; "required": false; }; "agenticAuthoringModel": { "alias": "agenticAuthoringModel"; "required": false; }; "agenticAuthoringApiKey": { "alias": "agenticAuthoringApiKey"; "required": false; }; "agenticAuthoringComponentId": { "alias": "agenticAuthoringComponentId"; "required": false; }; "agenticAuthoringScope": { "alias": "agenticAuthoringScope"; "required": false; }; "agenticAuthoringEtag": { "alias": "agenticAuthoringEtag"; "required": false; }; "agenticAuthoringIncludeLlmDiagnostics": { "alias": "agenticAuthoringIncludeLlmDiagnostics"; "required": false; }; "agenticAuthoringEnableStreaming": { "alias": "agenticAuthoringEnableStreaming"; "required": false; }; }, { "pageChange": "pageChange"; "agenticAuthoringApplied": "agenticAuthoringApplied"; }, never, never, true, never>;
|
|
635
918
|
}
|
|
636
919
|
|
|
637
|
-
export { ComponentPaletteDialogComponent, ConfirmDialogComponent, DynamicPageBuilderComponent, DynamicPageConfigEditorComponent, FloatingToolbarComponent, PAGE_BUILDER_AI_CAPABILITIES, PAGE_BUILDER_WIDGET_AI_CATALOGS, PLACEHOLDER, PageConfigEditorComponent, TileToolbarComponent, WidgetShellEditorComponent, clearWidgetAiCatalogs, getPageAiCatalog, getWidgetAiCapabilities, providePageBuilderWidgetAiCatalogs, registerWidgetAiCatalog, registerWidgetAiCatalogs };
|
|
638
|
-
export type { Capability, CapabilityCatalog, CapabilityCategory, ComponentPaletteData, ConfirmDialogData, ValueKind };
|
|
920
|
+
export { ComponentPaletteDialogComponent, ConfirmDialogComponent, DynamicPageBuilderComponent, DynamicPageConfigEditorComponent, FloatingToolbarComponent, PAGE_BUILDER_AGENTIC_AUTHORING_OPTIONS, PAGE_BUILDER_AI_CAPABILITIES, PAGE_BUILDER_WIDGET_AI_CATALOGS, PLACEHOLDER, PageBuilderAgenticAuthoringService, PageConfigEditorComponent, TileToolbarComponent, WidgetShellEditorComponent, clearWidgetAiCatalogs, getPageAiCatalog, getWidgetAiCapabilities, providePageBuilderWidgetAiCatalogs, registerWidgetAiCatalog, registerWidgetAiCatalogs };
|
|
921
|
+
export type { Capability, CapabilityCatalog, CapabilityCategory, ComponentPaletteData, ConfirmDialogData, PageBuilderAgenticAuthoringAttachmentSummary, PageBuilderAgenticAuthoringCandidate, PageBuilderAgenticAuthoringComponentCapabilitiesResult, PageBuilderAgenticAuthoringComponentCapability, PageBuilderAgenticAuthoringComponentCapabilityCatalog, PageBuilderAgenticAuthoringComponentCapabilityExample, PageBuilderAgenticAuthoringComponentFieldAlias, PageBuilderAgenticAuthoringConversationMessage, PageBuilderAgenticAuthoringEventSource, PageBuilderAgenticAuthoringEventSourceFactory, PageBuilderAgenticAuthoringGateResult, PageBuilderAgenticAuthoringIntentResolutionRequest, PageBuilderAgenticAuthoringIntentResolutionResult, PageBuilderAgenticAuthoringOptions, PageBuilderAgenticAuthoringPendingClarification, PageBuilderAgenticAuthoringPromptRequest, PageBuilderAgenticAuthoringProvider, PageBuilderAgenticAuthoringQuickReply, PageBuilderAgenticAuthoringResourceCandidatesRequest, PageBuilderAgenticAuthoringResourceCandidatesResult, PageBuilderAgenticAuthoringTarget, PageBuilderAgenticAuthoringTurnStreamConnectionError, PageBuilderAgenticAuthoringTurnStreamEvent, PageBuilderAgenticAuthoringTurnStreamRequest, PageBuilderAgenticAuthoringTurnStreamStartResponse, PageBuilderApplyRequest, PageBuilderApplyResult, PageBuilderCompiledFormPatch, PageBuilderMinimalFormPlanResult, PageBuilderPreviewDiagnostics, PageBuilderPreviewResult, ValueKind };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/page-builder",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.11",
|
|
4
4
|
"description": "Page and widget builder utilities for Praxis UI (grid, dynamic widgets, editors).",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
"@angular/forms": "^20.0.0",
|
|
9
9
|
"@angular/cdk": "^20.0.0",
|
|
10
10
|
"@angular/material": "^20.0.0",
|
|
11
|
-
"@praxisui/
|
|
12
|
-
"@praxisui/
|
|
11
|
+
"@praxisui/ai": "^8.0.0-beta.11",
|
|
12
|
+
"@praxisui/core": "^8.0.0-beta.11",
|
|
13
|
+
"@praxisui/settings-panel": "^8.0.0-beta.11"
|
|
13
14
|
},
|
|
14
15
|
"dependencies": {
|
|
15
16
|
"tslib": "^2.3.0"
|