@scandit/web-datacapture-label 8.5.3 → 8.6.0

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.
Files changed (364) hide show
  1. package/build/js/{AdaptiveRecognitionResult-Clnk-SP8.d.ts → AdaptiveRecognitionResult-y66P3VQQ.d.ts} +224 -27
  2. package/build/js/{BarcodeField-CWg5Ve8v.d.ts → BarcodeField-DJn7-z-m.d.ts} +1 -2
  3. package/build/js/{BarcodeFieldBuilder-CSsj0EXY.d.ts → BarcodeFieldBuilder-C3ORgzp_.d.ts} +3 -4
  4. package/build/js/{Button-Ou77FlfL.d.ts → Button-BQw0QTaa.d.ts} +3 -2
  5. package/build/js/{CapturedLabel-PjFfeqht.d.ts → CapturedLabel-CxiHZPCl.d.ts} +1 -2
  6. package/build/js/Carrier-CjlU3MQ0.d.ts +38 -0
  7. package/build/js/{CustomBarcode-B9b3T3wr.d.ts → CustomBarcode-CDxDEuLW.d.ts} +2 -3
  8. package/build/js/{CustomBarcodeBuilder-DdWG8iCR.d.ts → CustomBarcodeBuilder-BbJ6y6wo.d.ts} +3 -4
  9. package/build/js/{CustomText-Cl2GuEWp.d.ts → CustomText-41Rtf4e7.d.ts} +3 -4
  10. package/build/js/{CustomTextBuilder-0AbdOASa.d.ts → CustomTextBuilder-Cx446FQo.d.ts} +3 -4
  11. package/build/js/{DateText-qQtIgcnZ.d.ts → DateText-wfiiLxGb.d.ts} +3 -4
  12. package/build/js/{DateTextBuilder-D4LModbR.d.ts → DateTextBuilder-hglQSv2l.d.ts} +3 -4
  13. package/build/js/{ExpiryDateText-DkTHW-n-.d.ts → ExpiryDateText-BtUI1uAf.d.ts} +3 -4
  14. package/build/js/{ExpiryDateTextBuilder-BGrTAbAB.d.ts → ExpiryDateTextBuilder-CGrQ7Hea.d.ts} +3 -4
  15. package/build/js/FieldId-BMwA9rgx.d.ts +32 -0
  16. package/build/js/{ImeiOneBarcode-d4T3iiT8.d.ts → ImeiOneBarcode-dhXCZMVi.d.ts} +1 -2
  17. package/build/js/{ImeiOneBarcodeBuilder-B9onIT76.d.ts → ImeiOneBarcodeBuilder-Bj3CjnCv.d.ts} +2 -3
  18. package/build/js/{ImeiTwoBarcode-DhmyWFV3.d.ts → ImeiTwoBarcode-Bm5fuVb-.d.ts} +1 -2
  19. package/build/js/{ImeiTwoBarcodeBuilder-JChbnrgN.d.ts → ImeiTwoBarcodeBuilder-CugRqyC8.d.ts} +2 -3
  20. package/build/js/{LabelCapture-BZi-QVCO.d.ts → LabelCapture-BsBYp-Tr.d.ts} +3 -4
  21. package/build/js/{LabelCaptureAdvancedOverlay-e09i_aoX.d.ts → LabelCaptureAdvancedOverlay-Bpt5QkPC.d.ts} +6 -6
  22. package/build/js/{LabelCaptureBasicOverlay-BZl1LJkD.d.ts → LabelCaptureBasicOverlay-CF4h_JL9.d.ts} +6 -7
  23. package/build/js/{LabelCaptureFeedback-Bc-zIaL_.d.ts → LabelCaptureFeedback-sBwE9pgJ.d.ts} +0 -1
  24. package/build/js/{LabelCaptureOverlayJSON-B6X3-JDh.d.ts → LabelCaptureOverlayJSON-B-Vo-158.d.ts} +1 -2
  25. package/build/js/{LabelCaptureSession-Dc8YZO9H.d.ts → LabelCaptureSession-lVHLczXv.d.ts} +1 -2
  26. package/build/js/{LabelCaptureSettings-D4GHiKnt.d.ts → LabelCaptureSettings-076qXEg4.d.ts} +1 -2
  27. package/build/js/{LabelCaptureWorkerManager-DAHFjhle.js → LabelCaptureWorkerManager-iwl00EZR.js} +1 -1
  28. package/build/js/{LabelDateFormat-C9T5qNMc.d.ts → LabelDateFormat-2KViYUuq.d.ts} +1 -2
  29. package/build/js/{LabelDefinition-CAZoQj1a.d.ts → LabelDefinition-DEROTlBM.d.ts} +26 -27
  30. package/build/js/{LabelField-BAO35-Eb.d.ts → LabelField-b2ukZfup.d.ts} +6 -5
  31. package/build/js/{LabelFieldDefinitionBuilder-rN0LybgZ.d.ts → LabelFieldDefinitionBuilder-D-yf34AO.d.ts} +1 -2
  32. package/build/js/{LabelFieldLocation-DDqgTh17.d.ts → LabelFieldLocation-eoZD3v4d.d.ts} +0 -1
  33. package/build/js/{PackingDateText-DH3NkY_K.d.ts → PackingDateText-BxwiZ4HS.d.ts} +3 -4
  34. package/build/js/{PackingDateTextBuilder-Cay2b3Se.d.ts → PackingDateTextBuilder-CgWv_e2L.d.ts} +3 -4
  35. package/build/js/{PartNumberBarcode-Dzx1zF4O.d.ts → PartNumberBarcode-D2mysndM.d.ts} +1 -2
  36. package/build/js/{PartNumberBarcodeBuilder-Bwg9UTcy.d.ts → PartNumberBarcodeBuilder-CU5oArvT.d.ts} +2 -3
  37. package/build/js/{SerialNumberBarcode-DWBGJVoz.d.ts → SerialNumberBarcode-Ck2AEyxm.d.ts} +1 -2
  38. package/build/js/{SerialNumberBarcodeBuilder-oSUDdRsf.d.ts → SerialNumberBarcodeBuilder-BZRf4Jyp.d.ts} +2 -3
  39. package/build/js/{TextField-CTCb88lU.d.ts → TextField-B5ize0NE.d.ts} +1 -2
  40. package/build/js/{TextFieldBuilder-biW0vkn0.d.ts → TextFieldBuilder-CaffaBBH.d.ts} +1 -2
  41. package/build/js/{TotalPriceText-BydB0NCL.d.ts → TotalPriceText-CiOJFnt4.d.ts} +2 -3
  42. package/build/js/{TotalPriceTextBuilder-B8MK5Xjy.d.ts → TotalPriceTextBuilder-CDwYNGhA.d.ts} +2 -3
  43. package/build/js/{UnitPriceText-C7EwC-Go.d.ts → UnitPriceText-DMdoMIGG.d.ts} +2 -3
  44. package/build/js/{UnitPriceTextBuilder-Bc7dIZF4.d.ts → UnitPriceTextBuilder-B7fFpVja.d.ts} +2 -3
  45. package/build/js/{ValidationFlowField-DL7FdqPM.d.ts → ValidationFlowField-B8BG6AoW.d.ts} +1 -2
  46. package/build/js/{WeightText-DrWQ9nBI.d.ts → WeightText-xC0IyyPL.d.ts} +2 -3
  47. package/build/js/{WeightTextBuilder-BzG1seYF.d.ts → WeightTextBuilder-Bm1dmTp5.d.ts} +2 -3
  48. package/build/js/api/AdaptiveRecognitionMode.d.ts +1 -1
  49. package/build/js/api/AdaptiveRecognitionResult.d.ts +1 -1
  50. package/build/js/api/BarcodeField.d.ts +1 -1
  51. package/build/js/api/BarcodeFieldBuilder.d.ts +1 -1
  52. package/build/js/api/BarcodeFieldBuilder.js +1 -1
  53. package/build/js/api/CapturedLabel.d.ts +1 -1
  54. package/build/js/api/Carrier.d.ts +2 -0
  55. package/build/js/api/Carrier.js +1 -0
  56. package/build/js/api/CustomBarcode.d.ts +1 -1
  57. package/build/js/api/CustomBarcodeBuilder.d.ts +1 -1
  58. package/build/js/api/CustomText.d.ts +1 -1
  59. package/build/js/api/CustomTextBuilder.d.ts +1 -1
  60. package/build/js/api/DateText.d.ts +1 -1
  61. package/build/js/api/DateTextBuilder.d.ts +1 -1
  62. package/build/js/api/ExpiryDateText.d.ts +1 -1
  63. package/build/js/api/ExpiryDateTextBuilder.d.ts +1 -1
  64. package/build/js/api/ImeiOneBarcode.d.ts +1 -1
  65. package/build/js/api/ImeiOneBarcodeBuilder.d.ts +1 -1
  66. package/build/js/api/ImeiTwoBarcode.d.ts +1 -1
  67. package/build/js/api/ImeiTwoBarcodeBuilder.d.ts +1 -1
  68. package/build/js/api/LabelCapture.d.ts +1 -1
  69. package/build/js/api/LabelCapture.js +1 -1
  70. package/build/js/api/LabelCaptureAdaptiveRecognitionOverlay.d.ts +5 -5
  71. package/build/js/api/LabelCaptureAdaptiveRecognitionOverlay.js +1 -1
  72. package/build/js/api/LabelCaptureAdaptiveRecognitionSettings.d.ts +1 -1
  73. package/build/js/api/LabelCaptureAdaptiveRecognitionSettings.js +1 -1
  74. package/build/js/api/LabelCaptureAdvancedOverlay.d.ts +1 -1
  75. package/build/js/api/LabelCaptureAdvancedOverlay.js +1 -1
  76. package/build/js/api/LabelCaptureAdvancedOverlayListener.d.ts +1 -1
  77. package/build/js/api/LabelCaptureBasicOverlay.d.ts +1 -1
  78. package/build/js/api/LabelCaptureBasicOverlay.js +1 -1
  79. package/build/js/api/LabelCaptureBasicOverlayListener.d.ts +1 -1
  80. package/build/js/api/LabelCaptureFeedback.d.ts +1 -1
  81. package/build/js/api/LabelCaptureListener.d.ts +1 -1
  82. package/build/js/api/LabelCaptureOverlayJSON.d.ts +1 -1
  83. package/build/js/api/LabelCaptureSession.d.ts +1 -1
  84. package/build/js/api/LabelCaptureSettings.d.ts +1 -1
  85. package/build/js/api/LabelCaptureValidationFlow/LabelCaptureValidationFlowOverlay.d.ts +3 -4
  86. package/build/js/api/LabelCaptureValidationFlow/LabelCaptureValidationFlowOverlay.js +1 -1
  87. package/build/js/api/LabelCaptureValidationFlow/private/FieldId.d.ts +2 -0
  88. package/build/js/api/LabelCaptureValidationFlow/private/FieldId.js +1 -0
  89. package/build/js/api/LabelCaptureValidationFlow/private/ValidationFlowPresenter.d.ts +4 -5
  90. package/build/js/api/LabelCaptureValidationFlow/private/ValidationFlowPresenter.js +1 -1
  91. package/build/js/api/LabelCaptureValidationFlow/private/ValidationFlowStateManager.d.ts +14 -23
  92. package/build/js/api/LabelCaptureValidationFlow/private/ValidationFlowStateManager.js +1 -1
  93. package/build/js/api/LabelCaptureValidationFlow/private/ValidationFlowView.d.ts +2 -2
  94. package/build/js/api/LabelCaptureValidationFlow/private/ValidationFlowView.js +1 -1
  95. package/build/js/api/LabelCaptureValidationFlowFeedback.d.ts +0 -1
  96. package/build/js/api/LabelCaptureValidationFlowSettings.d.ts +0 -1
  97. package/build/js/api/LabelCaptureValidationFlowSettings.js +1 -1
  98. package/build/js/api/LabelDateComponentFormat.d.ts +1 -1
  99. package/build/js/api/LabelDateComponentFormat.js +1 -1
  100. package/build/js/api/LabelDateFormat.d.ts +1 -1
  101. package/build/js/api/LabelDateResult.d.ts +1 -1
  102. package/build/js/api/LabelDefinition.d.ts +1 -1
  103. package/build/js/api/LabelField.d.ts +1 -1
  104. package/build/js/api/LabelField.js +1 -1
  105. package/build/js/api/LabelFieldDefinition.d.ts +1 -1
  106. package/build/js/api/LabelFieldDefinitionBuilder.d.ts +1 -1
  107. package/build/js/api/LabelFieldLocation.d.ts +1 -1
  108. package/build/js/api/LabelFieldLocation.js +1 -1
  109. package/build/js/api/LabelFieldLocationType.js +1 -1
  110. package/build/js/api/LabelFieldState.d.ts +1 -1
  111. package/build/js/api/LabelFieldState.js +1 -1
  112. package/build/js/api/LabelFieldType.d.ts +1 -1
  113. package/build/js/api/LabelFieldType.js +1 -1
  114. package/build/js/api/LabelFieldValueType.d.ts +1 -1
  115. package/build/js/api/LabelFieldValueType.js +1 -1
  116. package/build/js/api/LabelResultUpdateType.js +1 -1
  117. package/build/js/api/PackingDateText.d.ts +1 -1
  118. package/build/js/api/PackingDateTextBuilder.d.ts +1 -1
  119. package/build/js/api/PartNumberBarcode.d.ts +1 -1
  120. package/build/js/api/PartNumberBarcodeBuilder.d.ts +1 -1
  121. package/build/js/api/PrivateReceiptScanningHandler.d.ts +6 -3
  122. package/build/js/api/PrivateReceiptScanningHandler.js +1 -1
  123. package/build/js/api/PrivateReceiptScanningListener.d.ts +12 -4
  124. package/build/js/api/PrivateValidationFlowHandler.d.ts +5 -6
  125. package/build/js/api/PrivateValidationFlowHandler.js +1 -1
  126. package/build/js/api/ReceiptScanningLineItem.d.ts +1 -1
  127. package/build/js/api/ReceiptScanningResult.d.ts +1 -1
  128. package/build/js/api/SerialNumberBarcode.d.ts +1 -1
  129. package/build/js/api/SerialNumberBarcodeBuilder.d.ts +1 -1
  130. package/build/js/api/ShippingLabelScanningResult.d.ts +2 -0
  131. package/build/js/api/ShippingLabelScanningResult.js +1 -0
  132. package/build/js/api/TextField.d.ts +1 -1
  133. package/build/js/api/TextFieldBuilder.d.ts +1 -1
  134. package/build/js/api/TotalPriceText.d.ts +1 -1
  135. package/build/js/api/TotalPriceTextBuilder.d.ts +1 -1
  136. package/build/js/api/UnitPriceText.d.ts +1 -1
  137. package/build/js/api/UnitPriceTextBuilder.d.ts +1 -1
  138. package/build/js/api/ValidationFlowField.d.ts +1 -1
  139. package/build/js/api/ValidationFlowField.js +1 -1
  140. package/build/js/api/WeightText.d.ts +1 -1
  141. package/build/js/api/WeightTextBuilder.d.ts +1 -1
  142. package/build/js/{dataCaptureEngine-CqE4l_uy.d.ts → dataCaptureEngine-Qn62h3C8.d.ts} +1 -2
  143. package/build/js/global.d.ts +5 -3
  144. package/build/js/index.d.ts +49 -48
  145. package/build/js/index.js +1 -1
  146. package/build/js/moduleLoader.d.ts +0 -1
  147. package/build/js/moduleLoader.js +1 -1
  148. package/build/js/{nativeCall-q32Awp0L.d.ts → nativeCall-BACigfoX.d.ts} +2 -3
  149. package/build/js/private/PrivateLabelFieldDefinition.d.ts +2 -3
  150. package/build/js/private/PrivateRectangularLocationSelectionJSON.d.ts +0 -1
  151. package/build/js/private/adaptiveRecognitionModeTranslator.d.ts +2 -3
  152. package/build/js/private/adaptiveRecognitionModeTranslator.js +1 -1
  153. package/build/js/private/brushTranslator.d.ts +2 -3
  154. package/build/js/private/carrierTranslator.d.ts +6 -0
  155. package/build/js/private/carrierTranslator.js +1 -0
  156. package/build/js/private/createProxiedViewFinder.d.ts +1 -2
  157. package/build/js/private/fromWrappedFutureToPromise.d.ts +1 -2
  158. package/build/js/private/labelFieldLocationTypeTranslator.d.ts +1 -2
  159. package/build/js/private/labelFieldLocationTypeTranslator.js +1 -1
  160. package/build/js/private/measureTranslator.d.ts +1 -2
  161. package/build/js/private/measureTranslator.js +1 -1
  162. package/build/js/private/numberTranslator.d.ts +1 -2
  163. package/build/js/private/numberTranslator.js +1 -1
  164. package/build/js/private/resultTypeTranslator.d.ts +6 -0
  165. package/build/js/private/resultTypeTranslator.js +1 -0
  166. package/build/js/private/scrollIntoView/compute.d.ts +1 -1
  167. package/build/js/private/scrollIntoView/index.d.ts +0 -1
  168. package/build/js/private/scrollIntoView/index.js +1 -1
  169. package/build/js/private/symbologiesTranslator.d.ts +1 -2
  170. package/build/js/private/symbologiesTranslator.js +1 -1
  171. package/build/js/private/viewfinderTranslator.d.ts +1 -2
  172. package/build/js/private/viewfinderTranslator.js +1 -1
  173. package/build/js/{sdcBarcodeData-DOuUPRUb.d.ts → sdcBarcodeData-CXuQyyJf.d.ts} +2 -3
  174. package/build/js/{sdcCoreCommonGeometry-Bxvlllkc.d.ts → sdcCoreCommonGeometry-CS1rDunH.d.ts} +2 -13
  175. package/build/js/{sdcCoreInternalSdkCommonAsync-8G3-3n53.d.ts → sdcCoreInternalSdkCommonAsync-DNIa_gEu.d.ts} +2 -3
  176. package/build/js/sdcCoreInternalSdkCommonGeometry-DfRpk9ff.d.ts +41 -0
  177. package/build/js/sdcCoreInternalSdkCommonGraphics-Br9oizuP.d.ts +9 -0
  178. package/build/js/sdcCoreInternalSdkUiStyle-DrsrRbqR.d.ts +9 -0
  179. package/build/js/{sdcCoreInternalSdkUiViewfinder-BoG0LyRj.d.ts → sdcCoreInternalSdkUiViewfinder-CS6t26-R.d.ts} +5 -18
  180. package/build/js/{sdcLabelData-CHLquvuG.d.ts → sdcLabelData-BitL7YVQ.d.ts} +2 -3
  181. package/build/js/{sdcLabelInternalModuleCapture-B6-1Wjzn.d.ts → sdcLabelInternalModuleCapture-LDFRDPMF.d.ts} +165 -54
  182. package/build/js/sdcLabelInternalModuleData-sZpfq0Gd.d.ts +149 -0
  183. package/build/js/symbologiesTranslator-kd0DbiBX.js +1 -0
  184. package/build/js/ui/atoms/AdaptiveRecognitionOverlay.d.ts +0 -1
  185. package/build/js/ui/atoms/Button.d.ts +1 -1
  186. package/build/js/ui/atoms/Button.js +1 -1
  187. package/build/js/ui/atoms/TextInput.d.ts +0 -1
  188. package/build/js/ui/atoms/TextInput.js +1 -1
  189. package/build/js/ui/controllers/KeyboardVisibilityController.d.ts +0 -1
  190. package/build/js/ui/organisms/LabelCaptureValidationFlowLayout.d.ts +3 -3
  191. package/build/js/umd/index.js +1 -0
  192. package/build/js/viewfinderTranslator-C6Uufw4a.js +1 -0
  193. package/build/js/vite-env.d.ts +1 -1
  194. package/build/js/worker/LabelCaptureWorkerManager.d.ts +3 -4
  195. package/build/js/worker/LabelCaptureWorkerManager.js +1 -1
  196. package/build/js/worker/NativeImplementationRegistry.d.ts +1 -2
  197. package/build/js/worker/WorkerMain.d.ts +4 -5
  198. package/build/js/worker/WorkerMain.js +1 -1
  199. package/build/js/worker/WorkerRegistry.d.ts +0 -1
  200. package/build/js/worker/dataCaptureEngine.d.ts +1 -1
  201. package/build/js/worker/dataCaptureEngine.js +1 -1
  202. package/build/js/worker/dataCaptureWorkerRelated.d.ts +2 -2
  203. package/build/js/worker/handlers/{ReceiptScanningHandler.d.ts → AdaptiveRecognitionHandler.d.ts} +5 -6
  204. package/build/js/worker/handlers/AdaptiveRecognitionHandler.js +1 -0
  205. package/build/js/worker/handlers/FieldBuilderHandler.d.ts +1 -2
  206. package/build/js/worker/handlers/FieldBuilderHandler.js +1 -1
  207. package/build/js/worker/handlers/LabelCaptureBasicOverlayHandler.d.ts +6 -4
  208. package/build/js/worker/handlers/LabelCaptureBasicOverlayHandler.js +1 -1
  209. package/build/js/worker/handlers/SettingsHandler.d.ts +1 -2
  210. package/build/js/worker/handlers/SettingsHandler.js +1 -1
  211. package/build/js/worker/handlers/ValidationFlowHandler.d.ts +1 -2
  212. package/build/js/worker/handlers/ValidationFlowHandler.js +1 -1
  213. package/build/js/worker/labelWorkerHandler.d.ts +0 -1
  214. package/build/js/worker/nativeCall.d.ts +1 -1
  215. package/build/js/worker/nativeDispatch.d.ts +1 -1
  216. package/build/js/worker/proxies/AdaptiveRecognitionHandlerProxy.d.ts +15 -0
  217. package/build/js/worker/proxies/AdaptiveRecognitionHandlerProxy.js +1 -0
  218. package/build/js/worker/proxies/AimerViewfinderProxy.d.ts +3 -4
  219. package/build/js/worker/proxies/AimerViewfinderProxy.js +1 -1
  220. package/build/js/worker/proxies/CapturedLabelProxy.d.ts +2 -3
  221. package/build/js/worker/proxies/CapturedLabelProxy.js +1 -1
  222. package/build/js/worker/proxies/LabelCaptureBasicOverlayProxy.d.ts +6 -8
  223. package/build/js/worker/proxies/LabelCaptureBasicOverlayProxy.js +1 -1
  224. package/build/js/worker/proxies/LabelCaptureSessionProxy.d.ts +2 -3
  225. package/build/js/worker/proxies/LabelCaptureSessionProxy.js +1 -1
  226. package/build/js/worker/proxies/LabelCaptureSettingsProxy.d.ts +2 -4
  227. package/build/js/worker/proxies/LabelCaptureSettingsProxy.js +1 -1
  228. package/build/js/worker/proxies/LabelDefinitionProxy.d.ts +3 -4
  229. package/build/js/worker/proxies/LabelDefinitionProxy.js +1 -1
  230. package/build/js/worker/proxies/LabelFieldDefinitionProxy.d.ts +2 -3
  231. package/build/js/worker/proxies/LabelFieldDefinitionProxy.js +1 -1
  232. package/build/js/worker/proxies/LabelFieldProxy.d.ts +3 -4
  233. package/build/js/worker/proxies/LabelFieldProxy.js +1 -1
  234. package/build/js/worker/proxies/NativeProxy.d.ts +1 -1
  235. package/build/js/worker/proxies/NativeProxy.js +1 -1
  236. package/build/js/worker/proxies/NoViewfinderProxy.d.ts +2 -3
  237. package/build/js/worker/proxies/NoViewfinderProxy.js +1 -1
  238. package/build/js/worker/proxies/RectangularViewfinderAnimationProxy.d.ts +2 -3
  239. package/build/js/worker/proxies/RectangularViewfinderAnimationProxy.js +1 -1
  240. package/build/js/worker/proxies/RectangularViewfinderProxy.d.ts +5 -6
  241. package/build/js/worker/proxies/RectangularViewfinderProxy.js +1 -1
  242. package/build/js/worker/proxies/ValidationFlowListenerProxy.d.ts +1 -3
  243. package/build/js/worker/proxies/base/BarcodeFieldProxyBase.d.ts +2 -4
  244. package/build/js/worker/proxies/base/LabelFieldDefinitionBaseProxy.d.ts +2 -3
  245. package/build/js/worker/proxies/base/LabelFieldDefinitionBaseProxy.js +1 -1
  246. package/build/js/worker/workerHandles.d.ts +1 -1
  247. package/package.json +12 -8
  248. package/sdc-lib/label-worker-8.6.0.js +1 -0
  249. package/sdc-lib/resources/models/aus_mdl_keypoint_detection.1b3529e0e8a3.model +0 -0
  250. package/sdc-lib/resources/models/barcode_classification_default.5afae5235672.model +0 -0
  251. package/sdc-lib/resources/models/barcode_keypoints_oned.963fc43efda2.model +0 -0
  252. package/sdc-lib/resources/models/barcode_keypoints_twod.90548e549497.model +0 -0
  253. package/sdc-lib/resources/models/barcode_label_localization_mslc_model_s.cf4be2418f6d.model +0 -0
  254. package/sdc-lib/resources/models/barcode_label_localization_mslc_model_smartphone.d37117f6a058.model +0 -0
  255. package/sdc-lib/resources/models/barcode_localization_clutter_aware.40a9ddd42447.model +0 -0
  256. package/sdc-lib/resources/models/barcode_localization_default.67ae150de2e5.model +0 -0
  257. package/sdc-lib/resources/models/barcode_localization_dpm_default.96d5335f10a1.model +0 -0
  258. package/sdc-lib/resources/models/barcode_localization_generic_postal_code_default.3aff51b79974.model +0 -0
  259. package/sdc-lib/resources/models/barcode_localization_oned_default.ca3e3afb3c45.model +0 -0
  260. package/sdc-lib/resources/models/barcode_localization_twod_default.62d5ab2b650d.model +0 -0
  261. package/sdc-lib/resources/models/id_outline_localization_model_kpts.376104335628.model +0 -0
  262. package/sdc-lib/resources/models/mqr_model_1.f74eb91b2d3b.model +0 -0
  263. package/sdc-lib/resources/models/mqr_model_2.300660c7d3db.model +0 -0
  264. package/sdc-lib/resources/models/mrz_line_localization.6598e20b3c9e.model +0 -0
  265. package/sdc-lib/resources/models/mrz_localization.07beaad40bbd.model +0 -0
  266. package/sdc-lib/resources/models/ocr_attention.61cf55c1930f.model +0 -0
  267. package/sdc-lib/resources/models/ocr_attention_big.81959e2e4ef4.model +0 -0
  268. package/sdc-lib/resources/models/price_localization_in_whole_label.ef6641ccf26f.model +0 -0
  269. package/sdc-lib/resources/models/qr_model_1.d46cc8f45676.model +0 -0
  270. package/sdc-lib/resources/models/via_id_template_database.948ef137372d.model +0 -0
  271. package/sdc-lib/scandit-datacapture-sdk-label-pthreads.js +1 -1
  272. package/sdc-lib/scandit-datacapture-sdk-label-pthreads.wasm +0 -0
  273. package/sdc-lib/scandit-datacapture-sdk-label-simd-pthreads.js +1 -1
  274. package/sdc-lib/scandit-datacapture-sdk-label-simd-pthreads.wasm +0 -0
  275. package/sdc-lib/scandit-datacapture-sdk-label-simd.js +1 -1
  276. package/sdc-lib/scandit-datacapture-sdk-label-simd.wasm +0 -0
  277. package/sdc-lib/scandit-datacapture-sdk-label.js +1 -1
  278. package/sdc-lib/scandit-datacapture-sdk-label.wasm +0 -0
  279. package/build/js/djinni-types/sdcAnalyticsModule.d.ts +0 -24
  280. package/build/js/djinni-types/sdcAnalyticsModule.js +0 -0
  281. package/build/js/djinni-types/sdcBarcodeData.d.ts +0 -2
  282. package/build/js/djinni-types/sdcBarcodeData.js +0 -1
  283. package/build/js/djinni-types/sdcBarcodeInternalSdkData.d.ts +0 -2
  284. package/build/js/djinni-types/sdcBarcodeInternalSdkData.js +0 -0
  285. package/build/js/djinni-types/sdcCoreCommon.d.ts +0 -2
  286. package/build/js/djinni-types/sdcCoreCommon.js +0 -1
  287. package/build/js/djinni-types/sdcCoreCommonBuffer.d.ts +0 -2
  288. package/build/js/djinni-types/sdcCoreCommonBuffer.js +0 -0
  289. package/build/js/djinni-types/sdcCoreCommonGeometry.d.ts +0 -2
  290. package/build/js/djinni-types/sdcCoreCommonGeometry.js +0 -1
  291. package/build/js/djinni-types/sdcCoreCommonGraphic.d.ts +0 -2
  292. package/build/js/djinni-types/sdcCoreCommonGraphic.js +0 -1
  293. package/build/js/djinni-types/sdcCoreInternalSdkArea.d.ts +0 -2
  294. package/build/js/djinni-types/sdcCoreInternalSdkArea.js +0 -0
  295. package/build/js/djinni-types/sdcCoreInternalSdkCapture.d.ts +0 -2
  296. package/build/js/djinni-types/sdcCoreInternalSdkCapture.js +0 -1
  297. package/build/js/djinni-types/sdcCoreInternalSdkCommonAsync.d.ts +0 -2
  298. package/build/js/djinni-types/sdcCoreInternalSdkCommonAsync.js +0 -0
  299. package/build/js/djinni-types/sdcCoreInternalSdkCommonGeometry.d.ts +0 -2
  300. package/build/js/djinni-types/sdcCoreInternalSdkCommonGeometry.js +0 -1
  301. package/build/js/djinni-types/sdcCoreInternalSdkCommonGraphics.d.ts +0 -2
  302. package/build/js/djinni-types/sdcCoreInternalSdkCommonGraphics.js +0 -0
  303. package/build/js/djinni-types/sdcCoreInternalSdkOcr.d.ts +0 -2
  304. package/build/js/djinni-types/sdcCoreInternalSdkOcr.js +0 -0
  305. package/build/js/djinni-types/sdcCoreInternalSdkUiStyle.d.ts +0 -2
  306. package/build/js/djinni-types/sdcCoreInternalSdkUiStyle.js +0 -0
  307. package/build/js/djinni-types/sdcCoreInternalSdkUiViewfinder.d.ts +0 -2
  308. package/build/js/djinni-types/sdcCoreInternalSdkUiViewfinder.js +0 -1
  309. package/build/js/djinni-types/sdcLabelData.d.ts +0 -2
  310. package/build/js/djinni-types/sdcLabelData.js +0 -1
  311. package/build/js/djinni-types/sdcLabelInternalModuleCapture.d.ts +0 -2
  312. package/build/js/djinni-types/sdcLabelInternalModuleCapture.js +0 -1
  313. package/build/js/djinni-types/sdcLabelInternalModuleData.d.ts +0 -2
  314. package/build/js/djinni-types/sdcLabelInternalModuleData.js +0 -1
  315. package/build/js/djinni-types/sdcLabelInternalModuleUiOverlay.d.ts +0 -2
  316. package/build/js/djinni-types/sdcLabelInternalModuleUiOverlay.js +0 -0
  317. package/build/js/djinni-types/sdcSymbologySettings.d.ts +0 -2
  318. package/build/js/djinni-types/sdcSymbologySettings.js +0 -0
  319. package/build/js/sdcBarcodeInternalSdkData-CJZsjs8c.d.ts +0 -36
  320. package/build/js/sdcCoreCommon-kHUoe_GV.d.ts +0 -13
  321. package/build/js/sdcCoreCommonBuffer-DjQM-W5x.d.ts +0 -11
  322. package/build/js/sdcCoreCommonGraphic-hFLsxC6K.d.ts +0 -22
  323. package/build/js/sdcCoreInternalSdkArea-BDbnSRls.d.ts +0 -38
  324. package/build/js/sdcCoreInternalSdkCapture-CcabgRl6.d.ts +0 -9
  325. package/build/js/sdcCoreInternalSdkCommonGeometry-BdkRyMJ5.d.ts +0 -50
  326. package/build/js/sdcCoreInternalSdkCommonGraphics-DRTWPww6.d.ts +0 -10
  327. package/build/js/sdcCoreInternalSdkOcr-rkdYyZLs.d.ts +0 -34
  328. package/build/js/sdcCoreInternalSdkUiStyle-pVbYygcu.d.ts +0 -11
  329. package/build/js/sdcLabelInternalModuleData-D_O2Y4cu.d.ts +0 -63
  330. package/build/js/sdcLabelInternalModuleUiOverlay-CGIKcVOW.d.ts +0 -113
  331. package/build/js/sdcSymbologySettings-CR04eT_a.d.ts +0 -21
  332. package/build/js/viewfinderTranslator-BSoFZt6m.js +0 -1
  333. package/build/js/worker/handlers/ReceiptScanningHandler.js +0 -1
  334. package/build/js/worker/proxies/ReceiptScanningHandlerProxy.d.ts +0 -14
  335. package/build/js/worker/proxies/ReceiptScanningHandlerProxy.js +0 -1
  336. package/sdc-lib/label-worker-8.5.3.js +0 -1
  337. package/sdc-lib/resources/models/aus_mdl_keypoint_detection.17f1b2958a9e.model +0 -0
  338. package/sdc-lib/resources/models/barcode_classification_default.48685f5fe19b.model +0 -0
  339. package/sdc-lib/resources/models/barcode_keypoints_oned.c499e5bd6ed4.model +0 -0
  340. package/sdc-lib/resources/models/barcode_label_localization_mslc_model_s.616a59ec3a8d.model +0 -0
  341. package/sdc-lib/resources/models/barcode_label_localization_mslc_model_smartphone.29decf3dd9e6.model +0 -0
  342. package/sdc-lib/resources/models/barcode_localization_clutter_aware.69933853e03e.model +0 -0
  343. package/sdc-lib/resources/models/barcode_localization_default.59f74a846b63.model +0 -0
  344. package/sdc-lib/resources/models/barcode_localization_dpm_default.7e4fe5631f81.model +0 -0
  345. package/sdc-lib/resources/models/barcode_localization_generic_postal_code_default.184ecbeb5b83.model +0 -0
  346. package/sdc-lib/resources/models/barcode_localization_oned_default.c547484132c1.model +0 -0
  347. package/sdc-lib/resources/models/barcode_localization_twod_default.4b64523bf755.model +0 -0
  348. package/sdc-lib/resources/models/id_outline_localization_model_kpts.b74ff5cc58cf.model +0 -0
  349. package/sdc-lib/resources/models/mrz_line_localization.577844e2ebed.model +0 -0
  350. package/sdc-lib/resources/models/mrz_localization.77e331c44b52.model +0 -0
  351. package/sdc-lib/resources/models/ocr_attention.75e86b6ca0ca.model +0 -0
  352. package/sdc-lib/resources/models/price_localization_in_whole_label.555b33695325.model +0 -0
  353. package/sdc-lib/resources/models/qr_model_1.e790edc14d39.model +0 -0
  354. package/sdc-lib/resources/models/via_id_template_database.e54ca9420de3.model +0 -0
  355. /package/build/js/{AdaptiveRecognitionMode-DBr--JVQ.d.ts → AdaptiveRecognitionMode-Ce7PcDLT.d.ts} +0 -0
  356. /package/build/js/{LabelDateComponentFormat-BDdyln8r.d.ts → LabelDateComponentFormat-BogF5Duc.d.ts} +0 -0
  357. /package/build/js/{LabelDateResult-CQ9G5zQl.d.ts → LabelDateResult-CXE4kE4_.d.ts} +0 -0
  358. /package/build/js/{LabelFieldDefinition-CuGI3QUq.d.ts → LabelFieldDefinition-Dx10zV00.d.ts} +0 -0
  359. /package/build/js/{LabelFieldState-JJ7Cbn3n.d.ts → LabelFieldState-PNXv3OG0.d.ts} +0 -0
  360. /package/build/js/{LabelFieldType-DEXmgciU.d.ts → LabelFieldType-DTWF1oEh.d.ts} +0 -0
  361. /package/build/js/{LabelFieldValueType-C8ZfGaCT.d.ts → LabelFieldValueType-Bpo3SRcL.d.ts} +0 -0
  362. /package/build/js/{ReceiptScanningLineItem-CZ--bISr.d.ts → ReceiptScanningLineItem-sJWucFWu.d.ts} +0 -0
  363. /package/build/js/{nativeDispatch-C7kZCRYA.d.ts → nativeDispatch-DihCPqt9.d.ts} +0 -0
  364. /package/build/js/{workerHandles-DhpaE-4P.d.ts → workerHandles-dyelIcCK.d.ts} +0 -0
