@praxisui/page-builder 1.0.0-beta.5 → 1.0.0-beta.52
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 +168 -1
- package/fesm2022/praxisui-page-builder.mjs +4811 -50
- package/fesm2022/praxisui-page-builder.mjs.map +1 -1
- package/index.d.ts +468 -6
- package/package.json +6 -6
- package/fesm2022/praxisui-page-builder-connection-graph.component-C6x--6--.mjs +0 -1129
- package/fesm2022/praxisui-page-builder-connection-graph.component-C6x--6--.mjs.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
4
|
-
import { ComponentDocMeta, ComponentMetadataRegistry, GridPageDefinition, GridWidgetInstance, WidgetConnection } from '@praxisui/core';
|
|
3
|
+
import { EventEmitter, OnInit, OnChanges, SimpleChanges, InjectionToken, Provider, ElementRef } from '@angular/core';
|
|
4
|
+
import { ComponentDocMeta, ComponentMetadataRegistry, GridPageDefinition, GridWidgetInstance, WidgetConnection, WidgetShellConfig, WidgetShellAction, WidgetPageOrientation, WidgetPageDefinition, WidgetPageLayout, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog, PageIdentity, ConnectionManagerService, AsyncConfigStorage, ComponentKeyService, SettingsPanelBridge, WidgetShellActionEvent } from '@praxisui/core';
|
|
5
|
+
export { WidgetShellComponent } from '@praxisui/core';
|
|
5
6
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
7
|
+
import * as rxjs from 'rxjs';
|
|
8
|
+
import { FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
9
|
+
import { SettingsValueProvider } from '@praxisui/settings-panel';
|
|
10
|
+
import { GridsterConfig, GridsterItem } from 'angular-gridster2';
|
|
11
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
6
12
|
|
|
7
13
|
declare const PLACEHOLDER = 1;
|
|
8
14
|
|
|
@@ -26,8 +32,9 @@ declare class TileToolbarComponent {
|
|
|
26
32
|
widgetType: string | null;
|
|
27
33
|
remove: EventEmitter<void>;
|
|
28
34
|
settings: EventEmitter<void>;
|
|
35
|
+
shell: EventEmitter<void>;
|
|
29
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<TileToolbarComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TileToolbarComponent, "praxis-tile-toolbar", never, { "selected": { "alias": "selected"; "required": false; }; "widgetType": { "alias": "widgetType"; "required": false; }; }, { "remove": "remove"; "settings": "settings"; }, never, never, true, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵ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>;
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
declare class FloatingToolbarComponent {
|
|
@@ -44,7 +51,7 @@ declare class FloatingToolbarComponent {
|
|
|
44
51
|
connectionsVisual: EventEmitter<void>;
|
|
45
52
|
save: EventEmitter<void>;
|
|
46
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingToolbarComponent, never>;
|
|
47
|
-
static ɵcmp: i0.ɵɵ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"; "connections": "connections"; "connectionsEdit": "connectionsEdit"; "connectionsVisual": "connectionsVisual"; "save": "save"; }, never,
|
|
54
|
+
static ɵcmp: i0.ɵɵ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"; "connections": "connections"; "connectionsEdit": "connectionsEdit"; "connectionsVisual": "connectionsVisual"; "save": "save"; }, never, ["[pdx-toolbar-extra]"], true, never>;
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
interface ComponentPaletteData {
|
|
@@ -130,5 +137,460 @@ declare class ConnectionBuilderComponent implements OnInit, OnChanges {
|
|
|
130
137
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConnectionBuilderComponent, "praxis-connection-builder", never, { "page": { "alias": "page"; "required": false; }; "widgets": { "alias": "widgets"; "required": false; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
|
|
131
138
|
}
|
|
132
139
|
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
type ShellInputs = {
|
|
141
|
+
shell?: WidgetShellConfig | null;
|
|
142
|
+
widgetKey?: string;
|
|
143
|
+
widgetType?: string;
|
|
144
|
+
presets?: Record<string, WidgetShellConfig['appearance']> | null;
|
|
145
|
+
pagePreset?: string | null;
|
|
146
|
+
};
|
|
147
|
+
type ShellEditorResult = {
|
|
148
|
+
shell: WidgetShellConfig | null;
|
|
149
|
+
applyToAll?: boolean;
|
|
150
|
+
pagePreset?: string;
|
|
151
|
+
};
|
|
152
|
+
type AvailableShellAction = {
|
|
153
|
+
kind: 'action' | 'command';
|
|
154
|
+
id: string;
|
|
155
|
+
label: string;
|
|
156
|
+
icon?: string;
|
|
157
|
+
scope?: NonNullable<ComponentDocMeta['actions']>[number]['scope'] | 'any';
|
|
158
|
+
emit?: string;
|
|
159
|
+
command?: string;
|
|
160
|
+
description?: string;
|
|
161
|
+
payloadExample?: any;
|
|
162
|
+
};
|
|
163
|
+
type SetInputValueOption = {
|
|
164
|
+
label: string;
|
|
165
|
+
value: any;
|
|
166
|
+
icon?: string;
|
|
167
|
+
};
|
|
168
|
+
type SetInputPreset = {
|
|
169
|
+
input: string;
|
|
170
|
+
label: string;
|
|
171
|
+
icon?: string;
|
|
172
|
+
values: SetInputValueOption[];
|
|
173
|
+
};
|
|
174
|
+
declare class WidgetShellEditorComponent implements SettingsValueProvider {
|
|
175
|
+
private registry?;
|
|
176
|
+
form: FormGroup<{
|
|
177
|
+
kind: FormControl<"none" | "dashboard-card">;
|
|
178
|
+
preset: FormControl<string>;
|
|
179
|
+
applyToAll: FormControl<boolean>;
|
|
180
|
+
title: FormControl<string>;
|
|
181
|
+
subtitle: FormControl<string>;
|
|
182
|
+
icon: FormControl<string>;
|
|
183
|
+
showHeader: FormControl<"auto" | "true" | "false">;
|
|
184
|
+
collapsible: FormControl<boolean>;
|
|
185
|
+
cardBg: FormControl<string>;
|
|
186
|
+
cardBorder: FormControl<string>;
|
|
187
|
+
cardRadius: FormControl<string>;
|
|
188
|
+
cardShadow: FormControl<string>;
|
|
189
|
+
headerBg: FormControl<string>;
|
|
190
|
+
headerBorder: FormControl<string>;
|
|
191
|
+
titleColor: FormControl<string>;
|
|
192
|
+
subtitleColor: FormControl<string>;
|
|
193
|
+
iconColor: FormControl<string>;
|
|
194
|
+
bodyBg: FormControl<string>;
|
|
195
|
+
bodyColor: FormControl<string>;
|
|
196
|
+
bodyPadding: FormControl<string>;
|
|
197
|
+
titleSize: FormControl<string>;
|
|
198
|
+
titleWeight: FormControl<string>;
|
|
199
|
+
subtitleSize: FormControl<string>;
|
|
200
|
+
actions: FormArray<FormGroup<any>>;
|
|
201
|
+
}>;
|
|
202
|
+
private readonly initialShell;
|
|
203
|
+
private readonly dirtySubject;
|
|
204
|
+
private readonly validSubject;
|
|
205
|
+
private readonly busySubject;
|
|
206
|
+
isDirty$: rxjs.Observable<boolean>;
|
|
207
|
+
isValid$: rxjs.Observable<boolean>;
|
|
208
|
+
isBusy$: rxjs.Observable<boolean>;
|
|
209
|
+
private snapshot;
|
|
210
|
+
presetOptions: Array<{
|
|
211
|
+
id: string;
|
|
212
|
+
label: string;
|
|
213
|
+
}>;
|
|
214
|
+
private presets;
|
|
215
|
+
availableActions: AvailableShellAction[];
|
|
216
|
+
actionQuery: FormControl<string>;
|
|
217
|
+
showScopeShell: boolean;
|
|
218
|
+
showScopeAny: boolean;
|
|
219
|
+
showScopeToolbar: boolean;
|
|
220
|
+
showScopeContext: boolean;
|
|
221
|
+
setInputPresets: SetInputPreset[];
|
|
222
|
+
setInputTarget: FormControl<string>;
|
|
223
|
+
setInputValue: FormControl<any>;
|
|
224
|
+
previewCollapsed: boolean;
|
|
225
|
+
previewExpanded: boolean;
|
|
226
|
+
pagePreset: string | null;
|
|
227
|
+
constructor(data?: ShellInputs | null, registry?: (ComponentMetadataRegistry | null) | undefined);
|
|
228
|
+
get actions(): FormArray<FormGroup>;
|
|
229
|
+
get hasAvailableActions(): boolean;
|
|
230
|
+
addAction(seed?: Partial<WidgetShellAction>): void;
|
|
231
|
+
removeAction(index: number): void;
|
|
232
|
+
getSettingsValue(): ShellEditorResult;
|
|
233
|
+
onSave(): ShellEditorResult;
|
|
234
|
+
reset(): void;
|
|
235
|
+
private applyShell;
|
|
236
|
+
private loadAvailableActions;
|
|
237
|
+
private createActionGroup;
|
|
238
|
+
private buildShell;
|
|
239
|
+
private buildResult;
|
|
240
|
+
private buildAppearance;
|
|
241
|
+
previewVars(): Record<string, string | null>;
|
|
242
|
+
previewShowHeader(): boolean;
|
|
243
|
+
previewTitle(): string;
|
|
244
|
+
previewSubtitle(): string;
|
|
245
|
+
private buildPreviewAppearance;
|
|
246
|
+
private mergeAppearance;
|
|
247
|
+
togglePreviewCollapse(): void;
|
|
248
|
+
togglePreviewExpand(): void;
|
|
249
|
+
previewHeaderActions(): WidgetShellAction[];
|
|
250
|
+
previewOverflowCount(): number;
|
|
251
|
+
previewWindowActions(): WidgetShellAction[];
|
|
252
|
+
private normalizeAction;
|
|
253
|
+
private tryParsePayload;
|
|
254
|
+
private snapshotValue;
|
|
255
|
+
filteredAvailableActions(): AvailableShellAction[];
|
|
256
|
+
isActionSelected(action: AvailableShellAction): boolean;
|
|
257
|
+
toggleAvailableAction(action: AvailableShellAction): void;
|
|
258
|
+
scopeLabel(scope?: string): string;
|
|
259
|
+
stringifyPayload(payload: any): string;
|
|
260
|
+
displayInputPath(path: string): string;
|
|
261
|
+
extractActionInput(actionValue: any): string;
|
|
262
|
+
showActionInputPath(actionValue: any): boolean;
|
|
263
|
+
currentSetInputValues(): SetInputValueOption[];
|
|
264
|
+
addSetInputAction(): void;
|
|
265
|
+
private findActionIndex;
|
|
266
|
+
private previewActions;
|
|
267
|
+
private loadSetInputPresets;
|
|
268
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetShellEditorComponent, [{ optional: true; }, { optional: true; }]>;
|
|
269
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WidgetShellEditorComponent, "praxis-widget-shell-editor", never, {}, {}, never, never, true, never>;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
type DynamicPageEditorInputs = {
|
|
273
|
+
page?: WidgetPageDefinition | null;
|
|
274
|
+
layout?: WidgetPageLayout | null;
|
|
275
|
+
presets?: Record<string, WidgetShellConfig['appearance']> | null;
|
|
276
|
+
pagePreset?: string | null;
|
|
277
|
+
};
|
|
278
|
+
type DynamicPageEditorResult = {
|
|
279
|
+
layout: WidgetPageLayout | null;
|
|
280
|
+
pagePreset: string;
|
|
281
|
+
fullPage?: WidgetPageDefinition;
|
|
282
|
+
};
|
|
283
|
+
declare class DynamicPageConfigEditorComponent implements SettingsValueProvider {
|
|
284
|
+
form: FormGroup<{
|
|
285
|
+
pagePreset: FormControl<string>;
|
|
286
|
+
orientation: FormControl<WidgetPageOrientation>;
|
|
287
|
+
columns: FormControl<number>;
|
|
288
|
+
gap: FormControl<string>;
|
|
289
|
+
bpSm: FormControl<number>;
|
|
290
|
+
bpMd: FormControl<number>;
|
|
291
|
+
bpLg: FormControl<number>;
|
|
292
|
+
bpXl: FormControl<number>;
|
|
293
|
+
}>;
|
|
294
|
+
jsonControl: FormControl<string>;
|
|
295
|
+
private readonly initialLayout;
|
|
296
|
+
private readonly dirtySubject;
|
|
297
|
+
private readonly validSubject;
|
|
298
|
+
private readonly busySubject;
|
|
299
|
+
isDirty$: rxjs.Observable<boolean>;
|
|
300
|
+
isValid$: rxjs.Observable<boolean>;
|
|
301
|
+
isBusy$: rxjs.Observable<boolean>;
|
|
302
|
+
private snapshot;
|
|
303
|
+
presetOptions: Array<{
|
|
304
|
+
id: string;
|
|
305
|
+
label: string;
|
|
306
|
+
}>;
|
|
307
|
+
private pagePreset;
|
|
308
|
+
private currentFullConfig;
|
|
309
|
+
private activeTab;
|
|
310
|
+
constructor(data?: DynamicPageEditorInputs | null);
|
|
311
|
+
onTabChange(index: number): void;
|
|
312
|
+
getSettingsValue(): DynamicPageEditorResult;
|
|
313
|
+
formatJson(): void;
|
|
314
|
+
onSave(): DynamicPageEditorResult;
|
|
315
|
+
reset(): void;
|
|
316
|
+
private updateValidity;
|
|
317
|
+
private updateStateFromForm;
|
|
318
|
+
private applyLayoutToForm;
|
|
319
|
+
private toggleGridControls;
|
|
320
|
+
private syncJsonFromState;
|
|
321
|
+
private extractPreset;
|
|
322
|
+
private snapshotValue;
|
|
323
|
+
private formatPresetLabel;
|
|
324
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicPageConfigEditorComponent, [{ optional: true; }]>;
|
|
325
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicPageConfigEditorComponent, "praxis-dynamic-page-config-editor", never, {}, {}, never, never, true, never>;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Capabilities catalog for Dynamic Gridster Page (GridPageDefinition + inputs).
|
|
330
|
+
*/
|
|
331
|
+
|
|
332
|
+
declare module '@praxisui/core' {
|
|
333
|
+
interface AiCapabilityCategoryMap {
|
|
334
|
+
page: true;
|
|
335
|
+
widgets: true;
|
|
336
|
+
connections: true;
|
|
337
|
+
context: true;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
type CapabilityCategory = AiCapabilityCategory;
|
|
341
|
+
type ValueKind = AiValueKind;
|
|
342
|
+
interface Capability extends AiCapability {
|
|
343
|
+
category: CapabilityCategory;
|
|
344
|
+
}
|
|
345
|
+
interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
346
|
+
capabilities: Capability[];
|
|
347
|
+
}
|
|
348
|
+
declare const PAGE_BUILDER_AI_CAPABILITIES: CapabilityCatalog;
|
|
349
|
+
|
|
350
|
+
type PageBuilderConfig = {
|
|
351
|
+
page?: GridPageDefinition;
|
|
352
|
+
context?: Record<string, unknown> | null;
|
|
353
|
+
editModeEnabled?: boolean;
|
|
354
|
+
showSettingsButton?: boolean;
|
|
355
|
+
strictValidation?: boolean;
|
|
356
|
+
gridsterOptions?: Partial<GridsterConfig>;
|
|
357
|
+
pageIdentity?: PageIdentity;
|
|
358
|
+
};
|
|
359
|
+
interface PageBuilderHost {
|
|
360
|
+
page?: GridPageDefinition | string;
|
|
361
|
+
context?: Record<string, unknown> | null;
|
|
362
|
+
editModeEnabled: boolean;
|
|
363
|
+
showSettingsButton: boolean;
|
|
364
|
+
strictValidation: boolean;
|
|
365
|
+
gridsterOptions?: Partial<GridsterConfig>;
|
|
366
|
+
pageIdentity?: PageIdentity;
|
|
367
|
+
applyConfigFromAdapter(config: PageBuilderConfig): void;
|
|
368
|
+
}
|
|
369
|
+
type PatchResult = {
|
|
370
|
+
success: boolean;
|
|
371
|
+
warnings?: string[];
|
|
372
|
+
error?: string;
|
|
373
|
+
};
|
|
374
|
+
declare class PageBuilderAiAdapter {
|
|
375
|
+
private host;
|
|
376
|
+
private registry?;
|
|
377
|
+
componentName: string;
|
|
378
|
+
componentId: string;
|
|
379
|
+
componentType: string;
|
|
380
|
+
constructor(host: PageBuilderHost, registry?: ComponentMetadataRegistry | undefined);
|
|
381
|
+
getCurrentConfig(): PageBuilderConfig;
|
|
382
|
+
getCapabilities(): AiCapability[];
|
|
383
|
+
getRuntimeState(): Record<string, unknown>;
|
|
384
|
+
createSnapshot(): PageBuilderConfig;
|
|
385
|
+
restoreSnapshot(snapshot: PageBuilderConfig): Promise<void>;
|
|
386
|
+
applyPatch(patch: Partial<PageBuilderConfig>, _intent?: string): Promise<PatchResult>;
|
|
387
|
+
private applyConfig;
|
|
388
|
+
private parsePage;
|
|
389
|
+
private normalizePageForAi;
|
|
390
|
+
private normalizeConfigForRuntime;
|
|
391
|
+
private normalizePageForRuntime;
|
|
392
|
+
private normalizePatch;
|
|
393
|
+
private mergeWidgets;
|
|
394
|
+
private mergeConnections;
|
|
395
|
+
private ensureLayoutFromLegacy;
|
|
396
|
+
private ensureLegacyLayout;
|
|
397
|
+
private layoutFromLegacy;
|
|
398
|
+
private getWidgetKey;
|
|
399
|
+
private generateWidgetKey;
|
|
400
|
+
private connectionKey;
|
|
401
|
+
private gridsterFromPageOptions;
|
|
402
|
+
private mergeRuntimeGridsterOptions;
|
|
403
|
+
private pageOptionsFromGridster;
|
|
404
|
+
private pickGridsterOptions;
|
|
405
|
+
private buildComponentCatalog;
|
|
406
|
+
private pickNumber;
|
|
407
|
+
private coerceNumber;
|
|
408
|
+
private clone;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
declare function registerWidgetAiCatalog(widgetId: string, catalog: AiCapabilityCatalog): void;
|
|
412
|
+
declare function registerWidgetAiCatalogs(entries: Record<string, AiCapabilityCatalog>): void;
|
|
413
|
+
declare function clearWidgetAiCatalogs(): void;
|
|
414
|
+
/**
|
|
415
|
+
* Retrieves the CapabilityCatalog for a given widget ID.
|
|
416
|
+
*/
|
|
417
|
+
declare function getWidgetAiCapabilities(widgetId: string): AiCapabilityCatalog | undefined;
|
|
418
|
+
/**
|
|
419
|
+
* Aggregates macro page builder capabilities with specific micro capabilities
|
|
420
|
+
* of the widgets present in the page configuration.
|
|
421
|
+
*/
|
|
422
|
+
declare function getPageAiCatalog(pageConfig?: PageBuilderConfig): AiCapabilityCatalog;
|
|
423
|
+
|
|
424
|
+
declare const PAGE_BUILDER_WIDGET_AI_CATALOGS: InjectionToken<Record<string, AiCapabilityCatalog>>;
|
|
425
|
+
|
|
426
|
+
declare function providePageBuilderWidgetAiCatalogs(): Provider;
|
|
427
|
+
|
|
428
|
+
interface GraphNode {
|
|
429
|
+
id: string;
|
|
430
|
+
label: string;
|
|
431
|
+
icon?: string;
|
|
432
|
+
type: string;
|
|
433
|
+
parentId?: string | null;
|
|
434
|
+
collapsed?: boolean;
|
|
435
|
+
bounds: {
|
|
436
|
+
x: number;
|
|
437
|
+
y: number;
|
|
438
|
+
width: number;
|
|
439
|
+
height: number;
|
|
440
|
+
};
|
|
441
|
+
ports: GraphPort[];
|
|
442
|
+
}
|
|
443
|
+
interface GraphPort {
|
|
444
|
+
id: string;
|
|
445
|
+
label: string;
|
|
446
|
+
kind: 'input' | 'output';
|
|
447
|
+
/** For inputs that map into deep paths (e.g. Tabs internals) */
|
|
448
|
+
path?: string;
|
|
449
|
+
/** Optional description (from metadata) for tooltips */
|
|
450
|
+
description?: string;
|
|
451
|
+
anchor: {
|
|
452
|
+
x: number;
|
|
453
|
+
y: number;
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
interface GraphEdgeMeta {
|
|
457
|
+
map?: string;
|
|
458
|
+
transform?: string;
|
|
459
|
+
bindingOrder?: string[];
|
|
460
|
+
routerMode?: 'auto' | 'elbow' | 'bezier' | 'straight';
|
|
461
|
+
}
|
|
462
|
+
interface GraphEdge {
|
|
463
|
+
id: string;
|
|
464
|
+
from: {
|
|
465
|
+
nodeId: string;
|
|
466
|
+
portId: string;
|
|
467
|
+
};
|
|
468
|
+
to: {
|
|
469
|
+
nodeId: string;
|
|
470
|
+
portId: string;
|
|
471
|
+
};
|
|
472
|
+
label?: string;
|
|
473
|
+
meta?: GraphEdgeMeta;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
declare class GraphMapperService {
|
|
477
|
+
private registry;
|
|
478
|
+
constructor(registry: ComponentMetadataRegistry);
|
|
479
|
+
/** Build nodes and edges for a given page definition and widgets. */
|
|
480
|
+
mapToGraph(page: GridPageDefinition | undefined, widgets: GridWidgetInstance[]): {
|
|
481
|
+
nodes: GraphNode[];
|
|
482
|
+
edges: GraphEdge[];
|
|
483
|
+
};
|
|
484
|
+
private ensurePort;
|
|
485
|
+
/**
|
|
486
|
+
* Parse dot-path for Tabs internals. Supported:
|
|
487
|
+
* - inputs.config.tabs[<i>].widgets[<j>].inputs.<input>
|
|
488
|
+
* - inputs.config.nav.links[<i>].widgets[<j>].inputs.<input>
|
|
489
|
+
*/
|
|
490
|
+
parseTabsPath(path: string | undefined): {
|
|
491
|
+
kind: 'group' | 'nav';
|
|
492
|
+
index: number;
|
|
493
|
+
widgetIndex: number;
|
|
494
|
+
input: string;
|
|
495
|
+
} | null;
|
|
496
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GraphMapperService, never>;
|
|
497
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GraphMapperService>;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
type ItemWithKey = GridsterItem & {
|
|
501
|
+
__key__: string;
|
|
502
|
+
};
|
|
503
|
+
declare class DynamicGridsterPageComponent implements OnChanges, PageBuilderHost {
|
|
504
|
+
private conn;
|
|
505
|
+
private router;
|
|
506
|
+
private host;
|
|
507
|
+
private dialog;
|
|
508
|
+
private graphMapper;
|
|
509
|
+
private registry;
|
|
510
|
+
private storage;
|
|
511
|
+
private componentKeys;
|
|
512
|
+
private tableConfigEditor;
|
|
513
|
+
private stepperConfigEditor;
|
|
514
|
+
private settingsPanel;
|
|
515
|
+
private route;
|
|
516
|
+
page?: GridPageDefinition | string;
|
|
517
|
+
context?: Record<string, any> | null;
|
|
518
|
+
strictValidation: boolean;
|
|
519
|
+
gridsterOptions?: Partial<GridsterConfig>;
|
|
520
|
+
/** Shows settings button and enables in-place editing affordances */
|
|
521
|
+
editModeEnabled: boolean;
|
|
522
|
+
/** When true, shows small floating settings fab; if false, rely on bottom toolbar */
|
|
523
|
+
showSettingsButton: boolean;
|
|
524
|
+
/** Optional identity; if not provided, will derive routePath from current Router URL */
|
|
525
|
+
pageIdentity?: PageIdentity;
|
|
526
|
+
/** Optional instance key for pages rendered multiple times */
|
|
527
|
+
componentInstanceId?: string;
|
|
528
|
+
layoutChange: EventEmitter<GridWidgetInstance[]>;
|
|
529
|
+
pageChange: EventEmitter<GridPageDefinition>;
|
|
530
|
+
mergedContext: Record<string, any>;
|
|
531
|
+
private selectedKey;
|
|
532
|
+
private widgets;
|
|
533
|
+
private readonly globalActions;
|
|
534
|
+
items: i0.WritableSignal<ItemWithKey[]>;
|
|
535
|
+
interacting: boolean;
|
|
536
|
+
overlayEnabled: boolean;
|
|
537
|
+
private appliedPersisted;
|
|
538
|
+
aiAdapter: PageBuilderAiAdapter;
|
|
539
|
+
options: GridsterConfig;
|
|
540
|
+
trackItem: (_: number, it: ItemWithKey) => string;
|
|
541
|
+
constructor(conn: ConnectionManagerService, router: Router, host: ElementRef<HTMLElement>, dialog: MatDialog, graphMapper: GraphMapperService, registry: ComponentMetadataRegistry, storage: AsyncConfigStorage, componentKeys: ComponentKeyService, tableConfigEditor: any, stepperConfigEditor: any, settingsPanel: SettingsPanelBridge | null, route: ActivatedRoute | null);
|
|
542
|
+
applyConfigFromAdapter(next: PageBuilderConfig): void;
|
|
543
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
544
|
+
private parsePage;
|
|
545
|
+
private gridsterFromPageOptions;
|
|
546
|
+
private enrichWithInheritedInputs;
|
|
547
|
+
private applyWidgetInputs;
|
|
548
|
+
private ensureComponentInstanceId;
|
|
549
|
+
private widgetToItem;
|
|
550
|
+
computeTileDomId(key: string): string;
|
|
551
|
+
isSelected(key: string): boolean;
|
|
552
|
+
getWidgetType(key: string): string | undefined;
|
|
553
|
+
getWidgetDef(key: string): any;
|
|
554
|
+
getWidgetShell(key: string): any;
|
|
555
|
+
onTileClick(key: string, ev: MouseEvent): void;
|
|
556
|
+
onItemChanged(item: GridsterItem): void;
|
|
557
|
+
togglePreview(): void;
|
|
558
|
+
confirmRemoveWidget(key: string): void;
|
|
559
|
+
removeWidget(key: string): void;
|
|
560
|
+
onAddComponent(): void;
|
|
561
|
+
addWidget(type: string): void;
|
|
562
|
+
createWidgetKey(type: string): string;
|
|
563
|
+
openWidgetSettings(key: string): void;
|
|
564
|
+
openWidgetShellSettings(key: string): void;
|
|
565
|
+
openConnectionsGraph(): void;
|
|
566
|
+
openConnectionsBuilder(): void;
|
|
567
|
+
openConnectionsEditor(): Promise<void>;
|
|
568
|
+
openPageSettings(): void;
|
|
569
|
+
private derivePageIdentity;
|
|
570
|
+
savePage(): void;
|
|
571
|
+
private applyPage;
|
|
572
|
+
private loadPersistedPage;
|
|
573
|
+
onWidgetEvent(fromKey: string, evt: {
|
|
574
|
+
output?: string;
|
|
575
|
+
payload?: any;
|
|
576
|
+
}): void;
|
|
577
|
+
onShellAction(fromKey: string, evt: WidgetShellActionEvent): void;
|
|
578
|
+
private handleSetInputCommand;
|
|
579
|
+
private maybeExecuteMappedAction;
|
|
580
|
+
private maybeExecuteGlobalCommand;
|
|
581
|
+
private resolveActionPayload;
|
|
582
|
+
private resolveTemplate;
|
|
583
|
+
private lookup;
|
|
584
|
+
private applyWidgetShell;
|
|
585
|
+
private applyPageShellPreset;
|
|
586
|
+
private applyEditShellActions;
|
|
587
|
+
showSettings(): boolean;
|
|
588
|
+
private storageKey;
|
|
589
|
+
private componentKeyId;
|
|
590
|
+
private buildPageScopeId;
|
|
591
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicGridsterPageComponent, [null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
592
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicGridsterPageComponent, "praxis-dynamic-gridster-page", never, { "page": { "alias": "page"; "required": false; }; "context": { "alias": "context"; "required": false; }; "strictValidation": { "alias": "strictValidation"; "required": false; }; "gridsterOptions": { "alias": "gridsterOptions"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "showSettingsButton": { "alias": "showSettingsButton"; "required": false; }; "pageIdentity": { "alias": "pageIdentity"; "required": false; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; }, { "layoutChange": "layoutChange"; "pageChange": "pageChange"; }, never, never, true, never>;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
export { ComponentPaletteDialogComponent, ConfirmDialogComponent, ConnectionBuilderComponent, DynamicGridsterPageComponent, DynamicPageConfigEditorComponent, FloatingToolbarComponent, PAGE_BUILDER_AI_CAPABILITIES, PAGE_BUILDER_WIDGET_AI_CATALOGS, PLACEHOLDER, TileToolbarComponent, WidgetShellEditorComponent, clearWidgetAiCatalogs, getPageAiCatalog, getWidgetAiCapabilities, providePageBuilderWidgetAiCatalogs, registerWidgetAiCatalog, registerWidgetAiCatalogs };
|
|
596
|
+
export type { Capability, CapabilityCatalog, CapabilityCategory, ComponentPaletteData, ConfirmDialogData, ValueKind };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/page-builder",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.52",
|
|
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",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"@angular/cdk": "^20.0.0",
|
|
10
10
|
"@angular/material": "^20.0.0",
|
|
11
11
|
"angular-gridster2": "^20.2.2",
|
|
12
|
-
"@praxisui/core": "^1.0.0-beta.
|
|
13
|
-
"@praxisui/settings-panel": "^1.0.0-beta.
|
|
12
|
+
"@praxisui/core": "^1.0.0-beta.52",
|
|
13
|
+
"@praxisui/settings-panel": "^1.0.0-beta.52"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tslib": "^2.3.0"
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "https://github.com/codexrodrigues/praxis"
|
|
24
|
+
"url": "https://github.com/codexrodrigues/praxis-ui-angular"
|
|
25
25
|
},
|
|
26
|
-
"homepage": "https://github.com/codexrodrigues/praxis#readme",
|
|
26
|
+
"homepage": "https://github.com/codexrodrigues/praxis-ui-angular#readme",
|
|
27
27
|
"bugs": {
|
|
28
|
-
"url": "https://github.com/codexrodrigues/praxis/issues"
|
|
28
|
+
"url": "https://github.com/codexrodrigues/praxis-ui-angular/issues"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
31
|
"angular",
|