@jay-framework/compiler-jay-html 0.24.2 → 0.24.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/index.js +7 -11
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -20711,13 +20711,8 @@ ${context.indent.firstLine} ${createBody})`,
|
|
|
20711
20711
|
}
|
|
20712
20712
|
if (isConditional(element) && context.interactivePaths.size > 0) {
|
|
20713
20713
|
const condition = element.getAttribute("if");
|
|
20714
|
-
const
|
|
20715
|
-
|
|
20716
|
-
void 0,
|
|
20717
|
-
0,
|
|
20718
|
-
"viewState"
|
|
20719
|
-
);
|
|
20720
|
-
const renderedCondition = parseServerCondition(condition, viewStateVars);
|
|
20714
|
+
const guardVariables = context.insideFastForEach ? context.variables : new Variables(context.variables.currentType, void 0, 0, "viewState");
|
|
20715
|
+
const renderedCondition = parseServerCondition(condition, guardVariables);
|
|
20721
20716
|
const coordinate = element.getAttribute(COORD_ATTR) || "0";
|
|
20722
20717
|
const childContent = renderHydrateElementContent(
|
|
20723
20718
|
element,
|
|
@@ -20746,6 +20741,7 @@ ${context.indent.firstLine} ${createBody})`,
|
|
|
20746
20741
|
const paramName = forEachAccessor.rootVar;
|
|
20747
20742
|
const paramType = variables.currentType.name;
|
|
20748
20743
|
const forEachFragment = forEachAccessor.render().map((_) => `(${paramName}: ${paramType}) => ${_}`);
|
|
20744
|
+
const adoptItemParam = `${forEachVariables.currentVar}: ${forEachVariables.currentType.name}`;
|
|
20749
20745
|
const preAdoptRefNameGenerator = context.refNameGenerator.clone();
|
|
20750
20746
|
const itemChildNodes = filterContentNodes(element.childNodes);
|
|
20751
20747
|
const itemContext = {
|
|
@@ -20815,7 +20811,7 @@ ${context.indent.firstLine} ${createBody})`,
|
|
|
20815
20811
|
const childrenArr = childParts.length ? `[
|
|
20816
20812
|
${childParts.join(",\n")},
|
|
20817
20813
|
${indent.firstLine} ]` : "[]";
|
|
20818
|
-
adoptBody = `() => [
|
|
20814
|
+
adoptBody = `(${adoptItemParam}) => [
|
|
20819
20815
|
${indent.firstLine} adoptDynamicElement("${itemRootCoord2}", ${itemAttrs.rendered}, ${childrenArr}${refSuffix}),
|
|
20820
20816
|
${indent.firstLine} ]`;
|
|
20821
20817
|
itemContent = new RenderFragment(
|
|
@@ -20835,13 +20831,13 @@ ${indent.firstLine} ]`;
|
|
|
20835
20831
|
const childrenArr = itemContent.rendered.trim() ? `[
|
|
20836
20832
|
${itemContent.rendered},
|
|
20837
20833
|
${indent.firstLine} ]` : "[]";
|
|
20838
|
-
adoptBody = `() => [
|
|
20834
|
+
adoptBody = `(${adoptItemParam}) => [
|
|
20839
20835
|
${indent.firstLine} adoptElement("${itemRootCoord}", ${itemAttrs.rendered}, ${childrenArr}${refSuffix}),
|
|
20840
20836
|
${indent.firstLine} ]`;
|
|
20841
20837
|
} else {
|
|
20842
|
-
adoptBody = itemContent.rendered.trim() ? `() => [
|
|
20838
|
+
adoptBody = itemContent.rendered.trim() ? `(${adoptItemParam}) => [
|
|
20843
20839
|
${itemContent.rendered},
|
|
20844
|
-
${indent.firstLine} ]` :
|
|
20840
|
+
${indent.firstLine} ]` : `(${adoptItemParam}) => []`;
|
|
20845
20841
|
}
|
|
20846
20842
|
}
|
|
20847
20843
|
const createRenderContext = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/compiler-jay-html",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
},
|
|
35
35
|
"author": "",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@jay-framework/compiler-analyze-exported-types": "^0.24.
|
|
38
|
-
"@jay-framework/compiler-shared": "^0.24.
|
|
39
|
-
"@jay-framework/component": "^0.24.
|
|
40
|
-
"@jay-framework/logger": "^0.24.
|
|
41
|
-
"@jay-framework/runtime": "^0.24.
|
|
42
|
-
"@jay-framework/secure": "^0.24.
|
|
37
|
+
"@jay-framework/compiler-analyze-exported-types": "^0.24.3",
|
|
38
|
+
"@jay-framework/compiler-shared": "^0.24.3",
|
|
39
|
+
"@jay-framework/component": "^0.24.3",
|
|
40
|
+
"@jay-framework/logger": "^0.24.3",
|
|
41
|
+
"@jay-framework/runtime": "^0.24.3",
|
|
42
|
+
"@jay-framework/secure": "^0.24.3",
|
|
43
43
|
"@types/js-yaml": "^4.0.9",
|
|
44
44
|
"change-case": "^4.1.2",
|
|
45
45
|
"he": "^1.2.0",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@caiogondim/strip-margin": "^1.0.0",
|
|
55
|
-
"@jay-framework/4-react": "^0.24.
|
|
56
|
-
"@jay-framework/dev-environment": "^0.24.
|
|
55
|
+
"@jay-framework/4-react": "^0.24.3",
|
|
56
|
+
"@jay-framework/dev-environment": "^0.24.3",
|
|
57
57
|
"@testing-library/jest-dom": "^6.2.0",
|
|
58
58
|
"@types/js-beautify": "^1",
|
|
59
59
|
"@types/node": "^20.11.5",
|