@player-ui/common-expressions-plugin 0.15.3-next.1 → 0.15.3-next.2
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 +223 -206
- package/dist/CommonExpressionsPlugin.native.js.map +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/xlr/Expressions.ceil.json +1 -1
- package/dist/xlr/Expressions.concat.json +1 -1
- package/dist/xlr/Expressions.containsAny.json +1 -1
- package/dist/xlr/Expressions.findProperty.json +1 -1
- package/dist/xlr/Expressions.findPropertyIndex.json +1 -1
- package/dist/xlr/Expressions.floor.json +1 -1
- package/dist/xlr/Expressions.isEmpty.json +1 -1
- package/dist/xlr/Expressions.isNotEmpty.json +1 -1
- package/dist/xlr/Expressions.length.json +1 -1
- package/dist/xlr/Expressions.lowerCase.json +1 -1
- package/dist/xlr/Expressions.number.json +1 -1
- package/dist/xlr/Expressions.replace.json +1 -1
- package/dist/xlr/Expressions.round.json +1 -1
- package/dist/xlr/Expressions.sentenceCase.json +1 -1
- package/dist/xlr/Expressions.size.json +1 -1
- package/dist/xlr/Expressions.split.json +1 -1
- package/dist/xlr/Expressions.substr.json +1 -1
- package/dist/xlr/Expressions.sum.json +1 -1
- package/dist/xlr/Expressions.titleCase.json +1 -1
- package/dist/xlr/Expressions.trim.json +1 -1
- package/dist/xlr/Expressions.upperCase.json +1 -1
- package/package.json +3 -3
- package/src/index.ts +27 -30
|
@@ -118,6 +118,7 @@ function _inherits(subClass, superClass) {
|
|
|
118
118
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
119
119
|
}
|
|
120
120
|
function _instanceof(left, right) {
|
|
121
|
+
"@swc/helpers - instanceof";
|
|
121
122
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
122
123
|
return !!right[Symbol.hasInstance](left);
|
|
123
124
|
} else {
|
|
@@ -201,12 +202,22 @@ function _object_spread_props(target, source) {
|
|
|
201
202
|
}
|
|
202
203
|
function _object_without_properties(source, excluded) {
|
|
203
204
|
if (source == null) return {};
|
|
204
|
-
var target =
|
|
205
|
-
|
|
205
|
+
var target = {}, sourceKeys, key, i;
|
|
206
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
207
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
208
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
209
|
+
key = sourceKeys[i];
|
|
210
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
211
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
212
|
+
target[key] = source[key];
|
|
213
|
+
}
|
|
214
|
+
return target;
|
|
215
|
+
}
|
|
216
|
+
target = _object_without_properties_loose(source, excluded);
|
|
206
217
|
if (Object.getOwnPropertySymbols) {
|
|
207
|
-
|
|
208
|
-
for(i = 0; i <
|
|
209
|
-
key =
|
|
218
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
219
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
220
|
+
key = sourceKeys[i];
|
|
210
221
|
if (excluded.indexOf(key) >= 0) continue;
|
|
211
222
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
212
223
|
target[key] = source[key];
|
|
@@ -216,12 +227,11 @@ function _object_without_properties(source, excluded) {
|
|
|
216
227
|
}
|
|
217
228
|
function _object_without_properties_loose(source, excluded) {
|
|
218
229
|
if (source == null) return {};
|
|
219
|
-
var target = {};
|
|
220
|
-
var sourceKeys = Object.keys(source);
|
|
221
|
-
var key, i;
|
|
230
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
222
231
|
for(i = 0; i < sourceKeys.length; i++){
|
|
223
232
|
key = sourceKeys[i];
|
|
224
233
|
if (excluded.indexOf(key) >= 0) continue;
|
|
234
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
225
235
|
target[key] = source[key];
|
|
226
236
|
}
|
|
227
237
|
return target;
|
|
@@ -303,9 +313,17 @@ function _ts_generator(thisArg, body) {
|
|
|
303
313
|
},
|
|
304
314
|
trys: [],
|
|
305
315
|
ops: []
|
|
306
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
307
|
-
return
|
|
308
|
-
|
|
316
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
317
|
+
return d(g, "next", {
|
|
318
|
+
value: verb(0)
|
|
319
|
+
}), d(g, "throw", {
|
|
320
|
+
value: verb(1)
|
|
321
|
+
}), d(g, "return", {
|
|
322
|
+
value: verb(2)
|
|
323
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
324
|
+
value: function() {
|
|
325
|
+
return this;
|
|
326
|
+
}
|
|
309
327
|
}), g;
|
|
310
328
|
function verb(n) {
|
|
311
329
|
return function(v) {
|
|
@@ -432,7 +450,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
432
450
|
};
|
|
433
451
|
var createObjectMatcher = function createObjectMatcher(partialObj) {
|
|
434
452
|
var pairs = traverseObj(partialObj);
|
|
435
|
-
var matchFunction = function(searchObj) {
|
|
453
|
+
var matchFunction = function matchFunction(searchObj) {
|
|
436
454
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
437
455
|
try {
|
|
438
456
|
for(var _iterator = Array.from(pairs)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -462,7 +480,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
462
480
|
return matchFunction;
|
|
463
481
|
};
|
|
464
482
|
var createBasicMatcher = function createBasicMatcher(seed) {
|
|
465
|
-
var matcher = function(match) {
|
|
483
|
+
var matcher = function matcher(match) {
|
|
466
484
|
return seed === match;
|
|
467
485
|
};
|
|
468
486
|
matcher.count = 1;
|
|
@@ -530,21 +548,21 @@ var CommonExpressionsPlugin = function() {
|
|
|
530
548
|
return middleware;
|
|
531
549
|
}
|
|
532
550
|
return {
|
|
533
|
-
get: function(binding, options) {
|
|
551
|
+
get: function get(binding, options) {
|
|
534
552
|
var resolvedOptions = options !== null && options !== void 0 ? options : defaultOptions;
|
|
535
553
|
if (middleware.get) {
|
|
536
554
|
return middleware.get(binding, resolvedOptions, next);
|
|
537
555
|
}
|
|
538
556
|
return next === null || next === void 0 ? void 0 : next.get(binding, resolvedOptions);
|
|
539
557
|
},
|
|
540
|
-
set: function(transaction, options) {
|
|
558
|
+
set: function set(transaction, options) {
|
|
541
559
|
var resolvedOptions = options !== null && options !== void 0 ? options : defaultOptions;
|
|
542
560
|
if (middleware.set) {
|
|
543
561
|
return middleware.set(transaction, resolvedOptions, next);
|
|
544
562
|
}
|
|
545
563
|
return next === null || next === void 0 ? void 0 : next.set(transaction, resolvedOptions);
|
|
546
564
|
},
|
|
547
|
-
delete: function(binding, options) {
|
|
565
|
+
delete: function _delete(binding, options) {
|
|
548
566
|
var resolvedOptions = options !== null && options !== void 0 ? options : defaultOptions;
|
|
549
567
|
if (middleware.delete) {
|
|
550
568
|
return middleware.delete(binding, resolvedOptions, next);
|
|
@@ -568,15 +586,15 @@ var CommonExpressionsPlugin = function() {
|
|
|
568
586
|
return model;
|
|
569
587
|
}
|
|
570
588
|
return {
|
|
571
|
-
get: function(binding, options) {
|
|
589
|
+
get: function get(binding, options) {
|
|
572
590
|
var _createModelWithOptions;
|
|
573
591
|
return (_createModelWithOptions = createModelWithOptions(options)) === null || _createModelWithOptions === void 0 ? void 0 : _createModelWithOptions.get(binding, options);
|
|
574
592
|
},
|
|
575
|
-
set: function(transaction, options) {
|
|
593
|
+
set: function set(transaction, options) {
|
|
576
594
|
var _createModelWithOptions;
|
|
577
595
|
return (_createModelWithOptions = createModelWithOptions(options)) === null || _createModelWithOptions === void 0 ? void 0 : _createModelWithOptions.set(transaction, options);
|
|
578
596
|
},
|
|
579
|
-
delete: function(binding, options) {
|
|
597
|
+
delete: function _delete(binding, options) {
|
|
580
598
|
var _createModelWithOptions;
|
|
581
599
|
return (_createModelWithOptions = createModelWithOptions(options)) === null || _createModelWithOptions === void 0 ? void 0 : _createModelWithOptions.delete(binding, options);
|
|
582
600
|
}
|
|
@@ -650,13 +668,13 @@ var CommonExpressionsPlugin = function() {
|
|
|
650
668
|
return ch0 === OCURL_CODE && ch1 === OCURL_CODE;
|
|
651
669
|
};
|
|
652
670
|
var parseExpression = function parseExpression(expr, options) {
|
|
653
|
-
var
|
|
654
|
-
var strictMode = (
|
|
671
|
+
var _ref;
|
|
672
|
+
var strictMode = (_ref = options === null || options === void 0 ? void 0 : options.strict) !== null && _ref !== void 0 ? _ref : true;
|
|
655
673
|
var charAtFunc = expr.charAt;
|
|
656
674
|
var charCodeAtFunc = expr.charCodeAt;
|
|
657
675
|
var length2 = expr.length;
|
|
658
676
|
var index = 0;
|
|
659
|
-
var getLocation = function(startChar) {
|
|
677
|
+
var getLocation = function getLocation(startChar) {
|
|
660
678
|
return {
|
|
661
679
|
start: {
|
|
662
680
|
character: startChar
|
|
@@ -1431,17 +1449,17 @@ var CommonExpressionsPlugin = function() {
|
|
|
1431
1449
|
return _object_spread_props(_object_spread({}, resolverOptions), {
|
|
1432
1450
|
data: {
|
|
1433
1451
|
model: resolverOptions.model,
|
|
1434
|
-
formatValue: function(ref, value) {
|
|
1452
|
+
formatValue: function formatValue(ref, value) {
|
|
1435
1453
|
if (resolverOptions.formatValue) {
|
|
1436
1454
|
return resolverOptions.formatValue(ref, value);
|
|
1437
1455
|
}
|
|
1438
1456
|
return value;
|
|
1439
1457
|
},
|
|
1440
|
-
format: function(bindingLike, value) {
|
|
1458
|
+
format: function format(bindingLike, value) {
|
|
1441
1459
|
return resolverOptions.format ? resolverOptions.format(isBinding(bindingLike) ? bindingLike : resolverOptions.parseBinding(bindingLike), value) : value;
|
|
1442
1460
|
}
|
|
1443
1461
|
},
|
|
1444
|
-
evaluate: function(exp) {
|
|
1462
|
+
evaluate: function evaluate(exp) {
|
|
1445
1463
|
return resolverOptions.evaluator.evaluate(exp, resolverOptions);
|
|
1446
1464
|
}
|
|
1447
1465
|
});
|
|
@@ -1532,27 +1550,27 @@ var CommonExpressionsPlugin = function() {
|
|
|
1532
1550
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
1533
1551
|
var __getProtoOf = Object.getPrototypeOf;
|
|
1534
1552
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1535
|
-
var __commonJS = function(cb, mod) {
|
|
1553
|
+
var __commonJS = function __commonJS(cb, mod) {
|
|
1536
1554
|
return function __require() {
|
|
1537
1555
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
|
|
1538
1556
|
exports: {}
|
|
1539
1557
|
}).exports, mod), mod.exports;
|
|
1540
1558
|
};
|
|
1541
1559
|
};
|
|
1542
|
-
var __export = function(target, all) {
|
|
1560
|
+
var __export = function __export(target, all) {
|
|
1543
1561
|
for(var name in all)__defProp(target, name, {
|
|
1544
1562
|
get: all[name],
|
|
1545
1563
|
enumerable: true
|
|
1546
1564
|
});
|
|
1547
1565
|
};
|
|
1548
|
-
var __copyProps = function(to, from, except, desc) {
|
|
1566
|
+
var __copyProps = function __copyProps(to, from, except, desc) {
|
|
1549
1567
|
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
1550
1568
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1551
1569
|
try {
|
|
1552
1570
|
var _loop = function() {
|
|
1553
1571
|
var key = _step.value;
|
|
1554
1572
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
1555
|
-
get: function() {
|
|
1573
|
+
get: function get() {
|
|
1556
1574
|
return from[key];
|
|
1557
1575
|
},
|
|
1558
1576
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -1576,7 +1594,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
1576
1594
|
}
|
|
1577
1595
|
return to;
|
|
1578
1596
|
};
|
|
1579
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
1597
|
+
var __toESM = function __toESM(mod, isNodeMode, target) {
|
|
1580
1598
|
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
1581
1599
|
// file that has been converted to a CommonJS file using a Babel-
|
|
1582
1600
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -1586,7 +1604,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
1586
1604
|
enumerable: true
|
|
1587
1605
|
}) : target, mod);
|
|
1588
1606
|
};
|
|
1589
|
-
var __toCommonJS = function(mod) {
|
|
1607
|
+
var __toCommonJS = function __toCommonJS(mod) {
|
|
1590
1608
|
return __copyProps(__defProp({}, "__esModule", {
|
|
1591
1609
|
value: true
|
|
1592
1610
|
}), mod);
|
|
@@ -1688,7 +1706,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
1688
1706
|
function toError(err) {
|
|
1689
1707
|
try {
|
|
1690
1708
|
return _instanceof(err, Error) ? err : new Error("Value that is not an instance of Error was thrown: ".concat(err));
|
|
1691
|
-
} catch (
|
|
1709
|
+
} catch (unused) {
|
|
1692
1710
|
return new Error("Failed to stringify non-instance of Error that was thrown.This is possibly due to the fact that toString() method of the valuedoesn't return a primitive value.");
|
|
1693
1711
|
}
|
|
1694
1712
|
}
|
|
@@ -1989,7 +2007,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
1989
2007
|
var require_p_defer = __commonJS({
|
|
1990
2008
|
"../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/p-defer@3.0.0/node_modules/p-defer/index.js": function(exports, module) {
|
|
1991
2009
|
"use strict";
|
|
1992
|
-
var pDefer = function() {
|
|
2010
|
+
var pDefer = function pDefer() {
|
|
1993
2011
|
var deferred2 = {};
|
|
1994
2012
|
deferred2.promise = new Promise(function(resolve, reject) {
|
|
1995
2013
|
deferred2.resolve = resolve;
|
|
@@ -2098,10 +2116,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
2098
2116
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/common-expressions/core/src/index.ts
|
|
2099
2117
|
var src_exports = {};
|
|
2100
2118
|
__export(src_exports, {
|
|
2101
|
-
CommonExpressionsPlugin: function() {
|
|
2119
|
+
CommonExpressionsPlugin: function CommonExpressionsPlugin1() {
|
|
2102
2120
|
return CommonExpressionsPlugin;
|
|
2103
2121
|
},
|
|
2104
|
-
Expressions: function() {
|
|
2122
|
+
Expressions: function Expressions() {
|
|
2105
2123
|
return expressions_exports;
|
|
2106
2124
|
}
|
|
2107
2125
|
});
|
|
@@ -2130,67 +2148,67 @@ var CommonExpressionsPlugin = function() {
|
|
|
2130
2148
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/common-expressions/core/src/expressions/index.ts
|
|
2131
2149
|
var expressions_exports = {};
|
|
2132
2150
|
__export(expressions_exports, {
|
|
2133
|
-
ceil: function() {
|
|
2151
|
+
ceil: function ceil1() {
|
|
2134
2152
|
return ceil;
|
|
2135
2153
|
},
|
|
2136
|
-
concat: function() {
|
|
2154
|
+
concat: function concat1() {
|
|
2137
2155
|
return concat;
|
|
2138
2156
|
},
|
|
2139
|
-
containsAny: function() {
|
|
2157
|
+
containsAny: function containsAny1() {
|
|
2140
2158
|
return containsAny;
|
|
2141
2159
|
},
|
|
2142
|
-
findProperty: function() {
|
|
2160
|
+
findProperty: function findProperty1() {
|
|
2143
2161
|
return findProperty;
|
|
2144
2162
|
},
|
|
2145
|
-
findPropertyIndex: function() {
|
|
2163
|
+
findPropertyIndex: function findPropertyIndex1() {
|
|
2146
2164
|
return findPropertyIndex;
|
|
2147
2165
|
},
|
|
2148
|
-
floor: function() {
|
|
2166
|
+
floor: function floor1() {
|
|
2149
2167
|
return floor;
|
|
2150
2168
|
},
|
|
2151
|
-
isEmpty: function() {
|
|
2169
|
+
isEmpty: function isEmpty1() {
|
|
2152
2170
|
return isEmpty;
|
|
2153
2171
|
},
|
|
2154
|
-
isNotEmpty: function() {
|
|
2172
|
+
isNotEmpty: function isNotEmpty1() {
|
|
2155
2173
|
return isNotEmpty;
|
|
2156
2174
|
},
|
|
2157
|
-
length: function() {
|
|
2175
|
+
length: function length1() {
|
|
2158
2176
|
return length;
|
|
2159
2177
|
},
|
|
2160
|
-
lowerCase: function() {
|
|
2178
|
+
lowerCase: function lowerCase1() {
|
|
2161
2179
|
return lowerCase;
|
|
2162
2180
|
},
|
|
2163
|
-
number: function() {
|
|
2181
|
+
number: function number1() {
|
|
2164
2182
|
return number;
|
|
2165
2183
|
},
|
|
2166
|
-
replace: function() {
|
|
2184
|
+
replace: function replace1() {
|
|
2167
2185
|
return replace;
|
|
2168
2186
|
},
|
|
2169
|
-
round: function() {
|
|
2187
|
+
round: function round1() {
|
|
2170
2188
|
return round;
|
|
2171
2189
|
},
|
|
2172
|
-
sentenceCase: function() {
|
|
2190
|
+
sentenceCase: function sentenceCase1() {
|
|
2173
2191
|
return sentenceCase;
|
|
2174
2192
|
},
|
|
2175
|
-
size: function() {
|
|
2193
|
+
size: function size1() {
|
|
2176
2194
|
return size;
|
|
2177
2195
|
},
|
|
2178
|
-
split: function() {
|
|
2196
|
+
split: function split1() {
|
|
2179
2197
|
return split;
|
|
2180
2198
|
},
|
|
2181
|
-
substr: function() {
|
|
2199
|
+
substr: function substr1() {
|
|
2182
2200
|
return substr;
|
|
2183
2201
|
},
|
|
2184
|
-
sum: function() {
|
|
2202
|
+
sum: function sum1() {
|
|
2185
2203
|
return sum;
|
|
2186
2204
|
},
|
|
2187
|
-
titleCase: function() {
|
|
2205
|
+
titleCase: function titleCase1() {
|
|
2188
2206
|
return titleCase;
|
|
2189
2207
|
},
|
|
2190
|
-
trim: function() {
|
|
2208
|
+
trim: function trim1() {
|
|
2191
2209
|
return trim;
|
|
2192
2210
|
},
|
|
2193
|
-
upperCase: function() {
|
|
2211
|
+
upperCase: function upperCase1() {
|
|
2194
2212
|
return upperCase;
|
|
2195
2213
|
}
|
|
2196
2214
|
});
|
|
@@ -2636,7 +2654,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2636
2654
|
}
|
|
2637
2655
|
return pairs;
|
|
2638
2656
|
}
|
|
2639
|
-
var createSortedArray = function() {
|
|
2657
|
+
var createSortedArray = function createSortedArray() {
|
|
2640
2658
|
return new import_sorted_array.default([], function(c) {
|
|
2641
2659
|
return c.matcher.count;
|
|
2642
2660
|
});
|
|
@@ -2732,38 +2750,38 @@ var CommonExpressionsPlugin = function() {
|
|
|
2732
2750
|
}();
|
|
2733
2751
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-ui+player@0.0.0/node_modules/@player-ui/player/dist/index.mjs
|
|
2734
2752
|
var __defProp2 = Object.defineProperty;
|
|
2735
|
-
var __export2 = function(target, all) {
|
|
2753
|
+
var __export2 = function __export2(target, all) {
|
|
2736
2754
|
for(var name in all)__defProp2(target, name, {
|
|
2737
2755
|
get: all[name],
|
|
2738
2756
|
enumerable: true
|
|
2739
2757
|
});
|
|
2740
2758
|
};
|
|
2741
|
-
var toValue = function(value) {
|
|
2759
|
+
var toValue = function toValue(value) {
|
|
2742
2760
|
return {
|
|
2743
2761
|
name: "Value",
|
|
2744
2762
|
value: value
|
|
2745
2763
|
};
|
|
2746
2764
|
};
|
|
2747
|
-
var toExpression = function(value) {
|
|
2765
|
+
var toExpression = function toExpression(value) {
|
|
2748
2766
|
return {
|
|
2749
2767
|
name: "Expression",
|
|
2750
2768
|
value: value
|
|
2751
2769
|
};
|
|
2752
2770
|
};
|
|
2753
|
-
var toPath = function(path) {
|
|
2771
|
+
var toPath = function toPath(path) {
|
|
2754
2772
|
return {
|
|
2755
2773
|
name: "PathNode",
|
|
2756
2774
|
path: path
|
|
2757
2775
|
};
|
|
2758
2776
|
};
|
|
2759
|
-
var toQuery = function(key, value) {
|
|
2777
|
+
var toQuery = function toQuery(key, value) {
|
|
2760
2778
|
return {
|
|
2761
2779
|
name: "Query",
|
|
2762
2780
|
key: key,
|
|
2763
2781
|
value: value
|
|
2764
2782
|
};
|
|
2765
2783
|
};
|
|
2766
|
-
var toConcatenatedNode = function(values) {
|
|
2784
|
+
var toConcatenatedNode = function toConcatenatedNode(values) {
|
|
2767
2785
|
if (values.length === 1) {
|
|
2768
2786
|
return values[0];
|
|
2769
2787
|
}
|
|
@@ -2781,7 +2799,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2781
2799
|
var SINGLE_QUOTE = "'";
|
|
2782
2800
|
var DOUBLE_QUOTE = '"';
|
|
2783
2801
|
var BACK_TICK = "`";
|
|
2784
|
-
var isIdentifierChar = function(char) {
|
|
2802
|
+
var isIdentifierChar = function isIdentifierChar(char) {
|
|
2785
2803
|
if (!char) {
|
|
2786
2804
|
return false;
|
|
2787
2805
|
}
|
|
@@ -2801,10 +2819,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
2801
2819
|
charCode === 125;
|
|
2802
2820
|
return !matches;
|
|
2803
2821
|
};
|
|
2804
|
-
var parse = function(path) {
|
|
2822
|
+
var parse = function parse(path) {
|
|
2805
2823
|
var index = 1;
|
|
2806
2824
|
var ch = path.charAt(0);
|
|
2807
|
-
var next = function(expected) {
|
|
2825
|
+
var next = function next(expected) {
|
|
2808
2826
|
if (expected && ch !== expected) {
|
|
2809
2827
|
throw new Error("Expected char: ".concat(expected, " but got: ").concat(ch));
|
|
2810
2828
|
}
|
|
@@ -2812,12 +2830,12 @@ var CommonExpressionsPlugin = function() {
|
|
|
2812
2830
|
index += 1;
|
|
2813
2831
|
return ch;
|
|
2814
2832
|
};
|
|
2815
|
-
var whitespace = function() {
|
|
2833
|
+
var whitespace = function whitespace() {
|
|
2816
2834
|
while(ch === " "){
|
|
2817
2835
|
next();
|
|
2818
2836
|
}
|
|
2819
2837
|
};
|
|
2820
|
-
var identifier = function() {
|
|
2838
|
+
var identifier = function identifier() {
|
|
2821
2839
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2822
2840
|
if (!isIdentifierChar(ch)) {
|
|
2823
2841
|
return;
|
|
@@ -2843,7 +2861,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2843
2861
|
return toValue(value);
|
|
2844
2862
|
}
|
|
2845
2863
|
};
|
|
2846
|
-
var expression = function() {
|
|
2864
|
+
var expression = function expression() {
|
|
2847
2865
|
if (ch === BACK_TICK) {
|
|
2848
2866
|
next(BACK_TICK);
|
|
2849
2867
|
var exp = ch;
|
|
@@ -2859,7 +2877,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2859
2877
|
}
|
|
2860
2878
|
}
|
|
2861
2879
|
};
|
|
2862
|
-
var regex = function(match) {
|
|
2880
|
+
var regex = function regex(match) {
|
|
2863
2881
|
if (!(ch === null || ch === void 0 ? void 0 : ch.match(match))) {
|
|
2864
2882
|
return;
|
|
2865
2883
|
}
|
|
@@ -2874,7 +2892,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2874
2892
|
return toValue(value);
|
|
2875
2893
|
}
|
|
2876
2894
|
};
|
|
2877
|
-
var nestedPath = function() {
|
|
2895
|
+
var nestedPath = function nestedPath() {
|
|
2878
2896
|
if (ch === OPEN_CURL) {
|
|
2879
2897
|
next(OPEN_CURL);
|
|
2880
2898
|
next(OPEN_CURL);
|
|
@@ -2884,12 +2902,12 @@ var CommonExpressionsPlugin = function() {
|
|
|
2884
2902
|
return modelRef;
|
|
2885
2903
|
}
|
|
2886
2904
|
};
|
|
2887
|
-
var simpleSegment = function() {
|
|
2905
|
+
var simpleSegment = function simpleSegment() {
|
|
2888
2906
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2889
|
-
var
|
|
2907
|
+
var _ref, _nestedPath;
|
|
2890
2908
|
return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
|
|
2891
2909
|
};
|
|
2892
|
-
var segment = function() {
|
|
2910
|
+
var segment = function segment() {
|
|
2893
2911
|
var segments = [];
|
|
2894
2912
|
var nextSegment = simpleSegment();
|
|
2895
2913
|
while(nextSegment !== void 0){
|
|
@@ -2901,7 +2919,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2901
2919
|
}
|
|
2902
2920
|
return toConcatenatedNode(segments);
|
|
2903
2921
|
};
|
|
2904
|
-
var optionallyQuotedSegment = function() {
|
|
2922
|
+
var optionallyQuotedSegment = function optionallyQuotedSegment() {
|
|
2905
2923
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2906
2924
|
whitespace();
|
|
2907
2925
|
if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
|
|
@@ -2913,7 +2931,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2913
2931
|
}
|
|
2914
2932
|
return simpleSegment(allowBoolValue);
|
|
2915
2933
|
};
|
|
2916
|
-
var equals = function() {
|
|
2934
|
+
var equals = function equals() {
|
|
2917
2935
|
if (ch !== EQUALS) {
|
|
2918
2936
|
return false;
|
|
2919
2937
|
}
|
|
@@ -2922,7 +2940,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2922
2940
|
}
|
|
2923
2941
|
return true;
|
|
2924
2942
|
};
|
|
2925
|
-
var parseBracket = function() {
|
|
2943
|
+
var parseBracket = function parseBracket() {
|
|
2926
2944
|
if (ch === OPEN_BRACKET) {
|
|
2927
2945
|
next(OPEN_BRACKET);
|
|
2928
2946
|
whitespace();
|
|
@@ -2944,7 +2962,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2944
2962
|
return value;
|
|
2945
2963
|
}
|
|
2946
2964
|
};
|
|
2947
|
-
var parseSegmentAndBrackets = function() {
|
|
2965
|
+
var parseSegmentAndBrackets = function parseSegmentAndBrackets() {
|
|
2948
2966
|
var parsed = [];
|
|
2949
2967
|
var firstSegment = segment();
|
|
2950
2968
|
if (firstSegment) {
|
|
@@ -2961,7 +2979,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
2961
2979
|
}
|
|
2962
2980
|
return parsed;
|
|
2963
2981
|
};
|
|
2964
|
-
var parsePath = function() {
|
|
2982
|
+
var parsePath = function parsePath() {
|
|
2965
2983
|
var parts = [];
|
|
2966
2984
|
var nextSegment = parseSegmentAndBrackets();
|
|
2967
2985
|
while(nextSegment !== void 0){
|
|
@@ -3072,6 +3090,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
3072
3090
|
return _BindingInstance;
|
|
3073
3091
|
}();
|
|
3074
3092
|
function resolveBindingAST(bindingPathNode, options, hooks) {
|
|
3093
|
+
var _context_updates;
|
|
3075
3094
|
var context = {
|
|
3076
3095
|
updates: {},
|
|
3077
3096
|
path: []
|
|
@@ -3111,8 +3130,8 @@ var CommonExpressionsPlugin = function() {
|
|
|
3111
3130
|
}
|
|
3112
3131
|
}
|
|
3113
3132
|
function resolveNode(_node) {
|
|
3114
|
-
var
|
|
3115
|
-
var resolvedNode = (
|
|
3133
|
+
var _ref;
|
|
3134
|
+
var resolvedNode = (_ref = hooks === null || hooks === void 0 ? void 0 : hooks.beforeResolveNode.call(_node, _object_spread({}, context, options))) !== null && _ref !== void 0 ? _ref : _node;
|
|
3116
3135
|
switch(resolvedNode.name){
|
|
3117
3136
|
case "Expression":
|
|
3118
3137
|
case "PathNode":
|
|
@@ -3148,7 +3167,6 @@ var CommonExpressionsPlugin = function() {
|
|
|
3148
3167
|
}
|
|
3149
3168
|
}
|
|
3150
3169
|
bindingPathNode.path.forEach(resolveNode);
|
|
3151
|
-
var _context_updates;
|
|
3152
3170
|
return {
|
|
3153
3171
|
path: context.path,
|
|
3154
3172
|
updates: Object.keys((_context_updates = context.updates) !== null && _context_updates !== void 0 ? _context_updates : {}).length > 0 ? context.updates : void 0
|
|
@@ -3157,13 +3175,13 @@ var CommonExpressionsPlugin = function() {
|
|
|
3157
3175
|
var BINDING_BRACKETS_REGEX = /[\s()*=`{}'"[\]]/;
|
|
3158
3176
|
var LAZY_BINDING_REGEX = /^[^.]+(\..+)*$/;
|
|
3159
3177
|
var DEFAULT_OPTIONS = {
|
|
3160
|
-
get: function() {
|
|
3178
|
+
get: function get() {
|
|
3161
3179
|
throw new Error("Not Implemented");
|
|
3162
3180
|
},
|
|
3163
|
-
set: function() {
|
|
3181
|
+
set: function set() {
|
|
3164
3182
|
throw new Error("Not Implemented");
|
|
3165
3183
|
},
|
|
3166
|
-
evaluate: function() {
|
|
3184
|
+
evaluate: function evaluate() {
|
|
3167
3185
|
throw new Error("Not Implemented");
|
|
3168
3186
|
}
|
|
3169
3187
|
};
|
|
@@ -3186,18 +3204,18 @@ var CommonExpressionsPlugin = function() {
|
|
|
3186
3204
|
* representation of that path.
|
|
3187
3205
|
*/ key: "normalizePath",
|
|
3188
3206
|
value: function normalizePath(path, resolveOptions) {
|
|
3207
|
+
var _this_parseCache_path;
|
|
3189
3208
|
if (!BINDING_BRACKETS_REGEX.test(path) && LAZY_BINDING_REGEX.test(path) && this.hooks.skipOptimization.call(path) !== true) {
|
|
3190
3209
|
return {
|
|
3191
3210
|
path: path.split("."),
|
|
3192
3211
|
updates: void 0
|
|
3193
3212
|
};
|
|
3194
3213
|
}
|
|
3195
|
-
var _this_parseCache_path;
|
|
3196
3214
|
var ast = (_this_parseCache_path = this.parseCache[path]) !== null && _this_parseCache_path !== void 0 ? _this_parseCache_path : parse(path);
|
|
3197
3215
|
this.parseCache[path] = ast;
|
|
3198
3216
|
if ((typeof ast === "undefined" ? "undefined" : _type_of(ast)) !== "object" || !(ast === null || ast === void 0 ? void 0 : ast.status)) {
|
|
3199
|
-
var
|
|
3200
|
-
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((
|
|
3217
|
+
var _ref;
|
|
3218
|
+
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((_ref = ast === null || ast === void 0 ? void 0 : ast.error) !== null && _ref !== void 0 ? _ref : "Unknown Error."));
|
|
3201
3219
|
}
|
|
3202
3220
|
try {
|
|
3203
3221
|
return resolveBindingAST(ast.path, resolveOptions, this.hooks);
|
|
@@ -3230,14 +3248,14 @@ var CommonExpressionsPlugin = function() {
|
|
|
3230
3248
|
var updates = {};
|
|
3231
3249
|
var joined = Array.isArray(rawBinding) ? rawBinding.join(".") : String(rawBinding);
|
|
3232
3250
|
var normalizeConfig = {
|
|
3233
|
-
getValue: function(path) {
|
|
3251
|
+
getValue: function getValue(path) {
|
|
3234
3252
|
var normalized2 = _this.normalizePath(path.join("."), normalizeConfig);
|
|
3235
3253
|
return options.get(_this.getBindingForNormalizedResult(normalized2));
|
|
3236
3254
|
},
|
|
3237
|
-
evaluate: function(exp) {
|
|
3255
|
+
evaluate: function evaluate(exp) {
|
|
3238
3256
|
return options.evaluate(exp);
|
|
3239
3257
|
},
|
|
3240
|
-
convertToPath: function(path) {
|
|
3258
|
+
convertToPath: function convertToPath(path) {
|
|
3241
3259
|
if (path === void 0) {
|
|
3242
3260
|
throw new Error("Attempted to convert undefined value to binding path");
|
|
3243
3261
|
}
|
|
@@ -3302,9 +3320,9 @@ var CommonExpressionsPlugin = function() {
|
|
|
3302
3320
|
/** Grab all of the bindings that this depended on */ key: "getDependencies",
|
|
3303
3321
|
value: function getDependencies(name) {
|
|
3304
3322
|
if (name !== void 0) {
|
|
3323
|
+
var _ref;
|
|
3305
3324
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3306
|
-
|
|
3307
|
-
return (_this_namedDependencySets_name_readDeps = (_this_namedDependencySets = this.namedDependencySets) === null || _this_namedDependencySets === void 0 ? void 0 : (_this_namedDependencySets_name = _this_namedDependencySets[name]) === null || _this_namedDependencySets_name === void 0 ? void 0 : _this_namedDependencySets_name.readDeps) !== null && _this_namedDependencySets_name_readDeps !== void 0 ? _this_namedDependencySets_name_readDeps : /* @__PURE__ */ new Set();
|
|
3325
|
+
return (_ref = (_this_namedDependencySets = this.namedDependencySets) === null || _this_namedDependencySets === void 0 ? void 0 : (_this_namedDependencySets_name = _this_namedDependencySets[name]) === null || _this_namedDependencySets_name === void 0 ? void 0 : _this_namedDependencySets_name.readDeps) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
3308
3326
|
}
|
|
3309
3327
|
return this.readDeps;
|
|
3310
3328
|
}
|
|
@@ -3326,9 +3344,9 @@ var CommonExpressionsPlugin = function() {
|
|
|
3326
3344
|
/** Grab all of the bindings this wrote to */ key: "getModified",
|
|
3327
3345
|
value: function getModified(name) {
|
|
3328
3346
|
if (name !== void 0) {
|
|
3347
|
+
var _ref;
|
|
3329
3348
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3330
|
-
|
|
3331
|
-
return (_this_namedDependencySets_name_writeDeps = (_this_namedDependencySets = this.namedDependencySets) === null || _this_namedDependencySets === void 0 ? void 0 : (_this_namedDependencySets_name = _this_namedDependencySets[name]) === null || _this_namedDependencySets_name === void 0 ? void 0 : _this_namedDependencySets_name.writeDeps) !== null && _this_namedDependencySets_name_writeDeps !== void 0 ? _this_namedDependencySets_name_writeDeps : /* @__PURE__ */ new Set();
|
|
3349
|
+
return (_ref = (_this_namedDependencySets = this.namedDependencySets) === null || _this_namedDependencySets === void 0 ? void 0 : (_this_namedDependencySets_name = _this_namedDependencySets[name]) === null || _this_namedDependencySets_name === void 0 ? void 0 : _this_namedDependencySets_name.writeDeps) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
3332
3350
|
}
|
|
3333
3351
|
return this.writeDeps;
|
|
3334
3352
|
}
|
|
@@ -3650,19 +3668,19 @@ var CommonExpressionsPlugin = function() {
|
|
|
3650
3668
|
var thisStr = "this";
|
|
3651
3669
|
var evaluator_functions_exports = {};
|
|
3652
3670
|
__export2(evaluator_functions_exports, {
|
|
3653
|
-
conditional: function() {
|
|
3671
|
+
conditional: function conditional1() {
|
|
3654
3672
|
return conditional;
|
|
3655
3673
|
},
|
|
3656
|
-
deleteDataVal: function() {
|
|
3674
|
+
deleteDataVal: function deleteDataVal1() {
|
|
3657
3675
|
return deleteDataVal;
|
|
3658
3676
|
},
|
|
3659
|
-
getDataVal: function() {
|
|
3677
|
+
getDataVal: function getDataVal1() {
|
|
3660
3678
|
return getDataVal;
|
|
3661
3679
|
},
|
|
3662
|
-
setDataVal: function() {
|
|
3680
|
+
setDataVal: function setDataVal1() {
|
|
3663
3681
|
return setDataVal;
|
|
3664
3682
|
},
|
|
3665
|
-
waitFor: function() {
|
|
3683
|
+
waitFor: function waitFor1() {
|
|
3666
3684
|
return waitFor;
|
|
3667
3685
|
}
|
|
3668
3686
|
});
|
|
@@ -3674,7 +3692,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
3674
3692
|
};
|
|
3675
3693
|
return promise;
|
|
3676
3694
|
}
|
|
3677
|
-
var setDataVal = function(_context, binding, value) {
|
|
3695
|
+
var setDataVal = function setDataVal(_context, binding, value) {
|
|
3678
3696
|
_context.model.set([
|
|
3679
3697
|
[
|
|
3680
3698
|
binding,
|
|
@@ -3682,13 +3700,13 @@ var CommonExpressionsPlugin = function() {
|
|
|
3682
3700
|
]
|
|
3683
3701
|
]);
|
|
3684
3702
|
};
|
|
3685
|
-
var getDataVal = function(_context, binding) {
|
|
3703
|
+
var getDataVal = function getDataVal(_context, binding) {
|
|
3686
3704
|
return _context.model.get(binding);
|
|
3687
3705
|
};
|
|
3688
|
-
var deleteDataVal = function(_context, binding) {
|
|
3706
|
+
var deleteDataVal = function deleteDataVal(_context, binding) {
|
|
3689
3707
|
return _context.model.delete(binding);
|
|
3690
3708
|
};
|
|
3691
|
-
var conditional = function(ctx, condition, ifTrue, ifFalse) {
|
|
3709
|
+
var conditional = function conditional(ctx, condition, ifTrue, ifFalse) {
|
|
3692
3710
|
var testResult = ctx.evaluate(condition);
|
|
3693
3711
|
if (isAwaitable(testResult)) {
|
|
3694
3712
|
return testResult.awaitableThen(function(resolvedTest) {
|
|
@@ -3710,14 +3728,14 @@ var CommonExpressionsPlugin = function() {
|
|
|
3710
3728
|
return null;
|
|
3711
3729
|
};
|
|
3712
3730
|
conditional.resolveParams = false;
|
|
3713
|
-
var waitFor = function(ctx, promise) {
|
|
3731
|
+
var waitFor = function waitFor(ctx, promise) {
|
|
3714
3732
|
return makeAwaitable(promise);
|
|
3715
3733
|
};
|
|
3716
|
-
var andandOperator = function(ctx, a, b, async) {
|
|
3734
|
+
var andandOperator = function andandOperator(ctx, a, b, async) {
|
|
3717
3735
|
return LogicalOperators.and(ctx, a, b, async);
|
|
3718
3736
|
};
|
|
3719
3737
|
andandOperator.resolveParams = false;
|
|
3720
|
-
var ororOperator = function(ctx, a, b, async) {
|
|
3738
|
+
var ororOperator = function ororOperator(ctx, a, b, async) {
|
|
3721
3739
|
return LogicalOperators.or(ctx, a, b, async);
|
|
3722
3740
|
};
|
|
3723
3741
|
ororOperator.resolveParams = false;
|
|
@@ -3843,7 +3861,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
3843
3861
|
}
|
|
3844
3862
|
};
|
|
3845
3863
|
var LogicalOperators = {
|
|
3846
|
-
and: function(ctx, leftNode, rightNode, async) {
|
|
3864
|
+
and: function and(ctx, leftNode, rightNode, async) {
|
|
3847
3865
|
var leftResult = ctx.evaluate(leftNode);
|
|
3848
3866
|
if (async && isAwaitable(leftResult)) {
|
|
3849
3867
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3854,7 +3872,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
3854
3872
|
}
|
|
3855
3873
|
return leftResult && ctx.evaluate(rightNode);
|
|
3856
3874
|
},
|
|
3857
|
-
or: function(ctx, leftNode, rightNode, async) {
|
|
3875
|
+
or: function or(ctx, leftNode, rightNode, async) {
|
|
3858
3876
|
var leftResult = ctx.evaluate(leftNode);
|
|
3859
3877
|
if (async && isAwaitable(leftResult)) {
|
|
3860
3878
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3892,10 +3910,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
3892
3910
|
]))
|
|
3893
3911
|
};
|
|
3894
3912
|
this.defaultHookOptions = _object_spread_props(_object_spread({}, defaultOptions), {
|
|
3895
|
-
evaluate: function(expr) {
|
|
3913
|
+
evaluate: function evaluate(expr) {
|
|
3896
3914
|
return _this.evaluate(expr, _this.defaultHookOptions);
|
|
3897
3915
|
},
|
|
3898
|
-
resolveNode: function(node) {
|
|
3916
|
+
resolveNode: function resolveNode(node) {
|
|
3899
3917
|
return _this._execAST(node, _this.defaultHookOptions);
|
|
3900
3918
|
}
|
|
3901
3919
|
});
|
|
@@ -3915,12 +3933,12 @@ var CommonExpressionsPlugin = function() {
|
|
|
3915
3933
|
key: "evaluate",
|
|
3916
3934
|
value: function evaluate(expr, options) {
|
|
3917
3935
|
var _this = this;
|
|
3936
|
+
var _this_hooks_beforeEvaluate_call;
|
|
3918
3937
|
var resolvedOpts = this.hooks.resolveOptions.call(_object_spread_props(_object_spread({}, this.defaultHookOptions, options), {
|
|
3919
|
-
resolveNode: function(node) {
|
|
3938
|
+
resolveNode: function resolveNode(node) {
|
|
3920
3939
|
return _this._execAST(node, resolvedOpts);
|
|
3921
3940
|
}
|
|
3922
3941
|
}));
|
|
3923
|
-
var _this_hooks_beforeEvaluate_call;
|
|
3924
3942
|
var expression = (_this_hooks_beforeEvaluate_call = this.hooks.beforeEvaluate.call(expr, resolvedOpts)) !== null && _this_hooks_beforeEvaluate_call !== void 0 ? _this_hooks_beforeEvaluate_call : expr;
|
|
3925
3943
|
while(isObjectExpression(expression)){
|
|
3926
3944
|
expression = expression.value;
|
|
@@ -4044,11 +4062,11 @@ var CommonExpressionsPlugin = function() {
|
|
|
4044
4062
|
key: "_resolveNode",
|
|
4045
4063
|
value: function _resolveNode(_currentValue, node, options) {
|
|
4046
4064
|
var _this = this;
|
|
4047
|
-
var resolveNode = options.resolveNode, model = options.model;
|
|
4048
4065
|
var _options_async;
|
|
4066
|
+
var resolveNode = options.resolveNode, model = options.model;
|
|
4049
4067
|
var isAsync = (_options_async = options.async) !== null && _options_async !== void 0 ? _options_async : false;
|
|
4050
4068
|
var expressionContext = _object_spread_props(_object_spread({}, options), {
|
|
4051
|
-
evaluate: function(expr) {
|
|
4069
|
+
evaluate: function evaluate(expr) {
|
|
4052
4070
|
return _this.evaluate(expr, options);
|
|
4053
4071
|
}
|
|
4054
4072
|
});
|
|
@@ -4382,7 +4400,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
4382
4400
|
]);
|
|
4383
4401
|
return ProxyLogger;
|
|
4384
4402
|
}();
|
|
4385
|
-
var identify = function(val) {
|
|
4403
|
+
var identify = function identify(val) {
|
|
4386
4404
|
return val;
|
|
4387
4405
|
};
|
|
4388
4406
|
var SchemaController = /*#__PURE__*/ function() {
|
|
@@ -4470,6 +4488,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
4470
4488
|
{
|
|
4471
4489
|
key: "getApparentType",
|
|
4472
4490
|
value: function getApparentType(binding) {
|
|
4491
|
+
var _schemaType_validation, _baseType_validation;
|
|
4473
4492
|
var schemaType = this.getType(binding);
|
|
4474
4493
|
if (schemaType === void 0) {
|
|
4475
4494
|
return void 0;
|
|
@@ -4478,7 +4497,6 @@ var CommonExpressionsPlugin = function() {
|
|
|
4478
4497
|
if (baseType === void 0) {
|
|
4479
4498
|
return schemaType;
|
|
4480
4499
|
}
|
|
4481
|
-
var _schemaType_validation, _baseType_validation;
|
|
4482
4500
|
return _object_spread_props(_object_spread({}, baseType, schemaType), {
|
|
4483
4501
|
validation: _to_consumable_array((_schemaType_validation = schemaType.validation) !== null && _schemaType_validation !== void 0 ? _schemaType_validation : []).concat(_to_consumable_array((_baseType_validation = baseType.validation) !== null && _baseType_validation !== void 0 ? _baseType_validation : []))
|
|
4484
4502
|
});
|
|
@@ -4627,10 +4645,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
4627
4645
|
{
|
|
4628
4646
|
key: "get",
|
|
4629
4647
|
value: function get(binding, options, next) {
|
|
4648
|
+
var _ref;
|
|
4630
4649
|
var _this_shouldIncludeInvalid, _this;
|
|
4631
4650
|
var val = next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
4632
|
-
|
|
4633
|
-
if ((_this_shouldIncludeInvalid1 = (_this_shouldIncludeInvalid = (_this = this).shouldIncludeInvalid) === null || _this_shouldIncludeInvalid === void 0 ? void 0 : _this_shouldIncludeInvalid.call(_this, options)) !== null && _this_shouldIncludeInvalid1 !== void 0 ? _this_shouldIncludeInvalid1 : (options === null || options === void 0 ? void 0 : options.includeInvalid) === true) {
|
|
4651
|
+
if ((_ref = (_this_shouldIncludeInvalid = (_this = this).shouldIncludeInvalid) === null || _this_shouldIncludeInvalid === void 0 ? void 0 : _this_shouldIncludeInvalid.call(_this, options)) !== null && _ref !== void 0 ? _ref : (options === null || options === void 0 ? void 0 : options.includeInvalid) === true) {
|
|
4634
4652
|
this.shadowModelPaths.forEach(function(shadowValue, shadowBinding) {
|
|
4635
4653
|
if (shadowBinding === binding) {
|
|
4636
4654
|
val = shadowValue;
|
|
@@ -4715,11 +4733,12 @@ var CommonExpressionsPlugin = function() {
|
|
|
4715
4733
|
templateDepth: 0
|
|
4716
4734
|
};
|
|
4717
4735
|
var _this = this;
|
|
4736
|
+
var _this_hooks_onCreateASTNode_call;
|
|
4718
4737
|
var parsedNode = this.hooks.parseNode.call(obj, type, options);
|
|
4719
4738
|
if (parsedNode || parsedNode === null) {
|
|
4720
4739
|
return parsedNode;
|
|
4721
4740
|
}
|
|
4722
|
-
var parseLocalObject = function(currentValue, objToParse) {
|
|
4741
|
+
var parseLocalObject = function parseLocalObject1(currentValue, objToParse) {
|
|
4723
4742
|
var path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
4724
4743
|
if ((typeof objToParse === "undefined" ? "undefined" : _type_of(objToParse)) !== "object" || objToParse === null) {
|
|
4725
4744
|
return {
|
|
@@ -4789,30 +4808,29 @@ var CommonExpressionsPlugin = function() {
|
|
|
4789
4808
|
child.value.parent = parent;
|
|
4790
4809
|
});
|
|
4791
4810
|
}
|
|
4792
|
-
var _this_hooks_onCreateASTNode_call;
|
|
4793
4811
|
return (_this_hooks_onCreateASTNode_call = this.hooks.onCreateASTNode.call(baseAst, obj)) !== null && _this_hooks_onCreateASTNode_call !== void 0 ? _this_hooks_onCreateASTNode_call : null;
|
|
4794
4812
|
}
|
|
4795
4813
|
}
|
|
4796
4814
|
]);
|
|
4797
4815
|
return Parser;
|
|
4798
4816
|
}();
|
|
4799
|
-
var withContext = function(model) {
|
|
4817
|
+
var withContext = function withContext(model) {
|
|
4800
4818
|
return {
|
|
4801
|
-
get: function(binding, options) {
|
|
4819
|
+
get: function get(binding, options) {
|
|
4802
4820
|
return model.get(binding, _object_spread({
|
|
4803
4821
|
context: {
|
|
4804
4822
|
model: model
|
|
4805
4823
|
}
|
|
4806
4824
|
}, options));
|
|
4807
4825
|
},
|
|
4808
|
-
set: function(transaction, options) {
|
|
4826
|
+
set: function set(transaction, options) {
|
|
4809
4827
|
return model.set(transaction, _object_spread({
|
|
4810
4828
|
context: {
|
|
4811
4829
|
model: model
|
|
4812
4830
|
}
|
|
4813
4831
|
}, options));
|
|
4814
4832
|
},
|
|
4815
|
-
delete: function(binding, options) {
|
|
4833
|
+
delete: function _delete(binding, options) {
|
|
4816
4834
|
return model.delete(binding, _object_spread({
|
|
4817
4835
|
context: {
|
|
4818
4836
|
model: model
|
|
@@ -4851,16 +4869,16 @@ var CommonExpressionsPlugin = function() {
|
|
|
4851
4869
|
{
|
|
4852
4870
|
key: "update",
|
|
4853
4871
|
value: function update(dataChanges, nodeChanges) {
|
|
4872
|
+
var _ref;
|
|
4854
4873
|
this.hooks.beforeUpdate.call(dataChanges);
|
|
4855
4874
|
var resolveCache = /* @__PURE__ */ new Map();
|
|
4856
4875
|
this.idCache.clear();
|
|
4857
4876
|
var prevASTMap = new Map(this.ASTMap);
|
|
4858
4877
|
this.ASTMap.clear();
|
|
4859
4878
|
var realNodeChanges = /* @__PURE__ */ new Set();
|
|
4860
|
-
var _nodeChanges_values;
|
|
4861
4879
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4862
4880
|
try {
|
|
4863
|
-
for(var _iterator = ((
|
|
4881
|
+
for(var _iterator = ((_ref = nodeChanges === null || nodeChanges === void 0 ? void 0 : nodeChanges.values()) !== null && _ref !== void 0 ? _ref : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4864
4882
|
var node = _step.value;
|
|
4865
4883
|
var current = node;
|
|
4866
4884
|
while(current){
|
|
@@ -4943,6 +4961,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
4943
4961
|
key: "computeTree",
|
|
4944
4962
|
value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nodeChanges) {
|
|
4945
4963
|
var _this = this;
|
|
4964
|
+
var _this_hooks_beforeResolve_call;
|
|
4946
4965
|
var dependencyModel = new DependencyModel(options.data.model);
|
|
4947
4966
|
dependencyModel.trackSubset("core");
|
|
4948
4967
|
var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
|
|
@@ -4950,7 +4969,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
4950
4969
|
data: _object_spread_props(_object_spread({}, options.data), {
|
|
4951
4970
|
model: depModelWithParser
|
|
4952
4971
|
}),
|
|
4953
|
-
evaluate: function(exp) {
|
|
4972
|
+
evaluate: function evaluate(exp) {
|
|
4954
4973
|
return _this.options.evaluator.evaluate(exp, {
|
|
4955
4974
|
model: depModelWithParser
|
|
4956
4975
|
});
|
|
@@ -4966,14 +4985,14 @@ var CommonExpressionsPlugin = function() {
|
|
|
4966
4985
|
var update2 = _object_spread_props(_object_spread({}, previousResult), {
|
|
4967
4986
|
updated: false
|
|
4968
4987
|
});
|
|
4969
|
-
var repopulateASTMapFromCache = function(resolvedNode, AST, ASTParent) {
|
|
4988
|
+
var repopulateASTMapFromCache = function repopulateASTMapFromCache1(resolvedNode, AST, ASTParent) {
|
|
4970
4989
|
var resolvedASTLocal = resolvedNode.node;
|
|
4971
4990
|
_this.ASTMap.set(resolvedASTLocal, AST);
|
|
4972
4991
|
var resolvedUpdate = _object_spread_props(_object_spread({}, resolvedNode), {
|
|
4973
4992
|
updated: false
|
|
4974
4993
|
});
|
|
4975
4994
|
cacheUpdate.set(AST, resolvedUpdate);
|
|
4976
|
-
var handleChildNode = function(childNode) {
|
|
4995
|
+
var handleChildNode = function handleChildNode(childNode) {
|
|
4977
4996
|
var _prevASTMap_get;
|
|
4978
4997
|
var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
|
|
4979
4998
|
var previousChildResult = _this.getPreviousResult(originalChildNode);
|
|
@@ -4998,7 +5017,6 @@ var CommonExpressionsPlugin = function() {
|
|
|
4998
5017
|
var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
|
|
4999
5018
|
parent: partiallyResolvedParent
|
|
5000
5019
|
});
|
|
5001
|
-
var _this_hooks_beforeResolve_call;
|
|
5002
5020
|
var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
|
|
5003
5021
|
type: "empty"
|
|
5004
5022
|
};
|
|
@@ -5058,7 +5076,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
5058
5076
|
resolved = previousResult === null || previousResult === void 0 ? void 0 : previousResult.value;
|
|
5059
5077
|
}
|
|
5060
5078
|
resolved = this.hooks.afterResolve.call(resolved, resolvedAST, _object_spread_props(_object_spread({}, resolveOptions), {
|
|
5061
|
-
getDependencies: function(scope) {
|
|
5079
|
+
getDependencies: function getDependencies(scope) {
|
|
5062
5080
|
return dependencyModel.getDependencies(scope);
|
|
5063
5081
|
}
|
|
5064
5082
|
}));
|
|
@@ -5368,7 +5386,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
5368
5386
|
]);
|
|
5369
5387
|
return TemplatePlugin;
|
|
5370
5388
|
}();
|
|
5371
|
-
var createPatternMatcher = function(start, end) {
|
|
5389
|
+
var createPatternMatcher = function createPatternMatcher(start, end) {
|
|
5372
5390
|
return function(testStr) {
|
|
5373
5391
|
var startLocation = testStr.indexOf(start);
|
|
5374
5392
|
if (startLocation === -1) {
|
|
@@ -5408,18 +5426,18 @@ var CommonExpressionsPlugin = function() {
|
|
|
5408
5426
|
});
|
|
5409
5427
|
return newNode;
|
|
5410
5428
|
}
|
|
5411
|
-
var findBasePath = function(node, resolver) {
|
|
5429
|
+
var findBasePath = function findBasePath1(node, resolver) {
|
|
5412
5430
|
var parentNode = node.parent;
|
|
5413
5431
|
if (!parentNode) {
|
|
5414
5432
|
return [];
|
|
5415
5433
|
}
|
|
5416
5434
|
if ("children" in parentNode) {
|
|
5435
|
+
var _ref;
|
|
5417
5436
|
var _parentNode_children_find, _parentNode_children;
|
|
5418
5437
|
var original = resolver.getSourceNode(node);
|
|
5419
|
-
|
|
5420
|
-
return (_parentNode_children_find_path = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5438
|
+
return (_ref = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5421
5439
|
return child.value === original;
|
|
5422
|
-
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null &&
|
|
5440
|
+
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null && _ref !== void 0 ? _ref : [];
|
|
5423
5441
|
}
|
|
5424
5442
|
if (parentNode.type !== "multi-node") {
|
|
5425
5443
|
return [];
|
|
@@ -5444,9 +5462,9 @@ var CommonExpressionsPlugin = function() {
|
|
|
5444
5462
|
var _node_parent, _node_parent_parent, _node_parent1, _node_parent_parent1, _node_parent2, _node_parent_parent_value;
|
|
5445
5463
|
var propsToSkip;
|
|
5446
5464
|
if (node.type === "asset" || node.type === "view") {
|
|
5465
|
+
var _ref;
|
|
5447
5466
|
var _node_plugins_stringResolver, _node_plugins, _node_value;
|
|
5448
|
-
|
|
5449
|
-
propsToSkip = new Set((_node_plugins_stringResolver_propertiesToSkip = (_node_plugins = node.plugins) === null || _node_plugins === void 0 ? void 0 : (_node_plugins_stringResolver = _node_plugins.stringResolver) === null || _node_plugins_stringResolver === void 0 ? void 0 : _node_plugins_stringResolver.propertiesToSkip) !== null && _node_plugins_stringResolver_propertiesToSkip !== void 0 ? _node_plugins_stringResolver_propertiesToSkip : [
|
|
5467
|
+
propsToSkip = new Set((_ref = (_node_plugins = node.plugins) === null || _node_plugins === void 0 ? void 0 : (_node_plugins_stringResolver = _node_plugins.stringResolver) === null || _node_plugins_stringResolver === void 0 ? void 0 : _node_plugins_stringResolver.propertiesToSkip) !== null && _ref !== void 0 ? _ref : [
|
|
5450
5468
|
"exp"
|
|
5451
5469
|
]);
|
|
5452
5470
|
if ((_node_value = node.value) === null || _node_value === void 0 ? void 0 : _node_value.id) {
|
|
@@ -5867,11 +5885,11 @@ var CommonExpressionsPlugin = function() {
|
|
|
5867
5885
|
this.stateStore.clear();
|
|
5868
5886
|
view.hooks.resolver.tap("asset-transform", function(resolver) {
|
|
5869
5887
|
var lastUpdatedNode;
|
|
5870
|
-
var updateState = function(node) {
|
|
5888
|
+
var updateState = function updateState(node) {
|
|
5871
5889
|
lastUpdatedNode = node;
|
|
5872
5890
|
view.update(/* @__PURE__ */ new Set());
|
|
5873
5891
|
};
|
|
5874
|
-
var getStore = function(node, stepKey) {
|
|
5892
|
+
var getStore = function getStore(node, stepKey) {
|
|
5875
5893
|
var store;
|
|
5876
5894
|
var countKey = stepKey === _this.resolveSymbol ? _this.resolveCountSymbol : _this.beforeResolveCountSymbol;
|
|
5877
5895
|
var storedState = _this.stateStore.get(node);
|
|
@@ -5885,10 +5903,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
5885
5903
|
_this.stateStore.set(node, store);
|
|
5886
5904
|
}
|
|
5887
5905
|
return {
|
|
5888
|
-
useSharedState: function(key) {
|
|
5906
|
+
useSharedState: function useSharedState(key) {
|
|
5889
5907
|
return store.useSharedState(key);
|
|
5890
5908
|
},
|
|
5891
|
-
useLocalState: function(initialState) {
|
|
5909
|
+
useLocalState: function useLocalState(initialState) {
|
|
5892
5910
|
return store.getLocalStateFunction(stepKey, countKey)(initialState);
|
|
5893
5911
|
}
|
|
5894
5912
|
};
|
|
@@ -6250,7 +6268,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
6250
6268
|
return options;
|
|
6251
6269
|
}
|
|
6252
6270
|
tracked.delete(node);
|
|
6253
|
-
var track = function(binding) {
|
|
6271
|
+
var track = function track(binding) {
|
|
6254
6272
|
var _this_options_callbacks_onAdd, _this_options_callbacks;
|
|
6255
6273
|
var parsed = isBinding(binding) ? binding : _this.options.parseBinding(binding);
|
|
6256
6274
|
if (tracked.has(node)) {
|
|
@@ -6276,7 +6294,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
6276
6294
|
};
|
|
6277
6295
|
return _object_spread_props(_object_spread({}, options), {
|
|
6278
6296
|
validation: _object_spread_props(_object_spread({}, options.validation), {
|
|
6279
|
-
get: function(binding, getOptions) {
|
|
6297
|
+
get: function get(binding, getOptions) {
|
|
6280
6298
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6281
6299
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6282
6300
|
track(binding);
|
|
@@ -6288,14 +6306,14 @@ var CommonExpressionsPlugin = function() {
|
|
|
6288
6306
|
return firstFieldEOW;
|
|
6289
6307
|
},
|
|
6290
6308
|
getValidationsForBinding: function getValidationsForBinding(binding, getOptions) {
|
|
6309
|
+
var _ref;
|
|
6291
6310
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6292
6311
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6293
6312
|
track(binding);
|
|
6294
6313
|
}
|
|
6295
|
-
|
|
6296
|
-
return (_options_validation__getValidationForBinding_getAll = (_options_validation = options.validation) === null || _options_validation === void 0 ? void 0 : (_options_validation__getValidationForBinding = _options_validation._getValidationForBinding(binding)) === null || _options_validation__getValidationForBinding === void 0 ? void 0 : _options_validation__getValidationForBinding.getAll(getOptions)) !== null && _options_validation__getValidationForBinding_getAll !== void 0 ? _options_validation__getValidationForBinding_getAll : [];
|
|
6314
|
+
return (_ref = (_options_validation = options.validation) === null || _options_validation === void 0 ? void 0 : (_options_validation__getValidationForBinding = _options_validation._getValidationForBinding(binding)) === null || _options_validation__getValidationForBinding === void 0 ? void 0 : _options_validation__getValidationForBinding.getAll(getOptions)) !== null && _ref !== void 0 ? _ref : [];
|
|
6297
6315
|
},
|
|
6298
|
-
getChildren: function(type) {
|
|
6316
|
+
getChildren: function getChildren(type) {
|
|
6299
6317
|
var _lastComputedBindingTree_get;
|
|
6300
6318
|
var validations = new Array();
|
|
6301
6319
|
(_lastComputedBindingTree_get = lastComputedBindingTree.get(node)) === null || _lastComputedBindingTree_get === void 0 ? void 0 : _lastComputedBindingTree_get.forEach(function(binding) {
|
|
@@ -6307,7 +6325,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
6307
6325
|
});
|
|
6308
6326
|
return validations;
|
|
6309
6327
|
},
|
|
6310
|
-
getValidationsForSection: function() {
|
|
6328
|
+
getValidationsForSection: function getValidationsForSection() {
|
|
6311
6329
|
var _lastSectionBindingTree_get;
|
|
6312
6330
|
var validations = new Array();
|
|
6313
6331
|
(_lastSectionBindingTree_get = lastSectionBindingTree.get(node)) === null || _lastSectionBindingTree_get === void 0 ? void 0 : _lastSectionBindingTree_get.forEach(function(binding) {
|
|
@@ -6319,7 +6337,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
6319
6337
|
});
|
|
6320
6338
|
return validations;
|
|
6321
6339
|
},
|
|
6322
|
-
register: function(registerOptions) {
|
|
6340
|
+
register: function register(registerOptions) {
|
|
6323
6341
|
if ((registerOptions === null || registerOptions === void 0 ? void 0 : registerOptions.type) === "section") {
|
|
6324
6342
|
if (!sections.has(node)) {
|
|
6325
6343
|
sections.set(node, /* @__PURE__ */ new Set());
|
|
@@ -6464,10 +6482,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
6464
6482
|
value: function runApplicableValidations(runner, canDismiss, phase) {
|
|
6465
6483
|
var _this = this;
|
|
6466
6484
|
this.applicableValidations = this.applicableValidations.map(function(originalValue) {
|
|
6485
|
+
var _originalValue_value_blocking, _response_message, _obj_value_displayTarget;
|
|
6467
6486
|
if (originalValue.state === "dismissed") {
|
|
6468
6487
|
return originalValue;
|
|
6469
6488
|
}
|
|
6470
|
-
var _originalValue_value_blocking;
|
|
6471
6489
|
var blocking = (_originalValue_value_blocking = originalValue.value.blocking) !== null && _originalValue_value_blocking !== void 0 ? _originalValue_value_blocking : originalValue.value.severity === "warning" && "once" || true;
|
|
6472
6490
|
var obj = (0, import_timm9.setIn)(originalValue, [
|
|
6473
6491
|
"value",
|
|
@@ -6489,7 +6507,6 @@ var CommonExpressionsPlugin = function() {
|
|
|
6489
6507
|
}
|
|
6490
6508
|
}
|
|
6491
6509
|
var response = runner(obj.value);
|
|
6492
|
-
var _response_message, _obj_value_displayTarget;
|
|
6493
6510
|
var newState = {
|
|
6494
6511
|
type: obj.type,
|
|
6495
6512
|
value: obj.value,
|
|
@@ -6574,14 +6591,14 @@ var CommonExpressionsPlugin = function() {
|
|
|
6574
6591
|
var _this = this;
|
|
6575
6592
|
return [
|
|
6576
6593
|
{
|
|
6577
|
-
set: function(transaction, options, next) {
|
|
6578
|
-
var
|
|
6579
|
-
return (
|
|
6594
|
+
set: function set(transaction, options, next) {
|
|
6595
|
+
var _ref;
|
|
6596
|
+
return (_ref = next === null || next === void 0 ? void 0 : next.set(transaction, options)) !== null && _ref !== void 0 ? _ref : [];
|
|
6580
6597
|
},
|
|
6581
|
-
get: function(binding, options, next) {
|
|
6598
|
+
get: function get(binding, options, next) {
|
|
6582
6599
|
return next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
6583
6600
|
},
|
|
6584
|
-
delete: function(binding, options, next) {
|
|
6601
|
+
delete: function _delete(binding, options, next) {
|
|
6585
6602
|
_this.validations = removeBindingAndChildrenFromMap(_this.validations, binding);
|
|
6586
6603
|
return next === null || next === void 0 ? void 0 : next.delete(binding, options);
|
|
6587
6604
|
}
|
|
@@ -6644,11 +6661,11 @@ var CommonExpressionsPlugin = function() {
|
|
|
6644
6661
|
{
|
|
6645
6662
|
source: VIEW_VALIDATION_PROVIDER_NAME,
|
|
6646
6663
|
provider: {
|
|
6647
|
-
getValidationsForBinding: function(binding) {
|
|
6664
|
+
getValidationsForBinding: function getValidationsForBinding(binding) {
|
|
6648
6665
|
var _this_viewValidationProvider_getValidationsForBinding, _this_viewValidationProvider;
|
|
6649
6666
|
return (_this_viewValidationProvider = _this.viewValidationProvider) === null || _this_viewValidationProvider === void 0 ? void 0 : (_this_viewValidationProvider_getValidationsForBinding = _this_viewValidationProvider.getValidationsForBinding) === null || _this_viewValidationProvider_getValidationsForBinding === void 0 ? void 0 : _this_viewValidationProvider_getValidationsForBinding.call(_this_viewValidationProvider, binding);
|
|
6650
6667
|
},
|
|
6651
|
-
getValidationsForView: function() {
|
|
6668
|
+
getValidationsForView: function getValidationsForView() {
|
|
6652
6669
|
var _this_viewValidationProvider_getValidationsForView, _this_viewValidationProvider;
|
|
6653
6670
|
return (_this_viewValidationProvider = _this.viewValidationProvider) === null || _this_viewValidationProvider === void 0 ? void 0 : (_this_viewValidationProvider_getValidationsForView = _this_viewValidationProvider.getValidationsForView) === null || _this_viewValidationProvider_getValidationsForView === void 0 ? void 0 : _this_viewValidationProvider_getValidationsForView.call(_this_viewValidationProvider);
|
|
6654
6671
|
}
|
|
@@ -6675,7 +6692,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
6675
6692
|
}
|
|
6676
6693
|
var bindingTrackerPlugin = new ValidationBindingTrackerViewPlugin(_object_spread_props(_object_spread({}, this.options), {
|
|
6677
6694
|
callbacks: {
|
|
6678
|
-
onAdd: function(binding) {
|
|
6695
|
+
onAdd: function onAdd(binding) {
|
|
6679
6696
|
if (!_this.options || _this.getValidationForBinding(binding) !== void 0) {
|
|
6680
6697
|
return;
|
|
6681
6698
|
}
|
|
@@ -6719,11 +6736,11 @@ var CommonExpressionsPlugin = function() {
|
|
|
6719
6736
|
var _this_options;
|
|
6720
6737
|
var possibleValidations = this.getValidationProviders().reduce(function(vals, provider) {
|
|
6721
6738
|
var _vals;
|
|
6739
|
+
var _ref;
|
|
6722
6740
|
var _provider_provider_getValidationsForBinding, _provider_provider_getValidationsForBinding1, _provider_provider;
|
|
6723
|
-
|
|
6724
|
-
(_vals = vals).push.apply(_vals, _to_consumable_array((_provider_provider_getValidationsForBinding_map = (_provider_provider_getValidationsForBinding1 = (_provider_provider = provider.provider).getValidationsForBinding) === null || _provider_provider_getValidationsForBinding1 === void 0 ? void 0 : (_provider_provider_getValidationsForBinding = _provider_provider_getValidationsForBinding1.call(_provider_provider, binding)) === null || _provider_provider_getValidationsForBinding === void 0 ? void 0 : _provider_provider_getValidationsForBinding.map(function(valObj) {
|
|
6741
|
+
(_vals = vals).push.apply(_vals, _to_consumable_array((_ref = (_provider_provider_getValidationsForBinding1 = (_provider_provider = provider.provider).getValidationsForBinding) === null || _provider_provider_getValidationsForBinding1 === void 0 ? void 0 : (_provider_provider_getValidationsForBinding = _provider_provider_getValidationsForBinding1.call(_provider_provider, binding)) === null || _provider_provider_getValidationsForBinding === void 0 ? void 0 : _provider_provider_getValidationsForBinding.map(function(valObj) {
|
|
6725
6742
|
return _object_spread_props(_object_spread({}, valObj), _define_property({}, VALIDATION_PROVIDER_NAME_SYMBOL, provider.source));
|
|
6726
|
-
})) !== null &&
|
|
6743
|
+
})) !== null && _ref !== void 0 ? _ref : []));
|
|
6727
6744
|
return vals;
|
|
6728
6745
|
}, []);
|
|
6729
6746
|
if (possibleValidations.length === 0) {
|
|
@@ -6764,10 +6781,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
6764
6781
|
key: "validationRunner",
|
|
6765
6782
|
value: function validationRunner(validationObj, binding) {
|
|
6766
6783
|
var context = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.options;
|
|
6784
|
+
var _validationObj_handler;
|
|
6767
6785
|
if (!context) {
|
|
6768
6786
|
throw new Error("No context provided to validation runner");
|
|
6769
6787
|
}
|
|
6770
|
-
var _validationObj_handler;
|
|
6771
6788
|
var handler = (_validationObj_handler = validationObj.handler) !== null && _validationObj_handler !== void 0 ? _validationObj_handler : this.getValidator(validationObj.type);
|
|
6772
6789
|
var weakBindings = /* @__PURE__ */ new Set();
|
|
6773
6790
|
var model = {
|
|
@@ -6781,7 +6798,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
6781
6798
|
delete: context.model.delete
|
|
6782
6799
|
};
|
|
6783
6800
|
var result = handler === null || handler === void 0 ? void 0 : handler(_object_spread_props(_object_spread({}, context), {
|
|
6784
|
-
evaluate: function(exp) {
|
|
6801
|
+
evaluate: function evaluate(exp) {
|
|
6785
6802
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
6786
6803
|
model: model
|
|
6787
6804
|
};
|
|
@@ -6819,7 +6836,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
6819
6836
|
var _this = this;
|
|
6820
6837
|
var isNavigationTrigger = trigger === "navigation";
|
|
6821
6838
|
var lastActiveBindings = this.activeBindings;
|
|
6822
|
-
var updateValidations = function(dismissValidations) {
|
|
6839
|
+
var updateValidations = function updateValidations(dismissValidations) {
|
|
6823
6840
|
_this.getBindings().forEach(function(binding) {
|
|
6824
6841
|
var _this_validations_get;
|
|
6825
6842
|
(_this_validations_get = _this.validations.get(binding)) === null || _this_validations_get === void 0 ? void 0 : _this_validations_get.update(trigger, dismissValidations, function(obj) {
|
|
@@ -6864,9 +6881,9 @@ var CommonExpressionsPlugin = function() {
|
|
|
6864
6881
|
{
|
|
6865
6882
|
key: "getBindings",
|
|
6866
6883
|
value: function getBindings() {
|
|
6884
|
+
var _ref;
|
|
6867
6885
|
var _this_tracker;
|
|
6868
|
-
|
|
6869
|
-
return (_this_tracker_getBindings = (_this_tracker = this.tracker) === null || _this_tracker === void 0 ? void 0 : _this_tracker.getBindings()) !== null && _this_tracker_getBindings !== void 0 ? _this_tracker_getBindings : /* @__PURE__ */ new Set();
|
|
6886
|
+
return (_ref = (_this_tracker = this.tracker) === null || _this_tracker === void 0 ? void 0 : _this_tracker.getBindings()) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
6870
6887
|
}
|
|
6871
6888
|
},
|
|
6872
6889
|
{
|
|
@@ -6915,10 +6932,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
6915
6932
|
value: function forView(parser) {
|
|
6916
6933
|
var _this = this;
|
|
6917
6934
|
return {
|
|
6918
|
-
_getValidationForBinding: function(binding) {
|
|
6935
|
+
_getValidationForBinding: function _getValidationForBinding(binding) {
|
|
6919
6936
|
return _this.getValidationForBinding(isBinding(binding) ? binding : parser(binding));
|
|
6920
6937
|
},
|
|
6921
|
-
getAll: function() {
|
|
6938
|
+
getAll: function getAll() {
|
|
6922
6939
|
var bindings = _this.getBindings();
|
|
6923
6940
|
if (bindings.size === 0) {
|
|
6924
6941
|
return void 0;
|
|
@@ -6945,13 +6962,13 @@ var CommonExpressionsPlugin = function() {
|
|
|
6945
6962
|
getValidationsForSection: function getValidationsForSection() {
|
|
6946
6963
|
throw new Error("Error rollup should be provided by the view plugin");
|
|
6947
6964
|
},
|
|
6948
|
-
track: function() {
|
|
6965
|
+
track: function track() {
|
|
6949
6966
|
throw new Error("Tracking should be provided by the view plugin");
|
|
6950
6967
|
},
|
|
6951
|
-
register: function() {
|
|
6968
|
+
register: function register() {
|
|
6952
6969
|
throw new Error("Section functionality should be provided by the view plugin");
|
|
6953
6970
|
},
|
|
6954
|
-
type: function(binding) {
|
|
6971
|
+
type: function type(binding) {
|
|
6955
6972
|
return _this.schema.getType(isBinding(binding) ? binding : parser(binding));
|
|
6956
6973
|
}
|
|
6957
6974
|
};
|
|
@@ -6960,9 +6977,9 @@ var CommonExpressionsPlugin = function() {
|
|
|
6960
6977
|
]);
|
|
6961
6978
|
return ValidationController;
|
|
6962
6979
|
}();
|
|
6963
|
-
var mergeSets = function(setA, setB) {
|
|
6964
|
-
var
|
|
6965
|
-
return /* @__PURE__ */ new Set(_to_consumable_array((
|
|
6980
|
+
var mergeSets = function mergeSets(setA, setB) {
|
|
6981
|
+
var _ref, _ref1;
|
|
6982
|
+
return /* @__PURE__ */ new Set(_to_consumable_array((_ref = setA === null || setA === void 0 ? void 0 : setA.values()) !== null && _ref !== void 0 ? _ref : []).concat(_to_consumable_array((_ref1 = setB === null || setB === void 0 ? void 0 : setB.values()) !== null && _ref1 !== void 0 ? _ref1 : [])));
|
|
6966
6983
|
};
|
|
6967
6984
|
var ViewController = /*#__PURE__*/ function() {
|
|
6968
6985
|
function ViewController(initialViews, options) {
|
|
@@ -6989,7 +7006,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
6989
7006
|
}
|
|
6990
7007
|
});
|
|
6991
7008
|
});
|
|
6992
|
-
var update = function(updates) {
|
|
7009
|
+
var update = function update(updates) {
|
|
6993
7010
|
var silent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
6994
7011
|
if (_this1.currentView) {
|
|
6995
7012
|
if (_this1.optimizeUpdates) {
|
|
@@ -7000,10 +7017,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
7000
7017
|
}
|
|
7001
7018
|
};
|
|
7002
7019
|
options.model.hooks.onUpdate.tap("viewController", function(updates, updateOptions) {
|
|
7003
|
-
var
|
|
7020
|
+
var _ref;
|
|
7004
7021
|
update(new Set(updates.map(function(t2) {
|
|
7005
7022
|
return t2.binding;
|
|
7006
|
-
})), (
|
|
7023
|
+
})), (_ref = updateOptions === null || updateOptions === void 0 ? void 0 : updateOptions.silent) !== null && _ref !== void 0 ? _ref : false);
|
|
7007
7024
|
});
|
|
7008
7025
|
options.model.hooks.onDelete.tap("viewController", function(binding) {
|
|
7009
7026
|
var parentBinding = binding.parent();
|
|
@@ -7038,8 +7055,8 @@ var CommonExpressionsPlugin = function() {
|
|
|
7038
7055
|
if (!this.pendingUpdate.scheduled && !silent) {
|
|
7039
7056
|
this.pendingUpdate.scheduled = true;
|
|
7040
7057
|
(0, import_queue_microtask2.default)(function() {
|
|
7041
|
-
var _this_currentView;
|
|
7042
7058
|
var _this_pendingUpdate;
|
|
7059
|
+
var _this_currentView;
|
|
7043
7060
|
var _ref = (_this_pendingUpdate = _this.pendingUpdate) !== null && _this_pendingUpdate !== void 0 ? _this_pendingUpdate : {}, changedBindings = _ref.changedBindings, changedNodes = _ref.changedNodes;
|
|
7044
7061
|
_this.pendingUpdate = void 0;
|
|
7045
7062
|
(_this_currentView = _this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.update(changedBindings, changedNodes);
|
|
@@ -7364,10 +7381,10 @@ var CommonExpressionsPlugin = function() {
|
|
|
7364
7381
|
{
|
|
7365
7382
|
key: "getConstants",
|
|
7366
7383
|
value: function getConstants(key, namespace, fallback) {
|
|
7384
|
+
var _ref, _ref1;
|
|
7367
7385
|
var _this_tempStore_get, _this_store_get;
|
|
7368
7386
|
var path = new BindingInstance(key);
|
|
7369
|
-
|
|
7370
|
-
return (_ref = (_this_tempStore_get_get = (_this_tempStore_get = this.tempStore.get(namespace)) === null || _this_tempStore_get === void 0 ? void 0 : _this_tempStore_get.get(path)) !== null && _this_tempStore_get_get !== void 0 ? _this_tempStore_get_get : (_this_store_get = this.store.get(namespace)) === null || _this_store_get === void 0 ? void 0 : _this_store_get.get(path)) !== null && _ref !== void 0 ? _ref : fallback;
|
|
7387
|
+
return (_ref = (_ref1 = (_this_tempStore_get = this.tempStore.get(namespace)) === null || _this_tempStore_get === void 0 ? void 0 : _this_tempStore_get.get(path)) !== null && _ref1 !== void 0 ? _ref1 : (_this_store_get = this.store.get(namespace)) === null || _this_store_get === void 0 ? void 0 : _this_store_get.get(path)) !== null && _ref !== void 0 ? _ref : fallback;
|
|
7371
7388
|
}
|
|
7372
7389
|
},
|
|
7373
7390
|
{
|
|
@@ -7408,7 +7425,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
7408
7425
|
value: function apply(player) {
|
|
7409
7426
|
var _this = this;
|
|
7410
7427
|
var expressionEvaluator;
|
|
7411
|
-
var handleEval = function(exp) {
|
|
7428
|
+
var handleEval = function handleEval(exp) {
|
|
7412
7429
|
if (exp) {
|
|
7413
7430
|
if ((typeof exp === "undefined" ? "undefined" : _type_of(exp)) === "object" && "exp" in exp) {
|
|
7414
7431
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp.exp);
|
|
@@ -7429,7 +7446,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
7429
7446
|
return handleEval(exp);
|
|
7430
7447
|
});
|
|
7431
7448
|
flow.hooks.resolveTransitionNode.intercept({
|
|
7432
|
-
call: function(nextState) {
|
|
7449
|
+
call: function call(nextState) {
|
|
7433
7450
|
if (nextState === null || nextState === void 0 ? void 0 : nextState.onStart) {
|
|
7434
7451
|
handleEval(nextState.onStart);
|
|
7435
7452
|
}
|
|
@@ -7442,13 +7459,13 @@ var CommonExpressionsPlugin = function() {
|
|
|
7442
7459
|
]);
|
|
7443
7460
|
return FlowExpPlugin;
|
|
7444
7461
|
}();
|
|
7445
|
-
var createFormatFunction = function(schema) {
|
|
7446
|
-
var handler = function(ctx, value, formatName) {
|
|
7462
|
+
var createFormatFunction = function createFormatFunction(schema) {
|
|
7463
|
+
var handler = function handler(ctx, value, formatName) {
|
|
7464
|
+
var _ref;
|
|
7447
7465
|
var _schema_getFormatterForType;
|
|
7448
|
-
|
|
7449
|
-
return (_schema_getFormatterForType_format = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7466
|
+
return (_ref = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7450
7467
|
type: formatName
|
|
7451
|
-
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null &&
|
|
7468
|
+
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null && _ref !== void 0 ? _ref : value;
|
|
7452
7469
|
};
|
|
7453
7470
|
return handler;
|
|
7454
7471
|
};
|
|
@@ -7500,8 +7517,8 @@ var CommonExpressionsPlugin = function() {
|
|
|
7500
7517
|
ref: Symbol("not-started"),
|
|
7501
7518
|
status: "not-started"
|
|
7502
7519
|
};
|
|
7503
|
-
var PLAYER_VERSION = true ? "0.15.3-next.
|
|
7504
|
-
var COMMIT = true ? "
|
|
7520
|
+
var PLAYER_VERSION = true ? "0.15.3-next.2" : "unknown";
|
|
7521
|
+
var COMMIT = true ? "21f4b09d55c325c5fe951d2fd08caaebb81db483" : "unknown";
|
|
7505
7522
|
var _Player = /*#__PURE__*/ function() {
|
|
7506
7523
|
function _Player2(config) {
|
|
7507
7524
|
var _this = this;
|
|
@@ -7616,13 +7633,13 @@ var CommonExpressionsPlugin = function() {
|
|
|
7616
7633
|
var expressionEvaluator;
|
|
7617
7634
|
var dataController;
|
|
7618
7635
|
var pathResolver = new BindingParser({
|
|
7619
|
-
get: function(binding) {
|
|
7636
|
+
get: function get(binding) {
|
|
7620
7637
|
return dataController.get(binding);
|
|
7621
7638
|
},
|
|
7622
|
-
set: function(transaction) {
|
|
7639
|
+
set: function set(transaction) {
|
|
7623
7640
|
return dataController.set(transaction);
|
|
7624
7641
|
},
|
|
7625
|
-
evaluate: function(expression) {
|
|
7642
|
+
evaluate: function evaluate(expression) {
|
|
7626
7643
|
return expressionEvaluator.evaluate(expression);
|
|
7627
7644
|
}
|
|
7628
7645
|
});
|
|
@@ -7766,23 +7783,23 @@ var CommonExpressionsPlugin = function() {
|
|
|
7766
7783
|
transition: flowController.transition,
|
|
7767
7784
|
model: dataController,
|
|
7768
7785
|
utils: {
|
|
7769
|
-
findPlugin: function(pluginSymbol) {
|
|
7786
|
+
findPlugin: function findPlugin(pluginSymbol) {
|
|
7770
7787
|
return _this.findPlugin(pluginSymbol);
|
|
7771
7788
|
}
|
|
7772
7789
|
},
|
|
7773
7790
|
logger: this.logger,
|
|
7774
7791
|
flowController: flowController,
|
|
7775
7792
|
schema: schema,
|
|
7776
|
-
format: function(binding, value) {
|
|
7793
|
+
format: function format(binding, value) {
|
|
7777
7794
|
var formatter = schema.getFormatter(binding);
|
|
7778
7795
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7779
7796
|
},
|
|
7780
|
-
formatValue: function(ref, value) {
|
|
7797
|
+
formatValue: function formatValue(ref, value) {
|
|
7781
7798
|
var formatter = schema.getFormatterForType(ref);
|
|
7782
7799
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7783
7800
|
},
|
|
7784
7801
|
validation: _object_spread_props(_object_spread({}, validationController.forView(parseBinding)), {
|
|
7785
|
-
type: function(b) {
|
|
7802
|
+
type: function type(b) {
|
|
7786
7803
|
return schema.getType(parseBinding(b));
|
|
7787
7804
|
}
|
|
7788
7805
|
}),
|
|
@@ -7794,7 +7811,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
7794
7811
|
});
|
|
7795
7812
|
this.hooks.viewController.call(viewController);
|
|
7796
7813
|
return {
|
|
7797
|
-
start: function() {
|
|
7814
|
+
start: function start() {
|
|
7798
7815
|
flowController.start().then(function(endState) {
|
|
7799
7816
|
var flowResult = {
|
|
7800
7817
|
endState: resolveStrings(endState, false),
|
|
@@ -7831,13 +7848,13 @@ var CommonExpressionsPlugin = function() {
|
|
|
7831
7848
|
key: "start",
|
|
7832
7849
|
value: function start(payload) {
|
|
7833
7850
|
return _async_to_generator(function() {
|
|
7834
|
-
var _this,
|
|
7851
|
+
var _this, _ref, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
7835
7852
|
return _ts_generator(this, function(_state) {
|
|
7836
7853
|
switch(_state.label){
|
|
7837
7854
|
case 0:
|
|
7838
7855
|
_this = this;
|
|
7839
|
-
ref = Symbol((
|
|
7840
|
-
maybeUpdateState = function(newState) {
|
|
7856
|
+
ref = Symbol((_ref = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _ref !== void 0 ? _ref : "payload");
|
|
7857
|
+
maybeUpdateState = function maybeUpdateState(newState) {
|
|
7841
7858
|
if (_this.state.ref !== ref) {
|
|
7842
7859
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
7843
7860
|
return newState;
|
|
@@ -7923,7 +7940,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
7923
7940
|
return 0;
|
|
7924
7941
|
});
|
|
7925
7942
|
var length = size;
|
|
7926
|
-
var isEmpty = function(ctx, val) {
|
|
7943
|
+
var isEmpty = function isEmpty(ctx, val) {
|
|
7927
7944
|
if (val === void 0 || val === null) {
|
|
7928
7945
|
return true;
|
|
7929
7946
|
}
|
|
@@ -7932,7 +7949,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
7932
7949
|
}
|
|
7933
7950
|
return false;
|
|
7934
7951
|
};
|
|
7935
|
-
var isNotEmpty = function(ctx, val) {
|
|
7952
|
+
var isNotEmpty = function isNotEmpty(ctx, val) {
|
|
7936
7953
|
return !isEmpty(ctx, val);
|
|
7937
7954
|
};
|
|
7938
7955
|
var concat = withoutContext(function() {
|
|
@@ -8027,7 +8044,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
8027
8044
|
return s + ((_toNum = toNum(next)) !== null && _toNum !== void 0 ? _toNum : 0);
|
|
8028
8045
|
}, 0);
|
|
8029
8046
|
});
|
|
8030
|
-
var findPropertyIndex = function(context, bindingOrModel, propToCheck, valueToCheck) {
|
|
8047
|
+
var findPropertyIndex = function findPropertyIndex(context, bindingOrModel, propToCheck, valueToCheck) {
|
|
8031
8048
|
if (bindingOrModel === void 0) {
|
|
8032
8049
|
return -1;
|
|
8033
8050
|
}
|
|
@@ -8040,7 +8057,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
8040
8057
|
return valueToCheck === propVal;
|
|
8041
8058
|
});
|
|
8042
8059
|
};
|
|
8043
|
-
var findProperty = function(context, bindingOrModel, propToCheck, valueToCheck, propToReturn, defaultValue) {
|
|
8060
|
+
var findProperty = function findProperty(context, bindingOrModel, propToCheck, valueToCheck, propToReturn, defaultValue) {
|
|
8044
8061
|
var searchArray = Array.isArray(bindingOrModel) ? bindingOrModel : context.model.get(bindingOrModel);
|
|
8045
8062
|
if (!Array.isArray(searchArray)) {
|
|
8046
8063
|
return defaultValue;
|