diff --git a/package-lock.json b/package-lock.json index 8dfe65456..6e7a50dab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@processmaker/screen-builder", - "version": "2.83.6", + "version": "2.83.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@processmaker/screen-builder", - "version": "2.83.6", + "version": "2.83.7", "dependencies": { "@chantouchsek/validatorjs": "1.2.3", "axios-extensions": "^3.1.6", diff --git a/package.json b/package.json index 4cb102ba3..0de0162ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@processmaker/screen-builder", - "version": "2.83.6", + "version": "2.83.7", "scripts": { "dev": "VITE_COVERAGE=true vite", "build": "vite build", diff --git a/src/components/index.js b/src/components/index.js index df80d81a5..ccad9534f 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -16,6 +16,7 @@ import ScreenRenderer from "./screen-renderer.vue"; import AddLoopRow from "./renderer/add-loop-row.vue"; import FormRecordList from "./renderer/form-record-list.vue"; import FormImage from "./renderer/form-image.vue"; +import FormAvatar from "./renderer/form-avatar.vue"; import "@processmaker/vue-form-elements/dist/vue-form-elements.css"; import FormButton from "./renderer/form-button.vue"; import FileUpload from "./renderer/file-upload.vue"; @@ -136,6 +137,7 @@ export default { // Register the builder and renderer Vue.component("AddLoopRow", AddLoopRow); Vue.component("FormImage", FormImage); + Vue.component("FormAvatar", FormAvatar); Vue.component("FormLoop", FormLoop); Vue.component("FormMultiColumn", FormMultiColumn); Vue.component("FormNestedScreen", FormNestedScreen); diff --git a/src/components/renderer/form-avatar.vue b/src/components/renderer/form-avatar.vue new file mode 100644 index 000000000..a256d834a --- /dev/null +++ b/src/components/renderer/form-avatar.vue @@ -0,0 +1,79 @@ + + + + + + diff --git a/src/components/renderer/index.js b/src/components/renderer/index.js index 3b4d3d7b9..576cd6594 100755 --- a/src/components/renderer/index.js +++ b/src/components/renderer/index.js @@ -1,6 +1,7 @@ export { default as AddLoopRow } from "./add-loop-row.vue"; export { default as FileDownload } from "./file-download.vue"; export { default as FileUpload } from "./file-upload.vue"; +export { default as FormAvatar } from "./form-avatar.vue"; export { default as FormButton } from "./form-button.vue"; export { default as FormImage } from "./form-image.vue"; export { default as FormInputMasked } from "./form-masked-input.vue"; diff --git a/src/form-builder-controls.js b/src/form-builder-controls.js index 8618e2792..7cf9f4936 100755 --- a/src/form-builder-controls.js +++ b/src/form-builder-controls.js @@ -1,4 +1,5 @@ import FormText from './components/renderer/form-text'; +import FormAvatar from './components/renderer/form-avatar'; import FormButton from './components/renderer/form-button'; import FormMultiColumn from './components/renderer/form-multi-column'; import FormLoop from './components/renderer/form-loop'; @@ -580,6 +581,50 @@ export default [ ], }, }, + { + editorComponent: FormAvatar, + editorBinding: 'FormAvatar', + rendererComponent: FormAvatar, + rendererBinding: 'FormAvatar', + control: { + popoverContent: "User avatar", + order: 3.0, + group: 'Dashboards', + label: 'User Avatar', + component: 'FormAvatar', + 'editor-component': 'FormAvatar', + 'editor-control': 'FormAvatar', + config: { + label: 'User Avatar', + icon: 'fas fa-user-circle', + variant: 'primary', + event: 'submit', + name: null, + value: null, + renderImage: false, + }, + inspector: [ + { + type: 'FormInput', + field: 'height', + config: { + label: 'Height', + helper: 'Avatar height', + type: 'number', + }, + }, + { + type: 'FormInput', + field: 'width', + config: { + label: 'Width', + helper: 'Avatar width', + type: 'number', + }, + }, + ], + }, + }, { editorComponent: FormButton, editorBinding: 'FormSubmit',