Skip to content

Commit f9a4c26

Browse files
committed
Converted to BootstrapVue for the table, still needs more configuration
1 parent 77c2894 commit f9a4c26

File tree

8 files changed

+159
-12397
lines changed

8 files changed

+159
-12397
lines changed

table-component/dist/mapping-commons-table.js

Lines changed: 28 additions & 12251 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

table-component/dist/mapping-commons-table.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

table-component/dist/mapping-commons-table.min.js

Lines changed: 1 addition & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

table-component/dist/mapping-commons-table.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

table-component/package-lock.json

Lines changed: 89 additions & 91 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

table-component/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,15 @@
88
"lint": "vue-cli-service lint"
99
},
1010
"dependencies": {
11-
"@fortawesome/fontawesome-svg-core": "^1.2.34",
12-
"@fortawesome/free-solid-svg-icons": "^5.15.2",
13-
"@fortawesome/vue-fontawesome": "^2.0.2",
1411
"axios": "^0.21.1",
1512
"bootstrap": "^4.6.0",
13+
"bootstrap-vue": "^2.21.2",
1614
"core-js": "^3.6.5",
1715
"jquery": "^3.5.1",
1816
"json-loader": "^0.5.7",
1917
"popper.js": "^1.16.1",
2018
"vue": "^2.6.11",
2119
"vue-axios": "^3.2.4",
22-
"vue2-bootstrap-table2": "^1.2.1",
2320
"yamljs": "^0.3.0"
2421
},
2522
"devDependencies": {

table-component/src/App.vue

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,64 @@
11
<template>
22
<div id="app">
33
<div id="table-container">
4-
<VueBootstrapTable :columns='columns'
5-
:values='mappings'
6-
:show-filter=true
7-
:selectable=false
8-
:filter-case-sensitive=false>
9-
</VueBootstrapTable>
4+
<b-table :items="mappings"
5+
:fields="fields"
6+
responsive
7+
> </b-table>
108
</div>
119
</div>
1210
</template>
1311

1412
<script>
1513
import axios from 'axios'
1614
import YAML from 'yamljs'
17-
import VueBootstrapTable from 'vue2-bootstrap-table2'
1815
1916
export default {
2017
name: 'App',
2118
components: {
22-
VueBootstrapTable: VueBootstrapTable
2319
},
2420
data () {
2521
return {
2622
mappings: [],
27-
columns: [
23+
fields: [
2824
{
29-
name: 'mapping_set_id',
30-
title: 'ID'
25+
key: 'mapping_set_id',
26+
label: 'ID',
27+
sortable: true
3128
},
3229
{
33-
name: 'mapping_set_group',
34-
title: 'Group'
30+
key: 'mapping_set_group',
31+
label: 'Group',
32+
sortable: true
3533
},
3634
{
37-
name: 'mapping_set_title',
38-
title: 'Title'
35+
key: 'mapping_set_title',
36+
label: 'Title',
37+
sortable: true
3938
},
4039
{
41-
name: 'mapping_set_description',
42-
title: 'Description'
40+
key: 'mapping_set_description',
41+
label: 'Description',
42+
sortable: true
4343
},
4444
{
45-
name: 'creator_id',
46-
title: 'Creator ID'
45+
key: 'creator_id',
46+
label: 'Creator ID',
47+
sortable: true
4748
},
4849
{
49-
name: 'curie_map',
50-
title: 'CURIE Map'
50+
key: 'curie_map',
51+
label: 'CURIE Map'
5152
},
5253
{
53-
name: 'license',
54-
title: 'License'
54+
key: 'license',
55+
label: 'License',
56+
sortable: true
5557
},
5658
{
57-
name: 'mapping_provider',
58-
title: 'Mapping Provider'
59+
key: 'mapping_provider',
60+
title: 'Mapping Provider',
61+
sortable: true
5962
}
6063
]
6164
}

table-component/src/main.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@ import Vue from 'vue'
22
import App from './App.vue'
33
import axios from 'axios'
44
import VueAxios from 'vue-axios'
5-
import 'bootstrap'
6-
import 'bootstrap/dist/css/bootstrap.min.css'
7-
import { library } from '@fortawesome/fontawesome-svg-core'
8-
import { faUserSecret } from '@fortawesome/free-solid-svg-icons'
9-
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
105

11-
Vue.use(VueAxios, axios)
6+
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
7+
8+
// Import Bootstrap an BootstrapVue CSS files (order is important)
9+
import 'bootstrap/dist/css/bootstrap.css'
10+
import 'bootstrap-vue/dist/bootstrap-vue.css'
1211

13-
library.add(faUserSecret)
12+
// Make BootstrapVue available throughout your project
13+
Vue.use(BootstrapVue)
14+
// Optionally install the BootstrapVue icon components plugin
15+
Vue.use(IconsPlugin)
1416

15-
Vue.component('font-awesome-icon', FontAwesomeIcon)
17+
Vue.use(VueAxios, axios)
1618

1719
Vue.config.productionTip = false
1820

0 commit comments

Comments
 (0)