@player-ui/common-types-plugin 0.13.0-next.7 → 0.14.0-next.0

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.
@@ -1454,22 +1454,6 @@ var CommonTypesPlugin = function() {
1454
1454
  }
1455
1455
  });
1456
1456
  };
1457
- var unpackNode = function unpackNode(item) {
1458
- var _item_children_, _item_children, _item_children_1, _item_children1;
1459
- var unpacked = [];
1460
- if ("children" in item && ((_item_children = item.children) === null || _item_children === void 0 ? void 0 : (_item_children_ = _item_children[0]) === null || _item_children_ === void 0 ? void 0 : _item_children_.value.type) === "asset" && ((_item_children1 = item.children) === null || _item_children1 === void 0 ? void 0 : (_item_children_1 = _item_children1[0]) === null || _item_children_1 === void 0 ? void 0 : _item_children_1.value).children) {
1461
- var _item_children__value_children_, _item_children__value_children, _item_children_2, _item_children2;
1462
- if (((_item_children__value_children = ((_item_children2 = item.children) === null || _item_children2 === void 0 ? void 0 : (_item_children_2 = _item_children2[0]) === null || _item_children_2 === void 0 ? void 0 : _item_children_2.value).children) === null || _item_children__value_children === void 0 ? void 0 : (_item_children__value_children_ = _item_children__value_children[0]) === null || _item_children__value_children_ === void 0 ? void 0 : _item_children__value_children_.value.type) === "multi-node") {
1463
- var _item_children__value_children_1, _item_children__value_children1, _item_children_3, _item_children3;
1464
- ((_item_children__value_children1 = ((_item_children3 = item.children) === null || _item_children3 === void 0 ? void 0 : (_item_children_3 = _item_children3[0]) === null || _item_children_3 === void 0 ? void 0 : _item_children_3.value).children) === null || _item_children__value_children1 === void 0 ? void 0 : (_item_children__value_children_1 = _item_children__value_children1[0]) === null || _item_children__value_children_1 === void 0 ? void 0 : _item_children__value_children_1.value).values.forEach(function(value) {
1465
- unpacked.push(value);
1466
- });
1467
- }
1468
- } else {
1469
- unpacked.push(item);
1470
- }
1471
- return unpacked;
1472
- };
1473
1457
  var hasSomethingToResolve = function hasSomethingToResolve(str) {
1474
1458
  return bindingResolveLookup(str) || expressionResolveLookup(str);
1475
1459
  };
@@ -2843,6 +2827,7 @@ var CommonTypesPlugin = function() {
2843
2827
  }
2844
2828
  };
2845
2829
  var identifier = function() {
2830
+ var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
2846
2831
  if (!isIdentifierChar(ch)) {
2847
2832
  return;
2848
2833
  }
@@ -2853,6 +2838,14 @@ var CommonTypesPlugin = function() {
2853
2838
  }
2854
2839
  value += ch;
2855
2840
  }
2841
+ if (allowBoolValue) {
2842
+ if (value === "true") {
2843
+ return toValue(true);
2844
+ }
2845
+ if (value === "false") {
2846
+ return toValue(false);
2847
+ }
2848
+ }
2856
2849
  if (value) {
2857
2850
  var maybeNumber = Number(value);
2858
2851
  value = isNaN(maybeNumber) ? value : maybeNumber;
@@ -2901,8 +2894,9 @@ var CommonTypesPlugin = function() {
2901
2894
  }
2902
2895
  };
2903
2896
  var simpleSegment = function() {
2897
+ var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
2904
2898
  var _nestedPath, _ref;
2905
- return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression2()) !== null && _ref !== void 0 ? _ref : identifier();
2899
+ return (_ref = (_nestedPath = nestedPath()) !== null && _nestedPath !== void 0 ? _nestedPath : expression2()) !== null && _ref !== void 0 ? _ref : identifier(allowBoolValue);
2906
2900
  };
