@builder.io/mitosis 0.5.29 → 0.5.31
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.
|
@@ -36,17 +36,7 @@ const getAttributePassingString = (typescript) => {
|
|
|
36
36
|
'};');
|
|
37
37
|
};
|
|
38
38
|
exports.getAttributePassingString = getAttributePassingString;
|
|
39
|
-
const shouldAddAttributePassing = (json, options) => {
|
|
40
|
-
var _a, _b, _c, _d;
|
|
41
|
-
const metaAttributePassingAsString = String((_b = (_a = json.meta.useMetadata) === null || _a === void 0 ? void 0 : _a.attributePassing) === null || _b === void 0 ? void 0 : _b.enabled);
|
|
42
|
-
if (((_c = options.attributePassing) === null || _c === void 0 ? void 0 : _c.enabled) && metaAttributePassingAsString !== 'false') {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
if (metaAttributePassingAsString === 'true') {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
return (_d = options.attributePassing) === null || _d === void 0 ? void 0 : _d.enabled;
|
|
49
|
-
};
|
|
39
|
+
const shouldAddAttributePassing = (json, options) => { var _a, _b, _c; return ((_a = options.attributePassing) === null || _a === void 0 ? void 0 : _a.enabled) || ((_c = (_b = json.meta.useMetadata) === null || _b === void 0 ? void 0 : _b.attributePassing) === null || _c === void 0 ? void 0 : _c.enabled); };
|
|
50
40
|
exports.shouldAddAttributePassing = shouldAddAttributePassing;
|
|
51
41
|
const getAddAttributePassingRef = (json, options) => {
|
|
52
42
|
var _a, _b, _c;
|
|
@@ -706,7 +706,9 @@ const builderElementToMitosisNode = (block, options, _internalOptions = {}) => {
|
|
|
706
706
|
}
|
|
707
707
|
const linkUrl = block.linkUrl;
|
|
708
708
|
if (linkUrl) {
|
|
709
|
-
if (typeof linkUrl === 'object' &&
|
|
709
|
+
if (typeof linkUrl === 'object' &&
|
|
710
|
+
linkUrl !== null &&
|
|
711
|
+
linkUrl['@type'] === '@builder.io/core:LocalizedValue') {
|
|
710
712
|
properties.href = linkUrl.Default;
|
|
711
713
|
localizedValues['linkUrl'] = linkUrl;
|
|
712
714
|
}
|
|
@@ -732,6 +734,7 @@ const builderElementToMitosisNode = (block, options, _internalOptions = {}) => {
|
|
|
732
734
|
properties[key] = value;
|
|
733
735
|
}
|
|
734
736
|
else if (typeof value === 'object' &&
|
|
737
|
+
value !== null &&
|
|
735
738
|
value['@type'] === '@builder.io/core:LocalizedValue') {
|
|
736
739
|
properties[key] = value.Default;
|
|
737
740
|
localizedValues[`component.options.${key}`] = value;
|