@praxisui/stepper 8.0.0-beta.8 → 8.0.0-beta.80
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 +34 -0
- package/fesm2022/praxisui-stepper.mjs +2781 -1041
- package/package.json +20 -15
- package/{index.d.ts → types/praxisui-stepper.d.ts} +92 -11
package/package.json
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/stepper",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.80",
|
|
4
4
|
"description": "Stepper workflows for Praxis UI with integrated forms, lists, uploads and page builder support.",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "^
|
|
7
|
-
"@angular/core": "^
|
|
8
|
-
"@angular/material": "^
|
|
9
|
-
"@angular/cdk": "^
|
|
10
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
11
|
-
"@praxisui/dynamic-form": "^8.0.0-beta.
|
|
12
|
-
"@praxisui/rich-content": "^8.0.0-beta.
|
|
13
|
-
"@praxisui/settings-panel": "^8.0.0-beta.
|
|
14
|
-
"@praxisui/list": "^8.0.0-beta.
|
|
15
|
-
"@praxisui/files-upload": "^8.0.0-beta.
|
|
16
|
-
"@praxisui/page-builder": "^8.0.0-beta.
|
|
6
|
+
"@angular/common": "^21.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0",
|
|
8
|
+
"@angular/material": "^21.0.0",
|
|
9
|
+
"@angular/cdk": "^21.0.0",
|
|
10
|
+
"@praxisui/core": "^8.0.0-beta.80",
|
|
11
|
+
"@praxisui/dynamic-form": "^8.0.0-beta.80",
|
|
12
|
+
"@praxisui/rich-content": "^8.0.0-beta.80",
|
|
13
|
+
"@praxisui/settings-panel": "^8.0.0-beta.80",
|
|
14
|
+
"@praxisui/list": "^8.0.0-beta.80",
|
|
15
|
+
"@praxisui/files-upload": "^8.0.0-beta.80",
|
|
16
|
+
"@praxisui/page-builder": "^8.0.0-beta.80",
|
|
17
|
+
"@angular/forms": "^21.0.0",
|
|
18
|
+
"@angular/router": "^21.0.0",
|
|
19
|
+
"@praxisui/ai": "^8.0.0-beta.80",
|
|
20
|
+
"rxjs": "~7.8.0"
|
|
17
21
|
},
|
|
18
22
|
"dependencies": {
|
|
19
23
|
"tslib": "^2.3.0"
|
|
@@ -40,14 +44,15 @@
|
|
|
40
44
|
],
|
|
41
45
|
"sideEffects": false,
|
|
42
46
|
"module": "fesm2022/praxisui-stepper.mjs",
|
|
43
|
-
"typings": "
|
|
47
|
+
"typings": "types/praxisui-stepper.d.ts",
|
|
44
48
|
"exports": {
|
|
45
49
|
"./package.json": {
|
|
46
50
|
"default": "./package.json"
|
|
47
51
|
},
|
|
48
52
|
".": {
|
|
49
|
-
"types": "./
|
|
53
|
+
"types": "./types/praxisui-stepper.d.ts",
|
|
50
54
|
"default": "./fesm2022/praxisui-stepper.mjs"
|
|
51
55
|
}
|
|
52
|
-
}
|
|
56
|
+
},
|
|
57
|
+
"type": "module"
|
|
53
58
|
}
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit, AfterViewInit, TemplateRef, EventEmitter, Provider } from '@angular/core';
|
|
3
|
-
import { AiCapability, FormConfig, RichContentDocument, WidgetDefinition, WidgetEventEnvelope, FormReadyEvent, FormValueChangeEvent, JsonLogicRecord, ComponentDocMeta, AiCapabilityCategory, AiValueKind,
|
|
2
|
+
import { OnInit, AfterViewInit, OnDestroy, TemplateRef, EventEmitter, Provider } from '@angular/core';
|
|
3
|
+
import { AiCapability, FormConfig, RichContentDocument, WidgetDefinition, WidgetEventEnvelope, FormReadyEvent, FormValueChangeEvent, JsonLogicRecord, ComponentDocMeta, SettingsValueProvider as SettingsValueProvider$1, AiCapabilityCategory, AiCapabilityCatalog, AiValueKind, ComponentAuthoringManifest } from '@praxisui/core';
|
|
4
4
|
import { FormGroup } from '@angular/forms';
|
|
5
5
|
import { ThemePalette } from '@angular/material/core';
|
|
6
|
-
import { BaseAiAdapter, PatchResult } from '@praxisui/ai';
|
|
6
|
+
import { BaseAiAdapter, PatchResult, PraxisAssistantTurnViewState, PraxisAssistantShellLayout, PraxisAssistantShellLabels, PraxisAssistantSessionSnapshot, PraxisAssistantShellQuickReply, PraxisAssistantShellMessage, PraxisAssistantShellContextItem } from '@praxisui/ai';
|
|
7
7
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
8
8
|
import { BehaviorSubject } from 'rxjs';
|
|
9
9
|
import { SettingsValueProvider } from '@praxisui/settings-panel';
|
|
10
|
+
import * as _praxisui_stepper from '@praxisui/stepper';
|
|
10
11
|
|
|
11
12
|
declare class StepperAiAdapter extends BaseAiAdapter<StepperMetadata> {
|
|
12
13
|
private stepper;
|
|
14
|
+
componentId: string;
|
|
15
|
+
componentType: string;
|
|
13
16
|
componentName: string;
|
|
14
17
|
constructor(stepper: PraxisStepper);
|
|
15
18
|
getCurrentConfig(): StepperMetadata;
|
|
16
19
|
getCapabilities(): AiCapability[];
|
|
17
20
|
getRuntimeState(): Record<string, any>;
|
|
21
|
+
getDataProfile(): Record<string, any>;
|
|
22
|
+
getSchemaFields(): Array<Record<string, any>>;
|
|
23
|
+
getAuthoringContext(): Record<string, any>;
|
|
18
24
|
createSnapshot(): StepperMetadata;
|
|
19
25
|
restoreSnapshot(snapshot: StepperMetadata): Promise<void>;
|
|
20
26
|
applyPatch(patch: Partial<StepperMetadata>): Promise<PatchResult>;
|
|
@@ -22,6 +28,7 @@ declare class StepperAiAdapter extends BaseAiAdapter<StepperMetadata> {
|
|
|
22
28
|
private smartMergeStepperConfig;
|
|
23
29
|
private mergeByKey;
|
|
24
30
|
private cloneConfig;
|
|
31
|
+
private hasRichContent;
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
type StepOrientation = 'horizontal' | 'vertical';
|
|
@@ -91,7 +98,7 @@ interface StepperMetadata {
|
|
|
91
98
|
align?: 'start' | 'center' | 'end' | 'space-between';
|
|
92
99
|
};
|
|
93
100
|
}
|
|
94
|
-
declare class PraxisStepper implements OnInit, AfterViewInit {
|
|
101
|
+
declare class PraxisStepper implements OnInit, AfterViewInit, OnDestroy {
|
|
95
102
|
stepLabelTpl?: TemplateRef<any>;
|
|
96
103
|
_config: _angular_core.WritableSignal<StepperMetadata | null>;
|
|
97
104
|
private _selectedIndex;
|
|
@@ -153,10 +160,22 @@ declare class PraxisStepper implements OnInit, AfterViewInit {
|
|
|
153
160
|
private readonly componentKeys;
|
|
154
161
|
private readonly logger;
|
|
155
162
|
private readonly route;
|
|
163
|
+
private readonly cdr;
|
|
164
|
+
private readonly aiApi;
|
|
165
|
+
private readonly assistantSessions;
|
|
166
|
+
private readonly aiTurnOrchestrator;
|
|
167
|
+
private readonly aiAssistantSessionEffect;
|
|
156
168
|
private warnedMissingId;
|
|
157
169
|
protected readonly emptyStepRichContentDocument: RichContentDocument;
|
|
158
170
|
animationDone: EventEmitter<void>;
|
|
159
171
|
aiAdapter: StepperAiAdapter;
|
|
172
|
+
aiAssistantOpen: boolean;
|
|
173
|
+
aiAssistantPrompt: string;
|
|
174
|
+
aiAssistantViewState: PraxisAssistantTurnViewState | null;
|
|
175
|
+
aiAssistantLayout: PraxisAssistantShellLayout;
|
|
176
|
+
readonly aiAssistantLabels: Partial<PraxisAssistantShellLabels>;
|
|
177
|
+
private aiAssistantController;
|
|
178
|
+
private aiAssistantStateSubscription;
|
|
160
179
|
steps: _angular_core.Signal<StepConfig[]>;
|
|
161
180
|
orientation: _angular_core.Signal<StepOrientation>;
|
|
162
181
|
headerPosition: _angular_core.Signal<StepHeaderPosition>;
|
|
@@ -207,6 +226,32 @@ declare class PraxisStepper implements OnInit, AfterViewInit {
|
|
|
207
226
|
getStepRichContentContext(stepIndex: number): JsonLogicRecord;
|
|
208
227
|
openEditor(): void;
|
|
209
228
|
applyConfigFromAdapter(next: StepperMetadata): void;
|
|
229
|
+
openAiAssistant(): void;
|
|
230
|
+
openAiAssistantFromSession(session: PraxisAssistantSessionSnapshot): void;
|
|
231
|
+
closeAiAssistant(): void;
|
|
232
|
+
onAiAssistantPromptChange(prompt: string): void;
|
|
233
|
+
onAiAssistantSubmit(prompt: string): void;
|
|
234
|
+
onAiAssistantApply(): void;
|
|
235
|
+
onAiAssistantRetry(): void;
|
|
236
|
+
onAiAssistantCancel(): void;
|
|
237
|
+
onAiAssistantQuickReply(reply: PraxisAssistantShellQuickReply): void;
|
|
238
|
+
onAiAssistantEditMessage(message: PraxisAssistantShellMessage): void;
|
|
239
|
+
onAiAssistantResendMessage(message: PraxisAssistantShellMessage): void;
|
|
240
|
+
onAiAssistantLayoutChange(layout: PraxisAssistantShellLayout): void;
|
|
241
|
+
buildAiAssistantContextItems(): PraxisAssistantShellContextItem[];
|
|
242
|
+
private initializeAiAssistantController;
|
|
243
|
+
private buildAiAssistantContextSnapshot;
|
|
244
|
+
private syncAiAssistantSession;
|
|
245
|
+
private hasAiAssistantSessionState;
|
|
246
|
+
private resolveAiAssistantSessionId;
|
|
247
|
+
private resolveAiAssistantOwnerId;
|
|
248
|
+
private safeAiAssistantStepperId;
|
|
249
|
+
private resolveAiAssistantRouteKey;
|
|
250
|
+
private resolveAiAssistantSummary;
|
|
251
|
+
private resolveAiAssistantBadge;
|
|
252
|
+
private resolveAiAssistantIcon;
|
|
253
|
+
private collectAiAssistantStepNames;
|
|
254
|
+
private collectAiAssistantCounts;
|
|
210
255
|
addFirstStep(): void;
|
|
211
256
|
onNext(i: number): Promise<void>;
|
|
212
257
|
validateStep(i?: number): Promise<boolean>;
|
|
@@ -218,6 +263,7 @@ declare class PraxisStepper implements OnInit, AfterViewInit {
|
|
|
218
263
|
private storageKey;
|
|
219
264
|
private componentKeyId;
|
|
220
265
|
private warnMissingId;
|
|
266
|
+
ngOnDestroy(): void;
|
|
221
267
|
ngOnInit(): void;
|
|
222
268
|
ngAfterViewInit(): void;
|
|
223
269
|
private scheduleDomSync;
|
|
@@ -239,16 +285,17 @@ declare function providePraxisStepperMetadata(): Provider;
|
|
|
239
285
|
type EditorialZone = 'before' | 'after';
|
|
240
286
|
declare class PraxisStepperConfigEditor implements SettingsValueProvider {
|
|
241
287
|
private readonly i18n;
|
|
288
|
+
set stepperConfig(value: StepperMetadata | string | null | undefined);
|
|
242
289
|
config: StepperMetadata;
|
|
243
290
|
activeStepRef: StepConfig | null;
|
|
244
291
|
isDirty$: BehaviorSubject<boolean>;
|
|
245
292
|
isValid$: BehaviorSubject<boolean>;
|
|
246
293
|
isBusy$: BehaviorSubject<boolean>;
|
|
247
|
-
private readonly settings;
|
|
248
294
|
private readonly dialog;
|
|
249
295
|
private readonly iconPicker;
|
|
250
296
|
private readonly cdr;
|
|
251
297
|
constructor(data?: any);
|
|
298
|
+
private initializeConfig;
|
|
252
299
|
tx(key: string, fallback: string): string;
|
|
253
300
|
stepIndexLabel(index: number): string;
|
|
254
301
|
stepRemoveAria(step: StepConfig, index: number): string;
|
|
@@ -309,11 +356,43 @@ declare class PraxisStepperConfigEditor implements SettingsValueProvider {
|
|
|
309
356
|
addTreeList(): void;
|
|
310
357
|
addTransferListQuick(): void;
|
|
311
358
|
editWidget(w: WidgetDefinition): void;
|
|
359
|
+
private openNestedSettingsEditor;
|
|
312
360
|
getSettingsValue(): any;
|
|
313
361
|
onSave(): any;
|
|
314
362
|
reset(): void;
|
|
315
363
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisStepperConfigEditor, never>;
|
|
316
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisStepperConfigEditor, "praxis-stepper-config-editor", never, {}, {}, never, never, true, never>;
|
|
364
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisStepperConfigEditor, "praxis-stepper-config-editor", never, { "stepperConfig": { "alias": "stepperConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
interface PraxisStepperWidgetEditorInputs {
|
|
368
|
+
config?: StepperMetadata | null;
|
|
369
|
+
stepperId?: string | null;
|
|
370
|
+
componentInstanceId?: string | null;
|
|
371
|
+
selectedIndex?: number;
|
|
372
|
+
[key: string]: unknown;
|
|
373
|
+
}
|
|
374
|
+
interface PraxisStepperWidgetEditorValue {
|
|
375
|
+
inputs: PraxisStepperWidgetEditorInputs;
|
|
376
|
+
}
|
|
377
|
+
declare class PraxisStepperWidgetConfigEditor implements SettingsValueProvider$1, AfterViewInit, OnDestroy {
|
|
378
|
+
inputs: PraxisStepperWidgetEditorInputs | null;
|
|
379
|
+
widgetKey?: string;
|
|
380
|
+
stepperEditor?: PraxisStepperConfigEditor;
|
|
381
|
+
readonly isDirty$: BehaviorSubject<boolean>;
|
|
382
|
+
readonly isValid$: BehaviorSubject<boolean>;
|
|
383
|
+
readonly isBusy$: BehaviorSubject<boolean>;
|
|
384
|
+
private readonly subscription;
|
|
385
|
+
private readonly emptyConfig;
|
|
386
|
+
get config(): StepperMetadata;
|
|
387
|
+
get stepperId(): string | null | undefined;
|
|
388
|
+
ngAfterViewInit(): void;
|
|
389
|
+
ngOnDestroy(): void;
|
|
390
|
+
getSettingsValue(): PraxisStepperWidgetEditorValue;
|
|
391
|
+
onSave(): PraxisStepperWidgetEditorValue;
|
|
392
|
+
reset(): void;
|
|
393
|
+
private buildValue;
|
|
394
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisStepperWidgetConfigEditor, never>;
|
|
395
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisStepperWidgetConfigEditor, "praxis-stepper-widget-config-editor", never, { "inputs": { "alias": "inputs"; "required": false; }; "widgetKey": { "alias": "widgetKey"; "required": false; }; }, {}, never, never, true, never>;
|
|
317
396
|
}
|
|
318
397
|
|
|
319
398
|
type WizardCtaAction = 'next' | 'submit' | 'custom';
|
|
@@ -448,7 +527,7 @@ declare class PraxisWizardFormComponent {
|
|
|
448
527
|
private readonly persistedState;
|
|
449
528
|
readonly selectedIndex: _angular_core.WritableSignal<number>;
|
|
450
529
|
readonly wizard: _angular_core.Signal<WizardFormConfig | null>;
|
|
451
|
-
readonly stepperConfig: _angular_core.Signal<StepperMetadata | null>;
|
|
530
|
+
readonly stepperConfig: _angular_core.Signal<_praxisui_stepper.StepperMetadata | null>;
|
|
452
531
|
readonly activeStep: _angular_core.Signal<WizardStepConfig | null>;
|
|
453
532
|
wizardBrand: _angular_core.Signal<string>;
|
|
454
533
|
activeTitle: _angular_core.Signal<string>;
|
|
@@ -456,9 +535,9 @@ declare class PraxisWizardFormComponent {
|
|
|
456
535
|
activeDescription: _angular_core.Signal<string>;
|
|
457
536
|
readonly resolvedCta: _angular_core.Signal<Partial<WizardCtaConfig>>;
|
|
458
537
|
primaryLabel: _angular_core.Signal<string>;
|
|
459
|
-
primaryAction: _angular_core.Signal<WizardCtaAction>;
|
|
538
|
+
primaryAction: _angular_core.Signal<_praxisui_stepper.WizardCtaAction>;
|
|
460
539
|
secondaryLabel: _angular_core.Signal<string>;
|
|
461
|
-
secondaryAction: _angular_core.Signal<WizardSecondaryAction>;
|
|
540
|
+
secondaryAction: _angular_core.Signal<_praxisui_stepper.WizardSecondaryAction>;
|
|
462
541
|
showSecondaryAction(): boolean;
|
|
463
542
|
isPrimaryDisabled(): boolean;
|
|
464
543
|
onPrimaryAction(): Promise<void>;
|
|
@@ -505,5 +584,7 @@ interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
|
505
584
|
}
|
|
506
585
|
declare const STEPPER_AI_CAPABILITIES: CapabilityCatalog;
|
|
507
586
|
|
|
508
|
-
|
|
509
|
-
|
|
587
|
+
declare const PRAXIS_STEPPER_AUTHORING_MANIFEST: ComponentAuthoringManifest;
|
|
588
|
+
|
|
589
|
+
export { FT_WIZARD_CONFIG, FT_WIZARD_JSON, PRAXIS_STEPPER_AUTHORING_MANIFEST, PRAXIS_STEPPER_COMPONENT_METADATA, PRAXIS_WIZARD_BENEFITS_METADATA, PRAXIS_WIZARD_CONTENT_METADATA, PRAXIS_WIZARD_DIVIDER_METADATA, PRAXIS_WIZARD_NOTICE_METADATA, PraxisStepper, PraxisStepperConfigEditor, PraxisStepperWidgetConfigEditor, PraxisWizardFormComponent, STEPPER_AI_CAPABILITIES, providePraxisStepperMetadata };
|
|
590
|
+
export type { Capability, CapabilityCatalog, CapabilityCategory, PraxisStepperWidgetEditorInputs, PraxisStepperWidgetEditorValue, StepConfig, StepHeaderPosition, StepOrientation, StepperMetadata, ValueKind, WizardBenefitItem, WizardBenefitsBlock, WizardBlock, WizardBlockBase, WizardBlockPlacement, WizardCard, WizardContentBlock, WizardCtaAction, WizardCtaConfig, WizardDividerBlock, WizardFormConfig, WizardInlineNoticeBlock, WizardPreferencesConfig, WizardProgressConfig, WizardSecondaryAction, WizardStepConfig, WizardStepFormConfig, WizardStepZones };
|