scandit-datacapture-frameworks-label 8.2.1 → 8.3.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.
Files changed (32) hide show
  1. package/dist/dts/defaults/LabelCaptureDefaults.d.ts +5 -0
  2. package/dist/dts/generated/LabelProxyAdapter.d.ts +4 -0
  3. package/dist/dts/labelcapture/AdaptiveRecognitionMode.d.ts +4 -0
  4. package/dist/dts/labelcapture/CustomBarcode.d.ts +2 -0
  5. package/dist/dts/labelcapture/CustomText.d.ts +2 -0
  6. package/dist/dts/labelcapture/DateText.d.ts +17 -0
  7. package/dist/dts/labelcapture/ExpiryDateText.d.ts +2 -0
  8. package/dist/dts/labelcapture/ImeiOneBarcode.d.ts +2 -0
  9. package/dist/dts/labelcapture/ImeiTwoBarcode.d.ts +2 -0
  10. package/dist/dts/labelcapture/LabelCaptureSession.d.ts +2 -0
  11. package/dist/dts/labelcapture/LabelCaptureValidationFlowListener.d.ts +4 -1
  12. package/dist/dts/labelcapture/LabelCaptureValidationFlowSettings.d.ts +16 -1
  13. package/dist/dts/labelcapture/LabelDefinition.d.ts +6 -0
  14. package/dist/dts/labelcapture/LabelField.d.ts +3 -0
  15. package/dist/dts/labelcapture/LabelFieldDefinition.d.ts +4 -0
  16. package/dist/dts/labelcapture/LabelFieldValueType.d.ts +7 -0
  17. package/dist/dts/labelcapture/LabelResultUpdateType.d.ts +5 -0
  18. package/dist/dts/labelcapture/PackingDateText.d.ts +2 -0
  19. package/dist/dts/labelcapture/PartNumberBarcode.d.ts +2 -0
  20. package/dist/dts/labelcapture/SerialNumberBarcode.d.ts +2 -0
  21. package/dist/dts/labelcapture/TotalPriceText.d.ts +2 -0
  22. package/dist/dts/labelcapture/UnitPriceText.d.ts +2 -0
  23. package/dist/dts/labelcapture/WeightText.d.ts +2 -0
  24. package/dist/dts/labelcapture/controller/LabelCaptureController.d.ts +4 -4
  25. package/dist/dts/labelcapture/controller/LabelCaptureValidationFlowOverlayController.d.ts +9 -1
  26. package/dist/dts/labelcapture/index.d.ts +4 -0
  27. package/dist/dts/labelcapture/private/PrivateLabelField.d.ts +1 -0
  28. package/dist/index.js +390 -21
  29. package/dist/index.js.map +1 -1
  30. package/package.json +5 -5
  31. package/test/LabelCaptureValidationFlowOverlayController.test.ts +40 -26
  32. package/test/LabelCaptureValidationFlowSettings.test.ts +5 -0
@@ -15,6 +15,11 @@ export interface LabelCaptureDefaults {
15
15
  validationErrorText: string;
16
16
  requiredFieldErrorText: string;
17
17
  manualInputButtonText: string;
18
+ validationFinishButtonText: string;
19
+ validationRestartButtonText: string;
20
+ validationPauseButtonText: string;
21
+ validationAdaptiveScanningText: string;
22
+ validationScanningText: string;
18
23
  };
19
24
  };
20
25
  Feedback: {
@@ -253,4 +253,8 @@ export declare class LabelProxyAdapter {
253
253
  dataCaptureViewId: number;
254
254
  overlayJson: string;
255
255
  }): Promise<void>;
256
+ /**
257
+ * Finish callback for label capture did update session event
258
+ */
259
+ finishValidationFlowResultUpdateEvent(): Promise<void>;
256
260
  }
@@ -0,0 +1,4 @@
1
+ export declare enum AdaptiveRecognitionMode {
2
+ Off = "off",
3
+ Auto = "auto"
4
+ }
@@ -17,4 +17,6 @@ export declare class CustomBarcode extends BarcodeField {
17
17
  set valueRegexes(value: string[]);
18
18
  get isOptional(): boolean;
19
19
  get symbologies(): SymbologySettings[];
20
+ get numberOfMandatoryInstances(): number | null;
21
+ set numberOfMandatoryInstances(value: number | null);
20
22
  }
