@builder.io/mitosis 0.2.7 → 0.2.8
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.
|
@@ -97,6 +97,7 @@ var onUpdatePlugin = function (options) { return ({
|
|
|
97
97
|
var BASE_OPTIONS = {
|
|
98
98
|
api: 'options',
|
|
99
99
|
defineComponent: true,
|
|
100
|
+
casing: 'pascal',
|
|
100
101
|
};
|
|
101
102
|
var componentToVue = function (userOptions) {
|
|
102
103
|
return function (_a) {
|
|
@@ -181,7 +182,12 @@ var componentToVue = function (userOptions) {
|
|
|
181
182
|
prefix: (_d = (_c = options.cssNamespace) === null || _c === void 0 ? void 0 : _c.call(options)) !== null && _d !== void 0 ? _d : undefined,
|
|
182
183
|
});
|
|
183
184
|
(0, strip_meta_properties_1.stripMetaProperties)(component);
|
|
184
|
-
var
|
|
185
|
+
var templateStrBody = component.children
|
|
186
|
+
.map(function (item) { return (0, blocks_1.blockToVue)(item, options, { isRootNode: true }); })
|
|
187
|
+
.join('\n');
|
|
188
|
+
var template = options.casing === 'kebab'
|
|
189
|
+
? (0, helpers_1.renameMitosisComponentsToKebabCase)(templateStrBody)
|
|
190
|
+
: templateStrBody;
|
|
185
191
|
var onUpdateWithDeps = ((_e = component.hooks.onUpdate) === null || _e === void 0 ? void 0 : _e.filter(function (hook) { var _a; return (_a = hook.deps) === null || _a === void 0 ? void 0 : _a.length; })) || [];
|
|
186
192
|
var onUpdateWithoutDeps = ((_f = component.hooks.onUpdate) === null || _f === void 0 ? void 0 : _f.filter(function (hook) { var _a; return !((_a = hook.deps) === null || _a === void 0 ? void 0 : _a.length); })) || [];
|
|
187
193
|
var getterKeys = Object.keys((0, lodash_1.pickBy)(component.state, function (i) { return (i === null || i === void 0 ? void 0 : i.type) === 'getter'; }));
|