@player-ui/common-expressions-plugin 0.15.5-next.0 → 0.15.5
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/CommonExpressionsPlugin.native.js +53 -43
- package/dist/CommonExpressionsPlugin.native.js.map +1 -1
- package/dist/xlr/Expressions.ceil.json +1 -1
- package/dist/xlr/Expressions.concat.json +1 -1
- package/dist/xlr/Expressions.containsAny.json +1 -1
- package/dist/xlr/Expressions.findProperty.json +1 -1
- package/dist/xlr/Expressions.findPropertyIndex.json +1 -1
- package/dist/xlr/Expressions.floor.json +1 -1
- package/dist/xlr/Expressions.isEmpty.json +1 -1
- package/dist/xlr/Expressions.isNotEmpty.json +1 -1
- package/dist/xlr/Expressions.length.json +1 -1
- package/dist/xlr/Expressions.lowerCase.json +1 -1
- package/dist/xlr/Expressions.number.json +1 -1
- package/dist/xlr/Expressions.replace.json +1 -1
- package/dist/xlr/Expressions.round.json +1 -1
- package/dist/xlr/Expressions.sentenceCase.json +1 -1
- package/dist/xlr/Expressions.size.json +1 -1
- package/dist/xlr/Expressions.split.json +1 -1
- package/dist/xlr/Expressions.substr.json +1 -1
- package/dist/xlr/Expressions.sum.json +1 -1
- package/dist/xlr/Expressions.titleCase.json +1 -1
- package/dist/xlr/Expressions.trim.json +1 -1
- package/dist/xlr/Expressions.upperCase.json +1 -1
- package/package.json +3 -3
|
@@ -4668,6 +4668,12 @@ var CommonExpressionsPlugin = function() {
|
|
|
4668
4668
|
this.shadowModelPaths = removeBindingAndChildrenFromMap(this.shadowModelPaths, binding);
|
|
4669
4669
|
return next === null || next === void 0 ? void 0 : next.delete(binding, options);
|
|
4670
4670
|
}
|
|
4671
|
+
},
|
|
4672
|
+
{
|
|
4673
|
+
/** Clears any invalid values staged in the shadow model */ key: "reset",
|
|
4674
|
+
value: function reset() {
|
|
4675
|
+
this.shadowModelPaths.clear();
|
|
4676
|
+
}
|
|
4671
4677
|
}
|
|
4672
4678
|
]);
|
|
4673
4679
|
return ValidationMiddleware;
|
|
@@ -6589,6 +6595,47 @@ var CommonExpressionsPlugin = function() {
|
|
|
6589
6595
|
/** Return the middleware for the data-model to stop propagation of invalid data */ key: "getDataMiddleware",
|
|
6590
6596
|
value: function getDataMiddleware() {
|
|
6591
6597
|
var _this = this;
|
|
6598
|
+
var validationMiddleware = new ValidationMiddleware(function(binding) {
|
|
6599
|
+
var _strongValidation_get;
|
|
6600
|
+
if (!_this.options) {
|
|
6601
|
+
return;
|
|
6602
|
+
}
|
|
6603
|
+
_this.updateValidationsForBinding(binding, "change", _this.options);
|
|
6604
|
+
var strongValidation = _this.getValidationForBinding(binding);
|
|
6605
|
+
if ((strongValidation === null || strongValidation === void 0 ? void 0 : (_strongValidation_get = strongValidation.get()) === null || _strongValidation_get === void 0 ? void 0 : _strongValidation_get.severity) === "error") {
|
|
6606
|
+
return strongValidation.get();
|
|
6607
|
+
}
|
|
6608
|
+
var newInvalidBindings = /* @__PURE__ */ new Set();
|
|
6609
|
+
_this.validations.forEach(function(weakValidation, strongBinding) {
|
|
6610
|
+
var _weakValidation_get;
|
|
6611
|
+
if (caresAboutDataChanges(/* @__PURE__ */ new Set([
|
|
6612
|
+
binding
|
|
6613
|
+
]), weakValidation.weakBindings) && (weakValidation === null || weakValidation === void 0 ? void 0 : (_weakValidation_get = weakValidation.get()) === null || _weakValidation_get === void 0 ? void 0 : _weakValidation_get.severity) === "error") {
|
|
6614
|
+
weakValidation === null || weakValidation === void 0 ? void 0 : weakValidation.weakBindings.forEach(function(weakBinding) {
|
|
6615
|
+
if (weakBinding === strongBinding) {
|
|
6616
|
+
newInvalidBindings.add({
|
|
6617
|
+
binding: weakBinding,
|
|
6618
|
+
isStrong: true
|
|
6619
|
+
});
|
|
6620
|
+
} else {
|
|
6621
|
+
newInvalidBindings.add({
|
|
6622
|
+
binding: weakBinding,
|
|
6623
|
+
isStrong: false
|
|
6624
|
+
});
|
|
6625
|
+
}
|
|
6626
|
+
});
|
|
6627
|
+
}
|
|
6628
|
+
});
|
|
6629
|
+
if (newInvalidBindings.size > 0) {
|
|
6630
|
+
return newInvalidBindings;
|
|
6631
|
+
}
|
|
6632
|
+
}, {
|
|
6633
|
+
logger: new ProxyLogger(function() {
|
|
6634
|
+
var _this_options;
|
|
6635
|
+
return (_this_options = _this.options) === null || _this_options === void 0 ? void 0 : _this_options.logger;
|
|
6636
|
+
})
|
|
6637
|
+
});
|
|
6638
|
+
this.validationMiddleware = validationMiddleware;
|
|
6592
6639
|
return [
|
|
6593
6640
|
{
|
|
6594
6641
|
set: function set(transaction, options, next) {
|
|
@@ -6603,46 +6650,7 @@ var CommonExpressionsPlugin = function() {
|
|
|
6603
6650
|
return next === null || next === void 0 ? void 0 : next.delete(binding, options);
|
|
6604
6651
|
}
|
|
6605
6652
|
},
|
|
6606
|
-
|
|
6607
|
-
var _strongValidation_get;
|
|
6608
|
-
if (!_this.options) {
|
|
6609
|
-
return;
|
|
6610
|
-
}
|
|
6611
|
-
_this.updateValidationsForBinding(binding, "change", _this.options);
|
|
6612
|
-
var strongValidation = _this.getValidationForBinding(binding);
|
|
6613
|
-
if ((strongValidation === null || strongValidation === void 0 ? void 0 : (_strongValidation_get = strongValidation.get()) === null || _strongValidation_get === void 0 ? void 0 : _strongValidation_get.severity) === "error") {
|
|
6614
|
-
return strongValidation.get();
|
|
6615
|
-
}
|
|
6616
|
-
var newInvalidBindings = /* @__PURE__ */ new Set();
|
|
6617
|
-
_this.validations.forEach(function(weakValidation, strongBinding) {
|
|
6618
|
-
var _weakValidation_get;
|
|
6619
|
-
if (caresAboutDataChanges(/* @__PURE__ */ new Set([
|
|
6620
|
-
binding
|
|
6621
|
-
]), weakValidation.weakBindings) && (weakValidation === null || weakValidation === void 0 ? void 0 : (_weakValidation_get = weakValidation.get()) === null || _weakValidation_get === void 0 ? void 0 : _weakValidation_get.severity) === "error") {
|
|
6622
|
-
weakValidation === null || weakValidation === void 0 ? void 0 : weakValidation.weakBindings.forEach(function(weakBinding) {
|
|
6623
|
-
if (weakBinding === strongBinding) {
|
|
6624
|
-
newInvalidBindings.add({
|
|
6625
|
-
binding: weakBinding,
|
|
6626
|
-
isStrong: true
|
|
6627
|
-
});
|
|
6628
|
-
} else {
|
|
6629
|
-
newInvalidBindings.add({
|
|
6630
|
-
binding: weakBinding,
|
|
6631
|
-
isStrong: false
|
|
6632
|
-
});
|
|
6633
|
-
}
|
|
6634
|
-
});
|
|
6635
|
-
}
|
|
6636
|
-
});
|
|
6637
|
-
if (newInvalidBindings.size > 0) {
|
|
6638
|
-
return newInvalidBindings;
|
|
6639
|
-
}
|
|
6640
|
-
}, {
|
|
6641
|
-
logger: new ProxyLogger(function() {
|
|
6642
|
-
var _this_options;
|
|
6643
|
-
return (_this_options = _this.options) === null || _this_options === void 0 ? void 0 : _this_options.logger;
|
|
6644
|
-
})
|
|
6645
|
-
})
|
|
6653
|
+
validationMiddleware
|
|
6646
6654
|
];
|
|
6647
6655
|
}
|
|
6648
6656
|
},
|
|
@@ -6678,15 +6686,17 @@ var CommonExpressionsPlugin = function() {
|
|
|
6678
6686
|
{
|
|
6679
6687
|
key: "reset",
|
|
6680
6688
|
value: function reset() {
|
|
6689
|
+
var _this_validationMiddleware;
|
|
6681
6690
|
this.validations.clear();
|
|
6682
6691
|
this.tracker = void 0;
|
|
6692
|
+
(_this_validationMiddleware = this.validationMiddleware) === null || _this_validationMiddleware === void 0 ? void 0 : _this_validationMiddleware.reset();
|
|
6683
6693
|
}
|
|
6684
6694
|
},
|
|
6685
6695
|
{
|
|
6686
6696
|
key: "onView",
|
|
6687
6697
|
value: function onView(view) {
|
|
6688
6698
|
var _this = this;
|
|
6689
|
-
this.
|
|
6699
|
+
this.reset();
|
|
6690
6700
|
if (!this.options) {
|
|
6691
6701
|
return;
|
|
6692
6702
|
}
|
|
@@ -7517,8 +7527,8 @@ var CommonExpressionsPlugin = function() {
|
|
|
7517
7527
|
ref: Symbol("not-started"),
|
|
7518
7528
|
status: "not-started"
|
|
7519
7529
|
};
|
|
7520
|
-
var PLAYER_VERSION = true ? "0.15.5
|
|
7521
|
-
var COMMIT = true ? "
|
|
7530
|
+
var PLAYER_VERSION = true ? "0.15.5" : "unknown";
|
|
7531
|
+
var COMMIT = true ? "69e4f473071f889133b4c9b8414c092d8587fa53" : "unknown";
|
|
7522
7532
|
var _Player = /*#__PURE__*/ function() {
|
|
7523
7533
|
function _Player2(config) {
|
|
7524
7534
|
var _this = this;
|