@player-ui/markdown-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.
|
@@ -9058,6 +9058,7 @@ var MarkdownPlugin = function() {
|
|
|
9058
9058
|
onTemplatePluginCreated: new SyncHook(),
|
|
9059
9059
|
templatePlugin: new SyncHook()
|
|
9060
9060
|
};
|
|
9061
|
+
this.transitioning = true;
|
|
9061
9062
|
this.initialView = initialView;
|
|
9062
9063
|
this.resolverOptions = resolverOptions;
|
|
9063
9064
|
this.hooks.onTemplatePluginCreated.tap("view", function(templatePlugin) {
|
|
@@ -9065,18 +9066,28 @@ var MarkdownPlugin = function() {
|
|
|
9065
9066
|
});
|
|
9066
9067
|
}
|
|
9067
9068
|
_create_class(ViewInstance, [
|
|
9069
|
+
{
|
|
9070
|
+
key: "setTransition",
|
|
9071
|
+
value: function setTransition(isTransitioning) {
|
|
9072
|
+
this.transitioning = isTransitioning;
|
|
9073
|
+
}
|
|
9074
|
+
},
|
|
9068
9075
|
{
|
|
9069
9076
|
key: "updateAsync",
|
|
9070
9077
|
value: function updateAsync() {
|
|
9078
|
+
var fromTransitioning = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
9071
9079
|
var _this_resolver;
|
|
9072
9080
|
var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update();
|
|
9073
9081
|
this.lastUpdate = update;
|
|
9074
|
-
this.
|
|
9082
|
+
if (!this.transitioning || this.transitioning && fromTransitioning) {
|
|
9083
|
+
this.hooks.onUpdate.call(update);
|
|
9084
|
+
}
|
|
9075
9085
|
}
|
|
9076
9086
|
},
|
|
9077
9087
|
{
|
|
9078
9088
|
key: "update",
|
|
9079
9089
|
value: function update(changes) {
|
|
9090
|
+
var fromTransitioning = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
9080
9091
|
var _this_resolver;
|
|
9081
9092
|
if (this.rootNode === void 0) {
|
|
9082
9093
|
this.validationProvider = new CrossfieldProvider(this.initialView, this.resolverOptions.parseBinding, this.resolverOptions.logger);
|
|
@@ -9099,7 +9110,10 @@ var MarkdownPlugin = function() {
|
|
|
9099
9110
|
return this.lastUpdate;
|
|
9100
9111
|
}
|
|
9101
9112
|
this.lastUpdate = update;
|
|
9102
|
-
this.
|
|
9113
|
+
if (!this.transitioning || this.transitioning && fromTransitioning) {
|
|
9114
|
+
this.hooks.onUpdate.call(update);
|
|
9115
|
+
}
|
|
9116
|
+
this.transitioning = false;
|
|
9103
9117
|
return update;
|
|
9104
9118
|
}
|
|
9105
9119
|
},
|
|
@@ -10903,6 +10917,14 @@ var MarkdownPlugin = function() {
|
|
|
10903
10917
|
});
|
|
10904
10918
|
}
|
|
10905
10919
|
_create_class(ViewController, [
|
|
10920
|
+
{
|
|
10921
|
+
key: "setViewsTransition",
|
|
10922
|
+
value: function setViewsTransition(transition) {
|
|
10923
|
+
var _this_previousView, _this_currentView;
|
|
10924
|
+
(_this_previousView = this.previousView) === null || _this_previousView === void 0 ? void 0 : _this_previousView.setTransition(transition);
|
|
10925
|
+
(_this_currentView = this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.setTransition(transition);
|
|
10926
|
+
}
|
|
10927
|
+
},
|
|
10906
10928
|
{
|
|
10907
10929
|
key: "queueUpdate",
|
|
10908
10930
|
value: function queueUpdate(bindings) {
|
|
@@ -10954,10 +10976,12 @@ var MarkdownPlugin = function() {
|
|
|
10954
10976
|
if (!source) {
|
|
10955
10977
|
throw new Error("No view with id ".concat(viewId));
|
|
10956
10978
|
}
|
|
10979
|
+
this.previousView = this.currentView;
|
|
10957
10980
|
var view = new ViewInstance(source, this.viewOptions);
|
|
10958
10981
|
this.currentView = view;
|
|
10982
|
+
this.setViewsTransition(true);
|
|
10959
10983
|
this.hooks.view.call(view);
|
|
10960
|
-
view.update();
|
|
10984
|
+
view.update(void 0, true);
|
|
10961
10985
|
}
|
|
10962
10986
|
}
|
|
10963
10987
|
]);
|