scandit-capacitor-datacapture-barcode 8.1.1 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/ScanditCapacitorDatacaptureBarcode.podspec +1 -1
  2. package/android/build.gradle +71 -23
  3. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.java +593 -0
  4. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ar/BarcodeArViewHandler.java +146 -0
  5. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/count/BarcodeCountViewHandler.java +143 -0
  6. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/find/BarcodeFindViewHandler.java +181 -0
  7. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/pick/BarcodePickViewHandler.java +152 -0
  8. package/dist/barcode.js +5271 -1377
  9. package/dist/barcode.js.map +1 -1
  10. package/dist/dts/definitions.d.ts +35 -8
  11. package/dist/dts/ts/BarcodeArView.d.ts +57 -0
  12. package/dist/dts/ts/BarcodeBatchAdvancedOverlay.d.ts +1 -0
  13. package/dist/dts/ts/BarcodeFindView.d.ts +1 -0
  14. package/dist/dts/web.d.ts +1 -3
  15. package/dist/index.js +562 -316
  16. package/dist/index.js.map +1 -1
  17. package/ios/Sources/ScanditCapacitorBarcode/BarcodeArViewHandler.swift +146 -0
  18. package/ios/Sources/ScanditCapacitorBarcode/BarcodeCountViewHandler.swift +11 -0
  19. package/ios/Sources/ScanditCapacitorBarcode/BarcodeFindViewHandler.swift +43 -25
  20. package/ios/Sources/ScanditCapacitorBarcode/BarcodePickViewHandler.swift +11 -8
  21. package/ios/Sources/ScanditCapacitorBarcode/ScanditBarcodeCapture.swift +293 -1910
  22. package/package.json +7 -7
  23. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt +0 -1569
  24. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/count/BarcodeCountViewHandler.kt +0 -137
  25. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/factories/BarcodeCaptureActionFactory.kt +0 -13
  26. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/find/BarcodeFindViewHandler.kt +0 -166
  27. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/pick/BarcodePickViewHandler.kt +0 -136
  28. package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/utils/AdvancedOverlayViewSerialization.kt +0 -89
  29. package/ios/Sources/ScanditCapacitorBarcode/BlockingCallbackResults.swift +0 -73
  30. package/ios/Sources/ScanditCapacitorBarcode/CommandJSONArgument+ScanditBarcodeCapture.swift +0 -70
  31. package/ios/Sources/ScanditCapacitorBarcode/TappableBase64ImageView.swift +0 -63
