@praxisui/stepper 10.0.0-rc.40 → 10.0.0-rc.41
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
CHANGED
|
@@ -105,6 +105,8 @@ validateStep = async ({ step, stepIndex, formGroup, formData }) => {
|
|
|
105
105
|
|
|
106
106
|
Remote dynamic forms still require the effective host to provide the CRUD/resource services expected by `@praxisui/dynamic-form`.
|
|
107
107
|
|
|
108
|
+
When a workflow includes rich-content review blocks (`stepBlocksBeforeForm` or `stepBlocksAfterForm`), `PraxisStepper` reactively merges live form values from all steps into the rich-content evaluation context (`values`, root fields, and `forms[stepId | stepIndex]`). Review steps can therefore bind `recordReference`, `keyValueList`, `propertySheet` or `recordSummary` nodes with `quickView` (`ResourceQuickViewBinding`) to foreign-key IDs or `entity-lookup` selections made in earlier steps.
|
|
109
|
+
|
|
108
110
|
## Main Inputs And Outputs
|
|
109
111
|
|
|
110
112
|
- `stepperId: string`: required stable id for persisted configuration.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-27T22:14:23.237Z",
|
|
4
4
|
"packageName": "@praxisui/stepper",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.41",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 1,
|
|
@@ -595,6 +595,8 @@ class PraxisStepper {
|
|
|
595
595
|
_formComponents = new Map();
|
|
596
596
|
_formValidity = new Map();
|
|
597
597
|
_formPending = new Map();
|
|
598
|
+
_stepFormValues = signal({}, ...(ngDevMode ? [{ debugName: "_stepFormValues" }] : /* istanbul ignore next */ []));
|
|
599
|
+
_formValueSubscriptions = new Map();
|
|
598
600
|
hostElement = inject((ElementRef));
|
|
599
601
|
renderer = inject(Renderer2);
|
|
600
602
|
appliedHeaderClasses = [];
|
|
@@ -633,8 +635,15 @@ class PraxisStepper {
|
|
|
633
635
|
if (i != null)
|
|
634
636
|
this._selectedIndex.set(i);
|
|
635
637
|
}
|
|
638
|
+
_enableCustomization = signal(false, ...(ngDevMode ? [{ debugName: "_enableCustomization" }] : /* istanbul ignore next */ []));
|
|
636
639
|
disableRippleInput = false;
|
|
637
|
-
enableCustomization
|
|
640
|
+
set enableCustomization(value) {
|
|
641
|
+
this._enableCustomization.set(!!value);
|
|
642
|
+
this.cdr.markForCheck();
|
|
643
|
+
}
|
|
644
|
+
get enableCustomization() {
|
|
645
|
+
return this._enableCustomization();
|
|
646
|
+
}
|
|
638
647
|
// Paridade com API do Material
|
|
639
648
|
labelPosition;
|
|
640
649
|
color;
|
|
@@ -811,6 +820,15 @@ class PraxisStepper {
|
|
|
811
820
|
if (component)
|
|
812
821
|
this._formComponents.set(stepIndex, component);
|
|
813
822
|
this._formValidity.set(stepIndex, ev.formGroup.valid);
|
|
823
|
+
this.syncStepFormValues(stepIndex, ev.formGroup);
|
|
824
|
+
this._formValueSubscriptions.get(stepIndex)?.unsubscribe();
|
|
825
|
+
if (ev.formGroup?.valueChanges) {
|
|
826
|
+
this._formValueSubscriptions.set(stepIndex, ev.formGroup.valueChanges.subscribe(() => {
|
|
827
|
+
this.syncStepFormValues(stepIndex, ev.formGroup);
|
|
828
|
+
this.cdr.markForCheck();
|
|
829
|
+
}));
|
|
830
|
+
}
|
|
831
|
+
this.cdr.markForCheck();
|
|
814
832
|
this.stepFormReady.emit({
|
|
815
833
|
stepIndex,
|
|
816
834
|
stepId: this.steps()[stepIndex]?.id,
|
|
@@ -819,12 +837,37 @@ class PraxisStepper {
|
|
|
819
837
|
}
|
|
820
838
|
onFormValueChange(stepIndex, ev) {
|
|
821
839
|
this._formValidity.set(stepIndex, ev.isValid);
|
|
840
|
+
const fg = this._formGroups.get(stepIndex);
|
|
841
|
+
if (ev.formData &&
|
|
842
|
+
typeof ev.formData === 'object' &&
|
|
843
|
+
!Array.isArray(ev.formData)) {
|
|
844
|
+
this._stepFormValues.update((prev) => ({
|
|
845
|
+
...prev,
|
|
846
|
+
[stepIndex]: { ...ev.formData },
|
|
847
|
+
}));
|
|
848
|
+
}
|
|
849
|
+
else if (fg) {
|
|
850
|
+
this.syncStepFormValues(stepIndex, fg);
|
|
851
|
+
}
|
|
852
|
+
this.cdr.markForCheck();
|
|
822
853
|
this.stepFormValueChange.emit({
|
|
823
854
|
stepIndex,
|
|
824
855
|
stepId: this.steps()[stepIndex]?.id,
|
|
825
856
|
event: ev,
|
|
826
857
|
});
|
|
827
858
|
}
|
|
859
|
+
syncStepFormValues(stepIndex, formGroup) {
|
|
860
|
+
const raw = typeof formGroup?.getRawValue === 'function'
|
|
861
|
+
? formGroup.getRawValue()
|
|
862
|
+
: formGroup?.value;
|
|
863
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) {
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
this._stepFormValues.update((prev) => ({
|
|
867
|
+
...prev,
|
|
868
|
+
[stepIndex]: { ...raw },
|
|
869
|
+
}));
|
|
870
|
+
}
|
|
828
871
|
onReactiveDeterminationExecuted(stepIndex, event) {
|
|
829
872
|
this.stepReactiveDeterminationExecuted.emit({
|
|
830
873
|
stepIndex,
|
|
@@ -895,8 +938,37 @@ class PraxisStepper {
|
|
|
895
938
|
return Array.isArray(document?.nodes) && document.nodes.length > 0;
|
|
896
939
|
}
|
|
897
940
|
getStepRichContentContext(stepIndex) {
|
|
898
|
-
const
|
|
941
|
+
const allSteps = this.steps();
|
|
942
|
+
const step = allSteps[stepIndex];
|
|
943
|
+
const trackedValues = this._stepFormValues();
|
|
944
|
+
const formsByStep = {};
|
|
945
|
+
const mergedFormValues = {};
|
|
946
|
+
allSteps.forEach((candidateStep, idx) => {
|
|
947
|
+
const fg = this._formGroups.get(idx);
|
|
948
|
+
const liveRaw = typeof fg?.getRawValue === 'function'
|
|
949
|
+
? fg.getRawValue()
|
|
950
|
+
: fg?.value;
|
|
951
|
+
const stepValues = (liveRaw && typeof liveRaw === 'object' && !Array.isArray(liveRaw)
|
|
952
|
+
? liveRaw
|
|
953
|
+
: trackedValues[idx]) ?? undefined;
|
|
954
|
+
if (!stepValues) {
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
const snapshot = { ...stepValues };
|
|
958
|
+
formsByStep[String(idx)] = snapshot;
|
|
959
|
+
if (candidateStep?.id) {
|
|
960
|
+
formsByStep[candidateStep.id] = snapshot;
|
|
961
|
+
}
|
|
962
|
+
Object.assign(mergedFormValues, snapshot);
|
|
963
|
+
});
|
|
964
|
+
const currentStepValues = formsByStep[String(stepIndex)] ??
|
|
965
|
+
(step?.id ? formsByStep[step.id] : undefined) ??
|
|
966
|
+
{};
|
|
899
967
|
return {
|
|
968
|
+
...mergedFormValues,
|
|
969
|
+
values: mergedFormValues,
|
|
970
|
+
forms: formsByStep,
|
|
971
|
+
currentStepValues: currentStepValues,
|
|
900
972
|
step: (step ?? {}),
|
|
901
973
|
stepIndex,
|
|
902
974
|
stepper: {
|
|
@@ -1394,6 +1466,8 @@ class PraxisStepper {
|
|
|
1394
1466
|
});
|
|
1395
1467
|
}
|
|
1396
1468
|
ngOnDestroy() {
|
|
1469
|
+
this._formValueSubscriptions.forEach((sub) => sub.unsubscribe());
|
|
1470
|
+
this._formValueSubscriptions.clear();
|
|
1397
1471
|
this.assistantSessions.removeContextSession(this.buildAiAssistantContextSnapshot().identity);
|
|
1398
1472
|
this.aiAssistantStateSubscription?.unsubscribe();
|
|
1399
1473
|
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/stepper",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.41",
|
|
4
4
|
"description": "Stepper workflows for Praxis UI with integrated forms, lists, uploads and page builder support.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
8
|
"@angular/material": "^21.0.0",
|
|
9
9
|
"@angular/cdk": "^21.0.0",
|
|
10
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
11
|
-
"@praxisui/dynamic-form": "^10.0.0-rc.
|
|
12
|
-
"@praxisui/rich-content": "^10.0.0-rc.
|
|
13
|
-
"@praxisui/settings-panel": "^10.0.0-rc.
|
|
14
|
-
"@praxisui/list": "^10.0.0-rc.
|
|
15
|
-
"@praxisui/files-upload": "^10.0.0-rc.
|
|
16
|
-
"@praxisui/page-builder": "^10.0.0-rc.
|
|
10
|
+
"@praxisui/core": "^10.0.0-rc.41",
|
|
11
|
+
"@praxisui/dynamic-form": "^10.0.0-rc.41",
|
|
12
|
+
"@praxisui/rich-content": "^10.0.0-rc.41",
|
|
13
|
+
"@praxisui/settings-panel": "^10.0.0-rc.41",
|
|
14
|
+
"@praxisui/list": "^10.0.0-rc.41",
|
|
15
|
+
"@praxisui/files-upload": "^10.0.0-rc.41",
|
|
16
|
+
"@praxisui/page-builder": "^10.0.0-rc.41",
|
|
17
17
|
"@angular/forms": "^21.0.0",
|
|
18
18
|
"@angular/router": "^21.0.0",
|
|
19
|
-
"@praxisui/ai": "^10.0.0-rc.
|
|
19
|
+
"@praxisui/ai": "^10.0.0-rc.41",
|
|
20
20
|
"rxjs": "~7.8.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
@@ -119,6 +119,8 @@ declare class PraxisStepper implements OnInit, AfterViewInit, OnDestroy {
|
|
|
119
119
|
private _formComponents;
|
|
120
120
|
private _formValidity;
|
|
121
121
|
private _formPending;
|
|
122
|
+
private _stepFormValues;
|
|
123
|
+
private _formValueSubscriptions;
|
|
122
124
|
private readonly hostElement;
|
|
123
125
|
private readonly renderer;
|
|
124
126
|
private appliedHeaderClasses;
|
|
@@ -139,8 +141,10 @@ declare class PraxisStepper implements OnInit, AfterViewInit, OnDestroy {
|
|
|
139
141
|
set config(c: StepperMetadata | string | null);
|
|
140
142
|
set selectedIndexInput(i: number | null);
|
|
141
143
|
set selectedIndex(i: number | null);
|
|
144
|
+
private _enableCustomization;
|
|
142
145
|
disableRippleInput: boolean;
|
|
143
|
-
enableCustomization: boolean;
|
|
146
|
+
set enableCustomization(value: boolean);
|
|
147
|
+
get enableCustomization(): boolean;
|
|
144
148
|
labelPosition?: 'bottom' | 'end';
|
|
145
149
|
color?: ThemePalette;
|
|
146
150
|
/**
|
|
@@ -247,6 +251,7 @@ declare class PraxisStepper implements OnInit, AfterViewInit, OnDestroy {
|
|
|
247
251
|
previous(): void;
|
|
248
252
|
onFormReady(stepIndex: number, ev: FormReadyEvent, component?: PraxisDynamicForm): void;
|
|
249
253
|
onFormValueChange(stepIndex: number, ev: FormValueChangeEvent): void;
|
|
254
|
+
private syncStepFormValues;
|
|
250
255
|
onReactiveDeterminationExecuted(stepIndex: number, event: ReactiveDeterminationExecutionEvent): void;
|
|
251
256
|
onReactiveDeterminationPendingChange(stepIndex: number, pending: boolean): void;
|
|
252
257
|
private emitReactiveDeterminationStability;
|