@player-ui/common-expressions-plugin 0.7.0 → 0.7.1-next.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/dist/common-expressions-plugin.dev.js +253 -269
- package/dist/common-expressions-plugin.prod.js +1 -1
- package/dist/index.cjs.js +4 -1
- package/dist/index.esm.js +4 -1
- package/dist/xlr/ceil.json +1 -1
- package/dist/xlr/concat.json +1 -1
- package/dist/xlr/containsAny.json +1 -1
- package/dist/xlr/findProperty.json +1 -1
- package/dist/xlr/findPropertyIndex.json +1 -1
- package/dist/xlr/floor.json +1 -1
- package/dist/xlr/isEmpty.json +1 -1
- package/dist/xlr/isNotEmpty.json +1 -1
- package/dist/xlr/length.json +1 -1
- package/dist/xlr/lowerCase.json +1 -1
- package/dist/xlr/number.json +1 -1
- package/dist/xlr/replace.json +1 -1
- package/dist/xlr/round.json +1 -1
- package/dist/xlr/sentenceCase.json +1 -1
- package/dist/xlr/size.json +1 -1
- package/dist/xlr/sum.json +1 -1
- package/dist/xlr/titleCase.json +1 -1
- package/dist/xlr/trim.json +1 -1
- package/dist/xlr/upperCase.json +1 -1
- package/package.json +3 -3
- package/src/expressions/index.ts +4 -1
package/dist/index.cjs.js
CHANGED
|
@@ -52,7 +52,10 @@ const isNotEmpty = (ctx, val) => {
|
|
|
52
52
|
const concat = player.withoutContext((...args) => {
|
|
53
53
|
if (args.every((v) => Array.isArray(v))) {
|
|
54
54
|
const arrayArgs = args;
|
|
55
|
-
return arrayArgs.reduce((merged, next) =>
|
|
55
|
+
return arrayArgs.reduce((merged, next) => {
|
|
56
|
+
merged.push(...next);
|
|
57
|
+
return merged;
|
|
58
|
+
});
|
|
56
59
|
}
|
|
57
60
|
return args.reduce((merged, next) => merged + (next != null ? next : ""), "");
|
|
58
61
|
});
|
package/dist/index.esm.js
CHANGED
|
@@ -48,7 +48,10 @@ const isNotEmpty = (ctx, val) => {
|
|
|
48
48
|
const concat = withoutContext((...args) => {
|
|
49
49
|
if (args.every((v) => Array.isArray(v))) {
|
|
50
50
|
const arrayArgs = args;
|
|
51
|
-
return arrayArgs.reduce((merged, next) =>
|
|
51
|
+
return arrayArgs.reduce((merged, next) => {
|
|
52
|
+
merged.push(...next);
|
|
53
|
+
return merged;
|
|
54
|
+
});
|
|
52
55
|
}
|
|
53
56
|
return args.reduce((merged, next) => merged + (next != null ? next : ""), "");
|
|
54
57
|
});
|
package/dist/xlr/ceil.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "ceil",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/concat.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "concat",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "containsAny",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "findProperty",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler<\n [Array<any> | Binding, string | undefined, any, string | undefined, any],\n any\n>",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "findPropertyIndex",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler<\n [Array<any> | Binding | undefined, string | undefined, any],\n number\n>",
|
package/dist/xlr/floor.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "floor",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/isEmpty.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "isEmpty",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler<[unknown], boolean>",
|
package/dist/xlr/isNotEmpty.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "isNotEmpty",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler<[unknown], boolean>",
|
package/dist/xlr/length.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "length",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/lowerCase.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "lowerCase",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/number.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "number",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/replace.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "replace",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/round.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "round",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "sentenceCase",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/size.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "size",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/sum.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "sum",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/titleCase.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "titleCase",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/trim.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "trim",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/dist/xlr/upperCase.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
2
|
+
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3277/execroot/player/plugins/common-expressions/core/src/expressions/index.ts",
|
|
3
3
|
"name": "upperCase",
|
|
4
4
|
"type": "ref",
|
|
5
5
|
"ref": "ExpressionHandler",
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@player-ui/common-expressions-plugin",
|
|
3
|
-
"version": "0.7.0",
|
|
3
|
+
"version": "0.7.1-next.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@player-ui/player": "0.7.0"
|
|
9
|
+
"@player-ui/player": "0.7.1-next.0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@player-ui/expression-plugin": "0.7.0",
|
|
12
|
+
"@player-ui/expression-plugin": "0.7.1-next.0",
|
|
13
13
|
"@babel/runtime": "7.15.4"
|
|
14
14
|
},
|
|
15
15
|
"main": "dist/index.cjs.js",
|
package/src/expressions/index.ts
CHANGED
|
@@ -52,7 +52,10 @@ export const concat = withoutContext((...args: Array<unknown>) => {
|
|
|
52
52
|
if (args.every((v) => Array.isArray(v))) {
|
|
53
53
|
const arrayArgs = args as Array<Array<unknown>>;
|
|
54
54
|
|
|
55
|
-
return arrayArgs.reduce((merged, next) =>
|
|
55
|
+
return arrayArgs.reduce((merged, next) => {
|
|
56
|
+
merged.push(...next);
|
|
57
|
+
return merged;
|
|
58
|
+
});
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
return args.reduce((merged: any, next) => merged + (next ?? ''), '');
|