@capacitor/file-viewer 1.0.1 → 1.0.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/dist/plugin.cjs +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.mjs +15 -15
- package/package.json +2 -2
package/dist/plugin.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@capacitor/core");function s(e){e.CapacitorUtils.Synapse=new Proxy({},{get(a,i){return new Proxy({},{get(f,o){return(w,c,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@capacitor/core");function s(e){e.CapacitorUtils.Synapse=new Proxy({},{get(a,i){return new Proxy({},{get(f,o){return(w,c,n)=>{const r=e.Capacitor.Plugins[i];if(r===void 0){n(new Error(`Capacitor plugin ${i} not found`));return}if(typeof r[o]!="function"){n(new Error(`Method ${o} not found in Capacitor plugin ${i}`));return}(async()=>{try{const t=await r[o](w);c(t)}catch(t){n(t)}})()}}})}})}function l(e){e.CapacitorUtils.Synapse=new Proxy({},{get(a,i){return e.cordova.plugins[i]}})}function d(e=!1){typeof window>"u"||(window.CapacitorUtils=window.CapacitorUtils||{},window.Capacitor!==void 0&&!e?s(window):window.cordova!==void 0&&l(window))}const p=u.registerPlugin("FileViewer",{web:()=>Promise.resolve().then(()=>require("./web-CLhv9W7r.cjs")).then(e=>new e.FileViewerWeb)});d();exports.FileViewer=p;
|
package/dist/plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(o,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@capacitor/core")):typeof define=="function"&&define.amd?define(["exports","@capacitor/core"],i):(o=typeof globalThis<"u"?globalThis:o||self,i(o.CapacitorFileViewer={},o.capacitorExports))})(this,function(o,i){"use strict";function a(e){e.CapacitorUtils.Synapse=new Proxy({},{get(t,n){return new Proxy({},{get(b,r){return(f,P,c)=>{const p=e.Capacitor.Plugins[n];if(p===void 0){c(new Error(`Capacitor plugin ${n} not found`));return}if(typeof p[r]!="function"){c(new Error(`Method ${r} not found in Capacitor plugin ${n}`));return}(async()=>{try{const s=await p[r](f);P(s)}catch(s){c(s)}})()}}})}})}function u(e){e.CapacitorUtils.Synapse=new Proxy({},{get(t,n){return e.cordova.plugins[n]}})}function
|
|
1
|
+
(function(o,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("@capacitor/core")):typeof define=="function"&&define.amd?define(["exports","@capacitor/core"],i):(o=typeof globalThis<"u"?globalThis:o||self,i(o.CapacitorFileViewer={},o.capacitorExports))})(this,function(o,i){"use strict";function a(e){e.CapacitorUtils.Synapse=new Proxy({},{get(t,n){return new Proxy({},{get(b,r){return(f,P,c)=>{const p=e.Capacitor.Plugins[n];if(p===void 0){c(new Error(`Capacitor plugin ${n} not found`));return}if(typeof p[r]!="function"){c(new Error(`Method ${r} not found in Capacitor plugin ${n}`));return}(async()=>{try{const s=await p[r](f);P(s)}catch(s){c(s)}})()}}})}})}function u(e){e.CapacitorUtils.Synapse=new Proxy({},{get(t,n){return e.cordova.plugins[n]}})}function w(e=!1){typeof window>"u"||(window.CapacitorUtils=window.CapacitorUtils||{},window.Capacitor!==void 0&&!e?a(window):window.cordova!==void 0&&u(window))}const d=i.registerPlugin("FileViewer",{web:()=>Promise.resolve().then(()=>m).then(e=>new e.FileViewerWeb)});w();class l extends i.WebPlugin{openDocumentFromLocalPath(t){return Promise.reject("Not implemented in web")}openDocumentFromResources(t){return Promise.reject("Not implemented in web")}openDocumentFromUrl(t){return Promise.reject("Not implemented in web")}previewMediaContentFromLocalPath(t){return Promise.reject("Not implemented in web")}previewMediaContentFromResources(t){return Promise.reject("Not implemented in web")}previewMediaContentFromUrl(t){return Promise.reject("Not implemented in web")}}const m=Object.freeze(Object.defineProperty({__proto__:null,FileViewerWeb:l},Symbol.toStringTag,{value:"Module"}));o.FileViewer=d,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
package/dist/plugin.mjs
CHANGED
|
@@ -5,23 +5,23 @@ function u(i) {
|
|
|
5
5
|
{
|
|
6
6
|
get(a, o) {
|
|
7
7
|
return new Proxy({}, {
|
|
8
|
-
get(
|
|
9
|
-
return (w, c,
|
|
10
|
-
const
|
|
11
|
-
if (
|
|
12
|
-
|
|
8
|
+
get(f, n) {
|
|
9
|
+
return (w, c, t) => {
|
|
10
|
+
const e = i.Capacitor.Plugins[o];
|
|
11
|
+
if (e === void 0) {
|
|
12
|
+
t(new Error(`Capacitor plugin ${o} not found`));
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
if (typeof
|
|
16
|
-
|
|
15
|
+
if (typeof e[n] != "function") {
|
|
16
|
+
t(new Error(`Method ${n} not found in Capacitor plugin ${o}`));
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
(async () => {
|
|
20
20
|
try {
|
|
21
|
-
const
|
|
22
|
-
c(
|
|
23
|
-
} catch (
|
|
24
|
-
r
|
|
21
|
+
const r = await e[n](w);
|
|
22
|
+
c(r);
|
|
23
|
+
} catch (r) {
|
|
24
|
+
t(r);
|
|
25
25
|
}
|
|
26
26
|
})();
|
|
27
27
|
};
|
|
@@ -31,7 +31,7 @@ function u(i) {
|
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function d(i) {
|
|
35
35
|
i.CapacitorUtils.Synapse = new Proxy(
|
|
36
36
|
{},
|
|
37
37
|
{
|
|
@@ -41,13 +41,13 @@ function s(i) {
|
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
window.CapacitorUtils = window.CapacitorUtils || {}, window.Capacitor !== void 0 && !i ? u(window) : window.cordova !== void 0 &&
|
|
44
|
+
function s(i = !1) {
|
|
45
|
+
typeof window > "u" || (window.CapacitorUtils = window.CapacitorUtils || {}, window.Capacitor !== void 0 && !i ? u(window) : window.cordova !== void 0 && d(window));
|
|
46
46
|
}
|
|
47
47
|
const g = p("FileViewer", {
|
|
48
48
|
web: () => import("./web-R-VO1Dq5.js").then((i) => new i.FileViewerWeb())
|
|
49
49
|
});
|
|
50
|
-
|
|
50
|
+
s();
|
|
51
51
|
export {
|
|
52
52
|
g as FileViewer
|
|
53
53
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/file-viewer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "The FileViewer API provides mechanisms for opening files and previewing media. Not available on web.",
|
|
5
5
|
"main": "./dist/plugin.cjs",
|
|
6
6
|
"module": "./dist/plugin.mjs",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"semantic-release": "semantic-release"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@capacitor/synapse": "^1.0.
|
|
58
|
+
"@capacitor/synapse": "^1.0.3"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@capacitor/android": "^7.0.0",
|