@player-ui/common-expressions-plugin 0.8.0--canary.307.9645 → 0.8.0-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/CommonExpressionsPlugin.native.js +11332 -0
- package/dist/CommonExpressionsPlugin.native.js.map +1 -0
- package/dist/cjs/index.cjs +199 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/index.legacy-esm.js +180 -0
- package/dist/index.mjs +180 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +24 -58
- package/src/expressions/__tests__/expressions.test.ts +373 -0
- package/src/expressions/__tests__/toNum.test.ts +56 -0
- package/src/expressions/index.ts +33 -30
- package/src/expressions/toNum.ts +4 -4
- package/src/index.test.ts +31 -0
- package/src/index.ts +7 -7
- package/types/expressions/index.d.ts +39 -0
- package/types/expressions/toNum.d.ts +5 -0
- package/types/index.d.ts +32 -0
- package/dist/common-expressions-plugin.dev.js +0 -10773
- package/dist/common-expressions-plugin.prod.js +0 -2
- package/dist/index.cjs.js +0 -167
- package/dist/index.d.ts +0 -72
- package/dist/index.esm.js +0 -163
- package/dist/xlr/ceil.json +0 -33
- package/dist/xlr/concat.json +0 -19
- package/dist/xlr/containsAny.json +0 -44
- package/dist/xlr/findProperty.json +0 -92
- package/dist/xlr/findPropertyIndex.json +0 -70
- package/dist/xlr/floor.json +0 -33
- package/dist/xlr/isEmpty.json +0 -26
- package/dist/xlr/isNotEmpty.json +0 -26
- package/dist/xlr/length.json +0 -24
- package/dist/xlr/lowerCase.json +0 -24
- package/dist/xlr/manifest.js +0 -31
- package/dist/xlr/manifest.json +0 -36
- package/dist/xlr/number.json +0 -31
- package/dist/xlr/replace.json +0 -37
- package/dist/xlr/round.json +0 -33
- package/dist/xlr/sentenceCase.json +0 -24
- package/dist/xlr/size.json +0 -24
- package/dist/xlr/sum.json +0 -27
- package/dist/xlr/titleCase.json +0 -24
- package/dist/xlr/trim.json +0 -24
- package/dist/xlr/upperCase.json +0 -24
package/dist/index.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
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>;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Exposes a lot of expressions to Player.
|
|
44
|
-
*/
|
|
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
|
-
]> {
|
|
68
|
-
name: string;
|
|
69
|
-
apply(player: Player): void;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export { CommonExpressionsPlugin };
|
package/dist/index.esm.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { ExpressionPlugin } from '@player-ui/expression-plugin';
|
|
2
|
-
import { withoutContext } from '@player-ui/player';
|
|
3
|
-
|
|
4
|
-
function toNum(val, coerceTo0) {
|
|
5
|
-
if (typeof val === "number") {
|
|
6
|
-
return val;
|
|
7
|
-
}
|
|
8
|
-
if (typeof val === "string" && val.length > 0) {
|
|
9
|
-
let newVal = val.trim();
|
|
10
|
-
newVal = newVal.replace(/,/g, "");
|
|
11
|
-
newVal = newVal.replace(/[¥£$€]/, "");
|
|
12
|
-
const nVal = Number(newVal);
|
|
13
|
-
return newVal.match(/^0[xbo]/i) || isNaN(nVal) ? void 0 : nVal;
|
|
14
|
-
}
|
|
15
|
-
return coerceTo0 ? 0 : void 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function ifString(fn) {
|
|
19
|
-
return (arg) => {
|
|
20
|
-
if (typeof arg === "string") {
|
|
21
|
-
return fn(arg);
|
|
22
|
-
}
|
|
23
|
-
return arg;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const size = withoutContext((val) => {
|
|
27
|
-
if (typeof val === "string") {
|
|
28
|
-
return val.length;
|
|
29
|
-
}
|
|
30
|
-
if (typeof val === "object" && val !== null) {
|
|
31
|
-
return Object.keys(val).length;
|
|
32
|
-
}
|
|
33
|
-
return 0;
|
|
34
|
-
});
|
|
35
|
-
const length = size;
|
|
36
|
-
const isEmpty = (ctx, val) => {
|
|
37
|
-
if (val === void 0 || val === null) {
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
if (typeof val === "object" || typeof val === "string") {
|
|
41
|
-
return size(ctx, val) === 0;
|
|
42
|
-
}
|
|
43
|
-
return false;
|
|
44
|
-
};
|
|
45
|
-
const isNotEmpty = (ctx, val) => {
|
|
46
|
-
return !isEmpty(ctx, val);
|
|
47
|
-
};
|
|
48
|
-
const concat = withoutContext((...args) => {
|
|
49
|
-
if (args.every((v) => Array.isArray(v))) {
|
|
50
|
-
const arrayArgs = args;
|
|
51
|
-
return arrayArgs.reduce((merged, next) => {
|
|
52
|
-
merged.push(...next);
|
|
53
|
-
return merged;
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return args.reduce((merged, next) => merged + (next != null ? next : ""), "");
|
|
57
|
-
});
|
|
58
|
-
const trim = withoutContext(ifString((str) => str.trim()));
|
|
59
|
-
const upperCase = withoutContext(ifString((str) => str.toUpperCase()));
|
|
60
|
-
const lowerCase = withoutContext(ifString((str) => str.toLowerCase()));
|
|
61
|
-
const replace = withoutContext((str, pattern, replacement = "") => {
|
|
62
|
-
if (typeof str === "string" && typeof pattern === "string" && typeof replacement === "string") {
|
|
63
|
-
const replacementRegex = new RegExp(pattern, "g");
|
|
64
|
-
return str.replace(replacementRegex, replacement);
|
|
65
|
-
}
|
|
66
|
-
return str;
|
|
67
|
-
});
|
|
68
|
-
const titleCase = withoutContext(ifString((str) => str.split(" ").map((word) => word[0].toUpperCase() + word.slice(1)).join(" ")));
|
|
69
|
-
const sentenceCase = withoutContext(ifString((str) => str.replace(/\b[a-zA-Z]/, (word) => word.toUpperCase())));
|
|
70
|
-
const number = withoutContext(toNum);
|
|
71
|
-
const round = withoutContext((num) => {
|
|
72
|
-
var _a;
|
|
73
|
-
return Math.round((_a = toNum(num, true)) != null ? _a : 0);
|
|
74
|
-
});
|
|
75
|
-
const floor = withoutContext((num) => {
|
|
76
|
-
var _a;
|
|
77
|
-
return Math.floor((_a = toNum(num, true)) != null ? _a : 0);
|
|
78
|
-
});
|
|
79
|
-
const ceil = withoutContext((num) => {
|
|
80
|
-
var _a;
|
|
81
|
-
return Math.ceil((_a = toNum(num, true)) != null ? _a : 0);
|
|
82
|
-
});
|
|
83
|
-
const sum = withoutContext((...args) => {
|
|
84
|
-
return args.reduce((s, next) => {
|
|
85
|
-
var _a;
|
|
86
|
-
return s + ((_a = toNum(next)) != null ? _a : 0);
|
|
87
|
-
}, 0);
|
|
88
|
-
});
|
|
89
|
-
const findPropertyIndex = (context, bindingOrModel, propToCheck, valueToCheck) => {
|
|
90
|
-
if (bindingOrModel === void 0) {
|
|
91
|
-
return -1;
|
|
92
|
-
}
|
|
93
|
-
const searchArray = Array.isArray(bindingOrModel) ? bindingOrModel : context.model.get(bindingOrModel);
|
|
94
|
-
if (!Array.isArray(searchArray)) {
|
|
95
|
-
return -1;
|
|
96
|
-
}
|
|
97
|
-
return searchArray.findIndex((value) => {
|
|
98
|
-
const propVal = typeof value === "object" && propToCheck !== void 0 ? value[propToCheck] : value;
|
|
99
|
-
return valueToCheck === propVal;
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
const findProperty = (context, bindingOrModel, propToCheck, valueToCheck, propToReturn, defaultValue) => {
|
|
103
|
-
var _a;
|
|
104
|
-
const searchArray = Array.isArray(bindingOrModel) ? bindingOrModel : context.model.get(bindingOrModel);
|
|
105
|
-
if (!Array.isArray(searchArray)) {
|
|
106
|
-
return defaultValue;
|
|
107
|
-
}
|
|
108
|
-
const foundValue = searchArray.find((value) => {
|
|
109
|
-
const propVal = typeof value === "object" && propToCheck !== void 0 ? value[propToCheck] : value;
|
|
110
|
-
return valueToCheck === propVal;
|
|
111
|
-
});
|
|
112
|
-
if (foundValue === void 0) {
|
|
113
|
-
return defaultValue;
|
|
114
|
-
}
|
|
115
|
-
if (typeof foundValue === "object" && propToReturn) {
|
|
116
|
-
return (_a = foundValue[propToReturn]) != null ? _a : defaultValue;
|
|
117
|
-
}
|
|
118
|
-
return foundValue;
|
|
119
|
-
};
|
|
120
|
-
const containsAny = withoutContext((str, keywords) => {
|
|
121
|
-
if (!(typeof str === "string") || !(typeof keywords === "string" || Array.isArray(keywords))) {
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
if (Array.isArray(keywords)) {
|
|
125
|
-
return keywords.some((keyword) => str.indexOf(keyword) > -1);
|
|
126
|
-
}
|
|
127
|
-
return str.indexOf(keywords) > -1;
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
var Expressions = /*#__PURE__*/Object.freeze({
|
|
131
|
-
__proto__: null,
|
|
132
|
-
size: size,
|
|
133
|
-
length: length,
|
|
134
|
-
isEmpty: isEmpty,
|
|
135
|
-
isNotEmpty: isNotEmpty,
|
|
136
|
-
concat: concat,
|
|
137
|
-
trim: trim,
|
|
138
|
-
upperCase: upperCase,
|
|
139
|
-
lowerCase: lowerCase,
|
|
140
|
-
replace: replace,
|
|
141
|
-
titleCase: titleCase,
|
|
142
|
-
sentenceCase: sentenceCase,
|
|
143
|
-
number: number,
|
|
144
|
-
round: round,
|
|
145
|
-
floor: floor,
|
|
146
|
-
ceil: ceil,
|
|
147
|
-
sum: sum,
|
|
148
|
-
findPropertyIndex: findPropertyIndex,
|
|
149
|
-
findProperty: findProperty,
|
|
150
|
-
containsAny: containsAny
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
class CommonExpressionsPlugin {
|
|
154
|
-
constructor() {
|
|
155
|
-
this.name = "CommonExpressions";
|
|
156
|
-
}
|
|
157
|
-
apply(player) {
|
|
158
|
-
player.registerPlugin(new ExpressionPlugin(new Map(Object.entries(Expressions))));
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export { CommonExpressionsPlugin };
|
|
163
|
-
//# sourceMappingURL=index.esm.js.map
|
package/dist/xlr/ceil.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
package/dist/xlr/concat.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
package/dist/xlr/floor.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
package/dist/xlr/isEmpty.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
package/dist/xlr/isNotEmpty.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
package/dist/xlr/length.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
package/dist/xlr/lowerCase.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/3400/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
|
-
}
|
package/dist/xlr/manifest.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
}
|