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

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 (139) 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/BarcodeScannerTypes.d.ts +5 -3
  4. package/@types/core/bridge/compiled/GDRTypes.d.ts +38 -0
  5. package/@types/core/bridge/compiled/GenericDocument.d.ts +38 -0
  6. package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +183 -0
  7. package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +7 -6
  8. package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +38 -0
  9. package/@types/core/bridge/compiled/ParametricFilters.d.ts +4 -2
  10. package/@types/core/bridge/worker-bridge.d.ts +584 -26
  11. package/@types/core/worker/ScanbotSDK.Core.d.ts +18 -7
  12. package/@types/core-types.d.ts +3 -1
  13. package/@types/document-scanner-view.d.ts +3 -1
  14. package/@types/index.d.ts +39 -4
  15. package/@types/model/barcode/barcode-result.d.ts +12 -2
  16. package/@types/model/barcode/barcode.d.ts +2 -1
  17. package/@types/model/camera-info.d.ts +3 -2
  18. package/@types/model/configuration/barcode-scanner-configuration.d.ts +6 -3
  19. package/@types/model/configuration/cropping-view-configuration.d.ts +5 -0
  20. package/@types/model/configuration/document-scanner-configuration.d.ts +2 -8
  21. package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +1 -1
  22. package/@types/model/configuration/initialization-options.d.ts +8 -0
  23. package/@types/model/configuration/mrz-scanner-configuration.d.ts +1 -1
  24. package/@types/model/configuration/scanner-configuration.d.ts +7 -0
  25. package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
  26. package/@types/model/configuration/view-finder-scanner-configuration.d.ts +1 -1
  27. package/@types/model/error/media-error.d.ts +1 -0
  28. package/@types/scanbot-sdk.d.ts +355 -52
  29. package/@types/service/generic-document-recognizer.d.ts +3 -1
  30. package/@types/service/simple-mrz-recognizer.d.ts +3 -1
  31. package/@types/service/text-data-recognizer.d.ts +3 -1
  32. package/@types/ui2/common.d.ts +8 -0
  33. package/@types/ui2/configuration/ActionBarConfiguration.d.ts +30 -30
  34. package/@types/ui2/configuration/ArTrackingOverlayConfiguration.d.ts +220 -220
  35. package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +51 -51
  36. package/@types/ui2/configuration/BarcodeItemMapper.d.ts +2 -2
  37. package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +32 -32
  38. package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +168 -168
  39. package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -6
  40. package/@types/ui2/configuration/BarcodeScannerUIResult.d.ts +29 -0
  41. package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +124 -69
  42. package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -1
  43. package/@types/ui2/configuration/BarcodeUseCase.d.ts +4 -3
  44. package/@types/ui2/configuration/CameraConfiguration.d.ts +32 -32
  45. package/@types/ui2/configuration/CameraPermission.d.ts +33 -33
  46. package/@types/ui2/configuration/Common.d.ts +190 -190
  47. package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
  48. package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +364 -12
  49. package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
  50. package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +488 -488
  51. package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +27 -27
  52. package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +169 -169
  53. package/@types/ui2/configuration/TopBarConfiguration.d.ts +36 -36
  54. package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +16 -16
  55. package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +45 -45
  56. package/@types/ui2/configuration.d.ts +2 -1
  57. package/@types/ui2/controllers/barcode-scanner-controller.d.ts +2 -2
  58. package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +4 -2
  59. package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +4 -2
  60. package/@types/ui2/model/counted-barcodes.d.ts +12 -19
  61. package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
  62. package/@types/ui2/scanbot-ui-library.d.ts +3 -2
  63. package/@types/ui2/utils/barcode-mapper/expected-barcode-mapper.d.ts +13 -0
  64. package/@types/ui2/utils/barcode-mapper/i-barcode-mapper.d.ts +18 -0
  65. package/@types/ui2/utils/{barcode-mapper.d.ts → barcode-mapper/user-barcode-mapper.d.ts} +4 -16
  66. package/@types/ui2/utils/find-and-pick.ts/expected-barcode-counter.d.ts +7 -0
  67. package/@types/ui2/utils/styled-badge.d.ts +1 -1
  68. package/@types/ui2/views/ar/ar-badge.d.ts +18 -0
  69. package/@types/ui2/views/ar/ar-overlay-barcode-info.d.ts +5 -1
  70. package/@types/ui2/views/ar/vertical-positions.d.ts +12 -0
  71. package/@types/ui2/views/barcode-info/barcode-info.d.ts +3 -1
  72. package/@types/ui2/views/barcode-scanner.d.ts +5 -5
  73. package/@types/ui2/views/dialog/base/confirmation-dialog.d.ts +20 -0
  74. package/@types/ui2/views/dialog/find-and-pick-submit-dialog.d.ts +10 -0
  75. package/@types/ui2/views/drawer/barcode-result-drawer.d.ts +1 -1
  76. package/@types/ui2/views/drawer/counting-button.d.ts +1 -1
  77. package/@types/ui2/views/drawer/subviews/barcode-drawer-empty-state.d.ts +1 -1
  78. package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +5 -4
  79. package/@types/ui2/views/drawer/subviews/barcode-list.d.ts +8 -1
  80. package/@types/ui2/views/drawer/subviews/drawer-header-content.d.ts +1 -1
  81. package/@types/utils/barcode-utils.d.ts +10 -0
  82. package/@types/utils/browser-cameras.d.ts +92 -0
  83. package/@types/utils/dto/Polygon.d.ts +2 -1
  84. package/@types/utils/stats.d.ts +4 -0
  85. package/@types/utils/video-stream.d.ts +3 -3
  86. package/@types/utils/video-to-image-data/two-d-video-to-image-data.d.ts +8 -0
  87. package/@types/utils/video-to-image-data/video-to-image-data.d.ts +5 -0
  88. package/@types/utils/video-to-image-data/webgl-video-to-image-data.d.ts +21 -0
  89. package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +1 -0
  90. package/@types/view/scanbot-camera-view.d.ts +9 -3
  91. package/@types/worker/worker-bridge.d.ts +587 -30
  92. package/bundle/ScanbotSDK.min.js +4 -4
  93. package/bundle/ScanbotSDK.ui2.min.js +16 -16
  94. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  95. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  96. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  97. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  98. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  99. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  100. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  101. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  102. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  103. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  104. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  105. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  106. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  107. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  108. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  109. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  110. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  111. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  112. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  113. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  114. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  115. package/package.json +2 -2
  116. package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +0 -973
  117. package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +0 -183
  118. package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +0 -183
  119. package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +0 -29
  120. package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +0 -59
  121. package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +0 -196
  122. package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +0 -105
  123. package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +0 -218
  124. package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +0 -18
  125. package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +0 -198
  126. package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +0 -104
  127. package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +0 -165
  128. package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +0 -49
  129. package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +0 -13
  130. package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +0 -67
  131. package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +0 -52
  132. package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +0 -306
  133. package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +0 -129
  134. package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +0 -186
  135. package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +0 -197
  136. package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +0 -183
  137. package/@types/ui2/configuration/BarcodeItem.d.ts +0 -6
  138. package/@types/ui2/configuration/utils.d.ts +0 -6
  139. /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,8 @@
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 } from "../configuration";
4
4
  export type CountedBarcode = {
5
- barcode: CoreBarcodeItem;
5
+ barcode: BarcodeItem;
6
6
  count: number;
7
7
  labelElement?: ArOverlayBarcodeInfo;
8
8
  polygonElement?: BarcodePolygon;
@@ -11,22 +11,15 @@ export type CountedBarcode = {
11
11
  * Function that takes the current count of a barcode and returns its new count.
12
12
  * `oldCount` is 0 if the barcode is not yet in the list of barcodes.
13
13
  **/
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;
14
+ type ComputeNewCountFunction = (oldCount?: number, item?: CountedBarcode) => number;
15
+ export declare class CountedBarcodeAction {
16
+ type: 'setCount' | 'remove' | 'clear' | 'setHtmlElements';
17
+ barcodes?: BarcodeItem[];
18
+ barcode?: BarcodeItem;
19
+ computeNewCount?: ComputeNewCountFunction;
20
+ labelElement?: ArOverlayBarcodeInfo;
21
+ polygonElement?: BarcodePolygon;
22
+ }
23
+ export declare const barcodesEqual: (a: BarcodeItem, b: BarcodeItem) => boolean;
31
24
  export declare function countedBarcodesReducer(countedBarcodes: Readonly<Readonly<CountedBarcode>[]>, action: CountedBarcodeAction): CountedBarcode[];
32
25
  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 getExpectedBarcode;
9
+ constructor(barcodeItemSubtitleText: string, foundBarcodes: CountedBarcode[], getExpectedBarcode: (barcode: BarcodeItem) => ExpectedBarcode | null);
10
+ useBarcodeMappedData(barcode: BarcodeItem, expectedBarcode: ExpectedBarcode): BarcodeMappedDataLoadingState | null;
11
+ addOnEvictionListener(): void;
12
+ removeOnEvictionListener(): void;
13
+ }
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { BarcodeItem } from "../../configuration";
3
+ import { BarcodeMappedData } from "../../configuration/BarcodeInfoMapping";
4
+ import { ExpectedBarcode } from "../../configuration/FindAndPickScanningModeUseCase";
5
+ export type OnEvictionListener = {
6
+ barcode: BarcodeItem;
7
+ callback: () => void;
8
+ };
9
+ export declare const BarcodeMapperContext: import("react").Context<IBarcodeMapper>;
10
+ export type BarcodeMappedDataLoadingState = {
11
+ value: BarcodeMappedData | null;
12
+ state: 'LOADED' | 'LOADING' | 'RETRY_DIALOG_OPEN' | 'FAILED';
13
+ };
14
+ export interface IBarcodeMapper {
15
+ useBarcodeMappedData(barcode: BarcodeItem, expectedBarcode?: ExpectedBarcode): BarcodeMappedDataLoadingState | null;
16
+ addOnEvictionListener(listener: OnEvictionListener): void;
17
+ removeOnEvictionListener(listener: OnEvictionListener): void;
18
+ }
@@ -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 {};
@@ -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;
@@ -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,13 @@
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, ExpectedBarcode, SwipeToDelete } from "../../../configuration";
5
4
  export interface Props extends BarcodeInfoPropsBase {
6
- barcode: BarcodeScannerTypes.BarcodeItem;
7
- onDelete: (barcode: BarcodeScannerTypes.BarcodeItem) => void;
5
+ barcode: BarcodeItem;
6
+ expectedBarcode?: ExpectedBarcode;
7
+ onDelete: (barcode: BarcodeItem) => void;
8
8
  readonlyCount: number | null;
9
9
  swipeToDeleteConfig: SwipeToDelete;
10
10
  sheetColor: string;
11
+ animateBackAfterDelete: boolean;
11
12
  }
12
13
  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
+ }