scanbot-web-sdk 8.1.0-beta.5 → 8.1.0-beta.6

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 (33) hide show
  1. package/@types/index.d.ts +1 -0
  2. package/@types/ui2/barcode/views/camera-permission-denied.d.ts +2 -0
  3. package/@types/ui2/document/controller/acknowledgment-screen-controller.d.ts +2 -2
  4. package/@types/ui2/document/controller/camera-screen-controller.d.ts +3 -2
  5. package/@types/ui2/document/model/document-detection-ui-result.d.ts +7 -5
  6. package/@types/ui2/document/model/sb-document.d.ts +3 -3
  7. package/@types/ui2/document/views/camera-screen/bottom-bar.d.ts +1 -1
  8. package/@types/utils/image-utils.d.ts +3 -0
  9. package/bundle/ScanbotSDK.min.js +4 -4
  10. package/bundle/ScanbotSDK.ui2.min.js +4 -4
  11. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  12. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  13. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  14. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  15. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  16. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  17. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  18. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  19. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  20. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  21. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  22. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  23. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  24. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  25. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  26. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  27. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  28. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  29. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  30. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  31. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  32. package/package.json +1 -1
  33. package/@types/ui2/barcode/views/navigation-bar.d.ts +0 -18
package/@types/index.d.ts CHANGED
@@ -94,6 +94,7 @@ export { PageImageSource } from "./ui2/configuration/native/PageImageSource";
94
94
  export { SBStorageError } from "./service/storage/utils/sb-storage-error";
95
95
  export { SBDocumentData } from "./ui2/document/model/utils/sb-document-data";
96
96
  export { SBPageData } from "./ui2/document/model/utils/sb-page-data";
97
+ export { DocumentDetectionUIResult } from "./ui2/document/model/document-detection-ui-result";
97
98
 
98
99
  export { default as ScanbotSDKUI2 } from "./ui2/scanbot-sdk-ui";
99
100
  export * as UIConfig from "./ui2/configuration";
@@ -1,9 +1,11 @@
1
1
  import React from "react";
2
2
  import type { CameraPermissionScreen } from "../../configuration/common/CameraPermission";
3
+ import { NavigationBarSize } from "../../document/views/camera-screen/top-bar";
3
4
  interface Props {
4
5
  visible: boolean;
5
6
  onCloseClick: () => void;
6
7
  config: CameraPermissionScreen;
8
+ navigationBarSize: NavigationBarSize;
7
9
  }
8
10
  export declare function CameraPermissionDenied(props: Props): React.JSX.Element;
9
11
  export {};
@@ -1,10 +1,10 @@
1
1
  import React from "react";
2
2
  import { DocumentScanningFlow } from "../../configuration/document/DocumentScanningFlow";
3
3
  import ScanbotSDK from "../../../scanbot-sdk";
4
- import { DocumentDetectionUIResult, RtuDocumentDetectionResultPromise } from "../model/document-detection-ui-result";
4
+ import { DocumentDetectionUIResult } from "../model/document-detection-ui-result";
5
5
  import { DocumentQuality } from "../../../core-types";
