Skip to content

Commit c0b65b5

Browse files
Merge pull request #481 from lionel-bijaoui/lb_streamlined_schema
Streamlining of schema
2 parents 1d3a0a3 + f2de7f7 commit c0b65b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3100
-2003
lines changed

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ charset = utf-8
77
indent_style = tab
88
indent_size = 4
99
trim_trailing_whitespace = true
10+
11+
[{package.json,.travis.yml}]
12+
indent_style = space
13+
indent_size = 2

.eslintrc.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ module.exports = {
1212
globals: {
1313
process: true
1414
},
15-
extends: ["eslint:recommended", "plugin:vue/essential"],
16-
plugins: ["prettier"],
15+
extends: ["eslint:recommended", "prettier", "plugin:vue/essential"],
16+
plugins: ["prettier", "babel"],
1717
rules: {
1818
indent: [1, "tab", { SwitchCase: 1 }],
1919
quotes: [1, "double", { allowTemplateLiterals: true }],

.travis.yml

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
language: node_js
22
cache:
33
directories:
4-
- node_modules
4+
- node_modules
5+
56
node_js:
6-
- "9"
7-
- "8"
8-
- "6"
9-
after_success:
10-
- npm run coverall
7+
- "10"
8+
- "8"
9+
- "6"
10+
11+
before_install:
12+
- npm i -g npm@">=4.0.0"
13+
14+
install:
15+
- npm install
16+
17+
script:
18+
- npm test
1119

1220
deploy:
1321
provider: npm
1422
email: $NPM_EMAIL
1523
api_key: $NPM_API_KEY
1624
skip_cleanup: true
17-
on:
18-
tags: true
19-
node: "8"
25+
on:
26+
tags: true
27+
node: "8"
28+
29+
after_success:
30+
- npm run coverall

dev/projects/basic/app.vue

+16-10
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ export default {
3636
fields: [
3737
{
3838
type: "input",
39-
inputType: "text",
40-
label: "First Name",
4139
model: "first_name",
40+
label: "First Name",
41+
fieldOptions: {
42+
inputType: "text"
43+
},
4244
attributes: {
4345
input: {
4446
"data-toggle": "tooltip"
@@ -60,9 +62,11 @@ export default {
6062
},
6163
{
6264
type: "input",
63-
inputType: "color",
6465
label: "Color",
6566
model: "color",
67+
fieldOptions: {
68+
inputType: "color"
69+
},
6670
attributes: {
6771
input: {
6872
"data-target": "tooltip"
@@ -71,18 +75,20 @@ export default {
7175
},
7276
{
7377
type: "submit",
74-
buttonText: "Change Previous Type",
7578
attributes: {
7679
input: {
7780
"data-target": "toggle"
7881
}
7982
},
80-
onSubmit: () => {
81-
// this.schema.fields[2].type = "input";
82-
if (this.schema.fields[2].inputType === "color") {
83-
this.schema.fields[2].inputType = "text";
84-
} else {
85-
this.schema.fields[2].inputType = "color";
83+
fieldOptions: {
84+
buttonText: "Change Previous Type",
85+
onSubmit: () => {
86+
// this.schema.fields[2].type = "input";
87+
if (this.schema.fields[2].fieldOptions.inputType === "color") {
88+
this.schema.fields[2].fieldOptions.inputType = "text";
89+
} else {
90+
this.schema.fields[2].fieldOptions.inputType = "color";
91+
}
8692
}
8793
}
8894
}

dev/projects/checklist/app.vue

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<template>
22
<div class="container">
3-
<h1>Checklist</h1>
3+
<h1>Checklist</h1>
44
<div class="row">
5-
<div class="col-sm-12">
5+
<div class="col-sm-12">
66
<vue-form-generator :schema="schema" :model="model" :options="formOptions"></vue-form-generator>
7-
</div>
8-
</div>
7+
</div>
8+
</div>
99
<div class="row">
10-
<div class="col-sm-12">
11-
<pre v-if="model" v-html="prettyModel"></pre>
12-
</div>
13-
</div>
10+
<div class="col-sm-12">
11+
<pre v-if="model" v-html="prettyModel"></pre>
12+
</div>
13+
</div>
1414
</div>
1515
</template>
1616

@@ -35,8 +35,10 @@ export default {
3535
model: "skills",
3636
required: true,
3737
inputName: "skill",
38-
min: 2,
39-
listBox: true,
38+
fieldOptions: {
39+
min: 2,
40+
listBox: true
41+
},
4042
values: ["HTML5", "Javascript", "CSS3", "CoffeeScript", "AngularJS", "ReactJS", "VueJS"],
4143
validator: validators.array,
4244
onChanged(model) {

dev/projects/full/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.1.4/css/ion.rangeSlider.skinHTML5.css">
1414
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/pikaday/1.4.0/css/pikaday.min.css">
1515
<link rel="stylesheet" type="text/css" href="https://unpkg.com/[email protected]/dist/vue-multiselect.min.css">
16-
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/9.0.0/nouislider.min.css">
16+
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/11.1.0/nouislider.min.css">
1717

1818

1919
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
@@ -30,7 +30,7 @@
3030
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/vue-multiselect.min.js"></script>
3131
<script type="text/javascript" src="https://rawgit.com/nosir/cleave.js/master/dist/cleave.min.js"></script>
3232
<script type="text/javascript" src="https://nosir.github.io/cleave.js/lib/cleave-phone.i18n.js"></script>
33-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/9.0.0/nouislider.js"></script>
33+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/11.1.0/nouislider.js"></script>
3434
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pikaday/1.5.1/pikaday.min.js"></script>
3535
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCEz-sX9bRJorDS-D_JL0JkZVZe2gzoUMw&amp;libraries=places"></script>
3636

0 commit comments

Comments
 (0)