@player-ui/beacon-plugin 0.15.3-next.1 → 0.15.3-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BeaconPlugin.native.js +204 -188
- package/dist/BeaconPlugin.native.js.map +1 -1
- package/package.json +3 -3
|
@@ -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 BeaconPlugin = 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 BeaconPlugin = 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 BeaconPlugin = 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 BeaconPlugin = 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 BeaconPlugin = 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 BeaconPlugin = 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 BeaconPlugin = 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 BeaconPlugin = 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 BeaconPlugin = 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 BeaconPlugin = 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 BeaconPlugin = 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,10 +2085,10 @@ var BeaconPlugin = function() {
|
|
|
2067
2085
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/beacon/core/src/index.ts
|
|
2068
2086
|
var src_exports = {};
|
|
2069
2087
|
__export(src_exports, {
|
|
2070
|
-
BeaconPlugin: function() {
|
|
2088
|
+
BeaconPlugin: function BeaconPlugin1() {
|
|
2071
2089
|
return BeaconPlugin;
|
|
2072
2090
|
},
|
|
2073
|
-
BeaconPluginSymbol: function() {
|
|
2091
|
+
BeaconPluginSymbol: function BeaconPluginSymbol1() {
|
|
2074
2092
|
return BeaconPluginSymbol;
|
|
2075
2093
|
}
|
|
2076
2094
|
});
|
|
@@ -2595,7 +2613,7 @@ var BeaconPlugin = function() {
|
|
|
2595
2613
|
}
|
|
2596
2614
|
return pairs;
|
|
2597
2615
|
}
|
|
2598
|
-
var createSortedArray = function() {
|
|
2616
|
+
var createSortedArray = function createSortedArray() {
|
|
2599
2617
|
return new import_sorted_array.default([], function(c) {
|
|
2600
2618
|
return c.matcher.count;
|
|
2601
2619
|
});
|
|
@@ -2691,38 +2709,38 @@ var BeaconPlugin = function() {
|
|
|
2691
2709
|
}();
|
|
2692
2710
|
// ../../../../../../../../../../../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
|
|
2693
2711
|
var __defProp2 = Object.defineProperty;
|
|
2694
|
-
var __export2 = function(target, all) {
|
|
2712
|
+
var __export2 = function __export2(target, all) {
|
|
2695
2713
|
for(var name in all)__defProp2(target, name, {
|
|
2696
2714
|
get: all[name],
|
|
2697
2715
|
enumerable: true
|
|
2698
2716
|
});
|
|
2699
2717
|
};
|
|
2700
|
-
var toValue = function(value) {
|
|
2718
|
+
var toValue = function toValue(value) {
|
|
2701
2719
|
return {
|
|
2702
2720
|
name: "Value",
|
|
2703
2721
|
value: value
|
|
2704
2722
|
};
|
|
2705
2723
|
};
|
|
2706
|
-
var toExpression = function(value) {
|
|
2724
|
+
var toExpression = function toExpression(value) {
|
|
2707
2725
|
return {
|
|
2708
2726
|
name: "Expression",
|
|
2709
2727
|
value: value
|
|
2710
2728
|
};
|
|
2711
2729
|
};
|
|
2712
|
-
var toPath = function(path) {
|
|
2730
|
+
var toPath = function toPath(path) {
|
|
2713
2731
|
return {
|
|
2714
2732
|
name: "PathNode",
|
|
2715
2733
|
path: path
|
|
2716
2734
|
};
|
|
2717
2735
|
};
|
|
2718
|
-
var toQuery = function(key, value) {
|
|
2736
|
+
var toQuery = function toQuery(key, value) {
|
|
2719
2737
|
return {
|
|
2720
2738
|
name: "Query",
|
|
2721
2739
|
key: key,
|
|
2722
2740
|
value: value
|
|
2723
2741
|
};
|
|
2724
2742
|
};
|
|
2725
|
-
var toConcatenatedNode = function(values) {
|
|
2743
|
+
var toConcatenatedNode = function toConcatenatedNode(values) {
|
|
2726
2744
|
if (values.length === 1) {
|
|
2727
2745
|
return values[0];
|
|
2728
2746
|
}
|
|
@@ -2740,7 +2758,7 @@ var BeaconPlugin = function() {
|
|
|
2740
2758
|
var SINGLE_QUOTE = "'";
|
|
2741
2759
|
var DOUBLE_QUOTE = '"';
|
|
2742
2760
|
var BACK_TICK = "`";
|
|
2743
|
-
var isIdentifierChar = function(char) {
|
|
2761
|
+
var isIdentifierChar = function isIdentifierChar(char) {
|
|
2744
2762
|
if (!char) {
|
|
2745
2763
|
return false;
|
|
2746
2764
|
}
|
|
@@ -2760,10 +2778,10 @@ var BeaconPlugin = function() {
|
|
|
2760
2778
|
charCode === 125;
|
|
2761
2779
|
return !matches;
|
|
2762
2780
|
};
|
|
2763
|
-
var parse = function(path) {
|
|
2781
|
+
var parse = function parse(path) {
|
|
2764
2782
|
var index = 1;
|
|
2765
2783
|
var ch = path.charAt(0);
|
|
2766
|
-
var next = function(expected) {
|
|
2784
|
+
var next = function next(expected) {
|
|
2767
2785
|
if (expected && ch !== expected) {
|
|
2768
2786
|
throw new Error("Expected char: ".concat(expected, " but got: ").concat(ch));
|
|
2769
2787
|
}
|
|
@@ -2771,12 +2789,12 @@ var BeaconPlugin = function() {
|
|
|
2771
2789
|
index += 1;
|
|
2772
2790
|
return ch;
|
|
2773
2791
|
};
|
|
2774
|
-
var whitespace = function() {
|
|
2792
|
+
var whitespace = function whitespace() {
|
|
2775
2793
|
while(ch === " "){
|
|
2776
2794
|
next();
|
|
2777
2795
|
}
|
|
2778
2796
|
};
|
|
2779
|
-
var identifier = function() {
|
|
2797
|
+
var identifier = function identifier() {
|
|
2780
2798
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2781
2799
|
if (!isIdentifierChar(ch)) {
|
|
2782
2800
|
return;
|
|
@@ -2802,7 +2820,7 @@ var BeaconPlugin = function() {
|
|
|
2802
2820
|
return toValue(value);
|
|
2803
2821
|
}
|
|
2804
2822
|
};
|
|
2805
|
-
var expression = function() {
|
|
2823
|
+
var expression = function expression() {
|
|
2806
2824
|
if (ch === BACK_TICK) {
|
|
2807
2825
|
next(BACK_TICK);
|
|
2808
2826
|
var exp = ch;
|
|
@@ -2818,7 +2836,7 @@ var BeaconPlugin = function() {
|
|
|
2818
2836
|
}
|
|
2819
2837
|
}
|
|
2820
2838
|
};
|
|
2821
|
-
var regex = function(match) {
|
|
2839
|
+
var regex = function regex(match) {
|
|
2822
2840
|
if (!(ch === null || ch === void 0 ? void 0 : ch.match(match))) {
|
|
2823
2841
|
return;
|
|
2824
2842
|
}
|
|
@@ -2833,7 +2851,7 @@ var BeaconPlugin = function() {
|
|
|
2833
2851
|
return toValue(value);
|
|
2834
2852
|
}
|
|
2835
2853
|
};
|
|
2836
|
-
var nestedPath = function() {
|
|
2854
|
+
var nestedPath = function nestedPath() {
|
|
2837
2855
|
if (ch === OPEN_CURL) {
|
|
2838
2856
|
next(OPEN_CURL);
|
|
2839
2857
|
next(OPEN_CURL);
|
|
@@ -2843,12 +2861,12 @@ var BeaconPlugin = function() {
|
|
|
2843
2861
|
return modelRef;
|
|
2844
2862
|
}
|
|
2845
2863
|
};
|
|
2846
|
-
var simpleSegment = function() {
|
|
2864
|
+
var simpleSegment = function simpleSegment() {
|
|
2847
2865
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2848
|
-
var
|
|
2866
|
+
var _ref, _nestedPath;
|
|
2849
2867
|
return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
|
|
2850
2868
|
};
|
|
2851
|
-
var segment = function() {
|
|
2869
|
+
var segment = function segment() {
|
|
2852
2870
|
var segments = [];
|
|
2853
2871
|
var nextSegment = simpleSegment();
|
|
2854
2872
|
while(nextSegment !== void 0){
|
|
@@ -2860,7 +2878,7 @@ var BeaconPlugin = function() {
|
|
|
2860
2878
|
}
|
|
2861
2879
|
return toConcatenatedNode(segments);
|
|
2862
2880
|
};
|
|
2863
|
-
var optionallyQuotedSegment = function() {
|
|
2881
|
+
var optionallyQuotedSegment = function optionallyQuotedSegment() {
|
|
2864
2882
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2865
2883
|
whitespace();
|
|
2866
2884
|
if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
|
|
@@ -2872,7 +2890,7 @@ var BeaconPlugin = function() {
|
|
|
2872
2890
|
}
|
|
2873
2891
|
return simpleSegment(allowBoolValue);
|
|
2874
2892
|
};
|
|
2875
|
-
var equals = function() {
|
|
2893
|
+
var equals = function equals() {
|
|
2876
2894
|
if (ch !== EQUALS) {
|
|
2877
2895
|
return false;
|
|
2878
2896
|
}
|
|
@@ -2881,7 +2899,7 @@ var BeaconPlugin = function() {
|
|
|
2881
2899
|
}
|
|
2882
2900
|
return true;
|
|
2883
2901
|
};
|
|
2884
|
-
var parseBracket = function() {
|
|
2902
|
+
var parseBracket = function parseBracket() {
|
|
2885
2903
|
if (ch === OPEN_BRACKET) {
|
|
2886
2904
|
next(OPEN_BRACKET);
|
|
2887
2905
|
whitespace();
|
|
@@ -2903,7 +2921,7 @@ var BeaconPlugin = function() {
|
|
|
2903
2921
|
return value;
|
|
2904
2922
|
}
|
|
2905
2923
|
};
|
|
2906
|
-
var parseSegmentAndBrackets = function() {
|
|
2924
|
+
var parseSegmentAndBrackets = function parseSegmentAndBrackets() {
|
|
2907
2925
|
var parsed = [];
|
|
2908
2926
|
var firstSegment = segment();
|
|
2909
2927
|
if (firstSegment) {
|
|
@@ -2920,7 +2938,7 @@ var BeaconPlugin = function() {
|
|
|
2920
2938
|
}
|
|
2921
2939
|
return parsed;
|
|
2922
2940
|
};
|
|
2923
|
-
var parsePath = function() {
|
|
2941
|
+
var parsePath = function parsePath() {
|
|
2924
2942
|
var parts = [];
|
|
2925
2943
|
var nextSegment = parseSegmentAndBrackets();
|
|
2926
2944
|
while(nextSegment !== void 0){
|
|
@@ -3031,6 +3049,7 @@ var BeaconPlugin = function() {
|
|
|
3031
3049
|
return _BindingInstance;
|
|
3032
3050
|
}();
|
|
3033
3051
|
function resolveBindingAST(bindingPathNode, options, hooks) {
|
|
3052
|
+
var _context_updates;
|
|
3034
3053
|
var context = {
|
|
3035
3054
|
updates: {},
|
|
3036
3055
|
path: []
|
|
@@ -3070,8 +3089,8 @@ var BeaconPlugin = function() {
|
|
|
3070
3089
|
}
|
|
3071
3090
|
}
|
|
3072
3091
|
function resolveNode(_node) {
|
|
3073
|
-
var
|
|
3074
|
-
var resolvedNode = (
|
|
3092
|
+
var _ref;
|
|
3093
|
+
var resolvedNode = (_ref = hooks === null || hooks === void 0 ? void 0 : hooks.beforeResolveNode.call(_node, _object_spread({}, context, options))) !== null && _ref !== void 0 ? _ref : _node;
|
|
3075
3094
|
switch(resolvedNode.name){
|
|
3076
3095
|
case "Expression":
|
|
3077
3096
|
case "PathNode":
|
|
@@ -3107,7 +3126,6 @@ var BeaconPlugin = function() {
|
|
|
3107
3126
|
}
|
|
3108
3127
|
}
|
|
3109
3128
|
bindingPathNode.path.forEach(resolveNode);
|
|
3110
|
-
var _context_updates;
|
|
3111
3129
|
return {
|
|
3112
3130
|
path: context.path,
|
|
3113
3131
|
updates: Object.keys((_context_updates = context.updates) !== null && _context_updates !== void 0 ? _context_updates : {}).length > 0 ? context.updates : void 0
|
|
@@ -3116,13 +3134,13 @@ var BeaconPlugin = function() {
|
|
|
3116
3134
|
var BINDING_BRACKETS_REGEX = /[\s()*=`{}'"[\]]/;
|
|
3117
3135
|
var LAZY_BINDING_REGEX = /^[^.]+(\..+)*$/;
|
|
3118
3136
|
var DEFAULT_OPTIONS = {
|
|
3119
|
-
get: function() {
|
|
3137
|
+
get: function get() {
|
|
3120
3138
|
throw new Error("Not Implemented");
|
|
3121
3139
|
},
|
|
3122
|
-
set: function() {
|
|
3140
|
+
set: function set() {
|
|
3123
3141
|
throw new Error("Not Implemented");
|
|
3124
3142
|
},
|
|
3125
|
-
evaluate: function() {
|
|
3143
|
+
evaluate: function evaluate() {
|
|
3126
3144
|
throw new Error("Not Implemented");
|
|
3127
3145
|
}
|
|
3128
3146
|
};
|
|
@@ -3145,18 +3163,18 @@ var BeaconPlugin = function() {
|
|
|
3145
3163
|
* representation of that path.
|
|
3146
3164
|
*/ key: "normalizePath",
|
|
3147
3165
|
value: function normalizePath(path, resolveOptions) {
|
|
3166
|
+
var _this_parseCache_path;
|
|
3148
3167
|
if (!BINDING_BRACKETS_REGEX.test(path) && LAZY_BINDING_REGEX.test(path) && this.hooks.skipOptimization.call(path) !== true) {
|
|
3149
3168
|
return {
|
|
3150
3169
|
path: path.split("."),
|
|
3151
3170
|
updates: void 0
|
|
3152
3171
|
};
|
|
3153
3172
|
}
|
|
3154
|
-
var _this_parseCache_path;
|
|
3155
3173
|
var ast = (_this_parseCache_path = this.parseCache[path]) !== null && _this_parseCache_path !== void 0 ? _this_parseCache_path : parse(path);
|
|
3156
3174
|
this.parseCache[path] = ast;
|
|
3157
3175
|
if ((typeof ast === "undefined" ? "undefined" : _type_of(ast)) !== "object" || !(ast === null || ast === void 0 ? void 0 : ast.status)) {
|
|
3158
|
-
var
|
|
3159
|
-
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((
|
|
3176
|
+
var _ref;
|
|
3177
|
+
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."));
|
|
3160
3178
|
}
|
|
3161
3179
|
try {
|
|
3162
3180
|
return resolveBindingAST(ast.path, resolveOptions, this.hooks);
|
|
@@ -3189,14 +3207,14 @@ var BeaconPlugin = function() {
|
|
|
3189
3207
|
var updates = {};
|
|
3190
3208
|
var joined = Array.isArray(rawBinding) ? rawBinding.join(".") : String(rawBinding);
|
|
3191
3209
|
var normalizeConfig = {
|
|
3192
|
-
getValue: function(path) {
|
|
3210
|
+
getValue: function getValue(path) {
|
|
3193
3211
|
var normalized2 = _this.normalizePath(path.join("."), normalizeConfig);
|
|
3194
3212
|
return options.get(_this.getBindingForNormalizedResult(normalized2));
|
|
3195
3213
|
},
|
|
3196
|
-
evaluate: function(exp) {
|
|
3214
|
+
evaluate: function evaluate(exp) {
|
|
3197
3215
|
return options.evaluate(exp);
|
|
3198
3216
|
},
|
|
3199
|
-
convertToPath: function(path) {
|
|
3217
|
+
convertToPath: function convertToPath(path) {
|
|
3200
3218
|
if (path === void 0) {
|
|
3201
3219
|
throw new Error("Attempted to convert undefined value to binding path");
|
|
3202
3220
|
}
|
|
@@ -3261,9 +3279,9 @@ var BeaconPlugin = function() {
|
|
|
3261
3279
|
/** Grab all of the bindings that this depended on */ key: "getDependencies",
|
|
3262
3280
|
value: function getDependencies(name) {
|
|
3263
3281
|
if (name !== void 0) {
|
|
3282
|
+
var _ref;
|
|
3264
3283
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3265
|
-
|
|
3266
|
-
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();
|
|
3284
|
+
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();
|
|
3267
3285
|
}
|
|
3268
3286
|
return this.readDeps;
|
|
3269
3287
|
}
|
|
@@ -3285,9 +3303,9 @@ var BeaconPlugin = function() {
|
|
|
3285
3303
|
/** Grab all of the bindings this wrote to */ key: "getModified",
|
|
3286
3304
|
value: function getModified(name) {
|
|
3287
3305
|
if (name !== void 0) {
|
|
3306
|
+
var _ref;
|
|
3288
3307
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3289
|
-
|
|
3290
|
-
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();
|
|
3308
|
+
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();
|
|
3291
3309
|
}
|
|
3292
3310
|
return this.writeDeps;
|
|
3293
3311
|
}
|
|
@@ -3609,19 +3627,19 @@ var BeaconPlugin = function() {
|
|
|
3609
3627
|
var thisStr = "this";
|
|
3610
3628
|
var evaluator_functions_exports = {};
|
|
3611
3629
|
__export2(evaluator_functions_exports, {
|
|
3612
|
-
conditional: function() {
|
|
3630
|
+
conditional: function conditional1() {
|
|
3613
3631
|
return conditional;
|
|
3614
3632
|
},
|
|
3615
|
-
deleteDataVal: function() {
|
|
3633
|
+
deleteDataVal: function deleteDataVal1() {
|
|
3616
3634
|
return deleteDataVal;
|
|
3617
3635
|
},
|
|
3618
|
-
getDataVal: function() {
|
|
3636
|
+
getDataVal: function getDataVal1() {
|
|
3619
3637
|
return getDataVal;
|
|
3620
3638
|
},
|
|
3621
|
-
setDataVal: function() {
|
|
3639
|
+
setDataVal: function setDataVal1() {
|
|
3622
3640
|
return setDataVal;
|
|
3623
3641
|
},
|
|
3624
|
-
waitFor: function() {
|
|
3642
|
+
waitFor: function waitFor1() {
|
|
3625
3643
|
return waitFor;
|
|
3626
3644
|
}
|
|
3627
3645
|
});
|
|
@@ -3633,7 +3651,7 @@ var BeaconPlugin = function() {
|
|
|
3633
3651
|
};
|
|
3634
3652
|
return promise;
|
|
3635
3653
|
}
|
|
3636
|
-
var setDataVal = function(_context, binding, value) {
|
|
3654
|
+
var setDataVal = function setDataVal(_context, binding, value) {
|
|
3637
3655
|
_context.model.set([
|
|
3638
3656
|
[
|
|
3639
3657
|
binding,
|
|
@@ -3641,13 +3659,13 @@ var BeaconPlugin = function() {
|
|
|
3641
3659
|
]
|
|
3642
3660
|
]);
|
|
3643
3661
|
};
|
|
3644
|
-
var getDataVal = function(_context, binding) {
|
|
3662
|
+
var getDataVal = function getDataVal(_context, binding) {
|
|
3645
3663
|
return _context.model.get(binding);
|
|
3646
3664
|
};
|
|
3647
|
-
var deleteDataVal = function(_context, binding) {
|
|
3665
|
+
var deleteDataVal = function deleteDataVal(_context, binding) {
|
|
3648
3666
|
return _context.model.delete(binding);
|
|
3649
3667
|
};
|
|
3650
|
-
var conditional = function(ctx, condition, ifTrue, ifFalse) {
|
|
3668
|
+
var conditional = function conditional(ctx, condition, ifTrue, ifFalse) {
|
|
3651
3669
|
var testResult = ctx.evaluate(condition);
|
|
3652
3670
|
if (isAwaitable(testResult)) {
|
|
3653
3671
|
return testResult.awaitableThen(function(resolvedTest) {
|
|
@@ -3669,14 +3687,14 @@ var BeaconPlugin = function() {
|
|
|
3669
3687
|
return null;
|
|
3670
3688
|
};
|
|
3671
3689
|
conditional.resolveParams = false;
|
|
3672
|
-
var waitFor = function(ctx, promise) {
|
|
3690
|
+
var waitFor = function waitFor(ctx, promise) {
|
|
3673
3691
|
return makeAwaitable(promise);
|
|
3674
3692
|
};
|
|
3675
|
-
var andandOperator = function(ctx, a, b, async) {
|
|
3693
|
+
var andandOperator = function andandOperator(ctx, a, b, async) {
|
|
3676
3694
|
return LogicalOperators.and(ctx, a, b, async);
|
|
3677
3695
|
};
|
|
3678
3696
|
andandOperator.resolveParams = false;
|
|
3679
|
-
var ororOperator = function(ctx, a, b, async) {
|
|
3697
|
+
var ororOperator = function ororOperator(ctx, a, b, async) {
|
|
3680
3698
|
return LogicalOperators.or(ctx, a, b, async);
|
|
3681
3699
|
};
|
|
3682
3700
|
ororOperator.resolveParams = false;
|
|
@@ -3802,7 +3820,7 @@ var BeaconPlugin = function() {
|
|
|
3802
3820
|
}
|
|
3803
3821
|
};
|
|
3804
3822
|
var LogicalOperators = {
|
|
3805
|
-
and: function(ctx, leftNode, rightNode, async) {
|
|
3823
|
+
and: function and(ctx, leftNode, rightNode, async) {
|
|
3806
3824
|
var leftResult = ctx.evaluate(leftNode);
|
|
3807
3825
|
if (async && isAwaitable(leftResult)) {
|
|
3808
3826
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3813,7 +3831,7 @@ var BeaconPlugin = function() {
|
|
|
3813
3831
|
}
|
|
3814
3832
|
return leftResult && ctx.evaluate(rightNode);
|
|
3815
3833
|
},
|
|
3816
|
-
or: function(ctx, leftNode, rightNode, async) {
|
|
3834
|
+
or: function or(ctx, leftNode, rightNode, async) {
|
|
3817
3835
|
var leftResult = ctx.evaluate(leftNode);
|
|
3818
3836
|
if (async && isAwaitable(leftResult)) {
|
|
3819
3837
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3851,10 +3869,10 @@ var BeaconPlugin = function() {
|
|
|
3851
3869
|
]))
|
|
3852
3870
|
};
|
|
3853
3871
|
this.defaultHookOptions = _object_spread_props(_object_spread({}, defaultOptions), {
|
|
3854
|
-
evaluate: function(expr) {
|
|
3872
|
+
evaluate: function evaluate(expr) {
|
|
3855
3873
|
return _this.evaluate(expr, _this.defaultHookOptions);
|
|
3856
3874
|
},
|
|
3857
|
-
resolveNode: function(node) {
|
|
3875
|
+
resolveNode: function resolveNode(node) {
|
|
3858
3876
|
return _this._execAST(node, _this.defaultHookOptions);
|
|
3859
3877
|
}
|
|
3860
3878
|
});
|
|
@@ -3874,12 +3892,12 @@ var BeaconPlugin = function() {
|
|
|
3874
3892
|
key: "evaluate",
|
|
3875
3893
|
value: function evaluate(expr, options) {
|
|
3876
3894
|
var _this = this;
|
|
3895
|
+
var _this_hooks_beforeEvaluate_call;
|
|
3877
3896
|
var resolvedOpts = this.hooks.resolveOptions.call(_object_spread_props(_object_spread({}, this.defaultHookOptions, options), {
|
|
3878
|
-
resolveNode: function(node) {
|
|
3897
|
+
resolveNode: function resolveNode(node) {
|
|
3879
3898
|
return _this._execAST(node, resolvedOpts);
|
|
3880
3899
|
}
|
|
3881
3900
|
}));
|
|
3882
|
-
var _this_hooks_beforeEvaluate_call;
|
|
3883
3901
|
var expression = (_this_hooks_beforeEvaluate_call = this.hooks.beforeEvaluate.call(expr, resolvedOpts)) !== null && _this_hooks_beforeEvaluate_call !== void 0 ? _this_hooks_beforeEvaluate_call : expr;
|
|
3884
3902
|
while(isObjectExpression(expression)){
|
|
3885
3903
|
expression = expression.value;
|
|
@@ -4003,11 +4021,11 @@ var BeaconPlugin = function() {
|
|
|
4003
4021
|
key: "_resolveNode",
|
|
4004
4022
|
value: function _resolveNode(_currentValue, node, options) {
|
|
4005
4023
|
var _this = this;
|
|
4006
|
-
var resolveNode = options.resolveNode, model = options.model;
|
|
4007
4024
|
var _options_async;
|
|
4025
|
+
var resolveNode = options.resolveNode, model = options.model;
|
|
4008
4026
|
var isAsync = (_options_async = options.async) !== null && _options_async !== void 0 ? _options_async : false;
|
|
4009
4027
|
var expressionContext = _object_spread_props(_object_spread({}, options), {
|
|
4010
|
-
evaluate: function(expr) {
|
|
4028
|
+
evaluate: function evaluate(expr) {
|
|
4011
4029
|
return _this.evaluate(expr, options);
|
|
4012
4030
|
}
|
|
4013
4031
|
});
|
|
@@ -4341,7 +4359,7 @@ var BeaconPlugin = function() {
|
|
|
4341
4359
|
]);
|
|
4342
4360
|
return ProxyLogger;
|
|
4343
4361
|
}();
|
|
4344
|
-
var identify = function(val) {
|
|
4362
|
+
var identify = function identify(val) {
|
|
4345
4363
|
return val;
|
|
4346
4364
|
};
|
|
4347
4365
|
var SchemaController = /*#__PURE__*/ function() {
|
|
@@ -4429,6 +4447,7 @@ var BeaconPlugin = function() {
|
|
|
4429
4447
|
{
|
|
4430
4448
|
key: "getApparentType",
|
|
4431
4449
|
value: function getApparentType(binding) {
|
|
4450
|
+
var _schemaType_validation, _baseType_validation;
|
|
4432
4451
|
var schemaType = this.getType(binding);
|
|
4433
4452
|
if (schemaType === void 0) {
|
|
4434
4453
|
return void 0;
|
|
@@ -4437,7 +4456,6 @@ var BeaconPlugin = function() {
|
|
|
4437
4456
|
if (baseType === void 0) {
|
|
4438
4457
|
return schemaType;
|
|
4439
4458
|
}
|
|
4440
|
-
var _schemaType_validation, _baseType_validation;
|
|
4441
4459
|
return _object_spread_props(_object_spread({}, baseType, schemaType), {
|
|
4442
4460
|
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 : []))
|
|
4443
4461
|
});
|
|
@@ -4586,10 +4604,10 @@ var BeaconPlugin = function() {
|
|
|
4586
4604
|
{
|
|
4587
4605
|
key: "get",
|
|
4588
4606
|
value: function get(binding, options, next) {
|
|
4607
|
+
var _ref;
|
|
4589
4608
|
var _this_shouldIncludeInvalid, _this;
|
|
4590
4609
|
var val = next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
4591
|
-
|
|
4592
|
-
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) {
|
|
4610
|
+
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) {
|
|
4593
4611
|
this.shadowModelPaths.forEach(function(shadowValue, shadowBinding) {
|
|
4594
4612
|
if (shadowBinding === binding) {
|
|
4595
4613
|
val = shadowValue;
|
|
@@ -4674,11 +4692,12 @@ var BeaconPlugin = function() {
|
|
|
4674
4692
|
templateDepth: 0
|
|
4675
4693
|
};
|
|
4676
4694
|
var _this = this;
|
|
4695
|
+
var _this_hooks_onCreateASTNode_call;
|
|
4677
4696
|
var parsedNode = this.hooks.parseNode.call(obj, type, options);
|
|
4678
4697
|
if (parsedNode || parsedNode === null) {
|
|
4679
4698
|
return parsedNode;
|
|
4680
4699
|
}
|
|
4681
|
-
var parseLocalObject = function(currentValue, objToParse) {
|
|
4700
|
+
var parseLocalObject = function parseLocalObject1(currentValue, objToParse) {
|
|
4682
4701
|
var path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
4683
4702
|
if ((typeof objToParse === "undefined" ? "undefined" : _type_of(objToParse)) !== "object" || objToParse === null) {
|
|
4684
4703
|
return {
|
|
@@ -4748,30 +4767,29 @@ var BeaconPlugin = function() {
|
|
|
4748
4767
|
child.value.parent = parent;
|
|
4749
4768
|
});
|
|
4750
4769
|
}
|
|
4751
|
-
var _this_hooks_onCreateASTNode_call;
|
|
4752
4770
|
return (_this_hooks_onCreateASTNode_call = this.hooks.onCreateASTNode.call(baseAst, obj)) !== null && _this_hooks_onCreateASTNode_call !== void 0 ? _this_hooks_onCreateASTNode_call : null;
|
|
4753
4771
|
}
|
|
4754
4772
|
}
|
|
4755
4773
|
]);
|
|
4756
4774
|
return Parser;
|
|
4757
4775
|
}();
|
|
4758
|
-
var withContext = function(model) {
|
|
4776
|
+
var withContext = function withContext(model) {
|
|
4759
4777
|
return {
|
|
4760
|
-
get: function(binding, options) {
|
|
4778
|
+
get: function get(binding, options) {
|
|
4761
4779
|
return model.get(binding, _object_spread({
|
|
4762
4780
|
context: {
|
|
4763
4781
|
model: model
|
|
4764
4782
|
}
|
|
4765
4783
|
}, options));
|
|
4766
4784
|
},
|
|
4767
|
-
set: function(transaction, options) {
|
|
4785
|
+
set: function set(transaction, options) {
|
|
4768
4786
|
return model.set(transaction, _object_spread({
|
|
4769
4787
|
context: {
|
|
4770
4788
|
model: model
|
|
4771
4789
|
}
|
|
4772
4790
|
}, options));
|
|
4773
4791
|
},
|
|
4774
|
-
delete: function(binding, options) {
|
|
4792
|
+
delete: function _delete(binding, options) {
|
|
4775
4793
|
return model.delete(binding, _object_spread({
|
|
4776
4794
|
context: {
|
|
4777
4795
|
model: model
|
|
@@ -4810,16 +4828,16 @@ var BeaconPlugin = function() {
|
|
|
4810
4828
|
{
|
|
4811
4829
|
key: "update",
|
|
4812
4830
|
value: function update(dataChanges, nodeChanges) {
|
|
4831
|
+
var _ref;
|
|
4813
4832
|
this.hooks.beforeUpdate.call(dataChanges);
|
|
4814
4833
|
var resolveCache = /* @__PURE__ */ new Map();
|
|
4815
4834
|
this.idCache.clear();
|
|
4816
4835
|
var prevASTMap = new Map(this.ASTMap);
|
|
4817
4836
|
this.ASTMap.clear();
|
|
4818
4837
|
var realNodeChanges = /* @__PURE__ */ new Set();
|
|
4819
|
-
var _nodeChanges_values;
|
|
4820
4838
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4821
4839
|
try {
|
|
4822
|
-
for(var _iterator = ((
|
|
4840
|
+
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){
|
|
4823
4841
|
var node = _step.value;
|
|
4824
4842
|
var current = node;
|
|
4825
4843
|
while(current){
|
|
@@ -4902,6 +4920,7 @@ var BeaconPlugin = function() {
|
|
|
4902
4920
|
key: "computeTree",
|
|
4903
4921
|
value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nodeChanges) {
|
|
4904
4922
|
var _this = this;
|
|
4923
|
+
var _this_hooks_beforeResolve_call;
|
|
4905
4924
|
var dependencyModel = new DependencyModel(options.data.model);
|
|
4906
4925
|
dependencyModel.trackSubset("core");
|
|
4907
4926
|
var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
|
|
@@ -4909,7 +4928,7 @@ var BeaconPlugin = function() {
|
|
|
4909
4928
|
data: _object_spread_props(_object_spread({}, options.data), {
|
|
4910
4929
|
model: depModelWithParser
|
|
4911
4930
|
}),
|
|
4912
|
-
evaluate: function(exp) {
|
|
4931
|
+
evaluate: function evaluate(exp) {
|
|
4913
4932
|
return _this.options.evaluator.evaluate(exp, {
|
|
4914
4933
|
model: depModelWithParser
|
|
4915
4934
|
});
|
|
@@ -4925,14 +4944,14 @@ var BeaconPlugin = function() {
|
|
|
4925
4944
|
var update2 = _object_spread_props(_object_spread({}, previousResult), {
|
|
4926
4945
|
updated: false
|
|
4927
4946
|
});
|
|
4928
|
-
var repopulateASTMapFromCache = function(resolvedNode, AST, ASTParent) {
|
|
4947
|
+
var repopulateASTMapFromCache = function repopulateASTMapFromCache1(resolvedNode, AST, ASTParent) {
|
|
4929
4948
|
var resolvedASTLocal = resolvedNode.node;
|
|
4930
4949
|
_this.ASTMap.set(resolvedASTLocal, AST);
|
|
4931
4950
|
var resolvedUpdate = _object_spread_props(_object_spread({}, resolvedNode), {
|
|
4932
4951
|
updated: false
|
|
4933
4952
|
});
|
|
4934
4953
|
cacheUpdate.set(AST, resolvedUpdate);
|
|
4935
|
-
var handleChildNode = function(childNode) {
|
|
4954
|
+
var handleChildNode = function handleChildNode(childNode) {
|
|
4936
4955
|
var _prevASTMap_get;
|
|
4937
4956
|
var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
|
|
4938
4957
|
var previousChildResult = _this.getPreviousResult(originalChildNode);
|
|
@@ -4957,7 +4976,6 @@ var BeaconPlugin = function() {
|
|
|
4957
4976
|
var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
|
|
4958
4977
|
parent: partiallyResolvedParent
|
|
4959
4978
|
});
|
|
4960
|
-
var _this_hooks_beforeResolve_call;
|
|
4961
4979
|
var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
|
|
4962
4980
|
type: "empty"
|
|
4963
4981
|
};
|
|
@@ -5017,7 +5035,7 @@ var BeaconPlugin = function() {
|
|
|
5017
5035
|
resolved = previousResult === null || previousResult === void 0 ? void 0 : previousResult.value;
|
|
5018
5036
|
}
|
|
5019
5037
|
resolved = this.hooks.afterResolve.call(resolved, resolvedAST, _object_spread_props(_object_spread({}, resolveOptions), {
|
|
5020
|
-
getDependencies: function(scope) {
|
|
5038
|
+
getDependencies: function getDependencies(scope) {
|
|
5021
5039
|
return dependencyModel.getDependencies(scope);
|
|
5022
5040
|
}
|
|
5023
5041
|
}));
|
|
@@ -5327,7 +5345,7 @@ var BeaconPlugin = function() {
|
|
|
5327
5345
|
]);
|
|
5328
5346
|
return TemplatePlugin;
|
|
5329
5347
|
}();
|
|
5330
|
-
var createPatternMatcher = function(start, end) {
|
|
5348
|
+
var createPatternMatcher = function createPatternMatcher(start, end) {
|
|
5331
5349
|
return function(testStr) {
|
|
5332
5350
|
var startLocation = testStr.indexOf(start);
|
|
5333
5351
|
if (startLocation === -1) {
|
|
@@ -5367,18 +5385,18 @@ var BeaconPlugin = function() {
|
|
|
5367
5385
|
});
|
|
5368
5386
|
return newNode;
|
|
5369
5387
|
}
|
|
5370
|
-
var findBasePath = function(node, resolver) {
|
|
5388
|
+
var findBasePath = function findBasePath1(node, resolver) {
|
|
5371
5389
|
var parentNode = node.parent;
|
|
5372
5390
|
if (!parentNode) {
|
|
5373
5391
|
return [];
|
|
5374
5392
|
}
|
|
5375
5393
|
if ("children" in parentNode) {
|
|
5394
|
+
var _ref;
|
|
5376
5395
|
var _parentNode_children_find, _parentNode_children;
|
|
5377
5396
|
var original = resolver.getSourceNode(node);
|
|
5378
|
-
|
|
5379
|
-
return (_parentNode_children_find_path = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5397
|
+
return (_ref = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5380
5398
|
return child.value === original;
|
|
5381
|
-
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null &&
|
|
5399
|
+
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null && _ref !== void 0 ? _ref : [];
|
|
5382
5400
|
}
|
|
5383
5401
|
if (parentNode.type !== "multi-node") {
|
|
5384
5402
|
return [];
|
|
@@ -5403,9 +5421,9 @@ var BeaconPlugin = function() {
|
|
|
5403
5421
|
var _node_parent, _node_parent_parent, _node_parent1, _node_parent_parent1, _node_parent2, _node_parent_parent_value;
|
|
5404
5422
|
var propsToSkip;
|
|
5405
5423
|
if (node.type === "asset" || node.type === "view") {
|
|
5424
|
+
var _ref;
|
|
5406
5425
|
var _node_plugins_stringResolver, _node_plugins, _node_value;
|
|
5407
|
-
|
|
5408
|
-
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 : [
|
|
5426
|
+
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 : [
|
|
5409
5427
|
"exp"
|
|
5410
5428
|
]);
|
|
5411
5429
|
if ((_node_value = node.value) === null || _node_value === void 0 ? void 0 : _node_value.id) {
|
|
@@ -5826,11 +5844,11 @@ var BeaconPlugin = function() {
|
|
|
5826
5844
|
this.stateStore.clear();
|
|
5827
5845
|
view.hooks.resolver.tap("asset-transform", function(resolver) {
|
|
5828
5846
|
var lastUpdatedNode;
|
|
5829
|
-
var updateState = function(node) {
|
|
5847
|
+
var updateState = function updateState(node) {
|
|
5830
5848
|
lastUpdatedNode = node;
|
|
5831
5849
|
view.update(/* @__PURE__ */ new Set());
|
|
5832
5850
|
};
|
|
5833
|
-
var getStore = function(node, stepKey) {
|
|
5851
|
+
var getStore = function getStore(node, stepKey) {
|
|
5834
5852
|
var store;
|
|
5835
5853
|
var countKey = stepKey === _this.resolveSymbol ? _this.resolveCountSymbol : _this.beforeResolveCountSymbol;
|
|
5836
5854
|
var storedState = _this.stateStore.get(node);
|
|
@@ -5844,10 +5862,10 @@ var BeaconPlugin = function() {
|
|
|
5844
5862
|
_this.stateStore.set(node, store);
|
|
5845
5863
|
}
|
|
5846
5864
|
return {
|
|
5847
|
-
useSharedState: function(key) {
|
|
5865
|
+
useSharedState: function useSharedState(key) {
|
|
5848
5866
|
return store.useSharedState(key);
|
|
5849
5867
|
},
|
|
5850
|
-
useLocalState: function(initialState) {
|
|
5868
|
+
useLocalState: function useLocalState(initialState) {
|
|
5851
5869
|
return store.getLocalStateFunction(stepKey, countKey)(initialState);
|
|
5852
5870
|
}
|
|
5853
5871
|
};
|
|
@@ -6209,7 +6227,7 @@ var BeaconPlugin = function() {
|
|
|
6209
6227
|
return options;
|
|
6210
6228
|
}
|
|
6211
6229
|
tracked.delete(node);
|
|
6212
|
-
var track = function(binding) {
|
|
6230
|
+
var track = function track(binding) {
|
|
6213
6231
|
var _this_options_callbacks_onAdd, _this_options_callbacks;
|
|
6214
6232
|
var parsed = isBinding(binding) ? binding : _this.options.parseBinding(binding);
|
|
6215
6233
|
if (tracked.has(node)) {
|
|
@@ -6235,7 +6253,7 @@ var BeaconPlugin = function() {
|
|
|
6235
6253
|
};
|
|
6236
6254
|
return _object_spread_props(_object_spread({}, options), {
|
|
6237
6255
|
validation: _object_spread_props(_object_spread({}, options.validation), {
|
|
6238
|
-
get: function(binding, getOptions) {
|
|
6256
|
+
get: function get(binding, getOptions) {
|
|
6239
6257
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6240
6258
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6241
6259
|
track(binding);
|
|
@@ -6247,14 +6265,14 @@ var BeaconPlugin = function() {
|
|
|
6247
6265
|
return firstFieldEOW;
|
|
6248
6266
|
},
|
|
6249
6267
|
getValidationsForBinding: function getValidationsForBinding(binding, getOptions) {
|
|
6268
|
+
var _ref;
|
|
6250
6269
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6251
6270
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6252
6271
|
track(binding);
|
|
6253
6272
|
}
|
|
6254
|
-
|
|
6255
|
-
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 : [];
|
|
6273
|
+
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 : [];
|
|
6256
6274
|
},
|
|
6257
|
-
getChildren: function(type) {
|
|
6275
|
+
getChildren: function getChildren(type) {
|
|
6258
6276
|
var _lastComputedBindingTree_get;
|
|
6259
6277
|
var validations = new Array();
|
|
6260
6278
|
(_lastComputedBindingTree_get = lastComputedBindingTree.get(node)) === null || _lastComputedBindingTree_get === void 0 ? void 0 : _lastComputedBindingTree_get.forEach(function(binding) {
|
|
@@ -6266,7 +6284,7 @@ var BeaconPlugin = function() {
|
|
|
6266
6284
|
});
|
|
6267
6285
|
return validations;
|
|
6268
6286
|
},
|
|
6269
|
-
getValidationsForSection: function() {
|
|
6287
|
+
getValidationsForSection: function getValidationsForSection() {
|
|
6270
6288
|
var _lastSectionBindingTree_get;
|
|
6271
6289
|
var validations = new Array();
|
|
6272
6290
|
(_lastSectionBindingTree_get = lastSectionBindingTree.get(node)) === null || _lastSectionBindingTree_get === void 0 ? void 0 : _lastSectionBindingTree_get.forEach(function(binding) {
|
|
@@ -6278,7 +6296,7 @@ var BeaconPlugin = function() {
|
|
|
6278
6296
|
});
|
|
6279
6297
|
return validations;
|
|
6280
6298
|
},
|
|
6281
|
-
register: function(registerOptions) {
|
|
6299
|
+
register: function register(registerOptions) {
|
|
6282
6300
|
if ((registerOptions === null || registerOptions === void 0 ? void 0 : registerOptions.type) === "section") {
|
|
6283
6301
|
if (!sections.has(node)) {
|
|
6284
6302
|
sections.set(node, /* @__PURE__ */ new Set());
|
|
@@ -6423,10 +6441,10 @@ var BeaconPlugin = function() {
|
|
|
6423
6441
|
value: function runApplicableValidations(runner, canDismiss, phase) {
|
|
6424
6442
|
var _this = this;
|
|
6425
6443
|
this.applicableValidations = this.applicableValidations.map(function(originalValue) {
|
|
6444
|
+
var _originalValue_value_blocking, _response_message, _obj_value_displayTarget;
|
|
6426
6445
|
if (originalValue.state === "dismissed") {
|
|
6427
6446
|
return originalValue;
|
|
6428
6447
|
}
|
|
6429
|
-
var _originalValue_value_blocking;
|
|
6430
6448
|
var blocking = (_originalValue_value_blocking = originalValue.value.blocking) !== null && _originalValue_value_blocking !== void 0 ? _originalValue_value_blocking : originalValue.value.severity === "warning" && "once" || true;
|
|
6431
6449
|
var obj = (0, import_timm9.setIn)(originalValue, [
|
|
6432
6450
|
"value",
|
|
@@ -6448,7 +6466,6 @@ var BeaconPlugin = function() {
|
|
|
6448
6466
|
}
|
|
6449
6467
|
}
|
|
6450
6468
|
var response = runner(obj.value);
|
|
6451
|
-
var _response_message, _obj_value_displayTarget;
|
|
6452
6469
|
var newState = {
|
|
6453
6470
|
type: obj.type,
|
|
6454
6471
|
value: obj.value,
|
|
@@ -6533,14 +6550,14 @@ var BeaconPlugin = function() {
|
|
|
6533
6550
|
var _this = this;
|
|
6534
6551
|
return [
|
|
6535
6552
|
{
|
|
6536
|
-
set: function(transaction, options, next) {
|
|
6537
|
-
var
|
|
6538
|
-
return (
|
|
6553
|
+
set: function set(transaction, options, next) {
|
|
6554
|
+
var _ref;
|
|
6555
|
+
return (_ref = next === null || next === void 0 ? void 0 : next.set(transaction, options)) !== null && _ref !== void 0 ? _ref : [];
|
|
6539
6556
|
},
|
|
6540
|
-
get: function(binding, options, next) {
|
|
6557
|
+
get: function get(binding, options, next) {
|
|
6541
6558
|
return next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
6542
6559
|
},
|
|
6543
|
-
delete: function(binding, options, next) {
|
|
6560
|
+
delete: function _delete(binding, options, next) {
|
|
6544
6561
|
_this.validations = removeBindingAndChildrenFromMap(_this.validations, binding);
|
|
6545
6562
|
return next === null || next === void 0 ? void 0 : next.delete(binding, options);
|
|
6546
6563
|
}
|
|
@@ -6603,11 +6620,11 @@ var BeaconPlugin = function() {
|
|
|
6603
6620
|
{
|
|
6604
6621
|
source: VIEW_VALIDATION_PROVIDER_NAME,
|
|
6605
6622
|
provider: {
|
|
6606
|
-
getValidationsForBinding: function(binding) {
|
|
6623
|
+
getValidationsForBinding: function getValidationsForBinding(binding) {
|
|
6607
6624
|
var _this_viewValidationProvider_getValidationsForBinding, _this_viewValidationProvider;
|
|
6608
6625
|
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);
|
|
6609
6626
|
},
|
|
6610
|
-
getValidationsForView: function() {
|
|
6627
|
+
getValidationsForView: function getValidationsForView() {
|
|
6611
6628
|
var _this_viewValidationProvider_getValidationsForView, _this_viewValidationProvider;
|
|
6612
6629
|
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);
|
|
6613
6630
|
}
|
|
@@ -6634,7 +6651,7 @@ var BeaconPlugin = function() {
|
|
|
6634
6651
|
}
|
|
6635
6652
|
var bindingTrackerPlugin = new ValidationBindingTrackerViewPlugin(_object_spread_props(_object_spread({}, this.options), {
|
|
6636
6653
|
callbacks: {
|
|
6637
|
-
onAdd: function(binding) {
|
|
6654
|
+
onAdd: function onAdd(binding) {
|
|
6638
6655
|
if (!_this.options || _this.getValidationForBinding(binding) !== void 0) {
|
|
6639
6656
|
return;
|
|
6640
6657
|
}
|
|
@@ -6678,11 +6695,11 @@ var BeaconPlugin = function() {
|
|
|
6678
6695
|
var _this_options;
|
|
6679
6696
|
var possibleValidations = this.getValidationProviders().reduce(function(vals, provider) {
|
|
6680
6697
|
var _vals;
|
|
6698
|
+
var _ref;
|
|
6681
6699
|
var _provider_provider_getValidationsForBinding, _provider_provider_getValidationsForBinding1, _provider_provider;
|
|
6682
|
-
|
|
6683
|
-
(_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) {
|
|
6700
|
+
(_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) {
|
|
6684
6701
|
return _object_spread_props(_object_spread({}, valObj), _define_property({}, VALIDATION_PROVIDER_NAME_SYMBOL, provider.source));
|
|
6685
|
-
})) !== null &&
|
|
6702
|
+
})) !== null && _ref !== void 0 ? _ref : []));
|
|
6686
6703
|
return vals;
|
|
6687
6704
|
}, []);
|
|
6688
6705
|
if (possibleValidations.length === 0) {
|
|
@@ -6723,10 +6740,10 @@ var BeaconPlugin = function() {
|
|
|
6723
6740
|
key: "validationRunner",
|
|
6724
6741
|
value: function validationRunner(validationObj, binding) {
|
|
6725
6742
|
var context = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.options;
|
|
6743
|
+
var _validationObj_handler;
|
|
6726
6744
|
if (!context) {
|
|
6727
6745
|
throw new Error("No context provided to validation runner");
|
|
6728
6746
|
}
|
|
6729
|
-
var _validationObj_handler;
|
|
6730
6747
|
var handler = (_validationObj_handler = validationObj.handler) !== null && _validationObj_handler !== void 0 ? _validationObj_handler : this.getValidator(validationObj.type);
|
|
6731
6748
|
var weakBindings = /* @__PURE__ */ new Set();
|
|
6732
6749
|
var model = {
|
|
@@ -6740,7 +6757,7 @@ var BeaconPlugin = function() {
|
|
|
6740
6757
|
delete: context.model.delete
|
|
6741
6758
|
};
|
|
6742
6759
|
var result = handler === null || handler === void 0 ? void 0 : handler(_object_spread_props(_object_spread({}, context), {
|
|
6743
|
-
evaluate: function(exp) {
|
|
6760
|
+
evaluate: function evaluate(exp) {
|
|
6744
6761
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
6745
6762
|
model: model
|
|
6746
6763
|
};
|
|
@@ -6778,7 +6795,7 @@ var BeaconPlugin = function() {
|
|
|
6778
6795
|
var _this = this;
|
|
6779
6796
|
var isNavigationTrigger = trigger === "navigation";
|
|
6780
6797
|
var lastActiveBindings = this.activeBindings;
|
|
6781
|
-
var updateValidations = function(dismissValidations) {
|
|
6798
|
+
var updateValidations = function updateValidations(dismissValidations) {
|
|
6782
6799
|
_this.getBindings().forEach(function(binding) {
|
|
6783
6800
|
var _this_validations_get;
|
|
6784
6801
|
(_this_validations_get = _this.validations.get(binding)) === null || _this_validations_get === void 0 ? void 0 : _this_validations_get.update(trigger, dismissValidations, function(obj) {
|
|
@@ -6823,9 +6840,9 @@ var BeaconPlugin = function() {
|
|
|
6823
6840
|
{
|
|
6824
6841
|
key: "getBindings",
|
|
6825
6842
|
value: function getBindings() {
|
|
6843
|
+
var _ref;
|
|
6826
6844
|
var _this_tracker;
|
|
6827
|
-
|
|
6828
|
-
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();
|
|
6845
|
+
return (_ref = (_this_tracker = this.tracker) === null || _this_tracker === void 0 ? void 0 : _this_tracker.getBindings()) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
6829
6846
|
}
|
|
6830
6847
|
},
|
|
6831
6848
|
{
|
|
@@ -6874,10 +6891,10 @@ var BeaconPlugin = function() {
|
|
|
6874
6891
|
value: function forView(parser) {
|
|
6875
6892
|
var _this = this;
|
|
6876
6893
|
return {
|
|
6877
|
-
_getValidationForBinding: function(binding) {
|
|
6894
|
+
_getValidationForBinding: function _getValidationForBinding(binding) {
|
|
6878
6895
|
return _this.getValidationForBinding(isBinding(binding) ? binding : parser(binding));
|
|
6879
6896
|
},
|
|
6880
|
-
getAll: function() {
|
|
6897
|
+
getAll: function getAll() {
|
|
6881
6898
|
var bindings = _this.getBindings();
|
|
6882
6899
|
if (bindings.size === 0) {
|
|
6883
6900
|
return void 0;
|
|
@@ -6904,13 +6921,13 @@ var BeaconPlugin = function() {
|
|
|
6904
6921
|
getValidationsForSection: function getValidationsForSection() {
|
|
6905
6922
|
throw new Error("Error rollup should be provided by the view plugin");
|
|
6906
6923
|
},
|
|
6907
|
-
track: function() {
|
|
6924
|
+
track: function track() {
|
|
6908
6925
|
throw new Error("Tracking should be provided by the view plugin");
|
|
6909
6926
|
},
|
|
6910
|
-
register: function() {
|
|
6927
|
+
register: function register() {
|
|
6911
6928
|
throw new Error("Section functionality should be provided by the view plugin");
|
|
6912
6929
|
},
|
|
6913
|
-
type: function(binding) {
|
|
6930
|
+
type: function type(binding) {
|
|
6914
6931
|
return _this.schema.getType(isBinding(binding) ? binding : parser(binding));
|
|
6915
6932
|
}
|
|
6916
6933
|
};
|
|
@@ -6919,9 +6936,9 @@ var BeaconPlugin = function() {
|
|
|
6919
6936
|
]);
|
|
6920
6937
|
return ValidationController;
|
|
6921
6938
|
}();
|
|
6922
|
-
var mergeSets = function(setA, setB) {
|
|
6923
|
-
var
|
|
6924
|
-
return /* @__PURE__ */ new Set(_to_consumable_array((
|
|
6939
|
+
var mergeSets = function mergeSets(setA, setB) {
|
|
6940
|
+
var _ref, _ref1;
|
|
6941
|
+
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 : [])));
|
|
6925
6942
|
};
|
|
6926
6943
|
var ViewController = /*#__PURE__*/ function() {
|
|
6927
6944
|
function ViewController(initialViews, options) {
|
|
@@ -6948,7 +6965,7 @@ var BeaconPlugin = function() {
|
|
|
6948
6965
|
}
|
|
6949
6966
|
});
|
|
6950
6967
|
});
|
|
6951
|
-
var update = function(updates) {
|
|
6968
|
+
var update = function update(updates) {
|
|
6952
6969
|
var silent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
6953
6970
|
if (_this1.currentView) {
|
|
6954
6971
|
if (_this1.optimizeUpdates) {
|
|
@@ -6959,10 +6976,10 @@ var BeaconPlugin = function() {
|
|
|
6959
6976
|
}
|
|
6960
6977
|
};
|
|
6961
6978
|
options.model.hooks.onUpdate.tap("viewController", function(updates, updateOptions) {
|
|
6962
|
-
var
|
|
6979
|
+
var _ref;
|
|
6963
6980
|
update(new Set(updates.map(function(t2) {
|
|
6964
6981
|
return t2.binding;
|
|
6965
|
-
})), (
|
|
6982
|
+
})), (_ref = updateOptions === null || updateOptions === void 0 ? void 0 : updateOptions.silent) !== null && _ref !== void 0 ? _ref : false);
|
|
6966
6983
|
});
|
|
6967
6984
|
options.model.hooks.onDelete.tap("viewController", function(binding) {
|
|
6968
6985
|
var parentBinding = binding.parent();
|
|
@@ -6997,8 +7014,8 @@ var BeaconPlugin = function() {
|
|
|
6997
7014
|
if (!this.pendingUpdate.scheduled && !silent) {
|
|
6998
7015
|
this.pendingUpdate.scheduled = true;
|
|
6999
7016
|
(0, import_queue_microtask2.default)(function() {
|
|
7000
|
-
var _this_currentView;
|
|
7001
7017
|
var _this_pendingUpdate;
|
|
7018
|
+
var _this_currentView;
|
|
7002
7019
|
var _ref = (_this_pendingUpdate = _this.pendingUpdate) !== null && _this_pendingUpdate !== void 0 ? _this_pendingUpdate : {}, changedBindings = _ref.changedBindings, changedNodes = _ref.changedNodes;
|
|
7003
7020
|
_this.pendingUpdate = void 0;
|
|
7004
7021
|
(_this_currentView = _this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.update(changedBindings, changedNodes);
|
|
@@ -7323,10 +7340,10 @@ var BeaconPlugin = function() {
|
|
|
7323
7340
|
{
|
|
7324
7341
|
key: "getConstants",
|
|
7325
7342
|
value: function getConstants(key, namespace, fallback) {
|
|
7343
|
+
var _ref, _ref1;
|
|
7326
7344
|
var _this_tempStore_get, _this_store_get;
|
|
7327
7345
|
var path = new BindingInstance(key);
|
|
7328
|
-
|
|
7329
|
-
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;
|
|
7346
|
+
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;
|
|
7330
7347
|
}
|
|
7331
7348
|
},
|
|
7332
7349
|
{
|
|
@@ -7367,7 +7384,7 @@ var BeaconPlugin = function() {
|
|
|
7367
7384
|
value: function apply(player) {
|
|
7368
7385
|
var _this = this;
|
|
7369
7386
|
var expressionEvaluator;
|
|
7370
|
-
var handleEval = function(exp) {
|
|
7387
|
+
var handleEval = function handleEval(exp) {
|
|
7371
7388
|
if (exp) {
|
|
7372
7389
|
if ((typeof exp === "undefined" ? "undefined" : _type_of(exp)) === "object" && "exp" in exp) {
|
|
7373
7390
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp.exp);
|
|
@@ -7388,7 +7405,7 @@ var BeaconPlugin = function() {
|
|
|
7388
7405
|
return handleEval(exp);
|
|
7389
7406
|
});
|
|
7390
7407
|
flow.hooks.resolveTransitionNode.intercept({
|
|
7391
|
-
call: function(nextState) {
|
|
7408
|
+
call: function call(nextState) {
|
|
7392
7409
|
if (nextState === null || nextState === void 0 ? void 0 : nextState.onStart) {
|
|
7393
7410
|
handleEval(nextState.onStart);
|
|
7394
7411
|
}
|
|
@@ -7401,13 +7418,13 @@ var BeaconPlugin = function() {
|
|
|
7401
7418
|
]);
|
|
7402
7419
|
return FlowExpPlugin;
|
|
7403
7420
|
}();
|
|
7404
|
-
var createFormatFunction = function(schema) {
|
|
7405
|
-
var handler = function(ctx, value, formatName) {
|
|
7421
|
+
var createFormatFunction = function createFormatFunction(schema) {
|
|
7422
|
+
var handler = function handler(ctx, value, formatName) {
|
|
7423
|
+
var _ref;
|
|
7406
7424
|
var _schema_getFormatterForType;
|
|
7407
|
-
|
|
7408
|
-
return (_schema_getFormatterForType_format = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7425
|
+
return (_ref = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7409
7426
|
type: formatName
|
|
7410
|
-
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null &&
|
|
7427
|
+
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null && _ref !== void 0 ? _ref : value;
|
|
7411
7428
|
};
|
|
7412
7429
|
return handler;
|
|
7413
7430
|
};
|
|
@@ -7459,8 +7476,8 @@ var BeaconPlugin = function() {
|
|
|
7459
7476
|
ref: Symbol("not-started"),
|
|
7460
7477
|
status: "not-started"
|
|
7461
7478
|
};
|
|
7462
|
-
var PLAYER_VERSION = true ? "0.15.3-next.
|
|
7463
|
-
var COMMIT = true ? "
|
|
7479
|
+
var PLAYER_VERSION = true ? "0.15.3-next.2" : "unknown";
|
|
7480
|
+
var COMMIT = true ? "21f4b09d55c325c5fe951d2fd08caaebb81db483" : "unknown";
|
|
7464
7481
|
var _Player = /*#__PURE__*/ function() {
|
|
7465
7482
|
function _Player2(config) {
|
|
7466
7483
|
var _this = this;
|
|
@@ -7575,13 +7592,13 @@ var BeaconPlugin = function() {
|
|
|
7575
7592
|
var expressionEvaluator;
|
|
7576
7593
|
var dataController;
|
|
7577
7594
|
var pathResolver = new BindingParser({
|
|
7578
|
-
get: function(binding) {
|
|
7595
|
+
get: function get(binding) {
|
|
7579
7596
|
return dataController.get(binding);
|
|
7580
7597
|
},
|
|
7581
|
-
set: function(transaction) {
|
|
7598
|
+
set: function set(transaction) {
|
|
7582
7599
|
return dataController.set(transaction);
|
|
7583
7600
|
},
|
|
7584
|
-
evaluate: function(expression) {
|
|
7601
|
+
evaluate: function evaluate(expression) {
|
|
7585
7602
|
return expressionEvaluator.evaluate(expression);
|
|
7586
7603
|
}
|
|
7587
7604
|
});
|
|
@@ -7725,23 +7742,23 @@ var BeaconPlugin = function() {
|
|
|
7725
7742
|
transition: flowController.transition,
|
|
7726
7743
|
model: dataController,
|
|
7727
7744
|
utils: {
|
|
7728
|
-
findPlugin: function(pluginSymbol) {
|
|
7745
|
+
findPlugin: function findPlugin(pluginSymbol) {
|
|
7729
7746
|
return _this.findPlugin(pluginSymbol);
|
|
7730
7747
|
}
|
|
7731
7748
|
},
|
|
7732
7749
|
logger: this.logger,
|
|
7733
7750
|
flowController: flowController,
|
|
7734
7751
|
schema: schema,
|
|
7735
|
-
format: function(binding, value) {
|
|
7752
|
+
format: function format(binding, value) {
|
|
7736
7753
|
var formatter = schema.getFormatter(binding);
|
|
7737
7754
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7738
7755
|
},
|
|
7739
|
-
formatValue: function(ref, value) {
|
|
7756
|
+
formatValue: function formatValue(ref, value) {
|
|
7740
7757
|
var formatter = schema.getFormatterForType(ref);
|
|
7741
7758
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7742
7759
|
},
|
|
7743
7760
|
validation: _object_spread_props(_object_spread({}, validationController.forView(parseBinding)), {
|
|
7744
|
-
type: function(b) {
|
|
7761
|
+
type: function type(b) {
|
|
7745
7762
|
return schema.getType(parseBinding(b));
|
|
7746
7763
|
}
|
|
7747
7764
|
}),
|
|
@@ -7753,7 +7770,7 @@ var BeaconPlugin = function() {
|
|
|
7753
7770
|
});
|
|
7754
7771
|
this.hooks.viewController.call(viewController);
|
|
7755
7772
|
return {
|
|
7756
|
-
start: function() {
|
|
7773
|
+
start: function start() {
|
|
7757
7774
|
flowController.start().then(function(endState) {
|
|
7758
7775
|
var flowResult = {
|
|
7759
7776
|
endState: resolveStrings(endState, false),
|
|
@@ -7790,13 +7807,13 @@ var BeaconPlugin = function() {
|
|
|
7790
7807
|
key: "start",
|
|
7791
7808
|
value: function start(payload) {
|
|
7792
7809
|
return _async_to_generator(function() {
|
|
7793
|
-
var _this,
|
|
7810
|
+
var _this, _ref, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
7794
7811
|
return _ts_generator(this, function(_state) {
|
|
7795
7812
|
switch(_state.label){
|
|
7796
7813
|
case 0:
|
|
7797
7814
|
_this = this;
|
|
7798
|
-
ref = Symbol((
|
|
7799
|
-
maybeUpdateState = function(newState) {
|
|
7815
|
+
ref = Symbol((_ref = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _ref !== void 0 ? _ref : "payload");
|
|
7816
|
+
maybeUpdateState = function maybeUpdateState(newState) {
|
|
7800
7817
|
if (_this.state.ref !== ref) {
|
|
7801
7818
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
7802
7819
|
return newState;
|
|
@@ -7929,13 +7946,12 @@ var BeaconPlugin = function() {
|
|
|
7929
7946
|
var beaconedView = false;
|
|
7930
7947
|
view.hooks.parser.tap(_this.name, function(parser) {
|
|
7931
7948
|
parser.hooks.onCreateASTNode.tap(_this.name, function(obj) {
|
|
7932
|
-
var
|
|
7949
|
+
var _ref, _obj_plugins;
|
|
7950
|
+
var _obj_plugins_stringResolver, _obj_plugins1;
|
|
7933
7951
|
if ((obj === null || obj === void 0 ? void 0 : obj.type) !== "asset" && (obj === null || obj === void 0 ? void 0 : obj.type) !== "view") return void 0;
|
|
7934
|
-
var
|
|
7935
|
-
var propertiesToSkip = (_obj_plugins_stringResolver_propertiesToSkip = (_obj_plugins = obj.plugins) === null || _obj_plugins === void 0 ? void 0 : (_obj_plugins_stringResolver = _obj_plugins.stringResolver) === null || _obj_plugins_stringResolver === void 0 ? void 0 : _obj_plugins_stringResolver.propertiesToSkip) !== null && _obj_plugins_stringResolver_propertiesToSkip !== void 0 ? _obj_plugins_stringResolver_propertiesToSkip : [];
|
|
7952
|
+
var propertiesToSkip = (_ref = (_obj_plugins1 = obj.plugins) === null || _obj_plugins1 === void 0 ? void 0 : (_obj_plugins_stringResolver = _obj_plugins1.stringResolver) === null || _obj_plugins_stringResolver === void 0 ? void 0 : _obj_plugins_stringResolver.propertiesToSkip) !== null && _ref !== void 0 ? _ref : [];
|
|
7936
7953
|
if (propertiesToSkip.includes("beacon")) return void 0;
|
|
7937
|
-
|
|
7938
|
-
obj.plugins = (0, import_timm10.setIn)((_obj_plugins1 = obj.plugins) !== null && _obj_plugins1 !== void 0 ? _obj_plugins1 : {}, [
|
|
7954
|
+
obj.plugins = (0, import_timm10.setIn)((_obj_plugins = obj.plugins) !== null && _obj_plugins !== void 0 ? _obj_plugins : {}, [
|
|
7939
7955
|
"stringResolver",
|
|
7940
7956
|
"propertiesToSkip"
|
|
7941
7957
|
], [
|
|
@@ -7982,12 +7998,12 @@ var BeaconPlugin = function() {
|
|
|
7982
7998
|
var _this_beaconContext = this.beaconContext, currentView = _this_beaconContext.view;
|
|
7983
7999
|
setTimeout(function() {
|
|
7984
8000
|
return _async_to_generator(function() {
|
|
7985
|
-
var _event_asset_metaData, _event_asset, _this_resolveDataRefs, _this, _this_player, unresolvedData,
|
|
8001
|
+
var _ref, _event_asset_metaData, _event_asset, _this_resolveDataRefs, _this, _this_player, unresolvedData, data, defaultBeacon, state, hookArgs, beacon, shouldCancel, _this_logger;
|
|
7986
8002
|
return _ts_generator(this, function(_state) {
|
|
7987
8003
|
switch(_state.label){
|
|
7988
8004
|
case 0:
|
|
7989
8005
|
unresolvedData = (event === null || event === void 0 ? void 0 : event.data) || ((_event_asset = event.asset) === null || _event_asset === void 0 ? void 0 : (_event_asset_metaData = _event_asset.metaData) === null || _event_asset_metaData === void 0 ? void 0 : _event_asset_metaData.beacon);
|
|
7990
|
-
data = (
|
|
8006
|
+
data = (_ref = (_this_resolveDataRefs = (_this = this).resolveDataRefs) === null || _this_resolveDataRefs === void 0 ? void 0 : _this_resolveDataRefs.call(_this, unresolvedData)) !== null && _ref !== void 0 ? _ref : unresolvedData;
|
|
7991
8007
|
defaultBeacon = {
|
|
7992
8008
|
action: action,
|
|
7993
8009
|
element: element,
|