@player-ui/player 0.10.4-next.2 → 0.10.4-next.3
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.
- package/dist/Player.native.js +41 -6
- package/dist/Player.native.js.map +1 -1
- package/dist/cjs/index.cjs +32 -3
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.legacy-esm.js +32 -3
- package/dist/index.mjs +32 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/view/builder/index.test.ts +38 -0
- package/src/view/builder/index.ts +27 -2
- package/src/view/parser/types.ts +4 -0
- package/src/view/resolver/index.ts +23 -3
- package/types/view/builder/index.d.ts +9 -2
- package/types/view/parser/types.d.ts +4 -0
package/dist/Player.native.js
CHANGED
|
@@ -4954,7 +4954,13 @@ var Player = function() {
|
|
|
4954
4954
|
var newValues = resolvedAST.values.map(function(mValue) {
|
|
4955
4955
|
var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
|
|
4956
4956
|
if (mTree.value !== void 0 && mTree.value !== null) {
|
|
4957
|
-
|
|
4957
|
+
if (mValue.type === "async" /* Async */ && mValue.flatten && mTree.value.asset && Array.isArray(mTree.value.asset.values)) {
|
|
4958
|
+
mTree.value.asset.values.forEach(function(v) {
|
|
4959
|
+
unpackAndPush(v, childValue);
|
|
4960
|
+
});
|
|
4961
|
+
} else {
|
|
4962
|
+
childValue.push(mTree.value);
|
|
4963
|
+
}
|
|
4958
4964
|
}
|
|
4959
4965
|
mTree.dependencies.forEach(function(bindingDep) {
|
|
4960
4966
|
return childDependencies.add(bindingDep);
|
|
@@ -5112,10 +5118,10 @@ var Player = function() {
|
|
|
5112
5118
|
}();
|
|
5113
5119
|
// ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/core/player/src/view/builder/index.ts
|
|
5114
5120
|
var Builder = /*#__PURE__*/ function() {
|
|
5115
|
-
function
|
|
5116
|
-
_class_call_check(this,
|
|
5121
|
+
function _Builder() {
|
|
5122
|
+
_class_call_check(this, _Builder);
|
|
5117
5123
|
}
|
|
5118
|
-
_create_class(
|
|
5124
|
+
_create_class(_Builder, null, [
|
|
5119
5125
|
{
|
|
5120
5126
|
key: "asset",
|
|
5121
5127
|
value: /**
|
|
@@ -5129,6 +5135,14 @@ var Player = function() {
|
|
|
5129
5135
|
};
|
|
5130
5136
|
}
|
|
5131
5137
|
},
|
|
5138
|
+
{
|
|
5139
|
+
key: "assetWrapper",
|
|
5140
|
+
value: function assetWrapper(value) {
|
|
5141
|
+
var valueNode = _Builder.value();
|
|
5142
|
+
_Builder.addChild(valueNode, "asset", value);
|
|
5143
|
+
return valueNode;
|
|
5144
|
+
}
|
|
5145
|
+
},
|
|
5132
5146
|
{
|
|
5133
5147
|
key: "value",
|
|
5134
5148
|
value: /**
|
|
@@ -5148,7 +5162,7 @@ var Player = function() {
|
|
|
5148
5162
|
* Creates a multiNode and associates the multiNode as the parent
|
|
5149
5163
|
* of all the value nodes
|
|
5150
5164
|
*
|
|
5151
|
-
* @param values - the value or
|
|
5165
|
+
* @param values - the value, applicability or async nodes to put in the multinode
|
|
5152
5166
|
*/ function multiNode() {
|
|
5153
5167
|
for(var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++){
|
|
5154
5168
|
values[_key] = arguments[_key];
|
|
@@ -5164,6 +5178,27 @@ var Player = function() {
|
|
|
5164
5178
|
return m;
|
|
5165
5179
|
}
|
|
5166
5180
|
},
|
|
5181
|
+
{
|
|
5182
|
+
key: "asyncNode",
|
|
5183
|
+
value: /**
|
|
5184
|
+
* Creates an async node
|
|
5185
|
+
*
|
|
5186
|
+
* @param id - the id of async node. It should be identical for each async node
|
|
5187
|
+
*/ function asyncNode(id) {
|
|
5188
|
+
var flatten2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
5189
|
+
return {
|
|
5190
|
+
id: id,
|
|
5191
|
+
type: "async" /* Async */ ,
|
|
5192
|
+
flatten: flatten2,
|
|
5193
|
+
value: {
|
|
5194
|
+
type: "value" /* Value */ ,
|
|
5195
|
+
value: {
|
|
5196
|
+
id: id
|
|
5197
|
+
}
|
|
5198
|
+
}
|
|
5199
|
+
};
|
|
5200
|
+
}
|
|
5201
|
+
},
|
|
5167
5202
|
{
|
|
5168
5203
|
key: "addChild",
|
|
5169
5204
|
value: /**
|
|
@@ -5186,7 +5221,7 @@ var Player = function() {
|
|
|
5186
5221
|
}
|
|
5187
5222
|
}
|
|
5188
5223
|
]);
|
|
5189
|
-
return
|
|
5224
|
+
return _Builder;
|
|
5190
5225
|
}();
|
|
5191
5226
|
// ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/core/player/src/view/plugins/template.ts
|
|
5192
5227
|
var TemplatePlugin = /*#__PURE__*/ function() {
|