@player-ui/common-expressions-plugin 0.4.0 → 0.4.1-next.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/dist/common-expressions-plugin.dev.js +4182 -4693
- package/dist/common-expressions-plugin.prod.js +1 -1
- package/dist/index.cjs.js +3 -0
- package/dist/index.d.ts +63 -2
- package/dist/index.esm.js +3 -0
- package/dist/xlr/ceil.json +33 -0
- package/dist/xlr/concat.json +19 -0
- package/dist/xlr/containsAny.json +44 -0
- package/dist/xlr/findProperty.json +92 -0
- package/dist/xlr/findPropertyIndex.json +70 -0
- package/dist/xlr/floor.json +33 -0
- package/dist/xlr/isEmpty.json +26 -0
- package/dist/xlr/isNotEmpty.json +26 -0
- package/dist/xlr/length.json +24 -0
- package/dist/xlr/lowerCase.json +24 -0
- package/dist/xlr/manifest.js +31 -0
- package/dist/xlr/manifest.json +36 -0
- package/dist/xlr/number.json +31 -0
- package/dist/xlr/replace.json +37 -0
- package/dist/xlr/round.json +33 -0
- package/dist/xlr/sentenceCase.json +24 -0
- package/dist/xlr/size.json +24 -0
- package/dist/xlr/sum.json +27 -0
- package/dist/xlr/titleCase.json +24 -0
- package/dist/xlr/trim.json +24 -0
- package/dist/xlr/upperCase.json +24 -0
- package/package.json +11 -3
- package/src/expressions/index.ts +7 -6
- package/src/index.ts +50 -3
package/dist/index.cjs.js
CHANGED
|
@@ -88,6 +88,9 @@ const sum = player.withoutContext((...args) => {
|
|
|
88
88
|
}, 0);
|
|
89
89
|
});
|
|
90
90
|
const findPropertyIndex = (context, bindingOrModel, propToCheck, valueToCheck) => {
|
|
91
|
+
if (bindingOrModel === void 0) {
|
|
92
|
+
return -1;
|
|
93
|
+
}
|
|
91
94
|
const searchArray = Array.isArray(bindingOrModel) ? bindingOrModel : context.model.get(bindingOrModel);
|
|
92
95
|
if (!Array.isArray(searchArray)) {
|
|
93
96
|
return -1;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,70 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExpressionHandler, ExtendedPlayerPlugin, Player } from '@player-ui/player';
|
|
2
|
+
import { Binding } from '@player-ui/types';
|
|
3
|
+
|
|
4
|
+
/** Generic Types */
|
|
5
|
+
declare const size: ExpressionHandler<[val: unknown], number>;
|
|
6
|
+
declare const length: ExpressionHandler<[val: unknown], number>;
|
|
7
|
+
/** Checks to see if the given value is empty */
|
|
8
|
+
declare const isEmpty: ExpressionHandler<[unknown], boolean>;
|
|
9
|
+
/** Checks to see if the given value is not empty */
|
|
10
|
+
declare const isNotEmpty: ExpressionHandler<[unknown], boolean>;
|
|
11
|
+
declare const concat: ExpressionHandler<unknown[], unknown>;
|
|
12
|
+
/** String Types */
|
|
13
|
+
declare const trim: ExpressionHandler<[arg: unknown], unknown>;
|
|
14
|
+
declare const upperCase: ExpressionHandler<[arg: unknown], unknown>;
|
|
15
|
+
declare const lowerCase: ExpressionHandler<[arg: unknown], unknown>;
|
|
16
|
+
declare const replace: ExpressionHandler<[str: unknown, pattern: unknown, replacement?: unknown], unknown>;
|
|
17
|
+
declare const titleCase: ExpressionHandler<[arg: unknown], unknown>;
|
|
18
|
+
declare const sentenceCase: ExpressionHandler<[arg: unknown], unknown>;
|
|
19
|
+
/** Math Types */
|
|
20
|
+
declare const number: ExpressionHandler<[val: unknown, coerceTo0?: boolean | undefined], number | undefined>;
|
|
21
|
+
declare const round: ExpressionHandler<[string | number], number>;
|
|
22
|
+
declare const floor: ExpressionHandler<[string | number], number>;
|
|
23
|
+
declare const ceil: ExpressionHandler<[string | number], number>;
|
|
24
|
+
declare const sum: ExpressionHandler<(string | number)[], number>;
|
|
25
|
+
/** Array Operations */
|
|
26
|
+
/** Finds the property in an array of objects */
|
|
27
|
+
declare const findPropertyIndex: ExpressionHandler<[
|
|
28
|
+
Array<any> | Binding | undefined,
|
|
29
|
+
string | undefined,
|
|
30
|
+
any
|
|
31
|
+
], number>;
|
|
32
|
+
/** Searches an array for an object matching the criteria. Returns the target prop from that object */
|
|
33
|
+
declare const findProperty: ExpressionHandler<[
|
|
34
|
+
Array<any> | Binding,
|
|
35
|
+
string | undefined,
|
|
36
|
+
any,
|
|
37
|
+
string | undefined,
|
|
38
|
+
any
|
|
39
|
+
], any>;
|
|
40
|
+
declare const containsAny: ExpressionHandler<[string, string | string[]], boolean>;
|
|
2
41
|
|
|
3
42
|
/**
|
|
4
43
|
* Exposes a lot of expressions to Player.
|
|
5
44
|
*/
|
|
6
|
-
declare class CommonExpressionsPlugin implements
|
|
45
|
+
declare class CommonExpressionsPlugin implements ExtendedPlayerPlugin<[
|
|
46
|
+
], [
|
|
47
|
+
], [
|
|
48
|
+
typeof size,
|
|
49
|
+
typeof length,
|
|
50
|
+
typeof isEmpty,
|
|
51
|
+
typeof isNotEmpty,
|
|
52
|
+
typeof concat,
|
|
53
|
+
typeof trim,
|
|
54
|
+
typeof upperCase,
|
|
55
|
+
typeof lowerCase,
|
|
56
|
+
typeof replace,
|
|
57
|
+
typeof titleCase,
|
|
58
|
+
typeof sentenceCase,
|
|
59
|
+
typeof number,
|
|
60
|
+
typeof round,
|
|
61
|
+
typeof floor,
|
|
62
|
+
typeof ceil,
|
|
63
|
+
typeof sum,
|
|
64
|
+
typeof findPropertyIndex,
|
|
65
|
+
typeof findProperty,
|
|
66
|
+
typeof containsAny
|
|
67
|
+
]> {
|
|
7
68
|
name: string;
|
|
8
69
|
apply(player: Player): void;
|
|
9
70
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -84,6 +84,9 @@ const sum = withoutContext((...args) => {
|
|
|
84
84
|
}, 0);
|
|
85
85
|
});
|
|
86
86
|
const findPropertyIndex = (context, bindingOrModel, propToCheck, valueToCheck) => {
|
|
87
|
+
if (bindingOrModel === void 0) {
|
|
88
|
+
return -1;
|
|
89
|
+
}
|
|
87
90
|
const searchArray = Array.isArray(bindingOrModel) ? bindingOrModel : context.model.get(bindingOrModel);
|
|
88
91
|
if (!Array.isArray(searchArray)) {
|
|
89
92
|
return -1;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "ceil",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "or",
|
|
13
|
+
"or": [
|
|
14
|
+
{
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "number"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"optional": false,
|
|
23
|
+
"name": "num"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"additionalItems": false,
|
|
27
|
+
"minItems": 1
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "number"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "concat",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "array",
|
|
9
|
+
"elementType": {
|
|
10
|
+
"type": "unknown"
|
|
11
|
+
},
|
|
12
|
+
"title": "[]",
|
|
13
|
+
"name": "args"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "unknown"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "containsAny",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"optional": false,
|
|
15
|
+
"name": "str"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": {
|
|
19
|
+
"type": "or",
|
|
20
|
+
"or": [
|
|
21
|
+
{
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "array",
|
|
26
|
+
"elementType": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"title": "[]"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"optional": false,
|
|
34
|
+
"name": "keywords"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"additionalItems": false,
|
|
38
|
+
"minItems": 2
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "findProperty",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler<\n [Array<any> | Binding, string | undefined, any, string | undefined, any],\n any\n>",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "or",
|
|
13
|
+
"or": [
|
|
14
|
+
{
|
|
15
|
+
"type": "array",
|
|
16
|
+
"elementType": {
|
|
17
|
+
"type": "any"
|
|
18
|
+
},
|
|
19
|
+
"title": "0"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "ref",
|
|
23
|
+
"ref": "Binding",
|
|
24
|
+
"title": "0"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"title": "0"
|
|
28
|
+
},
|
|
29
|
+
"optional": false,
|
|
30
|
+
"name": "bindingOrModel"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": {
|
|
34
|
+
"type": "or",
|
|
35
|
+
"or": [
|
|
36
|
+
{
|
|
37
|
+
"type": "string",
|
|
38
|
+
"title": "1"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "undefined",
|
|
42
|
+
"title": "1"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"title": "1"
|
|
46
|
+
},
|
|
47
|
+
"optional": false,
|
|
48
|
+
"name": "propToCheck"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": {
|
|
52
|
+
"type": "any",
|
|
53
|
+
"title": "2"
|
|
54
|
+
},
|
|
55
|
+
"optional": false,
|
|
56
|
+
"name": "valueToCheck"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": {
|
|
60
|
+
"type": "or",
|
|
61
|
+
"or": [
|
|
62
|
+
{
|
|
63
|
+
"type": "string",
|
|
64
|
+
"title": "3"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "undefined",
|
|
68
|
+
"title": "3"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"title": "3"
|
|
72
|
+
},
|
|
73
|
+
"optional": false,
|
|
74
|
+
"name": "propToReturn"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": {
|
|
78
|
+
"type": "any",
|
|
79
|
+
"title": "4"
|
|
80
|
+
},
|
|
81
|
+
"optional": false,
|
|
82
|
+
"name": "defaultValue"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"additionalItems": false,
|
|
86
|
+
"minItems": 5
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "any"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "findPropertyIndex",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler<\n [Array<any> | Binding | undefined, string | undefined, any],\n number\n>",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "or",
|
|
13
|
+
"or": [
|
|
14
|
+
{
|
|
15
|
+
"type": "array",
|
|
16
|
+
"elementType": {
|
|
17
|
+
"type": "any"
|
|
18
|
+
},
|
|
19
|
+
"title": "0"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "ref",
|
|
23
|
+
"ref": "Binding",
|
|
24
|
+
"title": "0"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "undefined",
|
|
28
|
+
"title": "0"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"title": "0"
|
|
32
|
+
},
|
|
33
|
+
"optional": false,
|
|
34
|
+
"name": "bindingOrModel"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": {
|
|
38
|
+
"type": "or",
|
|
39
|
+
"or": [
|
|
40
|
+
{
|
|
41
|
+
"type": "string",
|
|
42
|
+
"title": "1"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "undefined",
|
|
46
|
+
"title": "1"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"title": "1"
|
|
50
|
+
},
|
|
51
|
+
"optional": false,
|
|
52
|
+
"name": "propToCheck"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": {
|
|
56
|
+
"type": "any",
|
|
57
|
+
"title": "2"
|
|
58
|
+
},
|
|
59
|
+
"optional": false,
|
|
60
|
+
"name": "valueToCheck"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"additionalItems": false,
|
|
64
|
+
"minItems": 3
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "number"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "floor",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "or",
|
|
13
|
+
"or": [
|
|
14
|
+
{
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "number"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"optional": false,
|
|
23
|
+
"name": "num"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"additionalItems": false,
|
|
27
|
+
"minItems": 1
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "number"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "isEmpty",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler<[unknown], boolean>",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "unknown",
|
|
13
|
+
"title": "0"
|
|
14
|
+
},
|
|
15
|
+
"optional": false,
|
|
16
|
+
"name": "val"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"additionalItems": false,
|
|
20
|
+
"minItems": 1
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "isNotEmpty",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler<[unknown], boolean>",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "unknown",
|
|
13
|
+
"title": "0"
|
|
14
|
+
},
|
|
15
|
+
"optional": false,
|
|
16
|
+
"name": "val"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"additionalItems": false,
|
|
20
|
+
"minItems": 1
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "length",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"name": "val",
|
|
12
|
+
"type": {
|
|
13
|
+
"type": "unknown"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"additionalItems": false,
|
|
18
|
+
"minItems": 1
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "number"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "lowerCase",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"name": "arg",
|
|
12
|
+
"type": {
|
|
13
|
+
"type": "unknown"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"additionalItems": false,
|
|
18
|
+
"minItems": 1
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "unknown"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const size = require('./size.json')
|
|
2
|
+
const length = require('./length.json')
|
|
3
|
+
const isEmpty = require('./isEmpty.json')
|
|
4
|
+
const isNotEmpty = require('./isNotEmpty.json')
|
|
5
|
+
const concat = require('./concat.json')
|
|
6
|
+
const trim = require('./trim.json')
|
|
7
|
+
const upperCase = require('./upperCase.json')
|
|
8
|
+
const lowerCase = require('./lowerCase.json')
|
|
9
|
+
const replace = require('./replace.json')
|
|
10
|
+
const titleCase = require('./titleCase.json')
|
|
11
|
+
const sentenceCase = require('./sentenceCase.json')
|
|
12
|
+
const number = require('./number.json')
|
|
13
|
+
const round = require('./round.json')
|
|
14
|
+
const floor = require('./floor.json')
|
|
15
|
+
const ceil = require('./ceil.json')
|
|
16
|
+
const sum = require('./sum.json')
|
|
17
|
+
const findPropertyIndex = require('./findPropertyIndex.json')
|
|
18
|
+
const findProperty = require('./findProperty.json')
|
|
19
|
+
const containsAny = require('./containsAny.json')
|
|
20
|
+
|
|
21
|
+
module.exports = {
|
|
22
|
+
"pluginName": "CommonExpressions",
|
|
23
|
+
"capabilities": {
|
|
24
|
+
"Assets":[],
|
|
25
|
+
"Views":[],
|
|
26
|
+
"Expressions":[size,length,isEmpty,isNotEmpty,concat,trim,upperCase,lowerCase,replace,titleCase,sentenceCase,number,round,floor,ceil,sum,findPropertyIndex,findProperty,containsAny],
|
|
27
|
+
},
|
|
28
|
+
"customPrimitives": [
|
|
29
|
+
'Expression','Asset','Binding','AssetWrapper','Schema.DataType','ExpressionHandler'
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginName": "CommonExpressions",
|
|
3
|
+
"capabilities": {
|
|
4
|
+
"Assets": [],
|
|
5
|
+
"Views": [],
|
|
6
|
+
"Expressions": [
|
|
7
|
+
"size",
|
|
8
|
+
"length",
|
|
9
|
+
"isEmpty",
|
|
10
|
+
"isNotEmpty",
|
|
11
|
+
"concat",
|
|
12
|
+
"trim",
|
|
13
|
+
"upperCase",
|
|
14
|
+
"lowerCase",
|
|
15
|
+
"replace",
|
|
16
|
+
"titleCase",
|
|
17
|
+
"sentenceCase",
|
|
18
|
+
"number",
|
|
19
|
+
"round",
|
|
20
|
+
"floor",
|
|
21
|
+
"ceil",
|
|
22
|
+
"sum",
|
|
23
|
+
"findPropertyIndex",
|
|
24
|
+
"findProperty",
|
|
25
|
+
"containsAny"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"customPrimitives": [
|
|
29
|
+
"Expression",
|
|
30
|
+
"Asset",
|
|
31
|
+
"Binding",
|
|
32
|
+
"AssetWrapper",
|
|
33
|
+
"Schema.DataType",
|
|
34
|
+
"ExpressionHandler"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "number",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"name": "val",
|
|
12
|
+
"type": {
|
|
13
|
+
"type": "unknown"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "coerceTo0",
|
|
18
|
+
"type": {
|
|
19
|
+
"type": "boolean"
|
|
20
|
+
},
|
|
21
|
+
"optional": true
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"additionalItems": false,
|
|
25
|
+
"minItems": 1
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "number"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "replace",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"name": "str",
|
|
12
|
+
"type": {
|
|
13
|
+
"type": "unknown"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "pattern",
|
|
18
|
+
"type": {
|
|
19
|
+
"type": "unknown"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "replacement",
|
|
24
|
+
"type": {
|
|
25
|
+
"type": "unknown"
|
|
26
|
+
},
|
|
27
|
+
"optional": true
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"additionalItems": false,
|
|
31
|
+
"minItems": 2
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "unknown"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2701/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "round",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"elementTypes": [
|
|
10
|
+
{
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "or",
|
|
13
|
+
"or": [
|
|
14
|
+
{
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "number"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"optional": false,
|
|
23
|
+
"name": "num"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"additionalItems": false,
|
|
27
|
+
"minItems": 1
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "number"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|