diff --git a/src/components/index.js b/src/components/index.js index bc25d3e7c..b7df442db 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -78,6 +78,7 @@ export * from "./renderer"; export * as Currencies from "../currency.json"; export * from "./utils"; export * from "./editor"; +export * from "../mixins"; /** * Gets the screen parent or null if don't have diff --git a/src/mixins/index.js b/src/mixins/index.js index 5a7bf4699..96bb06e7f 100644 --- a/src/mixins/index.js +++ b/src/mixins/index.js @@ -1,6 +1,19 @@ -export { default as HasColorProperty } from './HasColorProperty'; -export { default as shouldElementBeVisible } from './shouldElementBeVisible'; -export { default as getValidPath } from './getValidPath'; -export { default as formWatchers } from './formWatchers'; -export { default as multiselectApi } from './multiselectApi'; -export { default as defaultValues } from './defaultValues'; +import { camelCase, upperFirst } from "lodash"; + +const mixins = []; +const modules = import.meta.globEager("./**/*.js"); + +Object.entries(modules).forEach(([path, m]) => { + const mixingName = upperFirst( + camelCase( + path + .split("/") + .pop() + .replace(/\.\w+$/, "") + ) + ); + + mixins.push(m.default); +}); + +export default mixins;