Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
5c42f3e
Merge pull request #356 from zoul0813/feature/345-debounced-validate-fix
icebob Dec 5, 2017
163fdc9
Update to Webpack 3. Almost all dependency are updated. Reorganisatio…
Dec 6, 2017
a46fe31
fixes #341 - introduced debounce functionality into `formatValueToModel`
zoul0813 Dec 12, 2017
2724809
requested by @icebob
zoul0813 Dec 12, 2017
32c7627
added missing comma that failed in Travis
zoul0813 Dec 12, 2017
268631a
Merge pull request #360 from zoul0813/feature/341-fix-fecha
icebob Dec 12, 2017
d1a8bcf
fixes #361 - use $event.target.valueAsNumber for number/range inputs,…
zoul0813 Dec 13, 2017
8d436be
fixes #362 - `integer` validator now calls `number` validator, and re…
zoul0813 Dec 13, 2017
5b42807
fixes #340 - "none" value set to `null`, formatValueToField checks fo…
zoul0813 Dec 13, 2017
2b579cd
Merge pull request #363 from zoul0813/feature/361-fix-number-values
zoul0813 Dec 13, 2017
67fc382
Merge branch 'master' of https://github.com/icebob/vue-form-generator…
zoul0813 Dec 13, 2017
f4ad588
Merge pull request #364 from zoul0813/feature/362-integer-validator
zoul0813 Dec 13, 2017
24671a1
Merge branch 'master' of https://github.com/icebob/vue-form-generator…
zoul0813 Dec 13, 2017
f562d7f
reverted back to `schema.required` for "none selected" disabled state…
zoul0813 Dec 13, 2017
4ba3d4a
reverting back to original test
zoul0813 Dec 13, 2017
e678a72
Merge pull request #365 from zoul0813/feature/340-select-none
zoul0813 Dec 13, 2017
5a26ef1
fixes #358 - support "validateBeforeSubmit" with async validators
zoul0813 Dec 15, 2017
e9bf285
removed commented out console.log statements
zoul0813 Dec 15, 2017
705c6a7
Update badges
icebob Dec 15, 2017
f57faba
Update README.md
icebob Dec 15, 2017
1092e01
Update README.md
icebob Dec 15, 2017
56c075f
Merge pull request #366 from zoul0813/feature/358-async-validation
icebob Dec 16, 2017
20b8d9d
add unscape html for error message.
gezichenshan Jan 5, 2018
3208446
Update formGenerator.vue
gezichenshan Jan 5, 2018
d4bc27a
change the judgement
Jan 5, 2018
45e1436
commit the built bundle
Jan 5, 2018
12b3cf7
commit the built dist
Jan 5, 2018
d05818e
add console.log to debug
Jan 7, 2018
fa779bd
add console.log
Jan 7, 2018
ed853a2
delete console.log
Jan 7, 2018
79a77bd
commit without console.log
Jan 7, 2018
ecd2ca5
remove the errorUnescaped property, add v-html on the error part
Jan 9, 2018
026439a
add indent
Jan 9, 2018
3dd7680
Merge pull request #370 from gezichenshan/unscape-html-for-error-msg
icebob Jan 9, 2018
e3eee64
update node-sass
icebob Jan 21, 2018
188a1de
bump version & :package: build
icebob Jan 21, 2018
a8859b3
resolves #368 added vue-tel-input
zoul0813 Jan 24, 2018
abd7820
Merge pull request #382 from zoul0813/feature/368-vue-tel-input-project
zoul0813 Jan 24, 2018
3ef928a
fixed markdown link
zoul0813 Jan 24, 2018
a6df78b
removed extra paren
zoul0813 Jan 24, 2018
1300882
Merge pull request #383 from zoul0813/feature/368-vue-tel-input-project
zoul0813 Jan 24, 2018
49043ab
Update configuration and dependency
Feb 15, 2018
056d9db
Fix and correction to pass Eslint and other checks
Feb 15, 2018
5c48f52
Merge remote-tracking branch 'upstream/master' into v3
Feb 15, 2018
e97420e
WIP on the unit test
Feb 16, 2018
2d74a15
WIP on unit test
Feb 19, 2018
ebf2202
Dependency updated
Feb 26, 2018
166ee43
Progress on test
Feb 26, 2018
59aaf2b
Progress on test
Feb 27, 2018
a858da6
Work on the code coverage
Feb 28, 2018
057a1ad
Merge pull request #2 from lionel-bijaoui/unit_test
lionel-bijaoui Mar 2, 2018
49c789c
Progress on test
Mar 5, 2018
6bf1cd2
Cleaning of the test
Mar 5, 2018
4498e6b
Merge pull request #3 from lionel-bijaoui/unit_test
lionel-bijaoui Mar 5, 2018
632911e
Correction of build and small corrections
Mar 5, 2018
e932b58
Remove config file
Mar 9, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime", "lodash"],
"comments": false
}
"presets": [
[
"env",
{
"modules": false,
"useBuiltIns": "entry"
}
],
"stage-2"
],
"plugins": ["transform-runtime", "lodash"],
"env": {
"test": {
"plugins": ["istanbul"]
}
}
}
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/*.js
build/*.js
config/*.js
!.eslintrc.js
70 changes: 26 additions & 44 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,27 @@
module.exports = {
root: true,
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jquery": false,
"mocha": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 6,
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
"plugins": [
"html"
],
"rules": {
"indent": [
"warn",
"tab",
{ SwitchCase: 1 }
],
"quotes": [
"warn",
"double"
],
"semi": [
"error",
"always"
],
"no-var": [
"error"
],
"no-console": [
"off"
],
"no-unused-vars": [
"warn"
]
}
};
root: true,
parser: "vue-eslint-parser",
parserOptions: {
sourceType: "module",
parser: "babel-eslint"
},
env: {
browser: true,
commonjs: true
},
globals: {
process: true
},
extends: ["eslint:recommended", "plugin:vue/essential"],
plugins: ["prettier"],
rules: {
indent: [1, "tab", { SwitchCase: 1 }],
quotes: [1, "double", { allowTemplateLiterals: true }],
semi: [2, "always"],
"no-var": [2],
"no-console": [0],
"no-unused-vars": [1],
"no-throw-literal": 0,
eqeqeq: [2, "smart"]
}
};
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
.DS_Store
node_modules/
coverage/
docs/_book/
npm-debug.log
selenium-debug.log
test/unit/coverage
test/e2e/reports
stats.json
typings/
typings.json
typings.json
6 changes: 0 additions & 6 deletions .jsbeautifyrc

This file was deleted.

9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"printWidth": 120,
"tabWidth": 4,
"singleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"semi": true,
"useTabs": true
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ node_js:
- "7"
- "6"
after_success:
- npm run coverall
- npm run coverage
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
<a name="2.2.0"></a>
# 2.2.0 (2018-01-21)

* add console.log ([fa779bd](https://github.com/icebob/vue-form-generator/commit/fa779bd))
* add console.log to debug ([d05818e](https://github.com/icebob/vue-form-generator/commit/d05818e))
* add indent ([026439a](https://github.com/icebob/vue-form-generator/commit/026439a))
* add unscape html for error message. ([20b8d9d](https://github.com/icebob/vue-form-generator/commit/20b8d9d))
* added "getLabelClasses" and unit test, using the fieldClasses unit test as an example ([8c01307](https://github.com/icebob/vue-form-generator/commit/8c01307))
* added labelClasses support ([acdbb6c](https://github.com/icebob/vue-form-generator/commit/acdbb6c))
* added missing "id" attributes to checkbox, checklist, radios and submit ([09d44c1](https://github.com/icebob/vue-form-generator/commit/09d44c1))
* added missing comma that failed in Travis ([32c7627](https://github.com/icebob/vue-form-generator/commit/32c7627))
* added styleClasses support to groups ([8b6801b](https://github.com/icebob/vue-form-generator/commit/8b6801b))
* addeds "styleClasses" to group schemas, reimplements #339 ([8e4b43d](https://github.com/icebob/vue-form-generator/commit/8e4b43d))
* bumped vue version to 2.5.3 ([7d7c0c4](https://github.com/icebob/vue-form-generator/commit/7d7c0c4))
* change the judgement ([d4bc27a](https://github.com/icebob/vue-form-generator/commit/d4bc27a))
* check if field.type is undefined before appending the "field-undefined" class ([9993550](https://github.com/icebob/vue-form-generator/commit/9993550))
* commit the built bundle ([45e1436](https://github.com/icebob/vue-form-generator/commit/45e1436))
* commit the built dist ([12b3cf7](https://github.com/icebob/vue-form-generator/commit/12b3cf7))
* commit without console.log ([79a77bd](https://github.com/icebob/vue-form-generator/commit/79a77bd))
* delete console.log ([ed853a2](https://github.com/icebob/vue-form-generator/commit/ed853a2))
* don't render labels when no label text is provided, proposed option 1 from #347 ([8ecc851](https://github.com/icebob/vue-form-generator/commit/8ecc851))
* fix bower.json validation ([2afb4ac](https://github.com/icebob/vue-form-generator/commit/2afb4ac))
* fixed null check ([7842b92](https://github.com/icebob/vue-form-generator/commit/7842b92))
* fixed Vue version ([624ed92](https://github.com/icebob/vue-form-generator/commit/624ed92))
* fixes #340 - "none" value set to `null`, formatValueToField checks for `isNil(value)` and returns `n ([5b42807](https://github.com/icebob/vue-form-generator/commit/5b42807)), closes [#340](https://github.com/icebob/vue-form-generator/issues/340)
* fixes #341 - introduced debounce functionality into `formatValueToModel` ([a46fe31](https://github.com/icebob/vue-form-generator/commit/a46fe31)), closes [#341](https://github.com/icebob/vue-form-generator/issues/341)
* fixes #345 - declare debouncedValidateFunc and set it when debouncedValidate() is called... vue 2.2. ([ee684f0](https://github.com/icebob/vue-form-generator/commit/ee684f0)), closes [#345](https://github.com/icebob/vue-form-generator/issues/345)
* fixes #358 - support "validateBeforeSubmit" with async validators ([5a26ef1](https://github.com/icebob/vue-form-generator/commit/5a26ef1)), closes [#358](https://github.com/icebob/vue-form-generator/issues/358)
* fixes #361 - use $event.target.valueAsNumber for number/range inputs, debounce `formatValueToModel` ([d1a8bcf](https://github.com/icebob/vue-form-generator/commit/d1a8bcf)), closes [#361](https://github.com/icebob/vue-form-generator/issues/361)
* fixes #362 - `integer` validator now calls `number` validator, and returns `invalidIntegerl: "The va ([8d436be](https://github.com/icebob/vue-form-generator/commit/8d436be)), closes [#362](https://github.com/icebob/vue-form-generator/issues/362)
* Groupped fields "tag" param fixed. ([9275a26](https://github.com/icebob/vue-form-generator/commit/9275a26))
* moved unit test to formGenerator, as labels are managed by formGenerator and not the field component ([f102967](https://github.com/icebob/vue-form-generator/commit/f102967))
* remove garbage ([17eeae5](https://github.com/icebob/vue-form-generator/commit/17eeae5))
* remove the errorUnescaped property, add v-html on the error part ([ecd2ca5](https://github.com/icebob/vue-form-generator/commit/ecd2ca5))
* remove uniqueId import ([c86d7dc](https://github.com/icebob/vue-form-generator/commit/c86d7dc))
* removed commented out console.log statements ([e9bf285](https://github.com/icebob/vue-form-generator/commit/e9bf285))
* removed console.log and fixed quotes ([025b541](https://github.com/icebob/vue-form-generator/commit/025b541))
* removed indentation ([49f57b8](https://github.com/icebob/vue-form-generator/commit/49f57b8))
* requested by @icebob ([2724809](https://github.com/icebob/vue-form-generator/commit/2724809))
* reverted back to `schema.required` for "none selected" disabled state, per @icebob ([f562d7f](https://github.com/icebob/vue-form-generator/commit/f562d7f))
* reverting back to original test ([4ba3d4a](https://github.com/icebob/vue-form-generator/commit/4ba3d4a))
* Update badges ([705c6a7](https://github.com/icebob/vue-form-generator/commit/705c6a7))
* Update formGenerator.vue ([3208446](https://github.com/icebob/vue-form-generator/commit/3208446))
* update node-sass ([e3eee64](https://github.com/icebob/vue-form-generator/commit/e3eee64))
* Update README.md ([f57faba](https://github.com/icebob/vue-form-generator/commit/f57faba))
* Update README.md ([1092e01](https://github.com/icebob/vue-form-generator/commit/1092e01))
* Update README.md ([9d9701b](https://github.com/icebob/vue-form-generator/commit/9d9701b))
* updated tests for modified label logic ([f0c2281](https://github.com/icebob/vue-form-generator/commit/f0c2281))



<a name="2.1.1"></a>
## 2.1.1 (2017-10-20)

Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# vue-form-generator [![NPM version](https://img.shields.io/npm/v/vue-form-generator.svg)](https://www.npmjs.com/package/vue-form-generator) ![VueJS v2.x compatible](https://img.shields.io/badge/vue%202.x-compatible-green.svg)
A schema-based form generator component for Vue.js.

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/912039aa815e40de8315032519aa7e6c)](https://www.codacy.com/app/mereg-norbert/vue-form-generator?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=icebob/vue-form-generator&amp;utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.org/icebob/vue-form-generator.svg?branch=master)](https://travis-ci.org/icebob/vue-form-generator)
[![Coverage Status](https://coveralls.io/repos/github/icebob/vue-form-generator/badge.svg?branch=master)](https://coveralls.io/github/icebob/vue-form-generator?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d27be05a35bf459b9292b8172e314a08)](https://www.codacy.com/app/mereg-norbert/vue-form-generator_2?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=vue-generators/vue-form-generator&amp;utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.org/vue-generators/vue-form-generator.svg?branch=master)](https://travis-ci.org/vue-generators/vue-form-generator)
[![Coverage Status](https://coveralls.io/repos/github/vue-generators/vue-form-generator/badge.svg?branch=master)](https://coveralls.io/github/vue-generators/vue-form-generator?branch=master)
[![NPMS.io score](https://badges.npms.io/vue-form-generator.svg)]()
[![Package Quality](http://npm.packagequality.com/shield/vue-form-generator.svg)](http://packagequality.com/#?package=vue-form-generator)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Ficebob%2Fvue-form-generator.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Ficebob%2Fvue-form-generator?ref=badge_shield)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fvue-generators%2Fvue-form-generator.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fvue-generators%2Fvue-form-generator?ref=badge_shield)

[![Dependency Status](https://david-dm.org/icebob/vue-form-generator.svg)](https://david-dm.org/icebob/vue-form-generator)
[![devDependency Status](https://david-dm.org/icebob/vue-form-generator/dev-status.svg)](https://david-dm.org/icebob/vue-form-generator#info=devDependencies)
[![Dependency Status](https://david-dm.org/vue-generators/vue-form-generator.svg)](https://david-dm.org/vue-generators/vue-form-generator)
[![devDependency Status](https://david-dm.org/vue-generators/vue-form-generator/dev-status.svg)](https://david-dm.org/vue-generators/vue-form-generator#info=devDependencies)
[![Downloads](https://img.shields.io/npm/dm/vue-form-generator.svg)](https://www.npmjs.com/package/vue-form-generator)

## Demo
Expand Down Expand Up @@ -205,6 +205,10 @@ VueFormGenerator supports custom fields. If you decide to release your custom fi

This way, it will be easier for everyone to find it. Thank you !

### Public Custom Fields

- [vue-tel-input](https://github.com/EducationLink/vue-tel-input) - International Telephone Input Boilerplate with Vue (integrated with VueFormGenerator).

## Contribution
Please send pull requests improving the usage and fixing bugs, improving documentation and providing better examples, or providing some testing, because these things are important.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-form-generator",
"version": "2.1.1",
"version": "2.2.0",
"homepage": "https://github.com/icebob/vue-form-generator",
"authors": [
"Icebob"
Expand Down
63 changes: 63 additions & 0 deletions build/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
let path = require("path");
let ExtractTextPlugin = require("extract-text-webpack-plugin");

exports.cssLoaders = function(options) {
options = options || {};

let cssLoader = {
loader: "css-loader",
options: {
minimize: process.env.NODE_ENV === "production",
sourceMap: options.sourceMap
}
};

// generate loader string to be used with extract text plugin
function generateLoaders(loader, loaderOptions) {
let loaders = [cssLoader];
if (loader) {
loaders.push({
loader: loader + "-loader",
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
});
}

// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: "vue-style-loader"
});
} else {
return ["vue-style-loader"].concat(loaders);
}
}

// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders("less"),
sass: generateLoaders("sass", { indentedSyntax: true }),
scss: generateLoaders("sass"),
stylus: generateLoaders("stylus"),
styl: generateLoaders("stylus")
};
};

// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function(options) {
let output = [];
let loaders = exports.cssLoaders(options);
for (let extension in loaders) {
let loader = loaders[extension];
output.push({
test: new RegExp("\\." + extension + "$"),
use: loader
});
}
return output;
};
10 changes: 10 additions & 0 deletions build/vue-loader.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let utils = require("./utils");
let isProduction = process.env.NODE_ENV === "production";

module.exports = {
esModule: false,
loaders: utils.cssLoaders({
sourceMap: false,
extract: isProduction
})
};
Loading