@tma.js/sdk-solid 2.1.9 → 2.1.10
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1872,7 +1872,7 @@ class _s extends D {
|
|
|
1872
1872
|
}), this.postEvent = n;
|
|
1873
1873
|
}
|
|
1874
1874
|
/**
|
|
1875
|
-
* Closes scanner.
|
|
1875
|
+
* Closes the scanner.
|
|
1876
1876
|
*/
|
|
1877
1877
|
close() {
|
|
1878
1878
|
this.postEvent("web_app_close_scan_qr_popup"), this.isOpened = !1;
|
|
@@ -1881,14 +1881,14 @@ class _s extends D {
|
|
|
1881
1881
|
this.set("isOpened", t);
|
|
1882
1882
|
}
|
|
1883
1883
|
/**
|
|
1884
|
-
* Returns true
|
|
1884
|
+
* Returns true if the scanner is currently opened.
|
|
1885
1885
|
*/
|
|
1886
1886
|
get isOpened() {
|
|
1887
1887
|
return this.get("isOpened");
|
|
1888
1888
|
}
|
|
1889
1889
|
async open(t) {
|
|
1890
1890
|
if (this.isOpened)
|
|
1891
|
-
throw new Error("
|
|
1891
|
+
throw new Error("The scanner is already opened");
|
|
1892
1892
|
const { text: s, capture: n } = (typeof t == "string" ? { text: t } : t) || {};
|
|
1893
1893
|
this.isOpened = !0;
|
|
1894
1894
|
try {
|
|
@@ -1902,10 +1902,11 @@ class _s extends D {
|
|
|
1902
1902
|
}
|
|
1903
1903
|
}) || {}).data || null;
|
|
1904
1904
|
return r && this.close(), r;
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1905
|
+
} finally {
|
|
1906
|
+
this.isOpened = !1;
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
|
+
// TODO: Streaming mode, allowing to scan several QRs until closed.
|
|
1909
1910
|
}
|
|
1910
1911
|
const gs = d(
|
|
1911
1912
|
({ version: e, postEvent: t }) => new _s(!1, e, t)
|