@@ -1 +1 @@
1
- import{nativeCall as e}from"../worker/nativeCall.js";import{AdaptiveRecognitionOverlay as t}from"../ui/atoms/AdaptiveRecognitionOverlay.js";import{FrameSourceState as n,NotificationConfiguration as r}from"@scandit/web-datacapture-core";import{nativeHandle as i}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var a=class a{constructor(e,t){this.listener=null,this.labelCapture=null,this.receiptScanningHandler=null,this.dataCaptureView=null,this.overlayElement=null,this.onContextUpdatedListenerHandler=this.onContextUpdatedListener.bind(this),this.handlerListener={onProcessingStarted:this.onProcessingStarted.bind(this),onReceiptScanned:this.onReceiptScanned.bind(this),onReceiptScanningFailed:this.onReceiptScanningFailed.bind(this)},this.failedNotificationConfiguration=new r(`A failure occurred`,`AdaptiveRecognitionOverlayError`),this._isProcessing=!1,this[i]=e,this.labelCapture=t}toJSONObject(){return{type:`AdaptiveRecognitionOverlay`,nativeHandle:this[i]}}static async withLabelCaptureForView(t,n){var r,o;let s=new a(await e(`ReceiptScanningOverlay.create`,t[i]),t);return s.receiptScanningHandler=await t.receiptScanningHandler(),(r=s.receiptScanningHandler)==null||r.addListener(s.handlerListener),(o=t.context)==null||o.updateListeners.add(s.onContextUpdatedListenerHandler),n&&await n.addOverlay(s),s}async onProcessingStarted(){var e,t;this._isProcessing||((e=this.dataCaptureView)==null||(e=e.getNotificationPresenter())==null||e.hideNotification(this.failedNotificationConfiguration),this.showProcessingAnimation(),this._isProcessing=!0,await((t=this.labelCapture)==null||(t=t.context)==null||(t=t.frameSource)==null?void 0:t.switchToDesiredState(n.Standby)))}async onReceiptScanned(e){var t,n;this.hideProcessingAnimation(),(t=this.listener)==null||(n=t.onRecognized)==null||n.call(t,e),this._isProcessing=!1}async onReceiptScanningFailed(){var e,t,r,i,a,o;this.hideProcessingAnimation(),(e=this.listener)==null||(t=e.onFailure)==null||t.call(e),this._isProcessing=!1,await((r=this.dataCaptureView)==null||(r=r.getNotificationPresenter())==null?void 0:r.showNotification(this.failedNotificationConfiguration)),await((i=this.labelCapture)==null?void 0:i.setEnabled(!0)),await((a=this.labelCapture)==null||(a=a.context)==null||(a=a.frameSource)==null||(o=a.switchToDesiredState)==null?void 0:o.call(a,n.On))}async applySettings(t){await e(`ReceiptScanningOverlay.applySettings`,this[i],t[i])}async mount(e){this.dataCaptureView=e,this.setupUI()}async unmount(){var e,t,n,r;(e=this.receiptScanningHandler)==null||e.removeListener(this.handlerListener),await((t=this.receiptScanningHandler)==null?void 0:t.finishFlow()),(n=this.labelCapture)==null||(n=n.context)==null||n.updateListeners.delete(this.onContextUpdatedListenerHandler),(r=this.overlayElement)==null||r.remove(),this.overlayElement=null,this.dataCaptureView=null,this.labelCapture=null,this.receiptScanningHandler=null,this._isProcessing=!1}async onContextUpdatedListener(e){if(e.type===`removeOverlay`&&e.newValue===this&&await this.unmount(),e.type===`addOverlay`&&e.newValue===this){var t,r;this.mount(e.view),await((t=this.receiptScanningHandler)==null?void 0:t.startFlow()),await((r=this.labelCapture)==null||(r=r.context)==null||(r=r.frameSource)==null?void 0:r.switchToDesiredState(n.On))}}setupUI(){if(!this.dataCaptureView)return;t.register();let e=t.create();e.show=!1,this.overlayElement=e;let n=this.dataCaptureView.htmlElement;n&&n.prepend(this.overlayElement)}showProcessingAnimation(){this.overlayElement&&!this.overlayElement.show&&!this._isProcessing&&(this.overlayElement.show=!0)}hideProcessingAnimation(){var e;(e=this.overlayElement)!=null&&e.show&&this._isProcessing&&(this.overlayElement.show=!1)}};export{a as LabelCaptureAdaptiveRecognitionOverlay};
1
+ import{nativeCall as e}from"../worker/nativeCall.js";import"./LabelCaptureAdaptiveRecognitionSettings.js";import{AdaptiveRecognitionOverlay as t}from"../ui/atoms/AdaptiveRecognitionOverlay.js";import{FrameSourceState as n,NotificationConfiguration as r}from"@scandit/web-datacapture-core";import{nativeHandle as i}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var a=class a{constructor(e,t){this.listener=null,this.labelCapture=null,this.receiptScanningHandler=null,this.dataCaptureView=null,this.overlayElement=null,this.onContextUpdatedListenerHandler=this.onContextUpdatedListener.bind(this),this.resultType=`receipt`,this.handlerListener={onProcessingStarted:this.onProcessingStarted.bind(this),onReceiptScanned:this.onScanned.bind(this),onReceiptScanningFailed:this.onScanningFailed.bind(this),onShippingLabelScanned:this.onScanned.bind(this),onShippingLabelScanningFailed:this.onScanningFailed.bind(this)},this.failedNotificationConfiguration=new r(`A failure occurred`,`AdaptiveRecognitionOverlayError`),this._isProcessing=!1,this[i]=e,this.labelCapture=t}toJSONObject(){return{type:`AdaptiveRecognitionOverlay`,nativeHandle:this[i]}}static async withLabelCaptureForView(t,n){var r,o;let s=await e(`AdaptiveRecognitionOverlay.create`,t[i]),c=new a(s,t);return c.receiptScanningHandler=await t.receiptScanningHandler(),(r=c.receiptScanningHandler)==null||r.addListener(c.handlerListener),(o=t.context)==null||o.updateListeners.add(c.onContextUpdatedListenerHandler),n&&await n.addOverlay(c),c}async onProcessingStarted(){var e,t;this._isProcessing||((e=this.dataCaptureView)==null||(e=e.getNotificationPresenter())==null||e.hideNotification(this.failedNotificationConfiguration),this.showProcessingAnimation(),this._isProcessing=!0,await((t=this.labelCapture)==null||(t=t.context)==null||(t=t.frameSource)==null?void 0:t.switchToDesiredState(n.Standby)))}async onScanned(e){var t,n;this.hideProcessingAnimation(),(t=this.listener)==null||(n=t.onRecognized)==null||n.call(t,e),this._isProcessing=!1}async onScanningFailed(){var e,t,r,i,a,o;this.hideProcessingAnimation(),(e=this.listener)==null||(t=e.onFailure)==null||t.call(e),this._isProcessing=!1,await((r=this.dataCaptureView)==null||(r=r.getNotificationPresenter())==null?void 0:r.showNotification(this.failedNotificationConfiguration)),await((i=this.labelCapture)==null?void 0:i.setEnabled(!0)),await((a=this.labelCapture)==null||(a=a.context)==null||(a=a.frameSource)==null||(o=a.switchToDesiredState)==null?void 0:o.call(a,n.On))}async applySettings(t){if(this.resultType=t.resultType,await e(`AdaptiveRecognitionOverlay.applySettings`,this[i],t[i]),this.dataCaptureView){var n,r;await((n=this.receiptScanningHandler)==null?void 0:n.finishFlow()),await((r=this.receiptScanningHandler)==null?void 0:r.startFlow(this.resultType))}}async mount(e){this.dataCaptureView=e,this.setupUI()}async unmount(){var e,t,n,r;(e=this.receiptScanningHandler)==null||e.removeListener(this.handlerListener),await((t=this.receiptScanningHandler)==null?void 0:t.finishFlow()),(n=this.labelCapture)==null||(n=n.context)==null||n.updateListeners.delete(this.onContextUpdatedListenerHandler),(r=this.overlayElement)==null||r.remove(),this.overlayElement=null,this.dataCaptureView=null,this.labelCapture=null,this.receiptScanningHandler=null,this._isProcessing=!1}async onContextUpdatedListener(e){if(e.type===`removeOverlay`&&e.newValue===this&&await this.unmount(),e.type===`addOverlay`&&e.newValue===this){var t,r;this.mount(e.view),await((t=this.receiptScanningHandler)==null?void 0:t.startFlow(this.resultType)),await((r=this.labelCapture)==null||(r=r.context)==null||(r=r.frameSource)==null?void 0:r.switchToDesiredState(n.On))}}setupUI(){if(!this.dataCaptureView)return;t.register();let e=t.create();e.show=!1,this.overlayElement=e;let n=this.dataCaptureView.htmlElement;n&&n.prepend(this.overlayElement)}showProcessingAnimation(){this.overlayElement&&!this.overlayElement.show&&!this._isProcessing&&(this.overlayElement.show=!0)}hideProcessingAnimation(){var e;(e=this.overlayElement)!=null&&e.show&&this._isProcessing&&(this.overlayElement.show=!1)}};export{a as LabelCaptureAdaptiveRecognitionOverlay};
@@ -1,2 +1,2 @@
1
- import { i as ReceiptScanningSettingsJSON, n as AdaptiveRecognitionResultType, r as LabelCaptureAdaptiveRecognitionSettings } from "../AdaptiveRecognitionResult-Clnk-SP8.js";
1
+ import { i as ReceiptScanningSettingsJSON, n as AdaptiveRecognitionResultType, r as LabelCaptureAdaptiveRecognitionSettings } from "../AdaptiveRecognitionResult-y66P3VQQ.js";
2
2
  export { AdaptiveRecognitionResultType, LabelCaptureAdaptiveRecognitionSettings, ReceiptScanningSettingsJSON };
