Skip to content

Commit 672e5e0

Browse files
author
Lionel Bijaoui
committed
Remove Pug from project
- Convert Pug to HTML
1 parent f7e9ea1 commit 672e5e0

25 files changed

+434
-211
lines changed

.eslintignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
dist/*.js
2-
build/*.js
3-
config/*.js
42
!.eslintrc.js

dev/projects/full/dataTable.vue

+54-23
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,65 @@
1-
<template lang="pug">
2-
table.table.table-hover.table-bordered
3-
thead
4-
tr
5-
th ID
6-
th Name
7-
th E-mail
8-
th Country
9-
th Role
10-
th Status
1+
<template>
2+
<table class="table table-hover table-bordered">
3+
<thead>
4+
<tr>
5+
<th>ID</th>
6+
<th>Name</th>
7+
<th>Password </th>
8+
<th>Language</th>
9+
<th>Role</th>
10+
<th>Status</th>
11+
</tr>
12+
</thead>
1113

12-
tbody
13-
tr(v-for="row in rows", @click="select($event, row)", :class="{ active: isSelected(row) }")
14-
td {{ row.id }}
15-
td
16-
img(:src="row.avatar")
17-
| {{ row.firstName + " " + row.lastName }} ({{row.userName}})
18-
.label.label-warning(v-if="!row.status") Inactive
19-
td {{ row.email }}
20-
td(v-if="row.address") {{ row.address.country }}
21-
td {{ getRoleName(row) }}
22-
td
23-
i.fa(:class=" row.status? 'fa-check' : 'fa-ban' ")
14+
<tbody>
15+
<tr v-for="(row, index) in rows"
16+
:key="index"
17+
@click="select($event, row)"
18+
:class="{ active: isSelected(row) }">
19+
<td>{{ row.id }}</td>
20+
<td>
21+
<img :src="row.avatar">
22+
{{ row.firstName + " " + row.lastName }} ({{ row.userName }})
23+
<div class="label label-warning"
24+
v-if="!row.status"> Inactive</div>
25+
</td>
26+
<td>{{ row.password }}</td>
27+
<td>{{ row.language }}</td>
28+
<td>{{ getRoleName(row) }}</td>
29+
<td>
30+
<i class="fa"
31+
:class="row.status? 'fa-check' : 'fa-ban'"></i>
32+
</td>
33+
</tr>
34+
</tbody>
35+
</table>
2436
</template>
2537

2638
<script>
2739
import { find } from "lodash";
2840
import { roles } from "./data";
2941
3042
export default {
31-
props: ["rows", "selected", "select"],
43+
props: {
44+
rows: {
45+
type: Array,
46+
default() {
47+
return [];
48+
}
49+
},
50+
selected: {
51+
type: Array,
52+
default() {
53+
return [];
54+
}
55+
},
56+
select: {
57+
type: Function,
58+
default() {
59+
return [];
60+
}
61+
}
62+
},
3263
3364
methods: {
3465
isSelected(row) {

dev/projects/full/fieldAwesome.vue

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
<template lang="pug">
2-
input.form-control(type="text", v-model="value", :maxlength="schema.max", :readonly="schema.readonly", :disabled="disabled", :placeholder="schema.placeholder")
1+
<template>
2+
<input class="form-control"
3+
type="text"
4+
v-model="value"
5+
:maxlength="schema.max"
6+
:readonly="schema.readonly"
7+
:disabled="disabled"
8+
:placeholder="schema.placeholder">
39
</template>
410

511
<script>

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
"sass-loader": "7.1.0",
8585
"sinon": "6.3.4",
8686
"vue": "2.5.17",
87-
"vue-cli-plugin-pug": "1.0.7",
8887
"vue-highlightjs": "^1.3.3",
8988
"vue-markdown": "2.2.4",
9089
"vue-multiselect": "2.1.2",

src/fields/core/fieldCheckbox.vue

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
<template lang="pug">
2-
input(:id="fieldID", type="checkbox", v-model="value", :autocomplete="fieldOptions.autocomplete", :disabled="disabled", :name="inputName", :class="fieldClasses", v-attributes="'input'")
1+
<template>
2+
<input :id="fieldID"
3+
type="checkbox"
4+
v-model="value"
5+
:autocomplete="fieldOptions.autocomplete"
6+
:disabled="disabled"
7+
:name="inputName"
8+
:class="fieldClasses"
9+
v-attributes="'input'" >
310
</template>
411

512
<script>

src/fields/core/fieldChecklist.vue

+51-18
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,54 @@
1-
<template lang="pug">
2-
.wrapper(v-attributes="'wrapper'")
3-
.listbox.form-control(v-if="useListBox", :disabled="disabled")
4-
.list-row(v-for="item in items", :class="{'is-checked': isItemChecked(item)}")
5-
label
6-
input(:id="fieldID", type="checkbox", :checked="isItemChecked(item)", :disabled="disabled", @change="onChanged($event, item)", :name="getInputName(item)", v-attributes="'input'")
7-
| {{ getItemName(item) }}
8-
9-
.combobox.form-control(v-if="!useListBox", :disabled="disabled")
10-
.mainRow(@click="onExpandCombo", :class="{ expanded: comboExpanded }")
11-
.info {{ selectedCount }} selected
12-
.arrow
13-
14-
.dropList
15-
.list-row(v-if="comboExpanded", v-for="item in items", :class="{'is-checked': isItemChecked(item)}")
16-
label
17-
input(:id="fieldID", type="checkbox", :checked="isItemChecked(item)", :disabled="disabled", @change="onChanged($event, item)", :name="getInputName(item)", v-attributes="'input'")
18-
| {{ getItemName(item) }}
1+
<template>
2+
<div class="wrapper"
3+
v-attributes="'wrapper'">
4+
<div class="listbox form-control"
5+
v-if="useListBox"
6+
:disabled="disabled">
7+
<div class="list-row"
8+
v-for="item in items"
9+
:key="getItemValue(item)"
10+
:class="{'is-checked': isItemChecked(item)}">
11+
<label>
12+
<input :id="fieldID"
13+
type="checkbox"
14+
:checked="isItemChecked(item)"
15+
:disabled="disabled"
16+
@change="onChanged($event, item)"
17+
:name="getInputName(item)"
18+
v-attributes="'input'">{{ getItemName(item) }}
19+
</label>
20+
</div>
21+
</div>
22+
<div class="combobox form-control"
23+
v-if="!useListBox"
24+
:disabled="disabled">
25+
<div class="mainRow"
26+
@click="onExpandCombo"
27+
:class="{ expanded: comboExpanded }">
28+
<div class="info"> {{ selectedCount }} selected</div>
29+
<div class="arrow"></div>
30+
</div>
31+
32+
<div class="dropList">
33+
<div class="list-row"
34+
v-if="comboExpanded"
35+
v-for="item in items"
36+
:key="getItemValue(item)"
37+
:class="{'is-checked': isItemChecked(item)}">
38+
<label>
39+
<input :id="fieldID"
40+
type="checkbox"
41+
:checked="isItemChecked(item)"
42+
:disabled="disabled"
43+
@change="onChanged($event, item)"
44+
:name="getInputName(item)"
45+
v-attributes="'input'" >
46+
{{ getItemName(item) }}
47+
</label>
48+
</div>
49+
</div>
50+
</div>
51+
</div>
1952
</template>
2053

2154
<script>

src/fields/core/fieldInput.vue

+44-40
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
1-
<template lang="pug">
2-
.wrapper(v-attributes="'wrapper'")
3-
input.form-control(
4-
:id="fieldID",
5-
:type="inputType",
6-
:value="value",
7-
@input="onInput",
8-
@blur="onBlur",
9-
:class="fieldClasses",
10-
@change="schema.onChange || null",
11-
:disabled="disabled",
12-
:accept="fieldOptions.accept",
13-
:alt="fieldOptions.alt",
14-
:autocomplete="fieldOptions.autocomplete",
15-
:checked="fieldOptions.checked",
16-
:dirname="fieldOptions.dirname",
17-
:formaction="fieldOptions.formaction",
18-
:formenctype="fieldOptions.formenctype",
19-
:formmethod="fieldOptions.formmethod",
20-
:formnovalidate="fieldOptions.formnovalidate",
21-
:formtarget="fieldOptions.formtarget",
22-
:height="fieldOptions.height",
23-
:list="fieldOptions.list",
24-
:max="fieldOptions.max",
25-
:maxlength="fieldOptions.maxlength",
26-
:min="fieldOptions.min",
27-
:minlength="fieldOptions.minlength",
28-
:multiple="fieldOptions.multiple",
29-
:name="inputName",
30-
:pattern="fieldOptions.pattern",
31-
:placeholder="placeholder",
32-
:readonly="readonly",
33-
:required="schema.required",
34-
:size="fieldOptions.size",
35-
:src="fieldOptions.src",
36-
:step="fieldOptions.step",
37-
:width="fieldOptions.width",
38-
:files="fieldOptions.files"
39-
v-attributes="'input'")
40-
span.helper(v-if="inputType === 'color' || inputType === 'range'") {{ value }}
1+
<template>
2+
<div class="wrapper"
3+
v-attributes="'wrapper'">
4+
<input class="form-control"
5+
:id="fieldID"
6+
:type="inputType"
7+
:value="value"
8+
@input="onInput"
9+
@blur="onBlur"
10+
:class="fieldClasses"
11+
@change="schema.onChange || null"
12+
:disabled="disabled"
13+
:accept="fieldOptions.accept"
14+
:alt="fieldOptions.alt"
15+
:autocomplete="fieldOptions.autocomplete"
16+
:checked="fieldOptions.checked"
17+
:dirname="fieldOptions.dirname"
18+
:formaction="fieldOptions.formaction"
19+
:formenctype="fieldOptions.formenctype"
20+
:formmethod="fieldOptions.formmethod"
21+
:formnovalidate="fieldOptions.formnovalidate"
22+
:formtarget="fieldOptions.formtarget"
23+
:height="fieldOptions.height"
24+
:list="fieldOptions.list"
25+
:max="fieldOptions.max"
26+
:maxlength="fieldOptions.maxlength"
27+
:min="fieldOptions.min"
28+
:minlength="fieldOptions.minlength"
29+
:multiple="fieldOptions.multiple"
30+
:name="inputName"
31+
:pattern="fieldOptions.pattern"
32+
:placeholder="placeholder"
33+
:readonly="readonly"
34+
:required="schema.required"
35+
:size="fieldOptions.size"
36+
:src="fieldOptions.src"
37+
:step="fieldOptions.step"
38+
:width="fieldOptions.width"
39+
:files="fieldOptions.files"
40+
v-attributes="'input'">
41+
<span class="helper"
42+
v-if="inputType === 'color' || inputType === 'range'"
43+
v-text="value"></span>
44+
</div>
4145
</template>
4246

4347
<script>

src/fields/core/fieldLabel.vue

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
<template lang="pug">
2-
span(:id="fieldID", :class="fieldClasses", v-attributes="'label'") {{ value }}
1+
<template>
2+
<span :id="fieldID"
3+
:class="fieldClasses"
4+
v-attributes="'label'"
5+
v-text="value"></span>
36
</template>
47

58
<script>

src/fields/core/fieldRadios.vue

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
<template lang="pug">
2-
.radio-list(:disabled="disabled", v-attributes="'wrapper'")
3-
label(v-for="item in items", :class="{'is-checked': isItemChecked(item)}", v-attributes="'label'")
4-
input(:id="fieldID", type="radio", :disabled="disabled", :name="id", @click="onSelection(item)", :value="getItemValue(item)", :checked="isItemChecked(item)", :class="fieldClasses", v-attributes="'input'")
5-
| {{ getItemName(item) }}
1+
<template>
2+
<div class="radio-list"
3+
:disabled="disabled"
4+
v-attributes="'wrapper'">
5+
<label v-for="item in items"
6+
:key="getItemValue(item)"
7+
:class="{'is-checked': isItemChecked(item)}"
8+
v-attributes="'label'">
9+
<input :id="fieldID"
10+
type="radio"
11+
:disabled="disabled"
12+
:name="id"
13+
@click="onSelection(item)"
14+
:value="getItemValue(item)"
15+
:checked="isItemChecked(item)"
16+
:class="fieldClasses"
17+
v-attributes="'input'">{{ getItemName(item) }}
18+
</label>
19+
</div>
620

721
</template>
822

src/fields/core/fieldSelect.vue

+28-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
1-
<template lang="pug">
2-
select.form-control(v-model="value", :disabled="disabled", :name="inputName", :id="fieldID", :class="fieldClasses", v-attributes="'input'")
3-
option(v-if="!fieldOptions.hideNoneSelectedText", :disabled="schema.required", :value="null") {{ fieldOptions.noneSelectedText || "&lt;Nothing selected&gt;" }}
4-
5-
template(v-for="item in items")
6-
optgroup(v-if="item.group", :label="getGroupName(item)")
7-
option(v-if="item.ops", v-for="i in item.ops", :value="getItemValue(i)") {{ getItemName(i) }}
8-
9-
option(v-if="!item.group", :value="getItemValue(item)") {{ getItemName(item) }}
1+
<template>
2+
<select class="form-control"
3+
v-model="value"
4+
:disabled="disabled"
5+
:name="inputName"
6+
:id="fieldID"
7+
:class="fieldClasses"
8+
v-attributes="'input'">
9+
<option v-if="!fieldOptions.hideNoneSelectedText"
10+
:disabled="schema.required"
11+
:value="null"> {{ fieldOptions.noneSelectedText || "&lt;Nothing selected&gt;" }}
12+
</option>
13+
14+
<template v-for="item in items">
15+
<optgroup v-if="item.group"
16+
:label="getGroupName(item)"
17+
:key="getItemValue(item)">
18+
<option v-if="item.ops"
19+
v-for="i in item.ops"
20+
:value="getItemValue(i)"
21+
:key="getItemValue(i)"> {{ getItemName(i) }}</option>
22+
</optgroup>
23+
24+
<option v-if="!item.group"
25+
:value="getItemValue(item)"
26+
:key="getItemValue(item)"> {{ getItemName(item) }}</option>
27+
</template>
28+
</select>
1029
</template>
1130

1231
<script>

src/fields/core/fieldSubmit.vue

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
<template lang="pug">
2-
input(:id="fieldID", type="submit", :value="fieldOptions.buttonText", @click="onClick", :name="inputName", :disabled="disabled", :class="fieldClasses", v-attributes="'input'")
1+
<template>
2+
<input :id="fieldID"
3+
type="submit"
4+
:value="fieldOptions.buttonText"
5+
@click="onClick"
6+
:name="inputName"
7+
:disabled="disabled"
8+
:class="fieldClasses"
9+
v-attributes="'input'">
310
</template>
411

512
<script>

0 commit comments

Comments
 (0)