@@ -11,4 +11,6 @@ export declare class CustomText extends TextField {
11
11
  get valueRegexes(): string[];
12
12
  set valueRegexes(value: string[]);
13
13
  get isOptional(): boolean;
14
+ get numberOfMandatoryInstances(): number | null;
15
+ set numberOfMandatoryInstances(value: number | null);
14
16
  }
@@ -0,0 +1,17 @@
1
+ import { TextField } from './TextField';
2
+ import { LabelDateFormat } from './LabelDateFormat';
3
+ export declare class DateText extends TextField {
4
+ private _fieldType;
5
+ private _anchorRegexes;
6
+ private _labelDateFormat;
7
+ constructor(name: string, labelDateFormat: LabelDateFormat);
8
+ get labelDateFormat(): LabelDateFormat;
9
+ get anchorRegexes(): string[];
10
+ set anchorRegexes(value: string[]);
11
+ get name(): string;
12
+ get valueRegexes(): string[];
13
+ set valueRegexes(value: string[]);
14
+ get isOptional(): boolean;
15
+ get numberOfMandatoryInstances(): number | null;
16
+ set numberOfMandatoryInstances(value: number | null);
17
+ }
@@ -13,4 +13,6 @@ export declare class ExpiryDateText extends TextField {
13
13
  get valueRegexes(): string[];
14
14
  set valueRegexes(value: string[]);
15
15
  get isOptional(): boolean;
16
+ get numberOfMandatoryInstances(): number | null;
17
+ set numberOfMandatoryInstances(value: number | null);
16
18
  }
@@ -11,5 +11,7 @@ export declare class ImeiOneBarcode extends BarcodeField {
11
11
  set valueRegexes(value: string[]);
12
12
  get isOptional(): boolean;
13
13
  get symbologies(): SymbologySettings[];
14
+ get numberOfMandatoryInstances(): number | null;
15
+ set numberOfMandatoryInstances(value: number | null);
14
16
  private constructor();
15
17
  }
@@ -11,5 +11,7 @@ export declare class ImeiTwoBarcode extends BarcodeField {
11
11
  set valueRegexes(value: string[]);
12
12
  get isOptional(): boolean;
13
13
  get symbologies(): SymbologySettings[];
14
+ get numberOfMandatoryInstances(): number | null;
15
+ set numberOfMandatoryInstances(value: number | null);
14
16
  private constructor();
15
17
  }
@@ -2,8 +2,10 @@ import { CapturedLabel } from './CapturedLabel';
2
2
  export declare class LabelCaptureSession {
3
3
  private _capturedLabels;
4
4
  private _frameSequenceID;
5
+ private _lastProcessedFrameId;
5
6
  private frameId;
6
7
  get capturedLabels(): CapturedLabel[];
7
8
  get frameSequenceID(): number;
9
+ get lastProcessedFrameId(): number;
8
10
  private static fromJSON;
9
11
  }
@@ -1,5 +1,8 @@
1
- import { LabelField } from "./LabelField";
1
+ import { FrameData } from 'scandit-datacapture-frameworks-core';
2
+ import { LabelField } from './LabelField';
3
+ import { LabelResultUpdateType } from './LabelResultUpdateType';
2
4
  export interface LabelCaptureValidationFlowListener {
3
5
  didCaptureLabelWithFields(fields: LabelField[]): void;
4
6
  didSubmitManualInputForField(field: LabelField, oldValue: string | null, newValue: string): void;
7
+ didUpdateValidationFlowResult(type: LabelResultUpdateType, asyncId: number, fields: LabelField[], getFrameData: () => Promise<FrameData | null>): Promise<void>;
5
8
  }
@@ -6,9 +6,14 @@ export declare class LabelCaptureValidationFlowSettings extends DefaultSerialize
6
6
  private _validationErrorText;
7
7
  private _requiredFieldErrorText;
8
8
  private _manualInputButtonText;