@@ -1 +1 @@
1
- import{nativeCall as e}from"../worker/nativeCall.js";import{nativeHandle as t}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";let n=function(e){return e.Receipt=`receipt`,e}({});var r=class n{constructor(e){this.resultType=`receipt`,this[t]=e}async setProcessingHintText(n){await e(`ReceiptScanningSettings.setProcessingHintText`,this[t],n)}async getProcessingHintText(){return e(`ReceiptScanningSettings.getProcessingHintText`,this[t])}static async create(t){let r=t??`receipt`,i=new n(await e(`ReceiptScanningSettings.create`));return i.resultType=r,await i.getProcessingHintText(),i}};export{n as AdaptiveRecognitionResultType,r as LabelCaptureAdaptiveRecognitionSettings};
1
+ import{nativeCall as e}from"../worker/nativeCall.js";import{nativeHandle as t}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";let n=function(e){return e.Receipt=`receipt`,e.ShippingLabel=`shipping-label`,e}({});var r=class n{constructor(e){this.resultType=`receipt`,this[t]=e}async setProcessingHintText(n){await e(`ReceiptScanningSettings.setProcessingHintText`,this[t],n)}async getProcessingHintText(){return e(`ReceiptScanningSettings.getProcessingHintText`,this[t])}static async create(t){let r=t??`receipt`,i=await e(`ReceiptScanningSettings.create`),a=new n(i);return a.resultType=r,await a.getProcessingHintText(),a}};export{n as AdaptiveRecognitionResultType,r as LabelCaptureAdaptiveRecognitionSettings};
@@ -1,2 +1,2 @@
1
- import { t as LabelCaptureAdvancedOverlay } from "../LabelCaptureAdvancedOverlay-e09i_aoX.js";
1
+ import { t as LabelCaptureAdvancedOverlay } from "../LabelCaptureAdvancedOverlay-Bpt5QkPC.js";
2
2
  export { LabelCaptureAdvancedOverlay };
@@ -1 +1 @@
1
- import{labelWorkerHandler as e}from"../worker/labelWorkerHandler.js";import{nativeCall as t}from"../worker/nativeCall.js";import{LabelCaptureSession as n}from"./LabelCaptureSession.js";import{Anchor as r,MeasureUnit as i,NumberWithUnit as a,PointWithUnit as o}from"@scandit/web-datacapture-core";import{nativeHandle as s}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var c=class c{static async withLabelCaptureForView(n,r){let i=new c(await t(`LabelCaptureAdvancedOverlay.create`,n[s]));return i._dataCaptureView=r,await r.addOverlay(i),e().addWorkerListener(i.onWorkerMessageHandler),i}constructor(e){this.onWorkerMessageHandler=this.onWorkerMessage.bind(this),this.defaultOffset=new o(new a(0,i.Pixel),new a(0,i.Pixel)),this._viewForCapturedLabelMap=new Map,this._viewForCapturedLabelFieldMap=new Map,this._anchorForCapturedLabelMap=new Map,this._offsetForCapturedLabelMap=new Map,this._offsetForCapturedLabelFieldMap=new Map,this._anchorForCapturedLabelFieldMap=new Map,this.listener=null,this[s]=e}keyForCapturedLabelField(e,t){return`${e.trackingId}-${e.name}-${t.name}`}async setShouldShowScanAreaGuides(e){await t(`LabelCaptureAdvancedOverlay.setShouldShowScanAreaGuides`,this[s],e)}async getShouldShowScanAreaGuides(){return t(`LabelCaptureAdvancedOverlay.getShouldShowScanAreaGuides`,this[s])}setViewForCapturedLabel(e,t){if(t==null){this._viewForCapturedLabelMap.set(e.name,null);return}this._viewForCapturedLabelMap.has(e.name)||this._viewForCapturedLabelMap.set(e.name,t)}setAnchorForCapturedLabel(e,t){this._anchorForCapturedLabelMap.set(e.name,t)}setOffsetForCapturedLabel(e,t){this._offsetForCapturedLabelMap.set(e.name,t)}setViewForCapturedLabelField(e,t,n){let r=this.keyForCapturedLabelField(t,e);if(n==null){this._viewForCapturedLabelFieldMap.set(r,null);return}this._viewForCapturedLabelFieldMap.has(r)||this._viewForCapturedLabelFieldMap.set(r,n)}setAnchorForCapturedLabelField(e,t,n){this._anchorForCapturedLabelFieldMap.set(this.keyForCapturedLabelField(t,e),n)}setOffsetForCapturedLabelField(e,t,n){this._offsetForCapturedLabelFieldMap.set(this.keyForCapturedLabelField(t,e),n)}clearCapturedLabelViews(){this._viewForCapturedLabelMap.clear(),this._viewForCapturedLabelFieldMap.clear(),this._dataCaptureView.renderCustomLocationsView({elements:[]})}onWorkerMessage(e){e.type===`labelCaptureOnSessionUpdated`&&this.update(n.fromJSON(e.payload.session))}handleUpdateField(e){let t=[];for(let l of e.fields){var n,i,a,o;let u=this.keyForCapturedLabelField(e,l),d=this._viewForCapturedLabelFieldMap.get(u)??((n=this.listener)==null||(i=n.viewForCapturedLabelField)==null?void 0:i.call(n,this,l)),f=this._anchorForCapturedLabelFieldMap.get(u)??((a=this.listener)==null||(o=a.anchorForCapturedLabelField)==null?void 0:o.call(a,this,l)),p=this._offsetForCapturedLabelFieldMap.get(u);if(p==null&&d!=null){var s,c;p=(s=this.listener)==null||(c=s.offsetForCapturedLabelField)==null?void 0:c.call(s,this,l,d)}t.push({identifier:u,anchorPositions:l.anchorPositions,view:d??null,anchor:f??r.BottomCenter,offset:p??this.defaultOffset})}return t}update(e){let t=[];for(let l of e.capturedLabels){var n,i,a,o;let e=this._viewForCapturedLabelMap.get(l.name)??((n=this.listener)==null||(i=n.viewForCapturedLabel)==null?void 0:i.call(n,this,l)),u=this._anchorForCapturedLabelMap.get(l.name)??((a=this.listener)==null||(o=a.anchorForCapturedLabel)==null?void 0:o.call(a,this,l)),d=this._offsetForCapturedLabelMap.get(l.name);if(d==null&&e!=null){var s,c;d=(s=this.listener)==null||(c=s.offsetForCapturedLabel)==null?void 0:c.call(s,this,l,e)}l.fields.length>0&&t.push({identifier:`${l.trackingId}-${l.name}`,anchorPositions:l.fields[0].anchorPositions,view:e??null,anchor:u??r.BottomCenter,offset:d??this.defaultOffset}),t.push(...this.handleUpdateField(l))}this._dataCaptureView.renderCustomLocationsView({elements:t})}toJSONObject(){return{type:this[s].className,nativeHandle:this[s]}}};export{c as LabelCaptureAdvancedOverlay};
1
+ import{labelWorkerHandler as e}from"../worker/labelWorkerHandler.js";import{nativeCall as t}from"../worker/nativeCall.js";import{LabelCaptureSession as n}from"./LabelCaptureSession.js";import{Anchor as r,MeasureUnit as i,NumberWithUnit as a,PointWithUnit as o}from"@scandit/web-datacapture-core";import{nativeHandle as s}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var c=class c{static async withLabelCaptureForView(n,r){let i=await t(`LabelCaptureAdvancedOverlay.create`,n[s]),a=new c(i);return a._dataCaptureView=r,await r.addOverlay(a),e().addWorkerListener(a.onWorkerMessageHandler),a}constructor(e){this.onWorkerMessageHandler=this.onWorkerMessage.bind(this),this.defaultOffset=new o(new a(0,i.Pixel),new a(0,i.Pixel)),this._viewForCapturedLabelMap=new Map,this._viewForCapturedLabelFieldMap=new Map,this._anchorForCapturedLabelMap=new Map,this._offsetForCapturedLabelMap=new Map,this._offsetForCapturedLabelFieldMap=new Map,this._anchorForCapturedLabelFieldMap=new Map,this.listener=null,this[s]=e}keyForCapturedLabelField(e,t){return`${e.trackingId}-${e.name}-${t.name}`}async setShouldShowScanAreaGuides(e){await t(`LabelCaptureAdvancedOverlay.setShouldShowScanAreaGuides`,this[s],e)}async getShouldShowScanAreaGuides(){return t(`LabelCaptureAdvancedOverlay.getShouldShowScanAreaGuides`,this[s])}setViewForCapturedLabel(e,t){if(t==null){this._viewForCapturedLabelMap.set(e.name,null);return}this._viewForCapturedLabelMap.has(e.name)||this._viewForCapturedLabelMap.set(e.name,t)}setAnchorForCapturedLabel(e,t){this._anchorForCapturedLabelMap.set(e.name,t)}setOffsetForCapturedLabel(e,t){this._offsetForCapturedLabelMap.set(e.name,t)}setViewForCapturedLabelField(e,t,n){let r=this.keyForCapturedLabelField(t,e);if(n==null){this._viewForCapturedLabelFieldMap.set(r,null);return}this._viewForCapturedLabelFieldMap.has(r)||this._viewForCapturedLabelFieldMap.set(r,n)}setAnchorForCapturedLabelField(e,t,n){this._anchorForCapturedLabelFieldMap.set(this.keyForCapturedLabelField(t,e),n)}setOffsetForCapturedLabelField(e,t,n){this._offsetForCapturedLabelFieldMap.set(this.keyForCapturedLabelField(t,e),n)}clearCapturedLabelViews(){this._viewForCapturedLabelMap.clear(),this._viewForCapturedLabelFieldMap.clear(),this._dataCaptureView.renderCustomLocationsView({elements:[]})}onDocumentVisibilityChange(e){e===`hidden`&&this.clearCapturedLabelViews()}onWorkerMessage(e){e.type===`labelCaptureOnSessionUpdated`&&this.update(n.fromJSON(e.payload.session))}handleUpdateField(e){let t=[];for(let l of e.fields){var n,i,a,o;let u=this.keyForCapturedLabelField(e,l),d=this._viewForCapturedLabelFieldMap.get(u)??((n=this.listener)==null||(i=n.viewForCapturedLabelField)==null?void 0:i.call(n,this,l)),f=this._anchorForCapturedLabelFieldMap.get(u)??((a=this.listener)==null||(o=a.anchorForCapturedLabelField)==null?void 0:o.call(a,this,l)),p=this._offsetForCapturedLabelFieldMap.get(u);if(p==null&&d!=null){var s,c;p=(s=this.listener)==null||(c=s.offsetForCapturedLabelField)==null?void 0:c.call(s,this,l,d)}t.push({identifier:u,anchorPositions:l.anchorPositions,view:d??null,anchor:f??r.BottomCenter,offset:p??this.defaultOffset})}return t}update(e){let t=[];for(let l of e.capturedLabels){var n,i,a,o;let e=this._viewForCapturedLabelMap.get(l.name)??((n=this.listener)==null||(i=n.viewForCapturedLabel)==null?void 0:i.call(n,this,l)),u=this._anchorForCapturedLabelMap.get(l.name)??((a=this.listener)==null||(o=a.anchorForCapturedLabel)==null?void 0:o.call(a,this,l)),d=this._offsetForCapturedLabelMap.get(l.name);if(d==null&&e!=null){var s,c;d=(s=this.listener)==null||(c=s.offsetForCapturedLabel)==null?void 0:c.call(s,this,l,e)}l.fields.length>0&&t.push({identifier:`${l.trackingId}-${l.name}`,anchorPositions:l.fields[0].anchorPositions,view:e??null,anchor:u??r.BottomCenter,offset:d??this.defaultOffset}),t.push(...this.handleUpdateField(l))}this._dataCaptureView.renderCustomLocationsView({elements:t})}toJSONObject(){return{type:this[s].className,nativeHandle:this[s]}}};export{c as LabelCaptureAdvancedOverlay};
@@ -1,2 +1,2 @@
1
- import { n as LabelCaptureAdvancedOverlayListener } from "../LabelCaptureAdvancedOverlay-e09i_aoX.js";
1
+ import { n as LabelCaptureAdvancedOverlayListener } from "../LabelCaptureAdvancedOverlay-Bpt5QkPC.js";
2
2
  export { LabelCaptureAdvancedOverlayListener };
@@ -1,2 +1,2 @@
1
- import { t as LabelCaptureBasicOverlay } from "../LabelCaptureBasicOverlay-BZl1LJkD.js";
1
+ import { t as LabelCaptureBasicOverlay } from "../LabelCaptureBasicOverlay-CF4h_JL9.js";
2
2
  export { LabelCaptureBasicOverlay };
@@ -1 +1 @@
1
- import{LabelField as e}from"./LabelField.js";import{CapturedLabel as t}from"./CapturedLabel.js";import{labelWorkerHandler as n}from"../worker/labelWorkerHandler.js";import{createProxiedViewFinder as r}from"../private/createProxiedViewFinder.js";import{AimerViewfinder as i,Logger as a,RectangularViewfinder as o}from"@scandit/web-datacapture-core";import{nativeHandle as s}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";function c(e){return e instanceof o||e instanceof i}var l=class i{static async withLabelCapture(e){return new i(await n().workerCommand(`labelCaptureBasicOverlayForLabelCapture`,{payload:{labelCaptureHandle:e[s]}}))}static async withLabelCaptureForView(e,t){let r=new i(await n().workerCommand(`labelCaptureBasicOverlayForLabelCapture`,{payload:{labelCaptureHandle:e[s]}}));return await t.addOverlay(r),r}constructor(e){this.listeners=new Set,this.onWorkerMessageHandler=this.onWorkerMessage.bind(this),this[s]=e}toJSONObject(){return{type:this[s].className,nativeHandle:this[s]}}async getListener(){return this.listeners.size===0?null:[...this.listeners.values()][0]}async setListener(e){if(!e){this.listeners.clear(),n().removeWorkerListener(this.onWorkerMessageHandler),await n().workerCommand(`labelCaptureBasicOverlaySetListener`,{payload:{labelCaptureBasicOverlayHandle:this[s],value:!1}});return}this.listeners.size===0&&(this.listeners.add(e),n().addWorkerListener(this.onWorkerMessageHandler),await n().workerCommand(`labelCaptureBasicOverlaySetListener`,{payload:{labelCaptureBasicOverlayHandle:this[s],value:!0}}))}async getDefaultFieldBrush(e){return await n().workerCommand(`labelCaptureBasicOverlayGetDefaultFieldBrush`,{payload:{labelCaptureBasicOverlayHandle:this[s],labelFieldState:e}})}async setDefaultFieldBrush(e,t){return await n().workerCommand(`labelCaptureBasicOverlaySetDefaultFieldBrush`,{payload:{labelCaptureBasicOverlayHandle:this[s],labelFieldState:t,brush:e.toJSONObject()}})}async getDefaultLabelBrush(){return await n().workerCommand(`labelCaptureBasicOverlayGetDefaultLabelBrush`,{payload:{labelCaptureBasicOverlayHandle:this[s]}})}async setDefaultLabelBrush(e){return await n().workerCommand(`labelCaptureBasicOverlaySetDefaultLabelBrush`,{payload:{labelCaptureBasicOverlayHandle:this[s],brush:e.toJSONObject()}})}async setBrushForField(e,t,r){return await n().workerCommand(`labelCaptureBasicOverlaySetBrushForField`,{payload:{labelCaptureBasicOverlayHandle:this[s],fieldJSON:t.toJSONObject(),labelJSON:r.toJSONObject(),brush:e.toJSONObject()}})}async setBrushForLabel(e,t){return await n().workerCommand(`labelCaptureBasicOverlaySetBrushForLabel`,{payload:{labelCaptureBasicOverlayHandle:this[s],labelJSON:t.toJSONObject(),brush:e.toJSONObject()}})}async getShouldShowScanAreaGuides(){return await n().workerCommand(`labelCaptureBasicOverlayGetShouldShowScanAreaGuides`,{payload:{labelCaptureBasicOverlayHandle:this[s]}})}async setShouldShowScanAreaGuides(e){return await n().workerCommand(`labelCaptureBasicOverlaySetShouldShowScanAreaGuides`,{payload:{labelCaptureBasicOverlayHandle:this[s],show:e}})}async getViewfinder(){return await n().workerCommand(`labelCaptureBasicOverlayGetViewfinder`,{payload:{labelCaptureBasicOverlayHandle:this[s]}})}async setViewfinder(e){if(!c(e)){a.error(`Supported viewfinder types are RectangularViewfinder and AimerViewfinder`,e);return}return this.proxiedViewFinder=r(this,n(),e),await n().workerCommand(`labelCaptureBasicOverlayUpdateViewfinder`,{payload:{labelCaptureBasicOverlayHandle:this[s],viewfinderJSON:e==null?void 0:e.toJSONObject()}})}onWorkerMessage(n){switch(n.type){case`labelCaptureBasicOverlayOnLabelTapped`:for(let e of this.listeners){var r;(r=e.onLabelTapped)==null||r.call(e,this,t.fromJSON(n.payload.labelJSON))}break;case`labelCaptureBasicOverlayBrushForField`:for(let r of this.listeners){var i;let a=e.fromJSON(n.payload.fieldJSON),o=t.fromJSON(n.payload.labelJSON),s=(i=r.brushForField)==null?void 0:i.call(r,this,a,o);s&&this.setBrushForField(s,a,o)}break;case`labelCaptureBasicOverlayBrushForLabel`:for(let e of this.listeners){var a;let r=t.fromJSON(n.payload.labelJSON),i=(a=e.brushForLabel)==null?void 0:a.call(e,this,r);i&&this.setBrushForLabel(i,r)}break;default:break}}};export{l as LabelCaptureBasicOverlay};
1
+ import{LabelField as e}from"./LabelField.js";import{CapturedLabel as t}from"./CapturedLabel.js";import{labelWorkerHandler as n}from"../worker/labelWorkerHandler.js";import{createProxiedViewFinder as r}from"../private/createProxiedViewFinder.js";import{AimerViewfinder as i,Logger as a,RectangularViewfinder as o}from"@scandit/web-datacapture-core";import{nativeHandle as s}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";function c(e){return e instanceof o||e instanceof i}var l=class i{static async withLabelCapture(e){let t=await n().workerCommand(`labelCaptureBasicOverlayForLabelCapture`,{payload:{labelCaptureHandle:e[s]}});return new i(t)}static async withLabelCaptureForView(e,t){let r=await n().workerCommand(`labelCaptureBasicOverlayForLabelCapture`,{payload:{labelCaptureHandle:e[s]}}),a=new i(r);return await t.addOverlay(a),a}constructor(e){this.listeners=new Set,this.onWorkerMessageHandler=this.onWorkerMessage.bind(this),this[s]=e}toJSONObject(){return{type:this[s].className,nativeHandle:this[s]}}async getListener(){return this.listeners.size===0?null:[...this.listeners.values()][0]}async setListener(e){if(!e){this.listeners.clear(),n().removeWorkerListener(this.onWorkerMessageHandler),await n().workerCommand(`labelCaptureBasicOverlaySetListener`,{payload:{labelCaptureBasicOverlayHandle:this[s],value:!1}});return}this.listeners.size===0&&(this.listeners.add(e),n().addWorkerListener(this.onWorkerMessageHandler),await n().workerCommand(`labelCaptureBasicOverlaySetListener`,{payload:{labelCaptureBasicOverlayHandle:this[s],value:!0}}))}async getDefaultFieldBrush(e){return await n().workerCommand(`labelCaptureBasicOverlayGetDefaultFieldBrush`,{payload:{labelCaptureBasicOverlayHandle:this[s],labelFieldState:e}})}async setDefaultFieldBrush(e,t){return await n().workerCommand(`labelCaptureBasicOverlaySetDefaultFieldBrush`,{payload:{labelCaptureBasicOverlayHandle:this[s],labelFieldState:t,brush:e.toJSONObject()}})}async getDefaultLabelBrush(){return await n().workerCommand(`labelCaptureBasicOverlayGetDefaultLabelBrush`,{payload:{labelCaptureBasicOverlayHandle:this[s]}})}async setDefaultLabelBrush(e){return await n().workerCommand(`labelCaptureBasicOverlaySetDefaultLabelBrush`,{payload:{labelCaptureBasicOverlayHandle:this[s],brush:e.toJSONObject()}})}async setBrushForField(e,t,r){return await n().workerCommand(`labelCaptureBasicOverlaySetBrushForField`,{payload:{labelCaptureBasicOverlayHandle:this[s],fieldJSON:t.toJSONObject(),labelJSON:r.toJSONObject(),brush:e.toJSONObject()}})}async setBrushForLabel(e,t){return await n().workerCommand(`labelCaptureBasicOverlaySetBrushForLabel`,{payload:{labelCaptureBasicOverlayHandle:this[s],labelJSON:t.toJSONObject(),brush:e.toJSONObject()}})}async getShouldShowScanAreaGuides(){return await n().workerCommand(`labelCaptureBasicOverlayGetShouldShowScanAreaGuides`,{payload:{labelCaptureBasicOverlayHandle:this[s]}})}async setShouldShowScanAreaGuides(e){return await n().workerCommand(`labelCaptureBasicOverlaySetShouldShowScanAreaGuides`,{payload:{labelCaptureBasicOverlayHandle:this[s],show:e}})}async getViewfinder(){return await n().workerCommand(`labelCaptureBasicOverlayGetViewfinder`,{payload:{labelCaptureBasicOverlayHandle:this[s]}})}async setViewfinder(e){if(!c(e)){a.error(`Supported viewfinder types are RectangularViewfinder and AimerViewfinder`,e);return}return this.proxiedViewFinder=r(this,n(),e),await n().workerCommand(`labelCaptureBasicOverlayUpdateViewfinder`,{payload:{labelCaptureBasicOverlayHandle:this[s],viewfinderJSON:e==null?void 0:e.toJSONObject()}})}onWorkerMessage(r){switch(r.type){case`labelCaptureBasicOverlayOnLabelTapped`:for(let e of this.listeners){var i;(i=e.onLabelTapped)==null||i.call(e,this,t.fromJSON(r.payload.labelJSON))}break;case`labelCaptureBasicOverlayBrushForField`:for(let i of this.listeners){var a;let o=e.fromJSON(r.payload.fieldJSON),c=t.fromJSON(r.payload.labelJSON),l=(a=i.brushForField)==null?void 0:a.call(i,this,o,c);l?this.setBrushForField(l,o,c):n().workerCommand(`labelCaptureBasicOverlaySetBrushForField`,{payload:{labelCaptureBasicOverlayHandle:this[s],fieldJSON:o.toJSONObject(),labelJSON:c.toJSONObject(),brush:void 0}})}break;case`labelCaptureBasicOverlayBrushForLabel`:for(let e of this.listeners){var o;let i=t.fromJSON(r.payload.labelJSON),a=(o=e.brushForLabel)==null?void 0:o.call(e,this,i);a?this.setBrushForLabel(a,i):n().workerCommand(`labelCaptureBasicOverlaySetBrushForLabel`,{payload:{labelCaptureBasicOverlayHandle:this[s],labelJSON:i.toJSONObject(),brush:void 0}})}break;default:break}}};export{l as LabelCaptureBasicOverlay};
@@ -1,2 +1,2 @@
1
- import { n as LabelCaptureBasicOverlayListener } from "../LabelCaptureBasicOverlay-BZl1LJkD.js";
1
+ import { n as LabelCaptureBasicOverlayListener } from "../LabelCaptureBasicOverlay-CF4h_JL9.js";
2
2
  export { LabelCaptureBasicOverlayListener };
