@worksafevictoria/wcl7.5 1.1.0-beta.111 → 1.1.0-beta.112

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worksafevictoria/wcl7.5",
3
- "version": "1.1.0-beta.111",
3
+ "version": "1.1.0-beta.112",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,23 +26,17 @@
26
26
  >
27
27
  {{ data.label }}
28
28
  <span class="sortImg" v-if="data.field.sortable">
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
29
  <img
36
30
  v-if="data.field.thAttr['aria-sort'] === 'ascending'"
37
- :src="sortIconAsc"
31
+ :src="CaretUp"
38
32
  alt="image indicating ascending sort"
39
- style="width: 0.55rem; height: 0.9rem"
33
+ class="iconAsc"
40
34
  />
41
35
  <img
42
36
  v-else-if="data.field.thAttr['aria-sort'] === 'descending'"
43
- :src="sortIconDesc"
37
+ :src="CaretDown"
44
38
  alt="image indicating descending sort"
45
- style="width: 0.55rem; height: 0.9rem"
39
+ class="iconDesc"
46
40
  />
47
41
  </span>
48
42
  </span>
@@ -56,12 +50,14 @@
56
50
  </template>
57
51
 
58
52
  <script>
59
- import SectionGroup from './../../Containers/SectionGroup/index.vue'
60
- import RichText from '../../Paragraphs/RichText/index.vue'
61
- import { BTable } from 'bootstrap-vue-next'
53
+ import SectionGroup from "./../../Containers/SectionGroup/index.vue";
54
+ import RichText from "../../Paragraphs/RichText/index.vue";
55
+ import { BTable } from "bootstrap-vue-next";
56
+ import CaretUp from "./../../../assets/icons/caret-up.svg?url";
57
+ import CaretDown from "./../../../assets/icons/caret-down.svg?url";
62
58
 
63
59
  export default {
64
- name: 'TabulatedData',
60
+ name: "TabulatedData",
65
61
  components: { SectionGroup, RichText, BTable },
66
62
  props: {
67
63
  items: {
@@ -82,7 +78,7 @@ export default {
82
78
  },
83
79
  caption: {
84
80
  type: String,
85
- default: '',
81
+ default: "",
86
82
  required: false,
87
83
  },
88
84
  sortBy: {
@@ -93,42 +89,33 @@ export default {
93
89
  },
94
90
  data() {
95
91
  return {
96
- newSortBy: this.sortBy ? [{ key: this.sortBy, order: 'asc' }] : [],
92
+ newSortBy: this.sortBy ? [{ key: this.sortBy, order: "asc" }] : [],
97
93
  //sortDesc: false,
98
- sortIconNeutral:
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",
100
- sortIconDesc:
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",
102
- sortIconAsc:
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",
104
- }
94
+ CaretUp,
95
+ CaretDown,
96
+ };
105
97
  },
106
98
  computed: {
107
99
  isFluid() {
108
- return this.isFixedWidth
100
+ return this.isFixedWidth;
109
101
  },
110
102
  },
111
103
  methods: {
112
104
  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' }]
119
- //this.sortDesc = false
105
+ const currentSort = fieldVar.thAttr["aria-sort"];
106
+ if (currentSort === "ascending") {
107
+ this.newSortBy = [{ key: fieldVar.key, order: "desc" }];
120
108
  } else {
121
- this.newSortBy = [{ key: fieldVar.key, order: 'desc' }]
122
- //this.sortDesc = true
109
+ this.newSortBy = [{ key: fieldVar.key, order: "asc" }];
123
110
  }
124
111
  },
125
112
  },
126
- }
113
+ };
127
114
  </script>
128
115
 
129
116
  <style lang="scss">
130
117
  .paragraph--tabulated-data {
131
- @import '../../../includes/scss/all';
118
+ @import "../../../includes/scss/all";
132
119
 
133
120
  .section-group__block {
134
121
  margin-top: -32px;