Beautiful Open-Source Form Builder
Globally import form inputs to fix resolve
Julien Nahum8db2b097678b
diff --git a/client/components/forms/index.js b/client/components/forms/index.jsdeleted file mode 100644index fd6f7a7c8..000000000--- a/client/components/forms/index.js+++ /dev/null@@ -1,55 +0,0 @@-import { defineAsyncComponent } from 'vue'--import HasError from './validation/HasError.vue'-import AlertError from './validation/AlertError.vue'-import AlertSuccess from './validation/AlertSuccess.vue'-import VCheckbox from './components/VCheckbox.vue'-import TextInput from './TextInput.vue'-import TextAreaInput from './TextAreaInput.vue'-import VSelect from './components/VSelect.vue'-import CheckboxInput from './CheckboxInput.vue'-import SelectInput from './SelectInput.vue'-import ColorInput from './ColorInput.vue'-import FileInput from './FileInput.vue'-import ImageInput from './ImageInput.vue'-import RatingInput from './RatingInput.vue'-import FlatSelectInput from './FlatSelectInput.vue'-import ToggleSwitchInput from './ToggleSwitchInput.vue'-import ScaleInput from './ScaleInput.vue'--export function registerComponents (app) {- [- HasError,- AlertError,- AlertSuccess,- VCheckbox,- VSelect,- CheckboxInput,- ColorInput,- TextInput,- SelectInput,- TextAreaInput,- FileInput,- ImageInput,- RatingInput,- FlatSelectInput,- ToggleSwitchInput,- ScaleInput- ].forEach(Component => {- Component.name ? app.component(Component.name, Component) : app.component(Component.name, Component)- })-- // Register async components- app.component('SignatureInput', defineAsyncComponent(() =>- import('./SignatureInput.vue')- ))- app.component('RichTextAreaInput', defineAsyncComponent(() =>- import('./RichTextAreaInput.vue')- ))- app.component('PhoneInput', defineAsyncComponent(() =>- import('./PhoneInput.vue')- ))- app.component('DateInput', defineAsyncComponent(() =>- import('./DateInput.vue')- ))-}diff --git a/client/components/open/forms/OpenFormField.vue b/client/components/open/forms/OpenFormField.vueindex ae1eab625..eed5a29a0 100644--- a/client/components/open/forms/OpenFormField.vue+++ b/client/components/open/forms/OpenFormField.vue@@ -124,10 +124,6 @@ export default {}},- data () {- return {}- },-computed: {fieldComponents () {return {diff --git a/client/components/open/forms/components/AdvancedFormUrlSettings.vue b/client/components/open/forms/components/AdvancedFormUrlSettings.vueindex d7a73ecbd..cfc3961f2 100644--- a/client/components/open/forms/components/AdvancedFormUrlSettings.vue+++ b/client/components/open/forms/components/AdvancedFormUrlSettings.vue@@ -5,7 +5,7 @@<h3 class="font-semibold block text-lg"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 inline text-gray-500 mr-2 -mt-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />- </svg> Show advanced options+ </svg> Show advanced sharing options</h3></div></template>diff --git a/client/nuxt.config.ts b/client/nuxt.config.tsindex 429e1b6c3..5daf41c78 100644--- a/client/nuxt.config.ts+++ b/client/nuxt.config.ts@@ -46,6 +46,7 @@ export default defineNuxtConfig({{path: '~/components/forms',pathPrefix: false,+ global: true,},{path: '~/components/global',diff --git a/client/pages/forms/[slug]/edit.vue b/client/pages/forms/[slug]/edit.vueindex 7fb5211f0..1ad0371d0 100644--- a/client/pages/forms/[slug]/edit.vue+++ b/client/pages/forms/[slug]/edit.vue@@ -48,7 +48,6 @@ export default {watch(form, (form) => {if (form) {updatedForm.value = useForm(form)- console.log('updatedForm.value',updatedForm.value)}})diff --git a/client/stores/working_form.js b/client/stores/working_form.jsindex 1b90c3d93..1b48e835b 100644--- a/client/stores/working_form.js+++ b/client/stores/working_form.js@@ -13,8 +13,6 @@ export const useWorkingFormStore = defineStore('working_form', {}),actions: {set (form) {- console.log('setting working form', form)- console.trace();this.content = form},setProperties (properties) {