@player-ui/common-expressions-plugin 0.4.0-next.5 → 0.4.0-next.6
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 +3527 -3481
- package/dist/common-expressions-plugin.prod.js +1 -1
- package/dist/index.d.ts +63 -2
- 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 +66 -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 +28 -0
- package/dist/xlr/manifest.json +28 -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 +3 -3
- package/src/expressions/index.ts +1 -4
- package/src/index.ts +50 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2689/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "size",
|
|
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,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2689/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "sum",
|
|
4
|
+
"type": "ref",
|
|
5
|
+
"ref": "ExpressionHandler",
|
|
6
|
+
"genericArguments": [
|
|
7
|
+
{
|
|
8
|
+
"type": "array",
|
|
9
|
+
"elementType": {
|
|
10
|
+
"type": "or",
|
|
11
|
+
"or": [
|
|
12
|
+
{
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "number"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"title": "[]",
|
|
21
|
+
"name": "args"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "number"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2689/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "titleCase",
|
|
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,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2689/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "trim",
|
|
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,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2689/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
|
+
"name": "upperCase",
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@player-ui/common-expressions-plugin",
|
|
3
|
-
"version": "0.4.0-next.
|
|
3
|
+
"version": "0.4.0-next.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@player-ui/player": "0.4.0-next.
|
|
9
|
+
"@player-ui/player": "0.4.0-next.6"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@player-ui/expression-plugin": "0.4.0-next.
|
|
12
|
+
"@player-ui/expression-plugin": "0.4.0-next.6",
|
|
13
13
|
"@babel/runtime": "7.15.4"
|
|
14
14
|
},
|
|
15
15
|
"main": "dist/index.cjs.js",
|
package/src/expressions/index.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ExpressionHandler,
|
|
3
|
-
ExpressionContext,
|
|
4
|
-
} from '@player-ui/expressions';
|
|
1
|
+
import type { ExpressionHandler, ExpressionContext } from '@player-ui/player';
|
|
5
2
|
import { withoutContext } from '@player-ui/player';
|
|
6
3
|
import type { Binding } from '@player-ui/types';
|
|
7
4
|
import { toNum } from './toNum';
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,58 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ExtendedPlayerPlugin, Player } from '@player-ui/player';
|
|
2
2
|
import { ExpressionPlugin } from '@player-ui/expression-plugin';
|
|
3
3
|
import * as Expressions from './expressions';
|
|
4
|
-
|
|
4
|
+
import type {
|
|
5
|
+
size,
|
|
6
|
+
length,
|
|
7
|
+
isEmpty,
|
|
8
|
+
isNotEmpty,
|
|
9
|
+
concat,
|
|
10
|
+
trim,
|
|
11
|
+
upperCase,
|
|
12
|
+
lowerCase,
|
|
13
|
+
replace,
|
|
14
|
+
titleCase,
|
|
15
|
+
sentenceCase,
|
|
16
|
+
number,
|
|
17
|
+
round,
|
|
18
|
+
floor,
|
|
19
|
+
ceil,
|
|
20
|
+
sum,
|
|
21
|
+
findPropertyIndex,
|
|
22
|
+
findProperty,
|
|
23
|
+
containsAny,
|
|
24
|
+
} from './expressions';
|
|
5
25
|
/**
|
|
6
26
|
* Exposes a lot of expressions to Player.
|
|
7
27
|
*/
|
|
8
|
-
export class CommonExpressionsPlugin
|
|
28
|
+
export class CommonExpressionsPlugin
|
|
29
|
+
implements
|
|
30
|
+
ExtendedPlayerPlugin<
|
|
31
|
+
[],
|
|
32
|
+
[],
|
|
33
|
+
[
|
|
34
|
+
typeof size,
|
|
35
|
+
typeof length,
|
|
36
|
+
typeof isEmpty,
|
|
37
|
+
typeof isNotEmpty,
|
|
38
|
+
typeof concat,
|
|
39
|
+
typeof trim,
|
|
40
|
+
typeof upperCase,
|
|
41
|
+
typeof lowerCase,
|
|
42
|
+
typeof replace,
|
|
43
|
+
typeof titleCase,
|
|
44
|
+
typeof sentenceCase,
|
|
45
|
+
typeof number,
|
|
46
|
+
typeof round,
|
|
47
|
+
typeof floor,
|
|
48
|
+
typeof ceil,
|
|
49
|
+
typeof sum,
|
|
50
|
+
typeof findPropertyIndex,
|
|
51
|
+
typeof findProperty,
|
|
52
|
+
typeof containsAny
|
|
53
|
+
]
|
|
54
|
+
>
|
|
55
|
+
{
|
|
9
56
|
name = 'CommonExpressions';
|
|
10
57
|
|
|
11
58
|
apply(player: Player) {
|