@scandit/web-datacapture-label 8.1.0 → 8.2.0-beta.1

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 (228) hide show
  1. package/LICENSE +1 -1
  2. package/build/js/{LabelCaptureAdvancedOverlay-B1hVlOzu.d.ts → LabelCaptureAdvancedOverlay-Gh80a5hZ.d.ts} +1 -1
  3. package/build/js/{LabelCaptureBasicOverlay-BjmQOKkn.d.ts → LabelCaptureBasicOverlay-C6TRvWxE.d.ts} +1 -1
  4. package/build/js/{NativeProxy-B98bIlIp.d.ts → NativeProxy-DreJVzqM.d.ts} +101 -13
  5. package/build/js/api/AdaptiveRecognitionResult.d.ts +1 -1
  6. package/build/js/api/CustomBarcodeBuilder.js +1 -1
  7. package/build/js/api/CustomText.d.ts +1 -1
  8. package/build/js/api/CustomTextBuilder.d.ts +1 -1
  9. package/build/js/api/CustomTextBuilder.js +1 -1
  10. package/build/js/api/DateText.d.ts +1 -1
  11. package/build/js/api/DateTextBuilder.d.ts +1 -1
  12. package/build/js/api/ExpiryDateText.d.ts +1 -1
  13. package/build/js/api/ExpiryDateTextBuilder.d.ts +2 -2
  14. package/build/js/api/ExpiryDateTextBuilder.js +1 -1
  15. package/build/js/api/ImeiOneBarcodeBuilder.js +1 -1
  16. package/build/js/api/ImeiTwoBarcodeBuilder.js +1 -1
  17. package/build/js/api/LabelCapture.d.ts +1 -1
  18. package/build/js/api/LabelCapture.js +1 -1
  19. package/build/js/api/LabelCaptureAdaptiveRecognitionOverlay.d.ts +1 -1
  20. package/build/js/api/LabelCaptureAdaptiveRecognitionOverlay.js +1 -1
  21. package/build/js/api/LabelCaptureAdaptiveRecognitionSettings.d.ts +1 -1
  22. package/build/js/api/LabelCaptureAdvancedOverlay.d.ts +2 -2
  23. package/build/js/api/LabelCaptureAdvancedOverlayListener.d.ts +2 -2
  24. package/build/js/api/LabelCaptureBasicOverlay.d.ts +2 -2
  25. package/build/js/api/LabelCaptureBasicOverlay.js +1 -1
  26. package/build/js/api/LabelCaptureBasicOverlayListener.d.ts +2 -2
  27. package/build/js/api/LabelCaptureListener.d.ts +1 -1
  28. package/build/js/api/LabelCaptureOverlayJSON.d.ts +1 -1
  29. package/build/js/api/LabelCaptureSettings.d.ts +1 -1
  30. package/build/js/api/LabelCaptureValidationFlowOverlay.d.ts +36 -38
  31. package/build/js/api/LabelCaptureValidationFlowOverlay.js +1 -1
  32. package/build/js/api/LabelCaptureValidationFlowSettings.d.ts +30 -6
  33. package/build/js/api/LabelCaptureValidationFlowSettings.js +1 -1
  34. package/build/js/api/LabelDefinition.d.ts +1 -1
  35. package/build/js/api/PackingDateText.d.ts +1 -1
  36. package/build/js/api/PackingDateTextBuilder.d.ts +1 -1
  37. package/build/js/api/PartNumberBarcodeBuilder.js +1 -1
  38. package/build/js/api/PrivateReceiptScanningHandler.d.ts +1 -1
  39. package/build/js/api/PrivateReceiptScanningListener.d.ts +1 -1
  40. package/build/js/api/PrivateValidationFlowHandler.d.ts +1 -0
  41. package/build/js/api/PrivateValidationFlowHandler.js +1 -1
  42. package/build/js/api/ReceiptScanningResult.d.ts +1 -1
  43. package/build/js/api/SerialNumberBarcodeBuilder.js +1 -1
  44. package/build/js/api/TotalPriceText.d.ts +1 -1
  45. package/build/js/api/TotalPriceTextBuilder.d.ts +1 -1
  46. package/build/js/api/UnitPriceText.d.ts +1 -1
  47. package/build/js/api/UnitPriceTextBuilder.d.ts +1 -1
  48. package/build/js/api/WeightText.d.ts +1 -1
  49. package/build/js/api/WeightTextBuilder.d.ts +1 -1
  50. package/build/js/chunks/chunk-6GCZVUBU.js +1 -0
  51. package/build/js/chunks/chunk-6O4CVQF2.js +1 -0
  52. package/build/js/chunks/{chunk-SWSQIF4W.js → chunk-7UMN72SD.js} +1 -1
  53. package/build/js/chunks/{chunk-G37GYNDK.js → chunk-A537ABTE.js} +1 -1
  54. package/build/js/chunks/{chunk-5CNHCL7M.js → chunk-AVU64GAK.js} +1 -1
  55. package/build/js/chunks/chunk-CS7EEHHH.js +1 -0
  56. package/build/js/chunks/chunk-E2ZQGWKI.js +1 -0
  57. package/build/js/chunks/{chunk-RMO2SLDR.js → chunk-GEFDYKTD.js} +1 -1
  58. package/build/js/chunks/chunk-GYKCTYW2.js +1 -0
  59. package/build/js/chunks/{chunk-T5PFYQ2F.js → chunk-H7A45TQE.js} +1 -1
  60. package/build/js/chunks/{chunk-ZMEFT4CJ.js → chunk-HTEZ5TMC.js} +1 -1
  61. package/build/js/chunks/{chunk-LVUNHV32.js → chunk-INKFF3U2.js} +1 -1
  62. package/build/js/chunks/chunk-IU34OFUF.js +2 -0
  63. package/build/js/chunks/chunk-JTZCA3DV.js +1 -0
  64. package/build/js/chunks/{chunk-U77DVACF.js → chunk-K44FWZYF.js} +1 -1
  65. package/build/js/chunks/{chunk-THXK2CAH.js → chunk-QVLYUSDL.js} +1 -1
  66. package/build/js/chunks/{chunk-DV4WMUFU.js → chunk-RPOZ2B2F.js} +1 -1
  67. package/build/js/chunks/chunk-VHYYJSJM.js +1 -0
  68. package/build/js/chunks/{chunk-5Q3VETGO.js → chunk-W7XOV4H3.js} +1 -1
  69. package/build/js/chunks/{chunk-PACXVWIU.js → chunk-WADZQKYF.js} +1 -1
  70. package/build/js/chunks/chunk-X2BMTDWA.js +1 -0
  71. package/build/js/djinni-types/sdcCoreInternalSdkCommonGeometry.d.ts +10 -1
  72. package/build/js/djinni-types/sdcCoreInternalSdkCommonGeometry.js +1 -0
  73. package/build/js/djinni-types/sdcLabelInternalModuleCapture.d.ts +4 -3
  74. package/build/js/djinni-types/sdcLabelInternalModuleUiOverlay.d.ts +12 -2
  75. package/build/js/index.d.ts +3 -3
  76. package/build/js/index.js +1 -1
  77. package/build/js/moduleLoader.js +1 -1
  78. package/build/js/private/PrivateLabelFieldDefinition.d.ts +1 -1
  79. package/build/js/private/createProxiedViewFinder.d.ts +2 -2
  80. package/build/js/private/viewfinderTranslator.js +1 -1
  81. package/build/js/ui/atoms/AdaptiveRecognitionOverlay.js +1 -0
  82. package/build/js/ui/atoms/Button.d.ts +68 -0
  83. package/build/js/ui/atoms/Button.js +1 -0
  84. package/build/js/ui/atoms/TextInput.d.ts +157 -64
  85. package/build/js/ui/atoms/TextInput.js +1 -1
  86. package/build/js/ui/organisms/LabelCaptureValidationFlowLayout.d.ts +69 -11
  87. package/build/js/ui/organisms/LabelCaptureValidationFlowLayout.js +1 -1
  88. package/build/js/worker/LabelCaptureWorkerManager.d.ts +1 -1
  89. package/build/js/worker/LabelCaptureWorkerManager.js +1 -1
  90. package/build/js/worker/WorkerMain.d.ts +1 -1
  91. package/build/js/worker/WorkerMain.js +1 -1
  92. package/build/js/worker/WorkerRegistry.d.ts +1 -1
  93. package/build/js/worker/dataCaptureEngine.d.ts +1 -1
  94. package/build/js/worker/dataCaptureEngine.js +1 -1
  95. package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
  96. package/build/js/worker/handlers/FieldBuilderHandler.d.ts +1 -1
  97. package/build/js/worker/handlers/FieldBuilderHandler.js +1 -1
  98. package/build/js/worker/handlers/LabelCaptureAdvancedOverlayHandler.d.ts +1 -1
  99. package/build/js/worker/handlers/LabelCaptureAdvancedOverlayHandler.js +1 -1
  100. package/build/js/worker/handlers/LabelCaptureBasicOverlayHandler.d.ts +1 -1
  101. package/build/js/worker/handlers/LabelCaptureBasicOverlayHandler.js +1 -1
  102. package/build/js/worker/handlers/LabelCaptureHandler.d.ts +1 -1
  103. package/build/js/worker/handlers/LabelCaptureHandler.js +1 -1
  104. package/build/js/worker/handlers/ReceiptScanningHandler.d.ts +1 -1
  105. package/build/js/worker/handlers/ReceiptScanningHandler.js +1 -1
  106. package/build/js/worker/handlers/SettingsHandler.d.ts +1 -1
  107. package/build/js/worker/handlers/SettingsHandler.js +1 -1
  108. package/build/js/worker/handlers/ValidationFlowHandler.d.ts +1 -1
  109. package/build/js/worker/handlers/ValidationFlowHandler.js +1 -1
  110. package/build/js/worker/labelCapture.inlineWorker.d.ts +1 -1
  111. package/build/js/worker/labelCapture.inlineWorker.js +1 -1
  112. package/build/js/worker/labelWorkerHandler.d.ts +1 -1
  113. package/build/js/worker/proxies/AimerViewfinderProxy.d.ts +1 -1
  114. package/build/js/worker/proxies/AimerViewfinderProxy.js +1 -1
  115. package/build/js/worker/proxies/BarcodeFieldProxy.d.ts +1 -1
  116. package/build/js/worker/proxies/BarcodeFieldProxy.js +1 -1
  117. package/build/js/worker/proxies/CapturedLabelProxy.d.ts +1 -1
  118. package/build/js/worker/proxies/CapturedLabelProxy.js +1 -1
  119. package/build/js/worker/proxies/CustomBarcodeProxy.d.ts +1 -1
  120. package/build/js/worker/proxies/CustomBarcodeProxy.js +1 -1
  121. package/build/js/worker/proxies/CustomTextProxy.d.ts +1 -1
  122. package/build/js/worker/proxies/CustomTextProxy.js +1 -1
  123. package/build/js/worker/proxies/DateTextProxy.d.ts +1 -1
  124. package/build/js/worker/proxies/DateTextProxy.js +1 -1
  125. package/build/js/worker/proxies/ExpiryDateTextProxy.d.ts +1 -1
  126. package/build/js/worker/proxies/ExpiryDateTextProxy.js +1 -1
  127. package/build/js/worker/proxies/ImeiOneBarcodeProxy.d.ts +1 -1
  128. package/build/js/worker/proxies/ImeiOneBarcodeProxy.js +1 -1
  129. package/build/js/worker/proxies/ImeiTwoBarcodeProxy.d.ts +1 -1
  130. package/build/js/worker/proxies/ImeiTwoBarcodeProxy.js +1 -1
  131. package/build/js/worker/proxies/LabelCaptureAdvancedOverlayProxy.d.ts +1 -1
  132. package/build/js/worker/proxies/LabelCaptureAdvancedOverlayProxy.js +1 -1
  133. package/build/js/worker/proxies/LabelCaptureBasicOverlayProxy.d.ts +1 -1
  134. package/build/js/worker/proxies/LabelCaptureBasicOverlayProxy.js +1 -1
  135. package/build/js/worker/proxies/LabelCaptureHelperProxy.d.ts +1 -1
  136. package/build/js/worker/proxies/LabelCaptureHelperProxy.js +1 -1
  137. package/build/js/worker/proxies/LabelCaptureOverlayHelperProxy.d.ts +1 -1
  138. package/build/js/worker/proxies/LabelCaptureOverlayHelperProxy.js +1 -1
  139. package/build/js/worker/proxies/LabelCaptureProxy.d.ts +1 -1
  140. package/build/js/worker/proxies/LabelCaptureProxy.js +1 -1
  141. package/build/js/worker/proxies/LabelCaptureSessionProxy.d.ts +1 -1
  142. package/build/js/worker/proxies/LabelCaptureSessionProxy.js +1 -1
  143. package/build/js/worker/proxies/LabelCaptureSettingsProxy.d.ts +1 -1
  144. package/build/js/worker/proxies/LabelCaptureSettingsProxy.js +1 -1
  145. package/build/js/worker/proxies/LabelDefinitionProxy.d.ts +1 -1
  146. package/build/js/worker/proxies/LabelDefinitionProxy.js +1 -1
  147. package/build/js/worker/proxies/LabelFieldDefinitionProxy.d.ts +1 -1
  148. package/build/js/worker/proxies/LabelFieldDefinitionProxy.js +1 -1
  149. package/build/js/worker/proxies/LabelFieldLocationProxy.d.ts +1 -1
  150. package/build/js/worker/proxies/LabelFieldLocationProxy.js +1 -1
  151. package/build/js/worker/proxies/LabelFieldProxy.d.ts +1 -1
  152. package/build/js/worker/proxies/LabelFieldProxy.js +1 -1
  153. package/build/js/worker/proxies/NativeProxy.d.ts +1 -1
  154. package/build/js/worker/proxies/NativeProxy.js +1 -1
  155. package/build/js/worker/proxies/NoViewfinderProxy.d.ts +1 -1
  156. package/build/js/worker/proxies/NoViewfinderProxy.js +1 -1
  157. package/build/js/worker/proxies/PackingDateTextProxy.d.ts +1 -1
  158. package/build/js/worker/proxies/PackingDateTextProxy.js +1 -1
  159. package/build/js/worker/proxies/PartNumberBarcodeProxy.d.ts +1 -1
  160. package/build/js/worker/proxies/PartNumberBarcodeProxy.js +1 -1
  161. package/build/js/worker/proxies/ReceiptScanningHandlerProxy.d.ts +1 -1
  162. package/build/js/worker/proxies/ReceiptScanningOverlayProxy.d.ts +1 -1
  163. package/build/js/worker/proxies/ReceiptScanningOverlayProxy.js +1 -1
  164. package/build/js/worker/proxies/ReceiptScanningSettingsProxy.d.ts +1 -1
  165. package/build/js/worker/proxies/ReceiptScanningSettingsProxy.js +1 -1
  166. package/build/js/worker/proxies/RectangularViewfinderAnimationProxy.d.ts +1 -1
  167. package/build/js/worker/proxies/RectangularViewfinderAnimationProxy.js +1 -1
  168. package/build/js/worker/proxies/RectangularViewfinderProxy.d.ts +1 -1
  169. package/build/js/worker/proxies/RectangularViewfinderProxy.js +1 -1
  170. package/build/js/worker/proxies/SerialNumberBarcodeProxy.d.ts +1 -1
  171. package/build/js/worker/proxies/SerialNumberBarcodeProxy.js +1 -1
  172. package/build/js/worker/proxies/TotalPriceTextProxy.d.ts +1 -1
  173. package/build/js/worker/proxies/TotalPriceTextProxy.js +1 -1
  174. package/build/js/worker/proxies/UnitPriceTextProxy.d.ts +1 -1
  175. package/build/js/worker/proxies/UnitPriceTextProxy.js +1 -1
  176. package/build/js/worker/proxies/ValidationFlowListenerProxy.d.ts +4 -3
  177. package/build/js/worker/proxies/ValidationFlowListenerProxy.js +1 -1
  178. package/build/js/worker/proxies/ValidationFlowOverlayProxy.d.ts +3 -5
  179. package/build/js/worker/proxies/ValidationFlowOverlayProxy.js +1 -1
  180. package/build/js/worker/proxies/ValidationFlowSettingsProxy.d.ts +13 -1
  181. package/build/js/worker/proxies/ValidationFlowSettingsProxy.js +1 -1
  182. package/build/js/worker/proxies/WeightTextProxy.d.ts +1 -1
  183. package/build/js/worker/proxies/WeightTextProxy.js +1 -1
  184. package/build/js/worker/proxies/base/BarcodeFieldProxyBase.d.ts +1 -1
  185. package/build/js/worker/proxies/base/BarcodeFieldProxyBase.js +1 -1
  186. package/build/js/worker/proxies/base/LabelFieldDefinitionBaseProxy.d.ts +1 -1
  187. package/build/js/worker/proxies/base/LabelFieldDefinitionBaseProxy.js +1 -1
  188. package/build/js/worker/proxies/base/index.d.ts +1 -1
  189. package/build/js/worker/proxies/base/index.js +1 -1
  190. package/package.json +3 -3
  191. package/sdc-lib/resources/models/barcode_keypoints_oned.ef764d7717ba.model +0 -0
  192. package/sdc-lib/resources/models/ocr_barcode_semantics_default.b60d72805695.model +0 -0
  193. package/sdc-lib/scandit-datacapture-sdk-label-pthreads.js +1 -1
  194. package/sdc-lib/scandit-datacapture-sdk-label-pthreads.wasm +0 -0
  195. package/sdc-lib/scandit-datacapture-sdk-label-simd-pthreads.js +1 -1
  196. package/sdc-lib/scandit-datacapture-sdk-label-simd-pthreads.wasm +0 -0
  197. package/sdc-lib/scandit-datacapture-sdk-label-simd.js +1 -1
  198. package/sdc-lib/scandit-datacapture-sdk-label-simd.wasm +0 -0
  199. package/sdc-lib/scandit-datacapture-sdk-label.js +1 -1
  200. package/sdc-lib/scandit-datacapture-sdk-label.wasm +0 -0
  201. package/build/js/chunks/chunk-2BXP3X3H.js +0 -1
  202. package/build/js/chunks/chunk-6QWXDVDE.js +0 -1
  203. package/build/js/chunks/chunk-7W7VDXJD.js +0 -1
  204. package/build/js/chunks/chunk-7YYY7VA3.js +0 -1
  205. package/build/js/chunks/chunk-CWOXTL6A.js +0 -1
  206. package/build/js/chunks/chunk-FLGWGEP3.js +0 -1
  207. package/build/js/chunks/chunk-HVHZOWOI.js +0 -1
  208. package/build/js/chunks/chunk-OPQ56BH6.js +0 -2
  209. package/build/js/chunks/chunk-RTUZ7UNX.js +0 -1
  210. package/build/js/chunks/chunk-SFX2AZVU.js +0 -1
  211. package/build/js/chunks/chunk-VAZEF7GZ.js +0 -1
  212. package/build/js/chunks/chunk-VSH23DF3.js +0 -1
  213. package/build/js/chunks/chunk-XW4HFTSX.js +0 -1
  214. package/build/js/ui/atoms/InputManuallyButton.d.ts +0 -19
  215. package/build/js/ui/atoms/InputManuallyButton.js +0 -1
  216. package/build/js/ui/atoms/RoundedButton.d.ts +0 -29
  217. package/build/js/ui/atoms/RoundedButton.js +0 -1
  218. package/build/js/ui/atoms/TextInputCardLayout.d.ts +0 -16
  219. package/build/js/ui/atoms/TextInputCardLayout.js +0 -1
  220. package/build/js/ui/molecules/CardListContainer.d.ts +0 -46
  221. package/build/js/ui/molecules/CardListContainer.js +0 -1
  222. package/build/js/ui/molecules/CardListRestartBackButton.d.ts +0 -27
  223. package/build/js/ui/molecules/CardListRestartBackButton.js +0 -1
  224. package/build/js/ui/organisms/AdaptiveRecognitionOverlay.js +0 -1
  225. package/sdc-lib/resources/models/barcode_keypoints_oned.43a682cdf24a.model +0 -0
  226. package/sdc-lib/resources/models/ocr_barcode_semantics_default.afe40f85a32d.model +0 -0
  227. /package/build/js/chunks/{chunk-IUFE5KAN.js → chunk-CHBH6UKJ.js} +0 -0
  228. /package/build/js/ui/{organisms → atoms}/AdaptiveRecognitionOverlay.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { DataCaptureOverlay, DataCaptureView } from '@scandit/web-datacapture-core';
