scandit-capacitor-datacapture-parser 6.11.0 → 6.12.0

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 (25) hide show
  1. package/ScanditCapacitorDatacaptureParser.podspec +1 -1
  2. package/android/build.gradle +4 -3
  3. package/dist/esm/scandit-capacitor-datacapture-parser/src/definitions.d.ts +692 -0
  4. package/dist/esm/scandit-capacitor-datacapture-parser/src/ts/Capacitor/ParserProxy.js +2 -2
  5. package/dist/esm/scandit-capacitor-datacapture-parser/src/ts/Capacitor/ParserProxy.js.map +1 -1
  6. package/dist/plugin.cjs.js +2 -2
  7. package/dist/plugin.cjs.js.map +1 -1
  8. package/dist/plugin.js +2 -2
  9. package/dist/plugin.js.map +1 -1
  10. package/package.json +5 -4
  11. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/Camera+Related.d.ts +0 -79
  12. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/Capacitor/DataCaptureContextProxy.d.ts +0 -12
  13. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/Capacitor/DataCaptureViewProxy.d.ts +0 -14
  14. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/Common.d.ts +0 -211
  15. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/DataCaptureContext+Related.d.ts +0 -23
  16. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/DataCaptureContext.d.ts +0 -63
  17. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/DataCaptureView+Related.d.ts +0 -29
  18. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/DataCaptureView.d.ts +0 -133
  19. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/Serializeable.d.ts +0 -13
  20. package/dist/esm/scandit-capacitor-datacapture-core/src/ts/Viewfinder+Related.d.ts +0 -27
  21. package/dist/esm/scandit-capacitor-datacapture-parser/src/ts/Capacitor/ParserProxy.d.ts +0 -10
  22. package/dist/esm/scandit-capacitor-datacapture-parser/src/ts/ParsedData.d.ts +0 -17
  23. package/dist/esm/scandit-capacitor-datacapture-parser/src/ts/ParsedField.d.ts +0 -20
  24. package/dist/esm/scandit-capacitor-datacapture-parser/src/ts/Parser.d.ts +0 -35
  25. package/dist/esm/scandit-capacitor-datacapture-parser/src/ts/ParserDataFormat.d.ts +0 -9
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
16
16
  s.dependency 'ScanditCapacitorDatacaptureCore'
17
17
  s.swift_version = '5.1'
18
18
 
19
- s.dependency 'ScanditParser', '= 6.11.0'
19
+ s.dependency 'ScanditParser', '= 6.12.0'
20
20
  end
