From 9fa3ec56ea9faadc04c381ed02ff2a233797f2fb Mon Sep 17 00:00:00 2001 From: Nolan Ehrstrom Date: Thu, 18 Jan 2024 11:54:12 -0800 Subject: [PATCH] Cleanup --- src/components/vue-form-builder.vue | 104 +--------------------------- src/form-builder-controls.js | 2 +- 2 files changed, 2 insertions(+), 104 deletions(-) diff --git a/src/components/vue-form-builder.vue b/src/components/vue-form-builder.vue index 246738edc..881760bd8 100644 --- a/src/components/vue-form-builder.vue +++ b/src/components/vue-form-builder.vue @@ -536,79 +536,6 @@ const defaultGroupOrder = { "Advanced" : 5.0, }; -const controlGroups = { - AIAssistant: ["AI Generated"], - InputFields: [ - "Line Input", - "Select List", - "Submit Button", - "Textarea", - "Date Picker", - "Checkbox", - "Photo/Video", - "Signature" - ], - ContentFields: [ - "Rich Text", - "Multicolumn / Table", - "Image", - "Record List", - "Loop", - "Nested Screen" - ], - Navigation: ["Page Navigation"], - Dashboards: ["Saved Search Chart", "Analytics Chart"], - Files: ["File Upload", "File Download", "File Preview", "List Table"], - Advanced: [ - "Bootstrap Component", - "Bootstrap Wrapper", - "Captcha", - "Google Places", - "Saved Search Chart", - "Plaid" - ] -}; - -const popoverContentMap = { - "AI Generated": - "Generate single fields or entire forms with our generative assistant", - "Line Input": - "Collect a string of text and format it as one of several data types", - "Select List": "Collect options from a list, as radio butttons or dropdowns", - "Submit Button": "Add an action to submit your form or update a field", - // eslint-disable-next-line prettier/prettier - "Textarea": "Collect a multi-line string of text, to allow for extensive, richly formatted responses", - "Date Picker": "Collect a date or date/time", - // eslint-disable-next-line prettier/prettier - "Checkbox": "Add a checkbox or toggle for true/false responses", - "Photo/Video": "Capture a photo or a Video straight from a camera device", - // eslint-disable-next-line prettier/prettier - "Signature": "Add a signature box to collect a hand-drawn signature image", - "Rich Text": "Use a Rich Text Editor to add HTML-formatted", - "Multicolumn / Table": "Organize and group your content in columns", - // eslint-disable-next-line prettier/prettier - "Image": "Upload an image to your screen", - "Record List": "Format content in a table structure ", - // eslint-disable-next-line prettier/prettier - "Loop": "Format content in a table structure and allow for adding rows", - "Nested Screen": "Add a repeatable section of content", - "Page Navigation": "Add and reuse another Form within this Form", - "Analytics Chart": "Add a chart from the Analytics Reports", - "File Upload": - "Add special buttons that link between subpages within this Form", - "File Download": "Collect files uploaded into the Form", - "File Preview": "Offer a File download", - "List Table": "Create List Table", - "Bootstrap Component": - "Add a Preview section that displays the content of a File", - "Bootstrap Wrapper": - "Wrap an existing subpage within this Form into a Bootstrap Vue component ", - // eslint-disable-next-line prettier/prettier - "Captcha": - "Add a Captcha box to your Form", - "Google Places": "Collect an address using Google's location search", - "Saved Search Chart": "Add a chart from one of your Saved Searches" -}; export default { components: { @@ -708,35 +635,6 @@ export default { return this.config.length > 1; }, filteredControls() { - const priorityLabels = [ - "AI Generated", - "Line Input", - "Select List", - "Submit Button", - "Textarea", - "Date Picker", - "Checkbox", - "Photo/Video", - "Signature", - "", - "Multicolumn / Table", - "Image", - "Record List", - "Loop", - "Nested Screen", - "Page Navigation", - "Saved Search Chart", - "Analytics Chart", - "File Upload", - "File Download", - "File Preview", - "List Table", - "Bootstrap Component", - "Bootstrap Wrapper", - "Captcha", - "Google Places", - "Saved Search Chart" - ]; const excludedLabels = [""]; @@ -776,7 +674,7 @@ export default { // Sort the groups grouped.sort((a, b) => a.order - b.order); - // Sor the elements in each group + // Sort the elements in each group grouped.forEach((_, index) => { grouped[index].elements.sort((a, b) => { const orderA = diff --git a/src/form-builder-controls.js b/src/form-builder-controls.js index d75000f35..5ce1e5f37 100755 --- a/src/form-builder-controls.js +++ b/src/form-builder-controls.js @@ -924,7 +924,7 @@ export default [ rendererBinding: "FormAnalyticsChart", control: { popoverContent: "Add a chart from the Analytics Reports", - order: 2.0, + order: 6.0, group: 'Dashboards', label: "Analytics Chart", component: "FormAnalyticsChart",