2
2
  import { Serializable } from '@scandit/web-datacapture-core/build/js/private/Serializable.js';
3
3
  import { nativeHandle } from '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
4
- import { N as NativeProxyHandle } from '../NativeProxy-B98bIlIp.js';
4
+ import { N as NativeProxyHandle } from '../NativeProxy-DreJVzqM.js';
5
5
  import { L as LabelCapture } from '../LabelCapture-DGLkCHVN.js';
6
6
  import { LabelCaptureValidationFlowSettings } from './LabelCaptureValidationFlowSettings.js';
7
7
  import { LabelField } from './LabelField.js';
@@ -66,33 +66,34 @@ interface LabelCaptureValidationFlowOverlayJSON {
66
66
  }
67
67
  interface LabelCaptureValidationFlowListener {
68
68
  onValidationFlowLabelCaptured(fields: LabelField[]): void;
69
+ onManualInput(field: LabelField, oldValue: string | undefined, newValue: string): void;
69
70
  }
70
71
  declare class LabelCaptureValidationFlowOverlay implements DataCaptureOverlay, Serializable<LabelCaptureValidationFlowOverlayJSON> {
71
72
  [nativeHandle]: NativeProxyHandle;
72
73
  listener: LabelCaptureValidationFlowListener;
73
74
  private onWorkerMessageHandler;
74
75
  private validationFlowHandler;
75
- private validationSettings;
76
+ private validationFlowSettings;
76
77
  private labelCapture;
77
78
  private layout;
78
- private submitButton;
79
- private cardListContainer;
80
- private inputManuallyButton;
81
- private onInputManuallyButtonClickHandler;
82
- private onSubmitButtonClickHandler;
83
- private onRestartButtonClickHandler;
84
- private onBackButtonClickHandler;
85
- private backAndRestartButton;
86
79
  private onContextUpdatedListenerHandler;
87
- private onTextInputAimerIconClickHandler;
80
+ private onClearAllButtonClickedHandler;
81
+ private onSubmitButtonClickedHandler;
82
+ private onPauseButtonClickedHandler;
83
+ private onTextInputScanIconClickHandler;
88
84
  private onTextInputClearIconClickHandler;
85
+ private onTextInputKeydownHandler;
89
86
  private currentInput;
90
- private onCardListClickHandler;
91
- private onClickOutsideHandler;
92
- private backdrop;
87
+ private isProcessingFocus;
88
+ private isProcessingBlur;
89
+ private onTextInputFocusHandler;
90
+ private onTextInputBlurHandler;
91
+ private onClickedOutsideListHandler;
93
92
  private validationFlowHandlerState;
94
- private validationFieldsState;
95
- private cloudBackupProcessingFields;
93
+ private dataCaptureViewRoot;
94
+ private isCloudBackupProcessing;
95
+ private dataCaptureView;
96
+ private get camera();
96
97
  static withLabelCaptureForView(labelCapture: LabelCapture, dataCaptureView: DataCaptureView): Promise<LabelCaptureValidationFlowOverlay>;
97
98
  applySettings(settings: LabelCaptureValidationFlowSettings): Promise<void>;
98
99
  private constructor();
@@ -103,42 +104,39 @@ declare class LabelCaptureValidationFlowOverlay implements DataCaptureOverlay, S
103
104
  * Cleans up all resources
104
105
  */
105
106
  private unmount;
107
+ private onClearAllButtonClicked;
108
+ private onSubmitButtonClicked;
109
+ private onPauseButtonClicked;
106
110
  /**
107
111
  * This listener is used to remove the event listeners when the overlay is removed
108
112
  * from the data capture view
109
113
  */
110
114
  private onContextUpdatedListener;
111
- private hasClickedOutsideOfCardList;
112
- private onClickOutside;
113
- private initializeCards;
114
- private onCardListClick;
115
- private onTextInputAimerIconClick;
115
+ private onClickedOutsideList;
116
+ private initializeInputs;
117
+ private onTextInputScanIconClick;
116
118
  private onTextInputClearIconClick;
117
- private determineCardStateOnSubmit;
118
- private onInputManuallyButtonClick;
119
- private onSubmitButtonClick;
120
- private onRestartButtonClick;
121
- private expandListAndShowSubmitAndRestartButton;
122
- private onBackButton;
123
- private resetAllCardsTextInputFields;
119
+ private onTextInputFocus;
120
+ private onTextInputBlur;
121
+ private _refocusInputForCorrection;
122
+ private _restoreLayoutAndHideKeyboard;
123
+ private restoreButtonsBasedOnState;
124
+ private onTextInputKeydown;
124
125
  private standByCamera;
125
126
  private activateCamera;
126
- private updateCard;
127
- private setInitialState;
128
- private setReadyState;
129
- private setErrorState;
130
- private setLoadingState;
131
127
  private handleLabelIsMissingRequiredFieldState;
132
- private handleOnFinished;
133
- private showCardListAndHideInputManuallyButton;
134
- private hideCardListAndShowInputManuallyButton;
135
128
  private handleOnFieldsScanned;
129
+ private enableSubmitButtonIfNeeded;
130
+ private updateInput;
131
+ private updateFieldValueAndState;
136
132
  private handleScanTimeout;
133
+ private setInputsLoadingState;
134
+ private setInputsCloudBackupState;
137
135
  private handleInPauseScan;
138
136
  private handleInCompleteScan;
139
137
  private handleInPartialScan;
140
- private handleOnCloudBackupServiceStartedForFields;
141
- private handleOnCloudBackupServiceFailedForFields;
138
+ private handleOnCloudBackupServiceStarted;
139
+ private handleOnCloudBackupServiceStopped;
142
140
  private onWorkerMessage;
143
141
  }
