@player-ui/metrics-plugin 0.15.3-next.0 → 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/MetricsPlugin.native.js +214 -200
- package/dist/MetricsPlugin.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 MetricsPlugin = 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 MetricsPlugin = 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 MetricsPlugin = 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 MetricsPlugin = 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 MetricsPlugin = 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 MetricsPlugin = 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 MetricsPlugin = 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 MetricsPlugin = 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 MetricsPlugin = 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 MetricsPlugin = 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 MetricsPlugin = 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,22 +2085,22 @@ var MetricsPlugin = function() {
|
|
|
2067
2085
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/metrics/core/src/index.ts
|
|
2068
2086
|
var src_exports = {};
|
|
2069
2087
|
__export(src_exports, {
|
|
2070
|
-
MetricsCorePlugin: function() {
|
|
2088
|
+
MetricsCorePlugin: function MetricsCorePlugin1() {
|
|
2071
2089
|
return MetricsCorePlugin;
|
|
2072
2090
|
},
|
|
2073
|
-
MetricsCorePluginSymbol: function() {
|
|
2091
|
+
MetricsCorePluginSymbol: function MetricsCorePluginSymbol1() {
|
|
2074
2092
|
return MetricsCorePluginSymbol;
|
|
2075
2093
|
},
|
|
2076
|
-
MetricsViewBeaconPlugin: function() {
|
|
2094
|
+
MetricsViewBeaconPlugin: function MetricsViewBeaconPlugin1() {
|
|
2077
2095
|
return MetricsViewBeaconPlugin;
|
|
2078
2096
|
},
|
|
2079
|
-
MetricsViewBeaconPluginContextSymbol: function() {
|
|
2097
|
+
MetricsViewBeaconPluginContextSymbol: function MetricsViewBeaconPluginContextSymbol1() {
|
|
2080
2098
|
return MetricsViewBeaconPluginContextSymbol;
|
|
2081
2099
|
},
|
|
2082
|
-
RequestTimeWebPlugin: function() {
|
|
2100
|
+
RequestTimeWebPlugin: function RequestTimeWebPlugin1() {
|
|
2083
2101
|
return RequestTimeWebPlugin;
|
|
2084
2102
|
},
|
|
2085
|
-
defaultGetTime: function() {
|
|
2103
|
+
defaultGetTime: function defaultGetTime1() {
|
|
2086
2104
|
return defaultGetTime;
|
|
2087
2105
|
}
|
|
2088
2106
|
});
|
|
@@ -2607,7 +2625,7 @@ var MetricsPlugin = function() {
|
|
|
2607
2625
|
}
|
|
2608
2626
|
return pairs;
|
|
2609
2627
|
}
|
|
2610
|
-
var createSortedArray = function() {
|
|
2628
|
+
var createSortedArray = function createSortedArray() {
|
|
2611
2629
|
return new import_sorted_array.default([], function(c) {
|
|
2612
2630
|
return c.matcher.count;
|
|
2613
2631
|
});
|
|
@@ -2703,38 +2721,38 @@ var MetricsPlugin = function() {
|
|
|
2703
2721
|
}();
|
|
2704
2722
|
// ../../../../../../../../../../../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
|
|
2705
2723
|
var __defProp2 = Object.defineProperty;
|
|
2706
|
-
var __export2 = function(target, all) {
|
|
2724
|
+
var __export2 = function __export2(target, all) {
|
|
2707
2725
|
for(var name in all)__defProp2(target, name, {
|
|
2708
2726
|
get: all[name],
|
|
2709
2727
|
enumerable: true
|
|
2710
2728
|
});
|
|
2711
2729
|
};
|
|
2712
|
-
var toValue = function(value) {
|
|
2730
|
+
var toValue = function toValue(value) {
|
|
2713
2731
|
return {
|
|
2714
2732
|
name: "Value",
|
|
2715
2733
|
value: value
|
|
2716
2734
|
};
|
|
2717
2735
|
};
|
|
2718
|
-
var toExpression = function(value) {
|
|
2736
|
+
var toExpression = function toExpression(value) {
|
|
2719
2737
|
return {
|
|
2720
2738
|
name: "Expression",
|
|
2721
2739
|
value: value
|
|
2722
2740
|
};
|
|
2723
2741
|
};
|
|
2724
|
-
var toPath = function(path) {
|
|
2742
|
+
var toPath = function toPath(path) {
|
|
2725
2743
|
return {
|
|
2726
2744
|
name: "PathNode",
|
|
2727
2745
|
path: path
|
|
2728
2746
|
};
|
|
2729
2747
|
};
|
|
2730
|
-
var toQuery = function(key, value) {
|
|
2748
|
+
var toQuery = function toQuery(key, value) {
|
|
2731
2749
|
return {
|
|
2732
2750
|
name: "Query",
|
|
2733
2751
|
key: key,
|
|
2734
2752
|
value: value
|
|
2735
2753
|
};
|
|
2736
2754
|
};
|
|
2737
|
-
var toConcatenatedNode = function(values) {
|
|
2755
|
+
var toConcatenatedNode = function toConcatenatedNode(values) {
|
|
2738
2756
|
if (values.length === 1) {
|
|
2739
2757
|
return values[0];
|
|
2740
2758
|
}
|
|
@@ -2752,7 +2770,7 @@ var MetricsPlugin = function() {
|
|
|
2752
2770
|
var SINGLE_QUOTE = "'";
|
|
2753
2771
|
var DOUBLE_QUOTE = '"';
|
|
2754
2772
|
var BACK_TICK = "`";
|
|
2755
|
-
var isIdentifierChar = function(char) {
|
|
2773
|
+
var isIdentifierChar = function isIdentifierChar(char) {
|
|
2756
2774
|
if (!char) {
|
|
2757
2775
|
return false;
|
|
2758
2776
|
}
|
|
@@ -2772,10 +2790,10 @@ var MetricsPlugin = function() {
|
|
|
2772
2790
|
charCode === 125;
|
|
2773
2791
|
return !matches;
|
|
2774
2792
|
};
|
|
2775
|
-
var parse = function(path) {
|
|
2793
|
+
var parse = function parse(path) {
|
|
2776
2794
|
var index = 1;
|
|
2777
2795
|
var ch = path.charAt(0);
|
|
2778
|
-
var next = function(expected) {
|
|
2796
|
+
var next = function next(expected) {
|
|
2779
2797
|
if (expected && ch !== expected) {
|
|
2780
2798
|
throw new Error("Expected char: ".concat(expected, " but got: ").concat(ch));
|
|
2781
2799
|
}
|
|
@@ -2783,12 +2801,12 @@ var MetricsPlugin = function() {
|
|
|
2783
2801
|
index += 1;
|
|
2784
2802
|
return ch;
|
|
2785
2803
|
};
|
|
2786
|
-
var whitespace = function() {
|
|
2804
|
+
var whitespace = function whitespace() {
|
|
2787
2805
|
while(ch === " "){
|
|
2788
2806
|
next();
|
|
2789
2807
|
}
|
|
2790
2808
|
};
|
|
2791
|
-
var identifier = function() {
|
|
2809
|
+
var identifier = function identifier() {
|
|
2792
2810
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2793
2811
|
if (!isIdentifierChar(ch)) {
|
|
2794
2812
|
return;
|
|
@@ -2814,7 +2832,7 @@ var MetricsPlugin = function() {
|
|
|
2814
2832
|
return toValue(value);
|
|
2815
2833
|
}
|
|
2816
2834
|
};
|
|
2817
|
-
var expression = function() {
|
|
2835
|
+
var expression = function expression() {
|
|
2818
2836
|
if (ch === BACK_TICK) {
|
|
2819
2837
|
next(BACK_TICK);
|
|
2820
2838
|
var exp = ch;
|
|
@@ -2830,7 +2848,7 @@ var MetricsPlugin = function() {
|
|
|
2830
2848
|
}
|
|
2831
2849
|
}
|
|
2832
2850
|
};
|
|
2833
|
-
var regex = function(match) {
|
|
2851
|
+
var regex = function regex(match) {
|
|
2834
2852
|
if (!(ch === null || ch === void 0 ? void 0 : ch.match(match))) {
|
|
2835
2853
|
return;
|
|
2836
2854
|
}
|
|
@@ -2845,7 +2863,7 @@ var MetricsPlugin = function() {
|
|
|
2845
2863
|
return toValue(value);
|
|
2846
2864
|
}
|
|
2847
2865
|
};
|
|
2848
|
-
var nestedPath = function() {
|
|
2866
|
+
var nestedPath = function nestedPath() {
|
|
2849
2867
|
if (ch === OPEN_CURL) {
|
|
2850
2868
|
next(OPEN_CURL);
|
|
2851
2869
|
next(OPEN_CURL);
|
|
@@ -2855,12 +2873,12 @@ var MetricsPlugin = function() {
|
|
|
2855
2873
|
return modelRef;
|
|
2856
2874
|
}
|
|
2857
2875
|
};
|
|
2858
|
-
var simpleSegment = function() {
|
|
2876
|
+
var simpleSegment = function simpleSegment() {
|
|
2859
2877
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2860
|
-
var
|
|
2878
|
+
var _ref, _nestedPath;
|
|
2861
2879
|
return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
|
|
2862
2880
|
};
|
|
2863
|
-
var segment = function() {
|
|
2881
|
+
var segment = function segment() {
|
|
2864
2882
|
var segments = [];
|
|
2865
2883
|
var nextSegment = simpleSegment();
|
|
2866
2884
|
while(nextSegment !== void 0){
|
|
@@ -2872,7 +2890,7 @@ var MetricsPlugin = function() {
|
|
|
2872
2890
|
}
|
|
2873
2891
|
return toConcatenatedNode(segments);
|
|
2874
2892
|
};
|
|
2875
|
-
var optionallyQuotedSegment = function() {
|
|
2893
|
+
var optionallyQuotedSegment = function optionallyQuotedSegment() {
|
|
2876
2894
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2877
2895
|
whitespace();
|
|
2878
2896
|
if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
|
|
@@ -2884,7 +2902,7 @@ var MetricsPlugin = function() {
|
|
|
2884
2902
|
}
|
|
2885
2903
|
return simpleSegment(allowBoolValue);
|
|
2886
2904
|
};
|
|
2887
|
-
var equals = function() {
|
|
2905
|
+
var equals = function equals() {
|
|
2888
2906
|
if (ch !== EQUALS) {
|
|
2889
2907
|
return false;
|
|
2890
2908
|
}
|
|
@@ -2893,7 +2911,7 @@ var MetricsPlugin = function() {
|
|
|
2893
2911
|
}
|
|
2894
2912
|
return true;
|
|
2895
2913
|
};
|
|
2896
|
-
var parseBracket = function() {
|
|
2914
|
+
var parseBracket = function parseBracket() {
|
|
2897
2915
|
if (ch === OPEN_BRACKET) {
|
|
2898
2916
|
next(OPEN_BRACKET);
|
|
2899
2917
|
whitespace();
|
|
@@ -2915,7 +2933,7 @@ var MetricsPlugin = function() {
|
|
|
2915
2933
|
return value;
|
|
2916
2934
|
}
|
|
2917
2935
|
};
|
|
2918
|
-
var parseSegmentAndBrackets = function() {
|
|
2936
|
+
var parseSegmentAndBrackets = function parseSegmentAndBrackets() {
|
|
2919
2937
|
var parsed = [];
|
|
2920
2938
|
var firstSegment = segment();
|
|
2921
2939
|
if (firstSegment) {
|
|
@@ -2932,7 +2950,7 @@ var MetricsPlugin = function() {
|
|
|
2932
2950
|
}
|
|
2933
2951
|
return parsed;
|
|
2934
2952
|
};
|
|
2935
|
-
var parsePath = function() {
|
|
2953
|
+
var parsePath = function parsePath() {
|
|
2936
2954
|
var parts = [];
|
|
2937
2955
|
var nextSegment = parseSegmentAndBrackets();
|
|
2938
2956
|
while(nextSegment !== void 0){
|
|
@@ -3043,6 +3061,7 @@ var MetricsPlugin = function() {
|
|
|
3043
3061
|
return _BindingInstance;
|
|
3044
3062
|
}();
|
|
3045
3063
|
function resolveBindingAST(bindingPathNode, options, hooks) {
|
|
3064
|
+
var _context_updates;
|
|
3046
3065
|
var context = {
|
|
3047
3066
|
updates: {},
|
|
3048
3067
|
path: []
|
|
@@ -3082,8 +3101,8 @@ var MetricsPlugin = function() {
|
|
|
3082
3101
|
}
|
|
3083
3102
|
}
|
|
3084
3103
|
function resolveNode(_node) {
|
|
3085
|
-
var
|
|
3086
|
-
var resolvedNode = (
|
|
3104
|
+
var _ref;
|
|
3105
|
+
var resolvedNode = (_ref = hooks === null || hooks === void 0 ? void 0 : hooks.beforeResolveNode.call(_node, _object_spread({}, context, options))) !== null && _ref !== void 0 ? _ref : _node;
|
|
3087
3106
|
switch(resolvedNode.name){
|
|
3088
3107
|
case "Expression":
|
|
3089
3108
|
case "PathNode":
|
|
@@ -3119,7 +3138,6 @@ var MetricsPlugin = function() {
|
|
|
3119
3138
|
}
|
|
3120
3139
|
}
|
|
3121
3140
|
bindingPathNode.path.forEach(resolveNode);
|
|
3122
|
-
var _context_updates;
|
|
3123
3141
|
return {
|
|
3124
3142
|
path: context.path,
|
|
3125
3143
|
updates: Object.keys((_context_updates = context.updates) !== null && _context_updates !== void 0 ? _context_updates : {}).length > 0 ? context.updates : void 0
|
|
@@ -3128,13 +3146,13 @@ var MetricsPlugin = function() {
|
|
|
3128
3146
|
var BINDING_BRACKETS_REGEX = /[\s()*=`{}'"[\]]/;
|
|
3129
3147
|
var LAZY_BINDING_REGEX = /^[^.]+(\..+)*$/;
|
|
3130
3148
|
var DEFAULT_OPTIONS = {
|
|
3131
|
-
get: function() {
|
|
3149
|
+
get: function get() {
|
|
3132
3150
|
throw new Error("Not Implemented");
|
|
3133
3151
|
},
|
|
3134
|
-
set: function() {
|
|
3152
|
+
set: function set() {
|
|
3135
3153
|
throw new Error("Not Implemented");
|
|
3136
3154
|
},
|
|
3137
|
-
evaluate: function() {
|
|
3155
|
+
evaluate: function evaluate() {
|
|
3138
3156
|
throw new Error("Not Implemented");
|
|
3139
3157
|
}
|
|
3140
3158
|
};
|
|
@@ -3157,18 +3175,18 @@ var MetricsPlugin = function() {
|
|
|
3157
3175
|
* representation of that path.
|
|
3158
3176
|
*/ key: "normalizePath",
|
|
3159
3177
|
value: function normalizePath(path, resolveOptions) {
|
|
3178
|
+
var _this_parseCache_path;
|
|
3160
3179
|
if (!BINDING_BRACKETS_REGEX.test(path) && LAZY_BINDING_REGEX.test(path) && this.hooks.skipOptimization.call(path) !== true) {
|
|
3161
3180
|
return {
|
|
3162
3181
|
path: path.split("."),
|
|
3163
3182
|
updates: void 0
|
|
3164
3183
|
};
|
|
3165
3184
|
}
|
|
3166
|
-
var _this_parseCache_path;
|
|
3167
3185
|
var ast = (_this_parseCache_path = this.parseCache[path]) !== null && _this_parseCache_path !== void 0 ? _this_parseCache_path : parse(path);
|
|
3168
3186
|
this.parseCache[path] = ast;
|
|
3169
3187
|
if ((typeof ast === "undefined" ? "undefined" : _type_of(ast)) !== "object" || !(ast === null || ast === void 0 ? void 0 : ast.status)) {
|
|
3170
|
-
var
|
|
3171
|
-
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((
|
|
3188
|
+
var _ref;
|
|
3189
|
+
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."));
|
|
3172
3190
|
}
|
|
3173
3191
|
try {
|
|
3174
3192
|
return resolveBindingAST(ast.path, resolveOptions, this.hooks);
|
|
@@ -3201,14 +3219,14 @@ var MetricsPlugin = function() {
|
|
|
3201
3219
|
var updates = {};
|
|
3202
3220
|
var joined = Array.isArray(rawBinding) ? rawBinding.join(".") : String(rawBinding);
|
|
3203
3221
|
var normalizeConfig = {
|
|
3204
|
-
getValue: function(path) {
|
|
3222
|
+
getValue: function getValue(path) {
|
|
3205
3223
|
var normalized2 = _this.normalizePath(path.join("."), normalizeConfig);
|
|
3206
3224
|
return options.get(_this.getBindingForNormalizedResult(normalized2));
|
|
3207
3225
|
},
|
|
3208
|
-
evaluate: function(exp) {
|
|
3226
|
+
evaluate: function evaluate(exp) {
|
|
3209
3227
|
return options.evaluate(exp);
|
|
3210
3228
|
},
|
|
3211
|
-
convertToPath: function(path) {
|
|
3229
|
+
convertToPath: function convertToPath(path) {
|
|
3212
3230
|
if (path === void 0) {
|
|
3213
3231
|
throw new Error("Attempted to convert undefined value to binding path");
|
|
3214
3232
|
}
|
|
@@ -3273,9 +3291,9 @@ var MetricsPlugin = function() {
|
|
|
3273
3291
|
/** Grab all of the bindings that this depended on */ key: "getDependencies",
|
|
3274
3292
|
value: function getDependencies(name) {
|
|
3275
3293
|
if (name !== void 0) {
|
|
3294
|
+
var _ref;
|
|
3276
3295
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3277
|
-
|
|
3278
|
-
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();
|
|
3296
|
+
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();
|
|
3279
3297
|
}
|
|
3280
3298
|
return this.readDeps;
|
|
3281
3299
|
}
|
|
@@ -3297,9 +3315,9 @@ var MetricsPlugin = function() {
|
|
|
3297
3315
|
/** Grab all of the bindings this wrote to */ key: "getModified",
|
|
3298
3316
|
value: function getModified(name) {
|
|
3299
3317
|
if (name !== void 0) {
|
|
3318
|
+
var _ref;
|
|
3300
3319
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3301
|
-
|
|
3302
|
-
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();
|
|
3320
|
+
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();
|
|
3303
3321
|
}
|
|
3304
3322
|
return this.writeDeps;
|
|
3305
3323
|
}
|
|
@@ -3621,19 +3639,19 @@ var MetricsPlugin = function() {
|
|
|
3621
3639
|
var thisStr = "this";
|
|
3622
3640
|
var evaluator_functions_exports = {};
|
|
3623
3641
|
__export2(evaluator_functions_exports, {
|
|
3624
|
-
conditional: function() {
|
|
3642
|
+
conditional: function conditional1() {
|
|
3625
3643
|
return conditional;
|
|
3626
3644
|
},
|
|
3627
|
-
deleteDataVal: function() {
|
|
3645
|
+
deleteDataVal: function deleteDataVal1() {
|
|
3628
3646
|
return deleteDataVal;
|
|
3629
3647
|
},
|
|
3630
|
-
getDataVal: function() {
|
|
3648
|
+
getDataVal: function getDataVal1() {
|
|
3631
3649
|
return getDataVal;
|
|
3632
3650
|
},
|
|
3633
|
-
setDataVal: function() {
|
|
3651
|
+
setDataVal: function setDataVal1() {
|
|
3634
3652
|
return setDataVal;
|
|
3635
3653
|
},
|
|
3636
|
-
waitFor: function() {
|
|
3654
|
+
waitFor: function waitFor1() {
|
|
3637
3655
|
return waitFor;
|
|
3638
3656
|
}
|
|
3639
3657
|
});
|
|
@@ -3645,7 +3663,7 @@ var MetricsPlugin = function() {
|
|
|
3645
3663
|
};
|
|
3646
3664
|
return promise;
|
|
3647
3665
|
}
|
|
3648
|
-
var setDataVal = function(_context, binding, value) {
|
|
3666
|
+
var setDataVal = function setDataVal(_context, binding, value) {
|
|
3649
3667
|
_context.model.set([
|
|
3650
3668
|
[
|
|
3651
3669
|
binding,
|
|
@@ -3653,13 +3671,13 @@ var MetricsPlugin = function() {
|
|
|
3653
3671
|
]
|
|
3654
3672
|
]);
|
|
3655
3673
|
};
|
|
3656
|
-
var getDataVal = function(_context, binding) {
|
|
3674
|
+
var getDataVal = function getDataVal(_context, binding) {
|
|
3657
3675
|
return _context.model.get(binding);
|
|
3658
3676
|
};
|
|
3659
|
-
var deleteDataVal = function(_context, binding) {
|
|
3677
|
+
var deleteDataVal = function deleteDataVal(_context, binding) {
|
|
3660
3678
|
return _context.model.delete(binding);
|
|
3661
3679
|
};
|
|
3662
|
-
var conditional = function(ctx, condition, ifTrue, ifFalse) {
|
|
3680
|
+
var conditional = function conditional(ctx, condition, ifTrue, ifFalse) {
|
|
3663
3681
|
var testResult = ctx.evaluate(condition);
|
|
3664
3682
|
if (isAwaitable(testResult)) {
|
|
3665
3683
|
return testResult.awaitableThen(function(resolvedTest) {
|
|
@@ -3681,14 +3699,14 @@ var MetricsPlugin = function() {
|
|
|
3681
3699
|
return null;
|
|
3682
3700
|
};
|
|
3683
3701
|
conditional.resolveParams = false;
|
|
3684
|
-
var waitFor = function(ctx, promise) {
|
|
3702
|
+
var waitFor = function waitFor(ctx, promise) {
|
|
3685
3703
|
return makeAwaitable(promise);
|
|
3686
3704
|
};
|
|
3687
|
-
var andandOperator = function(ctx, a, b, async) {
|
|
3705
|
+
var andandOperator = function andandOperator(ctx, a, b, async) {
|
|
3688
3706
|
return LogicalOperators.and(ctx, a, b, async);
|
|
3689
3707
|
};
|
|
3690
3708
|
andandOperator.resolveParams = false;
|
|
3691
|
-
var ororOperator = function(ctx, a, b, async) {
|
|
3709
|
+
var ororOperator = function ororOperator(ctx, a, b, async) {
|
|
3692
3710
|
return LogicalOperators.or(ctx, a, b, async);
|
|
3693
3711
|
};
|
|
3694
3712
|
ororOperator.resolveParams = false;
|
|
@@ -3814,7 +3832,7 @@ var MetricsPlugin = function() {
|
|
|
3814
3832
|
}
|
|
3815
3833
|
};
|
|
3816
3834
|
var LogicalOperators = {
|
|
3817
|
-
and: function(ctx, leftNode, rightNode, async) {
|
|
3835
|
+
and: function and(ctx, leftNode, rightNode, async) {
|
|
3818
3836
|
var leftResult = ctx.evaluate(leftNode);
|
|
3819
3837
|
if (async && isAwaitable(leftResult)) {
|
|
3820
3838
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3825,7 +3843,7 @@ var MetricsPlugin = function() {
|
|
|
3825
3843
|
}
|
|
3826
3844
|
return leftResult && ctx.evaluate(rightNode);
|
|
3827
3845
|
},
|
|
3828
|
-
or: function(ctx, leftNode, rightNode, async) {
|
|
3846
|
+
or: function or(ctx, leftNode, rightNode, async) {
|
|
3829
3847
|
var leftResult = ctx.evaluate(leftNode);
|
|
3830
3848
|
if (async && isAwaitable(leftResult)) {
|
|
3831
3849
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3863,10 +3881,10 @@ var MetricsPlugin = function() {
|
|
|
3863
3881
|
]))
|
|
3864
3882
|
};
|
|
3865
3883
|
this.defaultHookOptions = _object_spread_props(_object_spread({}, defaultOptions), {
|
|
3866
|
-
evaluate: function(expr) {
|
|
3884
|
+
evaluate: function evaluate(expr) {
|
|
3867
3885
|
return _this.evaluate(expr, _this.defaultHookOptions);
|
|
3868
3886
|
},
|
|
3869
|
-
resolveNode: function(node) {
|
|
3887
|
+
resolveNode: function resolveNode(node) {
|
|
3870
3888
|
return _this._execAST(node, _this.defaultHookOptions);
|
|
3871
3889
|
}
|
|
3872
3890
|
});
|
|
@@ -3886,12 +3904,12 @@ var MetricsPlugin = function() {
|
|
|
3886
3904
|
key: "evaluate",
|
|
3887
3905
|
value: function evaluate(expr, options) {
|
|
3888
3906
|
var _this = this;
|
|
3907
|
+
var _this_hooks_beforeEvaluate_call;
|
|
3889
3908
|
var resolvedOpts = this.hooks.resolveOptions.call(_object_spread_props(_object_spread({}, this.defaultHookOptions, options), {
|
|
3890
|
-
resolveNode: function(node) {
|
|
3909
|
+
resolveNode: function resolveNode(node) {
|
|
3891
3910
|
return _this._execAST(node, resolvedOpts);
|
|
3892
3911
|
}
|
|
3893
3912
|
}));
|
|
3894
|
-
var _this_hooks_beforeEvaluate_call;
|
|
3895
3913
|
var expression = (_this_hooks_beforeEvaluate_call = this.hooks.beforeEvaluate.call(expr, resolvedOpts)) !== null && _this_hooks_beforeEvaluate_call !== void 0 ? _this_hooks_beforeEvaluate_call : expr;
|
|
3896
3914
|
while(isObjectExpression(expression)){
|
|
3897
3915
|
expression = expression.value;
|
|
@@ -4015,11 +4033,11 @@ var MetricsPlugin = function() {
|
|
|
4015
4033
|
key: "_resolveNode",
|
|
4016
4034
|
value: function _resolveNode(_currentValue, node, options) {
|
|
4017
4035
|
var _this = this;
|
|
4018
|
-
var resolveNode = options.resolveNode, model = options.model;
|
|
4019
4036
|
var _options_async;
|
|
4037
|
+
var resolveNode = options.resolveNode, model = options.model;
|
|
4020
4038
|
var isAsync = (_options_async = options.async) !== null && _options_async !== void 0 ? _options_async : false;
|
|
4021
4039
|
var expressionContext = _object_spread_props(_object_spread({}, options), {
|
|
4022
|
-
evaluate: function(expr) {
|
|
4040
|
+
evaluate: function evaluate(expr) {
|
|
4023
4041
|
return _this.evaluate(expr, options);
|
|
4024
4042
|
}
|
|
4025
4043
|
});
|
|
@@ -4353,7 +4371,7 @@ var MetricsPlugin = function() {
|
|
|
4353
4371
|
]);
|
|
4354
4372
|
return ProxyLogger;
|
|
4355
4373
|
}();
|
|
4356
|
-
var identify = function(val) {
|
|
4374
|
+
var identify = function identify(val) {
|
|
4357
4375
|
return val;
|
|
4358
4376
|
};
|
|
4359
4377
|
var SchemaController = /*#__PURE__*/ function() {
|
|
@@ -4441,6 +4459,7 @@ var MetricsPlugin = function() {
|
|
|
4441
4459
|
{
|
|
4442
4460
|
key: "getApparentType",
|
|
4443
4461
|
value: function getApparentType(binding) {
|
|
4462
|
+
var _schemaType_validation, _baseType_validation;
|
|
4444
4463
|
var schemaType = this.getType(binding);
|
|
4445
4464
|
if (schemaType === void 0) {
|
|
4446
4465
|
return void 0;
|
|
@@ -4449,7 +4468,6 @@ var MetricsPlugin = function() {
|
|
|
4449
4468
|
if (baseType === void 0) {
|
|
4450
4469
|
return schemaType;
|
|
4451
4470
|
}
|
|
4452
|
-
var _schemaType_validation, _baseType_validation;
|
|
4453
4471
|
return _object_spread_props(_object_spread({}, baseType, schemaType), {
|
|
4454
4472
|
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 : []))
|
|
4455
4473
|
});
|
|
@@ -4598,10 +4616,10 @@ var MetricsPlugin = function() {
|
|
|
4598
4616
|
{
|
|
4599
4617
|
key: "get",
|
|
4600
4618
|
value: function get(binding, options, next) {
|
|
4619
|
+
var _ref;
|
|
4601
4620
|
var _this_shouldIncludeInvalid, _this;
|
|
4602
4621
|
var val = next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
4603
|
-
|
|
4604
|
-
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) {
|
|
4622
|
+
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) {
|
|
4605
4623
|
this.shadowModelPaths.forEach(function(shadowValue, shadowBinding) {
|
|
4606
4624
|
if (shadowBinding === binding) {
|
|
4607
4625
|
val = shadowValue;
|
|
@@ -4686,11 +4704,12 @@ var MetricsPlugin = function() {
|
|
|
4686
4704
|
templateDepth: 0
|
|
4687
4705
|
};
|
|
4688
4706
|
var _this = this;
|
|
4707
|
+
var _this_hooks_onCreateASTNode_call;
|
|
4689
4708
|
var parsedNode = this.hooks.parseNode.call(obj, type, options);
|
|
4690
4709
|
if (parsedNode || parsedNode === null) {
|
|
4691
4710
|
return parsedNode;
|
|
4692
4711
|
}
|
|
4693
|
-
var parseLocalObject = function(currentValue, objToParse) {
|
|
4712
|
+
var parseLocalObject = function parseLocalObject1(currentValue, objToParse) {
|
|
4694
4713
|
var path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
4695
4714
|
if ((typeof objToParse === "undefined" ? "undefined" : _type_of(objToParse)) !== "object" || objToParse === null) {
|
|
4696
4715
|
return {
|
|
@@ -4760,30 +4779,29 @@ var MetricsPlugin = function() {
|
|
|
4760
4779
|
child.value.parent = parent;
|
|
4761
4780
|
});
|
|
4762
4781
|
}
|
|
4763
|
-
var _this_hooks_onCreateASTNode_call;
|
|
4764
4782
|
return (_this_hooks_onCreateASTNode_call = this.hooks.onCreateASTNode.call(baseAst, obj)) !== null && _this_hooks_onCreateASTNode_call !== void 0 ? _this_hooks_onCreateASTNode_call : null;
|
|
4765
4783
|
}
|
|
4766
4784
|
}
|
|
4767
4785
|
]);
|
|
4768
4786
|
return Parser;
|
|
4769
4787
|
}();
|
|
4770
|
-
var withContext = function(model) {
|
|
4788
|
+
var withContext = function withContext(model) {
|
|
4771
4789
|
return {
|
|
4772
|
-
get: function(binding, options) {
|
|
4790
|
+
get: function get(binding, options) {
|
|
4773
4791
|
return model.get(binding, _object_spread({
|
|
4774
4792
|
context: {
|
|
4775
4793
|
model: model
|
|
4776
4794
|
}
|
|
4777
4795
|
}, options));
|
|
4778
4796
|
},
|
|
4779
|
-
set: function(transaction, options) {
|
|
4797
|
+
set: function set(transaction, options) {
|
|
4780
4798
|
return model.set(transaction, _object_spread({
|
|
4781
4799
|
context: {
|
|
4782
4800
|
model: model
|
|
4783
4801
|
}
|
|
4784
4802
|
}, options));
|
|
4785
4803
|
},
|
|
4786
|
-
delete: function(binding, options) {
|
|
4804
|
+
delete: function _delete(binding, options) {
|
|
4787
4805
|
return model.delete(binding, _object_spread({
|
|
4788
4806
|
context: {
|
|
4789
4807
|
model: model
|
|
@@ -4822,16 +4840,16 @@ var MetricsPlugin = function() {
|
|
|
4822
4840
|
{
|
|
4823
4841
|
key: "update",
|
|
4824
4842
|
value: function update(dataChanges, nodeChanges) {
|
|
4843
|
+
var _ref;
|
|
4825
4844
|
this.hooks.beforeUpdate.call(dataChanges);
|
|
4826
4845
|
var resolveCache = /* @__PURE__ */ new Map();
|
|
4827
4846
|
this.idCache.clear();
|
|
4828
4847
|
var prevASTMap = new Map(this.ASTMap);
|
|
4829
4848
|
this.ASTMap.clear();
|
|
4830
4849
|
var realNodeChanges = /* @__PURE__ */ new Set();
|
|
4831
|
-
var _nodeChanges_values;
|
|
4832
4850
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4833
4851
|
try {
|
|
4834
|
-
for(var _iterator = ((
|
|
4852
|
+
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){
|
|
4835
4853
|
var node = _step.value;
|
|
4836
4854
|
var current = node;
|
|
4837
4855
|
while(current){
|
|
@@ -4914,6 +4932,7 @@ var MetricsPlugin = function() {
|
|
|
4914
4932
|
key: "computeTree",
|
|
4915
4933
|
value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nodeChanges) {
|
|
4916
4934
|
var _this = this;
|
|
4935
|
+
var _this_hooks_beforeResolve_call;
|
|
4917
4936
|
var dependencyModel = new DependencyModel(options.data.model);
|
|
4918
4937
|
dependencyModel.trackSubset("core");
|
|
4919
4938
|
var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
|
|
@@ -4921,7 +4940,7 @@ var MetricsPlugin = function() {
|
|
|
4921
4940
|
data: _object_spread_props(_object_spread({}, options.data), {
|
|
4922
4941
|
model: depModelWithParser
|
|
4923
4942
|
}),
|
|
4924
|
-
evaluate: function(exp) {
|
|
4943
|
+
evaluate: function evaluate(exp) {
|
|
4925
4944
|
return _this.options.evaluator.evaluate(exp, {
|
|
4926
4945
|
model: depModelWithParser
|
|
4927
4946
|
});
|
|
@@ -4937,14 +4956,14 @@ var MetricsPlugin = function() {
|
|
|
4937
4956
|
var update2 = _object_spread_props(_object_spread({}, previousResult), {
|
|
4938
4957
|
updated: false
|
|
4939
4958
|
});
|
|
4940
|
-
var repopulateASTMapFromCache = function(resolvedNode, AST, ASTParent) {
|
|
4959
|
+
var repopulateASTMapFromCache = function repopulateASTMapFromCache1(resolvedNode, AST, ASTParent) {
|
|
4941
4960
|
var resolvedASTLocal = resolvedNode.node;
|
|
4942
4961
|
_this.ASTMap.set(resolvedASTLocal, AST);
|
|
4943
4962
|
var resolvedUpdate = _object_spread_props(_object_spread({}, resolvedNode), {
|
|
4944
4963
|
updated: false
|
|
4945
4964
|
});
|
|
4946
4965
|
cacheUpdate.set(AST, resolvedUpdate);
|
|
4947
|
-
var handleChildNode = function(childNode) {
|
|
4966
|
+
var handleChildNode = function handleChildNode(childNode) {
|
|
4948
4967
|
var _prevASTMap_get;
|
|
4949
4968
|
var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
|
|
4950
4969
|
var previousChildResult = _this.getPreviousResult(originalChildNode);
|
|
@@ -4969,7 +4988,6 @@ var MetricsPlugin = function() {
|
|
|
4969
4988
|
var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
|
|
4970
4989
|
parent: partiallyResolvedParent
|
|
4971
4990
|
});
|
|
4972
|
-
var _this_hooks_beforeResolve_call;
|
|
4973
4991
|
var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
|
|
4974
4992
|
type: "empty"
|
|
4975
4993
|
};
|
|
@@ -5029,7 +5047,7 @@ var MetricsPlugin = function() {
|
|
|
5029
5047
|
resolved = previousResult === null || previousResult === void 0 ? void 0 : previousResult.value;
|
|
5030
5048
|
}
|
|
5031
5049
|
resolved = this.hooks.afterResolve.call(resolved, resolvedAST, _object_spread_props(_object_spread({}, resolveOptions), {
|
|
5032
|
-
getDependencies: function(scope) {
|
|
5050
|
+
getDependencies: function getDependencies(scope) {
|
|
5033
5051
|
return dependencyModel.getDependencies(scope);
|
|
5034
5052
|
}
|
|
5035
5053
|
}));
|
|
@@ -5339,7 +5357,7 @@ var MetricsPlugin = function() {
|
|
|
5339
5357
|
]);
|
|
5340
5358
|
return TemplatePlugin;
|
|
5341
5359
|
}();
|
|
5342
|
-
var createPatternMatcher = function(start, end) {
|
|
5360
|
+
var createPatternMatcher = function createPatternMatcher(start, end) {
|
|
5343
5361
|
return function(testStr) {
|
|
5344
5362
|
var startLocation = testStr.indexOf(start);
|
|
5345
5363
|
if (startLocation === -1) {
|
|
@@ -5379,18 +5397,18 @@ var MetricsPlugin = function() {
|
|
|
5379
5397
|
});
|
|
5380
5398
|
return newNode;
|
|
5381
5399
|
}
|
|
5382
|
-
var findBasePath = function(node, resolver) {
|
|
5400
|
+
var findBasePath = function findBasePath1(node, resolver) {
|
|
5383
5401
|
var parentNode = node.parent;
|
|
5384
5402
|
if (!parentNode) {
|
|
5385
5403
|
return [];
|
|
5386
5404
|
}
|
|
5387
5405
|
if ("children" in parentNode) {
|
|
5406
|
+
var _ref;
|
|
5388
5407
|
var _parentNode_children_find, _parentNode_children;
|
|
5389
5408
|
var original = resolver.getSourceNode(node);
|
|
5390
|
-
|
|
5391
|
-
return (_parentNode_children_find_path = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5409
|
+
return (_ref = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5392
5410
|
return child.value === original;
|
|
5393
|
-
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null &&
|
|
5411
|
+
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null && _ref !== void 0 ? _ref : [];
|
|
5394
5412
|
}
|
|
5395
5413
|
if (parentNode.type !== "multi-node") {
|
|
5396
5414
|
return [];
|
|
@@ -5415,9 +5433,9 @@ var MetricsPlugin = function() {
|
|
|
5415
5433
|
var _node_parent, _node_parent_parent, _node_parent1, _node_parent_parent1, _node_parent2, _node_parent_parent_value;
|
|
5416
5434
|
var propsToSkip;
|
|
5417
5435
|
if (node.type === "asset" || node.type === "view") {
|
|
5436
|
+
var _ref;
|
|
5418
5437
|
var _node_plugins_stringResolver, _node_plugins, _node_value;
|
|
5419
|
-
|
|
5420
|
-
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 : [
|
|
5438
|
+
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 : [
|
|
5421
5439
|
"exp"
|
|
5422
5440
|
]);
|
|
5423
5441
|
if ((_node_value = node.value) === null || _node_value === void 0 ? void 0 : _node_value.id) {
|
|
@@ -5838,11 +5856,11 @@ var MetricsPlugin = function() {
|
|
|
5838
5856
|
this.stateStore.clear();
|
|
5839
5857
|
view.hooks.resolver.tap("asset-transform", function(resolver) {
|
|
5840
5858
|
var lastUpdatedNode;
|
|
5841
|
-
var updateState = function(node) {
|
|
5859
|
+
var updateState = function updateState(node) {
|
|
5842
5860
|
lastUpdatedNode = node;
|
|
5843
5861
|
view.update(/* @__PURE__ */ new Set());
|
|
5844
5862
|
};
|
|
5845
|
-
var getStore = function(node, stepKey) {
|
|
5863
|
+
var getStore = function getStore(node, stepKey) {
|
|
5846
5864
|
var store;
|
|
5847
5865
|
var countKey = stepKey === _this.resolveSymbol ? _this.resolveCountSymbol : _this.beforeResolveCountSymbol;
|
|
5848
5866
|
var storedState = _this.stateStore.get(node);
|
|
@@ -5856,10 +5874,10 @@ var MetricsPlugin = function() {
|
|
|
5856
5874
|
_this.stateStore.set(node, store);
|
|
5857
5875
|
}
|
|
5858
5876
|
return {
|
|
5859
|
-
useSharedState: function(key) {
|
|
5877
|
+
useSharedState: function useSharedState(key) {
|
|
5860
5878
|
return store.useSharedState(key);
|
|
5861
5879
|
},
|
|
5862
|
-
useLocalState: function(initialState) {
|
|
5880
|
+
useLocalState: function useLocalState(initialState) {
|
|
5863
5881
|
return store.getLocalStateFunction(stepKey, countKey)(initialState);
|
|
5864
5882
|
}
|
|
5865
5883
|
};
|
|
@@ -6221,7 +6239,7 @@ var MetricsPlugin = function() {
|
|
|
6221
6239
|
return options;
|
|
6222
6240
|
}
|
|
6223
6241
|
tracked.delete(node);
|
|
6224
|
-
var track = function(binding) {
|
|
6242
|
+
var track = function track(binding) {
|
|
6225
6243
|
var _this_options_callbacks_onAdd, _this_options_callbacks;
|
|
6226
6244
|
var parsed = isBinding(binding) ? binding : _this.options.parseBinding(binding);
|
|
6227
6245
|
if (tracked.has(node)) {
|
|
@@ -6247,7 +6265,7 @@ var MetricsPlugin = function() {
|
|
|
6247
6265
|
};
|
|
6248
6266
|
return _object_spread_props(_object_spread({}, options), {
|
|
6249
6267
|
validation: _object_spread_props(_object_spread({}, options.validation), {
|
|
6250
|
-
get: function(binding, getOptions) {
|
|
6268
|
+
get: function get(binding, getOptions) {
|
|
6251
6269
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6252
6270
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6253
6271
|
track(binding);
|
|
@@ -6259,14 +6277,14 @@ var MetricsPlugin = function() {
|
|
|
6259
6277
|
return firstFieldEOW;
|
|
6260
6278
|
},
|
|
6261
6279
|
getValidationsForBinding: function getValidationsForBinding(binding, getOptions) {
|
|
6280
|
+
var _ref;
|
|
6262
6281
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6263
6282
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6264
6283
|
track(binding);
|
|
6265
6284
|
}
|
|
6266
|
-
|
|
6267
|
-
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 : [];
|
|
6285
|
+
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 : [];
|
|
6268
6286
|
},
|
|
6269
|
-
getChildren: function(type) {
|
|
6287
|
+
getChildren: function getChildren(type) {
|
|
6270
6288
|
var _lastComputedBindingTree_get;
|
|
6271
6289
|
var validations = new Array();
|
|
6272
6290
|
(_lastComputedBindingTree_get = lastComputedBindingTree.get(node)) === null || _lastComputedBindingTree_get === void 0 ? void 0 : _lastComputedBindingTree_get.forEach(function(binding) {
|
|
@@ -6278,7 +6296,7 @@ var MetricsPlugin = function() {
|
|
|
6278
6296
|
});
|
|
6279
6297
|
return validations;
|
|
6280
6298
|
},
|
|
6281
|
-
getValidationsForSection: function() {
|
|
6299
|
+
getValidationsForSection: function getValidationsForSection() {
|
|
6282
6300
|
var _lastSectionBindingTree_get;
|
|
6283
6301
|
var validations = new Array();
|
|
6284
6302
|
(_lastSectionBindingTree_get = lastSectionBindingTree.get(node)) === null || _lastSectionBindingTree_get === void 0 ? void 0 : _lastSectionBindingTree_get.forEach(function(binding) {
|
|
@@ -6290,7 +6308,7 @@ var MetricsPlugin = function() {
|
|
|
6290
6308
|
});
|
|
6291
6309
|
return validations;
|
|
6292
6310
|
},
|
|
6293
|
-
register: function(registerOptions) {
|
|
6311
|
+
register: function register(registerOptions) {
|
|
6294
6312
|
if ((registerOptions === null || registerOptions === void 0 ? void 0 : registerOptions.type) === "section") {
|
|
6295
6313
|
if (!sections.has(node)) {
|
|
6296
6314
|
sections.set(node, /* @__PURE__ */ new Set());
|
|
@@ -6435,10 +6453,10 @@ var MetricsPlugin = function() {
|
|
|
6435
6453
|
value: function runApplicableValidations(runner, canDismiss, phase) {
|
|
6436
6454
|
var _this = this;
|
|
6437
6455
|
this.applicableValidations = this.applicableValidations.map(function(originalValue) {
|
|
6456
|
+
var _originalValue_value_blocking, _response_message, _obj_value_displayTarget;
|
|
6438
6457
|
if (originalValue.state === "dismissed") {
|
|
6439
6458
|
return originalValue;
|
|
6440
6459
|
}
|
|
6441
|
-
var _originalValue_value_blocking;
|
|
6442
6460
|
var blocking = (_originalValue_value_blocking = originalValue.value.blocking) !== null && _originalValue_value_blocking !== void 0 ? _originalValue_value_blocking : originalValue.value.severity === "warning" && "once" || true;
|
|
6443
6461
|
var obj = (0, import_timm9.setIn)(originalValue, [
|
|
6444
6462
|
"value",
|
|
@@ -6460,7 +6478,6 @@ var MetricsPlugin = function() {
|
|
|
6460
6478
|
}
|
|
6461
6479
|
}
|
|
6462
6480
|
var response = runner(obj.value);
|
|
6463
|
-
var _response_message, _obj_value_displayTarget;
|
|
6464
6481
|
var newState = {
|
|
6465
6482
|
type: obj.type,
|
|
6466
6483
|
value: obj.value,
|
|
@@ -6545,14 +6562,14 @@ var MetricsPlugin = function() {
|
|
|
6545
6562
|
var _this = this;
|
|
6546
6563
|
return [
|
|
6547
6564
|
{
|
|
6548
|
-
set: function(transaction, options, next) {
|
|
6549
|
-
var
|
|
6550
|
-
return (
|
|
6565
|
+
set: function set(transaction, options, next) {
|
|
6566
|
+
var _ref;
|
|
6567
|
+
return (_ref = next === null || next === void 0 ? void 0 : next.set(transaction, options)) !== null && _ref !== void 0 ? _ref : [];
|
|
6551
6568
|
},
|
|
6552
|
-
get: function(binding, options, next) {
|
|
6569
|
+
get: function get(binding, options, next) {
|
|
6553
6570
|
return next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
6554
6571
|
},
|
|
6555
|
-
delete: function(binding, options, next) {
|
|
6572
|
+
delete: function _delete(binding, options, next) {
|
|
6556
6573
|
_this.validations = removeBindingAndChildrenFromMap(_this.validations, binding);
|
|
6557
6574
|
return next === null || next === void 0 ? void 0 : next.delete(binding, options);
|
|
6558
6575
|
}
|
|
@@ -6615,11 +6632,11 @@ var MetricsPlugin = function() {
|
|
|
6615
6632
|
{
|
|
6616
6633
|
source: VIEW_VALIDATION_PROVIDER_NAME,
|
|
6617
6634
|
provider: {
|
|
6618
|
-
getValidationsForBinding: function(binding) {
|
|
6635
|
+
getValidationsForBinding: function getValidationsForBinding(binding) {
|
|
6619
6636
|
var _this_viewValidationProvider_getValidationsForBinding, _this_viewValidationProvider;
|
|
6620
6637
|
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);
|
|
6621
6638
|
},
|
|
6622
|
-
getValidationsForView: function() {
|
|
6639
|
+
getValidationsForView: function getValidationsForView() {
|
|
6623
6640
|
var _this_viewValidationProvider_getValidationsForView, _this_viewValidationProvider;
|
|
6624
6641
|
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);
|
|
6625
6642
|
}
|
|
@@ -6646,7 +6663,7 @@ var MetricsPlugin = function() {
|
|
|
6646
6663
|
}
|
|
6647
6664
|
var bindingTrackerPlugin = new ValidationBindingTrackerViewPlugin(_object_spread_props(_object_spread({}, this.options), {
|
|
6648
6665
|
callbacks: {
|
|
6649
|
-
onAdd: function(binding) {
|
|
6666
|
+
onAdd: function onAdd(binding) {
|
|
6650
6667
|
if (!_this.options || _this.getValidationForBinding(binding) !== void 0) {
|
|
6651
6668
|
return;
|
|
6652
6669
|
}
|
|
@@ -6690,11 +6707,11 @@ var MetricsPlugin = function() {
|
|
|
6690
6707
|
var _this_options;
|
|
6691
6708
|
var possibleValidations = this.getValidationProviders().reduce(function(vals, provider) {
|
|
6692
6709
|
var _vals;
|
|
6710
|
+
var _ref;
|
|
6693
6711
|
var _provider_provider_getValidationsForBinding, _provider_provider_getValidationsForBinding1, _provider_provider;
|
|
6694
|
-
|
|
6695
|
-
(_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) {
|
|
6712
|
+
(_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) {
|
|
6696
6713
|
return _object_spread_props(_object_spread({}, valObj), _define_property({}, VALIDATION_PROVIDER_NAME_SYMBOL, provider.source));
|
|
6697
|
-
})) !== null &&
|
|
6714
|
+
})) !== null && _ref !== void 0 ? _ref : []));
|
|
6698
6715
|
return vals;
|
|
6699
6716
|
}, []);
|
|
6700
6717
|
if (possibleValidations.length === 0) {
|
|
@@ -6735,10 +6752,10 @@ var MetricsPlugin = function() {
|
|
|
6735
6752
|
key: "validationRunner",
|
|
6736
6753
|
value: function validationRunner(validationObj, binding) {
|
|
6737
6754
|
var context = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.options;
|
|
6755
|
+
var _validationObj_handler;
|
|
6738
6756
|
if (!context) {
|
|
6739
6757
|
throw new Error("No context provided to validation runner");
|
|
6740
6758
|
}
|
|
6741
|
-
var _validationObj_handler;
|
|
6742
6759
|
var handler = (_validationObj_handler = validationObj.handler) !== null && _validationObj_handler !== void 0 ? _validationObj_handler : this.getValidator(validationObj.type);
|
|
6743
6760
|
var weakBindings = /* @__PURE__ */ new Set();
|
|
6744
6761
|
var model = {
|
|
@@ -6752,7 +6769,7 @@ var MetricsPlugin = function() {
|
|
|
6752
6769
|
delete: context.model.delete
|
|
6753
6770
|
};
|
|
6754
6771
|
var result = handler === null || handler === void 0 ? void 0 : handler(_object_spread_props(_object_spread({}, context), {
|
|
6755
|
-
evaluate: function(exp) {
|
|
6772
|
+
evaluate: function evaluate(exp) {
|
|
6756
6773
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
6757
6774
|
model: model
|
|
6758
6775
|
};
|
|
@@ -6790,7 +6807,7 @@ var MetricsPlugin = function() {
|
|
|
6790
6807
|
var _this = this;
|
|
6791
6808
|
var isNavigationTrigger = trigger === "navigation";
|
|
6792
6809
|
var lastActiveBindings = this.activeBindings;
|
|
6793
|
-
var updateValidations = function(dismissValidations) {
|
|
6810
|
+
var updateValidations = function updateValidations(dismissValidations) {
|
|
6794
6811
|
_this.getBindings().forEach(function(binding) {
|
|
6795
6812
|
var _this_validations_get;
|
|
6796
6813
|
(_this_validations_get = _this.validations.get(binding)) === null || _this_validations_get === void 0 ? void 0 : _this_validations_get.update(trigger, dismissValidations, function(obj) {
|
|
@@ -6835,9 +6852,9 @@ var MetricsPlugin = function() {
|
|
|
6835
6852
|
{
|
|
6836
6853
|
key: "getBindings",
|
|
6837
6854
|
value: function getBindings() {
|
|
6855
|
+
var _ref;
|
|
6838
6856
|
var _this_tracker;
|
|
6839
|
-
|
|
6840
|
-
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();
|
|
6857
|
+
return (_ref = (_this_tracker = this.tracker) === null || _this_tracker === void 0 ? void 0 : _this_tracker.getBindings()) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
6841
6858
|
}
|
|
6842
6859
|
},
|
|
6843
6860
|
{
|
|
@@ -6886,10 +6903,10 @@ var MetricsPlugin = function() {
|
|
|
6886
6903
|
value: function forView(parser) {
|
|
6887
6904
|
var _this = this;
|
|
6888
6905
|
return {
|
|
6889
|
-
_getValidationForBinding: function(binding) {
|
|
6906
|
+
_getValidationForBinding: function _getValidationForBinding(binding) {
|
|
6890
6907
|
return _this.getValidationForBinding(isBinding(binding) ? binding : parser(binding));
|
|
6891
6908
|
},
|
|
6892
|
-
getAll: function() {
|
|
6909
|
+
getAll: function getAll() {
|
|
6893
6910
|
var bindings = _this.getBindings();
|
|
6894
6911
|
if (bindings.size === 0) {
|
|
6895
6912
|
return void 0;
|
|
@@ -6916,13 +6933,13 @@ var MetricsPlugin = function() {
|
|
|
6916
6933
|
getValidationsForSection: function getValidationsForSection() {
|
|
6917
6934
|
throw new Error("Error rollup should be provided by the view plugin");
|
|
6918
6935
|
},
|
|
6919
|
-
track: function() {
|
|
6936
|
+
track: function track() {
|
|
6920
6937
|
throw new Error("Tracking should be provided by the view plugin");
|
|
6921
6938
|
},
|
|
6922
|
-
register: function() {
|
|
6939
|
+
register: function register() {
|
|
6923
6940
|
throw new Error("Section functionality should be provided by the view plugin");
|
|
6924
6941
|
},
|
|
6925
|
-
type: function(binding) {
|
|
6942
|
+
type: function type(binding) {
|
|
6926
6943
|
return _this.schema.getType(isBinding(binding) ? binding : parser(binding));
|
|
6927
6944
|
}
|
|
6928
6945
|
};
|
|
@@ -6931,9 +6948,9 @@ var MetricsPlugin = function() {
|
|
|
6931
6948
|
]);
|
|
6932
6949
|
return ValidationController;
|
|
6933
6950
|
}();
|
|
6934
|
-
var mergeSets = function(setA, setB) {
|
|
6935
|
-
var
|
|
6936
|
-
return /* @__PURE__ */ new Set(_to_consumable_array((
|
|
6951
|
+
var mergeSets = function mergeSets(setA, setB) {
|
|
6952
|
+
var _ref, _ref1;
|
|
6953
|
+
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 : [])));
|
|
6937
6954
|
};
|
|
6938
6955
|
var ViewController = /*#__PURE__*/ function() {
|
|
6939
6956
|
function ViewController(initialViews, options) {
|
|
@@ -6960,7 +6977,7 @@ var MetricsPlugin = function() {
|
|
|
6960
6977
|
}
|
|
6961
6978
|
});
|
|
6962
6979
|
});
|
|
6963
|
-
var update = function(updates) {
|
|
6980
|
+
var update = function update(updates) {
|
|
6964
6981
|
var silent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
6965
6982
|
if (_this1.currentView) {
|
|
6966
6983
|
if (_this1.optimizeUpdates) {
|
|
@@ -6971,10 +6988,10 @@ var MetricsPlugin = function() {
|
|
|
6971
6988
|
}
|
|
6972
6989
|
};
|
|
6973
6990
|
options.model.hooks.onUpdate.tap("viewController", function(updates, updateOptions) {
|
|
6974
|
-
var
|
|
6991
|
+
var _ref;
|
|
6975
6992
|
update(new Set(updates.map(function(t2) {
|
|
6976
6993
|
return t2.binding;
|
|
6977
|
-
})), (
|
|
6994
|
+
})), (_ref = updateOptions === null || updateOptions === void 0 ? void 0 : updateOptions.silent) !== null && _ref !== void 0 ? _ref : false);
|
|
6978
6995
|
});
|
|
6979
6996
|
options.model.hooks.onDelete.tap("viewController", function(binding) {
|
|
6980
6997
|
var parentBinding = binding.parent();
|
|
@@ -7009,8 +7026,8 @@ var MetricsPlugin = function() {
|
|
|
7009
7026
|
if (!this.pendingUpdate.scheduled && !silent) {
|
|
7010
7027
|
this.pendingUpdate.scheduled = true;
|
|
7011
7028
|
(0, import_queue_microtask2.default)(function() {
|
|
7012
|
-
var _this_currentView;
|
|
7013
7029
|
var _this_pendingUpdate;
|
|
7030
|
+
var _this_currentView;
|
|
7014
7031
|
var _ref = (_this_pendingUpdate = _this.pendingUpdate) !== null && _this_pendingUpdate !== void 0 ? _this_pendingUpdate : {}, changedBindings = _ref.changedBindings, changedNodes = _ref.changedNodes;
|
|
7015
7032
|
_this.pendingUpdate = void 0;
|
|
7016
7033
|
(_this_currentView = _this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.update(changedBindings, changedNodes);
|
|
@@ -7335,10 +7352,10 @@ var MetricsPlugin = function() {
|
|
|
7335
7352
|
{
|
|
7336
7353
|
key: "getConstants",
|
|
7337
7354
|
value: function getConstants(key, namespace, fallback) {
|
|
7355
|
+
var _ref, _ref1;
|
|
7338
7356
|
var _this_tempStore_get, _this_store_get;
|
|
7339
7357
|
var path = new BindingInstance(key);
|
|
7340
|
-
|
|
7341
|
-
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;
|
|
7358
|
+
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;
|
|
7342
7359
|
}
|
|
7343
7360
|
},
|
|
7344
7361
|
{
|
|
@@ -7379,7 +7396,7 @@ var MetricsPlugin = function() {
|
|
|
7379
7396
|
value: function apply(player) {
|
|
7380
7397
|
var _this = this;
|
|
7381
7398
|
var expressionEvaluator;
|
|
7382
|
-
var handleEval = function(exp) {
|
|
7399
|
+
var handleEval = function handleEval(exp) {
|
|
7383
7400
|
if (exp) {
|
|
7384
7401
|
if ((typeof exp === "undefined" ? "undefined" : _type_of(exp)) === "object" && "exp" in exp) {
|
|
7385
7402
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp.exp);
|
|
@@ -7400,7 +7417,7 @@ var MetricsPlugin = function() {
|
|
|
7400
7417
|
return handleEval(exp);
|
|
7401
7418
|
});
|
|
7402
7419
|
flow.hooks.resolveTransitionNode.intercept({
|
|
7403
|
-
call: function(nextState) {
|
|
7420
|
+
call: function call(nextState) {
|
|
7404
7421
|
if (nextState === null || nextState === void 0 ? void 0 : nextState.onStart) {
|
|
7405
7422
|
handleEval(nextState.onStart);
|
|
7406
7423
|
}
|
|
@@ -7413,13 +7430,13 @@ var MetricsPlugin = function() {
|
|
|
7413
7430
|
]);
|
|
7414
7431
|
return FlowExpPlugin;
|
|
7415
7432
|
}();
|
|
7416
|
-
var createFormatFunction = function(schema) {
|
|
7417
|
-
var handler = function(ctx, value, formatName) {
|
|
7433
|
+
var createFormatFunction = function createFormatFunction(schema) {
|
|
7434
|
+
var handler = function handler(ctx, value, formatName) {
|
|
7435
|
+
var _ref;
|
|
7418
7436
|
var _schema_getFormatterForType;
|
|
7419
|
-
|
|
7420
|
-
return (_schema_getFormatterForType_format = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7437
|
+
return (_ref = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7421
7438
|
type: formatName
|
|
7422
|
-
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null &&
|
|
7439
|
+
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null && _ref !== void 0 ? _ref : value;
|
|
7423
7440
|
};
|
|
7424
7441
|
return handler;
|
|
7425
7442
|
};
|
|
@@ -7471,8 +7488,8 @@ var MetricsPlugin = function() {
|
|
|
7471
7488
|
ref: Symbol("not-started"),
|
|
7472
7489
|
status: "not-started"
|
|
7473
7490
|
};
|
|
7474
|
-
var PLAYER_VERSION = true ? "0.15.3-next.
|
|
7475
|
-
var COMMIT = true ? "
|
|
7491
|
+
var PLAYER_VERSION = true ? "0.15.3-next.2" : "unknown";
|
|
7492
|
+
var COMMIT = true ? "21f4b09d55c325c5fe951d2fd08caaebb81db483" : "unknown";
|
|
7476
7493
|
var _Player = /*#__PURE__*/ function() {
|
|
7477
7494
|
function _Player2(config) {
|
|
7478
7495
|
var _this = this;
|
|
@@ -7587,13 +7604,13 @@ var MetricsPlugin = function() {
|
|
|
7587
7604
|
var expressionEvaluator;
|
|
7588
7605
|
var dataController;
|
|
7589
7606
|
var pathResolver = new BindingParser({
|
|
7590
|
-
get: function(binding) {
|
|
7607
|
+
get: function get(binding) {
|
|
7591
7608
|
return dataController.get(binding);
|
|
7592
7609
|
},
|
|
7593
|
-
set: function(transaction) {
|
|
7610
|
+
set: function set(transaction) {
|
|
7594
7611
|
return dataController.set(transaction);
|
|
7595
7612
|
},
|
|
7596
|
-
evaluate: function(expression) {
|
|
7613
|
+
evaluate: function evaluate(expression) {
|
|
7597
7614
|
return expressionEvaluator.evaluate(expression);
|
|
7598
7615
|
}
|
|
7599
7616
|
});
|
|
@@ -7737,23 +7754,23 @@ var MetricsPlugin = function() {
|
|
|
7737
7754
|
transition: flowController.transition,
|
|
7738
7755
|
model: dataController,
|
|
7739
7756
|
utils: {
|
|
7740
|
-
findPlugin: function(pluginSymbol) {
|
|
7757
|
+
findPlugin: function findPlugin(pluginSymbol) {
|
|
7741
7758
|
return _this.findPlugin(pluginSymbol);
|
|
7742
7759
|
}
|
|
7743
7760
|
},
|
|
7744
7761
|
logger: this.logger,
|
|
7745
7762
|
flowController: flowController,
|
|
7746
7763
|
schema: schema,
|
|
7747
|
-
format: function(binding, value) {
|
|
7764
|
+
format: function format(binding, value) {
|
|
7748
7765
|
var formatter = schema.getFormatter(binding);
|
|
7749
7766
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7750
7767
|
},
|
|
7751
|
-
formatValue: function(ref, value) {
|
|
7768
|
+
formatValue: function formatValue(ref, value) {
|
|
7752
7769
|
var formatter = schema.getFormatterForType(ref);
|
|
7753
7770
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7754
7771
|
},
|
|
7755
7772
|
validation: _object_spread_props(_object_spread({}, validationController.forView(parseBinding)), {
|
|
7756
|
-
type: function(b) {
|
|
7773
|
+
type: function type(b) {
|
|
7757
7774
|
return schema.getType(parseBinding(b));
|
|
7758
7775
|
}
|
|
7759
7776
|
}),
|
|
@@ -7765,7 +7782,7 @@ var MetricsPlugin = function() {
|
|
|
7765
7782
|
});
|
|
7766
7783
|
this.hooks.viewController.call(viewController);
|
|
7767
7784
|
return {
|
|
7768
|
-
start: function() {
|
|
7785
|
+
start: function start() {
|
|
7769
7786
|
flowController.start().then(function(endState) {
|
|
7770
7787
|
var flowResult = {
|
|
7771
7788
|
endState: resolveStrings(endState, false),
|
|
@@ -7802,13 +7819,13 @@ var MetricsPlugin = function() {
|
|
|
7802
7819
|
key: "start",
|
|
7803
7820
|
value: function start(payload) {
|
|
7804
7821
|
return _async_to_generator(function() {
|
|
7805
|
-
var _this,
|
|
7822
|
+
var _this, _ref, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
7806
7823
|
return _ts_generator(this, function(_state) {
|
|
7807
7824
|
switch(_state.label){
|
|
7808
7825
|
case 0:
|
|
7809
7826
|
_this = this;
|
|
7810
|
-
ref = Symbol((
|
|
7811
|
-
maybeUpdateState = function(newState) {
|
|
7827
|
+
ref = Symbol((_ref = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _ref !== void 0 ? _ref : "payload");
|
|
7828
|
+
maybeUpdateState = function maybeUpdateState(newState) {
|
|
7812
7829
|
if (_this.state.ref !== ref) {
|
|
7813
7830
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
7814
7831
|
return newState;
|
|
@@ -7939,13 +7956,12 @@ var MetricsPlugin = function() {
|
|
|
7939
7956
|
var beaconedView = false;
|
|
7940
7957
|
view.hooks.parser.tap(_this.name, function(parser) {
|
|
7941
7958
|
parser.hooks.onCreateASTNode.tap(_this.name, function(obj) {
|
|
7942
|
-
var
|
|
7959
|
+
var _ref, _obj_plugins;
|
|
7960
|
+
var _obj_plugins_stringResolver, _obj_plugins1;
|
|
7943
7961
|
if ((obj === null || obj === void 0 ? void 0 : obj.type) !== "asset" && (obj === null || obj === void 0 ? void 0 : obj.type) !== "view") return void 0;
|
|
7944
|
-
var
|
|
7945
|
-
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 : [];
|
|
7962
|
+
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 : [];
|
|
7946
7963
|
if (propertiesToSkip.includes("beacon")) return void 0;
|
|
7947
|
-
|
|
7948
|
-
obj.plugins = (0, import_timm10.setIn)((_obj_plugins1 = obj.plugins) !== null && _obj_plugins1 !== void 0 ? _obj_plugins1 : {}, [
|
|
7964
|
+
obj.plugins = (0, import_timm10.setIn)((_obj_plugins = obj.plugins) !== null && _obj_plugins !== void 0 ? _obj_plugins : {}, [
|
|
7949
7965
|
"stringResolver",
|
|
7950
7966
|
"propertiesToSkip"
|
|
7951
7967
|
], [
|
|
@@ -7992,12 +8008,12 @@ var MetricsPlugin = function() {
|
|
|
7992
8008
|
var _this_beaconContext = this.beaconContext, currentView = _this_beaconContext.view;
|
|
7993
8009
|
setTimeout(function() {
|
|
7994
8010
|
return _async_to_generator(function() {
|
|
7995
|
-
var _event_asset_metaData, _event_asset, _this_resolveDataRefs, _this, _this_player, unresolvedData,
|
|
8011
|
+
var _ref, _event_asset_metaData, _event_asset, _this_resolveDataRefs, _this, _this_player, unresolvedData, data, defaultBeacon, state, hookArgs, beacon, shouldCancel, _this_logger;
|
|
7996
8012
|
return _ts_generator(this, function(_state) {
|
|
7997
8013
|
switch(_state.label){
|
|
7998
8014
|
case 0:
|
|
7999
8015
|
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);
|
|
8000
|
-
data = (
|
|
8016
|
+
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;
|
|
8001
8017
|
defaultBeacon = {
|
|
8002
8018
|
action: action,
|
|
8003
8019
|
element: element,
|
|
@@ -8082,7 +8098,7 @@ var MetricsPlugin = function() {
|
|
|
8082
8098
|
var _this = this;
|
|
8083
8099
|
beaconPlugin.hooks.buildBeacon.intercept({
|
|
8084
8100
|
context: true,
|
|
8085
|
-
call: function(context, beacon) {
|
|
8101
|
+
call: function call(context, beacon) {
|
|
8086
8102
|
if (context && beacon.action === "viewed") {
|
|
8087
8103
|
context[_this.symbol] = _this.buildContext();
|
|
8088
8104
|
}
|
|
@@ -8175,6 +8191,7 @@ var MetricsPlugin = function() {
|
|
|
8175
8191
|
function MetricsCorePlugin(options) {
|
|
8176
8192
|
var _this = this;
|
|
8177
8193
|
_class_call_check(this, MetricsCorePlugin);
|
|
8194
|
+
var _ref, _ref1, _ref2;
|
|
8178
8195
|
this.name = "metrics";
|
|
8179
8196
|
this.symbol = MetricsCorePluginSymbol;
|
|
8180
8197
|
this.hooks = {
|
|
@@ -8191,13 +8208,10 @@ var MetricsPlugin = function() {
|
|
|
8191
8208
|
onUpdate: new SyncHook()
|
|
8192
8209
|
};
|
|
8193
8210
|
this.metrics = {};
|
|
8194
|
-
|
|
8195
|
-
this.
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
var _options_getTime;
|
|
8199
|
-
this.getTime = (_options_getTime = options === null || options === void 0 ? void 0 : options.getTime) !== null && _options_getTime !== void 0 ? _options_getTime : defaultGetTime;
|
|
8200
|
-
var callOnUpdate = function() {
|
|
8211
|
+
this.trackRender = (_ref = options === null || options === void 0 ? void 0 : options.trackRenderTime) !== null && _ref !== void 0 ? _ref : false;
|
|
8212
|
+
this.trackUpdate = (_ref1 = options === null || options === void 0 ? void 0 : options.trackUpdateTime) !== null && _ref1 !== void 0 ? _ref1 : false;
|
|
8213
|
+
this.getTime = (_ref2 = options === null || options === void 0 ? void 0 : options.getTime) !== null && _ref2 !== void 0 ? _ref2 : defaultGetTime;
|
|
8214
|
+
var callOnUpdate = function callOnUpdate() {
|
|
8201
8215
|
_this.hooks.onUpdate.call(_this.metrics);
|
|
8202
8216
|
};
|
|
8203
8217
|
this.hooks.onFlowBegin.tap(this.name, callOnUpdate);
|