├── .editorconfig
├── .github
└── FUNDING.yml
├── .gitignore
├── LICENSE
├── README.md
├── babel.config.js
├── dist
├── demo.html
├── v-form-builder.common.js
├── v-form-builder.css
├── v-form-builder.umd.js
└── v-form-builder.umd.min.js
├── package-lock.json
├── package.json
├── public
├── css
│ ├── bootstrap-4.3.1.min.css
│ ├── v-form-builder.css
│ └── v-form-builder.min.css
├── favicon.ico
└── index.html
├── src
├── App.vue
├── assets
│ ├── .gitkeep
│ └── v-form-builder.css
├── components
│ ├── FormBuilder.vue
│ └── FormRenderer.vue
├── configs
│ ├── control-config-enum.js
│ ├── controls.js
│ ├── events.js
│ ├── form.js
│ ├── global.js
│ ├── index.js
│ ├── roles.js
│ ├── row.js
│ ├── section.js
│ ├── styles.js
│ └── validation.js
├── demo-form-data.js
├── extendables
│ └── index.js
├── index.js
├── installer.js
├── interfaces
│ ├── register-properties.interface.ts
│ └── tab-row.interface.ts
├── libraries
│ ├── alert-dialog.js
│ ├── applier.js
│ ├── classes
│ │ ├── key-value-item.class.js
│ │ └── validation-result.class.js
│ ├── helper.js
│ ├── icon-facade.js
│ ├── icons
│ │ ├── add-outline.icon.js
│ │ ├── arrow-down.icon.js
│ │ ├── arrow-up.icon.js
│ │ ├── chevron-down.icon.js
│ │ ├── chevron-up.icon.js
│ │ ├── close.icon.js
│ │ ├── cog.icon.js
│ │ ├── edit-pencil.icon.js
│ │ ├── information-outline.icon.js
│ │ ├── navigation-more.icon.js
│ │ └── trash.icon.js
│ ├── list-item.class.js
│ ├── modal-renderer.class.ts
│ ├── sidebar-renderer.class.js
│ ├── validation.js
│ └── validations
│ │ ├── custom-closure.js
│ │ ├── is-email.js
│ │ ├── max.js
│ │ ├── min.js
│ │ ├── regex.js
│ │ ├── required.js
│ │ └── same-as.js
├── main.ts
├── mixins
│ ├── control-field-extend-mixin.js
│ ├── control-special-config-mixin.js
│ ├── form-builder-mixins.js
│ ├── form-builder
│ │ ├── form-builder-event-handler.js
│ │ ├── form-builder-methods.js
│ │ └── form-builder-model.js
│ ├── form-renderer-mixins.js
│ ├── form-renderer
│ │ ├── configuration.js
│ │ ├── model.js
│ │ └── validation.js
│ ├── render-row-view-mixin.js
│ ├── renderer-section-view-mixin.js
│ ├── row-view-mixin.js
│ ├── section-sort-mixins.js
│ ├── section-view-mixins.js
│ ├── sidebar-body-mixin.js
│ ├── style-injection-mixin.js
│ └── toggleable-mixin.js
├── shims-tsx.d.ts
├── shims-vue.d.ts
├── skeletons
│ ├── README.md
│ └── controls
│ │ ├── BaseControlConfigSkeleton.js
│ │ └── BaseControlSkeleton.js
└── views
│ ├── README.md
│ ├── builder
│ ├── ControlView.vue
│ ├── FormConfiguration.vue
│ ├── GlobalKeyValueItemConfiguration.vue
│ ├── GlobalModal.vue
│ ├── GlobalSidebar.vue
│ ├── SectionContainer.vue
│ ├── SectionNavigationBar.vue
│ ├── add-controls
│ │ ├── AddControlControl.vue
│ │ ├── AddControlToRowControl.vue
│ │ ├── AddRowControl.vue
│ │ └── AddSectionControl.vue
│ ├── control-views
│ │ ├── ControlLabel.vue
│ │ └── ControlOption.vue
│ ├── misc
│ │ └── IconTooltip.vue
│ ├── modal-config-views
│ │ └── TabRowConfigurationView.vue
│ ├── row-views
│ │ ├── TabContentRowView.vue
│ │ └── TableRowView.vue
│ ├── section-navigation-buttons
│ │ └── TabSectionPreButtons.vue
│ ├── section-views
│ │ ├── NormalSectionView.vue
│ │ ├── TabSectionView.vue
│ │ ├── TableSectionView.vue
│ │ └── ToggleableSectionView.vue
│ └── sidebar-config-views
│ │ ├── SidebarControlConfiguration.vue
│ │ ├── SidebarControlSelectList.vue
│ │ ├── SidebarFormConfiguration.vue
│ │ ├── SidebarSectionConfiguration.vue
│ │ └── control-configuration-views
│ │ ├── ControlBasicInformation.vue
│ │ ├── ControlStylingInformation.vue
│ │ └── ControlValidationInformation.vue
│ ├── container-views
│ └── SidebarToggleableContainer.vue
│ ├── control-configs
│ ├── ButtonConfigView.vue
│ ├── DatePickerConfigView.vue
│ ├── DropdownConfigView.vue
│ ├── FileUploaderConfigView.vue
│ ├── InputConfigView.vue
│ ├── LabelConfigView.vue
│ ├── NumberConfigView.vue
│ ├── README.md
│ ├── RadioCheckboxConfigView.vue
│ ├── TextBlockConfigView.vue
│ └── TextConfigView.vue
│ ├── controls
│ ├── ButtonControl.vue
│ ├── DatePickerControl.vue
│ ├── DropdownControl.vue
│ ├── EmptyBlockControl.vue
│ ├── FileUploaderControl.vue
│ ├── InputControl.vue
│ ├── LabelControl.vue
│ ├── NumberControl.vue
│ ├── README.md
│ ├── RadioCheckboxControl.vue
│ ├── TextBlockControl.vue
│ └── TextControl.vue
│ └── renderer
│ ├── ControlView.vue
│ ├── SectionContainer.vue
│ ├── row-views
│ └── TabContentRowView.vue
│ └── section-views
│ ├── NormalSectionView.vue
│ ├── TabSectionView.vue
│ ├── TableSectionView.vue
│ └── ToggleableSectionView.vue
├── static.json
├── tsconfig.json
└── vue.config.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | # https://editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | charset = utf-8
7 | indent_style = space
8 | indent_size = 4
9 | end_of_line = lf
10 | insert_final_newline = true
11 | trim_trailing_whitespace = true
12 |
13 | [*.md]
14 | insert_final_newline = false
15 | trim_trailing_whitespace = false
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | #github: sethsandaru
4 | ko_fi: sethphat
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 |
4 | # local env files
5 | .env.local
6 | .env.*.local
7 |
8 | # Log files
9 | npm-debug.log*
10 | yarn-debug.log*
11 | yarn-error.log*
12 |
13 | # Editor directories and files
14 | .idea
15 | .vscode
16 | *.suo
17 | *.ntvs*
18 | *.njsproj
19 | *.sln
20 | *.sw?
21 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Phat Tran
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/app'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/dist/demo.html:
--------------------------------------------------------------------------------
1 |
2 |
v-form-builder demo
3 |
4 |
5 |
6 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "v-form-builder",
3 | "version": "2.1.1",
4 | "private": false,
5 | "description": "Vue Form Builder PRO MAX built from top of Vue. Super dynamic and flexible including Drag and Drop feature.",
6 | "author": {
7 | "email": "me@sethphat.com",
8 | "name": "Seth Chen",
9 | "url": "https://sethphat.dev"
10 | },
11 | "scripts": {
12 | "serve": "cross-env NODE_ENV=development vue-cli-service serve --port 9999",
13 | "build": "vue-cli-service build --skip-plugins @vue/cli-plugin-eslint",
14 | "lint": "vue-cli-service lint",
15 | "build-lib": "cross-env NODE_ENV=production vue-cli-service build --target lib --name v-form-builder ./src/index.js --skip-plugins @vue/cli-plugin-eslint"
16 | },
17 | "main": "./dist/v-form-builder.umd.min.js",
18 | "dependencies": {
19 | "core-js": "^2.6.5",
20 | "dayjs": "^1.8.28",
21 | "deep-equal": "^2.0.3",
22 | "litepicker": "^1.4.6",
23 | "vue": "^2.6.10",
24 | "vue-class-component": "^7.2.3",
25 | "vue-property-decorator": "^8.4.2",
26 | "vue-upload-component": "^2.8.22",
27 | "vuedraggable": "^2.23.2"
28 | },
29 | "devDependencies": {
30 | "@vue/cli-plugin-babel": "^3.0.3",
31 | "@vue/cli-plugin-typescript": "^4.5.9",
32 | "@vue/cli-service": "^4.4.4",
33 | "babel-eslint": "^10.0.1",
34 | "cross-env": "^7.0.2",
35 | "eslint": "^5.16.0",
36 | "eslint-plugin-vue": "^5.0.0",
37 | "faker": "^4.1.0",
38 | "node-forge": ">=0.10.0",
39 | "typescript": "~3.9.3",
40 | "vue-template-compiler": "^2.6.10",
41 | "vue-typed-mixins": "^0.2.0"
42 | },
43 | "postcss": {
44 | "plugins": {
45 | "autoprefixer": {}
46 | }
47 | },
48 | "browserslist": [
49 | "> 1%",
50 | "last 2 versions"
51 | ],
52 | "keywords": [
53 | "vue-form-builder",
54 | "v-form-builder",
55 | "vue form builder with drag drop",
56 | "vue form builder pro max",
57 | "vue",
58 | "vuejs",
59 | "form builder",
60 | "drag & drop",
61 | "seth phat"
62 | ],
63 | "license": "MIT",
64 | "repository": {
65 | "url": "https://github.com/sethsandaru/vue-form-builder.git"
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sethsandaru/vue-form-builder/537ec262b6376b41f305ff4a53699c0fbbed65db/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vue-Form-Builder v2.1.0 - github.com/sethsandaru
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sethsandaru/vue-form-builder/537ec262b6376b41f305ff4a53699c0fbbed65db/src/assets/.gitkeep
--------------------------------------------------------------------------------
/src/components/FormBuilder.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
14 |
15 |
16 |
24 |
25 |
26 |
30 |
31 |
32 |
36 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
105 |
--------------------------------------------------------------------------------
/src/components/FormRenderer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
30 |
31 |
32 |
33 |
37 |
38 |
39 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/configs/control-config-enum.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Constant for Radio/Checkbox Styling
3 | * @type {{next: string, bothSide: string, line: string}}
4 | */
5 | const RADIO_CHECKBOX_STYLE = {
6 | line: {
7 | val: 'line',
8 | description: "Line by Line"
9 | },
10 | next: {
11 | val: 'next',
12 | description: "Next to each others"
13 | },
14 | bothSide: {
15 | val: "bothSide",
16 | description: "Stay on each sides in a row (Left - Right)",
17 | }
18 | };
19 |
20 | /**
21 | * Constant for Radio/Checkbox position
22 | * @type {{left: string, center: string, right: string}}
23 | */
24 | const RADIO_CHECKBOX_POSITION = {
25 | left: {
26 | val: 'left',
27 | description: "Left"
28 | },
29 | center: {
30 | val: 'center',
31 | description: 'Center',
32 | },
33 | right: {
34 | val: 'right',
35 | description: 'Right'
36 | }
37 | };
38 |
39 | /**
40 | * Return Type for Date-Picker
41 | * @type {{format: {val: string, description: string}, object: {val: string, description: string}}}
42 | */
43 | const DATE_PICKER_RETURN_TYPES = {
44 | format: {
45 | val: "format",
46 | description: "Date String from Date Format"
47 | },
48 | object: {
49 | val: "object",
50 | description: "JS-Date Object"
51 | }
52 | }
53 |
54 | /**
55 | * Date Picker Start Date (Sunday, Monday,...) of the Week
56 | */
57 | const DATE_PICKER_START_DATES = {
58 | monday: {
59 | val: 1,
60 | description: "Monday"
61 | },
62 | tuesday: {
63 | val: 2,
64 | description: "Tuesday"
65 | },
66 | wednesday: {
67 | val: 3,
68 | description: "Wednesday"
69 | },
70 | thursday: {
71 | val: 4,
72 | description: "Thursday"
73 | },
74 | friday: {
75 | val: 5,
76 | description: "Friday"
77 | },
78 | saturday: {
79 | val: 6,
80 | description: "Saturday"
81 | },
82 | sunday: {
83 | val: 0,
84 | description: "Sunday"
85 | },
86 | }
87 |
88 | /**
89 | * DROPDOWN DATA MODE
90 | * - Normal
91 | * - API
92 | */
93 | const DROPDOWN_DATA_MODES = {
94 | list: {
95 | val: 'list',
96 | description: "Normal - Pre-Config List Items"
97 | },
98 | api: {
99 | val: 'api',
100 | description: "API - List Items from your own API",
101 | },
102 | }
103 |
104 | /**
105 | * File Upload Modes
106 | */
107 | const FILE_UPLOAD_MODES = {
108 | normal: {
109 | val: 'normal',
110 | description: "Keep the file there for HTTP Form Request"
111 | },
112 |
113 | preUpload: {
114 | val: 'preUpload',
115 | description: "Pre-Upload to your own API"
116 | },
117 | }
118 |
119 | export {
120 | RADIO_CHECKBOX_POSITION,
121 | RADIO_CHECKBOX_STYLE,
122 |
123 | DATE_PICKER_RETURN_TYPES,
124 | DATE_PICKER_START_DATES,
125 |
126 | DROPDOWN_DATA_MODES,
127 |
128 | FILE_UPLOAD_MODES
129 | }
--------------------------------------------------------------------------------
/src/configs/events.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Event-Communication Constants in Vue-Form-Builder
3 | * @author Phat Tran
4 | */
5 |
6 | const EVENT_CONSTANTS = {
7 | /**
8 | * Constants for Form-Builder
9 | */
10 | BUILDER: {
11 | SECTION: {
12 | ADDED_ROW: "builder.section.added_row",
13 | DELETE: "builder.section.delete",
14 | UPDATE: "builder.section.update",
15 |
16 | // section sort
17 | PUSH: "builder.section.push"
18 | },
19 |
20 |
21 | ROW: {
22 | CREATE: "builder.row.create",
23 | UPDATE: "builder.row.update",
24 | DELETE: "builder.row.delete",
25 | DELETED: "builder.row.deleted",
26 |
27 | // For Tab View
28 | ADD_TAB: "builder.row.add_tab",
29 | },
30 |
31 | CONTROL: {
32 | CREATE: "builder.control.create",
33 |
34 | UPDATE: "builder.control.update",
35 |
36 | DELETE: "builder.control.delete",
37 | DELETED: "builder.control.deleted",
38 |
39 | SORT: "builder.control.delete",
40 | },
41 |
42 | /**
43 | * GLOBAL SIDEBAR EVENTS
44 | */
45 | SIDEBAR: {
46 | INJECT: "builder.sidebar.inject",
47 | OPEN: "builder.sidebar.open",
48 | OPENED: "builder.sidebar.opened",
49 |
50 | SAVE: "builder.sidebar.save",
51 | SAVE_AND_CLOSE: "builder.sidebar.save_and_close",
52 |
53 | AFTER_CLOSED: "builder.sidebar.after_closed",
54 | },
55 |
56 | /**
57 | * GLOBAL MODAL EVENTS
58 | */
59 | MODAL: {
60 | INJECT: "builder.modal.inject",
61 | OPEN: "builder.modal.open",
62 | OPENED: "builder.modal.opened",
63 |
64 | SAVE: "builder.modal.save",
65 | SAVE_AND_CLOSE: "builder.modal.save_and_close",
66 |
67 | AFTER_CLOSED: "builder.modal.after_closed",
68 | },
69 | },
70 |
71 | /**
72 | * Constants for Form-Renderer
73 | */
74 | RENDERER: {
75 | RUN_VALIDATION: "renderer.run_validation",
76 | VALIDATION_OK: "renderer.validation_ok",
77 | VALIDATION_FAILED: "renderer.validation_failed",
78 | }
79 | };
80 |
81 | export {
82 | EVENT_CONSTANTS
83 | }
--------------------------------------------------------------------------------
/src/configs/form.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Form-Configuration for Vue-Form-Builder
3 | * @author Phat Tran
4 | */
5 |
6 | const FORM_DEFAULT_DATA = {
7 | headline: "",
8 | subHeadline: "",
9 | isShowHeadline: false,
10 |
11 | // tag ??
12 | renderFormTag: false,
13 | formActionURL: "",
14 | formMethod: "POST",
15 |
16 | // Server-Side validation
17 | enableServerSideValidation: false,
18 | serverSideValidationEndpoint: ""
19 | };
20 |
21 | export {
22 | FORM_DEFAULT_DATA
23 | }
24 |
--------------------------------------------------------------------------------
/src/configs/global.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | const GLOBAL_CONFIG = {
4 | rendererFormId: "vue-form-render-pro-max", // ID of