@builder.io/mitosis 0.2.1 → 0.2.2
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.
|
@@ -145,23 +145,23 @@ var processCodeBlockInTemplate = function (code) {
|
|
|
145
145
|
// contains helper calls as Angular doesn't support JS expressions in templates
|
|
146
146
|
if (code.startsWith('{')) {
|
|
147
147
|
// Objects cannot be spread out directly in Angular so we need to use `useObjectWrapper`
|
|
148
|
-
return "
|
|
148
|
+
return "useObjectWrapper(".concat(handleObjectBindings(code), ")");
|
|
149
149
|
}
|
|
150
150
|
else if (code.startsWith('Object.values')) {
|
|
151
151
|
var stripped = code.replace('Object.values', '');
|
|
152
|
-
return "
|
|
152
|
+
return "useObjectDotValues".concat(stripped);
|
|
153
153
|
}
|
|
154
154
|
else if (code.includes('JSON.stringify')) {
|
|
155
155
|
var obj = code.match(/JSON.stringify\([^)]*\)/g);
|
|
156
|
-
return "
|
|
156
|
+
return "useJsonStringify(".concat(obj, ")");
|
|
157
157
|
}
|
|
158
158
|
else if (code.includes(' as ')) {
|
|
159
159
|
var asIndex = code.indexOf('as');
|
|
160
160
|
var asCode = code.slice(0, asIndex - 1);
|
|
161
|
-
return "
|
|
161
|
+
return "$any".concat(asCode, ")");
|
|
162
162
|
}
|
|
163
163
|
else {
|
|
164
|
-
return "
|
|
164
|
+
return "".concat(code);
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
167
|
var processEventBinding = function (key, code, nodeName, customArg) {
|
|
@@ -212,7 +212,7 @@ var stringifyBinding = function (node, options, blockOptions) {
|
|
|
212
212
|
return " [attr.".concat(keyToUse, "]=\"").concat(code, "\" ");
|
|
213
213
|
}
|
|
214
214
|
else {
|
|
215
|
-
return "[".concat(keyToUse, "]
|
|
215
|
+
return "[".concat(keyToUse, "]=\"").concat(processCodeBlockInTemplate(code), "\"");
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
218
|
};
|