scanbot-web-sdk 6.0.0-dev.2 → 6.0.0-dev.4

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 (152) hide show
  1. package/@types/consume-type.d.ts +2 -1
  2. package/@types/core/bridge/common.d.ts +1 -1
  3. package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +231 -231
  4. package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +13 -11
  5. package/@types/core/bridge/compiled/CreditCardTypes.d.ts +82 -0
  6. package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +52 -44
  7. package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +17 -17
  8. package/@types/core/bridge/compiled/FrameAccumulationTypes.d.ts +41 -0
  9. package/@types/core/bridge/compiled/GDRTypes.d.ts +38 -0
  10. package/@types/core/bridge/compiled/GenericDocument.d.ts +40 -12
  11. package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +182 -0
  12. package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +7 -28
  13. package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +38 -0
  14. package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +5 -5
  15. package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +2 -2
  16. package/@types/core/bridge/compiled/ParametricFilters.d.ts +9 -5
  17. package/@types/core/bridge/compiled/TiffTypes.d.ts +6 -5
  18. package/@types/core/bridge/worker-bridge.d.ts +604 -40
  19. package/@types/core/worker/ScanbotSDK.Core.d.ts +29 -18
  20. package/@types/core-types.d.ts +4 -1
  21. package/@types/cropping-view.d.ts +1 -1
  22. package/@types/document-scanner-view.d.ts +4 -2
  23. package/@types/index.d.ts +40 -4
  24. package/@types/model/barcode/barcode-result.d.ts +12 -2
  25. package/@types/model/barcode/barcode.d.ts +2 -1
  26. package/@types/model/camera-info.d.ts +3 -2
  27. package/@types/model/configuration/barcode-scanner-configuration.d.ts +7 -4
  28. package/@types/model/configuration/cropping-view-configuration.d.ts +5 -0
  29. package/@types/model/configuration/document-scanner-configuration.d.ts +4 -10
  30. package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +1 -1
  31. package/@types/model/configuration/initialization-options.d.ts +8 -0
  32. package/@types/model/configuration/mrz-scanner-configuration.d.ts +1 -1
  33. package/@types/model/configuration/scanner-configuration.d.ts +7 -0
  34. package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
  35. package/@types/model/configuration/view-finder-scanner-configuration.d.ts +1 -1
  36. package/@types/model/error/media-error.d.ts +1 -0
  37. package/@types/scanbot-sdk.d.ts +360 -54
  38. package/@types/service/document-quality-analyzer.d.ts +1 -1
  39. package/@types/service/generic-document-recognizer.d.ts +3 -1
  40. package/@types/service/simple-mrz-recognizer.d.ts +3 -1
  41. package/@types/service/text-data-recognizer.d.ts +3 -1
  42. package/@types/service/tiff-generator.d.ts +1 -1
  43. package/@types/ui2/common.d.ts +8 -0
  44. package/@types/ui2/configuration/ActionBarConfiguration.d.ts +30 -30
  45. package/@types/ui2/configuration/ArTrackingOverlayConfiguration.d.ts +220 -220
  46. package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +51 -51
  47. package/@types/ui2/configuration/BarcodeItemMapper.d.ts +2 -2
  48. package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +34 -34
  49. package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +168 -168
  50. package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -6
  51. package/@types/ui2/configuration/BarcodeScannerUIResult.d.ts +29 -0
  52. package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +124 -69
  53. package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -1
  54. package/@types/ui2/configuration/BarcodeUseCase.d.ts +4 -3
  55. package/@types/ui2/configuration/CameraConfiguration.d.ts +32 -32
  56. package/@types/ui2/configuration/CameraPermission.d.ts +33 -33
  57. package/@types/ui2/configuration/Common.d.ts +190 -190
  58. package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
  59. package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +364 -12
  60. package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
  61. package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +488 -488
  62. package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +27 -27
  63. package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +169 -169
  64. package/@types/ui2/configuration/TopBarConfiguration.d.ts +36 -36
  65. package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +16 -16
  66. package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +45 -45
  67. package/@types/ui2/configuration.d.ts +2 -1
  68. package/@types/ui2/controllers/barcode-scanner-controller.d.ts +2 -2
  69. package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +4 -2
  70. package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +4 -2
  71. package/@types/ui2/model/counted-barcodes.d.ts +17 -20
  72. package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
  73. package/@types/ui2/scanbot-ui-library.d.ts +3 -2
  74. package/@types/ui2/utils/barcode-mapper/expected-barcode-mapper.d.ts +13 -0
  75. package/@types/ui2/utils/barcode-mapper/i-barcode-mapper.d.ts +17 -0
  76. package/@types/ui2/utils/{barcode-mapper.d.ts → barcode-mapper/user-barcode-mapper.d.ts} +4 -16
  77. package/@types/ui2/utils/find-and-pick.ts/expected-barcode-counter.d.ts +7 -0
  78. package/@types/ui2/utils/styled-badge.d.ts +1 -1
  79. package/@types/ui2/views/ar/ar-badge.d.ts +18 -0
  80. package/@types/ui2/views/ar/ar-overlay-barcode-info.d.ts +5 -1
  81. package/@types/ui2/views/ar/vertical-positions.d.ts +12 -0
  82. package/@types/ui2/views/barcode-info/barcode-info.d.ts +3 -1
  83. package/@types/ui2/views/barcode-scanner.d.ts +5 -5
  84. package/@types/ui2/views/dialog/base/confirmation-dialog.d.ts +20 -0
  85. package/@types/ui2/views/dialog/count-edit-dialog.d.ts +3 -3
  86. package/@types/ui2/views/dialog/find-and-pick-submit-dialog.d.ts +10 -0
  87. package/@types/ui2/views/drawer/barcode-result-drawer.d.ts +1 -1
  88. package/@types/ui2/views/drawer/barcode-result-sidebar.d.ts +10 -0
  89. package/@types/ui2/views/drawer/counting-button.d.ts +1 -1
  90. package/@types/ui2/views/drawer/subviews/barcode-drawer-empty-state.d.ts +1 -1
  91. package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +4 -4
  92. package/@types/ui2/views/drawer/subviews/barcode-list.d.ts +8 -1
  93. package/@types/ui2/views/drawer/subviews/drawer-header-content.d.ts +1 -1
  94. package/@types/utils/barcode-utils.d.ts +10 -0
  95. package/@types/utils/browser-cameras.d.ts +92 -0
  96. package/@types/utils/dto/Polygon.d.ts +2 -1
  97. package/@types/utils/stats.d.ts +4 -0
  98. package/@types/utils/video-stream.d.ts +3 -3
  99. package/@types/utils/video-to-image-data/two-d-video-to-image-data.d.ts +8 -0
  100. package/@types/utils/video-to-image-data/video-to-image-data.d.ts +5 -0
  101. package/@types/utils/video-to-image-data/webgl-video-to-image-data.d.ts +21 -0
  102. package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +1 -0
  103. package/@types/view/scanbot-camera-view.d.ts +9 -3
  104. package/@types/worker/worker-bridge.d.ts +607 -44
  105. package/bundle/ScanbotSDK.min.js +5 -5
  106. package/bundle/ScanbotSDK.ui2.min.js +16 -16
  107. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  108. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  109. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  110. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  111. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  112. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  113. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  114. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  115. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  116. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  117. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  118. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  119. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  120. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  121. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  122. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  123. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  124. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  125. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  126. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  127. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  128. package/package.json +2 -2
  129. package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +0 -973
  130. package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +0 -183
  131. package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +0 -183
  132. package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +0 -29
  133. package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +0 -59
  134. package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +0 -196
  135. package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +0 -105
  136. package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +0 -218
  137. package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +0 -18
  138. package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +0 -198
  139. package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +0 -104
  140. package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +0 -165
  141. package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +0 -49
  142. package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +0 -13
  143. package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +0 -67
  144. package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +0 -52
  145. package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +0 -306
  146. package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +0 -129
  147. package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +0 -186
  148. package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +0 -197
  149. package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +0 -183
  150. package/@types/ui2/configuration/BarcodeItem.d.ts +0 -6
  151. package/@types/ui2/configuration/utils.d.ts +0 -6
  152. /package/@types/ui2/views/dialog/{styled-dialog.d.ts → base/styled-dialog.d.ts} +0 -0
