scandit-datacapture-frameworks-label 8.4.0-beta.1 → 8.5.0-beta.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.
- package/__mocks__/ScanditDataCaptureCore.ts +14 -6
- package/dist/dts/defaults/index.d.ts +1 -1
- package/dist/dts/labelcapture/AdaptiveRecognitionResult.d.ts +1 -1
- package/dist/dts/labelcapture/CapturedLabel.d.ts +2 -2
- package/dist/dts/labelcapture/LabelCaptureFeedback.d.ts +2 -2
- package/dist/dts/labelcapture/LabelField.d.ts +6 -6
- package/dist/dts/labelcapture/ReceiptScanningResult.d.ts +3 -3
- package/dist/dts/labelcapture/controller/LabelCaptureAdaptiveRecognitionOverlayController.d.ts +4 -4
- package/dist/dts/labelcapture/private/PrivateLabelField.d.ts +4 -4
- package/dist/dts/labelcapture/view/LabelCaptureAdaptiveRecognitionListener.d.ts +1 -1
- package/dist/dts/labelcapture/view/LabelCaptureAdaptiveRecognitionOverlay.d.ts +4 -4
- package/dist/dts/labelcapture/view/LabelCaptureAdvancedOverlay.d.ts +1 -1
- package/dist/dts/labelcapture/view/LabelCaptureAdvancedOverlayListener.d.ts +5 -5
- package/dist/dts/labelcapture/view/LabelCaptureAdvancedOverlayView.d.ts +1 -1
- package/dist/dts/proxy-types.d.ts +1 -1
- package/dist/index.js +106 -62
- package/dist/index.js.map +1 -1
- package/jest.config.js +4 -11
- package/package.json +3 -3
- package/test/AdaptiveRecognitionResultType.test.ts +0 -1
- package/test/BarcodeFieldSymbologies.test.ts +29 -0
- package/test/LabelCaptureAdaptiveRecognitionSettings.test.ts +0 -1
- package/test/LabelCaptureValidationFlowOverlayController.test.ts +9 -2
- package/test/ReceiptScanningLineItem.test.ts +15 -16
- package/test/ReceiptScanningResult.test.ts +22 -59
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { jest } from '@jest/globals';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
DataCaptureContext,
|
|
4
|
+
DataCaptureMode,
|
|
5
|
+
DataCaptureOverlay,
|
|
6
|
+
DataCaptureView,
|
|
7
|
+
NativeCaller,
|
|
8
|
+
PrivateDataCaptureOverlay,
|
|
9
|
+
} from 'scandit-datacapture-frameworks-core';
|
|
10
|
+
import { EventEmitter } from 'scandit-datacapture-frameworks-core/node_modules/eventemitter3';
|
|
4
11
|
|
|
5
12
|
export class MockDataCaptureView implements DataCaptureView {
|
|
6
13
|
public get viewId(): number {
|
|
@@ -34,7 +41,7 @@ export class MockDataCaptureContext implements DataCaptureContext {
|
|
|
34
41
|
});
|
|
35
42
|
|
|
36
43
|
update = jest.fn(() => Promise.resolve());
|
|
37
|
-
initializeAsync = jest.fn(() => Promise.resolve())
|
|
44
|
+
initializeAsync = jest.fn(() => Promise.resolve());
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
// Mock subscription object that mimics React Native's EmitterSubscription
|
|
@@ -73,8 +80,10 @@ export class MockNativeEventEmitter {
|
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
export class MockCaller implements NativeCaller {
|
|
76
|
-
constructor(
|
|
77
|
-
|
|
83
|
+
constructor(
|
|
84
|
+
public nativeModule: any,
|
|
85
|
+
public emmiter: MockNativeEventEmitter
|
|
86
|
+
) {}
|
|
78
87
|
|
|
79
88
|
eventHook(args: any) {
|
|
80
89
|
return args;
|
|
@@ -91,4 +100,3 @@ export class MockCaller implements NativeCaller {
|
|
|
91
100
|
}
|
|
92
101
|
}
|
|
93
102
|
}
|
|
94
|
-
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { loadLabelCaptureDefaults, getLabelCaptureDefaults, LabelCaptureDefaults, setLabelCaptureDefaultsLoader, ensureLabelCaptureDefaults } from './LabelCaptureDefaults';
|
|
1
|
+
export { loadLabelCaptureDefaults, getLabelCaptureDefaults, LabelCaptureDefaults, setLabelCaptureDefaultsLoader, ensureLabelCaptureDefaults, } from './LabelCaptureDefaults';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdaptiveRecognitionResultType } from
|
|
1
|
+
import { AdaptiveRecognitionResultType } from './AdaptiveRecognitionResultType';
|
|
2
2
|
export declare abstract class AdaptiveRecognitionResult {
|
|
3
3
|
get resultType(): AdaptiveRecognitionResultType;
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Quadrilateral } from
|
|
2
|
-
import { LabelField } from
|
|
1
|
+
import { Quadrilateral } from 'scandit-datacapture-frameworks-core';
|
|
2
|
+
import { LabelField } from './LabelField';
|
|
3
3
|
export declare class CapturedLabel {
|
|
4
4
|
private _fields;
|
|
5
5
|
private _name;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultSerializeable, Feedback } from
|
|
2
|
-
import { LabelCaptureController } from
|
|
1
|
+
import { DefaultSerializeable, Feedback } from 'scandit-datacapture-frameworks-core';
|
|
2
|
+
import { LabelCaptureController } from './controller/LabelCaptureController';
|
|
3
3
|
export declare class LabelCaptureFeedback extends DefaultSerializeable {
|
|
4
4
|
static get defaultFeedback(): LabelCaptureFeedback;
|
|
5
5
|
private static get labelCaptureDefaults();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Quadrilateral } from
|
|
2
|
-
import { Barcode } from
|
|
3
|
-
import { LabelDateResult } from
|
|
4
|
-
import { LabelFieldState } from
|
|
5
|
-
import { LabelFieldType } from
|
|
6
|
-
import { LabelFieldValueType } from
|
|
1
|
+
import { Quadrilateral } from 'scandit-datacapture-frameworks-core';
|
|
2
|
+
import { Barcode } from 'scandit-datacapture-frameworks-barcode';
|
|
3
|
+
import { LabelDateResult } from './LabelDateResult';
|
|
4
|
+
import { LabelFieldState } from './LabelFieldState';
|
|
5
|
+
import { LabelFieldType } from './LabelFieldType';
|
|
6
|
+
import { LabelFieldValueType } from './LabelFieldValueType';
|
|
7
7
|
export declare class LabelField {
|
|
8
8
|
private _name;
|
|
9
9
|
private _type;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AdaptiveRecognitionResult } from
|
|
2
|
-
import { ReceiptScanningLineItem } from
|
|
3
|
-
import { AdaptiveRecognitionResultType } from
|
|
1
|
+
import { AdaptiveRecognitionResult } from './AdaptiveRecognitionResult';
|
|
2
|
+
import { ReceiptScanningLineItem } from './ReceiptScanningLineItem';
|
|
3
|
+
import { AdaptiveRecognitionResultType } from './AdaptiveRecognitionResultType';
|
|
4
4
|
export declare class ReceiptScanningResult implements AdaptiveRecognitionResult {
|
|
5
5
|
private _date;
|
|
6
6
|
private _lineItems;
|
package/dist/dts/labelcapture/controller/LabelCaptureAdaptiveRecognitionOverlayController.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseController } from
|
|
2
|
-
import { LabelCaptureAdaptiveRecognitionOverlay } from
|
|
3
|
-
import { AdaptiveRecognitionResult } from
|
|
4
|
-
import { LabelProxy } from
|
|
1
|
+
import { BaseController } from 'scandit-datacapture-frameworks-core';
|
|
2
|
+
import { LabelCaptureAdaptiveRecognitionOverlay } from '../view/LabelCaptureAdaptiveRecognitionOverlay';
|
|
3
|
+
import { AdaptiveRecognitionResult } from '../AdaptiveRecognitionResult';
|
|
4
|
+
import { LabelProxy } from '../../generated';
|
|
5
5
|
export declare enum LabelCaptureAdaptiveRecognitionListenerEvents {
|
|
6
6
|
recognized = "LabelCaptureAdaptiveRecognitionListener.recognized",
|
|
7
7
|
failure = "LabelCaptureAdaptiveRecognitionListener.failure"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BarcodeJSON } from
|
|
2
|
-
import { QuadrilateralJSON } from
|
|
3
|
-
import { LabelDateResultJSON } from
|
|
4
|
-
import { LabelField } from
|
|
1
|
+
import { BarcodeJSON } from 'scandit-datacapture-frameworks-barcode';
|
|
2
|
+
import { QuadrilateralJSON } from 'scandit-datacapture-frameworks-core';
|
|
3
|
+
import { LabelDateResultJSON } from './PrivateLabelCaptureSession';
|
|
4
|
+
import { LabelField } from '../LabelField';
|
|
5
5
|
export interface PrivateExpiryDateText {
|
|
6
6
|
_dataTypePatterns: string[] | null;
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdaptiveRecognitionResult } from
|
|
1
|
+
import { AdaptiveRecognitionResult } from '../AdaptiveRecognitionResult';
|
|
2
2
|
export interface LabelCaptureAdaptiveRecognitionListener {
|
|
3
3
|
didRecognize(result: AdaptiveRecognitionResult): void;
|
|
4
4
|
didFail(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DataCaptureOverlay, DefaultSerializeable } from
|
|
2
|
-
import { LabelCapture } from
|
|
3
|
-
import { LabelCaptureAdaptiveRecognitionListener } from
|
|
4
|
-
import { LabelCaptureAdaptiveRecognitionSettings } from
|
|
1
|
+
import { DataCaptureOverlay, DefaultSerializeable } from 'scandit-datacapture-frameworks-core';
|
|
2
|
+
import { LabelCapture } from '../LabelCapture';
|
|
3
|
+
import { LabelCaptureAdaptiveRecognitionListener } from './LabelCaptureAdaptiveRecognitionListener';
|
|
4
|
+
import { LabelCaptureAdaptiveRecognitionSettings } from '../LabelCaptureAdaptiveRecognitionSettings';
|
|
5
5
|
export declare class LabelCaptureAdaptiveRecognitionOverlay extends DefaultSerializeable implements DataCaptureOverlay {
|
|
6
6
|
private type;
|
|
7
7
|
private settings;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultSerializeable, DataCaptureOverlay, Anchor, PointWithUnit } from 'scandit-datacapture-frameworks-core';
|
|
2
2
|
import { LabelCaptureAdvancedOverlayView } from './LabelCaptureAdvancedOverlayView';
|
|
3
|
-
import { LabelCaptureAdvancedOverlayListener } from
|
|
3
|
+
import { LabelCaptureAdvancedOverlayListener } from './LabelCaptureAdvancedOverlayListener';
|
|
4
4
|
import { CapturedLabel } from '../CapturedLabel';
|
|
5
5
|
import { LabelField } from '../LabelField';
|
|
6
6
|
import { LabelCapture } from '../LabelCapture';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LabelCaptureAdvancedOverlayView } from
|
|
2
|
-
import { Anchor, PointWithUnit } from
|
|
3
|
-
import { LabelCaptureAdvancedOverlay } from
|
|
4
|
-
import { CapturedLabel } from
|
|
5
|
-
import { LabelField } from
|
|
1
|
+
import { LabelCaptureAdvancedOverlayView } from './LabelCaptureAdvancedOverlayView';
|
|
2
|
+
import { Anchor, PointWithUnit } from 'scandit-datacapture-frameworks-core';
|
|
3
|
+
import { LabelCaptureAdvancedOverlay } from './LabelCaptureAdvancedOverlay';
|
|
4
|
+
import { CapturedLabel } from '../CapturedLabel';
|
|
5
|
+
import { LabelField } from '../LabelField';
|
|
6
6
|
export interface LabelCaptureAdvancedOverlayListener {
|
|
7
7
|
viewForCapturedLabel?(overlay: LabelCaptureAdvancedOverlay, label: CapturedLabel): LabelCaptureAdvancedOverlayView | null;
|
|
8
8
|
anchorForCapturedLabel?(overlay: LabelCaptureAdvancedOverlay, label: CapturedLabel): Anchor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativeCallerProvider } from 'scandit-datacapture-frameworks-core';
|
|
2
2
|
export declare const LABEL_PROXY_TYPE_NAMES: readonly ["LabelCaptureProxy", "LabelCaptureBasicOverlayProxy", "LabelCaptureAdvancedOverlayProxy", "LabelCaptureValidationFlowOverlayProxy", "LabelCaptureAdaptiveRecognitionOverlayProxy"];
|
|
3
|
-
export type LabelProxyType = typeof LABEL_PROXY_TYPE_NAMES[number];
|
|
3
|
+
export type LabelProxyType = (typeof LABEL_PROXY_TYPE_NAMES)[number];
|
|
4
4
|
export interface LabelNativeCallerProvider extends NativeCallerProvider<LabelProxyType> {
|
|
5
5
|
}
|