@scandit/web-datacapture-barcode 7.2.0 → 7.2.2
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/{SparkScanView-BHTEutX-.d.ts → SparkScanView-CInaxmG9.d.ts} +4 -0
- package/build/js/check/BarcodeCheck.js +1 -1
- package/build/js/check/BarcodeCheckFeedback.js +1 -1
- package/build/js/check/BarcodeCheckPresenter.js +1 -1
- package/build/js/check/BarcodeCheckView.js +1 -1
- package/build/js/chunks/{chunk-TLDFT6RG.js → chunk-5RE6K5SN.js} +1 -1
- package/build/js/chunks/chunk-62I36ZHW.js +1 -0
- package/build/js/chunks/chunk-64AES6FW.js +1 -0
- package/build/js/chunks/chunk-75APBF6C.js +1 -0
- package/build/js/chunks/{chunk-QGAFQZJW.js → chunk-BDY5XXJ5.js} +1 -1
- package/build/js/chunks/{chunk-LAWBMRSV.js → chunk-BQXBEOL2.js} +1 -1
- package/build/js/chunks/chunk-BZBGJHXV.js +211 -0
- package/build/js/chunks/{chunk-IQEPXI6U.js → chunk-COC2KQMQ.js} +1 -1
- package/build/js/chunks/{chunk-BTRDH2AV.js → chunk-FDGBQDIL.js} +1 -1
- package/build/js/chunks/{chunk-PUMPP7D6.js → chunk-JTSTH4GP.js} +1 -1
- package/build/js/chunks/{chunk-Y5LNDJE7.js → chunk-LY4V725T.js} +4 -4
- package/build/js/chunks/{chunk-A2JYXIGU.js → chunk-QYZGDZCI.js} +1 -1
- package/build/js/chunks/chunk-RWDAYBTQ.js +1 -0
- package/build/js/chunks/chunk-UC3AH6LP.js +1 -0
- package/build/js/chunks/{chunk-EEWERXCW.js → chunk-WQICERFU.js} +1 -1
- package/build/js/find/BarcodeFindView.js +1 -1
- package/build/js/find/index.js +1 -1
- package/build/js/index.d.ts +1 -1
- package/build/js/index.js +1 -1
- package/build/js/moduleLoader.js +1 -1
- package/build/js/spark/index.d.ts +1 -1
- package/build/js/spark/index.js +1 -1
- package/build/js/spark/ui/SparkScanView.d.ts +1 -1
- package/build/js/spark/ui/SparkScanView.js +1 -1
- package/build/js/spark/ui/SparkScanViewMiniPreview.d.ts +2 -0
- package/build/js/spark/ui/SparkScanViewMiniPreview.js +1 -1
- package/build/js/spark/ui/SparkScanViewPresenter.d.ts +2 -1
- package/build/js/spark/ui/SparkScanViewPresenter.js +1 -1
- package/build/js/spark/ui/SparkScanViewTriggerButton.d.ts +1 -0
- package/build/js/spark/ui/SparkScanViewTriggerButton.js +1 -1
- package/build/js/spark/ui/SparkScanViewUiListener.d.ts +1 -1
- package/build/js/spark/ui/SparkScanViewVisualFeedback.js +1 -1
- package/build/js/spark/ui/controllers/DragController.d.ts +2 -1
- package/build/js/spark/ui/controllers/DragController.js +1 -1
- package/build/js/spark/ui/index.d.ts +1 -1
- package/build/js/spark/ui/index.js +1 -1
- package/build/js/worker/BarcodeBatchMode.d.ts +1 -1
- package/build/js/worker/BarcodeCaptureMode.d.ts +1 -1
- package/build/js/worker/BarcodeCaptureWorkerManager.d.ts +1 -1
- package/build/js/worker/BarcodeCaptureWorkerManager.js +1 -1
- package/build/js/worker/BarcodeCheckMode.d.ts +1 -1
- package/build/js/worker/BarcodeFindMode.d.ts +1 -1
- package/build/js/worker/SparkScanMode.d.ts +1 -1
- package/build/js/worker/WorkerMain.d.ts +1 -1
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/dataCapture.inlineWorker.js +1 -1
- package/build/js/worker/dataCaptureEngine.d.ts +1 -1
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
- package/build/js/worker/index.d.ts +1 -1
- package/package.json +2 -2
- package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-barcode-pthreads.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-barcode-simd-pthreads.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-barcode-simd.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-barcode-simd.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-barcode.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-barcode.wasm +0 -0
- package/build/js/chunks/chunk-63KZV5XE.js +0 -1
- package/build/js/chunks/chunk-BAOM24RT.js +0 -1
- package/build/js/chunks/chunk-C5GWADSL.js +0 -1
- package/build/js/chunks/chunk-FJ4SOETD.js +0 -1
- package/build/js/chunks/chunk-RMCPFLAA.js +0 -211
- package/build/js/chunks/chunk-S2PGFYJU.js +0 -1
- /package/build/js/chunks/{chunk-7PUNN73L.js → chunk-CTLHZ4ZL.js} +0 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import {a as a$4}from'./chunk-YQNNEW67.js';import {a as a$6,b as b$3}from'./chunk-RWDAYBTQ.js';import {b}from'./chunk-5DP5VNWQ.js';import {a as a$5,b as b$2}from'./chunk-OPL5NVVM.js';import {g as g$2}from'./chunk-3A6GSH7S.js';import {g as g$1}from'./chunk-DVHTYKDX.js';import {a as a$2}from'./chunk-DOA2Q3CZ.js';import {j,i,f,a,g,n}from'./chunk-4JEIREAU.js';import {a as a$3}from'./chunk-XSJEGOGN.js';import {b as b$1,a as a$1,e,c}from'./chunk-YBD5JYCX.js';import {Point}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,defineCustomElements,html,Timeout}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var H=(i=>(i.ResizeButton="resizeButton",i.ZoomButton="zoomButton",i.TorchButton="torchButton",i.CloseButton="closeButton",i))(H||{}),I=1200,w=class w extends ScanditHTMLElement{constructor(){super(...arguments);this.resizeButtonTapListener=this.onResizeButtonTap.bind(this);this.zoomButtonTapListener=this.onZoomButtonTap.bind(this);this.torchButtonTapListener=this.onTorchButtonTap.bind(this);this.closeButtonTapListener=this.onCloseButtonTap.bind(this);this.pointerDownListener=this.onPointerDown.bind(this);this.longPressStartListener=this.onLongPressStart.bind(this);this.toolbarVisibilityChangeListener=this.onToolbarVisibilityChange.bind(this);this.longPressEndListener=this.onLongPressEnd.bind(this);this.dragEndListener=this.onDragEnd.bind(this);this.fadeOutAnimation=new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:500,fill:"both"}));this.replayFadeOutTimeout=null;this.longPressController=new b(this);}get visible(){return this.hasAttribute("visible")}set visible(t){this.toggleAttribute("visible",t);}get size(){return this.expanded?"expanded":"regular"}set size(t){var i;this.toggleAttribute("expanded",t==="expanded");let o=this.getNextTranslate();(i=this.dragController)==null||i.translateTo(o,!1).then(async()=>{var n;return (n=this.dragController)==null?void 0:n.repositionIfOutOfBounds()});}get expanded(){return this.hasAttribute("expanded")}get[a](){var t;return Number((t=this.getAttribute(a))!=null?t:"1")}set[a](t){this.setAttribute(a,String(t));}get darkened(){return this.hasAttribute("darkened")}set darkened(t){this.toggleAttribute("darkened",t);}get orientation(){var t;return (t=this.getAttribute("orientation"))!=null?t:"portrait-primary"}set orientation(t){this.setAttribute("orientation",t);}get[g](){return this.hasAttribute(g)}set[g](t){this.toggleAttribute(g,t);}get[j](){return this.hasAttribute(j)}set[j](t){this.toggleAttribute(j,t);}get[i](){return this.hasAttribute(i)}set[i](t){this.toggleAttribute(i,t);}get[f](){return this.hasAttribute(f)}set[f](t){this.toggleAttribute(f,t);}get[n](){return this.hasAttribute(n)}set[n](t){this.toggleAttribute(n,t);}get cover(){return this.hasAttribute("cover")}set cover(t){this.toggleAttribute("cover",t);}get pressed(){return this.hasAttribute("pressed")}set pressed(t){this.toggleAttribute("pressed",t);}static create(){return defineCustomElements({[b$1]:w,[a$1]:a$2,[e]:a$3,[c]:a$4}),document.createElement(b$1)}repositionIfOutOfBounds(){var t;(t=this.dragController)==null||t.repositionIfOutOfBounds();}showToast(t,o,i){this.toast.show(t,o,i);}hideToast(){this.toast.hide();}zoomIn(){this.zoomButton&&(this[a]=2,this.zoomButton.textContent="2x",this.showToast("warning","2x zoom",1e3));}zoomOut(){this.zoomButton&&(this[a]=1,this.zoomButton.textContent="1x",this.showToast("info","1x zoom",1e3));}async fadeOut(){try{this.fadeOutAnimation.play(),await this.fadeOutAnimation.finished,this.visible=!1;}catch(t){}}cancelFadeOut(){var t;(t=this.replayFadeOutTimeout)==null||t.stop(),this.fadeOutAnimation.cancel();}async rewindAnimation(){var t,o;(((t=this.replayFadeOutTimeout)==null?void 0:t.running)===!0||this.fadeOutAnimation.playState!=="idle")&&(this.cancelFadeOut(),(o=this.replayFadeOutTimeout)==null||o.start());}translateTo(t){var o;(o=this.dragController)==null||o.translateTo(t,!1);}render(){var t,o,i$1,n$1,a$1,l,b;this.innerHTML=html`
|
|
2
|
+
<spark-scan-view-toast></spark-scan-view-toast>
|
|
3
|
+
<div id="host"></div>
|
|
4
|
+
<div id="controls">
|
|
5
|
+
<div id="button-container-list">
|
|
6
|
+
<div class="button-container">
|
|
7
|
+
<button id="torchButton" class="${b$1}__button">
|
|
8
|
+
<spark-scan-view-icon icon="torchOff" fill="white" size="9"></spark-scan-view-icon>
|
|
9
|
+
</button>
|
|
10
|
+
<button id="closeButton" class="${b$1}__button">
|
|
11
|
+
<spark-scan-view-icon icon="close" fill="white" size="9"></spark-scan-view-icon>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="button-container">
|
|
15
|
+
<button id="resizeButton" class="${b$1}__button">
|
|
16
|
+
<spark-scan-view-icon icon="expand" fill="white" size="14"></spark-scan-view-icon>
|
|
17
|
+
</button>
|
|
18
|
+
<button id="zoomButton" class="${b$1}__button">
|
|
19
|
+
${this[a]}x
|
|
20
|
+
</button>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<spark-scan-view-toolbar></spark-scan-view-toolbar>
|
|
25
|
+
<div id="overlay"></div>
|
|
26
|
+
|
|
27
|
+
<style>
|
|
28
|
+
${b$1} {
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: 0;
|
|
31
|
+
left: 0;
|
|
32
|
+
display: none;
|
|
33
|
+
background: var(${g$1});
|
|
34
|
+
border-radius: 16px;
|
|
35
|
+
filter: drop-shadow(0px 2px 6px #${a$5.toJSON()})
|
|
36
|
+
drop-shadow(0px 1px 2px #${b$2.toJSON()});
|
|
37
|
+
transition: filter 0.3s ease;
|
|
38
|
+
z-index: 100;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
${b$1},
|
|
42
|
+
${b$1} #overlay {
|
|
43
|
+
width: var(--dvw-half);
|
|
44
|
+
height: var(--dvw-half);
|
|
45
|
+
min-width: 192px;
|
|
46
|
+
min-height: 192px;
|
|
47
|
+
max-width: min(250px, var(--dvw-half));
|
|
48
|
+
max-height: min(250px, var(--dvw-half));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (orientation: landscape) {
|
|
52
|
+
${b$1},
|
|
53
|
+
${b$1} #overlay {
|
|
54
|
+
width: var(--dvh-half);
|
|
55
|
+
height: var(--dvh-half);
|
|
56
|
+
max-width: min(250px, var(--dvh-half));
|
|
57
|
+
max-height: min(250px, var(--dvh-half));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media screen (min-width: 768px) and (orientation: portrait) {
|
|
62
|
+
${b$1},
|
|
63
|
+
${b$1} #overlay {
|
|
64
|
+
max-width: min(375px, var(--dvw-half));
|
|
65
|
+
max-height: min(375px, var(--dvw-half));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media screen (min-width: 768px) and (orientation: landscape) {
|
|
70
|
+
${b$1},
|
|
71
|
+
${b$1} #overlay {
|
|
72
|
+
max-width: min(375px, var(--dvh-half));
|
|
73
|
+
max-height: min(375px, var(--dvh-half));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${b$1}[visible] {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-flow: column;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
${b$1}[expanded],
|
|
83
|
+
${b$1}[expanded] #overlay {
|
|
84
|
+
width: calc(var(--dvw) - ${32}px);
|
|
85
|
+
height: calc(var(--dvh-half) - ${32}px);
|
|
86
|
+
max-width: min(400px, calc(var(--dvw) - ${32}px));
|
|
87
|
+
max-height: min(400px, calc(var(--dvh-half) - ${32}px));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
${b$1}[pressed] {
|
|
91
|
+
filter: drop-shadow(0px 4px 4px #${b$2.toJSON()})
|
|
92
|
+
drop-shadow(0px 8px 12px #${a$5.toJSON()});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@media (orientation: landscape) {
|
|
96
|
+
${b$1}[expanded],
|
|
97
|
+
${b$1}[expanded] #overlay {
|
|
98
|
+
width: calc(var(--dvh-half) - ${32}px);
|
|
99
|
+
height: calc(var(--dvh) - ${32}px);
|
|
100
|
+
max-width: min(400px, calc(var(--dvh-half) - ${32}px));
|
|
101
|
+
max-height: min(400px, calc(var(--dvh) - ${32}px));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
spark-scan-view-toast {
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: 16px;
|
|
108
|
+
left: 50%;
|
|
109
|
+
transform: translateX(-50%);
|
|
110
|
+
z-index: 20;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
${b$1} #host,
|
|
114
|
+
${b$1} #host * {
|
|
115
|
+
width: 100%;
|
|
116
|
+
border-radius: 16px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
${b$1} #host {
|
|
120
|
+
height: calc(100% - 48px);
|
|
121
|
+
z-index: -10;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
${b$1}[cover] #host {
|
|
125
|
+
height: 100%;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
${b$1} #controls {
|
|
129
|
+
position: absolute;
|
|
130
|
+
top: 0;
|
|
131
|
+
width: 100%;
|
|
132
|
+
height: 100%;
|
|
133
|
+
display: grid;
|
|
134
|
+
grid-template-rows: auto max-content;
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
${b$1} #button-container-list {
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: calc(100% - 48px);
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-flow: column;
|
|
143
|
+
justify-content: space-between;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
${b$1}[cover] #button-container-list {
|
|
147
|
+
height: 100%;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
${b$1} .button-container {
|
|
151
|
+
padding: 12px;
|
|
152
|
+
display: flex;
|
|
153
|
+
justify-content: flex-end;
|
|
154
|
+
align-items: center;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
${b$1}[${f}] .button-container:first-of-type,
|
|
158
|
+
${b$1}[${j}] .button-container:nth-of-type(2) {
|
|
159
|
+
justify-content: space-between;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.${b$1}__button {
|
|
163
|
+
display: flex;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
align-items: center;
|
|
166
|
+
width: 24px;
|
|
167
|
+
height: 24px;
|
|
168
|
+
border: none;
|
|
169
|
+
background: rgba(18, 22, 25, 0.5);
|
|
170
|
+
color: white;
|
|
171
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
172
|
+
font-size: 14px;
|
|
173
|
+
font-weight: 500;
|
|
174
|
+
border-radius: 50%;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
${b$1} #torchButton,
|
|
178
|
+
${b$1} #closeButton,
|
|
179
|
+
${b$1} #resizeButton,
|
|
180
|
+
${b$1} #zoomButton {
|
|
181
|
+
display: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
${b$1}[${f}] #torchButton,
|
|
185
|
+
${b$1}[${j}] #resizeButton {
|
|
186
|
+
display: flex;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
${b$1}[${n}] #closeButton,
|
|
190
|
+
${b$1}[${i}] #zoomButton {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-self: end;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
${b$1} #overlay {
|
|
196
|
+
position: absolute;
|
|
197
|
+
z-index: 10;
|
|
198
|
+
top: 0;
|
|
199
|
+
left: 0;
|
|
200
|
+
background: black;
|
|
201
|
+
border-radius: 16px;
|
|
202
|
+
opacity: 0;
|
|
203
|
+
transition: opacity 0.3s ease;
|
|
204
|
+
pointer-events: none;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
${b$1}[darkened] #overlay {
|
|
208
|
+
opacity: 0.3;
|
|
209
|
+
}
|
|
210
|
+
</style>
|
|
211
|
+
`,this.toast=this.querySelector("spark-scan-view-toast"),this.host=this.querySelector("#host"),this.resizeButton=this.querySelector("#resizeButton"),(t=this.resizeButton)==null||t.addEventListener("pointerup",this.resizeButtonTapListener),this.resizeButtonIcon=(o=this.resizeButton)==null?void 0:o.querySelector("spark-scan-view-icon"),this.zoomButton=this.querySelector("#zoomButton"),(i$1=this.zoomButton)==null||i$1.addEventListener("pointerup",this.zoomButtonTapListener),this.torchButton=this.querySelector("#torchButton"),(n$1=this.torchButton)==null||n$1.addEventListener("pointerup",this.torchButtonTapListener),this.torchButtonIcon=(a$1=this.torchButton)==null?void 0:a$1.querySelector("spark-scan-view-icon"),this.closeButton=this.querySelector("#closeButton"),(l=this.closeButton)==null||l.addEventListener("pointerup",this.closeButtonTapListener),this.toolbar=this.querySelector(c),(b=this.toolbar)==null||b.addEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.buttonContainerList=this.querySelector("#button-container-list");}onResizeButtonTap(t){t.stopPropagation(),this.size={regular:"expanded",expanded:"regular"}[this.size],this.resizeButtonIcon&&(this.resizeButtonIcon.icon=this.expanded?"shrink":"expand"),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"resizeButton",expanded:this.expanded}}));}onZoomButtonTap(t){switch(t.stopPropagation(),this[a]){case 1:{this.zoomIn();break}case 2:{this.zoomOut();break}}this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"zoomButton",zoomFactor:this[a]}}));}onTorchButtonTap(t){t.stopPropagation(),this[g]=!this[g],this.torchButtonIcon&&(this.torchButtonIcon.icon=this[g]?"torchOn":"torchOff"),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"torchButton",enabled:this[g]}}));}onCloseButtonTap(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(g$2,{detail:{tapped:"closeButton"}}));}onPointerDown(){this.dragController&&(this.dragController.draggable=!1),this.rewindAnimation();}onLongPressStart(){this.dragController&&(this.dragController.draggable=!0),this.pressed=!0;}onLongPressEnd(){this.pressed=!1;}onDragEnd(t){t instanceof a$6&&(this.lastKnownTranslate=t.point);}onToolbarVisibilityChange(){this.cover=!this.toolbar||this.toolbar.hidden;}connectedCallback(){var t,o;this.rootElement=(t=this.parentElement)==null?void 0:t.parentElement,this.dragController=new b$3(this,this.rootElement),this.replayFadeOutTimeout=new Timeout(I,async()=>{await this.fadeOut();}),this.render(),this.addEventListener("pointerdown",this.pointerDownListener),this.addEventListener("longpressstart",this.longPressStartListener),this.addEventListener("longpressend",this.longPressEndListener),this.addEventListener("dragend",this.dragEndListener),this.dragController.connect(),this.longPressController.connect(),this.buttonContainerList&&((o=this.toolbar)!=null&&o.firstElementChild)&&(this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.buttonContainerList),this.longPressController.elementsAllowedToTriggerLongPressEvents.add(this.toolbar.firstElementChild)),this.dragController.margin=new Point(16,16);}disconnectedCallback(){var t,o,i,n,a,l,b;(t=this.resizeButton)==null||t.removeEventListener("pointerup",this.resizeButtonTapListener),(o=this.zoomButton)==null||o.removeEventListener("pointerup",this.zoomButtonTapListener),(i=this.torchButton)==null||i.removeEventListener("pointerup",this.torchButtonTapListener),(n=this.closeButton)==null||n.removeEventListener("pointerup",this.closeButtonTapListener),(a=this.toolbar)==null||a.removeEventListener("toolbarvisibilitychange",this.toolbarVisibilityChangeListener),this.removeEventListener("pointerdown",this.pointerDownListener),this.removeEventListener("longpressstart",this.longPressStartListener),this.removeEventListener("longpressend",this.longPressEndListener),this.removeEventListener("dragend",this.dragEndListener),this.fadeOutAnimation.cancel(),(l=this.replayFadeOutTimeout)==null||l.stop(),(b=this.dragController)==null||b.disconnect(),this.longPressController.disconnect();}getNextTranslate(){var n,a,l;let t=((n=this.rootElement)==null?void 0:n.clientWidth)||document.body.clientWidth,o=((a=this.rootElement)==null?void 0:a.clientHeight)||document.body.clientHeight;if(!this.dragController)return new Point(0,0);if(this.size==="regular")return (l=this.lastKnownTranslate)!=null?l:this.dragController.translate;this.lastKnownTranslate=this.dragController.translate;let i=this.dragController.translate;return (this.orientation==="portrait-primary"||this.orientation==="portrait-secondary")&&this.dragController.translate.x>16&&(i=new Point(16,i.y)),(this.orientation==="landscape-primary"||this.orientation==="landscape-secondary")&&this.dragController.translate.x>t-this.clientWidth-16&&(i=new Point(t-this.clientWidth-16,i.y)),this.dragController.translate.y>o-this.clientHeight-16&&(i=new Point(i.x,o-this.clientHeight-16)),i}};w.observedAttributes=[j,i,f];var P=w;export{H as a,P as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-JTSTH4GP.js';import {a as a$1}from'./chunk-KQ3LRAYO.js';import {unknownErrorToString}from'@scandit/web-datacapture-core/build/js/private/utils/unknownErrorToString.js';import {WorkerMain}from'@scandit/web-datacapture-core/build/js/worker/index.js';var i=class extends WorkerMain{constructor(e,a$1){super(e,a$1),this.dataCaptureInstance=new a(a$1,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)});}async respondWith(e,a,r){let d=null,t;try{t=r(),t instanceof Promise&&(t=await t);}catch(c){t=void 0,d=unknownErrorToString(c);}let s={type:"workerTaskId",command:e,id:a,payload:this.hasPayload(t)?t.payload:void 0};d!=null&&(s.error=d),this.postMessage(s,this.hasTransferables(t)?t.transferables:[]);}onMessage(e){switch(e.data.command){case"sparkScanEmitErrorFeedback":{let{data:a}=e;return this.respondWith(a.command,a.id,()=>{this.dataCaptureInstance.sparkScanMode.emitErrorFeedback(a.shouldRemoveBrush);}),!0}case"sparkScanOverlayReadyForDraw":{let{data:a}=e;return this.respondWith(a.command,a.id,()=>{this.dataCaptureInstance.sparkScanMode.overlayReadyForDraw();}),!0}case"sparkScanAnalyticsManagerPropertyChanged":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.sparkScanMode.analyticsManagerPropertyChanged(a.property);}),!0}case"barcodeFindForSettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeFindMode.forSettings(a.settings)),!0}case"barcodeFindModeRemove":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeFindMode.removeMode()),!0}case"barcodeFindSearchStart":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.start();}),!0;case"barcodeFindSearchPause":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.pause();}),!0;case"barcodeFindSearchStop":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.stop();}),!0;case"barcodeFindSetItemList":{let{data:a}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.setItemList(a.itemList);}),!0}case"barcodeFindSetEnabled":{let{data:a}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeFindMode.setEnabled(a.enabled);}),!0}case"barcodeFindApplySettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeFindMode.applySettings(a.settings)),!0}case"barcodeFindAddBasicOverlay":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeFindMode.addBasicOverlay();}),!0}case"barcodeFindRemoveBasicOverlay":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeFindMode.removeBasicOverlay();}),!0}case"barcodeFindUpdateBasicOverlay":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeFindMode.updateBasicOverlay(a.jsonOverlay);}),!0}case"barcodeFindSetTransformerFunction":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{let r=a$1(a.functionAsString);this.dataCaptureInstance.barcodeFindMode.setTransformerFunction(r);}),!0}case"barcodeCheckForSettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeCheckMode.forSettings(a.settings)),!0}case"barcodeCheckModeRemove":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.barcodeCheckMode.removeMode()),!0}case"barcodeCheckSearchStart":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.start();}),!0;case"barcodeCheckSearchPause":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.pause();}),!0;case"barcodeCheckSearchStop":return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.stop();}),!0;case"barcodeCheckSetEnabled":{let{data:a}=e;return this.respondWith(e.data.command,e.data.id,()=>{this.dataCaptureInstance.barcodeCheckMode.setEnabled(a.enabled);}),!0}case"barcodeCheckApplySettings":{let{data:a}=e;return this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.barcodeCheckMode.applySettings(a.settings);}),!0}default:return super.onMessage(e)}}};export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {b as b$1}from'./chunk-DFIOIHPG.js';import {a}from'./chunk-WRTJHOS5.js';import {b}from'./chunk-XY65BTLP.js';import {a as a$6}from'./chunk-QJOHE5A3.js';import {a as a$8}from'./chunk-7J6MRLL2.js';import {a as a$2}from'./chunk-YH5IBNOK.js';import {a as a$7}from'./chunk-5GGUCEGU.js';import {a as a$5}from'./chunk-POONUNDO.js';import {b as b$2}from'./chunk-IC4MKVBG.js';import {a as a$1}from'./chunk-JKO4EZPZ.js';import {a as a$3}from'./chunk-I53W7VSB.js';import {a as a$4}from'./chunk-5KVH2XIO.js';import {b as b$3}from'./chunk-2RKBANN2.js';import {Anchor,Localization,DataCaptureView,Size,Point}from'@scandit/web-datacapture-core';import {ShutterButton}from'@scandit/web-datacapture-core/build/js/private/ui/atoms/ShutterButton.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/ScanditHTMLElement.js';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';import {html}from'@scandit/web-datacapture-core/build/js/private/utils/html.js';var d={FinishButton:a$2.tag,ShutterButton:ShutterButton.tag,ProgressBarWithLabel:a.tag,CardListContainer:b$1.tag,TorchIconButton:a$1.tag},c=class c extends ScanditHTMLElement{constructor(){super(...arguments);this.shouldShowCarousel=!0;this.shouldShowPauseButton=!0;this.shouldShowFinishButton=!0;this.shouldShowProgressBar=!0;this.shouldShowTorchControl=!1;this.torchControlPosition=Anchor.TopLeft;this.textForItemListUpdatedWhenPausedHint=null;this.textForItemListUpdatedHint=null;this.textForTapShutterToResumeSearchHint=null;this.textForTapShutterToPauseScreenHint=null;this.textForMoveCloserToBarcodesHint=null;this.textForPointAtBarcodesToSearchHint=null;this.textForAllItemsFoundSuccessfullyHint=null;this.textForCollapseCardsButton=Localization.getInstance().get("barcode.find.view.textForCollapseCardsButton");this.barcodeFindViewUiListener=null;this.shutterButton=null;this.finishButton=null;this.progressBar=null;this.cardList=null;this.onShutterButtonClickedHandler=this.onShutterButtonClicked.bind(this);this.onFinishButtonClickedHandler=this.onFinishButtonClicked.bind(this);this.onTorchButtonClickedHandler=this.onTorchButtonClicked.bind(this);this.torchIconButton=null;this.onDotClickHandler=this.onDotClick.bind(this);}get camera(){return this.presenter.context.frameSource}static async createWithSettings(t,o,i,s,r){let e=document.createElement(c.tag);return e.barcodeFindViewSettings=s,e.layout=b.create(),e.layout.innerHTML=html`
|
|
2
2
|
<${a.tag} slot="progress" value="0" max="1" ${e.shouldShowProgressBar?"":"hidden"}></${a.tag}>
|
|
3
3
|
<${a$1.tag} slot="top-controls-left" ${e.shouldShowTorchControl?"":"hidden"}></${a$1.tag}>
|
|
4
4
|
<${b$1.tag} slot="card-list" hidden text-for-collapse-cards-button=${e.textForCollapseCardsButton}></${b$1.tag}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-LTNZJEG4.js';import {a as a$1}from'./chunk-2ZSOWJ2F.js';import {a}from'./chunk-WVIC3JWX.js';import {a as a$4}from'./chunk-7JOXKPVL.js';import {a as a$3}from'./chunk-7O2NHA3I.js';import {a as a$5}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-LTNZJEG4.js';import {a as a$1}from'./chunk-2ZSOWJ2F.js';import {a}from'./chunk-WVIC3JWX.js';import {a as a$4}from'./chunk-7JOXKPVL.js';import {a as a$3}from'./chunk-7O2NHA3I.js';import {a as a$5}from'./chunk-75APBF6C.js';import {DataCaptureEngine}from'@scandit/web-datacapture-core/build/js/worker/index.js';var c=class extends DataCaptureEngine{constructor(e,r){super(e,r);}getModeDeserializers(){this.barcodeCaptureMode=new a(this,this.Module,this.workerFunctions),this.barcodeBatchMode=new a$1(this,this.Module,this.workerFunctions),this.sparkScanMode=new a$2(this,this.Module,this.workerFunctions),this.barcodeFindMode=new a$3(this,this.Module,this.workerFunctions),this.barcodeCheckMode=new a$4(this,this.Module,this.workerFunctions);let e=super.getModeDeserializers();return e.push_back(this.barcodeCaptureMode.getCaptureDeserializer()),e.push_back(this.barcodeBatchMode.getBatchDeserializer()),e.push_back(this.sparkScanMode.getSparkScanDeserializer()),e}getWasmSideModuleFileName(){return ""}getWasmCoreFileName(e,r){return r?e?"scandit-datacapture-sdk-barcode-simd-pthreads.wasm":"scandit-datacapture-sdk-barcode-pthreads.wasm":e?"scandit-datacapture-sdk-barcode-simd.wasm":"scandit-datacapture-sdk-barcode.wasm"}getWasmCoreExpectedHash(e,r){return r?e?"657dc135c7251353b8f1034529409e71353875c457f71cef6e91ba28b57a212d":"44d4287161e447b570d20f2f6bdc940e87452d1c2669ee01af878ef5830f0512":e?"34a9a266adb0d576d679a7a908361417c4df48317ad4a225d60a7a113941b0d7":"7c9026b45f36081767f537dc54319a8de87f4a816c89706e419d04583f65cc5f"}getWasmMetadata(){return a$5}};export{c as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-OHSTP7TM.js';import {b as b$
|
|
1
|
+
import {a}from'./chunk-OHSTP7TM.js';import {b as b$2}from'./chunk-RWDAYBTQ.js';import {b as b$1}from'./chunk-5DP5VNWQ.js';import {a as a$3}from'./chunk-T2Y2C76P.js';import {a as a$2,b as b$3}from'./chunk-OPL5NVVM.js';import {e,f as f$1,a as a$1,b as b$4,d,c}from'./chunk-DVHTYKDX.js';import {f}from'./chunk-YBD5JYCX.js';import {Point}from'@scandit/web-datacapture-core';import {ScanditHTMLElement,defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var b=class f$2 extends ScanditHTMLElement{constructor(){super(...arguments);this._pointerDownListener=this.onPointerDown.bind(this);this._pointerUpListener=this.onPointerUp.bind(this);this._longPressController=new b$1(this);this._longPressStartListener=this.onLongPressStart.bind(this);}get minimized(){return !this.hasAttribute("expanded")}set minimized(t){this.toggleAttribute("minimized",!t);}get expanded(){return this.hasAttribute("expanded")}set expanded(t){this.toggleAttribute("expanded",t),this._dragController&&(this._dragController.margin=t?new Point(-65,-65):new Point(0,0),this._dragController.repositionIfOutOfBounds());}get pressed(){return this.hasAttribute("pressed")}set pressed(t){this.toggleAttribute("pressed",t);}get visible(){return this.hasAttribute("visible")}set visible(t){this.toggleAttribute("visible",t);}static create(){return defineCustomElements({[f]:f$2}),document.createElement(f)}connectedCallback(){var t;this.append(this.render()),this._dragController=new b$2(this,(t=this.parentElement)==null?void 0:t.parentElement),this._dragController.connect(),this.addEventListener("pointerdown",this._pointerDownListener),this.addEventListener("pointerup",this._pointerUpListener),this.addEventListener("longpressstart",this._longPressStartListener),this._longPressController.connect(),this._longPressController.elementsAllowedToTriggerLongPressEvents.add(this),this._pulse=this.querySelector(".pulse"),this._pulseAnimation=new Animation(new KeyframeEffect(this._pulse,[{background:"rgba(0, 0, 0, 0)"},{background:`var(${e})`,transform:"translate(-50%, -50%) scale(1.1)"},{background:"rgba(0, 0, 0, 0)"}],{duration:1100,easing:"ease-out",iterations:Number.POSITIVE_INFINITY}));}disconnectedCallback(){var t;this.removeEventListener("pointerdown",this._pointerDownListener),this.removeEventListener("pointerup",this._pointerUpListener),this.removeEventListener("longpressstart",this._longPressStartListener),(t=this._dragController)==null||t.disconnect(),this._longPressController.disconnect(),this.innerHTML="";}repositionIfOutOfBounds(){var t;(t=this._dragController)==null||t.repositionIfOutOfBounds();}translateTo(t){var i;(i=this._dragController)==null||i.translateTo(t,!1);}setImage(t){var n;let i=this.querySelector("div");(n=i.firstElementChild)==null||n.remove(),t&&i.append(t);}startPulsating(){var t;(t=this._pulseAnimation)==null||t.play();}stopPulsating(){this._pulseAnimation&&(this._pulseAnimation.cancel(),this._pulseAnimation.currentTime=0);}render(){return a`
|
|
2
2
|
<div>
|
|
3
3
|
<div class="pulse"></div>
|
|
4
4
|
<svg width="49" height="26" viewBox="0 0 49 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -45,7 +45,7 @@ import {a}from'./chunk-OHSTP7TM.js';import {b as b$1}from'./chunk-FJ4SOETD.js';i
|
|
|
45
45
|
|
|
46
46
|
<style>
|
|
47
47
|
${f} {
|
|
48
|
-
position:
|
|
48
|
+
position: absolute;
|
|
49
49
|
top: 0;
|
|
50
50
|
left: 0;
|
|
51
51
|
width: 90px;
|
|
@@ -81,7 +81,7 @@ import {a}from'./chunk-OHSTP7TM.js';import {b as b$1}from'./chunk-FJ4SOETD.js';i
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
${f} div .pulse {
|
|
84
|
-
position:
|
|
84
|
+
position: absolute;
|
|
85
85
|
top: 50%;
|
|
86
86
|
left: 50%;
|
|
87
87
|
width: 100%;
|
|
@@ -127,4 +127,4 @@ import {a}from'./chunk-OHSTP7TM.js';import {b as b$1}from'./chunk-FJ4SOETD.js';i
|
|
|
127
127
|
max-height: 64px;
|
|
128
128
|
}
|
|
129
129
|
</style>
|
|
130
|
-
`}onPointerDown(t){t instanceof PointerEvent&&(this._dragController.draggable=this.minimized,this._holdStart=Date.now(),this.setPointerCapture(t.pointerId));}onPointerUp(t){if(t instanceof PointerEvent){let
|
|
130
|
+
`}onPointerDown(t){t instanceof PointerEvent&&(this._dragController&&(this._dragController.draggable=this.minimized),this._holdStart=Date.now(),this.setPointerCapture(t.pointerId));}onPointerUp(t){var i;if(t instanceof PointerEvent){let n=this._holdStart!=null&&Date.now()-this._holdStart<400,C=!((i=this._dragController)!=null&&i.pointerDownEvent)||!a$3(this._dragController.pointerDownEvent,t);n&&C&&this.dispatchEvent(new CustomEvent("tap")),this.pressed=!1,this._holdStart=void 0,this.releasePointerCapture(t.pointerId);}}onLongPressStart(){this._dragController&&(this._dragController.draggable=!0),this.pressed=!0,this._holdStart=void 0;}};export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-CTLHZ4ZL.js';import {TorchState,isCameraFrameSource,Camera,FrameSourceState,CameraPosition}from'@scandit/web-datacapture-core';var h=class{constructor(e,t,c,n,d){this.torchState=TorchState.Off;this.cameraSupportMap=new Map;this.zoomFactor=1;this.view=e,this.context=t,this.barcodeCheck=c,this.viewSettings=n,this.cameraSettings=d;}get currentCamera(){if(isCameraFrameSource(this.context.frameSource))return this.context.frameSource;throw new Error("The current frame source is not a Camera")}async prepare(){await this.barcodeCheck.setEnabled(!1),this.barcodeCheck.feedback=await a.createWithOptions(!0,!0),this.barcodeCheck.addPrivateListener(this);let e=Camera.atPosition(this.viewSettings.defaultCameraPosition);await this.context.setFrameSource(e),await this.currentCamera.applySettings(this.cameraSettings),await this.currentCamera.switchToDesiredState(FrameSourceState.Standby),this.zoomFactor=this.currentCamera.settings.zoomFactor,this.view.changeZoomButtonIcon(this.zoomFactor);}async dispose(){var e;this.view.deleteAllViews(),await this.context.removeMode(this.barcodeCheck),this.barcodeCheck.removePrivateListener(this),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off));}async startSearching(){var e;this.view.deleteAllViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.On)),await this.barcodeCheck.setEnabled(!0),await this.barcodeCheck.start();}async stopSearching(){var e;this.view.deleteAllViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Off)),await this.barcodeCheck.setEnabled(!1),await this.barcodeCheck.stop();}async pauseSearching(){var e;this.view.deletePendingViews(),await((e=this.context.frameSource)==null?void 0:e.switchToDesiredState(FrameSourceState.Standby)),await this.barcodeCheck.setEnabled(!1),await this.barcodeCheck.pause();}emitTappedFeedback(){this.barcodeCheck.feedback.tapped.emit();}didUpdateSession(e,t){Object.keys(t.addedTrackedBarcodes).length>0&&this.barcodeCheck.feedback.scanned.emit(),this.view.render(t);}async onTorchButtonClicked(){var e,t;this.cameraSupportMap.get(this.currentCamera.label)||this.cameraSupportMap.set(this.currentCamera.label,{torch:await this.currentCamera.isTorchAvailable()}),(t=(e=this.cameraSupportMap.get(this.currentCamera.label))==null?void 0:e.torch)!=null&&t&&(await this.currentCamera.setDesiredTorchState(this.torchState===TorchState.Off?TorchState.On:TorchState.Off),this.torchState=this.torchState===TorchState.Off?TorchState.On:TorchState.Off,this.view.toggleTorchIcon(this.torchState));}async onZoomButtonClicked(){var t;if(!this.currentCamera.isZoomAvailable())return;let e=(t={1:2,2:1}[this.zoomFactor])!=null?t:1;this.currentCamera.settings.zoomFactor=e,await this.currentCamera.applySettings(this.currentCamera.settings),this.zoomFactor=e,this.view.changeZoomButtonIcon(e);}async onCameraSwitchButtonClicked(){let e=this.currentCamera.getCurrentState(),t=Camera.atPosition(this.currentCamera.position===CameraPosition.UserFacing?CameraPosition.WorldFacing:CameraPosition.UserFacing);await this.context.setFrameSource(t),await this.currentCamera.switchToDesiredState(e);}};export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-T2Y2C76P.js';import {Point}from'@scandit/web-datacapture-core';import {clamp}from'@scandit/web-datacapture-core/build/js/private/utils/clamp.js';import {Timeout}from'@scandit/web-datacapture-core/build/js/private/utils/timeout.js';var s=class extends Event{constructor(t,e){super(t),this.point=e;}},l=class{constructor(t,e){this.translate=new Point(0,0);this.draggable=!1;this.pointerDownListener=this.onPointerDown.bind(this);this.pointerMoveListener=this.onPointerMove.bind(this);this.pointerUpListener=this.onPointerUp.bind(this);this.touchStartListener=this.onTouchStart.bind(this);this.resizeListener=this.onResize.bind(this);this.repositioningTimeout=new Timeout(500,this.repositionIfOutOfBounds.bind(this));this.margin=new Point(0,0);this.element=t,this.boundaryElement=e!=null&&e.clientWidth&&(e!=null&&e.clientHeight)?e:document.body;}get translateWithMargin(){return new Point(this.translate.x+this.margin.x,this.translate.y+this.margin.y)}connect(){this.render(),this.element.addEventListener("pointerdown",this.pointerDownListener),this.element.addEventListener("pointermove",this.pointerMoveListener),this.element.addEventListener("pointerup",this.pointerUpListener),this.element.addEventListener("touchstart",this.touchStartListener),window.addEventListener("resize",this.resizeListener);}disconnect(){this.element.removeEventListener("pointerdown",this.pointerDownListener),this.element.removeEventListener("pointermove",this.pointerMoveListener),this.element.removeEventListener("pointerup",this.pointerUpListener),this.element.removeEventListener("touchstart",this.touchStartListener),window.removeEventListener("resize",this.resizeListener),this.repositioningTimeout.stop();}getBoundedTranslate(){let{width:t,height:e}=this.element.getBoundingClientRect(),n=this.boundaryElement.clientWidth,c=this.boundaryElement.clientHeight,o=clamp(this.translate.x,Math.abs(this.margin.x),n-t-this.margin.x),r=clamp(this.translate.y,Math.abs(this.margin.y),c-e-this.margin.y);if(this.translate.x!==o||this.translate.y!==r)return new Point(o,r)}async translateTo(t,e){if(this.translate=t,e){let n=this.element.animate([{transform:`translate(${this.translate.x}px, ${this.translate.y}px)`}],{duration:200,easing:"ease"});n.play(),await n.finished;}this.render(),this.element.dispatchEvent(new s("drag",t));}render(){this.element.style.setProperty("transform",`translate(${this.translate.x}px, ${this.translate.y}px)`);}async repositionIfOutOfBounds(){let t=this.getBoundedTranslate();t&&await this.translateTo(t,!0);}onPointerDown(t){t instanceof PointerEvent&&(this.offset=new Point(this.translate.x-t.clientX,this.translate.y-t.clientY),this.pointerDownEvent=t);}onPointerMove(t){t instanceof PointerEvent&&this.offset&&this.draggable&&this.translateTo(new Point(this.offset.x+t.clientX,this.offset.y+t.clientY),!1);}async onPointerUp(t){t instanceof PointerEvent&&this.pointerDownEvent&&a(this.pointerDownEvent,t)&&(await this.repositionIfOutOfBounds(),this.offset=void 0,this.draggable=!1,this.element.dispatchEvent(new s("dragend",this.translate)));}onTouchStart(t){t.returnValue=!1;}onResize(){this.repositioningTimeout.start();}};export{s as a,l as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-LY4V725T.js';import {a as a$2}from'./chunk-62I36ZHW.js';import {b}from'./chunk-BZBGJHXV.js';import {a as a$6}from'./chunk-RWDAYBTQ.js';import {a as a$5,c,e,f,g,h,i,j,k,b as b$1,d as d$2}from'./chunk-DVHTYKDX.js';import {n,j as j$1,i as i$1,d as d$1,c as c$1,k as k$1,l,m,f as f$1,b as b$2,e as e$1,g as g$1}from'./chunk-4JEIREAU.js';import {a as a$3}from'./chunk-64AES6FW.js';import {a as a$4}from'./chunk-BPHHLTR2.js';import {d}from'./chunk-YBD5JYCX.js';import {a}from'./chunk-HKWMKBIV.js';import {Point,CameraPosition,Color}from'@scandit/web-datacapture-core';import {OrientationObserver,orientationChangeEvent}from'@scandit/web-datacapture-core/build/js/private/OrientationObserver.js';import {ScanditHTMLElement,Timeout,defineCustomElements,css,clamp}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var _=class v extends ScanditHTMLElement{constructor(){super(...arguments);this.targetModeButtonVisible=!1;this.scanningBehaviorButtonVisible=!1;this.torchControlVisible=!0;this.zoomSwitchControlVisible=!0;this.previewSizeControlVisible=!0;this.barcodeFindButtonVisible=!1;this.labelCaptureButtonVisible=!1;this.cameraSwitchButtonVisible=!1;this.previewCloseControlVisible=!0;this.triggerButtonVisible=!0;this.feedbackDelegate={getFeedbackForBarcode:()=>a.success()};this.torchButtonVisible=!0;this.handModeButtonVisible=!1;this.resizeObserver=null;this.onResizeHandler=this.onResize.bind(this);this.miniPreview=b.create();this.triggerButton=a$1.create();this.visualFeedback=a$2.create();this.miniPreviewTimeout=new Timeout(500,this.onMiniPreviewTimeoutFinished.bind(this));this.orientationObserver=new OrientationObserver;this.miniPreviewPointerUpListener=this.onMiniPreviewPointerUp.bind(this);this.miniPreviewPointerMoveListener=this.onMiniPreviewPointerMove.bind(this);this.miniPreviewButtonTapListener=this.onMiniPreviewButtonTap.bind(this);this.miniPreviewDragListener=this.onMiniPreviewDrag.bind(this);this.miniPreviewDragEndListener=this.onMiniPreviewDragEnd.bind(this);this.triggerButtonPointerDownListener=this.onTriggerButtonPointerDown.bind(this);this.triggerButtonTapListener=this.onTriggerButtonTap.bind(this);this.triggerButtonLongPressStartListener=this.onTriggerButtonLongPressStart.bind(this);this.triggerButtonLongPressEndListener=this.onTriggerButtonLongPressEnd.bind(this);this.triggerButtonDragListener=this.onTriggerButtonDrag.bind(this);this.toolbarButtonTapListener=this.onToolbarButtonTap.bind(this);this.clickOutsideListener=this.onClickOutside.bind(this);this.visibilityChangeListener=this.onVisibilityChange.bind(this);this.orientationChangeListener=this.onOrientationChange.bind(this);this.holdingToScan=!1;}get _targetModeEnabledMessage(){var e;return (e=this.settings.toastSettings.targetModeEnabledMessage)!=null?e:"Aimer on"}get _targetModeDisabledMessage(){var e;return (e=this.settings.toastSettings.targetModeDisabledMessage)!=null?e:"Aimer off"}get _continuousModeEnabledMessage(){var e;return (e=this.settings.toastSettings.continuousModeEnabledMessage)!=null?e:"Continuous mode on"}get _continuousModeDisabledMessage(){var e;return (e=this.settings.toastSettings.continuousModeDisabledMessage)!=null?e:"Continuous mode off"}get _scanPausedMessage(){var e;return (e=this.settings.toastSettings.scanPausedMessage)!=null?e:"Scan paused"}get _torchEnabledMessage(){var e;return (e=this.settings.toastSettings.torchEnabledMessage)!=null?e:"Torch on"}get _torchDisabledMessage(){var e;return (e=this.settings.toastSettings.torchDisabledMessage)!=null?e:"Torch off"}get _zoomedInMessage(){var e;return (e=this.settings.toastSettings.zoomedInMessage)!=null?e:"2x zoom"}get _zoomedOutMessage(){var e;return (e=this.settings.toastSettings.zoomedOutMessage)!=null?e:"1x zoom"}static forElement(e,r,t,i){let n=v.create();return n.presenter=a$3.forView(n,r,t,i!=null?i:new a$4),n.settings=n.presenter.sparkScanViewSettings,n.append(n.miniPreview,n.triggerButton,n.visualFeedback,v.createStyleElement().cloneNode(!0)),n.hidden=!0,e.append(n),n}static create(){return defineCustomElements({[d]:v}),document.createElement("spark-scan-view")}static createStyleElement(){return css`:root{${a$5}:#12161966;${c}:#12161966;${e}:#5b707f4d;${f}:#fff;${g}:#121619cc;${h}:#fbc02c;${i}:#fff;${j}:#2ec1ce;${k}:#fa4446}${d}{position:relative}`}async prepareScanning(){this.mount(),this.hidden=!1,await this.presenter.prepareScanning(this.miniPreview.host);}async startScanning(){await this.presenter.startScanning();}async pauseScanning(){await this.presenter.pauseScanning();}async stopScanning(){await this.presenter.stopScanning({sessionStopReason:"user"});}showToast(e){this.miniPreview.showToast("info",e,1e3);}setListener(e){this.presenter.setListener(e);}setTriggerButtonImage(e){this.triggerButton.setImage(e);}setWidthAndHeightCssStyleProperties(){var t,i;let e=((t=this.parentElement)==null?void 0:t.clientWidth)||document.body.clientWidth,r=((i=this.parentElement)==null?void 0:i.clientHeight)||document.body.clientHeight;this.style.setProperty("--dvw",`${e}px`),this.style.setProperty("--dvh",`${r}px`),this.style.setProperty("--dvw-half","calc(var(--dvw) / 2)"),this.style.setProperty("--dvh-half","calc(var(--dvh) / 2)");}onResize(){this.setWidthAndHeightCssStyleProperties(),this.triggerButton.repositionIfOutOfBounds(),this.miniPreview.repositionIfOutOfBounds();}mount(){this.unmount(),this.resizeObserver=new ResizeObserver(this.onResizeHandler),this.resizeObserver.observe(this.parentElement),this.miniPreview[n]=this.previewCloseControlVisible,this.miniPreview[j$1]=this.previewSizeControlVisible,this.miniPreview[i$1]=this.zoomSwitchControlVisible,this.miniPreview.size=this.settings.defaultMiniPreviewSize,this.miniPreview.toolbar&&(this.miniPreview.toolbar[d$1]=this.targetModeButtonVisible,this.miniPreview.toolbar[c$1]=this.scanningBehaviorButtonVisible,this.miniPreview.toolbar[k$1]=this.barcodeFindButtonVisible,this.miniPreview.toolbar[l]=this.labelCaptureButtonVisible,this.miniPreview.toolbar[m]=this.cameraSwitchButtonVisible),this.triggerButton.visible=this.triggerButtonVisible;for(let[e$1,r]of [[this.triggerButtonCollapsedColor,a$5],[this.triggerButtonExpandedColor,c],[this.triggerButtonAnimationColor,e],[this.triggerButtonTintColor,f],[this.toolbarBackgroundColor,g],[this.toolbarIconActiveTintColor,h],[this.toolbarIconInactiveTintColor,i]])e$1&&this.style.setProperty(r,`#${e$1.toJSON()}`);this.setTriggerButtonPressedColor("triggerButtonCollapsedColor",a$5,b$1),this.setTriggerButtonPressedColor("triggerButtonExpandedColor",c,d$2),this.miniPreview.addEventListener("pointerup",this.miniPreviewPointerUpListener),this.miniPreview.addEventListener("pointermove",this.miniPreviewPointerMoveListener),this.miniPreview.addEventListener("minipreviewbuttontap",this.miniPreviewButtonTapListener),this.miniPreview.addEventListener("toolbarbuttontap",this.toolbarButtonTapListener),this.miniPreview.addEventListener("drag",this.miniPreviewDragListener),this.miniPreview.addEventListener("dragend",this.miniPreviewDragEndListener),this.triggerButton.addEventListener("pointerdown",this.triggerButtonPointerDownListener),this.triggerButton.addEventListener("tap",this.triggerButtonTapListener),this.triggerButton.addEventListener("longpressstart",this.triggerButtonLongPressStartListener),this.triggerButton.addEventListener("longpressend",this.triggerButtonLongPressEndListener),this.triggerButton.addEventListener("drag",this.triggerButtonDragListener),this.orientationObserver.register(),this.orientationObserver.addEventListener(orientationChangeEvent,this.orientationChangeListener),this.orientationObserver.dispatchOrientationChangeEvent(this.orientationObserver.orientation),document.addEventListener("pointerup",this.clickOutsideListener),document.addEventListener("visibilitychange",this.visibilityChangeListener),this.setWidthAndHeightCssStyleProperties();}unmount(){var e;(e=this.resizeObserver)==null||e.disconnect(),this.miniPreview.removeEventListener("pointerup",this.miniPreviewPointerUpListener),this.miniPreview.removeEventListener("pointermove",this.miniPreviewPointerMoveListener),this.miniPreview.removeEventListener("minipreviewbuttontap",this.miniPreviewButtonTapListener),this.miniPreview.removeEventListener("toolbarbuttontap",this.toolbarButtonTapListener),this.miniPreview.removeEventListener("drag",this.miniPreviewDragListener),this.miniPreview.removeEventListener("dragend",this.miniPreviewDragEndListener),this.triggerButton.removeEventListener("pointerdown",this.triggerButtonPointerDownListener),this.triggerButton.removeEventListener("tap",this.triggerButtonTapListener),this.triggerButton.removeEventListener("holdstart",this.triggerButtonLongPressStartListener),this.triggerButton.removeEventListener("holdend",this.triggerButtonLongPressEndListener),this.triggerButton.removeEventListener("drag",this.triggerButtonDragListener),this.orientationObserver.unregister(),this.orientationObserver.removeEventListener(orientationChangeEvent,this.orientationChangeListener),document.removeEventListener("pointerup",this.clickOutsideListener),document.removeEventListener("visibilitychange",this.visibilityChangeListener),this.miniPreviewTimeout.stop();}connectedCallback(){this.mount();}disconnectedCallback(){this.unmount();}setTorchAvailable(e){this.miniPreview.toolbar&&(this.miniPreview[f$1]=this.torchControlVisible&&e);}setZoomAvailable(e){this.miniPreview[i$1]=this.zoomSwitchControlVisible&&e;}switchToIdleState(){this.miniPreview.darkened=!1,this.miniPreview.visible=!1,this.miniPreview.hideToast(),this.triggerButton.expanded=!1,this.triggerButton.stopPulsating();}async switchToActiveState(e,r,t,i){this.miniPreviewTimeout.stop(),this.miniPreview.hideToast(),this.miniPreview.cancelFadeOut(),this.miniPreview.darkened=!1,this.miniPreview.visible=!0,this.triggerButton.expanded=!0,this.triggerButton.startPulsating(),this.miniPreview.toolbar&&(this.miniPreview.toolbar[b$2]=r),e&&(t&&this.style.setProperty(j,`#${t.toJSON()}`),await this.visualFeedback.emitSuccessFeedback()),i===!0&&this.miniPreview.showToast("warning",this._zoomedInMessage,1e3);}async switchToInactiveState(e,r,t,i){this.miniPreview.darkened=t==="persistent"||e,this.miniPreview.visible=t==="persistent"||e,this.triggerButton.expanded=!0,this.triggerButton.stopPulsating(),this.miniPreview.toolbar&&(this.miniPreview.toolbar[b$2]=r),e&&(i&&this.style.setProperty(j,`#${i.toJSON()}`),await this.visualFeedback.emitSuccessFeedback(),t==="default"&&this.miniPreviewTimeout.start()),t==="persistent"&&this.miniPreview.showToast("warning",this._scanPausedMessage,Number.POSITIVE_INFINITY);}async switchToErrorState(e,r){e.resumeCapturingDelay>0&&(this.triggerButton.stopPulsating(),this.miniPreview.showToast("error",e.message,e.resumeCapturingDelay)),r&&(this.style.setProperty(k,`#${e.visualFeedbackColor.toJSON()}`),await this.visualFeedback.emitErrorFeedback());}async onMiniPreviewPointerUp(){await this.presenter.onMiniPreviewPointerUp();}onMiniPreviewPointerMove(){this.presenter.onMiniPreviewPointerMove();}async onMiniPreviewButtonTap(e){switch(e.detail.tapped){case"torchButton":{await this.presenter.onTorchButtonTap(e.detail.enabled);break}case"closeButton":{await this.presenter.onMiniPreviewCloseButtonTap();break}case"resizeButton":{this.presenter.onMiniPreviewResizeButtonTap();break}case"zoomButton":{await this.presenter.onMiniPreviewZoomButtonTap(e.detail.zoomFactor);break}}this.miniPreviewTimeout.running&&this.miniPreviewTimeout.start();}async onMiniPreviewDrag(e){e instanceof a$6&&await this.presenter.onMiniPreviewDrag(e.point,this.orientationObserver.orientation.type);}async onMiniPreviewDragEnd(e){e instanceof a$6&&await this.presenter.onMiniPreviewDragEnd();}async onTriggerButtonPointerDown(){await this.presenter.onTriggerButtonPointerDown();}async onTriggerButtonTap(){await this.presenter.onTriggerButtonTap();}async onTriggerButtonLongPressStart(){this.holdingToScan||(this.holdingToScan=!0,await this.presenter.onTriggerButtonLongPressStart());}async onTriggerButtonLongPressEnd(){this.holdingToScan&&(this.holdingToScan=!1,await this.presenter.onTriggerButtonLongPressEnd());}onTriggerButtonDrag(e){e instanceof a$6&&this.presenter.onTriggerButtonDrag(e.point,this.orientationObserver.orientation.type);}async onToolbarButtonTap(e){switch(this.miniPreview.rewindAnimation(),e.detail.tapped){case"targetModeButton":{await this.onTargetModeButtonTap(e);return}case"scanningBehaviorButton":{await this.onScanningBehaviorButtonTap(e);return}case"barcodeFindButton":{await this.onBarcodeFindButtonTap();return}case"labelCaptureButton":{await this.onLabelCaptureButtonTap();return}case"cameraSwitchButton":await this.onCameraSwitchButtonTap();}}async onClickOutside(e){e.composedPath().includes(this)||await this.presenter.onClickOutside();}async onVisibilityChange(){document.visibilityState==="hidden"&&await this.presenter.onVisibilityChange();}async onTargetModeButtonTap(e){await this.presenter.onTargetModeButtonTap(e.detail.enabled);}async onScanningBehaviorButtonTap(e){await this.presenter.onScanningBehaviorButtonTap(e.detail.enabled);}async onBarcodeFindButtonTap(){await this.presenter.onBarcodeFindButtonTap();}async onLabelCaptureButtonTap(){await this.presenter.onLabelCaptureButtonTap();}async onCameraSwitchButtonTap(){this.miniPreview[f$1]=!1,await this.presenter.onCameraSwitchButtonTap();}async onTorchButtonTap(e){await this.presenter.onTorchButtonTap(e.detail.enabled);}async onMiniPreviewTimeoutFinished(){await this.miniPreview.fadeOut();}async onOrientationChange(e){this.setWidthAndHeightCssStyleProperties(),this.miniPreview.orientation=e.detail.type;let r,t,i,n;switch(e.detail.type){case"landscape-primary":case"landscape-secondary":{r=this.presenter.landscapeOrientationTriggerButtonTranslateX,t=this.presenter.landscapeOrientationTriggerButtonTranslateY,i=this.presenter.landscapeOrientationMiniPreviewTranslateX,n=this.presenter.landscapeOrientationMiniPreviewTranslateY;break}case"portrait-primary":case"portrait-secondary":{r=this.presenter.portraitOrientationTriggerButtonTranslateX,t=this.presenter.portraitOrientationTriggerButtonTranslateY,i=this.presenter.portraitOrientationMiniPreviewTranslateX,n=this.presenter.portraitOrientationMiniPreviewTranslateY;break}}this.triggerButton.translateTo(new Point(r,t)),this.miniPreview.translateTo(new Point(i,n)),await this.presenter.onOrientationChange();}targetModeButtonTapped(e,r=!0){if(r){let t=e?"warning":"info",i=e?this._targetModeEnabledMessage:this._targetModeDisabledMessage;this.miniPreview.showToast(t,i,1e3);}this.miniPreview.toolbar&&(this.miniPreview.toolbar[e$1]=e),this.miniPreviewTimeout.running&&this.miniPreviewTimeout.start();}scanningBehaviorButtonTapped(e,r=!0){if(r){let t=e?"warning":"info",i=e?this._continuousModeEnabledMessage:this._continuousModeDisabledMessage;this.miniPreview.showToast(t,i,1e3);}this.miniPreview.toolbar&&(this.miniPreview.toolbar[b$2]=e?"continuous":"single"),this.miniPreviewTimeout.running&&this.miniPreviewTimeout.start();}torchButtonTapped(e,r=!0){if(r){let t=e?"warning":"info",i=e?this._torchEnabledMessage:this._torchDisabledMessage;this.miniPreview.showToast(t,i,1e3);}this.miniPreview.toolbar&&(this.miniPreview[g$1]=e),this.miniPreviewTimeout.running&&this.miniPreviewTimeout.start();}cameraSwitchButtonTapped(e,r){var t;this.miniPreview[f$1]=this.torchControlVisible&&e,(t=this.miniPreview.toolbar)==null||t.enableCameraSwitchButton(r===CameraPosition.UserFacing);}getDefaultCssVariableValue(e){return window.getComputedStyle(this).getPropertyValue(e)}setTriggerButtonPressedColor(e,r,t){var B;let i=(B=this[e])!=null?B:Color.fromHex(this.getDefaultCssVariableValue(r)),n=clamp(i.alpha+i.alpha*.25,i.alpha,255),U=i.withAlpha(n);this.style.setProperty(t,`#${U.toJSON()}`);}};export{_ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-BDY5XXJ5.js';import {a}from'./chunk-LKZBVQXD.js';import {Localization}from'@scandit/web-datacapture-core';import {normalizeLibraryLocation}from'@scandit/web-datacapture-core/build/js/private/Helper.js';function b(r){return Localization.getInstance().updateIfMissing({...a}),r!=null&&r.libraryLocation&&(r.libraryLocation=normalizeLibraryLocation(r.libraryLocation)),{moduleName:"BarcodeCapture",load:async n=>{var e,o;let a=n;return await a$1.create({...a,libraryLocation:(e=r==null?void 0:r.libraryLocation)!=null?e:a.libraryLocation,highEndBlurryRecognition:(o=r==null?void 0:r.highEndBlurryRecognition)!=null?o:!1})}}}export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as BarcodeFindView}from'../chunks/chunk-
|
|
1
|
+
export{a as BarcodeFindView}from'../chunks/chunk-FDGBQDIL.js';
|
package/build/js/find/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as BarcodeFindSettings}from'../chunks/chunk-TYVQVFM4.js';export{a as BarcodeFindView}from'../chunks/chunk-
|
|
1
|
+
export{a as BarcodeFindSettings}from'../chunks/chunk-TYVQVFM4.js';export{a as BarcodeFindView}from'../chunks/chunk-FDGBQDIL.js';export{a as BarcodeFind}from'../chunks/chunk-5KVH2XIO.js';export{a as BarcodeFindItem,c as BarcodeFindItemContent,b as BarcodeFindItemSearchOptions}from'../chunks/chunk-HTKUJZG2.js';export{a as BarcodeFindViewSettings}from'../chunks/chunk-4PTIOBXM.js';
|
package/build/js/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export { SparkScanScanningMode, SparkScanScanningModeDefault, SparkScanScanningM
|
|
|
25
25
|
export { SparkScanSession, SparkScanSessionJSON } from './spark/SparkScanSession.js';
|
|
26
26
|
export { SparkScanSettings, SparkScanSettingsJSON } from './spark/SparkScanSettings.js';
|
|
27
27
|
export { SparkScanToastSettings } from './spark/ui/SparkScanToastSettings.js';
|
|
28
|
-
export { a as SparkScanView, S as SparkScanViewUiListener } from './SparkScanView-
|
|
28
|
+
export { a as SparkScanView, S as SparkScanViewUiListener } from './SparkScanView-CInaxmG9.js';
|
|
29
29
|
export { SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback } from './spark/SparkScanBarcodeFeedback.js';
|
|
30
30
|
import './spark/ui/SparkScanViewIcon.js';
|
|
31
31
|
import './spark/ui/SparkScanViewMiniPreview.js';
|
package/build/js/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as BarcodeCheckCircleHighlight,a as BarcodeCheckCircleHighlightPreset}from'./chunks/chunk-L6RFD252.js';export{a as BarcodeCheckStatusIconAnnotation}from'./chunks/chunk-3V5ISRFO.js';export{a as BarcodeStatusIconContainer}from'./chunks/chunk-BDRKVLLV.js';export{a as SparkScanView}from'./chunks/chunk-
|
|
1
|
+
export{b as BarcodeCheckCircleHighlight,a as BarcodeCheckCircleHighlightPreset}from'./chunks/chunk-L6RFD252.js';export{a as BarcodeCheckStatusIconAnnotation}from'./chunks/chunk-3V5ISRFO.js';export{a as BarcodeStatusIconContainer}from'./chunks/chunk-BDRKVLLV.js';export{a as SparkScanView}from'./chunks/chunk-UC3AH6LP.js';export{a as SparkScanViewSettings}from'./chunks/chunk-BPHHLTR2.js';export{a as SparkScanViewState}from'./chunks/chunk-L6IZLBEM.js';export{a as SparkScanToastSettings}from'./chunks/chunk-BRRT6GC7.js';export{a as SparkScanPreviewBehavior}from'./chunks/chunk-DFK7AQTK.js';export{a as SparkScanScanningBehavior}from'./chunks/chunk-IMYBB4ZA.js';export{a as SparkScanScanningMode,b as SparkScanScanningModeDefault,c as SparkScanScanningModeTarget}from'./chunks/chunk-SZUPDKV5.js';export{a as SparkScanSettings}from'./chunks/chunk-2ZPG257B.js';export{a as SparkScan}from'./chunks/chunk-KYQRFAWX.js';export{a as SparkScanSession}from'./chunks/chunk-QHNNJFNX.js';export{b as SparkScanBarcodeErrorFeedback,a as SparkScanBarcodeFeedback,c as SparkScanBarcodeSuccessFeedback}from'./chunks/chunk-HKWMKBIV.js';export{a as BarcodeFindSettings}from'./chunks/chunk-TYVQVFM4.js';export{a as BarcodeFindView}from'./chunks/chunk-FDGBQDIL.js';export{a as BarcodeCheckSettings}from'./chunks/chunk-EISL6ITI.js';export{a as BarcodeCheckView}from'./chunks/chunk-5RE6K5SN.js';export{a as BarcodeCheckPopoverAnnotation}from'./chunks/chunk-5N7ZBGWC.js';export{a as BarcodeCheckPopoverAnnotationButton}from'./chunks/chunk-65DU26S5.js';export{a as BarcodeCheckRectangleHighlight}from'./chunks/chunk-Y2XISTOT.js';export{d as BarcodeCheckInfoAnnotation,a as BarcodeCheckInfoAnnotationAnchor}from'./chunks/chunk-SN5VMVMZ.js';export{a as BarcodeCheckAnnotationTrigger}from'./chunks/chunk-ILGTNFTI.js';export{a as BarcodeCheckInfoAnnotationBodyComponent}from'./chunks/chunk-HFF47NXN.js';export{a as BarcodeCheckInfoAnnotationFooter}from'./chunks/chunk-5DXIU4KL.js';export{a as BarcodeCheckInfoAnnotationHeader}from'./chunks/chunk-DQW2EMPB.js';export{a as BarcodeCheckViewSettings}from'./chunks/chunk-4XFE7YMP.js';export{a as BarcodeFind}from'./chunks/chunk-5KVH2XIO.js';export{a as BarcodeFindItem,c as BarcodeFindItemContent,b as BarcodeFindItemSearchOptions}from'./chunks/chunk-HTKUJZG2.js';export{a as barcodeCaptureLoader}from'./chunks/chunk-WQICERFU.js';export{a as BarcodeCheck}from'./chunks/chunk-BQXBEOL2.js';export{a as BarcodeCheckSession}from'./chunks/chunk-VIFEECK7.js';export{a as BarcodeCheckFeedback}from'./chunks/chunk-CTLHZ4ZL.js';export{a as TrackedBarcodeView}from'./chunks/chunk-644ETSOC.js';export{b as BarcodeCaptureOverlay,a as BarcodeCaptureOverlayStyle}from'./chunks/chunk-SNJABJAZ.js';export{a as BarcodeCaptureSettings}from'./chunks/chunk-NNMXFRC2.js';export{a as ScanIntention}from'./chunks/chunk-NH3EDXZZ.js';export{a as BarcodeBatch}from'./chunks/chunk-OMY3KC7L.js';export{a as BarcodeBatchAdvancedOverlay}from'./chunks/chunk-QBMLA2J7.js';export{b as BarcodeBatchBasicOverlay,a as BarcodeBatchBasicOverlayStyle}from'./chunks/chunk-R5ROT3AK.js';export{a as BarcodeBatchSession}from'./chunks/chunk-H5VEANGI.js';export{a as TrackedBarcode}from'./chunks/chunk-DORFGC2X.js';export{a as BarcodeBatchSettings}from'./chunks/chunk-I22E7AYH.js';export{a as BarcodeCapture}from'./chunks/chunk-J3I6TRKT.js';export{a as BarcodeCaptureSession}from'./chunks/chunk-FPZJIOQH.js';export{a as LocalizedOnlyBarcode}from'./chunks/chunk-MUX2WWWH.js';export{e as Barcode,c as Checksum,d as CompositeFlag,b as CompositeType,a as Symbology}from'./chunks/chunk-PE6EDL2S.js';export{a as StructuredAppendData}from'./chunks/chunk-IEE5MKEA.js';export{a as EncodingRange}from'./chunks/chunk-J4VFWBJ7.js';export{a as SparkScanMiniPreviewSize}from'./chunks/chunk-MVDPXLVX.js';export{a as BarcodeFindViewSettings}from'./chunks/chunk-4PTIOBXM.js';export{a as SymbologyDescription}from'./chunks/chunk-OEYNGWOX.js';export{a as Range}from'./chunks/chunk-7SWSAHI5.js';export{a as SymbologySettings}from'./chunks/chunk-LBAL6OCN.js';export{a as BarcodeCaptureFeedback}from'./chunks/chunk-WPSMXGDG.js';
|
package/build/js/moduleLoader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as barcodeCaptureLoader}from'./chunks/chunk-
|
|
1
|
+
export{a as barcodeCaptureLoader}from'./chunks/chunk-WQICERFU.js';
|
|
@@ -5,7 +5,7 @@ export { SparkScanScanningMode, SparkScanScanningModeDefault, SparkScanScanningM
|
|
|
5
5
|
export { SparkScanSession, SparkScanSessionJSON } from './SparkScanSession.js';
|
|
6
6
|
export { SparkScanSettings, SparkScanSettingsJSON } from './SparkScanSettings.js';
|
|
7
7
|
export { SparkScanToastSettings } from './ui/SparkScanToastSettings.js';
|
|
8
|
-
export { a as SparkScanView, S as SparkScanViewUiListener } from '../SparkScanView-
|
|
8
|
+
export { a as SparkScanView, S as SparkScanViewUiListener } from '../SparkScanView-CInaxmG9.js';
|
|
9
9
|
export { SparkScanBarcodeErrorFeedback, SparkScanBarcodeFeedback, SparkScanBarcodeSuccessFeedback } from './SparkScanBarcodeFeedback.js';
|
|
10
10
|
import './ui/SparkScanViewIcon.js';
|
|
11
11
|
import './ui/SparkScanViewMiniPreview.js';
|
package/build/js/spark/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanView}from'../chunks/chunk-
|
|
1
|
+
export{a as SparkScanView}from'../chunks/chunk-UC3AH6LP.js';export{a as SparkScanViewSettings}from'../chunks/chunk-BPHHLTR2.js';export{a as SparkScanViewState}from'../chunks/chunk-L6IZLBEM.js';export{a as SparkScanToastSettings}from'../chunks/chunk-BRRT6GC7.js';export{a as SparkScanPreviewBehavior}from'../chunks/chunk-DFK7AQTK.js';export{a as SparkScanScanningBehavior}from'../chunks/chunk-IMYBB4ZA.js';export{a as SparkScanScanningMode,b as SparkScanScanningModeDefault,c as SparkScanScanningModeTarget}from'../chunks/chunk-SZUPDKV5.js';export{a as SparkScanSettings}from'../chunks/chunk-2ZPG257B.js';export{a as SparkScan}from'../chunks/chunk-KYQRFAWX.js';export{a as SparkScanSession}from'../chunks/chunk-QHNNJFNX.js';export{b as SparkScanBarcodeErrorFeedback,a as SparkScanBarcodeFeedback,c as SparkScanBarcodeSuccessFeedback}from'../chunks/chunk-HKWMKBIV.js';export{a as SparkScanMiniPreviewSize}from'../chunks/chunk-MVDPXLVX.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@scandit/web-datacapture-core';
|
|
2
2
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
3
|
-
export { a as SparkScanView } from '../../SparkScanView-
|
|
3
|
+
export { a as SparkScanView } from '../../SparkScanView-CInaxmG9.js';
|
|
4
4
|
import '../SparkScan.js';
|
|
5
5
|
import '../SparkScanFeedbackDelegate.js';
|
|
6
6
|
import './SparkScanViewSettings.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanView}from'../../chunks/chunk-
|
|
1
|
+
export{a as SparkScanView}from'../../chunks/chunk-UC3AH6LP.js';
|
|
@@ -40,6 +40,7 @@ declare class SparkScanViewMiniPreview extends ScanditHTMLElement {
|
|
|
40
40
|
private dragController;
|
|
41
41
|
private longPressController;
|
|
42
42
|
private lastKnownTranslate?;
|
|
43
|
+
private rootElement;
|
|
43
44
|
get visible(): boolean;
|
|
44
45
|
set visible(visible: boolean);
|
|
45
46
|
get size(): SparkScanMiniPreviewSize;
|
|
@@ -66,6 +67,7 @@ declare class SparkScanViewMiniPreview extends ScanditHTMLElement {
|
|
|
66
67
|
get pressed(): boolean;
|
|
67
68
|
set pressed(pressed: boolean);
|
|
68
69
|
static create(): SparkScanViewMiniPreview;
|
|
70
|
+
repositionIfOutOfBounds(): void;
|
|
69
71
|
showToast(type: SparkScanViewToastType, message: string, duration: number): void;
|
|
70
72
|
hideToast(): void;
|
|
71
73
|
zoomIn(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as SparkScanViewMiniPreview,a as SparkScanViewMiniPreviewButtonType}from'../../chunks/chunk-
|
|
1
|
+
export{b as SparkScanViewMiniPreview,a as SparkScanViewMiniPreviewButtonType}from'../../chunks/chunk-BZBGJHXV.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataCaptureContextListener, DataCaptureContext, Feedback, Point, FrameSource } from '@scandit/web-datacapture-core';
|
|
2
2
|
import { SparkScanViewSessionStopReason } from '../SparkScanAnalyticsManager.js';
|
|
3
|
-
import { a as SparkScanView, S as SparkScanViewUiListener } from '../../SparkScanView-
|
|
3
|
+
import { a as SparkScanView, S as SparkScanViewUiListener } from '../../SparkScanView-CInaxmG9.js';
|
|
4
4
|
import { SparkScanListener, SparkScan } from '../SparkScan.js';
|
|
5
5
|
import { SparkScanSession } from '../SparkScanSession.js';
|
|
6
6
|
import { SparkScanViewSettings } from './SparkScanViewSettings.js';
|
|
@@ -55,6 +55,7 @@ declare class SparkScanViewPresenter implements SparkScanListener, DataCaptureCo
|
|
|
55
55
|
private get defaultTriggerButtonTranslateX();
|
|
56
56
|
private get defaultTriggerButtonTranslateY();
|
|
57
57
|
private get defaultMiniPreviewTranslateX();
|
|
58
|
+
private get parentViewSizes();
|
|
58
59
|
private get defaultMiniPreviewTranslateY();
|
|
59
60
|
static forView(view: SparkScanView, context: DataCaptureContext, sparkScan: SparkScan, sparkScanViewSettings: SparkScanViewSettings): SparkScanViewPresenter;
|
|
60
61
|
prepareScanning(host: HTMLElement): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanViewPresenter}from'../../chunks/chunk-
|
|
1
|
+
export{a as SparkScanViewPresenter}from'../../chunks/chunk-64AES6FW.js';
|
|
@@ -23,6 +23,7 @@ declare class SparkScanViewTriggerButton extends ScanditHTMLElement {
|
|
|
23
23
|
static create(): SparkScanViewTriggerButton;
|
|
24
24
|
connectedCallback(): void;
|
|
25
25
|
disconnectedCallback(): void;
|
|
26
|
+
repositionIfOutOfBounds(): void;
|
|
26
27
|
translateTo(point: Point): void;
|
|
27
28
|
setImage(image?: HTMLImageElement | SVGElement): void;
|
|
28
29
|
startPulsating(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanViewTriggerButton}from'../../chunks/chunk-
|
|
1
|
+
export{a as SparkScanViewTriggerButton}from'../../chunks/chunk-LY4V725T.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../SparkScanScanningMode.js';
|
|
2
|
-
export { S as SparkScanViewUiListener } from '../../SparkScanView-
|
|
2
|
+
export { S as SparkScanViewUiListener } from '../../SparkScanView-CInaxmG9.js';
|
|
3
3
|
import './SparkScanViewState.js';
|
|
4
4
|
import '@scandit/web-datacapture-core/build/js/private/Serializable';
|
|
5
5
|
import '../SparkScanPreviewBehavior.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanViewVisualFeedback}from'../../chunks/chunk-
|
|
1
|
+
export{a as SparkScanViewVisualFeedback}from'../../chunks/chunk-62I36ZHW.js';
|
|
@@ -18,7 +18,8 @@ declare class DragController {
|
|
|
18
18
|
resizeListener: EventListener;
|
|
19
19
|
repositioningTimeout: Timeout;
|
|
20
20
|
margin: Point;
|
|
21
|
-
|
|
21
|
+
boundaryElement: HTMLElement;
|
|
22
|
+
constructor(element: HTMLElement, boundaryElement?: HTMLElement | null);
|
|
22
23
|
get translateWithMargin(): Point;
|
|
23
24
|
connect(): void;
|
|
24
25
|
disconnect(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as DragController,a as DragControllerEvent}from'../../../chunks/chunk-
|
|
1
|
+
export{b as DragController,a as DragControllerEvent}from'../../../chunks/chunk-RWDAYBTQ.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SparkScanToastSettings, SparkScanToastSettingsJSON } from './SparkScanToastSettings.js';
|
|
2
|
-
export { a as SparkScanView, S as SparkScanViewUiListener } from '../../SparkScanView-
|
|
2
|
+
export { a as SparkScanView, S as SparkScanViewUiListener } from '../../SparkScanView-CInaxmG9.js';
|
|
3
3
|
export { SparkScanViewFeedbackManager } from './SparkScanViewFeedbackManager.js';
|
|
4
4
|
export { SparkScanViewIcon } from './SparkScanViewIcon.js';
|
|
5
5
|
export { SparkScanViewMiniPreview, SparkScanViewMiniPreviewButtonType } from './SparkScanViewMiniPreview.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SparkScanView}from'../../chunks/chunk-
|
|
1
|
+
export{a as SparkScanView}from'../../chunks/chunk-UC3AH6LP.js';export{a as SparkScanViewTriggerButton}from'../../chunks/chunk-LY4V725T.js';export{a as SparkScanViewVisualFeedback}from'../../chunks/chunk-62I36ZHW.js';export{b as SparkScanViewMiniPreview,a as SparkScanViewMiniPreviewButtonType}from'../../chunks/chunk-BZBGJHXV.js';export{a as SparkScanViewToolbar}from'../../chunks/chunk-YQNNEW67.js';export{a as SparkScanViewIcon}from'../../chunks/chunk-DOA2Q3CZ.js';export{a as SparkScanViewPresenter}from'../../chunks/chunk-64AES6FW.js';export{a as SparkScanViewPreferenceManager}from'../../chunks/chunk-QCD3RIT4.js';export{a as SparkScanViewSettings}from'../../chunks/chunk-BPHHLTR2.js';export{a as SparkScanViewStateManager}from'../../chunks/chunk-OTZPCIBD.js';export{a as SparkScanViewState}from'../../chunks/chunk-L6IZLBEM.js';export{a as SparkScanViewToast}from'../../chunks/chunk-XSJEGOGN.js';export{a as SparkScanToastSettings}from'../../chunks/chunk-BRRT6GC7.js';export{a as SparkScanViewFeedbackManager}from'../../chunks/chunk-BG7VNYCV.js';export{a as SparkScanMiniPreviewSize}from'../../chunks/chunk-MVDPXLVX.js';
|
|
@@ -24,7 +24,7 @@ import '../BarcodeCaptureSession.js';
|
|
|
24
24
|
import '../LocalizedOnlyBarcode.js';
|
|
25
25
|
import '../check/BarcodeCheckSession.js';
|
|
26
26
|
import '../spark/SparkScanSession.js';
|
|
27
|
-
import '../SparkScanView-
|
|
27
|
+
import '../SparkScanView-CInaxmG9.js';
|
|
28
28
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
29
29
|
import '../spark/SparkScanScanningMode.js';
|
|
30
30
|
import '../spark/SparkScanPreviewBehavior.js';
|
|
@@ -24,7 +24,7 @@ import '../BarcodeCaptureSession.js';
|
|
|
24
24
|
import '../LocalizedOnlyBarcode.js';
|
|
25
25
|
import '../check/BarcodeCheckSession.js';
|
|
26
26
|
import '../spark/SparkScanSession.js';
|
|
27
|
-
import '../SparkScanView-
|
|
27
|
+
import '../SparkScanView-CInaxmG9.js';
|
|
28
28
|
import '@scandit/web-datacapture-core/build/js/private/utils/index.js';
|
|
29
29
|
import '../spark/SparkScanScanningMode.js';
|
|
30
30
|
import '../spark/SparkScanPreviewBehavior.js';
|