-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #413 from ProcessMaker/vite-2
Introducing Vite π π
- Loading branch information
Showing
16 changed files
with
6,825 additions
and
32,113 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
] | ||
] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,78 @@ | ||
// Import our components | ||
import FormInput from "./FormInput.vue"; | ||
import FormCheckbox from "./FormCheckbox.vue"; | ||
import FormRadioButtonGroup from "./FormRadioButtonGroup.vue"; | ||
import FormSelect from "./FormSelect.vue"; | ||
import FormSelectList from "./FormSelectList.vue"; | ||
import FormTextArea from "./FormTextArea.vue"; | ||
import FormDatePicker from "./FormDatePicker.vue"; | ||
import FormAccordion from "./FormAccordion.vue"; | ||
import FormHtmlEditor from "./FormHtmlEditor.vue"; | ||
import FormHtmlViewer from "./FormHtmlViewer.vue"; | ||
import FormDelayTimeControl from "./FormDelayTimeControl.vue"; | ||
import FormMultiSelect from "./FormMultiSelect.vue"; | ||
import FormPlainMultiSelect from "./FormPlainMultiSelect.vue"; | ||
import RequiredAsterisk from "./common/RequiredAsterisk.vue"; | ||
import * as dateUtils from "../dateUtils"; | ||
|
||
export { default as FormAccordion } from "./FormAccordion.vue"; | ||
export { default as FormCheckbox } from "./FormCheckbox.vue"; | ||
export { default as FormDatePicker } from "./FormDatePicker.vue"; | ||
export { default as FormDelayTimeControl } from "./FormDelayTimeControl.vue"; | ||
export { default as FormHtmlEditor } from "./FormHtmlEditor.vue"; | ||
export { default as FormHtmlViewer } from "./FormHtmlViewer.vue"; | ||
export { default as FormInput } from "./FormInput.vue"; | ||
export { default as FormMultiSelect } from "./FormMultiSelect.vue"; | ||
export { default as FormPlainMultiSelect } from "./FormPlainMultiSelect.vue"; | ||
export { default as FormRadioButtonGroup } from "./FormRadioButtonGroup.vue"; | ||
export { default as FormSelect } from "./FormSelect.vue"; | ||
export { default as FormSelectList } from "./FormSelectList.vue"; | ||
export { default as FormTextArea } from "./FormTextArea.vue"; | ||
export * from "./common"; | ||
export * from "./FormBootstrapVueComponents"; | ||
export * from "./FormSelectList"; | ||
export * from "./mixins"; | ||
export { dateUtils }; | ||
import BFormComponent from "./FormBootstrapVueComponents/BFormComponent.vue"; | ||
import BWrapperComponent from "./FormBootstrapVueComponents/BWrapperComponent.vue"; | ||
|
||
// Export our Vue plugin as our default | ||
export default function install(Vue) { | ||
// First check to see if we're already installed | ||
if (Vue._processMakerVueFormElementsInstalled) { | ||
return; | ||
} | ||
|
||
// Boolean flag to see if we're already installed | ||
Vue._processMakerVueFormElementsInstalled = true; | ||
|
||
// Register each of our components | ||
const vueComponents = require.context("./", true, /\.(vue)$/); | ||
// Export our components | ||
let components = { | ||
FormInput, | ||
FormCheckbox, | ||
FormRadioButtonGroup, | ||
FormSelect, | ||
FormSelectList, | ||
FormTextArea, | ||
FormDatePicker, | ||
FormAccordion, | ||
FormHtmlEditor, | ||
FormHtmlViewer, | ||
FormDelayTimeControl, | ||
FormMultiSelect, | ||
FormPlainMultiSelect, | ||
RequiredAsterisk, | ||
BFormComponent, | ||
BWrapperComponent | ||
}; | ||
|
||
vueComponents.keys().forEach((key) => { | ||
const component = vueComponents(key).default; | ||
// Export our named exports | ||
export { | ||
FormInput, | ||
FormCheckbox, | ||
FormRadioButtonGroup, | ||
FormSelect, | ||
FormSelectList, | ||
FormTextArea, | ||
FormDatePicker, | ||
FormAccordion, | ||
FormHtmlEditor, | ||
FormHtmlViewer, | ||
FormDelayTimeControl, | ||
FormMultiSelect, | ||
FormPlainMultiSelect, | ||
dateUtils, | ||
RequiredAsterisk, | ||
BFormComponent, | ||
BWrapperComponent | ||
}; | ||
|
||
// if a component has a name defined use the name, else use the path as the component name | ||
const name = component.name ? component.name : key.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, ""); | ||
// Export our Vue plugin as our default | ||
export default { | ||
install: function (Vue) { | ||
// First check to see if we're already installed | ||
if (Vue._processMakerVueFormElementsInstalled) { | ||
return; | ||
} | ||
|
||
Vue.component(name, component); | ||
}); | ||
} | ||
// Boolean flag to see if we're already installed | ||
Vue._processMakerVueFormElementsInstalled = true; | ||
|
||
const plugin = { | ||
install | ||
// Register each of our components | ||
for (let component in components) { | ||
Vue.component(component, components[component]); | ||
} | ||
} | ||
}; | ||
|
||
// Auto-install when vue is found (eg. in browser via <script> tag) | ||
let GlobalVue = null; | ||
if (typeof window !== "undefined") { | ||
GlobalVue = window.Vue; | ||
} else if (typeof global !== "undefined") { | ||
GlobalVue = global.Vue; | ||
} | ||
if (GlobalVue) { | ||
GlobalVue.use(plugin); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export { default as DataFormatMixin } from "./DataFormat"; | ||
export { default as HasDefaultOptionKeyMixin } from "./hasDefaultOptionKey"; | ||
export { default as hasDefaultOptionKeyMixin } from "./hasDefaultOptionKey"; | ||
export { default as ProxyDataMixin } from "./ProxyData"; | ||
export { default as ValidationMixin } from "./validation"; |
Oops, something went wrong.