jtlt 0.3.0 → 0.5.0
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/CHANGES.md +18 -0
- package/README.md +46 -78
- package/demo/codemirror.esm.js +28242 -0
- package/demo/codemirror.js +94 -0
- package/demo/index.css +11 -0
- package/demo/index.html +11 -14
- package/demo/index.js +210 -26
- package/demo/vendor/fontoxpath/dist/fontoxpath.esm.js +600 -0
- package/demo/vendor/jamilih/dist/jml.mjs +2341 -0
- package/demo/vendor/jhtml/src/SAJJ/SAJJ.ObjectArrayDelegator.js +356 -0
- package/demo/vendor/jhtml/src/SAJJ/SAJJ.Stringifier.js +186 -0
- package/demo/vendor/jhtml/src/SAJJ/SAJJ.js +746 -0
- package/demo/vendor/jhtml/src/SAJJ/testing/SAJJ.html +33 -0
- package/demo/vendor/jhtml/src/SAJJ/testing/SAJJ.testing.js +25 -0
- package/demo/vendor/jhtml/src/jhtml-browser.js +5 -0
- package/demo/vendor/jhtml/src/jhtml-node.cts +3 -0
- package/demo/vendor/jhtml/src/jhtml-node.js +8 -0
- package/demo/vendor/jhtml/src/jhtml-node.mts +1 -0
- package/demo/vendor/jhtml/src/jhtml.cts +3 -0
- package/demo/vendor/jhtml/src/jhtml.js +602 -0
- package/demo/vendor/jhtml/src/jhtml.mts +1 -0
- package/demo/vendor/jsonpath-plus/dist/index-browser-esm.js +2158 -0
- package/demo/vendor/prsc/dist/prsc.esm.js +2 -0
- package/demo/vendor/simple-get-json/dist/index-es.js +151 -0
- package/demo/vendor/whynot/dist/whynot.esm.js +2 -0
- package/demo/vendor/xspattern/dist/xspattern.esm.js +2 -0
- package/dist/AbstractJoiningTransformer.d.ts +27 -0
- package/dist/AbstractJoiningTransformer.d.ts.map +1 -1
- package/dist/DOMJoiningTransformer.d.ts +60 -8
- package/dist/DOMJoiningTransformer.d.ts.map +1 -1
- package/dist/JSONJoiningTransformer.d.ts +8 -9
- package/dist/JSONJoiningTransformer.d.ts.map +1 -1
- package/dist/JSONPathTransformer.d.ts.map +1 -1
- package/dist/JSONPathTransformerContext.d.ts +223 -4
- package/dist/JSONPathTransformerContext.d.ts.map +1 -1
- package/dist/StringJoiningTransformer.d.ts +7 -7
- package/dist/StringJoiningTransformer.d.ts.map +1 -1
- package/dist/XPathTransformer.d.ts +2 -2
- package/dist/XPathTransformer.d.ts.map +1 -1
- package/dist/XPathTransformerContext.d.ts +161 -8
- package/dist/XPathTransformerContext.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/docs/API.expanded.md +5 -3
- package/docs/API.md +1 -1
- package/docs/TO-DO.md +62 -36
- package/eslint.config.js +3 -1
- package/package.json +28 -4
- package/rollup.config.js +13 -0
- package/src/AbstractJoiningTransformer.js +42 -0
- package/src/DOMJoiningTransformer.js +115 -23
- package/src/JSONJoiningTransformer.js +50 -26
- package/src/JSONPathTransformer.js +2 -0
- package/src/JSONPathTransformerContext.js +936 -5
- package/src/StringJoiningTransformer.js +25 -21
- package/src/XPathTransformer.js +3 -1
- package/src/XPathTransformerContext.js +884 -15
- package/src/index.js +16 -7
- package/tsconfig.json +5 -2
|
@@ -1,4 +1,60 @@
|
|
|
1
1
|
export default JSONPathTransformerContext;
|
|
2
|
+
/**
|
|
3
|
+
* Decimal format symbols for number formatting.
|
|
4
|
+
*/
|
|
5
|
+
export type DecimalFormatSymbols = {
|
|
6
|
+
/**
|
|
7
|
+
* - Character for decimal point
|
|
8
|
+
*/
|
|
9
|
+
decimalSeparator?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* - Character for thousands
|
|
12
|
+
*/
|
|
13
|
+
groupingSeparator?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* - Character for percent
|
|
16
|
+
*/
|
|
17
|
+
percent?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* - Character for per-mille
|
|
20
|
+
*/
|
|
21
|
+
perMille?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* - Character for zero
|
|
24
|
+
*/
|
|
25
|
+
zeroDigit?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* - Character for digit placeholder
|
|
28
|
+
*/
|
|
29
|
+
digit?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* - Character separating
|
|
32
|
+
* positive/negative patterns
|
|
33
|
+
*/
|
|
34
|
+
patternSeparator?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* - Character for minus sign
|
|
37
|
+
*/
|
|
38
|
+
minusSign?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* - String for infinity
|
|
41
|
+
*/
|
|
42
|
+
infinity?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* - String for NaN
|
|
45
|
+
*/
|
|
46
|
+
NaN?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
export type NumberValue = number | string | {
|
|
49
|
+
value?: number | string;
|
|
50
|
+
count?: string;
|
|
51
|
+
format?: string;
|
|
52
|
+
decimalFormat?: string;
|
|
53
|
+
groupingSeparator?: string;
|
|
54
|
+
groupingSize?: number;
|
|
55
|
+
lang?: string;
|
|
56
|
+
letterValue?: string;
|
|
57
|
+
};
|
|
2
58
|
/**
|
|
3
59
|
* Sort spec types used by applyTemplates() and forEach().
|
|
4
60
|
*/
|
|
@@ -50,6 +106,33 @@ export type JSONPathTransformerContextConfig<T = "json"> = {
|
|
|
50
106
|
specificityPriorityResolver?: ((path: string) => number) | undefined;
|
|
51
107
|
templates: import("./index.js").JSONPathTemplateObject<T>[];
|
|
52
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* Decimal format symbols for number formatting.
|
|
111
|
+
* @typedef {object} DecimalFormatSymbols
|
|
112
|
+
* @property {string} [decimalSeparator='.'] - Character for decimal point
|
|
113
|
+
* @property {string} [groupingSeparator=','] - Character for thousands
|
|
114
|
+
* @property {string} [percent='%'] - Character for percent
|
|
115
|
+
* @property {string} [perMille='‰'] - Character for per-mille
|
|
116
|
+
* @property {string} [zeroDigit='0'] - Character for zero
|
|
117
|
+
* @property {string} [digit='#'] - Character for digit placeholder
|
|
118
|
+
* @property {string} [patternSeparator=';'] - Character separating
|
|
119
|
+
* positive/negative patterns
|
|
120
|
+
* @property {string} [minusSign='-'] - Character for minus sign
|
|
121
|
+
* @property {string} [infinity='Infinity'] - String for infinity
|
|
122
|
+
* @property {string} [NaN='NaN'] - String for NaN
|
|
123
|
+
*/
|
|
124
|
+
/**
|
|
125
|
+
* @typedef {number|string|{
|
|
126
|
+
* value?: number|string,
|
|
127
|
+
* count?: string,
|
|
128
|
+
* format?: string,
|
|
129
|
+
* decimalFormat?: string,
|
|
130
|
+
* groupingSeparator?: string,
|
|
131
|
+
* groupingSize?: number,
|
|
132
|
+
* lang?: string,
|
|
133
|
+
* letterValue?: string
|
|
134
|
+
* }} NumberValue
|
|
135
|
+
*/
|
|
53
136
|
/**
|
|
54
137
|
* Sort spec types used by applyTemplates() and forEach().
|
|
55
138
|
* @typedef {{
|
|
@@ -99,6 +182,13 @@ declare class JSONPathTransformerContext<T = "json"> {
|
|
|
99
182
|
* of template objects
|
|
100
183
|
*/
|
|
101
184
|
constructor(config: JSONPathTransformerContextConfig<T>, templates: import("./index.js").JSONPathTemplateObject<T>[]);
|
|
185
|
+
/**
|
|
186
|
+
* Holds the current iteration state (for position calculations).
|
|
187
|
+
* @type {{ index?: number } | undefined}
|
|
188
|
+
*/
|
|
189
|
+
iterationState: {
|
|
190
|
+
index?: number;
|
|
191
|
+
} | undefined;
|
|
102
192
|
_config: JSONPathTransformerContextConfig<T>;
|
|
103
193
|
_templates: import("./index.js").JSONPathTemplateObject<T>[];
|
|
104
194
|
_contextObj: string | number | boolean | object | null;
|
|
@@ -114,6 +204,8 @@ declare class JSONPathTransformerContext<T = "json"> {
|
|
|
114
204
|
match: string;
|
|
115
205
|
use: string;
|
|
116
206
|
}>;
|
|
207
|
+
/** @type {Record<string, DecimalFormatSymbols>} */
|
|
208
|
+
decimalFormats: Record<string, DecimalFormatSymbols>;
|
|
117
209
|
/** @type {boolean | undefined} */
|
|
118
210
|
_initialized: boolean | undefined;
|
|
119
211
|
/** @type {string | undefined} */
|
|
@@ -201,11 +293,80 @@ declare class JSONPathTransformerContext<T = "json"> {
|
|
|
201
293
|
* @returns {this}
|
|
202
294
|
*/
|
|
203
295
|
forEach(select: string, cb: (this: JSONPathTransformerContext<T>, value: any) => void, sort?: SortSpec): this;
|
|
296
|
+
/**
|
|
297
|
+
* Groups items and executes callback for each group.
|
|
298
|
+
* Equivalent to XSLT's xsl:for-each-group.
|
|
299
|
+
* @param {string} select - JSONPath selector for items to group
|
|
300
|
+
* @param {object} options - Grouping options
|
|
301
|
+
* @param {string} [options.groupBy] - JSONPath expression to group by value
|
|
302
|
+
* @param {string} [options.groupAdjacent] - Groups adjacent items with
|
|
303
|
+
* same value
|
|
304
|
+
* @param {string} [options.groupStartingWith] - Starts new group when
|
|
305
|
+
* expression matches
|
|
306
|
+
* @param {string} [options.groupEndingWith] - Ends group when expression
|
|
307
|
+
* matches
|
|
308
|
+
* @param {any} [options.sort] - Sort specification (same as forEach)
|
|
309
|
+
* @param {(
|
|
310
|
+
* this: JSONPathTransformerContext<T>, key: any, items: any[], ctx: any
|
|
311
|
+
* ) => void} cb - Callback receives (groupingKey, groupItems, context)
|
|
312
|
+
* @returns {this}
|
|
313
|
+
*/
|
|
314
|
+
forEachGroup(select: string, options: {
|
|
315
|
+
groupBy?: string | undefined;
|
|
316
|
+
groupAdjacent?: string | undefined;
|
|
317
|
+
groupStartingWith?: string | undefined;
|
|
318
|
+
groupEndingWith?: string | undefined;
|
|
319
|
+
sort?: any;
|
|
320
|
+
}, cb: (this: JSONPathTransformerContext<T>, key: any, items: any[], ctx: any) => void): this;
|
|
321
|
+
/**
|
|
322
|
+
* Helper to build comparator for sorting.
|
|
323
|
+
* @param {any} sortSpec
|
|
324
|
+
* @param {(expr: string, ctxVal: any) => any} evalFn
|
|
325
|
+
* @returns {((a: {value: any}, b: {value: any}) => number)|null}
|
|
326
|
+
* @private
|
|
327
|
+
*/
|
|
328
|
+
private _buildComparator;
|
|
329
|
+
/**
|
|
330
|
+
* Returns the current group (for use within forEachGroup callback).
|
|
331
|
+
* @returns {any[]|undefined}
|
|
332
|
+
*/
|
|
333
|
+
currentGroup(): any[] | undefined;
|
|
334
|
+
/**
|
|
335
|
+
* Returns the current grouping key (for use within forEachGroup callback).
|
|
336
|
+
* @returns {any}
|
|
337
|
+
*/
|
|
338
|
+
currentGroupingKey(): any;
|
|
204
339
|
/**
|
|
205
340
|
* @param {string|object} [select] - JSONPath selector
|
|
206
341
|
* @returns {this}
|
|
207
342
|
*/
|
|
208
343
|
valueOf(select?: string | object): this;
|
|
344
|
+
/**
|
|
345
|
+
* Analyze a string with a regular expression, equivalent to
|
|
346
|
+
* xsl:analyze-string. Processes matching and non-matching substrings
|
|
347
|
+
* with separate callbacks.
|
|
348
|
+
* @param {string} str - The string to analyze
|
|
349
|
+
* @param {string|RegExp} regex - Regular expression to match against
|
|
350
|
+
* @param {{
|
|
351
|
+
* matchingSubstring?: (
|
|
352
|
+
* this: JSONPathTransformerContext<T>,
|
|
353
|
+
* substring: string,
|
|
354
|
+
* groups: string[],
|
|
355
|
+
* regexGroup: (n: number) => string
|
|
356
|
+
* ) => void,
|
|
357
|
+
* nonMatchingSubstring?: (
|
|
358
|
+
* this: JSONPathTransformerContext<T>,
|
|
359
|
+
* substring: string
|
|
360
|
+
* ) => void,
|
|
361
|
+
* flags?: string
|
|
362
|
+
* }} options - Options object
|
|
363
|
+
* @returns {this}
|
|
364
|
+
*/
|
|
365
|
+
analyzeString(str: string, regex: string | RegExp, options?: {
|
|
366
|
+
matchingSubstring?: (this: JSONPathTransformerContext<T>, substring: string, groups: string[], regexGroup: (n: number) => string) => void;
|
|
367
|
+
nonMatchingSubstring?: (this: JSONPathTransformerContext<T>, substring: string) => void;
|
|
368
|
+
flags?: string;
|
|
369
|
+
}): this;
|
|
209
370
|
/**
|
|
210
371
|
* Deep copy selection or current context when omitted.
|
|
211
372
|
* @param {string} [select] - JSONPath selector
|
|
@@ -238,12 +399,44 @@ declare class JSONPathTransformerContext<T = "json"> {
|
|
|
238
399
|
*/
|
|
239
400
|
string(str: string, cb?: import("./JSONJoiningTransformer.js").SimpleCallback<T>): this;
|
|
240
401
|
/**
|
|
241
|
-
* Append a number to JSON output
|
|
242
|
-
*
|
|
243
|
-
*
|
|
402
|
+
* Append a number to JSON output with xsl:number-like formatting.
|
|
403
|
+
* @param {NumberValue} num - Number value, "position()" string, or
|
|
404
|
+
* options object
|
|
244
405
|
* @returns {this}
|
|
245
406
|
*/
|
|
246
|
-
number(num:
|
|
407
|
+
number(num: NumberValue): this;
|
|
408
|
+
/**
|
|
409
|
+
* Calculate position in current iteration context.
|
|
410
|
+
* @param {string} [count] - JSONPath expression to match
|
|
411
|
+
* @returns {number}
|
|
412
|
+
*/
|
|
413
|
+
calculatePosition(count?: string): number;
|
|
414
|
+
/**
|
|
415
|
+
* Format a number according to format string.
|
|
416
|
+
* @param {number} num - Number to format
|
|
417
|
+
* @param {string} format - Format string (1, a, A, i, I, 01, etc.)
|
|
418
|
+
* @param {string} [groupingSeparator] - Separator for grouping
|
|
419
|
+
* @param {number} [groupingSize] - Size of groups
|
|
420
|
+
* @param {string} [decimalFormatName] - Name of decimal format to use
|
|
421
|
+
* @param {string} [locale] - Locale for formatting
|
|
422
|
+
* @returns {string}
|
|
423
|
+
*/
|
|
424
|
+
_formatNumber(num: number, format: string, groupingSeparator?: string, groupingSize?: number, decimalFormatName?: string, locale?: string): string;
|
|
425
|
+
/**
|
|
426
|
+
* Convert number to Roman numerals.
|
|
427
|
+
* @param {number} num - Number to convert (1-3999)
|
|
428
|
+
* @returns {string}
|
|
429
|
+
* @private
|
|
430
|
+
*/
|
|
431
|
+
private _toRoman;
|
|
432
|
+
/**
|
|
433
|
+
* Convert number to alphabetic sequence.
|
|
434
|
+
* @param {number} num - Number to convert
|
|
435
|
+
* @param {boolean} uppercase - Use uppercase letters
|
|
436
|
+
* @returns {string}
|
|
437
|
+
* @private
|
|
438
|
+
*/
|
|
439
|
+
private _toAlphabetic;
|
|
247
440
|
/**
|
|
248
441
|
* Append plain text directly to the output without escaping or JSON
|
|
249
442
|
* stringification. Mirrors the joining transformer API so templates can
|
|
@@ -281,6 +474,13 @@ declare class JSONPathTransformerContext<T = "json"> {
|
|
|
281
474
|
* @returns {this}
|
|
282
475
|
*/
|
|
283
476
|
output(cfg: import("./StringJoiningTransformer.js").OutputConfig): this;
|
|
477
|
+
/**
|
|
478
|
+
* @param {string} name
|
|
479
|
+
* @param {import('./AbstractJoiningTransformer.js').
|
|
480
|
+
* OutputCharacters} outputCharacters
|
|
481
|
+
* @returns {this}
|
|
482
|
+
*/
|
|
483
|
+
characterMap(name: string, outputCharacters: import("./AbstractJoiningTransformer.js").OutputCharacters): this;
|
|
284
484
|
/**
|
|
285
485
|
* Create an element. Mirrors the joining transformer API so templates can
|
|
286
486
|
* call `this.element()`.
|
|
@@ -292,6 +492,25 @@ declare class JSONPathTransformerContext<T = "json"> {
|
|
|
292
492
|
* @returns {this}
|
|
293
493
|
*/
|
|
294
494
|
element(name: string, atts?: Record<string, string>, children?: any[], cb?: import("./JSONJoiningTransformer.js").SimpleCallback<T>): this;
|
|
495
|
+
/**
|
|
496
|
+
* Adds a prefixed namespace declaration to the most recently opened
|
|
497
|
+
* element. Mirrors the joining
|
|
498
|
+
* transformer API so templates can call `this.attribute()`.
|
|
499
|
+
* @param {string} prefix - Prefix
|
|
500
|
+
* @param {string} namespaceURI - Namespace
|
|
501
|
+
* @returns {this}
|
|
502
|
+
*/
|
|
503
|
+
namespace(prefix: string, namespaceURI: string): this;
|
|
504
|
+
/**
|
|
505
|
+
* Define a decimal format with custom symbols for number formatting.
|
|
506
|
+
* Equivalent to xsl:decimal-format. If no name is provided, defines
|
|
507
|
+
* the default format.
|
|
508
|
+
* @param {string|DecimalFormatSymbols} nameOrSymbols - Format name or
|
|
509
|
+
* symbols object if defining default
|
|
510
|
+
* @param {DecimalFormatSymbols} [symbols] - Format symbols
|
|
511
|
+
* @returns {this}
|
|
512
|
+
*/
|
|
513
|
+
decimalFormat(nameOrSymbols: string | DecimalFormatSymbols, symbols?: DecimalFormatSymbols): this;
|
|
295
514
|
/**
|
|
296
515
|
* Add an attribute to the most recently opened element. Mirrors the joining
|
|
297
516
|
* transformer API so templates can call `this.attribute()`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSONPathTransformerContext.d.ts","sourceRoot":"","sources":["../src/JSONPathTransformerContext.js"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"JSONPathTransformerContext.d.ts","sourceRoot":"","sources":["../src/JSONPathTransformerContext.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAoBa,MAAM,GAAC,MAAM,GAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAC,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;;;;yBAKS;IACR,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,GAAC,QAAQ,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;;;;6BACS,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAC/B,GAAG,EAAE,0BAA0B,KAC5B,MAAM;;;;uBACD,MAAM,GAAG,UAAU,GAAG,cAAc,GAC5C,KAAK,CAAC,MAAM,GAAC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W,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QACvB,MAAM,GACJ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAInC;IAED;;;;OAIG;IACH,aAJW,MAAM,SACN,GAAG,GACD,GAAG,CAYf;IAED;;;;;OAKG;IACH,UALW,MAAM,SACN,MAAM,OACN,MAAM,GACJ,IAAI,CAKhB;IAED;;;;;;;;;;;;;;;OAeG;IACH,WALW,MAAM,MACN,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC,CAAC,KACvC,IAAI,GACC,IAAI,CAQhB;IAED;;;;;;OAMG;IACH,kBAHW,MAAM,GACJ,OAAO,CAyBnB;IAED;;;;;;;;;OASG;IACH,eAPW,MAAM,UACN,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC,CAAC,KACvC,IAAI,gBACD,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC,CAAC,KACvC,IAAI,GACC,IAAI,CAYhB;CACF"}
|
|
@@ -10,6 +10,7 @@ export type OutputConfig = {
|
|
|
10
10
|
version?: string;
|
|
11
11
|
standalone?: boolean;
|
|
12
12
|
method?: "xml" | "html" | "text" | "json" | "xhtml";
|
|
13
|
+
useCharacterMaps?: string[];
|
|
13
14
|
};
|
|
14
15
|
export type SimpleCallback = (this: StringJoiningTransformer) => void;
|
|
15
16
|
/**
|
|
@@ -165,13 +166,6 @@ declare class StringJoiningTransformer extends AbstractJoiningTransformer<"strin
|
|
|
165
166
|
* @returns {StringJoiningTransformer}
|
|
166
167
|
*/
|
|
167
168
|
function(func: ((...args: any[]) => any) | Element): StringJoiningTransformer;
|
|
168
|
-
/**
|
|
169
|
-
* @param {OutputConfig} cfg
|
|
170
|
-
* @returns {StringJoiningTransformer}
|
|
171
|
-
*/
|
|
172
|
-
output(cfg: OutputConfig): StringJoiningTransformer;
|
|
173
|
-
_outputConfig: any;
|
|
174
|
-
mediaType: string | undefined;
|
|
175
169
|
/**
|
|
176
170
|
* @param {string|Element} elName - Element name or element object
|
|
177
171
|
* @param {ElementAttributes} [atts] - Element attributes
|
|
@@ -182,6 +176,12 @@ declare class StringJoiningTransformer extends AbstractJoiningTransformer<"strin
|
|
|
182
176
|
element(elName: string | Element, atts?: ElementAttributes, childNodes?: any[], cb?: (this: StringJoiningTransformer) => void): StringJoiningTransformer;
|
|
183
177
|
_openTagState: any;
|
|
184
178
|
root: any;
|
|
179
|
+
/**
|
|
180
|
+
* @param {string} prefix
|
|
181
|
+
* @param {string} namespaceURI
|
|
182
|
+
* @returns {StringJoiningTransformer}
|
|
183
|
+
*/
|
|
184
|
+
namespace(prefix: string, namespaceURI: string): StringJoiningTransformer;
|
|
185
185
|
/**
|
|
186
186
|
* @param {string} name - Attribute name
|
|
187
187
|
* @param {string|Record<string, unknown>|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringJoiningTransformer.d.ts","sourceRoot":"","sources":["../src/StringJoiningTransformer.js"],"names":[],"mappings":";2BAKa;IACR,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,GAAC,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"StringJoiningTransformer.d.ts","sourceRoot":"","sources":["../src/StringJoiningTransformer.js"],"names":[],"mappings":";2BAKa;IACR,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B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
|
*/
|
|
10
10
|
templates: import("./index.js").XPathTemplateArray<T>;
|
|
11
11
|
/**
|
|
12
|
-
* XPath version (1|2)
|
|
12
|
+
* XPath version (1|2|3.1)
|
|
13
13
|
*/
|
|
14
14
|
xpathVersion?: number | undefined;
|
|
15
15
|
};
|
|
@@ -19,7 +19,7 @@ export type XPathTransformerConfig<T> = {
|
|
|
19
19
|
* @property {boolean} [errorOnEqualPriority] Throw on equal priority
|
|
20
20
|
* @property {import('./index.js').
|
|
21
21
|
* XPathTemplateArray<T>} templates Template objects
|
|
22
|
-
* @property {number} [xpathVersion] XPath version (1|2)
|
|
22
|
+
* @property {number} [xpathVersion] XPath version (1|2|3.1)
|
|
23
23
|
*/
|
|
24
24
|
/**
|
|
25
25
|
* Applies named XPath-driven templates to XML/HTML DOM data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XPathTransformer.d.ts","sourceRoot":"","sources":["../src/XPathTransformer.js"],"names":[],"mappings":";mCAGa,CAAC;;;;;;;;eAGA,OAAO,YAAY,EAC5B,kBAAkB,CAAC,CAAC,CAAC;;;;;;AAL1B;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,+BAFa,CAAC;
|
|
1
|
+
{"version":3,"file":"XPathTransformer.d.ts","sourceRoot":"","sources":["../src/XPathTransformer.js"],"names":[],"mappings":";mCAGa,CAAC;;;;;;;;eAGA,OAAO,YAAY,EAC5B,kBAAkB,CAAC,CAAC,CAAC;;;;;;AAL1B;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,+BAFa,CAAC;IA+EZ;;YAEI;;;;eAIG;2BAHQ,GAAG,OACH;gBAAC,IAAI,EAAC,MAAM,CAAA;aAAC,GACX,IAAI;;MAMnB;IAvFF;;;;OAIG;IACH,oBAJW,sBAAsB,CAAC,CAAC,CAAC,GACnC,OAAW,8BAA8B,EACrC,6BAA6B,EAiCjC;IA7BC,0GAAqB;IACrB,oBAAoB;IACpB,eADW,GAAG,EAAE,CACO;IAEvB,4DAA4D;IAC5D,WADW,OAAO,YAAY,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAMtD;IAqBJ;;OAEG;IACH,8BAFa,IAAI,CAShB;IAED;;;OAGG;IACH,iBAHW,MAAM,GACJ,OAAO,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAsB9C;CAcF"}
|
|
@@ -5,7 +5,7 @@ export type XPathTransformerContextConfig = {
|
|
|
5
5
|
*/
|
|
6
6
|
data?: unknown;
|
|
7
7
|
/**
|
|
8
|
-
* - 1
|
|
8
|
+
* - 1, 2, 3.1 (default 1)
|
|
9
9
|
*/
|
|
10
10
|
xpathVersion?: number | undefined;
|
|
11
11
|
/**
|
|
@@ -18,7 +18,7 @@ export type XPathTransformerContextConfig = {
|
|
|
18
18
|
/**
|
|
19
19
|
* @typedef {object} XPathTransformerContextConfig
|
|
20
20
|
* @property {unknown} [data] - XML/DOM root to transform
|
|
21
|
-
* @property {number} [xpathVersion] - 1
|
|
21
|
+
* @property {number} [xpathVersion] - 1, 2, 3.1 (default 1)
|
|
22
22
|
* @property {import('./index.js').
|
|
23
23
|
* JoiningTransformer} joiningTransformer Joiner
|
|
24
24
|
* @property {boolean} [errorOnEqualPriority]
|
|
@@ -28,13 +28,13 @@ export type XPathTransformerContextConfig = {
|
|
|
28
28
|
* Execution context for XPath-driven template application.
|
|
29
29
|
*
|
|
30
30
|
* Similar to JSONPathTransformerContext but uses XPath expressions on a
|
|
31
|
-
* DOM/XML-like tree. Supports XPath 1.0 (default)
|
|
32
|
-
* `xpathVersion: 2`.
|
|
31
|
+
* DOM/XML-like tree. Supports XPath 1.0 (default), 2.0 when
|
|
32
|
+
* `xpathVersion: 2`, or 3.1 when `xpathVersion: 3.1`.
|
|
33
33
|
*
|
|
34
34
|
* Expected config:
|
|
35
35
|
* - data: A Document, Element, or XML-like root node.
|
|
36
36
|
* - joiningTransformer: joiner with append(), string(), object(), array(), etc.
|
|
37
|
-
* - xpathVersion: 1|2 (default 1)
|
|
37
|
+
* - xpathVersion: 1|2|3.1 (default 1)
|
|
38
38
|
* - errorOnEqualPriority, specificityPriorityResolver (same semantics).
|
|
39
39
|
*/
|
|
40
40
|
declare class XPathTransformerContext {
|
|
@@ -98,6 +98,11 @@ declare class XPathTransformerContext {
|
|
|
98
98
|
match: string;
|
|
99
99
|
use: string;
|
|
100
100
|
}>;
|
|
101
|
+
/**
|
|
102
|
+
* @type {Record<string,
|
|
103
|
+
* import('./JSONPathTransformerContext.js').DecimalFormatSymbols>}
|
|
104
|
+
*/
|
|
105
|
+
decimalFormats: Record<string, import("./JSONPathTransformerContext.js").DecimalFormatSymbols>;
|
|
101
106
|
/** @type {boolean|undefined} */
|
|
102
107
|
_initialized: boolean | undefined;
|
|
103
108
|
/** @type {string|undefined} */
|
|
@@ -162,6 +167,39 @@ declare class XPathTransformerContext {
|
|
|
162
167
|
* @returns {XPathTransformerContext}
|
|
163
168
|
*/
|
|
164
169
|
forEach(select: string, cb: (this: XPathTransformerContext, node: Node) => void): XPathTransformerContext;
|
|
170
|
+
/**
|
|
171
|
+
* Groups items and executes callback for each group.
|
|
172
|
+
* Equivalent to XSLT's xsl:for-each-group.
|
|
173
|
+
* @param {string} select - XPath selector for items to group
|
|
174
|
+
* @param {object} options - Grouping options
|
|
175
|
+
* @param {string} [options.groupBy] - XPath expression to group by value
|
|
176
|
+
* @param {string} [options.groupAdjacent] - Groups adjacent items with
|
|
177
|
+
* same value
|
|
178
|
+
* @param {string} [options.groupStartingWith] - Starts new group when
|
|
179
|
+
* expression matches
|
|
180
|
+
* @param {string} [options.groupEndingWith] - Ends group when expression
|
|
181
|
+
* matches
|
|
182
|
+
* @param {(
|
|
183
|
+
* this: XPathTransformerContext, key: any, items: Node[], ctx: any
|
|
184
|
+
* ) => void} cb - Callback receives (groupingKey, groupItems, context)
|
|
185
|
+
* @returns {this}
|
|
186
|
+
*/
|
|
187
|
+
forEachGroup(select: string, options: {
|
|
188
|
+
groupBy?: string | undefined;
|
|
189
|
+
groupAdjacent?: string | undefined;
|
|
190
|
+
groupStartingWith?: string | undefined;
|
|
191
|
+
groupEndingWith?: string | undefined;
|
|
192
|
+
}, cb: (this: XPathTransformerContext, key: any, items: Node[], ctx: any) => void): this;
|
|
193
|
+
/**
|
|
194
|
+
* Returns the current group (for use within forEachGroup callback).
|
|
195
|
+
* @returns {Node[]|undefined}
|
|
196
|
+
*/
|
|
197
|
+
currentGroup(): Node[] | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* Returns the current grouping key (for use within forEachGroup callback).
|
|
200
|
+
* @returns {any}
|
|
201
|
+
*/
|
|
202
|
+
currentGroupingKey(): any;
|
|
165
203
|
/**
|
|
166
204
|
* Append the value from an XPath expression or the context node text.
|
|
167
205
|
* @param {string|object} [select]
|
|
@@ -203,11 +241,72 @@ declare class XPathTransformerContext {
|
|
|
203
241
|
*/
|
|
204
242
|
string(str: string, cb?: (this: XPathTransformerContext) => void): XPathTransformerContext;
|
|
205
243
|
/**
|
|
206
|
-
* Append number.
|
|
207
|
-
* @param {number
|
|
244
|
+
* Append number with xsl:number-like formatting.
|
|
245
|
+
* @param {number|string|{
|
|
246
|
+
* value?: number|string,
|
|
247
|
+
* count?: string,
|
|
248
|
+
* level?: 'single'|'multiple'|'any',
|
|
249
|
+
* from?: string,
|
|
250
|
+
* format?: string,
|
|
251
|
+
* decimalFormat?: string,
|
|
252
|
+
* groupingSeparator?: string,
|
|
253
|
+
* groupingSize?: number
|
|
254
|
+
* }} num - Number value, "position()" string, or options object
|
|
208
255
|
* @returns {XPathTransformerContext}
|
|
209
256
|
*/
|
|
210
|
-
number(num: number
|
|
257
|
+
number(num: number | string | {
|
|
258
|
+
value?: number | string;
|
|
259
|
+
count?: string;
|
|
260
|
+
level?: "single" | "multiple" | "any";
|
|
261
|
+
from?: string;
|
|
262
|
+
format?: string;
|
|
263
|
+
decimalFormat?: string;
|
|
264
|
+
groupingSeparator?: string;
|
|
265
|
+
groupingSize?: number;
|
|
266
|
+
}): XPathTransformerContext;
|
|
267
|
+
/**
|
|
268
|
+
* Calculate position of current node.
|
|
269
|
+
* @param {string} [count] - XPath pattern to match
|
|
270
|
+
* @param {string} [from] - XPath pattern for ancestor
|
|
271
|
+
* @returns {number}
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
private _calculatePosition;
|
|
275
|
+
/**
|
|
276
|
+
* Calculate position counting all ancestors (level=any).
|
|
277
|
+
* @param {string} [count] - XPath pattern to match
|
|
278
|
+
* @param {string} [from] - XPath pattern for ancestor
|
|
279
|
+
* @returns {number}
|
|
280
|
+
* @private
|
|
281
|
+
*/
|
|
282
|
+
private _calculatePositionAny;
|
|
283
|
+
/**
|
|
284
|
+
* Format a number according to format string.
|
|
285
|
+
* @param {number} num - Number to format
|
|
286
|
+
* @param {string} format - Format string (1, a, A, i, I, 01, etc.)
|
|
287
|
+
* @param {string} [groupingSeparator] - Separator for grouping (e.g., ',')
|
|
288
|
+
* @param {number} [groupingSize] - Size of groups (e.g., 3 for 1,000)
|
|
289
|
+
* @param {string} [decimalFormatName] - Named decimal format to use
|
|
290
|
+
* @param {string} [locale]
|
|
291
|
+
* @returns {string}
|
|
292
|
+
* @private
|
|
293
|
+
*/
|
|
294
|
+
private _formatNumber;
|
|
295
|
+
/**
|
|
296
|
+
* Convert number to Roman numerals.
|
|
297
|
+
* @param {number} num - Number to convert (1-3999)
|
|
298
|
+
* @returns {string}
|
|
299
|
+
* @private
|
|
300
|
+
*/
|
|
301
|
+
private _toRoman;
|
|
302
|
+
/**
|
|
303
|
+
* Convert number to alphabetic sequence.
|
|
304
|
+
* @param {number} num - Number to convert
|
|
305
|
+
* @param {boolean} uppercase - Use uppercase letters
|
|
306
|
+
* @returns {string}
|
|
307
|
+
* @private
|
|
308
|
+
*/
|
|
309
|
+
private _toAlphabetic;
|
|
211
310
|
/**
|
|
212
311
|
* Append plain text (no escaping changes).
|
|
213
312
|
* @param {string} str Text
|
|
@@ -249,6 +348,13 @@ declare class XPathTransformerContext {
|
|
|
249
348
|
* @returns {XPathTransformerContext}
|
|
250
349
|
*/
|
|
251
350
|
output(cfg: import("./StringJoiningTransformer.js").OutputConfig): XPathTransformerContext;
|
|
351
|
+
/**
|
|
352
|
+
* @param {string} name
|
|
353
|
+
* @param {import('./AbstractJoiningTransformer.js').
|
|
354
|
+
* OutputCharacters} outputCharacters
|
|
355
|
+
* @returns {this}
|
|
356
|
+
*/
|
|
357
|
+
characterMap(name: string, outputCharacters: import("./AbstractJoiningTransformer.js").OutputCharacters): this;
|
|
252
358
|
/**
|
|
253
359
|
* Append element.
|
|
254
360
|
* @param {string} name Tag name
|
|
@@ -260,6 +366,27 @@ declare class XPathTransformerContext {
|
|
|
260
366
|
* @returns {XPathTransformerContext}
|
|
261
367
|
*/
|
|
262
368
|
element(name: string, atts?: Record<string, string> | any[] | ((this: XPathTransformerContext) => void), children?: any[] | ((this: XPathTransformerContext) => void), cb?: (this: XPathTransformerContext) => void): XPathTransformerContext;
|
|
369
|
+
/**
|
|
370
|
+
* Adds a prefixed namespace declaration to the most recently opened
|
|
371
|
+
* element. Mirrors the joining
|
|
372
|
+
* transformer API so templates can call `this.attribute()`.
|
|
373
|
+
* @param {string} prefix - Prefix
|
|
374
|
+
* @param {string} namespaceURI - Namespace
|
|
375
|
+
* @returns {this}
|
|
376
|
+
*/
|
|
377
|
+
namespace(prefix: string, namespaceURI: string): this;
|
|
378
|
+
/**
|
|
379
|
+
* Define a decimal format with custom symbols for number formatting.
|
|
380
|
+
* Equivalent to xsl:decimal-format. If no name is provided, defines
|
|
381
|
+
* the default format.
|
|
382
|
+
* @param {string|import('./JSONPathTransformerContext.js').
|
|
383
|
+
* DecimalFormatSymbols} nameOrSymbols - Format name or symbols object
|
|
384
|
+
* if defining default
|
|
385
|
+
* @param {import('./JSONPathTransformerContext.js').
|
|
386
|
+
* DecimalFormatSymbols} [symbols] - Format symbols
|
|
387
|
+
* @returns {this}
|
|
388
|
+
*/
|
|
389
|
+
decimalFormat(nameOrSymbols: string | import("./JSONPathTransformerContext.js").DecimalFormatSymbols, symbols?: import("./JSONPathTransformerContext.js").DecimalFormatSymbols): this;
|
|
263
390
|
/**
|
|
264
391
|
* Append attribute.
|
|
265
392
|
* @param {string} name Attribute name
|
|
@@ -348,5 +475,31 @@ declare class XPathTransformerContext {
|
|
|
348
475
|
* @returns {XPathTransformerContext}
|
|
349
476
|
*/
|
|
350
477
|
choose(select: string, whenCb: (this: XPathTransformerContext) => void, otherwiseCb?: (this: XPathTransformerContext) => void): XPathTransformerContext;
|
|
478
|
+
/**
|
|
479
|
+
* Analyze a string with a regular expression, equivalent to
|
|
480
|
+
* xsl:analyze-string. Processes matching and non-matching substrings
|
|
481
|
+
* with separate callbacks.
|
|
482
|
+
* @param {string} str - The string to analyze
|
|
483
|
+
* @param {string|RegExp} regex - Regular expression to match against
|
|
484
|
+
* @param {{
|
|
485
|
+
* matchingSubstring?: (
|
|
486
|
+
* this: XPathTransformerContext,
|
|
487
|
+
* substring: string,
|
|
488
|
+
* groups: string[],
|
|
489
|
+
* regexGroup: (n: number) => string
|
|
490
|
+
* ) => void,
|
|
491
|
+
* nonMatchingSubstring?: (
|
|
492
|
+
* this: XPathTransformerContext,
|
|
493
|
+
* substring: string
|
|
494
|
+
* ) => void,
|
|
495
|
+
* flags?: string
|
|
496
|
+
* }} options - Options object
|
|
497
|
+
* @returns {XPathTransformerContext}
|
|
498
|
+
*/
|
|
499
|
+
analyzeString(str: string, regex: string | RegExp, options?: {
|
|
500
|
+
matchingSubstring?: (this: XPathTransformerContext, substring: string, groups: string[], regexGroup: (n: number) => string) => void;
|
|
501
|
+
nonMatchingSubstring?: (this: XPathTransformerContext, substring: string) => void;
|
|
502
|
+
flags?: string;
|
|
503
|
+
}): XPathTransformerContext;
|
|
351
504
|
}
|
|
352
505
|
//# sourceMappingURL=XPathTransformerContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XPathTransformerContext.d.ts","sourceRoot":"","sources":["../src/XPathTransformerContext.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"XPathTransformerContext.d.ts","sourceRoot":"","sources":["../src/XPathTransformerContext.js"],"names":[],"mappings":";;;;;WAOc,OAAO;;;;;;;;wBAEP,OAAO,YAAY,EAC5B,kBAAkB;;0CAEF,MAAM,KAAK,MAAM;;AAPtC;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AACH;IAqoDE;;YAEI;;;;;eAKG;0DAHQ,OAAO,OACP;gBAAC,IAAI,EAAC,MAAM,CAAA;aAAC,GACX,IAAI;;;YAOjB;;;;;eAKG;0DAHQ,OAAO,OACP;gBAAC,IAAI,CAAC,EAAC,MAAM,CAAA;aAAC,GACZ,IAAI;;;YAOjB;;;eAGG;2BAFQ;gBAAC,SAAS,EAAC,MAAM,CAAA;aAAC,GAChB,MAAM;;;YAOnB;;;eAGG;qDADU,uBAAuB;;MAMtC;IA7qDF;;;;OAIG;IACH,oBAJW,6BAA6B,aAC7B,OAAO,YAAY,EACzB,mBAAmB,CAAC,GAAG,CAAC,EAAE,EA6B9B;IA1BC,uCAAqB;IACrB,4DAA2B;IAI3B,oCAAoC;IACpC,cADW,QAAQ,GAAC,OAAO,GAAC,IAAI,CAG/B;IAFmB,WADT,QAAQ,GAAC,OAAO,GAAC,IAAI,CAG/B;IACD,sCAAsC;IACtC,MADW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACpB;IACd,sDAAsD;IACtD,cADW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAC5B;IACtB,2DAA2D;IAC3D,MADW,MAAM,CAAC,MAAM,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CAAC,CACzC;IACd;;;OAGG;IACH,gBAHU,MAAM,CAAC,MAAM,EACtB,OAAW,iCAAiC,EAAE,oBAAoB,CAAC,CAE5C;IACxB,gCAAgC;IAChC,cADW,OAAO,GAAC,SA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J,uBAAuB,CAQnC;IAED;;;;;;OAMG;IACH,kBALW,MAAM,OACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QACvB,MAAM,EAAE,GACN,uBAAuB,CAcnC;IACD;;;;;OAKG;IACH,sBAJW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QACvB,MAAM,GACJ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAInC;IACD;;;;;OAKG;IACH,aAJW,MAAM,SACN,GAAG,GACD,GAAG,CAiBf;IACD;;;;;;OAMG;IACH,UALW,MAAM,SACN,MAAM,OACN,MAAM,GACJ,uBAAuB,CAKnC;IAED;;;;;;;;;;;;OAYG;IACH,WALW,MAAM,MACN,CAAC,IAAI,EAAE,uBAAuB,KACjC,IAAI,GACC,uBAAuB,CAQnC;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,OAAO,CA8CnB;IAED;;;;;;;;;OASG;IACH,eAPW,MAAM,UACN,CAAC,IAAI,EAAE,uBAAuB,KACjC,IAAI,gBACD,CAAC,IAAI,EAAE,uBAAuB,KACjC,IAAI,GACC,uBAAuB,CAYnC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,mBAjBW,MAAM,SACN,MAAM,GAAC,MAAM,YACb;QACN,iBAAiB,CAAC,EAAE,CAClB,IAAI,EAAE,uBAAuB,EAC7B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EAAE,EAChB,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,KAC9B,IAAI,CAAC;QACV,oBAAoB,CAAC,EAAE,CACrB,IAAI,EAAE,uBAAuB,EAC7B,SAAS,EAAE,MAAM,KACd,IAAI,CAAC;QACV,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,GACS,uBAAuB,CAoHnC;CA+CF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -200,8 +200,8 @@ export type XPathJTLTOptions<T> = BaseJTLTOptions<T> & {
|
|
|
200
200
|
query?: TemplateFunction<T, "dom", import("./XPathTransformerContext.js").default>;
|
|
201
201
|
forQuery?: [string, TemplateFunction<T, "dom", import("./JSONPathTransformerContext.js").default>];
|
|
202
202
|
engineType: "xpath";
|
|
203
|
-
xpathVersion?: 1 | 2;
|
|
204
|
-
outputType?:
|
|
203
|
+
xpathVersion?: 1 | 2 | 3.1;
|
|
204
|
+
outputType?: T;
|
|
205
205
|
};
|
|
206
206
|
export type JTLTOptions = JSONPathJTLTOptions | JSONPathJTLTOptions<"string"> | JSONPathJTLTOptions<"dom"> | XPathJTLTOptions<"json"> | XPathJTLTOptions<"string"> | XPathJTLTOptions<"dom">;
|
|
207
207
|
/**
|
|
@@ -354,8 +354,8 @@ export type JTLTOptions = JSONPathJTLTOptions | JSONPathJTLTOptions<"string"> |
|
|
|
354
354
|
* import('./JSONPathTransformerContext.js').default
|
|
355
355
|
* >],
|
|
356
356
|
* engineType: 'xpath',
|
|
357
|
-
* xpathVersion?: 1|2,
|
|
358
|
-
* outputType?:
|
|
357
|
+
* xpathVersion?: 1|2|3.1,
|
|
358
|
+
* outputType?: T
|
|
359
359
|
* }} XPathJTLTOptions
|
|
360
360
|
*/
|
|
361
361
|
/**
|