@@ -1,42 +1,42 @@
1
1
  import { AspectRatio } from "./Geometry";
2
- import { DeepPartial, PartiallyConstructible } from "./utils";
2
+ import { DeepPartial, PartiallyConstructible } from "../common";
3
3
  /**
4
- Configuration of the scanning interface's viewfinder, serving as guidance to the user.
5
- */
4
+ Configuration of the scanning interface's viewfinder, serving as guidance to the user.
5
+ */
6
6
  export declare class ViewFinderConfiguration extends PartiallyConstructible {
7
7
  /**
8
- Whether the viewfinder is visible.
9
- @defaultValue true;
10
- */
8
+ Whether the viewfinder is visible.
9
+ @defaultValue true;
10
+ */
11
11
  visible: boolean;
12
12
  /**
13
- Visual appearance of the viewfinder.
14
- @defaultValue new FinderCorneredStyle({
15
- "strokeColor": "?sbColorSurface",
16
- "strokeWidth": 2.0,
17
- "cornerRadius": 10.0
18
- });
19
- */
13
+ Visual appearance of the viewfinder.
14
+ @defaultValue new FinderCorneredStyle({
15
+ "strokeColor": "?sbColorSurface",
16
+ "strokeWidth": 2.0,
17
+ "cornerRadius": 10.0
18
+ });
19
+ */
20
20
  style: FinderStyle;
21
21
  /**
22
- Color of the viewfinder overlay.
23
- @defaultValue "?sbColorSurfaceLow";
24
- */
22
+ Color of the viewfinder overlay.
23
+ @defaultValue "?sbColorSurfaceLow";
24
+ */
25
25
  overlayColor: string;
26
26
  /**
27
- The viewfinder's aspect ratio.
28
- @defaultValue new AspectRatio({
29
- "width": 1.0,
30
- "height": 1.0
27
+ The viewfinder's aspect ratio.
28
+ @defaultValue new AspectRatio({
29
+ "width": 1.0,
30
+ "height": 1.0
31
31
  });
32
- */
32
+ */
33
33
  aspectRatio: AspectRatio;
34
34
  /** @param source {@displayType `DeepPartial<ViewFinderConfiguration>`} */
35
35
  constructor(source?: DeepPartial<ViewFinderConfiguration>);
36
36
  }
