diff --git a/src/components/panelLeft.vue b/src/components/panelLeft.vue index 7a207e3a..7631cc40 100644 --- a/src/components/panelLeft.vue +++ b/src/components/panelLeft.vue @@ -7,7 +7,9 @@ + + @@ -25,9 +27,11 @@ + -

+
+ @@ -40,14 +44,17 @@ import axios from 'axios' // Import generic components -import tabIcon from './genericComponents/tabIcon.vue' -import tabContent from './genericComponents/tabContent.vue' +import tabIcon from './genericComponents/tabIcon' +import tabContent from './genericComponents/tabContent' // Import pane components -import paneConnect from './controlComponents/paneConnect.vue' -import paneNavigate from './controlComponents/paneNavigate.vue' -import paneCapture from './controlComponents/paneCapture.vue' -import paneSettings from './controlComponents/paneSettings.vue' +import paneConnect from './controlComponents/paneConnect' +import paneNavigate from './controlComponents/paneNavigate' +import paneCapture from './controlComponents/paneCapture' +import paneSettings from './controlComponents/paneSettings' + +// Import plugin components +import JsonForm from './pluginComponents/formComponents/JsonForm' // Export main app export default { @@ -59,7 +66,8 @@ export default { paneConnect, paneNavigate, paneCapture, - paneSettings + paneSettings, + JsonForm }, data: function () { @@ -71,7 +79,39 @@ export default { id: 'test-plugin', icon: 'code', requireConnection: false, - content: "HELLO WORLD" + schema: [ + { + fieldType: "htmlBlock", + name: "heading", + content: "This is a cool plugin!" + }, + { + fieldType: "selectList", + name: "title", + multi: false, + label: "Title", + options: ["", "Mr", "Ms", "Mx", "Dr", "Madam", "Lord"] + }, + { + fieldType: "textInput", + placeholder: "First Name", + label: "First Name", + name: "firstName" + }, + { + fieldType: "textInput", + placeholder: "Last Name", + label: "Last Name", + name: "lastName" + }, + { + fieldType: "numberInput", + placeholder: "Age", + name: "age", + label: "Age", + minValue: 0 + } + ] } ] } diff --git a/src/components/pluginComponents/formComponents/JsonForm.vue b/src/components/pluginComponents/formComponents/JsonForm.vue new file mode 100644 index 00000000..aaae3906 --- /dev/null +++ b/src/components/pluginComponents/formComponents/JsonForm.vue @@ -0,0 +1,50 @@ + + + + + \ No newline at end of file diff --git a/src/components/pluginComponents/formComponents/fieldComponents/htmlBlock.vue b/src/components/pluginComponents/formComponents/fieldComponents/htmlBlock.vue new file mode 100644 index 00000000..3bc790b4 --- /dev/null +++ b/src/components/pluginComponents/formComponents/fieldComponents/htmlBlock.vue @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/src/components/pluginComponents/formComponents/fieldComponents/numberInput.vue b/src/components/pluginComponents/formComponents/fieldComponents/numberInput.vue new file mode 100644 index 00000000..2b78c6af --- /dev/null +++ b/src/components/pluginComponents/formComponents/fieldComponents/numberInput.vue @@ -0,0 +1,23 @@ + + + \ No newline at end of file diff --git a/src/components/pluginComponents/formComponents/fieldComponents/selectList.vue b/src/components/pluginComponents/formComponents/fieldComponents/selectList.vue new file mode 100644 index 00000000..bc139bc4 --- /dev/null +++ b/src/components/pluginComponents/formComponents/fieldComponents/selectList.vue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/src/components/pluginComponents/formComponents/fieldComponents/textInput.vue b/src/components/pluginComponents/formComponents/fieldComponents/textInput.vue new file mode 100644 index 00000000..e4096f01 --- /dev/null +++ b/src/components/pluginComponents/formComponents/fieldComponents/textInput.vue @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file