@capacitor/file-viewer 1.0.0 → 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.
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = 'ios/Sources/FileViewerPlugin/*.{swift,h,m,c,cc,mm,cpp}'
14
14
  s.ios.deployment_target = '14.0'
15
- s.dependency 'IONFileViewerLib', spec='~> 1.0'
15
+ s.dependency 'IONFileViewerLib', spec='~> 1.0.1'
16
16
  s.dependency 'Capacitor'
17
17
  s.swift_version = '5.1'
18
18
  end
package/Package.swift CHANGED
@@ -10,13 +10,13 @@ let package = Package(
10
10
  targets: ["FileViewerPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "7.0.0")
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "7.1.0")
14
14
  ],
15
15
  targets: [
16
16
  .binaryTarget(
17
17
  name: "IONFileViewerLib",
18
- url: "https://github.com/ionic-team/ion-ios-fileviewer/releases/download/1.0.0/IONFileViewerLib.zip",
19
- checksum: "02728411a63b4dcb630251d6b37f0ea173804a6408d916a0ba3f1ea9d4301b1a" // sha-256
18
+ url: "https://github.com/ionic-team/ion-ios-fileviewer/releases/download/1.0.1/IONFileViewerLib.zip",
19
+ checksum: "2dcd0291e664ffbb5636119f147eda266e0d2284aa53a9c99925d0e442a0e92d" // sha-256
20
20
  ),
21
21
  .target(
22
22
  name: "FileViewerPlugin",
@@ -58,7 +58,7 @@ repositories {
58
58
  dependencies {
59
59
  implementation fileTree(dir: 'libs', include: ['*.jar'])
60
60
  implementation project(':capacitor-android')
61
- implementation "io.ionic.libs:ionfileviewer-android:1.0.0"
61
+ implementation "io.ionic.libs:ionfileviewer-android:1.0.1"
62
62
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
63
63
 
64
64
  testImplementation "junit:junit:$junitVersion"
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,r)=>{const n=e.Capacitor.Plugins[i];if(n===void 0){r(new Error(`Capacitor plugin ${i} not found`));return}if(typeof n[o]!="function"){r(new Error(`Method ${o} not found in Capacitor plugin ${i}`));return}(async()=>{try{const t=await n[o](w);c(t)}catch(t){r(t)}})()}}})}})}function l(e){e.CapacitorUtils.Synapse=new Proxy({},{get(a,i){return e.cordova.plugins[i]}})}function d(e=!1){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;
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 d(e=!1){window.CapacitorUtils=window.CapacitorUtils||{},window.Capacitor!==void 0&&!e?a(window):window.cordova!==void 0&&u(window)}const l=i.registerPlugin("FileViewer",{web:()=>Promise.resolve().then(()=>m).then(e=>new e.FileViewerWeb)});d();class w 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:w},Symbol.toStringTag,{value:"Module"}));o.FileViewer=l,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
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(l, n) {
9
- return (w, c, r) => {
10
- const t = i.Capacitor.Plugins[o];
11
- if (t === void 0) {
12
- r(new Error(`Capacitor plugin ${o} not found`));
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 t[n] != "function") {
16
- r(new Error(`Method ${n} not found in Capacitor plugin ${o}`));
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 e = await t[n](w);
22
- c(e);
23
- } catch (e) {
24
- r(e);
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 s(i) {
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 d(i = !1) {
45
- window.CapacitorUtils = window.CapacitorUtils || {}, window.Capacitor !== void 0 && !i ? u(window) : window.cordova !== void 0 && s(window);
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
- d();
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.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.2"
58
+ "@capacitor/synapse": "^1.0.3"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@capacitor/android": "^7.0.0",