@worksafevictoria/wcl7.5 1.1.0-beta.40 → 1.1.0-beta.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
v-if="card.description"
|
|
36
36
|
class="subheader__description"
|
|
37
37
|
:class="{
|
|
38
|
-
[`w-100 text-left`]: alignLeft
|
|
38
|
+
[`w-100 text-left`]: alignLeft,
|
|
39
39
|
}"
|
|
40
40
|
>
|
|
41
41
|
<strong
|
|
42
42
|
v-if="singleLineCards && card.title"
|
|
43
|
-
v-html="card.title + ':'"
|
|
43
|
+
v-html="card.title + ': '"
|
|
44
44
|
>
|
|
45
45
|
</strong>
|
|
46
46
|
<span v-html="card.description"></span>
|
|
@@ -61,42 +61,42 @@ export default {
|
|
|
61
61
|
props: {
|
|
62
62
|
itemList: {
|
|
63
63
|
type: Array,
|
|
64
|
-
required: true
|
|
64
|
+
required: true,
|
|
65
65
|
},
|
|
66
66
|
cardColumnSize: {
|
|
67
67
|
type: Number,
|
|
68
|
-
default: null
|
|
68
|
+
default: null,
|
|
69
69
|
},
|
|
70
70
|
singleLineCards: {
|
|
71
|
-
type: Boolean
|
|
71
|
+
type: Boolean,
|
|
72
72
|
},
|
|
73
73
|
background: {
|
|
74
74
|
type: String,
|
|
75
|
-
default: 'none'
|
|
75
|
+
default: 'none',
|
|
76
76
|
},
|
|
77
77
|
heading: {
|
|
78
78
|
type: String,
|
|
79
|
-
default: ''
|
|
79
|
+
default: '',
|
|
80
80
|
},
|
|
81
81
|
alignLeft: {
|
|
82
|
-
type: Boolean
|
|
82
|
+
type: Boolean,
|
|
83
83
|
},
|
|
84
84
|
showIcon: {
|
|
85
85
|
type: Boolean,
|
|
86
|
-
default: true
|
|
86
|
+
default: true,
|
|
87
87
|
},
|
|
88
88
|
iconPosition: {
|
|
89
89
|
type: String,
|
|
90
|
-
default: null
|
|
90
|
+
default: null,
|
|
91
91
|
},
|
|
92
92
|
type: {
|
|
93
93
|
type: String,
|
|
94
|
-
default: ''
|
|
95
|
-
}
|
|
94
|
+
default: '',
|
|
95
|
+
},
|
|
96
96
|
},
|
|
97
97
|
data() {
|
|
98
98
|
return {
|
|
99
|
-
isSingleColumn: false
|
|
99
|
+
isSingleColumn: false,
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
methods: {
|
|
@@ -110,18 +110,18 @@ export default {
|
|
|
110
110
|
navigateToPath.call(
|
|
111
111
|
this,
|
|
112
112
|
card?.selectedCard?.linkHref,
|
|
113
|
-
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
|
|
113
|
+
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true,
|
|
114
114
|
)
|
|
115
115
|
}
|
|
116
116
|
} else {
|
|
117
117
|
navigateToPath.call(
|
|
118
118
|
this,
|
|
119
119
|
card?.selectedCard?.linkHref,
|
|
120
|
-
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true
|
|
120
|
+
card?.ev?.ctrlKey === true || card?.ev?.metaKey === true,
|
|
121
121
|
)
|
|
122
122
|
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
125
|
}
|
|
126
126
|
</script>
|
|
127
127
|
<style lang="scss" scoped>
|
|
@@ -11,14 +11,14 @@ export default {
|
|
|
11
11
|
fields,
|
|
12
12
|
fieldsAr,
|
|
13
13
|
items,
|
|
14
|
-
itemsAr
|
|
14
|
+
itemsAr,
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
argTypes: {
|
|
18
18
|
isFixedWidth: {
|
|
19
19
|
control: 'boolean',
|
|
20
|
-
table: { disable: true }
|
|
21
|
-
}
|
|
20
|
+
table: { disable: true },
|
|
21
|
+
},
|
|
22
22
|
},
|
|
23
23
|
args: {
|
|
24
24
|
rtl: false,
|
|
@@ -28,13 +28,13 @@ export default {
|
|
|
28
28
|
fields: fields.links,
|
|
29
29
|
rtlFields: fieldsAr.links,
|
|
30
30
|
caption: 'The table caption',
|
|
31
|
-
|
|
31
|
+
sortBy: 'rank',
|
|
32
32
|
},
|
|
33
33
|
template: `<tabulated-data
|
|
34
34
|
v-bind="args"
|
|
35
35
|
:items="rtl ? args.rtlItems : args.items"
|
|
36
36
|
:fields="rtl ? args.rtlFields : args.fields"
|
|
37
|
-
/>
|
|
37
|
+
/> `,
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export const Default = {}
|
|
@@ -7,23 +7,43 @@
|
|
|
7
7
|
<div :class="isFluid ? 'table-scrolled' : ''">
|
|
8
8
|
<b-table
|
|
9
9
|
v-if="items"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
:items="items"
|
|
11
|
+
:fields="fields"
|
|
12
|
+
:class="`${rtl ? 'rtl' : ''} ${isFluid ? 'isScrolled' : ''}`"
|
|
13
|
+
class="table border"
|
|
14
|
+
:striped="true"
|
|
15
|
+
:sort-by="newSortBy"
|
|
16
|
+
:borderless="false"
|
|
17
|
+
:responsive="!isFluid"
|
|
18
|
+
:stacked="!isFluid ? 'sm' : false"
|
|
19
19
|
>
|
|
20
20
|
<template #head()="data">
|
|
21
|
-
<span
|
|
21
|
+
<span
|
|
22
|
+
class="iconHeader table-active"
|
|
23
|
+
tabindex="0"
|
|
24
|
+
@keypress.enter="accessSort(data.field)"
|
|
25
|
+
scope="colgroup"
|
|
26
|
+
>
|
|
22
27
|
{{ data.label }}
|
|
23
28
|
<span class="sortImg" v-if="data.field.sortable">
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
<img
|
|
30
|
+
v-if="data.field.thAttr['aria-sort'] === 'none'"
|
|
31
|
+
:src="sortIconNeutral"
|
|
32
|
+
alt="image indicating no sort"
|
|
33
|
+
style="width: 0.55rem; height: 0.9rem"
|
|
34
|
+
/>
|
|
35
|
+
<img
|
|
36
|
+
v-if="data.field.thAttr['aria-sort'] === 'ascending'"
|
|
37
|
+
:src="sortIconAsc"
|
|
38
|
+
alt="image indicating ascending sort"
|
|
39
|
+
style="width: 0.55rem; height: 0.9rem"
|
|
40
|
+
/>
|
|
41
|
+
<img
|
|
42
|
+
v-else-if="data.field.thAttr['aria-sort'] === 'descending'"
|
|
43
|
+
:src="sortIconDesc"
|
|
44
|
+
alt="image indicating descending sort"
|
|
45
|
+
style="width: 0.55rem; height: 0.9rem"
|
|
46
|
+
/>
|
|
27
47
|
</span>
|
|
28
48
|
</span>
|
|
29
49
|
</template>
|
|
@@ -42,64 +62,67 @@ import { BTable } from 'bootstrap-vue-next'
|
|
|
42
62
|
|
|
43
63
|
export default {
|
|
44
64
|
name: 'TabulatedData',
|
|
45
|
-
components: { SectionGroup, RichText, BTable},
|
|
65
|
+
components: { SectionGroup, RichText, BTable },
|
|
46
66
|
props: {
|
|
47
67
|
items: {
|
|
48
68
|
type: Array,
|
|
49
|
-
required: true
|
|
69
|
+
required: true,
|
|
50
70
|
},
|
|
51
71
|
fields: {
|
|
52
72
|
type: Array,
|
|
53
|
-
default: undefined
|
|
73
|
+
default: undefined,
|
|
54
74
|
},
|
|
55
75
|
rtl: {
|
|
56
76
|
type: Boolean,
|
|
57
|
-
default: false
|
|
77
|
+
default: false,
|
|
58
78
|
},
|
|
59
79
|
isFixedWidth: {
|
|
60
80
|
type: Boolean,
|
|
61
|
-
default: false
|
|
81
|
+
default: false,
|
|
62
82
|
},
|
|
63
83
|
caption: {
|
|
64
84
|
type: String,
|
|
65
85
|
default: '',
|
|
66
|
-
required: false
|
|
86
|
+
required: false,
|
|
67
87
|
},
|
|
68
|
-
|
|
88
|
+
sortBy: {
|
|
69
89
|
type: String,
|
|
70
90
|
default: undefined,
|
|
71
|
-
required: false
|
|
72
|
-
}
|
|
91
|
+
required: false,
|
|
92
|
+
},
|
|
73
93
|
},
|
|
74
94
|
data() {
|
|
75
95
|
return {
|
|
76
|
-
|
|
96
|
+
newSortBy: this.sortBy ? [{ key: this.sortBy, order: 'asc' }] : [],
|
|
77
97
|
//sortDesc: false,
|
|
78
98
|
sortIconNeutral:
|
|
79
99
|
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'%3e%3cpath fill='black' opacity='.3' d='M51 1l25 23 24 22H1l25-22zM51 101l25-23 24-22H1l25 22z'/%3e%3c/svg%3e",
|
|
80
100
|
sortIconDesc:
|
|
81
101
|
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'%3e%3cpath fill='black' d='M51 1l25 23 24 22H1l25-22z'/%3e%3cpath fill='black' opacity='.3' d='M51 101l25-23 24-22H1l25 22z'/%3e%3c/svg%3e",
|
|
82
102
|
sortIconAsc:
|
|
83
|
-
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'%3e%3cpath fill='black' opacity='.3' d='M51 1l25 23 24 22H1l25-22z'/%3e%3cpath fill='black' d='M51 101l25-23 24-22H1l25 22z'/%3e%3c/svg%3e"
|
|
103
|
+
"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' view-box='0 0 101 101' preserveAspectRatio='none'%3e%3cpath fill='black' opacity='.3' d='M51 1l25 23 24 22H1l25-22z'/%3e%3cpath fill='black' d='M51 101l25-23 24-22H1l25 22z'/%3e%3c/svg%3e",
|
|
84
104
|
}
|
|
85
105
|
},
|
|
86
106
|
computed: {
|
|
87
107
|
isFluid() {
|
|
88
108
|
return this.isFixedWidth
|
|
89
|
-
}
|
|
109
|
+
},
|
|
90
110
|
},
|
|
91
111
|
methods: {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (
|
|
95
|
-
|
|
112
|
+
accessSort(fieldVar) {
|
|
113
|
+
//this.sortBy = fieldVar.key
|
|
114
|
+
if (
|
|
115
|
+
fieldVar.thAttr['aria-sort'] === 'none' ||
|
|
116
|
+
fieldVar.thAttr['aria-sort'] === 'descending'
|
|
117
|
+
) {
|
|
118
|
+
this.newSortBy = [{ key: fieldVar.key, order: 'asc' }]
|
|
96
119
|
//this.sortDesc = false
|
|
97
120
|
} else {
|
|
98
|
-
this.
|
|
121
|
+
this.newSortBy = [{ key: fieldVar.key, order: 'desc' }]
|
|
99
122
|
//this.sortDesc = true
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
},
|
|
103
126
|
}
|
|
104
127
|
</script>
|
|
105
128
|
|
|
@@ -144,7 +167,7 @@ export default {
|
|
|
144
167
|
}
|
|
145
168
|
|
|
146
169
|
.b-table-sortable-column svg {
|
|
147
|
-
display:none;
|
|
170
|
+
display: none;
|
|
148
171
|
}
|
|
149
172
|
}
|
|
150
173
|
</style>
|