144
142
 
@@ -1 +1 @@
1
- export{a as LabelCaptureValidationFlowOverlay}from'../chunks/chunk-VAZEF7GZ.js';
1
+ export{a as LabelCaptureValidationFlowOverlay}from'../chunks/chunk-6O4CVQF2.js';
@@ -2,13 +2,13 @@ import { nativeHandle } from '@scandit/web-datacapture-core/build/js/private/nat
2
2
 
3
3
  declare class LabelCaptureValidationFlowSettings {
4
4
  private [nativeHandle];
5
- private missingFieldsHintText;
6
- private standbyHintText;
7
- private validationHintText;
8
- private validationErrorText;
9
- private requiredFieldErrorText;
10
- private manualInputButtonText;
5
+ /**
6
+ * @deprecated This method is deprecated and will be removed in a future release.
7
+ */
11
8
  setMissingFieldsHintText(text: string): Promise<void>;
9
+ /**
10
+ * @deprecated This method is deprecated and will be removed in a future release.
11
+ */
12
12
  getMissingFieldsHintText(): Promise<string>;
13
13
  setStandbyHintText(text: string): Promise<void>;
14
14
  getStandbyHintText(): Promise<string>;
@@ -16,10 +16,34 @@ declare class LabelCaptureValidationFlowSettings {
16
16
  getValidationHintText(): Promise<string>;
17
17
  setValidationErrorText(text: string): Promise<void>;
18
18
  getValidationErrorText(): Promise<string>;
19
+ /**
20
+ * @deprecated This method is deprecated and will be removed in a future release.
21
+ */
19
22
  setRequiredFieldErrorText(text: string): Promise<void>;
23
+ /**
24
+ * @deprecated This method is deprecated and will be removed in a future release.
25
+ */
20
26
  getRequiredFieldErrorText(): Promise<string>;
27
+ /**
28
+ * @deprecated 8.2
29
+ */
21
30
  setManualInputButtonText(text: string): Promise<void>;
31
+ /**
32
+ * @deprecated 8.2
33
+ */
22
34
  getManualInputButtonText(): Promise<string>;
35
+ setFinishButtonText(text: string): Promise<void>;
36
+ getFinishButtonText(): Promise<string>;
37
+ setRestartButtonText(text: string): Promise<void>;
38
+ getRestartButtonText(): Promise<string>;
39
+ setPauseButtonText(text: string): Promise<void>;
40
+ getPauseButtonText(): Promise<string>;
41
+ setAdaptiveScanningText(text: string): Promise<void>;
42
+ getAdaptiveScanningText(): Promise<string>;
43
+ setScanningText(text: string): Promise<void>;
44
+ getScanningText(): Promise<string>;
45
+ setPlaceholderTextForLabelDefinition(fieldName: string, placeholder: string | undefined): Promise<void>;
46
+ getPlaceholderTextForLabelDefinition(fieldName: string): Promise<string | undefined>;
23
47
  private constructor();
24
48
  static create(): Promise<LabelCaptureValidationFlowSettings>;
25
49
  }
@@ -1 +1 @@
1
- export{a as LabelCaptureValidationFlowSettings}from'../chunks/chunk-2BXP3X3H.js';
1
+ export{a as LabelCaptureValidationFlowSettings}from'../chunks/chunk-CS7EEHHH.js';
@@ -15,7 +15,7 @@ import { DateText } from './DateText.js';
15
15
  import { ExpiryDateText } from './ExpiryDateText.js';
16
16
  import '@scandit/web-datacapture-barcode';
17
17
  import './BarcodeField.js';
18
- import '../NativeProxy-B98bIlIp.js';
18
+ import '../NativeProxy-DreJVzqM.js';
19
19
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
20
20
  import '../djinni-types/sdcBarcodeInternalSdkData.js';
21
21
  import '../djinni-types/sdcBarcodeData.js';
@@ -1,5 +1,5 @@
1
1
  import { nativeHandle } from '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
2
- import { N as NativeProxyHandle } from '../NativeProxy-B98bIlIp.js';
2
+ import { N as NativeProxyHandle } from '../NativeProxy-DreJVzqM.js';
3
3
  import { LabelDateFormat } from './LabelDateFormat.js';
4
4
  import { TextField } from './TextField.js';
5
5
  import '@scandit/web-datacapture-barcode';
@@ -2,7 +2,7 @@ import { PackingDateText } from './PackingDateText.js';
2
2
  import { TextFieldBuilder } from './TextFieldBuilder.js';
3
3
  import { LabelDateFormat } from './LabelDateFormat.js';
4
4
  import '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
5
- import '../NativeProxy-B98bIlIp.js';
5
+ import '../NativeProxy-DreJVzqM.js';
6
6
  import '@scandit/web-datacapture-barcode';
7
7
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
8
8
  import '../djinni-types/sdcBarcodeInternalSdkData.js';
@@ -1 +1 @@
1
- export{a as PartNumberBarcodeBuilder}from'../chunks/chunk-RMO2SLDR.js';
1
+ export{a as PartNumberBarcodeBuilder}from'../chunks/chunk-GEFDYKTD.js';
@@ -1,5 +1,5 @@
1
1
  import { PrivateReceiptScanningListener } from './PrivateReceiptScanningListener.js';
2
- import '../NativeProxy-B98bIlIp.js';
2
+ import '../NativeProxy-DreJVzqM.js';
3
3
  import '@scandit/web-datacapture-barcode';
4
4
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
5
5
  import '../djinni-types/sdcBarcodeInternalSdkData.js';
@@ -1,4 +1,4 @@
1
- import { a as ReceiptScanningResult } from '../NativeProxy-B98bIlIp.js';
1
+ import { a as ReceiptScanningResult } from '../NativeProxy-DreJVzqM.js';
2
2
  import '@scandit/web-datacapture-barcode';
3
3
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
4
4
  import '../djinni-types/sdcBarcodeInternalSdkData.js';
@@ -21,6 +21,7 @@ declare class PrivateValidationFlowHandler {
21
21
  pauseScan(): Promise<void>;
22
22
  resumeScan(): Promise<void>;
23
23
  validationFlowFields(): Promise<ValidationFlowField[]>;
24
+ clearAllFields(): Promise<void>;
24
25
  cancelCloudBackupTaskForField(fieldName: string): Promise<void>;
25
26
  uncancelCloudBackupTaskForField(fieldName: string): Promise<void>;
26
27
  }
@@ -1 +1 @@
1
- export{a as PrivateValidationFlowHandler}from'../chunks/chunk-SWSQIF4W.js';
1
+ export{a as PrivateValidationFlowHandler}from'../chunks/chunk-7UMN72SD.js';
@@ -1,4 +1,4 @@
1
- export { a as ReceiptScanningResult, R as ReceiptScanningResultJSON } from '../NativeProxy-B98bIlIp.js';
1
+ export { a as ReceiptScanningResult, R as ReceiptScanningResultJSON } from '../NativeProxy-DreJVzqM.js';
2
2
  import './ReceiptScanningLineItem.js';
3
3
  import '@scandit/web-datacapture-barcode';
4
4
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
@@ -1 +1 @@
1
- export{a as SerialNumberBarcodeBuilder}from'../chunks/chunk-5CNHCL7M.js';
1
+ export{a as SerialNumberBarcodeBuilder}from'../chunks/chunk-AVU64GAK.js';
@@ -1,5 +1,5 @@
1
1
  import { nativeHandle } from '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
2
- import { N as NativeProxyHandle } from '../NativeProxy-B98bIlIp.js';
2
+ import { N as NativeProxyHandle } from '../NativeProxy-DreJVzqM.js';
3
3
  import { TextField } from './TextField.js';
4
4
  import '@scandit/web-datacapture-barcode';
5
5
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
@@ -2,7 +2,7 @@ import { TextFieldBuilder } from './TextFieldBuilder.js';
2
2
  import { TotalPriceText } from './TotalPriceText.js';
3
3
  import './LabelFieldDefinitionBuilder.js';
4
4
  import '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
5
- import '../NativeProxy-B98bIlIp.js';
5
+ import '../NativeProxy-DreJVzqM.js';
6
6
  import '@scandit/web-datacapture-barcode';
7
7
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
8
8
  import '../djinni-types/sdcBarcodeInternalSdkData.js';
@@ -1,5 +1,5 @@
1
1
  import { nativeHandle } from '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
2
- import { N as NativeProxyHandle } from '../NativeProxy-B98bIlIp.js';
2
+ import { N as NativeProxyHandle } from '../NativeProxy-DreJVzqM.js';
3
3
  import { TextField } from './TextField.js';
4
4
  import '@scandit/web-datacapture-barcode';
5
5
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
@@ -2,7 +2,7 @@ import { TextFieldBuilder } from './TextFieldBuilder.js';
2
2
  import { UnitPriceText } from './UnitPriceText.js';
3
3
  import './LabelFieldDefinitionBuilder.js';
4
4
  import '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
5
- import '../NativeProxy-B98bIlIp.js';
5
+ import '../NativeProxy-DreJVzqM.js';
6
6
  import '@scandit/web-datacapture-barcode';
7
7
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
8
8
  import '../djinni-types/sdcBarcodeInternalSdkData.js';
@@ -1,5 +1,5 @@
1
1
  import { nativeHandle } from '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
2
- import { N as NativeProxyHandle } from '../NativeProxy-B98bIlIp.js';
2
+ import { N as NativeProxyHandle } from '../NativeProxy-DreJVzqM.js';
3
3
  import { TextField } from './TextField.js';
4
4
  import '@scandit/web-datacapture-barcode';
5
5
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
@@ -2,7 +2,7 @@ import { TextFieldBuilder } from './TextFieldBuilder.js';
2
2
  import { WeightText } from './WeightText.js';
3
3
  import './LabelFieldDefinitionBuilder.js';
4
4
  import '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
5
- import '../NativeProxy-B98bIlIp.js';
5
+ import '../NativeProxy-DreJVzqM.js';
6
6
  import '@scandit/web-datacapture-barcode';
7
7
  import '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
8
8
  import '../djinni-types/sdcBarcodeInternalSdkData.js';
@@ -0,0 +1 @@
1
+ var i=class{constructor(e){this.workerMain=e;}onFieldsScanned(e){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnFieldsScanned",payload:{fields:e.map(a=>({labelField:JSON.parse(a.getLabelField().toJson()),valid:a.isValid()}))}});}onScanTimeout(){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnScanTimeout"});}onLabelIsMissingRequiredField(e){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnLabelIsMissingRequiredField",payload:{fields:e.map(a=>({labelField:JSON.parse(a.getLabelField().toJson()),valid:a.isValid()}))}});}onManualInput(e,a,l){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnManualInput",payload:{field:{labelField:JSON.parse(e.getLabelField().toJson()),valid:e.isValid()},oldValue:a,newValue:l}});}onCloudBackupServiceStarted(){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnCloudBackupServiceStarted"});}onCloudBackupServiceStopped(){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnCloudBackupServiceStopped"});}onStateChanged(e){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnStateChanged",payload:{state:e}});}};export{i as a};
@@ -0,0 +1 @@
1
+ import {b}from'./chunk-JTZCA3DV.js';import {b as b$1}from'./chunk-E2ZQGWKI.js';import {a as a$1}from'./chunk-CS7EEHHH.js';import {a as a$2}from'./chunk-SUEFKTEN.js';import {a as a$3}from'./chunk-ZU6C4VWO.js';import {a}from'./chunk-SYDG6PPD.js';import {isCameraFrameSource,Logger,FrameSourceState}from'@scandit/web-datacapture-core';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';import {teals}from'@scandit/web-datacapture-core/build/js/private/ui/colors.js';function f(l){return l?`${l.day} - ${l.month} - ${l.year}`:""}function g(l){var e,a;let t="";switch(l.type){case a$3.Text:{t=l.text||"";break}case a$3.Barcode:{t=((e=l.barcode)==null?void 0:e.data)||l.text||"";break}default:{t=l.text||((a=l.barcode)==null?void 0:a.data)||f(l.date)||"";break}}return t}function L({name:l,type:t,label:e,value:a,required:i,loadingText:o}){let n=b$1.create();return n.type=t,n.label=e,n.value=a,n.required=i,n.name=l,n.loadingText=o,n.useVirtualKeyboardAPI=true,n}var k={3:"Paused",4:"Finished",2:"In complete scan",1:"In partial scan",0:"Idle"};function m(l){return l.map(t=>a$2.fromJSONObject(t))}var w=class w{constructor(t,e,a){this.listener={onValidationFlowLabelCaptured:t=>{},onManualInput:(t,e,a)=>{}};this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.onContextUpdatedListenerHandler=this.onContextUpdatedListener.bind(this);this.onClearAllButtonClickedHandler=this.onClearAllButtonClicked.bind(this);this.onSubmitButtonClickedHandler=this.onSubmitButtonClicked.bind(this);this.onPauseButtonClickedHandler=this.onPauseButtonClicked.bind(this);this.onTextInputScanIconClickHandler=this.onTextInputScanIconClick.bind(this);this.onTextInputClearIconClickHandler=this.onTextInputClearIconClick.bind(this);this.onTextInputKeydownHandler=t=>{let e=t;return this.onTextInputKeydown(e)};this.currentInput=null;this.isProcessingFocus=false;this.isProcessingBlur=false;this.onTextInputFocusHandler=this.onTextInputFocus.bind(this);this.onTextInputBlurHandler=this.onTextInputBlur.bind(this);this.onClickedOutsideListHandler=this.onClickedOutsideList.bind(this);this.dataCaptureViewRoot=null;this[nativeHandle]=t,this.validationFlowHandler=e,this.validationFlowSettings=a;for(let i of [b,b$1])i.register();}get camera(){return this.labelCapture.context&&isCameraFrameSource(this.labelCapture.context.frameSource)?this.labelCapture.context.frameSource:null}static async withLabelCaptureForView(t,e){var r;let a$2=await a().workerCommand("validationFlowOverlayForLabelCapture",{payload:{labelCaptureHandle:t[nativeHandle]}}),i=await t.validationFlowHandler(),o=await a$1.create(),n=new w(a$2,i,o);return n.labelCapture=t,n.dataCaptureView=e,(r=t.context)==null||r.updateListeners.add(n.onContextUpdatedListenerHandler),await e.addOverlay(n),n}async applySettings(t){this.validationFlowSettings=t,await a().workerCommand("validationFlowOverlayApplySettings",{payload:{overlayHandle:this[nativeHandle],settingsHandle:t[nativeHandle]}}),this.layout&&(this.layout.finishButtonText=t.finishButtonText,this.layout.restartButtonText=t.restartButtonText,this.layout.pauseButtonText=t.pauseButtonText);}toJSONObject(){return {type:"ValidationFlowOverlay",nativeHandle:this[nativeHandle]}}async goToCompleteScan(){await this.validationFlowHandler.startCompleteLabelScan("");let t=await this.validationFlowHandler.validationFlowFields();this.initializeInputs(t),this.setInputsLoadingState(true),t.length===1&&await this.onTextInputScanIconClickHandler();}async mount(t){var e,a$1;a().addWorkerListener(this.onWorkerMessageHandler),this.layout=b.create(),this.dataCaptureViewRoot=t.htmlElement,t.detachFromElement(),(e=this.dataCaptureViewRoot)==null||e.append(this.layout),t.connectToElement(this.layout.dataCaptureViewContainer),this.layout.finishButtonText=this.validationFlowSettings.finishButtonText,this.layout.restartButtonText=this.validationFlowSettings.restartButtonText,this.layout.pauseButtonText=this.validationFlowSettings.pauseButtonText,this.layout.addEventListener("scandit-text-input-scan",this.onTextInputScanIconClickHandler),this.layout.addEventListener("scandit-text-input-clear",this.onTextInputClearIconClickHandler),this.layout.addEventListener("scandit-text-input-focus",this.onTextInputFocusHandler),this.layout.addEventListener("scandit-text-input-blur",this.onTextInputBlurHandler);for(let i of this.layout.getInputs())i.addEventListener("keydown",this.onTextInputKeydownHandler);this.layout.addEventListener("scandit-clear-all-button-clicked",this.onClearAllButtonClickedHandler),(a$1=this.layout.submitButton)==null||a$1.addEventListener("click",this.onSubmitButtonClickedHandler),this.layout.addEventListener("scandit-pause-button-clicked",this.onPauseButtonClickedHandler),this.layout.addEventListener("scandit-clicked-outside-list",this.onClickedOutsideListHandler);}async unmount(){var t,e,a$1,i;this.isProcessingFocus=false,this.isProcessingBlur=false,this.currentInput=null,a().removeWorkerListener(this.onWorkerMessageHandler),(e=(t=this.labelCapture)==null?void 0:t.context)==null||e.updateListeners.delete(this.onContextUpdatedListenerHandler),this.layout.removeEventListener("scandit-text-input-scan",this.onTextInputScanIconClickHandler),this.layout.removeEventListener("scandit-text-input-clear",this.onTextInputClearIconClickHandler),this.layout.removeEventListener("scandit-text-input-focus",this.onTextInputFocusHandler),this.layout.removeEventListener("scandit-text-input-blur",this.onTextInputBlurHandler);for(let o of this.layout.getInputs())o.removeEventListener("keydown",this.onTextInputKeydownHandler);this.layout.removeEventListener("scandit-clear-all-button-clicked",this.onClearAllButtonClickedHandler),(a$1=this.layout.submitButton)==null||a$1.removeEventListener("click",this.onSubmitButtonClickedHandler),this.layout.removeEventListener("scandit-pause-button-clicked",this.onPauseButtonClickedHandler),this.layout.removeEventListener("scandit-clicked-outside-list",this.onClickedOutsideListHandler),(i=this.layout)==null||i.remove(),this.dataCaptureView.detachFromElement(),this.dataCaptureView.connectToElement(this.dataCaptureViewRoot);}async onClearAllButtonClicked(t){let e=t.detail.inputs,a=[];for(let i of e)this.updateInput(i,"initial",""),a.push(this.validationFlowHandler.cancelCloudBackupTaskForField(i.name));await Promise.all(a),await this.validationFlowHandler.clearAllFields(),await this.validationFlowHandler.pauseScan();}async onSubmitButtonClicked(){this.currentInput=null;let t=await this.validationFlowHandler.onFinishFlowRequested();t.type==="result"?this.listener.onValidationFlowLabelCaptured(m(t.result).map(e=>e.getLabelField())):Logger.info("Validation flow overlay: on finish flow requested error:",t.error);}async onPauseButtonClicked(){await this.validationFlowHandler.pauseScan(),this.layout.showValidationButtons();}async onContextUpdatedListener(t){t.type==="removeOverlay"&&t.newValue===this&&await this.unmount(),t.type==="addOverlay"&&t.newValue===this&&(await this.mount(this.dataCaptureView),await this.goToCompleteScan()),t.type==="modeEnabled"&&t.newValue&&(this.validationFlowHandlerState===4||this.validationFlowHandlerState===0)&&(Logger.debug("Validation flow overlay: mode enabled and validation flow finished, going to complete scan"),await this.goToCompleteScan());}async onClickedOutsideList(){await this.validationFlowHandler.resumeScan();}initializeInputs(t){var a;for(let i of this.layout.getInputs())i.removeEventListener("keydown",this.onTextInputKeydownHandler);let e=[];for(let i of t){let o=i.getLabelField(),n=L({name:o.name,type:"text",label:o.isRequired?o.name:`${o.name} (optional)`,loadingText:this.validationFlowSettings.scanningText||"Scanning",value:(a=o.text)!=null?a:"",required:o.isRequired});e.push(n);}for(let i of this.layout.getInputs())i.remove();this.layout.appendInputs(...e);for(let i of this.layout.getInputs())i.addEventListener("keydown",this.onTextInputKeydownHandler);}async onTextInputScanIconClick(t){var a;let e=this.layout.getInputs();this.currentInput=(a=t==null?void 0:t.detail.target)!=null?a:e.length>0?e[0]:null,this.currentInput&&(this.currentInput.value="",this.currentInput.blur(),await this.validationFlowHandler.startPartialLabelScan([this.currentInput.name]));}async onTextInputClearIconClick(t){this.currentInput=t==null?void 0:t.detail.target,this.currentInput&&(await this.validationFlowHandler.updateFieldValue(this.currentInput.name,""),this.updateInput(this.currentInput,"initial",""),await this.validationFlowHandler.pauseScan());}async onTextInputFocus(t){var i;let e=t.detail.target;if(!(!e||(this.isCloudBackupProcessing&&this.validationFlowHandler.cancelCloudBackupTaskForField(e.name),this.validationFlowHandlerState===2&&await this.validationFlowHandler.pauseScan(),this.currentInput===e||this.isProcessingFocus))){this.isProcessingFocus=true;try{this.currentInput=e,this.layout.hideAllButtons(),await this.layout.moveInputToTop(e),e.backgroundColor="",this.currentInput.placeholder=(i=await this.validationFlowSettings.getPlaceholderTextForLabelDefinition(e.name))!=null?i:"",await e.showKeyboard({scrollTimeout:200});}finally{this.isProcessingFocus=false;}}}async onTextInputBlur(t){if(this.currentInput&&!this.isProcessingBlur){this.isProcessingBlur=true;try{this.currentInput.value.trim()!==""?await this.updateFieldValueAndState(this.currentInput)?await this._restoreLayoutAndHideKeyboard():await this._refocusInputForCorrection():await this._restoreLayoutAndHideKeyboard();}finally{this.isProcessingBlur=false;}}}async _refocusInputForCorrection(){this.currentInput&&await this.currentInput.showKeyboard({scrollTimeout:200});}async _restoreLayoutAndHideKeyboard(){this.currentInput&&(this.currentInput.placeholder="",await this.layout.restoreInputsPositions(),this.restoreButtonsBasedOnState(),this.isCloudBackupProcessing&&await this.validationFlowHandler.uncancelCloudBackupTaskForField(this.currentInput.name),this.currentInput=null,this.isProcessingFocus=false,this.isProcessingBlur=false);}restoreButtonsBasedOnState(){switch(this.validationFlowHandlerState){case 2:case 1:this.layout.showScanningButtons();break;case 3:this.layout.showValidationButtons();break;default:this.layout.hideAllButtons();break}}async onTextInputKeydown(t){if(t.key==="Enter"){t.preventDefault();let e=t.target;e&&e.value.trim()!==""&&e.blur();}}async standByCamera(){this.camera&&await this.camera.switchToDesiredState(FrameSourceState.Standby);}async activateCamera(){this.camera&&await this.camera.switchToDesiredState(FrameSourceState.On);}async handleLabelIsMissingRequiredFieldState(t){for(let e of t){let a=e.getLabelField(),i=this.layout.getInputByName(a.name);if(i!=null){let o=e.isValid()?"validated":"error",n=a.isRequired?this.validationFlowSettings.requiredFieldErrorText:this.validationFlowSettings.validationErrorText;this.updateInput(i,o,i.value,n);}}}handleOnFieldsScanned(t){var e;this.labelCapture.feedback.success.emit(),this.layout.showValidationButtons(),(e=this.currentInput)==null||e.blur();for(let a of t){let i=a.getLabelField(),o=g(i),n=this.layout.getInputByName(i.name);if(!n)continue;let r="initial";a.isValid()?r="validated":(i.isRequired||o)&&(r="error");let F=i.isRequired?this.validationFlowSettings.requiredFieldErrorText:this.validationFlowSettings.validationErrorText;this.updateInput(n,r,o,F);}}enableSubmitButtonIfNeeded(t){if(!this.layout.submitButton)return;let e=true;for(let a of t)if(a.required&&(a.value.trim()===""||a.invalid)){e=false;break}this.layout.submitButton.disabled=!e;}updateInput(t,e,a,i){switch(t.value=a,e){case "initial":t.resetValidation(),t.backgroundColor="",t.loading=false;break;case "scanning":t.resetValidation(),t.backgroundColor="",t.loading=true,t.loadingText=this.validationFlowSettings.scanningText||"Scanning";break;case "cloudBackup":t.resetValidation(),t.backgroundColor="",t.loading=true,t.loadingText=this.validationFlowSettings.adaptiveScanningText||"Processing, tap to type manually";break;case "validated":t.resetValidation(),t.backgroundColor=teals.teal10,t.loading=false;break;case "error":{let o=i||(t.required?this.validationFlowSettings.requiredFieldErrorText:this.validationFlowSettings.validationErrorText);t.setValidationState(false,o),t.backgroundColor="",t.loading=false;break}}this.enableSubmitButtonIfNeeded(this.layout.getInputs());}async updateFieldValueAndState(t){if(!t.required&&t.value.trim()===""){let a=await this.validationFlowHandler.updateFieldValue(t.name,t.value);return this.updateInput(t,"initial",t.value),a}let e=await this.validationFlowHandler.updateFieldValue(t.name,t.value);return this.updateInput(t,e?"initial":"error",t.value),e}async handleScanTimeout(){await this.validationFlowHandler.pauseScan();}setInputsLoadingState(t){let e=this.layout.getInputs();for(let a of e)t&&a.value.trim()===""?this.updateInput(a,"scanning",a.value):this.updateInput(a,"initial",a.value);}setInputsCloudBackupState(t){let e=this.layout.getInputs();for(let a of e)t&&a.value.trim()===""?this.updateInput(a,"cloudBackup",a.value):this.updateInput(a,"initial",a.value);}async handleInPauseScan(){var t;this.layout.showValidationButtons(),this.setInputsLoadingState(false),await Promise.all([(t=this.layout.backdrop)==null?void 0:t.show(),this.standByCamera()]);}async handleInCompleteScan(){var t;this.layout.showScanningButtons(),this.setInputsLoadingState(true),await Promise.all([(t=this.layout.backdrop)==null?void 0:t.hide(),this.activateCamera()]);}async handleInPartialScan(){var t;this.layout.showScanningButtons(),this.setInputsLoadingState(true),await Promise.all([(t=this.layout.backdrop)==null?void 0:t.hide(),this.activateCamera()]);}handleOnCloudBackupServiceStarted(){this.isCloudBackupProcessing=true,this.layout.showAdaptiveRecognitionOverlay(),this.setInputsCloudBackupState(true);}handleOnCloudBackupServiceStopped(){this.isCloudBackupProcessing=false,this.layout.hideAdaptiveRecognitionOverlay(),this.setInputsCloudBackupState(false);}async onWorkerMessage(t){switch(t.type){case "validationFlowListenerOnFieldsScanned":{this.handleOnFieldsScanned(m(t.payload.fields));break}case "validationFlowListenerOnScanTimeout":{await this.handleScanTimeout();break}case "validationFlowListenerOnLabelIsMissingRequiredField":{let e=m(t.payload.fields);await this.handleLabelIsMissingRequiredFieldState(e);break}case "validationFlowListenerOnManualInput":{let e=a$2.fromJSONObject(t.payload.field);this.listener.onManualInput(e.getLabelField(),t.payload.oldValue,t.payload.newValue);break}case "validationFlowListenerOnStateChanged":switch(this.validationFlowHandlerState=t.payload.state,Logger.debug(`Validation flow overlay: entering in ${k[t.payload.state]} state`),t.payload.state){case 2:await this.handleInCompleteScan();break;case 1:await this.handleInPartialScan();break;case 3:await this.handleInPauseScan();break}break;case "validationFlowListenerOnCloudBackupServiceStarted":this.handleOnCloudBackupServiceStarted();break;case "validationFlowListenerOnCloudBackupServiceStopped":this.handleOnCloudBackupServiceStopped();break}}},C=w;export{C as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-SUEFKTEN.js';import {a}from'./chunk-SYDG6PPD.js';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var l=class l{constructor(a,r){this[nativeHandle]=a,this.labelCaptureWorkerManager=r;}static async create(a$1){let r=a(),n=await r.workerCommand("validationFlowHandlerCreate",{payload:{labelCaptureHandle:a$1[nativeHandle]}});return new l(n,r)}async startCompleteLabelScan(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerStartCompleteLabelScan",{payload:{labelCaptureHandle:this[nativeHandle],labelName:a}});}async startPartialLabelScan(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerStartPartialLabelScan",{payload:{labelCaptureHandle:this[nativeHandle],fieldNames:a}});}async updateFieldValue(a,r){return await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerUpdateFieldValue",{payload:{labelCaptureHandle:this[nativeHandle],fieldName:a,value:r}})}async onFinishFlowRequested(){return await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerFinishFlow",{payload:{labelCaptureHandle:this[nativeHandle]}})}async pauseScan(){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerPauseScan",{payload:{labelCaptureHandle:this[nativeHandle]}});}async resumeScan(){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerResumeScan",{payload:{labelCaptureHandle:this[nativeHandle]}});}async validationFlowFields(){return (await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerGetValidationFlowFields",{payload:{labelCaptureHandle:this[nativeHandle]}})).map(r=>a$1.fromJSONObject(r))}async cancelCloudBackupTaskForField(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerCancelCloudBackupTaskForField",{payload:{labelCaptureHandle:this[nativeHandle],fieldName:a}});}async uncancelCloudBackupTaskForField(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerUncancelCloudBackupTaskForField",{payload:{labelCaptureHandle:this[nativeHandle],fieldName:a}});}},t=l;export{t as a};
1
+ import {a as a$1}from'./chunk-SUEFKTEN.js';import {a}from'./chunk-SYDG6PPD.js';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var l=class l{constructor(a,r){this[nativeHandle]=a,this.labelCaptureWorkerManager=r;}static async create(a$1){let r=a(),n=await r.workerCommand("validationFlowHandlerCreate",{payload:{labelCaptureHandle:a$1[nativeHandle]}});return new l(n,r)}async startCompleteLabelScan(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerStartCompleteLabelScan",{payload:{labelCaptureHandle:this[nativeHandle],labelName:a}});}async startPartialLabelScan(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerStartPartialLabelScan",{payload:{labelCaptureHandle:this[nativeHandle],fieldNames:a}});}async updateFieldValue(a,r){return await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerUpdateFieldValue",{payload:{labelCaptureHandle:this[nativeHandle],fieldName:a,value:r}})}async onFinishFlowRequested(){return await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerFinishFlow",{payload:{labelCaptureHandle:this[nativeHandle]}})}async pauseScan(){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerPauseScan",{payload:{labelCaptureHandle:this[nativeHandle]}});}async resumeScan(){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerResumeScan",{payload:{labelCaptureHandle:this[nativeHandle]}});}async validationFlowFields(){return (await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerGetValidationFlowFields",{payload:{labelCaptureHandle:this[nativeHandle]}})).map(r=>a$1.fromJSONObject(r))}async clearAllFields(){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerClearAllFields",{payload:{labelCaptureHandle:this[nativeHandle]}});}async cancelCloudBackupTaskForField(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerCancelCloudBackupTaskForField",{payload:{labelCaptureHandle:this[nativeHandle],fieldName:a}});}async uncancelCloudBackupTaskForField(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerUncancelCloudBackupTaskForField",{payload:{labelCaptureHandle:this[nativeHandle],fieldName:a}});}},t=l;export{t as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-IUFE5KAN.js';import {a}from'./chunk-SYDG6PPD.js';import {NotificationConfiguration,FrameSourceState}from'@scandit/web-datacapture-core';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var c=class c{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 NotificationConfiguration("A failure occurred","AdaptiveRecognitionOverlayError");this._isProcessing=false;this[nativeHandle]=e,this.labelCapture=t;}toJSONObject(){return {type:"AdaptiveRecognitionOverlay",nativeHandle:this[nativeHandle]}}static async withLabelCaptureForView(e,t){var n,o;let a$1=await a().workerCommand("receiptScanningOverlayForLabelCapture",{payload:{labelCaptureHandle:e[nativeHandle]}}),i=new c(a$1,e);return i.receiptScanningHandler=await e.receiptScanningHandler(),(n=i.receiptScanningHandler)==null||n.addListener(i.handlerListener),(o=e.context)==null||o.updateListeners.add(i.onContextUpdatedListenerHandler),t&&await t.addOverlay(i),i}async onProcessingStarted(){var e,t,a,i,n;this._isProcessing||((t=(e=this.dataCaptureView)==null?void 0:e.getNotificationPresenter())==null||t.hideNotification(this.failedNotificationConfiguration),this.showProcessingAnimation(),this._isProcessing=true,await((n=(i=(a=this.labelCapture)==null?void 0:a.context)==null?void 0:i.frameSource)==null?void 0:n.switchToDesiredState(FrameSourceState.Standby)));}async onReceiptScanned(e){var t,a;this.hideProcessingAnimation(),(a=(t=this.listener)==null?void 0:t.onRecognized)==null||a.call(t,e),this._isProcessing=false;}async onReceiptScanningFailed(){var e,t,a,i,n,o,d,s,u;this.hideProcessingAnimation(),(t=(e=this.listener)==null?void 0:e.onFailure)==null||t.call(e),this._isProcessing=false,await((i=(a=this.dataCaptureView)==null?void 0:a.getNotificationPresenter())==null?void 0:i.showNotification(this.failedNotificationConfiguration)),await((n=this.labelCapture)==null?void 0:n.setEnabled(true)),await((u=(s=(d=(o=this.labelCapture)==null?void 0:o.context)==null?void 0:d.frameSource)==null?void 0:s.switchToDesiredState)==null?void 0:u.call(s,FrameSourceState.On));}async applySettings(e){await a().workerCommand("receiptScanningOverlayApplySettings",{payload:{overlayHandle:this[nativeHandle],settingsHandle:e[nativeHandle]}});}async mount(e){this.dataCaptureView=e,this.setupUI();}unmount(){var e,t,a,i;(e=this.receiptScanningHandler)==null||e.removeListener(this.handlerListener),(a=(t=this.labelCapture)==null?void 0:t.context)==null||a.updateListeners.delete(this.onContextUpdatedListenerHandler),(i=this.overlayElement)==null||i.remove(),this.overlayElement=null,this.dataCaptureView=null,this.labelCapture=null,this.receiptScanningHandler=null,this._isProcessing=false;}async onContextUpdatedListener(e){var t;e.type==="removeOverlay"&&e.newValue===this&&this.unmount(),e.type==="addOverlay"&&e.newValue===this&&(this.mount(e.view),await((t=this.receiptScanningHandler)==null?void 0:t.startFlow()));}setupUI(){if(!this.dataCaptureView)return;a$1.register();let e=a$1.create();e.show=false,this.overlayElement=e;let t=this.dataCaptureView.htmlElement;t&&t.prepend(this.overlayElement);}showProcessingAnimation(){this.overlayElement&&!this.overlayElement.show&&!this._isProcessing&&(this.overlayElement.show=true);}hideProcessingAnimation(){var e;(e=this.overlayElement)!=null&&e.show&&this._isProcessing&&(this.overlayElement.show=false);}},h=c;export{h as a};
1
+ import {a as a$1}from'./chunk-CHBH6UKJ.js';import {a}from'./chunk-SYDG6PPD.js';import {NotificationConfiguration,FrameSourceState}from'@scandit/web-datacapture-core';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var c=class c{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 NotificationConfiguration("A failure occurred","AdaptiveRecognitionOverlayError");this._isProcessing=false;this[nativeHandle]=e,this.labelCapture=t;}toJSONObject(){return {type:"AdaptiveRecognitionOverlay",nativeHandle:this[nativeHandle]}}static async withLabelCaptureForView(e,t){var n,o;let a$1=await a().workerCommand("receiptScanningOverlayForLabelCapture",{payload:{labelCaptureHandle:e[nativeHandle]}}),i=new c(a$1,e);return i.receiptScanningHandler=await e.receiptScanningHandler(),(n=i.receiptScanningHandler)==null||n.addListener(i.handlerListener),(o=e.context)==null||o.updateListeners.add(i.onContextUpdatedListenerHandler),t&&await t.addOverlay(i),i}async onProcessingStarted(){var e,t,a,i,n;this._isProcessing||((t=(e=this.dataCaptureView)==null?void 0:e.getNotificationPresenter())==null||t.hideNotification(this.failedNotificationConfiguration),this.showProcessingAnimation(),this._isProcessing=true,await((n=(i=(a=this.labelCapture)==null?void 0:a.context)==null?void 0:i.frameSource)==null?void 0:n.switchToDesiredState(FrameSourceState.Standby)));}async onReceiptScanned(e){var t,a;this.hideProcessingAnimation(),(a=(t=this.listener)==null?void 0:t.onRecognized)==null||a.call(t,e),this._isProcessing=false;}async onReceiptScanningFailed(){var e,t,a,i,n,o,d,s,u;this.hideProcessingAnimation(),(t=(e=this.listener)==null?void 0:e.onFailure)==null||t.call(e),this._isProcessing=false,await((i=(a=this.dataCaptureView)==null?void 0:a.getNotificationPresenter())==null?void 0:i.showNotification(this.failedNotificationConfiguration)),await((n=this.labelCapture)==null?void 0:n.setEnabled(true)),await((u=(s=(d=(o=this.labelCapture)==null?void 0:o.context)==null?void 0:d.frameSource)==null?void 0:s.switchToDesiredState)==null?void 0:u.call(s,FrameSourceState.On));}async applySettings(e){await a().workerCommand("receiptScanningOverlayApplySettings",{payload:{overlayHandle:this[nativeHandle],settingsHandle:e[nativeHandle]}});}async mount(e){this.dataCaptureView=e,this.setupUI();}unmount(){var e,t,a,i;(e=this.receiptScanningHandler)==null||e.removeListener(this.handlerListener),(a=(t=this.labelCapture)==null?void 0:t.context)==null||a.updateListeners.delete(this.onContextUpdatedListenerHandler),(i=this.overlayElement)==null||i.remove(),this.overlayElement=null,this.dataCaptureView=null,this.labelCapture=null,this.receiptScanningHandler=null,this._isProcessing=false;}async onContextUpdatedListener(e){var t;e.type==="removeOverlay"&&e.newValue===this&&this.unmount(),e.type==="addOverlay"&&e.newValue===this&&(this.mount(e.view),await((t=this.receiptScanningHandler)==null?void 0:t.startFlow()));}setupUI(){if(!this.dataCaptureView)return;a$1.register();let e=a$1.create();e.show=false,this.overlayElement=e;let t=this.dataCaptureView.htmlElement;t&&t.prepend(this.overlayElement);}showProcessingAnimation(){this.overlayElement&&!this.overlayElement.show&&!this._isProcessing&&(this.overlayElement.show=true);}hideProcessingAnimation(){var e;(e=this.overlayElement)!=null&&e.show&&this._isProcessing&&(this.overlayElement.show=false);}},h=c;export{h as a};
@@ -1 +1 @@
1
- import {a as a$2}from'./chunk-UDGNT475.js';import {a as a$1}from'./chunk-SYDG6PPD.js';import {a}from'./chunk-WX63L6GU.js';var o=class extends a{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}async build(e){let a=await a$1().workerCommand("labelCaptureBuildSerialNumberBarcode",{payload:{name:e,dataTypePatterns:this.anchorRegexes,hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,symbologies:this.symbologies}}),r=a$2.forHandle(a);return r._isOptional=this._isOptional,r._name=e,r._valueRegexes=this.valueRegexes,r._symbologies=this.symbologySettings,r}getThis(){return this}};export{o as a};
1
+ import {a as a$2}from'./chunk-UDGNT475.js';import {a}from'./chunk-WX63L6GU.js';import {a as a$1}from'./chunk-SYDG6PPD.js';var o=class extends a{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}async build(e){let a=await a$1().workerCommand("labelCaptureBuildSerialNumberBarcode",{payload:{name:e,dataTypePatterns:this.anchorRegexes,hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,symbologies:this.symbologies}}),r=a$2.forHandle(a);return r._isOptional=this._isOptional,r._name=e,r._valueRegexes=this.valueRegexes,r._symbologies=this.symbologySettings,r}getThis(){return this}};export{o as a};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-SYDG6PPD.js';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var a=class a{constructor(t){this.missingFieldsHintText="";this.standbyHintText="";this.validationHintText="";this.validationErrorText="";this.requiredFieldErrorText="";this.manualInputButtonText="";this.finishButtonText="";this.restartButtonText="";this.pauseButtonText="";this.adaptiveScanningText="";this.scanningText="";this[nativeHandle]=t;}async setMissingFieldsHintText(t){await a$1().workerCommand("validationFlowSettingsSetMissingFieldsHintText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.missingFieldsHintText=t;}async getMissingFieldsHintText(){let t=await a$1().workerCommand("validationFlowSettingsGetMissingFieldsHintText",{payload:{settingsHandle:this[nativeHandle]}});return this.missingFieldsHintText=t,t}async setStandbyHintText(t){await a$1().workerCommand("validationFlowSettingsSetStandbyHintText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.standbyHintText=t;}async getStandbyHintText(){let t=await a$1().workerCommand("validationFlowSettingsGetStandbyHintText",{payload:{settingsHandle:this[nativeHandle]}});return this.standbyHintText=t,t}async setValidationHintText(t){await a$1().workerCommand("validationFlowSettingsSetValidationHintText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.validationHintText=t;}async getValidationHintText(){let t=await a$1().workerCommand("validationFlowSettingsGetValidationHintText",{payload:{settingsHandle:this[nativeHandle]}});return this.validationHintText=t,t}async setValidationErrorText(t){await a$1().workerCommand("validationFlowSettingsSetValidationErrorText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.validationErrorText=t;}async getValidationErrorText(){let t=await a$1().workerCommand("validationFlowSettingsGetValidationErrorText",{payload:{settingsHandle:this[nativeHandle]}});return this.validationErrorText=t,t}async setRequiredFieldErrorText(t){await a$1().workerCommand("validationFlowSettingsSetRequiredFieldErrorText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.requiredFieldErrorText=t;}async getRequiredFieldErrorText(){let t=await a$1().workerCommand("validationFlowSettingsGetRequiredFieldErrorText",{payload:{settingsHandle:this[nativeHandle]}});return this.requiredFieldErrorText=t,t}async setManualInputButtonText(t){await a$1().workerCommand("validationFlowSettingsSetManualInputButtonText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.manualInputButtonText=t;}async getManualInputButtonText(){let t=await a$1().workerCommand("validationFlowSettingsGetManualInputButtonText",{payload:{settingsHandle:this[nativeHandle]}});return this.manualInputButtonText=t,t}async setFinishButtonText(t){await a$1().workerCommand("validationFlowSettingsSetFinishButtonText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.finishButtonText=t;}async getFinishButtonText(){let t=await a$1().workerCommand("validationFlowSettingsGetFinishButtonText",{payload:{settingsHandle:this[nativeHandle]}});return this.finishButtonText=t,t}async setRestartButtonText(t){await a$1().workerCommand("validationFlowSettingsSetRestartButtonText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.restartButtonText=t;}async getRestartButtonText(){let t=await a$1().workerCommand("validationFlowSettingsGetRestartButtonText",{payload:{settingsHandle:this[nativeHandle]}});return this.restartButtonText=t,t}async setPauseButtonText(t){await a$1().workerCommand("validationFlowSettingsSetPauseButtonText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.pauseButtonText=t;}async getPauseButtonText(){let t=await a$1().workerCommand("validationFlowSettingsGetPauseButtonText",{payload:{settingsHandle:this[nativeHandle]}});return this.pauseButtonText=t,t}async setAdaptiveScanningText(t){await a$1().workerCommand("validationFlowSettingsSetAdaptiveScanningText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.adaptiveScanningText=t;}async getAdaptiveScanningText(){let t=await a$1().workerCommand("validationFlowSettingsGetAdaptiveScanningText",{payload:{settingsHandle:this[nativeHandle]}});return this.adaptiveScanningText=t,t}async setScanningText(t){await a$1().workerCommand("validationFlowSettingsSetScanningText",{payload:{settingsHandle:this[nativeHandle],text:t}}),this.scanningText=t;}async getScanningText(){let t=await a$1().workerCommand("validationFlowSettingsGetScanningText",{payload:{settingsHandle:this[nativeHandle]}});return this.scanningText=t,t}async setPlaceholderTextForLabelDefinition(t,e){await a$1().workerCommand("validationFlowSettingsSetPlaceholderTextForLabelDefinition",{payload:{settingsHandle:this[nativeHandle],fieldName:t,placeholder:e}});}async getPlaceholderTextForLabelDefinition(t){return await a$1().workerCommand("validationFlowSettingsGetPlaceholderTextForLabelDefinition",{payload:{settingsHandle:this[nativeHandle],fieldName:t}})}static async create(){let t=await a$1().workerCommand("validationFlowSettingsCreate",{payload:{}}),e=new a(t);return await Promise.all([e.getMissingFieldsHintText(),e.getStandbyHintText(),e.getValidationHintText(),e.getRequiredFieldErrorText(),e.getManualInputButtonText(),e.getValidationErrorText(),e.getFinishButtonText(),e.getRestartButtonText(),e.getPauseButtonText(),e.getAdaptiveScanningText(),e.getScanningText()]),e}},s=a;export{s as a};
@@ -0,0 +1 @@
1
+ import {BrowserHelper}from'@scandit/web-datacapture-core';import {Color}from'@scandit/web-datacapture-core/build/js/commons/Color.js';import {CrossSvgIcon}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/CrossSvgIcon.js';import {ScanSvgIcon}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/ScanSvgIcon.js';import {grays,reds}from'@scandit/web-datacapture-core/build/js/private/ui/colors.js';import {html,ScanditHTMLElement,css,Timeout,defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var E=(n=>(n.Input="scandit-text-input-input",n.Focus="scandit-text-input-focus",n.Blur="scandit-text-input-blur",n.Clear="scandit-text-input-clear",n.Scan="scandit-text-input-scan",n))(E||{}),y=html`<div class="main-wrapper"><label class="label-text"></label><div class="input-container"><input class="input" autocomplete="off"><div class="icons-container"><div id="icon-left"></div><hr class="icon-divider"><div id="icon-right"></div></div></div><div class="hint-message"></div></div>`,a=class a extends ScanditHTMLElement{constructor(){super();this._inputElement=null;this._labelElement=null;this._mainWrapper=null;this._inputContainer=null;this._iconContainerElement=null;this._hintMessageElement=null;this._type="text";this._value="";this._label="";this._placeholder="";this._required=false;this._isInitialized=false;this._handleChange=this._onChange.bind(this);this._handleInput=this._onInput.bind(this);this._handleFocus=this._onFocus.bind(this);this._handleBlur=this._onBlur.bind(this);this._handleCrossIconPointerDown=this._onCrossIconPointerDown.bind(this);this._handleCrossIconPointerUp=this._onCrossIconPointerUp.bind(this);this._handleCrossIconKeyDown=this._onCrossIconKeyDown.bind(this);this._handleScanIconPointerDown=this._onScanIconPointerDown.bind(this);this._handleScanIconPointerUp=this._onScanIconPointerUp.bind(this);this._handleScanIconKeyDown=this._onScanIconKeyDown.bind(this);this._crossIcon=null;this._scanIcon=null;this._showKeyboardTimeout=void 0;this._hintMessage="";this._loadingText="";this._useVirtualKeyboardAPI=false;this._virtualKeyboard=null;this._internals=this.attachInternals();let t=this.attachShadow({mode:"open"});t.innerHTML=y,t.appendChild(a.createStyleElement()),this._inputElement=t.querySelector(".input"),this._labelElement=t.querySelector(".label-text"),this._mainWrapper=t.querySelector(".main-wrapper"),this._inputContainer=t.querySelector(".input-container"),this._iconContainerElement=t.querySelector(".icons-container"),this._hintMessageElement=t.querySelector(".hint-message");}static createStyleElement(){return css`:host{display:block;-webkit-tap-highlight-color:transparent}input{background-color:initial;border:none;font-size:1rem;font-style:normal;font-weight:400;outline:none;padding:0;-webkit-tap-highlight-color:transparent;-webkit-appearance:none;appearance:none;color:#${grays.gray60.toJSON()};transition:color .2s ease-in-out;user-select:none;-webkit-user-select:none;width:100%}input::placeholder{color:#${grays.gray30.toJSON()};opacity:1}:host([has-value]) input{color:#${grays.gray90.toJSON()}}input:focus,input:focus-visible{color:#${grays.gray90.toJSON()};outline:none}:host([disabled]) .hint-message,:host([disabled]) .label-text,:host([disabled]) input{color:#${grays.gray30.toJSON()}}:host([disabled]) .input-container{border-color:#${grays.gray5.toJSON()}}.main-wrapper{cursor:pointer;display:flex;flex-direction:column;flex-grow:1;gap:.25rem;padding:0 1px}.hint-message,.label-text{font-style:normal;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hint-message{font-size:.75rem;min-height:.875rem;transition:opacity .2s ease-in-out}.label-text{color:#${grays.gray60.toJSON()};font-size:.875rem}:host(:hover:not([disabled]):not([readonly])) .input-container{background-color:#${grays.gray5.toJSON()};border-color:#${grays.gray20.toJSON()}}.input-container{background-color:#${grays.gray5.toJSON()};border:1px solid #${grays.gray10.toJSON()};border-radius:4px;box-shadow:0 0 0 1px #0000;display:flex;flex-direction:row;gap:.5rem;justify-content:space-evenly;min-height:1.5rem;padding:.5rem .75rem;transition:border-color .2s ease-in-out,background-color .2s ease-in-out,box-shadow .2s ease-in-out}.icons-container{align-items:center;display:flex;gap:.5rem;justify-content:center}:host([has-value]) .icons-container .icon-divider{opacity:1}:host ${CrossSvgIcon.tag}{opacity:0;pointer-events:none;transition:opacity .2s ease-in-out}:host([has-value]) ${CrossSvgIcon.tag}{opacity:1;pointer-events:auto}.icons-container .icon-divider{background-color:#${grays.gray20.toJSON()};border:none;height:100%;margin:0;opacity:0;padding:0;transition:opacity .2s ease-in-out;width:1px}:host([disabled]) .icons-container,:host([readonly]) .icons-container{display:none}:host([disabled]),:host([readonly]){cursor:not-allowed;pointer-events:none}:host([focused]:not([disabled]):not([readonly])) .input-container{border-color:#${grays.gray90.toJSON()};box-shadow:0 0 0 1px #${grays.gray90.toJSON()}}:host([invalid]) .input-container{background-color:#${reds.red5.toJSON()};border-color:#${reds.red30.toJSON()};box-shadow:0 0 0 1px #${reds.red30.toJSON()}}:host([invalid][focused]) .input-container{background-color:#${reds.red5.toJSON()}!important;border-color:#${reds.red60.toJSON()}!important;box-shadow:0 0 0 1px #${reds.red60.toJSON()}!important}:host(:hover[invalid]:not([focused])) .input-container{background-color:#${reds.red5.toJSON()}!important;border-color:#${reds.red30.toJSON()}!important;box-shadow:0 0 0 1px #${reds.red30.toJSON()}!important}:host([invalid]) .hint-message{color:#${reds.red60.toJSON()}}:host([loading]) .input{animation:loading-shimmer 2.5s linear infinite;background:linear-gradient(90deg,#0000004d,#000c 40%,#000 50%,#000c 60%,#0000004d);background-clip:text;-webkit-background-clip:text;background-size:200% 100%;color:#000;color:#0000}@keyframes loading-shimmer{0%{background-position-x:-100%}to{background-position-x:100%}}`}get hintMessage(){var t;return ((t=this._hintMessageElement)==null?void 0:t.textContent)||""}set hintMessage(t){this.invalid?this._setValidityState({customError:true},t):(this._hintMessage=t,this._hintMessageElement&&(this._hintMessageElement.textContent=t));}get loading(){return this.hasAttribute("loading")}set loading(t){this.toggleAttribute("loading",t),this._updateInputDisplay();}get loadingText(){return this._loadingText}set loadingText(t){this._loadingText=t,this._updateInputDisplay();}get value(){return this._value}set value(t){if(this._value=t,this._inputElement){let e=t.length>0;this.toggleAttribute("has-value",e),this._updateCrossIconTabIndex(),this._internals.setFormValue(t),this._updateInputDisplay(),this._required&&e&&this.invalid&&this._setValidityState({});}}get name(){var t;return this.getAttribute("name")||((t=this._inputElement)==null?void 0:t.name)||""}set name(t){var e;t?this.setAttribute("name",t):this.removeAttribute("name"),this._inputElement&&this._labelElement&&((e=this._labelElement)==null||e.setAttribute("for",t),this._inputElement.name=t,this._inputElement.id=t);}get type(){return this._type}set type(t){this._type=t,this._inputElement&&(this._type==="number"?(this._inputElement.type="number",this._inputElement.inputMode="numeric"):this._inputElement.type="text");}get label(){return this._label}set label(t){this._label=t,this._labelElement&&(this._labelElement.textContent=t||"");}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,t?this.setAttribute("placeholder",t):this.removeAttribute("placeholder"),this._inputElement&&(this._inputElement.placeholder=t);}get required(){var t,e,i;return (i=(e=(t=this._inputElement)==null?void 0:t.required)!=null?e:this._required)!=null?i:false}set required(t){this._required=t,this.toggleAttribute("required",t),this._inputElement&&(this._inputElement.required=t,this._inputElement.setAttribute("aria-required",String(t))),this._isInitialized&&t&&!this._value&&this._setValidityState({valueMissing:true},"This field is required");}get invalid(){return this.hasAttribute("invalid")}set invalid(t){t?this._setValidityState({customError:true},this._hintMessage):this._setValidityState({});}set readOnly(t){this.toggleAttribute("readonly",t),this._inputElement&&(this._inputElement.readOnly=t);}get readOnly(){return this.hasAttribute("readonly")}set disabled(t){this.toggleAttribute("disabled",t),this._inputElement&&(this._inputElement.disabled=t),this._internals.setFormValue(this._value);}get disabled(){return this.hasAttribute("disabled")}set useVirtualKeyboardAPI(t){t&&!this._useVirtualKeyboardAPI?(this._useVirtualKeyboardAPI=true,this._setupVirtualKeyboardAPI()):!t&&this._useVirtualKeyboardAPI&&(this._useVirtualKeyboardAPI=false,this._inputElement&&this._inputElement.removeAttribute("virtualkeyboardpolicy"),this._virtualKeyboard=null);}get useVirtualKeyboardAPI(){return this._useVirtualKeyboardAPI}set backgroundColor(t){this._inputContainer&&(this._inputContainer.style.backgroundColor=t instanceof Color?`#${t.toJSON()}`:t);}checkValidity(){return this._inputElement?this._inputElement.validity.valid:true}reportValidity(){return this._internals.reportValidity()}setValidationState(t,e){var i;if(t)this._setValidityState({});else {let n=e!==void 0?e:"";this._setValidityState({customError:true},n);}(i=this._mainWrapper)==null||i.classList.add("validation-triggered");}resetValidation(){var t;this._setValidityState({}),(t=this._mainWrapper)==null||t.classList.remove("validation-triggered");}setCustomValidity(t){this._inputElement&&(this._inputElement.setCustomValidity(t),t.length>0?this._setValidityState({customError:true},t):this._setValidityState({}));}_setValidityState(t,e=""){var n;let i=Object.values(t).some(o=>o===true);if(this.toggleAttribute("invalid",i),i){let o=e||"This field is invalid";this._internals.setValidity(t,o);}else this._internals.setValidity({});if(this._hintMessage=e,this._hintMessageElement&&(this._hintMessageElement.textContent=e||""),this._inputElement)if(this._inputElement.setAttribute("aria-invalid",String(i)),i&&e){let o=`${this._inputElement.id||"text-input"}-hint`;(n=this._hintMessageElement)==null||n.setAttribute("id",o),this._inputElement.setAttribute("aria-describedby",o);}else this._inputElement.removeAttribute("aria-describedby");}_onInput(t){if(!this._inputElement)return;let i=t.target.value,n=i.length>0;this.toggleAttribute("has-value",n),this.value=i,this._updateCrossIconTabIndex(),this.invalid&&this.resetValidation(),this.dispatchEvent(new CustomEvent("scandit-text-input-input",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}_onChange(t){if(!this._inputElement)return;let i=t.target.value;this.value=i;let n=i.length>0;this.toggleAttribute("has-value",n);}_onFocus(t){this.setAttribute("focused",""),this._updateCrossIconTabIndex(),this.dispatchEvent(new CustomEvent("scandit-text-input-focus",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}_onBlur(t){this.removeAttribute("focused"),this._updateCrossIconTabIndex(),this.dispatchEvent(new CustomEvent("scandit-text-input-blur",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}focus(t){this._inputElement&&this._inputElement.focus(t);}showKeyboard({scrollTimeout:t=350}={}){return new Promise(e=>{var i;if(!this._inputElement){e();return}if(this._useVirtualKeyboardAPI&&this._virtualKeyboard){this._virtualKeyboard.overlaysContent=true,this._virtualKeyboard.show(),this.focus(),this.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),e();return}(i=this._showKeyboardTimeout)==null||i.stop(),this.focus(),this._showKeyboardTimeout=new Timeout(t,()=>{this.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),e();}),this._showKeyboardTimeout.start();})}hideKeyboard(){this._virtualKeyboard&&this._useVirtualKeyboardAPI?this._virtualKeyboard.hide():this.blur();}select(){var t,e;(e=(t=this._inputElement)==null?void 0:t.select)==null||e.call(t);}blur(){var t,e;(e=(t=this._inputElement)==null?void 0:t.blur)==null||e.call(t);}scrollIntoView(t){super.scrollIntoView(t);}_initializeIcons(){var i,n;CrossSvgIcon.register(),ScanSvgIcon.register();let t=(i=this._iconContainerElement)==null?void 0:i.querySelector("#icon-left");t&&(this._crossIcon=CrossSvgIcon.create(),this._crossIcon.size=20,this._crossIcon.setAttribute("aria-label","Clear input"),this._crossIcon.setAttribute("role","button"),this._updateCrossIconTabIndex(),t.replaceWith(this._crossIcon));let e=(n=this._iconContainerElement)==null?void 0:n.querySelector("#icon-right");e&&(this._scanIcon=ScanSvgIcon.create(),this._scanIcon.size=20,this._scanIcon.setAttribute("aria-label","Scan barcode"),this._scanIcon.setAttribute("role","button"),this._scanIcon.setAttribute("tabindex","0"),e.replaceWith(this._scanIcon));}_updateCrossIconTabIndex(){if(!this._crossIcon||!this._scanIcon)return;this.hasAttribute("has-value")?(this._crossIcon.setAttribute("tabindex","0"),this._scanIcon.setAttribute("tabindex","0")):(this._crossIcon.setAttribute("tabindex","-1"),this._scanIcon.setAttribute("tabindex","0"));}_updateInputDisplay(){this._inputElement&&(this.loading&&this._loadingText?this._inputElement.value=this._loadingText:this._inputElement.value=this._value);}connectedCallback(){this._initializeAttributesFromElement(),this._initializeIcons(),this._addEventListeners(),this._useVirtualKeyboardAPI&&this._setupVirtualKeyboardAPI(),this._isInitialized=true;}_initializeAttributesFromElement(){if(this.hasAttribute("name")&&(this.name=this.getAttribute("name")||""),this.hasAttribute("label")&&(this.label=this.getAttribute("label")||""),this.hasAttribute("placeholder")&&(this.placeholder=this.getAttribute("placeholder")||""),this.hasAttribute("type")){let t=this.getAttribute("type");(t==="text"||t==="number")&&(this.type=t);}this.hasAttribute("value")&&(this.value=this.getAttribute("value")||""),this.hasAttribute("required")&&(this.required=this.getAttribute("required")!==null),this.hasAttribute("invalid")&&(this.invalid=this.getAttribute("invalid")!==null),this._hintMessageElement&&(this.hintMessage=this._hintMessage||"");}_setupVirtualKeyboardAPI(){BrowserHelper.hasVirtualKeyboardSupport()&&(this._virtualKeyboard=navigator.virtualKeyboard,this._inputElement&&this._inputElement.setAttribute("virtualkeyboardpolicy","manual"));}disconnectedCallback(){var t,e;this._isInitialized=false,this._removeEventListeners(),(t=this._crossIcon)==null||t.remove(),(e=this._scanIcon)==null||e.remove(),this._useVirtualKeyboardAPI=false,this._virtualKeyboard=null;}formAssociatedCallback(t){}formDisabledCallback(t){this.disabled=t;}formResetCallback(){this.value=this.getAttribute("value")||"",this.resetValidation();}_addEventListeners(){var t,e,i,n,o,l;this._inputElement&&(this._inputElement.addEventListener("input",this._handleInput),this._inputElement.addEventListener("change",this._handleChange),this._inputElement.addEventListener("focus",this._handleFocus),this._inputElement.addEventListener("blur",this._handleBlur),(t=this._crossIcon)==null||t.addEventListener("pointerdown",this._handleCrossIconPointerDown,{capture:true}),(e=this._crossIcon)==null||e.addEventListener("pointerup",this._handleCrossIconPointerUp),(i=this._crossIcon)==null||i.addEventListener("keydown",this._handleCrossIconKeyDown),(n=this._scanIcon)==null||n.addEventListener("pointerdown",this._handleScanIconPointerDown,{capture:true}),(o=this._scanIcon)==null||o.addEventListener("pointerup",this._handleScanIconPointerUp),(l=this._scanIcon)==null||l.addEventListener("keydown",this._handleScanIconKeyDown));}_removeEventListeners(){var t,e,i,n,o,l;this._inputElement&&(this._inputElement.removeEventListener("input",this._handleInput),this._inputElement.removeEventListener("change",this._handleChange),this._inputElement.removeEventListener("focus",this._handleFocus),this._inputElement.removeEventListener("blur",this._handleBlur),(t=this._crossIcon)==null||t.removeEventListener("pointerdown",this._handleCrossIconPointerDown),(e=this._crossIcon)==null||e.removeEventListener("pointerup",this._handleCrossIconPointerUp),(i=this._crossIcon)==null||i.removeEventListener("keydown",this._handleCrossIconKeyDown),(n=this._scanIcon)==null||n.removeEventListener("pointerdown",this._handleScanIconPointerDown),(o=this._scanIcon)==null||o.removeEventListener("pointerup",this._handleScanIconPointerUp),(l=this._scanIcon)==null||l.removeEventListener("keydown",this._handleScanIconKeyDown));}_onCrossIconPointerDown(t){t&&t.preventDefault();}_onCrossIconPointerUp(t){!t||!this._crossIcon||(t.preventDefault(),this._triggerClear());}_onCrossIconKeyDown(t){!t||!this._crossIcon||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),this._triggerClear());}_onScanIconPointerDown(t){t&&(t.preventDefault(),t.stopPropagation());}_onScanIconPointerUp(t){!t||!this._scanIcon||(t.preventDefault(),t.stopPropagation(),this._triggerScan());}_triggerClear(){this.dispatchEvent(new CustomEvent("scandit-text-input-clear",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}_onScanIconKeyDown(t){!t||!this._scanIcon||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),this._triggerScan());}_triggerScan(){this.dispatchEvent(new CustomEvent("scandit-text-input-scan",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}static create(){return document.createElement(a.tag)}static register(){defineCustomElements({[a.tag]:a});}};a.tag="scandit-text-input",a.formAssociated=true;var d=a;export{E as a,d as b};
@@ -1 +1 @@
1
- import {a as a$2}from'./chunk-7M5DXL6F.js';import {a as a$1}from'./chunk-SYDG6PPD.js';import {a}from'./chunk-WX63L6GU.js';var o=class extends a{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}async build(e){let a=await a$1().workerCommand("labelCaptureBuildPartNumberBarcode",{payload:{name:e,dataTypePatterns:this.anchorRegexes,hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,symbologies:this.symbologies}}),r=a$2.forHandle(a);return r._isOptional=this._isOptional,r._name=e,r._valueRegexes=this.valueRegexes,r._symbologies=this.symbologySettings,r}getThis(){return this}};export{o as a};
1
+ import {a as a$2}from'./chunk-7M5DXL6F.js';import {a}from'./chunk-WX63L6GU.js';import {a as a$1}from'./chunk-SYDG6PPD.js';var o=class extends a{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}async build(e){let a=await a$1().workerCommand("labelCaptureBuildPartNumberBarcode",{payload:{name:e,dataTypePatterns:this.anchorRegexes,hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,symbologies:this.symbologies}}),r=a$2.forHandle(a);return r._isOptional=this._isOptional,r._name=e,r._valueRegexes=this.valueRegexes,r._symbologies=this.symbologySettings,r}getThis(){return this}};export{o as a};
@@ -0,0 +1 @@
1
+ var t={"scandit-datacapture-sdk-label-pthreads.wasm":{bytes:8930057},"scandit-datacapture-sdk-label-simd.wasm":{bytes:8713812},"scandit-datacapture-sdk-label-simd-pthreads.wasm":{bytes:8847921},"scandit-datacapture-sdk-label.wasm":{bytes:8796242}};export{t as a};
@@ -1 +1 @@
1
- import {a as a$3}from'./chunk-N2Q2DERV.js';import {a as a$2}from'./chunk-SYDG6PPD.js';import {a as a$1}from'./chunk-WX63L6GU.js';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var a=class extends a$1{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}setLocation(e){return this.location=e,this.getThis()}async build(e){var i;let n=await a$2().workerCommand("labelCaptureBuildCustomBarcode",{payload:{name:e,dataTypePatterns:this.anchorRegexes.map(l=>l.toString()),hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,symbologies:this.symbologies,locationHandle:(i=this.location)==null?void 0:i[nativeHandle]}}),t=a$3.forHandle(n);return t._anchorRegexes=this.anchorRegexes,t._isOptional=this._isOptional,t._name=e,t._valueRegexes=this.valueRegexes,t._symbologies=this.symbologySettings,t._location=this.location,t}getThis(){return this}};export{a};
1
+ import {a as a$1}from'./chunk-WX63L6GU.js';import {a as a$3}from'./chunk-N2Q2DERV.js';import {a as a$2}from'./chunk-SYDG6PPD.js';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var a=class extends a$1{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}setLocation(e){return this.location=e,this.getThis()}async build(e){var i;let n=await a$2().workerCommand("labelCaptureBuildCustomBarcode",{payload:{name:e,dataTypePatterns:this.anchorRegexes.map(l=>l.toString()),hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,symbologies:this.symbologies,locationHandle:(i=this.location)==null?void 0:i[nativeHandle]}}),t=a$3.forHandle(n);return t._anchorRegexes=this.anchorRegexes,t._isOptional=this._isOptional,t._name=e,t._valueRegexes=this.valueRegexes,t._symbologies=this.symbologySettings,t._location=this.location,t}getThis(){return this}};export{a};
@@ -1 +1 @@
1
- import {a as a$2}from'./chunk-S7PTN3KC.js';import {a as a$1}from'./chunk-SYDG6PPD.js';import {a}from'./chunk-WX63L6GU.js';var o=class extends a{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}async build(e){let a=await a$1().workerCommand("labelCaptureBuildImeiTwoBarcode",{payload:{name:e,dataTypePatterns:this.anchorRegexes,hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,symbologies:this.symbologies}}),i=a$2.forHandle(a);return i._isOptional=this._isOptional,i._name=e,i._valueRegexes=this.valueRegexes,i._symbologies=this.symbologySettings,i}getThis(){return this}};export{o as a};
1
+ import {a as a$2}from'./chunk-S7PTN3KC.js';import {a}from'./chunk-WX63L6GU.js';import {a as a$1}from'./chunk-SYDG6PPD.js';var o=class extends a{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}async build(e){let a=await a$1().workerCommand("labelCaptureBuildImeiTwoBarcode",{payload:{name:e,dataTypePatterns:this.anchorRegexes,hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,symbologies:this.symbologies}}),i=a$2.forHandle(a);return i._isOptional=this._isOptional,i._name=e,i._valueRegexes=this.valueRegexes,i._symbologies=this.symbologySettings,i}getThis(){return this}};export{o as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-F5NT65XG.js';import {a}from'./chunk-SYDG6PPD.js';import {a as a$2}from'./chunk-GOW3A5CW.js';import {a as a$3}from'./chunk-WR7V5D4H.js';import {Logger,RectangularViewfinder,AimerViewfinder}from'@scandit/web-datacapture-core';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';function f(d){return d instanceof RectangularViewfinder||d instanceof AimerViewfinder}var p=class p{constructor(e){this.listeners=new Set;this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this[nativeHandle]=e;}static async withLabelCapture(e){let t=await a().workerCommand("labelCaptureBasicOverlayForLabelCapture",{payload:{labelCaptureHandle:e[nativeHandle]}});return new p(t)}static async withLabelCaptureForView(e,t){let i=await a().workerCommand("labelCaptureBasicOverlayForLabelCapture",{payload:{labelCaptureHandle:e[nativeHandle]}}),s=new p(i);return await t.addOverlay(s),s}toJSONObject(){return {type:this[nativeHandle].className,nativeHandle:this[nativeHandle]}}async getListener(){return this.listeners.size===0?null:[...this.listeners.values()][0]}async setListener(e){if(!e){this.listeners.clear(),a().removeWorkerListener(this.onWorkerMessageHandler),await a().workerCommand("labelCaptureBasicOverlaySetListener",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],value:false}});return}this.listeners.size===0&&(this.listeners.add(e),a().addWorkerListener(this.onWorkerMessageHandler),await a().workerCommand("labelCaptureBasicOverlaySetListener",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],value:true}}));}async getDefaultFieldBrush(e){return await a().workerCommand("labelCaptureBasicOverlayGetDefaultFieldBrush",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],labelFieldState:e}})}async setDefaultFieldBrush(e,t){return await a().workerCommand("labelCaptureBasicOverlaySetDefaultFieldBrush",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],labelFieldState:t,brush:e.toJSONObject()}})}async getDefaultLabelBrush(){return await a().workerCommand("labelCaptureBasicOverlayGetDefaultLabelBrush",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle]}})}async setDefaultLabelBrush(e){return await a().workerCommand("labelCaptureBasicOverlaySetDefaultLabelBrush",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],brush:e.toJSONObject()}})}async setBrushForField(e,t,i){return await a().workerCommand("labelCaptureBasicOverlaySetBrushForField",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],fieldJSON:t.toJSONObject(),labelJSON:i.toJSONObject(),brush:e.toJSONObject()}})}async setBrushForLabel(e,t){return await a().workerCommand("labelCaptureBasicOverlaySetBrushForLabel",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],labelJSON:t.toJSONObject(),brush:e.toJSONObject()}})}async getShouldShowScanAreaGuides(){return await a().workerCommand("labelCaptureBasicOverlayGetShouldShowScanAreaGuides",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle]}})}async setShouldShowScanAreaGuides(e){return await a().workerCommand("labelCaptureBasicOverlaySetShouldShowScanAreaGuides",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],show:e}})}async getViewfinder(){return await a().workerCommand("labelCaptureBasicOverlayGetViewfinder",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle]}})}async setViewfinder(e){if(!f(e)){Logger.error("Supported viewfinder types are RectangularViewfinder and AimerViewfinder",e);return}return this.proxiedViewFinder=a$1(this,a(),e),await a().workerCommand("labelCaptureBasicOverlayUpdateViewfinder",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],viewfinderJSON:e==null?void 0:e.toJSONObject()}})}onWorkerMessage(e){var t,i,s;switch(e.type){case "labelCaptureBasicOverlayOnLabelTapped":{for(let l of this.listeners)(t=l.onLabelTapped)==null||t.call(l,this,a$2.fromJSON(e.payload.labelJSON));break}case "labelCaptureBasicOverlayBrushForField":{for(let l of this.listeners){let o=a$3.fromJSON(e.payload.fieldJSON),u=a$2.fromJSON(e.payload.labelJSON),b=(i=l.brushForField)==null?void 0:i.call(l,this,o,u);b&&this.setBrushForField(b,o,u);}break}case "labelCaptureBasicOverlayBrushForLabel":{for(let l of this.listeners){let o=a$2.fromJSON(e.payload.labelJSON),u=(s=l.brushForLabel)==null?void 0:s.call(l,this,o);u&&this.setBrushForLabel(u,o);}break}}}},m=p;export{m as a};
1
+ import {a as a$1}from'./chunk-F5NT65XG.js';import {a as a$2}from'./chunk-GOW3A5CW.js';import {a as a$3}from'./chunk-WR7V5D4H.js';import {a}from'./chunk-SYDG6PPD.js';import {Logger,RectangularViewfinder,AimerViewfinder}from'@scandit/web-datacapture-core';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';function f(d){return d instanceof RectangularViewfinder||d instanceof AimerViewfinder}var p=class p{constructor(e){this.listeners=new Set;this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this[nativeHandle]=e;}static async withLabelCapture(e){let t=await a().workerCommand("labelCaptureBasicOverlayForLabelCapture",{payload:{labelCaptureHandle:e[nativeHandle]}});return new p(t)}static async withLabelCaptureForView(e,t){let i=await a().workerCommand("labelCaptureBasicOverlayForLabelCapture",{payload:{labelCaptureHandle:e[nativeHandle]}}),s=new p(i);return await t.addOverlay(s),s}toJSONObject(){return {type:this[nativeHandle].className,nativeHandle:this[nativeHandle]}}async getListener(){return this.listeners.size===0?null:[...this.listeners.values()][0]}async setListener(e){if(!e){this.listeners.clear(),a().removeWorkerListener(this.onWorkerMessageHandler),await a().workerCommand("labelCaptureBasicOverlaySetListener",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],value:false}});return}this.listeners.size===0&&(this.listeners.add(e),a().addWorkerListener(this.onWorkerMessageHandler),await a().workerCommand("labelCaptureBasicOverlaySetListener",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],value:true}}));}async getDefaultFieldBrush(e){return await a().workerCommand("labelCaptureBasicOverlayGetDefaultFieldBrush",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],labelFieldState:e}})}async setDefaultFieldBrush(e,t){return await a().workerCommand("labelCaptureBasicOverlaySetDefaultFieldBrush",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],labelFieldState:t,brush:e.toJSONObject()}})}async getDefaultLabelBrush(){return await a().workerCommand("labelCaptureBasicOverlayGetDefaultLabelBrush",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle]}})}async setDefaultLabelBrush(e){return await a().workerCommand("labelCaptureBasicOverlaySetDefaultLabelBrush",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],brush:e.toJSONObject()}})}async setBrushForField(e,t,i){return await a().workerCommand("labelCaptureBasicOverlaySetBrushForField",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],fieldJSON:t.toJSONObject(),labelJSON:i.toJSONObject(),brush:e.toJSONObject()}})}async setBrushForLabel(e,t){return await a().workerCommand("labelCaptureBasicOverlaySetBrushForLabel",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],labelJSON:t.toJSONObject(),brush:e.toJSONObject()}})}async getShouldShowScanAreaGuides(){return await a().workerCommand("labelCaptureBasicOverlayGetShouldShowScanAreaGuides",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle]}})}async setShouldShowScanAreaGuides(e){return await a().workerCommand("labelCaptureBasicOverlaySetShouldShowScanAreaGuides",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],show:e}})}async getViewfinder(){return await a().workerCommand("labelCaptureBasicOverlayGetViewfinder",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle]}})}async setViewfinder(e){if(!f(e)){Logger.error("Supported viewfinder types are RectangularViewfinder and AimerViewfinder",e);return}return this.proxiedViewFinder=a$1(this,a(),e),await a().workerCommand("labelCaptureBasicOverlayUpdateViewfinder",{payload:{labelCaptureBasicOverlayHandle:this[nativeHandle],viewfinderJSON:e==null?void 0:e.toJSONObject()}})}onWorkerMessage(e){var t,i,s;switch(e.type){case "labelCaptureBasicOverlayOnLabelTapped":{for(let l of this.listeners)(t=l.onLabelTapped)==null||t.call(l,this,a$2.fromJSON(e.payload.labelJSON));break}case "labelCaptureBasicOverlayBrushForField":{for(let l of this.listeners){let o=a$3.fromJSON(e.payload.fieldJSON),u=a$2.fromJSON(e.payload.labelJSON),b=(i=l.brushForField)==null?void 0:i.call(l,this,o,u);b&&this.setBrushForField(b,o,u);}break}case "labelCaptureBasicOverlayBrushForLabel":{for(let l of this.listeners){let o=a$2.fromJSON(e.payload.labelJSON),u=(s=l.brushForLabel)==null?void 0:s.call(l,this,o);u&&this.setBrushForLabel(u,o);}break}}}},m=p;export{m as a};