diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/application-file-upload/AppFileUpload.js b/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/application-file-upload/AppFileUpload.js deleted file mode 100644 index 2fe28432..00000000 --- a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/application-file-upload/AppFileUpload.js +++ /dev/null @@ -1,95 +0,0 @@ -import React from "react"; -import ReactDOM from "react-dom"; -import { ReactComponent } from "react-formio"; -import settingsForm from "./appFileUpload.settingsForm"; - - -export default class AppFileUpload extends ReactComponent { - /** - * This function tells the form builder about your component. It's name, icon and what group it should be in. - * - * @returns {{title: string, icon: string, group: string, documentation: string, weight: number, schema: *}} - */ - static get builderInfo() { - return { - title: "Application File Upload", - icon: "map-marker", - group: "basic", - documentation: "", //TODO - weight: 120, - schema: AppFileUpload.schema(), - }; - } - - /** - * This function is the default settings for the component. At a minimum you want to set the type to the registered - * type of your component (i.e. when you call Components.setComponent('type', MyComponent) these types should match. - * - * @param sources - * @returns {*} - */ - static schema() { - return ReactComponent.schema({ - type: "AppFileUpload", - label: "File Upload", - }); - } - - /* - * Defines the settingsForm when editing a component in the builder. - */ - static editForm = settingsForm; - - static eventRegistered = false; - - /** - * This function is called when the DIV has been rendered and added to the DOM. You can now instantiate the react component. - * - * @param DOMElement - * #returns ReactInstance - * - * - */ - attachReact(element) { - let instance; - - ReactDOM.render( - { - console.log('file upload'); - var customeApplicationId = this.data.applicationId; - - - let mapURL = - process.env.REACT_APP_CUSTOM_FILE_UPLOAD || window._env_.REACT_APP_CUSTOM_FILE_UPLOAD; - - window.open( - mapURL + "?appId=" + customeApplicationId , - "_blank", - "popup=yes,width=500px,heigth=500px" - ); - - console.log("adding listner end"); - - return false; - }} - > - View / Upload Documents - , - element, - () => (this.reactInstance = instance) - ); - } - - /** - * Automatically detach any react components. - * - * @param element - */ - detachReact(element) { - if (element) { - ReactDOM.unmountComponentAtNode(element); - } - } -} diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/application-file-upload/README.md b/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/application-file-upload/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/application-file-upload/appFileUpload.settingsForm.js b/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/application-file-upload/appFileUpload.settingsForm.js deleted file mode 100644 index 9122dee9..00000000 --- a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/application-file-upload/appFileUpload.settingsForm.js +++ /dev/null @@ -1,38 +0,0 @@ -import baseEditForm from 'formiojs/components/_classes/component/Component.form'; - -const settingsForm = (...extend) => { - return baseEditForm([ - { - key: 'display', - components: [ - { - key: 'placeholder', - ignore: true, - }, - ] - }, - { - key: 'data', - components: [], - }, - { - key: 'validation', - components: [], - }, - { - key: 'api', - components: [], - }, - { - key: 'conditional', - components: [], - }, - { - key: 'logic', - components: [], - }, - ], ...extend); -}; - -export default settingsForm; - diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/Application-file-upload/README.md b/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/custom-application-file-upload/README.md similarity index 100% rename from forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/Application-file-upload/README.md rename to forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/custom-application-file-upload/README.md diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/Application-file-upload/appFileUpload.settingsForm.js b/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/custom-application-file-upload/appFileUpload.settingsForm.js similarity index 100% rename from forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/Application-file-upload/appFileUpload.settingsForm.js rename to forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/custom-application-file-upload/appFileUpload.settingsForm.js diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/Application-file-upload/AppFileUpload.js b/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/custom-application-file-upload/userFileUpload.js similarity index 100% rename from forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/Application-file-upload/AppFileUpload.js rename to forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/custom-application-file-upload/userFileUpload.js diff --git a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/index.js b/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/index.js index a152f294..0eb75c52 100644 --- a/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/index.js +++ b/forms-flow-ai/forms-flow-ai-ee/forms-flow-web/src/custom-components/index.js @@ -1,6 +1,6 @@ import fileUpload from "./custom-file-upload/fileUpload"; import Maps from './map-component/Mapservice'; -import AppFileUpload from "./application-file-upload/AppFileUpload"; +import AppFileUpload from "./custom-application-file-upload/userFileUpload"; const components = { fileUpload: fileUpload,