@player-ui/markdown-plugin 0.8.0 → 0.8.1--canary.471.16571
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
|
},
|
|
@@ -10866,11 +10880,15 @@ var MarkdownPlugin = function() {
|
|
|
10866
10880
|
options.flowController.hooks.flow.tap("viewController", function(flow3) {
|
|
10867
10881
|
flow3.hooks.transition.tap("viewController", function(_oldState, newState) {
|
|
10868
10882
|
if (newState.value.state_type === "VIEW") {
|
|
10883
|
+
_this.setViewsTransition(true);
|
|
10869
10884
|
_this.onView(newState.value);
|
|
10870
10885
|
} else {
|
|
10871
10886
|
_this.currentView = void 0;
|
|
10872
10887
|
}
|
|
10873
10888
|
});
|
|
10889
|
+
flow3.hooks.afterTransition.tap("view", function(flowInstance) {
|
|
10890
|
+
_this.setViewsTransition(false);
|
|
10891
|
+
});
|
|
10874
10892
|
});
|
|
10875
10893
|
var update = function(updates) {
|
|
10876
10894
|
var silent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
@@ -10903,6 +10921,14 @@ var MarkdownPlugin = function() {
|
|
|
10903
10921
|
});
|
|
10904
10922
|
}
|
|
10905
10923
|
_create_class(ViewController, [
|
|
10924
|
+
{
|
|
10925
|
+
key: "setViewsTransition",
|
|
10926
|
+
value: function setViewsTransition(transition) {
|
|
10927
|
+
var _this_previousView, _this_currentView;
|
|
10928
|
+
(_this_previousView = this.previousView) === null || _this_previousView === void 0 ? void 0 : _this_previousView.setTransition(transition);
|
|
10929
|
+
(_this_currentView = this.currentView) === null || _this_currentView === void 0 ? void 0 : _this_currentView.setTransition(transition);
|
|
10930
|
+
}
|
|
10931
|
+
},
|
|
10906
10932
|
{
|
|
10907
10933
|
key: "queueUpdate",
|
|
10908
10934
|
value: function queueUpdate(bindings) {
|
|
@@ -10954,10 +10980,11 @@ var MarkdownPlugin = function() {
|
|
|
10954
10980
|
if (!source) {
|
|
10955
10981
|
throw new Error("No view with id ".concat(viewId));
|
|
10956
10982
|
}
|
|
10983
|
+
this.previousView = this.currentView;
|
|
10957
10984
|
var view = new ViewInstance(source, this.viewOptions);
|
|
10958
10985
|
this.currentView = view;
|
|
10959
10986
|
this.hooks.view.call(view);
|
|
10960
|
-
view.update();
|
|
10987
|
+
view.update(void 0, true);
|
|
10961
10988
|
}
|
|
10962
10989
|
}
|
|
10963
10990
|
]);
|