@scandit/web-datacapture-label 8.2.0-beta.1 → 8.2.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/build/js/api/CapturedLabel.js +1 -1
- package/build/js/api/CustomBarcodeBuilder.js +1 -1
- package/build/js/api/CustomTextBuilder.js +1 -1
- package/build/js/api/ExpiryDateTextBuilder.d.ts +1 -1
- package/build/js/api/ExpiryDateTextBuilder.js +1 -1
- package/build/js/api/ImeiOneBarcodeBuilder.js +1 -1
- package/build/js/api/ImeiTwoBarcodeBuilder.js +1 -1
- package/build/js/api/LabelCapture.js +1 -1
- package/build/js/api/LabelCaptureAdvancedOverlay.js +1 -1
- package/build/js/api/LabelCaptureBasicOverlay.js +1 -1
- package/build/js/api/LabelCaptureSession.js +1 -1
- package/build/js/api/LabelCaptureValidationFlowFeedback.d.ts +15 -0
- package/build/js/api/LabelCaptureValidationFlowFeedback.js +1 -0
- package/build/js/api/LabelCaptureValidationFlowOverlay.d.ts +29 -6
- package/build/js/api/LabelCaptureValidationFlowOverlay.js +1 -1
- package/build/js/api/LabelField.js +1 -1
- package/build/js/api/PartNumberBarcodeBuilder.js +1 -1
- package/build/js/api/PrivateValidationFlowHandler.js +1 -1
- package/build/js/api/SerialNumberBarcodeBuilder.js +1 -1
- package/build/js/api/ValidationFlowField.d.ts +3 -0
- package/build/js/api/ValidationFlowField.js +1 -1
- package/build/js/chunks/{chunk-2WECOW4F.js → chunk-2K4IDUBI.js} +1 -1
- package/build/js/chunks/{chunk-GOW3A5CW.js → chunk-36FUBGEZ.js} +1 -1
- package/build/js/chunks/chunk-3WFVV6LL.js +1 -0
- package/build/js/chunks/{chunk-AVU64GAK.js → chunk-5CNHCL7M.js} +1 -1
- package/build/js/chunks/{chunk-6WMMNFP2.js → chunk-5JGE6TIK.js} +1 -1
- package/build/js/chunks/chunk-6EPGEBWT.js +1 -0
- package/build/js/chunks/chunk-7LN4ULNN.js +1 -0
- package/build/js/chunks/chunk-A6QIZJQN.js +1 -0
- package/build/js/chunks/chunk-BILNKC2Q.js +1 -0
- package/build/js/chunks/{chunk-RPOZ2B2F.js → chunk-DV4WMUFU.js} +1 -1
- package/build/js/chunks/{chunk-7UMN72SD.js → chunk-IK62R3BD.js} +1 -1
- package/build/js/chunks/chunk-IXBSL67X.js +2 -0
- package/build/js/chunks/chunk-MQ3C6JQR.js +1 -0
- package/build/js/chunks/{chunk-W7XOV4H3.js → chunk-NF5D6YGW.js} +1 -1
- package/build/js/chunks/chunk-O5PVNK4O.js +1 -0
- package/build/js/chunks/{chunk-VHYYJSJM.js → chunk-PLBJGJHF.js} +1 -1
- package/build/js/chunks/{chunk-GEFDYKTD.js → chunk-RMO2SLDR.js} +1 -1
- package/build/js/chunks/{chunk-WADZQKYF.js → chunk-SQXVN7WR.js} +1 -1
- package/build/js/chunks/{chunk-H7A45TQE.js → chunk-T5PFYQ2F.js} +1 -1
- package/build/js/chunks/{chunk-QVLYUSDL.js → chunk-THXK2CAH.js} +1 -1
- package/build/js/chunks/{chunk-K44FWZYF.js → chunk-U77DVACF.js} +1 -1
- package/build/js/chunks/chunk-X6DRW2HT.js +1 -0
- package/build/js/chunks/{chunk-INKFF3U2.js → chunk-XQBJ3GXA.js} +1 -1
- package/build/js/chunks/{chunk-HTEZ5TMC.js → chunk-ZMEFT4CJ.js} +1 -1
- package/build/js/djinni-types/sdcLabelInternalModuleCapture.d.ts +1 -0
- package/build/js/index.js +1 -1
- package/build/js/moduleLoader.js +1 -1
- package/build/js/private/viewfinderTranslator.js +1 -1
- package/build/js/ui/atoms/TextInput.d.ts +10 -0
- package/build/js/ui/atoms/TextInput.js +1 -1
- package/build/js/ui/organisms/LabelCaptureValidationFlowLayout.d.ts +18 -1
- package/build/js/ui/organisms/LabelCaptureValidationFlowLayout.js +1 -1
- package/build/js/worker/LabelCaptureWorkerManager.js +1 -1
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/handlers/FieldBuilderHandler.js +1 -1
- package/build/js/worker/handlers/LabelCaptureAdvancedOverlayHandler.js +1 -1
- package/build/js/worker/handlers/LabelCaptureBasicOverlayHandler.js +1 -1
- package/build/js/worker/handlers/LabelCaptureHandler.js +1 -1
- package/build/js/worker/handlers/ReceiptScanningHandler.js +1 -1
- package/build/js/worker/handlers/SettingsHandler.js +1 -1
- package/build/js/worker/handlers/ValidationFlowHandler.js +1 -1
- package/build/js/worker/labelCapture.inlineWorker.js +1 -1
- package/build/js/worker/proxies/AimerViewfinderProxy.js +1 -1
- package/build/js/worker/proxies/BarcodeFieldProxy.js +1 -1
- package/build/js/worker/proxies/CapturedLabelProxy.js +1 -1
- package/build/js/worker/proxies/CustomBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/CustomTextProxy.js +1 -1
- package/build/js/worker/proxies/DateTextProxy.js +1 -1
- package/build/js/worker/proxies/ExpiryDateTextProxy.js +1 -1
- package/build/js/worker/proxies/ImeiOneBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/ImeiTwoBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureAdvancedOverlayProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureBasicOverlayProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureHelperProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureOverlayHelperProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureSessionProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureSettingsProxy.js +1 -1
- package/build/js/worker/proxies/LabelDefinitionProxy.js +1 -1
- package/build/js/worker/proxies/LabelFieldDefinitionProxy.js +1 -1
- package/build/js/worker/proxies/LabelFieldLocationProxy.js +1 -1
- package/build/js/worker/proxies/LabelFieldProxy.js +1 -1
- package/build/js/worker/proxies/NativeProxy.js +1 -1
- package/build/js/worker/proxies/NoViewfinderProxy.js +1 -1
- package/build/js/worker/proxies/PackingDateTextProxy.js +1 -1
- package/build/js/worker/proxies/PartNumberBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/ReceiptScanningOverlayProxy.js +1 -1
- package/build/js/worker/proxies/ReceiptScanningSettingsProxy.js +1 -1
- package/build/js/worker/proxies/RectangularViewfinderAnimationProxy.js +1 -1
- package/build/js/worker/proxies/RectangularViewfinderProxy.js +1 -1
- package/build/js/worker/proxies/SerialNumberBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/TotalPriceTextProxy.js +1 -1
- package/build/js/worker/proxies/UnitPriceTextProxy.js +1 -1
- package/build/js/worker/proxies/ValidationFlowListenerProxy.js +1 -1
- package/build/js/worker/proxies/ValidationFlowOverlayProxy.js +1 -1
- package/build/js/worker/proxies/ValidationFlowSettingsProxy.js +1 -1
- package/build/js/worker/proxies/WeightTextProxy.js +1 -1
- package/build/js/worker/proxies/base/BarcodeFieldProxyBase.js +1 -1
- package/build/js/worker/proxies/base/LabelFieldDefinitionBaseProxy.js +1 -1
- package/build/js/worker/proxies/base/index.js +1 -1
- package/package.json +3 -3
- package/sdc-lib/scandit-datacapture-sdk-label-pthreads.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-label-pthreads.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-label-simd-pthreads.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-label-simd-pthreads.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-label-simd.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-label-simd.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-label.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-label.wasm +0 -0
- package/build/js/chunks/chunk-6GCZVUBU.js +0 -1
- package/build/js/chunks/chunk-6O4CVQF2.js +0 -1
- package/build/js/chunks/chunk-E2ZQGWKI.js +0 -1
- package/build/js/chunks/chunk-GYKCTYW2.js +0 -1
- package/build/js/chunks/chunk-IU34OFUF.js +0 -2
- package/build/js/chunks/chunk-JTZCA3DV.js +0 -1
- package/build/js/chunks/chunk-SUEFKTEN.js +0 -1
- package/build/js/chunks/chunk-WR7V5D4H.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as CapturedLabel}from'../chunks/chunk-
|
|
1
|
+
export{a as CapturedLabel}from'../chunks/chunk-36FUBGEZ.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as CustomBarcodeBuilder}from'../chunks/chunk-
|
|
1
|
+
export{a as CustomBarcodeBuilder}from'../chunks/chunk-T5PFYQ2F.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as CustomTextBuilder}from'../chunks/chunk-
|
|
1
|
+
export{a as CustomTextBuilder}from'../chunks/chunk-DV4WMUFU.js';
|
|
@@ -39,8 +39,8 @@ import './ReceiptScanningLineItem.js';
|
|
|
39
39
|
import './ValidationFlowField.js';
|
|
40
40
|
import './TextField.js';
|
|
41
41
|
import './LabelFieldDefinition.js';
|
|
42
|
-
import './LabelDateComponentFormat.js';
|
|
43
42
|
import './LabelFieldDefinitionBuilder.js';
|
|
43
|
+
import './LabelDateComponentFormat.js';
|
|
44
44
|
|
|
45
45
|
declare class ExpiryDateTextBuilder extends TextFieldBuilder<ExpiryDateTextBuilder, ExpiryDateText> {
|
|
46
46
|
private anchorRegexes?;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ExpiryDateTextBuilder}from'../chunks/chunk-
|
|
1
|
+
export{a as ExpiryDateTextBuilder}from'../chunks/chunk-U77DVACF.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ImeiOneBarcodeBuilder}from'../chunks/chunk-
|
|
1
|
+
export{a as ImeiOneBarcodeBuilder}from'../chunks/chunk-THXK2CAH.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ImeiTwoBarcodeBuilder}from'../chunks/chunk-
|
|
1
|
+
export{a as ImeiTwoBarcodeBuilder}from'../chunks/chunk-ZMEFT4CJ.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as LabelCapture}from'../chunks/chunk-
|
|
1
|
+
export{a as LabelCapture}from'../chunks/chunk-NF5D6YGW.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as LabelCaptureAdvancedOverlay}from'../chunks/chunk-
|
|
1
|
+
export{a as LabelCaptureAdvancedOverlay}from'../chunks/chunk-5JGE6TIK.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as LabelCaptureBasicOverlay}from'../chunks/chunk-
|
|
1
|
+
export{a as LabelCaptureBasicOverlay}from'../chunks/chunk-XQBJ3GXA.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as LabelCaptureSession}from'../chunks/chunk-
|
|
1
|
+
export{a as LabelCaptureSession}from'../chunks/chunk-2K4IDUBI.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FeedbackJSON, Feedback } from '@scandit/web-datacapture-core';
|
|
2
|
+
import { Serializable } from '@scandit/web-datacapture-core/build/js/private/Serializable';
|
|
3
|
+
|
|
4
|
+
interface LabelCaptureValidationFlowFeedbackJSON {
|
|
5
|
+
scan: FeedbackJSON;
|
|
6
|
+
adaptiveRecognitionResult: FeedbackJSON;
|
|
7
|
+
}
|
|
8
|
+
declare class LabelCaptureValidationFlowFeedback implements Serializable<LabelCaptureValidationFlowFeedbackJSON> {
|
|
9
|
+
scan: Feedback;
|
|
10
|
+
adaptiveRecognitionResult: Feedback;
|
|
11
|
+
constructor();
|
|
12
|
+
toJSONObject(): LabelCaptureValidationFlowFeedbackJSON;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { LabelCaptureValidationFlowFeedback, type LabelCaptureValidationFlowFeedbackJSON };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as LabelCaptureValidationFlowFeedback}from'../chunks/chunk-O5PVNK4O.js';
|
|
@@ -80,12 +80,11 @@ declare class LabelCaptureValidationFlowOverlay implements DataCaptureOverlay, S
|
|
|
80
80
|
private onClearAllButtonClickedHandler;
|
|
81
81
|
private onSubmitButtonClickedHandler;
|
|
82
82
|
private onPauseButtonClickedHandler;
|
|
83
|
+
private onValidationFlowLayoutChangeHandler;
|
|
83
84
|
private onTextInputScanIconClickHandler;
|
|
84
85
|
private onTextInputClearIconClickHandler;
|
|
85
86
|
private onTextInputKeydownHandler;
|
|
86
87
|
private currentInput;
|
|
87
|
-
private isProcessingFocus;
|
|
88
|
-
private isProcessingBlur;
|
|
89
88
|
private onTextInputFocusHandler;
|
|
90
89
|
private onTextInputBlurHandler;
|
|
91
90
|
private onClickedOutsideListHandler;
|
|
@@ -93,7 +92,11 @@ declare class LabelCaptureValidationFlowOverlay implements DataCaptureOverlay, S
|
|
|
93
92
|
private dataCaptureViewRoot;
|
|
94
93
|
private isCloudBackupProcessing;
|
|
95
94
|
private dataCaptureView;
|
|
95
|
+
private feedback_;
|
|
96
|
+
private beforeMountScanArea;
|
|
97
|
+
private originalLabelCaptureFeedback;
|
|
96
98
|
private get camera();
|
|
99
|
+
private get feedback();
|
|
97
100
|
static withLabelCaptureForView(labelCapture: LabelCapture, dataCaptureView: DataCaptureView): Promise<LabelCaptureValidationFlowOverlay>;
|
|
98
101
|
applySettings(settings: LabelCaptureValidationFlowSettings): Promise<void>;
|
|
99
102
|
private constructor();
|
|
@@ -104,6 +107,7 @@ declare class LabelCaptureValidationFlowOverlay implements DataCaptureOverlay, S
|
|
|
104
107
|
* Cleans up all resources
|
|
105
108
|
*/
|
|
106
109
|
private unmount;
|
|
110
|
+
private onValidationFlowLayoutChange;
|
|
107
111
|
private onClearAllButtonClicked;
|
|
108
112
|
private onSubmitButtonClicked;
|
|
109
113
|
private onPauseButtonClicked;
|
|
@@ -118,20 +122,39 @@ declare class LabelCaptureValidationFlowOverlay implements DataCaptureOverlay, S
|
|
|
118
122
|
private onTextInputClearIconClick;
|
|
119
123
|
private onTextInputFocus;
|
|
120
124
|
private onTextInputBlur;
|
|
121
|
-
private
|
|
122
|
-
private
|
|
125
|
+
private refocusInputForCorrection;
|
|
126
|
+
private restoreLayoutAndHideKeyboard;
|
|
123
127
|
private restoreButtonsBasedOnState;
|
|
124
128
|
private onTextInputKeydown;
|
|
129
|
+
/**
|
|
130
|
+
* Cancels all ongoing cloud backup tasks for fields that are currently being processed
|
|
131
|
+
*/
|
|
132
|
+
private cancelAllCloudBackupTasks;
|
|
133
|
+
private cancelSpecificCloudBackupTask;
|
|
134
|
+
private unCancelSpecificCloudBackupTask;
|
|
125
135
|
private standByCamera;
|
|
126
136
|
private activateCamera;
|
|
127
137
|
private handleLabelIsMissingRequiredFieldState;
|
|
128
138
|
private handleOnFieldsScanned;
|
|
129
139
|
private enableSubmitButtonIfNeeded;
|
|
140
|
+
/**
|
|
141
|
+
* Update scan icon visibility based on input state.
|
|
142
|
+
* Logic: showScanIcon = !scanningState && (isFocused || isEmpty)
|
|
143
|
+
* Where scanningState = ValidationFlowState.IN_PARTIAL_SCAN || ValidationFlowState.IN_COMPLETE_SCAN || isCloudBackupProcessing
|
|
144
|
+
*
|
|
145
|
+
* Rules:
|
|
146
|
+
* - If scanning locally (camera active): ALWAYS hide scan icon
|
|
147
|
+
* - If NOT scanning locally:
|
|
148
|
+
* - If field is focused: show scan icon
|
|
149
|
+
* - If field is NOT focused AND filled: hide scan icon
|
|
150
|
+
* - If field is NOT focused AND empty: show scan icon
|
|
151
|
+
*/
|
|
152
|
+
private updateScanIconVisibility;
|
|
130
153
|
private updateInput;
|
|
131
154
|
private updateFieldValueAndState;
|
|
132
155
|
private handleScanTimeout;
|
|
133
|
-
private
|
|
134
|
-
private
|
|
156
|
+
private updateInputsLoadingState;
|
|
157
|
+
private updateInputsCloudBackupState;
|
|
135
158
|
private handleInPauseScan;
|
|
136
159
|
private handleInCompleteScan;
|
|
137
160
|
private handleInPartialScan;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as LabelCaptureValidationFlowOverlay}from'../chunks/chunk-
|
|
1
|
+
export{a as LabelCaptureValidationFlowOverlay}from'../chunks/chunk-X6DRW2HT.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as LabelField}from'../chunks/chunk-
|
|
1
|
+
export{a as LabelField}from'../chunks/chunk-MQ3C6JQR.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as PartNumberBarcodeBuilder}from'../chunks/chunk-
|
|
1
|
+
export{a as PartNumberBarcodeBuilder}from'../chunks/chunk-RMO2SLDR.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as PrivateValidationFlowHandler}from'../chunks/chunk-
|
|
1
|
+
export{a as PrivateValidationFlowHandler}from'../chunks/chunk-IK62R3BD.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SerialNumberBarcodeBuilder}from'../chunks/chunk-
|
|
1
|
+
export{a as SerialNumberBarcodeBuilder}from'../chunks/chunk-5CNHCL7M.js';
|
|
@@ -9,13 +9,16 @@ import './LabelDateResult.js';
|
|
|
9
9
|
interface ValidationFlowFieldJSON {
|
|
10
10
|
labelField: LabelFieldJSON;
|
|
11
11
|
valid: boolean;
|
|
12
|
+
isProcessingInCloud: boolean;
|
|
12
13
|
}
|
|
13
14
|
declare class ValidationFlowField {
|
|
14
15
|
private readonly labelField;
|
|
15
16
|
private readonly valid;
|
|
17
|
+
private readonly processingInCloud;
|
|
16
18
|
private constructor();
|
|
17
19
|
getLabelField(): LabelField;
|
|
18
20
|
isValid(): boolean;
|
|
21
|
+
isProcessingInCloud(): boolean;
|
|
19
22
|
private toJSONObject;
|
|
20
23
|
private static fromJSONObject;
|
|
21
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ValidationFlowField}from'../chunks/chunk-
|
|
1
|
+
export{a as ValidationFlowField}from'../chunks/chunk-A6QIZJQN.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-36FUBGEZ.js';var t=class s{get lastProcessedFrameId(){return this._lastProcessedFrameId}get frameSequenceId(){return this._frameSequenceId}get capturedLabels(){return this._capturedLabels}get canShowLocations(){return this._canShowLocations}static fromJSON(a$1){let e=new s;return e._canShowLocations=a$1.canShowLocations,e._lastProcessedFrameId=a$1.lastFrameId,e._frameSequenceId=a$1.frameSequenceId,e._capturedLabels=a$1.labels.map(n=>a.fromJSON(n)),e}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-MQ3C6JQR.js';import {Quadrilateral}from'@scandit/web-datacapture-core';var r=class d{get fields(){return this._fields}get name(){return this._name}get isComplete(){return this._isComplete}get predictedBounds(){return this._predictedBounds}get deltaTimeToPrediction(){return this._deltaTimeToPrediction}get trackingId(){return this._trackingId}static fromJSON(e){let t=new d;return t._fields=e.fields.map(a$1=>a.fromJSON(a$1)),t._name=e.name,t._isComplete=e.isComplete,t._predictedBounds=Quadrilateral.fromJSON(e.predictedBounds),t._deltaTimeToPrediction=e.deltaTimeToPrediction,t._trackingId=e.trackingId,t}toJSONObject(){return {fields:this._fields.map(e=>e.toJSONObject()),name:this._name,isComplete:this._isComplete,predictedBounds:this._predictedBounds.toJSONObject(),deltaTimeToPrediction:this._deltaTimeToPrediction,trackingId:this._trackingId}}};export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {BrowserHelper}from'@scandit/web-datacapture-core';import {Color}from'@scandit/web-datacapture-core/build/js/commons/Color.js';import {CrossSvgIcon}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/CrossSvgIcon.js';import {ScanSvgIcon}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/ScanSvgIcon.js';import {grays,reds}from'@scandit/web-datacapture-core/build/js/private/ui/colors.js';import {html,ScanditHTMLElement,css,Timeout,defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var E=(n=>(n.Input="scandit-text-input-input",n.Focus="scandit-text-input-focus",n.Blur="scandit-text-input-blur",n.Clear="scandit-text-input-clear",n.Scan="scandit-text-input-scan",n))(E||{}),y=html`<div class="main-wrapper"><label class="label-text"></label><div class="input-container"><input class="input" autocomplete="off"><div class="icons-container"><div id="icon-left"></div><hr class="icon-divider"><div id="icon-right"></div></div></div><div class="hint-message"></div></div>`,a=class a extends ScanditHTMLElement{constructor(){super();this._inputElement=null;this._labelElement=null;this._mainWrapper=null;this._inputContainer=null;this._iconContainerElement=null;this._hintMessageElement=null;this._type="text";this._value="";this._label="";this._placeholder="";this._required=false;this._isInitialized=false;this._handleChange=this._onChange.bind(this);this._handleInput=this._onInput.bind(this);this._handleFocus=this._onFocus.bind(this);this._handleBlur=this._onBlur.bind(this);this._handleCrossIconPointerDown=this._onCrossIconPointerDown.bind(this);this._handleCrossIconPointerUp=this._onCrossIconPointerUp.bind(this);this._handleCrossIconKeyDown=this._onCrossIconKeyDown.bind(this);this._handleScanIconPointerDown=this._onScanIconPointerDown.bind(this);this._handleScanIconPointerUp=this._onScanIconPointerUp.bind(this);this._handleScanIconKeyDown=this._onScanIconKeyDown.bind(this);this._crossIcon=null;this._scanIcon=null;this._showKeyboardTimeout=void 0;this._hintMessage="";this._loadingText="";this._useVirtualKeyboardAPI=false;this._virtualKeyboard=null;this._viewportMetaTag=null;this._originalViewportContent=null;this._internals=this.attachInternals();let t=this.attachShadow({mode:"open"});t.innerHTML=y,t.appendChild(a.createStyleElement()),this._inputElement=t.querySelector(".input"),this._labelElement=t.querySelector(".label-text"),this._mainWrapper=t.querySelector(".main-wrapper"),this._inputContainer=t.querySelector(".input-container"),this._iconContainerElement=t.querySelector(".icons-container"),this._hintMessageElement=t.querySelector(".hint-message");}static createStyleElement(){return css`:host{display:block;-webkit-tap-highlight-color:transparent;scroll-margin-bottom:100px}input{background-color:initial;border:none;font-size:1rem;font-style:normal;font-weight:400;outline:none;padding:0;-webkit-tap-highlight-color:transparent;-webkit-appearance:none;appearance:none;color:#${grays.gray60.toJSON()};transition:color .2s ease-in-out;user-select:none;-webkit-user-select:none;width:100%}input::placeholder{color:#${grays.gray30.toJSON()};opacity:1}:host([has-value]) input{color:#${grays.gray90.toJSON()}}input:focus,input:focus-visible{color:#${grays.gray90.toJSON()};outline:none}:host([disabled]) .hint-message,:host([disabled]) .label-text,:host([disabled]) input{color:#${grays.gray30.toJSON()}}:host([disabled]) .input-container{border-color:#${grays.gray5.toJSON()}}.main-wrapper{cursor:pointer;display:flex;flex-direction:column;flex-grow:1;gap:.25rem;padding:0 1px}.hint-message,.label-text{font-style:normal;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hint-message{font-size:.75rem;min-height:.875rem;transition:opacity .2s ease-in-out}.label-text{color:#${grays.gray60.toJSON()};font-size:.875rem}:host(:hover:not([disabled]):not([readonly])) .input-container{background-color:#${grays.gray5.toJSON()};border-color:#${grays.gray20.toJSON()}}.input-container{background-color:#${grays.gray5.toJSON()};border:1px solid #${grays.gray10.toJSON()};border-radius:4px;box-shadow:0 0 0 1px #0000;display:flex;flex-direction:row;gap:.5rem;justify-content:space-evenly;min-height:1.5rem;padding:.5rem .75rem;transition:border-color .2s ease-in-out,background-color .2s ease-in-out,box-shadow .2s ease-in-out}.icons-container{align-items:center;display:flex;gap:.5rem;justify-content:center}:host([has-value][focused]) .icons-container .icon-divider{opacity:1}:host ${CrossSvgIcon.tag}{opacity:0;pointer-events:none;transition:opacity .2s ease-in-out}:host([has-value][focused]) ${CrossSvgIcon.tag}{opacity:1;pointer-events:auto}:host([hide-scan-icon]) .icons-container .icon-divider,:host([hide-scan-icon]) ${ScanSvgIcon.tag}{display:none}.icons-container .icon-divider{background-color:#${grays.gray20.toJSON()};border:none;height:100%;margin:0;opacity:0;padding:0;transition:opacity .2s ease-in-out;width:1px}:host([disabled]) .icons-container,:host([readonly]) .icons-container{display:none}:host([disabled]),:host([readonly]){cursor:not-allowed;pointer-events:none}:host([focused]:not([disabled]):not([readonly])) .input-container{border-color:#${grays.gray90.toJSON()};box-shadow:0 0 0 1px #${grays.gray90.toJSON()}}:host([invalid]) .input-container{background-color:#${reds.red5.toJSON()};border-color:#${reds.red30.toJSON()};box-shadow:0 0 0 1px #${reds.red30.toJSON()}}:host([invalid][focused]) .input-container{background-color:#${reds.red5.toJSON()}!important;border-color:#${reds.red60.toJSON()}!important;box-shadow:0 0 0 1px #${reds.red60.toJSON()}!important}:host(:hover[invalid]:not([focused])) .input-container{background-color:#${reds.red5.toJSON()}!important;border-color:#${reds.red30.toJSON()}!important;box-shadow:0 0 0 1px #${reds.red30.toJSON()}!important}:host([invalid]) .hint-message{color:#${reds.red60.toJSON()}}:host([loading]) .input{animation:loading-shimmer 2.5s linear infinite;background:linear-gradient(90deg,#0000004d,#000c 40%,#000 50%,#000c 60%,#0000004d);background-clip:text;-webkit-background-clip:text;background-size:200% 100%;color:#000;color:#0000}@keyframes loading-shimmer{0%{background-position-x:-100%}to{background-position-x:100%}}`}get hintMessage(){var t;return ((t=this._hintMessageElement)==null?void 0:t.textContent)||""}set hintMessage(t){this.invalid?this._setValidityState({customError:true},t):(this._hintMessage=t,this._hintMessageElement&&(this._hintMessageElement.textContent=t));}get loading(){return this.hasAttribute("loading")}set loading(t){this.toggleAttribute("loading",t),this._updateInputDisplay();}get loadingText(){return this._loadingText}set loadingText(t){this._loadingText=t,this._updateInputDisplay();}get value(){return this._value}set value(t){if(this._value=t,this._inputElement){let e=t.length>0;this.toggleAttribute("has-value",e),this._updateCrossIconTabIndex(),this._internals.setFormValue(t),this._updateInputDisplay(),this._required&&e&&this.invalid&&this._setValidityState({});}}get name(){var t;return this.getAttribute("name")||((t=this._inputElement)==null?void 0:t.name)||""}set name(t){var e;t?this.setAttribute("name",t):this.removeAttribute("name"),this._inputElement&&this._labelElement&&((e=this._labelElement)==null||e.setAttribute("for",t),this._inputElement.name=t,this._inputElement.id=t);}get type(){return this._type}set type(t){this._type=t,this._inputElement&&(this._type==="number"?(this._inputElement.type="number",this._inputElement.inputMode="numeric"):this._inputElement.type="text");}get label(){return this._label}set label(t){this._label=t,this._labelElement&&(this._labelElement.textContent=t||"");}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,t?this.setAttribute("placeholder",t):this.removeAttribute("placeholder"),this._inputElement&&(this._inputElement.placeholder=t);}get required(){var t,e,i;return (i=(e=(t=this._inputElement)==null?void 0:t.required)!=null?e:this._required)!=null?i:false}set required(t){this._required=t,this.toggleAttribute("required",t),this._inputElement&&(this._inputElement.required=t,this._inputElement.setAttribute("aria-required",String(t))),this._isInitialized&&t&&!this._value&&this._setValidityState({valueMissing:true},"This field is required");}get invalid(){return this.hasAttribute("invalid")}set invalid(t){t?this._setValidityState({customError:true},this._hintMessage):this._setValidityState({});}set readOnly(t){this.toggleAttribute("readonly",t),this._inputElement&&(this._inputElement.readOnly=t);}get readOnly(){return this.hasAttribute("readonly")}set disabled(t){this.toggleAttribute("disabled",t),this._inputElement&&(this._inputElement.disabled=t),this._internals.setFormValue(this._value);}get disabled(){return this.hasAttribute("disabled")}set useVirtualKeyboardAPI(t){t&&!this._useVirtualKeyboardAPI?(this._useVirtualKeyboardAPI=true,this._setupVirtualKeyboardAPI()):!t&&this._useVirtualKeyboardAPI&&(this._useVirtualKeyboardAPI=false,this._inputElement&&this._inputElement.removeAttribute("virtualkeyboardpolicy"),this._virtualKeyboard=null);}get useVirtualKeyboardAPI(){return this._useVirtualKeyboardAPI}set hideScanIcon(t){this.toggleAttribute("hide-scan-icon",t);}get hideScanIcon(){return this.hasAttribute("hide-scan-icon")}set backgroundColor(t){this._inputContainer&&(this._inputContainer.style.backgroundColor=t instanceof Color?`#${t.toJSON()}`:t);}checkValidity(){return this._inputElement?this._inputElement.validity.valid:true}reportValidity(){return this._internals.reportValidity()}setValidationState(t,e){var i;if(t)this._setValidityState({});else {let n=e!==void 0?e:"";this._setValidityState({customError:true},n);}(i=this._mainWrapper)==null||i.classList.add("validation-triggered");}resetValidation(){var t;this._setValidityState({}),(t=this._mainWrapper)==null||t.classList.remove("validation-triggered");}setCustomValidity(t){this._inputElement&&(this._inputElement.setCustomValidity(t),t.length>0?this._setValidityState({customError:true},t):this._setValidityState({}));}_setValidityState(t,e=""){var n;let i=Object.values(t).some(o=>o===true);if(this.toggleAttribute("invalid",i),i){let o=e||"This field is invalid";this._internals.setValidity(t,o);}else this._internals.setValidity({});if(this._hintMessage=e,this._hintMessageElement&&(this._hintMessageElement.textContent=e||""),this._inputElement)if(this._inputElement.setAttribute("aria-invalid",String(i)),i&&e){let o=`${this._inputElement.id||"text-input"}-hint`;(n=this._hintMessageElement)==null||n.setAttribute("id",o),this._inputElement.setAttribute("aria-describedby",o);}else this._inputElement.removeAttribute("aria-describedby");}_onInput(t){if(!this._inputElement)return;let i=t.target.value,n=i.length>0;this.toggleAttribute("has-value",n),this.value=i,this._updateCrossIconTabIndex(),this.invalid&&this.resetValidation(),this.dispatchEvent(new CustomEvent("scandit-text-input-input",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}_onChange(t){if(!this._inputElement)return;let i=t.target.value;this.value=i;let n=i.length>0;this.toggleAttribute("has-value",n);}_onFocus(t){this.setAttribute("focused",""),this._updateCrossIconTabIndex(),this._disableViewportZoom(),this.dispatchEvent(new CustomEvent("scandit-text-input-focus",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}_onBlur(t){this.removeAttribute("focused"),this._updateCrossIconTabIndex(),this._restoreViewportZoom(),this.dispatchEvent(new CustomEvent("scandit-text-input-blur",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}focus(t){this._inputElement&&this._inputElement.focus(t);}showKeyboard({scrollTimeout:t=350}={}){return new Promise(e=>{var i;if(!this._inputElement){e();return}if(this._useVirtualKeyboardAPI&&this._virtualKeyboard){this._virtualKeyboard.overlaysContent=true,this._virtualKeyboard.show(),this.focus(),this.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),e();return}(i=this._showKeyboardTimeout)==null||i.stop(),this.focus(),this._showKeyboardTimeout=new Timeout(t,()=>{this.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),e();}),this._showKeyboardTimeout.start();})}hideKeyboard(){this._virtualKeyboard&&this._useVirtualKeyboardAPI?this._virtualKeyboard.hide():this.blur();}select(){var t,e;(e=(t=this._inputElement)==null?void 0:t.select)==null||e.call(t);}blur(){var t,e;(e=(t=this._inputElement)==null?void 0:t.blur)==null||e.call(t);}scrollIntoView(t){super.scrollIntoView(t);}_disableViewportZoom(){if(this._viewportMetaTag||(this._viewportMetaTag=document.querySelector("meta[name='viewport']")),this._viewportMetaTag){this._originalViewportContent===null&&(this._originalViewportContent=this._viewportMetaTag.getAttribute("content")||"");let t=this._viewportMetaTag.getAttribute("content")||"";if(!t.includes("maximum-scale=1")){let e=`${t}, maximum-scale=1, user-scalable=no`;this._viewportMetaTag.setAttribute("content",e);}}}_restoreViewportZoom(){this._viewportMetaTag&&this._originalViewportContent!==null&&this._viewportMetaTag.setAttribute("content",this._originalViewportContent);}_initializeIcons(){var i,n;CrossSvgIcon.register(),ScanSvgIcon.register();let t=(i=this._iconContainerElement)==null?void 0:i.querySelector("#icon-left");t&&(this._crossIcon=CrossSvgIcon.create(),this._crossIcon.size=20,this._crossIcon.setAttribute("aria-label","Clear input"),this._crossIcon.setAttribute("role","button"),this._updateCrossIconTabIndex(),t.replaceWith(this._crossIcon));let e=(n=this._iconContainerElement)==null?void 0:n.querySelector("#icon-right");e&&(this._scanIcon=ScanSvgIcon.create(),this._scanIcon.size=20,this._scanIcon.setAttribute("aria-label","Scan barcode"),this._scanIcon.setAttribute("role","button"),this._scanIcon.setAttribute("tabindex","0"),e.replaceWith(this._scanIcon));}_updateCrossIconTabIndex(){if(!this._crossIcon||!this._scanIcon)return;this.hasAttribute("has-value")?(this._crossIcon.setAttribute("tabindex","0"),this._scanIcon.setAttribute("tabindex","0")):(this._crossIcon.setAttribute("tabindex","-1"),this._scanIcon.setAttribute("tabindex","0"));}_updateInputDisplay(){this._inputElement&&(this.loading&&this._loadingText?this._inputElement.value=this._loadingText:this._inputElement.value=this._value);}connectedCallback(){this._initializeAttributesFromElement(),this._initializeIcons(),this._addEventListeners(),this._useVirtualKeyboardAPI&&this._setupVirtualKeyboardAPI(),this._isInitialized=true;}_initializeAttributesFromElement(){if(this.hasAttribute("name")&&(this.name=this.getAttribute("name")||""),this.hasAttribute("label")&&(this.label=this.getAttribute("label")||""),this.hasAttribute("placeholder")&&(this.placeholder=this.getAttribute("placeholder")||""),this.hasAttribute("type")){let t=this.getAttribute("type");(t==="text"||t==="number")&&(this.type=t);}this.hasAttribute("value")&&(this.value=this.getAttribute("value")||""),this.hasAttribute("required")&&(this.required=this.getAttribute("required")!==null),this.hasAttribute("invalid")&&(this.invalid=this.getAttribute("invalid")!==null),this.hasAttribute("hide-scan-icon")&&(this.hideScanIcon=this.getAttribute("hide-scan-icon")!==null),this._hintMessageElement&&(this.hintMessage=this._hintMessage||"");}_setupVirtualKeyboardAPI(){BrowserHelper.hasVirtualKeyboardSupport()&&(this._virtualKeyboard=navigator.virtualKeyboard,this._inputElement&&this._inputElement.setAttribute("virtualkeyboardpolicy","manual"));}disconnectedCallback(){var t,e;this._isInitialized=false,this._removeEventListeners(),(t=this._crossIcon)==null||t.remove(),(e=this._scanIcon)==null||e.remove(),this._useVirtualKeyboardAPI=false,this._virtualKeyboard=null;}formAssociatedCallback(t){}formDisabledCallback(t){this.disabled=t;}formResetCallback(){this.value=this.getAttribute("value")||"",this.resetValidation();}_addEventListeners(){var t,e,i,n,o,l;this._inputElement&&(this._inputElement.addEventListener("input",this._handleInput),this._inputElement.addEventListener("change",this._handleChange),this._inputElement.addEventListener("focus",this._handleFocus),this._inputElement.addEventListener("blur",this._handleBlur),(t=this._crossIcon)==null||t.addEventListener("pointerdown",this._handleCrossIconPointerDown,{capture:true}),(e=this._crossIcon)==null||e.addEventListener("pointerup",this._handleCrossIconPointerUp),(i=this._crossIcon)==null||i.addEventListener("keydown",this._handleCrossIconKeyDown),(n=this._scanIcon)==null||n.addEventListener("pointerdown",this._handleScanIconPointerDown,{capture:true}),(o=this._scanIcon)==null||o.addEventListener("pointerup",this._handleScanIconPointerUp),(l=this._scanIcon)==null||l.addEventListener("keydown",this._handleScanIconKeyDown));}_removeEventListeners(){var t,e,i,n,o,l;this._inputElement&&(this._inputElement.removeEventListener("input",this._handleInput),this._inputElement.removeEventListener("change",this._handleChange),this._inputElement.removeEventListener("focus",this._handleFocus),this._inputElement.removeEventListener("blur",this._handleBlur),(t=this._crossIcon)==null||t.removeEventListener("pointerdown",this._handleCrossIconPointerDown),(e=this._crossIcon)==null||e.removeEventListener("pointerup",this._handleCrossIconPointerUp),(i=this._crossIcon)==null||i.removeEventListener("keydown",this._handleCrossIconKeyDown),(n=this._scanIcon)==null||n.removeEventListener("pointerdown",this._handleScanIconPointerDown),(o=this._scanIcon)==null||o.removeEventListener("pointerup",this._handleScanIconPointerUp),(l=this._scanIcon)==null||l.removeEventListener("keydown",this._handleScanIconKeyDown));}_onCrossIconPointerDown(t){t&&t.preventDefault();}_onCrossIconPointerUp(t){!t||!this._crossIcon||(t.preventDefault(),this._triggerClear());}_onCrossIconKeyDown(t){!t||!this._crossIcon||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),this._triggerClear());}_onScanIconPointerDown(t){t&&(t.preventDefault(),t.stopPropagation());}_onScanIconPointerUp(t){!t||!this._scanIcon||(t.preventDefault(),t.stopPropagation(),this._triggerScan());}_triggerClear(){this.dispatchEvent(new CustomEvent("scandit-text-input-clear",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}_onScanIconKeyDown(t){!t||!this._scanIcon||(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),this._triggerScan());}_triggerScan(){this.dispatchEvent(new CustomEvent("scandit-text-input-scan",{bubbles:true,composed:true,detail:{target:this,innerInput:this._inputElement,value:this._value}}));}static create(){return document.createElement(a.tag)}static register(){defineCustomElements({[a.tag]:a});}};a.tag="scandit-text-input",a.formAssociated=true;var c=a;export{E as a,c as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-UDGNT475.js';import {a}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-UDGNT475.js';import {a as a$1}from'./chunk-SYDG6PPD.js';import {a}from'./chunk-WX63L6GU.js';var o=class extends a{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}async build(e){let a=await a$1().workerCommand("labelCaptureBuildSerialNumberBarcode",{payload:{name:e,dataTypePatterns:this.anchorRegexes,hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,symbologies:this.symbologies}}),r=a$2.forHandle(a);return r._isOptional=this._isOptional,r._name=e,r._valueRegexes=this.valueRegexes,r._symbologies=this.symbologySettings,r}getThis(){return this}};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-2K4IDUBI.js';import {a}from'./chunk-SYDG6PPD.js';import {PointWithUnit,NumberWithUnit,MeasureUnit,Anchor}from'@scandit/web-datacapture-core';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var m=class m{constructor(e){this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.defaultOffset=new PointWithUnit(new NumberWithUnit(0,MeasureUnit.Pixel),new NumberWithUnit(0,MeasureUnit.Pixel));this._viewForCapturedLabelMap=new Map;this._viewForCapturedLabelFieldMap=new Map;this._anchorForCapturedLabelMap=new Map;this._offsetForCapturedLabelMap=new Map;this._offsetForCapturedLabelFieldMap=new Map;this._anchorForCapturedLabelFieldMap=new Map;this.listener=null;this[nativeHandle]=e;}static async withLabelCaptureForView(e,a$1){let t=await a().workerCommand("labelCaptureAdvancedOverlayForLabelCapture",{payload:{labelCaptureHandle:e[nativeHandle]}}),i=new m(t);return i._dataCaptureView=a$1,await a$1.addOverlay(i),a().addWorkerListener(i.onWorkerMessageHandler),i}keyForCapturedLabelField(e,a){return `${e.trackingId}-${e.name}-${a.name}`}async setShouldShowScanAreaGuides(e){return await a().workerCommand("labelCaptureAdvancedOverlaySetShouldShowScanAreaGuides",{payload:{labelCaptureAdvancedOverlayHandle:this[nativeHandle],show:e}})}async getShouldShowScanAreaGuides(){return await a().workerCommand("labelCaptureAdvancedOverlayGetShouldShowScanAreaGuides",{payload:{labelCaptureAdvancedOverlayHandle:this[nativeHandle]}})}setViewForCapturedLabel(e,a){if(a==null){this._viewForCapturedLabelMap.set(e.name,null);return}this._viewForCapturedLabelMap.has(e.name)||this._viewForCapturedLabelMap.set(e.name,a);}setAnchorForCapturedLabel(e,a){this._anchorForCapturedLabelMap.set(e.name,a);}setOffsetForCapturedLabel(e,a){this._offsetForCapturedLabelMap.set(e.name,a);}setViewForCapturedLabelField(e,a,t){let i=this.keyForCapturedLabelField(a,e);if(t==null){this._viewForCapturedLabelFieldMap.set(i,null);return}this._viewForCapturedLabelFieldMap.has(i)||this._viewForCapturedLabelFieldMap.set(i,t);}setAnchorForCapturedLabelField(e,a,t){this._anchorForCapturedLabelFieldMap.set(this.keyForCapturedLabelField(a,e),t);}setOffsetForCapturedLabelField(e,a,t){this._offsetForCapturedLabelFieldMap.set(this.keyForCapturedLabelField(a,e),t);}clearCapturedLabelViews(){this._viewForCapturedLabelMap.clear(),this._viewForCapturedLabelFieldMap.clear(),this._dataCaptureView.renderCustomLocationsView({elements:[]});}onWorkerMessage(e){e.type==="labelCaptureOnSessionUpdated"&&this.update(a$1.fromJSON(e.payload.session));}handleUpdateField(e){var t,i,u,o,b,h,n,C;let a=[];for(let r of e.fields){let l=this.keyForCapturedLabelField(e,r),p=(u=this._viewForCapturedLabelFieldMap.get(l))!=null?u:(i=(t=this.listener)==null?void 0:t.viewForCapturedLabelField)==null?void 0:i.call(t,this,r),s=(h=this._anchorForCapturedLabelFieldMap.get(l))!=null?h:(b=(o=this.listener)==null?void 0:o.anchorForCapturedLabelField)==null?void 0:b.call(o,this,r),L=this._offsetForCapturedLabelFieldMap.get(l);L==null&&p!=null&&(L=(C=(n=this.listener)==null?void 0:n.offsetForCapturedLabelField)==null?void 0:C.call(n,this,r,p)),a.push({identifier:l,anchorPositions:r.anchorPositions,view:p!=null?p:null,anchor:s!=null?s:Anchor.BottomCenter,offset:L!=null?L:this.defaultOffset});}return a}update(e){var t,i,u,o,b,h,n,C;let a=[];for(let r of e.capturedLabels){let l=(u=this._viewForCapturedLabelMap.get(r.name))!=null?u:(i=(t=this.listener)==null?void 0:t.viewForCapturedLabel)==null?void 0:i.call(t,this,r),p=(h=this._anchorForCapturedLabelMap.get(r.name))!=null?h:(b=(o=this.listener)==null?void 0:o.anchorForCapturedLabel)==null?void 0:b.call(o,this,r),s=this._offsetForCapturedLabelMap.get(r.name);s==null&&l!=null&&(s=(C=(n=this.listener)==null?void 0:n.offsetForCapturedLabel)==null?void 0:C.call(n,this,r,l)),r.fields.length>0&&a.push({identifier:`${r.trackingId}-${r.name}`,anchorPositions:r.fields[0].anchorPositions,view:l!=null?l:null,anchor:p!=null?p:Anchor.BottomCenter,offset:s!=null?s:this.defaultOffset}),a.push(...this.handleUpdateField(r));}this._dataCaptureView.renderCustomLocationsView({elements:a});}toJSONObject(){return {type:this[nativeHandle].className,nativeHandle:this[nativeHandle]}}},M=m;export{M as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-X2BMTDWA.js';import {b}from'./chunk-3WFVV6LL.js';import {a as a$1}from'./chunk-CHBH6UKJ.js';import {Orientation,ScanditIconBuilder,Color,ScanditIconType}from'@scandit/web-datacapture-core';import {Backdrop}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/Backdrop.js';import {ScanditHTMLElement,css,defineCustomElements,html,safeCancelAnimation,safeRequestAnimationFrame,safeAwaitAnimation}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';import {orientationChangeEvent,OrientationObserver}from'@scandit/web-datacapture-core/build/js/private/OrientationObserver.js';async function B(p,m=null,t=15){let i=new ScanditIconBuilder().withIcon(p).withWidth(t).withHeight(t).withIconSize(t);return i.withIconColor(m!=null?m:Color.fromHex("#000000")),await i.build()}var e="scandit-lvfl",V=300,M="ease-in-out",g={slideUp:p=>[{transform:"translateY(0)"},{transform:`translateY(${-p}px)`}],slideDown:p=>[{transform:`translateY(${-p}px)`},{transform:"translateY(0)"}],fadeOut:()=>[{opacity:"1"},{opacity:"0"}],fadeIn:()=>[{opacity:"0"},{opacity:"1"}]},y={duration:V,easing:M,fill:"forwards"},R=(n=>(n.ClearAllButtonClicked="scandit-clear-all-button-clicked",n.PauseButtonClicked="scandit-pause-button-clicked",n.ClickedOutsideList="scandit-clicked-outside-list",n.ValidationFlowLayoutChange="scandit-validation-flow-layout-change",n))(R||{}),s=class s extends ScanditHTMLElement{constructor(){super(...arguments);this.dataCaptureViewContainer_=null;this.dataCaptureViewWrapper_=null;this.backdrop_=null;this.adaptiveRecognitionOverlay_=null;this.clearButton_=null;this.submitButton_=null;this.pauseButton_=null;this.gridLayoutContainer_=null;this.buttonsContainer_=null;this.orientationObserver_=null;this.onOrientationChangeHandler=this.onOrientationChange.bind(this);this.onClearButtonClickHandler=this.onClearButtonClick.bind(this);this.onPauseButtonClickHandler=this.onPauseButtonClick.bind(this);this.onDataCaptureViewWrapperClickHandler=this.onDataCaptureViewWrapperClick.bind(this);this.collapseAnimations=new Map;this.focusedInput=null;this.focusedInputOffset=0;this.currentAnimationPromise=null;this.lastOrientationEvent_=null;}static createStyleElement(){return css`.${e}{display:flex;flex-direction:column;font-family:Roboto,Noto Sans,Open Sans,sans-serif;height:100%;overflow:hidden;position:relative;width:100%;--safe-area-inset-top:env(safe-area-inset-top,0px);--safe-area-inset-bottom:env(safe-area-inset-bottom,0px);--safe-area-inset-left:env(safe-area-inset-left,0px);--safe-area-inset-right:env(safe-area-inset-right,0px)}.${e}[hidden]{display:none}.${e} .${e}__datacapture-view-wrapper{flex:1;height:100%;margin-top:auto;min-height:40%;position:relative;width:100%}.${e} .${e}__datacapture-view-container{height:100%;width:100%}.${e} .${e}__backdrop{inset:0;position:absolute}.${e} .${e}__container{display:flex;flex-direction:column;max-height:60%;position:relative}.${e} .${e}__buttons-container{bottom:100%;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-between;left:0;padding:.5rem 1rem;position:absolute;width:100%;z-index:1}.${e} .${e}__buttons-container>${a.tag}{opacity:1;pointer-events:auto;transition:opacity .3s ease-in-out,visibility .3s ease-in-out;visibility:visible}.${e} .${e}__buttons-container>${a.tag}.scandit-button-hidden{opacity:0;pointer-events:none;visibility:hidden}.${e} .${e}__grid-layout-container{box-sizing:border-box;container-type:inline-size;display:grid;gap:1rem;grid-template-columns:repeat(4,1fr);margin:1rem;overflow-y:scroll;position:relative}.${e} .${e}__grid-layout-container>${b.tag}{grid-column:span 4;opacity:1;transform:translateY(0)}@media (min-width:48rem){.${e} .${e}__grid-layout-container{grid-template-columns:repeat(8,1fr);margin:2rem}}@media (min-width:68.75rem){.${e} .${e}__grid-layout-container{grid-template-columns:repeat(16,1fr);margin:2rem}}@supports (container-type:inline-size){@container (min-width: 48rem){.${e} .${e}__grid-layout-container{grid-template-columns:repeat(8,1fr);margin:2rem}}@container (min-width: 68.75rem){.${e} .${e}__grid-layout-container{grid-template-columns:repeat(16,1fr);margin:2rem}}}@media (orientation:landscape){.${e}{flex-direction:row}.${e} .${e}__datacapture-view-wrapper{margin-top:0;max-height:100%;min-width:40%}.${e} .${e}__container{flex:1;max-height:100%}.${e} .${e}__buttons-container{bottom:calc(var(--safe-area-inset-bottom));left:-100%;width:100%}}`}static create(){return s.register(),document.createElement(s.tag)}static register(){defineCustomElements({[s.tag]:s}),a$1.register(),Backdrop.register(),a.register();}get dataCaptureViewContainer(){return this.dataCaptureViewContainer_}get backdrop(){return this.backdrop_}get clearButton(){return this.clearButton_}get submitButton(){return this.submitButton_}get pauseButton(){return this.pauseButton_}getInputs(){if(!this.gridLayoutContainer_)return [];let t=this.gridLayoutContainer_.querySelectorAll(b.tag);return Array.from(t)}getInputByName(t){if(!this.gridLayoutContainer_)return;let i=this.gridLayoutContainer_.querySelector(`${b.tag}[name="${t}"]`);return i!=null?i:void 0}static injectStyles(){if(s.injectedStyleElement===null)try{let t=s.createStyleElement().cloneNode(true);document.head.append(t),s.injectedStyleElement=t;}catch{}}connectedCallback(){var t,i,n,a$2;s.injectStyles(),this.classList.add(e),this.innerHTML=html`<div class="${e}__datacapture-view-wrapper"><div class="${e}__datacapture-view-container"></div><${Backdrop.tag} class="${e}__backdrop"></${Backdrop.tag}><${a$1.tag}></${a$1.tag}></div><div class="${e}__container"><div class="${e}__buttons-container"></div><div class="${e}__grid-layout-container"></div></div>`,this.dataCaptureViewContainer_=this.querySelector(`.${e}__datacapture-view-container`),this.dataCaptureViewWrapper_=this.querySelector(`.${e}__datacapture-view-wrapper`),this.gridLayoutContainer_=this.querySelector(`.${e}__grid-layout-container`),this.backdrop_=this.querySelector(Backdrop.tag),this.adaptiveRecognitionOverlay_=this.querySelector(a$1.tag),this.buttonsContainer_=this.querySelector(`.${e}__buttons-container`),this.clearButton_=a.create(),this.clearButton_.variant="secondary",this.clearButton_.kind="destructive",this.clearButton_.size="small",this.clearButton_.textContent="Clear All",this.clearButton_.classList.add("scandit-button-hidden"),this.clearButton_.setAttribute("tabindex","-1"),this.submitButton_=a.create(),this.submitButton_.variant="primary",this.submitButton_.kind="action",this.submitButton_.size="small",this.submitButton_.type="button",this.submitButton_.disabled=true,this.submitButton_.textContent="Finish",this.submitButton_.classList.add("scandit-button-hidden"),this.submitButton_.setAttribute("tabindex","-1"),this.pauseButton_=a.create(),this.pauseButton_.variant="secondary",this.pauseButton_.size="small",this.pauseButton_.textContent="Pause",this.pauseButton_.classList.add("scandit-button-hidden"),this.pauseButton_.setAttribute("tabindex","-1"),(t=this.buttonsContainer_)==null||t.append(this.clearButton_,this.pauseButton_,this.submitButton_),(i=this.clearButton_)==null||i.addEventListener("click",this.onClearButtonClickHandler),(n=this.pauseButton_)==null||n.addEventListener("click",this.onPauseButtonClickHandler),(a$2=this.dataCaptureViewWrapper_)==null||a$2.addEventListener("click",this.onDataCaptureViewWrapperClickHandler),this.addButtonIcons(),this.setupOrientationObserver();}disconnectedCallback(){var t,i,n,a,o;(t=this.clearButton_)==null||t.removeEventListener("click",this.onClearButtonClickHandler),(i=this.pauseButton_)==null||i.removeEventListener("click",this.onPauseButtonClickHandler),(n=this.dataCaptureViewWrapper_)==null||n.removeEventListener("click",this.onDataCaptureViewWrapperClickHandler),(a=this.orientationObserver_)==null||a.removeEventListener(orientationChangeEvent,this.onOrientationChangeHandler),(o=this.orientationObserver_)==null||o.unregister(),this.orientationObserver_=null;for(let r of this.collapseAnimations.values())safeCancelAnimation(r);this.collapseAnimations.clear(),this.innerHTML="",this.dataCaptureViewContainer_=null,this.dataCaptureViewWrapper_=null,this.backdrop_=null,this.clearButton_=null,this.submitButton_=null,this.pauseButton_=null,this.buttonsContainer_=null,s.injectedStyleElement!==null&&(s.injectedStyleElement.remove(),s.injectedStyleElement=null);}onClearButtonClick(){let t=this.getInputs();this.dispatchEvent(new CustomEvent("scandit-clear-all-button-clicked",{bubbles:true,detail:{inputs:t}}));}onPauseButtonClick(){this.dispatchEvent(new CustomEvent("scandit-pause-button-clicked",{bubbles:true}));}onDataCaptureViewWrapperClick(t){this.dispatchEvent(new CustomEvent("scandit-clicked-outside-list",{bubbles:true}));}async addButtonIcons(){var a,o,r;let[t,i,n]=await Promise.all([B(ScanditIconType.Delete),B(ScanditIconType.Checkmark),B(ScanditIconType.Pause)]);t.slot="icon-start",(a=this.clearButton_)==null||a.append(t),i.slot="icon-start",(o=this.submitButton_)==null||o.append(i),n.slot="icon-start",(r=this.pauseButton_)==null||r.append(n);}setupOrientationObserver(){this.orientationObserver_=new OrientationObserver,this.orientationObserver_.addEventListener(orientationChangeEvent,this.onOrientationChangeHandler),this.orientationObserver_.register();}onOrientationChange(t){if(this.lastOrientationEvent_=t!=null?t:this.lastOrientationEvent_,!this.lastOrientationEvent_)return;let i=0,n=0,a=0,o=0,r=this.lastOrientationEvent_.detail.value;if(r===Orientation.LandscapeRight||r===Orientation.LandscapeLeft){let c=getComputedStyle(this).getPropertyValue("--safe-area-inset-bottom").trim(),u=getComputedStyle(this).getPropertyValue("--safe-area-inset-top").trim(),v=getComputedStyle(this).getPropertyValue("--safe-area-inset-left").trim(),d=getComputedStyle(this).getPropertyValue("--safe-area-inset-right").trim();i=parseInt(c,10)||0,n=parseInt(u,10)||0,a=parseInt(v,10)||0,o=parseInt(d,10)||0;}this.dispatchEvent(new CustomEvent("scandit-validation-flow-layout-change",{bubbles:true,detail:{buttonContainerHeight:this.buttonsContainerHeight,safeAreaInsetBottom:i,safeAreaInsetTop:n,safeAreaInsetLeft:a,safeAreaInsetRight:o}}));}showButton(t){t&&(t.classList.remove("scandit-button-hidden"),t.removeAttribute("tabindex"));}hideButton(t){t&&(t.classList.add("scandit-button-hidden"),t.setAttribute("tabindex","-1"));}showValidationButtons(){this.showButton(this.clearButton_),this.showButton(this.submitButton_),this.hideButton(this.pauseButton_);}showScanningButtons(){this.hideButton(this.clearButton_),this.hideButton(this.submitButton_),this.showButton(this.pauseButton_);}hideAllButtons(){var t;(t=this.buttonsContainer_)==null||t.querySelectorAll(a.tag).forEach(i=>{this.hideButton(i);});}get buttonsContainerHeight(){var t,i,n,a,o,r,c,u;return (u=(c=(o=(n=(t=this.buttonsContainer_)==null?void 0:t.offsetHeight)!=null?n:(i=this.clearButton_)==null?void 0:i.offsetHeight)!=null?o:(a=this.submitButton_)==null?void 0:a.offsetHeight)!=null?c:(r=this.pauseButton_)==null?void 0:r.offsetHeight)!=null?u:0}get finishButtonText(){var t,i;return (i=(t=this.submitButton_)==null?void 0:t.textContent)!=null?i:""}set finishButtonText(t){this.submitButton_&&(this.submitButton_.textContent=t);}get restartButtonText(){var t,i;return (i=(t=this.clearButton_)==null?void 0:t.textContent)!=null?i:""}set restartButtonText(t){this.clearButton_&&(this.clearButton_.textContent=t);}get pauseButtonText(){var t,i;return (i=(t=this.pauseButton_)==null?void 0:t.textContent)!=null?i:""}set pauseButtonText(t){this.pauseButton_&&(this.pauseButton_.textContent=t);}appendInputs(...t){var i;(i=this.gridLayoutContainer_)==null||i.append(...t),requestAnimationFrame(()=>{this.onOrientationChangeHandler();});}async waitForAnimations(){this.currentAnimationPromise&&await this.currentAnimationPromise;}async moveInputToTop(t){if(!this.gridLayoutContainer_)return;await this.waitForAnimations();let i=(async()=>{if(!this.gridLayoutContainer_)return;safeRequestAnimationFrame(()=>{this.gridLayoutContainer_&&(this.gridLayoutContainer_.scrollTop=0);});let n=this.getInputs();this.focusedInput=t;let a=this.gridLayoutContainer_.getBoundingClientRect(),o=t.getBoundingClientRect(),r=this.gridLayoutContainer_.scrollTop||0,c=o.top-a.top+r;this.focusedInputOffset=c;let u=[],v=t.animate(g.slideUp(c),y);this.collapseAnimations.set(t,v),u.push(safeAwaitAnimation(v));for(let d of n)if(d!==t){d.style.pointerEvents="none";let w=d.animate(g.fadeOut(),y);this.collapseAnimations.set(d,w),u.push(safeAwaitAnimation(w));}await Promise.all(u);})();this.currentAnimationPromise=i;try{await i;}finally{this.currentAnimationPromise=null;}}async restoreInputsPositions(){await this.waitForAnimations();let t=(async()=>{if(!this.focusedInput)return;let i=this.getInputs(),n=[];if(this.focusedInputOffset>0){let a=this.focusedInput.animate(g.slideDown(this.focusedInputOffset),y);this.collapseAnimations.set(this.focusedInput,a),n.push(safeAwaitAnimation(a));}for(let a of i)if(a!==this.focusedInput){let o=a.animate(g.fadeIn(),y);this.collapseAnimations.set(a,o),n.push(safeAwaitAnimation(o).then(()=>{a.style.removeProperty("pointer-events");}));}await Promise.all(n),this.focusedInput=null,this.focusedInputOffset=0;})();this.currentAnimationPromise=t;try{await t;}finally{this.currentAnimationPromise=null;}}showAdaptiveRecognitionOverlay(){this.adaptiveRecognitionOverlay_&&(this.adaptiveRecognitionOverlay_.show=true);}hideAdaptiveRecognitionOverlay(){this.adaptiveRecognitionOverlay_&&(this.adaptiveRecognitionOverlay_.show=false);}};s.tag="scandit-label-capture-validation-flow-layout",s.injectedStyleElement=null;var A=s;export{R as a,A as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t={"scandit-datacapture-sdk-label-pthreads.wasm":{bytes:8928209},"scandit-datacapture-sdk-label-simd-pthreads.wasm":{bytes:8845727},"scandit-datacapture-sdk-label-simd.wasm":{bytes:8711345},"scandit-datacapture-sdk-label.wasm":{bytes:8794128}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-MQ3C6JQR.js';var i=class o{constructor(l,a,d){this.labelField=l,this.valid=a,this.processingInCloud=d;}getLabelField(){return this.labelField}isValid(){return this.valid}isProcessingInCloud(){return this.processingInCloud}toJSONObject(){return {labelField:this.labelField.toJSONObject(),valid:this.valid,isProcessingInCloud:this.processingInCloud}}static fromJSONObject(l){return new o(a.fromJSON(l.labelField),l.valid,l.isProcessingInCloud)}};export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=class{constructor(e){this.workerMain=e;}onFieldsScanned(e){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnFieldsScanned",payload:{fields:e.map(i=>({labelField:JSON.parse(i.getLabelField().toJson()),valid:i.isValid(),isProcessingInCloud:i.isProcessingInCloud()}))}});}onScanTimeout(){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnScanTimeout"});}onLabelIsMissingRequiredField(e){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnLabelIsMissingRequiredField",payload:{fields:e.map(i=>({labelField:JSON.parse(i.getLabelField().toJson()),valid:i.isValid(),isProcessingInCloud:i.isProcessingInCloud()}))}});}onManualInput(e,i,l){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnManualInput",payload:{field:{labelField:JSON.parse(e.getLabelField().toJson()),valid:e.isValid(),isProcessingInCloud:e.isProcessingInCloud()},oldValue:i,newValue:l}});}onCloudBackupServiceStarted(){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnCloudBackupServiceStarted"});}onCloudBackupServiceStopped(){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnCloudBackupServiceStopped"});}onStateChanged(e){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnStateChanged",payload:{state:e}});}};export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$
|
|
1
|
+
import {a as a$3}from'./chunk-K5Y26N6X.js';import {a as a$1}from'./chunk-AVKEMR5W.js';import {a as a$2}from'./chunk-SYDG6PPD.js';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var a=class extends a$1{constructor(){super(...arguments);this.anchorRegexes=[];}setAnchorRegexes(e){return this.anchorRegexes=e,this.getThis()}setAnchorRegex(e){return this.anchorRegexes=[String(e)],this.getThis()}setLocation(e){return this.location=e,this.getThis()}async build(e){var i;let n=await a$2().workerCommand("labelCaptureBuildCustomText",{payload:{name:e,dataTypePatterns:this.anchorRegexes.map(l=>l.toString()),hiddenProperties:this.hiddenProperties,isOptional:this._isOptional,patterns:this.valueRegexes,locationHandle:(i=this.location)==null?void 0:i[nativeHandle]}}),t=a$3.forHandle(n);return t._anchorRegexes=this.anchorRegexes,t._isOptional=this._isOptional,t._name=e,t._valueRegexes=this.valueRegexes,t._location=this.location,t}getThis(){return this}};export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-A6QIZJQN.js';import {a}from'./chunk-SYDG6PPD.js';import {nativeHandle}from'@scandit/web-datacapture-core/build/js/private/nativeHandle.js';var l=class l{constructor(a,r){this[nativeHandle]=a,this.labelCaptureWorkerManager=r;}static async create(a$1){let r=a(),n=await r.workerCommand("validationFlowHandlerCreate",{payload:{labelCaptureHandle:a$1[nativeHandle]}});return new l(n,r)}async startCompleteLabelScan(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerStartCompleteLabelScan",{payload:{labelCaptureHandle:this[nativeHandle],labelName:a}});}async startPartialLabelScan(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerStartPartialLabelScan",{payload:{labelCaptureHandle:this[nativeHandle],fieldNames:a}});}async updateFieldValue(a,r){return await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerUpdateFieldValue",{payload:{labelCaptureHandle:this[nativeHandle],fieldName:a,value:r}})}async onFinishFlowRequested(){return await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerFinishFlow",{payload:{labelCaptureHandle:this[nativeHandle]}})}async pauseScan(){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerPauseScan",{payload:{labelCaptureHandle:this[nativeHandle]}});}async resumeScan(){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerResumeScan",{payload:{labelCaptureHandle:this[nativeHandle]}});}async validationFlowFields(){return (await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerGetValidationFlowFields",{payload:{labelCaptureHandle:this[nativeHandle]}})).map(r=>a$1.fromJSONObject(r))}async clearAllFields(){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerClearAllFields",{payload:{labelCaptureHandle:this[nativeHandle]}});}async cancelCloudBackupTaskForField(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerCancelCloudBackupTaskForField",{payload:{labelCaptureHandle:this[nativeHandle],fieldName:a}});}async uncancelCloudBackupTaskForField(a){await this.labelCaptureWorkerManager.workerCommand("validationFlowHandlerUncancelCloudBackupTaskForField",{payload:{labelCaptureHandle:this[nativeHandle],fieldName:a}});}},t=l;export{t as a};
|