scandit-capacitor-datacapture-label 8.2.1 → 8.3.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.
- package/ScanditCapacitorDatacaptureLabel.podspec +1 -1
- package/android/build.gradle +1 -1
- package/dist/{esm → dts}/definitions.d.ts +4 -0
- package/dist/index.js +406 -21
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- /package/dist/{esm → dts}/index.d.ts +0 -0
- /package/dist/{esm → dts}/ts/Capacitor/Capacitor.d.ts +0 -0
- /package/dist/{esm → dts}/ts/Capacitor/LabelNativeCallerProvider.d.ts +0 -0
- /package/dist/{esm → dts}/ts/Capacitor/initProxy.d.ts +0 -0
- /package/dist/{esm → dts}/ts/LabelCaptureAdvancedOverlayView.d.ts +0 -0
- /package/dist/{esm → dts}/web.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nameForSerialization, ignoreFromSerializationIfNull, serializationDefault, NoViewfinder, DefaultSerializeable, ignoreFromSerialization, Quadrilateral, CameraSettings, Rect, Point, Size, BaseController, FrameDataController, Anchor, PointWithUnit, FactoryMaker, Brush, Feedback, registerProxies } from 'scandit-capacitor-datacapture-core/dist/core';
|
|
1
|
+
import { nameForSerialization, ignoreFromSerializationIfNull, serializationDefault, NoViewfinder, DefaultSerializeable, ignoreFromSerialization, Quadrilateral, CameraSettings, Rect, Point, Size, BaseController, FrameDataController, EventDataParser, SKIP, Anchor, PointWithUnit, FactoryMaker, Brush, Feedback, registerProxies } from 'scandit-capacitor-datacapture-core/dist/core';
|
|
2
2
|
import { Barcode, getBarcodeDefaults } from 'scandit-capacitor-datacapture-barcode/dist/barcode';
|
|
3
3
|
import { registerPlugin } from '@capacitor/core';
|
|
4
4
|
import { CapacitorCore, capacitorExec, CapacitorNativeCaller } from 'scandit-capacitor-datacapture-core';
|
|
@@ -40,6 +40,11 @@ function parseLabelCaptureDefaults(jsonDefaults) {
|
|
|
40
40
|
validationErrorText: jsonDefaults.LabelCapture.LabelCaptureValidationFlowOverlay.Settings.validationErrorText,
|
|
41
41
|
requiredFieldErrorText: jsonDefaults.LabelCapture.LabelCaptureValidationFlowOverlay.Settings.requiredFieldErrorText,
|
|
42
42
|
manualInputButtonText: jsonDefaults.LabelCapture.LabelCaptureValidationFlowOverlay.Settings.manualInputButtonText,
|
|
43
|
+
validationFinishButtonText: jsonDefaults.LabelCapture.LabelCaptureValidationFlowOverlay.Settings.validationFinishButtonText,
|
|
44
|
+
validationRestartButtonText: jsonDefaults.LabelCapture.LabelCaptureValidationFlowOverlay.Settings.validationRestartButtonText,
|
|
45
|
+
validationPauseButtonText: jsonDefaults.LabelCapture.LabelCaptureValidationFlowOverlay.Settings.validationPauseButtonText,
|
|
46
|
+
validationAdaptiveScanningText: jsonDefaults.LabelCapture.LabelCaptureValidationFlowOverlay.Settings.validationAdaptiveScanningText,
|
|
47
|
+
validationScanningText: jsonDefaults.LabelCapture.LabelCaptureValidationFlowOverlay.Settings.validationScanningText,
|
|
43
48
|
}
|
|
44
49
|
},
|
|
45
50
|
Feedback: {
|
|
@@ -49,6 +54,12 @@ function parseLabelCaptureDefaults(jsonDefaults) {
|
|
|
49
54
|
};
|
|
50
55
|
}
|
|
51
56
|
|
|
57
|
+
var AdaptiveRecognitionMode;
|
|
58
|
+
(function (AdaptiveRecognitionMode) {
|
|
59
|
+
AdaptiveRecognitionMode["Off"] = "off";
|
|
60
|
+
AdaptiveRecognitionMode["Auto"] = "auto";
|
|
61
|
+
})(AdaptiveRecognitionMode || (AdaptiveRecognitionMode = {}));
|
|
62
|
+
|
|
52
63
|
var AdaptiveRecognitionResultType;
|
|
53
64
|
(function (AdaptiveRecognitionResultType) {
|
|
54
65
|
AdaptiveRecognitionResultType["Receipt"] = "receipt";
|
|
@@ -109,12 +120,21 @@ class LabelFieldDefinition extends DefaultSerializeable {
|
|
|
109
120
|
set valueRegexes(value) {
|
|
110
121
|
this._valueRegexes = value;
|
|
111
122
|
}
|
|
123
|
+
setValueRegex(valueRegex) {
|
|
124
|
+
this._valueRegexes = [...this._valueRegexes, valueRegex];
|
|
125
|
+
}
|
|
112
126
|
get optional() {
|
|
113
127
|
return this._optional;
|
|
114
128
|
}
|
|
115
129
|
set optional(value) {
|
|
116
130
|
this._optional = value;
|
|
117
131
|
}
|
|
132
|
+
get numberOfMandatoryInstances() {
|
|
133
|
+
return this._numberOfMandatoryInstances;
|
|
134
|
+
}
|
|
135
|
+
set numberOfMandatoryInstances(value) {
|
|
136
|
+
this._numberOfMandatoryInstances = value;
|
|
137
|
+
}
|
|
118
138
|
get hiddenProperties() {
|
|
119
139
|
return this._hiddenProperties;
|
|
120
140
|
}
|
|
@@ -136,6 +156,7 @@ class LabelFieldDefinition extends DefaultSerializeable {
|
|
|
136
156
|
super();
|
|
137
157
|
this._valueRegexes = [];
|
|
138
158
|
this._optional = false;
|
|
159
|
+
this._numberOfMandatoryInstances = null;
|
|
139
160
|
this._hiddenProperties = {};
|
|
140
161
|
this._name = name;
|
|
141
162
|
}
|
|
@@ -149,6 +170,9 @@ __decorate([
|
|
|
149
170
|
__decorate([
|
|
150
171
|
nameForSerialization('optional')
|
|
151
172
|
], LabelFieldDefinition.prototype, "_optional", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
nameForSerialization('number_of_mandatory_instances')
|
|
175
|
+
], LabelFieldDefinition.prototype, "_numberOfMandatoryInstances", void 0);
|
|
152
176
|
__decorate([
|
|
153
177
|
ignoreFromSerialization
|
|
154
178
|
], LabelFieldDefinition.prototype, "_hiddenProperties", void 0);
|
|
@@ -239,6 +263,7 @@ class LabelField {
|
|
|
239
263
|
field._barcode = json.barcode ? Barcode['fromJSON'](json.barcode) : null;
|
|
240
264
|
field._text = json.text;
|
|
241
265
|
field._dateResult = json.date ? LabelDateResult.fromJSON(json.date) : null;
|
|
266
|
+
field._valueType = json.valueType;
|
|
242
267
|
return field;
|
|
243
268
|
}
|
|
244
269
|
get name() {
|
|
@@ -262,6 +287,9 @@ class LabelField {
|
|
|
262
287
|
get text() {
|
|
263
288
|
return this._text;
|
|
264
289
|
}
|
|
290
|
+
get valueType() {
|
|
291
|
+
return this._valueType;
|
|
292
|
+
}
|
|
265
293
|
asDate() {
|
|
266
294
|
return this._dateResult;
|
|
267
295
|
}
|
|
@@ -344,6 +372,12 @@ class CustomBarcode extends BarcodeField {
|
|
|
344
372
|
get symbologies() {
|
|
345
373
|
return super.symbologySettings;
|
|
346
374
|
}
|
|
375
|
+
get numberOfMandatoryInstances() {
|
|
376
|
+
return super.numberOfMandatoryInstances;
|
|
377
|
+
}
|
|
378
|
+
set numberOfMandatoryInstances(value) {
|
|
379
|
+
super.numberOfMandatoryInstances = value;
|
|
380
|
+
}
|
|
347
381
|
}
|
|
348
382
|
__decorate([
|
|
349
383
|
nameForSerialization('location')
|
|
@@ -384,6 +418,12 @@ class CustomText extends TextField {
|
|
|
384
418
|
get isOptional() {
|
|
385
419
|
return super.optional;
|
|
386
420
|
}
|
|
421
|
+
get numberOfMandatoryInstances() {
|
|
422
|
+
return super.numberOfMandatoryInstances;
|
|
423
|
+
}
|
|
424
|
+
set numberOfMandatoryInstances(value) {
|
|
425
|
+
super.numberOfMandatoryInstances = value;
|
|
426
|
+
}
|
|
387
427
|
}
|
|
388
428
|
__decorate([
|
|
389
429
|
nameForSerialization('location')
|
|
@@ -395,6 +435,52 @@ __decorate([
|
|
|
395
435
|
nameForSerialization('fieldType')
|
|
396
436
|
], CustomText.prototype, "_fieldType", void 0);
|
|
397
437
|
|
|
438
|
+
class DateText extends TextField {
|
|
439
|
+
constructor(name, labelDateFormat) {
|
|
440
|
+
super(name);
|
|
441
|
+
this._fieldType = 'dateText';
|
|
442
|
+
this._anchorRegexes = null;
|
|
443
|
+
this._labelDateFormat = labelDateFormat;
|
|
444
|
+
}
|
|
445
|
+
get labelDateFormat() {
|
|
446
|
+
return this._labelDateFormat;
|
|
447
|
+
}
|
|
448
|
+
get anchorRegexes() {
|
|
449
|
+
var _a;
|
|
450
|
+
return (_a = this._anchorRegexes) !== null && _a !== void 0 ? _a : [];
|
|
451
|
+
}
|
|
452
|
+
set anchorRegexes(value) {
|
|
453
|
+
this._anchorRegexes = value;
|
|
454
|
+
}
|
|
455
|
+
get name() {
|
|
456
|
+
return super.name;
|
|
457
|
+
}
|
|
458
|
+
get valueRegexes() {
|
|
459
|
+
return super.valueRegexes;
|
|
460
|
+
}
|
|
461
|
+
set valueRegexes(value) {
|
|
462
|
+
super.valueRegexes = value;
|
|
463
|
+
}
|
|
464
|
+
get isOptional() {
|
|
465
|
+
return super.optional;
|
|
466
|
+
}
|
|
467
|
+
get numberOfMandatoryInstances() {
|
|
468
|
+
return super.numberOfMandatoryInstances;
|
|
469
|
+
}
|
|
470
|
+
set numberOfMandatoryInstances(value) {
|
|
471
|
+
super.numberOfMandatoryInstances = value;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
__decorate([
|
|
475
|
+
nameForSerialization('fieldType')
|
|
476
|
+
], DateText.prototype, "_fieldType", void 0);
|
|
477
|
+
__decorate([
|
|
478
|
+
nameForSerialization('dataTypePatterns')
|
|
479
|
+
], DateText.prototype, "_anchorRegexes", void 0);
|
|
480
|
+
__decorate([
|
|
481
|
+
nameForSerialization('labelDateFormat')
|
|
482
|
+
], DateText.prototype, "_labelDateFormat", void 0);
|
|
483
|
+
|
|
398
484
|
class ExpiryDateText extends TextField {
|
|
399
485
|
constructor(name) {
|
|
400
486
|
super(name);
|
|
@@ -427,6 +513,12 @@ class ExpiryDateText extends TextField {
|
|
|
427
513
|
get isOptional() {
|
|
428
514
|
return super.optional;
|
|
429
515
|
}
|
|
516
|
+
get numberOfMandatoryInstances() {
|
|
517
|
+
return super.numberOfMandatoryInstances;
|
|
518
|
+
}
|
|
519
|
+
set numberOfMandatoryInstances(value) {
|
|
520
|
+
super.numberOfMandatoryInstances = value;
|
|
521
|
+
}
|
|
430
522
|
}
|
|
431
523
|
__decorate([
|
|
432
524
|
nameForSerialization('fieldType')
|
|
@@ -471,6 +563,12 @@ class ImeiOneBarcode extends BarcodeField {
|
|
|
471
563
|
get symbologies() {
|
|
472
564
|
return super.symbologySettings;
|
|
473
565
|
}
|
|
566
|
+
get numberOfMandatoryInstances() {
|
|
567
|
+
return super.numberOfMandatoryInstances;
|
|
568
|
+
}
|
|
569
|
+
set numberOfMandatoryInstances(value) {
|
|
570
|
+
super.numberOfMandatoryInstances = value;
|
|
571
|
+
}
|
|
474
572
|
constructor(name, symbologies) {
|
|
475
573
|
super(name, symbologies);
|
|
476
574
|
this._fieldType = 'imeiOneBarcode';
|
|
@@ -513,6 +611,12 @@ class ImeiTwoBarcode extends BarcodeField {
|
|
|
513
611
|
get symbologies() {
|
|
514
612
|
return super.symbologySettings;
|
|
515
613
|
}
|
|
614
|
+
get numberOfMandatoryInstances() {
|
|
615
|
+
return super.numberOfMandatoryInstances;
|
|
616
|
+
}
|
|
617
|
+
set numberOfMandatoryInstances(value) {
|
|
618
|
+
super.numberOfMandatoryInstances = value;
|
|
619
|
+
}
|
|
516
620
|
constructor(name, symbologies) {
|
|
517
621
|
super(name, symbologies);
|
|
518
622
|
this._fieldType = 'imeiTwoBarcode';
|
|
@@ -529,11 +633,15 @@ class LabelCaptureSession {
|
|
|
529
633
|
get frameSequenceID() {
|
|
530
634
|
return this._frameSequenceID;
|
|
531
635
|
}
|
|
636
|
+
get lastProcessedFrameId() {
|
|
637
|
+
return this._lastProcessedFrameId;
|
|
638
|
+
}
|
|
532
639
|
static fromJSON(payload) {
|
|
533
640
|
var _a;
|
|
534
641
|
const sessionJson = JSON.parse(payload.session);
|
|
535
642
|
const session = new LabelCaptureSession();
|
|
536
643
|
session._frameSequenceID = sessionJson.frameSequenceId;
|
|
644
|
+
session._lastProcessedFrameId = sessionJson.lastFrameId;
|
|
537
645
|
session.frameId = (_a = payload.frameId) !== null && _a !== void 0 ? _a : '';
|
|
538
646
|
session._capturedLabels = sessionJson.labels
|
|
539
647
|
.map(CapturedLabel.fromJSON);
|
|
@@ -1027,6 +1135,19 @@ class LabelProxyAdapter {
|
|
|
1027
1135
|
return result;
|
|
1028
1136
|
});
|
|
1029
1137
|
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Finish callback for label capture did update session event
|
|
1140
|
+
*/
|
|
1141
|
+
finishValidationFlowResultUpdateEvent() {
|
|
1142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1143
|
+
const result = yield this.proxy.$executeLabel({
|
|
1144
|
+
moduleName: 'LabelCaptureModule',
|
|
1145
|
+
methodName: 'finishValidationFlowResultUpdateEvent',
|
|
1146
|
+
isEventRegistration: false,
|
|
1147
|
+
});
|
|
1148
|
+
return result;
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1030
1151
|
}
|
|
1031
1152
|
|
|
1032
1153
|
var LabelCaptureListenerEvents;
|
|
@@ -1069,7 +1190,10 @@ class LabelCaptureController extends BaseController {
|
|
|
1069
1190
|
});
|
|
1070
1191
|
}
|
|
1071
1192
|
updateFeedback(feedback) {
|
|
1072
|
-
return this.adapter.updateLabelCaptureFeedback({
|
|
1193
|
+
return this.adapter.updateLabelCaptureFeedback({
|
|
1194
|
+
modeId: this.modeId,
|
|
1195
|
+
feedbackJson: JSON.stringify(feedback.toJSON()),
|
|
1196
|
+
});
|
|
1073
1197
|
}
|
|
1074
1198
|
dispose() {
|
|
1075
1199
|
void this.unsubscribeLabelCaptureListener();
|
|
@@ -1084,10 +1208,20 @@ class LabelCaptureController extends BaseController {
|
|
|
1084
1208
|
}
|
|
1085
1209
|
handleDidUpdateSessionEvent(ev) {
|
|
1086
1210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1087
|
-
const payload =
|
|
1211
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { modeId: this.modeId });
|
|
1212
|
+
if (payload === SKIP) {
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
if (payload === null) {
|
|
1216
|
+
console.error('LabelCaptureController didUpdateSession payload is null');
|
|
1217
|
+
return;
|
|
1218
|
+
}
|
|
1088
1219
|
const session = LabelCaptureSession.fromJSON(payload);
|
|
1089
|
-
this.notifyListenersOfDidUpdateSession(session);
|
|
1090
|
-
yield this.adapter.finishLabelCaptureListenerDidUpdateSession({
|
|
1220
|
+
yield this.notifyListenersOfDidUpdateSession(session);
|
|
1221
|
+
yield this.adapter.finishLabelCaptureListenerDidUpdateSession({
|
|
1222
|
+
modeId: this.modeId,
|
|
1223
|
+
isEnabled: this.mode.isEnabled,
|
|
1224
|
+
});
|
|
1091
1225
|
});
|
|
1092
1226
|
}
|
|
1093
1227
|
get modeId() {
|
|
@@ -1098,7 +1232,7 @@ class LabelCaptureController extends BaseController {
|
|
|
1098
1232
|
const mode = this.mode;
|
|
1099
1233
|
for (const listener of mode.listeners) {
|
|
1100
1234
|
if (listener.didUpdateSession) {
|
|
1101
|
-
yield listener.didUpdateSession(this.mode, session, () => this.frameDataController.
|
|
1235
|
+
yield listener.didUpdateSession(this.mode, session, () => this.frameDataController.getFrame(session['frameId']));
|
|
1102
1236
|
}
|
|
1103
1237
|
}
|
|
1104
1238
|
});
|
|
@@ -1407,7 +1541,14 @@ class LabelCaptureAdvancedOverlayController extends BaseController {
|
|
|
1407
1541
|
}
|
|
1408
1542
|
handleViewForLabel(ev) {
|
|
1409
1543
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1410
|
-
const payload =
|
|
1544
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
1545
|
+
if (payload === SKIP) {
|
|
1546
|
+
return;
|
|
1547
|
+
}
|
|
1548
|
+
if (payload === null) {
|
|
1549
|
+
console.error('LabelCaptureAdvancedOverlayController viewForLabel payload is null');
|
|
1550
|
+
return;
|
|
1551
|
+
}
|
|
1411
1552
|
let view = null;
|
|
1412
1553
|
const label = CapturedLabel.fromJSON(JSON.parse(payload.label));
|
|
1413
1554
|
if (this.overlay.listener && this.overlay.listener.viewForCapturedLabel) {
|
|
@@ -1418,7 +1559,14 @@ class LabelCaptureAdvancedOverlayController extends BaseController {
|
|
|
1418
1559
|
}
|
|
1419
1560
|
handleAnchorForLabel(ev) {
|
|
1420
1561
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1421
|
-
const payload =
|
|
1562
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
1563
|
+
if (payload === SKIP) {
|
|
1564
|
+
return;
|
|
1565
|
+
}
|
|
1566
|
+
if (payload === null) {
|
|
1567
|
+
console.error('LabelCaptureAdvancedOverlayController anchorForLabel payload is null');
|
|
1568
|
+
return;
|
|
1569
|
+
}
|
|
1422
1570
|
let anchor = Anchor.Center;
|
|
1423
1571
|
const label = CapturedLabel.fromJSON(JSON.parse(payload.label));
|
|
1424
1572
|
if (this.overlay.listener && this.overlay.listener.anchorForCapturedLabel) {
|
|
@@ -1429,7 +1577,14 @@ class LabelCaptureAdvancedOverlayController extends BaseController {
|
|
|
1429
1577
|
}
|
|
1430
1578
|
handleViewForCapturedLabelField(ev) {
|
|
1431
1579
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1432
|
-
const payload =
|
|
1580
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
1581
|
+
if (payload === SKIP) {
|
|
1582
|
+
return;
|
|
1583
|
+
}
|
|
1584
|
+
if (payload === null) {
|
|
1585
|
+
console.error('LabelCaptureAdvancedOverlayController viewForCapturedLabelField payload is null');
|
|
1586
|
+
return;
|
|
1587
|
+
}
|
|
1433
1588
|
let view = null;
|
|
1434
1589
|
const field = LabelField.fromJSON(JSON.parse(payload.field));
|
|
1435
1590
|
if (this.overlay.listener && this.overlay.listener.viewForCapturedLabelField) {
|
|
@@ -1440,7 +1595,14 @@ class LabelCaptureAdvancedOverlayController extends BaseController {
|
|
|
1440
1595
|
}
|
|
1441
1596
|
handleOffsetForLabel(ev) {
|
|
1442
1597
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1443
|
-
const payload =
|
|
1598
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
1599
|
+
if (payload === SKIP) {
|
|
1600
|
+
return;
|
|
1601
|
+
}
|
|
1602
|
+
if (payload === null) {
|
|
1603
|
+
console.error('LabelCaptureAdvancedOverlayController offsetForLabel payload is null');
|
|
1604
|
+
return;
|
|
1605
|
+
}
|
|
1444
1606
|
let offset = PointWithUnit.zero;
|
|
1445
1607
|
const label = CapturedLabel.fromJSON(JSON.parse(payload.label));
|
|
1446
1608
|
if (this.overlay.listener && this.overlay.listener.offsetForCapturedLabel) {
|
|
@@ -1451,7 +1613,14 @@ class LabelCaptureAdvancedOverlayController extends BaseController {
|
|
|
1451
1613
|
}
|
|
1452
1614
|
handleAnchorForCapturedLabelField(ev) {
|
|
1453
1615
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1454
|
-
const payload =
|
|
1616
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
1617
|
+
if (payload === SKIP) {
|
|
1618
|
+
return;
|
|
1619
|
+
}
|
|
1620
|
+
if (payload === null) {
|
|
1621
|
+
console.error('LabelCaptureAdvancedOverlayController anchorForCapturedLabelField payload is null');
|
|
1622
|
+
return;
|
|
1623
|
+
}
|
|
1455
1624
|
let anchor = Anchor.Center;
|
|
1456
1625
|
const field = LabelField.fromJSON(JSON.parse(payload.field));
|
|
1457
1626
|
if (this.overlay.listener && this.overlay.listener.anchorForCapturedLabelField) {
|
|
@@ -1462,7 +1631,14 @@ class LabelCaptureAdvancedOverlayController extends BaseController {
|
|
|
1462
1631
|
}
|
|
1463
1632
|
handleOffsetForCapturedLabelField(ev) {
|
|
1464
1633
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1465
|
-
const payload =
|
|
1634
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
1635
|
+
if (payload === SKIP) {
|
|
1636
|
+
return;
|
|
1637
|
+
}
|
|
1638
|
+
if (payload === null) {
|
|
1639
|
+
console.error('LabelCaptureAdvancedOverlayController offsetForCapturedLabelField payload is null');
|
|
1640
|
+
return;
|
|
1641
|
+
}
|
|
1466
1642
|
let offset = PointWithUnit.zero;
|
|
1467
1643
|
const field = LabelField.fromJSON(JSON.parse(payload.field));
|
|
1468
1644
|
if (this.overlay.listener && this.overlay.listener.offsetForCapturedLabelField) {
|
|
@@ -1660,6 +1836,18 @@ class LabelDefinition extends DefaultSerializeable {
|
|
|
1660
1836
|
set fields(values) {
|
|
1661
1837
|
this._fields = values;
|
|
1662
1838
|
}
|
|
1839
|
+
addField(field) {
|
|
1840
|
+
this._fields.push(field);
|
|
1841
|
+
}
|
|
1842
|
+
addFields(fields) {
|
|
1843
|
+
this._fields.push(...fields);
|
|
1844
|
+
}
|
|
1845
|
+
get adaptiveRecognitionMode() {
|
|
1846
|
+
return this._adaptiveRecognitionMode;
|
|
1847
|
+
}
|
|
1848
|
+
set adaptiveRecognitionMode(value) {
|
|
1849
|
+
this._adaptiveRecognitionMode = value;
|
|
1850
|
+
}
|
|
1663
1851
|
get hiddenProperties() {
|
|
1664
1852
|
return this._hiddenProperties;
|
|
1665
1853
|
}
|
|
@@ -1703,6 +1891,7 @@ class LabelDefinition extends DefaultSerializeable {
|
|
|
1703
1891
|
this._name = '';
|
|
1704
1892
|
this._fields = [];
|
|
1705
1893
|
this._type = null;
|
|
1894
|
+
this._adaptiveRecognitionMode = AdaptiveRecognitionMode.Off;
|
|
1706
1895
|
this._hiddenProperties = {};
|
|
1707
1896
|
this._name = name;
|
|
1708
1897
|
}
|
|
@@ -1717,6 +1906,9 @@ __decorate([
|
|
|
1717
1906
|
nameForSerialization('type'),
|
|
1718
1907
|
ignoreFromSerializationIfNull
|
|
1719
1908
|
], LabelDefinition.prototype, "_type", void 0);
|
|
1909
|
+
__decorate([
|
|
1910
|
+
nameForSerialization('adaptiveRecognitionMode')
|
|
1911
|
+
], LabelDefinition.prototype, "_adaptiveRecognitionMode", void 0);
|
|
1720
1912
|
__decorate([
|
|
1721
1913
|
ignoreFromSerialization
|
|
1722
1914
|
], LabelDefinition.prototype, "_hiddenProperties", void 0);
|
|
@@ -1824,6 +2016,15 @@ var LabelFieldType;
|
|
|
1824
2016
|
LabelFieldType["Unknown"] = "unknown";
|
|
1825
2017
|
})(LabelFieldType || (LabelFieldType = {}));
|
|
1826
2018
|
|
|
2019
|
+
var LabelFieldValueType;
|
|
2020
|
+
(function (LabelFieldValueType) {
|
|
2021
|
+
LabelFieldValueType["Date"] = "date";
|
|
2022
|
+
LabelFieldValueType["Price"] = "price";
|
|
2023
|
+
LabelFieldValueType["Weight"] = "weight";
|
|
2024
|
+
LabelFieldValueType["Text"] = "text";
|
|
2025
|
+
LabelFieldValueType["Numeric"] = "numeric";
|
|
2026
|
+
})(LabelFieldValueType || (LabelFieldValueType = {}));
|
|
2027
|
+
|
|
1827
2028
|
class PackingDateText extends TextField {
|
|
1828
2029
|
constructor(name) {
|
|
1829
2030
|
super(name);
|
|
@@ -1853,6 +2054,12 @@ class PackingDateText extends TextField {
|
|
|
1853
2054
|
set valueRegexes(value) {
|
|
1854
2055
|
super.valueRegexes = value;
|
|
1855
2056
|
}
|
|
2057
|
+
get numberOfMandatoryInstances() {
|
|
2058
|
+
return super.numberOfMandatoryInstances;
|
|
2059
|
+
}
|
|
2060
|
+
set numberOfMandatoryInstances(value) {
|
|
2061
|
+
super.numberOfMandatoryInstances = value;
|
|
2062
|
+
}
|
|
1856
2063
|
}
|
|
1857
2064
|
__decorate([
|
|
1858
2065
|
nameForSerialization('fieldType')
|
|
@@ -1901,6 +2108,12 @@ class PartNumberBarcode extends BarcodeField {
|
|
|
1901
2108
|
get symbologies() {
|
|
1902
2109
|
return super.symbologySettings;
|
|
1903
2110
|
}
|
|
2111
|
+
get numberOfMandatoryInstances() {
|
|
2112
|
+
return super.numberOfMandatoryInstances;
|
|
2113
|
+
}
|
|
2114
|
+
set numberOfMandatoryInstances(value) {
|
|
2115
|
+
super.numberOfMandatoryInstances = value;
|
|
2116
|
+
}
|
|
1904
2117
|
}
|
|
1905
2118
|
__decorate([
|
|
1906
2119
|
nameForSerialization('fieldType')
|
|
@@ -2061,6 +2274,12 @@ class SerialNumberBarcode extends BarcodeField {
|
|
|
2061
2274
|
get symbologies() {
|
|
2062
2275
|
return super.symbologySettings;
|
|
2063
2276
|
}
|
|
2277
|
+
get numberOfMandatoryInstances() {
|
|
2278
|
+
return super.numberOfMandatoryInstances;
|
|
2279
|
+
}
|
|
2280
|
+
set numberOfMandatoryInstances(value) {
|
|
2281
|
+
super.numberOfMandatoryInstances = value;
|
|
2282
|
+
}
|
|
2064
2283
|
}
|
|
2065
2284
|
__decorate([
|
|
2066
2285
|
nameForSerialization('fieldType')
|
|
@@ -2091,6 +2310,12 @@ class TotalPriceText extends TextField {
|
|
|
2091
2310
|
set valueRegexes(value) {
|
|
2092
2311
|
super.valueRegexes = value;
|
|
2093
2312
|
}
|
|
2313
|
+
get numberOfMandatoryInstances() {
|
|
2314
|
+
return super.numberOfMandatoryInstances;
|
|
2315
|
+
}
|
|
2316
|
+
set numberOfMandatoryInstances(value) {
|
|
2317
|
+
super.numberOfMandatoryInstances = value;
|
|
2318
|
+
}
|
|
2094
2319
|
}
|
|
2095
2320
|
__decorate([
|
|
2096
2321
|
nameForSerialization('fieldType')
|
|
@@ -2124,6 +2349,12 @@ class UnitPriceText extends TextField {
|
|
|
2124
2349
|
set valueRegexes(value) {
|
|
2125
2350
|
super.valueRegexes = value;
|
|
2126
2351
|
}
|
|
2352
|
+
get numberOfMandatoryInstances() {
|
|
2353
|
+
return super.numberOfMandatoryInstances;
|
|
2354
|
+
}
|
|
2355
|
+
set numberOfMandatoryInstances(value) {
|
|
2356
|
+
super.numberOfMandatoryInstances = value;
|
|
2357
|
+
}
|
|
2127
2358
|
}
|
|
2128
2359
|
__decorate([
|
|
2129
2360
|
nameForSerialization('fieldType')
|
|
@@ -2157,6 +2388,12 @@ class WeightText extends TextField {
|
|
|
2157
2388
|
set valueRegexes(value) {
|
|
2158
2389
|
super.valueRegexes = value;
|
|
2159
2390
|
}
|
|
2391
|
+
get numberOfMandatoryInstances() {
|
|
2392
|
+
return super.numberOfMandatoryInstances;
|
|
2393
|
+
}
|
|
2394
|
+
set numberOfMandatoryInstances(value) {
|
|
2395
|
+
super.numberOfMandatoryInstances = value;
|
|
2396
|
+
}
|
|
2160
2397
|
}
|
|
2161
2398
|
__decorate([
|
|
2162
2399
|
nameForSerialization('fieldType')
|
|
@@ -2262,7 +2499,14 @@ class LabelCaptureBasicOverlayController extends BaseController {
|
|
|
2262
2499
|
}
|
|
2263
2500
|
handleBrushForFieldOfLabel(ev) {
|
|
2264
2501
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2265
|
-
const payload =
|
|
2502
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
2503
|
+
if (payload === SKIP) {
|
|
2504
|
+
return;
|
|
2505
|
+
}
|
|
2506
|
+
if (payload === null) {
|
|
2507
|
+
console.error('LabelCaptureBasicOverlayController brushForFieldOfLabel payload is null');
|
|
2508
|
+
return;
|
|
2509
|
+
}
|
|
2266
2510
|
let brush = this.overlay.capturedFieldBrush;
|
|
2267
2511
|
const field = LabelField.fromJSON(JSON.parse(payload.field));
|
|
2268
2512
|
const label = CapturedLabel.fromJSON(JSON.parse(payload.label));
|
|
@@ -2274,7 +2518,14 @@ class LabelCaptureBasicOverlayController extends BaseController {
|
|
|
2274
2518
|
}
|
|
2275
2519
|
handleBrushForLabel(ev) {
|
|
2276
2520
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2277
|
-
const payload =
|
|
2521
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
2522
|
+
if (payload === SKIP) {
|
|
2523
|
+
return;
|
|
2524
|
+
}
|
|
2525
|
+
if (payload === null) {
|
|
2526
|
+
console.error('LabelCaptureBasicOverlayController brushForLabel payload is null');
|
|
2527
|
+
return;
|
|
2528
|
+
}
|
|
2278
2529
|
let brush = this.overlay.labelBrush;
|
|
2279
2530
|
const label = CapturedLabel.fromJSON(JSON.parse(payload.label));
|
|
2280
2531
|
if (this.overlay.listener && this.overlay.listener.brushForLabel) {
|
|
@@ -2284,7 +2535,14 @@ class LabelCaptureBasicOverlayController extends BaseController {
|
|
|
2284
2535
|
});
|
|
2285
2536
|
}
|
|
2286
2537
|
handleDidTapLabel(ev) {
|
|
2287
|
-
const payload =
|
|
2538
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
2539
|
+
if (payload === SKIP) {
|
|
2540
|
+
return;
|
|
2541
|
+
}
|
|
2542
|
+
if (payload === null) {
|
|
2543
|
+
console.error('LabelCaptureBasicOverlayController didTapLabel payload is null');
|
|
2544
|
+
return;
|
|
2545
|
+
}
|
|
2288
2546
|
if (this.overlay.listener && this.overlay.listener.didTapLabel) {
|
|
2289
2547
|
const label = CapturedLabel.fromJSON(JSON.parse(payload.label));
|
|
2290
2548
|
this.overlay.listener.didTapLabel(this.overlay, label);
|
|
@@ -2438,6 +2696,7 @@ var LabelCaptureValidationFlowListenerEvents;
|
|
|
2438
2696
|
(function (LabelCaptureValidationFlowListenerEvents) {
|
|
2439
2697
|
LabelCaptureValidationFlowListenerEvents["didCaptureLabelWithFields"] = "LabelCaptureValidationFlowListener.didCaptureLabelWithFields";
|
|
2440
2698
|
LabelCaptureValidationFlowListenerEvents["didSubmitManualInputForField"] = "LabelCaptureValidationFlowListener.didSubmitManualInputForField";
|
|
2699
|
+
LabelCaptureValidationFlowListenerEvents["didUpdateValidationFlowResult"] = "LabelCaptureValidationFlowListener.didUpdateValidationFlowResult";
|
|
2441
2700
|
})(LabelCaptureValidationFlowListenerEvents || (LabelCaptureValidationFlowListenerEvents = {}));
|
|
2442
2701
|
class LabelCaptureValidationFlowOverlayController extends BaseController {
|
|
2443
2702
|
constructor(overlay) {
|
|
@@ -2451,13 +2710,20 @@ class LabelCaptureValidationFlowOverlayController extends BaseController {
|
|
|
2451
2710
|
this.handleDidSubmitManualInputForFieldEventWrapper = (ev) => {
|
|
2452
2711
|
this.handleDidSubmitManualInputForFieldEvent(ev);
|
|
2453
2712
|
};
|
|
2713
|
+
this.handleDidUpdateValidationFlowResultEventWrapper = (ev) => __awaiter(this, void 0, void 0, function* () {
|
|
2714
|
+
yield this.handleDidUpdateValidationFlowResult(ev);
|
|
2715
|
+
});
|
|
2454
2716
|
this.overlay = overlay;
|
|
2455
2717
|
this.adapter = new LabelProxyAdapter(this._proxy);
|
|
2718
|
+
this.frameDataController = new FrameDataController();
|
|
2456
2719
|
void this.initialize();
|
|
2457
2720
|
}
|
|
2458
2721
|
updateValidationFlowOverlay() {
|
|
2459
2722
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2460
|
-
yield this.adapter.updateLabelCaptureValidationFlowOverlay({
|
|
2723
|
+
yield this.adapter.updateLabelCaptureValidationFlowOverlay({
|
|
2724
|
+
dataCaptureViewId: this.dataCaptureViewId,
|
|
2725
|
+
overlayJson: JSON.stringify(this.overlay.toJSON()),
|
|
2726
|
+
});
|
|
2461
2727
|
});
|
|
2462
2728
|
}
|
|
2463
2729
|
subscribeLabelCaptureValidationFlowListener() {
|
|
@@ -2468,6 +2734,7 @@ class LabelCaptureValidationFlowOverlayController extends BaseController {
|
|
|
2468
2734
|
this._proxy.subscribeForEvents(Object.values(LabelCaptureValidationFlowListenerEvents));
|
|
2469
2735
|
this._proxy.eventEmitter.on(LabelCaptureValidationFlowListenerEvents.didCaptureLabelWithFields, this.handleDidCaptureLabelWithFieldsEventWrapper);
|
|
2470
2736
|
this._proxy.eventEmitter.on(LabelCaptureValidationFlowListenerEvents.didSubmitManualInputForField, this.handleDidSubmitManualInputForFieldEventWrapper);
|
|
2737
|
+
this._proxy.eventEmitter.on(LabelCaptureValidationFlowListenerEvents.didUpdateValidationFlowResult, this.handleDidUpdateValidationFlowResultEventWrapper);
|
|
2471
2738
|
this.isSubscribed = true;
|
|
2472
2739
|
if (this.dataCaptureViewId !== -1) {
|
|
2473
2740
|
yield this.adapter.registerListenerForValidationFlowEvents({ dataCaptureViewId: this.dataCaptureViewId });
|
|
@@ -2512,15 +2779,53 @@ class LabelCaptureValidationFlowOverlayController extends BaseController {
|
|
|
2512
2779
|
});
|
|
2513
2780
|
}
|
|
2514
2781
|
handleDidCaptureLabelWithFieldsEvent(ev) {
|
|
2515
|
-
const payload =
|
|
2516
|
-
|
|
2782
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, {
|
|
2783
|
+
viewId: this.dataCaptureViewId,
|
|
2784
|
+
});
|
|
2785
|
+
if (payload === SKIP) {
|
|
2786
|
+
return;
|
|
2787
|
+
}
|
|
2788
|
+
if (payload === null) {
|
|
2789
|
+
console.error('LabelCaptureValidationFlowOverlayController didCaptureLabelWithFields payload is null');
|
|
2790
|
+
return;
|
|
2791
|
+
}
|
|
2792
|
+
const fields = payload.fields.map(field => LabelField.fromJSON(JSON.parse(field)));
|
|
2517
2793
|
this.notifyListenersOfDidCaptureLabelWithFields(fields);
|
|
2518
2794
|
}
|
|
2519
2795
|
handleDidSubmitManualInputForFieldEvent(ev) {
|
|
2520
|
-
const payload =
|
|
2796
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, {
|
|
2797
|
+
viewId: this.dataCaptureViewId,
|
|
2798
|
+
});
|
|
2799
|
+
if (payload === SKIP) {
|
|
2800
|
+
return;
|
|
2801
|
+
}
|
|
2802
|
+
if (payload === null) {
|
|
2803
|
+
console.error('LabelCaptureValidationFlowOverlayController didSubmitManualInputForField payload is null');
|
|
2804
|
+
return;
|
|
2805
|
+
}
|
|
2521
2806
|
const field = LabelField.fromJSON(JSON.parse(payload.fields[0]));
|
|
2522
2807
|
this.notifyListenersOfDidSubmitManualInputForField(field, payload.oldValue, payload.newValue);
|
|
2523
2808
|
}
|
|
2809
|
+
handleDidUpdateValidationFlowResult(ev) {
|
|
2810
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2811
|
+
var _a;
|
|
2812
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, {
|
|
2813
|
+
viewId: this.dataCaptureViewId,
|
|
2814
|
+
});
|
|
2815
|
+
if (payload === SKIP) {
|
|
2816
|
+
return;
|
|
2817
|
+
}
|
|
2818
|
+
if (payload === null) {
|
|
2819
|
+
console.error('LabelCaptureValidationFlowOverlayController didUpdateValidationFlowResult payload is null');
|
|
2820
|
+
return;
|
|
2821
|
+
}
|
|
2822
|
+
const fields = payload.fields.map(field => LabelField.fromJSON(JSON.parse(field)));
|
|
2823
|
+
const frameId = payload.frameId;
|
|
2824
|
+
const asyncId = payload.asyncId;
|
|
2825
|
+
yield ((_a = this.overlay.listener) === null || _a === void 0 ? void 0 : _a.didUpdateValidationFlowResult(payload.type, asyncId, fields, () => frameId ? this.frameDataController.getFrame(frameId) : Promise.resolve(null)));
|
|
2826
|
+
yield this.adapter.finishValidationFlowResultUpdateEvent();
|
|
2827
|
+
});
|
|
2828
|
+
}
|
|
2524
2829
|
notifyListenersOfDidCaptureLabelWithFields(fields) {
|
|
2525
2830
|
var _a;
|
|
2526
2831
|
(_a = this.overlay.listener) === null || _a === void 0 ? void 0 : _a.didCaptureLabelWithFields(fields);
|
|
@@ -2536,6 +2841,14 @@ class LabelCaptureValidationFlowOverlayController extends BaseController {
|
|
|
2536
2841
|
}
|
|
2537
2842
|
|
|
2538
2843
|
class LabelCaptureValidationFlowOverlay extends DefaultSerializeable {
|
|
2844
|
+
get shouldHandleKeyboardInsetsInternally() {
|
|
2845
|
+
return this._shouldHandleKeyboardInsetsInternally;
|
|
2846
|
+
}
|
|
2847
|
+
set shouldHandleKeyboardInsetsInternally(value) {
|
|
2848
|
+
var _a;
|
|
2849
|
+
this._shouldHandleKeyboardInsetsInternally = value;
|
|
2850
|
+
void ((_a = this.controller) === null || _a === void 0 ? void 0 : _a.updateValidationFlowOverlay());
|
|
2851
|
+
}
|
|
2539
2852
|
get view() {
|
|
2540
2853
|
return this._view;
|
|
2541
2854
|
}
|
|
@@ -2562,6 +2875,7 @@ class LabelCaptureValidationFlowOverlay extends DefaultSerializeable {
|
|
|
2562
2875
|
this._listener = null;
|
|
2563
2876
|
this.controller = null;
|
|
2564
2877
|
this._view = null;
|
|
2878
|
+
this._shouldHandleKeyboardInsetsInternally = true;
|
|
2565
2879
|
this.modeId = mode.modeId;
|
|
2566
2880
|
}
|
|
2567
2881
|
get listener() {
|
|
@@ -2596,6 +2910,9 @@ __decorate([
|
|
|
2596
2910
|
__decorate([
|
|
2597
2911
|
ignoreFromSerialization
|
|
2598
2912
|
], LabelCaptureValidationFlowOverlay.prototype, "_view", void 0);
|
|
2913
|
+
__decorate([
|
|
2914
|
+
nameForSerialization('shouldHandleKeyboardInsetsInternally')
|
|
2915
|
+
], LabelCaptureValidationFlowOverlay.prototype, "_shouldHandleKeyboardInsetsInternally", void 0);
|
|
2599
2916
|
|
|
2600
2917
|
class LabelCaptureValidationFlowSettings extends DefaultSerializeable {
|
|
2601
2918
|
static create() {
|
|
@@ -2611,6 +2928,11 @@ class LabelCaptureValidationFlowSettings extends DefaultSerializeable {
|
|
|
2611
2928
|
this._validationErrorText = defaults.validationErrorText;
|
|
2612
2929
|
this._requiredFieldErrorText = defaults.requiredFieldErrorText;
|
|
2613
2930
|
this._manualInputButtonText = defaults.manualInputButtonText;
|
|
2931
|
+
this._finishButtonText = defaults.validationFinishButtonText;
|
|
2932
|
+
this._restartButtonText = defaults.validationRestartButtonText;
|
|
2933
|
+
this._pauseButtonText = defaults.validationPauseButtonText;
|
|
2934
|
+
this._adaptiveScanningText = defaults.validationAdaptiveScanningText;
|
|
2935
|
+
this._scanningText = defaults.validationScanningText;
|
|
2614
2936
|
}
|
|
2615
2937
|
/**
|
|
2616
2938
|
* @deprecated This property is deprecated and will be removed in a future release.
|
|
@@ -2669,6 +2991,36 @@ class LabelCaptureValidationFlowSettings extends DefaultSerializeable {
|
|
|
2669
2991
|
console.warn('manualInputButtonText is deprecated and will be removed in a future release.');
|
|
2670
2992
|
this._manualInputButtonText = text;
|
|
2671
2993
|
}
|
|
2994
|
+
get finishButtonText() {
|
|
2995
|
+
return this._finishButtonText;
|
|
2996
|
+
}
|
|
2997
|
+
set finishButtonText(text) {
|
|
2998
|
+
this._finishButtonText = text;
|
|
2999
|
+
}
|
|
3000
|
+
get restartButtonText() {
|
|
3001
|
+
return this._restartButtonText;
|
|
3002
|
+
}
|
|
3003
|
+
set restartButtonText(text) {
|
|
3004
|
+
this._restartButtonText = text;
|
|
3005
|
+
}
|
|
3006
|
+
get pauseButtonText() {
|
|
3007
|
+
return this._pauseButtonText;
|
|
3008
|
+
}
|
|
3009
|
+
set pauseButtonText(text) {
|
|
3010
|
+
this._pauseButtonText = text;
|
|
3011
|
+
}
|
|
3012
|
+
get adaptiveScanningText() {
|
|
3013
|
+
return this._adaptiveScanningText;
|
|
3014
|
+
}
|
|
3015
|
+
set adaptiveScanningText(text) {
|
|
3016
|
+
this._adaptiveScanningText = text;
|
|
3017
|
+
}
|
|
3018
|
+
get scanningText() {
|
|
3019
|
+
return this._scanningText;
|
|
3020
|
+
}
|
|
3021
|
+
set scanningText(text) {
|
|
3022
|
+
this._scanningText = text;
|
|
3023
|
+
}
|
|
2672
3024
|
setPlaceholderTextForLabelDefinition(fieldName, placeholder) {
|
|
2673
3025
|
if (placeholder === null) {
|
|
2674
3026
|
this._labelDefinitionsPlaceholders.delete(fieldName);
|
|
@@ -2711,10 +3063,32 @@ __decorate([
|
|
|
2711
3063
|
__decorate([
|
|
2712
3064
|
nameForSerialization('manualInputButtonText')
|
|
2713
3065
|
], LabelCaptureValidationFlowSettings.prototype, "_manualInputButtonText", void 0);
|
|
3066
|
+
__decorate([
|
|
3067
|
+
nameForSerialization('validationFinishButtonText')
|
|
3068
|
+
], LabelCaptureValidationFlowSettings.prototype, "_finishButtonText", void 0);
|
|
3069
|
+
__decorate([
|
|
3070
|
+
nameForSerialization('validationRestartButtonText')
|
|
3071
|
+
], LabelCaptureValidationFlowSettings.prototype, "_restartButtonText", void 0);
|
|
3072
|
+
__decorate([
|
|
3073
|
+
nameForSerialization('validationPauseButtonText')
|
|
3074
|
+
], LabelCaptureValidationFlowSettings.prototype, "_pauseButtonText", void 0);
|
|
3075
|
+
__decorate([
|
|
3076
|
+
nameForSerialization('validationAdaptiveScanningText')
|
|
3077
|
+
], LabelCaptureValidationFlowSettings.prototype, "_adaptiveScanningText", void 0);
|
|
3078
|
+
__decorate([
|
|
3079
|
+
nameForSerialization('validationScanningText')
|
|
3080
|
+
], LabelCaptureValidationFlowSettings.prototype, "_scanningText", void 0);
|
|
2714
3081
|
__decorate([
|
|
2715
3082
|
ignoreFromSerialization
|
|
2716
3083
|
], LabelCaptureValidationFlowSettings.prototype, "_labelDefinitionsPlaceholders", void 0);
|
|
2717
3084
|
|
|
3085
|
+
var LabelResultUpdateType;
|
|
3086
|
+
(function (LabelResultUpdateType) {
|
|
3087
|
+
LabelResultUpdateType["AsyncFinished"] = "AsyncFinished";
|
|
3088
|
+
LabelResultUpdateType["AsyncStarted"] = "AsyncStarted";
|
|
3089
|
+
LabelResultUpdateType["Sync"] = "Sync";
|
|
3090
|
+
})(LabelResultUpdateType || (LabelResultUpdateType = {}));
|
|
3091
|
+
|
|
2718
3092
|
var LabelCaptureAdaptiveRecognitionListenerEvents;
|
|
2719
3093
|
(function (LabelCaptureAdaptiveRecognitionListenerEvents) {
|
|
2720
3094
|
LabelCaptureAdaptiveRecognitionListenerEvents["recognized"] = "LabelCaptureAdaptiveRecognitionListener.recognized";
|
|
@@ -2800,7 +3174,14 @@ class LabelCaptureAdaptiveRecognitionOverlayController extends BaseController {
|
|
|
2800
3174
|
}
|
|
2801
3175
|
handleRecognized(ev) {
|
|
2802
3176
|
var _a;
|
|
2803
|
-
const payload =
|
|
3177
|
+
const payload = EventDataParser.parseIfShouldHandle(ev, { viewId: this.dataCaptureViewId });
|
|
3178
|
+
if (payload === SKIP) {
|
|
3179
|
+
return;
|
|
3180
|
+
}
|
|
3181
|
+
if (payload === null) {
|
|
3182
|
+
console.error('LabelCaptureAdaptiveRecognitionOverlayController recognized payload is null');
|
|
3183
|
+
return;
|
|
3184
|
+
}
|
|
2804
3185
|
(_a = this.overlay.listener) === null || _a === void 0 ? void 0 : _a.didRecognize(payload.result);
|
|
2805
3186
|
}
|
|
2806
3187
|
handleFailure() {
|
|
@@ -2970,12 +3351,14 @@ class LabelCaptureAdvancedOverlayView extends DefaultSerializeable {
|
|
|
2970
3351
|
|
|
2971
3352
|
var LabelExports = /*#__PURE__*/Object.freeze({
|
|
2972
3353
|
__proto__: null,
|
|
3354
|
+
get AdaptiveRecognitionMode () { return AdaptiveRecognitionMode; },
|
|
2973
3355
|
AdaptiveRecognitionResult: AdaptiveRecognitionResult,
|
|
2974
3356
|
get AdaptiveRecognitionResultType () { return AdaptiveRecognitionResultType; },
|
|
2975
3357
|
BarcodeField: BarcodeField,
|
|
2976
3358
|
CapturedLabel: CapturedLabel,
|
|
2977
3359
|
CustomBarcode: CustomBarcode,
|
|
2978
3360
|
CustomText: CustomText,
|
|
3361
|
+
DateText: DateText,
|
|
2979
3362
|
ExpiryDateText: ExpiryDateText,
|
|
2980
3363
|
ImeiOneBarcode: ImeiOneBarcode,
|
|
2981
3364
|
ImeiTwoBarcode: ImeiTwoBarcode,
|
|
@@ -3000,6 +3383,8 @@ var LabelExports = /*#__PURE__*/Object.freeze({
|
|
|
3000
3383
|
get LabelFieldLocationType () { return LabelFieldLocationType; },
|
|
3001
3384
|
get LabelFieldState () { return LabelFieldState; },
|
|
3002
3385
|
get LabelFieldType () { return LabelFieldType; },
|
|
3386
|
+
get LabelFieldValueType () { return LabelFieldValueType; },
|
|
3387
|
+
get LabelResultUpdateType () { return LabelResultUpdateType; },
|
|
3003
3388
|
PackingDateText: PackingDateText,
|
|
3004
3389
|
PartNumberBarcode: PartNumberBarcode,
|
|
3005
3390
|
ReceiptScanningLineItem: ReceiptScanningLineItem,
|
|
@@ -3058,4 +3443,4 @@ registerPlugin('ScanditLabelPlugin', {
|
|
|
3058
3443
|
// tslint:disable-next-line:variable-name
|
|
3059
3444
|
const ScanditLabelPlugin = new ScanditLabelPluginImplementation();
|
|
3060
3445
|
|
|
3061
|
-
export { AdaptiveRecognitionResult, AdaptiveRecognitionResultType, BarcodeField, CapturedLabel, CustomBarcode, CustomText, ExpiryDateText, ImeiOneBarcode, ImeiTwoBarcode, LabelCapture, LabelCaptureAdaptiveRecognitionOverlay, LabelCaptureAdaptiveRecognitionSettings, LabelCaptureAdvancedOverlay, LabelCaptureAdvancedOverlayView, LabelCaptureBasicOverlay, LabelCaptureFeedback, LabelCaptureSession, LabelCaptureSettings, LabelCaptureValidationFlowOverlay, LabelCaptureValidationFlowSettings, LabelDateComponentFormat, LabelDateFormat, LabelDateResult, LabelDefinition, LabelField, LabelFieldDefinition, LabelFieldLocation, LabelFieldLocationType, LabelFieldState, LabelFieldType, PackingDateText, PartNumberBarcode, ReceiptScanningLineItem, ReceiptScanningResult, ScanditLabelPlugin, ScanditLabelPluginImplementation, SerialNumberBarcode, TextField, TotalPriceText, UnitPriceText, WeightText };
|
|
3446
|
+
export { AdaptiveRecognitionMode, AdaptiveRecognitionResult, AdaptiveRecognitionResultType, BarcodeField, CapturedLabel, CustomBarcode, CustomText, DateText, ExpiryDateText, ImeiOneBarcode, ImeiTwoBarcode, LabelCapture, LabelCaptureAdaptiveRecognitionOverlay, LabelCaptureAdaptiveRecognitionSettings, LabelCaptureAdvancedOverlay, LabelCaptureAdvancedOverlayView, LabelCaptureBasicOverlay, LabelCaptureFeedback, LabelCaptureSession, LabelCaptureSettings, LabelCaptureValidationFlowOverlay, LabelCaptureValidationFlowSettings, LabelDateComponentFormat, LabelDateFormat, LabelDateResult, LabelDefinition, LabelField, LabelFieldDefinition, LabelFieldLocation, LabelFieldLocationType, LabelFieldState, LabelFieldType, LabelFieldValueType, LabelResultUpdateType, PackingDateText, PartNumberBarcode, ReceiptScanningLineItem, ReceiptScanningResult, ScanditLabelPlugin, ScanditLabelPluginImplementation, SerialNumberBarcode, TextField, TotalPriceText, UnitPriceText, WeightText };
|