2907
2901
  var segment = function() {
2908
2902
  var segments = [];
@@ -2917,6 +2911,7 @@ var CommonTypesPlugin = function() {
2917
2911
  return toConcatenatedNode(segments);
2918
2912
  };
2919
2913
  var optionallyQuotedSegment = function() {
2914
+ var allowBoolValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
2920
2915
  whitespace();
2921
2916
  if (ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE) {
2922
2917
  var singleQuote = ch === SINGLE_QUOTE;
@@ -2925,7 +2920,7 @@ var CommonTypesPlugin = function() {
2925
2920
  next(singleQuote ? SINGLE_QUOTE : DOUBLE_QUOTE);
2926
2921
  return id;
2927
2922
  }
2928
- return simpleSegment();
2923
+ return simpleSegment(allowBoolValue);
2929
2924
  };
2930
2925
  var equals = function() {
2931
2926
  if (ch !== EQUALS) {
@@ -2945,7 +2940,7 @@ var CommonTypesPlugin = function() {
2945
2940
  whitespace();
2946
2941
  if (equals()) {
2947
2942
  whitespace();
2948
- var second = optionallyQuotedSegment();
2943
+ var second = optionallyQuotedSegment(true);
2949
2944
  value = toQuery(value, second);
2950
2945
  whitespace();
2951
2946
  }
@@ -3133,7 +3128,7 @@ var CommonTypesPlugin = function() {
3133
3128
  appendPathSegments(getValueForNode(resolvedNode));
3134
3129
  break;
3135
3130
  case "Value":
3136
- appendPathSegments(resolvedNode.value);
3131
+ appendPathSegments(typeof resolvedNode.value === "boolean" ? String(resolvedNode.value) : resolvedNode.value);
3137
3132
  break;
3138
3133
  case "Query":
3139
3134
  {
@@ -4700,23 +4695,8 @@ var CommonTypesPlugin = function() {
4700
4695
  function Parser() {
4701
4696
  _class_call_check(this, Parser);
4702
4697
  this.hooks = {
4703
- /**
4704
- * A hook to interact with an object _before_ parsing it into an AST
4705
- *
4706
- * @param value - The object we're are about to parse
4707
- * @returns - A new value to parse.
4708
- * If undefined, the original value is used.
4709
- * If null, we stop parsing this node.
4710
- */ onParseObject: new SyncWaterfallHook(),
4711
- /**
4712
- * A callback to interact with an AST _after_ we parse it into the AST
4713
- *
4714
- * @param value - The object we parsed
4715
- * @param node - The AST node we generated
4716
- * @returns - A new AST node to use
4717
- * If undefined, the original value is used.
4718
- * If null, we ignore this node all together
4719
- */ onCreateASTNode: new SyncWaterfallHook(),
4698
+ onParseObject: new SyncWaterfallHook(),
4699
+ onCreateASTNode: new SyncWaterfallHook(),
4720
4700
  parseNode: new SyncBailHook()
4721
4701
  };
4722
4702
  }
@@ -4858,20 +4838,14 @@ var CommonTypesPlugin = function() {
4858
4838
  function Resolver(root, options) {
4859
4839
  _class_call_check(this, Resolver);
4860
4840
  this.hooks = {
4861
- /** A hook to allow skipping of the resolution tree for a specific node */ skipResolve: new SyncWaterfallHook(),
4862
- /** An event emitted before calculating the next update */ beforeUpdate: new SyncHook(),
4863
- /** An event emitted after calculating the next update */ afterUpdate: new SyncHook(),
4864
- /** The options passed to a node to resolve it to an object */ resolveOptions: new SyncWaterfallHook(),
4865
- /** A hook to transform the AST node into a new AST node before resolving it */ beforeResolve: new SyncWaterfallHook(),
4866
- /**
4867
- * A hook to transform an AST node into it's resolved value.
4868
- * This runs _before_ any children are resolved
4869
- */ resolve: new SyncWaterfallHook(),
4870
- /**
4871
- * A hook to transform the resolved value of an AST node.
4872
- * This runs _after_ all children nodes are resolved
4873
- */ afterResolve: new SyncWaterfallHook(),
4874
- /** Called at the very end of a node's tree being updated */ afterNodeUpdate: new SyncHook()
4841
+ skipResolve: new SyncWaterfallHook(),
4842
+ beforeUpdate: new SyncHook(),
4843
+ afterUpdate: new SyncHook(),
4844
+ resolveOptions: new SyncWaterfallHook(),
4845
+ beforeResolve: new SyncWaterfallHook(),
4846
+ resolve: new SyncWaterfallHook(),
4847
+ afterResolve: new SyncWaterfallHook(),
4848
+ afterNodeUpdate: new SyncHook()
4875
4849
  };
4876
4850
  this.root = root;
4877
4851
  this.options = options;
@@ -4879,6 +4853,7 @@ var CommonTypesPlugin = function() {
4879
4853
  this.ASTMap = /* @__PURE__ */ new Map();
4880
4854
  this.logger = options.logger;
4881
4855
  this.idCache = /* @__PURE__ */ new Set();
4856
+ this.AsyncIdMap = /* @__PURE__ */ new Map();
4882
4857
  }
4883
4858
  _create_class(Resolver, [
4884
4859
  {
@@ -4889,13 +4864,27 @@ var CommonTypesPlugin = function() {
4889
4864
  },
4890
4865
  {
4891
4866
  key: "update",
4892
- value: function update(changes) {
4867
+ value: function update(changes, asyncChanges) {
4868
+ var _this = this;
4893
4869
  this.hooks.beforeUpdate.call(changes);
4894
4870
  var resolveCache = /* @__PURE__ */ new Map();
4895
4871
  this.idCache.clear();
4896
4872
  var prevASTMap = new Map(this.ASTMap);
4897
4873
  this.ASTMap.clear();
4898
- var updated = this.computeTree(this.root, void 0, changes, resolveCache, toNodeResolveOptions(this.options), void 0, prevASTMap);
4874
+ var prevAsyncIdMap = new Map(this.AsyncIdMap);
4875
+ var nextAsyncIdMap = /* @__PURE__ */ new Map();
4876
+ asyncChanges === null || asyncChanges === void 0 ? void 0 : asyncChanges.forEach(function(id) {
4877
+ var current = prevAsyncIdMap.get(id);
4878
+ while(current && prevASTMap.has(current)){
4879
+ var next = prevASTMap.get(current);
4880
+ if (next && _this.resolveCache.has(next)) {
4881
+ _this.resolveCache.delete(next);
4882
+ }
4883
+ current = current.parent;
4884
+ }
4885
+ });
4886
+ var updated = this.computeTree(this.root, void 0, changes, resolveCache, toNodeResolveOptions(this.options), void 0, prevASTMap, nextAsyncIdMap);
4887
+ this.AsyncIdMap = nextAsyncIdMap;
4899
4888
  this.resolveCache = resolveCache;
4900
4889
  this.hooks.afterUpdate.call(updated.value);
4901
4890
  return updated.value;
@@ -4949,9 +4938,8 @@ var CommonTypesPlugin = function() {
4949
4938
  },
4950
4939
  {
4951
4940
  key: "computeTree",
4952
- value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap) {
4941
+ value: function computeTree(node, rawParent, dataChanges, cacheUpdate, options, partiallyResolvedParent, prevASTMap, nextAsyncIdMap) {
4953
4942
  var _this = this;
4954
- var _partiallyResolvedParent_parent_parent, _partiallyResolvedParent_parent, _resolvedAST_parent, _partiallyResolvedParent_parent1;
4955
4943
  var dependencyModel = new DependencyModel(options.data.model);
4956
4944
  dependencyModel.trackSubset("core");
4957
4945
  var depModelWithParser = withContext(withParser(dependencyModel, this.options.parseBinding));
@@ -4970,15 +4958,6 @@ var CommonTypesPlugin = function() {
4970
4958
  var previousDeps = previousResult === null || previousResult === void 0 ? void 0 : previousResult.dependencies;
4971
4959
  var dataChanged = caresAboutDataChanges(dataChanges, previousDeps);
4972
4960
  var shouldUseLastValue = this.hooks.skipResolve.call(!dataChanged, node, resolveOptions);
4973
- var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
4974
- parent: partiallyResolvedParent
4975
- });
4976
- var _this_hooks_beforeResolve_call;
4977
- var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
4978
- type: "empty"
4979
- };
4980
- var isNestedMultiNodeWithAsync = resolvedAST.type === "multi-node" && (partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : (_partiallyResolvedParent_parent = partiallyResolvedParent.parent) === null || _partiallyResolvedParent_parent === void 0 ? void 0 : (_partiallyResolvedParent_parent_parent = _partiallyResolvedParent_parent.parent) === null || _partiallyResolvedParent_parent_parent === void 0 ? void 0 : _partiallyResolvedParent_parent_parent.type) === "multi-node" && partiallyResolvedParent.parent.type === "value" && ((_resolvedAST_parent = resolvedAST.parent) === null || _resolvedAST_parent === void 0 ? void 0 : _resolvedAST_parent.type) === "asset" && resolvedAST.parent.value.id.includes("async");
4981
- var isNestedMultiNode = resolvedAST.type === "multi-node" && (partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : (_partiallyResolvedParent_parent1 = partiallyResolvedParent.parent) === null || _partiallyResolvedParent_parent1 === void 0 ? void 0 : _partiallyResolvedParent_parent1.type) === "multi-node" && partiallyResolvedParent.type === "value";
4982
4961
  if (previousResult && shouldUseLastValue) {
4983
4962
  var update2 = _object_spread_props(_object_spread({}, previousResult), {
4984
4963
  updated: false
@@ -4990,6 +4969,30 @@ var CommonTypesPlugin = function() {
4990
4969
  updated: false
4991
4970
  });
4992
4971
  cacheUpdate.set(AST, resolvedUpdate);
4972
+ if (resolvedUpdate.node.type === "async") {
4973
+ nextAsyncIdMap.set(resolvedUpdate.node.id, resolvedUpdate.node);
4974
+ }
4975
+ var _resolvedUpdate_node_asyncNodesResolved;
4976
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
4977
+ try {
4978
+ for(var _iterator = ((_resolvedUpdate_node_asyncNodesResolved = resolvedUpdate.node.asyncNodesResolved) !== null && _resolvedUpdate_node_asyncNodesResolved !== void 0 ? _resolvedUpdate_node_asyncNodesResolved : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
4979
+ var key = _step.value;
4980
+ nextAsyncIdMap.set(key, resolvedUpdate.node);
4981
+ }
4982
+ } catch (err) {
4983
+ _didIteratorError = true;
4984
+ _iteratorError = err;
4985
+ } finally{
4986
+ try {
4987
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
4988
+ _iterator.return();
4989
+ }
4990
+ } finally{
4991
+ if (_didIteratorError) {
4992
+ throw _iteratorError;
4993
+ }
4994
+ }
4995
+ }
4993
4996
  var handleChildNode = function(childNode) {
4994
4997
  var _prevASTMap_get;
4995
4998
  var originalChildNode = (_prevASTMap_get = prevASTMap.get(childNode)) !== null && _prevASTMap_get !== void 0 ? _prevASTMap_get : childNode;
@@ -5012,10 +5015,37 @@ var CommonTypesPlugin = function() {
5012
5015
  repopulateASTMapFromCache(previousResult, node, rawParent);
5013
5016
  return update2;
5014
5017
  }
5015
- if (isNestedMultiNodeWithAsync) {
5016
- resolvedAST.parent = partiallyResolvedParent.parent;
5017
- } else {
5018
- resolvedAST.parent = partiallyResolvedParent;
5018
+ var clonedNode = _object_spread_props(_object_spread({}, this.cloneNode(node)), {
5019
+ parent: partiallyResolvedParent
5020
+ });
5021
+ var _this_hooks_beforeResolve_call;
5022
+ var resolvedAST = (_this_hooks_beforeResolve_call = this.hooks.beforeResolve.call(clonedNode, resolveOptions)) !== null && _this_hooks_beforeResolve_call !== void 0 ? _this_hooks_beforeResolve_call : {
5023
+ type: "empty"
5024
+ };
5025
+ resolvedAST.parent = partiallyResolvedParent;
5026
+ if (resolvedAST.type === "async") {
5027
+ nextAsyncIdMap.set(resolvedAST.id, resolvedAST);
5028
+ }
5029
+ var _resolvedAST_asyncNodesResolved;
5030
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5031
+ try {
5032
+ for(var _iterator = ((_resolvedAST_asyncNodesResolved = resolvedAST.asyncNodesResolved) !== null && _resolvedAST_asyncNodesResolved !== void 0 ? _resolvedAST_asyncNodesResolved : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5033
+ var id = _step.value;
5034
+ nextAsyncIdMap.set(id, resolvedAST);
5035
+ }
5036
+ } catch (err) {
5037
+ _didIteratorError = true;
5038
+ _iteratorError = err;
5039
+ } finally{
5040
+ try {
5041
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
5042
+ _iterator.return();
5043
+ }
5044
+ } finally{
5045
+ if (_didIteratorError) {
5046
+ throw _iteratorError;
5047
+ }
5048
+ }
5019
5049
  }
5020
5050
  resolveOptions.node = resolvedAST;
5021
5051
  this.ASTMap.set(resolvedAST, node);
@@ -5029,7 +5059,7 @@ var CommonTypesPlugin = function() {
5029
5059
  if ("children" in resolvedAST) {
5030
5060
  var _resolvedAST_children;
5031
5061
  var newChildren = (_resolvedAST_children = resolvedAST.children) === null || _resolvedAST_children === void 0 ? void 0 : _resolvedAST_children.map(function(child) {
5032
- var computedChildTree = _this.computeTree(child.value, node, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
5062
+ var computedChildTree = _this.computeTree(child.value, node, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap, nextAsyncIdMap);
5033
5063
  var childTreeDeps = computedChildTree.dependencies, childNode = computedChildTree.node, childUpdated = computedChildTree.updated, childValue = computedChildTree.value;
5034
5064
  childTreeDeps.forEach(function(binding) {
5035
5065
  return childDependencies.add(binding);
@@ -5050,40 +5080,18 @@ var CommonTypesPlugin = function() {
5050
5080
  resolvedAST.children = newChildren;
5051
5081
  } else if (resolvedAST.type === "multi-node") {
5052
5082
  var childValue = [];
5053
- var rawParentToPassIn = isNestedMultiNode ? partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : partiallyResolvedParent.parent : node;
5054
- var hasAsync = resolvedAST.values.map(function(value, index) {
5055
- return value.type === "async" ? index : -1;
5056
- }).filter(function(index) {
5057
- return index !== -1;
5058
- });
5059
- var newValues = resolvedAST.values.map(function(mValue) {
5060
- var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
5083
+ var rawParentToPassIn = node;
5084
+ resolvedAST.values = resolvedAST.values.map(function(mValue) {
5085
+ var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap, nextAsyncIdMap);
5061
5086
  if (mTree.value !== void 0 && mTree.value !== null) {
5062
- if (mValue.type === "async" && mValue.flatten && mTree.value.asset && Array.isArray(mTree.value.asset.values)) {
5063
- unpackAndPush(mTree.value, childValue);
5064
- } else {
5065
- childValue.push(mTree.value);
5066
- }
5087
+ mTree.dependencies.forEach(function(bindingDep) {
5088
+ return childDependencies.add(bindingDep);
5089
+ });
5090
+ updated = updated || mTree.updated;
5091
+ childValue.push(mTree.value);
5067
5092
  }
5068
- mTree.dependencies.forEach(function(bindingDep) {
5069
- return childDependencies.add(bindingDep);
5070
- });
5071
- updated = updated || mTree.updated;
5072
5093
  return mTree.node;
5073
5094
  });
5074
- if (hasAsync.length > 0) {
5075
- var copy = newValues;
5076
- hasAsync.forEach(function(index) {
5077
- var _copy;
5078
- if (copy[index]) (_copy = copy).splice.apply(_copy, [
5079
- index,
5080
- 1
5081
- ].concat(_to_consumable_array(unpackNode(copy[index]))));
5082
- });
5083
- resolvedAST.values = copy;
5084
- } else {
5085
- resolvedAST.values = newValues;
5086
- }
5087
5095
  resolved = childValue;
5088
5096
  }
5089
5097
  childDependencies.forEach(function(bindingDep) {
@@ -5104,7 +5112,7 @@ var CommonTypesPlugin = function() {
5104
5112
  value: resolved,
5105
5113
  dependencies: /* @__PURE__ */ new Set(_to_consumable_array(dependencyModel.getDependencies()).concat(_to_consumable_array(childDependencies)))
5106
5114
  };
5107
- this.hooks.afterNodeUpdate.call(node, isNestedMultiNode ? partiallyResolvedParent === null || partiallyResolvedParent === void 0 ? void 0 : partiallyResolvedParent.parent : rawParent, update);
5115
+ this.hooks.afterNodeUpdate.call(node, rawParent, update);
5108
5116
  cacheUpdate.set(node, update);
5109
5117
  return update;
5110
5118
  }
@@ -5112,15 +5120,6 @@ var CommonTypesPlugin = function() {
5112
5120
  ]);
5113
5121
  return Resolver;
5114
5122
  }();
5115
- function unpackAndPush(item, initial) {
5116
- if (item.asset.values && Array.isArray(item.asset.values)) {
5117
- item.asset.values.forEach(function(i) {
5118
- unpackAndPush(i, initial);
5119
- });
5120
- } else {
5121
- initial.push(item);
5122
- }
5123
- }
5124
5123
  var CrossfieldProvider = /*#__PURE__*/ function() {
5125
5124
  function CrossfieldProvider(initialView, parser, logger) {
5126
5125
  _class_call_check(this, CrossfieldProvider);
@@ -5188,9 +5187,11 @@ var CommonTypesPlugin = function() {
5188
5187
  _create_class(ViewInstance, [
5189
5188
  {
5190
5189
  key: "updateAsync",
5191
- value: function updateAsync() {
5190
+ value: function updateAsync(asyncNode) {
5192
5191
  var _this_resolver;
5193
- var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update();
5192
+ var update = (_this_resolver = this.resolver) === null || _this_resolver === void 0 ? void 0 : _this_resolver.update(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set([
5193
+ asyncNode
5194
+ ]));
5194
5195
  this.lastUpdate = update;
5195
5196
  this.hooks.onUpdate.call(update);
5196
5197
  }
@@ -5731,7 +5732,7 @@ var CommonTypesPlugin = function() {
5731
5732
  key: "applyParser",
5732
5733
  value: function applyParser(parser) {
5733
5734
  parser.hooks.parseNode.tap("multi-node", function(obj, nodeType, options, childOptions) {
5734
- if (childOptions && !hasTemplateKey(childOptions.key) && Array.isArray(obj)) {
5735
+ if ((childOptions === void 0 || !hasTemplateKey(childOptions.key)) && Array.isArray(obj)) {
5735
5736
  var values = obj.map(function(childVal) {
5736
5737
  return parser.parseObject(childVal, "value", options);
5737
5738
  }).filter(function(child) {
@@ -5742,7 +5743,7 @@ var CommonTypesPlugin = function() {
5742
5743
  }
5743
5744
  var multiNode = parser.createASTNode({
5744
5745
  type: "multi-node",
5745
- override: !hasTemplateValues(childOptions.parentObj, childOptions.key),
5746
+ override: childOptions !== void 0 && !hasTemplateValues(childOptions.parentObj, childOptions.key),
5746
5747
  values: values
5747
5748
  }, obj);
5748
5749
  if (!multiNode) {
@@ -5753,7 +5754,7 @@ var CommonTypesPlugin = function() {
5753
5754
  v.parent = multiNode;
5754
5755
  });
5755
5756
  }
5756
- return [
5757
+ return childOptions === void 0 ? multiNode : [
5757
5758
  {
5758
5759
  path: _to_consumable_array(childOptions.path).concat([
5759
5760
  childOptions.key