veryfi-lens-wasm 3.5.6 → 3.5.7
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/components/reviewGallery.js +4 -0
- package/core/constants.js +1 -1
- package/core/review-flow.js +2 -2
- package/package.json +1 -1
|
@@ -1225,6 +1225,10 @@ export const createReviewGallery = (container, callbacks = {}, options = {}) =>
|
|
|
1225
1225
|
}
|
|
1226
1226
|
},
|
|
1227
1227
|
isSubmitting: () => submitting,
|
|
1228
|
+
setSubmitEnabled: (enabled) => {
|
|
1229
|
+
if (submitting) return;
|
|
1230
|
+
submitButton.disabled = !enabled;
|
|
1231
|
+
},
|
|
1228
1232
|
updateSubmitMessage: (message) => {
|
|
1229
1233
|
if (loadingMessageEl) loadingMessageEl.textContent = message;
|
|
1230
1234
|
},
|
package/core/constants.js
CHANGED
package/core/review-flow.js
CHANGED
|
@@ -92,7 +92,7 @@ const applyChecksSubmitGate = () => {
|
|
|
92
92
|
if (state.lensFlavor !== 'checks') return;
|
|
93
93
|
const bothRequired = state.enforceBothSides || state.enforceAndSkipBothSides;
|
|
94
94
|
if (bothRequired && store.totalPages() < 2) {
|
|
95
|
-
state.reviewGalleryRef?.
|
|
95
|
+
state.reviewGalleryRef?.setSubmitEnabled(false);
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
|
|
@@ -106,7 +106,7 @@ const isAnydocTwoPageFlip = () =>
|
|
|
106
106
|
const applyAnydocFlipSubmitGate = () => {
|
|
107
107
|
if (!isAnydocTwoPageFlip()) return;
|
|
108
108
|
if ((store.getActiveDoc()?.pages?.length || 0) < 2) {
|
|
109
|
-
state.reviewGalleryRef?.
|
|
109
|
+
state.reviewGalleryRef?.setSubmitEnabled(false);
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
|