@@ -1,2 +1,2 @@
1
- import { n as LabelCaptureFeedbackJSON, t as LabelCaptureFeedback } from "../LabelCaptureFeedback-Bc-zIaL_.js";
1
+ import { n as LabelCaptureFeedbackJSON, t as LabelCaptureFeedback } from "../LabelCaptureFeedback-sBwE9pgJ.js";
2
2
  export { LabelCaptureFeedback, LabelCaptureFeedbackJSON };
@@ -1,2 +1,2 @@
1
- import { n as LabelCaptureListener } from "../LabelCapture-BZi-QVCO.js";
1
+ import { n as LabelCaptureListener } from "../LabelCapture-BsBYp-Tr.js";
2
2
  export { LabelCaptureListener };
@@ -1,2 +1,2 @@
1
- import { t as LabelCaptureOverlayJSON } from "../LabelCaptureOverlayJSON-B6X3-JDh.js";
1
+ import { t as LabelCaptureOverlayJSON } from "../LabelCaptureOverlayJSON-B-Vo-158.js";
2
2
  export { LabelCaptureOverlayJSON };
@@ -1,2 +1,2 @@
1
- import { n as LabelCaptureSessionJSON, t as LabelCaptureSession } from "../LabelCaptureSession-Dc8YZO9H.js";
1
+ import { n as LabelCaptureSessionJSON, t as LabelCaptureSession } from "../LabelCaptureSession-lVHLczXv.js";
2
2
  export { LabelCaptureSession, LabelCaptureSessionJSON };
@@ -1,2 +1,2 @@
1
- import { n as LabelCaptureSettingsBuilder, r as labelCaptureSettings, t as LabelCaptureSettings } from "../LabelCaptureSettings-D4GHiKnt.js";
1
+ import { n as LabelCaptureSettingsBuilder, r as labelCaptureSettings, t as LabelCaptureSettings } from "../LabelCaptureSettings-076qXEg4.js";
2
2
  export { LabelCaptureSettings, LabelCaptureSettingsBuilder, labelCaptureSettings };
@@ -1,12 +1,11 @@
1
- import { t as LabelField } from "../../LabelField-BAO35-Eb.js";
2
- import { c as NativeProxyHandle } from "../../AdaptiveRecognitionResult-Clnk-SP8.js";
3
- import { t as LabelCapture } from "../../LabelCapture-BZi-QVCO.js";
1
+ import { c as NativeProxyHandle } from "../../AdaptiveRecognitionResult-y66P3VQQ.js";
2
+ import { t as LabelField } from "../../LabelField-b2ukZfup.js";
3
+ import { t as LabelCapture } from "../../LabelCapture-BsBYp-Tr.js";
4
4
  import { LabelCaptureValidationFlowSettings } from "../LabelCaptureValidationFlowSettings.js";
5
5
  import { LabelResultUpdateType } from "../LabelResultUpdateType.js";
6
6
  import { DataCaptureOverlay, DataCaptureView, FrameData } from "@scandit/web-datacapture-core";
7
7
  import { nativeHandle } from "@scandit/web-datacapture-core/build/js/private/nativeHandle.js";
8
8
  import { Serializable } from "@scandit/web-datacapture-core/build/js/private/Serializable.js";
9
-
10
9
  //#region src/main/api/LabelCaptureValidationFlow/LabelCaptureValidationFlowOverlay.d.ts