9
+ private _finishButtonText;
10
+ private _restartButtonText;
11
+ private _pauseButtonText;
12
+ private _adaptiveScanningText;
13
+ private _scanningText;
9
14
  private _labelDefinitionsPlaceholders;
10
15
  static create(): LabelCaptureValidationFlowSettings;
11
- private constructor();
16
+ constructor();
12
17
  /**
13
18
  * @deprecated This property is deprecated and will be removed in a future release.
14
19
  */
@@ -39,6 +44,16 @@ export declare class LabelCaptureValidationFlowSettings extends DefaultSerialize
39
44
  * @deprecated This property is deprecated and will be removed in a future release.
40
45
  */
41
46
  set manualInputButtonText(text: string);
47
+ get finishButtonText(): string;
48
+ set finishButtonText(text: string);
49
+ get restartButtonText(): string;
50
+ set restartButtonText(text: string);
51
+ get pauseButtonText(): string;
52
+ set pauseButtonText(text: string);
53
+ get adaptiveScanningText(): string;
54
+ set adaptiveScanningText(text: string);
55
+ get scanningText(): string;
56
+ set scanningText(text: string);
42
57
  setPlaceholderTextForLabelDefinition(fieldName: string, placeholder: string | null): void;
43
58
  getPlaceholderTextForLabelDefinition(fieldName: string): string | null;
44
59
  toJSON(): object;
@@ -1,13 +1,19 @@
1
1
  import { DefaultSerializeable } from 'scandit-datacapture-frameworks-core';
2
+ import { AdaptiveRecognitionMode } from './AdaptiveRecognitionMode';
2
3
  import { LabelFieldDefinition } from './LabelFieldDefinition';