package/dist/index.js CHANGED
@@ -1,135 +1,8 @@
1
- import { SymbologyDescription, BaseBarcodeBatchAdvancedOverlay, BaseBarcodeCountView, BaseBarcodeFindView, BaseSparkScanView, BaseBarcodePickView, getBarcodeCountDefaults, ArucoDictionary, ArucoDictionaryPreset, ArucoMarker, AztecBarcodeGeneratorBuilder, Barcode, BarcodeBatch, BarcodeBatchBasicOverlay, BarcodeBatchBasicOverlayStyle, BarcodeBatchSession, BarcodeBatchSettings, BarcodeCapture, BarcodeCaptureFeedback, BarcodeCaptureOverlay, BarcodeCaptureSession, BarcodeCaptureSettings, BarcodeCount, BarcodeCountCaptureList, BarcodeCountCaptureListSession, BarcodeCountFeedback, BarcodeCountNotInListActionSettings, BarcodeCountSession, BarcodeCountSettings, BarcodeCountToolbarSettings, BarcodeCountViewStyle as BarcodeCountViewStyle$1, BarcodeDefinition, BarcodeDefinitionBuilder, BarcodeFilterHighlightSettingsBrush, BarcodeFilterHighlightType, BarcodeFilterSettings, BarcodeFind, BarcodeFindFeedback, BarcodeFindItem, BarcodeFindItemContent, BarcodeFindItemSearchOptions, BarcodeFindSession, BarcodeFindSettings, BarcodeFindViewSettings, BarcodeGenerator, BarcodeGeneratorBuilder, BarcodeIdentifier, BarcodePick, BarcodePickActionCallback, BarcodePickAsyncMapperProductProvider, BarcodePickProduct, BarcodePickProductProviderCallback, BarcodePickProductProviderCallbackItem, BarcodePickScanningSession, BarcodePickSession, BarcodePickSettings, BarcodePickState, BarcodePickStatusIconSettings, BarcodePickViewSettings, BarcodeSelection, BarcodeSelectionAimerSelection, BarcodeSelectionAutoSelectionStrategy, BarcodeSelectionBasicOverlay, BarcodeSelectionBasicOverlayStyle, BarcodeSelectionFeedback, BarcodeSelectionFreezeBehavior, BarcodeSelectionManualSelectionStrategy, BarcodeSelectionSession, BarcodeSelectionSettings, BarcodeSelectionTapBehavior, BarcodeSelectionTapSelection, BarcodeSpatialGrid, BatterySavingMode, Checksum, Code128BarcodeGeneratorBuilder, Code39BarcodeGeneratorBuilder, CompositeFlag, CompositeType, DataMatrixBarcodeGeneratorBuilder, Dot, DotWithIcons, Ean13BarcodeGeneratorBuilder, Ean13UpcaClassification, EncodingRange, InterleavedTwoOfFiveBarcodeGeneratorBuilder, LocalizedOnlyBarcode, QrCodeBarcodeGeneratorBuilder, QrCodeErrorCorrectionLevel, Range, Rectangular, RectangularWithIcons, ScanComponentBarcodePreset, ScanComponentTextSemanticType, ScanItemDefinition, ScanItemIdentifier, ScannedBarcode, ScannedComponentIdentifier, ScannedItem, ScannedItemIdentifier, ScannedText, SparkScan, SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback, SparkScanMiniPreviewSize, SparkScanPreviewBehavior, SparkScanScanningBehavior, SparkScanScanningModeDefault, SparkScanScanningModeTarget, SparkScanSession, SparkScanSettings, SparkScanToastSettings, SparkScanViewSettings, SparkScanViewState, StructuredAppendData, Symbology, SymbologySettings, TargetBarcode, TextDefinition, TextDefinitionBuilder, TextIdentifier, TrackedBarcode, UpcaBarcodeGeneratorBuilder, loadBarcodeDefaults, loadBarcodeCaptureDefaults, loadBarcodeBatchDefaults, loadBarcodeSelectionDefaults, loadBarcodeCountDefaults, loadBarcodePickDefaults, loadBarcodeFindDefaults, loadSparkScanDefaults, getBarcodeDefaults, registerBarcodeProxies } from './barcode.js';
2
- export { ArucoDictionary, ArucoDictionaryPreset, ArucoMarker, AztecBarcodeGeneratorBuilder, Barcode, BarcodeBatch, BarcodeBatchBasicOverlay, BarcodeBatchBasicOverlayStyle, BarcodeBatchSession, BarcodeBatchSettings, BarcodeCapture, BarcodeCaptureFeedback, BarcodeCaptureOverlay, BarcodeCaptureSession, BarcodeCaptureSettings, BarcodeCount, BarcodeCountCaptureList, BarcodeCountCaptureListSession, BarcodeCountFeedback, BarcodeCountNotInListActionSettings, BarcodeCountSession, BarcodeCountSettings, BarcodeCountToolbarSettings, BarcodeCountViewStyle, BarcodeDefinition, BarcodeDefinitionBuilder, BarcodeFilterHighlightSettingsBrush, BarcodeFilterHighlightType, BarcodeFilterSettings, BarcodeFind, BarcodeFindFeedback, BarcodeFindItem, BarcodeFindItemContent, BarcodeFindItemSearchOptions, BarcodeFindSession, BarcodeFindSettings, BarcodeFindViewSettings, BarcodeGenerator, BarcodeGeneratorBuilder, BarcodeIdentifier, BarcodePick, BarcodePickActionCallback, BarcodePickAsyncMapperProductProvider, BarcodePickProduct, BarcodePickProductProviderCallback, BarcodePickProductProviderCallbackItem, BarcodePickScanningSession, BarcodePickSession, BarcodePickSettings, BarcodePickState, BarcodePickStatusIconSettings, BarcodePickViewSettings, BarcodeSelection, BarcodeSelectionAimerSelection, BarcodeSelectionAutoSelectionStrategy, BarcodeSelectionBasicOverlay, BarcodeSelectionBasicOverlayStyle, BarcodeSelectionFeedback, BarcodeSelectionFreezeBehavior, BarcodeSelectionManualSelectionStrategy, BarcodeSelectionSession, BarcodeSelectionSettings, BarcodeSelectionTapBehavior, BarcodeSelectionTapSelection, BarcodeSpatialGrid, BatterySavingMode, Checksum, Code128BarcodeGeneratorBuilder, Code39BarcodeGeneratorBuilder, CompositeFlag, CompositeType, DataMatrixBarcodeGeneratorBuilder, Dot, DotWithIcons, Ean13BarcodeGeneratorBuilder, Ean13UpcaClassification, EncodingRange, InterleavedTwoOfFiveBarcodeGeneratorBuilder, LocalizedOnlyBarcode, QrCodeBarcodeGeneratorBuilder, QrCodeErrorCorrectionLevel, Range, Rectangular, RectangularWithIcons, ScanComponentBarcodePreset, ScanComponentTextSemanticType, ScanItemDefinition, ScanItemIdentifier, ScannedBarcode, ScannedComponentIdentifier, ScannedItem, ScannedItemIdentifier, ScannedText, SparkScan, SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback, SparkScanMiniPreviewSize, SparkScanPreviewBehavior, SparkScanScanningBehavior, SparkScanScanningModeDefault, SparkScanScanningModeTarget, SparkScanSession, SparkScanSettings, SparkScanToastSettings, SparkScanViewSettings, SparkScanViewState, StructuredAppendData, Symbology, SymbologyDescription, SymbologySettings, TargetBarcode, TextDefinition, TextDefinitionBuilder, TextIdentifier, TrackedBarcode, UpcaBarcodeGeneratorBuilder } from './barcode.js';
3
- import { ignoreFromSerialization, DefaultSerializeable, Size, HTMLElementState, HtmlElementPosition, HtmlElementSize } from 'scandit-capacitor-datacapture-core/dist/core';
1
+ import { SymbologyDescription, BaseBarcodeBatchAdvancedOverlay, BaseBarcodeCountView, BaseBarcodeFindView, BaseSparkScanView, BaseBarcodePickView, BaseBarcodeArView, getBarcodeCountDefaults, ArucoDictionary, ArucoDictionaryPreset, ArucoMarker, AztecBarcodeGeneratorBuilder, Barcode, BarcodeAr, BarcodeArAnnotationTrigger, BarcodeArCircleHighlight, BarcodeArCircleHighlightPreset, BarcodeArFeedback, BarcodeArInfoAnnotation, BarcodeArInfoAnnotationAnchor, BarcodeArInfoAnnotationBodyComponent, BarcodeArInfoAnnotationFooter, BarcodeArInfoAnnotationHeader, BarcodeArInfoAnnotationWidthPreset, BarcodeArPopoverAnnotation, BarcodeArPopoverAnnotationButton, BarcodeArRectangleHighlight, BarcodeArResponsiveAnnotation, BarcodeArSession, BarcodeArSettings, BarcodeArStatusIconAnnotation, BarcodeArViewSettings, BarcodeBatch, BarcodeBatchBasicOverlay, BarcodeBatchBasicOverlayStyle, BarcodeBatchSession, BarcodeBatchSettings, BarcodeCapture, BarcodeCaptureFeedback, BarcodeCaptureOverlay, BarcodeCaptureSession, BarcodeCaptureSettings, BarcodeCount, BarcodeCountCaptureList, BarcodeCountCaptureListSession, BarcodeCountFeedback, BarcodeCountNotInListActionSettings, BarcodeCountSession, BarcodeCountSettings, BarcodeCountToolbarSettings, BarcodeCountViewStyle as BarcodeCountViewStyle$1, BarcodeDefinition, BarcodeDefinitionBuilder, BarcodeFilterHighlightSettingsBrush, BarcodeFilterHighlightType, BarcodeFilterSettings, BarcodeFind, BarcodeFindFeedback, BarcodeFindItem, BarcodeFindItemContent, BarcodeFindItemSearchOptions, BarcodeFindSession, BarcodeFindSettings, BarcodeFindViewSettings, BarcodeGenerator, BarcodeGeneratorBuilder, BarcodeIdentifier, BarcodePick, BarcodePickAction, BarcodePickActionCallback, BarcodePickAsyncMapperProductProvider, BarcodePickProduct, BarcodePickProductProviderCallback, BarcodePickProductProviderCallbackItem, BarcodePickScanningSession, BarcodePickSession, BarcodePickSettings, BarcodePickState, BarcodePickStatusIconSettings, BarcodePickStatusIconStyle, BarcodePickViewHighlightStyleRequest, BarcodePickViewHighlightStyleResponse, BarcodePickViewHighlightStyleResponseBuilder, BarcodePickViewSettings, BarcodeSelection, BarcodeSelectionAimerSelection, BarcodeSelectionAutoSelectionStrategy, BarcodeSelectionBasicOverlay, BarcodeSelectionBasicOverlayStyle, BarcodeSelectionFeedback, BarcodeSelectionFreezeBehavior, BarcodeSelectionManualSelectionStrategy, BarcodeSelectionSession, BarcodeSelectionSettings, BarcodeSelectionTapBehavior, BarcodeSelectionTapSelection, BarcodeSpatialGrid, BatterySavingMode, Checksum, Code128BarcodeGeneratorBuilder, Code39BarcodeGeneratorBuilder, CompositeFlag, CompositeType, DataMatrixBarcodeGeneratorBuilder, Dot, DotWithIcons, Ean13BarcodeGeneratorBuilder, Ean13UpcaClassification, EncodingRange, InterleavedTwoOfFiveBarcodeGeneratorBuilder, LocalizedOnlyBarcode, QrCodeBarcodeGeneratorBuilder, QrCodeErrorCorrectionLevel, Range, Rectangular, RectangularWithIcons, ScanComponentBarcodePreset, ScanComponentTextSemanticType, ScanItemDefinition, ScanItemIdentifier, ScannedBarcode, ScannedComponentIdentifier, ScannedItem, ScannedItemIdentifier, ScannedText, SparkScan, SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback, SparkScanMiniPreviewSize, SparkScanPreviewBehavior, SparkScanScanningBehavior, SparkScanScanningModeDefault, SparkScanScanningModeTarget, SparkScanSession, SparkScanSettings, SparkScanToastSettings, SparkScanViewSettings, SparkScanViewState, StructuredAppendData, Symbology, SymbologySettings, TargetBarcode, TextDefinition, TextDefinitionBuilder, TextIdentifier, TrackedBarcode, TrackedObject, UpcaBarcodeGeneratorBuilder, loadAllBarcodeDefaults, getBarcodeDefaults, registerBarcodeProxies } from './barcode.js';
2
+ export { ArucoDictionary, ArucoDictionaryPreset, ArucoMarker, AztecBarcodeGeneratorBuilder, Barcode, BarcodeAr, BarcodeArAnnotationTrigger, BarcodeArCircleHighlight, BarcodeArCircleHighlightPreset, BarcodeArFeedback, BarcodeArInfoAnnotation, BarcodeArInfoAnnotationAnchor, BarcodeArInfoAnnotationBodyComponent, BarcodeArInfoAnnotationFooter, BarcodeArInfoAnnotationHeader, BarcodeArInfoAnnotationWidthPreset, BarcodeArPopoverAnnotation, BarcodeArPopoverAnnotationButton, BarcodeArRectangleHighlight, BarcodeArResponsiveAnnotation, BarcodeArSession, BarcodeArSettings, BarcodeArStatusIconAnnotation, BarcodeArViewSettings, BarcodeBatch, BarcodeBatchBasicOverlay, BarcodeBatchBasicOverlayStyle, BarcodeBatchSession, BarcodeBatchSettings, BarcodeCapture, BarcodeCaptureFeedback, BarcodeCaptureOverlay, BarcodeCaptureSession, BarcodeCaptureSettings, BarcodeCount, BarcodeCountCaptureList, BarcodeCountCaptureListSession, BarcodeCountFeedback, BarcodeCountNotInListActionSettings, BarcodeCountSession, BarcodeCountSettings, BarcodeCountToolbarSettings, BarcodeCountViewStyle, BarcodeDefinition, BarcodeDefinitionBuilder, BarcodeFilterHighlightSettingsBrush, BarcodeFilterHighlightType, BarcodeFilterSettings, BarcodeFind, BarcodeFindFeedback, BarcodeFindItem, BarcodeFindItemContent, BarcodeFindItemSearchOptions, BarcodeFindSession, BarcodeFindSettings, BarcodeFindViewSettings, BarcodeGenerator, BarcodeGeneratorBuilder, BarcodeIdentifier, BarcodePick, BarcodePickAction, BarcodePickActionCallback, BarcodePickAsyncMapperProductProvider, BarcodePickProduct, BarcodePickProductProviderCallback, BarcodePickProductProviderCallbackItem, BarcodePickScanningSession, BarcodePickSession, BarcodePickSettings, BarcodePickState, BarcodePickStatusIconSettings, BarcodePickStatusIconStyle, BarcodePickViewHighlightStyleRequest, BarcodePickViewHighlightStyleResponse, BarcodePickViewHighlightStyleResponseBuilder, BarcodePickViewSettings, BarcodeSelection, BarcodeSelectionAimerSelection, BarcodeSelectionAutoSelectionStrategy, BarcodeSelectionBasicOverlay, BarcodeSelectionBasicOverlayStyle, BarcodeSelectionFeedback, BarcodeSelectionFreezeBehavior, BarcodeSelectionManualSelectionStrategy, BarcodeSelectionSession, BarcodeSelectionSettings, BarcodeSelectionTapBehavior, BarcodeSelectionTapSelection, BarcodeSpatialGrid, BatterySavingMode, Checksum, Code128BarcodeGeneratorBuilder, Code39BarcodeGeneratorBuilder, CompositeFlag, CompositeType, DataMatrixBarcodeGeneratorBuilder, Dot, DotWithIcons, Ean13BarcodeGeneratorBuilder, Ean13UpcaClassification, EncodingRange, InterleavedTwoOfFiveBarcodeGeneratorBuilder, LocalizedOnlyBarcode, QrCodeBarcodeGeneratorBuilder, QrCodeErrorCorrectionLevel, Range, Rectangular, RectangularWithIcons, ScanComponentBarcodePreset, ScanComponentTextSemanticType, ScanItemDefinition, ScanItemIdentifier, ScannedBarcode, ScannedComponentIdentifier, ScannedItem, ScannedItemIdentifier, ScannedText, SparkScan, SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback, SparkScanMiniPreviewSize, SparkScanPreviewBehavior, SparkScanScanningBehavior, SparkScanScanningModeDefault, SparkScanScanningModeTarget, SparkScanSession, SparkScanSettings, SparkScanToastSettings, SparkScanViewSettings, SparkScanViewState, StructuredAppendData, Symbology, SymbologyDescription, SymbologySettings, TargetBarcode, TextDefinition, TextDefinitionBuilder, TextIdentifier, TrackedBarcode, TrackedObject, UpcaBarcodeGeneratorBuilder } from './barcode.js';
3
+ import { DefaultSerializeable, Size, HTMLElementState, HtmlElementPosition, HtmlElementSize, ignoreFromSerialization } from 'scandit-capacitor-datacapture-core/dist/core';
4
4
  import { capacitorExec, CapacitorCore, CapacitorNativeCaller } from 'scandit-capacitor-datacapture-core';
