@player-ui/async-node-plugin 0.11.0--canary.614.21244 → 0.11.0--canary.614.21345
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.
|
@@ -4477,8 +4477,8 @@ var AsyncNodePlugin = function() {
|
|
|
4477
4477
|
return Parser;
|
|
4478
4478
|
}();
|
|
4479
4479
|
function unpackAndPush(item, initial) {
|
|
4480
|
-
if (Array.isArray(item)) {
|
|
4481
|
-
item.forEach(function(i) {
|
|
4480
|
+
if (item.asset.values && Array.isArray(item.asset.values)) {
|
|
4481
|
+
item.asset.values.forEach(function(i) {
|
|
4482
4482
|
unpackAndPush(i, initial);
|
|
4483
4483
|
});
|
|
4484
4484
|
} else {
|
|
@@ -4706,9 +4706,7 @@ var AsyncNodePlugin = function() {
|
|
|
4706
4706
|
var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
|
|
4707
4707
|
if (mTree.value !== void 0 && mTree.value !== null) {
|
|
4708
4708
|
if (mValue.type === "async" && mValue.flatten && mTree.value.asset && Array.isArray(mTree.value.asset.values)) {
|
|
4709
|
-
mTree.value
|
|
4710
|
-
unpackAndPush(v, childValue);
|
|
4711
|
-
});
|
|
4709
|
+
unpackAndPush(mTree.value, childValue);
|
|
4712
4710
|
} else {
|
|
4713
4711
|
childValue.push(mTree.value);
|
|
4714
4712
|
}
|
|
@@ -5059,15 +5057,15 @@ var AsyncNodePlugin = function() {
|
|
|
5059
5057
|
}
|
|
5060
5058
|
return node;
|
|
5061
5059
|
});
|
|
5062
|
-
function getTemplateSymbolValue(node) {
|
|
5063
|
-
if (node.type === "multi-node") {
|
|
5064
|
-
return node[templateSymbol];
|
|
5065
|
-
} else if (node.type === "template") {
|
|
5066
|
-
return node.placement;
|
|
5067
|
-
}
|
|
5068
|
-
return void 0;
|
|
5069
|
-
}
|
|
5070
5060
|
parser.hooks.onCreateASTNode.tap("template-sort", function(node) {
|
|
5061
|
+
var getTemplateSymbolValue = function getTemplateSymbolValue(node2) {
|
|
5062
|
+
if (node2.type === "multi-node") {
|
|
5063
|
+
return node2[templateSymbol];
|
|
5064
|
+
} else if (node2.type === "template") {
|
|
5065
|
+
return node2.placement;
|
|
5066
|
+
}
|
|
5067
|
+
return void 0;
|
|
5068
|
+
};
|
|
5071
5069
|
if (node && (node.type === "view" || node.type === "asset") && Array.isArray(node.children)) {
|
|
5072
5070
|
node.children = node.children.sort(function(a, b) {
|
|
5073
5071
|
var pathsEqual = a.path.join() === b.path.join();
|
|
@@ -5137,7 +5135,6 @@ var AsyncNodePlugin = function() {
|
|
|
5137
5135
|
value: function apply(view) {
|
|
5138
5136
|
view.hooks.parser.tap("template", this.applyParser.bind(this));
|
|
5139
5137
|
view.hooks.resolver.tap("template", this.applyResolverHooks.bind(this));
|
|
5140
|
-
view.hooks.onTemplatePluginCreated.call(this);
|
|
5141
5138
|
}
|
|
5142
5139
|
}
|
|
5143
5140
|
]);
|