@builder.io/mitosis 0.3.18 → 0.3.19
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.
|
@@ -576,7 +576,9 @@ var classPropertiesPlugin = function () { return ({
|
|
|
576
576
|
// if any state "property" is trying to access state.* or props.*
|
|
577
577
|
// then we need to move them to onInit where they can be accessed
|
|
578
578
|
var transformState = function (json) {
|
|
579
|
-
Object.entries(json.state)
|
|
579
|
+
Object.entries(json.state)
|
|
580
|
+
.reverse()
|
|
581
|
+
.forEach(function (_a) {
|
|
580
582
|
var _b;
|
|
581
583
|
var key = _a[0], value = _a[1];
|
|
582
584
|
if ((value === null || value === void 0 ? void 0 : value.type) === 'property') {
|
|
@@ -586,7 +588,7 @@ var transformState = function (json) {
|
|
|
586
588
|
if (!((_b = json.hooks.onInit) === null || _b === void 0 ? void 0 : _b.code)) {
|
|
587
589
|
json.hooks.onInit = { code: '' };
|
|
588
590
|
}
|
|
589
|
-
json.hooks.onInit.code
|
|
591
|
+
json.hooks.onInit.code = "\nthis.".concat(key, " = ").concat(code, ";\n").concat(json.hooks.onInit.code);
|
|
590
592
|
}
|
|
591
593
|
}
|
|
592
594
|
});
|
|
@@ -10,7 +10,7 @@ var lodash_1 = require("lodash");
|
|
|
10
10
|
var html_tags_1 = require("../../constants/html_tags");
|
|
11
11
|
var styles_1 = require("./helpers/styles");
|
|
12
12
|
var ATTTRIBUTE_MAPPERS = {
|
|
13
|
-
|
|
13
|
+
// for: 'htmlFor',
|
|
14
14
|
};
|
|
15
15
|
var transformAttributeName = function (name) {
|
|
16
16
|
if ((0, typescript_1.objectHasKey)(ATTTRIBUTE_MAPPERS, name))
|