5
5
 
6
- var BarcodeExports = /*#__PURE__*/Object.freeze({
7
- __proto__: null,
8
- get ArucoDictionary () { return ArucoDictionary; },
9
- get ArucoDictionaryPreset () { return ArucoDictionaryPreset; },
10
- get ArucoMarker () { return ArucoMarker; },
11
- get AztecBarcodeGeneratorBuilder () { return AztecBarcodeGeneratorBuilder; },
12
- get Barcode () { return Barcode; },
13
- get BarcodeBatch () { return BarcodeBatch; },
14
- get BarcodeBatchAdvancedOverlay () { return BarcodeBatchAdvancedOverlay; },
15
- get BarcodeBatchBasicOverlay () { return BarcodeBatchBasicOverlay; },
16
- get BarcodeBatchBasicOverlayStyle () { return BarcodeBatchBasicOverlayStyle; },
17
- get BarcodeBatchSession () { return BarcodeBatchSession; },
18
- get BarcodeBatchSettings () { return BarcodeBatchSettings; },
19
- get BarcodeCapture () { return BarcodeCapture; },
20
- get BarcodeCaptureFeedback () { return BarcodeCaptureFeedback; },
21
- get BarcodeCaptureOverlay () { return BarcodeCaptureOverlay; },
22
- get BarcodeCaptureSession () { return BarcodeCaptureSession; },
23
- get BarcodeCaptureSettings () { return BarcodeCaptureSettings; },
24
- get BarcodeCount () { return BarcodeCount; },
25
- get BarcodeCountCaptureList () { return BarcodeCountCaptureList; },
26
- get BarcodeCountCaptureListSession () { return BarcodeCountCaptureListSession; },
27
- get BarcodeCountFeedback () { return BarcodeCountFeedback; },
28
- get BarcodeCountNotInListActionSettings () { return BarcodeCountNotInListActionSettings; },
29
- get BarcodeCountSession () { return BarcodeCountSession; },
30
- get BarcodeCountSettings () { return BarcodeCountSettings; },
31
- get BarcodeCountToolbarSettings () { return BarcodeCountToolbarSettings; },
32
- get BarcodeCountView () { return BarcodeCountView; },
33
- get BarcodeCountViewStyle () { return BarcodeCountViewStyle$1; },
34
- get BarcodeDefinition () { return BarcodeDefinition; },
35
- get BarcodeDefinitionBuilder () { return BarcodeDefinitionBuilder; },
36
- get BarcodeFilterHighlightSettingsBrush () { return BarcodeFilterHighlightSettingsBrush; },
37
- get BarcodeFilterHighlightType () { return BarcodeFilterHighlightType; },
38
- get BarcodeFilterSettings () { return BarcodeFilterSettings; },
39
- get BarcodeFind () { return BarcodeFind; },
40
- get BarcodeFindFeedback () { return BarcodeFindFeedback; },
41
- get BarcodeFindItem () { return BarcodeFindItem; },
42
- get BarcodeFindItemContent () { return BarcodeFindItemContent; },
43
- get BarcodeFindItemSearchOptions () { return BarcodeFindItemSearchOptions; },
44
- get BarcodeFindSession () { return BarcodeFindSession; },
45
- get BarcodeFindSettings () { return BarcodeFindSettings; },
46
- get BarcodeFindView () { return BarcodeFindView; },
47
- get BarcodeFindViewSettings () { return BarcodeFindViewSettings; },
48
- get BarcodeGenerator () { return BarcodeGenerator; },
49
- get BarcodeGeneratorBuilder () { return BarcodeGeneratorBuilder; },
50
- get BarcodeIdentifier () { return BarcodeIdentifier; },
51
- get BarcodePick () { return BarcodePick; },
52
- get BarcodePickActionCallback () { return BarcodePickActionCallback; },
53
- get BarcodePickAsyncMapperProductProvider () { return BarcodePickAsyncMapperProductProvider; },
54
- get BarcodePickProduct () { return BarcodePickProduct; },
55
- get BarcodePickProductProviderCallback () { return BarcodePickProductProviderCallback; },
56
- get BarcodePickProductProviderCallbackItem () { return BarcodePickProductProviderCallbackItem; },
57
- get BarcodePickScanningSession () { return BarcodePickScanningSession; },
58
- get BarcodePickSession () { return BarcodePickSession; },
59
- get BarcodePickSettings () { return BarcodePickSettings; },
60
- get BarcodePickState () { return BarcodePickState; },
61
- get BarcodePickStatusIconSettings () { return BarcodePickStatusIconSettings; },
62
- get BarcodePickView () { return BarcodePickView; },
63
- get BarcodePickViewSettings () { return BarcodePickViewSettings; },
64
- get BarcodeSelection () { return BarcodeSelection; },
65
- get BarcodeSelectionAimerSelection () { return BarcodeSelectionAimerSelection; },
66
- get BarcodeSelectionAutoSelectionStrategy () { return BarcodeSelectionAutoSelectionStrategy; },
67
- get BarcodeSelectionBasicOverlay () { return BarcodeSelectionBasicOverlay; },
68
- get BarcodeSelectionBasicOverlayStyle () { return BarcodeSelectionBasicOverlayStyle; },
69
- get BarcodeSelectionFeedback () { return BarcodeSelectionFeedback; },
70
- get BarcodeSelectionFreezeBehavior () { return BarcodeSelectionFreezeBehavior; },
71
- get BarcodeSelectionManualSelectionStrategy () { return BarcodeSelectionManualSelectionStrategy; },
72
- get BarcodeSelectionSession () { return BarcodeSelectionSession; },
73
- get BarcodeSelectionSettings () { return BarcodeSelectionSettings; },
74
- get BarcodeSelectionTapBehavior () { return BarcodeSelectionTapBehavior; },
75
- get BarcodeSelectionTapSelection () { return BarcodeSelectionTapSelection; },
76
- get BarcodeSpatialGrid () { return BarcodeSpatialGrid; },
77
- get BatterySavingMode () { return BatterySavingMode; },
78
- get Checksum () { return Checksum; },
79
- get Code128BarcodeGeneratorBuilder () { return Code128BarcodeGeneratorBuilder; },
80
- get Code39BarcodeGeneratorBuilder () { return Code39BarcodeGeneratorBuilder; },
81
- get CompositeFlag () { return CompositeFlag; },
82
- get CompositeType () { return CompositeType; },
83
- get DataMatrixBarcodeGeneratorBuilder () { return DataMatrixBarcodeGeneratorBuilder; },
84
- get Dot () { return Dot; },
85
- get DotWithIcons () { return DotWithIcons; },
86
- get Ean13BarcodeGeneratorBuilder () { return Ean13BarcodeGeneratorBuilder; },
87
- get Ean13UpcaClassification () { return Ean13UpcaClassification; },
88
- get EncodingRange () { return EncodingRange; },
89
- get InterleavedTwoOfFiveBarcodeGeneratorBuilder () { return InterleavedTwoOfFiveBarcodeGeneratorBuilder; },
90
- get LocalizedOnlyBarcode () { return LocalizedOnlyBarcode; },
91
- get QrCodeBarcodeGeneratorBuilder () { return QrCodeBarcodeGeneratorBuilder; },
92
- get QrCodeErrorCorrectionLevel () { return QrCodeErrorCorrectionLevel; },
93
- get Range () { return Range; },
94
- get Rectangular () { return Rectangular; },
95
- get RectangularWithIcons () { return RectangularWithIcons; },
96
- get ScanComponentBarcodePreset () { return ScanComponentBarcodePreset; },
97
- get ScanComponentTextSemanticType () { return ScanComponentTextSemanticType; },
98
- get ScanItemDefinition () { return ScanItemDefinition; },
99
- get ScanItemIdentifier () { return ScanItemIdentifier; },
100
- get ScannedBarcode () { return ScannedBarcode; },
101
- get ScannedComponentIdentifier () { return ScannedComponentIdentifier; },
102
- get ScannedItem () { return ScannedItem; },
103
- get ScannedItemIdentifier () { return ScannedItemIdentifier; },
104
- get ScannedText () { return ScannedText; },
105
- get SparkScan () { return SparkScan; },
106
- get SparkScanBarcodeErrorFeedback () { return SparkScanBarcodeErrorFeedback; },
107
- get SparkScanBarcodeFeedback () { return SparkScanBarcodeFeedback; },
108
- get SparkScanBarcodeSuccessFeedback () { return SparkScanBarcodeSuccessFeedback; },
109
- get SparkScanMiniPreviewSize () { return SparkScanMiniPreviewSize; },
110
- get SparkScanPreviewBehavior () { return SparkScanPreviewBehavior; },
111
- get SparkScanScanningBehavior () { return SparkScanScanningBehavior; },
112
- get SparkScanScanningModeDefault () { return SparkScanScanningModeDefault; },
113
- get SparkScanScanningModeTarget () { return SparkScanScanningModeTarget; },
114
- get SparkScanSession () { return SparkScanSession; },
115
- get SparkScanSettings () { return SparkScanSettings; },
116
- get SparkScanToastSettings () { return SparkScanToastSettings; },
117
- get SparkScanView () { return SparkScanView; },
118
- get SparkScanViewSettings () { return SparkScanViewSettings; },
119
- get SparkScanViewState () { return SparkScanViewState; },
120
- get StructuredAppendData () { return StructuredAppendData; },
121
- get Symbology () { return Symbology; },
122
- get SymbologyDescription () { return SymbologyDescription; },
123
- get SymbologySettings () { return SymbologySettings; },
124
- get TargetBarcode () { return TargetBarcode; },
125
- get TextDefinition () { return TextDefinition; },
126
- get TextDefinitionBuilder () { return TextDefinitionBuilder; },
127
- get TextIdentifier () { return TextIdentifier; },
128
- get TrackedBarcode () { return TrackedBarcode; },
129
- get TrackedBarcodeView () { return TrackedBarcodeView; },
130
- get UpcaBarcodeGeneratorBuilder () { return UpcaBarcodeGeneratorBuilder; }
131
- });
132
-
133
6
  class TrackedBarcodeView extends DefaultSerializeable {
134
7
  static withHTMLElement(element, options) {
135
8
  return this.getEncodedImageData(element).then(data => new TrackedBarcodeView(data, options));
@@ -227,6 +100,10 @@ class BarcodeBatchAdvancedOverlay {
227
100
  get view() {
228
101
  return this.baseBarcodeBatchOverlay.view;
229
102
  }
103
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
104
+ onViewIdChanged() {
105
+ this.baseBarcodeBatchOverlay.onViewIdChanged();
106
+ }
230
107
  toJSON() {
231
108
  return this.baseBarcodeBatchOverlay.toJSON();
232
109
  }
@@ -650,13 +527,21 @@ class BarcodeCountView {
650
527
  this.baseBarcodeCountView.setToolbarSettings(settings);
651
528
  }
652
529
  connectToElement(element) {
653
- this.baseBarcodeCountView.createNativeView(this.viewId).then(() => {
654
- this.htmlElement = element;
530
+ // Pre-compute position/size before creating native view
531
+ this.htmlElement = element;
532
+ const boundingRect = element.getBoundingClientRect();
533
+ const initialTop = boundingRect.top;
534
+ const initialLeft = boundingRect.left;
535
+ const initialWidth = boundingRect.width;
536
+ const initialHeight = boundingRect.height;
537
+ this.baseBarcodeCountView.createNativeView(this.viewId).then(() => __awaiter(this, void 0, void 0, function* () {
538
+ // Immediately send position/size to native before any other processing
539
+ yield this.baseBarcodeCountView.setPositionAndSize(initialTop, initialLeft, initialWidth, initialHeight, false);
655
540
  this.htmlElementState = new HTMLElementState();
656
- // Initial update
541
+ // Initial update to sync state
657
542
  this.elementDidChange();
658
543
  this.subscribeToChangesOnHTMLElement();
659
- });
544
+ }));
660
545
  }
661
546
  detachFromElement() {
662
547
  this.baseBarcodeCountView.removeNativeView().then(() => {
@@ -770,7 +655,11 @@ class BarcodeFindView {
770
655
  }
771
656
  set htmlElementState(newState) {
772
657
  const didChangeShown = this._htmlElementState.isShown !== newState.isShown;
658
+ const didChangePositionOrSize = this._htmlElementState.didChangeComparedTo(newState);
773
659
  this._htmlElementState = newState;
660
+ if (didChangePositionOrSize) {
661
+ this.updatePositionAndSize();
662
+ }
774
663
  if (didChangeShown) {
775
664
  if (this._htmlElementState.isShown) {
776
665
  this._show();
@@ -783,6 +672,12 @@ class BarcodeFindView {
783
672
  get htmlElementState() {
784
673
  return this._htmlElementState;
785
674
  }
675
+ updatePositionAndSize() {
676
+ if (!this.htmlElementState || !this.htmlElementState.isValid) {
677
+ return;
678
+ }
679
+ this.baseBarcodeFindView.setPositionAndSize(this.htmlElementState.position.top, this.htmlElementState.position.left, this.htmlElementState.size.width, this.htmlElementState.size.height, this.htmlElementState.shouldBeUnderContent);
680
+ }
786
681
  get barcodeFindViewUiListener() {
787
682
  return this.baseBarcodeFindView.barcodeFindViewUiListener;
788
683
  }
@@ -904,14 +799,22 @@ class BarcodeFindView {
904
799
  return this.baseBarcodeFindView.pauseSearching();
905
800
  }
906
801
  connectToElement(element) {
802
+ // Pre-compute position/size before creating native view
803
+ this.htmlElement = element;
804
+ const boundingRect = element.getBoundingClientRect();
805
+ const initialTop = boundingRect.top;
806
+ const initialLeft = boundingRect.left;
807
+ const initialWidth = boundingRect.width;
808
+ const initialHeight = boundingRect.height;
907
809
  const viewId = (Date.now() / 1000) | 0;
908
- this.baseBarcodeFindView.createNativeView(viewId).then(() => {
909
- this.htmlElement = element;
810
+ this.baseBarcodeFindView.createNativeView(viewId).then(() => __awaiter(this, void 0, void 0, function* () {
811
+ // Immediately send position/size to native before any other processing
812
+ yield this.baseBarcodeFindView.setPositionAndSize(initialTop, initialLeft, initialWidth, initialHeight, false);
910
813
  this.htmlElementState = new HTMLElementState();
911
- // Initial update
814
+ // Initial update to sync state
912
815
  this.elementDidChange();
913
816
  this.subscribeToChangesOnHTMLElement();
914
- });
817
+ }));
915
818
  }
916
819
  detachFromElement() {
917
820
  this.baseBarcodeFindView.removeNativeView().then(() => {
@@ -1160,6 +1063,525 @@ class SparkScanView {
1160
1063
  }
1161
1064
  }
1162
1065
 
1066
+ class BarcodePickView extends DefaultSerializeable {
1067
+ constructor(props) {
1068
+ super();
1069
+ this.viewId = Math.floor(Math.random() * 1000000);
1070
+ this.htmlElement = null;
1071
+ this._htmlElementState = new HTMLElementState();
1072
+ this.domObserver = new MutationObserver(this.elementDidChange.bind(this));
1073
+ this.scrollListener = this.elementDidChange.bind(this);
1074
+ this.orientationChangeListener = () => {
1075
+ this.elementDidChange();
1076
+ // SDC-1784 -> workaround because at the moment of this callback the element doesn't have the updated size.
1077
+ setTimeout(this.elementDidChange.bind(this), 100);
1078
+ setTimeout(this.elementDidChange.bind(this), 300);
1079
+ setTimeout(this.elementDidChange.bind(this), 1000);
1080
+ };
1081
+ this.baseBarcodePickView = new BaseBarcodePickView({
1082
+ context: props.context,
1083
+ barcodePick: props.barcodePick,
1084
+ settings: props.settings,
1085
+ cameraSettings: props.cameraSettings,
1086
+ });
1087
+ }
1088
+ get uiListener() {
1089
+ return this.baseBarcodePickView.uiListener;
1090
+ }
1091
+ set uiListener(value) {
1092
+ this.baseBarcodePickView.uiListener = value;
1093
+ }
1094
+ set htmlElementState(newState) {
1095
+ const didChangeShown = this._htmlElementState.isShown !== newState.isShown;
1096
+ const didChangePositionOrSize = this._htmlElementState.didChangeComparedTo(newState);
1097
+ this._htmlElementState = newState;
1098
+ if (didChangePositionOrSize) {
1099
+ this.updatePositionAndSize();
1100
+ }
1101
+ if (didChangeShown) {
1102
+ if (this._htmlElementState.isShown) {
1103
+ this.start();
1104
+ }
1105
+ else {
1106
+ this.stop();
1107
+ }
1108
+ }
1109
+ }
1110
+ get htmlElementState() {
1111
+ return this._htmlElementState;
1112
+ }
1113
+ connectToElement(element) {
1114
+ // Pre-compute position/size before creating native view
1115
+ this.htmlElement = element;
1116
+ const boundingRect = element.getBoundingClientRect();
1117
+ const initialTop = boundingRect.top;
1118
+ const initialLeft = boundingRect.left;
1119
+ const initialWidth = boundingRect.width;
1120
+ const initialHeight = boundingRect.height;
1121
+ this.baseBarcodePickView.createNativeView(this.viewId).then(() => __awaiter(this, void 0, void 0, function* () {
1122
+ // Immediately send position/size to native before any other processing
1123
+ yield this.baseBarcodePickView.setPickViewPositionAndSize(initialTop, initialLeft, initialWidth, initialHeight, false);
1124
+ this.htmlElementState = new HTMLElementState();
1125
+ // Initial update to sync state
1126
+ this.elementDidChange();
1127
+ this.subscribeToChangesOnHTMLElement();
1128
+ }));
1129
+ }
1130
+ detachFromElement() {
1131
+ this.baseBarcodePickView.removeNativeView().then(() => {
1132
+ this.unsubscribeFromChangesOnHTMLElement();
1133
+ this.htmlElement = null;
1134
+ this.elementDidChange();
1135
+ });
1136
+ }
1137
+ subscribeToChangesOnHTMLElement() {
1138
+ this.domObserver.observe(document, { attributes: true, childList: true, subtree: true });
1139
+ window.addEventListener('scroll', this.scrollListener);
1140
+ window.addEventListener('orientationchange', this.orientationChangeListener);
1141
+ }
1142
+ unsubscribeFromChangesOnHTMLElement() {
1143
+ this.domObserver.disconnect();
1144
+ window.removeEventListener('scroll', this.scrollListener);
1145
+ window.removeEventListener('orientationchange', this.orientationChangeListener);
1146
+ }
1147
+ elementDidChange() {
1148
+ if (!this.htmlElement) {
1149
+ this.htmlElementState = new HTMLElementState();
1150
+ return;
1151
+ }
1152
+ const newState = new HTMLElementState();
1153
+ const boundingRect = this.htmlElement.getBoundingClientRect();
1154
+ newState.position = new HtmlElementPosition(boundingRect.top, boundingRect.left);
1155
+ newState.size = new HtmlElementSize(boundingRect.width, boundingRect.height);
1156
+ newState.shouldBeUnderContent =
1157
+ parseInt(this.htmlElement.style.zIndex || '1', 10) < 0 ||
1158
+ parseInt(getComputedStyle(this.htmlElement).zIndex || '1', 10) < 0;
1159
+ const isDisplayed = getComputedStyle(this.htmlElement).display !== 'none' && this.htmlElement.style.display !== 'none';
1160
+ const isInDOM = document.body.contains(this.htmlElement);
1161
+ newState.isShown = isDisplayed && isInDOM && !this.htmlElement.hidden;
1162
+ this.htmlElementState = newState;
1163
+ }
1164
+ updatePositionAndSize() {
1165
+ if (!this.htmlElementState || !this.htmlElementState.isValid) {
1166
+ return;
1167
+ }
1168
+ this.baseBarcodePickView.setPickViewPositionAndSize(this.htmlElementState.position.top, this.htmlElementState.position.left, this.htmlElementState.size.width, this.htmlElementState.size.height, this.htmlElementState.shouldBeUnderContent);
1169
+ }
1170
+ start() {
1171
+ return __awaiter(this, void 0, void 0, function* () {
1172
+ yield this.baseBarcodePickView.start();
1173
+ });
1174
+ }
1175
+ stop() {
1176
+ return __awaiter(this, void 0, void 0, function* () {
1177
+ yield this.baseBarcodePickView.stop();
1178
+ });
1179
+ }
1180
+ freeze() {
1181
+ return __awaiter(this, void 0, void 0, function* () {
1182
+ yield this.baseBarcodePickView.freeze();
1183
+ });
1184
+ }
1185
+ pause() {
1186
+ return __awaiter(this, void 0, void 0, function* () {
1187
+ yield this.baseBarcodePickView.pause();
1188
+ });
1189
+ }
1190
+ resume() {
1191
+ return __awaiter(this, void 0, void 0, function* () {
1192
+ yield this.baseBarcodePickView.resume();
1193
+ });
1194
+ }
1195
+ reset() {
1196
+ return __awaiter(this, void 0, void 0, function* () {
1197
+ yield this.baseBarcodePickView.reset();
1198
+ });
1199
+ }
1200
+ addListener(listener) {
1201
+ this.baseBarcodePickView.addListener(listener);
1202
+ }
1203
+ removeListener(listener) {
1204
+ this.baseBarcodePickView.removeListener(listener);
1205
+ }
1206
+ addActionListener(listener) {
1207
+ this.baseBarcodePickView.addActionListener(listener);
1208
+ }
1209
+ removeActionListener(listener) {
1210
+ this.baseBarcodePickView.removeActionListener(listener);
1211
+ }
1212
+ release() {
1213
+ this.baseBarcodePickView.dispose();
1214
+ }
1215
+ }
1216
+ __decorate([
1217
+ ignoreFromSerialization
1218
+ ], BarcodePickView.prototype, "baseBarcodePickView", void 0);
1219
+ __decorate([
1220
+ ignoreFromSerialization
1221
+ ], BarcodePickView.prototype, "htmlElement", void 0);
1222
+ __decorate([
1223
+ ignoreFromSerialization
1224
+ ], BarcodePickView.prototype, "_htmlElementState", void 0);
1225
+ __decorate([
1226
+ ignoreFromSerialization
1227
+ ], BarcodePickView.prototype, "domObserver", void 0);
1228
+ __decorate([
1229
+ ignoreFromSerialization
1230
+ ], BarcodePickView.prototype, "scrollListener", void 0);
1231
+ __decorate([
1232
+ ignoreFromSerialization
1233
+ ], BarcodePickView.prototype, "orientationChangeListener", void 0);
1234
+
1235
+ class BarcodeArView extends DefaultSerializeable {
1236
+ constructor(props) {
1237
+ super();
1238
+ this.viewId = Math.floor(Math.random() * 1000000);
1239
+ this.htmlElement = null;
1240
+ this._htmlElementState = new HTMLElementState();
1241
+ this.domObserver = new MutationObserver(this.elementDidChange.bind(this));
1242
+ this.scrollListener = this.elementDidChange.bind(this);
1243
+ this.orientationChangeListener = () => {
1244
+ this.elementDidChange();
1245
+ // SDC-1784 -> workaround because at the moment of this callback the element doesn't have the updated size.
1246
+ setTimeout(this.elementDidChange.bind(this), 100);
1247
+ setTimeout(this.elementDidChange.bind(this), 300);
1248
+ setTimeout(this.elementDidChange.bind(this), 1000);
1249
+ };
1250
+ this.baseBarcodeArView = new BaseBarcodeArView(props.context, props.barcodeAr, this, props.settings, props.cameraSettings, props.annotationProvider, props.highlightProvider, props.uiListener);
1251
+ }
1252
+ get uiListener() {
1253
+ return this.baseBarcodeArView.barcodeArViewUiListener;
1254
+ }
1255
+ set uiListener(value) {
1256
+ this.baseBarcodeArView.barcodeArViewUiListener = value;
1257
+ }
1258
+ get annotationProvider() {
1259
+ return this.baseBarcodeArView.annotationProvider;
1260
+ }
1261
+ set annotationProvider(value) {
1262
+ this.baseBarcodeArView.annotationProvider = value;
1263
+ }
1264
+ get highlightProvider() {
1265
+ return this.baseBarcodeArView.highlightProvider;
1266
+ }
1267
+ set highlightProvider(value) {
1268
+ this.baseBarcodeArView.highlightProvider = value;
1269
+ }
1270
+ set htmlElementState(newState) {
1271
+ const didChangeShown = this._htmlElementState.isShown !== newState.isShown;
1272
+ const didChangePositionOrSize = this._htmlElementState.didChangeComparedTo(newState);
1273
+ this._htmlElementState = newState;
1274
+ if (didChangePositionOrSize && newState.isValid) {
1275
+ this.setPositionAndSize(this.htmlElementState.position.top, this.htmlElementState.position.left, this.htmlElementState.size.width, this.htmlElementState.size.height, this.htmlElementState.shouldBeUnderContent);
1276
+ }
1277
+ if (didChangeShown) {
1278
+ if (this._htmlElementState.isShown) {
1279
+ this.start();
1280
+ }
1281
+ }
1282
+ }
1283
+ get htmlElementState() {
1284
+ return this._htmlElementState;
1285
+ }
1286
+ setPositionAndSize(top, left, width, height, shouldBeUnderWebView) {
1287
+ return this.baseBarcodeArView.setPositionAndSize(top, left, width, height, shouldBeUnderWebView);
1288
+ }
1289
+ connectToElement(element) {
1290
+ return __awaiter(this, void 0, void 0, function* () {
1291
+ // Pre-compute position/size before creating native view
1292
+ this.htmlElement = element;
1293
+ const boundingRect = element.getBoundingClientRect();
1294
+ const initialTop = boundingRect.top;
1295
+ const initialLeft = boundingRect.left;
1296
+ const initialWidth = boundingRect.width;
1297
+ const initialHeight = boundingRect.height;
1298
+ yield this.baseBarcodeArView.createNativeView(this.viewId);
1299
+ // Immediately send position/size to native before any other processing
1300
+ yield this.baseBarcodeArView.setPositionAndSize(initialTop, initialLeft, initialWidth, initialHeight, false);
1301
+ this.htmlElementState = new HTMLElementState();
1302
+ // Initial update to sync state
1303
+ this.elementDidChange();
1304
+ this.subscribeToChangesOnHTMLElement();
1305
+ });
1306
+ }
1307
+ detachFromElement() {
1308
+ return __awaiter(this, void 0, void 0, function* () {
1309
+ yield this.baseBarcodeArView.removeNativeView();
1310
+ this.unsubscribeFromChangesOnHTMLElement();
1311
+ this.htmlElement = null;
1312
+ this.elementDidChange();
1313
+ });
1314
+ }
1315
+ subscribeToChangesOnHTMLElement() {
1316
+ this.domObserver.observe(document, { attributes: true, childList: true, subtree: true });
1317
+ window.addEventListener('scroll', this.scrollListener);
1318
+ window.addEventListener('orientationchange', this.orientationChangeListener);
1319
+ }
1320
+ unsubscribeFromChangesOnHTMLElement() {
1321
+ this.domObserver.disconnect();
1322
+ window.removeEventListener('scroll', this.scrollListener);
1323
+ window.removeEventListener('orientationchange', this.orientationChangeListener);
1324
+ }
1325
+ elementDidChange() {
1326
+ if (!this.htmlElement) {
1327
+ this.htmlElementState = new HTMLElementState();
1328
+ return;
1329
+ }
1330
+ const newState = new HTMLElementState();
1331
+ const boundingRect = this.htmlElement.getBoundingClientRect();
1332
+ newState.position = new HtmlElementPosition(boundingRect.top, boundingRect.left);
1333
+ newState.size = new HtmlElementSize(boundingRect.width, boundingRect.height);
1334
+ newState.shouldBeUnderContent = parseInt(this.htmlElement.style.zIndex || '1', 10) < 0
1335
+ || parseInt(getComputedStyle(this.htmlElement).zIndex || '1', 10) < 0;
1336
+ const isDisplayed = getComputedStyle(this.htmlElement).display !== 'none' && this.htmlElement.style.display !== 'none';
1337
+ const isInDOM = document.body.contains(this.htmlElement);
1338
+ newState.isShown = isDisplayed && isInDOM && !this.htmlElement.hidden;
1339
+ this.htmlElementState = newState;
1340
+ }
1341
+ start() {
1342
+ return __awaiter(this, void 0, void 0, function* () {
1343
+ yield this.baseBarcodeArView.start();
1344
+ });
1345
+ }
1346
+ stop() {
1347
+ return __awaiter(this, void 0, void 0, function* () {
1348
+ yield this.baseBarcodeArView.stop();
1349
+ });
1350
+ }
1351
+ pause() {
1352
+ return __awaiter(this, void 0, void 0, function* () {
1353
+ yield this.baseBarcodeArView.pause();
1354
+ });
1355
+ }
1356
+ reset() {
1357
+ return __awaiter(this, void 0, void 0, function* () {
1358
+ yield this.baseBarcodeArView.reset();
1359
+ });
1360
+ }
1361
+ get shouldShowTorchControl() {
1362
+ return this.baseBarcodeArView.shouldShowTorchControl;
1363
+ }
1364
+ set shouldShowTorchControl(value) {
1365
+ this.baseBarcodeArView.shouldShowTorchControl = value;
1366
+ }
1367
+ get torchControlPosition() {
1368
+ return this.baseBarcodeArView.torchControlPosition;
1369
+ }
1370
+ set torchControlPosition(value) {
1371
+ this.baseBarcodeArView.torchControlPosition = value;
1372
+ }
1373
+ get shouldShowZoomControl() {
1374
+ return this.baseBarcodeArView.shouldShowZoomControl;
1375
+ }
1376
+ set shouldShowZoomControl(value) {
1377
+ this.baseBarcodeArView.shouldShowZoomControl = value;
1378
+ }
1379
+ get zoomControlPosition() {
1380
+ return this.baseBarcodeArView.zoomControlPosition;
1381
+ }
1382
+ set zoomControlPosition(value) {
1383
+ this.baseBarcodeArView.zoomControlPosition = value;
1384
+ }
1385
+ get shouldShowCameraSwitchControl() {
1386
+ return this.baseBarcodeArView.shouldShowCameraSwitchControl;
1387
+ }
1388
+ set shouldShowCameraSwitchControl(value) {
1389
+ this.baseBarcodeArView.shouldShowCameraSwitchControl = value;
1390
+ }
1391
+ get cameraSwitchControlPosition() {
1392
+ return this.baseBarcodeArView.cameraSwitchControlPosition;
1393
+ }
1394
+ set cameraSwitchControlPosition(value) {
1395
+ this.baseBarcodeArView.cameraSwitchControlPosition = value;
1396
+ }
1397
+ get shouldShowMacroModeControl() {
1398
+ return this.baseBarcodeArView.shouldShowMacroModeControl;
1399
+ }
1400
+ set shouldShowMacroModeControl(value) {
1401
+ this.baseBarcodeArView.shouldShowMacroModeControl = value;
1402
+ }
1403
+ get macroModeControlPosition() {
1404
+ return this.baseBarcodeArView.macroModeControlPosition;
1405
+ }
1406
+ set macroModeControlPosition(value) {
1407
+ this.baseBarcodeArView.macroModeControlPosition = value;
1408
+ }
1409
+ }
1410
+ __decorate([
1411
+ ignoreFromSerialization
1412
+ ], BarcodeArView.prototype, "baseBarcodeArView", void 0);
1413
+ __decorate([
1414
+ ignoreFromSerialization
1415
+ ], BarcodeArView.prototype, "htmlElement", void 0);
1416
+ __decorate([
1417
+ ignoreFromSerialization
1418
+ ], BarcodeArView.prototype, "_htmlElementState", void 0);
1419
+ __decorate([
1420
+ ignoreFromSerialization
1421
+ ], BarcodeArView.prototype, "domObserver", void 0);
1422
+ __decorate([
1423
+ ignoreFromSerialization
1424
+ ], BarcodeArView.prototype, "scrollListener", void 0);
1425
+ __decorate([
1426
+ ignoreFromSerialization
1427
+ ], BarcodeArView.prototype, "orientationChangeListener", void 0);
1428
+
1429
+ // import { NativeCallResult } from 'scandit-capacitor-datacapture-core/dist/core';
1430
+ // Core Barcode Types
1431
+
1432
+ var BarcodeExports = /*#__PURE__*/Object.freeze({
1433
+ __proto__: null,
1434
+ ArucoDictionary: ArucoDictionary,
1435
+ get ArucoDictionaryPreset () { return ArucoDictionaryPreset; },
1436
+ ArucoMarker: ArucoMarker,
1437
+ AztecBarcodeGeneratorBuilder: AztecBarcodeGeneratorBuilder,
1438
+ Barcode: Barcode,
1439
+ BarcodeAr: BarcodeAr,
1440
+ get BarcodeArAnnotationTrigger () { return BarcodeArAnnotationTrigger; },
1441
+ BarcodeArCircleHighlight: BarcodeArCircleHighlight,
1442
+ get BarcodeArCircleHighlightPreset () { return BarcodeArCircleHighlightPreset; },
1443
+ BarcodeArFeedback: BarcodeArFeedback,
1444
+ BarcodeArInfoAnnotation: BarcodeArInfoAnnotation,
1445
+ get BarcodeArInfoAnnotationAnchor () { return BarcodeArInfoAnnotationAnchor; },
1446
+ BarcodeArInfoAnnotationBodyComponent: BarcodeArInfoAnnotationBodyComponent,
1447
+ BarcodeArInfoAnnotationFooter: BarcodeArInfoAnnotationFooter,
1448
+ BarcodeArInfoAnnotationHeader: BarcodeArInfoAnnotationHeader,
1449
+ get BarcodeArInfoAnnotationWidthPreset () { return BarcodeArInfoAnnotationWidthPreset; },
1450
+ BarcodeArPopoverAnnotation: BarcodeArPopoverAnnotation,
1451
+ BarcodeArPopoverAnnotationButton: BarcodeArPopoverAnnotationButton,
1452
+ BarcodeArRectangleHighlight: BarcodeArRectangleHighlight,
1453
+ BarcodeArResponsiveAnnotation: BarcodeArResponsiveAnnotation,
1454
+ BarcodeArSession: BarcodeArSession,
1455
+ BarcodeArSettings: BarcodeArSettings,
1456
+ BarcodeArStatusIconAnnotation: BarcodeArStatusIconAnnotation,
1457
+ BarcodeArView: BarcodeArView,
1458
+ BarcodeArViewSettings: BarcodeArViewSettings,
1459
+ BarcodeBatch: BarcodeBatch,
1460
+ BarcodeBatchAdvancedOverlay: BarcodeBatchAdvancedOverlay,
1461
+ BarcodeBatchBasicOverlay: BarcodeBatchBasicOverlay,
1462
+ get BarcodeBatchBasicOverlayStyle () { return BarcodeBatchBasicOverlayStyle; },
1463
+ BarcodeBatchSession: BarcodeBatchSession,
1464
+ BarcodeBatchSettings: BarcodeBatchSettings,
1465
+ BarcodeCapture: BarcodeCapture,
1466
+ BarcodeCaptureFeedback: BarcodeCaptureFeedback,
1467
+ BarcodeCaptureOverlay: BarcodeCaptureOverlay,
1468
+ BarcodeCaptureSession: BarcodeCaptureSession,
1469
+ BarcodeCaptureSettings: BarcodeCaptureSettings,
1470
+ BarcodeCount: BarcodeCount,
1471
+ BarcodeCountCaptureList: BarcodeCountCaptureList,
1472
+ BarcodeCountCaptureListSession: BarcodeCountCaptureListSession,
1473
+ BarcodeCountFeedback: BarcodeCountFeedback,
1474
+ BarcodeCountNotInListActionSettings: BarcodeCountNotInListActionSettings,
1475
+ BarcodeCountSession: BarcodeCountSession,
1476
+ BarcodeCountSettings: BarcodeCountSettings,
1477
+ BarcodeCountToolbarSettings: BarcodeCountToolbarSettings,
1478
+ BarcodeCountView: BarcodeCountView,
1479
+ get BarcodeCountViewStyle () { return BarcodeCountViewStyle$1; },
1480
+ BarcodeDefinition: BarcodeDefinition,
1481
+ BarcodeDefinitionBuilder: BarcodeDefinitionBuilder,
1482
+ BarcodeFilterHighlightSettingsBrush: BarcodeFilterHighlightSettingsBrush,
1483
+ get BarcodeFilterHighlightType () { return BarcodeFilterHighlightType; },
1484
+ BarcodeFilterSettings: BarcodeFilterSettings,
1485
+ BarcodeFind: BarcodeFind,
1486
+ BarcodeFindFeedback: BarcodeFindFeedback,
1487
+ BarcodeFindItem: BarcodeFindItem,
1488
+ BarcodeFindItemContent: BarcodeFindItemContent,
1489
+ BarcodeFindItemSearchOptions: BarcodeFindItemSearchOptions,
1490
+ BarcodeFindSession: BarcodeFindSession,
1491
+ BarcodeFindSettings: BarcodeFindSettings,
1492
+ BarcodeFindView: BarcodeFindView,
1493
+ BarcodeFindViewSettings: BarcodeFindViewSettings,
1494
+ BarcodeGenerator: BarcodeGenerator,
1495
+ BarcodeGeneratorBuilder: BarcodeGeneratorBuilder,
1496
+ BarcodeIdentifier: BarcodeIdentifier,
1497
+ BarcodePick: BarcodePick,
1498
+ get BarcodePickAction () { return BarcodePickAction; },
1499
+ BarcodePickActionCallback: BarcodePickActionCallback,
1500
+ BarcodePickAsyncMapperProductProvider: BarcodePickAsyncMapperProductProvider,
1501
+ BarcodePickProduct: BarcodePickProduct,
1502
+ BarcodePickProductProviderCallback: BarcodePickProductProviderCallback,
1503
+ BarcodePickProductProviderCallbackItem: BarcodePickProductProviderCallbackItem,
1504
+ BarcodePickScanningSession: BarcodePickScanningSession,
1505
+ BarcodePickSession: BarcodePickSession,
1506
+ BarcodePickSettings: BarcodePickSettings,
1507
+ get BarcodePickState () { return BarcodePickState; },
1508
+ BarcodePickStatusIconSettings: BarcodePickStatusIconSettings,
1509
+ BarcodePickStatusIconStyle: BarcodePickStatusIconStyle,
1510
+ BarcodePickView: BarcodePickView,
1511
+ BarcodePickViewHighlightStyleRequest: BarcodePickViewHighlightStyleRequest,
1512
+ BarcodePickViewHighlightStyleResponse: BarcodePickViewHighlightStyleResponse,
1513
+ BarcodePickViewHighlightStyleResponseBuilder: BarcodePickViewHighlightStyleResponseBuilder,
1514
+ BarcodePickViewSettings: BarcodePickViewSettings,
1515
+ BarcodeSelection: BarcodeSelection,
1516
+ BarcodeSelectionAimerSelection: BarcodeSelectionAimerSelection,
1517
+ BarcodeSelectionAutoSelectionStrategy: BarcodeSelectionAutoSelectionStrategy,
1518
+ BarcodeSelectionBasicOverlay: BarcodeSelectionBasicOverlay,
1519
+ get BarcodeSelectionBasicOverlayStyle () { return BarcodeSelectionBasicOverlayStyle; },
1520
+ BarcodeSelectionFeedback: BarcodeSelectionFeedback,
1521
+ get BarcodeSelectionFreezeBehavior () { return BarcodeSelectionFreezeBehavior; },
1522
+ BarcodeSelectionManualSelectionStrategy: BarcodeSelectionManualSelectionStrategy,
1523
+ BarcodeSelectionSession: BarcodeSelectionSession,
1524
+ BarcodeSelectionSettings: BarcodeSelectionSettings,
1525
+ get BarcodeSelectionTapBehavior () { return BarcodeSelectionTapBehavior; },
1526
+ BarcodeSelectionTapSelection: BarcodeSelectionTapSelection,
1527
+ BarcodeSpatialGrid: BarcodeSpatialGrid,
1528
+ get BatterySavingMode () { return BatterySavingMode; },
1529
+ get Checksum () { return Checksum; },
1530
+ Code128BarcodeGeneratorBuilder: Code128BarcodeGeneratorBuilder,
1531
+ Code39BarcodeGeneratorBuilder: Code39BarcodeGeneratorBuilder,
1532
+ get CompositeFlag () { return CompositeFlag; },
1533
+ get CompositeType () { return CompositeType; },
1534
+ DataMatrixBarcodeGeneratorBuilder: DataMatrixBarcodeGeneratorBuilder,
1535
+ Dot: Dot,
1536
+ DotWithIcons: DotWithIcons,
1537
+ Ean13BarcodeGeneratorBuilder: Ean13BarcodeGeneratorBuilder,
1538
+ Ean13UpcaClassification: Ean13UpcaClassification,
1539
+ EncodingRange: EncodingRange,
1540
+ InterleavedTwoOfFiveBarcodeGeneratorBuilder: InterleavedTwoOfFiveBarcodeGeneratorBuilder,
1541
+ LocalizedOnlyBarcode: LocalizedOnlyBarcode,
1542
+ QrCodeBarcodeGeneratorBuilder: QrCodeBarcodeGeneratorBuilder,
1543
+ get QrCodeErrorCorrectionLevel () { return QrCodeErrorCorrectionLevel; },
1544
+ Range: Range,
1545
+ Rectangular: Rectangular,
1546
+ RectangularWithIcons: RectangularWithIcons,
1547
+ get ScanComponentBarcodePreset () { return ScanComponentBarcodePreset; },
1548
+ get ScanComponentTextSemanticType () { return ScanComponentTextSemanticType; },
1549
+ ScanItemDefinition: ScanItemDefinition,
1550
+ ScanItemIdentifier: ScanItemIdentifier,
1551
+ ScannedBarcode: ScannedBarcode,
1552
+ ScannedComponentIdentifier: ScannedComponentIdentifier,
1553
+ ScannedItem: ScannedItem,
1554
+ ScannedItemIdentifier: ScannedItemIdentifier,
1555
+ ScannedText: ScannedText,
1556
+ SparkScan: SparkScan,
1557
+ SparkScanBarcodeErrorFeedback: SparkScanBarcodeErrorFeedback,
1558
+ SparkScanBarcodeFeedback: SparkScanBarcodeFeedback,
1559
+ SparkScanBarcodeSuccessFeedback: SparkScanBarcodeSuccessFeedback,
1560
+ get SparkScanMiniPreviewSize () { return SparkScanMiniPreviewSize; },
1561
+ get SparkScanPreviewBehavior () { return SparkScanPreviewBehavior; },
1562
+ get SparkScanScanningBehavior () { return SparkScanScanningBehavior; },
1563
+ SparkScanScanningModeDefault: SparkScanScanningModeDefault,
1564
+ SparkScanScanningModeTarget: SparkScanScanningModeTarget,
1565
+ SparkScanSession: SparkScanSession,
1566
+ SparkScanSettings: SparkScanSettings,
1567
+ SparkScanToastSettings: SparkScanToastSettings,
1568
+ SparkScanView: SparkScanView,
1569
+ SparkScanViewSettings: SparkScanViewSettings,
1570
+ get SparkScanViewState () { return SparkScanViewState; },
1571
+ StructuredAppendData: StructuredAppendData,
1572
+ get Symbology () { return Symbology; },
1573
+ SymbologyDescription: SymbologyDescription,
1574
+ SymbologySettings: SymbologySettings,
1575
+ TargetBarcode: TargetBarcode,
1576
+ TextDefinition: TextDefinition,
1577
+ TextDefinitionBuilder: TextDefinitionBuilder,
1578
+ TextIdentifier: TextIdentifier,
1579
+ TrackedBarcode: TrackedBarcode,
1580
+ TrackedBarcodeView: TrackedBarcodeView,
1581
+ TrackedObject: TrackedObject,
1582
+ UpcaBarcodeGeneratorBuilder: UpcaBarcodeGeneratorBuilder
1583
+ });
1584
+
1163
1585
  /*! Capacitor: https://capacitorjs.com/ - MIT License */
1164
1586
  const createCapacitorPlatforms = (win) => {
1165
1587
  const defaultPlatformMap = new Map();
@@ -1832,14 +2254,7 @@ const Capacitor = {
1832
2254
  const getDefaults = () => __awaiter(void 0, void 0, void 0, function* () {
1833
2255
  try {
1834
2256
  const defaultsJSON = yield window.Capacitor.Plugins[pluginName]['getDefaults']();
1835
- loadBarcodeDefaults(defaultsJSON);
1836
- loadBarcodeCaptureDefaults(defaultsJSON.BarcodeCapture);
1837
- loadBarcodeBatchDefaults(defaultsJSON.BarcodeBatch);
1838
- loadBarcodeSelectionDefaults(defaultsJSON.BarcodeSelection);
1839
- loadBarcodeCountDefaults(defaultsJSON.BarcodeCount);
1840
- loadBarcodePickDefaults(defaultsJSON.BarcodePick);
1841
- loadBarcodeFindDefaults(defaultsJSON.BarcodeFind);
1842
- loadSparkScanDefaults(defaultsJSON.SparkScan);
2257
+ loadAllBarcodeDefaults(defaultsJSON);
1843
2258
  // TODO: Review this
1844
2259
  Capacitor.defaults = getBarcodeDefaults();
1845
2260
  }
@@ -1882,174 +2297,5 @@ registerPlugin('ScanditBarcodePlugin', {
1882
2297
  });
1883
2298
  // tslint:disable-next-line:variable-name
1884
2299
  const ScanditBarcodePlugin = new ScanditBarcodePluginImplementation();
1885
- const ScanditBarcodeCountPluginNative = registerPlugin('ScanditBarcodeNative');
1886
- const ScanditBarcodePickPluginNative = registerPlugin('ScanditBarcodeNative');
1887
-
1888
- class BarcodePickView extends DefaultSerializeable {
1889
- constructor(props) {
1890
- super();
1891
- this.viewId = Math.floor(Math.random() * 1000000);
1892
- this.htmlElement = null;
1893
- this._htmlElementState = new HTMLElementState();
1894
- this.domObserver = new MutationObserver(this.elementDidChange.bind(this));
1895
- this.scrollListener = this.elementDidChange.bind(this);
1896
- this.orientationChangeListener = () => {
1897
- this.elementDidChange();
1898
- // SDC-1784 -> workaround because at the moment of this callback the element doesn't have the updated size.
1899
- setTimeout(this.elementDidChange.bind(this), 100);
1900
- setTimeout(this.elementDidChange.bind(this), 300);
1901
- setTimeout(this.elementDidChange.bind(this), 1000);
1902
- };
1903
- this.baseBarcodePickView = new BaseBarcodePickView({
1904
- context: props.context,
1905
- barcodePick: props.barcodePick,
1906
- settings: props.settings,
1907
- cameraSettings: props.cameraSettings,
1908
- });
1909
- }
1910
- get uiListener() {
1911
- return this.baseBarcodePickView.uiListener;
1912
- }
1913
- set uiListener(value) {
1914
- this.baseBarcodePickView.uiListener = value;
1915
- }
1916
- set htmlElementState(newState) {
1917
- const didChangeShown = this._htmlElementState.isShown !== newState.isShown;
1918
- const didChangePositionOrSize = this._htmlElementState.didChangeComparedTo(newState);
1919
- this._htmlElementState = newState;
1920
- if (didChangePositionOrSize) {
1921
- this.updatePositionAndSize();
1922
- }
1923
- if (didChangeShown) {
1924
- if (this._htmlElementState.isShown) {
1925
- this.start();
1926
- }
1927
- else {
1928
- this.stop();
1929
- }
1930
- }
1931
- }
1932
- get htmlElementState() {
1933
- return this._htmlElementState;
1934
- }
1935
- connectToElement(element) {
1936
- this.baseBarcodePickView.createNativeView(this.viewId).then(() => {
1937
- this.htmlElement = element;
1938
- this.htmlElementState = new HTMLElementState();
1939
- // Initial update
1940
- this.elementDidChange();
1941
- this.subscribeToChangesOnHTMLElement();
1942
- });
1943
- }
1944
- detachFromElement() {
1945
- this.baseBarcodePickView.removeNativeView().then(() => {
1946
- this.unsubscribeFromChangesOnHTMLElement();
1947
- this.htmlElement = null;
1948
- this.elementDidChange();
1949
- });
1950
- }
1951
- subscribeToChangesOnHTMLElement() {
1952
- this.domObserver.observe(document, { attributes: true, childList: true, subtree: true });
1953
- window.addEventListener('scroll', this.scrollListener);
1954
- window.addEventListener('orientationchange', this.orientationChangeListener);
1955
- }
1956
- unsubscribeFromChangesOnHTMLElement() {
1957
- this.domObserver.disconnect();
1958
- window.removeEventListener('scroll', this.scrollListener);
1959
- window.removeEventListener('orientationchange', this.orientationChangeListener);
1960
- }
1961
- elementDidChange() {
1962
- if (!this.htmlElement) {
1963
- this.htmlElementState = new HTMLElementState();
1964
- return;
1965
- }
1966
- const newState = new HTMLElementState();
1967
- const boundingRect = this.htmlElement.getBoundingClientRect();
1968
- newState.position = new HtmlElementPosition(boundingRect.top, boundingRect.left);
1969
- newState.size = new HtmlElementSize(boundingRect.width, boundingRect.height);
1970
- newState.shouldBeUnderContent =
1971
- parseInt(this.htmlElement.style.zIndex || '1', 10) < 0 ||
1972
- parseInt(getComputedStyle(this.htmlElement).zIndex || '1', 10) < 0;
1973
- const isDisplayed = getComputedStyle(this.htmlElement).display !== 'none' && this.htmlElement.style.display !== 'none';
1974
- const isInDOM = document.body.contains(this.htmlElement);
1975
- newState.isShown = isDisplayed && isInDOM && !this.htmlElement.hidden;
1976
- this.htmlElementState = newState;
1977
- }
1978
- updatePositionAndSize() {
1979
- if (!this.htmlElementState || !this.htmlElementState.isValid) {
1980
- return;
1981
- }
1982
- ScanditBarcodePickPluginNative.setPickViewPositionAndSize({
1983
- top: this.htmlElementState.position.top,
1984
- left: this.htmlElementState.position.left,
1985
- width: this.htmlElementState.size.width,
1986
- height: this.htmlElementState.size.height,
1987
- shouldBeUnderContent: this.htmlElementState.shouldBeUnderContent,
1988
- });
1989
- }
1990
- start() {
1991
- return __awaiter(this, void 0, void 0, function* () {
1992
- yield this.baseBarcodePickView.start();
1993
- });
1994
- }
1995
- stop() {
1996
- return __awaiter(this, void 0, void 0, function* () {
1997
- yield this.baseBarcodePickView.stop();
1998
- });
1999
- }
2000
- freeze() {
2001
- return __awaiter(this, void 0, void 0, function* () {
2002
- yield this.baseBarcodePickView.freeze();
2003
- });
2004
- }
2005
- pause() {
2006
- return __awaiter(this, void 0, void 0, function* () {
2007
- yield this.baseBarcodePickView.pause();
2008
- });
2009
- }
2010
- resume() {
2011
- return __awaiter(this, void 0, void 0, function* () {
2012
- yield this.baseBarcodePickView.resume();
2013
- });
2014
- }
2015
- reset() {
2016
- return __awaiter(this, void 0, void 0, function* () {
2017
- yield this.baseBarcodePickView.reset();
2018
- });
2019
- }
2020
- addListener(listener) {
2021
- this.baseBarcodePickView.addListener(listener);
2022
- }
2023
- removeListener(listener) {
2024
- this.baseBarcodePickView.removeListener(listener);
2025
- }
2026
- addActionListener(listener) {
2027
- this.baseBarcodePickView.addActionListener(listener);
2028
- }
2029
- removeActionListener(listener) {
2030
- this.baseBarcodePickView.removeActionListener(listener);
2031
- }
2032
- release() {
2033
- this.baseBarcodePickView.dispose();
2034
- }
2035
- }
2036
- __decorate([
2037
- ignoreFromSerialization
2038
- ], BarcodePickView.prototype, "baseBarcodePickView", void 0);
2039
- __decorate([
2040
- ignoreFromSerialization
2041
- ], BarcodePickView.prototype, "htmlElement", void 0);
2042
- __decorate([
2043
- ignoreFromSerialization
2044
- ], BarcodePickView.prototype, "_htmlElementState", void 0);
2045
- __decorate([
2046
- ignoreFromSerialization
2047
- ], BarcodePickView.prototype, "domObserver", void 0);
2048
- __decorate([
2049
- ignoreFromSerialization
2050
- ], BarcodePickView.prototype, "scrollListener", void 0);
2051
- __decorate([
2052
- ignoreFromSerialization
2053
- ], BarcodePickView.prototype, "orientationChangeListener", void 0);
2054
2300
 
2055
- export { BarcodeBatchAdvancedOverlay, BarcodeCountView, BarcodeFindView, BarcodePickView, ScanditBarcodeCountPluginNative, ScanditBarcodePickPluginNative, ScanditBarcodePlugin, ScanditBarcodePluginImplementation, SparkScanView, TrackedBarcodeView };
2301
+ export { BarcodeArView, BarcodeBatchAdvancedOverlay, BarcodeCountView, BarcodeFindView, BarcodePickView, ScanditBarcodePlugin, ScanditBarcodePluginImplementation, SparkScanView, TrackedBarcodeView };