capacitor-rfid-plugin-ox 0.3.0 → 0.3.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/README.md +206 -4
- package/android/build.gradle +7 -3
- package/dist/docs.json +196 -6
- package/dist/esm/definitions.d.ts +52 -3
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.d.ts +52 -4
- package/dist/esm/web.js +54 -4
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +58 -8
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +58 -8
- package/dist/plugin.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,25 +13,227 @@ npx cap sync
|
|
|
13
13
|
|
|
14
14
|
<docgen-index>
|
|
15
15
|
|
|
16
|
-
* [`
|
|
16
|
+
* [`isConnected()`](#isconnected)
|
|
17
|
+
* [`startScan()`](#startscan)
|
|
18
|
+
* [`stopScan()`](#stopscan)
|
|
19
|
+
* [`clearData()`](#cleardata)
|
|
20
|
+
* [`getScanData()`](#getscandata)
|
|
21
|
+
* [`getOutputPower()`](#getoutputpower)
|
|
22
|
+
* [`setOutputPower(...)`](#setoutputpower)
|
|
23
|
+
* [`getRange()`](#getrange)
|
|
24
|
+
* [`setRange(...)`](#setrange)
|
|
25
|
+
* [`getQueryMode()`](#getquerymode)
|
|
26
|
+
* [`setQueryMode(...)`](#setquerymode)
|
|
27
|
+
* [`getReaderType()`](#getreadertype)
|
|
28
|
+
* [`getFirmwareVersion()`](#getfirmwareversion)
|
|
29
|
+
* [`writeEpc(...)`](#writeepc)
|
|
30
|
+
* [`writeEpcString(...)`](#writeepcstring)
|
|
31
|
+
* [`startSearch(...)`](#startsearch)
|
|
32
|
+
* [`stopSearch()`](#stopsearch)
|
|
17
33
|
|
|
18
34
|
</docgen-index>
|
|
19
35
|
|
|
20
36
|
<docgen-api>
|
|
21
37
|
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
22
38
|
|
|
23
|
-
###
|
|
39
|
+
### isConnected()
|
|
24
40
|
|
|
25
41
|
```typescript
|
|
26
|
-
|
|
42
|
+
isConnected() => Promise<{ connected: boolean; }>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Returns:** <code>Promise<{ connected: boolean; }></code>
|
|
46
|
+
|
|
47
|
+
--------------------
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### startScan()
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
startScan() => Promise<void>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
--------------------
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### stopScan()
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
stopScan() => Promise<void>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
--------------------
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### clearData()
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
clearData() => Promise<void>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
--------------------
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### getScanData()
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
getScanData() => Promise<any>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Returns:** <code>Promise<any></code>
|
|
84
|
+
|
|
85
|
+
--------------------
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### getOutputPower()
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
getOutputPower() => Promise<{ value: number; }>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Returns:** <code>Promise<{ value: number; }></code>
|
|
95
|
+
|
|
96
|
+
--------------------
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### setOutputPower(...)
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
setOutputPower(options: { power: number; }) => Promise<{ value: number; }>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
| Param | Type |
|
|
106
|
+
| ------------- | ------------------------------- |
|
|
107
|
+
| **`options`** | <code>{ power: number; }</code> |
|
|
108
|
+
|
|
109
|
+
**Returns:** <code>Promise<{ value: number; }></code>
|
|
110
|
+
|
|
111
|
+
--------------------
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### getRange()
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
getRange() => Promise<{ value: number; }>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Returns:** <code>Promise<{ value: number; }></code>
|
|
121
|
+
|
|
122
|
+
--------------------
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### setRange(...)
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
setRange(options: { range: number; }) => Promise<{ value: number; }>
|
|
27
129
|
```
|
|
28
130
|
|
|
29
131
|
| Param | Type |
|
|
30
132
|
| ------------- | ------------------------------- |
|
|
31
|
-
| **`options`** | <code>{
|
|
133
|
+
| **`options`** | <code>{ range: number; }</code> |
|
|
134
|
+
|
|
135
|
+
**Returns:** <code>Promise<{ value: number; }></code>
|
|
136
|
+
|
|
137
|
+
--------------------
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
### getQueryMode()
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
getQueryMode() => Promise<{ value: 0 | 1 | 2 | 3; }>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Returns:** <code>Promise<{ value: 0 | 1 | 2 | 3; }></code>
|
|
147
|
+
|
|
148
|
+
--------------------
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### setQueryMode(...)
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
setQueryMode(options: { queryMode: 0 | 1 | 2 | 3; }) => Promise<{ value: number; }>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
| Param | Type |
|
|
158
|
+
| ------------- | --------------------------------------------- |
|
|
159
|
+
| **`options`** | <code>{ queryMode: 0 \| 1 \| 2 \| 3; }</code> |
|
|
160
|
+
|
|
161
|
+
**Returns:** <code>Promise<{ value: number; }></code>
|
|
162
|
+
|
|
163
|
+
--------------------
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
### getReaderType()
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
getReaderType() => Promise<{ value: number; }>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Returns:** <code>Promise<{ value: number; }></code>
|
|
173
|
+
|
|
174
|
+
--------------------
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### getFirmwareVersion()
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
getFirmwareVersion() => Promise<{ value: string; }>
|
|
181
|
+
```
|
|
32
182
|
|
|
33
183
|
**Returns:** <code>Promise<{ value: string; }></code>
|
|
34
184
|
|
|
35
185
|
--------------------
|
|
36
186
|
|
|
187
|
+
|
|
188
|
+
### writeEpc(...)
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
writeEpc(options: { epc: string; password?: string; }) => Promise<{ value: number; }>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
| Param | Type |
|
|
195
|
+
| ------------- | ------------------------------------------------ |
|
|
196
|
+
| **`options`** | <code>{ epc: string; password?: string; }</code> |
|
|
197
|
+
|
|
198
|
+
**Returns:** <code>Promise<{ value: number; }></code>
|
|
199
|
+
|
|
200
|
+
--------------------
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
### writeEpcString(...)
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
writeEpcString(options: { epc: string; password?: string; }) => Promise<{ value: number; }>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
| Param | Type |
|
|
210
|
+
| ------------- | ------------------------------------------------ |
|
|
211
|
+
| **`options`** | <code>{ epc: string; password?: string; }</code> |
|
|
212
|
+
|
|
213
|
+
**Returns:** <code>Promise<{ value: number; }></code>
|
|
214
|
+
|
|
215
|
+
--------------------
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
### startSearch(...)
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
startSearch(options: { searchableTags: string[]; }) => Promise<void>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
| Param | Type |
|
|
225
|
+
| ------------- | ------------------------------------------ |
|
|
226
|
+
| **`options`** | <code>{ searchableTags: string[]; }</code> |
|
|
227
|
+
|
|
228
|
+
--------------------
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
### stopSearch()
|
|
232
|
+
|
|
233
|
+
```typescript
|
|
234
|
+
stopSearch() => Promise<void>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
--------------------
|
|
238
|
+
|
|
37
239
|
</docgen-api>
|
package/android/build.gradle
CHANGED
|
@@ -45,16 +45,20 @@ android {
|
|
|
45
45
|
repositories {
|
|
46
46
|
google()
|
|
47
47
|
mavenCentral()
|
|
48
|
+
|
|
49
|
+
flatDir {
|
|
50
|
+
dirs("libs")
|
|
51
|
+
}
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
|
|
51
55
|
dependencies {
|
|
52
|
-
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
56
|
+
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'])
|
|
53
57
|
implementation project(':capacitor-android')
|
|
54
58
|
implementation files('libs/platform_sdk_v3.1.221124.jar')
|
|
55
|
-
|
|
59
|
+
api project(':rfid_urovo_usdk')
|
|
56
60
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
57
61
|
testImplementation "junit:junit:$junitVersion"
|
|
58
62
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
59
63
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
60
|
-
}
|
|
64
|
+
}
|
package/dist/docs.json
CHANGED
|
@@ -1,25 +1,215 @@
|
|
|
1
1
|
{
|
|
2
2
|
"api": {
|
|
3
|
-
"name": "
|
|
4
|
-
"slug": "
|
|
3
|
+
"name": "RFIDPlugin",
|
|
4
|
+
"slug": "rfidplugin",
|
|
5
5
|
"docs": "",
|
|
6
6
|
"tags": [],
|
|
7
7
|
"methods": [
|
|
8
8
|
{
|
|
9
|
-
"name": "
|
|
10
|
-
"signature": "(
|
|
9
|
+
"name": "isConnected",
|
|
10
|
+
"signature": "() => Promise<{ connected: boolean; }>",
|
|
11
|
+
"parameters": [],
|
|
12
|
+
"returns": "Promise<{ connected: boolean; }>",
|
|
13
|
+
"tags": [],
|
|
14
|
+
"docs": "",
|
|
15
|
+
"complexTypes": [],
|
|
16
|
+
"slug": "isconnected"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "startScan",
|
|
20
|
+
"signature": "() => Promise<void>",
|
|
21
|
+
"parameters": [],
|
|
22
|
+
"returns": "Promise<void>",
|
|
23
|
+
"tags": [],
|
|
24
|
+
"docs": "",
|
|
25
|
+
"complexTypes": [],
|
|
26
|
+
"slug": "startscan"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "stopScan",
|
|
30
|
+
"signature": "() => Promise<void>",
|
|
31
|
+
"parameters": [],
|
|
32
|
+
"returns": "Promise<void>",
|
|
33
|
+
"tags": [],
|
|
34
|
+
"docs": "",
|
|
35
|
+
"complexTypes": [],
|
|
36
|
+
"slug": "stopscan"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "clearData",
|
|
40
|
+
"signature": "() => Promise<void>",
|
|
41
|
+
"parameters": [],
|
|
42
|
+
"returns": "Promise<void>",
|
|
43
|
+
"tags": [],
|
|
44
|
+
"docs": "",
|
|
45
|
+
"complexTypes": [],
|
|
46
|
+
"slug": "cleardata"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "getScanData",
|
|
50
|
+
"signature": "() => Promise<any>",
|
|
51
|
+
"parameters": [],
|
|
52
|
+
"returns": "Promise<any>",
|
|
53
|
+
"tags": [],
|
|
54
|
+
"docs": "",
|
|
55
|
+
"complexTypes": [],
|
|
56
|
+
"slug": "getscandata"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "getOutputPower",
|
|
60
|
+
"signature": "() => Promise<{ value: number; }>",
|
|
61
|
+
"parameters": [],
|
|
62
|
+
"returns": "Promise<{ value: number; }>",
|
|
63
|
+
"tags": [],
|
|
64
|
+
"docs": "",
|
|
65
|
+
"complexTypes": [],
|
|
66
|
+
"slug": "getoutputpower"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "setOutputPower",
|
|
70
|
+
"signature": "(options: { power: number; }) => Promise<{ value: number; }>",
|
|
71
|
+
"parameters": [
|
|
72
|
+
{
|
|
73
|
+
"name": "options",
|
|
74
|
+
"docs": "",
|
|
75
|
+
"type": "{ power: number; }"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"returns": "Promise<{ value: number; }>",
|
|
79
|
+
"tags": [],
|
|
80
|
+
"docs": "",
|
|
81
|
+
"complexTypes": [],
|
|
82
|
+
"slug": "setoutputpower"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "getRange",
|
|
86
|
+
"signature": "() => Promise<{ value: number; }>",
|
|
87
|
+
"parameters": [],
|
|
88
|
+
"returns": "Promise<{ value: number; }>",
|
|
89
|
+
"tags": [],
|
|
90
|
+
"docs": "",
|
|
91
|
+
"complexTypes": [],
|
|
92
|
+
"slug": "getrange"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "setRange",
|
|
96
|
+
"signature": "(options: { range: number; }) => Promise<{ value: number; }>",
|
|
97
|
+
"parameters": [
|
|
98
|
+
{
|
|
99
|
+
"name": "options",
|
|
100
|
+
"docs": "",
|
|
101
|
+
"type": "{ range: number; }"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"returns": "Promise<{ value: number; }>",
|
|
105
|
+
"tags": [],
|
|
106
|
+
"docs": "",
|
|
107
|
+
"complexTypes": [],
|
|
108
|
+
"slug": "setrange"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "getQueryMode",
|
|
112
|
+
"signature": "() => Promise<{ value: 0 | 1 | 2 | 3; }>",
|
|
113
|
+
"parameters": [],
|
|
114
|
+
"returns": "Promise<{ value: 0 | 1 | 2 | 3; }>",
|
|
115
|
+
"tags": [],
|
|
116
|
+
"docs": "",
|
|
117
|
+
"complexTypes": [],
|
|
118
|
+
"slug": "getquerymode"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "setQueryMode",
|
|
122
|
+
"signature": "(options: { queryMode: 0 | 1 | 2 | 3; }) => Promise<{ value: number; }>",
|
|
11
123
|
"parameters": [
|
|
12
124
|
{
|
|
13
125
|
"name": "options",
|
|
14
126
|
"docs": "",
|
|
15
|
-
"type": "{
|
|
127
|
+
"type": "{ queryMode: 0 | 1 | 2 | 3; }"
|
|
16
128
|
}
|
|
17
129
|
],
|
|
130
|
+
"returns": "Promise<{ value: number; }>",
|
|
131
|
+
"tags": [],
|
|
132
|
+
"docs": "",
|
|
133
|
+
"complexTypes": [],
|
|
134
|
+
"slug": "setquerymode"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "getReaderType",
|
|
138
|
+
"signature": "() => Promise<{ value: number; }>",
|
|
139
|
+
"parameters": [],
|
|
140
|
+
"returns": "Promise<{ value: number; }>",
|
|
141
|
+
"tags": [],
|
|
142
|
+
"docs": "",
|
|
143
|
+
"complexTypes": [],
|
|
144
|
+
"slug": "getreadertype"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "getFirmwareVersion",
|
|
148
|
+
"signature": "() => Promise<{ value: string; }>",
|
|
149
|
+
"parameters": [],
|
|
18
150
|
"returns": "Promise<{ value: string; }>",
|
|
19
151
|
"tags": [],
|
|
20
152
|
"docs": "",
|
|
21
153
|
"complexTypes": [],
|
|
22
|
-
"slug": "
|
|
154
|
+
"slug": "getfirmwareversion"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "writeEpc",
|
|
158
|
+
"signature": "(options: { epc: string; password?: string; }) => Promise<{ value: number; }>",
|
|
159
|
+
"parameters": [
|
|
160
|
+
{
|
|
161
|
+
"name": "options",
|
|
162
|
+
"docs": "",
|
|
163
|
+
"type": "{ epc: string; password?: string | undefined; }"
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"returns": "Promise<{ value: number; }>",
|
|
167
|
+
"tags": [],
|
|
168
|
+
"docs": "",
|
|
169
|
+
"complexTypes": [],
|
|
170
|
+
"slug": "writeepc"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "writeEpcString",
|
|
174
|
+
"signature": "(options: { epc: string; password?: string; }) => Promise<{ value: number; }>",
|
|
175
|
+
"parameters": [
|
|
176
|
+
{
|
|
177
|
+
"name": "options",
|
|
178
|
+
"docs": "",
|
|
179
|
+
"type": "{ epc: string; password?: string | undefined; }"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"returns": "Promise<{ value: number; }>",
|
|
183
|
+
"tags": [],
|
|
184
|
+
"docs": "",
|
|
185
|
+
"complexTypes": [],
|
|
186
|
+
"slug": "writeepcstring"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "startSearch",
|
|
190
|
+
"signature": "(options: { searchableTags: string[]; }) => Promise<void>",
|
|
191
|
+
"parameters": [
|
|
192
|
+
{
|
|
193
|
+
"name": "options",
|
|
194
|
+
"docs": "",
|
|
195
|
+
"type": "{ searchableTags: string[]; }"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"returns": "Promise<void>",
|
|
199
|
+
"tags": [],
|
|
200
|
+
"docs": "",
|
|
201
|
+
"complexTypes": [],
|
|
202
|
+
"slug": "startsearch"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "stopSearch",
|
|
206
|
+
"signature": "() => Promise<void>",
|
|
207
|
+
"parameters": [],
|
|
208
|
+
"returns": "Promise<void>",
|
|
209
|
+
"tags": [],
|
|
210
|
+
"docs": "",
|
|
211
|
+
"complexTypes": [],
|
|
212
|
+
"slug": "stopsearch"
|
|
23
213
|
}
|
|
24
214
|
],
|
|
25
215
|
"properties": []
|
|
@@ -1,7 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Plugin } from '@capacitor/core';
|
|
2
|
+
export interface RFIDPlugin extends Plugin {
|
|
3
|
+
isConnected(): Promise<{
|
|
4
|
+
connected: boolean;
|
|
5
|
+
}>;
|
|
6
|
+
startScan(): Promise<void>;
|
|
7
|
+
stopScan(): Promise<void>;
|
|
8
|
+
clearData(): Promise<void>;
|
|
9
|
+
getScanData(): Promise<any>;
|
|
10
|
+
getOutputPower(): Promise<{
|
|
11
|
+
value: number;
|
|
12
|
+
}>;
|
|
13
|
+
setOutputPower(options: {
|
|
14
|
+
power: number;
|
|
15
|
+
}): Promise<{
|
|
16
|
+
value: number;
|
|
17
|
+
}>;
|
|
18
|
+
getRange(): Promise<{
|
|
19
|
+
value: number;
|
|
20
|
+
}>;
|
|
21
|
+
setRange(options: {
|
|
22
|
+
range: number;
|
|
4
23
|
}): Promise<{
|
|
24
|
+
value: number;
|
|
25
|
+
}>;
|
|
26
|
+
getQueryMode(): Promise<{
|
|
27
|
+
value: 0 | 1 | 2 | 3;
|
|
28
|
+
}>;
|
|
29
|
+
setQueryMode(options: {
|
|
30
|
+
queryMode: 0 | 1 | 2 | 3;
|
|
31
|
+
}): Promise<{
|
|
32
|
+
value: number;
|
|
33
|
+
}>;
|
|
34
|
+
getReaderType(): Promise<{
|
|
35
|
+
value: number;
|
|
36
|
+
}>;
|
|
37
|
+
getFirmwareVersion(): Promise<{
|
|
5
38
|
value: string;
|
|
6
39
|
}>;
|
|
40
|
+
writeEpc(options: {
|
|
41
|
+
epc: string;
|
|
42
|
+
password?: string;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
value: number;
|
|
45
|
+
}>;
|
|
46
|
+
writeEpcString(options: {
|
|
47
|
+
epc: string;
|
|
48
|
+
password?: string;
|
|
49
|
+
}): Promise<{
|
|
50
|
+
value: number;
|
|
51
|
+
}>;
|
|
52
|
+
startSearch(options: {
|
|
53
|
+
searchableTags: string[];
|
|
54
|
+
}): Promise<void>;
|
|
55
|
+
stopSearch(): Promise<void>;
|
|
7
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { Plugin } from '@capacitor/core';\n\nexport interface RFIDPlugin extends Plugin {\n isConnected(): Promise<{ connected: boolean }>;\n\n startScan(): Promise<void>;\n stopScan(): Promise<void>;\n clearData(): Promise<void>;\n\n getScanData(): Promise<any>;\n getOutputPower(): Promise<{ value: number }>;\n setOutputPower(options: { power: number }): Promise<{ value: number }>;\n\n getRange(): Promise<{ value: number }>;\n setRange(options: { range: number }): Promise<{ value: number }>;\n\n getQueryMode(): Promise<{ value: 0 | 1 | 2 | 3 }>;\n setQueryMode(options: {\n queryMode:\n | 0 // epc\n | 1 // epc+tid\n | 2 // epc+user\n | 3; // fasttid\n }): Promise<{ value: number }>;\n\n getReaderType(): Promise<{ value: number }>; // 80 - short, others - long distance mode\n getFirmwareVersion(): Promise<{ value: string }>;\n\n writeEpc(options: {\n epc: string;\n password?: string;\n }): Promise<{ value: number }>;\n writeEpcString(options: {\n epc: string;\n password?: string;\n }): Promise<{ value: number }>;\n\n startSearch(options: { searchableTags: string[] }): Promise<void>;\n stopSearch(): Promise<void>;\n}\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
1
|
+
import type { RFIDPlugin } from './definitions';
|
|
2
|
+
declare const RFID: RFIDPlugin;
|
|
3
3
|
export * from './definitions';
|
|
4
|
-
export {
|
|
4
|
+
export { RFID };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { registerPlugin } from '@capacitor/core';
|
|
2
|
-
const
|
|
3
|
-
web: () => import('./web').then(m => new m.
|
|
2
|
+
const RFID = registerPlugin('RFID', {
|
|
3
|
+
web: () => import('./web').then(m => new m.RFIDWeb()),
|
|
4
4
|
});
|
|
5
5
|
export * from './definitions';
|
|
6
|
-
export {
|
|
6
|
+
export { RFID };
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,IAAI,GAAG,cAAc,CAAa,MAAM,EAAE;IAC9C,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;CACtD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { RFIDPlugin } from './definitions';\n\nconst RFID = registerPlugin<RFIDPlugin>('RFID', {\n web: () => import('./web').then(m => new m.RFIDWeb()),\n});\n\nexport * from './definitions';\nexport { RFID };\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,9 +1,57 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
|
-
import type {
|
|
3
|
-
export declare class
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import type { RFIDPlugin } from './definitions';
|
|
3
|
+
export declare class RFIDWeb extends WebPlugin implements RFIDPlugin {
|
|
4
|
+
isConnected(): Promise<{
|
|
5
|
+
connected: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
startScan(): Promise<void>;
|
|
8
|
+
stopScan(): Promise<void>;
|
|
9
|
+
clearData(): Promise<void>;
|
|
10
|
+
getScanData(): Promise<void>;
|
|
11
|
+
getOutputPower(): Promise<{
|
|
12
|
+
value: number;
|
|
13
|
+
}>;
|
|
14
|
+
setOutputPower(options: {
|
|
15
|
+
power: number;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
value: number;
|
|
18
|
+
}>;
|
|
19
|
+
getRange(): Promise<{
|
|
20
|
+
value: number;
|
|
21
|
+
}>;
|
|
22
|
+
setRange(options: {
|
|
23
|
+
range: number;
|
|
6
24
|
}): Promise<{
|
|
25
|
+
value: number;
|
|
26
|
+
}>;
|
|
27
|
+
getQueryMode(): Promise<{
|
|
28
|
+
value: 0 | 1 | 2 | 3;
|
|
29
|
+
}>;
|
|
30
|
+
setQueryMode(options: {
|
|
31
|
+
queryMode: 0 | 1 | 2 | 3;
|
|
32
|
+
}): Promise<{
|
|
33
|
+
value: number;
|
|
34
|
+
}>;
|
|
35
|
+
getReaderType(): Promise<{
|
|
36
|
+
value: number;
|
|
37
|
+
}>;
|
|
38
|
+
getFirmwareVersion(): Promise<{
|
|
7
39
|
value: string;
|
|
8
40
|
}>;
|
|
41
|
+
writeEpc(options: {
|
|
42
|
+
epc: string;
|
|
43
|
+
password?: string;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
value: number;
|
|
46
|
+
}>;
|
|
47
|
+
writeEpcString(options: {
|
|
48
|
+
epc: string;
|
|
49
|
+
password?: string;
|
|
50
|
+
}): Promise<{
|
|
51
|
+
value: number;
|
|
52
|
+
}>;
|
|
53
|
+
startSearch(options: {
|
|
54
|
+
searchableTags: string[];
|
|
55
|
+
}): Promise<void>;
|
|
56
|
+
stopSearch(): Promise<void>;
|
|
9
57
|
}
|
package/dist/esm/web.js
CHANGED
|
@@ -1,8 +1,58 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
|
-
export class
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export class RFIDWeb extends WebPlugin {
|
|
3
|
+
isConnected() {
|
|
4
|
+
return Promise.resolve({ connected: false });
|
|
5
|
+
}
|
|
6
|
+
startScan() {
|
|
7
|
+
return Promise.resolve();
|
|
8
|
+
}
|
|
9
|
+
stopScan() {
|
|
10
|
+
return Promise.resolve();
|
|
11
|
+
}
|
|
12
|
+
clearData() {
|
|
13
|
+
return Promise.resolve();
|
|
14
|
+
}
|
|
15
|
+
getScanData() {
|
|
16
|
+
return Promise.resolve();
|
|
17
|
+
}
|
|
18
|
+
async getOutputPower() {
|
|
19
|
+
return { value: 0 };
|
|
20
|
+
}
|
|
21
|
+
async setOutputPower(options) {
|
|
22
|
+
return { value: options.power };
|
|
23
|
+
}
|
|
24
|
+
async getRange() {
|
|
25
|
+
return { value: 0 };
|
|
26
|
+
}
|
|
27
|
+
async setRange(options) {
|
|
28
|
+
return { value: options.range };
|
|
29
|
+
}
|
|
30
|
+
async getQueryMode() {
|
|
31
|
+
return { value: 0 };
|
|
32
|
+
}
|
|
33
|
+
async setQueryMode(options) {
|
|
34
|
+
return { value: options.queryMode };
|
|
35
|
+
}
|
|
36
|
+
async getReaderType() {
|
|
37
|
+
return { value: 0 };
|
|
38
|
+
}
|
|
39
|
+
async getFirmwareVersion() {
|
|
40
|
+
return { value: 'not implemented' };
|
|
41
|
+
}
|
|
42
|
+
async writeEpc(options) {
|
|
43
|
+
console.log(options.epc);
|
|
44
|
+
return { value: -1 };
|
|
45
|
+
}
|
|
46
|
+
async writeEpcString(options) {
|
|
47
|
+
console.log(options.epc);
|
|
48
|
+
return { value: -1 };
|
|
49
|
+
}
|
|
50
|
+
async startSearch(options) {
|
|
51
|
+
console.log(options.searchableTags);
|
|
52
|
+
return Promise.resolve();
|
|
53
|
+
}
|
|
54
|
+
async stopSearch() {
|
|
55
|
+
return Promise.resolve();
|
|
6
56
|
}
|
|
7
57
|
}
|
|
8
58
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,OAAQ,SAAQ,SAAS;IACpC,WAAW;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,SAAS;QACP,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,QAAQ;QACN,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,SAAS;QACP,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,WAAW;QACT,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAA0B;QAC7C,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAA0B;QACvC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAElB;QACC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAGd;QACC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEzB,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAGpB;QACC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEzB,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAqC;QACrD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAEpC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,UAAU;QACd,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { RFIDPlugin } from './definitions';\n\nexport class RFIDWeb extends WebPlugin implements RFIDPlugin {\n isConnected(): Promise<{ connected: boolean }> {\n return Promise.resolve({ connected: false });\n }\n\n startScan(): Promise<void> {\n return Promise.resolve();\n }\n\n stopScan(): Promise<void> {\n return Promise.resolve();\n }\n\n clearData(): Promise<void> {\n return Promise.resolve();\n }\n\n getScanData(): Promise<void> {\n return Promise.resolve();\n }\n\n async getOutputPower(): Promise<{ value: number }> {\n return { value: 0 };\n }\n\n async setOutputPower(options: { power: number }): Promise<{ value: number }> {\n return { value: options.power };\n }\n\n async getRange(): Promise<{ value: number }> {\n return { value: 0 };\n }\n\n async setRange(options: { range: number }): Promise<{ value: number }> {\n return { value: options.range };\n }\n\n async getQueryMode(): Promise<{ value: 0 | 1 | 2 | 3 }> {\n return { value: 0 };\n }\n\n async setQueryMode(options: {\n queryMode: 0 | 1 | 2 | 3;\n }): Promise<{ value: number }> {\n return { value: options.queryMode };\n }\n\n async getReaderType(): Promise<{ value: number }> {\n return { value: 0 };\n }\n\n async getFirmwareVersion(): Promise<{ value: string }> {\n return { value: 'not implemented' };\n }\n\n async writeEpc(options: {\n epc: string;\n password?: string;\n }): Promise<{ value: number }> {\n console.log(options.epc);\n\n return { value: -1 };\n }\n\n async writeEpcString(options: {\n epc: string;\n password?: string;\n }): Promise<{ value: number }> {\n console.log(options.epc);\n\n return { value: -1 };\n }\n\n async startSearch(options: { searchableTags: string[] }): Promise<void> {\n console.log(options.searchableTags);\n\n return Promise.resolve();\n }\n\n async stopSearch(): Promise<void> {\n return Promise.resolve();\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -4,21 +4,71 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var core = require('@capacitor/core');
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.
|
|
7
|
+
const RFID = core.registerPlugin('RFID', {
|
|
8
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.RFIDWeb()),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
class
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
class RFIDWeb extends core.WebPlugin {
|
|
12
|
+
isConnected() {
|
|
13
|
+
return Promise.resolve({ connected: false });
|
|
14
|
+
}
|
|
15
|
+
startScan() {
|
|
16
|
+
return Promise.resolve();
|
|
17
|
+
}
|
|
18
|
+
stopScan() {
|
|
19
|
+
return Promise.resolve();
|
|
20
|
+
}
|
|
21
|
+
clearData() {
|
|
22
|
+
return Promise.resolve();
|
|
23
|
+
}
|
|
24
|
+
getScanData() {
|
|
25
|
+
return Promise.resolve();
|
|
26
|
+
}
|
|
27
|
+
async getOutputPower() {
|
|
28
|
+
return { value: 0 };
|
|
29
|
+
}
|
|
30
|
+
async setOutputPower(options) {
|
|
31
|
+
return { value: options.power };
|
|
32
|
+
}
|
|
33
|
+
async getRange() {
|
|
34
|
+
return { value: 0 };
|
|
35
|
+
}
|
|
36
|
+
async setRange(options) {
|
|
37
|
+
return { value: options.range };
|
|
38
|
+
}
|
|
39
|
+
async getQueryMode() {
|
|
40
|
+
return { value: 0 };
|
|
41
|
+
}
|
|
42
|
+
async setQueryMode(options) {
|
|
43
|
+
return { value: options.queryMode };
|
|
44
|
+
}
|
|
45
|
+
async getReaderType() {
|
|
46
|
+
return { value: 0 };
|
|
47
|
+
}
|
|
48
|
+
async getFirmwareVersion() {
|
|
49
|
+
return { value: 'not implemented' };
|
|
50
|
+
}
|
|
51
|
+
async writeEpc(options) {
|
|
52
|
+
console.log(options.epc);
|
|
53
|
+
return { value: -1 };
|
|
54
|
+
}
|
|
55
|
+
async writeEpcString(options) {
|
|
56
|
+
console.log(options.epc);
|
|
57
|
+
return { value: -1 };
|
|
58
|
+
}
|
|
59
|
+
async startSearch(options) {
|
|
60
|
+
console.log(options.searchableTags);
|
|
61
|
+
return Promise.resolve();
|
|
62
|
+
}
|
|
63
|
+
async stopSearch() {
|
|
64
|
+
return Promise.resolve();
|
|
15
65
|
}
|
|
16
66
|
}
|
|
17
67
|
|
|
18
68
|
var web = /*#__PURE__*/Object.freeze({
|
|
19
69
|
__proto__: null,
|
|
20
|
-
|
|
70
|
+
RFIDWeb: RFIDWeb
|
|
21
71
|
});
|
|
22
72
|
|
|
23
|
-
exports.
|
|
73
|
+
exports.RFID = RFID;
|
|
24
74
|
//# sourceMappingURL=plugin.cjs.js.map
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst RFID = registerPlugin('RFID', {\n web: () => import('./web').then(m => new m.RFIDWeb()),\n});\nexport * from './definitions';\nexport { RFID };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class RFIDWeb extends WebPlugin {\n isConnected() {\n return Promise.resolve({ connected: false });\n }\n startScan() {\n return Promise.resolve();\n }\n stopScan() {\n return Promise.resolve();\n }\n clearData() {\n return Promise.resolve();\n }\n getScanData() {\n return Promise.resolve();\n }\n async getOutputPower() {\n return { value: 0 };\n }\n async setOutputPower(options) {\n return { value: options.power };\n }\n async getRange() {\n return { value: 0 };\n }\n async setRange(options) {\n return { value: options.range };\n }\n async getQueryMode() {\n return { value: 0 };\n }\n async setQueryMode(options) {\n return { value: options.queryMode };\n }\n async getReaderType() {\n return { value: 0 };\n }\n async getFirmwareVersion() {\n return { value: 'not implemented' };\n }\n async writeEpc(options) {\n console.log(options.epc);\n return { value: -1 };\n }\n async writeEpcString(options) {\n console.log(options.epc);\n return { value: -1 };\n }\n async startSearch(options) {\n console.log(options.searchableTags);\n return Promise.resolve();\n }\n async stopSearch() {\n return Promise.resolve();\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;AACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC;;ACFM,MAAM,OAAO,SAASC,cAAS,CAAC;AACvC,IAAI,WAAW,GAAG;AAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;AACrD,KAAK;AACL,IAAI,SAAS,GAAG;AAChB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,SAAS,GAAG;AAChB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,WAAW,GAAG;AAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,MAAM,cAAc,GAAG;AAC3B,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAC5B,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;AAClC,QAAQ,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;AACxC,KAAK;AACL,IAAI,MAAM,QAAQ,GAAG;AACrB,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAC5B,KAAK;AACL,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;AAC5B,QAAQ,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;AACxC,KAAK;AACL,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAC5B,KAAK;AACL,IAAI,MAAM,YAAY,CAAC,OAAO,EAAE;AAChC,QAAQ,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;AAC5C,KAAK;AACL,IAAI,MAAM,aAAa,GAAG;AAC1B,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAC5B,KAAK;AACL,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;AAC5C,KAAK;AACL,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;AAC5B,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACjC,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;AAC7B,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;AAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACjC,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;AAC7B,KAAK;AACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;AAC5C,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,23 +1,73 @@
|
|
|
1
1
|
var capacitorExample = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.
|
|
4
|
+
const RFID = core.registerPlugin('RFID', {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.RFIDWeb()),
|
|
6
6
|
});
|
|
7
7
|
|
|
8
|
-
class
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
class RFIDWeb extends core.WebPlugin {
|
|
9
|
+
isConnected() {
|
|
10
|
+
return Promise.resolve({ connected: false });
|
|
11
|
+
}
|
|
12
|
+
startScan() {
|
|
13
|
+
return Promise.resolve();
|
|
14
|
+
}
|
|
15
|
+
stopScan() {
|
|
16
|
+
return Promise.resolve();
|
|
17
|
+
}
|
|
18
|
+
clearData() {
|
|
19
|
+
return Promise.resolve();
|
|
20
|
+
}
|
|
21
|
+
getScanData() {
|
|
22
|
+
return Promise.resolve();
|
|
23
|
+
}
|
|
24
|
+
async getOutputPower() {
|
|
25
|
+
return { value: 0 };
|
|
26
|
+
}
|
|
27
|
+
async setOutputPower(options) {
|
|
28
|
+
return { value: options.power };
|
|
29
|
+
}
|
|
30
|
+
async getRange() {
|
|
31
|
+
return { value: 0 };
|
|
32
|
+
}
|
|
33
|
+
async setRange(options) {
|
|
34
|
+
return { value: options.range };
|
|
35
|
+
}
|
|
36
|
+
async getQueryMode() {
|
|
37
|
+
return { value: 0 };
|
|
38
|
+
}
|
|
39
|
+
async setQueryMode(options) {
|
|
40
|
+
return { value: options.queryMode };
|
|
41
|
+
}
|
|
42
|
+
async getReaderType() {
|
|
43
|
+
return { value: 0 };
|
|
44
|
+
}
|
|
45
|
+
async getFirmwareVersion() {
|
|
46
|
+
return { value: 'not implemented' };
|
|
47
|
+
}
|
|
48
|
+
async writeEpc(options) {
|
|
49
|
+
console.log(options.epc);
|
|
50
|
+
return { value: -1 };
|
|
51
|
+
}
|
|
52
|
+
async writeEpcString(options) {
|
|
53
|
+
console.log(options.epc);
|
|
54
|
+
return { value: -1 };
|
|
55
|
+
}
|
|
56
|
+
async startSearch(options) {
|
|
57
|
+
console.log(options.searchableTags);
|
|
58
|
+
return Promise.resolve();
|
|
59
|
+
}
|
|
60
|
+
async stopSearch() {
|
|
61
|
+
return Promise.resolve();
|
|
12
62
|
}
|
|
13
63
|
}
|
|
14
64
|
|
|
15
65
|
var web = /*#__PURE__*/Object.freeze({
|
|
16
66
|
__proto__: null,
|
|
17
|
-
|
|
67
|
+
RFIDWeb: RFIDWeb
|
|
18
68
|
});
|
|
19
69
|
|
|
20
|
-
exports.
|
|
70
|
+
exports.RFID = RFID;
|
|
21
71
|
|
|
22
72
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
23
73
|
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst RFID = registerPlugin('RFID', {\n web: () => import('./web').then(m => new m.RFIDWeb()),\n});\nexport * from './definitions';\nexport { RFID };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class RFIDWeb extends WebPlugin {\n isConnected() {\n return Promise.resolve({ connected: false });\n }\n startScan() {\n return Promise.resolve();\n }\n stopScan() {\n return Promise.resolve();\n }\n clearData() {\n return Promise.resolve();\n }\n getScanData() {\n return Promise.resolve();\n }\n async getOutputPower() {\n return { value: 0 };\n }\n async setOutputPower(options) {\n return { value: options.power };\n }\n async getRange() {\n return { value: 0 };\n }\n async setRange(options) {\n return { value: options.range };\n }\n async getQueryMode() {\n return { value: 0 };\n }\n async setQueryMode(options) {\n return { value: options.queryMode };\n }\n async getReaderType() {\n return { value: 0 };\n }\n async getFirmwareVersion() {\n return { value: 'not implemented' };\n }\n async writeEpc(options) {\n console.log(options.epc);\n return { value: -1 };\n }\n async writeEpcString(options) {\n console.log(options.epc);\n return { value: -1 };\n }\n async startSearch(options) {\n console.log(options.searchableTags);\n return Promise.resolve();\n }\n async stopSearch() {\n return Promise.resolve();\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;IACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IACzD,CAAC;;ICFM,MAAM,OAAO,SAASC,cAAS,CAAC;IACvC,IAAI,WAAW,GAAG;IAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACrD,KAAK;IACL,IAAI,SAAS,GAAG;IAChB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,QAAQ,GAAG;IACf,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,SAAS,GAAG;IAChB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,WAAW,GAAG;IAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,MAAM,cAAc,GAAG;IAC3B,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC5B,KAAK;IACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;IAClC,QAAQ,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IACxC,KAAK;IACL,IAAI,MAAM,QAAQ,GAAG;IACrB,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC5B,KAAK;IACL,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;IAC5B,QAAQ,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IACxC,KAAK;IACL,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC5B,KAAK;IACL,IAAI,MAAM,YAAY,CAAC,OAAO,EAAE;IAChC,QAAQ,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;IAC5C,KAAK;IACL,IAAI,MAAM,aAAa,GAAG;IAC1B,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC5B,KAAK;IACL,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC5C,KAAK;IACL,IAAI,MAAM,QAAQ,CAAC,OAAO,EAAE;IAC5B,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;IAC7B,KAAK;IACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;IAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;IAC7B,KAAK;IACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC5C,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-rfid-plugin-ox",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "rfid read-write",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"eslint": "eslint . --ext ts",
|
|
38
38
|
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
39
39
|
"swiftlint": "node-swiftlint",
|
|
40
|
-
"docgen": "docgen --api
|
|
40
|
+
"docgen": "docgen --api RFIDPlugin --output-readme README.md --output-json dist/docs.json",
|
|
41
41
|
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
|
|
42
42
|
"clean": "rimraf ./dist",
|
|
43
43
|
"watch": "tsc --watch",
|