@player-ui/common-types-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/CommonTypesPlugin.native.js +257 -240
- package/dist/CommonTypesPlugin.native.js.map +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/xlr/DataTypes.BooleanType.json +1 -1
- package/dist/xlr/DataTypes.CollectionType.json +1 -1
- package/dist/xlr/DataTypes.DateType.json +1 -1
- package/dist/xlr/DataTypes.IntegerNNType.json +1 -1
- package/dist/xlr/DataTypes.IntegerPosType.json +1 -1
- package/dist/xlr/DataTypes.IntegerType.json +1 -1
- package/dist/xlr/DataTypes.PhoneType.json +1 -1
- package/dist/xlr/DataTypes.StringType.json +1 -1
- package/dist/xlr/Formatters.commaNumber.json +1 -1
- package/dist/xlr/Formatters.currency.json +1 -1
- package/dist/xlr/Formatters.date.json +1 -1
- package/dist/xlr/Formatters.integer.json +1 -1
- package/dist/xlr/Formatters.phone.json +1 -1
- package/dist/xlr/Validators.collection.json +1 -1
- package/dist/xlr/Validators.email.json +1 -1
- package/dist/xlr/Validators.expression.json +1 -1
- package/dist/xlr/Validators.integer.json +1 -1
- package/dist/xlr/Validators.length.json +1 -1
- package/dist/xlr/Validators.max.json +1 -1
- package/dist/xlr/Validators.min.json +1 -1
- package/dist/xlr/Validators.oneOf.json +1 -1
- package/dist/xlr/Validators.phone.json +1 -1
- package/dist/xlr/Validators.readonly.json +1 -1
- package/dist/xlr/Validators.regex.json +1 -1
- package/dist/xlr/Validators.required.json +1 -1
- package/dist/xlr/Validators.string.json +1 -1
- package/dist/xlr/Validators.zip.json +1 -1
- package/package.json +3 -3
- package/src/index.ts +38 -41
|
@@ -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 CommonTypesPlugin = 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 CommonTypesPlugin = 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 CommonTypesPlugin = 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 CommonTypesPlugin = 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 CommonTypesPlugin = function() {
|
|
|
650
668
|
return ch0 === OCURL_CODE && ch1 === OCURL_CODE;
|
|
651
669
|
};
|
|
652
670
|
var parseExpression = function parseExpression(expr, options) {
|
|
653
|
-
var
|
|
654
|
-
var strictMode = (
|
|
671
|
+
var _ref;
|
|
672
|
+
var strictMode = (_ref = options === null || options === void 0 ? void 0 : options.strict) !== null && _ref !== void 0 ? _ref : true;
|
|
655
673
|
var charAtFunc = expr.charAt;
|
|
656
674
|
var charCodeAtFunc = expr.charCodeAt;
|
|
657
675
|
var length2 = expr.length;
|
|
658
676
|
var index = 0;
|
|
659
|
-
var getLocation = function(startChar) {
|
|
677
|
+
var getLocation = function getLocation(startChar) {
|
|
660
678
|
return {
|
|
661
679
|
start: {
|
|
662
680
|
character: startChar
|
|
@@ -1423,17 +1441,17 @@ var CommonTypesPlugin = 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
|
});
|
|
@@ -1509,27 +1527,27 @@ var CommonTypesPlugin = function() {
|
|
|
1509
1527
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
1510
1528
|
var __getProtoOf = Object.getPrototypeOf;
|
|
1511
1529
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1512
|
-
var __commonJS = function(cb, mod) {
|
|
1530
|
+
var __commonJS = function __commonJS(cb, mod) {
|
|
1513
1531
|
return function __require() {
|
|
1514
1532
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
|
|
1515
1533
|
exports: {}
|
|
1516
1534
|
}).exports, mod), mod.exports;
|
|
1517
1535
|
};
|
|
1518
1536
|
};
|
|
1519
|
-
var __export = function(target, all) {
|
|
1537
|
+
var __export = function __export(target, all) {
|
|
1520
1538
|
for(var name in all)__defProp(target, name, {
|
|
1521
1539
|
get: all[name],
|
|
1522
1540
|
enumerable: true
|
|
1523
1541
|
});
|
|
1524
1542
|
};
|
|
1525
|
-
var __copyProps = function(to, from, except, desc) {
|
|
1543
|
+
var __copyProps = function __copyProps(to, from, except, desc) {
|
|
1526
1544
|
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
1527
1545
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1528
1546
|
try {
|
|
1529
1547
|
var _loop = function() {
|
|
1530
1548
|
var key = _step.value;
|
|
1531
1549
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
1532
|
-
get: function() {
|
|
1550
|
+
get: function get() {
|
|
1533
1551
|
return from[key];
|
|
1534
1552
|
},
|
|
1535
1553
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -1553,7 +1571,7 @@ var CommonTypesPlugin = function() {
|
|
|
1553
1571
|
}
|
|
1554
1572
|
return to;
|
|
1555
1573
|
};
|
|
1556
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
1574
|
+
var __toESM = function __toESM(mod, isNodeMode, target) {
|
|
1557
1575
|
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
1558
1576
|
// file that has been converted to a CommonJS file using a Babel-
|
|
1559
1577
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -1563,7 +1581,7 @@ var CommonTypesPlugin = function() {
|
|
|
1563
1581
|
enumerable: true
|
|
1564
1582
|
}) : target, mod);
|
|
1565
1583
|
};
|
|
1566
|
-
var __toCommonJS = function(mod) {
|
|
1584
|
+
var __toCommonJS = function __toCommonJS(mod) {
|
|
1567
1585
|
return __copyProps(__defProp({}, "__esModule", {
|
|
1568
1586
|
value: true
|
|
1569
1587
|
}), mod);
|
|
@@ -1665,7 +1683,7 @@ var CommonTypesPlugin = function() {
|
|
|
1665
1683
|
function toError(err) {
|
|
1666
1684
|
try {
|
|
1667
1685
|
return _instanceof(err, Error) ? err : new Error("Value that is not an instance of Error was thrown: ".concat(err));
|
|
1668
|
-
} catch (
|
|
1686
|
+
} catch (unused) {
|
|
1669
1687
|
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.");
|
|
1670
1688
|
}
|
|
1671
1689
|
}
|
|
@@ -1966,7 +1984,7 @@ var CommonTypesPlugin = function() {
|
|
|
1966
1984
|
var require_p_defer = __commonJS({
|
|
1967
1985
|
"../../../../../../../../../../../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) {
|
|
1968
1986
|
"use strict";
|
|
1969
|
-
var pDefer = function() {
|
|
1987
|
+
var pDefer = function pDefer() {
|
|
1970
1988
|
var deferred2 = {};
|
|
1971
1989
|
deferred2.promise = new Promise(function(resolve, reject) {
|
|
1972
1990
|
deferred2.resolve = resolve;
|
|
@@ -2075,31 +2093,31 @@ var CommonTypesPlugin = function() {
|
|
|
2075
2093
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/common-types/core/src/index.ts
|
|
2076
2094
|
var src_exports = {};
|
|
2077
2095
|
__export(src_exports, {
|
|
2078
|
-
CommonTypesPlugin: function() {
|
|
2096
|
+
CommonTypesPlugin: function CommonTypesPlugin1() {
|
|
2079
2097
|
return CommonTypesPlugin;
|
|
2080
2098
|
},
|
|
2081
|
-
PLACEHOLDER: function() {
|
|
2099
|
+
PLACEHOLDER: function PLACEHOLDER1() {
|
|
2082
2100
|
return PLACEHOLDER;
|
|
2083
2101
|
},
|
|
2084
|
-
createMaskedNumericFormatter: function() {
|
|
2102
|
+
createMaskedNumericFormatter: function createMaskedNumericFormatter1() {
|
|
2085
2103
|
return createMaskedNumericFormatter;
|
|
2086
2104
|
},
|
|
2087
|
-
dataTypes: function() {
|
|
2105
|
+
dataTypes: function dataTypes() {
|
|
2088
2106
|
return types_exports;
|
|
2089
2107
|
},
|
|
2090
|
-
formatAsEnum: function() {
|
|
2108
|
+
formatAsEnum: function formatAsEnum1() {
|
|
2091
2109
|
return formatAsEnum;
|
|
2092
2110
|
},
|
|
2093
|
-
formatAsMasked: function() {
|
|
2111
|
+
formatAsMasked: function formatAsMasked1() {
|
|
2094
2112
|
return formatAsMasked;
|
|
2095
2113
|
},
|
|
2096
|
-
formats: function() {
|
|
2114
|
+
formats: function formats() {
|
|
2097
2115
|
return formats_exports;
|
|
2098
2116
|
},
|
|
2099
|
-
removeFormatCharactersFromMaskedString: function() {
|
|
2117
|
+
removeFormatCharactersFromMaskedString: function removeFormatCharactersFromMaskedString1() {
|
|
2100
2118
|
return removeFormatCharactersFromMaskedString;
|
|
2101
2119
|
},
|
|
2102
|
-
validators: function() {
|
|
2120
|
+
validators: function validators() {
|
|
2103
2121
|
return validators_exports;
|
|
2104
2122
|
}
|
|
2105
2123
|
});
|
|
@@ -2142,46 +2160,46 @@ var CommonTypesPlugin = function() {
|
|
|
2142
2160
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/common-types/core/src/validators/index.ts
|
|
2143
2161
|
var validators_exports = {};
|
|
2144
2162
|
__export(validators_exports, {
|
|
2145
|
-
collection: function() {
|
|
2163
|
+
collection: function collection1() {
|
|
2146
2164
|
return collection;
|
|
2147
2165
|
},
|
|
2148
|
-
email: function() {
|
|
2166
|
+
email: function email1() {
|
|
2149
2167
|
return email;
|
|
2150
2168
|
},
|
|
2151
|
-
expression: function() {
|
|
2169
|
+
expression: function expression1() {
|
|
2152
2170
|
return expression;
|
|
2153
2171
|
},
|
|
2154
|
-
integer: function() {
|
|
2172
|
+
integer: function integer1() {
|
|
2155
2173
|
return integer;
|
|
2156
2174
|
},
|
|
2157
|
-
length: function() {
|
|
2175
|
+
length: function length1() {
|
|
2158
2176
|
return length;
|
|
2159
2177
|
},
|
|
2160
|
-
max: function() {
|
|
2178
|
+
max: function max1() {
|
|
2161
2179
|
return max;
|
|
2162
2180
|
},
|
|
2163
|
-
min: function() {
|
|
2181
|
+
min: function min1() {
|
|
2164
2182
|
return min;
|
|
2165
2183
|
},
|
|
2166
|
-
oneOf: function() {
|
|
2184
|
+
oneOf: function oneOf1() {
|
|
2167
2185
|
return oneOf;
|
|
2168
2186
|
},
|
|
2169
|
-
phone: function() {
|
|
2187
|
+
phone: function phone1() {
|
|
2170
2188
|
return phone;
|
|
2171
2189
|
},
|
|
2172
|
-
readonly: function() {
|
|
2190
|
+
readonly: function readonly1() {
|
|
2173
2191
|
return readonly;
|
|
2174
2192
|
},
|
|
2175
|
-
regex: function() {
|
|
2193
|
+
regex: function regex1() {
|
|
2176
2194
|
return regex;
|
|
2177
2195
|
},
|
|
2178
|
-
required: function() {
|
|
2196
|
+
required: function required1() {
|
|
2179
2197
|
return required;
|
|
2180
2198
|
},
|
|
2181
|
-
string: function() {
|
|
2199
|
+
string: function string1() {
|
|
2182
2200
|
return string;
|
|
2183
2201
|
},
|
|
2184
|
-
zip: function() {
|
|
2202
|
+
zip: function zip1() {
|
|
2185
2203
|
return zip;
|
|
2186
2204
|
}
|
|
2187
2205
|
});
|
|
@@ -2627,7 +2645,7 @@ var CommonTypesPlugin = function() {
|
|
|
2627
2645
|
}
|
|
2628
2646
|
return pairs;
|
|
2629
2647
|
}
|
|
2630
|
-
var createSortedArray = function() {
|
|
2648
|
+
var createSortedArray = function createSortedArray() {
|
|
2631
2649
|
return new import_sorted_array.default([], function(c) {
|
|
2632
2650
|
return c.matcher.count;
|
|
2633
2651
|
});
|
|
@@ -2723,38 +2741,38 @@ var CommonTypesPlugin = function() {
|
|
|
2723
2741
|
}();
|
|
2724
2742
|
// ../../../../../../../../../../../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
|
|
2725
2743
|
var __defProp2 = Object.defineProperty;
|
|
2726
|
-
var __export2 = function(target, all) {
|
|
2744
|
+
var __export2 = function __export2(target, all) {
|
|
2727
2745
|
for(var name in all)__defProp2(target, name, {
|
|
2728
2746
|
get: all[name],
|
|
2729
2747
|
enumerable: true
|
|
2730
2748
|
});
|
|
2731
2749
|
};
|
|
2732
|
-
var toValue = function(value) {
|
|
2750
|
+
var toValue = function toValue(value) {
|
|
2733
2751
|
return {
|
|
2734
2752
|
name: "Value",
|
|
2735
2753
|
value: value
|
|
2736
2754
|
};
|
|
2737
2755
|
};
|
|
2738
|
-
var toExpression = function(value) {
|
|
2756
|
+
var toExpression = function toExpression(value) {
|
|
2739
2757
|
return {
|
|
2740
2758
|
name: "Expression",
|
|
2741
2759
|
value: value
|
|
2742
2760
|
};
|
|
2743
2761
|
};
|
|
2744
|
-
var toPath = function(path) {
|
|
2762
|
+
var toPath = function toPath(path) {
|
|
2745
2763
|
return {
|
|
2746
2764
|
name: "PathNode",
|
|
2747
2765
|
path: path
|
|
2748
2766
|
};
|
|
2749
2767
|
};
|
|
2750
|
-
var toQuery = function(key, value) {
|
|
2768
|
+
var toQuery = function toQuery(key, value) {
|
|
2751
2769
|
return {
|
|
2752
2770
|
name: "Query",
|
|
2753
2771
|
key: key,
|
|
2754
2772
|
value: value
|
|
2755
2773
|
};
|
|
2756
2774
|
};
|
|
2757
|
-
var toConcatenatedNode = function(values) {
|
|
2775
|
+
var toConcatenatedNode = function toConcatenatedNode(values) {
|
|
2758
2776
|
if (values.length === 1) {
|
|
2759
2777
|
return values[0];
|
|
2760
2778
|
}
|
|
@@ -2772,7 +2790,7 @@ var CommonTypesPlugin = function() {
|
|
|
2772
2790
|
var SINGLE_QUOTE = "'";
|
|
2773
2791
|
var DOUBLE_QUOTE = '"';
|
|
2774
2792
|
var BACK_TICK = "`";
|
|
2775
|
-
var isIdentifierChar = function(char) {
|
|
2793
|
+
var isIdentifierChar = function isIdentifierChar(char) {
|
|
2776
2794
|
if (!char) {
|
|
2777
2795
|
return false;
|
|
2778
2796
|
}
|
|
@@ -2792,10 +2810,10 @@ var CommonTypesPlugin = function() {
|
|
|
2792
2810
|
charCode === 125;
|
|
2793
2811
|
return !matches;
|
|
2794
2812
|
};
|
|
2795
|
-
var parse = function(path) {
|
|
2813
|
+
var parse = function parse(path) {
|
|
2796
2814
|
var index = 1;
|
|
2797
2815
|
var ch = path.charAt(0);
|
|
2798
|
-
var next = function(expected) {
|
|
2816
|
+
var next = function next(expected) {
|
|
2799
2817
|
if (expected && ch !== expected) {
|
|
2800
2818
|
throw new Error("Expected char: ".concat(expected, " but got: ").concat(ch));
|
|
2801
2819
|
}
|
|
@@ -2803,12 +2821,12 @@ var CommonTypesPlugin = function() {
|
|
|
2803
2821
|
index += 1;
|
|
2804
2822
|
return ch;
|
|
2805
2823
|
};
|
|
2806
|
-
var whitespace = function() {
|
|
2824
|
+
var whitespace = function whitespace() {
|
|
2807
2825
|
while(ch === " "){
|
|
2808
2826
|
next();
|
|
2809
2827
|
}
|
|
2810
2828
|
};
|
|
2811
|
-
var identifier = function() {
|
|
2829
|
+
var identifier = function identifier() {
|
|
2812
2830
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2813
2831
|
if (!isIdentifierChar(ch)) {
|
|
2814
2832
|
return;
|
|
@@ -2834,7 +2852,7 @@ var CommonTypesPlugin = function() {
|
|
|
2834
2852
|
return toValue(value);
|
|
2835
2853
|
}
|
|
2836
2854
|
};
|
|
2837
|
-
var expression2 = function() {
|
|
2855
|
+
var expression2 = function expression2() {
|
|
2838
2856
|
if (ch === BACK_TICK) {
|
|
2839
2857
|
next(BACK_TICK);
|
|
2840
2858
|
var exp = ch;
|
|
@@ -2850,7 +2868,7 @@ var CommonTypesPlugin = function() {
|
|
|
2850
2868
|
}
|
|
2851
2869
|
}
|
|
2852
2870
|
};
|
|
2853
|
-
var regex2 = function(match) {
|
|
2871
|
+
var regex2 = function regex2(match) {
|
|
2854
2872
|
if (!(ch === null || ch === void 0 ? void 0 : ch.match(match))) {
|
|
2855
2873
|
return;
|
|
2856
2874
|
}
|
|
@@ -2865,7 +2883,7 @@ var CommonTypesPlugin = function() {
|
|
|
2865
2883
|
return toValue(value);
|
|
2866
2884
|
}
|
|
2867
2885
|
};
|
|
2868
|
-
var nestedPath = function() {
|
|
2886
|
+
var nestedPath = function nestedPath() {
|
|
2869
2887
|
if (ch === OPEN_CURL) {
|
|
2870
2888
|
next(OPEN_CURL);
|
|
2871
2889
|
next(OPEN_CURL);
|
|
@@ -2875,12 +2893,12 @@ var CommonTypesPlugin = function() {
|
|
|
2875
2893
|
return modelRef;
|
|
2876
2894
|
}
|
|
2877
2895
|
};
|
|
2878
|
-
var simpleSegment = function() {
|
|
2896
|
+
var simpleSegment = function simpleSegment() {
|
|
2879
2897
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2880
|
-
var
|
|
2898
|
+
var _ref, _nestedPath;
|
|
2881
2899
|
return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression2()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
|
|
2882
2900
|
};
|
|
2883
|
-
var segment = function() {
|
|
2901
|
+
var segment = function segment() {
|
|
2884
2902
|
var segments = [];
|
|
2885
2903
|
var nextSegment = simpleSegment();
|
|
2886
2904
|
while(nextSegment !== void 0){
|
|
@@ -2892,7 +2910,7 @@ var CommonTypesPlugin = function() {
|
|
|
2892
2910
|
}
|
|
2893
2911
|
return toConcatenatedNode(segments);
|
|
2894
2912
|
};
|
|
2895
|
-
var optionallyQuotedSegment = function() {
|
|
2913
|
+
var optionallyQuotedSegment = function optionallyQuotedSegment() {
|
|
2896
2914
|
var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
2897
2915
|
whitespace();
|
|
2898
2916
|
if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
|
|
@@ -2904,7 +2922,7 @@ var CommonTypesPlugin = function() {
|
|
|
2904
2922
|
}
|
|
2905
2923
|
return simpleSegment(allowBoolValue);
|
|
2906
2924
|
};
|
|
2907
|
-
var equals = function() {
|
|
2925
|
+
var equals = function equals() {
|
|
2908
2926
|
if (ch !== EQUALS) {
|
|
2909
2927
|
return false;
|
|
2910
2928
|
}
|
|
@@ -2913,7 +2931,7 @@ var CommonTypesPlugin = function() {
|
|
|
2913
2931
|
}
|
|
2914
2932
|
return true;
|
|
2915
2933
|
};
|
|
2916
|
-
var parseBracket = function() {
|
|
2934
|
+
var parseBracket = function parseBracket() {
|
|
2917
2935
|
if (ch === OPEN_BRACKET) {
|
|
2918
2936
|
next(OPEN_BRACKET);
|
|
2919
2937
|
whitespace();
|
|
@@ -2935,7 +2953,7 @@ var CommonTypesPlugin = function() {
|
|
|
2935
2953
|
return value;
|
|
2936
2954
|
}
|
|
2937
2955
|
};
|
|
2938
|
-
var parseSegmentAndBrackets = function() {
|
|
2956
|
+
var parseSegmentAndBrackets = function parseSegmentAndBrackets() {
|
|
2939
2957
|
var parsed = [];
|
|
2940
2958
|
var firstSegment = segment();
|
|
2941
2959
|
if (firstSegment) {
|
|
@@ -2952,7 +2970,7 @@ var CommonTypesPlugin = function() {
|
|
|
2952
2970
|
}
|
|
2953
2971
|
return parsed;
|
|
2954
2972
|
};
|
|
2955
|
-
var parsePath = function() {
|
|
2973
|
+
var parsePath = function parsePath() {
|
|
2956
2974
|
var parts = [];
|
|
2957
2975
|
var nextSegment = parseSegmentAndBrackets();
|
|
2958
2976
|
while(nextSegment !== void 0){
|
|
@@ -3063,6 +3081,7 @@ var CommonTypesPlugin = function() {
|
|
|
3063
3081
|
return _BindingInstance;
|
|
3064
3082
|
}();
|
|
3065
3083
|
function resolveBindingAST(bindingPathNode, options, hooks) {
|
|
3084
|
+
var _context_updates;
|
|
3066
3085
|
var context = {
|
|
3067
3086
|
updates: {},
|
|
3068
3087
|
path: []
|
|
@@ -3102,8 +3121,8 @@ var CommonTypesPlugin = function() {
|
|
|
3102
3121
|
}
|
|
3103
3122
|
}
|
|
3104
3123
|
function resolveNode(_node) {
|
|
3105
|
-
var
|
|
3106
|
-
var resolvedNode = (
|
|
3124
|
+
var _ref;
|
|
3125
|
+
var resolvedNode = (_ref = hooks === null || hooks === void 0 ? void 0 : hooks.beforeResolveNode.call(_node, _object_spread({}, context, options))) !== null && _ref !== void 0 ? _ref : _node;
|
|
3107
3126
|
switch(resolvedNode.name){
|
|
3108
3127
|
case "Expression":
|
|
3109
3128
|
case "PathNode":
|
|
@@ -3139,7 +3158,6 @@ var CommonTypesPlugin = function() {
|
|
|
3139
3158
|
}
|
|
3140
3159
|
}
|
|
3141
3160
|
bindingPathNode.path.forEach(resolveNode);
|
|
3142
|
-
var _context_updates;
|
|
3143
3161
|
return {
|
|
3144
3162
|
path: context.path,
|
|
3145
3163
|
updates: Object.keys((_context_updates = context.updates) !== null && _context_updates !== void 0 ? _context_updates : {}).length > 0 ? context.updates : void 0
|
|
@@ -3148,13 +3166,13 @@ var CommonTypesPlugin = function() {
|
|
|
3148
3166
|
var BINDING_BRACKETS_REGEX = /[\s()*=`{}'"[\]]/;
|
|
3149
3167
|
var LAZY_BINDING_REGEX = /^[^.]+(\..+)*$/;
|
|
3150
3168
|
var DEFAULT_OPTIONS = {
|
|
3151
|
-
get: function() {
|
|
3169
|
+
get: function get() {
|
|
3152
3170
|
throw new Error("Not Implemented");
|
|
3153
3171
|
},
|
|
3154
|
-
set: function() {
|
|
3172
|
+
set: function set() {
|
|
3155
3173
|
throw new Error("Not Implemented");
|
|
3156
3174
|
},
|
|
3157
|
-
evaluate: function() {
|
|
3175
|
+
evaluate: function evaluate() {
|
|
3158
3176
|
throw new Error("Not Implemented");
|
|
3159
3177
|
}
|
|
3160
3178
|
};
|
|
@@ -3177,18 +3195,18 @@ var CommonTypesPlugin = function() {
|
|
|
3177
3195
|
* representation of that path.
|
|
3178
3196
|
*/ key: "normalizePath",
|
|
3179
3197
|
value: function normalizePath(path, resolveOptions) {
|
|
3198
|
+
var _this_parseCache_path;
|
|
3180
3199
|
if (!BINDING_BRACKETS_REGEX.test(path) && LAZY_BINDING_REGEX.test(path) && this.hooks.skipOptimization.call(path) !== true) {
|
|
3181
3200
|
return {
|
|
3182
3201
|
path: path.split("."),
|
|
3183
3202
|
updates: void 0
|
|
3184
3203
|
};
|
|
3185
3204
|
}
|
|
3186
|
-
var _this_parseCache_path;
|
|
3187
3205
|
var ast = (_this_parseCache_path = this.parseCache[path]) !== null && _this_parseCache_path !== void 0 ? _this_parseCache_path : parse(path);
|
|
3188
3206
|
this.parseCache[path] = ast;
|
|
3189
3207
|
if ((typeof ast === "undefined" ? "undefined" : _type_of(ast)) !== "object" || !(ast === null || ast === void 0 ? void 0 : ast.status)) {
|
|
3190
|
-
var
|
|
3191
|
-
throw new TypeError('Cannot normalize path "'.concat(path, '": ').concat((
|
|
3208
|
+
var _ref;
|
|
3209
|
+
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."));
|
|
3192
3210
|
}
|
|
3193
3211
|
try {
|
|
3194
3212
|
return resolveBindingAST(ast.path, resolveOptions, this.hooks);
|
|
@@ -3221,14 +3239,14 @@ var CommonTypesPlugin = function() {
|
|
|
3221
3239
|
var updates = {};
|
|
3222
3240
|
var joined = Array.isArray(rawBinding) ? rawBinding.join(".") : String(rawBinding);
|
|
3223
3241
|
var normalizeConfig = {
|
|
3224
|
-
getValue: function(path) {
|
|
3242
|
+
getValue: function getValue(path) {
|
|
3225
3243
|
var normalized2 = _this.normalizePath(path.join("."), normalizeConfig);
|
|
3226
3244
|
return options.get(_this.getBindingForNormalizedResult(normalized2));
|
|
3227
3245
|
},
|
|
3228
|
-
evaluate: function(exp) {
|
|
3246
|
+
evaluate: function evaluate(exp) {
|
|
3229
3247
|
return options.evaluate(exp);
|
|
3230
3248
|
},
|
|
3231
|
-
convertToPath: function(path) {
|
|
3249
|
+
convertToPath: function convertToPath(path) {
|
|
3232
3250
|
if (path === void 0) {
|
|
3233
3251
|
throw new Error("Attempted to convert undefined value to binding path");
|
|
3234
3252
|
}
|
|
@@ -3293,9 +3311,9 @@ var CommonTypesPlugin = function() {
|
|
|
3293
3311
|
/** Grab all of the bindings that this depended on */ key: "getDependencies",
|
|
3294
3312
|
value: function getDependencies(name) {
|
|
3295
3313
|
if (name !== void 0) {
|
|
3314
|
+
var _ref;
|
|
3296
3315
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3297
|
-
|
|
3298
|
-
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();
|
|
3316
|
+
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();
|
|
3299
3317
|
}
|
|
3300
3318
|
return this.readDeps;
|
|
3301
3319
|
}
|
|
@@ -3317,9 +3335,9 @@ var CommonTypesPlugin = function() {
|
|
|
3317
3335
|
/** Grab all of the bindings this wrote to */ key: "getModified",
|
|
3318
3336
|
value: function getModified(name) {
|
|
3319
3337
|
if (name !== void 0) {
|
|
3338
|
+
var _ref;
|
|
3320
3339
|
var _this_namedDependencySets_name, _this_namedDependencySets;
|
|
3321
|
-
|
|
3322
|
-
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();
|
|
3340
|
+
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();
|
|
3323
3341
|
}
|
|
3324
3342
|
return this.writeDeps;
|
|
3325
3343
|
}
|
|
@@ -3641,19 +3659,19 @@ var CommonTypesPlugin = function() {
|
|
|
3641
3659
|
var thisStr = "this";
|
|
3642
3660
|
var evaluator_functions_exports = {};
|
|
3643
3661
|
__export2(evaluator_functions_exports, {
|
|
3644
|
-
conditional: function() {
|
|
3662
|
+
conditional: function conditional1() {
|
|
3645
3663
|
return conditional;
|
|
3646
3664
|
},
|
|
3647
|
-
deleteDataVal: function() {
|
|
3665
|
+
deleteDataVal: function deleteDataVal1() {
|
|
3648
3666
|
return deleteDataVal;
|
|
3649
3667
|
},
|
|
3650
|
-
getDataVal: function() {
|
|
3668
|
+
getDataVal: function getDataVal1() {
|
|
3651
3669
|
return getDataVal;
|
|
3652
3670
|
},
|
|
3653
|
-
setDataVal: function() {
|
|
3671
|
+
setDataVal: function setDataVal1() {
|
|
3654
3672
|
return setDataVal;
|
|
3655
3673
|
},
|
|
3656
|
-
waitFor: function() {
|
|
3674
|
+
waitFor: function waitFor1() {
|
|
3657
3675
|
return waitFor;
|
|
3658
3676
|
}
|
|
3659
3677
|
});
|
|
@@ -3665,7 +3683,7 @@ var CommonTypesPlugin = function() {
|
|
|
3665
3683
|
};
|
|
3666
3684
|
return promise;
|
|
3667
3685
|
}
|
|
3668
|
-
var setDataVal = function(_context, binding, value) {
|
|
3686
|
+
var setDataVal = function setDataVal(_context, binding, value) {
|
|
3669
3687
|
_context.model.set([
|
|
3670
3688
|
[
|
|
3671
3689
|
binding,
|
|
@@ -3673,13 +3691,13 @@ var CommonTypesPlugin = function() {
|
|
|
3673
3691
|
]
|
|
3674
3692
|
]);
|
|
3675
3693
|
};
|
|
3676
|
-
var getDataVal = function(_context, binding) {
|
|
3694
|
+
var getDataVal = function getDataVal(_context, binding) {
|
|
3677
3695
|
return _context.model.get(binding);
|
|
3678
3696
|
};
|
|
3679
|
-
var deleteDataVal = function(_context, binding) {
|
|
3697
|
+
var deleteDataVal = function deleteDataVal(_context, binding) {
|
|
3680
3698
|
return _context.model.delete(binding);
|
|
3681
3699
|
};
|
|
3682
|
-
var conditional = function(ctx, condition, ifTrue, ifFalse) {
|
|
3700
|
+
var conditional = function conditional(ctx, condition, ifTrue, ifFalse) {
|
|
3683
3701
|
var testResult = ctx.evaluate(condition);
|
|
3684
3702
|
if (isAwaitable(testResult)) {
|
|
3685
3703
|
return testResult.awaitableThen(function(resolvedTest) {
|
|
@@ -3701,14 +3719,14 @@ var CommonTypesPlugin = function() {
|
|
|
3701
3719
|
return null;
|
|
3702
3720
|
};
|
|
3703
3721
|
conditional.resolveParams = false;
|
|
3704
|
-
var waitFor = function(ctx, promise) {
|
|
3722
|
+
var waitFor = function waitFor(ctx, promise) {
|
|
3705
3723
|
return makeAwaitable(promise);
|
|
3706
3724
|
};
|
|
3707
|
-
var andandOperator = function(ctx, a, b, async) {
|
|
3725
|
+
var andandOperator = function andandOperator(ctx, a, b, async) {
|
|
3708
3726
|
return LogicalOperators.and(ctx, a, b, async);
|
|
3709
3727
|
};
|
|
3710
3728
|
andandOperator.resolveParams = false;
|
|
3711
|
-
var ororOperator = function(ctx, a, b, async) {
|
|
3729
|
+
var ororOperator = function ororOperator(ctx, a, b, async) {
|
|
3712
3730
|
return LogicalOperators.or(ctx, a, b, async);
|
|
3713
3731
|
};
|
|
3714
3732
|
ororOperator.resolveParams = false;
|
|
@@ -3834,7 +3852,7 @@ var CommonTypesPlugin = function() {
|
|
|
3834
3852
|
}
|
|
3835
3853
|
};
|
|
3836
3854
|
var LogicalOperators = {
|
|
3837
|
-
and: function(ctx, leftNode, rightNode, async) {
|
|
3855
|
+
and: function and(ctx, leftNode, rightNode, async) {
|
|
3838
3856
|
var leftResult = ctx.evaluate(leftNode);
|
|
3839
3857
|
if (async && isAwaitable(leftResult)) {
|
|
3840
3858
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3845,7 +3863,7 @@ var CommonTypesPlugin = function() {
|
|
|
3845
3863
|
}
|
|
3846
3864
|
return leftResult && ctx.evaluate(rightNode);
|
|
3847
3865
|
},
|
|
3848
|
-
or: function(ctx, leftNode, rightNode, async) {
|
|
3866
|
+
or: function or(ctx, leftNode, rightNode, async) {
|
|
3849
3867
|
var leftResult = ctx.evaluate(leftNode);
|
|
3850
3868
|
if (async && isAwaitable(leftResult)) {
|
|
3851
3869
|
return leftResult.awaitableThen(function(awaitedLeft) {
|
|
@@ -3883,10 +3901,10 @@ var CommonTypesPlugin = function() {
|
|
|
3883
3901
|
]))
|
|
3884
3902
|
};
|
|
3885
3903
|
this.defaultHookOptions = _object_spread_props(_object_spread({}, defaultOptions), {
|
|
3886
|
-
evaluate: function(expr) {
|
|
3904
|
+
evaluate: function evaluate(expr) {
|
|
3887
3905
|
return _this.evaluate(expr, _this.defaultHookOptions);
|
|
3888
3906
|
},
|
|
3889
|
-
resolveNode: function(node) {
|
|
3907
|
+
resolveNode: function resolveNode(node) {
|
|
3890
3908
|
return _this._execAST(node, _this.defaultHookOptions);
|
|
3891
3909
|
}
|
|
3892
3910
|
});
|
|
@@ -3906,12 +3924,12 @@ var CommonTypesPlugin = function() {
|
|
|
3906
3924
|
key: "evaluate",
|
|
3907
3925
|
value: function evaluate(expr, options) {
|
|
3908
3926
|
var _this = this;
|
|
3927
|
+
var _this_hooks_beforeEvaluate_call;
|
|
3909
3928
|
var resolvedOpts = this.hooks.resolveOptions.call(_object_spread_props(_object_spread({}, this.defaultHookOptions, options), {
|
|
3910
|
-
resolveNode: function(node) {
|
|
3929
|
+
resolveNode: function resolveNode(node) {
|
|
3911
3930
|
return _this._execAST(node, resolvedOpts);
|
|
3912
3931
|
}
|
|
3913
3932
|
}));
|
|
3914
|
-
var _this_hooks_beforeEvaluate_call;
|
|
3915
3933
|
var expression2 = (_this_hooks_beforeEvaluate_call = this.hooks.beforeEvaluate.call(expr, resolvedOpts)) !== null && _this_hooks_beforeEvaluate_call !== void 0 ? _this_hooks_beforeEvaluate_call : expr;
|
|
3916
3934
|
while(isObjectExpression(expression2)){
|
|
3917
3935
|
expression2 = expression2.value;
|
|
@@ -4035,11 +4053,11 @@ var CommonTypesPlugin = function() {
|
|
|
4035
4053
|
key: "_resolveNode",
|
|
4036
4054
|
value: function _resolveNode(_currentValue, node, options) {
|
|
4037
4055
|
var _this = this;
|
|
4038
|
-
var resolveNode = options.resolveNode, model = options.model;
|
|
4039
4056
|
var _options_async;
|
|
4057
|
+
var resolveNode = options.resolveNode, model = options.model;
|
|
4040
4058
|
var isAsync = (_options_async = options.async) !== null && _options_async !== void 0 ? _options_async : false;
|
|
4041
4059
|
var expressionContext = _object_spread_props(_object_spread({}, options), {
|
|
4042
|
-
evaluate: function(expr) {
|
|
4060
|
+
evaluate: function evaluate(expr) {
|
|
4043
4061
|
return _this.evaluate(expr, options);
|
|
4044
4062
|
}
|
|
4045
4063
|
});
|
|
@@ -4373,7 +4391,7 @@ var CommonTypesPlugin = function() {
|
|
|
4373
4391
|
]);
|
|
4374
4392
|
return ProxyLogger;
|
|
4375
4393
|
}();
|
|
4376
|
-
var identify = function(val) {
|
|
4394
|
+
var identify = function identify(val) {
|
|
4377
4395
|
return val;
|
|
4378
4396
|
};
|
|
4379
4397
|
var SchemaController = /*#__PURE__*/ function() {
|
|
@@ -4461,6 +4479,7 @@ var CommonTypesPlugin = function() {
|
|
|
4461
4479
|
{
|
|
4462
4480
|
key: "getApparentType",
|
|
4463
4481
|
value: function getApparentType(binding) {
|
|
4482
|
+
var _schemaType_validation, _baseType_validation;
|
|
4464
4483
|
var schemaType = this.getType(binding);
|
|
4465
4484
|
if (schemaType === void 0) {
|
|
4466
4485
|
return void 0;
|
|
@@ -4469,7 +4488,6 @@ var CommonTypesPlugin = function() {
|
|
|
4469
4488
|
if (baseType === void 0) {
|
|
4470
4489
|
return schemaType;
|
|
4471
4490
|
}
|
|
4472
|
-
var _schemaType_validation, _baseType_validation;
|
|
4473
4491
|
return _object_spread_props(_object_spread({}, baseType, schemaType), {
|
|
4474
4492
|
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 : []))
|
|
4475
4493
|
});
|
|
@@ -4618,10 +4636,10 @@ var CommonTypesPlugin = function() {
|
|
|
4618
4636
|
{
|
|
4619
4637
|
key: "get",
|
|
4620
4638
|
value: function get(binding, options, next) {
|
|
4639
|
+
var _ref;
|
|
4621
4640
|
var _this_shouldIncludeInvalid, _this;
|
|
4622
4641
|
var val = next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
4623
|
-
|
|
4624
|
-
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) {
|
|
4642
|
+
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) {
|
|
4625
4643
|
this.shadowModelPaths.forEach(function(shadowValue, shadowBinding) {
|
|
4626
4644
|
if (shadowBinding === binding) {
|
|
4627
4645
|
val = shadowValue;
|
|
@@ -4706,11 +4724,12 @@ var CommonTypesPlugin = function() {
|
|
|
4706
4724
|
templateDepth: 0
|
|
4707
4725
|
};
|
|
4708
4726
|
var _this = this;
|
|
4727
|
+
var _this_hooks_onCreateASTNode_call;
|
|
4709
4728
|
var parsedNode = this.hooks.parseNode.call(obj, type, options);
|
|
4710
4729
|
if (parsedNode || parsedNode === null) {
|
|
4711
4730
|
return parsedNode;
|
|
4712
4731
|
}
|
|
4713
|
-
var parseLocalObject = function(currentValue, objToParse) {
|
|
4732
|
+
var parseLocalObject = function parseLocalObject1(currentValue, objToParse) {
|
|
4714
4733
|
var path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
4715
4734
|
if ((typeof objToParse === "undefined" ? "undefined" : _type_of(objToParse)) !== "object" || objToParse === null) {
|
|
4716
4735
|
return {
|
|
@@ -4780,30 +4799,29 @@ var CommonTypesPlugin = function() {
|
|
|
4780
4799
|
child.value.parent = parent;
|
|
4781
4800
|
});
|
|
4782
4801
|
}
|
|
4783
|
-
var _this_hooks_onCreateASTNode_call;
|
|
4784
4802
|
return (_this_hooks_onCreateASTNode_call = this.hooks.onCreateASTNode.call(baseAst, obj)) !== null && _this_hooks_onCreateASTNode_call !== void 0 ? _this_hooks_onCreateASTNode_call : null;
|
|
4785
4803
|
}
|
|
4786
4804
|
}
|
|
4787
4805
|
]);
|
|
4788
4806
|
return Parser;
|
|
4789
4807
|
}();
|
|
4790
|
-
var withContext = function(model) {
|
|
4808
|
+
var withContext = function withContext(model) {
|
|
4791
4809
|
return {
|
|
4792
|
-
get: function(binding, options) {
|
|
4810
|
+
get: function get(binding, options) {
|
|
4793
4811
|
return model.get(binding, _object_spread({
|
|
4794
4812
|
context: {
|
|
4795
4813
|
model: model
|
|
4796
4814
|
}
|
|
4797
4815
|
}, options));
|
|
4798
4816
|
},
|
|
4799
|
-
set: function(transaction, options) {
|
|
4817
|
+
set: function set(transaction, options) {
|
|
4800
4818
|
return model.set(transaction, _object_spread({
|
|
4801
4819
|
context: {
|
|
4802
4820
|
model: model
|
|
4803
4821
|
}
|
|
4804
4822
|
}, options));
|
|
4805
4823
|
},
|
|
4806
|
-
delete: function(binding, options) {
|
|
4824
|
+
delete: function _delete(binding, options) {
|
|
4807
4825
|
return model.delete(binding, _object_spread({
|
|
4808
4826
|
context: {
|
|
4809
4827
|
model: model
|
|
@@ -4842,16 +4860,16 @@ var CommonTypesPlugin = function() {
|
|
|
4842
4860
|
{
|
|
4843
4861
|
key: "update",
|
|
4844
4862
|
value: function update(dataChanges, nodeChanges) {
|
|
4863
|
+
var _ref;
|
|
4845
4864
|
this.hooks.beforeUpdate.call(dataChanges);
|
|
4846
4865
|
var resolveCache = /* @__PURE__ */ new Map();
|
|
4847
4866
|
this.idCache.clear();
|
|
4848
4867
|
var prevASTMap = new Map(this.ASTMap);
|
|
4849
4868
|
this.ASTMap.clear();
|
|
4850
4869
|
var realNodeChanges = /* @__PURE__ */ new Set();
|
|
4851
|
-
var _nodeChanges_values;
|
|
4852
4870
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4853
4871
|
try {
|
|
4854
|
-
for(var _iterator = ((
|
|
4872
|
+
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){
|
|
4855
4873
|
var node = _step.value;
|
|
4856
4874
|
var current = node;
|
|
4857
4875
|
while(current){
|
|
@@ -4934,6 +4952,7 @@ var CommonTypesPlugin = function() {
|
|
|
4934
4952
|
key: "computeTree",
|
|
4935
4953
|
value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nodeChanges) {
|
|
4936
4954
|
var _this = this;
|
|
4955
|
+
var _this_hooks_beforeResolve_call;
|
|
4937
4956
|
var dependencyModel = new DependencyModel(options.data.model);
|
|
4938
4957
|
dependencyModel.trackSubset("core");
|
|
4939
4958
|
var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
|
|
@@ -4941,7 +4960,7 @@ var CommonTypesPlugin = function() {
|
|
|
4941
4960
|
data: _object_spread_props(_object_spread({}, options.data), {
|
|
4942
4961
|
model: depModelWithParser
|
|
4943
4962
|
}),
|
|
4944
|
-
evaluate: function(exp) {
|
|
4963
|
+
evaluate: function evaluate(exp) {
|
|
4945
4964
|
return _this.options.evaluator.evaluate(exp, {
|
|
4946
4965
|
model: depModelWithParser
|
|
4947
4966
|
});
|
|
@@ -4957,14 +4976,14 @@ var CommonTypesPlugin = function() {
|
|
|
4957
4976
|
var update2 = _object_spread_props(_object_spread({}, previousResult), {
|
|
4958
4977
|
updated: false
|
|
4959
4978
|
});
|
|
4960
|
-
var repopulateASTMapFromCache = function(resolvedNode, AST, ASTParent) {
|
|
4979
|
+
var repopulateASTMapFromCache = function repopulateASTMapFromCache1(resolvedNode, AST, ASTParent) {
|
|
4961
4980
|
var resolvedASTLocal = resolvedNode.node;
|
|
4962
4981
|
_this.ASTMap.set(resolvedASTLocal, AST);
|
|
4963
4982
|
var resolvedUpdate = _object_spread_props(_object_spread({}, resolvedNode), {
|
|
4964
4983
|
updated: false
|
|
4965
4984
|
});
|
|
4966
4985
|
cacheUpdate.set(AST, resolvedUpdate);
|
|
4967
|
-
var handleChildNode = function(childNode) {
|
|
4986
|
+
var handleChildNode = function handleChildNode(childNode) {
|
|
4968
4987
|
var _prevASTMap_get;
|
|
4969
4988
|
var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
|
|
4970
4989
|
var previousChildResult = _this.getPreviousResult(originalChildNode);
|
|
@@ -4989,7 +5008,6 @@ var CommonTypesPlugin = function() {
|
|
|
4989
5008
|
var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
|
|
4990
5009
|
parent: partiallyResolvedParent
|
|
4991
5010
|
});
|
|
4992
|
-
var _this_hooks_beforeResolve_call;
|
|
4993
5011
|
var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
|
|
4994
5012
|
type: "empty"
|
|
4995
5013
|
};
|
|
@@ -5049,7 +5067,7 @@ var CommonTypesPlugin = function() {
|
|
|
5049
5067
|
resolved = previousResult === null || previousResult === void 0 ? void 0 : previousResult.value;
|
|
5050
5068
|
}
|
|
5051
5069
|
resolved = this.hooks.afterResolve.call(resolved, resolvedAST, _object_spread_props(_object_spread({}, resolveOptions), {
|
|
5052
|
-
getDependencies: function(scope) {
|
|
5070
|
+
getDependencies: function getDependencies(scope) {
|
|
5053
5071
|
return dependencyModel.getDependencies(scope);
|
|
5054
5072
|
}
|
|
5055
5073
|
}));
|
|
@@ -5359,7 +5377,7 @@ var CommonTypesPlugin = function() {
|
|
|
5359
5377
|
]);
|
|
5360
5378
|
return TemplatePlugin;
|
|
5361
5379
|
}();
|
|
5362
|
-
var createPatternMatcher = function(start, end) {
|
|
5380
|
+
var createPatternMatcher = function createPatternMatcher(start, end) {
|
|
5363
5381
|
return function(testStr) {
|
|
5364
5382
|
var startLocation = testStr.indexOf(start);
|
|
5365
5383
|
if (startLocation === -1) {
|
|
@@ -5399,18 +5417,18 @@ var CommonTypesPlugin = function() {
|
|
|
5399
5417
|
});
|
|
5400
5418
|
return newNode;
|
|
5401
5419
|
}
|
|
5402
|
-
var findBasePath = function(node, resolver) {
|
|
5420
|
+
var findBasePath = function findBasePath1(node, resolver) {
|
|
5403
5421
|
var parentNode = node.parent;
|
|
5404
5422
|
if (!parentNode) {
|
|
5405
5423
|
return [];
|
|
5406
5424
|
}
|
|
5407
5425
|
if ("children" in parentNode) {
|
|
5426
|
+
var _ref;
|
|
5408
5427
|
var _parentNode_children_find, _parentNode_children;
|
|
5409
5428
|
var original = resolver.getSourceNode(node);
|
|
5410
|
-
|
|
5411
|
-
return (_parentNode_children_find_path = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5429
|
+
return (_ref = (_parentNode_children = parentNode.children) === null || _parentNode_children === void 0 ? void 0 : (_parentNode_children_find = _parentNode_children.find(function(child) {
|
|
5412
5430
|
return child.value === original;
|
|
5413
|
-
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null &&
|
|
5431
|
+
})) === null || _parentNode_children_find === void 0 ? void 0 : _parentNode_children_find.path) !== null && _ref !== void 0 ? _ref : [];
|
|
5414
5432
|
}
|
|
5415
5433
|
if (parentNode.type !== "multi-node") {
|
|
5416
5434
|
return [];
|
|
@@ -5435,9 +5453,9 @@ var CommonTypesPlugin = function() {
|
|
|
5435
5453
|
var _node_parent, _node_parent_parent, _node_parent1, _node_parent_parent1, _node_parent2, _node_parent_parent_value;
|
|
5436
5454
|
var propsToSkip;
|
|
5437
5455
|
if (node.type === "asset" || node.type === "view") {
|
|
5456
|
+
var _ref;
|
|
5438
5457
|
var _node_plugins_stringResolver, _node_plugins, _node_value;
|
|
5439
|
-
|
|
5440
|
-
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 : [
|
|
5458
|
+
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 : [
|
|
5441
5459
|
"exp"
|
|
5442
5460
|
]);
|
|
5443
5461
|
if ((_node_value = node.value) === null || _node_value === void 0 ? void 0 : _node_value.id) {
|
|
@@ -5858,11 +5876,11 @@ var CommonTypesPlugin = function() {
|
|
|
5858
5876
|
this.stateStore.clear();
|
|
5859
5877
|
view.hooks.resolver.tap("asset-transform", function(resolver) {
|
|
5860
5878
|
var lastUpdatedNode;
|
|
5861
|
-
var updateState = function(node) {
|
|
5879
|
+
var updateState = function updateState(node) {
|
|
5862
5880
|
lastUpdatedNode = node;
|
|
5863
5881
|
view.update(/* @__PURE__ */ new Set());
|
|
5864
5882
|
};
|
|
5865
|
-
var getStore = function(node, stepKey) {
|
|
5883
|
+
var getStore = function getStore(node, stepKey) {
|
|
5866
5884
|
var store;
|
|
5867
5885
|
var countKey = stepKey === _this.resolveSymbol ? _this.resolveCountSymbol : _this.beforeResolveCountSymbol;
|
|
5868
5886
|
var storedState = _this.stateStore.get(node);
|
|
@@ -5876,10 +5894,10 @@ var CommonTypesPlugin = function() {
|
|
|
5876
5894
|
_this.stateStore.set(node, store);
|
|
5877
5895
|
}
|
|
5878
5896
|
return {
|
|
5879
|
-
useSharedState: function(key) {
|
|
5897
|
+
useSharedState: function useSharedState(key) {
|
|
5880
5898
|
return store.useSharedState(key);
|
|
5881
5899
|
},
|
|
5882
|
-
useLocalState: function(initialState) {
|
|
5900
|
+
useLocalState: function useLocalState(initialState) {
|
|
5883
5901
|
return store.getLocalStateFunction(stepKey, countKey)(initialState);
|
|
5884
5902
|
}
|
|
5885
5903
|
};
|
|
@@ -6241,7 +6259,7 @@ var CommonTypesPlugin = function() {
|
|
|
6241
6259
|
return options;
|
|
6242
6260
|
}
|
|
6243
6261
|
tracked.delete(node);
|
|
6244
|
-
var track = function(binding) {
|
|
6262
|
+
var track = function track(binding) {
|
|
6245
6263
|
var _this_options_callbacks_onAdd, _this_options_callbacks;
|
|
6246
6264
|
var parsed = isBinding(binding) ? binding : _this.options.parseBinding(binding);
|
|
6247
6265
|
if (tracked.has(node)) {
|
|
@@ -6267,7 +6285,7 @@ var CommonTypesPlugin = function() {
|
|
|
6267
6285
|
};
|
|
6268
6286
|
return _object_spread_props(_object_spread({}, options), {
|
|
6269
6287
|
validation: _object_spread_props(_object_spread({}, options.validation), {
|
|
6270
|
-
get: function(binding, getOptions) {
|
|
6288
|
+
get: function get(binding, getOptions) {
|
|
6271
6289
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6272
6290
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6273
6291
|
track(binding);
|
|
@@ -6279,14 +6297,14 @@ var CommonTypesPlugin = function() {
|
|
|
6279
6297
|
return firstFieldEOW;
|
|
6280
6298
|
},
|
|
6281
6299
|
getValidationsForBinding: function getValidationsForBinding(binding, getOptions) {
|
|
6300
|
+
var _ref;
|
|
6282
6301
|
var _options_validation__getValidationForBinding, _options_validation;
|
|
6283
6302
|
if (getOptions === null || getOptions === void 0 ? void 0 : getOptions.track) {
|
|
6284
6303
|
track(binding);
|
|
6285
6304
|
}
|
|
6286
|
-
|
|
6287
|
-
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 : [];
|
|
6305
|
+
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 : [];
|
|
6288
6306
|
},
|
|
6289
|
-
getChildren: function(type) {
|
|
6307
|
+
getChildren: function getChildren(type) {
|
|
6290
6308
|
var _lastComputedBindingTree_get;
|
|
6291
6309
|
var validations = new Array();
|
|
6292
6310
|
(_lastComputedBindingTree_get = lastComputedBindingTree.get(node)) === null || _lastComputedBindingTree_get === void 0 ? void 0 : _lastComputedBindingTree_get.forEach(function(binding) {
|
|
@@ -6298,7 +6316,7 @@ var CommonTypesPlugin = function() {
|
|
|
6298
6316
|
});
|
|
6299
6317
|
return validations;
|
|
6300
6318
|
},
|
|
6301
|
-
getValidationsForSection: function() {
|
|
6319
|
+
getValidationsForSection: function getValidationsForSection() {
|
|
6302
6320
|
var _lastSectionBindingTree_get;
|
|
6303
6321
|
var validations = new Array();
|
|
6304
6322
|
(_lastSectionBindingTree_get = lastSectionBindingTree.get(node)) === null || _lastSectionBindingTree_get === void 0 ? void 0 : _lastSectionBindingTree_get.forEach(function(binding) {
|
|
@@ -6310,7 +6328,7 @@ var CommonTypesPlugin = function() {
|
|
|
6310
6328
|
});
|
|
6311
6329
|
return validations;
|
|
6312
6330
|
},
|
|
6313
|
-
register: function(registerOptions) {
|
|
6331
|
+
register: function register(registerOptions) {
|
|
6314
6332
|
if ((registerOptions === null || registerOptions === void 0 ? void 0 : registerOptions.type) === "section") {
|
|
6315
6333
|
if (!sections.has(node)) {
|
|
6316
6334
|
sections.set(node, /* @__PURE__ */ new Set());
|
|
@@ -6455,10 +6473,10 @@ var CommonTypesPlugin = function() {
|
|
|
6455
6473
|
value: function runApplicableValidations(runner, canDismiss, phase) {
|
|
6456
6474
|
var _this = this;
|
|
6457
6475
|
this.applicableValidations = this.applicableValidations.map(function(originalValue) {
|
|
6476
|
+
var _originalValue_value_blocking, _response_message, _obj_value_displayTarget;
|
|
6458
6477
|
if (originalValue.state === "dismissed") {
|
|
6459
6478
|
return originalValue;
|
|
6460
6479
|
}
|
|
6461
|
-
var _originalValue_value_blocking;
|
|
6462
6480
|
var blocking = (_originalValue_value_blocking = originalValue.value.blocking) !== null && _originalValue_value_blocking !== void 0 ? _originalValue_value_blocking : originalValue.value.severity === "warning" && "once" || true;
|
|
6463
6481
|
var obj = (0, import_timm9.setIn)(originalValue, [
|
|
6464
6482
|
"value",
|
|
@@ -6480,7 +6498,6 @@ var CommonTypesPlugin = function() {
|
|
|
6480
6498
|
}
|
|
6481
6499
|
}
|
|
6482
6500
|
var response = runner(obj.value);
|
|
6483
|
-
var _response_message, _obj_value_displayTarget;
|
|
6484
6501
|
var newState = {
|
|
6485
6502
|
type: obj.type,
|
|
6486
6503
|
value: obj.value,
|
|
@@ -6565,14 +6582,14 @@ var CommonTypesPlugin = function() {
|
|
|
6565
6582
|
var _this = this;
|
|
6566
6583
|
return [
|
|
6567
6584
|
{
|
|
6568
|
-
set: function(transaction, options, next) {
|
|
6569
|
-
var
|
|
6570
|
-
return (
|
|
6585
|
+
set: function set(transaction, options, next) {
|
|
6586
|
+
var _ref;
|
|
6587
|
+
return (_ref = next === null || next === void 0 ? void 0 : next.set(transaction, options)) !== null && _ref !== void 0 ? _ref : [];
|
|
6571
6588
|
},
|
|
6572
|
-
get: function(binding, options, next) {
|
|
6589
|
+
get: function get(binding, options, next) {
|
|
6573
6590
|
return next === null || next === void 0 ? void 0 : next.get(binding, options);
|
|
6574
6591
|
},
|
|
6575
|
-
delete: function(binding, options, next) {
|
|
6592
|
+
delete: function _delete(binding, options, next) {
|
|
6576
6593
|
_this.validations = removeBindingAndChildrenFromMap(_this.validations, binding);
|
|
6577
6594
|
return next === null || next === void 0 ? void 0 : next.delete(binding, options);
|
|
6578
6595
|
}
|
|
@@ -6635,11 +6652,11 @@ var CommonTypesPlugin = function() {
|
|
|
6635
6652
|
{
|
|
6636
6653
|
source: VIEW_VALIDATION_PROVIDER_NAME,
|
|
6637
6654
|
provider: {
|
|
6638
|
-
getValidationsForBinding: function(binding) {
|
|
6655
|
+
getValidationsForBinding: function getValidationsForBinding(binding) {
|
|
6639
6656
|
var _this_viewValidationProvider_getValidationsForBinding, _this_viewValidationProvider;
|
|
6640
6657
|
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);
|
|
6641
6658
|
},
|
|
6642
|
-
getValidationsForView: function() {
|
|
6659
|
+
getValidationsForView: function getValidationsForView() {
|
|
6643
6660
|
var _this_viewValidationProvider_getValidationsForView, _this_viewValidationProvider;
|
|
6644
6661
|
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);
|
|
6645
6662
|
}
|
|
@@ -6666,7 +6683,7 @@ var CommonTypesPlugin = function() {
|
|
|
6666
6683
|
}
|
|
6667
6684
|
var bindingTrackerPlugin = new ValidationBindingTrackerViewPlugin(_object_spread_props(_object_spread({}, this.options), {
|
|
6668
6685
|
callbacks: {
|
|
6669
|
-
onAdd: function(binding) {
|
|
6686
|
+
onAdd: function onAdd(binding) {
|
|
6670
6687
|
if (!_this.options || _this.getValidationForBinding(binding) !== void 0) {
|
|
6671
6688
|
return;
|
|
6672
6689
|
}
|
|
@@ -6710,11 +6727,11 @@ var CommonTypesPlugin = function() {
|
|
|
6710
6727
|
var _this_options;
|
|
6711
6728
|
var possibleValidations = this.getValidationProviders().reduce(function(vals, provider) {
|
|
6712
6729
|
var _vals;
|
|
6730
|
+
var _ref;
|
|
6713
6731
|
var _provider_provider_getValidationsForBinding, _provider_provider_getValidationsForBinding1, _provider_provider;
|
|
6714
|
-
|
|
6715
|
-
(_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) {
|
|
6732
|
+
(_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) {
|
|
6716
6733
|
return _object_spread_props(_object_spread({}, valObj), _define_property({}, VALIDATION_PROVIDER_NAME_SYMBOL, provider.source));
|
|
6717
|
-
})) !== null &&
|
|
6734
|
+
})) !== null && _ref !== void 0 ? _ref : []));
|
|
6718
6735
|
return vals;
|
|
6719
6736
|
}, []);
|
|
6720
6737
|
if (possibleValidations.length === 0) {
|
|
@@ -6755,10 +6772,10 @@ var CommonTypesPlugin = function() {
|
|
|
6755
6772
|
key: "validationRunner",
|
|
6756
6773
|
value: function validationRunner(validationObj, binding) {
|
|
6757
6774
|
var context = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.options;
|
|
6775
|
+
var _validationObj_handler;
|
|
6758
6776
|
if (!context) {
|
|
6759
6777
|
throw new Error("No context provided to validation runner");
|
|
6760
6778
|
}
|
|
6761
|
-
var _validationObj_handler;
|
|
6762
6779
|
var handler = (_validationObj_handler = validationObj.handler) !== null && _validationObj_handler !== void 0 ? _validationObj_handler : this.getValidator(validationObj.type);
|
|
6763
6780
|
var weakBindings = /* @__PURE__ */ new Set();
|
|
6764
6781
|
var model = {
|
|
@@ -6772,7 +6789,7 @@ var CommonTypesPlugin = function() {
|
|
|
6772
6789
|
delete: context.model.delete
|
|
6773
6790
|
};
|
|
6774
6791
|
var result = handler === null || handler === void 0 ? void 0 : handler(_object_spread_props(_object_spread({}, context), {
|
|
6775
|
-
evaluate: function(exp) {
|
|
6792
|
+
evaluate: function evaluate(exp) {
|
|
6776
6793
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
6777
6794
|
model: model
|
|
6778
6795
|
};
|
|
@@ -6810,7 +6827,7 @@ var CommonTypesPlugin = function() {
|
|
|
6810
6827
|
var _this = this;
|
|
6811
6828
|
var isNavigationTrigger = trigger === "navigation";
|
|
6812
6829
|
var lastActiveBindings = this.activeBindings;
|
|
6813
|
-
var updateValidations = function(dismissValidations) {
|
|
6830
|
+
var updateValidations = function updateValidations(dismissValidations) {
|
|
6814
6831
|
_this.getBindings().forEach(function(binding) {
|
|
6815
6832
|
var _this_validations_get;
|
|
6816
6833
|
(_this_validations_get = _this.validations.get(binding)) === null || _this_validations_get === void 0 ? void 0 : _this_validations_get.update(trigger, dismissValidations, function(obj) {
|
|
@@ -6855,9 +6872,9 @@ var CommonTypesPlugin = function() {
|
|
|
6855
6872
|
{
|
|
6856
6873
|
key: "getBindings",
|
|
6857
6874
|
value: function getBindings() {
|
|
6875
|
+
var _ref;
|
|
6858
6876
|
var _this_tracker;
|
|
6859
|
-
|
|
6860
|
-
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();
|
|
6877
|
+
return (_ref = (_this_tracker = this.tracker) === null || _this_tracker === void 0 ? void 0 : _this_tracker.getBindings()) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ new Set();
|
|
6861
6878
|
}
|
|
6862
6879
|
},
|
|
6863
6880
|
{
|
|
@@ -6906,10 +6923,10 @@ var CommonTypesPlugin = function() {
|
|
|
6906
6923
|
value: function forView(parser) {
|
|
6907
6924
|
var _this = this;
|
|
6908
6925
|
return {
|
|
6909
|
-
_getValidationForBinding: function(binding) {
|
|
6926
|
+
_getValidationForBinding: function _getValidationForBinding(binding) {
|
|
6910
6927
|
return _this.getValidationForBinding(isBinding(binding) ? binding : parser(binding));
|
|
6911
6928
|
},
|
|
6912
|
-
getAll: function() {
|
|
6929
|
+
getAll: function getAll() {
|
|
6913
6930
|
var bindings = _this.getBindings();
|
|
6914
6931
|
if (bindings.size === 0) {
|
|
6915
6932
|
return void 0;
|
|
@@ -6936,13 +6953,13 @@ var CommonTypesPlugin = function() {
|
|
|
6936
6953
|
getValidationsForSection: function getValidationsForSection() {
|
|
6937
6954
|
throw new Error("Error rollup should be provided by the view plugin");
|
|
6938
6955
|
},
|
|
6939
|
-
track: function() {
|
|
6956
|
+
track: function track() {
|
|
6940
6957
|
throw new Error("Tracking should be provided by the view plugin");
|
|
6941
6958
|
},
|
|
6942
|
-
register: function() {
|
|
6959
|
+
register: function register() {
|
|
6943
6960
|
throw new Error("Section functionality should be provided by the view plugin");
|
|
6944
6961
|
},
|
|
6945
|
-
type: function(binding) {
|
|
6962
|
+
type: function type(binding) {
|
|
6946
6963
|
return _this.schema.getType(isBinding(binding) ? binding : parser(binding));
|
|
6947
6964
|
}
|
|
6948
6965
|
};
|
|
@@ -6951,9 +6968,9 @@ var CommonTypesPlugin = function() {
|
|
|
6951
6968
|
]);
|
|
6952
6969
|
return ValidationController;
|
|
6953
6970
|
}();
|
|
6954
|
-
var mergeSets = function(setA, setB) {
|
|
6955
|
-
var
|
|
6956
|
-
return /* @__PURE__ */ new Set(_to_consumable_array((
|
|
6971
|
+
var mergeSets = function mergeSets(setA, setB) {
|
|
6972
|
+
var _ref, _ref1;
|
|
6973
|
+
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 : [])));
|
|
6957
6974
|
};
|
|
6958
6975
|
var ViewController = /*#__PURE__*/ function() {
|
|
6959
6976
|
function ViewController(initialViews, options) {
|
|
@@ -6980,7 +6997,7 @@ var CommonTypesPlugin = function() {
|
|
|
6980
6997
|
}
|
|
6981
6998
|
});
|
|
6982
6999
|
});
|
|
6983
|
-
var update = function(updates) {
|
|
7000
|
+
var update = function update(updates) {
|
|
6984
7001
|
var silent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
6985
7002
|
if (_this1.currentView) {
|
|
6986
7003
|
if (_this1.optimizeUpdates) {
|
|
@@ -6991,10 +7008,10 @@ var CommonTypesPlugin = function() {
|
|
|
6991
7008
|
}
|
|
6992
7009
|
};
|
|
6993
7010
|
options.model.hooks.onUpdate.tap("viewController", function(updates, updateOptions) {
|
|
6994
|
-
var
|
|
7011
|
+
var _ref;
|
|
6995
7012
|
update(new Set(updates.map(function(t2) {
|
|
6996
7013
|
return t2.binding;
|
|
6997
|
-
})), (
|
|
7014
|
+
})), (_ref = updateOptions === null || updateOptions === void 0 ? void 0 : updateOptions.silent) !== null && _ref !== void 0 ? _ref : false);
|
|
6998
7015
|
});
|
|
6999
7016
|
options.model.hooks.onDelete.tap("viewController", function(binding) {
|
|
7000
7017
|
var parentBinding = binding.parent();
|
|
@@ -7029,8 +7046,8 @@ var CommonTypesPlugin = function() {
|
|
|
7029
7046
|
if (!this.pendingUpdate.scheduled && !silent) {
|
|
7030
7047
|
this.pendingUpdate.scheduled = true;
|
|
7031
7048
|
(0, import_queue_microtask2.default)(function() {
|
|
7032
|
-
var _this_currentView;
|
|
7033
7049
|
var _this_pendingUpdate;
|
|
7050
|
+
var _this_currentView;
|
|
7034
7051
|
var _ref = (_this_pendingUpdate = _this.pendingUpdate) !== null && _this_pendingUpdate !== void 0 ? _this_pendingUpdate : {}, changedBindings = _ref.changedBindings, changedNodes = _ref.changedNodes;
|
|
7035
7052
|
_this.pendingUpdate = void 0;
|
|
7036
7053
|
(_this_currentView = _this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.update(changedBindings, changedNodes);
|
|
@@ -7355,10 +7372,10 @@ var CommonTypesPlugin = function() {
|
|
|
7355
7372
|
{
|
|
7356
7373
|
key: "getConstants",
|
|
7357
7374
|
value: function getConstants(key, namespace, fallback) {
|
|
7375
|
+
var _ref, _ref1;
|
|
7358
7376
|
var _this_tempStore_get, _this_store_get;
|
|
7359
7377
|
var path = new BindingInstance(key);
|
|
7360
|
-
|
|
7361
|
-
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;
|
|
7378
|
+
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;
|
|
7362
7379
|
}
|
|
7363
7380
|
},
|
|
7364
7381
|
{
|
|
@@ -7399,7 +7416,7 @@ var CommonTypesPlugin = function() {
|
|
|
7399
7416
|
value: function apply(player) {
|
|
7400
7417
|
var _this = this;
|
|
7401
7418
|
var expressionEvaluator;
|
|
7402
|
-
var handleEval = function(exp) {
|
|
7419
|
+
var handleEval = function handleEval(exp) {
|
|
7403
7420
|
if (exp) {
|
|
7404
7421
|
if ((typeof exp === "undefined" ? "undefined" : _type_of(exp)) === "object" && "exp" in exp) {
|
|
7405
7422
|
expressionEvaluator === null || expressionEvaluator === void 0 ? void 0 : expressionEvaluator.evaluate(exp.exp);
|
|
@@ -7420,7 +7437,7 @@ var CommonTypesPlugin = function() {
|
|
|
7420
7437
|
return handleEval(exp);
|
|
7421
7438
|
});
|
|
7422
7439
|
flow.hooks.resolveTransitionNode.intercept({
|
|
7423
|
-
call: function(nextState) {
|
|
7440
|
+
call: function call(nextState) {
|
|
7424
7441
|
if (nextState === null || nextState === void 0 ? void 0 : nextState.onStart) {
|
|
7425
7442
|
handleEval(nextState.onStart);
|
|
7426
7443
|
}
|
|
@@ -7433,13 +7450,13 @@ var CommonTypesPlugin = function() {
|
|
|
7433
7450
|
]);
|
|
7434
7451
|
return FlowExpPlugin;
|
|
7435
7452
|
}();
|
|
7436
|
-
var createFormatFunction = function(schema) {
|
|
7437
|
-
var handler = function(ctx, value, formatName) {
|
|
7453
|
+
var createFormatFunction = function createFormatFunction(schema) {
|
|
7454
|
+
var handler = function handler(ctx, value, formatName) {
|
|
7455
|
+
var _ref;
|
|
7438
7456
|
var _schema_getFormatterForType;
|
|
7439
|
-
|
|
7440
|
-
return (_schema_getFormatterForType_format = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7457
|
+
return (_ref = (_schema_getFormatterForType = schema.getFormatterForType({
|
|
7441
7458
|
type: formatName
|
|
7442
|
-
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null &&
|
|
7459
|
+
})) === null || _schema_getFormatterForType === void 0 ? void 0 : _schema_getFormatterForType.format(value)) !== null && _ref !== void 0 ? _ref : value;
|
|
7443
7460
|
};
|
|
7444
7461
|
return handler;
|
|
7445
7462
|
};
|
|
@@ -7491,8 +7508,8 @@ var CommonTypesPlugin = function() {
|
|
|
7491
7508
|
ref: Symbol("not-started"),
|
|
7492
7509
|
status: "not-started"
|
|
7493
7510
|
};
|
|
7494
|
-
var PLAYER_VERSION = true ? "0.15.3-next.
|
|
7495
|
-
var COMMIT = true ? "
|
|
7511
|
+
var PLAYER_VERSION = true ? "0.15.3-next.2" : "unknown";
|
|
7512
|
+
var COMMIT = true ? "21f4b09d55c325c5fe951d2fd08caaebb81db483" : "unknown";
|
|
7496
7513
|
var _Player = /*#__PURE__*/ function() {
|
|
7497
7514
|
function _Player2(config) {
|
|
7498
7515
|
var _this = this;
|
|
@@ -7607,13 +7624,13 @@ var CommonTypesPlugin = function() {
|
|
|
7607
7624
|
var expressionEvaluator;
|
|
7608
7625
|
var dataController;
|
|
7609
7626
|
var pathResolver = new BindingParser({
|
|
7610
|
-
get: function(binding) {
|
|
7627
|
+
get: function get(binding) {
|
|
7611
7628
|
return dataController.get(binding);
|
|
7612
7629
|
},
|
|
7613
|
-
set: function(transaction) {
|
|
7630
|
+
set: function set(transaction) {
|
|
7614
7631
|
return dataController.set(transaction);
|
|
7615
7632
|
},
|
|
7616
|
-
evaluate: function(expression2) {
|
|
7633
|
+
evaluate: function evaluate(expression2) {
|
|
7617
7634
|
return expressionEvaluator.evaluate(expression2);
|
|
7618
7635
|
}
|
|
7619
7636
|
});
|
|
@@ -7757,23 +7774,23 @@ var CommonTypesPlugin = function() {
|
|
|
7757
7774
|
transition: flowController.transition,
|
|
7758
7775
|
model: dataController,
|
|
7759
7776
|
utils: {
|
|
7760
|
-
findPlugin: function(pluginSymbol) {
|
|
7777
|
+
findPlugin: function findPlugin(pluginSymbol) {
|
|
7761
7778
|
return _this.findPlugin(pluginSymbol);
|
|
7762
7779
|
}
|
|
7763
7780
|
},
|
|
7764
7781
|
logger: this.logger,
|
|
7765
7782
|
flowController: flowController,
|
|
7766
7783
|
schema: schema,
|
|
7767
|
-
format: function(binding, value) {
|
|
7784
|
+
format: function format(binding, value) {
|
|
7768
7785
|
var formatter = schema.getFormatter(binding);
|
|
7769
7786
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7770
7787
|
},
|
|
7771
|
-
formatValue: function(ref, value) {
|
|
7788
|
+
formatValue: function formatValue(ref, value) {
|
|
7772
7789
|
var formatter = schema.getFormatterForType(ref);
|
|
7773
7790
|
return (formatter === null || formatter === void 0 ? void 0 : formatter.format) ? formatter.format(value) : value;
|
|
7774
7791
|
},
|
|
7775
7792
|
validation: _object_spread_props(_object_spread({}, validationController.forView(parseBinding)), {
|
|
7776
|
-
type: function(b) {
|
|
7793
|
+
type: function type(b) {
|
|
7777
7794
|
return schema.getType(parseBinding(b));
|
|
7778
7795
|
}
|
|
7779
7796
|
}),
|
|
@@ -7785,7 +7802,7 @@ var CommonTypesPlugin = function() {
|
|
|
7785
7802
|
});
|
|
7786
7803
|
this.hooks.viewController.call(viewController);
|
|
7787
7804
|
return {
|
|
7788
|
-
start: function() {
|
|
7805
|
+
start: function start() {
|
|
7789
7806
|
flowController.start().then(function(endState) {
|
|
7790
7807
|
var flowResult = {
|
|
7791
7808
|
endState: resolveStrings(endState, false),
|
|
@@ -7822,13 +7839,13 @@ var CommonTypesPlugin = function() {
|
|
|
7822
7839
|
key: "start",
|
|
7823
7840
|
value: function start(payload) {
|
|
7824
7841
|
return _async_to_generator(function() {
|
|
7825
|
-
var _this,
|
|
7842
|
+
var _this, _ref, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
|
|
7826
7843
|
return _ts_generator(this, function(_state) {
|
|
7827
7844
|
switch(_state.label){
|
|
7828
7845
|
case 0:
|
|
7829
7846
|
_this = this;
|
|
7830
|
-
ref = Symbol((
|
|
7831
|
-
maybeUpdateState = function(newState) {
|
|
7847
|
+
ref = Symbol((_ref = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _ref !== void 0 ? _ref : "payload");
|
|
7848
|
+
maybeUpdateState = function maybeUpdateState(newState) {
|
|
7832
7849
|
if (_this.state.ref !== ref) {
|
|
7833
7850
|
_this.logger.warn("Received update for a flow that's not the current one");
|
|
7834
7851
|
return newState;
|
|
@@ -7920,7 +7937,7 @@ var CommonTypesPlugin = function() {
|
|
|
7920
7937
|
};
|
|
7921
7938
|
}
|
|
7922
7939
|
});
|
|
7923
|
-
var readonly = function(context) {
|
|
7940
|
+
var readonly = function readonly(context) {
|
|
7924
7941
|
var message = context.constants.getConstants("validation.readonly", "constants", "Value cannot be modified");
|
|
7925
7942
|
return {
|
|
7926
7943
|
message: message
|
|
@@ -7956,7 +7973,7 @@ var CommonTypesPlugin = function() {
|
|
|
7956
7973
|
message: message
|
|
7957
7974
|
};
|
|
7958
7975
|
});
|
|
7959
|
-
var expression = function(context, value, options) {
|
|
7976
|
+
var expression = function expression(context, value, options) {
|
|
7960
7977
|
if ((options === null || options === void 0 ? void 0 : options.exp) === void 0) {
|
|
7961
7978
|
context.logger.warn("No expression defined for validation");
|
|
7962
7979
|
return;
|
|
@@ -7969,7 +7986,7 @@ var CommonTypesPlugin = function() {
|
|
|
7969
7986
|
};
|
|
7970
7987
|
}
|
|
7971
7988
|
};
|
|
7972
|
-
var required = function(context, value, options) {
|
|
7989
|
+
var required = function required(context, value, options) {
|
|
7973
7990
|
if ((options === null || options === void 0 ? void 0 : options.if) && !context.evaluate(options.if) || (options === null || options === void 0 ? void 0 : options.ifNot) && context.evaluate(options.ifNot)) {
|
|
7974
7991
|
return;
|
|
7975
7992
|
}
|
|
@@ -8064,7 +8081,7 @@ var CommonTypesPlugin = function() {
|
|
|
8064
8081
|
};
|
|
8065
8082
|
}
|
|
8066
8083
|
});
|
|
8067
|
-
var stringRegexValidator = function(test, messagePath, invalidMessage) {
|
|
8084
|
+
var stringRegexValidator = function stringRegexValidator(test, messagePath, invalidMessage) {
|
|
8068
8085
|
return skipNullish(function(context, value) {
|
|
8069
8086
|
if (typeof value === "string" && value === "") {
|
|
8070
8087
|
return;
|
|
@@ -8083,28 +8100,28 @@ var CommonTypesPlugin = function() {
|
|
|
8083
8100
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/common-types/core/src/data-types/types.ts
|
|
8084
8101
|
var types_exports = {};
|
|
8085
8102
|
__export(types_exports, {
|
|
8086
|
-
BooleanType: function() {
|
|
8103
|
+
BooleanType: function BooleanType1() {
|
|
8087
8104
|
return BooleanType;
|
|
8088
8105
|
},
|
|
8089
|
-
CollectionType: function() {
|
|
8106
|
+
CollectionType: function CollectionType1() {
|
|
8090
8107
|
return CollectionType;
|
|
8091
8108
|
},
|
|
8092
|
-
DateType: function() {
|
|
8109
|
+
DateType: function DateType1() {
|
|
8093
8110
|
return DateType;
|
|
8094
8111
|
},
|
|
8095
|
-
IntegerNNType: function() {
|
|
8112
|
+
IntegerNNType: function IntegerNNType1() {
|
|
8096
8113
|
return IntegerNNType;
|
|
8097
8114
|
},
|
|
8098
|
-
IntegerPosType: function() {
|
|
8115
|
+
IntegerPosType: function IntegerPosType1() {
|
|
8099
8116
|
return IntegerPosType;
|
|
8100
8117
|
},
|
|
8101
|
-
IntegerType: function() {
|
|
8118
|
+
IntegerType: function IntegerType1() {
|
|
8102
8119
|
return IntegerType;
|
|
8103
8120
|
},
|
|
8104
|
-
PhoneType: function() {
|
|
8121
|
+
PhoneType: function PhoneType1() {
|
|
8105
8122
|
return PhoneType;
|
|
8106
8123
|
},
|
|
8107
|
-
StringType: function() {
|
|
8124
|
+
StringType: function StringType1() {
|
|
8108
8125
|
return StringType;
|
|
8109
8126
|
}
|
|
8110
8127
|
});
|
|
@@ -8208,25 +8225,25 @@ var CommonTypesPlugin = function() {
|
|
|
8208
8225
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/common-types/core/src/formats/index.ts
|
|
8209
8226
|
var formats_exports = {};
|
|
8210
8227
|
__export(formats_exports, {
|
|
8211
|
-
commaNumber: function() {
|
|
8228
|
+
commaNumber: function commaNumber1() {
|
|
8212
8229
|
return commaNumber;
|
|
8213
8230
|
},
|
|
8214
|
-
currency: function() {
|
|
8231
|
+
currency: function currency1() {
|
|
8215
8232
|
return currency;
|
|
8216
8233
|
},
|
|
8217
|
-
date: function() {
|
|
8234
|
+
date: function date1() {
|
|
8218
8235
|
return date;
|
|
8219
8236
|
},
|
|
8220
|
-
integer: function() {
|
|
8237
|
+
integer: function integer() {
|
|
8221
8238
|
return integer2;
|
|
8222
8239
|
},
|
|
8223
|
-
phone: function() {
|
|
8240
|
+
phone: function phone() {
|
|
8224
8241
|
return phone2;
|
|
8225
8242
|
}
|
|
8226
8243
|
});
|
|
8227
8244
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/common-types/core/src/formats/utils.ts
|
|
8228
8245
|
var PLACEHOLDER = "#";
|
|
8229
|
-
var removeFormatCharactersFromMaskedString = function(value, mask) {
|
|
8246
|
+
var removeFormatCharactersFromMaskedString = function removeFormatCharactersFromMaskedString(value, mask) {
|
|
8230
8247
|
var reserved = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [
|
|
8231
8248
|
PLACEHOLDER
|
|
8232
8249
|
];
|
|
@@ -8253,7 +8270,7 @@ var CommonTypesPlugin = function() {
|
|
|
8253
8270
|
return newString;
|
|
8254
8271
|
}, "");
|
|
8255
8272
|
};
|
|
8256
|
-
var formatAsEnum = function(value, acceptedValues, options) {
|
|
8273
|
+
var formatAsEnum = function formatAsEnum(value, acceptedValues, options) {
|
|
8257
8274
|
var autoCompletionsByOverlapCount = acceptedValues.reduce(function(validCompletions, validValue) {
|
|
8258
8275
|
var overlap = 0;
|
|
8259
8276
|
for(var charIndex = 0; charIndex < Math.min(validValue.length, value.length); charIndex++){
|
|
@@ -8283,7 +8300,7 @@ var CommonTypesPlugin = function() {
|
|
|
8283
8300
|
}
|
|
8284
8301
|
return autoCompletionsByOverlapCount[0].target.substr(0, autoCompletionsByOverlapCount[0].count);
|
|
8285
8302
|
};
|
|
8286
|
-
var formatAsMasked = function(value, valueCharMaskMatch, mask) {
|
|
8303
|
+
var formatAsMasked = function formatAsMasked(value, valueCharMaskMatch, mask) {
|
|
8287
8304
|
var valStr = String(value);
|
|
8288
8305
|
var withMask = mask;
|
|
8289
8306
|
if (valStr.trim() === "") {
|
|
@@ -8295,10 +8312,10 @@ var CommonTypesPlugin = function() {
|
|
|
8295
8312
|
});
|
|
8296
8313
|
return withMask.split(PLACEHOLDER)[0];
|
|
8297
8314
|
};
|
|
8298
|
-
var createMaskedNumericFormatter = function(name, mask) {
|
|
8315
|
+
var createMaskedNumericFormatter = function createMaskedNumericFormatter(name, mask) {
|
|
8299
8316
|
return {
|
|
8300
8317
|
name: name,
|
|
8301
|
-
format: function(value, options) {
|
|
8318
|
+
format: function format(value, options) {
|
|
8302
8319
|
if (typeof value !== "string") {
|
|
8303
8320
|
return value;
|
|
8304
8321
|
}
|
|
@@ -8313,7 +8330,7 @@ var CommonTypesPlugin = function() {
|
|
|
8313
8330
|
}
|
|
8314
8331
|
return formatAsMasked(value, /\d/g, mask);
|
|
8315
8332
|
},
|
|
8316
|
-
deformat: function(value, options) {
|
|
8333
|
+
deformat: function deformat(value, options) {
|
|
8317
8334
|
if (typeof value !== "string") {
|
|
8318
8335
|
return value;
|
|
8319
8336
|
}
|
|
@@ -8334,19 +8351,19 @@ var CommonTypesPlugin = function() {
|
|
|
8334
8351
|
var LENGTH_OF_MAX_INT = String(Number.MAX_SAFE_INTEGER).split("").length;
|
|
8335
8352
|
var integer2 = {
|
|
8336
8353
|
name: "integer",
|
|
8337
|
-
/** Converts any integer to a string */ format: function(value) {
|
|
8354
|
+
/** Converts any integer to a string */ format: function format(value) {
|
|
8355
|
+
var _ref;
|
|
8338
8356
|
var _integer2_deformat;
|
|
8339
8357
|
if (value === "-") {
|
|
8340
8358
|
return value;
|
|
8341
8359
|
}
|
|
8342
|
-
var
|
|
8343
|
-
var formatted = (_integer2_deformat1 = (_integer2_deformat = integer2.deformat) === null || _integer2_deformat === void 0 ? void 0 : _integer2_deformat.call(integer2, value)) !== null && _integer2_deformat1 !== void 0 ? _integer2_deformat1 : value;
|
|
8360
|
+
var formatted = (_ref = (_integer2_deformat = integer2.deformat) === null || _integer2_deformat === void 0 ? void 0 : _integer2_deformat.call(integer2, value)) !== null && _ref !== void 0 ? _ref : value;
|
|
8344
8361
|
if (typeof formatted === "number") {
|
|
8345
8362
|
return String(formatted);
|
|
8346
8363
|
}
|
|
8347
8364
|
return "";
|
|
8348
8365
|
},
|
|
8349
|
-
/** Converts any string or number to an integer */ deformat: function(value) {
|
|
8366
|
+
/** Converts any string or number to an integer */ deformat: function deformat(value) {
|
|
8350
8367
|
if (typeof value === "number") {
|
|
8351
8368
|
return Math.floor(value) + 0;
|
|
8352
8369
|
}
|
|
@@ -8369,7 +8386,7 @@ var CommonTypesPlugin = function() {
|
|
|
8369
8386
|
};
|
|
8370
8387
|
var commaNumber = {
|
|
8371
8388
|
name: "commaNumber",
|
|
8372
|
-
/** Go from number to number w/ commas */ format: function(_value, options) {
|
|
8389
|
+
/** Go from number to number w/ commas */ format: function format(_value, options) {
|
|
8373
8390
|
if (_value === void 0 || _value === "") {
|
|
8374
8391
|
return _value;
|
|
8375
8392
|
}
|
|
@@ -8406,7 +8423,7 @@ var CommonTypesPlugin = function() {
|
|
|
8406
8423
|
}
|
|
8407
8424
|
return retVal;
|
|
8408
8425
|
},
|
|
8409
|
-
/** Go from string with comma's to numbers */ deformat: function(value) {
|
|
8426
|
+
/** Go from string with comma's to numbers */ deformat: function deformat(value) {
|
|
8410
8427
|
if (typeof value !== "string") {
|
|
8411
8428
|
return value;
|
|
8412
8429
|
}
|
|
@@ -8420,7 +8437,8 @@ var CommonTypesPlugin = function() {
|
|
|
8420
8437
|
};
|
|
8421
8438
|
var date = {
|
|
8422
8439
|
name: "date",
|
|
8423
|
-
format: function(_value, options) {
|
|
8440
|
+
format: function format(_value, options) {
|
|
8441
|
+
var _ref;
|
|
8424
8442
|
var _options_mask;
|
|
8425
8443
|
var value = typeof _value === "number" ? String(_value) : _value;
|
|
8426
8444
|
if (_value === void 0) {
|
|
@@ -8433,8 +8451,7 @@ var CommonTypesPlugin = function() {
|
|
|
8433
8451
|
var tempVal = value.split("-");
|
|
8434
8452
|
value = "".concat(tempVal[1], "/").concat(tempVal[2], "/").concat(tempVal[0]);
|
|
8435
8453
|
}
|
|
8436
|
-
var
|
|
8437
|
-
var dateFormat = (_options_mask_toUpperCase = options === null || options === void 0 ? void 0 : (_options_mask = options.mask) === null || _options_mask === void 0 ? void 0 : _options_mask.toUpperCase()) !== null && _options_mask_toUpperCase !== void 0 ? _options_mask_toUpperCase : "MM/DD/YYYY";
|
|
8454
|
+
var dateFormat = (_ref = options === null || options === void 0 ? void 0 : (_options_mask = options.mask) === null || _options_mask === void 0 ? void 0 : _options_mask.toUpperCase()) !== null && _ref !== void 0 ? _ref : "MM/DD/YYYY";
|
|
8438
8455
|
var delimiter = dateFormat.replace(/[^/.-]/g, "").charAt(0);
|
|
8439
8456
|
var formatParts = dateFormat.split(delimiter);
|
|
8440
8457
|
var valueParts = value.split(delimiter);
|
|
@@ -8545,7 +8562,7 @@ var CommonTypesPlugin = function() {
|
|
|
8545
8562
|
};
|
|
8546
8563
|
var currency = {
|
|
8547
8564
|
name: "currency",
|
|
8548
|
-
format: function(_value, options) {
|
|
8565
|
+
format: function format(_value, options) {
|
|
8549
8566
|
var value = typeof _value === "number" ? String(_value) : _value;
|
|
8550
8567
|
var _ref = options !== null && options !== void 0 ? options : {}, _ref_currencySymbol = _ref.currencySymbol, currencySymbol = _ref_currencySymbol === void 0 ? "" : _ref_currencySymbol, _ref_useParensForNeg = _ref.useParensForNeg, useParensForNeg = _ref_useParensForNeg === void 0 ? false : _ref_useParensForNeg, _ref_precision = _ref.precision, precision = _ref_precision === void 0 ? 2 : _ref_precision;
|
|
8551
8568
|
if (value === void 0 || value === "") {
|
|
@@ -8576,7 +8593,7 @@ var CommonTypesPlugin = function() {
|
|
|
8576
8593
|
}
|
|
8577
8594
|
return currencySymbol + prettyString;
|
|
8578
8595
|
},
|
|
8579
|
-
deformat: function(value, options) {
|
|
8596
|
+
deformat: function deformat(value, options) {
|
|
8580
8597
|
var _commaNumber_deformat;
|
|
8581
8598
|
if (typeof value === "number") {
|
|
8582
8599
|
return value;
|
|
@@ -8593,14 +8610,14 @@ var CommonTypesPlugin = function() {
|
|
|
8593
8610
|
};
|
|
8594
8611
|
var basePhoneFormatter = createMaskedNumericFormatter("phone", "(###) ###-####");
|
|
8595
8612
|
var phone2 = _object_spread_props(_object_spread({}, basePhoneFormatter), {
|
|
8596
|
-
deformat: function(value) {
|
|
8613
|
+
deformat: function deformat(value) {
|
|
8597
8614
|
var _basePhoneFormatter_deformat;
|
|
8598
8615
|
return (_basePhoneFormatter_deformat = basePhoneFormatter.deformat) === null || _basePhoneFormatter_deformat === void 0 ? void 0 : _basePhoneFormatter_deformat.call(basePhoneFormatter, value);
|
|
8599
8616
|
},
|
|
8600
|
-
format: function(value) {
|
|
8617
|
+
format: function format(value) {
|
|
8618
|
+
var _ref;
|
|
8601
8619
|
var _basePhoneFormatter_format;
|
|
8602
|
-
|
|
8603
|
-
return (_basePhoneFormatter_format1 = (_basePhoneFormatter_format = basePhoneFormatter.format) === null || _basePhoneFormatter_format === void 0 ? void 0 : _basePhoneFormatter_format.call(basePhoneFormatter, value === "(" ? "" : value)) !== null && _basePhoneFormatter_format1 !== void 0 ? _basePhoneFormatter_format1 : value;
|
|
8620
|
+
return (_ref = (_basePhoneFormatter_format = basePhoneFormatter.format) === null || _basePhoneFormatter_format === void 0 ? void 0 : _basePhoneFormatter_format.call(basePhoneFormatter, value === "(" ? "" : value)) !== null && _ref !== void 0 ? _ref : value;
|
|
8604
8621
|
}
|
|
8605
8622
|
});
|
|
8606
8623
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/common-types/core/src/index.ts
|