@urga-panel/ur-panels-core 1.0.13 → 1.0.15

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.
@@ -18,5 +18,8 @@ export declare class WVFrontService extends Service {
18
18
  protected onDestroy(): Promise<ServiceResponse>;
19
19
  oWebViewInterface: NSWebViewinterface;
20
20
  constructor(ots: WVFrontServiceOts);
21
+ downloadFile(url: string): void;
22
+ shareFile(url: string): void;
23
+ gotoBack(): void;
21
24
  sendFetchRequest(url: string, options?: RequestInit): Promise<any>;
22
25
  }
@@ -26,6 +26,15 @@ export class WVFrontService extends Service {
26
26
  constructor(ots) {
27
27
  super({ ...ots });
28
28
  }
29
+ downloadFile(url) {
30
+ this.oWebViewInterface.emit("downloadFile", url);
31
+ }
32
+ shareFile(url) {
33
+ this.oWebViewInterface.emit("shareFile", url);
34
+ }
35
+ gotoBack() {
36
+ this.oWebViewInterface.emit("gotoBack", "");
37
+ }
29
38
  async sendFetchRequest(url, options) {
30
39
  console.log("sendFetchRequest", url, options);
31
40
  const id = `r_${Date.now()}_${++WVFrontService._requestIdCounter}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urga-panel/ur-panels-core",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -39,6 +39,16 @@ export class WVFrontService extends Service {
39
39
 
40
40
  }
41
41
 
42
+ public downloadFile(url: string) {
43
+ this.oWebViewInterface.emit("downloadFile", url);
44
+ }
45
+ public shareFile(url: string) {
46
+ this.oWebViewInterface.emit("shareFile", url);
47
+ }
48
+ public gotoBack() {
49
+ this.oWebViewInterface.emit("gotoBack", "");
50
+ }
51
+
42
52
  public async sendFetchRequest(url: string, options?: RequestInit): Promise<any> {
43
53
  console.log("sendFetchRequest", url, options);
44
54
  const id = `r_${Date.now()}_${++WVFrontService._requestIdCounter}`;
@@ -95,4 +105,6 @@ export class WVFrontService extends Service {
95
105
  });
96
106
  }
97
107
 
108
+
109
+
98
110
  }