scanbot-web-sdk 2.14.0-beta.2 → 2.14.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,18 @@
1
- export declare enum SelectionOverlayTextFormat {
2
- Text = "Text",
3
- TextAndFormat = "TextAndFormat",
4
- None = "None"
1
+ import { Barcode } from "../barcode/barcode";
2
+ export declare type SelectionOverlayTextFormat = "Text" | "TextAndFormat" | "None";
3
+ export declare class BarcodePolygonStyle {
4
+ fill?: string;
5
+ stroke?: string;
6
+ }
7
+ export interface IBarcodePolygonHandle {
8
+ style(style: BarcodePolygonStyle): void;
9
+ }
10
+ export declare class BarcodePolygonLabelStyle {
11
+ backgroundColor?: string;
12
+ textColor?: string;
13
+ }
14
+ export interface IBarcodePolygonLabelHandle {
15
+ style(style: BarcodePolygonLabelStyle): void;
5
16
  }
6
17
  export declare class SelectionOverlayStyleConfiguration {
7
18
  private defaultFillColor?;
@@ -27,4 +38,5 @@ export declare class SelectionOverlayConfiguration {
27
38
  */
28
39
  automaticSelectionEnabled?: boolean;
29
40
  style?: SelectionOverlayStyleConfiguration;
41
+ onBarcodeFound: (code: Barcode, polygon: IBarcodePolygonHandle, label: IBarcodePolygonLabelHandle) => void;
30
42
  }
@@ -16,10 +16,11 @@ export declare class BarcodePolygonElement {
16
16
  export declare class SelectionOverlayProps {
17
17
  configuration?: SelectionOverlayConfiguration;
18
18
  onPolygonClick?: (code: Barcode) => void;
19
+ onBarcodeFound?: (code: Barcode, polygon: BarcodePolygon, label: BarcodePolygonLabel) => void;
19
20
  }
20
21
  export default class AnimatedBarcodeSelectionOverlay extends React.Component<SelectionOverlayProps, any> {
21
22
  constructor(props: any);
22
23
  update(finderRect: DOMRect, camera: ScanbotCameraView, imageData: ImageData, container: any, codes: Barcode[]): void;
23
- onPolygonClick(view: BarcodePolygon, model: BarcodeOverlay): void;
24
+ onPolygonClick(model: BarcodeOverlay): void;
24
25
  render(): React.ReactNode;
25
26
  }
@@ -1,15 +1,18 @@
1
1
  import React from "react";
2
2
  import { BarcodeOverlay } from "./barcode-overlay";
3
3
  import { Point } from "../../utils/dto/Point";
4
- import { SelectionOverlayConfiguration, SelectionOverlayTextFormat } from "../../model/configuration/selection-overlay-configuration";
4
+ import { BarcodePolygonLabelStyle, SelectionOverlayConfiguration, SelectionOverlayTextFormat } from "../../model/configuration/selection-overlay-configuration";
5
5
  import { Barcode } from "../../model/barcode/barcode";
6
6
  export declare class BarcodePolygonLabelProps {
7
7
  element: BarcodeOverlay;
8
8
  configuration: SelectionOverlayConfiguration;
9
9
  animateToPoints?: Point[];
10
+ onClick?: (element: BarcodeOverlay) => void;
10
11
  }
11
12
  export default class BarcodePolygonLabel extends React.Component<BarcodePolygonLabelProps, any> {
13
+ customStyle?: BarcodePolygonLabelStyle;
12
14
  constructor(props: any);
15
+ style(style: BarcodePolygonLabelStyle): void;
13
16
  update(model: BarcodeOverlay): void;
14
17
  label: HTMLDivElement;
15
18
  formatText(code: Barcode, format: SelectionOverlayTextFormat): string;
@@ -1,15 +1,17 @@
1
1
  import React from "react";
2
2
  import { Point } from "../../utils/dto/Point";
3
3
  import { BarcodeOverlay } from "./barcode-overlay";
4
- import { SelectionOverlayConfiguration } from "../../model/configuration/selection-overlay-configuration";
4
+ import { BarcodePolygonStyle, SelectionOverlayConfiguration } from "../../model/configuration/selection-overlay-configuration";
5
5
  export declare class BarcodePolygonProps {
6
6
  element: BarcodeOverlay;
7
7
  configuration: SelectionOverlayConfiguration;
8
8
  animateToPoints?: Point[];
9
- onClick?: (polygon: BarcodePolygon, element: BarcodeOverlay) => void;
9
+ onClick?: (element: BarcodeOverlay) => void;
10
10
  }
11
11
  export default class BarcodePolygon extends React.Component<BarcodePolygonProps, any> {
12
+ customStyle?: BarcodePolygonStyle;
12
13
  constructor(props: any);
13
14
  update(model: BarcodeOverlay): void;
15
+ style(style: BarcodePolygonStyle): void;
14
16
  render(): React.ReactNode;
15
17
  }