6
6
  declare class Props {
7
- croppedDetectionResult: RtuDocumentDetectionResultPromise;
7
+ croppedDetectionResult: DocumentDetectionUIResult;
8
8
  visible: boolean;
9
9
  configuration: DocumentScanningFlow;
10
10
  sdk: ScanbotSDK;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { DocumentScanningFlow } from "../../configuration/document/DocumentScanningFlow";
3
3
  import type ScanbotSDK from "../../../scanbot-sdk";
4
4
  import { SBPage } from "../model/sb-page";
5
- import { RtuDocumentDetectionResultPromise } from "../model/document-detection-ui-result";
5
+ import { DocumentDetectionUIResult } from "../model/document-detection-ui-result";
6
6
  import { Root } from "react-dom/client";
7
7
  export type SnappingMode = "auto" | "manual";
8
8
  type Props = {
@@ -11,7 +11,8 @@ type Props = {
11
11
  configuration: DocumentScanningFlow;
12
12
  onClose?: () => void;
13
13
  onError: (error: any) => void;
14
- onImageCaptured: (image: RtuDocumentDetectionResultPromise) => void;
14
+ onShutterButtonClick?: () => void;
15
+ onImageCaptured: (image: DocumentDetectionUIResult) => void;
15
16
  onReviewButtonClick: () => void;
16
17
  sdk: ScanbotSDK;
17
18
  scanningPaused: boolean;
@@ -1,8 +1,10 @@
1
1
  import type { PageImageSource } from "../../configuration/native/PageImageSource";
2
- import { DocumentScannerScanResponse } from "../../../core-types";
3
- export type DocumentDetectionUIResult = {
2
+ import { DocumentQualityAnalyzerResult, DocumentScannerScanResponse, Image } from "../../../core-types";
3
+ export declare class DocumentDetectionUIResult {
4
4
  value: DocumentScannerScanResponse;
5
5
  source: PageImageSource;
6
- };
7
- export type RtuDocumentDetectionResultPromise = undefined | Promise<DocumentDetectionUIResult | null>;
8
- export declare function createRtuDocumentDetectionResultPromise(response: Promise<DocumentScannerScanResponse>, source: PageImageSource): RtuDocumentDetectionResultPromise;
6
+ analysis: DocumentQualityAnalyzerResult | null;
7
+ static create(value: DocumentScannerScanResponse, source: PageImageSource): DocumentDetectionUIResult;
8
+ updatedCroppedImage(result: Image): void;
9
+ setAnalysis(result: DocumentQualityAnalyzerResult): void;
10
+ }
@@ -1,11 +1,11 @@
1
1
  import { type Point } from "../../configuration/utils";
2
2
  import ScanbotSDK from "../../../scanbot-sdk";
3
- import { DeepPartial, DocumentQuality, DocumentScannerScanResponse, ParametricFilter, PdfConfiguration, TiffGeneratorParameters } from "../../../core-types";
3
+ import { DeepPartial, ParametricFilter, PdfConfiguration, TiffGeneratorParameters } from "../../../core-types";
4
4
  import { SBPage } from "./sb-page";
5
- import { PageImageSource } from "../../configuration/native/PageImageSource";
6
5
  import { SBDocumentData } from "./utils/sb-document-data";
7
6
  import { TiffPageOptions } from "../../../service/tiff-generator";
8
7
  import { DocumentScanningFlow } from "../../configuration/document/DocumentScanningFlow";
8
+ import { DocumentDetectionUIResult } from "./document-detection-ui-result";
9
9
  export declare class SBDocumentConfig {
10
10
  documentId: number | undefined;
11
11
  configuration: DocumentScanningFlow;
@@ -38,7 +38,7 @@ export declare class SBDocument {
38
38
  static create(config: SBDocumentConfig): Promise<SBDocument>;
39
39
  updateStorageDocument(): Promise<number>;
40
40
  delete(): Promise<void>;
41
- addPage(response: DocumentScannerScanResponse, quality: DocumentQuality, source: PageImageSource, position?: number): Promise<void>;
41
+ addPage(response: DocumentDetectionUIResult, position?: number): Promise<void>;
42
42
  deleteFromPosition(position: number): Promise<void>;
43
43
  deletePage(page: SBPage): Promise<void>;
44
44
  deleteAllPages(): Promise<void>;
@@ -19,7 +19,7 @@ declare class Props {
19
19
  onFileSelectDialogOpened: () => void;
20
20
  /** Note that onFileSelectDialogClosed may not be called in old browsers (see details below). */
21
21
  onFileSelectDialogClosed: () => void;
22
- onFileUploaded: (image: Promise<DocumentScannerScanResponse | null>) => void;
22
+ onFileUploaded: (image: DocumentScannerScanResponse | null) => void;
23
23
  snappingModeButtonClick: () => void;
24
24
  onTorchButtonClick: () => void;
25
25
  onReviewButtonClick: () => void;
@@ -1,6 +1,7 @@
1
1
  import { Size } from "./dto/Size";
2
2
  import { Frame } from "./dto/Frame";
3
3
  import { ImageDataWrapper } from "../model/image-data-wrapper";
4
+ import { ImageRotation } from "../core-types";
4
5
  export declare class ImageUtils {
5
6
  static toDataUrl(buffer: ArrayBuffer): Promise<string>;
6
7
  static getObjectFitSize(container: Size, size: Size, contains?: boolean): Frame;
@@ -12,4 +13,6 @@ export declare class ImageUtils {
12
13
  static wrapperToBase64(wrapper: ImageDataWrapper): string;
13
14
  static toBase64(data: Uint8Array, stripIdentifier?: boolean): Promise<string>;
14
15
  static imageUrlToImageData(imageUrl: string): Promise<ImageData>;
16
+ static degreesToRotation(orientation: number): ImageRotation;
17
+ static degreesToRotations(orientation: number): number;
15
18
  }