scandit-react-native-datacapture-core 7.1.1 → 7.2.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/THIRD_PARTY.txt +0 -49
- package/android/build.gradle +1 -1
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ScanditDataCaptureCoreModule.kt +17 -1
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ScanditDataCaptureCorePackage.kt +39 -1
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ui/DataCaptureViewManager.kt +43 -25
- package/android/src/main/kotlin/com/scandit/datacapture/reactnative/core/ui/ScanditViewGroupManager.kt +1 -1
- package/dist/core.js +247 -201
- package/dist/core.js.map +1 -1
- package/dist/dts/native/RNNativeCaller.d.ts +1 -0
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/ScanditDataCaptureCore.swift +4 -4
- package/package.json +2 -2
- package/scandit-react-native-datacapture-core.podspec +1 -1
- package/scripts/detect_frameworks.rb +6 -5
package/dist/core.js
CHANGED
|
@@ -369,11 +369,10 @@ class FactoryMaker {
|
|
|
369
369
|
var _a;
|
|
370
370
|
const item = FactoryMaker.instances.get(clsName);
|
|
371
371
|
if (item === null || item === undefined) {
|
|
372
|
-
|
|
373
|
-
return;
|
|
372
|
+
throw new Error(`Trying to get a non existing instance for ${clsName}`);
|
|
374
373
|
}
|
|
375
374
|
if (!item.instance && item.builder) {
|
|
376
|
-
item.instance = (_a = item.builder) === null || _a ===
|
|
375
|
+
item.instance = (_a = item.builder) === null || _a === undefined ? undefined : _a.call(item);
|
|
377
376
|
}
|
|
378
377
|
return item.instance;
|
|
379
378
|
}
|
|
@@ -383,7 +382,7 @@ class FactoryMaker {
|
|
|
383
382
|
if (item === null || item === undefined) {
|
|
384
383
|
throw new Error(`Trying to get a non existing instance for ${clsName}`);
|
|
385
384
|
}
|
|
386
|
-
const proxyInstance = (_a = item.builder) === null || _a ===
|
|
385
|
+
const proxyInstance = (_a = item.builder) === null || _a === undefined ? undefined : _a.call(item);
|
|
387
386
|
if (proxyInstance === undefined) {
|
|
388
387
|
throw new Error(`item.builder?.() returned undefined for ${clsName}`);
|
|
389
388
|
}
|
|
@@ -444,9 +443,6 @@ class BaseController {
|
|
|
444
443
|
this.eventEmitter = FactoryMaker.getInstance('EventEmitter');
|
|
445
444
|
this.proxyName = proxyName;
|
|
446
445
|
}
|
|
447
|
-
emit(event, payload) {
|
|
448
|
-
this.eventEmitter.emit(event, payload);
|
|
449
|
-
}
|
|
450
446
|
}
|
|
451
447
|
class BaseNewController {
|
|
452
448
|
get _proxy() {
|
|
@@ -487,6 +483,9 @@ const advancedNativeProxyHook = {
|
|
|
487
483
|
// $methodName will be redirected to the special _call
|
|
488
484
|
// method on AdvancedNativeProxy
|
|
489
485
|
if (prop.startsWith("$")) {
|
|
486
|
+
if (prop in advancedNativeProxy) {
|
|
487
|
+
return advancedNativeProxy[prop];
|
|
488
|
+
}
|
|
490
489
|
return (args) => {
|
|
491
490
|
return advancedNativeProxy._call(prop.substring(1), args);
|
|
492
491
|
};
|
|
@@ -512,37 +511,46 @@ class AdvancedNativeProxy extends BaseNativeProxy {
|
|
|
512
511
|
this.nativeCaller = nativeCaller;
|
|
513
512
|
this.events = events;
|
|
514
513
|
this.eventSubscriptions = new Map();
|
|
515
|
-
this.events.forEach((event) => __awaiter(this,
|
|
514
|
+
this.events.forEach((event) => __awaiter(this, undefined, undefined, function* () {
|
|
516
515
|
yield this._registerEvent(event);
|
|
517
516
|
}));
|
|
518
517
|
// Wrapping the AdvancedNativeProxy instance with the JS proxy hook
|
|
519
518
|
return new Proxy(this, advancedNativeProxyHook);
|
|
520
519
|
}
|
|
521
520
|
dispose() {
|
|
522
|
-
return __awaiter(this,
|
|
521
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
523
522
|
for (const event of this.events) {
|
|
524
523
|
yield this._unregisterEvent(event);
|
|
525
524
|
}
|
|
525
|
+
this.eventSubscriptions.clear();
|
|
526
|
+
this.events = [];
|
|
526
527
|
});
|
|
527
528
|
}
|
|
528
529
|
_call(fnName, args) {
|
|
529
530
|
return this.nativeCaller.callFn(fnName, args);
|
|
530
531
|
}
|
|
531
532
|
_registerEvent(event) {
|
|
532
|
-
return __awaiter(this,
|
|
533
|
-
const handler = (args) => __awaiter(this,
|
|
533
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
534
|
+
const handler = (args) => __awaiter(this, undefined, undefined, function* () {
|
|
534
535
|
this.eventEmitter.emit(event.nativeEventName, args);
|
|
535
536
|
});
|
|
536
|
-
this.eventEmitter.on(event.nativeEventName, (args) => __awaiter(this,
|
|
537
|
+
this.eventEmitter.on(event.nativeEventName, (args) => __awaiter(this, undefined, undefined, function* () {
|
|
537
538
|
// Call to the special method defined on the JS Proxy hook
|
|
538
|
-
|
|
539
|
+
try {
|
|
540
|
+
const hookArg = this.nativeCaller.eventHook(args);
|
|
541
|
+
yield this[`on$${event.name}`](hookArg);
|
|
542
|
+
}
|
|
543
|
+
catch (e) {
|
|
544
|
+
console.error(`Error while trying to execute handler for ${event.nativeEventName}`, e);
|
|
545
|
+
throw e;
|
|
546
|
+
}
|
|
539
547
|
}));
|
|
540
548
|
const subscription = yield this.nativeCaller.registerEvent(event.nativeEventName, handler);
|
|
541
549
|
this.eventSubscriptions.set(event.name, subscription);
|
|
542
550
|
});
|
|
543
551
|
}
|
|
544
552
|
_unregisterEvent(event) {
|
|
545
|
-
return __awaiter(this,
|
|
553
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
546
554
|
const subscription = this.eventSubscriptions.get(event.name);
|
|
547
555
|
yield this.nativeCaller.unregisterEvent(event.nativeEventName, subscription);
|
|
548
556
|
this.eventEmitter.off(event.nativeEventName);
|
|
@@ -561,12 +569,30 @@ class AdvancedNativeProxy extends BaseNativeProxy {
|
|
|
561
569
|
* @param eventsEnum
|
|
562
570
|
*/
|
|
563
571
|
function createAdvancedNativeProxy(nativeCaller, eventsEnum = undefined) {
|
|
564
|
-
const eventsList = Object.entries(eventsEnum).map(([key, value]) => ({
|
|
572
|
+
const eventsList = eventsEnum == null ? [] : Object.entries(eventsEnum).map(([key, value]) => ({
|
|
565
573
|
name: key,
|
|
566
574
|
nativeEventName: value
|
|
567
575
|
}));
|
|
568
576
|
return new AdvancedNativeProxy(nativeCaller, eventsList);
|
|
569
577
|
}
|
|
578
|
+
/**
|
|
579
|
+
* Function to create a custom AdvancedNativeProxy. This will return an object which will provide dynamically the
|
|
580
|
+
* methods specified in the PROXY interface.
|
|
581
|
+
*
|
|
582
|
+
* The Proxy interface implemented in order to call native methods will require a special mark
|
|
583
|
+
* `$methodName` for method calls
|
|
584
|
+
* `on$methodName` for the listeners added to the events defined in eventsEnum
|
|
585
|
+
* @param klass
|
|
586
|
+
* @param nativeCaller
|
|
587
|
+
* @param eventsEnum
|
|
588
|
+
*/
|
|
589
|
+
function createAdvancedNativeFromCtorProxy(klass, nativeCaller, eventsEnum = undefined) {
|
|
590
|
+
const eventsList = Object.entries(eventsEnum).map(([key, value]) => ({
|
|
591
|
+
name: key,
|
|
592
|
+
nativeEventName: value
|
|
593
|
+
}));
|
|
594
|
+
return new klass(nativeCaller, eventsList);
|
|
595
|
+
}
|
|
570
596
|
|
|
571
597
|
function getCoreDefaults() {
|
|
572
598
|
return FactoryMaker.getInstance('CoreDefaults');
|
|
@@ -746,10 +772,10 @@ class Point extends DefaultSerializeable {
|
|
|
746
772
|
}
|
|
747
773
|
__decorate([
|
|
748
774
|
nameForSerialization('x')
|
|
749
|
-
], Point.prototype, "_x",
|
|
775
|
+
], Point.prototype, "_x", undefined);
|
|
750
776
|
__decorate([
|
|
751
777
|
nameForSerialization('y')
|
|
752
|
-
], Point.prototype, "_y",
|
|
778
|
+
], Point.prototype, "_y", undefined);
|
|
753
779
|
|
|
754
780
|
class Quadrilateral extends DefaultSerializeable {
|
|
755
781
|
get topLeft() {
|
|
@@ -777,16 +803,16 @@ class Quadrilateral extends DefaultSerializeable {
|
|
|
777
803
|
}
|
|
778
804
|
__decorate([
|
|
779
805
|
nameForSerialization('topLeft')
|
|
780
|
-
], Quadrilateral.prototype, "_topLeft",
|
|
806
|
+
], Quadrilateral.prototype, "_topLeft", undefined);
|
|
781
807
|
__decorate([
|
|
782
808
|
nameForSerialization('topRight')
|
|
783
|
-
], Quadrilateral.prototype, "_topRight",
|
|
809
|
+
], Quadrilateral.prototype, "_topRight", undefined);
|
|
784
810
|
__decorate([
|
|
785
811
|
nameForSerialization('bottomRight')
|
|
786
|
-
], Quadrilateral.prototype, "_bottomRight",
|
|
812
|
+
], Quadrilateral.prototype, "_bottomRight", undefined);
|
|
787
813
|
__decorate([
|
|
788
814
|
nameForSerialization('bottomLeft')
|
|
789
|
-
], Quadrilateral.prototype, "_bottomLeft",
|
|
815
|
+
], Quadrilateral.prototype, "_bottomLeft", undefined);
|
|
790
816
|
|
|
791
817
|
class NumberWithUnit extends DefaultSerializeable {
|
|
792
818
|
get value() {
|
|
@@ -806,10 +832,10 @@ class NumberWithUnit extends DefaultSerializeable {
|
|
|
806
832
|
}
|
|
807
833
|
__decorate([
|
|
808
834
|
nameForSerialization('value')
|
|
809
|
-
], NumberWithUnit.prototype, "_value",
|
|
835
|
+
], NumberWithUnit.prototype, "_value", undefined);
|
|
810
836
|
__decorate([
|
|
811
837
|
nameForSerialization('unit')
|
|
812
|
-
], NumberWithUnit.prototype, "_unit",
|
|
838
|
+
], NumberWithUnit.prototype, "_unit", undefined);
|
|
813
839
|
|
|
814
840
|
var MeasureUnit;
|
|
815
841
|
(function (MeasureUnit) {
|
|
@@ -839,10 +865,10 @@ class PointWithUnit extends DefaultSerializeable {
|
|
|
839
865
|
}
|
|
840
866
|
__decorate([
|
|
841
867
|
nameForSerialization('x')
|
|
842
|
-
], PointWithUnit.prototype, "_x",
|
|
868
|
+
], PointWithUnit.prototype, "_x", undefined);
|
|
843
869
|
__decorate([
|
|
844
870
|
nameForSerialization('y')
|
|
845
|
-
], PointWithUnit.prototype, "_y",
|
|
871
|
+
], PointWithUnit.prototype, "_y", undefined);
|
|
846
872
|
|
|
847
873
|
class Rect extends DefaultSerializeable {
|
|
848
874
|
get origin() {
|
|
@@ -859,10 +885,10 @@ class Rect extends DefaultSerializeable {
|
|
|
859
885
|
}
|
|
860
886
|
__decorate([
|
|
861
887
|
nameForSerialization('origin')
|
|
862
|
-
], Rect.prototype, "_origin",
|
|
888
|
+
], Rect.prototype, "_origin", undefined);
|
|
863
889
|
__decorate([
|
|
864
890
|
nameForSerialization('size')
|
|
865
|
-
], Rect.prototype, "_size",
|
|
891
|
+
], Rect.prototype, "_size", undefined);
|
|
866
892
|
|
|
867
893
|
class RectWithUnit extends DefaultSerializeable {
|
|
868
894
|
get origin() {
|
|
@@ -879,10 +905,10 @@ class RectWithUnit extends DefaultSerializeable {
|
|
|
879
905
|
}
|
|
880
906
|
__decorate([
|
|
881
907
|
nameForSerialization('origin')
|
|
882
|
-
], RectWithUnit.prototype, "_origin",
|
|
908
|
+
], RectWithUnit.prototype, "_origin", undefined);
|
|
883
909
|
__decorate([
|
|
884
910
|
nameForSerialization('size')
|
|
885
|
-
], RectWithUnit.prototype, "_size",
|
|
911
|
+
], RectWithUnit.prototype, "_size", undefined);
|
|
886
912
|
|
|
887
913
|
class ScanditIcon extends DefaultSerializeable {
|
|
888
914
|
static fromJSON(json) {
|
|
@@ -924,26 +950,26 @@ class ScanditIcon extends DefaultSerializeable {
|
|
|
924
950
|
__decorate([
|
|
925
951
|
nameForSerialization('backgroundColor'),
|
|
926
952
|
ignoreFromSerializationIfNull
|
|
927
|
-
], ScanditIcon.prototype, "_backgroundColor",
|
|
953
|
+
], ScanditIcon.prototype, "_backgroundColor", undefined);
|
|
928
954
|
__decorate([
|
|
929
955
|
nameForSerialization('backgroundShape'),
|
|
930
956
|
ignoreFromSerializationIfNull
|
|
931
|
-
], ScanditIcon.prototype, "_backgroundShape",
|
|
957
|
+
], ScanditIcon.prototype, "_backgroundShape", undefined);
|
|
932
958
|
__decorate([
|
|
933
959
|
nameForSerialization('icon'),
|
|
934
960
|
ignoreFromSerializationIfNull
|
|
935
|
-
], ScanditIcon.prototype, "_icon",
|
|
961
|
+
], ScanditIcon.prototype, "_icon", undefined);
|
|
936
962
|
__decorate([
|
|
937
963
|
nameForSerialization('iconColor'),
|
|
938
964
|
ignoreFromSerializationIfNull
|
|
939
|
-
], ScanditIcon.prototype, "_iconColor",
|
|
965
|
+
], ScanditIcon.prototype, "_iconColor", undefined);
|
|
940
966
|
__decorate([
|
|
941
967
|
nameForSerialization('backgroundStrokeColor'),
|
|
942
968
|
ignoreFromSerializationIfNull
|
|
943
|
-
], ScanditIcon.prototype, "_backgroundStrokeColor",
|
|
969
|
+
], ScanditIcon.prototype, "_backgroundStrokeColor", undefined);
|
|
944
970
|
__decorate([
|
|
945
971
|
nameForSerialization('backgroundStrokeWidth')
|
|
946
|
-
], ScanditIcon.prototype, "_backgroundStrokeWidth",
|
|
972
|
+
], ScanditIcon.prototype, "_backgroundStrokeWidth", undefined);
|
|
947
973
|
|
|
948
974
|
class ScanditIconBuilder {
|
|
949
975
|
constructor() {
|
|
@@ -1033,10 +1059,10 @@ class Size extends DefaultSerializeable {
|
|
|
1033
1059
|
}
|
|
1034
1060
|
__decorate([
|
|
1035
1061
|
nameForSerialization('width')
|
|
1036
|
-
], Size.prototype, "_width",
|
|
1062
|
+
], Size.prototype, "_width", undefined);
|
|
1037
1063
|
__decorate([
|
|
1038
1064
|
nameForSerialization('height')
|
|
1039
|
-
], Size.prototype, "_height",
|
|
1065
|
+
], Size.prototype, "_height", undefined);
|
|
1040
1066
|
|
|
1041
1067
|
class SizeWithAspect extends DefaultSerializeable {
|
|
1042
1068
|
get size() {
|
|
@@ -1053,10 +1079,10 @@ class SizeWithAspect extends DefaultSerializeable {
|
|
|
1053
1079
|
}
|
|
1054
1080
|
__decorate([
|
|
1055
1081
|
nameForSerialization('size')
|
|
1056
|
-
], SizeWithAspect.prototype, "_size",
|
|
1082
|
+
], SizeWithAspect.prototype, "_size", undefined);
|
|
1057
1083
|
__decorate([
|
|
1058
1084
|
nameForSerialization('aspect')
|
|
1059
|
-
], SizeWithAspect.prototype, "_aspect",
|
|
1085
|
+
], SizeWithAspect.prototype, "_aspect", undefined);
|
|
1060
1086
|
|
|
1061
1087
|
class SizeWithUnit extends DefaultSerializeable {
|
|
1062
1088
|
get width() {
|
|
@@ -1073,10 +1099,10 @@ class SizeWithUnit extends DefaultSerializeable {
|
|
|
1073
1099
|
}
|
|
1074
1100
|
__decorate([
|
|
1075
1101
|
nameForSerialization('width')
|
|
1076
|
-
], SizeWithUnit.prototype, "_width",
|
|
1102
|
+
], SizeWithUnit.prototype, "_width", undefined);
|
|
1077
1103
|
__decorate([
|
|
1078
1104
|
nameForSerialization('height')
|
|
1079
|
-
], SizeWithUnit.prototype, "_height",
|
|
1105
|
+
], SizeWithUnit.prototype, "_height", undefined);
|
|
1080
1106
|
|
|
1081
1107
|
var SizingMode;
|
|
1082
1108
|
(function (SizingMode) {
|
|
@@ -1181,16 +1207,16 @@ class SizeWithUnitAndAspect {
|
|
|
1181
1207
|
}
|
|
1182
1208
|
__decorate([
|
|
1183
1209
|
nameForSerialization('widthAndHeight')
|
|
1184
|
-
], SizeWithUnitAndAspect.prototype, "_widthAndHeight",
|
|
1210
|
+
], SizeWithUnitAndAspect.prototype, "_widthAndHeight", undefined);
|
|
1185
1211
|
__decorate([
|
|
1186
1212
|
nameForSerialization('widthAndAspectRatio')
|
|
1187
|
-
], SizeWithUnitAndAspect.prototype, "_widthAndAspectRatio",
|
|
1213
|
+
], SizeWithUnitAndAspect.prototype, "_widthAndAspectRatio", undefined);
|
|
1188
1214
|
__decorate([
|
|
1189
1215
|
nameForSerialization('heightAndAspectRatio')
|
|
1190
|
-
], SizeWithUnitAndAspect.prototype, "_heightAndAspectRatio",
|
|
1216
|
+
], SizeWithUnitAndAspect.prototype, "_heightAndAspectRatio", undefined);
|
|
1191
1217
|
__decorate([
|
|
1192
1218
|
nameForSerialization('shorterDimensionAndAspectRatio')
|
|
1193
|
-
], SizeWithUnitAndAspect.prototype, "_shorterDimensionAndAspectRatio",
|
|
1219
|
+
], SizeWithUnitAndAspect.prototype, "_shorterDimensionAndAspectRatio", undefined);
|
|
1194
1220
|
|
|
1195
1221
|
class MarginsWithUnit extends DefaultSerializeable {
|
|
1196
1222
|
get left() {
|
|
@@ -1221,16 +1247,16 @@ class MarginsWithUnit extends DefaultSerializeable {
|
|
|
1221
1247
|
}
|
|
1222
1248
|
__decorate([
|
|
1223
1249
|
nameForSerialization('left')
|
|
1224
|
-
], MarginsWithUnit.prototype, "_left",
|
|
1250
|
+
], MarginsWithUnit.prototype, "_left", undefined);
|
|
1225
1251
|
__decorate([
|
|
1226
1252
|
nameForSerialization('right')
|
|
1227
|
-
], MarginsWithUnit.prototype, "_right",
|
|
1253
|
+
], MarginsWithUnit.prototype, "_right", undefined);
|
|
1228
1254
|
__decorate([
|
|
1229
1255
|
nameForSerialization('top')
|
|
1230
|
-
], MarginsWithUnit.prototype, "_top",
|
|
1256
|
+
], MarginsWithUnit.prototype, "_top", undefined);
|
|
1231
1257
|
__decorate([
|
|
1232
1258
|
nameForSerialization('bottom')
|
|
1233
|
-
], MarginsWithUnit.prototype, "_bottom",
|
|
1259
|
+
], MarginsWithUnit.prototype, "_bottom", undefined);
|
|
1234
1260
|
|
|
1235
1261
|
class Color {
|
|
1236
1262
|
get redComponent() {
|
|
@@ -1334,6 +1360,9 @@ class Brush extends DefaultSerializeable {
|
|
|
1334
1360
|
this.fill = { color: fillColor };
|
|
1335
1361
|
this.stroke = { color: strokeColor, width: strokeWidth };
|
|
1336
1362
|
}
|
|
1363
|
+
static fromJSON(brushJson) {
|
|
1364
|
+
return new Brush(Color.fromHex(brushJson.fillColor), Color.fromHex(brushJson.strokeColor), brushJson.strokeWidth);
|
|
1365
|
+
}
|
|
1337
1366
|
}
|
|
1338
1367
|
|
|
1339
1368
|
var Anchor;
|
|
@@ -1401,7 +1430,7 @@ class Observable extends DefaultSerializeable {
|
|
|
1401
1430
|
}
|
|
1402
1431
|
__decorate([
|
|
1403
1432
|
ignoreFromSerialization
|
|
1404
|
-
], Observable.prototype, "listeners",
|
|
1433
|
+
], Observable.prototype, "listeners", undefined);
|
|
1405
1434
|
|
|
1406
1435
|
class HtmlElementPosition {
|
|
1407
1436
|
constructor(top, left) {
|
|
@@ -1444,8 +1473,8 @@ class HTMLElementState {
|
|
|
1444
1473
|
var _a, _b, _c, _d;
|
|
1445
1474
|
if (!other)
|
|
1446
1475
|
return true;
|
|
1447
|
-
const positionChanged = (_b = (_a = this.position) === null || _a ===
|
|
1448
|
-
const sizeChanged = (_d = (_c = this.size) === null || _c ===
|
|
1476
|
+
const positionChanged = (_b = (_a = this.position) === null || _a === undefined ? undefined : _a.didChangeComparedTo(other.position)) !== null && _b !== undefined ? _b : (this.position !== other.position);
|
|
1477
|
+
const sizeChanged = (_d = (_c = this.size) === null || _c === undefined ? undefined : _c.didChangeComparedTo(other.size)) !== null && _d !== undefined ? _d : (this.size !== other.size);
|
|
1449
1478
|
return positionChanged || sizeChanged || this.shouldBeUnderContent !== other.shouldBeUnderContent;
|
|
1450
1479
|
}
|
|
1451
1480
|
}
|
|
@@ -1461,7 +1490,7 @@ class ImageFrameSourceController {
|
|
|
1461
1490
|
this._proxy = FactoryMaker.getInstance('ImageFrameSourceProxy');
|
|
1462
1491
|
}
|
|
1463
1492
|
getCurrentState() {
|
|
1464
|
-
return __awaiter(this,
|
|
1493
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
1465
1494
|
const result = yield this._proxy.getCurrentCameraState(this.imageFrameSource.position);
|
|
1466
1495
|
if (result == null) {
|
|
1467
1496
|
return FrameSourceState.Off;
|
|
@@ -1475,7 +1504,7 @@ class ImageFrameSourceController {
|
|
|
1475
1504
|
subscribeListener() {
|
|
1476
1505
|
var _a, _b;
|
|
1477
1506
|
this._proxy.registerListenerForEvents();
|
|
1478
|
-
(_b = (_a = this._proxy).subscribeDidChangeState) === null || _b ===
|
|
1507
|
+
(_b = (_a = this._proxy).subscribeDidChangeState) === null || _b === undefined ? undefined : _b.call(_a);
|
|
1479
1508
|
this.eventEmitter.on(FrameSourceListenerEvents.didChangeState, (data) => {
|
|
1480
1509
|
const event = EventDataParser.parse(data);
|
|
1481
1510
|
if (event === null) {
|
|
@@ -1566,19 +1595,19 @@ class ImageFrameSource extends DefaultSerializeable {
|
|
|
1566
1595
|
}
|
|
1567
1596
|
__decorate([
|
|
1568
1597
|
nameForSerialization('id')
|
|
1569
|
-
], ImageFrameSource.prototype, "_id",
|
|
1598
|
+
], ImageFrameSource.prototype, "_id", undefined);
|
|
1570
1599
|
__decorate([
|
|
1571
1600
|
nameForSerialization('desiredState')
|
|
1572
|
-
], ImageFrameSource.prototype, "_desiredState",
|
|
1601
|
+
], ImageFrameSource.prototype, "_desiredState", undefined);
|
|
1573
1602
|
__decorate([
|
|
1574
1603
|
ignoreFromSerialization
|
|
1575
|
-
], ImageFrameSource.prototype, "listeners",
|
|
1604
|
+
], ImageFrameSource.prototype, "listeners", undefined);
|
|
1576
1605
|
__decorate([
|
|
1577
1606
|
ignoreFromSerialization
|
|
1578
|
-
], ImageFrameSource.prototype, "_context",
|
|
1607
|
+
], ImageFrameSource.prototype, "_context", undefined);
|
|
1579
1608
|
__decorate([
|
|
1580
1609
|
ignoreFromSerialization
|
|
1581
|
-
], ImageFrameSource.prototype, "controller",
|
|
1610
|
+
], ImageFrameSource.prototype, "controller", undefined);
|
|
1582
1611
|
|
|
1583
1612
|
class PrivateFrameData {
|
|
1584
1613
|
get imageBuffers() {
|
|
@@ -1623,7 +1652,7 @@ class CameraController {
|
|
|
1623
1652
|
return this.camera;
|
|
1624
1653
|
}
|
|
1625
1654
|
static getFrame(frameId) {
|
|
1626
|
-
return __awaiter(this,
|
|
1655
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
1627
1656
|
const result = yield CameraController._proxy.getFrame(frameId);
|
|
1628
1657
|
if (result == null) {
|
|
1629
1658
|
return PrivateFrameData.empty();
|
|
@@ -1633,7 +1662,7 @@ class CameraController {
|
|
|
1633
1662
|
});
|
|
1634
1663
|
}
|
|
1635
1664
|
static getFrameOrNull(frameId) {
|
|
1636
|
-
return __awaiter(this,
|
|
1665
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
1637
1666
|
const result = yield CameraController._proxy.getFrame(frameId);
|
|
1638
1667
|
if (result == null) {
|
|
1639
1668
|
return null;
|
|
@@ -1643,7 +1672,7 @@ class CameraController {
|
|
|
1643
1672
|
});
|
|
1644
1673
|
}
|
|
1645
1674
|
getCurrentState() {
|
|
1646
|
-
return __awaiter(this,
|
|
1675
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
1647
1676
|
const result = yield CameraController._proxy.getCurrentCameraState(this.privateCamera.position);
|
|
1648
1677
|
if (result == null) {
|
|
1649
1678
|
return FrameSourceState.Off;
|
|
@@ -1652,7 +1681,7 @@ class CameraController {
|
|
|
1652
1681
|
});
|
|
1653
1682
|
}
|
|
1654
1683
|
getIsTorchAvailable() {
|
|
1655
|
-
return __awaiter(this,
|
|
1684
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
1656
1685
|
const result = yield CameraController._proxy.isTorchAvailable(this.privateCamera.position);
|
|
1657
1686
|
if (result == null) {
|
|
1658
1687
|
return false;
|
|
@@ -1666,13 +1695,13 @@ class CameraController {
|
|
|
1666
1695
|
subscribeListener() {
|
|
1667
1696
|
var _a, _b;
|
|
1668
1697
|
CameraController._proxy.registerListenerForCameraEvents();
|
|
1669
|
-
(_b = (_a = CameraController._proxy).subscribeDidChangeState) === null || _b ===
|
|
1698
|
+
(_b = (_a = CameraController._proxy).subscribeDidChangeState) === null || _b === undefined ? undefined : _b.call(_a);
|
|
1670
1699
|
this.eventEmitter.on(FrameSourceListenerEvents.didChangeState, (data) => {
|
|
1671
1700
|
const event = EventDataParser.parse(data);
|
|
1672
1701
|
if (event) {
|
|
1673
1702
|
this.privateCamera.listeners.forEach(listener => {
|
|
1674
1703
|
var _a;
|
|
1675
|
-
(_a = listener === null || listener ===
|
|
1704
|
+
(_a = listener === null || listener === undefined ? undefined : listener.didChangeState) === null || _a === undefined ? undefined : _a.call(listener, this.camera, event.state);
|
|
1676
1705
|
});
|
|
1677
1706
|
}
|
|
1678
1707
|
});
|
|
@@ -1804,7 +1833,7 @@ class Camera extends DefaultSerializeable {
|
|
|
1804
1833
|
return this.didChange();
|
|
1805
1834
|
}
|
|
1806
1835
|
didChange() {
|
|
1807
|
-
return __awaiter(this,
|
|
1836
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
1808
1837
|
if (this.context) {
|
|
1809
1838
|
yield this.context.update();
|
|
1810
1839
|
}
|
|
@@ -1813,22 +1842,22 @@ class Camera extends DefaultSerializeable {
|
|
|
1813
1842
|
}
|
|
1814
1843
|
__decorate([
|
|
1815
1844
|
serializationDefault({})
|
|
1816
|
-
], Camera.prototype, "settings",
|
|
1845
|
+
], Camera.prototype, "settings", undefined);
|
|
1817
1846
|
__decorate([
|
|
1818
1847
|
nameForSerialization('desiredTorchState')
|
|
1819
|
-
], Camera.prototype, "_desiredTorchState",
|
|
1848
|
+
], Camera.prototype, "_desiredTorchState", undefined);
|
|
1820
1849
|
__decorate([
|
|
1821
1850
|
ignoreFromSerialization
|
|
1822
|
-
], Camera.prototype, "_desiredState",
|
|
1851
|
+
], Camera.prototype, "_desiredState", undefined);
|
|
1823
1852
|
__decorate([
|
|
1824
1853
|
ignoreFromSerialization
|
|
1825
|
-
], Camera.prototype, "listeners",
|
|
1854
|
+
], Camera.prototype, "listeners", undefined);
|
|
1826
1855
|
__decorate([
|
|
1827
1856
|
ignoreFromSerialization
|
|
1828
|
-
], Camera.prototype, "_context",
|
|
1857
|
+
], Camera.prototype, "_context", undefined);
|
|
1829
1858
|
__decorate([
|
|
1830
1859
|
ignoreFromSerialization
|
|
1831
|
-
], Camera.prototype, "controller",
|
|
1860
|
+
], Camera.prototype, "controller", undefined);
|
|
1832
1861
|
__decorate([
|
|
1833
1862
|
ignoreFromSerialization
|
|
1834
1863
|
], Camera, "coreDefaults", null);
|
|
@@ -1858,11 +1887,11 @@ class ControlImage extends DefaultSerializeable {
|
|
|
1858
1887
|
__decorate([
|
|
1859
1888
|
ignoreFromSerializationIfNull,
|
|
1860
1889
|
nameForSerialization('data')
|
|
1861
|
-
], ControlImage.prototype, "_data",
|
|
1890
|
+
], ControlImage.prototype, "_data", undefined);
|
|
1862
1891
|
__decorate([
|
|
1863
1892
|
ignoreFromSerializationIfNull,
|
|
1864
1893
|
nameForSerialization('name')
|
|
1865
|
-
], ControlImage.prototype, "_name",
|
|
1894
|
+
], ControlImage.prototype, "_name", undefined);
|
|
1866
1895
|
|
|
1867
1896
|
class ContextStatus {
|
|
1868
1897
|
static fromJSON(json) {
|
|
@@ -1922,23 +1951,15 @@ class DataCaptureContextController {
|
|
|
1922
1951
|
static forDataCaptureContext(context) {
|
|
1923
1952
|
const controller = new DataCaptureContextController();
|
|
1924
1953
|
controller.context = context;
|
|
1925
|
-
controller.initialize();
|
|
1926
1954
|
return controller;
|
|
1927
1955
|
}
|
|
1928
|
-
static forDataCaptureContextAsync(context) {
|
|
1929
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1930
|
-
const controller = new DataCaptureContextController();
|
|
1931
|
-
controller.context = context;
|
|
1932
|
-
yield controller.initialize();
|
|
1933
|
-
return controller;
|
|
1934
|
-
});
|
|
1935
|
-
}
|
|
1936
1956
|
constructor() {
|
|
1957
|
+
this._listenerRegistered = false;
|
|
1937
1958
|
this._proxy = FactoryMaker.getInstance('DataCaptureContextProxy');
|
|
1938
1959
|
this.eventEmitter = FactoryMaker.getInstance('EventEmitter');
|
|
1939
1960
|
}
|
|
1940
1961
|
updateContextFromJSON() {
|
|
1941
|
-
return __awaiter(this,
|
|
1962
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
1942
1963
|
try {
|
|
1943
1964
|
yield this._proxy.updateContextFromJSON(JSON.stringify(this.context.toJSON()));
|
|
1944
1965
|
}
|
|
@@ -1971,7 +1992,7 @@ class DataCaptureContextController {
|
|
|
1971
1992
|
return this.initializeContextFromJSON();
|
|
1972
1993
|
}
|
|
1973
1994
|
initializeContextFromJSON() {
|
|
1974
|
-
return __awaiter(this,
|
|
1995
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
1975
1996
|
try {
|
|
1976
1997
|
yield this._proxy.contextFromJSON(JSON.stringify(this.context.toJSON()));
|
|
1977
1998
|
}
|
|
@@ -1982,7 +2003,7 @@ class DataCaptureContextController {
|
|
|
1982
2003
|
});
|
|
1983
2004
|
}
|
|
1984
2005
|
static getOpenSourceSoftwareLicenseInfo() {
|
|
1985
|
-
return __awaiter(this,
|
|
2006
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
1986
2007
|
const proxy = FactoryMaker.getInstance('DataCaptureContextProxy');
|
|
1987
2008
|
const result = yield proxy.getOpenSourceSoftwareLicenseInfo();
|
|
1988
2009
|
return new OpenSourceSoftwareLicenseInfo(result.data);
|
|
@@ -1990,9 +2011,12 @@ class DataCaptureContextController {
|
|
|
1990
2011
|
}
|
|
1991
2012
|
subscribeListener() {
|
|
1992
2013
|
var _a, _b, _c, _d;
|
|
2014
|
+
if (this._listenerRegistered) {
|
|
2015
|
+
return;
|
|
2016
|
+
}
|
|
1993
2017
|
this._proxy.registerListenerForDataCaptureContext();
|
|
1994
|
-
(_b = (_a = this._proxy).subscribeDidChangeStatus) === null || _b ===
|
|
1995
|
-
(_d = (_c = this._proxy).subscribeDidStartObservingContext) === null || _d ===
|
|
2018
|
+
(_b = (_a = this._proxy).subscribeDidChangeStatus) === null || _b === undefined ? undefined : _b.call(_a);
|
|
2019
|
+
(_d = (_c = this._proxy).subscribeDidStartObservingContext) === null || _d === undefined ? undefined : _d.call(_c);
|
|
1996
2020
|
this.eventEmitter.on(DataCaptureContextEvents.didChangeStatus, (data) => {
|
|
1997
2021
|
const event = EventDataParser.parse(data);
|
|
1998
2022
|
if (event === null) {
|
|
@@ -2005,9 +2029,10 @@ class DataCaptureContextController {
|
|
|
2005
2029
|
this.eventEmitter.on(DataCaptureContextEvents.didStartObservingContext, () => {
|
|
2006
2030
|
this.privateContext.listeners.forEach(listener => {
|
|
2007
2031
|
var _a;
|
|
2008
|
-
(_a = listener.didStartObservingContext) === null || _a ===
|
|
2032
|
+
(_a = listener.didStartObservingContext) === null || _a === undefined ? undefined : _a.call(listener, this.context);
|
|
2009
2033
|
});
|
|
2010
2034
|
});
|
|
2035
|
+
this._listenerRegistered = true;
|
|
2011
2036
|
}
|
|
2012
2037
|
notifyListenersOfDeserializationError(error) {
|
|
2013
2038
|
const contextStatus = ContextStatus
|
|
@@ -2028,6 +2053,12 @@ class DataCaptureContextController {
|
|
|
2028
2053
|
}
|
|
2029
2054
|
|
|
2030
2055
|
class DataCaptureContext extends DefaultSerializeable {
|
|
2056
|
+
static get sharedInstance() {
|
|
2057
|
+
if (DataCaptureContext._instance == null) {
|
|
2058
|
+
DataCaptureContext._instance = new DataCaptureContext('', '', null);
|
|
2059
|
+
}
|
|
2060
|
+
return DataCaptureContext._instance;
|
|
2061
|
+
}
|
|
2031
2062
|
static get coreDefaults() {
|
|
2032
2063
|
return getCoreDefaults();
|
|
2033
2064
|
}
|
|
@@ -2045,22 +2076,33 @@ class DataCaptureContext extends DefaultSerializeable {
|
|
|
2045
2076
|
return DataCaptureContext.deviceID;
|
|
2046
2077
|
}
|
|
2047
2078
|
static forLicenseKey(licenseKey) {
|
|
2048
|
-
|
|
2079
|
+
const instance = DataCaptureContext.create(licenseKey, null, null);
|
|
2080
|
+
// Call initialize to ensure the shared instance is updated.
|
|
2081
|
+
instance.controller.initialize();
|
|
2082
|
+
return instance;
|
|
2049
2083
|
}
|
|
2050
2084
|
static forLicenseKeyWithSettings(licenseKey, settings) {
|
|
2051
|
-
|
|
2085
|
+
const instance = DataCaptureContext.create(licenseKey, null, settings);
|
|
2086
|
+
// Call initialize to ensure the shared instance is updated.
|
|
2087
|
+
instance.controller.initialize();
|
|
2088
|
+
return instance;
|
|
2052
2089
|
}
|
|
2053
2090
|
static forLicenseKeyWithOptions(licenseKey, options) {
|
|
2054
|
-
|
|
2091
|
+
const instance = DataCaptureContext.create(licenseKey, options, null);
|
|
2092
|
+
// Call initialize to ensure the shared instance is updated.
|
|
2093
|
+
instance.controller.initialize();
|
|
2094
|
+
return instance;
|
|
2095
|
+
}
|
|
2096
|
+
static initialize(licenseKey, options = null, settings = null) {
|
|
2097
|
+
DataCaptureContext.create(licenseKey, options, settings);
|
|
2098
|
+
DataCaptureContext.sharedInstance.controller.initialize();
|
|
2099
|
+
return DataCaptureContext.sharedInstance;
|
|
2055
2100
|
}
|
|
2056
2101
|
static create(licenseKey, options, settings) {
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
DataCaptureContext.instance = new DataCaptureContext(licenseKey, options.deviceName || '', settings);
|
|
2062
|
-
}
|
|
2063
|
-
return DataCaptureContext.instance;
|
|
2102
|
+
DataCaptureContext.sharedInstance.licenseKey = licenseKey;
|
|
2103
|
+
DataCaptureContext.sharedInstance.deviceName = (options === null || options === undefined ? undefined : options.deviceName) || '';
|
|
2104
|
+
DataCaptureContext.sharedInstance.settings = settings || new DataCaptureContextSettings();
|
|
2105
|
+
return DataCaptureContext.sharedInstance;
|
|
2064
2106
|
}
|
|
2065
2107
|
constructor(licenseKey, deviceName, settings) {
|
|
2066
2108
|
super();
|
|
@@ -2073,10 +2115,14 @@ class DataCaptureContext extends DefaultSerializeable {
|
|
|
2073
2115
|
this.view = null;
|
|
2074
2116
|
this.modes = [];
|
|
2075
2117
|
this.listeners = [];
|
|
2118
|
+
this.licenseKey = licenseKey;
|
|
2119
|
+
this.deviceName = deviceName;
|
|
2076
2120
|
if (settings) {
|
|
2077
2121
|
this.settings = settings;
|
|
2078
2122
|
}
|
|
2079
|
-
this.
|
|
2123
|
+
if (this.controller == null) {
|
|
2124
|
+
this.controller = DataCaptureContextController.forDataCaptureContext(this);
|
|
2125
|
+
}
|
|
2080
2126
|
}
|
|
2081
2127
|
setFrameSource(frameSource) {
|
|
2082
2128
|
if (this._frameSource) {
|
|
@@ -2107,6 +2153,17 @@ class DataCaptureContext extends DefaultSerializeable {
|
|
|
2107
2153
|
this.controller.addModeToContext(mode);
|
|
2108
2154
|
}
|
|
2109
2155
|
}
|
|
2156
|
+
setMode(mode) {
|
|
2157
|
+
if (this.modes.length > 0) {
|
|
2158
|
+
this.removeAllModes();
|
|
2159
|
+
}
|
|
2160
|
+
this.addMode(mode);
|
|
2161
|
+
}
|
|
2162
|
+
removeCurrentMode() {
|
|
2163
|
+
if (this.modes.length > 0) {
|
|
2164
|
+
this.removeMode(this.modes[0]);
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2110
2167
|
removeMode(mode) {
|
|
2111
2168
|
if (this.modes.includes(mode)) {
|
|
2112
2169
|
this.modes.splice(this.modes.indexOf(mode), 1);
|
|
@@ -2126,8 +2183,7 @@ class DataCaptureContext extends DefaultSerializeable {
|
|
|
2126
2183
|
if (!this.controller) {
|
|
2127
2184
|
return;
|
|
2128
2185
|
}
|
|
2129
|
-
|
|
2130
|
-
(_a = this.view) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
2186
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.dispose();
|
|
2131
2187
|
this.removeAllModes();
|
|
2132
2188
|
this.controller.dispose();
|
|
2133
2189
|
}
|
|
@@ -2136,25 +2192,10 @@ class DataCaptureContext extends DefaultSerializeable {
|
|
|
2136
2192
|
return this.update();
|
|
2137
2193
|
}
|
|
2138
2194
|
static getOpenSourceSoftwareLicenseInfo() {
|
|
2139
|
-
return __awaiter(this,
|
|
2195
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
2140
2196
|
return DataCaptureContextController.getOpenSourceSoftwareLicenseInfo();
|
|
2141
2197
|
});
|
|
2142
2198
|
}
|
|
2143
|
-
// Called when the capture view is shown, that is the earliest point that we need the context deserialized.
|
|
2144
|
-
initialize() {
|
|
2145
|
-
if (this.controller) {
|
|
2146
|
-
return;
|
|
2147
|
-
}
|
|
2148
|
-
this.controller = DataCaptureContextController.forDataCaptureContext(this);
|
|
2149
|
-
}
|
|
2150
|
-
initializeAsync() {
|
|
2151
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
2152
|
-
if (this.controller) {
|
|
2153
|
-
return;
|
|
2154
|
-
}
|
|
2155
|
-
this.controller = yield DataCaptureContextController.forDataCaptureContextAsync(this);
|
|
2156
|
-
});
|
|
2157
|
-
}
|
|
2158
2199
|
update() {
|
|
2159
2200
|
if (!this.controller) {
|
|
2160
2201
|
return Promise.resolve();
|
|
@@ -2162,28 +2203,30 @@ class DataCaptureContext extends DefaultSerializeable {
|
|
|
2162
2203
|
return this.controller.updateContextFromJSON();
|
|
2163
2204
|
}
|
|
2164
2205
|
}
|
|
2165
|
-
DataCaptureContext.instance = null;
|
|
2166
2206
|
__decorate([
|
|
2167
2207
|
ignoreFromSerialization
|
|
2168
|
-
], DataCaptureContext.prototype, "controller",
|
|
2208
|
+
], DataCaptureContext.prototype, "controller", undefined);
|
|
2169
2209
|
__decorate([
|
|
2170
2210
|
nameForSerialization('framework')
|
|
2171
|
-
], DataCaptureContext.prototype, "_framework",
|
|
2211
|
+
], DataCaptureContext.prototype, "_framework", undefined);
|
|
2172
2212
|
__decorate([
|
|
2173
2213
|
nameForSerialization('frameworkVersion')
|
|
2174
|
-
], DataCaptureContext.prototype, "_frameworkVersion",
|
|
2214
|
+
], DataCaptureContext.prototype, "_frameworkVersion", undefined);
|
|
2175
2215
|
__decorate([
|
|
2176
2216
|
nameForSerialization('frameSource')
|
|
2177
|
-
], DataCaptureContext.prototype, "_frameSource",
|
|
2217
|
+
], DataCaptureContext.prototype, "_frameSource", undefined);
|
|
2218
|
+
__decorate([
|
|
2219
|
+
ignoreFromSerialization
|
|
2220
|
+
], DataCaptureContext.prototype, "view", undefined);
|
|
2178
2221
|
__decorate([
|
|
2179
2222
|
ignoreFromSerialization
|
|
2180
|
-
], DataCaptureContext.prototype, "
|
|
2223
|
+
], DataCaptureContext.prototype, "modes", undefined);
|
|
2181
2224
|
__decorate([
|
|
2182
2225
|
ignoreFromSerialization
|
|
2183
|
-
], DataCaptureContext.prototype, "
|
|
2226
|
+
], DataCaptureContext.prototype, "listeners", undefined);
|
|
2184
2227
|
__decorate([
|
|
2185
2228
|
ignoreFromSerialization
|
|
2186
|
-
], DataCaptureContext
|
|
2229
|
+
], DataCaptureContext, "_instance", undefined);
|
|
2187
2230
|
__decorate([
|
|
2188
2231
|
ignoreFromSerialization
|
|
2189
2232
|
], DataCaptureContext, "coreDefaults", null);
|
|
@@ -2216,13 +2259,13 @@ class DataCaptureViewController extends BaseController {
|
|
|
2216
2259
|
super('DataCaptureViewProxy');
|
|
2217
2260
|
}
|
|
2218
2261
|
viewPointForFramePoint(point) {
|
|
2219
|
-
return __awaiter(this,
|
|
2262
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
2220
2263
|
const result = yield this._proxy.viewPointForFramePoint(JSON.stringify(point.toJSON()));
|
|
2221
2264
|
return Point.fromJSON(JSON.parse(result.data));
|
|
2222
2265
|
});
|
|
2223
2266
|
}
|
|
2224
2267
|
viewQuadrilateralForFrameQuadrilateral(quadrilateral) {
|
|
2225
|
-
return __awaiter(this,
|
|
2268
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
2226
2269
|
const result = yield this._proxy.viewQuadrilateralForFrameQuadrilateral(JSON.stringify(quadrilateral.toJSON()));
|
|
2227
2270
|
return Quadrilateral.fromJSON(JSON.parse(result.data));
|
|
2228
2271
|
});
|
|
@@ -2237,7 +2280,7 @@ class DataCaptureViewController extends BaseController {
|
|
|
2237
2280
|
return this._proxy.hide();
|
|
2238
2281
|
}
|
|
2239
2282
|
createNativeView() {
|
|
2240
|
-
return __awaiter(this,
|
|
2283
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
2241
2284
|
yield this.createView();
|
|
2242
2285
|
this.subscribeListener();
|
|
2243
2286
|
});
|
|
@@ -2257,7 +2300,7 @@ class DataCaptureViewController extends BaseController {
|
|
|
2257
2300
|
subscribeListener() {
|
|
2258
2301
|
var _a, _b;
|
|
2259
2302
|
this._proxy.registerListenerForViewEvents();
|
|
2260
|
-
(_b = (_a = this._proxy).subscribeDidChangeSize) === null || _b ===
|
|
2303
|
+
(_b = (_a = this._proxy).subscribeDidChangeSize) === null || _b === undefined ? undefined : _b.call(_a);
|
|
2261
2304
|
this.eventEmitter.on(DataCaptureViewEvents.didChangeSize, (data) => {
|
|
2262
2305
|
const event = EventDataParser.parse(data);
|
|
2263
2306
|
if (event === null) {
|
|
@@ -2357,6 +2400,7 @@ class BaseDataCaptureView extends DefaultSerializeable {
|
|
|
2357
2400
|
constructor(autoCreateNativeView) {
|
|
2358
2401
|
super();
|
|
2359
2402
|
this._context = null;
|
|
2403
|
+
this.viewId = null;
|
|
2360
2404
|
this.overlays = [];
|
|
2361
2405
|
this.controls = [];
|
|
2362
2406
|
this.listeners = [];
|
|
@@ -2429,7 +2473,7 @@ class BaseDataCaptureView extends DefaultSerializeable {
|
|
|
2429
2473
|
this.controller.updateView();
|
|
2430
2474
|
}
|
|
2431
2475
|
createNativeView() {
|
|
2432
|
-
return __awaiter(this,
|
|
2476
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
2433
2477
|
if (this.isViewCreated) {
|
|
2434
2478
|
return Promise.resolve();
|
|
2435
2479
|
}
|
|
@@ -2438,7 +2482,7 @@ class BaseDataCaptureView extends DefaultSerializeable {
|
|
|
2438
2482
|
});
|
|
2439
2483
|
}
|
|
2440
2484
|
removeNativeView() {
|
|
2441
|
-
return __awaiter(this,
|
|
2485
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
2442
2486
|
if (!this.isViewCreated) {
|
|
2443
2487
|
return Promise.resolve();
|
|
2444
2488
|
}
|
|
@@ -2463,7 +2507,6 @@ class BaseDataCaptureView extends DefaultSerializeable {
|
|
|
2463
2507
|
if (!this.context) {
|
|
2464
2508
|
throw new Error('There should be a context attached to a view that should be shown');
|
|
2465
2509
|
}
|
|
2466
|
-
this.privateContext.initialize();
|
|
2467
2510
|
return this.controller.show();
|
|
2468
2511
|
}
|
|
2469
2512
|
hide() {
|
|
@@ -2475,43 +2518,46 @@ class BaseDataCaptureView extends DefaultSerializeable {
|
|
|
2475
2518
|
}
|
|
2476
2519
|
__decorate([
|
|
2477
2520
|
ignoreFromSerialization
|
|
2478
|
-
], BaseDataCaptureView.prototype, "_context",
|
|
2521
|
+
], BaseDataCaptureView.prototype, "_context", undefined);
|
|
2479
2522
|
__decorate([
|
|
2480
2523
|
ignoreFromSerialization
|
|
2481
|
-
], BaseDataCaptureView.prototype, "viewComponent",
|
|
2524
|
+
], BaseDataCaptureView.prototype, "viewComponent", undefined);
|
|
2482
2525
|
__decorate([
|
|
2483
2526
|
ignoreFromSerialization
|
|
2484
2527
|
], BaseDataCaptureView.prototype, "coreDefaults", null);
|
|
2485
2528
|
__decorate([
|
|
2486
2529
|
nameForSerialization('scanAreaMargins')
|
|
2487
|
-
], BaseDataCaptureView.prototype, "_scanAreaMargins",
|
|
2530
|
+
], BaseDataCaptureView.prototype, "_scanAreaMargins", undefined);
|
|
2531
|
+
__decorate([
|
|
2532
|
+
ignoreFromSerializationIfNull
|
|
2533
|
+
], BaseDataCaptureView.prototype, "viewId", undefined);
|
|
2488
2534
|
__decorate([
|
|
2489
2535
|
nameForSerialization('pointOfInterest')
|
|
2490
|
-
], BaseDataCaptureView.prototype, "_pointOfInterest",
|
|
2536
|
+
], BaseDataCaptureView.prototype, "_pointOfInterest", undefined);
|
|
2491
2537
|
__decorate([
|
|
2492
2538
|
nameForSerialization('logoAnchor')
|
|
2493
|
-
], BaseDataCaptureView.prototype, "_logoAnchor",
|
|
2539
|
+
], BaseDataCaptureView.prototype, "_logoAnchor", undefined);
|
|
2494
2540
|
__decorate([
|
|
2495
2541
|
nameForSerialization('logoOffset')
|
|
2496
|
-
], BaseDataCaptureView.prototype, "_logoOffset",
|
|
2542
|
+
], BaseDataCaptureView.prototype, "_logoOffset", undefined);
|
|
2497
2543
|
__decorate([
|
|
2498
2544
|
nameForSerialization('focusGesture')
|
|
2499
|
-
], BaseDataCaptureView.prototype, "_focusGesture",
|
|
2545
|
+
], BaseDataCaptureView.prototype, "_focusGesture", undefined);
|
|
2500
2546
|
__decorate([
|
|
2501
2547
|
nameForSerialization('zoomGesture')
|
|
2502
|
-
], BaseDataCaptureView.prototype, "_zoomGesture",
|
|
2548
|
+
], BaseDataCaptureView.prototype, "_zoomGesture", undefined);
|
|
2503
2549
|
__decorate([
|
|
2504
2550
|
nameForSerialization('logoStyle')
|
|
2505
|
-
], BaseDataCaptureView.prototype, "_logoStyle",
|
|
2551
|
+
], BaseDataCaptureView.prototype, "_logoStyle", undefined);
|
|
2506
2552
|
__decorate([
|
|
2507
2553
|
ignoreFromSerialization
|
|
2508
|
-
], BaseDataCaptureView.prototype, "controller",
|
|
2554
|
+
], BaseDataCaptureView.prototype, "controller", undefined);
|
|
2509
2555
|
__decorate([
|
|
2510
2556
|
ignoreFromSerialization
|
|
2511
|
-
], BaseDataCaptureView.prototype, "listeners",
|
|
2557
|
+
], BaseDataCaptureView.prototype, "listeners", undefined);
|
|
2512
2558
|
__decorate([
|
|
2513
2559
|
ignoreFromSerialization
|
|
2514
|
-
], BaseDataCaptureView.prototype, "isViewCreated",
|
|
2560
|
+
], BaseDataCaptureView.prototype, "isViewCreated", undefined);
|
|
2515
2561
|
|
|
2516
2562
|
class ZoomSwitchControl extends DefaultSerializeable {
|
|
2517
2563
|
constructor() {
|
|
@@ -2527,76 +2573,76 @@ class ZoomSwitchControl extends DefaultSerializeable {
|
|
|
2527
2573
|
}
|
|
2528
2574
|
get zoomedOutImage() {
|
|
2529
2575
|
var _a, _b;
|
|
2530
|
-
if (((_a = this.icon.zoomedOut.default) === null || _a ===
|
|
2531
|
-
return (_b = this.icon.zoomedOut.default) === null || _b ===
|
|
2576
|
+
if (((_a = this.icon.zoomedOut.default) === null || _a === undefined ? undefined : _a.isBase64EncodedImage()) == true) {
|
|
2577
|
+
return (_b = this.icon.zoomedOut.default) === null || _b === undefined ? undefined : _b.data;
|
|
2532
2578
|
}
|
|
2533
2579
|
return null;
|
|
2534
2580
|
}
|
|
2535
2581
|
set zoomedOutImage(zoomedOutImage) {
|
|
2536
2582
|
var _a;
|
|
2537
2583
|
this.icon.zoomedOut.default = ControlImage.fromBase64EncodedImage(zoomedOutImage);
|
|
2538
|
-
(_a = this.view) === null || _a ===
|
|
2584
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2539
2585
|
}
|
|
2540
2586
|
get zoomedInImage() {
|
|
2541
2587
|
var _a, _b;
|
|
2542
|
-
if (((_a = this.icon.zoomedIn.default) === null || _a ===
|
|
2543
|
-
return (_b = this.icon.zoomedIn.default) === null || _b ===
|
|
2588
|
+
if (((_a = this.icon.zoomedIn.default) === null || _a === undefined ? undefined : _a.isBase64EncodedImage()) == true) {
|
|
2589
|
+
return (_b = this.icon.zoomedIn.default) === null || _b === undefined ? undefined : _b.data;
|
|
2544
2590
|
}
|
|
2545
2591
|
return null;
|
|
2546
2592
|
}
|
|
2547
2593
|
set zoomedInImage(zoomedInImage) {
|
|
2548
2594
|
var _a;
|
|
2549
2595
|
this.icon.zoomedIn.default = ControlImage.fromBase64EncodedImage(zoomedInImage);
|
|
2550
|
-
(_a = this.view) === null || _a ===
|
|
2596
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2551
2597
|
}
|
|
2552
2598
|
get zoomedInPressedImage() {
|
|
2553
2599
|
var _a, _b;
|
|
2554
|
-
if (((_a = this.icon.zoomedIn.pressed) === null || _a ===
|
|
2555
|
-
return (_b = this.icon.zoomedIn.pressed) === null || _b ===
|
|
2600
|
+
if (((_a = this.icon.zoomedIn.pressed) === null || _a === undefined ? undefined : _a.isBase64EncodedImage()) == true) {
|
|
2601
|
+
return (_b = this.icon.zoomedIn.pressed) === null || _b === undefined ? undefined : _b.data;
|
|
2556
2602
|
}
|
|
2557
2603
|
return null;
|
|
2558
2604
|
}
|
|
2559
2605
|
set zoomedInPressedImage(zoomedInPressedImage) {
|
|
2560
2606
|
var _a;
|
|
2561
2607
|
this.icon.zoomedIn.pressed = ControlImage.fromBase64EncodedImage(zoomedInPressedImage);
|
|
2562
|
-
(_a = this.view) === null || _a ===
|
|
2608
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2563
2609
|
}
|
|
2564
2610
|
get zoomedOutPressedImage() {
|
|
2565
2611
|
var _a, _b;
|
|
2566
|
-
if (((_a = this.icon.zoomedOut.pressed) === null || _a ===
|
|
2567
|
-
return (_b = this.icon.zoomedOut.pressed) === null || _b ===
|
|
2612
|
+
if (((_a = this.icon.zoomedOut.pressed) === null || _a === undefined ? undefined : _a.isBase64EncodedImage()) == true) {
|
|
2613
|
+
return (_b = this.icon.zoomedOut.pressed) === null || _b === undefined ? undefined : _b.data;
|
|
2568
2614
|
}
|
|
2569
2615
|
return null;
|
|
2570
2616
|
}
|
|
2571
2617
|
set zoomedOutPressedImage(zoomedOutPressedImage) {
|
|
2572
2618
|
var _a;
|
|
2573
2619
|
this.icon.zoomedOut.pressed = ControlImage.fromBase64EncodedImage(zoomedOutPressedImage);
|
|
2574
|
-
(_a = this.view) === null || _a ===
|
|
2620
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2575
2621
|
}
|
|
2576
2622
|
setZoomedInImage(resource) {
|
|
2577
2623
|
var _a;
|
|
2578
2624
|
this.icon.zoomedIn.default = ControlImage.fromResourceName(resource);
|
|
2579
|
-
(_a = this.view) === null || _a ===
|
|
2625
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2580
2626
|
}
|
|
2581
2627
|
setZoomedInPressedImage(resource) {
|
|
2582
2628
|
var _a;
|
|
2583
2629
|
this.icon.zoomedIn.pressed = ControlImage.fromResourceName(resource);
|
|
2584
|
-
(_a = this.view) === null || _a ===
|
|
2630
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2585
2631
|
}
|
|
2586
2632
|
setZoomedOutImage(resource) {
|
|
2587
2633
|
var _a;
|
|
2588
2634
|
this.icon.zoomedOut.default = ControlImage.fromResourceName(resource);
|
|
2589
|
-
(_a = this.view) === null || _a ===
|
|
2635
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2590
2636
|
}
|
|
2591
2637
|
setZoomedOutPressedImage(resource) {
|
|
2592
2638
|
var _a;
|
|
2593
2639
|
this.icon.zoomedOut.pressed = ControlImage.fromResourceName(resource);
|
|
2594
|
-
(_a = this.view) === null || _a ===
|
|
2640
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2595
2641
|
}
|
|
2596
2642
|
}
|
|
2597
2643
|
__decorate([
|
|
2598
2644
|
ignoreFromSerialization
|
|
2599
|
-
], ZoomSwitchControl.prototype, "view",
|
|
2645
|
+
], ZoomSwitchControl.prototype, "view", undefined);
|
|
2600
2646
|
|
|
2601
2647
|
class TorchSwitchControl extends DefaultSerializeable {
|
|
2602
2648
|
constructor() {
|
|
@@ -2612,66 +2658,66 @@ class TorchSwitchControl extends DefaultSerializeable {
|
|
|
2612
2658
|
}
|
|
2613
2659
|
get torchOffImage() {
|
|
2614
2660
|
var _a, _b;
|
|
2615
|
-
if (((_a = this.icon.off.default) === null || _a ===
|
|
2616
|
-
return (_b = this.icon.off.default) === null || _b ===
|
|
2661
|
+
if (((_a = this.icon.off.default) === null || _a === undefined ? undefined : _a.isBase64EncodedImage()) == true) {
|
|
2662
|
+
return (_b = this.icon.off.default) === null || _b === undefined ? undefined : _b.data;
|
|
2617
2663
|
}
|
|
2618
2664
|
return null;
|
|
2619
2665
|
}
|
|
2620
2666
|
set torchOffImage(torchOffImage) {
|
|
2621
2667
|
var _a;
|
|
2622
2668
|
this.icon.off.default = ControlImage.fromBase64EncodedImage(torchOffImage);
|
|
2623
|
-
(_a = this.view) === null || _a ===
|
|
2669
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2624
2670
|
}
|
|
2625
2671
|
get torchOffPressedImage() {
|
|
2626
2672
|
var _a, _b;
|
|
2627
|
-
if (((_a = this.icon.off.pressed) === null || _a ===
|
|
2628
|
-
return (_b = this.icon.off.pressed) === null || _b ===
|
|
2673
|
+
if (((_a = this.icon.off.pressed) === null || _a === undefined ? undefined : _a.isBase64EncodedImage()) == true) {
|
|
2674
|
+
return (_b = this.icon.off.pressed) === null || _b === undefined ? undefined : _b.data;
|
|
2629
2675
|
}
|
|
2630
2676
|
return null;
|
|
2631
2677
|
}
|
|
2632
2678
|
set torchOffPressedImage(torchOffPressedImage) {
|
|
2633
2679
|
var _a;
|
|
2634
2680
|
this.icon.off.pressed = ControlImage.fromBase64EncodedImage(torchOffPressedImage);
|
|
2635
|
-
(_a = this.view) === null || _a ===
|
|
2681
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2636
2682
|
}
|
|
2637
2683
|
get torchOnImage() {
|
|
2638
2684
|
var _a, _b;
|
|
2639
|
-
if (((_a = this.icon.on.default) === null || _a ===
|
|
2640
|
-
return (_b = this.icon.on.default) === null || _b ===
|
|
2685
|
+
if (((_a = this.icon.on.default) === null || _a === undefined ? undefined : _a.isBase64EncodedImage()) == true) {
|
|
2686
|
+
return (_b = this.icon.on.default) === null || _b === undefined ? undefined : _b.data;
|
|
2641
2687
|
}
|
|
2642
2688
|
return null;
|
|
2643
2689
|
}
|
|
2644
2690
|
set torchOnImage(torchOnImage) {
|
|
2645
2691
|
var _a;
|
|
2646
2692
|
this.icon.on.default = ControlImage.fromBase64EncodedImage(torchOnImage);
|
|
2647
|
-
(_a = this.view) === null || _a ===
|
|
2693
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2648
2694
|
}
|
|
2649
2695
|
get torchOnPressedImage() {
|
|
2650
2696
|
var _a, _b;
|
|
2651
|
-
if (((_a = this.icon.on.pressed) === null || _a ===
|
|
2652
|
-
return (_b = this.icon.on.pressed) === null || _b ===
|
|
2697
|
+
if (((_a = this.icon.on.pressed) === null || _a === undefined ? undefined : _a.isBase64EncodedImage()) == true) {
|
|
2698
|
+
return (_b = this.icon.on.pressed) === null || _b === undefined ? undefined : _b.data;
|
|
2653
2699
|
}
|
|
2654
2700
|
return null;
|
|
2655
2701
|
}
|
|
2656
2702
|
setTorchOffImage(resource) {
|
|
2657
2703
|
var _a;
|
|
2658
2704
|
this.icon.off.default = ControlImage.fromResourceName(resource);
|
|
2659
|
-
(_a = this.view) === null || _a ===
|
|
2705
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2660
2706
|
}
|
|
2661
2707
|
setTorchOffPressedImage(resource) {
|
|
2662
2708
|
var _a;
|
|
2663
2709
|
this.icon.off.pressed = ControlImage.fromResourceName(resource);
|
|
2664
|
-
(_a = this.view) === null || _a ===
|
|
2710
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2665
2711
|
}
|
|
2666
2712
|
setTorchOnImage(resource) {
|
|
2667
2713
|
var _a;
|
|
2668
2714
|
this.icon.on.default = ControlImage.fromResourceName(resource);
|
|
2669
|
-
(_a = this.view) === null || _a ===
|
|
2715
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2670
2716
|
}
|
|
2671
2717
|
setTorchOnPressedImage(resource) {
|
|
2672
2718
|
var _a;
|
|
2673
2719
|
this.icon.on.pressed = ControlImage.fromResourceName(resource);
|
|
2674
|
-
(_a = this.view) === null || _a ===
|
|
2720
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2675
2721
|
}
|
|
2676
2722
|
setImageResource(resource) {
|
|
2677
2723
|
var _a;
|
|
@@ -2679,17 +2725,17 @@ class TorchSwitchControl extends DefaultSerializeable {
|
|
|
2679
2725
|
this.icon.off.pressed = ControlImage.fromResourceName(resource);
|
|
2680
2726
|
this.icon.on.default = ControlImage.fromResourceName(resource);
|
|
2681
2727
|
this.icon.on.pressed = ControlImage.fromResourceName(resource);
|
|
2682
|
-
(_a = this.view) === null || _a ===
|
|
2728
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2683
2729
|
}
|
|
2684
2730
|
set torchOnPressedImage(torchOnPressedImage) {
|
|
2685
2731
|
var _a;
|
|
2686
2732
|
this.icon.on.pressed = ControlImage.fromBase64EncodedImage(torchOnPressedImage);
|
|
2687
|
-
(_a = this.view) === null || _a ===
|
|
2733
|
+
(_a = this.view) === null || _a === undefined ? undefined : _a.controlUpdated();
|
|
2688
2734
|
}
|
|
2689
2735
|
}
|
|
2690
2736
|
__decorate([
|
|
2691
2737
|
ignoreFromSerialization
|
|
2692
|
-
], TorchSwitchControl.prototype, "view",
|
|
2738
|
+
], TorchSwitchControl.prototype, "view", undefined);
|
|
2693
2739
|
|
|
2694
2740
|
var VideoResolution;
|
|
2695
2741
|
(function (VideoResolution) {
|
|
@@ -2804,7 +2850,7 @@ class CameraSettings extends DefaultSerializeable {
|
|
|
2804
2850
|
}
|
|
2805
2851
|
__decorate([
|
|
2806
2852
|
ignoreFromSerialization
|
|
2807
|
-
], CameraSettings.prototype, "focusHiddenProperties",
|
|
2853
|
+
], CameraSettings.prototype, "focusHiddenProperties", undefined);
|
|
2808
2854
|
|
|
2809
2855
|
const NoViewfinder = { type: 'none' };
|
|
2810
2856
|
|
|
@@ -2826,7 +2872,7 @@ class RectangularViewfinderAnimation extends DefaultSerializeable {
|
|
|
2826
2872
|
}
|
|
2827
2873
|
__decorate([
|
|
2828
2874
|
nameForSerialization('isLooping')
|
|
2829
|
-
], RectangularViewfinderAnimation.prototype, "_isLooping",
|
|
2875
|
+
], RectangularViewfinderAnimation.prototype, "_isLooping", undefined);
|
|
2830
2876
|
|
|
2831
2877
|
class RectangularViewfinder extends DefaultSerializeable {
|
|
2832
2878
|
get sizeWithUnitAndAspect() {
|
|
@@ -2909,29 +2955,29 @@ class RectangularViewfinder extends DefaultSerializeable {
|
|
|
2909
2955
|
}
|
|
2910
2956
|
__decorate([
|
|
2911
2957
|
nameForSerialization('style')
|
|
2912
|
-
], RectangularViewfinder.prototype, "_style",
|
|
2958
|
+
], RectangularViewfinder.prototype, "_style", undefined);
|
|
2913
2959
|
__decorate([
|
|
2914
2960
|
nameForSerialization('lineStyle')
|
|
2915
|
-
], RectangularViewfinder.prototype, "_lineStyle",
|
|
2961
|
+
], RectangularViewfinder.prototype, "_lineStyle", undefined);
|
|
2916
2962
|
__decorate([
|
|
2917
2963
|
nameForSerialization('dimming')
|
|
2918
|
-
], RectangularViewfinder.prototype, "_dimming",
|
|
2964
|
+
], RectangularViewfinder.prototype, "_dimming", undefined);
|
|
2919
2965
|
__decorate([
|
|
2920
2966
|
nameForSerialization('disabledDimming')
|
|
2921
|
-
], RectangularViewfinder.prototype, "_disabledDimming",
|
|
2967
|
+
], RectangularViewfinder.prototype, "_disabledDimming", undefined);
|
|
2922
2968
|
__decorate([
|
|
2923
2969
|
nameForSerialization('animation'),
|
|
2924
2970
|
ignoreFromSerialization
|
|
2925
|
-
], RectangularViewfinder.prototype, "_animation",
|
|
2971
|
+
], RectangularViewfinder.prototype, "_animation", undefined);
|
|
2926
2972
|
__decorate([
|
|
2927
2973
|
nameForSerialization('size')
|
|
2928
|
-
], RectangularViewfinder.prototype, "_sizeWithUnitAndAspect",
|
|
2974
|
+
], RectangularViewfinder.prototype, "_sizeWithUnitAndAspect", undefined);
|
|
2929
2975
|
__decorate([
|
|
2930
2976
|
nameForSerialization('disabledColor')
|
|
2931
|
-
], RectangularViewfinder.prototype, "_disabledColor",
|
|
2977
|
+
], RectangularViewfinder.prototype, "_disabledColor", undefined);
|
|
2932
2978
|
__decorate([
|
|
2933
2979
|
ignoreFromSerialization
|
|
2934
|
-
], RectangularViewfinder.prototype, "eventEmitter",
|
|
2980
|
+
], RectangularViewfinder.prototype, "eventEmitter", undefined);
|
|
2935
2981
|
|
|
2936
2982
|
var RectangularViewfinderStyle;
|
|
2937
2983
|
(function (RectangularViewfinderStyle) {
|
|
@@ -3071,11 +3117,11 @@ class WaveFormVibration extends Vibration {
|
|
|
3071
3117
|
}
|
|
3072
3118
|
__decorate([
|
|
3073
3119
|
nameForSerialization('timings')
|
|
3074
|
-
], WaveFormVibration.prototype, "_timings",
|
|
3120
|
+
], WaveFormVibration.prototype, "_timings", undefined);
|
|
3075
3121
|
__decorate([
|
|
3076
3122
|
ignoreFromSerializationIfNull,
|
|
3077
3123
|
nameForSerialization('amplitudes')
|
|
3078
|
-
], WaveFormVibration.prototype, "_amplitudes",
|
|
3124
|
+
], WaveFormVibration.prototype, "_amplitudes", undefined);
|
|
3079
3125
|
|
|
3080
3126
|
class Sound extends DefaultSerializeable {
|
|
3081
3127
|
static get defaultSound() {
|
|
@@ -3092,7 +3138,7 @@ class Sound extends DefaultSerializeable {
|
|
|
3092
3138
|
}
|
|
3093
3139
|
__decorate([
|
|
3094
3140
|
ignoreFromSerializationIfNull
|
|
3095
|
-
], Sound.prototype, "resource",
|
|
3141
|
+
], Sound.prototype, "resource", undefined);
|
|
3096
3142
|
|
|
3097
3143
|
class FeedbackController {
|
|
3098
3144
|
constructor(feedback) {
|
|
@@ -3119,7 +3165,7 @@ class Feedback extends DefaultSerializeable {
|
|
|
3119
3165
|
return this._sound;
|
|
3120
3166
|
}
|
|
3121
3167
|
static fromJSON(json) {
|
|
3122
|
-
return new Feedback((json === null || json ===
|
|
3168
|
+
return new Feedback((json === null || json === undefined ? undefined : json.vibration) ? Vibration.fromJSON(json.vibration) : null, (json === null || json === undefined ? undefined : json.sound) ? Sound.fromJSON(json.sound) : null);
|
|
3123
3169
|
}
|
|
3124
3170
|
constructor(vibration, sound) {
|
|
3125
3171
|
super();
|
|
@@ -3139,14 +3185,14 @@ class Feedback extends DefaultSerializeable {
|
|
|
3139
3185
|
__decorate([
|
|
3140
3186
|
ignoreFromSerializationIfNull,
|
|
3141
3187
|
nameForSerialization('vibration')
|
|
3142
|
-
], Feedback.prototype, "_vibration",
|
|
3188
|
+
], Feedback.prototype, "_vibration", undefined);
|
|
3143
3189
|
__decorate([
|
|
3144
3190
|
ignoreFromSerializationIfNull,
|
|
3145
3191
|
nameForSerialization('sound')
|
|
3146
|
-
], Feedback.prototype, "_sound",
|
|
3192
|
+
], Feedback.prototype, "_sound", undefined);
|
|
3147
3193
|
__decorate([
|
|
3148
3194
|
ignoreFromSerialization
|
|
3149
|
-
], Feedback.prototype, "controller",
|
|
3195
|
+
], Feedback.prototype, "controller", undefined);
|
|
3150
3196
|
|
|
3151
3197
|
const NoneLocationSelection = { type: 'none' };
|
|
3152
3198
|
|
|
@@ -3166,7 +3212,7 @@ class RadiusLocationSelection extends DefaultSerializeable {
|
|
|
3166
3212
|
}
|
|
3167
3213
|
__decorate([
|
|
3168
3214
|
nameForSerialization('radius')
|
|
3169
|
-
], RadiusLocationSelection.prototype, "_radius",
|
|
3215
|
+
], RadiusLocationSelection.prototype, "_radius", undefined);
|
|
3170
3216
|
|
|
3171
3217
|
class RectangularLocationSelection extends DefaultSerializeable {
|
|
3172
3218
|
constructor() {
|
|
@@ -3228,7 +3274,7 @@ class RectangularLocationSelection extends DefaultSerializeable {
|
|
|
3228
3274
|
}
|
|
3229
3275
|
__decorate([
|
|
3230
3276
|
nameForSerialization('size')
|
|
3231
|
-
], RectangularLocationSelection.prototype, "_sizeWithUnitAndAspect",
|
|
3277
|
+
], RectangularLocationSelection.prototype, "_sizeWithUnitAndAspect", undefined);
|
|
3232
3278
|
|
|
3233
3279
|
class LicenseInfo extends DefaultSerializeable {
|
|
3234
3280
|
get expiration() {
|
|
@@ -3238,7 +3284,7 @@ class LicenseInfo extends DefaultSerializeable {
|
|
|
3238
3284
|
__decorate([
|
|
3239
3285
|
nameForSerialization('expiration')
|
|
3240
3286
|
// @ts-ignore
|
|
3241
|
-
], LicenseInfo.prototype, "_expiration",
|
|
3287
|
+
], LicenseInfo.prototype, "_expiration", undefined);
|
|
3242
3288
|
|
|
3243
3289
|
var Expiration;
|
|
3244
3290
|
(function (Expiration) {
|
|
@@ -3249,5 +3295,5 @@ var Expiration;
|
|
|
3249
3295
|
|
|
3250
3296
|
createEventEmitter();
|
|
3251
3297
|
|
|
3252
|
-
export { AdvancedNativeProxy, AimerViewfinder, Anchor, BaseController, BaseDataCaptureView, BaseNativeProxy, BaseNewController, Brush, Camera, CameraController, CameraPosition, CameraSettings, Color, ContextStatus, ControlImage, DataCaptureContext, DataCaptureContextEvents, DataCaptureContextFeatures, DataCaptureContextSettings, DataCaptureViewController, DataCaptureViewEvents, DefaultSerializeable, Direction, EventDataParser, EventEmitter, Expiration, FactoryMaker, Feedback, FocusGestureStrategy, FocusRange, FontFamily, FrameSourceListenerEvents, FrameSourceState, HTMLElementState, HtmlElementPosition, HtmlElementSize, ImageBuffer, ImageFrameSource, LicenseInfo, LogoStyle, MarginsWithUnit, MeasureUnit, NoViewfinder, NoneLocationSelection, NumberWithUnit, Observable, OpenSourceSoftwareLicenseInfo, Orientation, Point, PointWithUnit, PrivateFocusGestureDeserializer, PrivateFrameData, PrivateZoomGestureDeserializer, Quadrilateral, RadiusLocationSelection, Rect, RectWithUnit, RectangularLocationSelection, RectangularViewfinder, RectangularViewfinderAnimation, RectangularViewfinderLineStyle, RectangularViewfinderStyle, ScanIntention, ScanditIcon, ScanditIconBuilder, ScanditIconShape, ScanditIconType, Size, SizeWithAspect, SizeWithUnit, SizeWithUnitAndAspect, SizingMode, Sound, SwipeToZoom, TapToFocus, TextAlignment, TorchState, TorchSwitchControl, Vibration, VibrationType, VideoResolution, WaveFormVibration, ZoomSwitchControl, createAdvancedNativeProxy, getCoreDefaults, ignoreFromSerialization, ignoreFromSerializationIfNull, loadCoreDefaults, nameForSerialization, serializationDefault };
|
|
3298
|
+
export { AdvancedNativeProxy, AimerViewfinder, Anchor, BaseController, BaseDataCaptureView, BaseNativeProxy, BaseNewController, Brush, Camera, CameraController, CameraPosition, CameraSettings, Color, ContextStatus, ControlImage, DataCaptureContext, DataCaptureContextEvents, DataCaptureContextFeatures, DataCaptureContextSettings, DataCaptureViewController, DataCaptureViewEvents, DefaultSerializeable, Direction, EventDataParser, EventEmitter, Expiration, FactoryMaker, Feedback, FocusGestureStrategy, FocusRange, FontFamily, FrameSourceListenerEvents, FrameSourceState, HTMLElementState, HtmlElementPosition, HtmlElementSize, ImageBuffer, ImageFrameSource, LicenseInfo, LogoStyle, MarginsWithUnit, MeasureUnit, NoViewfinder, NoneLocationSelection, NumberWithUnit, Observable, OpenSourceSoftwareLicenseInfo, Orientation, Point, PointWithUnit, PrivateFocusGestureDeserializer, PrivateFrameData, PrivateZoomGestureDeserializer, Quadrilateral, RadiusLocationSelection, Rect, RectWithUnit, RectangularLocationSelection, RectangularViewfinder, RectangularViewfinderAnimation, RectangularViewfinderLineStyle, RectangularViewfinderStyle, ScanIntention, ScanditIcon, ScanditIconBuilder, ScanditIconShape, ScanditIconType, Size, SizeWithAspect, SizeWithUnit, SizeWithUnitAndAspect, SizingMode, Sound, SwipeToZoom, TapToFocus, TextAlignment, TorchState, TorchSwitchControl, Vibration, VibrationType, VideoResolution, WaveFormVibration, ZoomSwitchControl, createAdvancedNativeFromCtorProxy, createAdvancedNativeProxy, getCoreDefaults, ignoreFromSerialization, ignoreFromSerializationIfNull, loadCoreDefaults, nameForSerialization, serializationDefault };
|
|
3253
3299
|
//# sourceMappingURL=core.js.map
|