37
37
  /**
38
- Visual appearance of the viewfinder.
39
- */
38
+ Visual appearance of the viewfinder.
39
+ */
40
40
  export type FinderStyle = FinderCorneredStyle | FinderStrokedStyle;
41
41
  /** @internal */
42
42
  export declare namespace FinderStyle {
@@ -46,47 +46,47 @@ export declare namespace FinderStyle {
46
46
  }): FinderStyle;
47
47
  }
48
48
  /**
49
- Variant of the viewfinder displaying only the four corners of the scanning area as user guidance.
50
- */
49
+ Variant of the viewfinder displaying only the four corners of the scanning area as user guidance.
50
+ */
51
51
  export declare class FinderCorneredStyle extends PartiallyConstructible {
52
52
  readonly _type: "FinderCorneredStyle";
53
53
  /**
54
- Color of the viewfinder corner's outlines.
55
- @defaultValue "#FFFFFFFF";
56
- */
54
+ Color of the viewfinder corner's outlines.
55
+ @defaultValue "#FFFFFFFF";
56
+ */
57
57
  strokeColor: string;
58
58
  /**
59
- Width of the viewfinder corner's outlines.
60
- @defaultValue 3.0;
61
- */
59
+ Width of the viewfinder corner's outlines.
60
+ @defaultValue 3.0;
61
+ */
62
62
  strokeWidth: number;
63
63
  /**
64
- Radius of the viewfinder's corners.
65
- @defaultValue 10.0;
66
- */
64
+ Radius of the viewfinder's corners.
65
+ @defaultValue 10.0;
66
+ */
67
67
  cornerRadius: number;
68
68
  /** @param source {@displayType `DeepPartial<FinderCorneredStyle>`} */
69
69
  constructor(source?: DeepPartial<FinderCorneredStyle>);
70
70
  }
