@dimer47/capacitor-plugin-printer 2.0.0 → 2.0.1

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.
@@ -3,7 +3,7 @@ require 'json'
3
3
  package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
4
 
5
5
  Pod::Spec.new do |s|
6
- s.name = 'CapacitorPluginPrinter'
6
+ s.name = 'Dimer47CapacitorPluginPrinter'
7
7
  s.version = package['version']
8
8
  s.summary = package['description']
9
9
  s.license = package['license']
@@ -63,11 +63,11 @@ class PrinterPlugin : Plugin() {
63
63
  return@executeOnMainThread
64
64
  }
65
65
 
66
- pm.print(content, settings, webView) { completed ->
66
+ pm.print(content, settings, webView, callback = { completed ->
67
67
  val ret = JSObject()
68
68
  ret.put("success", completed)
69
69
  call.resolve(ret)
70
- }
70
+ })
71
71
  } catch (e: Exception) {
72
72
  call.reject("Print failed: ${e.message}", e)
73
73
  }
@@ -99,11 +99,11 @@ class PrinterPlugin : Plugin() {
99
99
  call.reject("WebView not available")
100
100
  return@executeOnMainThread
101
101
  }
102
- pm.print(html, settings, webView) { completed ->
102
+ pm.print(html, settings, webView, callback = { completed ->
103
103
  val ret = JSObject()
104
104
  ret.put("success", completed)
105
105
  call.resolve(ret)
106
- }
106
+ })
107
107
  } catch (e: Exception) {
108
108
  call.reject("Print failed: ${e.message}", e)
109
109
  }
@@ -132,11 +132,11 @@ class PrinterPlugin : Plugin() {
132
132
  call.reject("WebView not available")
133
133
  return@executeOnMainThread
134
134
  }
135
- pm.print(path, settings, webView) { completed ->
135
+ pm.print(path, settings, webView, callback = { completed ->
136
136
  val ret = JSObject()
137
137
  ret.put("success", completed)
138
138
  call.resolve(ret)
139
- }
139
+ })
140
140
  } catch (e: Exception) {
141
141
  call.reject("Print failed: ${e.message}", e)
142
142
  }
@@ -171,11 +171,11 @@ class PrinterPlugin : Plugin() {
171
171
  call.reject("WebView not available")
172
172
  return@executeOnMainThread
173
173
  }
174
- pm.print(content, settings, webView, forcedMimeType = mimeType) { completed ->
174
+ pm.print(content, settings, webView, callback = { completed ->
175
175
  val ret = JSObject()
176
176
  ret.put("success", completed)
177
177
  call.resolve(ret)
178
- }
178
+ }, forcedMimeType = mimeType)
179
179
  } catch (e: Exception) {
180
180
  call.reject("Print failed: ${e.message}", e)
181
181
  }
@@ -205,11 +205,11 @@ class PrinterPlugin : Plugin() {
205
205
  call.reject("WebView not available")
206
206
  return@executeOnMainThread
207
207
  }
208
- pm.print(path, settings, webView, forcedMimeType = mimeType) { completed ->
208
+ pm.print(path, settings, webView, callback = { completed ->
209
209
  val ret = JSObject()
210
210
  ret.put("success", completed)
211
211
  call.resolve(ret)
212
- }
212
+ }, forcedMimeType = mimeType)
213
213
  } catch (e: Exception) {
214
214
  call.reject("Print failed: ${e.message}", e)
215
215
  }
@@ -233,11 +233,11 @@ class PrinterPlugin : Plugin() {
233
233
  call.reject("WebView not available")
234
234
  return@executeOnMainThread
235
235
  }
236
- pm.print(null, settings, webView) { completed ->
236
+ pm.print(null, settings, webView, callback = { completed ->
237
237
  val ret = JSObject()
238
238
  ret.put("success", completed)
239
239
  call.resolve(ret)
240
- }
240
+ })
241
241
  } catch (e: Exception) {
242
242
  call.reject("Print failed: ${e.message}", e)
243
243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimer47/capacitor-plugin-printer",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Capacitor plugin for printing HTML, PDF, images and plain text on iOS and Android",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -11,7 +11,7 @@
11
11
  "android/build.gradle",
12
12
  "dist/",
13
13
  "ios/Sources/",
14
- "CapacitorPluginPrinter.podspec",
14
+ "Dimer47CapacitorPluginPrinter.podspec",
15
15
  "Package.swift"
16
16
  ],
17
17
  "keywords": [