@player-ui/check-path-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.
|
@@ -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 CheckPathPlugin = 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 CheckPathPlugin = 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 CheckPathPlugin = 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 CheckPathPlugin = 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 CheckPathPlugin = 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 length = 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
|
|
@@ -1423,17 +1441,17 @@ var CheckPathPlugin = function() {
|
|
|
1423
1441
|
return _object_spread_props(_object_spread({}, resolverOptions), {
|
|
1424
1442
|
data: {
|
|
1425
1443
|
model: resolverOptions.model,
|
|
1426
|
-
formatValue: function(ref, value) {
|
|
1444
|
+
formatValue: function formatValue(ref, value) {
|
|
1427
1445
|
if (resolverOptions.formatValue) {
|
|
1428
1446
|
return resolverOptions.formatValue(ref, value);
|
|
1429
1447
|
}
|
|
1430
1448
|
return value;
|
|
1431
1449
|
},
|
|
1432
|
-
format: function(bindingLike, value) {
|
|
1450
|
+
format: function format(bindingLike, value) {
|
|
1433
1451
|
return resolverOptions.format ? resolverOptions.format(isBinding(bindingLike) ? bindingLike : resolverOptions.parseBinding(bindingLike), value) : value;
|
|
1434
1452
|
}
|
|
1435
1453
|
},
|
|
1436
|
-
evaluate: function(exp) {
|
|
1454
|
+
evaluate: function evaluate(exp) {
|
|
1437
1455
|
return resolverOptions.evaluator.evaluate(exp, resolverOptions);
|
|
1438
1456
|
}
|
|
1439
1457
|
});
|
|
@@ -1523,27 +1541,27 @@ var CheckPathPlugin = function() {
|
|
|
1523
1541
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
1524
1542
|
var __getProtoOf = Object.getPrototypeOf;
|
|
1525
1543
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1526
|
-
var __commonJS = function(cb, mod) {
|
|
1544
|
+
var __commonJS = function __commonJS(cb, mod) {
|
|
1527
1545
|
return function __require() {
|
|
1528
1546
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
|
|
1529
1547
|
exports: {}
|
|
1530
1548
|
}).exports, mod), mod.exports;
|
|
1531
1549
|
};
|
|
1532
1550
|
};
|
|
1533
|
-
var __export = function(target, all) {
|
|
1551
|
+
var __export = function __export(target, all) {
|
|
1534
1552
|
for(var name in all)__defProp(target, name, {
|
|
1535
1553
|
get: all[name],
|
|
1536
1554
|
enumerable: true
|
|
1537
1555
|
});
|
|
1538
1556
|
};
|
|
1539
|
-
var __copyProps = function(to, from, except, desc) {
|
|
1557
|
+
var __copyProps = function __copyProps(to, from, except, desc) {
|
|
1540
1558
|
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
1541
1559
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1542
1560
|
try {
|
|
1543
1561
|
var _loop = function() {
|
|
1544
1562
|
var key = _step.value;
|
|
1545
1563
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
1546
|
-
get: function() {
|
|
1564
|
+
get: function get() {
|
|
1547
1565
|
return from[key];
|
|
1548
1566
|
},
|
|
1549
1567
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -1567,7 +1585,7 @@ var CheckPathPlugin = function() {
|
|
|
1567
1585
|
}
|
|
1568
1586
|
return to;
|
|
1569
1587
|
};
|
|
1570
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
1588
|
+
var __toESM = function __toESM(mod, isNodeMode, target) {
|
|
1571
1589
|
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
1572
1590
|
// file that has been converted to a CommonJS file using a Babel-
|
|
1573
1591
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -1577,7 +1595,7 @@ var CheckPathPlugin = function() {
|
|
|
1577
1595
|
enumerable: true
|
|
1578
1596
|
}) : target, mod);
|
|
1579
1597
|
};
|
|
1580
|
-
var __toCommonJS = function(mod) {
|
|
1598
|
+
var __toCommonJS = function __toCommonJS(mod) {
|
|
1581
1599
|
return __copyProps(__defProp({}, "__esModule", {
|
|
1582
1600
|
value: true
|
|
1583
1601
|
}), mod);
|
|
@@ -1679,7 +1697,7 @@ var CheckPathPlugin = function() {
|
|
|
1679
1697
|
function toError(err) {
|
|
1680
1698
|
try {
|
|
1681
1699
|
return _instanceof(err, Error) ? err : new Error("Value that is not an instance of Error was thrown: ".concat(err));
|
|
1682
|
-
} catch (
|
|
1700
|
+
} catch (unused) {
|
|
1683
1701
|
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.");
|
|
1684
1702
|
}
|
|
1685
1703
|
}
|
|
@@ -1980,7 +1998,7 @@ var CheckPathPlugin = function() {
|
|
|
1980
1998
|
var require_p_defer = __commonJS({
|
|
1981
1999
|
"../../../../../../../../../../../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) {
|
|
1982
2000
|
"use strict";
|
|
1983
|
-
var pDefer = function() {
|
|
2001
|
+
var pDefer = function pDefer() {
|
|
1984
2002
|
var deferred2 = {};
|
|
1985
2003
|
deferred2.promise = new Promise(function(resolve, reject) {
|
|
1986
2004
|
deferred2.resolve = resolve;
|
|
@@ -2089,7 +2107,7 @@ var CheckPathPlugin = function() {
|
|
|
2089
2107
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/check-path/core/src/index.ts
|
|
2090
2108
|
var src_exports = {};
|
|
2091
2109
|
__export(src_exports, {
|
|
2092
|
-
CheckPathPlugin: function() {
|
|
2110
|
+
CheckPathPlugin: function CheckPathPlugin1() {
|
|
2093
2111
|
return CheckPathPlugin;
|
|
2094
2112
|
}
|
|
2095
2113
|
});
|
|
@@ -2535,7 +2553,7 @@ var CheckPathPlugin = function() {
|
|
|
2535
2553
|
}
|
|
2536
2554
|
return pairs;
|
|
2537
2555
|
}
|
|
2538
|
-
var createSortedArray = function() {
|
|
2556
|
+
var createSortedArray = function createSortedArray() {
|
|
2539
2557
|
return new import_sorted_array.default([], function(c) {
|
|
2540
2558
|
return c.matcher.count;
|
|
2541
2559
|
});
|
|
@@ -2631,38 +2649,38 @@ var CheckPathPlugin = function() {
|
|
|
2631
2649
|
}();
|
|
2632
2650
|
// ../../../../../../../../../../../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
|
|
2633
2651
|
var __defProp2 = Object.defineProperty;
|
|
2634
|
-
var __export2 = function(target, all) {
|
|
2652
|
+
var __export2 = function __export2(target, all) {
|
|
2635
2653
|
for(var name in all)__defProp2(target, name, {
|
|
2636
2654
|
get: all[name],
|
|
2637
2655
|
enumerable: true
|
|
2638
2656
|
});
|
|
2639
2657
|
};
|
|
2640
|
-
var toValue = function(value) {
|
|
2658
|
+
var toValue = function toValue(value) {
|
|
2641
2659
|
return {
|
|
2642
2660
|
name: "Value",
|
|
2643
2661
|
value: value
|
|
2644
2662
|
};
|
|
2645
2663
|
};
|
|
2646
|
-
var toExpression = function(value) {
|
|
2664
|
+
var toExpression = function toExpression(value) {
|
|
2647
2665
|
return {
|
|
2648
2666
|
name: "Expression",
|
|
2649
2667
|
value: value
|
|
2650
2668
|
};
|
|
2651
2669
|
};
|
|
2652
|
-
var toPath = function(path) {
|
|
2670
|
+
var toPath = function toPath(path) {
|
|
2653
2671
|
return {
|
|
2654
2672
|
name: "PathNode",
|
|
2655
2673
|
path: path
|
|
2656
2674
|
};
|
|
2657
2675
|
};
|
|
2658
|
-
var toQuery = function(key, value) {
|
|
2676
|
+
var toQuery = function toQuery(key, value) {
|
|
2659
2677
|
return {
|
|
2660
2678
|
name: "Query",
|
|
2661
2679
|
key: key,
|
|
2662
2680
|
value: value
|
|
2663
2681
|
};
|
|
2664
2682
|
};
|
|
2665
|
-
var toConcatenatedNode = function(values) {
|
|
2683
|
+
var toConcatenatedNode = function toConcatenatedNode(values) {
|
|
2666
2684
|
if (values.length === 1) {
|
|
2667
2685
|
return values[0];
|
|
2668
2686
|
}
|
|
@@ -2680,7 +2698,7 @@ var CheckPathPlugin = function() {
|
|
|
2680
2698
|
var SINGLE_QUOTE = "'";
|
|
2681
2699
|
var DOUBLE_QUOTE = '"';
|
|
2682
2700
|
var BACK_TICK = "`";
|
|
2683
|
-
var isIdentifierChar = function(char) {
|
|
2701
|
+
var isIdentifierChar = function isIdentifierChar(char) {
|
|
2684
2702
|
if (!char) {
|
|
2685
2703
|
return false;
|
|
2686
2704
|
}
|
|
@@ -2700,10 +2718,10 @@ var CheckPathPlugin = function() {
|
|
|
2700
2718
|
charCode === 125;
|
|
2701
2719
|
return !matches;
|
|
2702
2720
|
};
|
|
2703
|
-
var parse = function(path) {
|
|
2721
|
+
var parse = function parse(path) {
|
|
2704
2722
|
var index = 1;
|
|
2705
2723
|
var ch = path.charAt(0);
|
|
2706
|
-
var next = function(expected) {
|
|
2724
|
+
var next = function next(expected) {
|
|
2707
2725
|
if (expected && ch !== expected) {
|
|
2708
2726
|
throw new Error("Expected char: ".concat(expected, " but got: ").concat(ch));
|
|
2709
2727
|
}
|
|
@@ -2711,12 +2729,12 @@ var CheckPathPlugin = function() {
|
|
|
2711
2729
|
index += 1;
|
|
2712
2730
|
return ch;
|
|
2713
2731
|
};
|
|
2714
|
-
var whitespace = function() {
|
|
2732
|
+
var whitespace = function whitespace() {
|
|
2715
2733
|
while(ch === " "){
|
|
2716
2734
|
next();
|
|
2717
2735
|
}
|
|
2718
2736
|
};
|
|
2719
|
-
var identifier = function() {
|
|
2737
|
+
var identifier = function identifier() {
|
|
2720
2738
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2721
2739
|
if (!isIdentifierChar(ch)) {
|
|
2722
2740
|
return;
|
|
@@ -2742,7 +2760,7 @@ var CheckPathPlugin = function() {
|
|
|
2742
2760
|
return toValue(value);
|
|
2743
2761
|
}
|
|
2744
2762
|
};
|
|
2745
|
-
var expression = function() {
|
|
2763
|
+
var expression = function expression() {
|
|
2746
2764
|
if (ch === BACK_TICK) {
|
|
2747
2765
|
next(BACK_TICK);
|
|
2748
2766
|
var exp = ch;
|
|
@@ -2758,7 +2776,7 @@ var CheckPathPlugin = function() {
|
|
|
2758
2776
|
}
|
|
2759
2777
|
}
|
|
2760
2778
|
};
|
|
2761
|
-
var regex = function(match) {
|
|
2779
|
+
var regex = function regex(match) {
|
|
2762
2780
|
if (!(ch === null || ch === void 0 ? void 0 : ch.match(match))) {
|
|
2763
2781
|
return;
|
|
2764
2782
|
}
|
|
@@ -2773,7 +2791,7 @@ var CheckPathPlugin = function() {
|
|
|
2773
2791
|
return toValue(value);
|
|
2774
2792
|
}
|
|
2775
2793
|
};
|
|
2776
|
-
var nestedPath = function() {
|
|
2794
|
+
var nestedPath = function nestedPath() {
|
|
2777
2795
|
if (ch === OPEN_CURL) {
|
|
2778
2796
|
next(OPEN_CURL);
|
|
2779
2797
|
next(OPEN_CURL);
|
|
@@ -2783,12 +2801,12 @@ var CheckPathPlugin = function() {
|
|
|
2783
2801
|
return modelRef;
|
|
2784
2802
|
}
|
|
2785
2803
|
};
|
|
2786
|
-
var simpleSegment = function() {
|
|
2804
|
+
var simpleSegment = function simpleSegment() {
|
|
2787
2805
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2788
|
-
var
|
|
2806
|
+
var _ref, _nestedPath;
|
|
2789
2807
|
return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
|
|
2790
2808
|
};
|
|
2791
|
-
var segment = function() {
|
|
2809
|
+
var segment = function segment() {
|
|
2792
2810
|
var segments = [];
|
|
2793
2811
|
var nextSegment = simpleSegment();
|
|
2794
2812
|
while(nextSegment !== void 0){
|
|
@@ -2800,7 +2818,7 @@ var CheckPathPlugin = function() {
|
|
|
2800
2818
|
}
|
|
2801
2819
|
return toConcatenatedNode(segments);
|
|
2802
2820
|
};
|
|
2803
|
-
var optionallyQuotedSegment = function() {
|
|
2821
|
+
var optionallyQuotedSegment = function optionallyQuotedSegment() {
|
|
2804
2822
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2805
2823
|
whitespace();
|
|
2806
2824
|
if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
|
|
@@ -2812,7 +2830,7 @@ var CheckPathPlugin = function() {
|
|
|
2812
2830
|
}
|
|
2813
2831
|
return simpleSegment(allowBoolValue);
|
|
2814
2832
|
};
|
|
2815
|
-
var equals = function() {
|
|
2833
|
+
var equals = function equals() {
|
|
2816
2834
|
if (ch !== EQUALS) {
|
|
2817
2835
|
return false;
|
|
2818
2836
|
}
|
|
@@ -2821,7 +2839,7 @@ var CheckPathPlugin = function() {
|
|
|
2821
2839
|
}
|
|
2822
2840
|
return true;
|
|
2823
2841
|
};
|
|
2824
|
-
var parseBracket = function() {
|
|
2842
|
+
var parseBracket = function parseBracket() {
|
|
2825
2843
|
if (ch === OPEN_BRACKET) {
|
|
2826
2844
|
next(OPEN_BRACKET);
|
|
2827
2845
|
whitespace();
|
|
@@ -2843,7 +2861,7 @@ var CheckPathPlugin = function() {
|
|
|
2843
2861
|
return value;
|
|
2844
2862
|
}
|
|
2845
2863
|
};
|
|
2846
|
-
var parseSegmentAndBrackets = function() {
|
|
2864
|
+
var parseSegmentAndBrackets = function parseSegmentAndBrackets() {
|
|
2847
2865
|
var parsed = [];
|
|
2848
2866
|
var firstSegment = segment();
|
|
2849
2867
|
if (firstSegment) {
|
|
@@ -2860,7 +2878,7 @@ var CheckPathPlugin = function() {
|
|
|
2860
2878
|
}
|
|
2861
2879
|
return parsed;
|
|
2862
2880
|
};
|
|
2863
|
-
var parsePath = function() {
|
|
2881
|
+
var parsePath = function parsePath() {
|
|
2864
2882
|
var parts = [];
|
|
2865
2883
|
var nextSegment = parseSegmentAndBrackets();
|
|
2866
2884
|
while(nextSegment !== void 0){
|
|
@@ -2971,6 +2989,7 @@ var CheckPathPlugin = function() {
|
|
|
2971
2989
|
return _BindingInstance;
|
|
2972
2990
|
}();
|
|
2973
2991
|
function resolveBindingAST(bindingPathNode, options, hooks) {
|
|
2992
|
+
var _context_updates;
|
|
2974
2993
|
var context = {
|
|
2975
2994
|
updates: {},
|
|
2976
2995
|
path: []
|
|
@@ -3010,8 +3029,8 @@ var CheckPathPlugin = function() {
|
|
|
3010
3029
|
}
|
|
3011
3030
|
}
|
|
3012
3031
|
function resolveNode(_node) {
|
|
3013
|
-
var
|
|
3014
|
-
var resolvedNode = (
|
|
3032
|
+
var _ref;
|
|
3033
|
+
var resolvedNode = (_ref = hooks === null || hooks === void 0 ? void 0 : hooks.beforeResolveNode.call(_node, _object_spread({}, context, options))) !== null && _ref !== void 0 ? _ref : _node;
|
|
3015
3034
|
switch(resolvedNode.name){
|
|
3016
3035
|
case "Expression":
|
|
3017
3036
|
case "PathNode":
|
|
@@ -3047,7 +3066,6 @@ var CheckPathPlugin = function() {
|
|
|
3047
3066
|
}
|
|
3048
3067
|
}
|
|
3049
3068
|
bindingPathNode.path.forEach(resolveNode);
|
|
3050
|
-
var _context_updates;
|
|
3051
3069
|
return {
|
|
3052
3070
|
path: context.path,
|
|
3053
3071
|
updates: Object.keys((_context_updates = context.updates) !== null && _context_updates !== void 0 ? _context_updates : {}).length > 0 ? context.updates : void 0
|
|
@@ -3056,13 +3074,13 @@ var CheckPathPlugin = function() {
|
|
|
3056
3074
|
var BINDING_BRACKETS_REGEX = /[\s()*=`{}'"[\]]/;
|
|
3057
3075
|
var LAZY_BINDING_REGEX = /^[^.]+(\..+)*$/;
|
|
3058
3076
|
var DEFAULT_OPTIONS = {
|
|
3059
|
-
get: function() {
|
|
3077
|
+
get: function get() {
|
|
3060
3078
|
throw new Error("Not Implemented");
|
|
3061
3079
|
},
|
|
3062
|
-
set: function() {
|
|
3080
|
+
set: function set() {
|
|
3063
3081
|
throw new Error("Not Implemented");
|
|
3064
3082
|
},
|
|
3065
|
-
evaluate: function() {
|
|
3083
|
+
evaluate: function evaluate() {
|
|
3066
3084
|
throw new Error("Not Implemented");
|
|
3067
3085
|
}
|
|
3068
3086
|
};
|
|
@@ -3085,18 +3103,18 @@ var CheckPathPlugin = function() {
|
|
|
3085
3103
|
* representation of that path.
|
|
3086
3104
|
*/ key: "normalizePath",
|
|
3087
3105
|
value: function normalizePath(path, resolveOptions) {
|
|
3106
|
+
var _this_parseCache_path;
|
|
3088
3107
|
if (!BINDING_BRACKETS_REGEX.test(path) && LAZY_BINDING_REGEX.test(path) && this.hooks.skipOptimization.call(path) !== true) {
|
|
3089
3108
|
return {
|
|
3090
3109
|
path: path.split("."),
|
|
3091
3110
|
updates: void 0
|
|
3092
3111
|
};
|
|
3093
3112
|
}
|
|
3094
|
-
var _this_parseCache_path;
|
|
3095
3113
|
var ast = (_this_parseCache_path = this.parseCache[path]) !== null && _this_parseCache_path !== void 0 ? _this_parseCache_path : parse(path);
|
|
3096
3114
|
this.parseCache[path] = ast;
|
|
3097
3115
|
if ((typeof ast === "undefined" ? "undefined" : _type_of(ast)) !== "object" || !(ast === null || ast === void 0 ? void 0 : ast.status)) {
|
|
3098
|
-
var
|
|
3099
|
-
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((
|
|
3116
|
+
var _ref;
|
|
3117
|
+
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."));
|
|
3100
3118
|
}
|
|
3101
3119
|
try {
|
|
3102
3120
|
return resolveBindingAST(ast.path, resolveOptions, this.hooks);
|
|
@@ -3129,14 +3147,14 @@ var CheckPathPlugin = function() {
|
|
|
3129
3147
|
var updates = {};
|
|
3130
3148
|
var joined = Array.isArray(rawBinding) ? rawBinding.join(".") : String(rawBinding);
|
|
3131
3149
|
var normalizeConfig = {
|
|
3132
|
-
getValue: function(path) {
|
|
3150
|
+
getValue: function getValue(path) {
|
|
3133
3151
|
var normalized2 = _this.normalizePath(path.join("."), normalizeConfig);
|
|
3134
3152
|
return options.get(_this.getBindingForNormalizedResult(normalized2));
|
|
3135
3153
|
},
|
|
3136
|
-
evaluate: function(exp) {
|
|
3154
|
+
evaluate: function evaluate(exp) {
|
|
3137
3155
|
return options.evaluate(exp);
|
|
3138
3156
|
},
|
|
3139
|
-
convertToPath: function(path) {
|
|
3157
|
+
convertToPath: function convertToPath(path) {
|
|
3140
3158
|
if (path === void 0) {
|
|
3141
3159
|
throw new Error("Attempted to convert undefined value to binding path");
|
|
3142
3160
|
}
|
|
@@ -3201,9 +3219,9 @@ var CheckPathPlugin = function() {
|
|
|
3201
3219
|
/** Grab all of the bindings that this depended on */ key: "getDependencies",
|
|
3202
3220
|
value: function getDependencies(name) {
|
|
3203
3221
|
if (name !== void 0) {
|
|
3222
|
+
var _ref;
|
|
3204
3223
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3205
|
-
|
|
3206
|
-
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();
|
|
3224
|
+
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();
|
|
3207
3225
|
}
|
|
3208
3226
|
return this.readDeps;
|
|
3209
3227
|
}
|
|
@@ -3225,9 +3243,9 @@ var CheckPathPlugin = function() {
|
|
|
3225
3243
|
/** Grab all of the bindings this wrote to */ key: "getModified",
|
|
3226
3244
|
value: function getModified(name) {
|
|
3227
3245
|
if (name !== void 0) {
|
|
3246
|
+
var _ref;
|
|
3228
3247
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3229
|
-
|
|
3230
|
-
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();
|
|
3248
|
+
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();
|
|
3231
3249
|
}
|
|
3232
3250
|
return this.writeDeps;
|
|
3233
3251
|
}
|
|
@@ -3549,19 +3567,19 @@ var CheckPathPlugin = function() {
|
|
|
3549
3567
|
var thisStr = "this";
|
|
3550
3568
|
var evaluator_functions_exports = {};
|
|
3551
3569
|
__export2(evaluator_functions_exports, {
|
|
3552
|
-
conditional: function() {
|
|
3570
|
+
conditional: function conditional1() {
|
|
3553
3571
|
return conditional;
|
|
3554
3572
|
},
|
|
3555
|
-
deleteDataVal: function() {
|
|
3573
|
+
deleteDataVal: function deleteDataVal1() {
|
|
3556
3574
|
return deleteDataVal;
|
|
3557
3575
|
},
|
|
3558
|
-
getDataVal: function() {
|
|
3576
|
+
getDataVal: function getDataVal1() {
|
|
3559
3577
|
return getDataVal;
|
|
3560
3578
|
},
|
|
3561
|
-
setDataVal: function() {
|
|
3579
|
+
setDataVal: function setDataVal1() {
|
|
3562
3580
|
return setDataVal;
|
|
3563
3581
|
},
|
|
3564
|
-
waitFor: function() {
|
|
3582
|
+
waitFor: function waitFor1() {
|
|
3565
3583
|
return waitFor;
|
|
3566
3584
|
}
|
|
3567
3585
|
});
|
|
@@ -3573,7 +3591,7 @@ var CheckPathPlugin = function() {
|
|
|
3573
3591
|
};
|
|
3574
3592
|
return promise;
|
|
3575
3593
|
}
|
|
3576
|
-
var setDataVal = function(_context, binding, value) {
|
|
3594
|
+
var setDataVal = function setDataVal(_context, binding, value) {
|
|
3577
3595
|
_context.model.set([
|
|
3578
3596
|
[
|
|
3579
3597
|
binding,
|
|
@@ -3581,13 +3599,13 @@ var CheckPathPlugin = function() {
|
|
|
3581
3599
|
]
|
|
3582
3600
|
]);
|
|
3583
3601
|
};
|
|
3584
|
-
var getDataVal = function(_context, binding) {
|
|
3602
|
+
var getDataVal = function getDataVal(_context, binding) {
|
|
3585
3603
|
return _context.model.get(binding);
|
|
3586
3604
|
};
|
|
3587
|
-
var deleteDataVal = function(_context, binding) {
|
|
3605
|
+
var deleteDataVal = function deleteDataVal(_context, binding) {
|
|
3588
3606
|
return _context.model.delete(binding);
|
|
3589
3607
|
};
|
|
3590
|
-
var conditional = function(ctx, condition, ifTrue, ifFalse) {
|
|
3608
|
+
var conditional = function conditional(ctx, condition, ifTrue, ifFalse) {
|
|
3591
3609
|
var testResult = ctx.evaluate(condition);
|
|
3592
3610
|
if (isAwaitable(testResult)) {
|
|
3593
3611
|
return testResult.awaitableThen(function(resolvedTest) {
|
|
@@ -3609,14 +3627,14 @@ var CheckPathPlugin = function() {
|
|
|
3609
3627
|
return null;
|
|
3610
3628
|
};
|
|
3611
3629
|
conditional.resolveParams = false;
|
|
3612
|
-
var waitFor = function(ctx, promise) {
|
|
3630
|
+
var waitFor = function waitFor(ctx, promise) {
|
|
3613
3631
|
return makeAwaitable(promise);
|
|
3614
3632
|
};
|
|
3615
|
-
var andandOperator = function(ctx, a, b, async) {
|
|
3633
|
+
var andandOperator = function andandOperator(ctx, a, b, async) {
|
|
3616
3634
|
return LogicalOperators.and(ctx, a, b, async);
|
|
3617
3635
|
};
|
|
3618
3636
|
andandOperator.resolveParams = false;
|
|
3619
|
-
var ororOperator = function(ctx, a, b, async) {
|
|
3637
|
+
var ororOperator = function ororOperator(ctx, a, b, async) {
|
|
3620
3638
|
return LogicalOperators.or(ctx, a, b, async);
|
|
3621
3639
|
};
|
|
3622
3640
|
ororOperator.resolveParams = false;
|
|
@@ -3742,7 +3760,7 @@ var CheckPathPlugin = function() {
|
|
|
3742
3760
|
}
|
|
3743
3761
|
};
|
|
3744
3762
|
var LogicalOperators = {
|
|
3745
|
-
and: function(ctx, leftNode, rightNode, async) {
|
|
3763
|
+
and: function and(ctx, leftNode, rightNode, async) {
|
|
3746
3764
|
var leftResult = ctx.evaluate(leftNode);
|
|
3747
3765
|
if (async && isAwaitable(leftResult)) {
|
|
3748
3766
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3753,7 +3771,7 @@ var CheckPathPlugin = function() {
|
|
|
3753
3771
|
}
|
|
3754
3772
|
return leftResult && ctx.evaluate(rightNode);
|
|
3755
3773
|
},
|
|
3756
|
-
or: function(ctx, leftNode, rightNode, async) {
|
|
3774
|
+
or: function or(ctx, leftNode, rightNode, async) {
|
|
3757
3775
|
var leftResult = ctx.evaluate(leftNode);
|
|
3758
3776
|
if (async && isAwaitable(leftResult)) {
|
|
3759
3777
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3791,10 +3809,10 @@ var CheckPathPlugin = function() {
|
|
|
3791
3809
|
]))
|
|
3792
3810
|
};
|
|
3793
3811
|
this.defaultHookOptions = _object_spread_props(_object_spread({}, defaultOptions), {
|
|
3794
|
-
evaluate: function(expr) {
|
|
3812
|
+
evaluate: function evaluate(expr) {
|
|
3795
3813
|
return _this.evaluate(expr, _this.defaultHookOptions);
|
|
3796
3814
|
},
|
|
3797
|
-
resolveNode: function(node) {
|
|
3815
|
+
resolveNode: function resolveNode(node) {
|
|
3798
3816
|
return _this._execAST(node, _this.defaultHookOptions);
|
|
3799
3817
|
}
|
|
3800
3818
|
});
|
|
@@ -3814,12 +3832,12 @@ var CheckPathPlugin = function() {
|
|
|
3814
3832
|
key: "evaluate",
|
|
3815
3833
|
value: function evaluate(expr, options) {
|
|
3816
3834
|
var _this = this;
|
|
3835
|
+
var _this_hooks_beforeEvaluate_call;
|
|
3817
3836
|
var resolvedOpts = this.hooks.resolveOptions.call(_object_spread_props(_object_spread({}, this.defaultHookOptions, options), {
|
|
3818
|
-
resolveNode: function(node) {
|
|
3837
|
+
resolveNode: function resolveNode(node) {
|
|
3819
3838
|
return _this._execAST(node, resolvedOpts);
|
|
3820
3839
|
}
|
|
3821
3840
|
}));
|
|
3822
|
-
var _this_hooks_beforeEvaluate_call;
|
|
3823
3841
|
var expression = (_this_hooks_beforeEvaluate_call = this.hooks.beforeEvaluate.call(expr, resolvedOpts)) !== null && _this_hooks_beforeEvaluate_call !== void 0 ? _this_hooks_beforeEvaluate_call : expr;
|
|
3824
3842
|
while(isObjectExpression(expression)){
|
|
3825
3843
|
expression = expression.value;
|
|
@@ -3943,11 +3961,11 @@ var CheckPathPlugin = function() {
|
|
|
3943
3961
|
key: "_resolveNode",
|
|
3944
3962
|
value: function _resolveNode(_currentValue, node, options) {
|
|
3945
3963
|
var _this = this;
|
|
3946
|
-
var resolveNode = options.resolveNode, model = options.model;
|
|
3947
3964
|
var _options_async;
|
|
3965
|
+
var resolveNode = options.resolveNode, model = options.model;
|
|
3948
3966
|
var isAsync = (_options_async = options.async) !== null && _options_async !== void 0 ? _options_async : false;
|
|
3949
3967
|
var expressionContext = _object_spread_props(_object_spread({}, options), {
|
|
3950
|
-
evaluate: function(expr) {
|
|
3968
|
+
evaluate: function evaluate(expr) {
|
|
3951
3969
|
return _this.evaluate(expr, options);
|
|
3952
3970
|
}
|
|
3953
3971
|
});
|
|
@@ -4281,7 +4299,7 @@ var CheckPathPlugin = function() {
|
|
|
4281
4299
|
]);
|
|
4282
4300
|
return ProxyLogger;
|
|
4283
4301
|
}();
|
|
4284
|
-
var identify = function(val) {
|
|
4302
|
+
var identify = function identify(val) {
|
|
4285
4303
|
return val;
|
|
4286
4304
|
};
|
|
4287
4305
|
var SchemaController = /*#__PURE__*/ function() {
|
|
@@ -4369,6 +4387,7 @@ var CheckPathPlugin = function() {
|
|
|
4369
4387
|
{
|
|
4370
4388
|
key: "getApparentType",
|
|
4371
4389
|
value: function getApparentType(binding) {
|
|
4390
|
+
var _schemaType_validation, _baseType_validation;
|
|
4372
4391
|
var schemaType = this.getType(binding);
|
|
4373
4392
|
if (schemaType === void 0) {
|
|
4374
4393
|
return void 0;
|
|
@@ -4377,7 +4396,6 @@ var CheckPathPlugin = function() {
|
|
|
4377
4396
|
if (baseType === void 0) {
|
|
4378
4397
|
return schemaType;
|
|
4379
4398
|
}
|
|
4380
|
-
var _schemaType_validation, _baseType_validation;
|
|
4381
4399
|
return _object_spread_props(_object_spread({}, baseType, schemaType), {
|
|
4382
4400
|
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 : []))
|
|
4383
4401
|
});
|
|
@@ -4526,10 +4544,10 @@ var CheckPathPlugin = function() {
|
|
|
4526
4544
|
{
|
|
4527
4545
|
key: "get",
|
|
4528
4546
|
value: function get(binding, options, next) {
|
|
4547
|
+
var _ref;
|
|
4529
4548
|
var _this_shouldIncludeInvalid, _this;
|
|
4530
4549
|
var val = next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
4531
|
-
|
|
4532
|
-
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) {
|
|
4550
|
+
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) {
|
|
4533
4551
|
this.shadowModelPaths.forEach(function(shadowValue, shadowBinding) {
|
|
4534
4552
|
if (shadowBinding === binding) {
|
|
4535
4553
|
val = shadowValue;
|
|
@@ -4627,11 +4645,12 @@ var CheckPathPlugin = function() {
|
|
|
4627
4645
|
templateDepth: 0
|
|
4628
4646
|
};
|
|
4629
4647
|
var _this = this;
|
|
4648
|
+
var _this_hooks_onCreateASTNode_call;
|
|
4630
4649
|
var parsedNode = this.hooks.parseNode.call(obj, type, options);
|
|
4631
4650
|
if (parsedNode || parsedNode === null) {
|
|
4632
4651
|
return parsedNode;
|
|
4633
4652
|
}
|
|
4634
|
-
var parseLocalObject = function(currentValue, objToParse) {
|
|
4653
|
+
var parseLocalObject = function parseLocalObject1(currentValue, objToParse) {
|
|
4635
4654
|
var path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
4636
4655
|
if ((typeof objToParse === "undefined" ? "undefined" : _type_of(objToParse)) !== "object" || objToParse === null) {
|
|
4637
4656
|
return {
|
|
@@ -4701,30 +4720,29 @@ var CheckPathPlugin = function() {
|
|
|
4701
4720
|
child.value.parent = parent;
|
|
4702
4721
|
});
|
|
4703
4722
|
}
|
|
4704
|
-
var _this_hooks_onCreateASTNode_call;
|
|
4705
4723
|
return (_this_hooks_onCreateASTNode_call = this.hooks.onCreateASTNode.call(baseAst, obj)) !== null && _this_hooks_onCreateASTNode_call !== void 0 ? _this_hooks_onCreateASTNode_call : null;
|
|
4706
4724
|
}
|
|
4707
4725
|
}
|
|
4708
4726
|
]);
|
|
4709
4727
|
return Parser;
|
|
4710
4728
|
}();
|
|
4711
|
-
var withContext = function(model) {
|
|
4729
|
+
var withContext = function withContext(model) {
|
|
4712
4730
|
return {
|
|
4713
|
-
get: function(binding, options) {
|
|
4731
|
+
get: function get(binding, options) {
|
|
4714
4732
|
return model.get(binding, _object_spread({
|
|
4715
4733
|
context: {
|
|
4716
4734
|
model: model
|
|
4717
4735
|
}
|
|
4718
4736
|
}, options));
|
|
4719
4737
|
},
|
|
4720
|
-
set: function(transaction, options) {
|
|
4738
|
+
set: function set(transaction, options) {
|
|
4721
4739
|
return model.set(transaction, _object_spread({
|
|
4722
4740
|
context: {
|
|
4723
4741
|
model: model
|
|
4724
4742
|
}
|
|
4725
4743
|
}, options));
|
|
4726
4744
|
},
|
|
4727
|
-
delete: function(binding, options) {
|
|
4745
|
+
delete: function _delete(binding, options) {
|
|
4728
4746
|
return model.delete(binding, _object_spread({
|
|
4729
4747
|
context: {
|
|
4730
4748
|
model: model
|
|
@@ -4763,16 +4781,16 @@ var CheckPathPlugin = function() {
|
|
|
4763
4781
|
{
|
|
4764
4782
|
key: "update",
|
|
4765
4783
|
value: function update(dataChanges, nodeChanges) {
|
|
4784
|
+
var _ref;
|
|
4766
4785
|
this.hooks.beforeUpdate.call(dataChanges);
|
|
4767
4786
|
var resolveCache = /* @__PURE__ */ new Map();
|
|
4768
4787
|
this.idCache.clear();
|
|
4769
4788
|
var prevASTMap = new Map(this.ASTMap);
|
|
4770
4789
|
this.ASTMap.clear();
|
|
4771
4790
|
var realNodeChanges = /* @__PURE__ */ new Set();
|
|
4772
|
-
var _nodeChanges_values;
|
|
4773
4791
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4774
4792
|
try {
|
|
4775
|
-
for(var _iterator = ((
|
|
4793
|
+
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){
|
|
4776
4794
|
var node = _step.value;
|
|
4777
4795
|
var current = node;
|
|
4778
4796
|
while(current){
|
|
@@ -4855,6 +4873,7 @@ var CheckPathPlugin = function() {
|
|
|
4855
4873
|
key: "computeTree",
|
|
4856
4874
|
value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nodeChanges) {
|
|
4857
4875
|
var _this = this;
|
|
4876
|
+
var _this_hooks_beforeResolve_call;
|
|
4858
4877
|
var dependencyModel = new DependencyModel(options.data.model);
|
|
4859
4878
|
dependencyModel.trackSubset("core");
|
|
4860
4879
|
var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
|
|
@@ -4862,7 +4881,7 @@ var CheckPathPlugin = function() {
|
|
|
4862
4881
|
data: _object_spread_props(_object_spread({}, options.data), {
|
|
4863
4882
|
model: depModelWithParser
|
|
4864
4883
|
}),
|
|
4865
|
-
evaluate: function(exp) {
|
|
4884
|
+
evaluate: function evaluate(exp) {
|
|
4866
4885
|
return _this.options.evaluator.evaluate(exp, {
|
|
4867
4886
|
model: depModelWithParser
|
|
4868
4887
|
});
|
|
@@ -4878,14 +4897,14 @@ var CheckPathPlugin = function() {
|
|
|
4878
4897
|
var update2 = _object_spread_props(_object_spread({}, previousResult), {
|
|
4879
4898
|
updated: false
|
|
4880
4899
|
});
|
|
4881
|
-
var repopulateASTMapFromCache = function(resolvedNode, AST, ASTParent) {
|
|
4900
|
+
var repopulateASTMapFromCache = function repopulateASTMapFromCache1(resolvedNode, AST, ASTParent) {
|
|
4882
4901
|
var resolvedASTLocal = resolvedNode.node;
|
|
4883
4902
|
_this.ASTMap.set(resolvedASTLocal, AST);
|
|
4884
4903
|
var resolvedUpdate = _object_spread_props(_object_spread({}, resolvedNode), {
|
|
4885
4904
|
updated: false
|
|
4886
4905
|
});
|
|
4887
4906
|
cacheUpdate.set(AST, resolvedUpdate);
|
|
4888
|
-
var handleChildNode = function(childNode) {
|
|
4907
|
+
var handleChildNode = function handleChildNode(childNode) {
|
|
4889
4908
|
var _prevASTMap_get;
|
|
4890
4909
|
var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
|
|
4891
4910
|
var previousChildResult = _this.getPreviousResult(originalChildNode);
|
|
@@ -4910,7 +4929,6 @@ var CheckPathPlugin = function() {
|
|
|
4910
4929
|
var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
|
|
4911
4930
|
parent: partiallyResolvedParent
|
|
4912
4931
|
});
|
|
4913
|
-
var _this_hooks_beforeResolve_call;
|
|
4914
4932
|
var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
|
|
4915
4933
|
type: "empty"
|
|
4916
4934
|
};
|
|
@@ -4970,7 +4988,7 @@ var CheckPathPlugin = function() {
|
|
|
4970
4988
|
resolved = previousResult === null || previousResult === void 0 ? void 0 : previousResult.value;
|
|
4971
4989
|
}
|
|
4972
4990
|
resolved = this.hooks.afterResolve.call(resolved, resolvedAST, _object_spread_props(_object_spread({}, resolveOptions), {
|
|
4973
|
-
getDependencies: function(scope) {
|
|
4991
|
+
getDependencies: function getDependencies(scope) {
|
|
4974
4992
|
return dependencyModel.getDependencies(scope);
|
|
4975
4993
|
}
|
|
4976
4994
|
}));
|
|
@@ -5280,7 +5298,7 @@ var CheckPathPlugin = function() {
|
|
|
5280
5298
|
]);
|
|
5281
5299
|
return TemplatePlugin;
|
|
5282
5300
|
}();
|
|
5283
|
-
var createPatternMatcher = function(start, end) {
|
|
5301
|
+
var createPatternMatcher = function createPatternMatcher(start, end) {
|
|
5284
5302
|
return function(testStr) {
|
|
5285
5303
|
var startLocation = testStr.indexOf(start);
|
|
5286
5304
|
if (startLocation === -1) {
|
|
@@ -5320,18 +5338,18 @@ var CheckPathPlugin = function() {
|
|
|
5320
5338
|
});
|
|
5321
5339
|
return newNode;
|
|
5322
5340
|
}
|
|
5323
|
-
var findBasePath = function(node, resolver) {
|
|
5341
|
+
var findBasePath = function findBasePath1(node, resolver) {
|
|
5324
5342
|
var parentNode = node.parent;
|
|
5325
5343
|
if (!parentNode) {
|
|
5326
5344
|
return [];
|
|
5327
5345
|
}
|
|
5328
5346
|
if ("children" in parentNode) {
|
|
5347
|
+
var _ref;
|
|
5329
5348
|
var _parentNode_children_find, _parentNode_children;
|
|
5330
5349
|
var original = resolver.getSourceNode(node);
|
|
5331
|
-
|
|
5332
|
-
return (_parentNode_children_find_path = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5350
|
+
return (_ref = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5333
5351
|
return child.value === original;
|
|
5334
|
-
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null &&
|
|
5352
|
+
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null && _ref !== void 0 ? _ref : [];
|
|
5335
5353
|
}
|
|
5336
5354
|
if (parentNode.type !== "multi-node") {
|
|
5337
5355
|
return [];
|
|
@@ -5356,9 +5374,9 @@ var CheckPathPlugin = function() {
|
|
|
5356
5374
|
var _node_parent, _node_parent_parent, _node_parent1, _node_parent_parent1, _node_parent2, _node_parent_parent_value;
|
|
5357
5375
|
var propsToSkip;
|
|
5358
5376
|
if (node.type === "asset" || node.type === "view") {
|
|
5377
|
+
var _ref;
|
|
5359
5378
|
var _node_plugins_stringResolver, _node_plugins, _node_value;
|
|
5360
|
-
|
|
5361
|
-
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 : [
|
|
5379
|
+
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 : [
|
|
5362
5380
|
"exp"
|
|
5363
5381
|
]);
|
|
5364
5382
|
if ((_node_value = node.value) === null || _node_value === void 0 ? void 0 : _node_value.id) {
|
|
@@ -5779,11 +5797,11 @@ var CheckPathPlugin = function() {
|
|
|
5779
5797
|
this.stateStore.clear();
|
|
5780
5798
|
view.hooks.resolver.tap("asset-transform", function(resolver) {
|
|
5781
5799
|
var lastUpdatedNode;
|
|
5782
|
-
var updateState = function(node) {
|
|
5800
|
+
var updateState = function updateState(node) {
|
|
5783
5801
|
lastUpdatedNode = node;
|
|
5784
5802
|
view.update(/* @__PURE__ */ new Set());
|
|
5785
5803
|
};
|
|
5786
|
-
var getStore = function(node, stepKey) {
|
|
5804
|
+
var getStore = function getStore(node, stepKey) {
|
|
5787
5805
|
var store;
|
|
5788
5806
|
var countKey = stepKey === _this.resolveSymbol ? _this.resolveCountSymbol : _this.beforeResolveCountSymbol;
|
|
5789
5807
|
var storedState = _this.stateStore.get(node);
|
|
@@ -5797,10 +5815,10 @@ var CheckPathPlugin = function() {
|
|
|
5797
5815
|
_this.stateStore.set(node, store);
|
|
5798
5816
|
}
|
|
5799
5817
|
return {
|
|
5800
|
-
useSharedState: function(key) {
|
|
5818
|
+
useSharedState: function useSharedState(key) {
|
|
5801
5819
|
return store.useSharedState(key);
|
|
5802
5820
|
},
|
|
5803
|
-
useLocalState: function(initialState) {
|
|
5821
|
+
useLocalState: function useLocalState(initialState) {
|
|
5804
5822
|
return store.getLocalStateFunction(stepKey, countKey)(initialState);
|
|
5805
5823
|
}
|
|
5806
5824
|
};
|
|
@@ -6162,7 +6180,7 @@ var CheckPathPlugin = function() {
|
|
|
6162
6180
|
return options;
|
|
6163
6181
|
}
|
|
6164
6182
|
tracked.delete(node);
|
|
6165
|
-
var track = function(binding) {
|
|
6183
|
+
var track = function track(binding) {
|
|
6166
6184
|
var _this_options_callbacks_onAdd, _this_options_callbacks;
|
|
6167
6185
|
var parsed = isBinding(binding) ? binding : _this.options.parseBinding(binding);
|
|
6168
6186
|
if (tracked.has(node)) {
|
|
@@ -6188,7 +6206,7 @@ var CheckPathPlugin = function() {
|
|
|
6188
6206
|
};
|
|
6189
6207
|
return _object_spread_props(_object_spread({}, options), {
|
|
6190
6208
|
validation: _object_spread_props(_object_spread({}, options.validation), {
|
|
6191
|
-
get: function(binding, getOptions) {
|
|
6209
|
+
get: function get(binding, getOptions) {
|
|
6192
6210
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6193
6211
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6194
6212
|
track(binding);
|
|
@@ -6200,14 +6218,14 @@ var CheckPathPlugin = function() {
|
|
|
6200
6218
|
return firstFieldEOW;
|
|
6201
6219
|
},
|
|
6202
6220
|
getValidationsForBinding: function getValidationsForBinding(binding, getOptions) {
|
|
6221
|
+
var _ref;
|
|
6203
6222
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6204
6223
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6205
6224
|
track(binding);
|
|
6206
6225
|
}
|
|
6207
|
-
|
|
6208
|
-
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 : [];
|
|
6226
|
+
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 : [];
|
|
6209
6227
|
},
|
|
6210
|
-
getChildren: function(type) {
|
|
6228
|
+
getChildren: function getChildren(type) {
|
|
6211
6229
|
var _lastComputedBindingTree_get;
|
|
6212
6230
|
var validations = new Array();
|
|
6213
6231
|
(_lastComputedBindingTree_get = lastComputedBindingTree.get(node)) === null || _lastComputedBindingTree_get === void 0 ? void 0 : _lastComputedBindingTree_get.forEach(function(binding) {
|
|
@@ -6219,7 +6237,7 @@ var CheckPathPlugin = function() {
|
|
|
6219
6237
|
});
|
|
6220
6238
|
return validations;
|
|
6221
6239
|
},
|
|
6222
|
-
getValidationsForSection: function() {
|
|
6240
|
+
getValidationsForSection: function getValidationsForSection() {
|
|
6223
6241
|
var _lastSectionBindingTree_get;
|
|
6224
6242
|
var validations = new Array();
|
|
6225
6243
|
(_lastSectionBindingTree_get = lastSectionBindingTree.get(node)) === null || _lastSectionBindingTree_get === void 0 ? void 0 : _lastSectionBindingTree_get.forEach(function(binding) {
|
|
@@ -6231,7 +6249,7 @@ var CheckPathPlugin = function() {
|
|
|
6231
6249
|
});
|
|
6232
6250
|
return validations;
|
|
6233
6251
|
},
|
|
6234
|
-
register: function(registerOptions) {
|
|
6252
|
+
register: function register(registerOptions) {
|
|
6235
6253
|
if ((registerOptions === null || registerOptions === void 0 ? void 0 : registerOptions.type) === "section") {
|
|
6236
6254
|
if (!sections.has(node)) {
|
|
6237
6255
|
sections.set(node, /* @__PURE__ */ new Set());
|
|
@@ -6376,10 +6394,10 @@ var CheckPathPlugin = function() {
|
|
|
6376
6394
|
value: function runApplicableValidations(runner, canDismiss, phase) {
|
|
6377
6395
|
var _this = this;
|
|
6378
6396
|
this.applicableValidations = this.applicableValidations.map(function(originalValue) {
|
|
6397
|
+
var _originalValue_value_blocking, _response_message, _obj_value_displayTarget;
|
|
6379
6398
|
if (originalValue.state === "dismissed") {
|
|
6380
6399
|
return originalValue;
|
|
6381
6400
|
}
|
|
6382
|
-
var _originalValue_value_blocking;
|
|
6383
6401
|
var blocking = (_originalValue_value_blocking = originalValue.value.blocking) !== null && _originalValue_value_blocking !== void 0 ? _originalValue_value_blocking : originalValue.value.severity === "warning" && "once" || true;
|
|
6384
6402
|
var obj = (0, import_timm9.setIn)(originalValue, [
|
|
6385
6403
|
"value",
|
|
@@ -6401,7 +6419,6 @@ var CheckPathPlugin = function() {
|
|
|
6401
6419
|
}
|
|
6402
6420
|
}
|
|
6403
6421
|
var response = runner(obj.value);
|
|
6404
|
-
var _response_message, _obj_value_displayTarget;
|
|
6405
6422
|
var newState = {
|
|
6406
6423
|
type: obj.type,
|
|
6407
6424
|
value: obj.value,
|
|
@@ -6486,14 +6503,14 @@ var CheckPathPlugin = function() {
|
|
|
6486
6503
|
var _this = this;
|
|
6487
6504
|
return [
|
|
6488
6505
|
{
|
|
6489
|
-
set: function(transaction, options, next) {
|
|
6490
|
-
var
|
|
6491
|
-
return (
|
|
6506
|
+
set: function set(transaction, options, next) {
|
|
6507
|
+
var _ref;
|
|
6508
|
+
return (_ref = next === null || next === void 0 ? void 0 : next.set(transaction, options)) !== null && _ref !== void 0 ? _ref : [];
|
|
6492
6509
|
},
|
|
6493
|
-
get: function(binding, options, next) {
|
|
6510
|
+
get: function get(binding, options, next) {
|
|
6494
6511
|
return next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
6495
6512
|
},
|
|
6496
|
-
delete: function(binding, options, next) {
|
|
6513
|
+
delete: function _delete(binding, options, next) {
|
|
6497
6514
|
_this.validations = removeBindingAndChildrenFromMap(_this.validations, binding);
|
|
6498
6515
|
return next === null || next === void 0 ? void 0 : next.delete(binding, options);
|
|
6499
6516
|
}
|
|
@@ -6556,11 +6573,11 @@ var CheckPathPlugin = function() {
|
|
|
6556
6573
|
{
|
|
6557
6574
|
source: VIEW_VALIDATION_PROVIDER_NAME,
|
|
6558
6575
|
provider: {
|
|
6559
|
-
getValidationsForBinding: function(binding) {
|
|
6576
|
+
getValidationsForBinding: function getValidationsForBinding(binding) {
|
|
6560
6577
|
var _this_viewValidationProvider_getValidationsForBinding, _this_viewValidationProvider;
|
|
6561
6578
|
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);
|
|
6562
6579
|
},
|
|
6563
|
-
getValidationsForView: function() {
|
|
6580
|
+
getValidationsForView: function getValidationsForView() {
|
|
6564
6581
|
var _this_viewValidationProvider_getValidationsForView, _this_viewValidationProvider;
|
|
6565
6582
|
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);
|
|
6566
6583
|
}
|
|
@@ -6587,7 +6604,7 @@ var CheckPathPlugin = function() {
|
|
|
6587
6604
|
}
|
|
6588
6605
|
var bindingTrackerPlugin = new ValidationBindingTrackerViewPlugin(_object_spread_props(_object_spread({}, this.options), {
|
|
6589
6606
|
callbacks: {
|
|
6590
|
-
onAdd: function(binding) {
|
|
6607
|
+
onAdd: function onAdd(binding) {
|
|
6591
6608
|
if (!_this.options || _this.getValidationForBinding(binding) !== void 0) {
|
|
6592
6609
|
return;
|
|
6593
6610
|
}
|
|
@@ -6631,11 +6648,11 @@ var CheckPathPlugin = function() {
|
|
|
6631
6648
|
var _this_options;
|
|
6632
6649
|
var possibleValidations = this.getValidationProviders().reduce(function(vals, provider) {
|
|
6633
6650
|
var _vals;
|
|
6651
|
+
var _ref;
|
|
6634
6652
|
var _provider_provider_getValidationsForBinding, _provider_provider_getValidationsForBinding1, _provider_provider;
|
|
6635
|
-
|
|
6636
|
-
(_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) {
|
|
6653
|
+
(_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) {
|
|
6637
6654
|
return _object_spread_props(_object_spread({}, valObj), _define_property({}, VALIDATION_PROVIDER_NAME_SYMBOL, provider.source));
|
|
6638
|
-
})) !== null &&
|
|
6655
|
+
})) !== null && _ref !== void 0 ? _ref : []));
|
|
6639
6656
|
return vals;
|
|
6640
6657
|
}, []);
|
|
6641
6658
|
if (possibleValidations.length === 0) {
|
|
@@ -6676,10 +6693,10 @@ var CheckPathPlugin = function() {
|
|
|
6676
6693
|
key: "validationRunner",
|
|
6677
6694
|
value: function validationRunner(validationObj, binding) {
|
|
6678
6695
|
var context = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.options;
|
|
6696
|
+
var _validationObj_handler;
|
|
6679
6697
|
if (!context) {
|
|
6680
6698
|
throw new Error("No context provided to validation runner");
|
|
6681
6699
|
}
|
|
6682
|
-
var _validationObj_handler;
|
|
6683
6700
|
var handler = (_validationObj_handler = validationObj.handler) !== null && _validationObj_handler !== void 0 ? _validationObj_handler : this.getValidator(validationObj.type);
|
|
6684
6701
|
var weakBindings = /* @__PURE__ */ new Set();
|
|
6685
6702
|
var model = {
|
|
@@ -6693,7 +6710,7 @@ var CheckPathPlugin = function() {
|
|
|
6693
6710
|
delete: context.model.delete
|
|
6694
6711
|
};
|
|
6695
6712
|
var result = handler === null || handler === void 0 ? void 0 : handler(_object_spread_props(_object_spread({}, context), {
|
|
6696
|
-
evaluate: function(exp) {
|
|
6713
|
+
evaluate: function evaluate(exp) {
|
|
6697
6714
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
6698
6715
|
model: model
|
|
6699
6716
|
};
|
|
@@ -6731,7 +6748,7 @@ var CheckPathPlugin = function() {
|
|
|
6731
6748
|
var _this = this;
|
|
6732
6749
|
var isNavigationTrigger = trigger === "navigation";
|
|
6733
6750
|
var lastActiveBindings = this.activeBindings;
|
|
6734
|
-
var updateValidations = function(dismissValidations) {
|
|
6751
|
+
var updateValidations = function updateValidations(dismissValidations) {
|
|
6735
6752
|
_this.getBindings().forEach(function(binding) {
|
|
6736
6753
|
var _this_validations_get;
|
|
6737
6754
|
(_this_validations_get = _this.validations.get(binding)) === null || _this_validations_get === void 0 ? void 0 : _this_validations_get.update(trigger, dismissValidations, function(obj) {
|
|
@@ -6776,9 +6793,9 @@ var CheckPathPlugin = function() {
|
|
|
6776
6793
|
{
|
|
6777
6794
|
key: "getBindings",
|
|
6778
6795
|
value: function getBindings() {
|
|
6796
|
+
var _ref;
|
|
6779
6797
|
var _this_tracker;
|
|
6780
|
-
|
|
6781
|
-
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();
|
|
6798
|
+
return (_ref = (_this_tracker = this.tracker) === null || _this_tracker === void 0 ? void 0 : _this_tracker.getBindings()) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
6782
6799
|
}
|
|
6783
6800
|
},
|
|
6784
6801
|
{
|
|
@@ -6827,10 +6844,10 @@ var CheckPathPlugin = function() {
|
|
|
6827
6844
|
value: function forView(parser) {
|
|
6828
6845
|
var _this = this;
|
|
6829
6846
|
return {
|
|
6830
|
-
_getValidationForBinding: function(binding) {
|
|
6847
|
+
_getValidationForBinding: function _getValidationForBinding(binding) {
|
|
6831
6848
|
return _this.getValidationForBinding(isBinding(binding) ? binding : parser(binding));
|
|
6832
6849
|
},
|
|
6833
|
-
getAll: function() {
|
|
6850
|
+
getAll: function getAll() {
|
|
6834
6851
|
var bindings = _this.getBindings();
|
|
6835
6852
|
if (bindings.size === 0) {
|
|
6836
6853
|
return void 0;
|
|
@@ -6857,13 +6874,13 @@ var CheckPathPlugin = function() {
|
|
|
6857
6874
|
getValidationsForSection: function getValidationsForSection() {
|
|
6858
6875
|
throw new Error("Error rollup should be provided by the view plugin");
|
|
6859
6876
|
},
|
|
6860
|
-
track: function() {
|
|
6877
|
+
track: function track() {
|
|
6861
6878
|
throw new Error("Tracking should be provided by the view plugin");
|
|
6862
6879
|
},
|
|
6863
|
-
register: function() {
|
|
6880
|
+
register: function register() {
|
|
6864
6881
|
throw new Error("Section functionality should be provided by the view plugin");
|
|
6865
6882
|
},
|
|
6866
|
-
type: function(binding) {
|
|
6883
|
+
type: function type(binding) {
|
|
6867
6884
|
return _this.schema.getType(isBinding(binding) ? binding : parser(binding));
|
|
6868
6885
|
}
|
|
6869
6886
|
};
|
|
@@ -6872,9 +6889,9 @@ var CheckPathPlugin = function() {
|
|
|
6872
6889
|
]);
|
|
6873
6890
|
return ValidationController;
|
|
6874
6891
|
}();
|
|
6875
|
-
var mergeSets = function(setA, setB) {
|
|
6876
|
-
var
|
|
6877
|
-
return /* @__PURE__ */ new Set(_to_consumable_array((
|
|
6892
|
+
var mergeSets = function mergeSets(setA, setB) {
|
|
6893
|
+
var _ref, _ref1;
|
|
6894
|
+
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 : [])));
|
|
6878
6895
|
};
|
|
6879
6896
|
var ViewController = /*#__PURE__*/ function() {
|
|
6880
6897
|
function ViewController(initialViews, options) {
|
|
@@ -6901,7 +6918,7 @@ var CheckPathPlugin = function() {
|
|
|
6901
6918
|
}
|
|
6902
6919
|
});
|
|
6903
6920
|
});
|
|
6904
|
-
var update = function(updates) {
|
|
6921
|
+
var update = function update(updates) {
|
|
6905
6922
|
var silent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
6906
6923
|
if (_this1.currentView) {
|
|
6907
6924
|
if (_this1.optimizeUpdates) {
|
|
@@ -6912,10 +6929,10 @@ var CheckPathPlugin = function() {
|
|
|
6912
6929
|
}
|
|
6913
6930
|
};
|
|
6914
6931
|
options.model.hooks.onUpdate.tap("viewController", function(updates, updateOptions) {
|
|
6915
|
-
var
|
|
6932
|
+
var _ref;
|
|
6916
6933
|
update(new Set(updates.map(function(t2) {
|
|
6917
6934
|
return t2.binding;
|
|
6918
|
-
})), (
|
|
6935
|
+
})), (_ref = updateOptions === null || updateOptions === void 0 ? void 0 : updateOptions.silent) !== null && _ref !== void 0 ? _ref : false);
|
|
6919
6936
|
});
|
|
6920
6937
|
options.model.hooks.onDelete.tap("viewController", function(binding) {
|
|
6921
6938
|
var parentBinding = binding.parent();
|
|
@@ -6950,8 +6967,8 @@ var CheckPathPlugin = function() {
|
|
|
6950
6967
|
if (!this.pendingUpdate.scheduled && !silent) {
|
|
6951
6968
|
this.pendingUpdate.scheduled = true;
|
|
6952
6969
|
(0, import_queue_microtask2.default)(function() {
|
|
6953
|
-
var _this_currentView;
|
|
6954
6970
|
var _this_pendingUpdate;
|
|
6971
|
+
var _this_currentView;
|
|
6955
6972
|
var _ref = (_this_pendingUpdate = _this.pendingUpdate) !== null && _this_pendingUpdate !== void 0 ? _this_pendingUpdate : {}, changedBindings = _ref.changedBindings, changedNodes = _ref.changedNodes;
|
|
6956
6973
|
_this.pendingUpdate = void 0;
|
|
6957
6974
|
(_this_currentView = _this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.update(changedBindings, changedNodes);
|
|
@@ -7276,10 +7293,10 @@ var CheckPathPlugin = function() {
|
|
|
7276
7293
|
{
|
|
7277
7294
|
key: "getConstants",
|
|
7278
7295
|
value: function getConstants(key, namespace, fallback) {
|
|
7296
|
+
var _ref, _ref1;
|
|
7279
7297
|
var _this_tempStore_get, _this_store_get;
|
|
7280
7298
|
var path = new BindingInstance(key);
|
|
7281
|
-
|
|
7282
|
-
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;
|
|
7299
|
+
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;
|
|
7283
7300
|
}
|
|
7284
7301
|
},
|
|
7285
7302
|
{
|
|
@@ -7320,7 +7337,7 @@ var CheckPathPlugin = function() {
|
|
|
7320
7337
|
value: function apply(player) {
|
|
7321
7338
|
var _this = this;
|
|
7322
7339
|
var expressionEvaluator;
|
|
7323
|
-
var handleEval = function(exp) {
|
|
7340
|
+
var handleEval = function handleEval(exp) {
|
|
7324
7341
|
if (exp) {
|
|
7325
7342
|
if ((typeof exp === "undefined" ? "undefined" : _type_of(exp)) === "object" && "exp" in exp) {
|
|
7326
7343
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp.exp);
|
|
@@ -7341,7 +7358,7 @@ var CheckPathPlugin = function() {
|
|
|
7341
7358
|
return handleEval(exp);
|
|
7342
7359
|
});
|
|
7343
7360
|
flow.hooks.resolveTransitionNode.intercept({
|
|
7344
|
-
call: function(nextState) {
|
|
7361
|
+
call: function call(nextState) {
|
|
7345
7362
|
if (nextState === null || nextState === void 0 ? void 0 : nextState.onStart) {
|
|
7346
7363
|
handleEval(nextState.onStart);
|
|
7347
7364
|
}
|
|
@@ -7354,13 +7371,13 @@ var CheckPathPlugin = function() {
|
|
|
7354
7371
|
]);
|
|
7355
7372
|
return FlowExpPlugin;
|
|
7356
7373
|
}();
|
|
7357
|
-
var createFormatFunction = function(schema) {
|
|
7358
|
-
var handler = function(ctx, value, formatName) {
|
|
7374
|
+
var createFormatFunction = function createFormatFunction(schema) {
|
|
7375
|
+
var handler = function handler(ctx, value, formatName) {
|
|
7376
|
+
var _ref;
|
|
7359
7377
|
var _schema_getFormatterForType;
|
|
7360
|
-
|
|
7361
|
-
return (_schema_getFormatterForType_format = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7378
|
+
return (_ref = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7362
7379
|
type: formatName
|
|
7363
|
-
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null &&
|
|
7380
|
+
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null && _ref !== void 0 ? _ref : value;
|
|
7364
7381
|
};
|
|
7365
7382
|
return handler;
|
|
7366
7383
|
};
|
|
@@ -7412,8 +7429,8 @@ var CheckPathPlugin = function() {
|
|
|
7412
7429
|
ref: Symbol("not-started"),
|
|
7413
7430
|
status: "not-started"
|
|
7414
7431
|
};
|
|
7415
|
-
var PLAYER_VERSION = true ? "0.15.3-next.
|
|
7416
|
-
var COMMIT = true ? "
|
|
7432
|
+
var PLAYER_VERSION = true ? "0.15.3-next.2" : "unknown";
|
|
7433
|
+
var COMMIT = true ? "21f4b09d55c325c5fe951d2fd08caaebb81db483" : "unknown";
|
|
7417
7434
|
var _Player = /*#__PURE__*/ function() {
|
|
7418
7435
|
function _Player2(config) {
|
|
7419
7436
|
var _this = this;
|
|
@@ -7528,13 +7545,13 @@ var CheckPathPlugin = function() {
|
|
|
7528
7545
|
var expressionEvaluator;
|
|
7529
7546
|
var dataController;
|
|
7530
7547
|
var pathResolver = new BindingParser({
|
|
7531
|
-
get: function(binding) {
|
|
7548
|
+
get: function get(binding) {
|
|
7532
7549
|
return dataController.get(binding);
|
|
7533
7550
|
},
|
|
7534
|
-
set: function(transaction) {
|
|
7551
|
+
set: function set(transaction) {
|
|
7535
7552
|
return dataController.set(transaction);
|
|
7536
7553
|
},
|
|
7537
|
-
evaluate: function(expression) {
|
|
7554
|
+
evaluate: function evaluate(expression) {
|
|
7538
7555
|
return expressionEvaluator.evaluate(expression);
|
|
7539
7556
|
}
|
|
7540
7557
|
});
|
|
@@ -7678,23 +7695,23 @@ var CheckPathPlugin = function() {
|
|
|
7678
7695
|
transition: flowController.transition,
|
|
7679
7696
|
model: dataController,
|
|
7680
7697
|
utils: {
|
|
7681
|
-
findPlugin: function(pluginSymbol) {
|
|
7698
|
+
findPlugin: function findPlugin(pluginSymbol) {
|
|
7682
7699
|
return _this.findPlugin(pluginSymbol);
|
|
7683
7700
|
}
|
|
7684
7701
|
},
|
|
7685
7702
|
logger: this.logger,
|
|
7686
7703
|
flowController: flowController,
|
|
7687
7704
|
schema: schema,
|
|
7688
|
-
format: function(binding, value) {
|
|
7705
|
+
format: function format(binding, value) {
|
|
7689
7706
|
var formatter = schema.getFormatter(binding);
|
|
7690
7707
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7691
7708
|
},
|
|
7692
|
-
formatValue: function(ref, value) {
|
|
7709
|
+
formatValue: function formatValue(ref, value) {
|
|
7693
7710
|
var formatter = schema.getFormatterForType(ref);
|
|
7694
7711
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7695
7712
|
},
|
|
7696
7713
|
validation: _object_spread_props(_object_spread({}, validationController.forView(parseBinding)), {
|
|
7697
|
-
type: function(b) {
|
|
7714
|
+
type: function type(b) {
|
|
7698
7715
|
return schema.getType(parseBinding(b));
|
|
7699
7716
|
}
|
|
7700
7717
|
}),
|
|
@@ -7706,7 +7723,7 @@ var CheckPathPlugin = function() {
|
|
|
7706
7723
|
});
|
|
7707
7724
|
this.hooks.viewController.call(viewController);
|
|
7708
7725
|
return {
|
|
7709
|
-
start: function() {
|
|
7726
|
+
start: function start() {
|
|
7710
7727
|
flowController.start().then(function(endState) {
|
|
7711
7728
|
var flowResult = {
|
|
7712
7729
|
endState: resolveStrings(endState, false),
|
|
@@ -7743,13 +7760,13 @@ var CheckPathPlugin = function() {
|
|
|
7743
7760
|
key: "start",
|
|
7744
7761
|
value: function start(payload) {
|
|
7745
7762
|
return _async_to_generator(function() {
|
|
7746
|
-
var _this,
|
|
7763
|
+
var _this, _ref, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
7747
7764
|
return _ts_generator(this, function(_state) {
|
|
7748
7765
|
switch(_state.label){
|
|
7749
7766
|
case 0:
|
|
7750
7767
|
_this = this;
|
|
7751
|
-
ref = Symbol((
|
|
7752
|
-
maybeUpdateState = function(newState) {
|
|
7768
|
+
ref = Symbol((_ref = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _ref !== void 0 ? _ref : "payload");
|
|
7769
|
+
maybeUpdateState = function maybeUpdateState(newState) {
|
|
7753
7770
|
if (_this.state.ref !== ref) {
|
|
7754
7771
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
7755
7772
|
return newState;
|
|
@@ -7977,8 +7994,8 @@ var CheckPathPlugin = function() {
|
|
|
7977
7994
|
var _query = _to_array(query), first = _query[0], rest = _query.slice(1);
|
|
7978
7995
|
var matcher = createMatcher(first);
|
|
7979
7996
|
if (node.type === NodeType.Asset || node.type === NodeType.View || node.type === NodeType.Applicability) {
|
|
7980
|
-
var resolvedValue = this.getResolvedValue(node);
|
|
7981
7997
|
var _ref;
|
|
7998
|
+
var resolvedValue = this.getResolvedValue(node);
|
|
7982
7999
|
var includesSelf = (_ref = includeSelfMatch && matcher(resolvedValue)) !== null && _ref !== void 0 ? _ref : false;
|
|
7983
8000
|
var childQuery = includesSelf ? rest : query;
|
|
7984
8001
|
if (childQuery.length === 0 && includesSelf) {
|
|
@@ -8065,7 +8082,7 @@ var CheckPathPlugin = function() {
|
|
|
8065
8082
|
}
|
|
8066
8083
|
var parentQuery = queryArray.shift();
|
|
8067
8084
|
var working = assetNode;
|
|
8068
|
-
var findWorkingChild = function(parent) {
|
|
8085
|
+
var findWorkingChild = function findWorkingChild(parent) {
|
|
8069
8086
|
var _parent_children;
|
|
8070
8087
|
return (_parent_children = parent.children) === null || _parent_children === void 0 ? void 0 : _parent_children.find(function(n) {
|
|
8071
8088
|
return n.value === working;
|
|
@@ -8085,9 +8102,9 @@ var CheckPathPlugin = function() {
|
|
|
8085
8102
|
].concat(_to_consumable_array(path));
|
|
8086
8103
|
}
|
|
8087
8104
|
} else if ("children" in parent) {
|
|
8105
|
+
var _ref;
|
|
8088
8106
|
var childProp = findWorkingChild(parent);
|
|
8089
|
-
|
|
8090
|
-
path = _to_consumable_array((_childProp_path = childProp === null || childProp === void 0 ? void 0 : childProp.path) !== null && _childProp_path !== void 0 ? _childProp_path : []).concat(_to_consumable_array(path));
|
|
8107
|
+
path = _to_consumable_array((_ref = childProp === null || childProp === void 0 ? void 0 : childProp.path) !== null && _ref !== void 0 ? _ref : []).concat(_to_consumable_array(path));
|
|
8091
8108
|
}
|
|
8092
8109
|
if (parentQuery) {
|
|
8093
8110
|
var matcher = createMatcher(parentQuery);
|