@getuserfeedback/react-native 4.0.2 → 4.0.3
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/dist/index.js +2 -27
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44,7 +44,6 @@ const toFlowHandleIdFromResult = (result) => {
|
|
|
44
44
|
return handle === null || handle === void 0 ? void 0 : handle.flowHandleId;
|
|
45
45
|
};
|
|
46
46
|
const createReactNativeFlowRunController = (flowId, { enqueueFlowCommand, enqueueScopedClose, reportCommandError, }) => {
|
|
47
|
-
let pendingClose = false;
|
|
48
47
|
const handleClient = createFlowCommandHandleController({
|
|
49
48
|
getHandleIdFromSettlement: toFlowHandleIdFromResult,
|
|
50
49
|
isStaleHandleError,
|
|
@@ -58,7 +57,6 @@ const createReactNativeFlowRunController = (flowId, { enqueueFlowCommand, enqueu
|
|
|
58
57
|
handleClient.clearResolvedHandle();
|
|
59
58
|
};
|
|
60
59
|
const reset = () => {
|
|
61
|
-
pendingClose = false;
|
|
62
60
|
handleClient.reset();
|
|
63
61
|
};
|
|
64
62
|
const resetIdleHandle = () => {
|
|
@@ -68,21 +66,8 @@ const createReactNativeFlowRunController = (flowId, { enqueueFlowCommand, enqueu
|
|
|
68
66
|
reset();
|
|
69
67
|
};
|
|
70
68
|
const enqueueAndWaitForSettlement = async (buildPayload) => {
|
|
71
|
-
|
|
72
|
-
await handleClient.runCommand(buildPayload, enqueueFlowCommand);
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
pendingClose = false;
|
|
76
|
-
throw error;
|
|
77
|
-
}
|
|
69
|
+
await handleClient.runCommand(buildPayload, enqueueFlowCommand);
|
|
78
70
|
};
|
|
79
|
-
handleClient.subscribeHandle((flowHandleId) => {
|
|
80
|
-
if (!pendingClose) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
pendingClose = false;
|
|
84
|
-
reportAsyncCommandError(enqueueScopedClose(flowHandleId)).catch(() => { });
|
|
85
|
-
});
|
|
86
71
|
return {
|
|
87
72
|
flowId,
|
|
88
73
|
open: (options) => reportAsyncCommandError(enqueueAndWaitForSettlement((flowHandleId) => ({
|
|
@@ -104,17 +89,7 @@ const createReactNativeFlowRunController = (flowId, { enqueueFlowCommand, enqueu
|
|
|
104
89
|
hideCloseButton: options === null || options === void 0 ? void 0 : options.hideCloseButton,
|
|
105
90
|
}))),
|
|
106
91
|
close: () => {
|
|
107
|
-
|
|
108
|
-
if (!flowHandleId) {
|
|
109
|
-
pendingClose = handleClient.hasPendingCommands();
|
|
110
|
-
return Promise.resolve();
|
|
111
|
-
}
|
|
112
|
-
if (handleClient.hasPendingCommands()) {
|
|
113
|
-
pendingClose = true;
|
|
114
|
-
return Promise.resolve();
|
|
115
|
-
}
|
|
116
|
-
pendingClose = false;
|
|
117
|
-
return reportAsyncCommandError(enqueueScopedClose(flowHandleId));
|
|
92
|
+
return reportAsyncCommandError(handleClient.runResolvedHandleCommand((flowHandleId) => flowHandleId, enqueueScopedClose));
|
|
118
93
|
},
|
|
119
94
|
clearResolvedHandle,
|
|
120
95
|
hasFlowHandleId: (flowHandleId) => handleClient.getHandleId() === flowHandleId,
|
package/dist/version.js
CHANGED
|
@@ -3,4 +3,4 @@ const reactNativeSdkVersion = typeof __GX_REACT_NATIVE_SDK_VERSION__ === "string
|
|
|
3
3
|
: "";
|
|
4
4
|
// Build scripts patch this fallback to the package version for published artifacts.
|
|
5
5
|
// Source-linked workspace usage keeps the local fallback.
|
|
6
|
-
export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "4.0.
|
|
6
|
+
export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "4.0.3";
|