3
4
  export declare class LabelDefinition extends DefaultSerializeable {
4
5
  private _name;
5
6
  private _fields;
6
7
  private _type;
8
+ private _adaptiveRecognitionMode;
7
9
  private _hiddenProperties;
8
10
  get name(): string;
9
11
  get fields(): LabelFieldDefinition[];
10
12
  set fields(values: LabelFieldDefinition[]);
13
+ addField(field: LabelFieldDefinition): void;
14
+ addFields(fields: LabelFieldDefinition[]): void;
15
+ get adaptiveRecognitionMode(): AdaptiveRecognitionMode;
16
+ set adaptiveRecognitionMode(value: AdaptiveRecognitionMode);
11
17
  get hiddenProperties(): {
12
18
  [key: string]: object;
13
19
  };
@@ -3,6 +3,7 @@ import { Barcode } from "scandit-datacapture-frameworks-barcode";
3
3
  import { LabelDateResult } from "./LabelDateResult";
4
4
  import { LabelFieldState } from "./LabelFieldState";
5
5
  import { LabelFieldType } from "./LabelFieldType";
6
+ import { LabelFieldValueType } from "./LabelFieldValueType";
6
7
  export declare class LabelField {
7
8
  private _name;
8
9
  private _type;
@@ -12,6 +13,7 @@ export declare class LabelField {
12
13
  private _barcode;
13
14
  private _text;
14
15
  private _dateResult;
16
+ private _valueType;
15
17
  private static fromJSON;
16
18
  get name(): string;
17
19
  get type(): LabelFieldType;
@@ -20,5 +22,6 @@ export declare class LabelField {
20
22
  get isRequired(): boolean;
21
23
  get barcode(): Barcode | null;
22
24
  get text(): string | null;
25
+ get valueType(): LabelFieldValueType;
23
26
  asDate(): LabelDateResult | null;
24
27
  }
@@ -3,12 +3,16 @@ export declare class LabelFieldDefinition extends DefaultSerializeable {
3
3
  private _name;
4
4
  private _valueRegexes;
5
5
  private _optional;
6
+ private _numberOfMandatoryInstances;
6
7
  private _hiddenProperties;
7
8
  get name(): string;
8
9
  get valueRegexes(): string[];
9
10
  set valueRegexes(value: string[]);
11
+ setValueRegex(valueRegex: string): void;
10
12
  get optional(): boolean;
11
13
  set optional(value: boolean);
14
+ get numberOfMandatoryInstances(): number | null;
15
+ set numberOfMandatoryInstances(value: number | null);
12
16
  get hiddenProperties(): {
13
17
  [key: string]: object;
14
18
  };
@@ -0,0 +1,7 @@
1
+ export declare enum LabelFieldValueType {
2
+ Date = "date",
3
+ Price = "price",
4
+ Weight = "weight",
5
+ Text = "text",
6
+ Numeric = "numeric"
7
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum LabelResultUpdateType {
2
+ AsyncFinished = "AsyncFinished",
3
+ AsyncStarted = "AsyncStarted",
4
+ Sync = "Sync"
5
+ }
@@ -12,4 +12,6 @@ export declare class PackingDateText extends TextField {
12
12
  get name(): string;
13
13
  get valueRegexes(): string[];
14
14
  set valueRegexes(value: string[]);
15
+ get numberOfMandatoryInstances(): number | null;
16
+ set numberOfMandatoryInstances(value: number | null);
15
17
  }
@@ -12,4 +12,6 @@ export declare class PartNumberBarcode extends BarcodeField {
12
12
  get valueRegexes(): string[];
13
13
  set valueRegexes(value: string[]);
14
14
  get symbologies(): SymbologySettings[];
15
+ get numberOfMandatoryInstances(): number | null;
16
+ set numberOfMandatoryInstances(value: number | null);
15
17
  }
@@ -12,4 +12,6 @@ export declare class SerialNumberBarcode extends BarcodeField {
12
12
  get valueRegexes(): string[];
13
13
  set valueRegexes(value: string[]);
14
14
  get symbologies(): SymbologySettings[];
15
+ get numberOfMandatoryInstances(): number | null;
16
+ set numberOfMandatoryInstances(value: number | null);
15
17
  }
@@ -9,4 +9,6 @@ export declare class TotalPriceText extends TextField {
9
9
  get name(): string;
10
10
  get valueRegexes(): string[];
11
11
  set valueRegexes(value: string[]);
12
+ get numberOfMandatoryInstances(): number | null;
13
+ set numberOfMandatoryInstances(value: number | null);
12
14
  }
@@ -9,4 +9,6 @@ export declare class UnitPriceText extends TextField {
9
9
  get name(): string;
10
10
  get valueRegexes(): string[];
11
11
  set valueRegexes(value: string[]);
12
+ get numberOfMandatoryInstances(): number | null;
13
+ set numberOfMandatoryInstances(value: number | null);
12
14
  }
@@ -9,4 +9,6 @@ export declare class WeightText extends TextField {
9
9
  get name(): string;
10
10
  get valueRegexes(): string[];
11
11
  set valueRegexes(value: string[]);
12
+ get numberOfMandatoryInstances(): number | null;
13
+ set numberOfMandatoryInstances(value: number | null);
12
14
  }
@@ -1,7 +1,7 @@
1
- import { BaseController } from "scandit-datacapture-frameworks-core";
2
- import { LabelCapture } from "../LabelCapture";
3
- import { LabelCaptureFeedback } from "../LabelCaptureFeedback";
4
- import { LabelProxy } from "../../generated";
1
+ import { BaseController } from 'scandit-datacapture-frameworks-core';
2
+ import { LabelCapture } from '../LabelCapture';
3
+ import { LabelCaptureFeedback } from '../LabelCaptureFeedback';
4
+ import { LabelProxy } from '../../generated';
5
5
  export declare enum LabelCaptureListenerEvents {
6
6
  didUpdateSession = "LabelCaptureListener.didUpdateSession"
7
7
  }
@@ -2,20 +2,26 @@ import { BaseController } from 'scandit-datacapture-frameworks-core';
2
2
  import { LabelCaptureValidationFlowOverlay } from '../view/LabelCaptureValidationFlowOverlay';
3
3
  import { LabelCapture } from '../LabelCapture';
4
4
  import { LabelProxy } from '../../generated';
5
+ import { LabelResultUpdateType } from '../LabelResultUpdateType';
5
6
  export interface LabelCaptureValidationFlowListenerEventPayload {
6
7
  fields: string[];
7
8
  oldValue: string | null;
8
9
  newValue: string;
10
+ type: LabelResultUpdateType;
11
+ frameId: string | null;
12
+ asyncId: number;
9
13
  }
10
14
  export declare enum LabelCaptureValidationFlowListenerEvents {
11
15
  didCaptureLabelWithFields = "LabelCaptureValidationFlowListener.didCaptureLabelWithFields",
12
- didSubmitManualInputForField = "LabelCaptureValidationFlowListener.didSubmitManualInputForField"
16
+ didSubmitManualInputForField = "LabelCaptureValidationFlowListener.didSubmitManualInputForField",
17
+ didUpdateValidationFlowResult = "LabelCaptureValidationFlowListener.didUpdateValidationFlowResult"
13
18
  }
14
19
  export declare class LabelCaptureValidationFlowOverlayController extends BaseController<LabelProxy> {
15
20
  private overlay;
16
21
  private isSubscribed;
17
22
  private hasPendingListenerRegistration;
18
23
  private adapter;
24
+ private frameDataController;
19
25
  constructor(overlay: LabelCaptureValidationFlowOverlay);
20
26
  updateValidationFlowOverlay(): Promise<void>;
21
27
  subscribeLabelCaptureValidationFlowListener(): Promise<void>;
@@ -25,11 +31,13 @@ export declare class LabelCaptureValidationFlowOverlayController extends BaseCon
25
31
  private initialize;
26
32
  private handleDidCaptureLabelWithFieldsEvent;
27
33
  private handleDidSubmitManualInputForFieldEvent;
34
+ private handleDidUpdateValidationFlowResult;
28
35
  private notifyListenersOfDidCaptureLabelWithFields;
29
36
  private notifyListenersOfDidSubmitManualInputForField;
30
37
  private get dataCaptureViewId();
31
38
  private handleDidCaptureLabelWithFieldsEventWrapper;
32
39
  private handleDidSubmitManualInputForFieldEventWrapper;
40
+ private handleDidUpdateValidationFlowResultEventWrapper;
33
41
  }
34
42
  export interface PrivateLabelCaptureValidationFlowOverlay {
35
43
  mode: LabelCapture;
@@ -1,9 +1,11 @@
1
+ export * from './AdaptiveRecognitionMode';
1
2
  export * from './AdaptiveRecognitionResult';
2
3
  export * from './AdaptiveRecognitionResultType';
3
4
  export * from './BarcodeField';
4
5
  export * from './CapturedLabel';
5
6
  export * from './CustomBarcode';
6
7
  export * from './CustomText';
8
+ export * from './DateText';
7
9
  export * from './ExpiryDateText';
8
10
  export * from './ImeiOneBarcode';
9
11
  export * from './ImeiTwoBarcode';
@@ -23,6 +25,7 @@ export * from './LabelFieldLocation';
23
25
  export * from './LabelFieldLocationType';
24
26
  export * from './LabelFieldState';
25
27
  export * from './LabelFieldType';
28
+ export * from './LabelFieldValueType';
26
29
  export * from './PackingDateText';
27
30
  export * from './PartNumberBarcode';
28
31
  export * from './ReceiptScanningLineItem';
@@ -41,6 +44,7 @@ export * from './view/LabelCaptureValidationFlowOverlay';
41
44
  export * from './LabelCaptureValidationFlowListener';
42
45
  export * from './LabelCaptureValidationFlowSettings';
43
46
  export * from './controller/LabelCaptureValidationFlowOverlayController';
47
+ export * from './LabelResultUpdateType';
44
48
  export * from './view/LabelCaptureAdaptiveRecognitionOverlay';
45
49
  export * from './view/LabelCaptureAdaptiveRecognitionListener';
46
50
  export * from './LabelCaptureAdaptiveRecognitionSettings';
@@ -18,6 +18,7 @@ export interface LabelFieldJSON {
18
18
  date: LabelDateResultJSON | null;
19
19
  isRequired: boolean;
20
20
  canShowLocation: boolean;
21
+ valueType: string;
21
22
  }
22
23
  export interface PrivateLabelField {
23
24
  fromJSON(json: LabelFieldJSON): LabelField;