@praxisui/page-builder 9.0.65 → 9.0.67
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 +162 -2
- package/ai/component-registry.json +13 -7
- package/fesm2022/praxisui-page-builder.mjs +1570 -187
- package/package.json +4 -4
- package/types/praxisui-page-builder.d.ts +108 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/page-builder",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.67",
|
|
4
4
|
"description": "Page and widget builder utilities for Praxis UI (grid, dynamic widgets, editors).",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"@angular/forms": "^21.0.0",
|
|
9
9
|
"@angular/cdk": "^21.0.0",
|
|
10
10
|
"@angular/material": "^21.0.0",
|
|
11
|
-
"@praxisui/ai": "^9.0.
|
|
12
|
-
"@praxisui/core": "^9.0.
|
|
13
|
-
"@praxisui/settings-panel": "^9.0.
|
|
11
|
+
"@praxisui/ai": "^9.0.67",
|
|
12
|
+
"@praxisui/core": "^9.0.67",
|
|
13
|
+
"@praxisui/settings-panel": "^9.0.67",
|
|
14
14
|
"rxjs": "~7.8.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { EventEmitter, OnInit, WritableSignal, InjectionToken, Provider, OnChanges, OnDestroy, Type, SimpleChanges } from '@angular/core';
|
|
4
|
-
import
|
|
4
|
+
import * as _praxisui_core from '@praxisui/core';
|
|
5
|
+
import { ComponentDocMeta, ComponentMetadataRegistry, PraxisI18nService, WidgetShellConfig, WidgetPageAuthoringCapabilities, WidgetShellAction, EndpointRef, PortContract, ComponentPortPathSegment, LinkIntent, CompositionLink, WidgetPageDefinition, TransformKind, SurfaceOpenPayload, WidgetPageDeviceKind, SettingsValueProvider as SettingsValueProvider$1, WidgetPageGroupingDefinition, BUILTIN_PAGE_LAYOUT_PRESETS, BUILTIN_PAGE_THEME_PRESETS, PageIdentity, WidgetStateNode, WidgetDerivedStateNode, AiCapability, AiCapabilityCategory, AiCapabilityCatalog, AiValueKind, WidgetPageCanvasLayout, WidgetPageDeviceLayouts, WidgetPageSlotAssignments, WidgetPageStateInput, WidgetInstance, TransformOutputHint, TransformSemanticKind, ConfigAuthoringSource, DomainKnowledgeChangeSetRequest, DomainKnowledgeChangeSet, DomainKnowledgeChangeSetTimelineResponse, DomainKnowledgeChangeSetFilters, DomainKnowledgeValidationResponse, DomainKnowledgeStatusTransitionRequest, DomainRuleIntakeRequest, DomainRuleIntakeResponse, DomainRuleDefinitionRequest, DomainRuleDefinition, DomainRuleSimulationRequest, DomainRuleSimulationResponse, DomainRuleStatusTransitionRequest, DomainRulePublicationRequest, DomainRulePublicationResponse, DomainRuleMaterializationFilters, DomainRuleMaterialization, DomainRuleTimelineResponse, PraxisRuntimeComponentObservationEnvelope, ComponentContextPack, ComponentAuthoringManifest, DiagnosticRecord, NestedPortCatalogRegistry, CompositionValidatorService, ApiUrlEntry, DynamicWidgetPageComponent, ConfigDocument, WidgetEventEnvelope, ObservabilityAgenticTurnMetrics, SettingsPanelBridge, ObservabilityAgenticTurnMetricBucket, RichTimelineItem } from '@praxisui/core';
|
|
5
6
|
import * as rxjs from 'rxjs';
|
|
6
7
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
7
8
|
import { FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
@@ -162,6 +163,10 @@ type SetInputPreset = {
|
|
|
162
163
|
};
|
|
163
164
|
declare class WidgetShellEditorComponent implements SettingsValueProvider {
|
|
164
165
|
private registry?;
|
|
166
|
+
private readonly i18n;
|
|
167
|
+
menuPlacementLabel(): string;
|
|
168
|
+
appearanceError(): string;
|
|
169
|
+
stickyHeaderLabel(): string;
|
|
165
170
|
form: FormGroup<{
|
|
166
171
|
kind: FormControl<"none" | "dashboard-card">;
|
|
167
172
|
preset: FormControl<string>;
|
|
@@ -170,6 +175,7 @@ declare class WidgetShellEditorComponent implements SettingsValueProvider {
|
|
|
170
175
|
subtitle: FormControl<string>;
|
|
171
176
|
icon: FormControl<string>;
|
|
172
177
|
showHeader: FormControl<"auto" | "true" | "false">;
|
|
178
|
+
stickyHeader: FormControl<boolean>;
|
|
173
179
|
collapsible: FormControl<boolean>;
|
|
174
180
|
cardBg: FormControl<string>;
|
|
175
181
|
cardBorder: FormControl<string>;
|
|
@@ -277,6 +283,8 @@ interface ConnectionEditorPort {
|
|
|
277
283
|
label: string;
|
|
278
284
|
kind: ConnectionEditorPortKind;
|
|
279
285
|
endpoint: EndpointRef;
|
|
286
|
+
/** Transient registry evidence; never serialized into a composition endpoint. */
|
|
287
|
+
contract?: PortContract;
|
|
280
288
|
nestedPath?: ComponentPortPathSegment[];
|
|
281
289
|
}
|
|
282
290
|
interface ConnectionEditorNode {
|
|
@@ -481,6 +489,24 @@ declare class ConnectionEditorComponent {
|
|
|
481
489
|
readonly focusWidget: _angular_core.OutputEmitterRef<string>;
|
|
482
490
|
readonly openPageSettings: _angular_core.OutputEmitterRef<void>;
|
|
483
491
|
readonly close: _angular_core.OutputEmitterRef<void>;
|
|
492
|
+
private readonly componentRegistry;
|
|
493
|
+
private readonly compositionValidator;
|
|
494
|
+
readonly draftBase: _angular_core.WritableSignal<WidgetPageDefinition | null>;
|
|
495
|
+
readonly draftPage: _angular_core.WritableSignal<WidgetPageDefinition | null>;
|
|
496
|
+
readonly workingPage: _angular_core.Signal<WidgetPageDefinition | null | undefined>;
|
|
497
|
+
readonly draftSourceId: _angular_core.WritableSignal<string>;
|
|
498
|
+
readonly draftTargetId: _angular_core.WritableSignal<string>;
|
|
499
|
+
readonly draftLinkId: _angular_core.WritableSignal<string | null>;
|
|
500
|
+
readonly draftIsNew: _angular_core.WritableSignal<boolean>;
|
|
501
|
+
private draftSelectionBefore;
|
|
502
|
+
readonly presentationMode: _angular_core.WritableSignal<boolean>;
|
|
503
|
+
readonly draftConflict: _angular_core.Signal<boolean>;
|
|
504
|
+
readonly draftPorts: _angular_core.Signal<ConnectionEditorPort[]>;
|
|
505
|
+
readonly draftSources: _angular_core.Signal<ConnectionEditorPort[]>;
|
|
506
|
+
readonly draftTargets: _angular_core.Signal<ConnectionEditorPort[]>;
|
|
507
|
+
readonly draftDiagnostics: _angular_core.Signal<_praxisui_core.DiagnosticRecord[]>;
|
|
508
|
+
readonly draftDuplicate: _angular_core.Signal<boolean>;
|
|
509
|
+
readonly canApplyDraft: _angular_core.Signal<boolean>;
|
|
484
510
|
readonly activeMode: _angular_core.WritableSignal<ConnectionEditorFlowMode>;
|
|
485
511
|
readonly activeFilter: _angular_core.WritableSignal<ConnectionsEditorFilter>;
|
|
486
512
|
readonly selectedWidgetId: _angular_core.WritableSignal<string | null>;
|
|
@@ -793,6 +819,7 @@ declare class ConnectionEditorComponent {
|
|
|
793
819
|
describeEdge(edge: ConnectionsViewerEdge): string;
|
|
794
820
|
edgeHasDiagnostics(edge: ConnectionsViewerEdge): boolean;
|
|
795
821
|
edgeDiagnostics(edge: ConnectionsViewerEdge): unknown[];
|
|
822
|
+
edgeRouteTitle(edge: ConnectionsViewerEdge): string;
|
|
796
823
|
describeSource(edge: ConnectionsViewerEdge): string;
|
|
797
824
|
describeTarget(edge: ConnectionsViewerEdge): string;
|
|
798
825
|
globalActionPayloadText(connection: ConnectionEditorConnection): string;
|
|
@@ -801,6 +828,20 @@ declare class ConnectionEditorComponent {
|
|
|
801
828
|
surfaceOpenHostKind(connection: ConnectionEditorConnection): string;
|
|
802
829
|
applySurfaceOpenPayload(connection: ConnectionEditorConnection, payload: SurfaceOpenPayload): void;
|
|
803
830
|
applyGlobalActionPayload(connection: ConnectionEditorConnection, payloadText: string, event: Event): void;
|
|
831
|
+
beginNewConnection(): void;
|
|
832
|
+
beginEditConnection(linkId: string): void;
|
|
833
|
+
changeDraftEndpoint(side: 'source' | 'target', id: string): void;
|
|
834
|
+
projectDraftValue(): void;
|
|
835
|
+
setDraftMissingValue(missingValuePolicy: 'skip' | 'use-default'): void;
|
|
836
|
+
changeDraftPickPath(index: number, path: string): void;
|
|
837
|
+
draftPortLabel(port: ConnectionEditorPort): string;
|
|
838
|
+
draftEndpointLabel(id: string): string;
|
|
839
|
+
applyDraft(): void;
|
|
840
|
+
cancelDraft(): void;
|
|
841
|
+
private clearDraft;
|
|
842
|
+
closeEditor(): void;
|
|
843
|
+
nodeCaptionWidth(): number;
|
|
844
|
+
togglePresentation(): void;
|
|
804
845
|
tx(key: string, fallback: string): string;
|
|
805
846
|
private availableGlobalActions;
|
|
806
847
|
private availableGlobalActionIds;
|
|
@@ -857,7 +898,46 @@ declare class ConnectionEditorComponent {
|
|
|
857
898
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConnectionEditorComponent, "praxis-connection-editor", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; "focusWidget": "focusWidget"; "openPageSettings": "openPageSettings"; "close": "close"; }, never, never, true, never>;
|
|
858
899
|
}
|
|
859
900
|
|
|
860
|
-
|
|
901
|
+
declare const LIMIT_KEYS: readonly ["minColSpan", "maxColSpan", "minRowSpan", "maxRowSpan", "minHeightPx", "maxHeightPx"];
|
|
902
|
+
type LimitKey = typeof LIMIT_KEYS[number];
|
|
903
|
+
type LimitValues = Record<LimitKey, number | null>;
|
|
904
|
+
type HeightValues = {
|
|
905
|
+
heightMode: 'inherit' | 'auto' | 'fixed';
|
|
906
|
+
heightPx: number | null;
|
|
907
|
+
offsetTopPx: number | null;
|
|
908
|
+
};
|
|
909
|
+
type LimitForm = FormGroup<{
|
|
910
|
+
[K in LimitKey]: FormControl<number | null>;
|
|
911
|
+
} & {
|
|
912
|
+
[K in keyof HeightValues]: FormControl<HeightValues[K]>;
|
|
913
|
+
}>;
|
|
914
|
+
type LimitScope = 'base' | WidgetPageDeviceKind;
|
|
915
|
+
interface LimitTarget {
|
|
916
|
+
key: string;
|
|
917
|
+
title: string;
|
|
918
|
+
scope: LimitScope;
|
|
919
|
+
seed: LimitValues & HeightValues;
|
|
920
|
+
}
|
|
921
|
+
type LimitIssue = {
|
|
922
|
+
index: number;
|
|
923
|
+
code: 'integer' | 'range' | 'columns' | 'size' | 'height';
|
|
924
|
+
};
|
|
925
|
+
/** Editor projection of Core canvas constraints; never a second persisted document. */
|
|
926
|
+
declare class CanvasConstraintEditorModel {
|
|
927
|
+
readonly form: FormArray<LimitForm>;
|
|
928
|
+
targets: LimitTarget[];
|
|
929
|
+
private baseline;
|
|
930
|
+
hydrate(page: WidgetPageDefinition): void;
|
|
931
|
+
/** Mutates only the caller's cloned draft, preserving unknown fields and untouched overrides. */
|
|
932
|
+
apply(page: WidgetPageDefinition): LimitIssue | null;
|
|
933
|
+
private fail;
|
|
934
|
+
displayedSize(index: number, columns: number): {
|
|
935
|
+
width: number;
|
|
936
|
+
height: number;
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
type EditorTabId$1 = 'canvas' | 'grouping' | 'devices' | 'context' | 'state' | 'limits';
|
|
861
941
|
type DeviceKey = 'desktop' | 'tablet' | 'mobile';
|
|
862
942
|
type GroupingNodeGroup$1 = FormGroup<{
|
|
863
943
|
kind: FormControl<string>;
|
|
@@ -934,11 +1014,22 @@ declare class DynamicPageConfigEditorComponent implements OnInit, SettingsValueP
|
|
|
934
1014
|
readonly contextError: WritableSignal<string | null>;
|
|
935
1015
|
readonly stateError: WritableSignal<string | null>;
|
|
936
1016
|
readonly deviceError: WritableSignal<string | null>;
|
|
1017
|
+
readonly canvasLimits: CanvasConstraintEditorModel;
|
|
1018
|
+
readonly limitsTargetControl: FormControl<number>;
|
|
1019
|
+
readonly limitsError: WritableSignal<string | null>;
|
|
1020
|
+
readonly limitsErrorMatcher: {
|
|
1021
|
+
isErrorState: (control: FormControl | null) => boolean;
|
|
1022
|
+
};
|
|
937
1023
|
private readonly injectedData;
|
|
1024
|
+
readonly isHostedInSettingsPanel: boolean;
|
|
938
1025
|
private readonly i18n;
|
|
939
1026
|
private pageInput;
|
|
940
1027
|
private snapshot;
|
|
1028
|
+
readonly stackedDevices: Set<DeviceKey>;
|
|
1029
|
+
readonly activeDevice: WritableSignal<DeviceKey>;
|
|
941
1030
|
private hydrating;
|
|
1031
|
+
private renderedCandidate;
|
|
1032
|
+
private renderedValidationFingerprint;
|
|
942
1033
|
private readonly tabOrder;
|
|
943
1034
|
constructor();
|
|
944
1035
|
ngOnInit(): void;
|
|
@@ -947,6 +1038,8 @@ declare class DynamicPageConfigEditorComponent implements OnInit, SettingsValueP
|
|
|
947
1038
|
get hasPendingChanges(): boolean;
|
|
948
1039
|
get validationStateLabel(): string;
|
|
949
1040
|
get dirtyStateLabel(): string;
|
|
1041
|
+
get nonLimitError(): string | null;
|
|
1042
|
+
get limitsSummaryError(): string | null;
|
|
950
1043
|
get selectedLayoutPresetLabel(): string;
|
|
951
1044
|
get selectedThemePresetLabel(): string;
|
|
952
1045
|
get selectedLayoutPresetEntry(): LayoutPresetEntry | null;
|
|
@@ -958,6 +1051,9 @@ declare class DynamicPageConfigEditorComponent implements OnInit, SettingsValueP
|
|
|
958
1051
|
onSave(): WidgetPageDefinition | null;
|
|
959
1052
|
reset(): void;
|
|
960
1053
|
pinRecommendedThemePreset(): void;
|
|
1054
|
+
get hasCanvasWidgets(): boolean;
|
|
1055
|
+
stackDevice(device: DeviceKey): void;
|
|
1056
|
+
private stackedCanvas;
|
|
961
1057
|
addGroupingNode(seed?: WidgetPageGroupingDefinition): void;
|
|
962
1058
|
removeGroupingNode(index: number): void;
|
|
963
1059
|
layoutPresetSummary(preset: LayoutPresetEntry): string;
|
|
@@ -967,12 +1063,22 @@ declare class DynamicPageConfigEditorComponent implements OnInit, SettingsValueP
|
|
|
967
1063
|
inheritedThemeHelp(theme: ThemePresetEntry): string;
|
|
968
1064
|
groupLabel(index: number): string;
|
|
969
1065
|
tx(key: string, fallback: string): string;
|
|
1066
|
+
limitsTargetLabel(index: number): string;
|
|
1067
|
+
limitFieldError(control: FormControl<number | null>): string;
|
|
1068
|
+
private draftFingerprint;
|
|
1069
|
+
limitsGeometryLabel(): string;
|
|
1070
|
+
limitsUseContentHeight(): boolean;
|
|
1071
|
+
private applyCanvasLimits;
|
|
1072
|
+
private readRenderedIssue;
|
|
1073
|
+
protected refreshRenderedValidation(): void;
|
|
970
1074
|
private createDeviceVariantForm;
|
|
971
1075
|
private createGroupingNodeGroup;
|
|
972
1076
|
private hydrate;
|
|
973
1077
|
private replaceGroupingNodes;
|
|
974
1078
|
private buildCurrentPage;
|
|
975
1079
|
private buildGrouping;
|
|
1080
|
+
/** A grid must place every existing widget before replacing the flow layout. */
|
|
1081
|
+
private completeCanvasItems;
|
|
976
1082
|
private buildDeviceLayouts;
|
|
977
1083
|
private invalidate;
|
|
978
1084
|
private refreshPanelState;
|