@twintag/twintag-core 0.2.279-fix-ocr-scanner-update-ce883df10b1d4b81e7cf691ed723691d6f7bc81c → 0.2.279-fix-ocr-scanner-update-ec42ca951c4f16b77ca0afa9f41095303b05aeea
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stencil-web-components.cjs.js +1 -1
- package/dist/cjs/twintag-ocr-scanner.cjs.entry.js +8 -1
- package/dist/cjs/twintag-offline-support.cjs.entry.js +1 -1
- package/dist/collection/components/twintag-scanner/twintag-ocr-scanner.js +26 -1
- package/dist/collection/version.js +1 -1
- package/dist/components/twintag-ocr-scanner.js +9 -1
- package/dist/components/twintag-offline-support.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stencil-web-components.js +1 -1
- package/dist/esm/twintag-ocr-scanner.entry.js +8 -1
- package/dist/esm/twintag-offline-support.entry.js +1 -1
- package/dist/stencil-web-components/{p-e5966a4e.entry.js → p-bc276703.entry.js} +1 -1
- package/dist/stencil-web-components/{p-2afe759f.entry.js → p-faf77d28.entry.js} +1 -1
- package/dist/stencil-web-components/stencil-web-components.esm.js +1 -1
- package/dist/types/components/twintag-scanner/twintag-ocr-scanner.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/drone/src/libs/stencil-web-components/.stencil/libs/twintag-sdk/src/lib/version.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/twintag-sdk/src/lib/version.js +1 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["twintag-preview.cjs",[[1,"twintag-preview",{"item":[1],"initial":[16],"smoothExtinction":[2,"smooth-extinction"],"extension":[1],"showButtons":[4,"show-buttons"],"previewableItem":[32],"type":[32]}]]],["twintag-auth-callback.cjs",[[1,"twintag-auth-callback"]]],["twintag-auth-logout.cjs",[[1,"twintag-auth-logout"]]],["twintag-media.cjs",[[1,"twintag-media",{"first":[1],"middle":[1],"last":[1]}]]],["twintag-ocr-scanner.cjs",[[1,"twintag-ocr-scanner",{"stream":[1040],"cropX":[2,"crop-x"],"cropY":[2,"crop-y"],"zoom":[514],"devices":[32]},[[2,"recognize","ocrHandler"]]]]],["twintag-offline-actions.cjs",[[1,"twintag-offline-actions",{"enableSingleRetry":[4,"enable-single-retry"],"header":[1],"showTimestamp":[4,"show-timestamp"],"showDescription":[4,"show-description"],"closeText":[1,"close-text"],"retryText":[1,"retry-text"],"noPendingActionsText":[1,"no-pending-actions-text"],"pendingOfflineRequests":[32],"processing":[32]},[[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-state.cjs",[[1,"twintag-offline-state",{"onlineState":[32],"pendingRequests":[32]},[[8,"onlineChanged","onlineChangedHandler"],[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-support.cjs",[[1,"twintag-offline-support",{"autoSync":[4,"auto-sync"],"forceOffline":[4,"force-offline"],"config":[16]}]]],["twintag-qr-scanner.cjs",[[1,"twintag-qr-scanner",{"stream":[1040],"mode":[1],"format":[1],"crop":[2],"zoom":[514],"devices":[32]}]]],["twintag-share.cjs",[[1,"twintag-share",{"url":[1],"modalTitle":[1,"modal-title"],"modalSubtitle":[1,"modal-subtitle"],"closeBtn":[1,"close-btn"],"copyClipboardBtn":[1,"copy-clipboard-btn"],"open":[1540]},[[0,"keydown","handleKeyDown"]]]]],["twintag-spinner.cjs",[[1,"twintag-spinner",{"color":[513],"duration":[2],"name":[1]}]]],["twintag-pdf-viewer.cjs",[[0,"twintag-pdf-viewer",{"src":[1],"fileName":[1,"file-name"],"file":[32],"fileURL":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["twintag-preview.cjs",[[1,"twintag-preview",{"item":[1],"initial":[16],"smoothExtinction":[2,"smooth-extinction"],"extension":[1],"showButtons":[4,"show-buttons"],"previewableItem":[32],"type":[32]}]]],["twintag-auth-callback.cjs",[[1,"twintag-auth-callback"]]],["twintag-auth-logout.cjs",[[1,"twintag-auth-logout"]]],["twintag-media.cjs",[[1,"twintag-media",{"first":[1],"middle":[1],"last":[1]}]]],["twintag-ocr-scanner.cjs",[[1,"twintag-ocr-scanner",{"stream":[1040],"mode":[1],"cropX":[2,"crop-x"],"cropY":[2,"crop-y"],"zoom":[514],"devices":[32]},[[2,"recognize","ocrHandler"]]]]],["twintag-offline-actions.cjs",[[1,"twintag-offline-actions",{"enableSingleRetry":[4,"enable-single-retry"],"header":[1],"showTimestamp":[4,"show-timestamp"],"showDescription":[4,"show-description"],"closeText":[1,"close-text"],"retryText":[1,"retry-text"],"noPendingActionsText":[1,"no-pending-actions-text"],"pendingOfflineRequests":[32],"processing":[32]},[[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-state.cjs",[[1,"twintag-offline-state",{"onlineState":[32],"pendingRequests":[32]},[[8,"onlineChanged","onlineChangedHandler"],[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-support.cjs",[[1,"twintag-offline-support",{"autoSync":[4,"auto-sync"],"forceOffline":[4,"force-offline"],"config":[16]}]]],["twintag-qr-scanner.cjs",[[1,"twintag-qr-scanner",{"stream":[1040],"mode":[1],"format":[1],"crop":[2],"zoom":[514],"devices":[32]}]]],["twintag-share.cjs",[[1,"twintag-share",{"url":[1],"modalTitle":[1,"modal-title"],"modalSubtitle":[1,"modal-subtitle"],"closeBtn":[1,"close-btn"],"copyClipboardBtn":[1,"copy-clipboard-btn"],"open":[1540]},[[0,"keydown","handleKeyDown"]]]]],["twintag-spinner.cjs",[[1,"twintag-spinner",{"color":[513],"duration":[2],"name":[1]}]]],["twintag-pdf-viewer.cjs",[[0,"twintag-pdf-viewer",{"src":[1],"fileName":[1,"file-name"],"file":[32],"fileURL":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["twintag-preview.cjs",[[1,"twintag-preview",{"item":[1],"initial":[16],"smoothExtinction":[2,"smooth-extinction"],"extension":[1],"showButtons":[4,"show-buttons"],"previewableItem":[32],"type":[32]}]]],["twintag-auth-callback.cjs",[[1,"twintag-auth-callback"]]],["twintag-auth-logout.cjs",[[1,"twintag-auth-logout"]]],["twintag-media.cjs",[[1,"twintag-media",{"first":[1],"middle":[1],"last":[1]}]]],["twintag-ocr-scanner.cjs",[[1,"twintag-ocr-scanner",{"stream":[1040],"cropX":[2,"crop-x"],"cropY":[2,"crop-y"],"zoom":[514],"devices":[32]},[[2,"recognize","ocrHandler"]]]]],["twintag-offline-actions.cjs",[[1,"twintag-offline-actions",{"enableSingleRetry":[4,"enable-single-retry"],"header":[1],"showTimestamp":[4,"show-timestamp"],"showDescription":[4,"show-description"],"closeText":[1,"close-text"],"retryText":[1,"retry-text"],"noPendingActionsText":[1,"no-pending-actions-text"],"pendingOfflineRequests":[32],"processing":[32]},[[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-state.cjs",[[1,"twintag-offline-state",{"onlineState":[32],"pendingRequests":[32]},[[8,"onlineChanged","onlineChangedHandler"],[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-support.cjs",[[1,"twintag-offline-support",{"autoSync":[4,"auto-sync"],"forceOffline":[4,"force-offline"],"config":[16]}]]],["twintag-qr-scanner.cjs",[[1,"twintag-qr-scanner",{"stream":[1040],"mode":[1],"format":[1],"crop":[2],"zoom":[514],"devices":[32]}]]],["twintag-share.cjs",[[1,"twintag-share",{"url":[1],"modalTitle":[1,"modal-title"],"modalSubtitle":[1,"modal-subtitle"],"closeBtn":[1,"close-btn"],"copyClipboardBtn":[1,"copy-clipboard-btn"],"open":[1540]},[[0,"keydown","handleKeyDown"]]]]],["twintag-spinner.cjs",[[1,"twintag-spinner",{"color":[513],"duration":[2],"name":[1]}]]],["twintag-pdf-viewer.cjs",[[0,"twintag-pdf-viewer",{"src":[1],"fileName":[1,"file-name"],"file":[32],"fileURL":[32]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["twintag-preview.cjs",[[1,"twintag-preview",{"item":[1],"initial":[16],"smoothExtinction":[2,"smooth-extinction"],"extension":[1],"showButtons":[4,"show-buttons"],"previewableItem":[32],"type":[32]}]]],["twintag-auth-callback.cjs",[[1,"twintag-auth-callback"]]],["twintag-auth-logout.cjs",[[1,"twintag-auth-logout"]]],["twintag-media.cjs",[[1,"twintag-media",{"first":[1],"middle":[1],"last":[1]}]]],["twintag-ocr-scanner.cjs",[[1,"twintag-ocr-scanner",{"stream":[1040],"mode":[1],"cropX":[2,"crop-x"],"cropY":[2,"crop-y"],"zoom":[514],"devices":[32]},[[2,"recognize","ocrHandler"]]]]],["twintag-offline-actions.cjs",[[1,"twintag-offline-actions",{"enableSingleRetry":[4,"enable-single-retry"],"header":[1],"showTimestamp":[4,"show-timestamp"],"showDescription":[4,"show-description"],"closeText":[1,"close-text"],"retryText":[1,"retry-text"],"noPendingActionsText":[1,"no-pending-actions-text"],"pendingOfflineRequests":[32],"processing":[32]},[[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-state.cjs",[[1,"twintag-offline-state",{"onlineState":[32],"pendingRequests":[32]},[[8,"onlineChanged","onlineChangedHandler"],[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-support.cjs",[[1,"twintag-offline-support",{"autoSync":[4,"auto-sync"],"forceOffline":[4,"force-offline"],"config":[16]}]]],["twintag-qr-scanner.cjs",[[1,"twintag-qr-scanner",{"stream":[1040],"mode":[1],"format":[1],"crop":[2],"zoom":[514],"devices":[32]}]]],["twintag-share.cjs",[[1,"twintag-share",{"url":[1],"modalTitle":[1,"modal-title"],"modalSubtitle":[1,"modal-subtitle"],"closeBtn":[1,"close-btn"],"copyClipboardBtn":[1,"copy-clipboard-btn"],"open":[1540]},[[0,"keydown","handleKeyDown"]]]]],["twintag-spinner.cjs",[[1,"twintag-spinner",{"color":[513],"duration":[2],"name":[1]}]]],["twintag-pdf-viewer.cjs",[[0,"twintag-pdf-viewer",{"src":[1],"fileName":[1,"file-name"],"file":[32],"fileURL":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -1901,18 +1901,25 @@ const TwintagOcrScanner = class {
|
|
|
1901
1901
|
this.frame = index.createEvent(this, "frame", 7);
|
|
1902
1902
|
this.devices = [];
|
|
1903
1903
|
this.stream = null;
|
|
1904
|
+
this.mode = 'single';
|
|
1904
1905
|
this.cropX = 1;
|
|
1905
1906
|
this.cropY = 1;
|
|
1906
1907
|
this.zoom = 0;
|
|
1907
1908
|
}
|
|
1908
1909
|
async ocrHandler() {
|
|
1910
|
+
this.canRecognize.emit(false);
|
|
1909
1911
|
const { text, frame } = await this.readBarcodeFromCanvas();
|
|
1910
1912
|
this.symbol.emit({
|
|
1911
1913
|
text,
|
|
1912
1914
|
format: 'OCR',
|
|
1913
1915
|
});
|
|
1914
1916
|
this.frame.emit(frame);
|
|
1915
|
-
this.
|
|
1917
|
+
if (this.mode === 'continuous') {
|
|
1918
|
+
this.canRecognize.emit(true);
|
|
1919
|
+
}
|
|
1920
|
+
if (this.mode === 'single') {
|
|
1921
|
+
this.stopStream();
|
|
1922
|
+
}
|
|
1916
1923
|
}
|
|
1917
1924
|
async connectedCallback() {
|
|
1918
1925
|
this.worker = await src.createWorker('eng');
|
|
@@ -206,7 +206,7 @@ class IndexedDbService {
|
|
|
206
206
|
/**
|
|
207
207
|
* The SDK version.
|
|
208
208
|
*/
|
|
209
|
-
const VERSION = '0.2.279-fix-ocr-scanner-update-
|
|
209
|
+
const VERSION = '0.2.279-fix-ocr-scanner-update-ec42ca951c4f16b77ca0afa9f41095303b05aeea';
|
|
210
210
|
|
|
211
211
|
class TwintagErrorValue {
|
|
212
212
|
}
|
|
@@ -5,18 +5,25 @@ export class TwintagOcrScanner {
|
|
|
5
5
|
constructor() {
|
|
6
6
|
this.devices = [];
|
|
7
7
|
this.stream = null;
|
|
8
|
+
this.mode = 'single';
|
|
8
9
|
this.cropX = 1;
|
|
9
10
|
this.cropY = 1;
|
|
10
11
|
this.zoom = 0;
|
|
11
12
|
}
|
|
12
13
|
async ocrHandler() {
|
|
14
|
+
this.canRecognize.emit(false);
|
|
13
15
|
const { text, frame } = await this.readBarcodeFromCanvas();
|
|
14
16
|
this.symbol.emit({
|
|
15
17
|
text,
|
|
16
18
|
format: 'OCR',
|
|
17
19
|
});
|
|
18
20
|
this.frame.emit(frame);
|
|
19
|
-
this.
|
|
21
|
+
if (this.mode === 'continuous') {
|
|
22
|
+
this.canRecognize.emit(true);
|
|
23
|
+
}
|
|
24
|
+
if (this.mode === 'single') {
|
|
25
|
+
this.stopStream();
|
|
26
|
+
}
|
|
20
27
|
}
|
|
21
28
|
async connectedCallback() {
|
|
22
29
|
this.worker = await createWorker('eng');
|
|
@@ -221,6 +228,24 @@ export class TwintagOcrScanner {
|
|
|
221
228
|
},
|
|
222
229
|
"defaultValue": "null"
|
|
223
230
|
},
|
|
231
|
+
"mode": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"mutable": false,
|
|
234
|
+
"complexType": {
|
|
235
|
+
"original": "'single' | 'continuous'",
|
|
236
|
+
"resolved": "\"continuous\" | \"single\"",
|
|
237
|
+
"references": {}
|
|
238
|
+
},
|
|
239
|
+
"required": false,
|
|
240
|
+
"optional": false,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": ""
|
|
244
|
+
},
|
|
245
|
+
"attribute": "mode",
|
|
246
|
+
"reflect": false,
|
|
247
|
+
"defaultValue": "'single'"
|
|
248
|
+
},
|
|
224
249
|
"cropX": {
|
|
225
250
|
"type": "number",
|
|
226
251
|
"mutable": false,
|
|
@@ -1899,18 +1899,25 @@ const TwintagOcrScanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
1899
1899
|
this.frame = createEvent(this, "frame", 7);
|
|
1900
1900
|
this.devices = [];
|
|
1901
1901
|
this.stream = null;
|
|
1902
|
+
this.mode = 'single';
|
|
1902
1903
|
this.cropX = 1;
|
|
1903
1904
|
this.cropY = 1;
|
|
1904
1905
|
this.zoom = 0;
|
|
1905
1906
|
}
|
|
1906
1907
|
async ocrHandler() {
|
|
1908
|
+
this.canRecognize.emit(false);
|
|
1907
1909
|
const { text, frame } = await this.readBarcodeFromCanvas();
|
|
1908
1910
|
this.symbol.emit({
|
|
1909
1911
|
text,
|
|
1910
1912
|
format: 'OCR',
|
|
1911
1913
|
});
|
|
1912
1914
|
this.frame.emit(frame);
|
|
1913
|
-
this.
|
|
1915
|
+
if (this.mode === 'continuous') {
|
|
1916
|
+
this.canRecognize.emit(true);
|
|
1917
|
+
}
|
|
1918
|
+
if (this.mode === 'single') {
|
|
1919
|
+
this.stopStream();
|
|
1920
|
+
}
|
|
1914
1921
|
}
|
|
1915
1922
|
async connectedCallback() {
|
|
1916
1923
|
this.worker = await src.createWorker('eng');
|
|
@@ -2084,6 +2091,7 @@ const TwintagOcrScanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
2084
2091
|
static get style() { return twintagScannerCss; }
|
|
2085
2092
|
}, [1, "twintag-ocr-scanner", {
|
|
2086
2093
|
"stream": [1040],
|
|
2094
|
+
"mode": [1],
|
|
2087
2095
|
"cropX": [2, "crop-x"],
|
|
2088
2096
|
"cropY": [2, "crop-y"],
|
|
2089
2097
|
"zoom": [514],
|
|
@@ -223,7 +223,7 @@ class IndexedDbService {
|
|
|
223
223
|
/**
|
|
224
224
|
* The SDK version.
|
|
225
225
|
*/
|
|
226
|
-
const VERSION = '0.2.279-fix-ocr-scanner-update-
|
|
226
|
+
const VERSION = '0.2.279-fix-ocr-scanner-update-ec42ca951c4f16b77ca0afa9f41095303b05aeea';
|
|
227
227
|
|
|
228
228
|
class TwintagErrorValue {
|
|
229
229
|
}
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["twintag-preview",[[1,"twintag-preview",{"item":[1],"initial":[16],"smoothExtinction":[2,"smooth-extinction"],"extension":[1],"showButtons":[4,"show-buttons"],"previewableItem":[32],"type":[32]}]]],["twintag-auth-callback",[[1,"twintag-auth-callback"]]],["twintag-auth-logout",[[1,"twintag-auth-logout"]]],["twintag-media",[[1,"twintag-media",{"first":[1],"middle":[1],"last":[1]}]]],["twintag-ocr-scanner",[[1,"twintag-ocr-scanner",{"stream":[1040],"cropX":[2,"crop-x"],"cropY":[2,"crop-y"],"zoom":[514],"devices":[32]},[[2,"recognize","ocrHandler"]]]]],["twintag-offline-actions",[[1,"twintag-offline-actions",{"enableSingleRetry":[4,"enable-single-retry"],"header":[1],"showTimestamp":[4,"show-timestamp"],"showDescription":[4,"show-description"],"closeText":[1,"close-text"],"retryText":[1,"retry-text"],"noPendingActionsText":[1,"no-pending-actions-text"],"pendingOfflineRequests":[32],"processing":[32]},[[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-state",[[1,"twintag-offline-state",{"onlineState":[32],"pendingRequests":[32]},[[8,"onlineChanged","onlineChangedHandler"],[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-support",[[1,"twintag-offline-support",{"autoSync":[4,"auto-sync"],"forceOffline":[4,"force-offline"],"config":[16]}]]],["twintag-qr-scanner",[[1,"twintag-qr-scanner",{"stream":[1040],"mode":[1],"format":[1],"crop":[2],"zoom":[514],"devices":[32]}]]],["twintag-share",[[1,"twintag-share",{"url":[1],"modalTitle":[1,"modal-title"],"modalSubtitle":[1,"modal-subtitle"],"closeBtn":[1,"close-btn"],"copyClipboardBtn":[1,"copy-clipboard-btn"],"open":[1540]},[[0,"keydown","handleKeyDown"]]]]],["twintag-spinner",[[1,"twintag-spinner",{"color":[513],"duration":[2],"name":[1]}]]],["twintag-pdf-viewer",[[0,"twintag-pdf-viewer",{"src":[1],"fileName":[1,"file-name"],"file":[32],"fileURL":[32]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["twintag-preview",[[1,"twintag-preview",{"item":[1],"initial":[16],"smoothExtinction":[2,"smooth-extinction"],"extension":[1],"showButtons":[4,"show-buttons"],"previewableItem":[32],"type":[32]}]]],["twintag-auth-callback",[[1,"twintag-auth-callback"]]],["twintag-auth-logout",[[1,"twintag-auth-logout"]]],["twintag-media",[[1,"twintag-media",{"first":[1],"middle":[1],"last":[1]}]]],["twintag-ocr-scanner",[[1,"twintag-ocr-scanner",{"stream":[1040],"mode":[1],"cropX":[2,"crop-x"],"cropY":[2,"crop-y"],"zoom":[514],"devices":[32]},[[2,"recognize","ocrHandler"]]]]],["twintag-offline-actions",[[1,"twintag-offline-actions",{"enableSingleRetry":[4,"enable-single-retry"],"header":[1],"showTimestamp":[4,"show-timestamp"],"showDescription":[4,"show-description"],"closeText":[1,"close-text"],"retryText":[1,"retry-text"],"noPendingActionsText":[1,"no-pending-actions-text"],"pendingOfflineRequests":[32],"processing":[32]},[[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-state",[[1,"twintag-offline-state",{"onlineState":[32],"pendingRequests":[32]},[[8,"onlineChanged","onlineChangedHandler"],[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-support",[[1,"twintag-offline-support",{"autoSync":[4,"auto-sync"],"forceOffline":[4,"force-offline"],"config":[16]}]]],["twintag-qr-scanner",[[1,"twintag-qr-scanner",{"stream":[1040],"mode":[1],"format":[1],"crop":[2],"zoom":[514],"devices":[32]}]]],["twintag-share",[[1,"twintag-share",{"url":[1],"modalTitle":[1,"modal-title"],"modalSubtitle":[1,"modal-subtitle"],"closeBtn":[1,"close-btn"],"copyClipboardBtn":[1,"copy-clipboard-btn"],"open":[1540]},[[0,"keydown","handleKeyDown"]]]]],["twintag-spinner",[[1,"twintag-spinner",{"color":[513],"duration":[2],"name":[1]}]]],["twintag-pdf-viewer",[[0,"twintag-pdf-viewer",{"src":[1],"fileName":[1,"file-name"],"file":[32],"fileURL":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["twintag-preview",[[1,"twintag-preview",{"item":[1],"initial":[16],"smoothExtinction":[2,"smooth-extinction"],"extension":[1],"showButtons":[4,"show-buttons"],"previewableItem":[32],"type":[32]}]]],["twintag-auth-callback",[[1,"twintag-auth-callback"]]],["twintag-auth-logout",[[1,"twintag-auth-logout"]]],["twintag-media",[[1,"twintag-media",{"first":[1],"middle":[1],"last":[1]}]]],["twintag-ocr-scanner",[[1,"twintag-ocr-scanner",{"stream":[1040],"cropX":[2,"crop-x"],"cropY":[2,"crop-y"],"zoom":[514],"devices":[32]},[[2,"recognize","ocrHandler"]]]]],["twintag-offline-actions",[[1,"twintag-offline-actions",{"enableSingleRetry":[4,"enable-single-retry"],"header":[1],"showTimestamp":[4,"show-timestamp"],"showDescription":[4,"show-description"],"closeText":[1,"close-text"],"retryText":[1,"retry-text"],"noPendingActionsText":[1,"no-pending-actions-text"],"pendingOfflineRequests":[32],"processing":[32]},[[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-state",[[1,"twintag-offline-state",{"onlineState":[32],"pendingRequests":[32]},[[8,"onlineChanged","onlineChangedHandler"],[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-support",[[1,"twintag-offline-support",{"autoSync":[4,"auto-sync"],"forceOffline":[4,"force-offline"],"config":[16]}]]],["twintag-qr-scanner",[[1,"twintag-qr-scanner",{"stream":[1040],"mode":[1],"format":[1],"crop":[2],"zoom":[514],"devices":[32]}]]],["twintag-share",[[1,"twintag-share",{"url":[1],"modalTitle":[1,"modal-title"],"modalSubtitle":[1,"modal-subtitle"],"closeBtn":[1,"close-btn"],"copyClipboardBtn":[1,"copy-clipboard-btn"],"open":[1540]},[[0,"keydown","handleKeyDown"]]]]],["twintag-spinner",[[1,"twintag-spinner",{"color":[513],"duration":[2],"name":[1]}]]],["twintag-pdf-viewer",[[0,"twintag-pdf-viewer",{"src":[1],"fileName":[1,"file-name"],"file":[32],"fileURL":[32]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["twintag-preview",[[1,"twintag-preview",{"item":[1],"initial":[16],"smoothExtinction":[2,"smooth-extinction"],"extension":[1],"showButtons":[4,"show-buttons"],"previewableItem":[32],"type":[32]}]]],["twintag-auth-callback",[[1,"twintag-auth-callback"]]],["twintag-auth-logout",[[1,"twintag-auth-logout"]]],["twintag-media",[[1,"twintag-media",{"first":[1],"middle":[1],"last":[1]}]]],["twintag-ocr-scanner",[[1,"twintag-ocr-scanner",{"stream":[1040],"mode":[1],"cropX":[2,"crop-x"],"cropY":[2,"crop-y"],"zoom":[514],"devices":[32]},[[2,"recognize","ocrHandler"]]]]],["twintag-offline-actions",[[1,"twintag-offline-actions",{"enableSingleRetry":[4,"enable-single-retry"],"header":[1],"showTimestamp":[4,"show-timestamp"],"showDescription":[4,"show-description"],"closeText":[1,"close-text"],"retryText":[1,"retry-text"],"noPendingActionsText":[1,"no-pending-actions-text"],"pendingOfflineRequests":[32],"processing":[32]},[[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-state",[[1,"twintag-offline-state",{"onlineState":[32],"pendingRequests":[32]},[[8,"onlineChanged","onlineChangedHandler"],[8,"offlineRequestsChanged","offlineRequestsChangedHandler"]]]]],["twintag-offline-support",[[1,"twintag-offline-support",{"autoSync":[4,"auto-sync"],"forceOffline":[4,"force-offline"],"config":[16]}]]],["twintag-qr-scanner",[[1,"twintag-qr-scanner",{"stream":[1040],"mode":[1],"format":[1],"crop":[2],"zoom":[514],"devices":[32]}]]],["twintag-share",[[1,"twintag-share",{"url":[1],"modalTitle":[1,"modal-title"],"modalSubtitle":[1,"modal-subtitle"],"closeBtn":[1,"close-btn"],"copyClipboardBtn":[1,"copy-clipboard-btn"],"open":[1540]},[[0,"keydown","handleKeyDown"]]]]],["twintag-spinner",[[1,"twintag-spinner",{"color":[513],"duration":[2],"name":[1]}]]],["twintag-pdf-viewer",[[0,"twintag-pdf-viewer",{"src":[1],"fileName":[1,"file-name"],"file":[32],"fileURL":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1897,18 +1897,25 @@ const TwintagOcrScanner = class {
|
|
|
1897
1897
|
this.frame = createEvent(this, "frame", 7);
|
|
1898
1898
|
this.devices = [];
|
|
1899
1899
|
this.stream = null;
|
|
1900
|
+
this.mode = 'single';
|
|
1900
1901
|
this.cropX = 1;
|
|
1901
1902
|
this.cropY = 1;
|
|
1902
1903
|
this.zoom = 0;
|
|
1903
1904
|
}
|
|
1904
1905
|
async ocrHandler() {
|
|
1906
|
+
this.canRecognize.emit(false);
|
|
1905
1907
|
const { text, frame } = await this.readBarcodeFromCanvas();
|
|
1906
1908
|
this.symbol.emit({
|
|
1907
1909
|
text,
|
|
1908
1910
|
format: 'OCR',
|
|
1909
1911
|
});
|
|
1910
1912
|
this.frame.emit(frame);
|
|
1911
|
-
this.
|
|
1913
|
+
if (this.mode === 'continuous') {
|
|
1914
|
+
this.canRecognize.emit(true);
|
|
1915
|
+
}
|
|
1916
|
+
if (this.mode === 'single') {
|
|
1917
|
+
this.stopStream();
|
|
1918
|
+
}
|
|
1912
1919
|
}
|
|
1913
1920
|
async connectedCallback() {
|
|
1914
1921
|
this.worker = await src.createWorker('eng');
|
|
@@ -202,7 +202,7 @@ class IndexedDbService {
|
|
|
202
202
|
/**
|
|
203
203
|
* The SDK version.
|
|
204
204
|
*/
|
|
205
|
-
const VERSION = '0.2.279-fix-ocr-scanner-update-
|
|
205
|
+
const VERSION = '0.2.279-fix-ocr-scanner-update-ec42ca951c4f16b77ca0afa9f41095303b05aeea';
|
|
206
206
|
|
|
207
207
|
class TwintagErrorValue {
|
|
208
208
|
}
|