11
10
  interface LabelCaptureValidationFlowOverlayJSON {
12
11
  type: "ValidationFlowOverlay";
@@ -1 +1 @@
1
- import{nativeCall as e}from"../../worker/nativeCall.js";import{LabelCaptureValidationFlowFeedback as t}from"../LabelCaptureValidationFlowFeedback.js";import{LabelCaptureValidationFlowSettings as n}from"../LabelCaptureValidationFlowSettings.js";import{ValidationFlowStateManager as r}from"./private/ValidationFlowStateManager.js";import{ValidationFlowPresenter as i}from"./private/ValidationFlowPresenter.js";import{Feedback as a,Logger as o}from"@scandit/web-datacapture-core";import{nativeHandle as s}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var c=class c{static async withLabelCaptureForView(t,r){var i;let a=new c(await e(`ValidationFlowOverlay.create`,t[s]),await n.create(),t);return a.dataCaptureView=r,(i=t.context)==null||i.updateListeners.add(a.onContextUpdatedListenerHandler),await r.addOverlay(a),a}async applySettings(t){this.settings=t,await e(`ValidationFlowOverlay.applySettings`,this[s],t[s]),this.presenter&&this.presenter.updateSettings(t)}constructor(e,n,i){this.listener={onValidationFlowLabelCaptured:e=>{},onManualInput:(e,t,n)=>{},onValidationFlowResultUpdate:(e,t,n)=>{}},this.stateManager=new r,this.presenter=null,this.onContextUpdatedListenerHandler=this.onContextUpdatedListener.bind(this),this.feedback_=new t,this.originalLabelCaptureFeedback=null,this[s]=e,this.labelCapture=i,this.settings=n}toJSONObject(){return{type:`ValidationFlowOverlay`,nativeHandle:this[s]}}async onAddOverlay(){this.originalLabelCaptureFeedback=this.labelCapture.feedback,this.labelCapture.feedback.success=new a(null,null);let e=await this.labelCapture.validationFlowHandler();this.stateManager=new r,this.presenter=new i(this.stateManager,this.settings,e,this.labelCapture,this.feedback_),this.presenter.setExternalListener({onManualInput:(e,t,n)=>this.listener.onManualInput(e,t,n),onValidationFlowLabelCaptured:e=>this.listener.onValidationFlowLabelCaptured(e),onValidationFlowResultUpdate:(e,t,n)=>{var r,i;return(r=(i=this.listener).onValidationFlowResultUpdate)==null?void 0:r.call(i,e,t,n)}}),await this.presenter.mount(this.dataCaptureView),await this.applySettings(this.settings)}async onRemoveOverlay(){var e,t,n;this.originalLabelCaptureFeedback&&=(this.labelCapture.feedback=this.originalLabelCaptureFeedback,null),(e=this.labelCapture)==null||(e=e.context)==null||e.updateListeners.delete(this.onContextUpdatedListenerHandler),(t=this.presenter)==null||t.setExternalListener({onManualInput:()=>{},onValidationFlowLabelCaptured:()=>{},onValidationFlowResultUpdate:()=>{}});let r=(n=this.presenter)==null?void 0:n.unmount(this.dataCaptureView);this.presenter=null,await(await this.labelCapture.validationFlowHandler()).reset(),await this.labelCapture.unsetValidationFlowHandler(),await r}async onContextUpdatedListener(e){if(e.type===`removeOverlay`&&e.newValue===this&&await this.onRemoveOverlay(),e.type===`addOverlay`&&e.newValue===this){var t;await this.onAddOverlay(),await((t=this.presenter)==null?void 0:t.goToCompleteScan())}e.type===`modeEnabled`&&e.newValue&&this.presenter&&(this.stateManager.isFinished||this.stateManager.isIdle?(o.debug(`Validation flow overlay: mode enabled and validation flow is finished or idle, going to complete scan`),await this.presenter.goToCompleteScan()):this.stateManager.isPaused&&(o.debug(`Validation flow overlay: mode enabled and validation flow is paused, resuming scan`),await this.presenter.resumeScan()))}};export{c as LabelCaptureValidationFlowOverlay};
1
+ import{nativeCall as e}from"../../worker/nativeCall.js";import{LabelCaptureValidationFlowFeedback as t}from"../LabelCaptureValidationFlowFeedback.js";import{LabelCaptureValidationFlowSettings as n}from"../LabelCaptureValidationFlowSettings.js";import{ValidationFlowStateManager as r}from"./private/ValidationFlowStateManager.js";import{ValidationFlowPresenter as i}from"./private/ValidationFlowPresenter.js";import{Feedback as a,Logger as o}from"@scandit/web-datacapture-core";import{nativeHandle as s}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var c=class c{static async withLabelCaptureForView(t,r){var i;let a=await e(`ValidationFlowOverlay.create`,t[s]),o=await n.create(),l=new c(a,o,t);return l.dataCaptureView=r,(i=t.context)==null||i.updateListeners.add(l.onContextUpdatedListenerHandler),await r.addOverlay(l),l}async applySettings(t){this.settings=t,await e(`ValidationFlowOverlay.applySettings`,this[s],t[s]),this.presenter&&this.presenter.updateSettings(t)}constructor(e,n,i){this.listener={onValidationFlowLabelCaptured:e=>{},onManualInput:(e,t,n)=>{},onValidationFlowResultUpdate:(e,t,n)=>{}},this.stateManager=new r,this.presenter=null,this.onContextUpdatedListenerHandler=this.onContextUpdatedListener.bind(this),this.feedback_=new t,this.originalLabelCaptureFeedback=null,this[s]=e,this.labelCapture=i,this.settings=n}toJSONObject(){return{type:`ValidationFlowOverlay`,nativeHandle:this[s]}}async onAddOverlay(){this.originalLabelCaptureFeedback=this.labelCapture.feedback,this.labelCapture.feedback.success=new a(null,null);let e=await this.labelCapture.validationFlowHandler();this.stateManager=new r,this.presenter=new i(this.stateManager,this.settings,e,this.labelCapture,this.feedback_),this.presenter.setExternalListener({onManualInput:(e,t,n)=>this.listener.onManualInput(e,t,n),onValidationFlowLabelCaptured:e=>this.listener.onValidationFlowLabelCaptured(e),onValidationFlowResultUpdate:(e,t,n)=>{var r,i;return(r=(i=this.listener).onValidationFlowResultUpdate)==null?void 0:r.call(i,e,t,n)}}),await this.presenter.mount(this.dataCaptureView),await this.applySettings(this.settings)}async onRemoveOverlay(){var e,t,n;this.originalLabelCaptureFeedback&&=(this.labelCapture.feedback=this.originalLabelCaptureFeedback,null),(e=this.labelCapture)==null||(e=e.context)==null||e.updateListeners.delete(this.onContextUpdatedListenerHandler),(t=this.presenter)==null||t.setExternalListener({onManualInput:()=>{},onValidationFlowLabelCaptured:()=>{},onValidationFlowResultUpdate:()=>{}});let r=(n=this.presenter)==null?void 0:n.unmount(this.dataCaptureView);this.presenter=null,await(await this.labelCapture.validationFlowHandler()).reset(),await this.labelCapture.unsetValidationFlowHandler(),await r}async onContextUpdatedListener(e){if(e.type===`removeOverlay`&&e.newValue===this&&await this.onRemoveOverlay(),e.type===`addOverlay`&&e.newValue===this){var t;await this.onAddOverlay(),await((t=this.presenter)==null?void 0:t.goToCompleteScan())}e.type===`modeEnabled`&&e.newValue&&this.presenter&&(this.stateManager.isFinished||this.stateManager.isIdle?(o.debug(`Validation flow overlay: mode enabled and validation flow is finished or idle, going to complete scan`),await this.presenter.goToCompleteScan()):this.stateManager.isPaused&&(o.debug(`Validation flow overlay: mode enabled and validation flow is paused, resuming scan`),await this.presenter.resumeScan()))}};export{c as LabelCaptureValidationFlowOverlay};
@@ -0,0 +1,2 @@
1
+ import { t as FieldId } from "../../../FieldId-BMwA9rgx.js";
2
+ export { FieldId };
@@ -0,0 +1 @@
1
+ var e=class e{constructor(e,t){this.fieldName=e,this.instanceIndex=t}static fromLabelField(t){return new e(t.name,t.instanceIndex)}toKey(){let e=this.fieldName.replace(/%/g,`%25`).replace(/#/g,`%23`);return this.instanceIndex==null?e:`${e}#${this.instanceIndex}`}equals(e){return this.fieldName===e.fieldName&&this.instanceIndex===e.instanceIndex}};export{e as FieldId};
@@ -1,6 +1,6 @@
1
- import { J as ValidationFlowState } from "../../../sdcLabelInternalModuleCapture-B6-1Wjzn.js";
2
- import { t as ValidationFlowField } from "../../../ValidationFlowField-DL7FdqPM.js";
3
- import { t as LabelCapture } from "../../../LabelCapture-BZi-QVCO.js";
1
+ import { K as ValidationFlowState } from "../../../sdcLabelInternalModuleCapture-LDFRDPMF.js";
2
+ import { t as ValidationFlowField } from "../../../ValidationFlowField-B8BG6AoW.js";
3
+ import { t as LabelCapture } from "../../../LabelCapture-BsBYp-Tr.js";
4
4
  import { LabelCaptureValidationFlowSettings } from "../../LabelCaptureValidationFlowSettings.js";
5
5
  import { LabelResultUpdateType } from "../../LabelResultUpdateType.js";
6
6
  import { LabelCaptureValidationFlowListener } from "../LabelCaptureValidationFlowOverlay.js";
@@ -12,7 +12,6 @@ import { ValidationFlowView } from "./ValidationFlowView.js";
12
12
  import { PrivateValidationFlowHandler, PrivateValidationFlowListener } from "../../PrivateValidationFlowHandler.js";
13
13
  import { LabelCaptureValidationFlowFeedback } from "../../LabelCaptureValidationFlowFeedback.js";
14
14
  import { Color, DataCaptureView, DataCaptureViewListener, MarginsWithUnit, NumberWithUnit, PrivateLoadableFrameData } from "@scandit/web-datacapture-core";
15
-
16
15
  //#region src/main/api/LabelCaptureValidationFlow/private/ValidationFlowPresenter.d.ts
17
16
  /**
18
17
  * Convert a margin value to pixels, using the view dimension for Fraction unit.
@@ -118,11 +117,11 @@ declare class ValidationFlowPresenter implements PrivateValidationFlowListener,
118
117
  */
119
118
  updateSubmitButtonState(): void;
120
119
  private updateFieldValueAndState;
120
+ private callUpdateFieldValue;
121
121
  private refocusInputForCorrection;
122
122
  private restoreLayout;
123
123
  /**
124
124
  * Update cloud backup task state for a specific field
125
- * @param fieldName - Name of the field
126
125
  * @param mode - 'cancel' to cancel task, 'uncancel' to restore task
127
126
  */
128
127
  private updateCloudBackupTaskState;
@@ -1 +1 @@
1
- import{LabelFieldType as e}from"../../LabelFieldType.js";import{ValidationFlowField as t}from"../../ValidationFlowField.js";import"../../../djinni-types/sdcLabelInternalModuleCapture.js";import{LabelResultUpdateType as n}from"../../LabelResultUpdateType.js";import"./ValidationFlowStateManager.js";import{TextInput as r,TextInputEvents as i}from"../../../ui/atoms/TextInput.js";import{LabelCaptureValidationFlowLayoutEvents as a}from"../../../ui/organisms/LabelCaptureValidationFlowLayout.js";import{ValidationFlowView as o}from"./ValidationFlowView.js";import{KeyboardVisibilityController as s}from"../../../ui/controllers/KeyboardVisibilityController.js";import{FrameSourceState as c,Logger as l,MarginsWithUnit as u,MeasureUnit as d,NumberWithUnit as f,convertToPublicFrameData as p,isCameraFrameSource as m}from"@scandit/web-datacapture-core";import{teals as h}from"@scandit/web-datacapture-core/build/js/private/ui/colors.js";import{safeRequestAnimationFrame as g}from"@scandit/web-datacapture-core/build/js/private/utils/safeRequestAnimationFrame.js";function _(e,t){return e.unit===d.Pixel?e.value:e.value*t}function v(e,t,n){return new u(new f(_(e.left,t),d.Pixel),new f(_(e.top,n),d.Pixel),new f(_(e.right,t),d.Pixel),new f(_(e.bottom,n),d.Pixel))}function y(e){return e?`${e.day} - ${e.month} - ${e.year}`:``}function b(t){let n=``;switch(t.type){case e.Text:n=t.text||``;break;case e.Barcode:var r;n=((r=t.barcode)==null?void 0:r.data)||t.text||``;break;default:var i;n=t.text||((i=t.barcode)==null?void 0:i.data)||y(t.date)||``;break}return n}var x=class{get view(){return this._view}constructor(e,t,n,r,i,a=new o,c=s.create({document:globalThis.document,window:globalThis.window,visualViewport:globalThis.window.visualViewport})){this.stateManager=e,this.settings=t,this.validationFlowHandler=n,this.labelCapture=r,this.feedback=i,this.keyboardController=c,this._isAdjustingScanArea=!1,this.dataCaptureView=null,this.onTextInputScanIconClickHandler=this.onTextInputScanIconClick.bind(this),this.onTextInputClearIconClickHandler=this.onTextInputClearIconClick.bind(this),this.onTextInputFocusHandler=this.onTextInputFocus.bind(this),this.onTextInputBlurHandler=this.onTextInputBlur.bind(this),this.onTextInputKeydownHandler=this.onTextInputKeydown.bind(this),this.onClearAllButtonClickedHandler=this.onClearAllButtonClicked.bind(this),this.onSubmitButtonClickedHandler=this.onSubmitButtonClicked.bind(this),this.onPauseButtonClickedHandler=this.onPauseButtonClicked.bind(this),this.onClickedOutsideListHandler=this.onClickedOutsideList.bind(this),this.onValidationFlowLayoutChangeHandler=this.onValidationFlowLayoutChange.bind(this),this.onKeyboardVisibilityChangedHandler=this.onKeyboardVisibilityChanged.bind(this),this._view=a}updateSettings(e){this.settings=e,this._view.updateButtonText({finishButtonText:e.finishButtonText,restartButtonText:e.restartButtonText,pauseButtonText:e.pauseButtonText})}get camera(){var e;return(e=this.labelCapture)!=null&&e.context&&m(this.labelCapture.context.frameSource)?this.labelCapture.context.frameSource:null}setExternalListener(e){this.externalListener=e}async goToCompleteScan(){this.stateManager.clearPartialScanFieldNames(),await this.validationFlowHandler.startCompleteLabelScan(``);let e=await this.validationFlowHandler.validationFlowFields();e.length>0&&(await this.initializeInputs(e),this.stateManager.isScanning||(this.stateManager.validationFlowHandlerState=2),this.stateManager.setScanResults(e),this.syncInputWithState())}async resumeScan(){await this.validationFlowHandler.resumeScan()}async resumePreviousScanMode(){let e=this.stateManager.getPartialScanFieldNames();e.length>0?await this.validationFlowHandler.startPartialLabelScan(e):await this.validationFlowHandler.resumeScan()}async initializeInputs(e){let t=e.map(e=>{let t=e.getLabelField();return{name:t.name,type:`text`,label:t.isRequired?t.name:`${t.name} (optional)`,loadingText:this.settings.scanningText||`Scanning`,value:t.text??``,required:t.isRequired}});this.stateManager.clearFields(),this.stateManager.registerFields(t.map(e=>e.name)),this._view.initializeInputs(t),this.updateAllScanIconsVisibility()}updateScanIconVisibility(e){let t=this._view.isInputFocused(e),n=this._view.getInputValue(e).trim()===``,r=!this.stateManager.isScanningOrCloudBackup&&(t||n);this._view.updateScanIconVisibility(e,r)}updateAllScanIconsVisibility(){for(let e of this._view.getInputs())this.updateScanIconVisibility(e.name)}updateSubmitButtonState(){let e=this._view.getInputs(),t=!0;for(let n of e)if(n.required&&(n.value.trim()===``||n.invalid)){t=!1;break}this._view.setSubmitButtonDisabled(!t)}async updateFieldValueAndState(e){let t=this._view.getInputByName(e);if(!t)return!1;let n=t.value;if(!t.required&&n.trim()===``){let t=await this.validationFlowHandler.updateFieldValue(e,n);return this.applyInputState(e,`initial`,n),this.updateSubmitButtonState(),t}let r=await this.validationFlowHandler.updateFieldValue(e,n),i=r?`initial`:`error`;return this.applyInputState(e,i,n),this.updateSubmitButtonState(),r}async refocusInputForCorrection(e){this._view.hasInput(e)&&(this._view.isInputActiveElement(e)||this._view.focusInput(e),this.updateScanIconVisibility(e))}async restoreLayout(e){this._view.hasInput(e)&&(this._view.clearInputPlaceholder(e),await this._view.restoreInputsPositions(),this.restoreButtonsBasedOnState(),this.updateAllScanIconsVisibility())}async updateCloudBackupTaskState(e,t){if(t===`cancel`)this.stateManager.cancelCloudBackupForField(e),await this.validationFlowHandler.cancelCloudBackupTaskForField(e);else{this.stateManager.uncancelCloudBackupForField(e),await this.validationFlowHandler.uncancelCloudBackupTaskForField(e);let t=await this.validationFlowHandler.validationFlowFields();this.updateCloudBackupFieldsMap(t),this.syncInputWithState()}}updateCloudBackupFieldsMap(e){this.stateManager.updateCloudBackupFields(e)}getInputStateConfig(e){return{scanningText:this.settings.scanningText,adaptiveScanningText:this.settings.adaptiveScanningText,hintMessage:(e==null?void 0:e.hintMessage)??this.settings.validationErrorText,backgroundColor:(e==null?void 0:e.backgroundColor)??``,scanIconVisible:!this.stateManager.isScanningOrCloudBackup}}applyInputState(e,t,n,r){this.stateManager.setInputState(e,t),this._view.updateInputForState(e,this.stateManager.getInputState(e),n,this.getInputStateConfig(r))}async onFieldsScanned(e){!e||e.length===0||(l.info(`onFieldsScanned`,{fields:e}),this.stateManager.setScanResults(e),this.updateAllScanIconsVisibility(),this.syncInputWithState())}async onLabelIsMissingRequiredField(e){!e||e.length===0||(this.stateManager.setScanResults(e),this.syncInputWithState())}async onScanTimeout(){this.stateManager.markTimeout(),await this.validationFlowHandler.pauseScan()}syncInputWithState(){let e=this.getInputStateConfig(),t=new Set(this.stateManager.getCloudBackupFields());for(let n of this._view.getInputs()){let r=n.value.trim()===``,i,a=n.value,o=this.stateManager.getScanResult(n.name),s=o&&b(o.getLabelField())?o:void 0;if(s){let e=s.getLabelField();a=b(e),i=s.isValid()?`validated`:e.isRequired||a?`error`:`initial`}else i=t.has(n.name)&&r?`cloudBackup`:this.stateManager.isScanning&&r?`scanning`:`initial`;this.stateManager.setInputState(n.name,i),this._view.updateInputForState(n.name,this.stateManager.getInputState(n.name),a,{...e,backgroundColor:``})}this.updateSubmitButtonState(),this.updateAllScanIconsVisibility()}onManualInput(e,t,n){var r;(r=this.externalListener)==null||r.onManualInput(e.getLabelField(),t,n)}restoreButtonsBasedOnState(){switch(!0){case this.stateManager.isScanning:this._view.showScanningButtons();break;case this.stateManager.isPaused:this._view.showValidationButtons();break;default:this._view.hideAllButtons();break}}async onStateChanged(e){switch(this.stateManager.validationFlowHandlerState=e,this.restoreButtonsBasedOnState(),!0){case this.stateManager.isScanning:await this.onScanStateChanged();break;case this.stateManager.isPaused:await this.onPauseStateChanged();break}}async onCloudBackupServiceStarted(){this.stateManager.startCloudBackupService(),this.updateAllScanIconsVisibility(),this._view.showAdaptiveRecognitionOverlay(),this.syncInputWithState()}async onCloudBackupServiceStopped(){this.stateManager.isCloudBackupProcessing&&this.stateManager.stopCloudBackup();let e=await this.validationFlowHandler.validationFlowFields();this.updateCloudBackupFieldsMap(e),this.updateAllScanIconsVisibility(),this._view.hideAdaptiveRecognitionOverlay(),this.syncInputWithState()}async onResultUpdate(e,t,r){var i,a;if((i=this.externalListener)==null||(a=i.onValidationFlowResultUpdate)==null||a.call(i,e,t.map(e=>e.getLabelField()),r&&this.labelCapture.context?p(r,this.labelCapture.context):null),e===n.AsyncStarted){this.updateCloudBackupFieldsMap(t),this.syncInputWithState();return}if(this.stateManager.updateScanResults(t),this.syncInputWithState(),e===n.Sync){for(let e of t){let t=e.getLabelField();if(!this._view.hasInput(t.name)||this.stateManager.isCurrentInputName(t.name)||!e.isValid())continue;let n=b(t);this.applyInputState(t.name,`validated`,n,{backgroundColor:h.teal10}),this.updateScanIconVisibility(t.name)}this.feedback.scan.emit()}}onCloudBackupFeedbackEmit(){this.feedback.adaptiveRecognitionResult.emit()}async standByCamera(){this.camera&&await this.camera.switchToDesiredState(c.Standby)}async activateCamera(){this.camera&&await this.camera.switchToDesiredState(c.On)}async onTextInputScanIconClick(e){let t=e.detail.target.closest(r.tag),n=t==null?void 0:t.name;n&&(this._view.setInputValue(t.name,``),this._view.blurInput(t.name),this.stateManager.clearCurrentInputName(),await this.validationFlowHandler.updateFieldValue(n,``),this.stateManager.setPartialScanFieldNames([n]),await this.validationFlowHandler.startPartialLabelScan([n]))}async onTextInputClearIconClick(e){let t=e.detail.target.closest(r.tag),n=t==null?void 0:t.name;n&&(this.stateManager.deleteScanResult(n),this.applyInputState(n,`initial`,``),await this.validationFlowHandler.pauseScan(),await this.validationFlowHandler.updateFieldValue(n,``))}async onTextInputFocus(e){let t=e.detail.target;if(!t)return;let n=t.name;this.settings.getPlaceholderTextForLabelDefinition(n).then(e=>{this._view.setInputPlaceholder(n,e??``)}),this.stateManager.getCurrentInputName()!==n&&(this.stateManager.setCurrentInputName(n),this._view.setInputBackgroundColor(n,``),this.stateManager.cancelCloudBackupForField(n),this.validationFlowHandler.cancelCloudBackupTaskForField(n),this.validationFlowHandler.pauseScan(),this.applyInputState(n,`initial`,this._view.getInputValue(n)),this.updateSubmitButtonState(),this.updateAllScanIconsVisibility(),await this._view.moveInputToTop(n),this._view.hideAllButtons())}async onTextInputBlur(e){let t=e.detail.target.name;e.preventDefault(),e.stopPropagation(),await this.runBlurValidation(t)}async runBlurValidation(e){if(!e)return!1;let t=this._view.getInputValue(e).trim()!==``,n=!1,r=!1;try{if(t)n=await this.updateFieldValueAndState(e),n?await this.restoreLayout(e):(await this.refocusInputForCorrection(e),r=!0);else return this.stateManager.clearCurrentInputName(),await this.updateCloudBackupTaskState(e,`uncancel`),await this.restoreLayout(e),n}catch(t){l.warn(`Validation flow: Failed to validate field`,{fieldName:e,error:t}),await this.restoreLayout(e)}finally{r||this.stateManager.clearCurrentInputName()}return n}async onTextInputKeydown(e){let{target:t,key:n,originalEvent:r}=e.detail;if(n===`Enter`||n===`Escape`){if(r.preventDefault(),r.stopPropagation(),t.value.trim()===``){t.blur();return}await this.runBlurValidation(t.name)&&t.blur();return}}async onKeyboardVisibilityChanged(e){let t=this.stateManager.getCurrentInputName();t&&(e.detail.isKeyboardVisible?this._view.scrollInputIntoView(t,e):!e.detail.isKeyboardVisible&&this._view.isInputActiveElement(t)&&this._view.blurActiveElement())}async onClearAllButtonClicked(e){this.stateManager.clearScanResults(),this.syncInputWithState(),await this.validationFlowHandler.clearAllFields(),await this.cancelAllCloudBackupTasks(),await this.validationFlowHandler.pauseScan(),await this.goToCompleteScan()}async onSubmitButtonClicked(){let e=await this.validationFlowHandler.onFinishFlowRequested();if(e.type===`result`){var n;let r=e.result.map(e=>t.fromJSONObject(e));(n=this.externalListener)==null||n.onValidationFlowLabelCaptured(r.map(e=>e.getLabelField()))}}async onPauseButtonClicked(e){await this.validationFlowHandler.pauseScan(),this.stateManager.markPausedFromScanningState(),this._view.showValidationButtons()}async onClickedOutsideList(e){if(!this.stateManager.isScanning&&!(this.view.isFocusedElementAnTextInput()||this.stateManager.hasCurrentInputName)&&this.stateManager.isPaused){await this.resumePreviousScanMode();return}}onValidationFlowLayoutChange(e){if(!this.dataCaptureView)return;let{left:t,top:n,right:r,bottom:i}=this._latestViewScanAreaMargins;if(this._isAdjustingScanArea=!0,e.detail.isPanelOnRightSide){let a=e.detail.formWidth+e.detail.safeAreaInsetRight,o=r.value>=a?r:new f(a,d.Pixel),s=e.detail.buttonsHeight+e.detail.safeAreaInsetBottom,c=i.value>=s?i:new f(s,d.Pixel);this.dataCaptureView.scanAreaMargins=new u(t,n,o,c)}else{let a=e.detail.formHeight+e.detail.safeAreaInsetBottom,o=i.value>=a?i:new f(a,d.Pixel);this.dataCaptureView.scanAreaMargins=new u(t,n,r,o)}}willChangeScanAreaMargins(e,t,n){this._isAdjustingScanArea||(this._latestViewScanAreaMargins=n)}didChangeScanAreaMargins(e,t){this._isAdjustingScanArea=!1}async cancelAllCloudBackupTasks(){let e=[],t=await this.validationFlowHandler.validationFlowFields();for(let n of t)e.push(this.updateCloudBackupTaskState(n.getLabelField().name,`cancel`));await Promise.all(e)}async onPauseStateChanged(){this._view.showValidationButtons(),await Promise.all([this.syncInputWithState(),this._view.showBackdrop(),this.standByCamera()])}async onScanStateChanged(){this._view.showScanningButtons(),await Promise.all([this.syncInputWithState(),this._view.hideBackdrop(),this.activateCamera()])}async mount(e){this.dataCaptureView=e,e.setHiddenProperty(`forceScanAreaMarginsToPixels`,!0),this.validationFlowHandler.addListener(this),await this._view.mount(e),this._view.updateButtonText({finishButtonText:this.settings.finishButtonText,restartButtonText:this.settings.restartButtonText,pauseButtonText:this.settings.pauseButtonText}),this.registerEventListeners(),await new Promise(e=>g(()=>e())),e.addListener(this),e.scanAreaMargins=e.scanAreaMargins}async unmount(e){this.stateManager.clearCurrentInputName(),this.stateManager.isCloudBackupProcessing&&this.stateManager.stopCloudBackup(),e.removeListener(this),e.setHiddenProperty(`forceScanAreaMarginsToPixels`,!1),e.scanAreaMargins=this._latestViewScanAreaMargins,this.unregisterEventListeners(),await this._view.unmount(e),this.dataCaptureView=null}registerEventListeners(){this._view.addEventListener(i.Scan,this.onTextInputScanIconClickHandler),this._view.addEventListener(i.Clear,this.onTextInputClearIconClickHandler),this._view.addEventListener(i.Focus,this.onTextInputFocusHandler),this._view.addEventListener(i.Blur,this.onTextInputBlurHandler),this._view.addEventListener(i.Keydown,this.onTextInputKeydownHandler),this._view.addEventListener(a.ClearAllButtonClicked,this.onClearAllButtonClickedHandler),this._view.addSubmitButtonListener(this.onSubmitButtonClickedHandler),this._view.addEventListener(a.PauseButtonClicked,this.onPauseButtonClickedHandler),this._view.addEventListener(a.ClickedOutsideList,this.onClickedOutsideListHandler),this._view.addEventListener(a.ValidationFlowLayoutChange,this.onValidationFlowLayoutChangeHandler),this.keyboardController.connect(),this.keyboardController.addEventListener(`keyboard-visibility-changed`,this.onKeyboardVisibilityChangedHandler)}unregisterEventListeners(){this.keyboardController.removeEventListener(`keyboard-visibility-changed`,this.onKeyboardVisibilityChangedHandler),this.keyboardController.disconnect(),this._view.removeEventListener(i.Scan,this.onTextInputScanIconClickHandler),this._view.removeEventListener(i.Clear,this.onTextInputClearIconClickHandler),this._view.removeEventListener(i.Focus,this.onTextInputFocusHandler),this._view.removeEventListener(i.Blur,this.onTextInputBlurHandler),this._view.removeEventListener(i.Keydown,this.onTextInputKeydownHandler),this._view.removeEventListener(a.ClearAllButtonClicked,this.onClearAllButtonClickedHandler),this._view.removeSubmitButtonListener(this.onSubmitButtonClickedHandler),this._view.removeEventListener(a.PauseButtonClicked,this.onPauseButtonClickedHandler),this._view.removeEventListener(a.ClickedOutsideList,this.onClickedOutsideListHandler),this._view.removeEventListener(a.ValidationFlowLayoutChange,this.onValidationFlowLayoutChangeHandler),this.validationFlowHandler.removeListener(this)}};export{x as ValidationFlowPresenter,_ as convertToPx,v as toPixelMargins};
1
+ import{LabelFieldType as e}from"../../LabelFieldType.js";import{ValidationFlowField as t}from"../../ValidationFlowField.js";import{LabelResultUpdateType as n}from"../../LabelResultUpdateType.js";import{FieldId as r}from"./FieldId.js";import{fieldKeyFromLabelField as i}from"./ValidationFlowStateManager.js";import{TextInput as a,TextInputEvents as o}from"../../../ui/atoms/TextInput.js";import{LabelCaptureValidationFlowLayoutEvents as s}from"../../../ui/organisms/LabelCaptureValidationFlowLayout.js";import{ValidationFlowView as c}from"./ValidationFlowView.js";import{KeyboardVisibilityController as l}from"../../../ui/controllers/KeyboardVisibilityController.js";import{FrameSourceState as u,Logger as d,MarginsWithUnit as f,MeasureUnit as p,NumberWithUnit as m,convertToPublicFrameData as h,isCameraFrameSource as g}from"@scandit/web-datacapture-core";import{teals as _}from"@scandit/web-datacapture-core/build/js/private/ui/colors.js";import{safeRequestAnimationFrame as v}from"@scandit/web-datacapture-core/build/js/private/utils/safeRequestAnimationFrame.js";function y(e,t){return e.unit===p.Pixel?e.value:e.value*t}function b(e,t,n){return new f(new m(y(e.left,t),p.Pixel),new m(y(e.top,n),p.Pixel),new m(y(e.right,t),p.Pixel),new m(y(e.bottom,n),p.Pixel))}function x(e){return e?`${e.day} - ${e.month} - ${e.year}`:``}function S(t){let n=``;switch(t.type){case e.Text:n=t.text||``;break;case e.Barcode:var r;n=((r=t.barcode)==null?void 0:r.data)||t.text||``;break;default:var i;n=t.text||((i=t.barcode)==null?void 0:i.data)||x(t.date)||``;break}return n}var C=class{get view(){return this._view}constructor(e,t,n,r,i,a=new c,o=l.create({document:globalThis.document,window:globalThis.window,visualViewport:globalThis.window.visualViewport})){this.stateManager=e,this.settings=t,this.validationFlowHandler=n,this.labelCapture=r,this.feedback=i,this.keyboardController=o,this._isAdjustingScanArea=!1,this.dataCaptureView=null,this.onTextInputScanIconClickHandler=this.onTextInputScanIconClick.bind(this),this.onTextInputClearIconClickHandler=this.onTextInputClearIconClick.bind(this),this.onTextInputFocusHandler=this.onTextInputFocus.bind(this),this.onTextInputBlurHandler=this.onTextInputBlur.bind(this),this.onTextInputKeydownHandler=this.onTextInputKeydown.bind(this),this.onClearAllButtonClickedHandler=this.onClearAllButtonClicked.bind(this),this.onSubmitButtonClickedHandler=this.onSubmitButtonClicked.bind(this),this.onPauseButtonClickedHandler=this.onPauseButtonClicked.bind(this),this.onClickedOutsideListHandler=this.onClickedOutsideList.bind(this),this.onValidationFlowLayoutChangeHandler=this.onValidationFlowLayoutChange.bind(this),this.onKeyboardVisibilityChangedHandler=this.onKeyboardVisibilityChanged.bind(this),this._view=a}updateSettings(e){this.settings=e,this._view.updateButtonText({finishButtonText:e.finishButtonText,restartButtonText:e.restartButtonText,pauseButtonText:e.pauseButtonText})}get camera(){var e;return(e=this.labelCapture)!=null&&e.context&&g(this.labelCapture.context.frameSource)?this.labelCapture.context.frameSource:null}setExternalListener(e){this.externalListener=e}async goToCompleteScan(){this.stateManager.clearPartialScanTargets(),await this.validationFlowHandler.startCompleteLabelScan(``);let e=await this.validationFlowHandler.validationFlowFields();e.length>0&&(await this.initializeInputs(e),this.stateManager.isScanning||(this.stateManager.validationFlowHandlerState=2),this.stateManager.setScanResults(e),this.syncInputWithState())}async resumeScan(){await this.validationFlowHandler.resumeScan()}async resumePreviousScanMode(){let e=this.stateManager.getPartialScanTargets();if(e.length===0){await this.validationFlowHandler.resumeScan();return}await this.validationFlowHandler.startPartialLabelScan(e.map(e=>({fieldName:e.fieldName,instanceIndex:e.instanceIndex??void 0})))}async initializeInputs(e){let t=e.map(e=>{let t=e.getLabelField(),n=r.fromLabelField(t),i=t.instanceIndex==null?t.name:`${t.name} (${t.instanceIndex+1})`;return{fieldId:n,type:`text`,label:t.isRequired?i:`${i} (optional)`,loadingText:this.settings.scanningText||`Scanning`,value:t.text??``,required:t.isRequired}});this.stateManager.clearFields(),this.stateManager.registerFields(t.map(e=>e.fieldId.toKey())),this.stateManager.registerFieldInstances(t.map(e=>e.fieldId)),this._view.initializeInputs(t),this.updateAllScanIconsVisibility()}updateScanIconVisibility(e){let t=this._view.isInputFocused(e),n=this._view.getInputValue(e).trim()===``,r=!this.stateManager.isScanningOrCloudBackup&&(t||n);this._view.updateScanIconVisibility(e,r)}updateAllScanIconsVisibility(){for(let e of this._view.getInputs())this.updateScanIconVisibility(e.name)}updateSubmitButtonState(){let e=this._view.getInputs(),t=!0;for(let n of e)if(n.required&&(n.value.trim()===``||n.invalid)){t=!1;break}this._view.setSubmitButtonDisabled(!t)}async updateFieldValueAndState(e){let t=this._view.getInputByName(e);if(!t)return!1;let n=t.value;if(!t.required&&n.trim()===``){let t=await this.callUpdateFieldValue(e,n);return this.applyInputState(e,`initial`,n),this.updateSubmitButtonState(),t}let r=await this.callUpdateFieldValue(e,n),i=r?`initial`:`error`;return this.applyInputState(e,i,n),this.updateSubmitButtonState(),r}async callUpdateFieldValue(e,t){let n=this.stateManager.getFieldInstance(e);return n!=null&&this.validationFlowHandler.updateFieldValue({fieldName:n.fieldName,instanceIndex:n.instanceIndex??void 0},t)}async refocusInputForCorrection(e){this._view.hasInput(e)&&(this._view.isInputActiveElement(e)||this._view.focusInput(e),this.updateScanIconVisibility(e))}async restoreLayout(e){this._view.hasInput(e)&&(this._view.clearInputPlaceholder(e),await this._view.restoreInputsPositions(),this.restoreButtonsBasedOnState(),this.updateAllScanIconsVisibility())}async updateCloudBackupTaskState(e,t){let n=this.stateManager.getFieldInstance(e);if(n==null)return;let r=n.fieldName;if(t===`cancel`)this.stateManager.cancelCloudBackupForField(e),await this.validationFlowHandler.cancelCloudBackupTaskForField(r);else{this.stateManager.uncancelCloudBackupForField(e),await this.validationFlowHandler.uncancelCloudBackupTaskForField(r);let t=await this.validationFlowHandler.validationFlowFields();this.updateCloudBackupFieldsMap(t),this.syncInputWithState()}}updateCloudBackupFieldsMap(e){this.stateManager.updateCloudBackupFields(e)}getInputStateConfig(e){return{scanningText:this.settings.scanningText,adaptiveScanningText:this.settings.adaptiveScanningText,hintMessage:(e==null?void 0:e.hintMessage)??this.settings.validationErrorText,backgroundColor:(e==null?void 0:e.backgroundColor)??``,scanIconVisible:!this.stateManager.isScanningOrCloudBackup}}applyInputState(e,t,n,r){this.stateManager.setInputState(e,t),this._view.updateInputForState(e,this.stateManager.getInputState(e),n,this.getInputStateConfig(r))}async onFieldsScanned(e){!e||e.length===0||(d.info(`onFieldsScanned`,{fields:e}),this.stateManager.setScanResults(e),this.updateAllScanIconsVisibility(),this.syncInputWithState())}async onLabelIsMissingRequiredField(e){!e||e.length===0||(this.stateManager.setScanResults(e),this.syncInputWithState())}async onScanTimeout(){this.stateManager.markTimeout(),await this.validationFlowHandler.pauseScan()}syncInputWithState(){let e=this.getInputStateConfig(),t=new Set(this.stateManager.getCloudBackupFields());for(let n of this._view.getInputs()){let r=n.value.trim()===``,i,a=n.value,o=this.stateManager.getScanResult(n.name),s=o&&S(o.getLabelField())?o:void 0;if(s){let e=s.getLabelField();a=S(e),i=s.isValid()?`validated`:e.isRequired||a?`error`:`initial`}else i=t.has(n.name)&&r?`cloudBackup`:this.stateManager.isScanning&&r?`scanning`:`initial`;this.stateManager.setInputState(n.name,i),this._view.updateInputForState(n.name,this.stateManager.getInputState(n.name),a,{...e,backgroundColor:``})}this.updateSubmitButtonState(),this.updateAllScanIconsVisibility()}onManualInput(e,t,n){var r;(r=this.externalListener)==null||r.onManualInput(e.getLabelField(),t,n)}restoreButtonsBasedOnState(){switch(!0){case this.stateManager.isScanning:this._view.showScanningButtons();break;case this.stateManager.isPaused:this._view.showValidationButtons();break;default:this._view.hideAllButtons();break}}async onStateChanged(e){switch(this.stateManager.validationFlowHandlerState=e,this.restoreButtonsBasedOnState(),!0){case this.stateManager.isScanning:await this.onScanStateChanged();break;case this.stateManager.isPaused:await this.onPauseStateChanged();break}}async onCloudBackupServiceStarted(){this.stateManager.startCloudBackupService(),this.updateAllScanIconsVisibility(),this._view.showAdaptiveRecognitionOverlay(),this.syncInputWithState()}async onCloudBackupServiceStopped(){this.stateManager.isCloudBackupProcessing&&this.stateManager.stopCloudBackup();let e=await this.validationFlowHandler.validationFlowFields();this.updateCloudBackupFieldsMap(e),this.updateAllScanIconsVisibility(),this._view.hideAdaptiveRecognitionOverlay(),this.syncInputWithState()}async onResultUpdate(e,t,r){var a,o;if((a=this.externalListener)==null||(o=a.onValidationFlowResultUpdate)==null||o.call(a,e,t.map(e=>e.getLabelField()),r&&this.labelCapture.context?h(r,this.labelCapture.context):null),e===n.AsyncStarted){this.updateCloudBackupFieldsMap(t),this.syncInputWithState();return}if(this.stateManager.updateScanResults(t),this.syncInputWithState(),e===n.Sync){for(let e of t){let t=e.getLabelField(),n=i(t);if(!this._view.hasInput(n)||this.stateManager.isCurrentInputName(n)||!e.isValid())continue;let r=S(t);this.applyInputState(n,`validated`,r,{backgroundColor:_.teal10}),this.updateScanIconVisibility(n)}this.feedback.scan.emit()}}onCloudBackupFeedbackEmit(){this.feedback.adaptiveRecognitionResult.emit()}async standByCamera(){this.camera&&await this.camera.switchToDesiredState(u.Standby)}async activateCamera(){this.camera&&await this.camera.switchToDesiredState(u.On)}async onTextInputScanIconClick(e){let t=e.detail.target.closest(a.tag),n=t==null?void 0:t.name;if(!n)return;this._view.setInputValue(n,``),this._view.blurInput(n),this.stateManager.clearCurrentInputName(),await this.callUpdateFieldValue(n,``);let r=this.stateManager.getFieldInstance(n);r!=null&&(this.stateManager.setPartialScanTargets([r]),await this.validationFlowHandler.startPartialLabelScan([{fieldName:r.fieldName,instanceIndex:r.instanceIndex??void 0}]))}async onTextInputClearIconClick(e){let t=e.detail.target.closest(a.tag),n=t==null?void 0:t.name;n&&(this.stateManager.deleteScanResult(n),this.applyInputState(n,`initial`,``),await this.validationFlowHandler.pauseScan(),await this.callUpdateFieldValue(n,``))}async onTextInputFocus(e){let t=e.detail.target;if(!t)return;let n=t.name,r=this.stateManager.getFieldInstance(n);if(r==null)return;let i=r.fieldName;this.settings.getPlaceholderTextForLabelDefinition(i).then(e=>{this._view.setInputPlaceholder(n,e??``)}),this.stateManager.getCurrentInputName()!==n&&(this.stateManager.setCurrentInputName(n),this._view.setInputBackgroundColor(n,``),this.stateManager.cancelCloudBackupForField(n),this.validationFlowHandler.cancelCloudBackupTaskForField(i),this.validationFlowHandler.pauseScan(),this.applyInputState(n,`initial`,this._view.getInputValue(n)),this.updateSubmitButtonState(),this.updateAllScanIconsVisibility(),await this._view.moveInputToTop(n),this._view.hideAllButtons())}async onTextInputBlur(e){let t=e.detail.target.name;e.preventDefault(),e.stopPropagation(),await this.runBlurValidation(t)}async runBlurValidation(e){if(!e)return!1;let t=this._view.getInputValue(e).trim()!==``,n=!1,r=!1;try{if(t)n=await this.updateFieldValueAndState(e),n?await this.restoreLayout(e):(await this.refocusInputForCorrection(e),r=!0);else return this.stateManager.clearCurrentInputName(),await this.updateCloudBackupTaskState(e,`uncancel`),await this.restoreLayout(e),n}catch(t){d.warn(`Validation flow: Failed to validate field`,{fieldName:e,error:t}),await this.restoreLayout(e)}finally{r||this.stateManager.clearCurrentInputName()}return n}async onTextInputKeydown(e){let{target:t,key:n,originalEvent:r}=e.detail;if(n===`Enter`||n===`Escape`){if(r.preventDefault(),r.stopPropagation(),t.value.trim()===``){t.blur();return}await this.runBlurValidation(t.name)&&t.blur();return}}async onKeyboardVisibilityChanged(e){let t=this.stateManager.getCurrentInputName();t&&(e.detail.isKeyboardVisible?this._view.scrollInputIntoView(t,e):!e.detail.isKeyboardVisible&&this._view.isInputActiveElement(t)&&this._view.blurActiveElement())}async onClearAllButtonClicked(e){this.stateManager.clearScanResults(),this.syncInputWithState(),await this.validationFlowHandler.clearAllFields(),await this.cancelAllCloudBackupTasks(),await this.validationFlowHandler.pauseScan(),await this.goToCompleteScan()}async onSubmitButtonClicked(){let e=await this.validationFlowHandler.onFinishFlowRequested();if(e.type===`result`){var n;let r=e.result.map(e=>t.fromJSONObject(e));(n=this.externalListener)==null||n.onValidationFlowLabelCaptured(r.map(e=>e.getLabelField()))}}async onPauseButtonClicked(e){await this.validationFlowHandler.pauseScan(),this.stateManager.markPausedFromScanningState(),this._view.showValidationButtons()}async onClickedOutsideList(e){if(!this.stateManager.isScanning&&!(this.view.isFocusedElementAnTextInput()||this.stateManager.hasCurrentInputName)&&this.stateManager.isPaused){await this.resumePreviousScanMode();return}}onValidationFlowLayoutChange(e){if(!this.dataCaptureView)return;let{left:t,top:n,right:r,bottom:i}=this._latestViewScanAreaMargins;if(this._isAdjustingScanArea=!0,e.detail.isPanelOnRightSide){let a=e.detail.formWidth+e.detail.safeAreaInsetRight,o=r.value>=a?r:new m(a,p.Pixel),s=e.detail.buttonsHeight+e.detail.safeAreaInsetBottom,c=i.value>=s?i:new m(s,p.Pixel);this.dataCaptureView.scanAreaMargins=new f(t,n,o,c)}else{let a=e.detail.formHeight+e.detail.safeAreaInsetBottom,o=i.value>=a?i:new m(a,p.Pixel);this.dataCaptureView.scanAreaMargins=new f(t,n,r,o)}}willChangeScanAreaMargins(e,t,n){this._isAdjustingScanArea||(this._latestViewScanAreaMargins=n)}didChangeScanAreaMargins(e,t){this._isAdjustingScanArea=!1}async cancelAllCloudBackupTasks(){let e=[],t=await this.validationFlowHandler.validationFlowFields();for(let n of t)e.push(this.updateCloudBackupTaskState(i(n.getLabelField()),`cancel`));await Promise.all(e)}async onPauseStateChanged(){this._view.showValidationButtons(),await Promise.all([this.syncInputWithState(),this._view.showBackdrop(),this.standByCamera()])}async onScanStateChanged(){this._view.showScanningButtons(),await Promise.all([this.syncInputWithState(),this._view.hideBackdrop(),this.activateCamera()])}async mount(e){this.dataCaptureView=e,e.setProperty(`forceScanAreaMarginsToPixels`,!0),this.validationFlowHandler.addListener(this),await this._view.mount(e),this._view.updateButtonText({finishButtonText:this.settings.finishButtonText,restartButtonText:this.settings.restartButtonText,pauseButtonText:this.settings.pauseButtonText}),this.registerEventListeners(),await new Promise(e=>v(()=>e())),e.addListener(this),e.scanAreaMargins=e.scanAreaMargins}async unmount(e){this.stateManager.clearCurrentInputName(),this.stateManager.isCloudBackupProcessing&&this.stateManager.stopCloudBackup(),e.removeListener(this),e.setProperty(`forceScanAreaMarginsToPixels`,!1),e.scanAreaMargins=this._latestViewScanAreaMargins,this.unregisterEventListeners(),await this._view.unmount(e),this.dataCaptureView=null}registerEventListeners(){this._view.addEventListener(o.Scan,this.onTextInputScanIconClickHandler),this._view.addEventListener(o.Clear,this.onTextInputClearIconClickHandler),this._view.addEventListener(o.Focus,this.onTextInputFocusHandler),this._view.addEventListener(o.Blur,this.onTextInputBlurHandler),this._view.addEventListener(o.Keydown,this.onTextInputKeydownHandler),this._view.addEventListener(s.ClearAllButtonClicked,this.onClearAllButtonClickedHandler),this._view.addSubmitButtonListener(this.onSubmitButtonClickedHandler),this._view.addEventListener(s.PauseButtonClicked,this.onPauseButtonClickedHandler),this._view.addEventListener(s.ClickedOutsideList,this.onClickedOutsideListHandler),this._view.addEventListener(s.ValidationFlowLayoutChange,this.onValidationFlowLayoutChangeHandler),this.keyboardController.connect(),this.keyboardController.addEventListener(`keyboard-visibility-changed`,this.onKeyboardVisibilityChangedHandler)}unregisterEventListeners(){this.keyboardController.removeEventListener(`keyboard-visibility-changed`,this.onKeyboardVisibilityChangedHandler),this.keyboardController.disconnect(),this._view.removeEventListener(o.Scan,this.onTextInputScanIconClickHandler),this._view.removeEventListener(o.Clear,this.onTextInputClearIconClickHandler),this._view.removeEventListener(o.Focus,this.onTextInputFocusHandler),this._view.removeEventListener(o.Blur,this.onTextInputBlurHandler),this._view.removeEventListener(o.Keydown,this.onTextInputKeydownHandler),this._view.removeEventListener(s.ClearAllButtonClicked,this.onClearAllButtonClickedHandler),this._view.removeSubmitButtonListener(this.onSubmitButtonClickedHandler),this._view.removeEventListener(s.PauseButtonClicked,this.onPauseButtonClickedHandler),this._view.removeEventListener(s.ClickedOutsideList,this.onClickedOutsideListHandler),this._view.removeEventListener(s.ValidationFlowLayoutChange,this.onValidationFlowLayoutChangeHandler),this.validationFlowHandler.removeListener(this)}};export{C as ValidationFlowPresenter,y as convertToPx,b as toPixelMargins};
@@ -1,7 +1,10 @@
1
- import { J as ValidationFlowState } from "../../../sdcLabelInternalModuleCapture-B6-1Wjzn.js";
2
- import { t as ValidationFlowField } from "../../../ValidationFlowField-DL7FdqPM.js";
3
-
1
+ import { K as ValidationFlowState } from "../../../sdcLabelInternalModuleCapture-LDFRDPMF.js";
2
+ import { t as LabelField } from "../../../LabelField-b2ukZfup.js";
3
+ import { t as ValidationFlowField } from "../../../ValidationFlowField-B8BG6AoW.js";
4
+ import { t as FieldId } from "../../../FieldId-BMwA9rgx.js";
4
5
  //#region src/main/api/LabelCaptureValidationFlow/private/ValidationFlowStateManager.d.ts
6
+ declare function makeFieldKey(fieldName: string, instanceIndex: number | null): string;
7
+ declare function fieldKeyFromLabelField(field: LabelField): string;
5
8
  /**
6
9
  * Cloud backup processing states (orthogonal to scanning)
7
10
  */
@@ -43,14 +46,14 @@ declare class ValidationFlowStateManager {
43
46
  private cloudBackupFields;
44
47
  /** Per-field input states */
45
48
  private fieldStates;
49
+ private fieldInstances;
46
50
  /** Scan results from the last onFieldsScanned event, keyed by field name. CLEARED_SCAN_RESULT indicates a cleared/deleted result. */
47
51
  private scanResultMap;
48
52
  /** Whether the current paused state was entered because scanning timed out. */
49
53
  private hasTimeout_;
50
54
  /** Whether the current paused state was entered by clicking the pause button from a scanning state. */
51
55
  private pausedFromScanningState_;
52
- /** Field names targeted by the most recent partial (target) scan; empty when no partial scan is active. */
53
- private partialScanFieldNames;
56
+ private partialScanTargets;
54
57
  constructor();
55
58
  /**
56
59
  * Current validation flow state from the native handler
@@ -117,18 +120,9 @@ declare class ValidationFlowStateManager {
117
120
  * Mark the current pause as initiated from the scanning state via the pause button.
118
121
  */
119
122
  markPausedFromScanningState(): void;
120
- /**
121
- * Get the field names of the most recent partial (target) scan; empty if none is active.
122
- */
123
- getPartialScanFieldNames(): string[];
124
- /**
125
- * Record the field names for a partial (target) scan so we can restart it after a timeout.
126
- */
127
- setPartialScanFieldNames(fieldNames: string[]): void;
128
- /**
129
- * Clear the recorded partial scan field names (when leaving target mode).
130
- */
131
- clearPartialScanFieldNames(): void;
123
+ getPartialScanTargets(): FieldId[];
124
+ setPartialScanTargets(targets: FieldId[]): void;
125
+ clearPartialScanTargets(): void;
132
126
  /**
133
127
  * Set the focused input by name
134
128
  */
@@ -158,9 +152,6 @@ declare class ValidationFlowStateManager {
158
152
  * Stop cloud backup processing (all fields)
159
153
  */
160
154
  stopCloudBackup(): void;
161
- /**
162
- * Cancel cloud backup for a specific field
163
- */
164
155
  cancelCloudBackupForField(fieldName: string): void;
165
156
  /**
166
157
  * Resume cloud backup for a specific field (uncancel)
@@ -186,6 +177,8 @@ declare class ValidationFlowStateManager {
186
177
  * Register all fields at initialization. Does not override existing state.
187
178
  */
188
179
  registerFields(fieldNames: string[]): void;
180
+ registerFieldInstances(fieldIds: FieldId[]): void;
181
+ getFieldInstance(key: string): FieldId | undefined;
189
182
  /**
190
183
  * Remove all field state (call on re-initialization).
191
184
  */
@@ -205,8 +198,6 @@ declare class ValidationFlowStateManager {
205
198
  isCurrentInputName(fieldName: string): boolean;
206
199
  /**
207
200
  * Store the latest batch of scan results from onFieldsScanned.
208
- * All backend results are stored; value-based filtering happens at read time in the presenter.
209
- * Replaces any previously stored results.
210
201
  */
211
202
  setScanResults(validationFlowFields: ValidationFlowField[]): void;
212
203
  updateScanResults(validationFlowFields: ValidationFlowField[]): void;
@@ -222,4 +213,4 @@ declare class ValidationFlowStateManager {
222
213
  clearScanResults(): void;
223
214
  }
224
215
  //#endregion
225
- export { CloudBackupState, InputState, ValidationFlowStateManager };
216
+ export { CloudBackupState, InputState, ValidationFlowStateManager, fieldKeyFromLabelField, makeFieldKey };
@@ -1 +1 @@
1
- import"../../../djinni-types/sdcLabelInternalModuleCapture.js";import{AsyncStateMachine as e}from"@scandit/web-datacapture-core/build/js/private/utils/AsyncStateMachine.js";let t=function(e){return e.IDLE=`idle`,e.PROCESSING=`processing`,e}({}),n=function(e){return e.Initial=`initial`,e.Scanning=`scanning`,e.CloudBackup=`cloudBackup`,e.Validated=`validated`,e.Error=`error`,e}({});var r=class{constructor(){this.validationFlowState=0,this.currentInputName=null,this.cloudBackupFields=new Set,this.fieldStates=new Map,this.scanResultMap=new Map,this.hasTimeout_=!1,this.pausedFromScanningState_=!1,this.partialScanFieldNames=[],this.cloudBackupStateMachine=new e(`idle`,[{from:`idle`,to:`processing`},{from:`processing`,to:`idle`}])}get validationFlowHandlerState(){return this.validationFlowState}set validationFlowHandlerState(e){let t=this.validationFlowState===3;this.validationFlowState=e,t&&e!==3&&(this.hasTimeout_=!1,this.pausedFromScanningState_=!1),(e===2||e===0||e===4)&&(this.partialScanFieldNames=[])}get isScanning(){return this.validationFlowState===2||this.validationFlowState===1}get isScanningOrCloudBackup(){return this.isCloudBackupProcessing||this.isScanning}get isPaused(){return this.validationFlowState===3}get isFinished(){return this.validationFlowState===4}get isIdle(){return this.validationFlowState===0}get cloudBackupState(){return this.cloudBackupStateMachine.currentState}get isCloudBackupProcessing(){return this.cloudBackupStateMachine.currentState===`processing`}get hasCurrentInputName(){return this.currentInputName!==null}getCurrentInputName(){return this.currentInputName}get hasTimeout(){return this.hasTimeout_}markTimeout(){this.hasTimeout_=!0}get isPausedFromScanningState(){return this.pausedFromScanningState_}markPausedFromScanningState(){this.pausedFromScanningState_=!0}getPartialScanFieldNames(){return[...this.partialScanFieldNames]}setPartialScanFieldNames(e){this.partialScanFieldNames=[...e]}clearPartialScanFieldNames(){this.partialScanFieldNames=[]}setCurrentInputName(e){this.currentInputName=e}clearCurrentInputName(){this.currentInputName=null}startCloudBackup(e){this.cloudBackupFields=new Set(e),this.cloudBackupStateMachine.currentState===`idle`&&this.cloudBackupStateMachine.transitionTo(`processing`)}startCloudBackupService(){this.cloudBackupStateMachine.currentState===`idle`&&this.cloudBackupStateMachine.transitionTo(`processing`)}updateCloudBackupFields(e){this.cloudBackupFields=new Set(e.filter(e=>e.isProcessingInCloud()).map(e=>e.getLabelField().name))}stopCloudBackup(){this.cloudBackupFields.clear(),this.cloudBackupStateMachine.transitionTo(`idle`)}cancelCloudBackupForField(e){this.cloudBackupFields.delete(e),this.cloudBackupFields.size===0&&this.cloudBackupStateMachine.currentState===`processing`&&this.cloudBackupStateMachine.transitionTo(`idle`)}uncancelCloudBackupForField(e){this.cloudBackupFields.add(e),this.cloudBackupStateMachine.currentState===`idle`&&this.cloudBackupStateMachine.transitionTo(`processing`)}isFieldInCloudBackup(e){return this.cloudBackupFields.has(e)}getCloudBackupFields(){return Array.from(this.cloudBackupFields)}onCloudBackupStateChange(e){this.cloudBackupStateMachine.addListener(e)}offCloudBackupStateChange(e){this.cloudBackupStateMachine.removeListener(e)}registerFields(e){for(let t of e)this.fieldStates.has(t)||this.fieldStates.set(t,`initial`)}clearFields(){this.fieldStates.clear()}setInputState(e,t){let n=this.currentInputName===e&&(t===`scanning`||t===`cloudBackup`)?`initial`:t;this.fieldStates.set(e,n)}getInputState(e){return this.fieldStates.get(e)??`initial`}isCurrentInputName(e){return this.currentInputName===e}setScanResults(e){this.scanResultMap.clear();for(let t of e)this.scanResultMap.set(t.getLabelField().name,t)}updateScanResults(e){for(let t of e)this.scanResultMap.set(t.getLabelField().name,t)}deleteScanResult(e){this.scanResultMap.delete(e)}getScanResult(e){return this.scanResultMap.get(e)}clearScanResults(){this.scanResultMap.clear()}};export{t as CloudBackupState,n as InputState,r as ValidationFlowStateManager};
1
+ import{FieldId as e}from"./FieldId.js";import{AsyncStateMachine as t}from"@scandit/web-datacapture-core/build/js/private/utils/AsyncStateMachine.js";function n(t,n){return new e(t,n).toKey()}function r(t){return e.fromLabelField(t).toKey()}let i=function(e){return e.IDLE=`idle`,e.PROCESSING=`processing`,e}({}),a=function(e){return e.Initial=`initial`,e.Scanning=`scanning`,e.CloudBackup=`cloudBackup`,e.Validated=`validated`,e.Error=`error`,e}({});var o=class{constructor(){this.validationFlowState=0,this.currentInputName=null,this.cloudBackupFields=new Set,this.fieldStates=new Map,this.fieldInstances=new Map,this.scanResultMap=new Map,this.hasTimeout_=!1,this.pausedFromScanningState_=!1,this.partialScanTargets=[],this.cloudBackupStateMachine=new t(`idle`,[{from:`idle`,to:`processing`},{from:`processing`,to:`idle`}])}get validationFlowHandlerState(){return this.validationFlowState}set validationFlowHandlerState(e){let t=this.validationFlowState===3;this.validationFlowState=e,t&&e!==3&&(this.hasTimeout_=!1,this.pausedFromScanningState_=!1),(e===2||e===0||e===4)&&(this.partialScanTargets=[])}get isScanning(){return this.validationFlowState===2||this.validationFlowState===1}get isScanningOrCloudBackup(){return this.isCloudBackupProcessing||this.isScanning}get isPaused(){return this.validationFlowState===3}get isFinished(){return this.validationFlowState===4}get isIdle(){return this.validationFlowState===0}get cloudBackupState(){return this.cloudBackupStateMachine.currentState}get isCloudBackupProcessing(){return this.cloudBackupStateMachine.currentState===`processing`}get hasCurrentInputName(){return this.currentInputName!==null}getCurrentInputName(){return this.currentInputName}get hasTimeout(){return this.hasTimeout_}markTimeout(){this.hasTimeout_=!0}get isPausedFromScanningState(){return this.pausedFromScanningState_}markPausedFromScanningState(){this.pausedFromScanningState_=!0}getPartialScanTargets(){return this.partialScanTargets.slice()}setPartialScanTargets(e){this.partialScanTargets=e.slice()}clearPartialScanTargets(){this.partialScanTargets=[]}setCurrentInputName(e){this.currentInputName=e}clearCurrentInputName(){this.currentInputName=null}startCloudBackup(e){this.cloudBackupFields=new Set(e),this.cloudBackupStateMachine.currentState===`idle`&&this.cloudBackupStateMachine.transitionTo(`processing`)}startCloudBackupService(){this.cloudBackupStateMachine.currentState===`idle`&&this.cloudBackupStateMachine.transitionTo(`processing`)}updateCloudBackupFields(e){this.cloudBackupFields=new Set(e.filter(e=>e.isProcessingInCloud()).map(e=>r(e.getLabelField())))}stopCloudBackup(){this.cloudBackupFields.clear(),this.cloudBackupStateMachine.transitionTo(`idle`)}cancelCloudBackupForField(e){this.cloudBackupFields.delete(e),this.cloudBackupFields.size===0&&this.cloudBackupStateMachine.currentState===`processing`&&this.cloudBackupStateMachine.transitionTo(`idle`)}uncancelCloudBackupForField(e){this.cloudBackupFields.add(e),this.cloudBackupStateMachine.currentState===`idle`&&this.cloudBackupStateMachine.transitionTo(`processing`)}isFieldInCloudBackup(e){return this.cloudBackupFields.has(e)}getCloudBackupFields(){return Array.from(this.cloudBackupFields)}onCloudBackupStateChange(e){this.cloudBackupStateMachine.addListener(e)}offCloudBackupStateChange(e){this.cloudBackupStateMachine.removeListener(e)}registerFields(e){for(let t of e)this.fieldStates.has(t)||this.fieldStates.set(t,`initial`)}registerFieldInstances(e){this.fieldInstances.clear();for(let t of e)this.fieldInstances.set(t.toKey(),t)}getFieldInstance(e){return this.fieldInstances.get(e)}clearFields(){this.fieldStates.clear(),this.fieldInstances.clear(),this.scanResultMap.clear(),this.cloudBackupFields.clear(),this.partialScanTargets=[]}setInputState(e,t){let n=this.currentInputName===e&&(t===`scanning`||t===`cloudBackup`)?`initial`:t;this.fieldStates.set(e,n)}getInputState(e){return this.fieldStates.get(e)??`initial`}isCurrentInputName(e){return this.currentInputName===e}setScanResults(e){this.scanResultMap.clear();for(let t of e)this.scanResultMap.set(r(t.getLabelField()),t)}updateScanResults(e){for(let t of e)this.scanResultMap.set(r(t.getLabelField()),t)}deleteScanResult(e){this.scanResultMap.delete(e)}getScanResult(e){return this.scanResultMap.get(e)}clearScanResults(){this.scanResultMap.clear()}};export{i as CloudBackupState,a as InputState,o as ValidationFlowStateManager,r as fieldKeyFromLabelField,n as makeFieldKey};
@@ -1,15 +1,15 @@
1
+ import { t as FieldId } from "../../../FieldId-BMwA9rgx.js";
1
2
  import { InputState } from "./ValidationFlowStateManager.js";
2
3
  import { TextInput, TextInputEvents, TextInputType } from "../../../ui/atoms/TextInput.js";
3
4
  import { LabelCaptureValidationFlowLayoutEventMap, LabelCaptureValidationFlowLayoutEvents } from "../../../ui/organisms/LabelCaptureValidationFlowLayout.js";
4
5
  import { KeyboardVisibilityChangedEvent } from "../../../ui/controllers/KeyboardVisibilityController.js";
5
6
  import { Color, DataCaptureView } from "@scandit/web-datacapture-core";
6
-
7
7
  //#region src/main/api/LabelCaptureValidationFlow/private/ValidationFlowView.d.ts
8
8
  /**
9
9
  * Configuration for creating an input field
10
10
  */
11
11
  interface InputFieldConfig {
12
- name: string;
12
+ fieldId: FieldId;
13
13
  type: TextInputType;
14
14
  label: string;
15
15
  value: string;
@@ -1 +1 @@
1
- import"./ValidationFlowStateManager.js";import{TextInput as e}from"../../../ui/atoms/TextInput.js";import{LabelCaptureValidationFlowLayout as t}from"../../../ui/organisms/LabelCaptureValidationFlowLayout.js";import{AdditionalLayerPosition as n,BrowserHelper as r,INTERNAL_ACCESS as i,Orientation as a}from"@scandit/web-datacapture-core";var o=class o{static ensureCustomElementsRegistered(){t.register(),e.register()}constructor(){this.layout=null,this.scrollIntoView=null,o.ensureCustomElementsRegistered()}getInputs(){var e;return((e=this.layout)==null?void 0:e.getInputs())??[]}getInputByName(e){var t;return((t=this.layout)==null?void 0:t.getInputByName(e))??null}hasInput(e){return this.getInputByName(e)!==null}isInputFocused(t){var n;let r=this.getInputByName(t);return r?r.hasAttribute(`focused`)||((n=document.activeElement)==null?void 0:n.closest(e.tag))===r:!1}isFocusedElementAnTextInput(){var t,n;let r=((t=this.layout)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)??document.activeElement;return(r==null||(n=r.closest(e.tag))==null?void 0:n.tagName.toLowerCase())===e.tag}showScanningButtons(){var e;(e=this.layout)==null||e.showScanningButtons()}showValidationButtons(){var e;(e=this.layout)==null||e.showValidationButtons()}hideAllButtons(){var e;(e=this.layout)==null||e.hideAllButtons()}setSubmitButtonDisabled(e){var t;(t=this.layout)!=null&&t.submitButton&&(this.layout.submitButton.disabled=e)}updateInputVisualState(e,t){let n=this.getInputByName(e);n&&(t.value!==void 0&&(n.value=t.value),t.loading!==void 0&&(n.loading=t.loading),t.loadingText!==void 0&&(n.loadingText=t.loadingText),t.invalid!==void 0&&(t.invalid&&t.hintMessage?n.setValidationState(!1,t.hintMessage):t.invalid||n.resetValidation()),t.backgroundColor!==void 0&&(n.backgroundColor=t.backgroundColor))}resetInputValidation(e){let t=this.getInputByName(e);t&&t.resetValidation()}updateScanIconVisibility(e,t){let n=this.getInputByName(e);n&&(n.hideScanIcon=!t)}updateAllScanIconVisibility(e){let t=this.getInputs();for(let n of t)n.hideScanIcon=!e}updateInputForState(e,t,n,r){switch(t){case`initial`:this.updateInputVisualState(e,{value:n,loading:!1,loadingText:``,invalid:!1,backgroundColor:``});break;case`scanning`:this.updateInputVisualState(e,{value:n,loading:!0,loadingText:r.scanningText||`Scanning`,invalid:!1,backgroundColor:``});break;case`cloudBackup`:this.updateInputVisualState(e,{value:n,loading:!0,loadingText:r.adaptiveScanningText||`Processing, tap to type manually`,invalid:!1,backgroundColor:``});break;case`validated`:this.updateInputVisualState(e,{value:n,loading:!1,invalid:!1,backgroundColor:r.backgroundColor||``});break;case`error`:this.updateInputVisualState(e,{value:n,loading:!1,invalid:!0,hintMessage:r.hintMessage||``,backgroundColor:``});break}r.scanIconVisible!==void 0&&this.updateScanIconVisibility(e,r.scanIconVisible)}showAdaptiveRecognitionOverlay(){var e;(e=this.layout)==null||e.showAdaptiveRecognitionOverlay()}hideAdaptiveRecognitionOverlay(){var e;(e=this.layout)==null||e.hideAdaptiveRecognitionOverlay()}async showBackdrop(){var e;await((e=this.layout)==null||(e=e.backdrop)==null?void 0:e.show())}async hideBackdrop(){var e;await((e=this.layout)==null||(e=e.backdrop)==null?void 0:e.hide())}async moveInputToTop(e){var t;let n=this.getInputByName(e);n&&await((t=this.layout)==null?void 0:t.moveInputToTop(n))}async restoreInputsPositions(){var e;await((e=this.layout)==null?void 0:e.restoreInputsPositions())}updateButtonText(e){this.layout&&(e.finishButtonText!==void 0&&(this.layout.finishButtonText=e.finishButtonText),e.restartButtonText!==void 0&&(this.layout.restartButtonText=e.restartButtonText),e.pauseButtonText!==void 0&&(this.layout.pauseButtonText=e.pauseButtonText))}setInputPlaceholder(e,t){let n=this.getInputByName(e);n&&(n.placeholder=t)}clearInputPlaceholder(e){let t=this.getInputByName(e);t&&(t.placeholder=``)}setInputValue(e,t){let n=this.getInputByName(e);n&&(n.value=t)}getInputValue(e){let t=this.getInputByName(e);return(t==null?void 0:t.value)??``}setInputBackgroundColor(e,t){let n=this.getInputByName(e);n&&(n.backgroundColor=t)}initializeInputs(t){var n;this.clearInputs();let r=[];for(let n of t){let t=e.create();t.type=n.type,t.label=n.label,t.value=n.value,t.required=n.required,t.name=n.name,t.loadingText=n.loadingText,r.push(t)}(n=this.layout)==null||n.appendInputs(...r)}appendInputs(...e){var t;(t=this.layout)==null||t.appendInputs(...e)}clearInputs(){for(let e of this.getInputs())e.remove()}focusInput(e){let t=this.getInputByName(e);t==null||t.focus()}blurInput(e){let t=this.getInputByName(e);t==null||t.blur()}scrollInputIntoView(e,t){let n=this.getInputByName(e);if(n){if(r.isIOS()){var i;t.detail.orientation===a.LandscapeLeft||t.detail.orientation===a.LandscapeRight?n.style.scrollMarginBottom=`-20px`:n.style.removeProperty(`scroll-margin-bottom`),(i=this.scrollIntoView)==null||i.call(this,n,{behavior:`smooth`,block:`end`,inline:`nearest`});return}n.scrollIntoView({behavior:`smooth`,block:`end`,inline:`nearest`})}}isInputActiveElement(e){return this.getInputByName(e)===document.activeElement}blurActiveElement(){var e;(e=document.activeElement)==null||e.blur()}addEventListener(e,t){var n;(n=this.layout)==null||n.addEventListener(e,t)}removeEventListener(e,t){var n;(n=this.layout)==null||n.removeEventListener(e,t)}addSubmitButtonListener(e){var t;(t=this.layout)==null||(t=t.submitButton)==null||t.addEventListener(`click`,e)}removeSubmitButtonListener(e){var t;(t=this.layout)==null||(t=t.submitButton)==null||t.removeEventListener(`click`,e)}async mount(e){this.layout||(this.layout=t.create(),e[i].attachAdditionalLayer(this.layout,n.OverlayContainer),r.isIOS()&&(this.scrollIntoView=(await import(`../../../private/scrollIntoView/index.js`)).default))}async unmount(e){var t;(t=this.layout)==null||t.remove(),this.layout=null,this.scrollIntoView=null}};export{o as ValidationFlowView};
1
+ import"./ValidationFlowStateManager.js";import{TextInput as e}from"../../../ui/atoms/TextInput.js";import{LabelCaptureValidationFlowLayout as t}from"../../../ui/organisms/LabelCaptureValidationFlowLayout.js";import{AdditionalLayerPosition as n,BrowserHelper as r,INTERNAL_ACCESS as i,Orientation as a}from"@scandit/web-datacapture-core";var o=class o{static ensureCustomElementsRegistered(){t.register(),e.register()}constructor(){this.layout=null,this.scrollIntoView=null,o.ensureCustomElementsRegistered()}getInputs(){var e;return((e=this.layout)==null?void 0:e.getInputs())??[]}getInputByName(e){var t;return((t=this.layout)==null?void 0:t.getInputByName(e))??null}hasInput(e){return this.getInputByName(e)!==null}isInputFocused(t){var n;let r=this.getInputByName(t);return r?r.hasAttribute(`focused`)||((n=document.activeElement)==null?void 0:n.closest(e.tag))===r:!1}isFocusedElementAnTextInput(){var t,n;let r=((t=this.layout)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)??document.activeElement;return(r==null||(n=r.closest(e.tag))==null?void 0:n.tagName.toLowerCase())===e.tag}showScanningButtons(){var e;(e=this.layout)==null||e.showScanningButtons()}showValidationButtons(){var e;(e=this.layout)==null||e.showValidationButtons()}hideAllButtons(){var e;(e=this.layout)==null||e.hideAllButtons()}setSubmitButtonDisabled(e){var t;(t=this.layout)!=null&&t.submitButton&&(this.layout.submitButton.disabled=e)}updateInputVisualState(e,t){let n=this.getInputByName(e);n&&(t.value!==void 0&&(n.value=t.value),t.loading!==void 0&&(n.loading=t.loading),t.loadingText!==void 0&&(n.loadingText=t.loadingText),t.invalid!==void 0&&(t.invalid&&t.hintMessage?n.setValidationState(!1,t.hintMessage):t.invalid||n.resetValidation()),t.backgroundColor!==void 0&&(n.backgroundColor=t.backgroundColor))}resetInputValidation(e){let t=this.getInputByName(e);t&&t.resetValidation()}updateScanIconVisibility(e,t){let n=this.getInputByName(e);n&&(n.hideScanIcon=!t)}updateAllScanIconVisibility(e){let t=this.getInputs();for(let n of t)n.hideScanIcon=!e}updateInputForState(e,t,n,r){switch(t){case`initial`:this.updateInputVisualState(e,{value:n,loading:!1,loadingText:``,invalid:!1,backgroundColor:``});break;case`scanning`:this.updateInputVisualState(e,{value:n,loading:!0,loadingText:r.scanningText||`Scanning`,invalid:!1,backgroundColor:``});break;case`cloudBackup`:this.updateInputVisualState(e,{value:n,loading:!0,loadingText:r.adaptiveScanningText||`Processing, tap to type manually`,invalid:!1,backgroundColor:``});break;case`validated`:this.updateInputVisualState(e,{value:n,loading:!1,invalid:!1,backgroundColor:r.backgroundColor||``});break;case`error`:this.updateInputVisualState(e,{value:n,loading:!1,invalid:!0,hintMessage:r.hintMessage||``,backgroundColor:``});break}r.scanIconVisible!==void 0&&this.updateScanIconVisibility(e,r.scanIconVisible)}showAdaptiveRecognitionOverlay(){var e;(e=this.layout)==null||e.showAdaptiveRecognitionOverlay()}hideAdaptiveRecognitionOverlay(){var e;(e=this.layout)==null||e.hideAdaptiveRecognitionOverlay()}async showBackdrop(){var e;await((e=this.layout)==null||(e=e.backdrop)==null?void 0:e.show())}async hideBackdrop(){var e;await((e=this.layout)==null||(e=e.backdrop)==null?void 0:e.hide())}async moveInputToTop(e){var t;let n=this.getInputByName(e);n&&await((t=this.layout)==null?void 0:t.moveInputToTop(n))}async restoreInputsPositions(){var e;await((e=this.layout)==null?void 0:e.restoreInputsPositions())}updateButtonText(e){this.layout&&(e.finishButtonText!==void 0&&(this.layout.finishButtonText=e.finishButtonText),e.restartButtonText!==void 0&&(this.layout.restartButtonText=e.restartButtonText),e.pauseButtonText!==void 0&&(this.layout.pauseButtonText=e.pauseButtonText))}setInputPlaceholder(e,t){let n=this.getInputByName(e);n&&(n.placeholder=t)}clearInputPlaceholder(e){let t=this.getInputByName(e);t&&(t.placeholder=``)}setInputValue(e,t){let n=this.getInputByName(e);n&&(n.value=t)}getInputValue(e){let t=this.getInputByName(e);return(t==null?void 0:t.value)??``}setInputBackgroundColor(e,t){let n=this.getInputByName(e);n&&(n.backgroundColor=t)}initializeInputs(t){var n;this.clearInputs();let r=[];for(let n of t){let t=e.create();t.type=n.type,t.label=n.label,t.value=n.value,t.required=n.required,t.name=n.fieldId.toKey(),t.loadingText=n.loadingText,r.push(t)}(n=this.layout)==null||n.appendInputs(...r)}appendInputs(...e){var t;(t=this.layout)==null||t.appendInputs(...e)}clearInputs(){for(let e of this.getInputs())e.remove()}focusInput(e){let t=this.getInputByName(e);t==null||t.focus()}blurInput(e){let t=this.getInputByName(e);t==null||t.blur()}scrollInputIntoView(e,t){let n=this.getInputByName(e);if(n){if(r.isIOS()){var i;t.detail.orientation===a.LandscapeLeft||t.detail.orientation===a.LandscapeRight?n.style.scrollMarginBottom=`-20px`:n.style.removeProperty(`scroll-margin-bottom`),(i=this.scrollIntoView)==null||i.call(this,n,{behavior:`smooth`,block:`end`,inline:`nearest`});return}n.scrollIntoView({behavior:`smooth`,block:`end`,inline:`nearest`})}}isInputActiveElement(e){return this.getInputByName(e)===document.activeElement}blurActiveElement(){var e;(e=document.activeElement)==null||e.blur()}addEventListener(e,t){var n;(n=this.layout)==null||n.addEventListener(e,t)}removeEventListener(e,t){var n;(n=this.layout)==null||n.removeEventListener(e,t)}addSubmitButtonListener(e){var t;(t=this.layout)==null||(t=t.submitButton)==null||t.addEventListener(`click`,e)}removeSubmitButtonListener(e){var t;(t=this.layout)==null||(t=t.submitButton)==null||t.removeEventListener(`click`,e)}async mount(e){this.layout||(this.layout=t.create(),e[i].attachAdditionalLayer(this.layout,n.OverlayContainer),r.isIOS()&&(this.scrollIntoView=(await import(`../../../private/scrollIntoView/index.js`)).default))}async unmount(e){var t;(t=this.layout)==null||t.remove(),this.layout=null,this.scrollIntoView=null}};export{o as ValidationFlowView};
@@ -1,6 +1,5 @@
1
1
  import { Feedback, FeedbackJSON } from "@scandit/web-datacapture-core";
2
2
  import { Serializable } from "@scandit/web-datacapture-core/build/js/private/Serializable";
3
-
4
3
  //#region src/main/api/LabelCaptureValidationFlowFeedback.d.ts
5
4
  interface LabelCaptureValidationFlowFeedbackJSON {
6
5
  scan: FeedbackJSON;
@@ -1,5 +1,4 @@
1
1
  import { nativeHandle } from "@scandit/web-datacapture-core/build/js/private/nativeHandle.js";
2
-
3
2
  //#region src/main/api/LabelCaptureValidationFlowSettings.d.ts
4
3
  declare class LabelCaptureValidationFlowSettings {
5
4
  private [nativeHandle];
@@ -1 +1 @@
1
- import{nativeCall as e}from"../worker/nativeCall.js";import{nativeHandle as t}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var n=class n{async setMissingFieldsHintText(n){await e(`ValidationFlowSettings.setMissingFieldsHintText`,this[t],n),this.missingFieldsHintText=n}async getMissingFieldsHintText(){let n=await e(`ValidationFlowSettings.getMissingFieldsHintText`,this[t]);return this.missingFieldsHintText=n,n}async setStandbyHintText(n){await e(`ValidationFlowSettings.setStandbyHintText`,this[t],n),this.standbyHintText=n}async getStandbyHintText(){let n=await e(`ValidationFlowSettings.getStandbyHintText`,this[t]);return this.standbyHintText=n,n}async setValidationHintText(n){await e(`ValidationFlowSettings.setValidationHintText`,this[t],n),this.validationHintText=n}async getValidationHintText(){let n=await e(`ValidationFlowSettings.getValidationHintText`,this[t]);return this.validationHintText=n,n}async setValidationErrorText(n){await e(`ValidationFlowSettings.setValidationErrorText`,this[t],n),this.validationErrorText=n}async getValidationErrorText(){let n=await e(`ValidationFlowSettings.getValidationErrorText`,this[t]);return this.validationErrorText=n,n}async setRequiredFieldErrorText(n){await e(`ValidationFlowSettings.setRequiredFieldErrorText`,this[t],n),this.requiredFieldErrorText=n}async getRequiredFieldErrorText(){let n=await e(`ValidationFlowSettings.getRequiredFieldErrorText`,this[t]);return this.requiredFieldErrorText=n,n}async setManualInputButtonText(n){await e(`ValidationFlowSettings.setManualInputButtonText`,this[t],n),this.manualInputButtonText=n}async getManualInputButtonText(){let n=await e(`ValidationFlowSettings.getManualInputButtonText`,this[t]);return this.manualInputButtonText=n,n}async setFinishButtonText(n){await e(`ValidationFlowSettings.setValidationFinishButtonText`,this[t],n),this.finishButtonText=n}async getFinishButtonText(){let n=await e(`ValidationFlowSettings.getValidationFinishButtonText`,this[t]);return this.finishButtonText=n,n}async setRestartButtonText(n){await e(`ValidationFlowSettings.setValidationRestartButtonText`,this[t],n),this.restartButtonText=n}async getRestartButtonText(){let n=await e(`ValidationFlowSettings.getValidationRestartButtonText`,this[t]);return this.restartButtonText=n,n}async setPauseButtonText(n){await e(`ValidationFlowSettings.setValidationPauseButtonText`,this[t],n),this.pauseButtonText=n}async getPauseButtonText(){let n=await e(`ValidationFlowSettings.getValidationPauseButtonText`,this[t]);return this.pauseButtonText=n,n}async setAdaptiveScanningText(n){await e(`ValidationFlowSettings.setValidationAdaptiveScanningText`,this[t],n),this.adaptiveScanningText=n}async getAdaptiveScanningText(){let n=await e(`ValidationFlowSettings.getValidationAdaptiveScanningText`,this[t]);return this.adaptiveScanningText=n,n}async setScanningText(n){await e(`ValidationFlowSettings.setValidationScanningText`,this[t],n),this.scanningText=n}async getScanningText(){let n=await e(`ValidationFlowSettings.getValidationScanningText`,this[t]);return this.scanningText=n,n}async setPlaceholderTextForLabelDefinition(n,r){await e(`ValidationFlowSettings.setPlaceholderTextForLabelDefinition`,this[t],n,r)}async getPlaceholderTextForLabelDefinition(n){return e(`ValidationFlowSettings.getPlaceholderTextForLabelDefinition`,this[t],n)}constructor(e){this.missingFieldsHintText=``,this.standbyHintText=``,this.validationHintText=``,this.validationErrorText=``,this.requiredFieldErrorText=``,this.manualInputButtonText=``,this.finishButtonText=``,this.restartButtonText=``,this.pauseButtonText=``,this.adaptiveScanningText=``,this.scanningText=``,this[t]=e}static async create(){let t=new n(await e(`ValidationFlowSettings.create`));return await Promise.all([t.getMissingFieldsHintText(),t.getStandbyHintText(),t.getValidationHintText(),t.getRequiredFieldErrorText(),t.getManualInputButtonText(),t.getValidationErrorText(),t.getFinishButtonText(),t.getRestartButtonText(),t.getPauseButtonText(),t.getAdaptiveScanningText(),t.getScanningText()]),t}};export{n as LabelCaptureValidationFlowSettings};
1
+ import{nativeCall as e}from"../worker/nativeCall.js";import{nativeHandle as t}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var n=class n{async setMissingFieldsHintText(n){await e(`ValidationFlowSettings.setMissingFieldsHintText`,this[t],n),this.missingFieldsHintText=n}async getMissingFieldsHintText(){let n=await e(`ValidationFlowSettings.getMissingFieldsHintText`,this[t]);return this.missingFieldsHintText=n,n}async setStandbyHintText(n){await e(`ValidationFlowSettings.setStandbyHintText`,this[t],n),this.standbyHintText=n}async getStandbyHintText(){let n=await e(`ValidationFlowSettings.getStandbyHintText`,this[t]);return this.standbyHintText=n,n}async setValidationHintText(n){await e(`ValidationFlowSettings.setValidationHintText`,this[t],n),this.validationHintText=n}async getValidationHintText(){let n=await e(`ValidationFlowSettings.getValidationHintText`,this[t]);return this.validationHintText=n,n}async setValidationErrorText(n){await e(`ValidationFlowSettings.setValidationErrorText`,this[t],n),this.validationErrorText=n}async getValidationErrorText(){let n=await e(`ValidationFlowSettings.getValidationErrorText`,this[t]);return this.validationErrorText=n,n}async setRequiredFieldErrorText(n){await e(`ValidationFlowSettings.setRequiredFieldErrorText`,this[t],n),this.requiredFieldErrorText=n}async getRequiredFieldErrorText(){let n=await e(`ValidationFlowSettings.getRequiredFieldErrorText`,this[t]);return this.requiredFieldErrorText=n,n}async setManualInputButtonText(n){await e(`ValidationFlowSettings.setManualInputButtonText`,this[t],n),this.manualInputButtonText=n}async getManualInputButtonText(){let n=await e(`ValidationFlowSettings.getManualInputButtonText`,this[t]);return this.manualInputButtonText=n,n}async setFinishButtonText(n){await e(`ValidationFlowSettings.setValidationFinishButtonText`,this[t],n),this.finishButtonText=n}async getFinishButtonText(){let n=await e(`ValidationFlowSettings.getValidationFinishButtonText`,this[t]);return this.finishButtonText=n,n}async setRestartButtonText(n){await e(`ValidationFlowSettings.setValidationRestartButtonText`,this[t],n),this.restartButtonText=n}async getRestartButtonText(){let n=await e(`ValidationFlowSettings.getValidationRestartButtonText`,this[t]);return this.restartButtonText=n,n}async setPauseButtonText(n){await e(`ValidationFlowSettings.setValidationPauseButtonText`,this[t],n),this.pauseButtonText=n}async getPauseButtonText(){let n=await e(`ValidationFlowSettings.getValidationPauseButtonText`,this[t]);return this.pauseButtonText=n,n}async setAdaptiveScanningText(n){await e(`ValidationFlowSettings.setValidationAdaptiveScanningText`,this[t],n),this.adaptiveScanningText=n}async getAdaptiveScanningText(){let n=await e(`ValidationFlowSettings.getValidationAdaptiveScanningText`,this[t]);return this.adaptiveScanningText=n,n}async setScanningText(n){await e(`ValidationFlowSettings.setValidationScanningText`,this[t],n),this.scanningText=n}async getScanningText(){let n=await e(`ValidationFlowSettings.getValidationScanningText`,this[t]);return this.scanningText=n,n}async setPlaceholderTextForLabelDefinition(n,r){await e(`ValidationFlowSettings.setPlaceholderTextForLabelDefinition`,this[t],n,r)}async getPlaceholderTextForLabelDefinition(n){return e(`ValidationFlowSettings.getPlaceholderTextForLabelDefinition`,this[t],n)}constructor(e){this.missingFieldsHintText=``,this.standbyHintText=``,this.validationHintText=``,this.validationErrorText=``,this.requiredFieldErrorText=``,this.manualInputButtonText=``,this.finishButtonText=``,this.restartButtonText=``,this.pauseButtonText=``,this.adaptiveScanningText=``,this.scanningText=``,this[t]=e}static async create(){let t=await e(`ValidationFlowSettings.create`),r=new n(t);return await Promise.all([r.getMissingFieldsHintText(),r.getStandbyHintText(),r.getValidationHintText(),r.getRequiredFieldErrorText(),r.getManualInputButtonText(),r.getValidationErrorText(),r.getFinishButtonText(),r.getRestartButtonText(),r.getPauseButtonText(),r.getAdaptiveScanningText(),r.getScanningText()]),r}};export{n as LabelCaptureValidationFlowSettings};
@@ -1,2 +1,2 @@
1
- import { t as LabelDateComponentFormat } from "../LabelDateComponentFormat-BDdyln8r.js";
1
+ import { t as LabelDateComponentFormat } from "../LabelDateComponentFormat-BogF5Duc.js";
2
2
  export { LabelDateComponentFormat };
@@ -1 +1 @@
1
- import"../djinni-types/sdcLabelData.js";let e=function(e){return e[e.DMY=0]=`DMY`,e[e.MDY=1]=`MDY`,e[e.YMD=2]=`YMD`,e}({});export{e as LabelDateComponentFormat};
1
+ let e=function(e){return e[e.DMY=0]=`DMY`,e[e.MDY=1]=`MDY`,e[e.YMD=2]=`YMD`,e}({});export{e as LabelDateComponentFormat};
@@ -1,2 +1,2 @@
1
- import { n as LabelDateFormatJSON, t as LabelDateFormat } from "../LabelDateFormat-C9T5qNMc.js";
1
+ import { n as LabelDateFormatJSON, t as LabelDateFormat } from "../LabelDateFormat-2KViYUuq.js";
2
2
  export { LabelDateFormat, LabelDateFormatJSON };
@@ -1,2 +1,2 @@
1
- import { n as LabelDateResultJSON, t as LabelDateResult } from "../LabelDateResult-CQ9G5zQl.js";
1
+ import { n as LabelDateResultJSON, t as LabelDateResult } from "../LabelDateResult-CXE4kE4_.js";
2
2
  export { LabelDateResult, LabelDateResultJSON };
@@ -1,2 +1,2 @@
1
- import { n as LabelDefinitionBuilder, r as label, t as LabelDefinition } from "../LabelDefinition-CAZoQj1a.js";
1
+ import { n as LabelDefinitionBuilder, r as label, t as LabelDefinition } from "../LabelDefinition-DEROTlBM.js";
2
2
  export { LabelDefinition, LabelDefinitionBuilder, label };
@@ -1,2 +1,2 @@
1
- import { n as LabelFieldJSON, t as LabelField } from "../LabelField-BAO35-Eb.js";
1
+ import { n as LabelFieldJSON, t as LabelField } from "../LabelField-b2ukZfup.js";
2
2
  export { LabelField, LabelFieldJSON };
@@ -1 +1 @@
1
- import{LabelFieldState as e}from"./LabelFieldState.js";import{LabelFieldType as t}from"./LabelFieldType.js";import{LabelFieldValueType as n}from"./LabelFieldValueType.js";import{LabelDateResult as r}from"./LabelDateResult.js";import{AnchorPositions as i,Point as a,Quadrilateral as o}from"@scandit/web-datacapture-core";import{Barcode as s}from"@scandit/web-datacapture-barcode";function c(e){let t=Math.sqrt(e.x*e.x+e.y*e.y);return new a(e.x/t,e.y/t)}function l(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function u(e){return{[t.Barcode]:`barcode`,[t.Text]:`text`,[t.Unknown]:`unknown`}[e]}function d(e){let n={barcode:t.Barcode,text:t.Text,unknown:t.Unknown}[e];if(n==null)throw Error(`Invalid label field type: ${e}`);return n}function f(e){let t={date:n.Date,price:n.Price,weight:n.Weight,text:n.Text,numeric:n.Numeric}[e];if(t==null)throw Error(`Invalid label field value type: ${e}`);return t}function p(e){let t={[n.Date]:`date`,[n.Price]:`price`,[n.Weight]:`weight`,[n.Text]:`text`,[n.Numeric]:`numeric`}[e];if(t==null)throw Error(`Invalid label field value type: ${e}`);return t}function m(t){if(typeof t==`number`){let n={0:e.Captured,1:e.Predicted,2:e.Unknown};if(n[t]==null)throw Error(`Invalid label field state: ${t}`);return n[t]}let n={captured:e.Captured,predicted:e.Predicted,unknown:e.Unknown}[t.toLowerCase()];if(n==null)throw Error(`Invalid label field state: ${t}`);return n}function h(t){let n={[e.Captured]:`captured`,[e.Predicted]:`predicted`,[e.Unknown]:`unknown`}[t];if(n==null)throw Error(`Invalid label field state: ${t}`);return n}var g=class e{get name(){return this._name}get type(){return this._type}get predictedLocation(){return this._predictedLocation}get state(){return this._state}get isRequired(){return this._isRequired}get barcode(){return this._barcode}get text(){return this._text}get valueType(){return this._valueType}get anchorPositions(){let e=this.predictedLocation,t=new a(e.topRight.x-e.topLeft.x,e.topRight.y-e.topLeft.y),n=new a(e.bottomRight.x-e.topRight.x,e.bottomRight.y-e.topRight.y),r=new a(e.bottomLeft.x-e.bottomRight.x,e.bottomLeft.y-e.bottomRight.y),o=new a(e.topLeft.x-e.bottomLeft.x,e.topLeft.y-e.bottomLeft.y),s=l(t)/2,u=l(n)/2,d=l(r)/2,f=l(o)/2,p=c(t),m=c(n),h=c(r),g=c(o),_={x:e.topLeft.x+p.x*s,y:e.topLeft.y+p.y*s},v={x:e.topRight.x+m.x*u,y:e.topRight.y+m.y*u},y={x:e.bottomRight.x+h.x*d,y:e.bottomRight.y+h.y*d},b={x:e.bottomLeft.x+g.x*f,y:e.bottomLeft.y+g.y*f},x={x:(_.x+v.x+y.x+b.x)/4,y:(_.y+v.y+y.y+b.y)/4};return i.fromJSON({center:new a(x.x,x.y).toJSONObject(),topCenter:new a(_.x,_.y).toJSONObject(),bottomCenter:new a(y.x,y.y).toJSONObject(),centerLeft:new a(b.x,b.y).toJSONObject(),centerRight:new a(v.x,v.y).toJSONObject(),topLeft:e.topLeft.toJSONObject(),topRight:e.topRight.toJSONObject(),bottomLeft:e.bottomLeft.toJSONObject(),bottomRight:e.bottomRight.toJSONObject()})}get date(){return this._date}static fromJSON(t){let n=new e;return n._valueType=f(t.valueType),n._name=t.name,n._type=d(t.type),n._predictedLocation=o.fromJSON(t.location),n._state=m(t.state),n._isRequired=t.isRequired,n._barcode=t.barcode?s.fromJSON(t.barcode):null,n._text=t.text,n._date=t.date?r.fromJSON(t.date):null,n}toJSONObject(){return{name:this._name,type:u(this._type),location:this._predictedLocation.toJSONObject(),state:h(this._state),isRequired:this._isRequired,barcode:this._barcode?this._barcode.toJSONObject():null,text:this._text,date:this._date?this._date.toJSONObject():null,valueType:p(this._valueType)}}};export{g as LabelField};
1
+ import{LabelFieldState as e}from"./LabelFieldState.js";import{LabelFieldType as t}from"./LabelFieldType.js";import{LabelFieldValueType as n}from"./LabelFieldValueType.js";import{LabelDateResult as r}from"./LabelDateResult.js";import{AnchorPositions as i,Point as a,Quadrilateral as o}from"@scandit/web-datacapture-core";import{Barcode as s}from"@scandit/web-datacapture-barcode";function c(e){let t=Math.sqrt(e.x*e.x+e.y*e.y);return new a(e.x/t,e.y/t)}function l(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function u(e){return{[t.Barcode]:`barcode`,[t.Text]:`text`,[t.Unknown]:`unknown`}[e]}function d(e){let n={barcode:t.Barcode,text:t.Text,unknown:t.Unknown}[e];if(n==null)throw Error(`Invalid label field type: ${e}`);return n}function f(e){let t={date:n.Date,price:n.Price,weight:n.Weight,text:n.Text,numeric:n.Numeric}[e];if(t==null)throw Error(`Invalid label field value type: ${e}`);return t}function p(e){let t={[n.Date]:`date`,[n.Price]:`price`,[n.Weight]:`weight`,[n.Text]:`text`,[n.Numeric]:`numeric`}[e];if(t==null)throw Error(`Invalid label field value type: ${e}`);return t}function m(t){if(typeof t==`number`){let n={0:e.Captured,1:e.Predicted,2:e.Unknown};if(n[t]==null)throw Error(`Invalid label field state: ${t}`);return n[t]}let n={captured:e.Captured,predicted:e.Predicted,unknown:e.Unknown}[t.toLowerCase()];if(n==null)throw Error(`Invalid label field state: ${t}`);return n}function h(t){let n={[e.Captured]:`captured`,[e.Predicted]:`predicted`,[e.Unknown]:`unknown`}[t];if(n==null)throw Error(`Invalid label field state: ${t}`);return n}var g=class e{constructor(){this._instanceIndex=null}get name(){return this._name}get type(){return this._type}get predictedLocation(){return this._predictedLocation}get state(){return this._state}get isRequired(){return this._isRequired}get barcode(){return this._barcode}get text(){return this._text}get valueType(){return this._valueType}get anchorPositions(){let e=this.predictedLocation,t=new a(e.topRight.x-e.topLeft.x,e.topRight.y-e.topLeft.y),n=new a(e.bottomRight.x-e.topRight.x,e.bottomRight.y-e.topRight.y),r=new a(e.bottomLeft.x-e.bottomRight.x,e.bottomLeft.y-e.bottomRight.y),o=new a(e.topLeft.x-e.bottomLeft.x,e.topLeft.y-e.bottomLeft.y),s=l(t)/2,u=l(n)/2,d=l(r)/2,f=l(o)/2,p=c(t),m=c(n),h=c(r),g=c(o),_={x:e.topLeft.x+p.x*s,y:e.topLeft.y+p.y*s},v={x:e.topRight.x+m.x*u,y:e.topRight.y+m.y*u},y={x:e.bottomRight.x+h.x*d,y:e.bottomRight.y+h.y*d},b={x:e.bottomLeft.x+g.x*f,y:e.bottomLeft.y+g.y*f},x={x:(_.x+v.x+y.x+b.x)/4,y:(_.y+v.y+y.y+b.y)/4};return i.fromJSON({center:new a(x.x,x.y).toJSONObject(),topCenter:new a(_.x,_.y).toJSONObject(),bottomCenter:new a(y.x,y.y).toJSONObject(),centerLeft:new a(b.x,b.y).toJSONObject(),centerRight:new a(v.x,v.y).toJSONObject(),topLeft:e.topLeft.toJSONObject(),topRight:e.topRight.toJSONObject(),bottomLeft:e.bottomLeft.toJSONObject(),bottomRight:e.bottomRight.toJSONObject()})}get date(){return this._date}get instanceIndex(){return this._instanceIndex}static fromJSON(t){let n=new e;return n._valueType=f(t.valueType),n._name=t.name,n._type=d(t.type),n._predictedLocation=o.fromJSON(t.location),n._state=m(t.state),n._isRequired=t.isRequired,n._barcode=t.barcode?s.fromJSON(t.barcode):null,n._text=t.text,n._date=t.date?r.fromJSON(t.date):null,n._instanceIndex=t.instanceIndex??null,n}toJSONObject(){return{name:this._name,type:u(this._type),location:this._predictedLocation.toJSONObject(),state:h(this._state),isRequired:this._isRequired,barcode:this._barcode?this._barcode.toJSONObject():null,text:this._text,date:this._date?this._date.toJSONObject():null,valueType:p(this._valueType),instanceIndex:this._instanceIndex}}};export{g as LabelField};
@@ -1,2 +1,2 @@
1
- import { t as LabelFieldDefinition } from "../LabelFieldDefinition-CuGI3QUq.js";
1
+ import { t as LabelFieldDefinition } from "../LabelFieldDefinition-Dx10zV00.js";
2
2
  export { LabelFieldDefinition };
@@ -1,2 +1,2 @@
1
- import { n as LabelFieldDefinitionBuilder, r as TextFieldClass, t as FieldDefinitionClass } from "../LabelFieldDefinitionBuilder-rN0LybgZ.js";
1
+ import { n as LabelFieldDefinitionBuilder, r as TextFieldClass, t as FieldDefinitionClass } from "../LabelFieldDefinitionBuilder-D-yf34AO.js";
2
2
  export { FieldDefinitionClass, LabelFieldDefinitionBuilder, TextFieldClass };
@@ -1,2 +1,2 @@
1
- import { t as LabelFieldLocation } from "../LabelFieldLocation-DDqgTh17.js";
1
+ import { t as LabelFieldLocation } from "../LabelFieldLocation-eoZD3v4d.js";
2
2
  export { LabelFieldLocation };
@@ -1 +1 @@
1
- import{nativeCall as e}from"../worker/nativeCall.js";import{LabelFieldLocationType as t}from"./LabelFieldLocationType.js";import{mapWebLabelFieldLocationTypeToNativeLabelFieldLocationType as n}from"../private/labelFieldLocationTypeTranslator.js";import{nativeHandle as r}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var i=class i{constructor(e){this[r]=e}static async of(t){return new i(await e(`LabelFieldLocation.createWithRect`,t.toJSONObject()))}static async topLeft(){return i.createWithType(t.TopLeft)}static async topRight(){return i.createWithType(t.TopRight)}static async bottomRight(){return i.createWithType(t.BottomRight)}static async bottomLeft(){return i.createWithType(t.BottomLeft)}static async top(){return i.createWithType(t.Top)}static async right(){return i.createWithType(t.Right)}static async bottom(){return i.createWithType(t.Bottom)}static async left(){return i.createWithType(t.Left)}static async center(){return i.createWithType(t.Center)}static async wholeLabel(){return i.createWithType(t.WholeLabel)}static async createWithType(t){return new i(await e(`LabelFieldLocation.createWithType`,n(t)))}};export{i as LabelFieldLocation};
1
+ import{nativeCall as e}from"../worker/nativeCall.js";import{LabelFieldLocationType as t}from"./LabelFieldLocationType.js";import{mapWebLabelFieldLocationTypeToNativeLabelFieldLocationType as n}from"../private/labelFieldLocationTypeTranslator.js";import{nativeHandle as r}from"@scandit/web-datacapture-core/build/js/private/nativeHandle.js";var i=class i{constructor(e){this[r]=e}static async of(t){let n=await e(`LabelFieldLocation.createWithRect`,t.toJSONObject());return new i(n)}static async topLeft(){return i.createWithType(t.TopLeft)}static async topRight(){return i.createWithType(t.TopRight)}static async bottomRight(){return i.createWithType(t.BottomRight)}static async bottomLeft(){return i.createWithType(t.BottomLeft)}static async top(){return i.createWithType(t.Top)}static async right(){return i.createWithType(t.Right)}static async bottom(){return i.createWithType(t.Bottom)}static async left(){return i.createWithType(t.Left)}static async center(){return i.createWithType(t.Center)}static async wholeLabel(){return i.createWithType(t.WholeLabel)}static async createWithType(t){let r=await e(`LabelFieldLocation.createWithType`,n(t));return new i(r)}};export{i as LabelFieldLocation};
@@ -1 +1 @@
1
- import"../djinni-types/sdcLabelData.js";let e=function(e){return e[e.TopLeft=0]=`TopLeft`,e[e.TopRight=1]=`TopRight`,e[e.BottomRight=2]=`BottomRight`,e[e.BottomLeft=3]=`BottomLeft`,e[e.Top=4]=`Top`,e[e.Right=5]=`Right`,e[e.Bottom=6]=`Bottom`,e[e.Left=7]=`Left`,e[e.Center=8]=`Center`,e[e.WholeLabel=9]=`WholeLabel`,e}({});export{e as LabelFieldLocationType};
1
+ let e=function(e){return e[e.TopLeft=0]=`TopLeft`,e[e.TopRight=1]=`TopRight`,e[e.BottomRight=2]=`BottomRight`,e[e.BottomLeft=3]=`BottomLeft`,e[e.Top=4]=`Top`,e[e.Right=5]=`Right`,e[e.Bottom=6]=`Bottom`,e[e.Left=7]=`Left`,e[e.Center=8]=`Center`,e[e.WholeLabel=9]=`WholeLabel`,e}({});export{e as LabelFieldLocationType};
@@ -1,2 +1,2 @@
1
- import { t as LabelFieldState } from "../LabelFieldState-JJ7Cbn3n.js";
1
+ import { t as LabelFieldState } from "../LabelFieldState-PNXv3OG0.js";
2
2
  export { LabelFieldState };
@@ -1 +1 @@
1
- import"../djinni-types/sdcLabelData.js";let e=function(e){return e[e.Captured=0]=`Captured`,e[e.Predicted=1]=`Predicted`,e[e.Unknown=2]=`Unknown`,e}({});export{e as LabelFieldState};
1
+ let e=function(e){return e[e.Captured=0]=`Captured`,e[e.Predicted=1]=`Predicted`,e[e.Unknown=2]=`Unknown`,e}({});export{e as LabelFieldState};