diff --git a/src/components/index.js b/src/components/index.js index 23a951c43..9bef80eed 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -11,6 +11,7 @@ import MultiColumn from './editor/multi-column'; import FormLoop from './renderer/form-loop'; import NewFormMultiColumn from './renderer/new-form-multi-column'; import FormNestedScreen from './renderer/form-nested-screen'; +import FormMyCustomChart from './renderer/form-my-custom-chart'; import ScreenRenderer from './screen-renderer'; import AddLoopRow from './renderer/add-loop-row'; import FormRecordList from './renderer/form-record-list'; @@ -76,6 +77,7 @@ export default { Vue.component('FormImage', FormImage); Vue.component('FormLoop', FormLoop); Vue.component('FormMultiColumn', FormMultiColumn); + Vue.component('FormMyCustomChart', FormMyCustomChart); Vue.component('FormNestedScreen', FormNestedScreen); Vue.component('FormRecordList', FormRecordList); Vue.component('Loop', Loop); diff --git a/src/components/inspector/chart-selector.vue b/src/components/inspector/chart-selector.vue new file mode 100644 index 000000000..74bc42de0 --- /dev/null +++ b/src/components/inspector/chart-selector.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/components/inspector/index.js b/src/components/inspector/index.js index c3c417107..bd08d98f3 100644 --- a/src/components/inspector/index.js +++ b/src/components/inspector/index.js @@ -7,6 +7,7 @@ export { default as ColumnSetup } from './column-setup'; export { default as PageSelect } from './page-select'; export { default as ValidationSelect } from './validation-select'; export { default as ScreenSelector } from './screen-selector'; +export { default as ChartSelector } from './chart-selector'; export { default as LoopInspector } from './loop'; export { default as ImageVariable } from './image-variable.vue'; export { default as InputVariable } from './input-variable.vue'; diff --git a/src/components/renderer/form-my-custom-chart.vue b/src/components/renderer/form-my-custom-chart.vue new file mode 100644 index 000000000..c8907fd94 --- /dev/null +++ b/src/components/renderer/form-my-custom-chart.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/components/renderer/index.js b/src/components/renderer/index.js index 015bcb6e6..f6df48f07 100644 --- a/src/components/renderer/index.js +++ b/src/components/renderer/index.js @@ -4,3 +4,4 @@ export { default as FormRecordList } from './form-record-list'; export { default as FormRecordListStatic } from './form-record-list-static.vue'; export { default as FormText } from './form-text'; export { default as FormNestedScreen } from './form-nested-screen'; +export { default as FormMyCustomChart } from './form-my-custom-chart'; diff --git a/src/form-builder-controls.js b/src/form-builder-controls.js index caadde5d8..4759bf39d 100644 --- a/src/form-builder-controls.js +++ b/src/form-builder-controls.js @@ -6,6 +6,7 @@ import FormRecordList from './components/renderer/form-record-list'; import FormImage from './components/renderer/form-image'; import FormMaskedInput from './components/renderer/form-masked-input'; import FormNestedScreen from './components/renderer/form-nested-screen'; +import FormMyCustomChart from "./components/renderer/form-my-custom-chart"; import FileUpload from './components/renderer/file-upload'; import FileDownload from './components/renderer/file-download'; import {DataTypeProperty, DataFormatProperty, DataTypeDateTimeProperty} from './VariableDataTypeProperties'; @@ -821,4 +822,28 @@ export default [ ], }, }, + { + editorComponent: FormMyCustomChart, + editorBinding: "FormMyCustomChart", + rendererComponent: FormMyCustomChart, + rendererBinding: "FormMyCustomChart", + control: { + label: "Custom Control", + component: "FormMyCustomChart", + "editor-component": "FormMyCustomChart", + "editor-control": "FormMyCustomChart", + config: { + label: "Label Custom Chart", + icon: "far fa-chart-bar", + variant: "primary", + name: "Custom Control Chart" + }, + inspector: [ + { + type: "ChartSelector", + field: "screen" + } + ] + } + } ];