@player-ui/async-node-plugin 0.10.5--canary.609.21254 → 0.10.5--canary.597.21388
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/AsyncNodePlugin.native.js +13 -159
- package/dist/AsyncNodePlugin.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -32
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.legacy-esm.js +5 -29
- package/dist/index.mjs +5 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -5
- package/src/__tests__/index.test.ts +0 -329
- package/src/index.ts +0 -1
- package/src/types.ts +0 -7
- package/types/index.d.ts +0 -1
- package/types/types.d.ts +0 -1
- package/src/__tests__/__snapshots__/transform.test.ts.snap +0 -58
- package/src/__tests__/transform.test.ts +0 -25
- package/src/transform.ts +0 -40
- package/types/transform.d.ts +0 -11
|
@@ -2038,9 +2038,6 @@ var AsyncNodePlugin = function() {
|
|
|
2038
2038
|
},
|
|
2039
2039
|
AsyncNodePluginPlugin: function() {
|
|
2040
2040
|
return AsyncNodePluginPlugin;
|
|
2041
|
-
},
|
|
2042
|
-
asyncTransform: function() {
|
|
2043
|
-
return asyncTransform;
|
|
2044
2041
|
}
|
|
2045
2042
|
});
|
|
2046
2043
|
var InterceptionManager = /*#__PURE__*/ function() {
|
|
@@ -4327,18 +4324,18 @@ var AsyncNodePlugin = function() {
|
|
|
4327
4324
|
]);
|
|
4328
4325
|
return ValidatorRegistry;
|
|
4329
4326
|
}();
|
|
4330
|
-
var NodeType = /* @__PURE__ */ function(
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
return
|
|
4327
|
+
var NodeType = /* @__PURE__ */ function(NodeType2) {
|
|
4328
|
+
NodeType2["Asset"] = "asset";
|
|
4329
|
+
NodeType2["View"] = "view";
|
|
4330
|
+
NodeType2["Applicability"] = "applicability";
|
|
4331
|
+
NodeType2["Template"] = "template";
|
|
4332
|
+
NodeType2["Value"] = "value";
|
|
4333
|
+
NodeType2["MultiNode"] = "multi-node";
|
|
4334
|
+
NodeType2["Switch"] = "switch";
|
|
4335
|
+
NodeType2["Async"] = "async";
|
|
4336
|
+
NodeType2["Unknown"] = "unknown";
|
|
4337
|
+
NodeType2["Empty"] = "empty";
|
|
4338
|
+
return NodeType2;
|
|
4342
4339
|
}(NodeType || {});
|
|
4343
4340
|
var EMPTY_NODE = {
|
|
4344
4341
|
type: "empty"
|
|
@@ -4476,15 +4473,6 @@ var AsyncNodePlugin = function() {
|
|
|
4476
4473
|
]);
|
|
4477
4474
|
return Parser;
|
|
4478
4475
|
}();
|
|
4479
|
-
function unpackAndPush(item, initial) {
|
|
4480
|
-
if (Array.isArray(item)) {
|
|
4481
|
-
item.forEach(function(i) {
|
|
4482
|
-
unpackAndPush(i, initial);
|
|
4483
|
-
});
|
|
4484
|
-
} else {
|
|
4485
|
-
initial.push(item);
|
|
4486
|
-
}
|
|
4487
|
-
}
|
|
4488
4476
|
var withContext = function(model) {
|
|
4489
4477
|
return {
|
|
4490
4478
|
get: function(binding, options) {
|
|
@@ -4705,13 +4693,7 @@ var AsyncNodePlugin = function() {
|
|
|
4705
4693
|
var newValues = resolvedAST.values.map(function(mValue) {
|
|
4706
4694
|
var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
|
|
4707
4695
|
if (mTree.value !== void 0 && mTree.value !== null) {
|
|
4708
|
-
|
|
4709
|
-
mTree.value.asset.values.forEach(function(v) {
|
|
4710
|
-
unpackAndPush(v, childValue);
|
|
4711
|
-
});
|
|
4712
|
-
} else {
|
|
4713
|
-
childValue.push(mTree.value);
|
|
4714
|
-
}
|
|
4696
|
+
childValue.push(mTree.value);
|
|
4715
4697
|
}
|
|
4716
4698
|
mTree.dependencies.forEach(function(bindingDep) {
|
|
4717
4699
|
return childDependencies.add(bindingDep);
|
|
@@ -4866,112 +4848,6 @@ var AsyncNodePlugin = function() {
|
|
|
4866
4848
|
]);
|
|
4867
4849
|
return ViewInstance;
|
|
4868
4850
|
}();
|
|
4869
|
-
var Builder = /*#__PURE__*/ function() {
|
|
4870
|
-
function _Builder() {
|
|
4871
|
-
_class_call_check(this, _Builder);
|
|
4872
|
-
}
|
|
4873
|
-
_create_class(_Builder, null, [
|
|
4874
|
-
{
|
|
4875
|
-
key: "asset",
|
|
4876
|
-
value: /**
|
|
4877
|
-
* Creates an asset node
|
|
4878
|
-
*
|
|
4879
|
-
* @param value - the value to put in the asset node
|
|
4880
|
-
*/ function asset(value) {
|
|
4881
|
-
return {
|
|
4882
|
-
type: "asset",
|
|
4883
|
-
value: value
|
|
4884
|
-
};
|
|
4885
|
-
}
|
|
4886
|
-
},
|
|
4887
|
-
{
|
|
4888
|
-
key: "assetWrapper",
|
|
4889
|
-
value: function assetWrapper(value) {
|
|
4890
|
-
var valueNode = _Builder.value();
|
|
4891
|
-
_Builder.addChild(valueNode, "asset", value);
|
|
4892
|
-
return valueNode;
|
|
4893
|
-
}
|
|
4894
|
-
},
|
|
4895
|
-
{
|
|
4896
|
-
key: "value",
|
|
4897
|
-
value: /**
|
|
4898
|
-
* Creates a value node
|
|
4899
|
-
*
|
|
4900
|
-
* @param v - The object to put in the value node
|
|
4901
|
-
*/ function value(v) {
|
|
4902
|
-
return {
|
|
4903
|
-
type: "value",
|
|
4904
|
-
value: v
|
|
4905
|
-
};
|
|
4906
|
-
}
|
|
4907
|
-
},
|
|
4908
|
-
{
|
|
4909
|
-
key: "multiNode",
|
|
4910
|
-
value: /**
|
|
4911
|
-
* Creates a multiNode and associates the multiNode as the parent
|
|
4912
|
-
* of all the value nodes
|
|
4913
|
-
*
|
|
4914
|
-
* @param values - the value, applicability or async nodes to put in the multinode
|
|
4915
|
-
*/ function multiNode() {
|
|
4916
|
-
for(var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++){
|
|
4917
|
-
values[_key] = arguments[_key];
|
|
4918
|
-
}
|
|
4919
|
-
var m = {
|
|
4920
|
-
type: "multi-node",
|
|
4921
|
-
override: true,
|
|
4922
|
-
values: values
|
|
4923
|
-
};
|
|
4924
|
-
values.forEach(function(v) {
|
|
4925
|
-
v.parent = m;
|
|
4926
|
-
});
|
|
4927
|
-
return m;
|
|
4928
|
-
}
|
|
4929
|
-
},
|
|
4930
|
-
{
|
|
4931
|
-
key: "asyncNode",
|
|
4932
|
-
value: /**
|
|
4933
|
-
* Creates an async node
|
|
4934
|
-
*
|
|
4935
|
-
* @param id - the id of async node. It should be identical for each async node
|
|
4936
|
-
*/ function asyncNode(id) {
|
|
4937
|
-
var flatten2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
4938
|
-
return {
|
|
4939
|
-
id: id,
|
|
4940
|
-
type: "async",
|
|
4941
|
-
flatten: flatten2,
|
|
4942
|
-
value: {
|
|
4943
|
-
type: "value",
|
|
4944
|
-
value: {
|
|
4945
|
-
id: id
|
|
4946
|
-
}
|
|
4947
|
-
}
|
|
4948
|
-
};
|
|
4949
|
-
}
|
|
4950
|
-
},
|
|
4951
|
-
{
|
|
4952
|
-
key: "addChild",
|
|
4953
|
-
value: /**
|
|
4954
|
-
* Adds a child node to a node
|
|
4955
|
-
*
|
|
4956
|
-
* @param node - The node to add a child to
|
|
4957
|
-
* @param path - The path at which to add the child
|
|
4958
|
-
* @param child - The child node
|
|
4959
|
-
*/ function addChild(node, path, child) {
|
|
4960
|
-
child.parent = node;
|
|
4961
|
-
var newChild = {
|
|
4962
|
-
path: Array.isArray(path) ? path : [
|
|
4963
|
-
path
|
|
4964
|
-
],
|
|
4965
|
-
value: child
|
|
4966
|
-
};
|
|
4967
|
-
node.children = node.children || [];
|
|
4968
|
-
node.children.push(newChild);
|
|
4969
|
-
return node;
|
|
4970
|
-
}
|
|
4971
|
-
}
|
|
4972
|
-
]);
|
|
4973
|
-
return _Builder;
|
|
4974
|
-
}();
|
|
4975
4851
|
var TemplatePlugin = /*#__PURE__*/ function() {
|
|
4976
4852
|
function TemplatePlugin(options) {
|
|
4977
4853
|
_class_call_check(this, TemplatePlugin);
|
|
@@ -7609,28 +7485,6 @@ var AsyncNodePlugin = function() {
|
|
|
7609
7485
|
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/async-node/core/src/index.ts
|
|
7610
7486
|
var import_queue_microtask2 = __toESM(require_queue_microtask());
|
|
7611
7487
|
var import_timm10 = __toESM(require_timm());
|
|
7612
|
-
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/async-node/core/src/transform.ts
|
|
7613
|
-
var asyncTransform = function(assetId, wrapperAssetType, asset, flatten2) {
|
|
7614
|
-
var id = "async-" + assetId;
|
|
7615
|
-
var asyncNode = Builder.asyncNode(id, flatten2);
|
|
7616
|
-
var multiNode;
|
|
7617
|
-
var assetNode;
|
|
7618
|
-
if (asset) {
|
|
7619
|
-
assetNode = Builder.assetWrapper(asset);
|
|
7620
|
-
multiNode = Builder.multiNode(assetNode, asyncNode);
|
|
7621
|
-
} else {
|
|
7622
|
-
multiNode = Builder.multiNode(asyncNode);
|
|
7623
|
-
}
|
|
7624
|
-
var wrapperAsset = Builder.asset({
|
|
7625
|
-
id: wrapperAssetType + "-" + id,
|
|
7626
|
-
type: wrapperAssetType
|
|
7627
|
-
});
|
|
7628
|
-
Builder.addChild(wrapperAsset, [
|
|
7629
|
-
"values"
|
|
7630
|
-
], multiNode);
|
|
7631
|
-
return wrapperAsset;
|
|
7632
|
-
};
|
|
7633
|
-
// ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/async-node/core/src/index.ts
|
|
7634
7488
|
var AsyncNodePlugin = /*#__PURE__*/ function() {
|
|
7635
7489
|
function AsyncNodePlugin(options) {
|
|
7636
7490
|
var _this = this;
|