@player-ui/metrics-plugin 0.8.0 → 0.8.1--canary.471.16612
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.
|
@@ -4822,6 +4822,7 @@ var MetricsPlugin = function() {
|
|
|
4822
4822
|
onTemplatePluginCreated: new SyncHook(),
|
|
4823
4823
|
templatePlugin: new SyncHook()
|
|
4824
4824
|
};
|
|
4825
|
+
this.transitioning = true;
|
|
4825
4826
|
this.initialView = initialView;
|
|
4826
4827
|
this.resolverOptions = resolverOptions;
|
|
4827
4828
|
this.hooks.onTemplatePluginCreated.tap("view", function(templatePlugin) {
|
|
@@ -4829,18 +4830,28 @@ var MetricsPlugin = function() {
|
|
|
4829
4830
|
});
|
|
4830
4831
|
}
|
|
4831
4832
|
_create_class(ViewInstance, [
|
|
4833
|
+
{
|
|
4834
|
+
key: "setTransition",
|
|
4835
|
+
value: function setTransition(isTransitioning) {
|
|
4836
|
+
this.transitioning = isTransitioning;
|
|
4837
|
+
}
|
|
4838
|
+
},
|
|
4832
4839
|
{
|
|
4833
4840
|
key: "updateAsync",
|
|
4834
4841
|
value: function updateAsync() {
|
|
4842
|
+
var fromTransitioning = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
4835
4843
|
var _this_resolver;
|
|
4836
4844
|
var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update();
|
|
4837
4845
|
this.lastUpdate = update;
|
|
4838
|
-
this.
|
|
4846
|
+
if (!this.transitioning || this.transitioning && fromTransitioning) {
|
|
4847
|
+
this.hooks.onUpdate.call(update);
|
|
4848
|
+
}
|
|
4839
4849
|
}
|
|
4840
4850
|
},
|
|
4841
4851
|
{
|
|
4842
4852
|
key: "update",
|
|
4843
4853
|
value: function update(changes) {
|
|
4854
|
+
var fromTransitioning = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
4844
4855
|
var _this_resolver;
|
|
4845
4856
|
if (this.rootNode === void 0) {
|
|
4846
4857
|
this.validationProvider = new CrossfieldProvider(this.initialView, this.resolverOptions.parseBinding, this.resolverOptions.logger);
|
|
@@ -4863,7 +4874,10 @@ var MetricsPlugin = function() {
|
|
|
4863
4874
|
return this.lastUpdate;
|
|
4864
4875
|
}
|
|
4865
4876
|
this.lastUpdate = update;
|
|
4866
|
-
this.
|
|
4877
|
+
if (!this.transitioning || this.transitioning && fromTransitioning) {
|
|
4878
|
+
this.hooks.onUpdate.call(update);
|
|
4879
|
+
}
|
|
4880
|
+
this.transitioning = false;
|
|
4867
4881
|
return update;
|
|
4868
4882
|
}
|
|
4869
4883
|
},
|
|
@@ -6667,6 +6681,14 @@ var MetricsPlugin = function() {
|
|
|
6667
6681
|
});
|
|
6668
6682
|
}
|
|
6669
6683
|
_create_class(ViewController, [
|
|
6684
|
+
{
|
|
6685
|
+
key: "setViewsTransition",
|
|
6686
|
+
value: function setViewsTransition(transition) {
|
|
6687
|
+
var _this_previousView, _this_currentView;
|
|
6688
|
+
(_this_previousView = this.previousView) === null || _this_previousView === void 0 ? void 0 : _this_previousView.setTransition(transition);
|
|
6689
|
+
(_this_currentView = this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.setTransition(transition);
|
|
6690
|
+
}
|
|
6691
|
+
},
|
|
6670
6692
|
{
|
|
6671
6693
|
key: "queueUpdate",
|
|
6672
6694
|
value: function queueUpdate(bindings) {
|
|
@@ -6718,10 +6740,12 @@ var MetricsPlugin = function() {
|
|
|
6718
6740
|
if (!source) {
|
|
6719
6741
|
throw new Error("No view with id ".concat(viewId));
|
|
6720
6742
|
}
|
|
6743
|
+
this.previousView = this.currentView;
|
|
6721
6744
|
var view = new ViewInstance(source, this.viewOptions);
|
|
6722
6745
|
this.currentView = view;
|
|
6746
|
+
this.setViewsTransition(true);
|
|
6723
6747
|
this.hooks.view.call(view);
|
|
6724
|
-
view.update();
|
|
6748
|
+
view.update(void 0, true);
|
|
6725
6749
|
}
|
|
6726
6750
|
}
|
|
6727
6751
|
]);
|