71
71
  /**
72
- Variant of the viewfinder displaying a full outline of the scanning area as user guidance.
73
- */
72
+ Variant of the viewfinder displaying a full outline of the scanning area as user guidance.
73
+ */
74
74
  export declare class FinderStrokedStyle extends PartiallyConstructible {
75
75
  readonly _type: "FinderStrokedStyle";
76
76
  /**
77
- Color of the viewfinder's outline.
78
- @defaultValue "#FFFFFFFF";
79
- */
77
+ Color of the viewfinder's outline.
78
+ @defaultValue "#FFFFFFFF";
79
+ */
80
80
  strokeColor: string;
81
81
  /**
82
- Width of the viewfinder's outline.
83
- @defaultValue 3.0;
84
- */
82
+ Width of the viewfinder's outline.
83
+ @defaultValue 3.0;
84
+ */
85
85
  strokeWidth: number;
86
86
  /**
87
- The viewfinder's corner radius.
88
- @defaultValue 10.0;
89
- */
87
+ The viewfinder's corner radius.
88
+ @defaultValue 10.0;
89
+ */
90
90
  cornerRadius: number;
91
91
  /** @param source {@displayType `DeepPartial<FinderStrokedStyle>`} */
92
92
  constructor(source?: DeepPartial<FinderStrokedStyle>);
@@ -12,7 +12,8 @@ export * from "./configuration/BarcodeTextLocalization";
12
12
  export * from "./configuration/BarcodeRecognizerConfiguration";
13
13
  export * from "./configuration/ArTrackingOverlayConfiguration";
14
14
  export * from "./configuration/BarcodeScannerConfiguration";
15
- export * from "./configuration/BarcodeItem";
15
+ export * from "./configuration/BarcodeScannerUIResult";
16
+ export * from "./configuration/GenericDocument";
16
17
  export * from "./configuration/MultipleScanningModeUseCase";
17
18
  export * from "./configuration/ScanbotAlertDialog";
18
19
  export * from "./configuration/CameraPermission";
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { BarcodeScannerConfiguration, BarcodeScannerResult } from '../configuration';
2
+ import { BarcodeScannerConfiguration, BarcodeScannerUIResult } from '../configuration';
3
3
  export declare class Props {
4
4
  configuration: BarcodeScannerConfiguration;
5
5
  onClose: () => void;
6
- onSubmit: (barcodeScannerResult: BarcodeScannerResult) => void;
6
+ onSubmit: (barcodeScannerResult: BarcodeScannerUIResult) => void;
7
7
  onError: (error: Error) => void;
8
8
  }
9
9
  export declare function BarcodeScannerController(props: Props): React.JSX.Element;
@@ -1,11 +1,13 @@
1
1
  import React from "react";
2
- import { BarcodeScannerConfiguration, BarcodeScannerResult } from "../configuration";
2
+ import { BarcodeScannerConfiguration, BarcodeScannerUIResult } from "../configuration";
3
+ import { IBarcodeMapper } from "../utils/barcode-mapper/i-barcode-mapper";
3
4
  declare class Props {
4
5
  configuration: BarcodeScannerConfiguration;
5
6
  onCameraPermissionDenied: () => void;
6
- onSubmit: (barcodeScannerResult: BarcodeScannerResult) => void;
7
+ onSubmit: (barcodeScannerResult: BarcodeScannerUIResult) => void;
7
8
  onError: (error?: Error) => void;
8
9
  scanningEnabled: React.MutableRefObject<boolean>;
10
+ barcodeMapper: IBarcodeMapper;
9
11
  }
10
12
  export declare function MultipleScanningModeController(props: Props): React.JSX.Element;
11
13
  export {};
@@ -1,12 +1,14 @@
1
1
  import React from "react";
2
- import { BarcodeScannerConfiguration, BarcodeScannerResult } from "../configuration";
2
+ import { BarcodeScannerConfiguration, BarcodeScannerUIResult } from "../configuration";
3
+ import { IBarcodeMapper } from "../utils/barcode-mapper/i-barcode-mapper";
3
4
  declare class Props {
4
5
  configuration: BarcodeScannerConfiguration;
5
6
  onClose: () => void;
6
- onSubmit: (barcodeScannerResult: BarcodeScannerResult) => void;
7
+ onSubmit: (barcodeScannerUIResult: BarcodeScannerUIResult) => void;
7
8
  onError: (error?: Error) => void;
8
9
  onCameraPermissionDenied: () => void;
9
10
  scanningEnabled: React.MutableRefObject<boolean>;
11
+ barcodeMapper: IBarcodeMapper;
10
12
  }
11
13
  export declare function SingleScanningModeController(props: Props): React.JSX.Element;
12
14
  export {};
@@ -1,8 +1,9 @@
1
1
  import BarcodePolygon from "../../view/barcode-polygon/barocode-polygon";
2
2
  import { ArOverlayBarcodeInfo } from "../views/ar/ar-overlay-barcode-info";
3
- import type { CoreBarcodeItem } from "../configuration/BarcodeItem";
3
+ import { BarcodeItem, BarcodeScannerConfiguration, ExpectedBarcode } from "../configuration";
4
+ import type React from "react";
4
5
  export type CountedBarcode = {
5
- barcode: CoreBarcodeItem;
6
+ barcode: BarcodeItem;
6
7
  count: number;
7
8
  labelElement?: ArOverlayBarcodeInfo;
8
9
  polygonElement?: BarcodePolygon;
@@ -11,22 +12,18 @@ export type CountedBarcode = {
11
12
  * Function that takes the current count of a barcode and returns its new count.
12
13
  * `oldCount` is 0 if the barcode is not yet in the list of barcodes.
13
14
  **/
14
- type ComputeNewCountFunction = (oldCount: number) => number;
15
- export type CountedBarcodeAction = {
16
- type: 'setCount';
17
- barcodes: CoreBarcodeItem[];
18
- computeNewCount: ComputeNewCountFunction;
19
- } | {
20
- type: 'remove';
21
- barcode: CoreBarcodeItem;
22
- } | {
23
- type: 'clear';
24
- } | {
25
- type: 'setHtmlElements';
26
- barcode: CoreBarcodeItem;
27
- labelElement: ArOverlayBarcodeInfo;
28
- polygonElement: BarcodePolygon;
29
- };
30
- export declare const barcodesEqual: (a: CoreBarcodeItem, b: CoreBarcodeItem) => boolean;
31
- export declare function countedBarcodesReducer(countedBarcodes: Readonly<Readonly<CountedBarcode>[]>, action: CountedBarcodeAction): CountedBarcode[];
15
+ type ComputeNewCountFunction = (oldCount?: number, item?: CountedBarcode) => number;
16
+ export declare class CountedBarcodeAction {
17
+ type: 'setCount' | 'remove' | 'clear' | 'setHtmlElements' | 'onBarcodesDetected' | 'onARCodeClick' | 'onCountEditDialogChange';
18
+ barcodes?: BarcodeItem[];
19
+ barcode?: BarcodeItem;
20
+ computeNewCount?: ComputeNewCountFunction;
21
+ labelElement?: ArOverlayBarcodeInfo;
22
+ polygonElement?: BarcodePolygon;
23
+ count?: number;
24
+ }
25
+ export declare const barcodesEqual: (a: BarcodeItem, b: BarcodeItem) => boolean;
26
+ export declare const expectedBarcodeEquals: (expected: ExpectedBarcode, barcode: BarcodeItem) => boolean;
27
+ export declare const findExpectedBarcode: (expectedBarcodes: ExpectedBarcode[], barcode: BarcodeItem) => ExpectedBarcode;
28
+ export declare function createCountedBarcodesReducer(configuration: BarcodeScannerConfiguration, lastCaptureTime: React.MutableRefObject<Date>, scanningEnabled: React.MutableRefObject<boolean>, beepAndVibrate: () => void): (countedBarcodes: Readonly<Readonly<CountedBarcode>[]>, action: CountedBarcodeAction) => Readonly<CountedBarcode>[];
32
29
  export {};
@@ -1,7 +1,7 @@
1
1
  import * as Config from "./configuration";
2
- import { BarcodeScannerResult } from "./configuration/BarcodeScannerTypes";
2
+ import { BarcodeScannerUIResult } from "./configuration";
3
3
  export default class ScanbotSDKUI {
4
- static createBarcodeScanner(config: Config.BarcodeScannerConfiguration): Promise<BarcodeScannerResult | null>;
4
+ static createBarcodeScanner(config: Config.BarcodeScannerConfiguration): Promise<BarcodeScannerUIResult | null>;
5
5
  private static createContainer;
6
6
  static readonly Config: typeof Config;
7
7
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { BarcodeTextLocalization, Palette } from "./configuration";
2
+ import { BarcodeTextLocalization, Palette, PolygonStyle } from "./configuration";
3
3
  export type getColorValueFunctionType = (colorValueFromConfig: string) => string;
4
4
  export declare const SBPaletteContext: import("react").Context<{
5
5
  getColorValue: getColorValueFunctionType;
@@ -13,5 +13,6 @@ export declare class SBTheme {
13
13
  static setPalette(palette: Palette): void;
14
14
  static setBarcodeTextLocalization(localization: BarcodeTextLocalization): void;
15
15
  static getColorValue(color: string): string;
16
- static getLocalizedBarcodeText(text: string): string;
16
+ static getPolygonColorValues(input: PolygonStyle, visible: boolean): PolygonStyle;
17
+ static getLocalizedBarcodeText(text: string, replacementArgs?: string[]): string;
17
18
  }
@@ -0,0 +1,13 @@
1
+ import { BarcodeMappedDataLoadingState, IBarcodeMapper } from "./i-barcode-mapper";
2
+ import { BarcodeItem } from "../../configuration";
3
+ import { CountedBarcode } from "../../model/counted-barcodes";
4
+ import { ExpectedBarcode } from "../../configuration/FindAndPickScanningModeUseCase";
5
+ export declare class ExpectedBarcodeMapper implements IBarcodeMapper {
6
+ private barcodeItemSubtitleText;
7
+ private foundBarcodes;
8
+ private expectedBarcodes;
9
+ constructor(barcodeItemSubtitleText: string, foundBarcodes: CountedBarcode[], expectedBarcodes: ExpectedBarcode[]);
10
+ useBarcodeMappedData(barcode: BarcodeItem): BarcodeMappedDataLoadingState | null;
11
+ addOnEvictionListener(): void;
12
+ removeOnEvictionListener(): void;
13
+ }
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { BarcodeItem } from "../../configuration";
3
+ import { BarcodeMappedData } from "../../configuration/BarcodeInfoMapping";
4
+ export type OnEvictionListener = {
5
+ barcode: BarcodeItem;
6
+ callback: () => void;
7
+ };
8
+ export declare const BarcodeMapperContext: import("react").Context<IBarcodeMapper>;
9
+ export type BarcodeMappedDataLoadingState = {
10
+ value: BarcodeMappedData | null;
11
+ state: 'LOADED' | 'LOADING' | 'RETRY_DIALOG_OPEN' | 'FAILED';
12
+ };
13
+ export interface IBarcodeMapper {
14
+ useBarcodeMappedData(barcode: BarcodeItem): BarcodeMappedDataLoadingState | null;
15
+ addOnEvictionListener(listener: OnEvictionListener): void;
16
+ removeOnEvictionListener(listener: OnEvictionListener): void;
17
+ }
@@ -1,16 +1,6 @@
1
- /// <reference types="react" />
2
- import { BarcodeItem, BarcodeItemMapper, BarcodeMappedData } from "../configuration";
3
- import type { CoreBarcodeItem } from "../configuration/BarcodeItem";
4
- export declare const BarcodeMapperContext: import("react").Context<BarcodeMapper>;
5
- export type BarcodeMappedDataLoadingState = {
6
- value: BarcodeMappedData | null;
7
- state: 'LOADED' | 'LOADING' | 'RETRY_DIALOG_OPEN' | 'FAILED';
8
- };
9
- type OnEvictionListener = {
10
- barcode: CoreBarcodeItem;
11
- callback: () => void;
12
- };
13
- export declare class BarcodeMapper {
1
+ import { BarcodeItemMapper, BarcodeItem } from "../../configuration";
2
+ import { BarcodeMappedDataLoadingState, IBarcodeMapper, OnEvictionListener } from "./i-barcode-mapper";
3
+ export declare class UserBarcodeMapper implements IBarcodeMapper {
14
4
  private barcodeItemMapper;
15
5
  private onError;
16
6
  private readonly cache;
@@ -22,7 +12,6 @@ export declare class BarcodeMapper {
22
12
  * If the retry function is called, all cached entries that are currently in this "RETRY_DIALOG_OPEN" state are cleared.
23
13
  */
24
14
  constructor(barcodeItemMapper: BarcodeItemMapper, onError: (retry: () => void, cancel: () => void) => void);
25
- mapBarcodeToBarcodeItem(barcode: CoreBarcodeItem, count: number): Promise<BarcodeItem>;
26
15
  /**
27
16
  * Results are cached.
28
17
  * Note that, because resulting promise will be used in useMemo, it is important we return the identical
@@ -33,9 +22,8 @@ export declare class BarcodeMapper {
33
22
  * have been set yet.
34
23
  * */
35
24
  private getBarcodeMappedData;
36
- useBarcodeMappedData(barcode: CoreBarcodeItem): BarcodeMappedDataLoadingState | null;
25
+ useBarcodeMappedData(barcode: BarcodeItem): BarcodeMappedDataLoadingState | null;
37
26
  private onEvictionListeners;
38
27
  addOnEvictionListener(listener: OnEvictionListener): void;
39
28
  removeOnEvictionListener(listener: OnEvictionListener): void;
40
29
  }
41
- export {};
@@ -0,0 +1,7 @@
1
+ export default class ExpectedBarcodeCounter {
2
+ expectedCount: number;
3
+ foundCount: number;
4
+ constructor(expectedCount?: number, foundCount?: number);
5
+ isFulFilled(): boolean;
6
+ toString(): string;
7
+ }
@@ -2,7 +2,7 @@ import React from "react";
2
2
  interface Props {
3
3
  foregroundColor: string;
4
4
  backgroundColor: string;
5
- count: number;
5
+ text: string;
6
6
  children: React.ReactNode;
7
7
  }
8
8
  export declare function StyledBadge(props: Props): React.JSX.Element;
@@ -0,0 +1,18 @@
1
+ import React, { ReactNode } from "react";
2
+ import VerticalPositions from "./vertical-positions";
3
+ import { BadgeStyle } from "../../configuration";
4
+ import { Point } from "../../../utils/dto/Point";
5
+ declare class Props {
6
+ onClick: () => void;
7
+ style: BadgeStyle;
8
+ positionBadge: Point;
9
+ content: string | ReactNode;
10
+ verticalPositions: VerticalPositions;
11
+ transition: {
12
+ duration: number;
13
+ easing: string;
14
+ };
15
+ animateToPoints: Point[];
16
+ }
17
+ export default function ARBadge(props: Props): React.JSX.Element;
18
+ export {};
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { ReactNode } from "react";
2
2
  import BarcodePolygonLabel, { BarcodePolygonLabelProps } from "../../../view/barcode-polygon/barcode-polygon-label";
3
3
  import { BadgeStyle, BarcodeItemConfiguration, BarcodeItemInfoPosition } from "../../configuration";
4
4
  export type AROverlayBarcodeInfoConfig = {
@@ -14,6 +14,10 @@ declare class AROverlayBarcodeInfoProps extends BarcodePolygonLabelProps impleme
14
14
  export declare class ArOverlayBarcodeInfo extends BarcodePolygonLabel<AROverlayBarcodeInfoProps> {
15
15
  private count;
16
16
  setCount: (count: number) => void;
17
+ customBadgeStyle: BadgeStyle;
18
+ customBadgeContent: string | ReactNode;
19
+ styleBadge(style: BadgeStyle, content: string | ReactNode): void;
20
+ badgeContent(): string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>;
17
21
  render(): React.ReactNode;
18
22
  }
19
23
  export {};
@@ -0,0 +1,12 @@
1
+ import { CSSProperties } from "react";
2
+ import { BadgeStyle, BarcodeItemInfoPosition } from "../../configuration";
3
+ import { Point } from "../../../utils/dto/Point";
4
+ export default class VerticalPositions {
5
+ badgeY: number;
6
+ badgeStyle: CSSProperties;
7
+ labelY: number;
8
+ labelStyle: CSSProperties;
9
+ static readonly AR_BADGE_SIZE = 48;
10
+ static readonly LABEL_AND_BADGE_PADDING = 10;
11
+ static compute(points: Point[], counterBadge: BadgeStyle, barcodeItemInfoPosition: BarcodeItemInfoPosition): VerticalPositions;
12
+ }
@@ -1,12 +1,14 @@
1
1
  import React from "react";
2
2
  import { StyledText as StyledTextConfig } from "../../configuration";
3
- import { BarcodeMappedDataLoadingState } from "../../utils/barcode-mapper";
3
+ import { BarcodeMappedDataLoadingState } from "../../utils/barcode-mapper/i-barcode-mapper";
4
4
  export interface CounterForm {
5
5
  counter: number;
6
6
  setCounter: (counter: number) => void;
7
7
  onNumberClick: () => void;
8
8
  manualCountOutlineColor: string;
9
9
  manualCountChangeColor: string;
10
+ removeButtonEnabled?: boolean;
11
+ addButtonEnabled?: boolean;
10
12
  }
11
13
  export interface BarcodeInfoPropsBase {
12
14
  barcodeImageVisible: boolean;
@@ -1,19 +1,19 @@
1
1
  import React from "react";
2
- import { ArOverlayGeneralConfiguration } from "../configuration/ArTrackingOverlayConfiguration";
2
+ import { ArOverlayFindAndPickConfiguration, ArOverlayGeneralConfiguration } from "../configuration/ArTrackingOverlayConfiguration";
3
3
  import { ActionBarConfiguration } from "../configuration/ActionBarConfiguration";
4
4
  import { BarcodeScannerConfiguration as BarcodeScannerViewConfig } from "../../model/configuration/barcode-scanner-configuration";
5
5
  import { ViewFinderPadding } from "../../view/view-finder";
6
6
  import BarcodePolygon from "../../view/barcode-polygon/barocode-polygon";
7
7
  import BarcodePolygonLabel from "../../view/barcode-polygon/barcode-polygon-label";
8
8
  import { CameraConfiguration } from "../configuration/CameraConfiguration";
9
- import type { CoreBarcodeItem } from "../configuration/BarcodeItem";
9
+ import type { BarcodeItem } from "../configuration";
10
10
  export declare class Props {
11
11
  cameraConfiguration: CameraConfiguration;
12
- arOverlay: ArOverlayGeneralConfiguration;
12
+ arOverlay: ArOverlayGeneralConfiguration | ArOverlayFindAndPickConfiguration;
13
13
  actionBarConfig: ActionBarConfiguration;
14
14
  actionBarBottomPadding: number;
15
- arOnBarcodeEnter: (code: CoreBarcodeItem, polygon: BarcodePolygon, label: BarcodePolygonLabel) => void;
16
- arOnBarcodeClick: (barcode: CoreBarcodeItem) => void;
15
+ arOnBarcodeEnter: (code: BarcodeItem, polygon: BarcodePolygon, label: BarcodePolygonLabel) => void;
16
+ arOnBarcodeClick: (barcode: BarcodeItem) => void;
17
17
  scanningPaused: boolean;
18
18
  barcodeScannerViewConfig: BarcodeScannerViewConfig;
19
19
  viewFinderPadding: ViewFinderPadding;
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { SvgIconComponent } from "@mui/icons-material";
3
+ import { ButtonConfiguration, StyledText as StyledTextConfig } from "../../../configuration";
4
+ export declare class ConfirmationDialogButtonProps {
5
+ onClick: () => void;
6
+ style: ButtonConfiguration;
7
+ icon?: SvgIconComponent;
8
+ }
9
+ declare class Props {
10
+ open: boolean;
11
+ dividerColor: string;
12
+ modalOverlayColor: string;
13
+ sheetColor: string;
14
+ title: StyledTextConfig;
15
+ subtitle: StyledTextConfig;
16
+ cancelButton: ConfirmationDialogButtonProps;
17
+ okButton: ConfirmationDialogButtonProps;
18
+ }
19
+ export declare function ConfirmationDialog(props: Props): React.JSX.Element;
20
+ export {};
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
- import { ManualCountEditDialog } from "../../configuration";
3
- import { CountedBarcode, CountedBarcodeAction } from "../../model/counted-barcodes";
2
+ import { BarcodeItem, ManualCountEditDialog } from "../../configuration";
3
+ import { CountedBarcode } from "../../model/counted-barcodes";
4
4
  interface Props {
5
5
  barcode: CountedBarcode | null;
6
- setCounter: (action: CountedBarcodeAction) => void;
6
+ setCounter: (barcode: BarcodeItem, count: number) => void;
7
7
  onCancel: () => void;
8
8
  dialogStyling: ManualCountEditDialog;
9
9
  }
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { ScanbotAlertDialog } from "../../configuration";
3
+ declare class Props {
4
+ open: boolean;
5
+ onDismiss: () => void;
6
+ onSubmit: () => void;
7
+ style: ScanbotAlertDialog;
8
+ }
9
+ export declare function FindAndPickSubmitDialog(props: Props): React.JSX.Element;
10
+ export {};
@@ -3,7 +3,7 @@ import { ManualCountEditDialog, Sheet, SheetContent } from '../../configuration'
3
3
  import { CountedBarcodeAction } from "../../model/counted-barcodes";
4
4
  import { DrawerHeaderContentProps } from "./subviews/drawer-header-content";
5
5
  declare class Props {
6
- numBarcodes: number;
6
+ isPlaceholderVisible: boolean;
7
7
  sheetStyle: Sheet;
8
8
  contentStyle: SheetContent;
9
9
  manualCountEditDialog: ManualCountEditDialog;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { DrawerHeaderContentProps } from "./subviews/drawer-header-content";
3
+ import { SheetContent } from "../../configuration/MultipleScanningModeUseCase";
4
+ export declare class Props {
5
+ headerProps: DrawerHeaderContentProps;
6
+ sheetContent: SheetContent;
7
+ isEmptyStateVisible: boolean;
8
+ barcodeList: React.JSX.Element;
9
+ }
10
+ export default function BarcodeResultSidebar(props: Props): React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { BadgedButton } from "../../configuration";
3
3
  interface Props {
4
- count: number;
4
+ text: string;
5
5
  onClick: () => void;
6
6
  style?: React.CSSProperties;
7
7
  buttonStyling: BadgedButton;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { SheetContent } from "../../../configuration";
3
3
  export declare class Props {
4
- numBarcodes: number;
4
+ isVisible: boolean;
5
5
  style: SheetContent;
6
6
  onStartClick?: () => void;
7
7
  }
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
2
  import { BarcodeInfoPropsBase } from "../../barcode-info/barcode-info";
3
- import { SwipeToDelete } from "../../../configuration";
4
- import { BarcodeScannerTypes } from "../../../../core-types";
3
+ import { BarcodeItem, SwipeToDelete } from "../../../configuration";
5
4
  export interface Props extends BarcodeInfoPropsBase {
6
- barcode: BarcodeScannerTypes.BarcodeItem;
7
- onDelete: (barcode: BarcodeScannerTypes.BarcodeItem) => void;
5
+ barcode: BarcodeItem;
6
+ onDelete: (barcode: BarcodeItem) => void;
8
7
  readonlyCount: number | null;
9
8
  swipeToDeleteConfig: SwipeToDelete;
10
9
  sheetColor: string;
10
+ animateBackAfterDelete: boolean;
11
11
  }
12
12
  export default function BarcodeListItem(props: Props): React.JSX.Element;
@@ -1,12 +1,19 @@
1
1
  import React from "react";
2
2
  import { CountedBarcode, CountedBarcodeAction } from "../../../model/counted-barcodes";
3
- import { MultipleBarcodesScanningMode, SheetContent } from "../../../configuration";
3
+ import { ExpectedBarcode, MultipleBarcodesScanningMode, SheetContent } from "../../../configuration";
4
4
  interface Props {
5
5
  barcodes: CountedBarcode[];
6
+ expectedBarcodes?: ExpectedBarcode[];
6
7
  onBarcodeChange: (action: CountedBarcodeAction) => void;
7
8
  onNumberClick: (countedBarcode: CountedBarcode) => void;
8
9
  sheetContent: SheetContent;
9
10
  mode: MultipleBarcodesScanningMode;
11
+ animateBackAfterDelete: boolean;
12
+ indicatorColor: {
13
+ partial: string;
14
+ complete: string;
15
+ notScanned: string;
16
+ };
10
17
  }
11
18
  export declare function BarcodeList(props: Props): React.JSX.Element;
12
19
  export {};
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { ButtonProps } from "../../../utils/styled-button";
3
3
  import { StyledText as StyledTextConfig } from "../../../configuration/Common";
4
4
  export declare class DrawerHeaderContentProps {
5
- numBarcodes: number;
5
+ textReplacementArgs: string[];
6
6
  leftButton: ButtonProps;
7
7
  rightButton: ButtonProps;
8
8
  title: StyledTextConfig;
@@ -0,0 +1,10 @@
1
+ import { BarcodeScannerTypes } from "../core-types";
2
+ import { Size } from "./dto/Size";
3
+ export default class BarcodeUtils {
4
+ /**
5
+ * Keep only the center-most duplicate barcode in the list of barcodes in order to prevent multiple jumping overlays
6
+ * and an array of other issues that can arise from buggy overlays.
7
+ * This is only used in the AR overlay.
8
+ */
9
+ static keepOnlyCenterMostDuplicate(codes: BarcodeScannerTypes.BarcodeItem[], originalImageSize: Size): void;
10
+ }