@player-ui/stage-revert-data-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 StageRevertDataPlugin = 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 StageRevertDataPlugin = 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 StageRevertDataPlugin = 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 StageRevertDataPlugin = 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 StageRevertDataPlugin = 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 StageRevertDataPlugin = 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
|
});
|
|
@@ -1501,27 +1519,27 @@ var StageRevertDataPlugin = function() {
|
|
|
1501
1519
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
1502
1520
|
var __getProtoOf = Object.getPrototypeOf;
|
|
1503
1521
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1504
|
-
var __commonJS = function(cb, mod) {
|
|
1522
|
+
var __commonJS = function __commonJS(cb, mod) {
|
|
1505
1523
|
return function __require() {
|
|
1506
1524
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
|
|
1507
1525
|
exports: {}
|
|
1508
1526
|
}).exports, mod), mod.exports;
|
|
1509
1527
|
};
|
|
1510
1528
|
};
|
|
1511
|
-
var __export = function(target, all) {
|
|
1529
|
+
var __export = function __export(target, all) {
|
|
1512
1530
|
for(var name in all)__defProp(target, name, {
|
|
1513
1531
|
get: all[name],
|
|
1514
1532
|
enumerable: true
|
|
1515
1533
|
});
|
|
1516
1534
|
};
|
|
1517
|
-
var __copyProps = function(to, from, except, desc) {
|
|
1535
|
+
var __copyProps = function __copyProps(to, from, except, desc) {
|
|
1518
1536
|
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
1519
1537
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1520
1538
|
try {
|
|
1521
1539
|
var _loop = function() {
|
|
1522
1540
|
var key = _step.value;
|
|
1523
1541
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
1524
|
-
get: function() {
|
|
1542
|
+
get: function get() {
|
|
1525
1543
|
return from[key];
|
|
1526
1544
|
},
|
|
1527
1545
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -1545,7 +1563,7 @@ var StageRevertDataPlugin = function() {
|
|
|
1545
1563
|
}
|
|
1546
1564
|
return to;
|
|
1547
1565
|
};
|
|
1548
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
1566
|
+
var __toESM = function __toESM(mod, isNodeMode, target) {
|
|
1549
1567
|
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
1550
1568
|
// file that has been converted to a CommonJS file using a Babel-
|
|
1551
1569
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -1555,7 +1573,7 @@ var StageRevertDataPlugin = function() {
|
|
|
1555
1573
|
enumerable: true
|
|
1556
1574
|
}) : target, mod);
|
|
1557
1575
|
};
|
|
1558
|
-
var __toCommonJS = function(mod) {
|
|
1576
|
+
var __toCommonJS = function __toCommonJS(mod) {
|
|
1559
1577
|
return __copyProps(__defProp({}, "__esModule", {
|
|
1560
1578
|
value: true
|
|
1561
1579
|
}), mod);
|
|
@@ -1657,7 +1675,7 @@ var StageRevertDataPlugin = function() {
|
|
|
1657
1675
|
function toError(err) {
|
|
1658
1676
|
try {
|
|
1659
1677
|
return _instanceof(err, Error) ? err : new Error("Value that is not an instance of Error was thrown: ".concat(err));
|
|
1660
|
-
} catch (
|
|
1678
|
+
} catch (unused) {
|
|
1661
1679
|
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.");
|
|
1662
1680
|
}
|
|
1663
1681
|
}
|
|
@@ -1958,7 +1976,7 @@ var StageRevertDataPlugin = function() {
|
|
|
1958
1976
|
var require_p_defer = __commonJS({
|
|
1959
1977
|
"../../../../../../../../../../../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) {
|
|
1960
1978
|
"use strict";
|
|
1961
|
-
var pDefer = function() {
|
|
1979
|
+
var pDefer = function pDefer() {
|
|
1962
1980
|
var deferred2 = {};
|
|
1963
1981
|
deferred2.promise = new Promise(function(resolve, reject) {
|
|
1964
1982
|
deferred2.resolve = resolve;
|
|
@@ -2067,7 +2085,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2067
2085
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/stage-revert-data/core/src/index.ts
|
|
2068
2086
|
var src_exports = {};
|
|
2069
2087
|
__export(src_exports, {
|
|
2070
|
-
StageRevertDataPlugin: function() {
|
|
2088
|
+
StageRevertDataPlugin: function StageRevertDataPlugin1() {
|
|
2071
2089
|
return StageRevertDataPlugin;
|
|
2072
2090
|
}
|
|
2073
2091
|
});
|
|
@@ -2513,7 +2531,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2513
2531
|
}
|
|
2514
2532
|
return pairs;
|
|
2515
2533
|
}
|
|
2516
|
-
var createSortedArray = function() {
|
|
2534
|
+
var createSortedArray = function createSortedArray() {
|
|
2517
2535
|
return new import_sorted_array.default([], function(c) {
|
|
2518
2536
|
return c.matcher.count;
|
|
2519
2537
|
});
|
|
@@ -2609,38 +2627,38 @@ var StageRevertDataPlugin = function() {
|
|
|
2609
2627
|
}();
|
|
2610
2628
|
// ../../../../../../../../../../../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
|
|
2611
2629
|
var __defProp2 = Object.defineProperty;
|
|
2612
|
-
var __export2 = function(target, all) {
|
|
2630
|
+
var __export2 = function __export2(target, all) {
|
|
2613
2631
|
for(var name in all)__defProp2(target, name, {
|
|
2614
2632
|
get: all[name],
|
|
2615
2633
|
enumerable: true
|
|
2616
2634
|
});
|
|
2617
2635
|
};
|
|
2618
|
-
var toValue = function(value) {
|
|
2636
|
+
var toValue = function toValue(value) {
|
|
2619
2637
|
return {
|
|
2620
2638
|
name: "Value",
|
|
2621
2639
|
value: value
|
|
2622
2640
|
};
|
|
2623
2641
|
};
|
|
2624
|
-
var toExpression = function(value) {
|
|
2642
|
+
var toExpression = function toExpression(value) {
|
|
2625
2643
|
return {
|
|
2626
2644
|
name: "Expression",
|
|
2627
2645
|
value: value
|
|
2628
2646
|
};
|
|
2629
2647
|
};
|
|
2630
|
-
var toPath = function(path) {
|
|
2648
|
+
var toPath = function toPath(path) {
|
|
2631
2649
|
return {
|
|
2632
2650
|
name: "PathNode",
|
|
2633
2651
|
path: path
|
|
2634
2652
|
};
|
|
2635
2653
|
};
|
|
2636
|
-
var toQuery = function(key, value) {
|
|
2654
|
+
var toQuery = function toQuery(key, value) {
|
|
2637
2655
|
return {
|
|
2638
2656
|
name: "Query",
|
|
2639
2657
|
key: key,
|
|
2640
2658
|
value: value
|
|
2641
2659
|
};
|
|
2642
2660
|
};
|
|
2643
|
-
var toConcatenatedNode = function(values) {
|
|
2661
|
+
var toConcatenatedNode = function toConcatenatedNode(values) {
|
|
2644
2662
|
if (values.length === 1) {
|
|
2645
2663
|
return values[0];
|
|
2646
2664
|
}
|
|
@@ -2658,7 +2676,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2658
2676
|
var SINGLE_QUOTE = "'";
|
|
2659
2677
|
var DOUBLE_QUOTE = '"';
|
|
2660
2678
|
var BACK_TICK = "`";
|
|
2661
|
-
var isIdentifierChar = function(char) {
|
|
2679
|
+
var isIdentifierChar = function isIdentifierChar(char) {
|
|
2662
2680
|
if (!char) {
|
|
2663
2681
|
return false;
|
|
2664
2682
|
}
|
|
@@ -2678,10 +2696,10 @@ var StageRevertDataPlugin = function() {
|
|
|
2678
2696
|
charCode === 125;
|
|
2679
2697
|
return !matches;
|
|
2680
2698
|
};
|
|
2681
|
-
var parse = function(path) {
|
|
2699
|
+
var parse = function parse(path) {
|
|
2682
2700
|
var index = 1;
|
|
2683
2701
|
var ch = path.charAt(0);
|
|
2684
|
-
var next = function(expected) {
|
|
2702
|
+
var next = function next(expected) {
|
|
2685
2703
|
if (expected && ch !== expected) {
|
|
2686
2704
|
throw new Error("Expected char: ".concat(expected, " but got: ").concat(ch));
|
|
2687
2705
|
}
|
|
@@ -2689,12 +2707,12 @@ var StageRevertDataPlugin = function() {
|
|
|
2689
2707
|
index += 1;
|
|
2690
2708
|
return ch;
|
|
2691
2709
|
};
|
|
2692
|
-
var whitespace = function() {
|
|
2710
|
+
var whitespace = function whitespace() {
|
|
2693
2711
|
while(ch === " "){
|
|
2694
2712
|
next();
|
|
2695
2713
|
}
|
|
2696
2714
|
};
|
|
2697
|
-
var identifier = function() {
|
|
2715
|
+
var identifier = function identifier() {
|
|
2698
2716
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2699
2717
|
if (!isIdentifierChar(ch)) {
|
|
2700
2718
|
return;
|
|
@@ -2720,7 +2738,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2720
2738
|
return toValue(value);
|
|
2721
2739
|
}
|
|
2722
2740
|
};
|
|
2723
|
-
var expression = function() {
|
|
2741
|
+
var expression = function expression() {
|
|
2724
2742
|
if (ch === BACK_TICK) {
|
|
2725
2743
|
next(BACK_TICK);
|
|
2726
2744
|
var exp = ch;
|
|
@@ -2736,7 +2754,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2736
2754
|
}
|
|
2737
2755
|
}
|
|
2738
2756
|
};
|
|
2739
|
-
var regex = function(match) {
|
|
2757
|
+
var regex = function regex(match) {
|
|
2740
2758
|
if (!(ch === null || ch === void 0 ? void 0 : ch.match(match))) {
|
|
2741
2759
|
return;
|
|
2742
2760
|
}
|
|
@@ -2751,7 +2769,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2751
2769
|
return toValue(value);
|
|
2752
2770
|
}
|
|
2753
2771
|
};
|
|
2754
|
-
var nestedPath = function() {
|
|
2772
|
+
var nestedPath = function nestedPath() {
|
|
2755
2773
|
if (ch === OPEN_CURL) {
|
|
2756
2774
|
next(OPEN_CURL);
|
|
2757
2775
|
next(OPEN_CURL);
|
|
@@ -2761,12 +2779,12 @@ var StageRevertDataPlugin = function() {
|
|
|
2761
2779
|
return modelRef;
|
|
2762
2780
|
}
|
|
2763
2781
|
};
|
|
2764
|
-
var simpleSegment = function() {
|
|
2782
|
+
var simpleSegment = function simpleSegment() {
|
|
2765
2783
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2766
|
-
var
|
|
2784
|
+
var _ref, _nestedPath;
|
|
2767
2785
|
return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
|
|
2768
2786
|
};
|
|
2769
|
-
var segment = function() {
|
|
2787
|
+
var segment = function segment() {
|
|
2770
2788
|
var segments = [];
|
|
2771
2789
|
var nextSegment = simpleSegment();
|
|
2772
2790
|
while(nextSegment !== void 0){
|
|
@@ -2778,7 +2796,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2778
2796
|
}
|
|
2779
2797
|
return toConcatenatedNode(segments);
|
|
2780
2798
|
};
|
|
2781
|
-
var optionallyQuotedSegment = function() {
|
|
2799
|
+
var optionallyQuotedSegment = function optionallyQuotedSegment() {
|
|
2782
2800
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2783
2801
|
whitespace();
|
|
2784
2802
|
if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
|
|
@@ -2790,7 +2808,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2790
2808
|
}
|
|
2791
2809
|
return simpleSegment(allowBoolValue);
|
|
2792
2810
|
};
|
|
2793
|
-
var equals = function() {
|
|
2811
|
+
var equals = function equals() {
|
|
2794
2812
|
if (ch !== EQUALS) {
|
|
2795
2813
|
return false;
|
|
2796
2814
|
}
|
|
@@ -2799,7 +2817,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2799
2817
|
}
|
|
2800
2818
|
return true;
|
|
2801
2819
|
};
|
|
2802
|
-
var parseBracket = function() {
|
|
2820
|
+
var parseBracket = function parseBracket() {
|
|
2803
2821
|
if (ch === OPEN_BRACKET) {
|
|
2804
2822
|
next(OPEN_BRACKET);
|
|
2805
2823
|
whitespace();
|
|
@@ -2821,7 +2839,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2821
2839
|
return value;
|
|
2822
2840
|
}
|
|
2823
2841
|
};
|
|
2824
|
-
var parseSegmentAndBrackets = function() {
|
|
2842
|
+
var parseSegmentAndBrackets = function parseSegmentAndBrackets() {
|
|
2825
2843
|
var parsed = [];
|
|
2826
2844
|
var firstSegment = segment();
|
|
2827
2845
|
if (firstSegment) {
|
|
@@ -2838,7 +2856,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2838
2856
|
}
|
|
2839
2857
|
return parsed;
|
|
2840
2858
|
};
|
|
2841
|
-
var parsePath = function() {
|
|
2859
|
+
var parsePath = function parsePath() {
|
|
2842
2860
|
var parts = [];
|
|
2843
2861
|
var nextSegment = parseSegmentAndBrackets();
|
|
2844
2862
|
while(nextSegment !== void 0){
|
|
@@ -2949,6 +2967,7 @@ var StageRevertDataPlugin = function() {
|
|
|
2949
2967
|
return _BindingInstance;
|
|
2950
2968
|
}();
|
|
2951
2969
|
function resolveBindingAST(bindingPathNode, options, hooks) {
|
|
2970
|
+
var _context_updates;
|
|
2952
2971
|
var context = {
|
|
2953
2972
|
updates: {},
|
|
2954
2973
|
path: []
|
|
@@ -2988,8 +3007,8 @@ var StageRevertDataPlugin = function() {
|
|
|
2988
3007
|
}
|
|
2989
3008
|
}
|
|
2990
3009
|
function resolveNode(_node) {
|
|
2991
|
-
var
|
|
2992
|
-
var resolvedNode = (
|
|
3010
|
+
var _ref;
|
|
3011
|
+
var resolvedNode = (_ref = hooks === null || hooks === void 0 ? void 0 : hooks.beforeResolveNode.call(_node, _object_spread({}, context, options))) !== null && _ref !== void 0 ? _ref : _node;
|
|
2993
3012
|
switch(resolvedNode.name){
|
|
2994
3013
|
case "Expression":
|
|
2995
3014
|
case "PathNode":
|
|
@@ -3025,7 +3044,6 @@ var StageRevertDataPlugin = function() {
|
|
|
3025
3044
|
}
|
|
3026
3045
|
}
|
|
3027
3046
|
bindingPathNode.path.forEach(resolveNode);
|
|
3028
|
-
var _context_updates;
|
|
3029
3047
|
return {
|
|
3030
3048
|
path: context.path,
|
|
3031
3049
|
updates: Object.keys((_context_updates = context.updates) !== null && _context_updates !== void 0 ? _context_updates : {}).length > 0 ? context.updates : void 0
|
|
@@ -3034,13 +3052,13 @@ var StageRevertDataPlugin = function() {
|
|
|
3034
3052
|
var BINDING_BRACKETS_REGEX = /[\s()*=`{}'"[\]]/;
|
|
3035
3053
|
var LAZY_BINDING_REGEX = /^[^.]+(\..+)*$/;
|
|
3036
3054
|
var DEFAULT_OPTIONS = {
|
|
3037
|
-
get: function() {
|
|
3055
|
+
get: function get() {
|
|
3038
3056
|
throw new Error("Not Implemented");
|
|
3039
3057
|
},
|
|
3040
|
-
set: function() {
|
|
3058
|
+
set: function set() {
|
|
3041
3059
|
throw new Error("Not Implemented");
|
|
3042
3060
|
},
|
|
3043
|
-
evaluate: function() {
|
|
3061
|
+
evaluate: function evaluate() {
|
|
3044
3062
|
throw new Error("Not Implemented");
|
|
3045
3063
|
}
|
|
3046
3064
|
};
|
|
@@ -3063,18 +3081,18 @@ var StageRevertDataPlugin = function() {
|
|
|
3063
3081
|
* representation of that path.
|
|
3064
3082
|
*/ key: "normalizePath",
|
|
3065
3083
|
value: function normalizePath(path, resolveOptions) {
|
|
3084
|
+
var _this_parseCache_path;
|
|
3066
3085
|
if (!BINDING_BRACKETS_REGEX.test(path) && LAZY_BINDING_REGEX.test(path) && this.hooks.skipOptimization.call(path) !== true) {
|
|
3067
3086
|
return {
|
|
3068
3087
|
path: path.split("."),
|
|
3069
3088
|
updates: void 0
|
|
3070
3089
|
};
|
|
3071
3090
|
}
|
|
3072
|
-
var _this_parseCache_path;
|
|
3073
3091
|
var ast = (_this_parseCache_path = this.parseCache[path]) !== null && _this_parseCache_path !== void 0 ? _this_parseCache_path : parse(path);
|
|
3074
3092
|
this.parseCache[path] = ast;
|
|
3075
3093
|
if ((typeof ast === "undefined" ? "undefined" : _type_of(ast)) !== "object" || !(ast === null || ast === void 0 ? void 0 : ast.status)) {
|
|
3076
|
-
var
|
|
3077
|
-
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((
|
|
3094
|
+
var _ref;
|
|
3095
|
+
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."));
|
|
3078
3096
|
}
|
|
3079
3097
|
try {
|
|
3080
3098
|
return resolveBindingAST(ast.path, resolveOptions, this.hooks);
|
|
@@ -3107,14 +3125,14 @@ var StageRevertDataPlugin = function() {
|
|
|
3107
3125
|
var updates = {};
|
|
3108
3126
|
var joined = Array.isArray(rawBinding) ? rawBinding.join(".") : String(rawBinding);
|
|
3109
3127
|
var normalizeConfig = {
|
|
3110
|
-
getValue: function(path) {
|
|
3128
|
+
getValue: function getValue(path) {
|
|
3111
3129
|
var normalized2 = _this.normalizePath(path.join("."), normalizeConfig);
|
|
3112
3130
|
return options.get(_this.getBindingForNormalizedResult(normalized2));
|
|
3113
3131
|
},
|
|
3114
|
-
evaluate: function(exp) {
|
|
3132
|
+
evaluate: function evaluate(exp) {
|
|
3115
3133
|
return options.evaluate(exp);
|
|
3116
3134
|
},
|
|
3117
|
-
convertToPath: function(path) {
|
|
3135
|
+
convertToPath: function convertToPath(path) {
|
|
3118
3136
|
if (path === void 0) {
|
|
3119
3137
|
throw new Error("Attempted to convert undefined value to binding path");
|
|
3120
3138
|
}
|
|
@@ -3179,9 +3197,9 @@ var StageRevertDataPlugin = function() {
|
|
|
3179
3197
|
/** Grab all of the bindings that this depended on */ key: "getDependencies",
|
|
3180
3198
|
value: function getDependencies(name) {
|
|
3181
3199
|
if (name !== void 0) {
|
|
3200
|
+
var _ref;
|
|
3182
3201
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3183
|
-
|
|
3184
|
-
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();
|
|
3202
|
+
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();
|
|
3185
3203
|
}
|
|
3186
3204
|
return this.readDeps;
|
|
3187
3205
|
}
|
|
@@ -3203,9 +3221,9 @@ var StageRevertDataPlugin = function() {
|
|
|
3203
3221
|
/** Grab all of the bindings this wrote to */ key: "getModified",
|
|
3204
3222
|
value: function getModified(name) {
|
|
3205
3223
|
if (name !== void 0) {
|
|
3224
|
+
var _ref;
|
|
3206
3225
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3207
|
-
|
|
3208
|
-
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();
|
|
3226
|
+
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();
|
|
3209
3227
|
}
|
|
3210
3228
|
return this.writeDeps;
|
|
3211
3229
|
}
|
|
@@ -3527,19 +3545,19 @@ var StageRevertDataPlugin = function() {
|
|
|
3527
3545
|
var thisStr = "this";
|
|
3528
3546
|
var evaluator_functions_exports = {};
|
|
3529
3547
|
__export2(evaluator_functions_exports, {
|
|
3530
|
-
conditional: function() {
|
|
3548
|
+
conditional: function conditional1() {
|
|
3531
3549
|
return conditional;
|
|
3532
3550
|
},
|
|
3533
|
-
deleteDataVal: function() {
|
|
3551
|
+
deleteDataVal: function deleteDataVal1() {
|
|
3534
3552
|
return deleteDataVal;
|
|
3535
3553
|
},
|
|
3536
|
-
getDataVal: function() {
|
|
3554
|
+
getDataVal: function getDataVal1() {
|
|
3537
3555
|
return getDataVal;
|
|
3538
3556
|
},
|
|
3539
|
-
setDataVal: function() {
|
|
3557
|
+
setDataVal: function setDataVal1() {
|
|
3540
3558
|
return setDataVal;
|
|
3541
3559
|
},
|
|
3542
|
-
waitFor: function() {
|
|
3560
|
+
waitFor: function waitFor1() {
|
|
3543
3561
|
return waitFor;
|
|
3544
3562
|
}
|
|
3545
3563
|
});
|
|
@@ -3551,7 +3569,7 @@ var StageRevertDataPlugin = function() {
|
|
|
3551
3569
|
};
|
|
3552
3570
|
return promise;
|
|
3553
3571
|
}
|
|
3554
|
-
var setDataVal = function(_context, binding, value) {
|
|
3572
|
+
var setDataVal = function setDataVal(_context, binding, value) {
|
|
3555
3573
|
_context.model.set([
|
|
3556
3574
|
[
|
|
3557
3575
|
binding,
|
|
@@ -3559,13 +3577,13 @@ var StageRevertDataPlugin = function() {
|
|
|
3559
3577
|
]
|
|
3560
3578
|
]);
|
|
3561
3579
|
};
|
|
3562
|
-
var getDataVal = function(_context, binding) {
|
|
3580
|
+
var getDataVal = function getDataVal(_context, binding) {
|
|
3563
3581
|
return _context.model.get(binding);
|
|
3564
3582
|
};
|
|
3565
|
-
var deleteDataVal = function(_context, binding) {
|
|
3583
|
+
var deleteDataVal = function deleteDataVal(_context, binding) {
|
|
3566
3584
|
return _context.model.delete(binding);
|
|
3567
3585
|
};
|
|
3568
|
-
var conditional = function(ctx, condition, ifTrue, ifFalse) {
|
|
3586
|
+
var conditional = function conditional(ctx, condition, ifTrue, ifFalse) {
|
|
3569
3587
|
var testResult = ctx.evaluate(condition);
|
|
3570
3588
|
if (isAwaitable(testResult)) {
|
|
3571
3589
|
return testResult.awaitableThen(function(resolvedTest) {
|
|
@@ -3587,14 +3605,14 @@ var StageRevertDataPlugin = function() {
|
|
|
3587
3605
|
return null;
|
|
3588
3606
|
};
|
|
3589
3607
|
conditional.resolveParams = false;
|
|
3590
|
-
var waitFor = function(ctx, promise) {
|
|
3608
|
+
var waitFor = function waitFor(ctx, promise) {
|
|
3591
3609
|
return makeAwaitable(promise);
|
|
3592
3610
|
};
|
|
3593
|
-
var andandOperator = function(ctx, a, b, async) {
|
|
3611
|
+
var andandOperator = function andandOperator(ctx, a, b, async) {
|
|
3594
3612
|
return LogicalOperators.and(ctx, a, b, async);
|
|
3595
3613
|
};
|
|
3596
3614
|
andandOperator.resolveParams = false;
|
|
3597
|
-
var ororOperator = function(ctx, a, b, async) {
|
|
3615
|
+
var ororOperator = function ororOperator(ctx, a, b, async) {
|
|
3598
3616
|
return LogicalOperators.or(ctx, a, b, async);
|
|
3599
3617
|
};
|
|
3600
3618
|
ororOperator.resolveParams = false;
|
|
@@ -3720,7 +3738,7 @@ var StageRevertDataPlugin = function() {
|
|
|
3720
3738
|
}
|
|
3721
3739
|
};
|
|
3722
3740
|
var LogicalOperators = {
|
|
3723
|
-
and: function(ctx, leftNode, rightNode, async) {
|
|
3741
|
+
and: function and(ctx, leftNode, rightNode, async) {
|
|
3724
3742
|
var leftResult = ctx.evaluate(leftNode);
|
|
3725
3743
|
if (async && isAwaitable(leftResult)) {
|
|
3726
3744
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3731,7 +3749,7 @@ var StageRevertDataPlugin = function() {
|
|
|
3731
3749
|
}
|
|
3732
3750
|
return leftResult && ctx.evaluate(rightNode);
|
|
3733
3751
|
},
|
|
3734
|
-
or: function(ctx, leftNode, rightNode, async) {
|
|
3752
|
+
or: function or(ctx, leftNode, rightNode, async) {
|
|
3735
3753
|
var leftResult = ctx.evaluate(leftNode);
|
|
3736
3754
|
if (async && isAwaitable(leftResult)) {
|
|
3737
3755
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3769,10 +3787,10 @@ var StageRevertDataPlugin = function() {
|
|
|
3769
3787
|
]))
|
|
3770
3788
|
};
|
|
3771
3789
|
this.defaultHookOptions = _object_spread_props(_object_spread({}, defaultOptions), {
|
|
3772
|
-
evaluate: function(expr) {
|
|
3790
|
+
evaluate: function evaluate(expr) {
|
|
3773
3791
|
return _this.evaluate(expr, _this.defaultHookOptions);
|
|
3774
3792
|
},
|
|
3775
|
-
resolveNode: function(node) {
|
|
3793
|
+
resolveNode: function resolveNode(node) {
|
|
3776
3794
|
return _this._execAST(node, _this.defaultHookOptions);
|
|
3777
3795
|
}
|
|
3778
3796
|
});
|
|
@@ -3792,12 +3810,12 @@ var StageRevertDataPlugin = function() {
|
|
|
3792
3810
|
key: "evaluate",
|
|
3793
3811
|
value: function evaluate(expr, options) {
|
|
3794
3812
|
var _this = this;
|
|
3813
|
+
var _this_hooks_beforeEvaluate_call;
|
|
3795
3814
|
var resolvedOpts = this.hooks.resolveOptions.call(_object_spread_props(_object_spread({}, this.defaultHookOptions, options), {
|
|
3796
|
-
resolveNode: function(node) {
|
|
3815
|
+
resolveNode: function resolveNode(node) {
|
|
3797
3816
|
return _this._execAST(node, resolvedOpts);
|
|
3798
3817
|
}
|
|
3799
3818
|
}));
|
|
3800
|
-
var _this_hooks_beforeEvaluate_call;
|
|
3801
3819
|
var expression = (_this_hooks_beforeEvaluate_call = this.hooks.beforeEvaluate.call(expr, resolvedOpts)) !== null && _this_hooks_beforeEvaluate_call !== void 0 ? _this_hooks_beforeEvaluate_call : expr;
|
|
3802
3820
|
while(isObjectExpression(expression)){
|
|
3803
3821
|
expression = expression.value;
|
|
@@ -3921,11 +3939,11 @@ var StageRevertDataPlugin = function() {
|
|
|
3921
3939
|
key: "_resolveNode",
|
|
3922
3940
|
value: function _resolveNode(_currentValue, node, options) {
|
|
3923
3941
|
var _this = this;
|
|
3924
|
-
var resolveNode = options.resolveNode, model = options.model;
|
|
3925
3942
|
var _options_async;
|
|
3943
|
+
var resolveNode = options.resolveNode, model = options.model;
|
|
3926
3944
|
var isAsync = (_options_async = options.async) !== null && _options_async !== void 0 ? _options_async : false;
|
|
3927
3945
|
var expressionContext = _object_spread_props(_object_spread({}, options), {
|
|
3928
|
-
evaluate: function(expr) {
|
|
3946
|
+
evaluate: function evaluate(expr) {
|
|
3929
3947
|
return _this.evaluate(expr, options);
|
|
3930
3948
|
}
|
|
3931
3949
|
});
|
|
@@ -4259,7 +4277,7 @@ var StageRevertDataPlugin = function() {
|
|
|
4259
4277
|
]);
|
|
4260
4278
|
return ProxyLogger;
|
|
4261
4279
|
}();
|
|
4262
|
-
var identify = function(val) {
|
|
4280
|
+
var identify = function identify(val) {
|
|
4263
4281
|
return val;
|
|
4264
4282
|
};
|
|
4265
4283
|
var SchemaController = /*#__PURE__*/ function() {
|
|
@@ -4347,6 +4365,7 @@ var StageRevertDataPlugin = function() {
|
|
|
4347
4365
|
{
|
|
4348
4366
|
key: "getApparentType",
|
|
4349
4367
|
value: function getApparentType(binding) {
|
|
4368
|
+
var _schemaType_validation, _baseType_validation;
|
|
4350
4369
|
var schemaType = this.getType(binding);
|
|
4351
4370
|
if (schemaType === void 0) {
|
|
4352
4371
|
return void 0;
|
|
@@ -4355,7 +4374,6 @@ var StageRevertDataPlugin = function() {
|
|
|
4355
4374
|
if (baseType === void 0) {
|
|
4356
4375
|
return schemaType;
|
|
4357
4376
|
}
|
|
4358
|
-
var _schemaType_validation, _baseType_validation;
|
|
4359
4377
|
return _object_spread_props(_object_spread({}, baseType, schemaType), {
|
|
4360
4378
|
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 : []))
|
|
4361
4379
|
});
|
|
@@ -4504,10 +4522,10 @@ var StageRevertDataPlugin = function() {
|
|
|
4504
4522
|
{
|
|
4505
4523
|
key: "get",
|
|
4506
4524
|
value: function get(binding, options, next) {
|
|
4525
|
+
var _ref;
|
|
4507
4526
|
var _this_shouldIncludeInvalid, _this;
|
|
4508
4527
|
var val = next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
4509
|
-
|
|
4510
|
-
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) {
|
|
4528
|
+
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) {
|
|
4511
4529
|
this.shadowModelPaths.forEach(function(shadowValue, shadowBinding) {
|
|
4512
4530
|
if (shadowBinding === binding) {
|
|
4513
4531
|
val = shadowValue;
|
|
@@ -4592,11 +4610,12 @@ var StageRevertDataPlugin = function() {
|
|
|
4592
4610
|
templateDepth: 0
|
|
4593
4611
|
};
|
|
4594
4612
|
var _this = this;
|
|
4613
|
+
var _this_hooks_onCreateASTNode_call;
|
|
4595
4614
|
var parsedNode = this.hooks.parseNode.call(obj, type, options);
|
|
4596
4615
|
if (parsedNode || parsedNode === null) {
|
|
4597
4616
|
return parsedNode;
|
|
4598
4617
|
}
|
|
4599
|
-
var parseLocalObject = function(currentValue, objToParse) {
|
|
4618
|
+
var parseLocalObject = function parseLocalObject1(currentValue, objToParse) {
|
|
4600
4619
|
var path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
4601
4620
|
if ((typeof objToParse === "undefined" ? "undefined" : _type_of(objToParse)) !== "object" || objToParse === null) {
|
|
4602
4621
|
return {
|
|
@@ -4666,30 +4685,29 @@ var StageRevertDataPlugin = function() {
|
|
|
4666
4685
|
child.value.parent = parent;
|
|
4667
4686
|
});
|
|
4668
4687
|
}
|
|
4669
|
-
var _this_hooks_onCreateASTNode_call;
|
|
4670
4688
|
return (_this_hooks_onCreateASTNode_call = this.hooks.onCreateASTNode.call(baseAst, obj)) !== null && _this_hooks_onCreateASTNode_call !== void 0 ? _this_hooks_onCreateASTNode_call : null;
|
|
4671
4689
|
}
|
|
4672
4690
|
}
|
|
4673
4691
|
]);
|
|
4674
4692
|
return Parser;
|
|
4675
4693
|
}();
|
|
4676
|
-
var withContext = function(model) {
|
|
4694
|
+
var withContext = function withContext(model) {
|
|
4677
4695
|
return {
|
|
4678
|
-
get: function(binding, options) {
|
|
4696
|
+
get: function get(binding, options) {
|
|
4679
4697
|
return model.get(binding, _object_spread({
|
|
4680
4698
|
context: {
|
|
4681
4699
|
model: model
|
|
4682
4700
|
}
|
|
4683
4701
|
}, options));
|
|
4684
4702
|
},
|
|
4685
|
-
set: function(transaction, options) {
|
|
4703
|
+
set: function set(transaction, options) {
|
|
4686
4704
|
return model.set(transaction, _object_spread({
|
|
4687
4705
|
context: {
|
|
4688
4706
|
model: model
|
|
4689
4707
|
}
|
|
4690
4708
|
}, options));
|
|
4691
4709
|
},
|
|
4692
|
-
delete: function(binding, options) {
|
|
4710
|
+
delete: function _delete(binding, options) {
|
|
4693
4711
|
return model.delete(binding, _object_spread({
|
|
4694
4712
|
context: {
|
|
4695
4713
|
model: model
|
|
@@ -4728,16 +4746,16 @@ var StageRevertDataPlugin = function() {
|
|
|
4728
4746
|
{
|
|
4729
4747
|
key: "update",
|
|
4730
4748
|
value: function update(dataChanges, nodeChanges) {
|
|
4749
|
+
var _ref;
|
|
4731
4750
|
this.hooks.beforeUpdate.call(dataChanges);
|
|
4732
4751
|
var resolveCache = /* @__PURE__ */ new Map();
|
|
4733
4752
|
this.idCache.clear();
|
|
4734
4753
|
var prevASTMap = new Map(this.ASTMap);
|
|
4735
4754
|
this.ASTMap.clear();
|
|
4736
4755
|
var realNodeChanges = /* @__PURE__ */ new Set();
|
|
4737
|
-
var _nodeChanges_values;
|
|
4738
4756
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4739
4757
|
try {
|
|
4740
|
-
for(var _iterator = ((
|
|
4758
|
+
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){
|
|
4741
4759
|
var node = _step.value;
|
|
4742
4760
|
var current = node;
|
|
4743
4761
|
while(current){
|
|
@@ -4820,6 +4838,7 @@ var StageRevertDataPlugin = function() {
|
|
|
4820
4838
|
key: "computeTree",
|
|
4821
4839
|
value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nodeChanges) {
|
|
4822
4840
|
var _this = this;
|
|
4841
|
+
var _this_hooks_beforeResolve_call;
|
|
4823
4842
|
var dependencyModel = new DependencyModel(options.data.model);
|
|
4824
4843
|
dependencyModel.trackSubset("core");
|
|
4825
4844
|
var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
|
|
@@ -4827,7 +4846,7 @@ var StageRevertDataPlugin = function() {
|
|
|
4827
4846
|
data: _object_spread_props(_object_spread({}, options.data), {
|
|
4828
4847
|
model: depModelWithParser
|
|
4829
4848
|
}),
|
|
4830
|
-
evaluate: function(exp) {
|
|
4849
|
+
evaluate: function evaluate(exp) {
|
|
4831
4850
|
return _this.options.evaluator.evaluate(exp, {
|
|
4832
4851
|
model: depModelWithParser
|
|
4833
4852
|
});
|
|
@@ -4843,14 +4862,14 @@ var StageRevertDataPlugin = function() {
|
|
|
4843
4862
|
var update2 = _object_spread_props(_object_spread({}, previousResult), {
|
|
4844
4863
|
updated: false
|
|
4845
4864
|
});
|
|
4846
|
-
var repopulateASTMapFromCache = function(resolvedNode, AST, ASTParent) {
|
|
4865
|
+
var repopulateASTMapFromCache = function repopulateASTMapFromCache1(resolvedNode, AST, ASTParent) {
|
|
4847
4866
|
var resolvedASTLocal = resolvedNode.node;
|
|
4848
4867
|
_this.ASTMap.set(resolvedASTLocal, AST);
|
|
4849
4868
|
var resolvedUpdate = _object_spread_props(_object_spread({}, resolvedNode), {
|
|
4850
4869
|
updated: false
|
|
4851
4870
|
});
|
|
4852
4871
|
cacheUpdate.set(AST, resolvedUpdate);
|
|
4853
|
-
var handleChildNode = function(childNode) {
|
|
4872
|
+
var handleChildNode = function handleChildNode(childNode) {
|
|
4854
4873
|
var _prevASTMap_get;
|
|
4855
4874
|
var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
|
|
4856
4875
|
var previousChildResult = _this.getPreviousResult(originalChildNode);
|
|
@@ -4875,7 +4894,6 @@ var StageRevertDataPlugin = function() {
|
|
|
4875
4894
|
var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
|
|
4876
4895
|
parent: partiallyResolvedParent
|
|
4877
4896
|
});
|
|
4878
|
-
var _this_hooks_beforeResolve_call;
|
|
4879
4897
|
var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
|
|
4880
4898
|
type: "empty"
|
|
4881
4899
|
};
|
|
@@ -4935,7 +4953,7 @@ var StageRevertDataPlugin = function() {
|
|
|
4935
4953
|
resolved = previousResult === null || previousResult === void 0 ? void 0 : previousResult.value;
|
|
4936
4954
|
}
|
|
4937
4955
|
resolved = this.hooks.afterResolve.call(resolved, resolvedAST, _object_spread_props(_object_spread({}, resolveOptions), {
|
|
4938
|
-
getDependencies: function(scope) {
|
|
4956
|
+
getDependencies: function getDependencies(scope) {
|
|
4939
4957
|
return dependencyModel.getDependencies(scope);
|
|
4940
4958
|
}
|
|
4941
4959
|
}));
|
|
@@ -5245,7 +5263,7 @@ var StageRevertDataPlugin = function() {
|
|
|
5245
5263
|
]);
|
|
5246
5264
|
return TemplatePlugin;
|
|
5247
5265
|
}();
|
|
5248
|
-
var createPatternMatcher = function(start, end) {
|
|
5266
|
+
var createPatternMatcher = function createPatternMatcher(start, end) {
|
|
5249
5267
|
return function(testStr) {
|
|
5250
5268
|
var startLocation = testStr.indexOf(start);
|
|
5251
5269
|
if (startLocation === -1) {
|
|
@@ -5285,18 +5303,18 @@ var StageRevertDataPlugin = function() {
|
|
|
5285
5303
|
});
|
|
5286
5304
|
return newNode;
|
|
5287
5305
|
}
|
|
5288
|
-
var findBasePath = function(node, resolver) {
|
|
5306
|
+
var findBasePath = function findBasePath1(node, resolver) {
|
|
5289
5307
|
var parentNode = node.parent;
|
|
5290
5308
|
if (!parentNode) {
|
|
5291
5309
|
return [];
|
|
5292
5310
|
}
|
|
5293
5311
|
if ("children" in parentNode) {
|
|
5312
|
+
var _ref;
|
|
5294
5313
|
var _parentNode_children_find, _parentNode_children;
|
|
5295
5314
|
var original = resolver.getSourceNode(node);
|
|
5296
|
-
|
|
5297
|
-
return (_parentNode_children_find_path = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5315
|
+
return (_ref = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5298
5316
|
return child.value === original;
|
|
5299
|
-
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null &&
|
|
5317
|
+
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null && _ref !== void 0 ? _ref : [];
|
|
5300
5318
|
}
|
|
5301
5319
|
if (parentNode.type !== "multi-node") {
|
|
5302
5320
|
return [];
|
|
@@ -5321,9 +5339,9 @@ var StageRevertDataPlugin = function() {
|
|
|
5321
5339
|
var _node_parent, _node_parent_parent, _node_parent1, _node_parent_parent1, _node_parent2, _node_parent_parent_value;
|
|
5322
5340
|
var propsToSkip;
|
|
5323
5341
|
if (node.type === "asset" || node.type === "view") {
|
|
5342
|
+
var _ref;
|
|
5324
5343
|
var _node_plugins_stringResolver, _node_plugins, _node_value;
|
|
5325
|
-
|
|
5326
|
-
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 : [
|
|
5344
|
+
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 : [
|
|
5327
5345
|
"exp"
|
|
5328
5346
|
]);
|
|
5329
5347
|
if ((_node_value = node.value) === null || _node_value === void 0 ? void 0 : _node_value.id) {
|
|
@@ -5744,11 +5762,11 @@ var StageRevertDataPlugin = function() {
|
|
|
5744
5762
|
this.stateStore.clear();
|
|
5745
5763
|
view.hooks.resolver.tap("asset-transform", function(resolver) {
|
|
5746
5764
|
var lastUpdatedNode;
|
|
5747
|
-
var updateState = function(node) {
|
|
5765
|
+
var updateState = function updateState(node) {
|
|
5748
5766
|
lastUpdatedNode = node;
|
|
5749
5767
|
view.update(/* @__PURE__ */ new Set());
|
|
5750
5768
|
};
|
|
5751
|
-
var getStore = function(node, stepKey) {
|
|
5769
|
+
var getStore = function getStore(node, stepKey) {
|
|
5752
5770
|
var store;
|
|
5753
5771
|
var countKey = stepKey === _this.resolveSymbol ? _this.resolveCountSymbol : _this.beforeResolveCountSymbol;
|
|
5754
5772
|
var storedState = _this.stateStore.get(node);
|
|
@@ -5762,10 +5780,10 @@ var StageRevertDataPlugin = function() {
|
|
|
5762
5780
|
_this.stateStore.set(node, store);
|
|
5763
5781
|
}
|
|
5764
5782
|
return {
|
|
5765
|
-
useSharedState: function(key) {
|
|
5783
|
+
useSharedState: function useSharedState(key) {
|
|
5766
5784
|
return store.useSharedState(key);
|
|
5767
5785
|
},
|
|
5768
|
-
useLocalState: function(initialState) {
|
|
5786
|
+
useLocalState: function useLocalState(initialState) {
|
|
5769
5787
|
return store.getLocalStateFunction(stepKey, countKey)(initialState);
|
|
5770
5788
|
}
|
|
5771
5789
|
};
|
|
@@ -6127,7 +6145,7 @@ var StageRevertDataPlugin = function() {
|
|
|
6127
6145
|
return options;
|
|
6128
6146
|
}
|
|
6129
6147
|
tracked.delete(node);
|
|
6130
|
-
var track = function(binding) {
|
|
6148
|
+
var track = function track(binding) {
|
|
6131
6149
|
var _this_options_callbacks_onAdd, _this_options_callbacks;
|
|
6132
6150
|
var parsed = isBinding(binding) ? binding : _this.options.parseBinding(binding);
|
|
6133
6151
|
if (tracked.has(node)) {
|
|
@@ -6153,7 +6171,7 @@ var StageRevertDataPlugin = function() {
|
|
|
6153
6171
|
};
|
|
6154
6172
|
return _object_spread_props(_object_spread({}, options), {
|
|
6155
6173
|
validation: _object_spread_props(_object_spread({}, options.validation), {
|
|
6156
|
-
get: function(binding, getOptions) {
|
|
6174
|
+
get: function get(binding, getOptions) {
|
|
6157
6175
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6158
6176
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6159
6177
|
track(binding);
|
|
@@ -6165,14 +6183,14 @@ var StageRevertDataPlugin = function() {
|
|
|
6165
6183
|
return firstFieldEOW;
|
|
6166
6184
|
},
|
|
6167
6185
|
getValidationsForBinding: function getValidationsForBinding(binding, getOptions) {
|
|
6186
|
+
var _ref;
|
|
6168
6187
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6169
6188
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6170
6189
|
track(binding);
|
|
6171
6190
|
}
|
|
6172
|
-
|
|
6173
|
-
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 : [];
|
|
6191
|
+
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 : [];
|
|
6174
6192
|
},
|
|
6175
|
-
getChildren: function(type) {
|
|
6193
|
+
getChildren: function getChildren(type) {
|
|
6176
6194
|
var _lastComputedBindingTree_get;
|
|
6177
6195
|
var validations = new Array();
|
|
6178
6196
|
(_lastComputedBindingTree_get = lastComputedBindingTree.get(node)) === null || _lastComputedBindingTree_get === void 0 ? void 0 : _lastComputedBindingTree_get.forEach(function(binding) {
|
|
@@ -6184,7 +6202,7 @@ var StageRevertDataPlugin = function() {
|
|
|
6184
6202
|
});
|
|
6185
6203
|
return validations;
|
|
6186
6204
|
},
|
|
6187
|
-
getValidationsForSection: function() {
|
|
6205
|
+
getValidationsForSection: function getValidationsForSection() {
|
|
6188
6206
|
var _lastSectionBindingTree_get;
|
|
6189
6207
|
var validations = new Array();
|
|
6190
6208
|
(_lastSectionBindingTree_get = lastSectionBindingTree.get(node)) === null || _lastSectionBindingTree_get === void 0 ? void 0 : _lastSectionBindingTree_get.forEach(function(binding) {
|
|
@@ -6196,7 +6214,7 @@ var StageRevertDataPlugin = function() {
|
|
|
6196
6214
|
});
|
|
6197
6215
|
return validations;
|
|
6198
6216
|
},
|
|
6199
|
-
register: function(registerOptions) {
|
|
6217
|
+
register: function register(registerOptions) {
|
|
6200
6218
|
if ((registerOptions === null || registerOptions === void 0 ? void 0 : registerOptions.type) === "section") {
|
|
6201
6219
|
if (!sections.has(node)) {
|
|
6202
6220
|
sections.set(node, /* @__PURE__ */ new Set());
|
|
@@ -6341,10 +6359,10 @@ var StageRevertDataPlugin = function() {
|
|
|
6341
6359
|
value: function runApplicableValidations(runner, canDismiss, phase) {
|
|
6342
6360
|
var _this = this;
|
|
6343
6361
|
this.applicableValidations = this.applicableValidations.map(function(originalValue) {
|
|
6362
|
+
var _originalValue_value_blocking, _response_message, _obj_value_displayTarget;
|
|
6344
6363
|
if (originalValue.state === "dismissed") {
|
|
6345
6364
|
return originalValue;
|
|
6346
6365
|
}
|
|
6347
|
-
var _originalValue_value_blocking;
|
|
6348
6366
|
var blocking = (_originalValue_value_blocking = originalValue.value.blocking) !== null && _originalValue_value_blocking !== void 0 ? _originalValue_value_blocking : originalValue.value.severity === "warning" && "once" || true;
|
|
6349
6367
|
var obj = (0, import_timm9.setIn)(originalValue, [
|
|
6350
6368
|
"value",
|
|
@@ -6366,7 +6384,6 @@ var StageRevertDataPlugin = function() {
|
|
|
6366
6384
|
}
|
|
6367
6385
|
}
|
|
6368
6386
|
var response = runner(obj.value);
|
|
6369
|
-
var _response_message, _obj_value_displayTarget;
|
|
6370
6387
|
var newState = {
|
|
6371
6388
|
type: obj.type,
|
|
6372
6389
|
value: obj.value,
|
|
@@ -6451,14 +6468,14 @@ var StageRevertDataPlugin = function() {
|
|
|
6451
6468
|
var _this = this;
|
|
6452
6469
|
return [
|
|
6453
6470
|
{
|
|
6454
|
-
set: function(transaction, options, next) {
|
|
6455
|
-
var
|
|
6456
|
-
return (
|
|
6471
|
+
set: function set(transaction, options, next) {
|
|
6472
|
+
var _ref;
|
|
6473
|
+
return (_ref = next === null || next === void 0 ? void 0 : next.set(transaction, options)) !== null && _ref !== void 0 ? _ref : [];
|
|
6457
6474
|
},
|
|
6458
|
-
get: function(binding, options, next) {
|
|
6475
|
+
get: function get(binding, options, next) {
|
|
6459
6476
|
return next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
6460
6477
|
},
|
|
6461
|
-
delete: function(binding, options, next) {
|
|
6478
|
+
delete: function _delete(binding, options, next) {
|
|
6462
6479
|
_this.validations = removeBindingAndChildrenFromMap(_this.validations, binding);
|
|
6463
6480
|
return next === null || next === void 0 ? void 0 : next.delete(binding, options);
|
|
6464
6481
|
}
|
|
@@ -6521,11 +6538,11 @@ var StageRevertDataPlugin = function() {
|
|
|
6521
6538
|
{
|
|
6522
6539
|
source: VIEW_VALIDATION_PROVIDER_NAME,
|
|
6523
6540
|
provider: {
|
|
6524
|
-
getValidationsForBinding: function(binding) {
|
|
6541
|
+
getValidationsForBinding: function getValidationsForBinding(binding) {
|
|
6525
6542
|
var _this_viewValidationProvider_getValidationsForBinding, _this_viewValidationProvider;
|
|
6526
6543
|
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);
|
|
6527
6544
|
},
|
|
6528
|
-
getValidationsForView: function() {
|
|
6545
|
+
getValidationsForView: function getValidationsForView() {
|
|
6529
6546
|
var _this_viewValidationProvider_getValidationsForView, _this_viewValidationProvider;
|
|
6530
6547
|
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);
|
|
6531
6548
|
}
|
|
@@ -6552,7 +6569,7 @@ var StageRevertDataPlugin = function() {
|
|
|
6552
6569
|
}
|
|
6553
6570
|
var bindingTrackerPlugin = new ValidationBindingTrackerViewPlugin(_object_spread_props(_object_spread({}, this.options), {
|
|
6554
6571
|
callbacks: {
|
|
6555
|
-
onAdd: function(binding) {
|
|
6572
|
+
onAdd: function onAdd(binding) {
|
|
6556
6573
|
if (!_this.options || _this.getValidationForBinding(binding) !== void 0) {
|
|
6557
6574
|
return;
|
|
6558
6575
|
}
|
|
@@ -6596,11 +6613,11 @@ var StageRevertDataPlugin = function() {
|
|
|
6596
6613
|
var _this_options;
|
|
6597
6614
|
var possibleValidations = this.getValidationProviders().reduce(function(vals, provider) {
|
|
6598
6615
|
var _vals;
|
|
6616
|
+
var _ref;
|
|
6599
6617
|
var _provider_provider_getValidationsForBinding, _provider_provider_getValidationsForBinding1, _provider_provider;
|
|
6600
|
-
|
|
6601
|
-
(_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) {
|
|
6618
|
+
(_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) {
|
|
6602
6619
|
return _object_spread_props(_object_spread({}, valObj), _define_property({}, VALIDATION_PROVIDER_NAME_SYMBOL, provider.source));
|
|
6603
|
-
})) !== null &&
|
|
6620
|
+
})) !== null && _ref !== void 0 ? _ref : []));
|
|
6604
6621
|
return vals;
|
|
6605
6622
|
}, []);
|
|
6606
6623
|
if (possibleValidations.length === 0) {
|
|
@@ -6641,10 +6658,10 @@ var StageRevertDataPlugin = function() {
|
|
|
6641
6658
|
key: "validationRunner",
|
|
6642
6659
|
value: function validationRunner(validationObj, binding) {
|
|
6643
6660
|
var context = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.options;
|
|
6661
|
+
var _validationObj_handler;
|
|
6644
6662
|
if (!context) {
|
|
6645
6663
|
throw new Error("No context provided to validation runner");
|
|
6646
6664
|
}
|
|
6647
|
-
var _validationObj_handler;
|
|
6648
6665
|
var handler = (_validationObj_handler = validationObj.handler) !== null && _validationObj_handler !== void 0 ? _validationObj_handler : this.getValidator(validationObj.type);
|
|
6649
6666
|
var weakBindings = /* @__PURE__ */ new Set();
|
|
6650
6667
|
var model = {
|
|
@@ -6658,7 +6675,7 @@ var StageRevertDataPlugin = function() {
|
|
|
6658
6675
|
delete: context.model.delete
|
|
6659
6676
|
};
|
|
6660
6677
|
var result = handler === null || handler === void 0 ? void 0 : handler(_object_spread_props(_object_spread({}, context), {
|
|
6661
|
-
evaluate: function(exp) {
|
|
6678
|
+
evaluate: function evaluate(exp) {
|
|
6662
6679
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
6663
6680
|
model: model
|
|
6664
6681
|
};
|
|
@@ -6696,7 +6713,7 @@ var StageRevertDataPlugin = function() {
|
|
|
6696
6713
|
var _this = this;
|
|
6697
6714
|
var isNavigationTrigger = trigger === "navigation";
|
|
6698
6715
|
var lastActiveBindings = this.activeBindings;
|
|
6699
|
-
var updateValidations = function(dismissValidations) {
|
|
6716
|
+
var updateValidations = function updateValidations(dismissValidations) {
|
|
6700
6717
|
_this.getBindings().forEach(function(binding) {
|
|
6701
6718
|
var _this_validations_get;
|
|
6702
6719
|
(_this_validations_get = _this.validations.get(binding)) === null || _this_validations_get === void 0 ? void 0 : _this_validations_get.update(trigger, dismissValidations, function(obj) {
|
|
@@ -6741,9 +6758,9 @@ var StageRevertDataPlugin = function() {
|
|
|
6741
6758
|
{
|
|
6742
6759
|
key: "getBindings",
|
|
6743
6760
|
value: function getBindings() {
|
|
6761
|
+
var _ref;
|
|
6744
6762
|
var _this_tracker;
|
|
6745
|
-
|
|
6746
|
-
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();
|
|
6763
|
+
return (_ref = (_this_tracker = this.tracker) === null || _this_tracker === void 0 ? void 0 : _this_tracker.getBindings()) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
6747
6764
|
}
|
|
6748
6765
|
},
|
|
6749
6766
|
{
|
|
@@ -6792,10 +6809,10 @@ var StageRevertDataPlugin = function() {
|
|
|
6792
6809
|
value: function forView(parser) {
|
|
6793
6810
|
var _this = this;
|
|
6794
6811
|
return {
|
|
6795
|
-
_getValidationForBinding: function(binding) {
|
|
6812
|
+
_getValidationForBinding: function _getValidationForBinding(binding) {
|
|
6796
6813
|
return _this.getValidationForBinding(isBinding(binding) ? binding : parser(binding));
|
|
6797
6814
|
},
|
|
6798
|
-
getAll: function() {
|
|
6815
|
+
getAll: function getAll() {
|
|
6799
6816
|
var bindings = _this.getBindings();
|
|
6800
6817
|
if (bindings.size === 0) {
|
|
6801
6818
|
return void 0;
|
|
@@ -6822,13 +6839,13 @@ var StageRevertDataPlugin = function() {
|
|
|
6822
6839
|
getValidationsForSection: function getValidationsForSection() {
|
|
6823
6840
|
throw new Error("Error rollup should be provided by the view plugin");
|
|
6824
6841
|
},
|
|
6825
|
-
track: function() {
|
|
6842
|
+
track: function track() {
|
|
6826
6843
|
throw new Error("Tracking should be provided by the view plugin");
|
|
6827
6844
|
},
|
|
6828
|
-
register: function() {
|
|
6845
|
+
register: function register() {
|
|
6829
6846
|
throw new Error("Section functionality should be provided by the view plugin");
|
|
6830
6847
|
},
|
|
6831
|
-
type: function(binding) {
|
|
6848
|
+
type: function type(binding) {
|
|
6832
6849
|
return _this.schema.getType(isBinding(binding) ? binding : parser(binding));
|
|
6833
6850
|
}
|
|
6834
6851
|
};
|
|
@@ -6837,9 +6854,9 @@ var StageRevertDataPlugin = function() {
|
|
|
6837
6854
|
]);
|
|
6838
6855
|
return ValidationController;
|
|
6839
6856
|
}();
|
|
6840
|
-
var mergeSets = function(setA, setB) {
|
|
6841
|
-
var
|
|
6842
|
-
return /* @__PURE__ */ new Set(_to_consumable_array((
|
|
6857
|
+
var mergeSets = function mergeSets(setA, setB) {
|
|
6858
|
+
var _ref, _ref1;
|
|
6859
|
+
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 : [])));
|
|
6843
6860
|
};
|
|
6844
6861
|
var ViewController = /*#__PURE__*/ function() {
|
|
6845
6862
|
function ViewController(initialViews, options) {
|
|
@@ -6866,7 +6883,7 @@ var StageRevertDataPlugin = function() {
|
|
|
6866
6883
|
}
|
|
6867
6884
|
});
|
|
6868
6885
|
});
|
|
6869
|
-
var update = function(updates) {
|
|
6886
|
+
var update = function update(updates) {
|
|
6870
6887
|
var silent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
6871
6888
|
if (_this1.currentView) {
|
|
6872
6889
|
if (_this1.optimizeUpdates) {
|
|
@@ -6877,10 +6894,10 @@ var StageRevertDataPlugin = function() {
|
|
|
6877
6894
|
}
|
|
6878
6895
|
};
|
|
6879
6896
|
options.model.hooks.onUpdate.tap("viewController", function(updates, updateOptions) {
|
|
6880
|
-
var
|
|
6897
|
+
var _ref;
|
|
6881
6898
|
update(new Set(updates.map(function(t2) {
|
|
6882
6899
|
return t2.binding;
|
|
6883
|
-
})), (
|
|
6900
|
+
})), (_ref = updateOptions === null || updateOptions === void 0 ? void 0 : updateOptions.silent) !== null && _ref !== void 0 ? _ref : false);
|
|
6884
6901
|
});
|
|
6885
6902
|
options.model.hooks.onDelete.tap("viewController", function(binding) {
|
|
6886
6903
|
var parentBinding = binding.parent();
|
|
@@ -6915,8 +6932,8 @@ var StageRevertDataPlugin = function() {
|
|
|
6915
6932
|
if (!this.pendingUpdate.scheduled && !silent) {
|
|
6916
6933
|
this.pendingUpdate.scheduled = true;
|
|
6917
6934
|
(0, import_queue_microtask2.default)(function() {
|
|
6918
|
-
var _this_currentView;
|
|
6919
6935
|
var _this_pendingUpdate;
|
|
6936
|
+
var _this_currentView;
|
|
6920
6937
|
var _ref = (_this_pendingUpdate = _this.pendingUpdate) !== null && _this_pendingUpdate !== void 0 ? _this_pendingUpdate : {}, changedBindings = _ref.changedBindings, changedNodes = _ref.changedNodes;
|
|
6921
6938
|
_this.pendingUpdate = void 0;
|
|
6922
6939
|
(_this_currentView = _this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.update(changedBindings, changedNodes);
|
|
@@ -7241,10 +7258,10 @@ var StageRevertDataPlugin = function() {
|
|
|
7241
7258
|
{
|
|
7242
7259
|
key: "getConstants",
|
|
7243
7260
|
value: function getConstants(key, namespace, fallback) {
|
|
7261
|
+
var _ref, _ref1;
|
|
7244
7262
|
var _this_tempStore_get, _this_store_get;
|
|
7245
7263
|
var path = new BindingInstance(key);
|
|
7246
|
-
|
|
7247
|
-
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;
|
|
7264
|
+
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;
|
|
7248
7265
|
}
|
|
7249
7266
|
},
|
|
7250
7267
|
{
|
|
@@ -7285,7 +7302,7 @@ var StageRevertDataPlugin = function() {
|
|
|
7285
7302
|
value: function apply(player) {
|
|
7286
7303
|
var _this = this;
|
|
7287
7304
|
var expressionEvaluator;
|
|
7288
|
-
var handleEval = function(exp) {
|
|
7305
|
+
var handleEval = function handleEval(exp) {
|
|
7289
7306
|
if (exp) {
|
|
7290
7307
|
if ((typeof exp === "undefined" ? "undefined" : _type_of(exp)) === "object" && "exp" in exp) {
|
|
7291
7308
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp.exp);
|
|
@@ -7306,7 +7323,7 @@ var StageRevertDataPlugin = function() {
|
|
|
7306
7323
|
return handleEval(exp);
|
|
7307
7324
|
});
|
|
7308
7325
|
flow.hooks.resolveTransitionNode.intercept({
|
|
7309
|
-
call: function(nextState) {
|
|
7326
|
+
call: function call(nextState) {
|
|
7310
7327
|
if (nextState === null || nextState === void 0 ? void 0 : nextState.onStart) {
|
|
7311
7328
|
handleEval(nextState.onStart);
|
|
7312
7329
|
}
|
|
@@ -7319,13 +7336,13 @@ var StageRevertDataPlugin = function() {
|
|
|
7319
7336
|
]);
|
|
7320
7337
|
return FlowExpPlugin;
|
|
7321
7338
|
}();
|
|
7322
|
-
var createFormatFunction = function(schema) {
|
|
7323
|
-
var handler = function(ctx, value, formatName) {
|
|
7339
|
+
var createFormatFunction = function createFormatFunction(schema) {
|
|
7340
|
+
var handler = function handler(ctx, value, formatName) {
|
|
7341
|
+
var _ref;
|
|
7324
7342
|
var _schema_getFormatterForType;
|
|
7325
|
-
|
|
7326
|
-
return (_schema_getFormatterForType_format = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7343
|
+
return (_ref = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7327
7344
|
type: formatName
|
|
7328
|
-
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null &&
|
|
7345
|
+
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null && _ref !== void 0 ? _ref : value;
|
|
7329
7346
|
};
|
|
7330
7347
|
return handler;
|
|
7331
7348
|
};
|
|
@@ -7377,8 +7394,8 @@ var StageRevertDataPlugin = function() {
|
|
|
7377
7394
|
ref: Symbol("not-started"),
|
|
7378
7395
|
status: "not-started"
|
|
7379
7396
|
};
|
|
7380
|
-
var PLAYER_VERSION = true ? "0.15.3-next.
|
|
7381
|
-
var COMMIT = true ? "
|
|
7397
|
+
var PLAYER_VERSION = true ? "0.15.3-next.2" : "unknown";
|
|
7398
|
+
var COMMIT = true ? "21f4b09d55c325c5fe951d2fd08caaebb81db483" : "unknown";
|
|
7382
7399
|
var _Player = /*#__PURE__*/ function() {
|
|
7383
7400
|
function _Player2(config) {
|
|
7384
7401
|
var _this = this;
|
|
@@ -7493,13 +7510,13 @@ var StageRevertDataPlugin = function() {
|
|
|
7493
7510
|
var expressionEvaluator;
|
|
7494
7511
|
var dataController;
|
|
7495
7512
|
var pathResolver = new BindingParser({
|
|
7496
|
-
get: function(binding) {
|
|
7513
|
+
get: function get(binding) {
|
|
7497
7514
|
return dataController.get(binding);
|
|
7498
7515
|
},
|
|
7499
|
-
set: function(transaction) {
|
|
7516
|
+
set: function set(transaction) {
|
|
7500
7517
|
return dataController.set(transaction);
|
|
7501
7518
|
},
|
|
7502
|
-
evaluate: function(expression) {
|
|
7519
|
+
evaluate: function evaluate(expression) {
|
|
7503
7520
|
return expressionEvaluator.evaluate(expression);
|
|
7504
7521
|
}
|
|
7505
7522
|
});
|
|
@@ -7643,23 +7660,23 @@ var StageRevertDataPlugin = function() {
|
|
|
7643
7660
|
transition: flowController.transition,
|
|
7644
7661
|
model: dataController,
|
|
7645
7662
|
utils: {
|
|
7646
|
-
findPlugin: function(pluginSymbol) {
|
|
7663
|
+
findPlugin: function findPlugin(pluginSymbol) {
|
|
7647
7664
|
return _this.findPlugin(pluginSymbol);
|
|
7648
7665
|
}
|
|
7649
7666
|
},
|
|
7650
7667
|
logger: this.logger,
|
|
7651
7668
|
flowController: flowController,
|
|
7652
7669
|
schema: schema,
|
|
7653
|
-
format: function(binding, value) {
|
|
7670
|
+
format: function format(binding, value) {
|
|
7654
7671
|
var formatter = schema.getFormatter(binding);
|
|
7655
7672
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7656
7673
|
},
|
|
7657
|
-
formatValue: function(ref, value) {
|
|
7674
|
+
formatValue: function formatValue(ref, value) {
|
|
7658
7675
|
var formatter = schema.getFormatterForType(ref);
|
|
7659
7676
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7660
7677
|
},
|
|
7661
7678
|
validation: _object_spread_props(_object_spread({}, validationController.forView(parseBinding)), {
|
|
7662
|
-
type: function(b) {
|
|
7679
|
+
type: function type(b) {
|
|
7663
7680
|
return schema.getType(parseBinding(b));
|
|
7664
7681
|
}
|
|
7665
7682
|
}),
|
|
@@ -7671,7 +7688,7 @@ var StageRevertDataPlugin = function() {
|
|
|
7671
7688
|
});
|
|
7672
7689
|
this.hooks.viewController.call(viewController);
|
|
7673
7690
|
return {
|
|
7674
|
-
start: function() {
|
|
7691
|
+
start: function start() {
|
|
7675
7692
|
flowController.start().then(function(endState) {
|
|
7676
7693
|
var flowResult = {
|
|
7677
7694
|
endState: resolveStrings(endState, false),
|
|
@@ -7708,13 +7725,13 @@ var StageRevertDataPlugin = function() {
|
|
|
7708
7725
|
key: "start",
|
|
7709
7726
|
value: function start(payload) {
|
|
7710
7727
|
return _async_to_generator(function() {
|
|
7711
|
-
var _this,
|
|
7728
|
+
var _this, _ref, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
7712
7729
|
return _ts_generator(this, function(_state) {
|
|
7713
7730
|
switch(_state.label){
|
|
7714
7731
|
case 0:
|
|
7715
7732
|
_this = this;
|
|
7716
|
-
ref = Symbol((
|
|
7717
|
-
maybeUpdateState = function(newState) {
|
|
7733
|
+
ref = Symbol((_ref = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _ref !== void 0 ? _ref : "payload");
|
|
7734
|
+
maybeUpdateState = function maybeUpdateState(newState) {
|
|
7718
7735
|
if (_this.state.ref !== ref) {
|
|
7719
7736
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
7720
7737
|
return newState;
|
|
@@ -7811,7 +7828,7 @@ var StageRevertDataPlugin = function() {
|
|
|
7811
7828
|
severity: "error"
|
|
7812
7829
|
};
|
|
7813
7830
|
}, {
|
|
7814
|
-
shouldIncludeInvalid: function() {
|
|
7831
|
+
shouldIncludeInvalid: function shouldIncludeInvalid() {
|
|
7815
7832
|
return true;
|
|
7816
7833
|
}
|
|
7817
7834
|
});
|
|
@@ -7840,7 +7857,7 @@ var StageRevertDataPlugin = function() {
|
|
|
7840
7857
|
});
|
|
7841
7858
|
player.hooks.viewController.tap(this.name, function(vc) {
|
|
7842
7859
|
vc.hooks.resolveView.intercept({
|
|
7843
|
-
call: function(view, id, state) {
|
|
7860
|
+
call: function call(view, id, state) {
|
|
7844
7861
|
var _state_attributes, _state_attributes1;
|
|
7845
7862
|
stageData = state === null || state === void 0 ? void 0 : (_state_attributes = state.attributes) === null || _state_attributes === void 0 ? void 0 : _state_attributes.stageData;
|
|
7846
7863
|
commitTransitions = state === null || state === void 0 ? void 0 : (_state_attributes1 = state.attributes) === null || _state_attributes1 === void 0 ? void 0 : _state_attributes1.commitTransitions;
|