From 9ea4e18672c123dd1e756e6ad3dbb88003ca6c5b Mon Sep 17 00:00:00 2001 From: Afiq Date: Mon, 26 May 2025 16:47:53 +0800 Subject: [PATCH] Add Info Display Component and Enhance Form Settings - Introduced a new 'Info Display' component for displaying read-only information in a key-value format, with customizable layouts and styles. - Removed the 'Repeater' and 'Group' components from the available components list to streamline options. - Enhanced the Form Builder configuration to support custom scripts, CSS, and event handling, allowing for more dynamic form behavior. - Added a modal for Form Settings, enabling users to manage form properties, custom scripts, and event triggers effectively. - Updated the database schema to accommodate new fields for custom scripts, CSS, and event configurations. --- components/ComponentPreview.vue | 76 +++++-- components/FormBuilderComponents.vue | 45 ++-- components/FormBuilderConfiguration.vue | 142 ++++++++++-- components/FormScriptEngine.vue | 271 +++++++++++++++++++++++ pages/form-builder/index.vue | 282 +++++++++++++++++++++++- prisma/schema.prisma | 4 + server/api/forms/create.post.js | 6 +- stores/formBuilder.js | 41 +++- 8 files changed, 787 insertions(+), 80 deletions(-) create mode 100644 components/FormScriptEngine.vue diff --git a/components/ComponentPreview.vue b/components/ComponentPreview.vue index e187f96..1252adf 100644 --- a/components/ComponentPreview.vue +++ b/components/ComponentPreview.vue @@ -1,5 +1,10 @@