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