Skip to content

Commit

Permalink
Merge branch 'next' into FOUR-10983
Browse files Browse the repository at this point in the history
  • Loading branch information
josechirivella authored Dec 22, 2023
2 parents dd9fada + c06ce6f commit 0f8f287
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 85 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@processmaker/vue-form-elements",
"version": "0.49.4",
"version": "0.50.0",
"description": "Reusable VueJS Based Form Elements styled with Bootstrap 4",
"scripts": {
"serve": "NODE_ENV=standalone vue-cli-service serve",
Expand Down
4 changes: 4 additions & 0 deletions src/components/FormBootstrapVueComponents/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import BFormComponent from "./BFormComponent.vue";
import BWrapperComponent from "./BWrapperComponent.vue";

export { BFormComponent, BWrapperComponent };
20 changes: 11 additions & 9 deletions src/components/FormDatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,6 @@ export default {
return {
validatorErrors: [],
date: "",
inputAttributes: {
class: `${this.inputClass}`,
placeholder: this.placeholder,
name: this.name,
"aria-label": this.ariaLabel,
"tab-index": this.tabIndex,
disabled: this.disabled,
readonly: this.isReadOnly
},
onChangeDate: ""
};
},
Expand All @@ -138,6 +129,17 @@ export default {
isDateDisabled: this.checkMinMaxDateDisabled
};
},
inputAttributes() {
return {
class: `${this.inputClass}`,
placeholder: this.placeholder,
name: this.name,
"aria-label": this.ariaLabel,
"tab-index": this.tabIndex,
disabled: this.disabled,
readonly: this.isReadOnly
};
},
datepicker() {
return this.dataFormat === "datetime";
},
Expand Down
5 changes: 5 additions & 0 deletions src/components/FormSelectList/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import CheckboxView from "./CheckboxView.vue";
import MultiSelectView from "./MultiSelectView.vue";
import OptionboxView from "./OptionboxView.vue";

export { CheckboxView, MultiSelectView, OptionboxView };
4 changes: 4 additions & 0 deletions src/components/common/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import DisplayErrors from "./DisplayErrors.vue";
import RequiredAsterisk from "./RequiredAsterisk.vue";

export { DisplayErrors, RequiredAsterisk };
121 changes: 51 additions & 70 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,77 +1,58 @@
// Import our components
import FormInput from './FormInput'
import FormCheckbox from './FormCheckbox'
import FormRadioButtonGroup from './FormRadioButtonGroup'
import FormSelect from './FormSelect'
import FormSelectList from './FormSelectList'
import FormTextArea from './FormTextArea'
import FormDatePicker from './FormDatePicker'
import FormAccordion from './FormAccordion'
import FormHtmlEditor from './FormHtmlEditor'
import FormHtmlViewer from './FormHtmlViewer'
import FormDelayTimeControl from './FormDelayTimeControl'
import FormMultiSelect from './FormMultiSelect';
import FormPlainMultiSelect from './FormPlainMultiSelect';
import RequiredAsterisk from './common/RequiredAsterisk';
import * as dateUtils from '../dateUtils';
import * as dateUtils from "../dateUtils";

import BFormComponent from './FormBootstrapVueComponents/BFormComponent'
import BWrapperComponent from './FormBootstrapVueComponents/BWrapperComponent'
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 };

// Export our components
let components = {
FormInput,
FormCheckbox,
FormRadioButtonGroup,
FormSelect,
FormSelectList,
FormTextArea,
FormDatePicker,
FormAccordion,
FormHtmlEditor,
FormHtmlViewer,
FormDelayTimeControl,
FormMultiSelect,
FormPlainMultiSelect,
BFormComponent,
BWrapperComponent,
}
// 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;
}

// Export our named exports
export {
FormInput,
FormCheckbox,
FormRadioButtonGroup,
FormSelect,
FormSelectList,
FormTextArea,
FormDatePicker,
FormAccordion,
FormHtmlEditor,
FormHtmlViewer,
FormDelayTimeControl,
FormMultiSelect,
FormPlainMultiSelect,
dateUtils,
RequiredAsterisk,
BFormComponent,
BWrapperComponent,
}
// Boolean flag to see if we're already installed
Vue._processMakerVueFormElementsInstalled = true;

// 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
}
// Register each of our components
const vueComponents = require.context("./", true, /\.(vue)$/);

vueComponents.keys().forEach((key) => {
const component = vueComponents(key).default;

// Boolean flag to see if we're already installed
Vue._processMakerVueFormElementsInstalled = true
// 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(/\.[^/.]+$/, "");

// Register each of our components
for (let component in components) {
Vue.component(component, components[component])
}
}
Vue.component(name, component);
});
}

const plugin = {
install
};

// 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);
}
4 changes: 4 additions & 0 deletions src/components/mixins/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { default as DataFormatMixin } from "./DataFormat";
export { default as HasDefaultOptionKeyMixin } from "./hasDefaultOptionKey";
export { default as ProxyDataMixin } from "./ProxyData";
export { default as ValidationMixin } from "./validation";
6 changes: 3 additions & 3 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
configureWebpack: {
externals: process.env.NODE_ENV !== "standalone" ? ["validatorjs"] : []
externals: process.env.NODE_ENV !== "standalone" ? ["validatorjs", "moment", "moment-timezone", "vue"] : []
},
lintOnSave: false,
devServer: {
Expand All @@ -12,6 +12,6 @@ module.exports = {
css: {
extract: true
},

transpileDependencies: true
transpileDependencies: true,
lintOnSave: false
};

0 comments on commit 0f8f287

Please sign in to comment.