@@ -5,15 +5,16 @@ ext {
5
5
 
6
6
  buildscript {
7
7
  ext {
8
- sdk_version = "6.11.0"
9
- kotlin_version = '1.4.21'
8
+ sdk_version = "6.12.0"
9
+ kotlin_version = "1.5.31"
10
+ agp_version = "7.0.3"
10
11
  }
11
12
  repositories {
12
13
  google()
13
14
  mavenCentral()
14
15
  }
15
16
  dependencies {
16
- classpath 'com.android.tools.build:gradle:7.0.3'
17
+ classpath "com.android.tools.build:gradle:$agp_version"
17
18
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
18
19
  }
19
20
  }
@@ -1,3 +1,695 @@
1
+ export declare type Optional<T> = T | null;
1
2
  export interface ScanditParserPluginInterface {
2
3
  initialize(): Promise<any>;
3
4
  }
5
+ declare module Scandit {
6
+
7
+ export class ParserProxy {
8
+ private static capacitorExec;
9
+ private parser;
10
+ static forParser(parser: Parser): ParserProxy;
11
+ parseString(data: string): Promise<ParsedData>;
12
+ parseRawData(data: string): Promise<ParsedData>;
13
+ }
14
+
15
+ type ParsedDataJSON = [ParsedFieldJSON];
16
+ interface PrivateParsedData {
17
+ fromJSON(json: ParsedDataJSON): ParsedData;
18
+ }
19
+ export class ParsedData {
20
+ private _jsonString;
21
+ get jsonString(): string;
22
+ private _fields;
23
+ get fields(): ParsedField[];
24
+ private _fieldsByName;
25
+ get fieldsByName(): {
26
+ [key: string]: ParsedField;
27
+ };
28
+ private static fromJSON;
29
+ }
30
+
31
+ export interface ParsedFieldJSON {
32
+ name: string;
33
+ parsed: any;
34
+ rawString: string;
35
+ issues?: string[];
36
+ }
37
+ interface PrivateParsedField {
38
+ fromJSON(json: ParsedFieldJSON): ParsedField;
39
+ }
40
+ export class ParsedField {
41
+ private _name;
42
+ get name(): string;
43
+ private _parsed;
44
+ get parsed(): any;
45
+ private _rawString;
46
+ get rawString(): string;
47
+ private _issues;
48
+ get issues(): string[];
49
+ private static fromJSON;
50
+ }
51
+
52
+
53
+ interface PrivateParser extends PrivateDataCaptureComponent {
54
+ dataFormat: ParserDataFormat;
55
+ options: {
56
+ [key: string]: any;
57
+ };
58
+ proxy: ParserProxy;
59
+ isInitialized: boolean;
60
+ waitingForInitialization: [() => void];
61
+ waitForInitialization: Promise<void>;
62
+ }
63
+ export class Parser implements DataCaptureComponent {
64
+ private type;
65
+ private dataFormat;
66
+ private options;
67
+ private _id;
68
+ get id(): string;
69
+ private _context;
70
+ private isInitialized;
71
+ private waitingForInitialization;
72
+ private _proxy;
73
+ private get proxy();
74
+ static forContextAndFormat(context: DataCaptureContext, dataFormat: ParserDataFormat): Promise<Parser>;
75
+ private constructor();
76
+ setOptions(options: {
77
+ [key: string]: any;
78
+ }): Promise<void>;
79
+ parseString(data: string): Promise<ParsedData>;
80
+ parseRawData(data: string): Promise<ParsedData>;
81
+ private waitForInitialization;
82
+ }
83
+
84
+ export enum ParserDataFormat {
85
+ GS1AI = "gs1ai",
86
+ HIBC = "hibc",
87
+ DLID = "dlid",
88
+ MRTD = "mrtd",
89
+ SwissQR = "swissQr",
90
+ VIN = "vin",
91
+ UsUsid = "usUsid"
92
+ }
93
+
94
+
95
+ export enum FrameSourceState {
96
+ On = "on",
97
+ Off = "off",
98
+ Starting = "starting",
99
+ Stopping = "stopping",
100
+ Standby = "standby",
101
+ BootingUp = "bootingUp",
102
+ WakingUp = "wakingUp",
103
+ GoingToSleep = "goingToSleep",
104
+ ShuttingDown = "shuttingDown"
105
+ }
106
+ export enum TorchState {
107
+ On = "on",
108
+ Off = "off",
109
+ Auto = "auto"
110
+ }
111
+ export enum CameraPosition {
112
+ WorldFacing = "worldFacing",
113
+ UserFacing = "userFacing",
114
+ Unspecified = "unspecified"
115
+ }
116
+ export enum VideoResolution {
117
+ Auto = "auto",
118
+ HD = "hd",
119
+ FullHD = "fullHd",
120
+ UHD4K = "uhd4k"
121
+ }
122
+ export enum FocusRange {
123
+ Full = "full",
124
+ Near = "near",
125
+ Far = "far"
126
+ }
127
+ export enum FocusGestureStrategy {
128
+ None = "none",
129
+ Manual = "manual",
130
+ ManualUntilCapture = "manualUntilCapture",
131
+ AutoOnLocation = "autoOnLocation"
132
+ }
133
+ export interface FrameSourceListener {
134
+ didChangeState?(frameSource: FrameSource, newState: FrameSourceState): void;
135
+ }
136
+ export interface FrameSource {
137
+ readonly desiredState: FrameSourceState;
138
+ switchToDesiredState(desiredState: FrameSourceState): Promise<void>;
139
+ getCurrentState(): Promise<FrameSourceState>;
140
+ addListener(listener: FrameSourceListener): void;
141
+ removeListener(listener: FrameSourceListener): void;
142
+ }
143
+ export interface CameraSettingsJSON {
144
+ preferredResolution: string;
145
+ zoomFactor: number;
146
+ focusRange: string;
147
+ zoomGestureZoomFactor: number;
148
+ focusGestureStrategy: string;
149
+ shouldPreferSmoothAutoFocus: boolean;
150
+ api: number;
151
+ }
152
+ interface PrivateCameraSettings {
153
+ fromJSON(json: CameraSettingsJSON): CameraSettings;
154
+ }
155
+ export class CameraSettings {
156
+ preferredResolution: VideoResolution;
157
+ zoomFactor: number;
158
+ zoomGestureZoomFactor: number;
159
+ private api;
160
+ private focus;
161
+ get focusRange(): FocusRange;
162
+ set focusRange(newRange: FocusRange);
163
+ get focusGestureStrategy(): FocusGestureStrategy;
164
+ set focusGestureStrategy(newStrategy: FocusGestureStrategy);
165
+ get shouldPreferSmoothAutoFocus(): boolean;
166
+ set shouldPreferSmoothAutoFocus(newShouldPreferSmoothAutoFocus: boolean);
167
+ private static fromJSON;
168
+ constructor();
169
+ constructor(settings: CameraSettings);
170
+ setProperty(name: string, value: any): void;
171
+ getProperty(name: string): any;
172
+ }
173
+
174
+
175
+ export class DataCaptureContextProxy {
176
+ private context;
177
+ static forDataCaptureContext(context: DataCaptureContext): DataCaptureContextProxy;
178
+ updateContextFromJSON(): Promise<void>;
179
+ dispose(): void;
180
+ private initialize;
181
+ private initializeContextFromJSON;
182
+ private subscribeListener;
183
+ private notifyListeners;
184
+ }
185
+
186
+
187
+ export class DataCaptureViewProxy {
188
+ private view;
189
+ static forDataCaptureView(view: DataCaptureView): DataCaptureViewProxy;
190
+ setPositionAndSize(top: number, left: number, width: number, height: number, shouldBeUnderWebView: boolean): Promise<void>;
191
+ show(): Promise<void>;
192
+ hide(): Promise<void>;
193
+ viewPointForFramePoint(point: Point): Promise<Point>;
194
+ viewQuadrilateralForFrameQuadrilateral(quadrilateral: Quadrilateral): Promise<Quadrilateral>;
195
+ private subscribeListener;
196
+ private notifyListeners;
197
+ private initialize;
198
+ }
199
+
200
+
201
+ export interface PointJSON {
202
+ x: number;
203
+ y: number;
204
+ }
205
+ interface PrivatePoint {
206
+ fromJSON(json: PointJSON): Point;
207
+ }
208
+ export class Point {
209
+ private _x;
210
+ private _y;
211
+ get x(): number;
212
+ get y(): number;
213
+ private static fromJSON;
214
+ constructor(x: number, y: number);
215
+ }
216
+ export interface QuadrilateralJSON {
217
+ topLeft: PointJSON;
218
+ topRight: PointJSON;
219
+ bottomRight: PointJSON;
220
+ bottomLeft: PointJSON;
221
+ }
222
+ interface PrivateQuadrilateral {
223
+ fromJSON(json: QuadrilateralJSON): Quadrilateral;
224
+ }
225
+ export class Quadrilateral {
226
+ private _topLeft;
227
+ private _topRight;
228
+ private _bottomRight;
229
+ private _bottomLeft;
230
+ get topLeft(): Point;
231
+ get topRight(): Point;
232
+ get bottomRight(): Point;
233
+ get bottomLeft(): Point;
234
+ private static fromJSON;
235
+ constructor(topLeft: Point, topRight: Point, bottomRight: Point, bottomLeft: Point);
236
+ }
237
+ export enum MeasureUnit {
238
+ DIP = "dip",
239
+ Pixel = "pixel",
240
+ Fraction = "fraction"
241
+ }
242
+ export interface NumberWithUnitJSON {
243
+ value: number;
244
+ unit: string;
245
+ }
246
+ interface PrivateNumberWithUnit {
247
+ fromJSON(json: NumberWithUnitJSON): NumberWithUnit;
248
+ }
249
+ export class NumberWithUnit {
250
+ private _value;
251
+ private _unit;
252
+ get value(): number;
253
+ get unit(): MeasureUnit;
254
+ private static fromJSON;
255
+ constructor(value: number, unit: MeasureUnit);
256
+ }
257
+ export interface PointWithUnitJSON {
258
+ x: NumberWithUnitJSON;
259
+ y: NumberWithUnitJSON;
260
+ }
261
+ interface PrivatePointWithUnit {
262
+ readonly zero: PointWithUnit;
263
+ fromJSON(json: PointWithUnitJSON): PointWithUnit;
264
+ }
265
+ export class PointWithUnit {
266
+ private _x;
267
+ private _y;
268
+ get x(): NumberWithUnit;
269
+ get y(): NumberWithUnit;
270
+ private static fromJSON;
271
+ private static get zero();
272
+ constructor(x: NumberWithUnit, y: NumberWithUnit);
273
+ }
274
+ export class Rect {
275
+ private _origin;
276
+ private _size;
277
+ get origin(): Point;
278
+ get size(): Size;
279
+ constructor(origin: Point, size: Size);
280
+ }
281
+ export class RectWithUnit {
282
+ private _origin;
283
+ private _size;
284
+ get origin(): PointWithUnit;
285
+ get size(): SizeWithUnit;
286
+ constructor(origin: PointWithUnit, size: SizeWithUnit);
287
+ }
288
+ export class SizeWithUnit {
289
+ private _width;
290
+ private _height;
291
+ get width(): NumberWithUnit;
292
+ get height(): NumberWithUnit;
293
+ constructor(width: NumberWithUnit, height: NumberWithUnit);
294
+ }
295
+ export interface SizeJSON {
296
+ width: number;
297
+ height: number;
298
+ }
299
+ export class Size {
300
+ private _width;
301
+ private _height;
302
+ get width(): number;
303
+ get height(): number;
304
+ private static fromJSON;
305
+ constructor(width: number, height: number);
306
+ }
307
+ export class SizeWithAspect {
308
+ private _size;
309
+ private _aspect;
310
+ get size(): NumberWithUnit;
311
+ get aspect(): number;
312
+ constructor(size: NumberWithUnit, aspect: number);
313
+ }
314
+ export enum SizingMode {
315
+ WidthAndHeight = "widthAndHeight",
316
+ WidthAndAspectRatio = "widthAndAspectRatio",
317
+ HeightAndAspectRatio = "heightAndAspectRatio",
318
+ ShorterDimensionAndAspectRatio = "shorterDimensionAndAspectRatio"
319
+ }
320
+ export interface SizeWithUnitAndAspectJSON {
321
+ width?: NumberWithUnitJSON;
322
+ height?: NumberWithUnitJSON;
323
+ shorterDimension?: NumberWithUnitJSON;
324
+ aspect?: number;
325
+ }
326
+ interface PrivateSizeWithUnitAndAspect {
327
+ fromJSON(json: SizeWithUnitAndAspectJSON): SizeWithUnitAndAspect;
328
+ }
329
+ export class SizeWithUnitAndAspect {
330
+ private _widthAndHeight;
331
+ private _widthAndAspectRatio;
332
+ private _heightAndAspectRatio;
333
+ private _shorterDimensionAndAspectRatio;
334
+ get widthAndHeight(): Optional<SizeWithUnit>;
335
+ get widthAndAspectRatio(): Optional<SizeWithAspect>;
336
+ get heightAndAspectRatio(): Optional<SizeWithAspect>;
337
+ get shorterDimensionAndAspectRatio(): SizeWithAspect | null;
338
+ get sizingMode(): SizingMode;
339
+ private static sizeWithWidthAndHeight;
340
+ private static sizeWithWidthAndAspectRatio;
341
+ private static sizeWithHeightAndAspectRatio;
342
+ private static sizeWithShorterDimensionAndAspectRatio;
343
+ private static fromJSON;
344
+ toJSON(): object;
345
+ }
346
+ export interface MarginsWithUnitJSON {
347
+ left: NumberWithUnitJSON;
348
+ right: NumberWithUnitJSON;
349
+ top: NumberWithUnitJSON;
350
+ bottom: NumberWithUnitJSON;
351
+ }
352
+ interface PrivateMarginsWithUnit {
353
+ readonly zero: MarginsWithUnit;
354
+ fromJSON(json: MarginsWithUnitJSON): MarginsWithUnit;
355
+ }
356
+ export class MarginsWithUnit {
357
+ private _left;
358
+ private _right;
359
+ private _top;
360
+ private _bottom;
361
+ get left(): NumberWithUnit;
362
+ get right(): NumberWithUnit;
363
+ get top(): NumberWithUnit;
364
+ get bottom(): NumberWithUnit;
365
+ private static fromJSON;
366
+ private static get zero();
367
+ constructor(left: NumberWithUnit, right: NumberWithUnit, top: NumberWithUnit, bottom: NumberWithUnit);
368
+ } type ColorJSON = string;
369
+ interface PrivateColor {
370
+ fromJSON(json: ColorJSON): Color;
371
+ }
372
+ export class Color {
373
+ private hexadecimalString;
374
+ get redComponent(): string;
375
+ get greenComponent(): string;
376
+ get blueComponent(): string;
377
+ get alphaComponent(): string;
378
+ get red(): number;
379
+ get green(): number;
380
+ get blue(): number;
381
+ get alpha(): number;
382
+ static fromHex(hex: string): Color;
383
+ static fromRGBA(red: number, green: number, blue: number, alpha?: number): Color;
384
+ private static hexToNumber;
385
+ private static fromJSON;
386
+ private static numberToHex;
387
+ private static normalizeHex;
388
+ private static normalizeAlpha;
389
+ private constructor();
390
+ withAlpha(alpha: number): Color;
391
+ toJSON(): string;
392
+ }
393
+ export enum Orientation {
394
+ Unknown = "unknown",
395
+ Portrait = "portrait",
396
+ PortraitUpsideDown = "portraitUpsideDown",
397
+ LandscapeRight = "landscapeRight",
398
+ LandscapeLeft = "landscapeLeft"
399
+ }
400
+ export enum Direction {
401
+ None = "none",
402
+ Horizontal = "horizontal",
403
+ LeftToRight = "leftToRight",
404
+ RightToLeft = "rightToLeft",
405
+ Vertical = "vertical",
406
+ TopToBottom = "topToBottom",
407
+ BottomToTop = "bottomToTop"
408
+ }
409
+
410
+
411
+ export interface DataCaptureContextListener {
412
+ didChangeStatus?(context: DataCaptureContext, contextStatus: ContextStatus): void;
413
+ didStartObservingContext?(context: DataCaptureContext): void;
414
+ }
415
+ interface ContextStatusJSON {
416
+ code: number;
417
+ isValid: boolean;
418
+ message: string;
419
+ }
420
+ interface PrivateContextStatus {
421
+ fromJSON(json: ContextStatusJSON): ContextStatus;
422
+ }
423
+ export class ContextStatus {
424
+ private _message;
425
+ private _code;
426
+ private _isValid;
427
+ private static fromJSON;
428
+ get message(): string;
429
+ get code(): number;
430
+ get isValid(): boolean;
431
+ }
432
+
433
+
434
+ interface PrivateDataCaptureMode {
435
+ _context: Optional<DataCaptureContext>;
436
+ }
437
+ export interface DataCaptureMode {
438
+ isEnabled: boolean;
439
+ readonly context: Optional<DataCaptureContext>;
440
+ }
441
+ interface PrivateDataCaptureComponent {
442
+ _context: DataCaptureContext;
443
+ }
444
+ export interface DataCaptureComponent {
445
+ readonly id: string;
446
+ }
447
+ interface PrivateDataCaptureContext {
448
+ proxy: DataCaptureContextProxy;
449
+ modes: [DataCaptureMode];
450
+ components: [DataCaptureComponent];
451
+ initialize: () => void;
452
+ update: () => Promise<void>;
453
+ addComponent: (component: DataCaptureComponent) => Promise<void>;
454
+ }
455
+ export interface DataCaptureContextCreationOptions {
456
+ deviceName?: Optional<string>;
457
+ }
458
+ export class DataCaptureContextSettings {
459
+ constructor();
460
+ setProperty(name: string, value: any): void;
461
+ getProperty(name: string): any;
462
+ }
463
+ export class DataCaptureContext {
464
+ private licenseKey;
465
+ private deviceName;
466
+ private framework;
467
+ private frameworkVersion;
468
+ private settings;
469
+ private _frameSource;
470
+ private view;
471
+ private modes;
472
+ private components;
473
+ private proxy;
474
+ private listeners;
475
+ get frameSource(): Optional<FrameSource>;
476
+ static get deviceID(): Optional<string>;
477
+ static forLicenseKey(licenseKey: string): DataCaptureContext;
478
+ static forLicenseKeyWithSettings(licenseKey: string, settings: DataCaptureContextSettings | null): DataCaptureContext;
479
+ static forLicenseKeyWithOptions(licenseKey: string, options: Optional<DataCaptureContextCreationOptions>): DataCaptureContext;
480
+ private constructor();
481
+ setFrameSource(frameSource: Optional<FrameSource>): Promise<void>;
482
+ addListener(listener: DataCaptureContextListener): void;
483
+ removeListener(listener: DataCaptureContextListener): void;
484
+ addMode(mode: DataCaptureMode): void;
485
+ removeMode(mode: DataCaptureMode): void;
486
+ removeAllModes(): void;
487
+ dispose(): void;
488
+ applySettings(settings: DataCaptureContextSettings): Promise<void>;
489
+ private initialize;
490
+ private update;
491
+ private addComponent;
492
+ }
493
+
494
+
495
+ export interface FocusGesture {
496
+ }
497
+ export interface FocusGestureJSON {
498
+ type: string;
499
+ }
500
+ class PrivateFocusGestureDeserializer {
501
+ static fromJSON(json: FocusGestureJSON | null): FocusGesture | null;
502
+ }
503
+ export class TapToFocus implements FocusGesture {
504
+ private type;
505
+ constructor();
506
+ }
507
+ export interface ZoomGesture {
508
+ }
509
+ export interface ZoomGestureJSON {
510
+ type: string;
511
+ }
512
+ class PrivateZoomGestureDeserializer {
513
+ static fromJSON(json: ZoomGestureJSON | null): ZoomGesture | null;
514
+ }
515
+ export class SwipeToZoom implements ZoomGesture {
516
+ private type;
517
+ constructor();
518
+ }
519
+ export enum LogoStyle {
520
+ Minimal = "minimal",
521
+ Extended = "extended"
522
+ }
523
+
524
+
525
+ export interface DataCaptureOverlay {
526
+ }
527
+ export interface Control {
528
+ }
529
+ export class TorchSwitchControl implements Control {
530
+ private type;
531
+ private icon;
532
+ private view;
533
+ get torchOffImage(): string | null;
534
+ set torchOffImage(torchOffImage: string | null);
535
+ get torchOffPressedImage(): string | null;
536
+ set torchOffPressedImage(torchOffPressedImage: string | null);
537
+ get torchOnImage(): string | null;
538
+ set torchOnImage(torchOnImage: string | null);
539
+ get torchOnPressedImage(): string | null;
540
+ set torchOnPressedImage(torchOnPressedImage: string | null);
541
+ }
542
+ export class ZoomSwitchControl implements Control {
543
+ private type;
544
+ private icon;
545
+ private view;
546
+ get zoomedOutImage(): string | null;
547
+ set zoomedOutImage(zoomedOutImage: string | null);
548
+ get zoomedInImage(): string | null;
549
+ set zoomedInImage(zoomedInImage: string | null);
550
+ get zoomedInPressedImage(): string | null;
551
+ set zoomedInPressedImage(zoomedInPressedImage: string | null);
552
+ get zoomedOutPressedImage(): string | null;
553
+ set zoomedOutPressedImage(zoomedOutPressedImage: string | null);
554
+ }
555
+ export interface DataCaptureViewListener {
556
+ didChangeSize?(view: DataCaptureView, size: Size, orientation: Orientation): void;
557
+ }
558
+ export enum Anchor {
559
+ TopLeft = "topLeft",
560
+ TopCenter = "topCenter",
561
+ TopRight = "topRight",
562
+ CenterLeft = "centerLeft",
563
+ Center = "center",
564
+ CenterRight = "centerRight",
565
+ BottomLeft = "bottomLeft",
566
+ BottomCenter = "bottomCenter",
567
+ BottomRight = "bottomRight"
568
+ }
569
+ export class HTMLElementState {
570
+ isShown: boolean;
571
+ position: Optional<{
572
+ top: number;
573
+ left: number;
574
+ }>;
575
+ size: Optional<{
576
+ width: number;
577
+ height: number;
578
+ }>;
579
+ shouldBeUnderContent: boolean;
580
+ get isValid(): boolean;
581
+ didChangeComparedTo(other: HTMLElementState): boolean;
582
+ }
583
+ interface PrivateDataCaptureView {
584
+ htmlElement: Optional<HTMLElement>;
585
+ _htmlElementState: HTMLElementState;
586
+ htmlElementState: HTMLElementState;
587
+ readonly viewProxy: DataCaptureViewProxy;
588
+ _viewProxy: DataCaptureViewProxy;
589
+ overlays: DataCaptureOverlay[];
590
+ controls: Control[];
591
+ listeners: DataCaptureViewListener[];
592
+ addControl(control: Control): void;
593
+ removeControl(control: Control): void;
594
+ initialize(): void;
595
+ updatePositionAndSize(): void;
596
+ _show(): void;
597
+ _hide(): void;
598
+ elementDidChange(): void;
599
+ subscribeToChangesOnHTMLElement(): void;
600
+ controlUpdated(): void;
601
+ }
602
+ export class DataCaptureView {
603
+ private _context;
604
+ get context(): Optional<DataCaptureContext>;
605
+ set context(context: Optional<DataCaptureContext>);
606
+ scanAreaMargins: MarginsWithUnit;
607
+ pointOfInterest: PointWithUnit;
608
+ logoAnchor: Anchor;
609
+ logoOffset: PointWithUnit;
610
+ focusGesture: FocusGesture | null;
611
+ zoomGesture: ZoomGesture | null;
612
+ logoStyle: LogoStyle;
613
+ private overlays;
614
+ private controls;
615
+ private _viewProxy;
616
+ private get viewProxy();
617
+ private listeners;
618
+ private htmlElement;
619
+ private _htmlElementState;
620
+ private set htmlElementState(value);
621
+ private get htmlElementState();
622
+ private scrollListener;
623
+ private domObserver;
624
+ private orientationChangeListener;
625
+ /**
626
+ * The current context as a PrivateDataCaptureContext
627
+ */
628
+ private get privateContext();
629
+ static forContext(context: Optional<DataCaptureContext>): DataCaptureView;
630
+ constructor();
631
+ connectToElement(element: HTMLElement): void;
632
+ detachFromElement(): void;
633
+ setFrame(frame: Rect, isUnderContent?: boolean): Promise<void>;
634
+ show(): Promise<void>;
635
+ hide(): Promise<void>;
636
+ addOverlay(overlay: DataCaptureOverlay): void;
637
+ removeOverlay(overlay: DataCaptureOverlay): void;
638
+ addListener(listener: DataCaptureViewListener): void;
639
+ removeListener(listener: DataCaptureViewListener): void;
640
+ viewPointForFramePoint(point: Point): Promise<Point>;
641
+ viewQuadrilateralForFrameQuadrilateral(quadrilateral: Quadrilateral): Promise<Quadrilateral>;
642
+ addControl(control: Control): void;
643
+ removeControl(control: Control): void;
644
+ private controlUpdated;
645
+ private initialize;
646
+ private subscribeToChangesOnHTMLElement;
647
+ private unsubscribeFromChangesOnHTMLElement;
648
+ private elementDidChange;
649
+ private updatePositionAndSize;
650
+ private _show;
651
+ private _hide;
652
+ }
653
+
654
+ export interface Serializeable {
655
+ toJSON: () => object;
656
+ }
657
+ export interface StringSerializeable {
658
+ toJSON: () => string;
659
+ }
660
+ export function ignoreFromSerialization(target: any, propertyName: string): void;
661
+ export function nameForSerialization(customName: string): (target: any, propertyName: string) => void;
662
+ export function ignoreFromSerializationIfNull(target: any, propertyName: string): void;
663
+ export function serializationDefault(defaultValue: any): (target: any, propertyName: string) => void;
664
+ export class DefaultSerializeable {
665
+ toJSON(): object;
666
+ }
667
+
668
+
669
+ export enum RectangularViewfinderStyle {
670
+ Legacy = "legacy",
671
+ Rounded = "rounded",
672
+ Square = "square"
673
+ }
674
+ export enum RectangularViewfinderLineStyle {
675
+ Light = "light",
676
+ Bold = "bold"
677
+ }
678
+ export enum LaserlineViewfinderStyle {
679
+ Legacy = "legacy",
680
+ Animated = "animated"
681
+ }
682
+ interface RectangularViewfinderAnimationJSON {
683
+ readonly looping: boolean;
684
+ }
685
+ interface PrivateRectangularViewfinderAnimation {
686
+ fromJSON(json: RectangularViewfinderAnimationJSON): RectangularViewfinderAnimation;
687
+ }
688
+ export class RectangularViewfinderAnimation {
689
+ private readonly _isLooping;
690
+ private static fromJSON;
691
+ get isLooping(): boolean;
692
+ constructor(isLooping: boolean);
693
+ }
694
+
695
+ }