@applitools/nlp-web-runner 5.12.0 → 5.14.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
var __defProp=Object['defineProperty'],__exportAll=(
|
|
1
|
+
var __defProp=Object['defineProperty'],__exportAll=(u,i)=>{let r={};for(var l in u)__defProp(r,l,{'get':u[l],'enumerable':!![]});if(!i)__defProp(r,Symbol['toStringTag'],{'value':'Module'});return r;};export{__exportAll as t};
|
|
@@ -255,6 +255,13 @@ type Reference<TType> = {
|
|
|
255
255
|
})[];
|
|
256
256
|
type?: PrimitiveName<TType>;
|
|
257
257
|
scope?: 'public' | 'internal';
|
|
258
|
+
/**
|
|
259
|
+
* The reference resolves through a binding the instruction itself provides for a nested scope -
|
|
260
|
+
* currently the per-entry bindings of an iteration condition (`{product}`, `{it}`, `{index}`,
|
|
261
|
+
* `{key}`). Such a reference is neither a variable the instruction sets nor a value the caller
|
|
262
|
+
* has to supply, so it never surfaces in `meta.parameters`.
|
|
263
|
+
*/
|
|
264
|
+
binding?: boolean;
|
|
258
265
|
};
|
|
259
266
|
type JSExpressionReference<TType> = {
|
|
260
267
|
isJSExpressionRef: true;
|
|
@@ -292,7 +299,7 @@ type Pattern = {
|
|
|
292
299
|
name: PatternName;
|
|
293
300
|
});
|
|
294
301
|
type PatternName = 'number' | 'price' | 'percentage' | 'date' | 'time' | 'code';
|
|
295
|
-
type ExtractType = PrimitiveName<Any> | 'color' | 'background-color' | 'foreground-color';
|
|
302
|
+
type ExtractType = PrimitiveName<Any> | 'color' | 'background-color' | 'foreground-color' | 'amount' | 'price' | 'percentage';
|
|
296
303
|
type ExtractOperation = {
|
|
297
304
|
operator: 'extract';
|
|
298
305
|
operands: [Operand, ExtractType];
|
|
@@ -323,9 +330,9 @@ type Condition = {
|
|
|
323
330
|
operation: ConditionOperation;
|
|
324
331
|
};
|
|
325
332
|
type Operation = ConditionOperation | ExpressionOperation;
|
|
326
|
-
type ExpressionOperation = SizeOperation | KeysOperation | ValuesOperation | EntriesOperation | NumberOperation | ExtractOperation;
|
|
333
|
+
type ExpressionOperation = SizeOperation | KeysOperation | ValuesOperation | EntriesOperation | NumberOperation | ExtractOperation | MapOperation | EveryOperation | SomeOperation;
|
|
327
334
|
type NumberOperation = AddOperation | SubOperation | MulOperation | DivOperation;
|
|
328
|
-
type ConditionOperation = ParensOperation | IgnoreCaseOperation | MatchCaseOperation | NotOperation | OrOperation | AndOperation | ComparisonOperation | ValidateOperation | MatchOperation | IncludesOnlyOperation | IncludesOperation | StartsWithOperation | EndsWithOperation | VisibleOperation | ClickableOperation | EnabledOperation | HoveredOperation | CheckedOperation | PopulatedOperation;
|
|
335
|
+
type ConditionOperation = ParensOperation | IgnoreCaseOperation | MatchCaseOperation | NotOperation | OrOperation | AndOperation | ComparisonOperation | ValidateOperation | MatchOperation | IncludesOnlyOperation | IncludesOperation | StartsWithOperation | EndsWithOperation | VisibleOperation | ClickableOperation | EnabledOperation | HoveredOperation | CheckedOperation | PopulatedOperation | EveryOperation | SomeOperation;
|
|
329
336
|
type Operand = {
|
|
330
337
|
isOperand: true;
|
|
331
338
|
value: AnyExpression | ElementDescriptor | DialogDescriptor | ExpressionOperation;
|
|
@@ -362,6 +369,20 @@ type EntriesOperation = {
|
|
|
362
369
|
operator: 'entries';
|
|
363
370
|
operands: [Operand];
|
|
364
371
|
};
|
|
372
|
+
type MapOperation = {
|
|
373
|
+
operator: 'map';
|
|
374
|
+
operands: [Operand, AnyExpression | Operation];
|
|
375
|
+
bindings?: string[];
|
|
376
|
+
};
|
|
377
|
+
type EveryOperation = {
|
|
378
|
+
operator: 'every';
|
|
379
|
+
operands: [Operand];
|
|
380
|
+
};
|
|
381
|
+
type SomeOperation = {
|
|
382
|
+
operator: 'some';
|
|
383
|
+
operands: [Operand];
|
|
384
|
+
min?: NumberExpression;
|
|
385
|
+
};
|
|
365
386
|
type AddOperation = {
|
|
366
387
|
operator: 'add';
|
|
367
388
|
operands: [Operand, Operand];
|
|
@@ -9248,7 +9269,7 @@ type ResolvedChromeTabDescriptor = {
|
|
|
9248
9269
|
declare function activateBrowserTab(automator: Browser, descriptor: ResolvedChromeTabDescriptor): Promise<void>;
|
|
9249
9270
|
//#endregion
|
|
9250
9271
|
//#region src/utils/evaluate-expression.d.ts
|
|
9251
|
-
type EvaluatedExpression<TValue> = TValue extends ExtractOperation ? Any : TValue extends NumberExpression ? number : TValue extends SizeOperation ? number : TValue extends KeysOperation ? string[] : TValue extends ValuesOperation | EntriesOperation ? Any[] : TValue extends Condition ? boolean : TValue extends OTP ? string : TValue extends RandomValue<string> ? string | string[] : TValue extends RandomValue<number> ? number : TValue extends Reference<infer TType extends Any> ? TType : TValue extends JSExpressionReference<infer TType extends Any> ? TType : TValue extends InterpolatedString ? string : TValue extends JSExpression ? string : TValue extends Structure ? Record<string, any> | any[] : TValue extends FileHandle ? string : TValue extends Pattern ? RegExp | Match : TValue extends ChromeTabDescriptor ? ResolvedChromeTabDescriptor : TValue extends ChromeElementDescriptor ? ChromeElementDescriptor : TValue extends ElementDescriptor ? ResolvedElementDescriptor : TValue;
|
|
9272
|
+
type EvaluatedExpression<TValue> = TValue extends ExtractOperation ? Any : TValue extends NumberExpression ? number : TValue extends SizeOperation ? number : TValue extends KeysOperation ? string[] : TValue extends ValuesOperation | EntriesOperation | MapOperation ? Any[] : TValue extends Condition | EveryOperation | SomeOperation ? boolean : TValue extends OTP ? string : TValue extends RandomValue<string> ? string | string[] : TValue extends RandomValue<number> ? number : TValue extends Reference<infer TType extends Any> ? TType : TValue extends JSExpressionReference<infer TType extends Any> ? TType : TValue extends InterpolatedString ? string : TValue extends JSExpression ? string : TValue extends Structure ? Record<string, any> | any[] : TValue extends FileHandle ? string : TValue extends Pattern ? RegExp | Match : TValue extends ChromeTabDescriptor ? ResolvedChromeTabDescriptor : TValue extends ChromeElementDescriptor ? ChromeElementDescriptor : TValue extends ElementDescriptor ? ResolvedElementDescriptor : TValue;
|
|
9252
9273
|
//#endregion
|
|
9253
9274
|
//#region src/handler.d.ts
|
|
9254
9275
|
type HandlerOptions<TAutomator extends Automator, TInstruction extends Instruction> = {
|