scandit-react-native-datacapture-parser 8.6.1 → 8.7.0-beta.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.
- package/android/build.gradle +1 -1
- package/dist/dts/parser.d.ts +285 -3
- package/dist/parser.js +36 -2
- package/dist/parser.js.flow +160 -0
- package/dist/parser.js.map +1 -1
- package/package.json +17 -2
- package/scandit-react-native-datacapture-parser.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -96,7 +96,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
dependencies {
|
|
99
|
-
def sdk_version = "8.
|
|
99
|
+
def sdk_version = "8.7.0-beta.1"
|
|
100
100
|
|
|
101
101
|
println("Version of the native sdk used in this build: ${safeExtGet('frameworks_sdk_version', sdk_version)}")
|
|
102
102
|
api project(path: ':scandit-react-native-datacapture-core')
|
package/dist/dts/parser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeCallerProvider, DefaultSerializeable, DataCaptureComponent, BaseProxy } from 'scandit-react-native-datacapture-core/dist/dts/core';
|
|
1
|
+
import { NativeCallerProvider, DefaultSerializeable, DataCaptureComponent, BaseProxy, MethodLogMetadata } from 'scandit-react-native-datacapture-core/dist/dts/core';
|
|
2
2
|
|
|
3
3
|
declare const PARSER_PROXY_TYPE_NAMES: readonly ["ParserProxy"];
|
|
4
4
|
type ParserProxyType = (typeof PARSER_PROXY_TYPE_NAMES)[number];
|
|
@@ -7,96 +7,364 @@ interface ParserNativeCallerProvider extends NativeCallerProvider<ParserProxyTyp
|
|
|
7
7
|
|
|
8
8
|
declare function registerParserProxies(provider: ParserNativeCallerProvider): void;
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Keys used to retrieve additional info regarding an issue.
|
|
12
|
+
*
|
|
13
|
+
* @since 6.26.0
|
|
14
|
+
*/
|
|
10
15
|
declare enum ParserIssueAdditionalInfoKey {
|
|
16
|
+
/** @since 6.26.0 */
|
|
11
17
|
StartingCharacters = "startingCharacters",
|
|
18
|
+
/** @since 6.26.0 */
|
|
12
19
|
Version = "version",
|
|
20
|
+
/** @since 6.26.0 */
|
|
13
21
|
MinimalVersion = "minimalVersion",
|
|
22
|
+
/** @since 6.26.0 */
|
|
14
23
|
ElementName = "elementName",
|
|
24
|
+
/** @since 6.26.0 */
|
|
15
25
|
String = "string",
|
|
26
|
+
/** @since 6.26.0 */
|
|
16
27
|
Length = "length",
|
|
28
|
+
/** @since 6.26.0 */
|
|
17
29
|
Charset = "charset"
|
|
18
30
|
}
|
|
19
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Error code identifying the cause of the parser issue.
|
|
34
|
+
*
|
|
35
|
+
* @since 6.26.0
|
|
36
|
+
*/
|
|
20
37
|
declare enum ParserIssueCode {
|
|
38
|
+
/**
|
|
39
|
+
* No issue found
|
|
40
|
+
*
|
|
41
|
+
* @since 6.26.0
|
|
42
|
+
*/
|
|
21
43
|
None = "none",
|
|
44
|
+
/**
|
|
45
|
+
* Unspecified issue found
|
|
46
|
+
*
|
|
47
|
+
* @since 6.26.0
|
|
48
|
+
*/
|
|
22
49
|
Unspecified = "unspecified",
|
|
50
|
+
/**
|
|
51
|
+
* Mandatory EPD missing
|
|
52
|
+
*
|
|
53
|
+
* @since 6.26.0
|
|
54
|
+
*/
|
|
23
55
|
MandatoryEpdMissing = "mandatoryEpdMissing",
|
|
56
|
+
/**
|
|
57
|
+
* Invalid date
|
|
58
|
+
*
|
|
59
|
+
* @since 6.26.0
|
|
60
|
+
*/
|
|
24
61
|
InvalidDate = "invalidDate",
|
|
62
|
+
/**
|
|
63
|
+
* String too short
|
|
64
|
+
*
|
|
65
|
+
* @since 6.26.0
|
|
66
|
+
*/
|
|
25
67
|
StringTooShort = "stringTooShort",
|
|
68
|
+
/**
|
|
69
|
+
* Wrong starting characters
|
|
70
|
+
*
|
|
71
|
+
* @since 6.26.0
|
|
72
|
+
*/
|
|
26
73
|
WrongStartingCharacters = "wrongStartingCharacters",
|
|
74
|
+
/**
|
|
75
|
+
* Invalid separation between elements
|
|
76
|
+
*
|
|
77
|
+
* @since 6.26.0
|
|
78
|
+
*/
|
|
27
79
|
InvalidSeparationBetweenElements = "invalidSeparationBetweenElements",
|
|
80
|
+
/**
|
|
81
|
+
* Unsupported version
|
|
82
|
+
*
|
|
83
|
+
* @since 6.26.0
|
|
84
|
+
*/
|
|
28
85
|
UnsupportedVersion = "unsupportedVersion",
|
|
86
|
+
/**
|
|
87
|
+
* Incomplete code
|
|
88
|
+
*
|
|
89
|
+
* @since 6.26.0
|
|
90
|
+
*/
|
|
29
91
|
IncompleteCode = "incompleteCode",
|
|
92
|
+
/**
|
|
93
|
+
* Empty element content
|
|
94
|
+
*
|
|
95
|
+
* @since 6.26.0
|
|
96
|
+
*/
|
|
30
97
|
EmptyElementContent = "emptyElementContent",
|
|
98
|
+
/**
|
|
99
|
+
* Invalid element length
|
|
100
|
+
*
|
|
101
|
+
* @since 6.26.0
|
|
102
|
+
*/
|
|
31
103
|
InvalidElementLength = "invalidElementLength",
|
|
104
|
+
/**
|
|
105
|
+
* Element is too long
|
|
106
|
+
*
|
|
107
|
+
* @since 6.26.0
|
|
108
|
+
*/
|
|
32
109
|
TooLongElement = "tooLongElement",
|
|
110
|
+
/**
|
|
111
|
+
* Content found in an element that should be empty
|
|
112
|
+
*
|
|
113
|
+
* @since 6.26.0
|
|
114
|
+
*/
|
|
33
115
|
NonEmptyElementContent = "nonEmptyElementContent",
|
|
116
|
+
/**
|
|
117
|
+
* Invalid characterset in an element
|
|
118
|
+
*
|
|
119
|
+
* @since 6.26.0
|
|
120
|
+
*/
|
|
34
121
|
InvalidCharsetInElement = "invalidCharsetInElement",
|
|
122
|
+
/**
|
|
123
|
+
* Too many alt PMT fields
|
|
124
|
+
*
|
|
125
|
+
* @since 6.26.0
|
|
126
|
+
*/
|
|
35
127
|
TooManyAltPmtFields = "tooManyAltPmtFields",
|
|
128
|
+
/**
|
|
129
|
+
* The content cannot contain spaces
|
|
130
|
+
*
|
|
131
|
+
* @since 6.26.0
|
|
132
|
+
*/
|
|
36
133
|
CannotContainSpaces = "cannotContainSpaces"
|
|
37
134
|
}
|
|
38
135
|
|
|
136
|
+
/** @since 6.26.0 */
|
|
39
137
|
declare class ParserIssue {
|
|
40
138
|
private _code;
|
|
139
|
+
/**
|
|
140
|
+
* Error code identifying the cause of the issue.
|
|
141
|
+
*
|
|
142
|
+
* @since 6.26.0
|
|
143
|
+
*/
|
|
41
144
|
get code(): ParserIssueCode;
|
|
42
145
|
private _message;
|
|
146
|
+
/**
|
|
147
|
+
* English description of the error
|
|
148
|
+
*
|
|
149
|
+
* @since 6.26.0
|
|
150
|
+
*/
|
|
43
151
|
get message(): string;
|
|
44
152
|
private _additionalInfo;
|
|
153
|
+
/**
|
|
154
|
+
* Dictionary that provides additional info regarding the error.
|
|
155
|
+
*
|
|
156
|
+
* @since 6.26.0
|
|
157
|
+
*/
|
|
45
158
|
get additionalInfo(): Record<ParserIssueAdditionalInfoKey, string>;
|
|
46
159
|
private static fromJSON;
|
|
47
160
|
}
|
|
48
161
|
|
|
162
|
+
/** @since 6.5.0 */
|
|
49
163
|
declare class ParsedField {
|
|
50
164
|
private _name;
|
|
165
|
+
/**
|
|
166
|
+
* The name of the field.
|
|
167
|
+
*
|
|
168
|
+
* @since 6.5.0
|
|
169
|
+
*/
|
|
51
170
|
get name(): string;
|
|
52
171
|
private _parsed;
|
|
172
|
+
/**
|
|
173
|
+
* The parsed data contained in this field. Depending on the field type, this returns a `INumber`, `IDictionary` or [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) instance. Consult the field documentation for information on the type for the fields you are interested in.
|
|
174
|
+
*
|
|
175
|
+
* @since 6.5.0
|
|
176
|
+
*/
|
|
53
177
|
get parsed(): any;
|
|
54
178
|
private _rawString;
|
|
179
|
+
/**
|
|
180
|
+
* The raw string that represents this field in the input string/data.
|
|
181
|
+
*
|
|
182
|
+
* @since 6.5.0
|
|
183
|
+
*/
|
|
55
184
|
get rawString(): string;
|
|
56
185
|
private _warnings;
|
|
186
|
+
/**
|
|
187
|
+
* Warnings associated with this field
|
|
188
|
+
*
|
|
189
|
+
* @since 6.26.0
|
|
190
|
+
*/
|
|
57
191
|
get warnings(): ParserIssue[];
|
|
58
192
|
private static fromJSON;
|
|
59
193
|
}
|
|
60
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Holds the result of a successfully parsed data string or raw data. Instances of this class are returned by {@link Parser.parseString} and {@link Parser.parseRawData} methods. The parsed data is divided into *fields*, each identified by a name.
|
|
197
|
+
*
|
|
198
|
+
* The data contained in this result object can be accessed in one of the following ways:
|
|
199
|
+
*
|
|
200
|
+
* - Through an array of parser fields (see {@link ParsedData.fields}).
|
|
201
|
+
* - Through a dictionary that maps field names to the field (see {@link ParsedData.fieldsByName}).
|
|
202
|
+
* - Directly as a JSON string (see {@link ParsedData.jsonString}).
|
|
203
|
+
*
|
|
204
|
+
* @since 6.5.0
|
|
205
|
+
*/
|
|
61
206
|
declare class ParsedData {
|
|
62
207
|
private _jsonString;
|
|
208
|
+
/**
|
|
209
|
+
* The result object as a serialized JSON string.
|
|
210
|
+
*
|
|
211
|
+
* @since 6.5.0
|
|
212
|
+
*/
|
|
63
213
|
get jsonString(): string;
|
|
64
214
|
private _fields;
|
|
215
|
+
/**
|
|
216
|
+
* The order of the fields matches the order in the original data string. The fields are data format specific. Consult the data format documentation for information on available fields.
|
|
217
|
+
*
|
|
218
|
+
* @since 6.5.0
|
|
219
|
+
*/
|
|
65
220
|
get fields(): ParsedField[];
|
|
66
221
|
private _fieldsByName;
|
|
222
|
+
/**
|
|
223
|
+
* Provides by-name lookup of the fields. The field names are data format specific. Consult the data format documentation for information on available fields.
|
|
224
|
+
*
|
|
225
|
+
* @since 6.5.0
|
|
226
|
+
*/
|
|
67
227
|
get fieldsByName(): {
|
|
68
228
|
[key: string]: ParsedField;
|
|
69
229
|
};
|
|
70
230
|
private _fieldsWithIssues;
|
|
231
|
+
/**
|
|
232
|
+
* Like {@link ParsedData.fields}, but only returns fields with issues
|
|
233
|
+
*
|
|
234
|
+
* @since 6.26.0
|
|
235
|
+
*/
|
|
71
236
|
get fieldsWithIssues(): ParsedField[];
|
|
72
237
|
private static fromJSON;
|
|
73
238
|
}
|
|
74
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Data formats supported by the {@link Parser}.
|
|
242
|
+
*
|
|
243
|
+
* @since 6.5.0
|
|
244
|
+
*/
|
|
75
245
|
declare enum ParserDataFormat {
|
|
246
|
+
/**
|
|
247
|
+
* GS1 Application Identifier (AI) data format for parsing GS1 General Specifications standard data, see [http://www.gs1.org/](http://www.gs1.org/)
|
|
248
|
+
*
|
|
249
|
+
* @since 6.5.0
|
|
250
|
+
*/
|
|
76
251
|
GS1AI = "gs1ai",
|
|
252
|
+
/**
|
|
253
|
+
* Health Industry Bar Code (HIBC) data format for healthcare industry applications, see [https://www.hibcc.org/](https://www.hibcc.org/)
|
|
254
|
+
*
|
|
255
|
+
* @since 6.5.0
|
|
256
|
+
*/
|
|
77
257
|
HIBC = "hibc",
|
|
258
|
+
/**
|
|
259
|
+
* Swiss QR-bill data format for Swiss payment processing and banking applications
|
|
260
|
+
*
|
|
261
|
+
* @since 6.5.0
|
|
262
|
+
*/
|
|
78
263
|
SwissQR = "swissqr",
|
|
264
|
+
/**
|
|
265
|
+
* Vehicle Identification Number (VIN) data format, see [https://www.iso.org/standard/52200.html](https://www.iso.org/standard/52200.html) and [https://www.iso.org/standard/45844.html](https://www.iso.org/standard/45844.html)
|
|
266
|
+
*
|
|
267
|
+
* @since 6.5.0
|
|
268
|
+
*/
|
|
79
269
|
VIN = "vin",
|
|
270
|
+
/**
|
|
271
|
+
* IATA Bar Coded Boarding Pass (BCBP) data format for airline boarding passes, see [https://www.iata.org/](https://www.iata.org/)
|
|
272
|
+
*
|
|
273
|
+
* @since 6.26.0
|
|
274
|
+
*/
|
|
80
275
|
IataBcbp = "iata_bcbp",
|
|
276
|
+
/**
|
|
277
|
+
* GS1 Digital Link data format for web-based product identification, see [https://ref.gs1.org/standards/digital-link/uri-syntax/](https://ref.gs1.org/standards/digital-link/uri-syntax/)
|
|
278
|
+
*
|
|
279
|
+
* @since 6.26.0
|
|
280
|
+
*/
|
|
81
281
|
Gs1DigitalLink = "gs1_digital_link",
|
|
82
|
-
|
|
282
|
+
/**
|
|
283
|
+
* Electronic Product Code (EPC) data format, see [https://www.gs1.org/standards/epc-rfid](https://www.gs1.org/standards/epc-rfid)
|
|
284
|
+
*
|
|
285
|
+
* Currently only the RFID Tag EPC Memory Bank Contents (hexadecimal, SGTIN-96 format) is supported.
|
|
286
|
+
*
|
|
287
|
+
* @since 8.2.0
|
|
288
|
+
*/
|
|
289
|
+
Epc = "epc",
|
|
290
|
+
/**
|
|
291
|
+
* French 2D-Doc (ANTS) data format, see [https://ants.gouv.fr/nos-missions/les-solutions-numeriques/2d-doc](https://ants.gouv.fr/nos-missions/les-solutions-numeriques/2d-doc)
|
|
292
|
+
*
|
|
293
|
+
* The 2D-Doc header and data zone are parsed into structured fields and the signature is decoded; cryptographic signature verification against the ANTS trust list is not performed.
|
|
294
|
+
*
|
|
295
|
+
* @since 8.7.0
|
|
296
|
+
*/
|
|
297
|
+
French2dDoc = "french2ddoc"
|
|
83
298
|
}
|
|
84
299
|
|
|
300
|
+
/** @since 6.5.0 */
|
|
301
|
+
interface Parser$1 {
|
|
302
|
+
type: 'parser';
|
|
303
|
+
/**
|
|
304
|
+
* Implemented from {@link DataCaptureComponent}. See {@link DataCaptureComponent.id}.
|
|
305
|
+
*
|
|
306
|
+
* @since 6.5.0
|
|
307
|
+
*/
|
|
308
|
+
id?: string;
|
|
309
|
+
dataFormat: 'gs1ai' | 'hibc' | 'dlid' | 'mrtd' | 'swissqr' | 'vin' | 'us_usid' | 'iata_bcbp' | 'gs1_digital_link' | 'epc' | 'french2ddoc';
|
|
310
|
+
options?: unknown;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** @since 6.5.0 */
|
|
85
314
|
declare class Parser extends DefaultSerializeable implements DataCaptureComponent {
|
|
86
315
|
private type;
|
|
87
316
|
private dataFormat;
|
|
88
317
|
private options;
|
|
89
318
|
private _id;
|
|
319
|
+
/**
|
|
320
|
+
* Implemented from {@link DataCaptureComponent}. See {@link DataCaptureComponent.id}.
|
|
321
|
+
*
|
|
322
|
+
* @since 6.5.0
|
|
323
|
+
*/
|
|
90
324
|
get id(): string;
|
|
91
325
|
private controller;
|
|
326
|
+
/**
|
|
327
|
+
* Constructs a new Parser instance with the provided dataFormat.
|
|
328
|
+
*
|
|
329
|
+
* @since 7.6.0
|
|
330
|
+
*/
|
|
92
331
|
static create(dataFormat: ParserDataFormat): Promise<Parser>;
|
|
93
332
|
private constructor();
|
|
333
|
+
/**
|
|
334
|
+
* Sets the provided options on the parser.
|
|
335
|
+
*
|
|
336
|
+
* Available options depend on the data format type of the parser and are documented for each of the supported data formats.
|
|
337
|
+
*
|
|
338
|
+
* In case the options are invalid, an exception is raised. More detailed information on why creation failed is contained in the exception error message.
|
|
339
|
+
*
|
|
340
|
+
* @since 6.5.0
|
|
341
|
+
*/
|
|
94
342
|
setOptions(options: {
|
|
95
343
|
[key: string]: any;
|
|
96
344
|
}): Promise<void>;
|
|
345
|
+
/**
|
|
346
|
+
* Parses the data string and returns the contained field in the result object. Typical inputs to this method is the data contained in a barcode (see {@link Barcode.data})
|
|
347
|
+
*
|
|
348
|
+
* In case the data string could not be parsed, an exception is raised. More detailed information on why creation failed is contained in the exception error message.
|
|
349
|
+
*
|
|
350
|
+
* @since 6.5.0
|
|
351
|
+
*/
|
|
97
352
|
parseString(data: string): Promise<ParsedData>;
|
|
353
|
+
/**
|
|
354
|
+
* Parses the raw data and returns the contained field in the result object. Typical inputs to this method is the raw data of a barcode (see {@link Barcode.rawData}).
|
|
355
|
+
*
|
|
356
|
+
* In case the data string could not be parsed, an exception is raised. More detailed information on why creation failed is contained in the exception error message.
|
|
357
|
+
*
|
|
358
|
+
* @since 6.5.0
|
|
359
|
+
*/
|
|
98
360
|
parseRawData(data: string): Promise<ParsedData>;
|
|
361
|
+
/**
|
|
362
|
+
* Disposes the parser.
|
|
363
|
+
*
|
|
364
|
+
* @since 6.22.0
|
|
365
|
+
*/
|
|
99
366
|
dispose(): void;
|
|
367
|
+
toJSON(): Parser$1;
|
|
100
368
|
}
|
|
101
369
|
|
|
102
370
|
/**
|
|
@@ -171,5 +439,19 @@ declare class ParserProxyAdapter {
|
|
|
171
439
|
}): Promise<void>;
|
|
172
440
|
}
|
|
173
441
|
|
|
174
|
-
|
|
442
|
+
/**
|
|
443
|
+
* Per-method `LogRecord` category overrides for the ParserProxy
|
|
444
|
+
* bridge surface. Consumed by the centralized `ScanditLogger` interceptor
|
|
445
|
+
* to pick a non-default category (e.g. `Events`) for specific methods so
|
|
446
|
+
* that high-frequency per-frame / per-scan callbacks fall outside the
|
|
447
|
+
* default category mask. Level and category gate independently: those
|
|
448
|
+
* records are emitted at `Debug` and stay hidden until the category is
|
|
449
|
+
* opted into, so raising the level does not reveal them.
|
|
450
|
+
*
|
|
451
|
+
* Auto-registered as a side effect of importing this module via the
|
|
452
|
+
* generated `index.ts` barrel — no customer wiring required.
|
|
453
|
+
*/
|
|
454
|
+
declare const PARSER_PROXY_LOG_METADATA: Record<string, MethodLogMetadata>;
|
|
455
|
+
|
|
456
|
+
export { PARSER_PROXY_LOG_METADATA, PARSER_PROXY_TYPE_NAMES, ParsedData, ParsedField, Parser, ParserDataFormat, ParserIssue, ParserIssueAdditionalInfoKey, ParserIssueCode, ParserProxyAdapter, registerParserProxies };
|
|
175
457
|
export type { ParserNativeCallerProvider, ParserProxy, ParserProxyType };
|
package/dist/parser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nameForSerialization, registerProxies, DefaultSerializeable, ignoreFromSerialization, BaseController } from 'scandit-react-native-datacapture-core/dist/core';
|
|
1
|
+
import { ScanditLogger, nameForSerialization, LogValues, LogCategory, registerProxies, DefaultSerializeable, ignoreFromSerialization, BaseController } from 'scandit-react-native-datacapture-core/dist/core';
|
|
2
2
|
|
|
3
3
|
const PARSER_PROXY_TYPE_NAMES = ['ParserProxy'];
|
|
4
4
|
|
|
@@ -194,6 +194,29 @@ class ParserProxyAdapter {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
/*
|
|
198
|
+
* This file is part of the Scandit Data Capture SDK
|
|
199
|
+
*
|
|
200
|
+
* Copyright (C) 2026- Scandit AG. All rights reserved.
|
|
201
|
+
*/
|
|
202
|
+
// THIS FILE IS GENERATED. DO NOT EDIT MANUALLY.
|
|
203
|
+
// Generator: scripts/bridge_generator/generate.py
|
|
204
|
+
// Schema: scripts/bridge_generator/schemas/parser.json
|
|
205
|
+
/**
|
|
206
|
+
* Per-method `LogRecord` category overrides for the ParserProxy
|
|
207
|
+
* bridge surface. Consumed by the centralized `ScanditLogger` interceptor
|
|
208
|
+
* to pick a non-default category (e.g. `Events`) for specific methods so
|
|
209
|
+
* that high-frequency per-frame / per-scan callbacks fall outside the
|
|
210
|
+
* default category mask. Level and category gate independently: those
|
|
211
|
+
* records are emitted at `Debug` and stay hidden until the category is
|
|
212
|
+
* opted into, so raising the level does not reveal them.
|
|
213
|
+
*
|
|
214
|
+
* Auto-registered as a side effect of importing this module via the
|
|
215
|
+
* generated `index.ts` barrel — no customer wiring required.
|
|
216
|
+
*/
|
|
217
|
+
const PARSER_PROXY_LOG_METADATA = {};
|
|
218
|
+
ScanditLogger.registerMethodMetadata(PARSER_PROXY_LOG_METADATA);
|
|
219
|
+
|
|
197
220
|
class ParserController extends BaseController {
|
|
198
221
|
constructor(parser) {
|
|
199
222
|
super('ParserProxy');
|
|
@@ -256,6 +279,13 @@ class Parser extends DefaultSerializeable {
|
|
|
256
279
|
dispose() {
|
|
257
280
|
void this.controller.disposeParser();
|
|
258
281
|
}
|
|
282
|
+
toJSON() {
|
|
283
|
+
// Fields are decorator-serialized (@nameForSerialization); this override only adds a
|
|
284
|
+
// declared, schema-backed return type - no runtime validation on an outbound payload.
|
|
285
|
+
// Every generated schema enforces additionalProperties: false, so validating here would
|
|
286
|
+
// turn any future field addition into a customer-facing throw instead of a native no-op.
|
|
287
|
+
return super.toJSON();
|
|
288
|
+
}
|
|
259
289
|
}
|
|
260
290
|
__decorate([
|
|
261
291
|
nameForSerialization('id')
|
|
@@ -263,6 +293,9 @@ __decorate([
|
|
|
263
293
|
__decorate([
|
|
264
294
|
ignoreFromSerialization
|
|
265
295
|
], Parser.prototype, "controller", void 0);
|
|
296
|
+
__decorate([
|
|
297
|
+
LogValues({ source: 'ts.parser', category: LogCategory.Lifecycle })
|
|
298
|
+
], Parser.prototype, "dispose", null);
|
|
266
299
|
|
|
267
300
|
var ParserDataFormat;
|
|
268
301
|
(function (ParserDataFormat) {
|
|
@@ -273,6 +306,7 @@ var ParserDataFormat;
|
|
|
273
306
|
ParserDataFormat["IataBcbp"] = "iata_bcbp";
|
|
274
307
|
ParserDataFormat["Gs1DigitalLink"] = "gs1_digital_link";
|
|
275
308
|
ParserDataFormat["Epc"] = "epc";
|
|
309
|
+
ParserDataFormat["French2dDoc"] = "french2ddoc";
|
|
276
310
|
})(ParserDataFormat || (ParserDataFormat = {}));
|
|
277
311
|
|
|
278
312
|
var ParserIssueCode;
|
|
@@ -306,4 +340,4 @@ var ParserIssueAdditionalInfoKey;
|
|
|
306
340
|
ParserIssueAdditionalInfoKey["Charset"] = "charset";
|
|
307
341
|
})(ParserIssueAdditionalInfoKey || (ParserIssueAdditionalInfoKey = {}));
|
|
308
342
|
|
|
309
|
-
export { PARSER_PROXY_TYPE_NAMES, ParsedData, ParsedField, Parser, ParserDataFormat, ParserIssue, ParserIssueAdditionalInfoKey, ParserIssueCode, ParserProxyAdapter, registerParserProxies };
|
|
343
|
+
export { PARSER_PROXY_LOG_METADATA, PARSER_PROXY_TYPE_NAMES, ParsedData, ParsedField, Parser, ParserDataFormat, ParserIssue, ParserIssueAdditionalInfoKey, ParserIssueCode, ParserProxyAdapter, registerParserProxies };
|
package/dist/parser.js.flow
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
DefaultSerializeable,
|
|
10
10
|
DataCaptureComponent,
|
|
11
11
|
BaseProxy,
|
|
12
|
+
MethodLogMetadata,
|
|
12
13
|
} from "scandit-react-native-datacapture-core/dist/core";
|
|
13
14
|
declare var PARSER_PROXY_TYPE_NAMES: ["ParserProxy"];
|
|
14
15
|
declare type ParserProxyType = $ElementType<
|
|
@@ -22,6 +23,11 @@ declare function registerParserProxies(
|
|
|
22
23
|
provider: ParserNativeCallerProvider
|
|
23
24
|
): void;
|
|
24
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Keys used to retrieve additional info regarding an issue.
|
|
28
|
+
* @since 6.26.0
|
|
29
|
+
*/
|
|
30
|
+
|
|
25
31
|
declare var ParserIssueAdditionalInfoKey: {|
|
|
26
32
|
+StartingCharacters: "startingCharacters", // "startingCharacters"
|
|
27
33
|
+Version: "version", // "version"
|
|
@@ -32,6 +38,11 @@ declare var ParserIssueAdditionalInfoKey: {|
|
|
|
32
38
|
+Charset: "charset", // "charset"
|
|
33
39
|
|};
|
|
34
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Error code identifying the cause of the parser issue.
|
|
43
|
+
* @since 6.26.0
|
|
44
|
+
*/
|
|
45
|
+
|
|
35
46
|
declare var ParserIssueCode: {|
|
|
36
47
|
+None: "none", // "none"
|
|
37
48
|
+Unspecified: "unspecified", // "unspecified"
|
|
@@ -50,28 +61,96 @@ declare var ParserIssueCode: {|
|
|
|
50
61
|
+TooManyAltPmtFields: "tooManyAltPmtFields", // "tooManyAltPmtFields"
|
|
51
62
|
+CannotContainSpaces: "cannotContainSpaces", // "cannotContainSpaces"
|
|
52
63
|
|};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @since 6.26.0
|
|
67
|
+
*/
|
|
53
68
|
declare class ParserIssue {
|
|
69
|
+
/**
|
|
70
|
+
* Error code identifying the cause of the issue.
|
|
71
|
+
* @since 6.26.0
|
|
72
|
+
*/
|
|
54
73
|
code: $Values<typeof ParserIssueCode>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* English description of the error
|
|
77
|
+
* @since 6.26.0
|
|
78
|
+
*/
|
|
55
79
|
message: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Dictionary that provides additional info regarding the error.
|
|
83
|
+
* @since 6.26.0
|
|
84
|
+
*/
|
|
56
85
|
additionalInfo: {
|
|
57
86
|
[key: $Values<typeof ParserIssueAdditionalInfoKey>]: string,
|
|
58
87
|
...
|
|
59
88
|
};
|
|
60
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* @since 6.5.0
|
|
92
|
+
*/
|
|
61
93
|
declare class ParsedField {
|
|
94
|
+
/**
|
|
95
|
+
* The name of the field.
|
|
96
|
+
* @since 6.5.0
|
|
97
|
+
*/
|
|
62
98
|
name: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The parsed data contained in this field. Depending on the field type, this returns a `INumber`, `IDictionary` or [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) instance. Consult the field documentation for information on the type for the fields you are interested in.
|
|
102
|
+
* @since 6.5.0
|
|
103
|
+
*/
|
|
63
104
|
parsed: any;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The raw string that represents this field in the input string/data.
|
|
108
|
+
* @since 6.5.0
|
|
109
|
+
*/
|
|
64
110
|
rawString: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Warnings associated with this field
|
|
114
|
+
* @since 6.26.0
|
|
115
|
+
*/
|
|
65
116
|
warnings: ParserIssue[];
|
|
66
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
|
|
120
|
+
* @since 6.5.0
|
|
121
|
+
*/
|
|
67
122
|
declare class ParsedData {
|
|
123
|
+
/**
|
|
124
|
+
* The result object as a serialized JSON string.
|
|
125
|
+
* @since 6.5.0
|
|
126
|
+
*/
|
|
68
127
|
jsonString: string;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The order of the fields matches the order in the original data string. The fields are data format specific. Consult the data format documentation for information on available fields.
|
|
131
|
+
* @since 6.5.0
|
|
132
|
+
*/
|
|
69
133
|
fields: ParsedField[];
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Provides by-name lookup of the fields. The field names are data format specific. Consult the data format documentation for information on available fields.
|
|
137
|
+
* @since 6.5.0
|
|
138
|
+
*/
|
|
70
139
|
fieldsByName: {
|
|
71
140
|
[key: string]: ParsedField,
|
|
72
141
|
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* [object Object],[object Object],[object Object]
|
|
145
|
+
* @since 6.26.0
|
|
146
|
+
*/
|
|
73
147
|
fieldsWithIssues: ParsedField[];
|
|
74
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* [object Object],[object Object],[object Object]
|
|
151
|
+
* @since 6.5.0
|
|
152
|
+
*/
|
|
153
|
+
|
|
75
154
|
declare var ParserDataFormat: {|
|
|
76
155
|
+GS1AI: "gs1ai", // "gs1ai"
|
|
77
156
|
+HIBC: "hibc", // "hibc"
|
|
@@ -80,17 +159,81 @@ declare var ParserDataFormat: {|
|
|
|
80
159
|
+IataBcbp: "iata_bcbp", // "iata_bcbp"
|
|
81
160
|
+Gs1DigitalLink: "gs1_digital_link", // "gs1_digital_link"
|
|
82
161
|
+Epc: "epc", // "epc"
|
|
162
|
+
+French2dDoc: "french2ddoc", // "french2ddoc"
|
|
83
163
|
|};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @since 6.5.0
|
|
167
|
+
*/
|
|
168
|
+
declare interface Parser$1 {
|
|
169
|
+
type: "parser";
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* [object Object],[object Object],[object Object],[object Object],[object Object]
|
|
173
|
+
* @since 6.5.0
|
|
174
|
+
*/
|
|
175
|
+
id?: string;
|
|
176
|
+
dataFormat:
|
|
177
|
+
| "gs1ai"
|
|
178
|
+
| "hibc"
|
|
179
|
+
| "dlid"
|
|
180
|
+
| "mrtd"
|
|
181
|
+
| "swissqr"
|
|
182
|
+
| "vin"
|
|
183
|
+
| "us_usid"
|
|
184
|
+
| "iata_bcbp"
|
|
185
|
+
| "gs1_digital_link"
|
|
186
|
+
| "epc"
|
|
187
|
+
| "french2ddoc";
|
|
188
|
+
options?: mixed;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* @since 6.5.0
|
|
192
|
+
*/
|
|
84
193
|
declare class Parser mixins DefaultSerializeable, DataCaptureComponent {
|
|
194
|
+
/**
|
|
195
|
+
* [object Object],[object Object],[object Object],[object Object],[object Object]
|
|
196
|
+
* @since 6.5.0
|
|
197
|
+
*/
|
|
85
198
|
id: string;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Constructs a new Parser instance with the provided dataFormat.
|
|
202
|
+
* @since 7.6.0
|
|
203
|
+
*/
|
|
86
204
|
static create(dataFormat: $Values<typeof ParserDataFormat>): Promise<Parser>;
|
|
87
205
|
constructor(): this;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Sets the provided options on the parser.
|
|
209
|
+
*
|
|
210
|
+
* Available options depend on the data format type of the parser and are documented for each of the supported data formats.
|
|
211
|
+
*
|
|
212
|
+
* In case the options are invalid, an exception is raised. More detailed information on why creation failed is contained in the exception error message.
|
|
213
|
+
* @since 6.5.0
|
|
214
|
+
*/
|
|
88
215
|
setOptions(options: {
|
|
89
216
|
[key: string]: any,
|
|
90
217
|
}): Promise<void>;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* [object Object],[object Object],[object Object]
|
|
221
|
+
* @since 6.5.0
|
|
222
|
+
*/
|
|
91
223
|
parseString(data: string): Promise<ParsedData>;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* [object Object],[object Object],[object Object]
|
|
227
|
+
* @since 6.5.0
|
|
228
|
+
*/
|
|
92
229
|
parseRawData(data: string): Promise<ParsedData>;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Disposes the parser.
|
|
233
|
+
* @since 6.22.0
|
|
234
|
+
*/
|
|
93
235
|
dispose(): void;
|
|
236
|
+
toJSON(): Parser$1;
|
|
94
237
|
}
|
|
95
238
|
/**
|
|
96
239
|
* Parser module - structured data parsing without image input
|
|
@@ -169,7 +312,24 @@ declare class ParserProxyAdapter {
|
|
|
169
312
|
...
|
|
170
313
|
}): Promise<void>;
|
|
171
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* Per-method `LogRecord` category overrides for the ParserProxy
|
|
317
|
+
* bridge surface. Consumed by the centralized `ScanditLogger` interceptor
|
|
318
|
+
* to pick a non-default category (e.g. `Events`) for specific methods so
|
|
319
|
+
* that high-frequency per-frame / per-scan callbacks fall outside the
|
|
320
|
+
* default category mask. Level and category gate independently: those
|
|
321
|
+
* records are emitted at `Debug` and stay hidden until the category is
|
|
322
|
+
* opted into, so raising the level does not reveal them.
|
|
323
|
+
*
|
|
324
|
+
* Auto-registered as a side effect of importing this module via the
|
|
325
|
+
* generated `index.ts` barrel — no customer wiring required.
|
|
326
|
+
*/
|
|
327
|
+
declare var PARSER_PROXY_LOG_METADATA: {
|
|
328
|
+
[key: string]: MethodLogMetadata,
|
|
329
|
+
...
|
|
330
|
+
};
|
|
172
331
|
declare export {
|
|
332
|
+
PARSER_PROXY_LOG_METADATA,
|
|
173
333
|
PARSER_PROXY_TYPE_NAMES,
|
|
174
334
|
ParsedData,
|
|
175
335
|
ParsedField,
|
package/dist/parser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.js","sources":["scandit-datacapture-frameworks-parser"],"sourcesContent":["import { registerProxies, BaseController, nameForSerialization, DefaultSerializeable, ignoreFromSerialization } from 'scandit-datacapture-frameworks-core';\n\nconst PARSER_PROXY_TYPE_NAMES = ['ParserProxy'];\n\nfunction registerParserProxies(provider) {\n registerProxies(PARSER_PROXY_TYPE_NAMES, provider);\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nclass ParserIssue {\n get code() {\n return this._code;\n }\n get message() {\n return this._message;\n }\n get additionalInfo() {\n return this._additionalInfo;\n }\n static fromJSON(json) {\n const issue = new ParserIssue();\n issue._code = json.code;\n issue._message = json.message;\n issue._additionalInfo = json.additionalInfo;\n return issue;\n }\n}\n\nclass ParsedField {\n get name() {\n return this._name;\n }\n get parsed() {\n return this._parsed;\n }\n get rawString() {\n return this._rawString;\n }\n get warnings() {\n return this._warnings;\n }\n static fromJSON(json) {\n var _a;\n const field = new ParsedField();\n field._name = json.name;\n field._parsed = json.parsed;\n field._rawString = json.rawString;\n field._warnings = ((_a = json.warnings) === null || _a === void 0 ? void 0 : _a.map(e => ParserIssue['fromJSON'](e))) || [];\n return field;\n }\n}\n\nclass ParsedData {\n get jsonString() {\n return this._jsonString;\n }\n get fields() {\n return this._fields;\n }\n get fieldsByName() {\n return this._fieldsByName;\n }\n get fieldsWithIssues() {\n return this._fieldsWithIssues;\n }\n static fromJSON(json) {\n const data = new ParsedData();\n data._jsonString = JSON.stringify(json);\n data._fields = json.map(ParsedField['fromJSON']);\n data._fieldsByName = data._fields.reduce((fieldsByName, field) => {\n fieldsByName[field.name] = field;\n return fieldsByName;\n }, {});\n data._fieldsWithIssues = data._fields.filter(e => e.warnings.length > 0);\n return data;\n }\n}\n\n/*\n * This file is part of the Scandit Data Capture SDK\n *\n * Copyright (C) 2025- Scandit AG. All rights reserved.\n */\n/**\n * Adapter class for Parser operations.\n * Provides typed methods that internally call $executeParser.\n * Generated from schema definition to ensure parameter and method name consistency.\n */\nclass ParserProxyAdapter {\n constructor(proxy) {\n this.proxy = proxy;\n }\n /**\n * Parses a string and returns structured data\n * @param parserId Unique identifier of the parser instance\n * @param data String data to parse\n */\n parseString(_a) {\n return __awaiter(this, arguments, void 0, function* ({ parserId, data }) {\n const result = yield this.proxy.$executeParser({\n moduleName: 'ParserModule',\n methodName: 'parseString',\n isEventRegistration: false,\n parserId,\n data,\n });\n return result.data;\n });\n }\n /**\n * Parses raw data and returns structured data\n * @param parserId Unique identifier of the parser instance\n * @param data Raw data to parse\n */\n parseRawData(_a) {\n return __awaiter(this, arguments, void 0, function* ({ parserId, data }) {\n const result = yield this.proxy.$executeParser({\n moduleName: 'ParserModule',\n methodName: 'parseRawData',\n isEventRegistration: false,\n parserId,\n data,\n });\n return result.data;\n });\n }\n /**\n * Creates or updates a native parser instance\n * @param parserJson Parser configuration as JSON string\n */\n createUpdateNativeInstance(_a) {\n return __awaiter(this, arguments, void 0, function* ({ parserJson }) {\n const result = yield this.proxy.$executeParser({\n moduleName: 'ParserModule',\n methodName: 'createUpdateNativeInstance',\n isEventRegistration: false,\n parserJson,\n });\n return result;\n });\n }\n /**\n * Disposes the parser instance and releases resources\n * @param parserId Unique identifier of the parser instance to dispose\n */\n disposeParser(_a) {\n return __awaiter(this, arguments, void 0, function* ({ parserId }) {\n const result = yield this.proxy.$executeParser({\n moduleName: 'ParserModule',\n methodName: 'disposeParser',\n isEventRegistration: false,\n parserId,\n });\n return result;\n });\n }\n}\n\nclass ParserController extends BaseController {\n constructor(parser) {\n super('ParserProxy');\n this.adapter = new ParserProxyAdapter(this._proxy);\n this.parser = parser;\n }\n parseString(data) {\n return __awaiter(this, void 0, void 0, function* () {\n const result = yield this.adapter.parseString({ parserId: this.parser.id, data: data });\n const jsonData = JSON.parse(result);\n return ParsedData['fromJSON'](jsonData);\n });\n }\n parseRawData(data) {\n return __awaiter(this, void 0, void 0, function* () {\n const result = yield this.adapter.parseRawData({ parserId: this.parser.id, data: data });\n const jsonData = JSON.parse(result);\n return ParsedData['fromJSON'](jsonData);\n });\n }\n createUpdateNativeInstance() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.adapter.createUpdateNativeInstance({ parserJson: JSON.stringify(this.parser.toJSON()) });\n });\n }\n disposeParser() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.adapter.disposeParser({ parserId: this.parser.id });\n });\n }\n}\n\nclass Parser extends DefaultSerializeable {\n get id() {\n return this._id;\n }\n static create(dataFormat) {\n const parser = new Parser();\n parser.dataFormat = dataFormat;\n const promise = parser.controller.createUpdateNativeInstance().then(() => Promise.resolve(parser));\n return promise;\n }\n constructor() {\n super();\n this.type = 'parser';\n this.options = {};\n this._id = `${Date.now()}`;\n this.controller = new ParserController(this);\n }\n setOptions(options) {\n this.options = options;\n return this.controller.createUpdateNativeInstance();\n }\n parseString(data) {\n return this.controller.parseString(data);\n }\n parseRawData(data) {\n return this.controller.parseRawData(data);\n }\n dispose() {\n void this.controller.disposeParser();\n }\n}\n__decorate([\n nameForSerialization('id')\n], Parser.prototype, \"_id\", void 0);\n__decorate([\n ignoreFromSerialization\n], Parser.prototype, \"controller\", void 0);\n\nvar ParserDataFormat;\n(function (ParserDataFormat) {\n ParserDataFormat[\"GS1AI\"] = \"gs1ai\";\n ParserDataFormat[\"HIBC\"] = \"hibc\";\n ParserDataFormat[\"SwissQR\"] = \"swissqr\";\n ParserDataFormat[\"VIN\"] = \"vin\";\n ParserDataFormat[\"IataBcbp\"] = \"iata_bcbp\";\n ParserDataFormat[\"Gs1DigitalLink\"] = \"gs1_digital_link\";\n ParserDataFormat[\"Epc\"] = \"epc\";\n})(ParserDataFormat || (ParserDataFormat = {}));\n\nvar ParserIssueCode;\n(function (ParserIssueCode) {\n ParserIssueCode[\"None\"] = \"none\";\n ParserIssueCode[\"Unspecified\"] = \"unspecified\";\n ParserIssueCode[\"MandatoryEpdMissing\"] = \"mandatoryEpdMissing\";\n ParserIssueCode[\"InvalidDate\"] = \"invalidDate\";\n ParserIssueCode[\"StringTooShort\"] = \"stringTooShort\";\n ParserIssueCode[\"WrongStartingCharacters\"] = \"wrongStartingCharacters\";\n ParserIssueCode[\"InvalidSeparationBetweenElements\"] = \"invalidSeparationBetweenElements\";\n ParserIssueCode[\"UnsupportedVersion\"] = \"unsupportedVersion\";\n ParserIssueCode[\"IncompleteCode\"] = \"incompleteCode\";\n ParserIssueCode[\"EmptyElementContent\"] = \"emptyElementContent\";\n ParserIssueCode[\"InvalidElementLength\"] = \"invalidElementLength\";\n ParserIssueCode[\"TooLongElement\"] = \"tooLongElement\";\n ParserIssueCode[\"NonEmptyElementContent\"] = \"nonEmptyElementContent\";\n ParserIssueCode[\"InvalidCharsetInElement\"] = \"invalidCharsetInElement\";\n ParserIssueCode[\"TooManyAltPmtFields\"] = \"tooManyAltPmtFields\";\n ParserIssueCode[\"CannotContainSpaces\"] = \"cannotContainSpaces\";\n})(ParserIssueCode || (ParserIssueCode = {}));\n\nvar ParserIssueAdditionalInfoKey;\n(function (ParserIssueAdditionalInfoKey) {\n ParserIssueAdditionalInfoKey[\"StartingCharacters\"] = \"startingCharacters\";\n ParserIssueAdditionalInfoKey[\"Version\"] = \"version\";\n ParserIssueAdditionalInfoKey[\"MinimalVersion\"] = \"minimalVersion\";\n ParserIssueAdditionalInfoKey[\"ElementName\"] = \"elementName\";\n ParserIssueAdditionalInfoKey[\"String\"] = \"string\";\n ParserIssueAdditionalInfoKey[\"Length\"] = \"length\";\n ParserIssueAdditionalInfoKey[\"Charset\"] = \"charset\";\n})(ParserIssueAdditionalInfoKey || (ParserIssueAdditionalInfoKey = {}));\n\nexport { PARSER_PROXY_TYPE_NAMES, ParsedData, ParsedField, Parser, ParserDataFormat, ParserIssue, ParserIssueAdditionalInfoKey, ParserIssueCode, ParserProxyAdapter, registerParserProxies };\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;AAEK,MAAC,uBAAuB,GAAG,CAAC,aAAa,EAAE;AAChD;AACA,SAAS,qBAAqB,CAAC,QAAQ,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IAAC,6BAA6B;AACjC,CAAC,UAAU,4BAA4B,EAAE;AACzC,IAAI,4BAA4B,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC;AAC9E,IAAI,4BAA4B,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AACxD,IAAI,4BAA4B,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AACtE,IAAI,4BAA4B,CAAC,aAAa,CAAC,GAAG,aAAa,CAAC;AAChE,IAAI,4BAA4B,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;AACtD,IAAI,4BAA4B,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;AACtD,IAAI,4BAA4B,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AACxD,CAAC,EAAE,4BAA4B,KAAK,4BAA4B,GAAG,EAAE,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"parser.js","sources":["scandit-datacapture-frameworks-parser"],"sourcesContent":["import { registerProxies, ScanditLogger, BaseController, nameForSerialization, LogValues, LogCategory, DefaultSerializeable, ignoreFromSerialization } from 'scandit-datacapture-frameworks-core';\n\nconst PARSER_PROXY_TYPE_NAMES = ['ParserProxy'];\n\nfunction registerParserProxies(provider) {\n registerProxies(PARSER_PROXY_TYPE_NAMES, provider);\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nclass ParserIssue {\n get code() {\n return this._code;\n }\n get message() {\n return this._message;\n }\n get additionalInfo() {\n return this._additionalInfo;\n }\n static fromJSON(json) {\n const issue = new ParserIssue();\n issue._code = json.code;\n issue._message = json.message;\n issue._additionalInfo = json.additionalInfo;\n return issue;\n }\n}\n\nclass ParsedField {\n get name() {\n return this._name;\n }\n get parsed() {\n return this._parsed;\n }\n get rawString() {\n return this._rawString;\n }\n get warnings() {\n return this._warnings;\n }\n static fromJSON(json) {\n var _a;\n const field = new ParsedField();\n field._name = json.name;\n field._parsed = json.parsed;\n field._rawString = json.rawString;\n field._warnings = ((_a = json.warnings) === null || _a === void 0 ? void 0 : _a.map(e => ParserIssue['fromJSON'](e))) || [];\n return field;\n }\n}\n\nclass ParsedData {\n get jsonString() {\n return this._jsonString;\n }\n get fields() {\n return this._fields;\n }\n get fieldsByName() {\n return this._fieldsByName;\n }\n get fieldsWithIssues() {\n return this._fieldsWithIssues;\n }\n static fromJSON(json) {\n const data = new ParsedData();\n data._jsonString = JSON.stringify(json);\n data._fields = json.map(ParsedField['fromJSON']);\n data._fieldsByName = data._fields.reduce((fieldsByName, field) => {\n fieldsByName[field.name] = field;\n return fieldsByName;\n }, {});\n data._fieldsWithIssues = data._fields.filter(e => e.warnings.length > 0);\n return data;\n }\n}\n\n/*\n * This file is part of the Scandit Data Capture SDK\n *\n * Copyright (C) 2025- Scandit AG. All rights reserved.\n */\n/**\n * Adapter class for Parser operations.\n * Provides typed methods that internally call $executeParser.\n * Generated from schema definition to ensure parameter and method name consistency.\n */\nclass ParserProxyAdapter {\n constructor(proxy) {\n this.proxy = proxy;\n }\n /**\n * Parses a string and returns structured data\n * @param parserId Unique identifier of the parser instance\n * @param data String data to parse\n */\n parseString(_a) {\n return __awaiter(this, arguments, void 0, function* ({ parserId, data }) {\n const result = yield this.proxy.$executeParser({\n moduleName: 'ParserModule',\n methodName: 'parseString',\n isEventRegistration: false,\n parserId,\n data,\n });\n return result.data;\n });\n }\n /**\n * Parses raw data and returns structured data\n * @param parserId Unique identifier of the parser instance\n * @param data Raw data to parse\n */\n parseRawData(_a) {\n return __awaiter(this, arguments, void 0, function* ({ parserId, data }) {\n const result = yield this.proxy.$executeParser({\n moduleName: 'ParserModule',\n methodName: 'parseRawData',\n isEventRegistration: false,\n parserId,\n data,\n });\n return result.data;\n });\n }\n /**\n * Creates or updates a native parser instance\n * @param parserJson Parser configuration as JSON string\n */\n createUpdateNativeInstance(_a) {\n return __awaiter(this, arguments, void 0, function* ({ parserJson }) {\n const result = yield this.proxy.$executeParser({\n moduleName: 'ParserModule',\n methodName: 'createUpdateNativeInstance',\n isEventRegistration: false,\n parserJson,\n });\n return result;\n });\n }\n /**\n * Disposes the parser instance and releases resources\n * @param parserId Unique identifier of the parser instance to dispose\n */\n disposeParser(_a) {\n return __awaiter(this, arguments, void 0, function* ({ parserId }) {\n const result = yield this.proxy.$executeParser({\n moduleName: 'ParserModule',\n methodName: 'disposeParser',\n isEventRegistration: false,\n parserId,\n });\n return result;\n });\n }\n}\n\n/*\n * This file is part of the Scandit Data Capture SDK\n *\n * Copyright (C) 2026- Scandit AG. All rights reserved.\n */\n// THIS FILE IS GENERATED. DO NOT EDIT MANUALLY.\n// Generator: scripts/bridge_generator/generate.py\n// Schema: scripts/bridge_generator/schemas/parser.json\n/**\n * Per-method `LogRecord` category overrides for the ParserProxy\n * bridge surface. Consumed by the centralized `ScanditLogger` interceptor\n * to pick a non-default category (e.g. `Events`) for specific methods so\n * that high-frequency per-frame / per-scan callbacks fall outside the\n * default category mask. Level and category gate independently: those\n * records are emitted at `Debug` and stay hidden until the category is\n * opted into, so raising the level does not reveal them.\n *\n * Auto-registered as a side effect of importing this module via the\n * generated `index.ts` barrel — no customer wiring required.\n */\nconst PARSER_PROXY_LOG_METADATA = {};\nScanditLogger.registerMethodMetadata(PARSER_PROXY_LOG_METADATA);\n\nclass ParserController extends BaseController {\n constructor(parser) {\n super('ParserProxy');\n this.adapter = new ParserProxyAdapter(this._proxy);\n this.parser = parser;\n }\n parseString(data) {\n return __awaiter(this, void 0, void 0, function* () {\n const result = yield this.adapter.parseString({ parserId: this.parser.id, data: data });\n const jsonData = JSON.parse(result);\n return ParsedData['fromJSON'](jsonData);\n });\n }\n parseRawData(data) {\n return __awaiter(this, void 0, void 0, function* () {\n const result = yield this.adapter.parseRawData({ parserId: this.parser.id, data: data });\n const jsonData = JSON.parse(result);\n return ParsedData['fromJSON'](jsonData);\n });\n }\n createUpdateNativeInstance() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.adapter.createUpdateNativeInstance({ parserJson: JSON.stringify(this.parser.toJSON()) });\n });\n }\n disposeParser() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.adapter.disposeParser({ parserId: this.parser.id });\n });\n }\n}\n\nclass Parser extends DefaultSerializeable {\n get id() {\n return this._id;\n }\n static create(dataFormat) {\n const parser = new Parser();\n parser.dataFormat = dataFormat;\n const promise = parser.controller.createUpdateNativeInstance().then(() => Promise.resolve(parser));\n return promise;\n }\n constructor() {\n super();\n this.type = 'parser';\n this.options = {};\n this._id = `${Date.now()}`;\n this.controller = new ParserController(this);\n }\n setOptions(options) {\n this.options = options;\n return this.controller.createUpdateNativeInstance();\n }\n parseString(data) {\n return this.controller.parseString(data);\n }\n parseRawData(data) {\n return this.controller.parseRawData(data);\n }\n dispose() {\n void this.controller.disposeParser();\n }\n toJSON() {\n // Fields are decorator-serialized (@nameForSerialization); this override only adds a\n // declared, schema-backed return type - no runtime validation on an outbound payload.\n // Every generated schema enforces additionalProperties: false, so validating here would\n // turn any future field addition into a customer-facing throw instead of a native no-op.\n return super.toJSON();\n }\n}\n__decorate([\n nameForSerialization('id')\n], Parser.prototype, \"_id\", void 0);\n__decorate([\n ignoreFromSerialization\n], Parser.prototype, \"controller\", void 0);\n__decorate([\n LogValues({ source: 'ts.parser', category: LogCategory.Lifecycle })\n], Parser.prototype, \"dispose\", null);\n\nvar ParserDataFormat;\n(function (ParserDataFormat) {\n ParserDataFormat[\"GS1AI\"] = \"gs1ai\";\n ParserDataFormat[\"HIBC\"] = \"hibc\";\n ParserDataFormat[\"SwissQR\"] = \"swissqr\";\n ParserDataFormat[\"VIN\"] = \"vin\";\n ParserDataFormat[\"IataBcbp\"] = \"iata_bcbp\";\n ParserDataFormat[\"Gs1DigitalLink\"] = \"gs1_digital_link\";\n ParserDataFormat[\"Epc\"] = \"epc\";\n ParserDataFormat[\"French2dDoc\"] = \"french2ddoc\";\n})(ParserDataFormat || (ParserDataFormat = {}));\n\nvar ParserIssueCode;\n(function (ParserIssueCode) {\n ParserIssueCode[\"None\"] = \"none\";\n ParserIssueCode[\"Unspecified\"] = \"unspecified\";\n ParserIssueCode[\"MandatoryEpdMissing\"] = \"mandatoryEpdMissing\";\n ParserIssueCode[\"InvalidDate\"] = \"invalidDate\";\n ParserIssueCode[\"StringTooShort\"] = \"stringTooShort\";\n ParserIssueCode[\"WrongStartingCharacters\"] = \"wrongStartingCharacters\";\n ParserIssueCode[\"InvalidSeparationBetweenElements\"] = \"invalidSeparationBetweenElements\";\n ParserIssueCode[\"UnsupportedVersion\"] = \"unsupportedVersion\";\n ParserIssueCode[\"IncompleteCode\"] = \"incompleteCode\";\n ParserIssueCode[\"EmptyElementContent\"] = \"emptyElementContent\";\n ParserIssueCode[\"InvalidElementLength\"] = \"invalidElementLength\";\n ParserIssueCode[\"TooLongElement\"] = \"tooLongElement\";\n ParserIssueCode[\"NonEmptyElementContent\"] = \"nonEmptyElementContent\";\n ParserIssueCode[\"InvalidCharsetInElement\"] = \"invalidCharsetInElement\";\n ParserIssueCode[\"TooManyAltPmtFields\"] = \"tooManyAltPmtFields\";\n ParserIssueCode[\"CannotContainSpaces\"] = \"cannotContainSpaces\";\n})(ParserIssueCode || (ParserIssueCode = {}));\n\nvar ParserIssueAdditionalInfoKey;\n(function (ParserIssueAdditionalInfoKey) {\n ParserIssueAdditionalInfoKey[\"StartingCharacters\"] = \"startingCharacters\";\n ParserIssueAdditionalInfoKey[\"Version\"] = \"version\";\n ParserIssueAdditionalInfoKey[\"MinimalVersion\"] = \"minimalVersion\";\n ParserIssueAdditionalInfoKey[\"ElementName\"] = \"elementName\";\n ParserIssueAdditionalInfoKey[\"String\"] = \"string\";\n ParserIssueAdditionalInfoKey[\"Length\"] = \"length\";\n ParserIssueAdditionalInfoKey[\"Charset\"] = \"charset\";\n})(ParserIssueAdditionalInfoKey || (ParserIssueAdditionalInfoKey = {}));\n\nexport { PARSER_PROXY_LOG_METADATA, PARSER_PROXY_TYPE_NAMES, ParsedData, ParsedField, Parser, ParserDataFormat, ParserIssue, ParserIssueAdditionalInfoKey, ParserIssueCode, ParserProxyAdapter, registerParserProxies };\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;AAEK,MAAC,uBAAuB,GAAG,CAAC,aAAa,EAAE;AAChD;AACA,SAAS,qBAAqB,CAAC,QAAQ,EAAE;AACzC,IAAI,eAAe,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;AACnD,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;AACjI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACnI,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,C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AAC,EAAE,4BAA4B,KAAK,4BAA4B,GAAG,EAAE,CAAC,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scandit-react-native-datacapture-parser",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.0-beta.1",
|
|
4
4
|
"description": "Scandit Data Capture SDK for React Native",
|
|
5
5
|
"homepage": "https://github.com/Scandit/scandit-react-native-datacapture-parser",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "rollup -c ../../rollup.config.js --bundleConfigAsCjs",
|
|
11
11
|
"generate-flow": "node ../../generate-flow.js",
|
|
12
|
+
"jest": "jest",
|
|
13
|
+
"coverage": "jest --coverage",
|
|
12
14
|
"test": "pnpm run lint",
|
|
13
15
|
"lint": "eslint ts"
|
|
14
16
|
},
|
|
@@ -26,15 +28,28 @@
|
|
|
26
28
|
"react-native": ">=0.70.0 <1.0.x"
|
|
27
29
|
},
|
|
28
30
|
"devDependencies": {
|
|
31
|
+
"@babel/core": "^7.27.1",
|
|
32
|
+
"@babel/plugin-transform-flow-strip-types": "^7.27.1",
|
|
33
|
+
"@babel/plugin-transform-typescript": "^7.27.1",
|
|
34
|
+
"@babel/preset-env": "^7.27.2",
|
|
35
|
+
"@babel/preset-react": "^7.27.1",
|
|
36
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
37
|
+
"@babel/runtime": "^7.27.1",
|
|
38
|
+
"@jest/globals": "^29.7.0",
|
|
39
|
+
"@react-native/babel-preset": "^0.86.0",
|
|
40
|
+
"@react-native/jest-preset": "^0.86.0",
|
|
29
41
|
"@rollup/plugin-commonjs": "25.0.4",
|
|
30
42
|
"@rollup/plugin-node-resolve": "15.2.1",
|
|
31
43
|
"@rollup/plugin-typescript": "11.1.3",
|
|
44
|
+
"babel-jest": "^29.7.0",
|
|
32
45
|
"flowgen": "^1.21.0",
|
|
46
|
+
"jest": "^29.7.0",
|
|
33
47
|
"rollup": "3.29.2",
|
|
48
|
+
"ts-jest": "^29.3.3",
|
|
34
49
|
"typescript": "4.9.5"
|
|
35
50
|
},
|
|
36
51
|
"dependencies": {
|
|
37
|
-
"scandit-react-native-datacapture-core": "8.
|
|
52
|
+
"scandit-react-native-datacapture-core": "8.7.0-beta.1"
|
|
38
53
|
},
|
|
39
54
|
"packageManager": "pnpm@10.15.0",
|
|
40
55
|
"codegenConfig": {
|
|
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
|
|
|
19
19
|
s.header_dir = "ScanditDataCaptureParser"
|
|
20
20
|
|
|
21
21
|
s.dependency "scandit-react-native-datacapture-core", "= #{version}"
|
|
22
|
-
s.dependency "scandit-datacapture-frameworks-parser", '= 8.
|
|
22
|
+
s.dependency "scandit-datacapture-frameworks-parser", '= 8.7.0-beta.1'
|
|
23
23
|
|
|
24
24
|
is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
25
25
|
|