@wise/dynamic-flow-client 4.2.1 → 4.2.2
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/build/main.js +15 -11
- package/build/main.mjs +15 -11
- package/package.json +3 -3
package/build/main.js
CHANGED
|
@@ -11040,6 +11040,21 @@ function useDynamicFlowCore(props) {
|
|
|
11040
11040
|
);
|
|
11041
11041
|
const [stepComponent, setStepComponent] = (0, import_react3.useState)(null);
|
|
11042
11042
|
const stepComponentRef = (0, import_react3.useRef)(null);
|
|
11043
|
+
const updateComponent = (0, import_react3.useCallback)(
|
|
11044
|
+
(id, update) => {
|
|
11045
|
+
const currentStepComponent = stepComponentRef.current;
|
|
11046
|
+
if (currentStepComponent) {
|
|
11047
|
+
update(findComponent([currentStepComponent], id, logEvent));
|
|
11048
|
+
setStepComponent(() => {
|
|
11049
|
+
const newStepDomainComponent = __spreadValues({}, currentStepComponent);
|
|
11050
|
+
stepComponentRef.current = newStepDomainComponent;
|
|
11051
|
+
return newStepDomainComponent;
|
|
11052
|
+
});
|
|
11053
|
+
}
|
|
11054
|
+
},
|
|
11055
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11056
|
+
[]
|
|
11057
|
+
);
|
|
11043
11058
|
const stepCount = (0, import_react3.useRef)(0);
|
|
11044
11059
|
const stepRef = (0, import_react3.useRef)(initialStep != null ? initialStep : null);
|
|
11045
11060
|
const etagRef = (0, import_react3.useRef)(null);
|
|
@@ -11081,17 +11096,6 @@ function useDynamicFlowCore(props) {
|
|
|
11081
11096
|
errors: validationResult.errors
|
|
11082
11097
|
});
|
|
11083
11098
|
}
|
|
11084
|
-
const updateComponent = (id, update) => {
|
|
11085
|
-
const currentStepComponent = stepComponentRef.current;
|
|
11086
|
-
if (currentStepComponent) {
|
|
11087
|
-
update(findComponent([currentStepComponent], id, logEvent));
|
|
11088
|
-
setStepComponent(() => {
|
|
11089
|
-
const newStepDomainComponent = __spreadValues({}, currentStepComponent);
|
|
11090
|
-
stepComponentRef.current = newStepDomainComponent;
|
|
11091
|
-
return newStepDomainComponent;
|
|
11092
|
-
});
|
|
11093
|
-
}
|
|
11094
|
-
};
|
|
11095
11099
|
try {
|
|
11096
11100
|
const newStepComponent = mapStepToComponent({
|
|
11097
11101
|
count: stepCount.current,
|
package/build/main.mjs
CHANGED
|
@@ -11017,6 +11017,21 @@ function useDynamicFlowCore(props) {
|
|
|
11017
11017
|
);
|
|
11018
11018
|
const [stepComponent, setStepComponent] = useState(null);
|
|
11019
11019
|
const stepComponentRef = useRef2(null);
|
|
11020
|
+
const updateComponent = useCallback2(
|
|
11021
|
+
(id, update) => {
|
|
11022
|
+
const currentStepComponent = stepComponentRef.current;
|
|
11023
|
+
if (currentStepComponent) {
|
|
11024
|
+
update(findComponent([currentStepComponent], id, logEvent));
|
|
11025
|
+
setStepComponent(() => {
|
|
11026
|
+
const newStepDomainComponent = __spreadValues({}, currentStepComponent);
|
|
11027
|
+
stepComponentRef.current = newStepDomainComponent;
|
|
11028
|
+
return newStepDomainComponent;
|
|
11029
|
+
});
|
|
11030
|
+
}
|
|
11031
|
+
},
|
|
11032
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11033
|
+
[]
|
|
11034
|
+
);
|
|
11020
11035
|
const stepCount = useRef2(0);
|
|
11021
11036
|
const stepRef = useRef2(initialStep != null ? initialStep : null);
|
|
11022
11037
|
const etagRef = useRef2(null);
|
|
@@ -11058,17 +11073,6 @@ function useDynamicFlowCore(props) {
|
|
|
11058
11073
|
errors: validationResult.errors
|
|
11059
11074
|
});
|
|
11060
11075
|
}
|
|
11061
|
-
const updateComponent = (id, update) => {
|
|
11062
|
-
const currentStepComponent = stepComponentRef.current;
|
|
11063
|
-
if (currentStepComponent) {
|
|
11064
|
-
update(findComponent([currentStepComponent], id, logEvent));
|
|
11065
|
-
setStepComponent(() => {
|
|
11066
|
-
const newStepDomainComponent = __spreadValues({}, currentStepComponent);
|
|
11067
|
-
stepComponentRef.current = newStepDomainComponent;
|
|
11068
|
-
return newStepDomainComponent;
|
|
11069
|
-
});
|
|
11070
|
-
}
|
|
11071
|
-
};
|
|
11072
11076
|
try {
|
|
11073
11077
|
const newStepComponent = mapStepToComponent({
|
|
11074
11078
|
count: stepCount.current,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/dynamic-flow-client",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.2",
|
|
4
4
|
"description": "Dynamic Flow web client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./build/main.js",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"tsx": "4.19.3",
|
|
86
86
|
"typescript": "5.8.2",
|
|
87
87
|
"webpack": "5.98.0",
|
|
88
|
-
"@wise/dynamic-flow-
|
|
89
|
-
"@wise/dynamic-flow-
|
|
88
|
+
"@wise/dynamic-flow-fixtures": "0.0.1",
|
|
89
|
+
"@wise/dynamic-flow-renderers": "0.0.0"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@transferwise/components": "^46.92.0",
|