@worksafevictoria/wcl7.5 1.1.13 → 1.1.15

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.13",
3
+ "version": "1.1.15",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -40,11 +40,11 @@
40
40
  "dependencies": {
41
41
  "@formio/vue": "^5.0.0",
42
42
  "@fortawesome/fontawesome-free": "^6.4.2",
43
- "@storybook/cli": "^7.6.3",
43
+ "@storybook/cli": "^7.6.20",
44
44
  "axios": "^1.6.0",
45
45
  "bootstrap": "^5.3.2",
46
46
  "bootstrap-vue": "^2.23.1",
47
- "bootstrap-vue-next": "^0.15.5",
47
+ "bootstrap-vue-next": "^0.23.2",
48
48
  "date-fns": "^2.30.0",
49
49
  "formiojs": "4.13.13",
50
50
  "storybook-addon-deep-controls": "^0.6.2",
@@ -85,7 +85,7 @@
85
85
  "prettier": "^3.0.3",
86
86
  "react": "^18.2.0",
87
87
  "react-dom": "^18.2.0",
88
- "sass": "^1.69.5",
88
+ "sass": "1.77.6",
89
89
  "sass-loader": "^13.3.2",
90
90
  "semantic-release": "^19.0.3",
91
91
  "storybook": "^7.5.1",
@@ -159,7 +159,8 @@ export default {
159
159
  }
160
160
  }
161
161
  .modal-body {
162
- padding: 32px;
162
+ padding: 0px 32px 0px;
163
+ margin-top: 16px;
163
164
  fieldset {
164
165
  display: flex;
165
166
  flex-direction: row;
@@ -5,4 +5,10 @@ export default {
5
5
  component: GlobalNotice
6
6
  }
7
7
 
8
- export const Default = {}
8
+ export const Default = {
9
+ loaders: [
10
+ () => {
11
+ window.localStorage.removeItem('globalModalHidden')
12
+ }
13
+ ]
14
+ }
@@ -98,9 +98,7 @@
98
98
  >
99
99
  </column>
100
100
  </row>
101
- <template v-if="showSocial && type !== 'hero'">
102
- <social-share :rtl="rtl" />
103
- </template>
101
+ <social-share v-if="showSocial && type !== 'hero'" :rtl="rtl" />
104
102
  </container>
105
103
  </div>
106
104
  <!-- Type Default -->
@@ -51,7 +51,8 @@ export default {
51
51
  title: 'On this page',
52
52
  itemListEnglish: englishItemList,
53
53
  itemListArabic: arabicItemList,
54
- rtl: false
54
+ rtl: false,
55
+ scrollSpy: { element: 'scrollspy-nested', offset: 100, method: 'auto' }
55
56
  }
56
57
  }
57
58
  const DefaultContent = (args) => ({
@@ -2,7 +2,7 @@
2
2
  <section-group class="sticky-top">
3
3
  <b-navbar class="paragraph--scrollspy" :class="{ rtl: rtl }">
4
4
  <b-list-group
5
- v-b-scrollspy="{ offset: 100, method: 'auto' }"
5
+ v-b-scrollspy="scrollSpy"
6
6
  class="flex-column"
7
7
  >
8
8
  <div class="scrollspy__title">{{ title }}</div>
@@ -22,11 +22,12 @@
22
22
 
23
23
  <script>
24
24
  import SectionGroup from '../../Containers/SectionGroup/index.vue'
25
- import { BNavbar, BListGroup, BListGroupItem } from 'bootstrap-vue-next'
25
+ import { BNavbar, BListGroup, BListGroupItem, vBScrollspy } from 'bootstrap-vue-next'
26
26
 
27
27
  export default {
28
28
  name: 'ScrollSpy',
29
29
  components: { SectionGroup, BNavbar, BListGroup, BListGroupItem },
30
+ directives: { 'b-scrollspy':vBScrollspy },
30
31
  props: {
31
32
  title: {
32
33
  type: String,
@@ -39,6 +40,10 @@ export default {
39
40
  rtl: {
40
41
  type: Boolean,
41
42
  default: false
43
+ },
44
+ scrollSpy: {
45
+ type: Object,
46
+ default: () => {return{ element: 'body', offset: 100, method: 'auto' }}
42
47
  }
43
48
  },
44
49
  methods: {
@@ -20,7 +20,7 @@
20
20
  :content-class="`tabbed-cards-content`"
21
21
  class="tabbed-cards__grid"
22
22
  @selected="(card, cardIndex) => setCurrentRow(rIndex, card)"
23
- @focusin="focussed($event)"
23
+ @keydown.tab="focussed($event)"
24
24
  >
25
25
  <template v-slot:cardItem="{ card }">
26
26
  <card-grid-item
@@ -40,11 +40,10 @@
40
40
  :is-expandable="true"
41
41
  />
42
42
  </template>
43
- <template
44
- v-if="selectedRow === rIndex && selectedCard"
43
+ <template
45
44
  v-slot:cardGridFooter
46
45
  >
47
- <column class="listgroup-column">
46
+ <column v-if="selectedRow === rIndex && selectedCard" class="listgroup-column">
48
47
  <div ref="listgroup" class="tabbed-cards__listGroup">
49
48
  <list-group
50
49
  :list="selectedCard.links"
@@ -69,6 +68,8 @@ import CardGridItem from './../../Common/CardGridItem/index.vue'
69
68
  import Column from './../../Containers/Column/index.vue'
70
69
  import Icon from './../../SubComponents/Icon/index.vue'
71
70
  import ListGroup from './../../Paragraphs/ListGroup/index.vue'
71
+ import VueScrollTo from 'vue-scrollto'
72
+ import { nextTick } from 'vue'
72
73
 
73
74
  export default {
74
75
  name: 'TabbedCards',
@@ -100,7 +101,8 @@ export default {
100
101
  selectedCard: undefined,
101
102
  selectedRow: undefined,
102
103
  screenWidth: 0,
103
- loaded: false
104
+ loaded: false,
105
+ tabList: null
104
106
  }
105
107
  },
106
108
  computed: {
@@ -147,7 +149,7 @@ export default {
147
149
  let end = start + this.cols
148
150
  return rows.slice(start, end)
149
151
  },
150
- setCurrentRow(rowIndex, card) {
152
+ async setCurrentRow(rowIndex, card) {
151
153
  const sameCardSelected =
152
154
  card.selectedCard === this.selectedCard || !card.selectedCard
153
155
  this.selectedCard = null
@@ -158,11 +160,12 @@ export default {
158
160
  cardGrid.clearCards()
159
161
  }
160
162
  })
163
+ await nextTick()
164
+ this.tabList = this.getFocusElements()
161
165
  setTimeout(() => {
162
166
  if (window && !sameCardSelected) {
163
167
  this.selectedCard = card.selectedCard
164
168
  this.selectedRow = rowIndex
165
- let VueScrollTo = require('vue-scrollto')
166
169
  let options = {
167
170
  container: 'body',
168
171
  easing: 'ease-in',
@@ -188,44 +191,21 @@ export default {
188
191
  return cols
189
192
  },
190
193
  focussed(ev) {
191
- if (ev.shiftKey) {
192
- let prevTabbedCard = ev.target?.parentElement?.parentElement?.previousSibling?.getElementsByTagName('button')[0]
193
- if (
194
- prevTabbedCard &&
195
- prevTabbedCard.getAttribute('aria-expanded') === 'true'
196
- ) {
197
- ev.preventDefault()
198
- const lG = this.$refs.listgroup
199
- let itemsOfLG = lG[0].getElementsByTagName('button')
200
- itemsOfLG[itemsOfLG.length - 1].focus()
201
- }
202
- return
203
- }
204
- const lG = this.$refs.listgroup
205
- const isListGroupOpen = Array.isArray(lG) && lG.length > 0
206
- const cardIsSelected = ev.target.parentElement.classList.contains('isSelected')
207
- if (cardIsSelected && isListGroupOpen) {
208
- ev.preventDefault()
209
- lG[0].getElementsByTagName('button')[0].focus()
210
- } else if (!cardIsSelected && isListGroupOpen) {
211
- ev.preventDefault()
212
- let nextTabbedCard = ev.target?.parentElement?.parentElement?.nextSibling?.getElementsByTagName('button')[0]
213
- if (nextTabbedCard) {
214
- nextTabbedCard.focus()
215
- } else {
216
- let itemsOfLG = lG[0].getElementsByTagName('button')
217
- let lastItemOfLG = itemsOfLG[itemsOfLG.length - 1]
218
- let nextFocusElement = this.focusNextElement(false, lastItemOfLG)
219
- nextFocusElement.focus()
220
- }
194
+ ev.preventDefault()
195
+ let activeElem = ev.target
196
+ if(!this.tabList){
197
+ this.tabList = this.getFocusElements()
198
+ } else {
199
+ let newList = this.getFocusElements().filter(item => this.tabList.indexOf(item) == -1)
200
+ this.tabList.splice(this.tabList.indexOf(activeElem) + 1,0,...newList)
221
201
  }
222
- // if its the next card from the selected
202
+ let newTab = ev.shiftKey ? this.tabList[this.tabList.indexOf(activeElem) - 1] ||
203
+ this.tabList[this.tabList.length - 1]
204
+ : this.tabList[this.tabList.indexOf(activeElem) + 1] || this.tabList[0]
205
+ newTab.focus()
223
206
  },
224
- focusNextElement(reverse, activeElem) {
225
- /*check if an element is defined or use activeElement*/
226
- activeElem =
227
- activeElem instanceof HTMLElement ? activeElem : document.activeElement
228
207
 
208
+ getFocusElements() {
229
209
  let queryString = [
230
210
  'a:not([disabled]):not([tabindex="-1"])',
231
211
  'button:not([disabled]):not([tabindex="-1"])',
@@ -237,11 +217,9 @@ export default {
237
217
  queryResult = Array.prototype.filter.call(
238
218
  document.querySelectorAll(queryString),
239
219
  (elem) => {
240
- /*check for visibility while always include the current activeElement*/
241
220
  return (
242
221
  elem.offsetWidth > 0 ||
243
- elem.offsetHeight > 0 ||
244
- elem === activeElem
222
+ elem.offsetHeight > 0
245
223
  )
246
224
  }
247
225
  ),
@@ -272,13 +250,7 @@ export default {
272
250
  return elem.tabIndex == 0 || elem.tabIndex == -1 ? true : false
273
251
  })
274
252
  )
275
-
276
- /* if reverse is true return the previous focusable element
277
- if reverse is false return the next focusable element */
278
- return reverse
279
- ? focusable[focusable.indexOf(activeElem) - 1] ||
280
- focusable[focusable.length - 1]
281
- : focusable[focusable.indexOf(activeElem) + 1] || focusable[0]
253
+ return focusable
282
254
  }
283
255
  }
284
256
  }
@@ -12,8 +12,7 @@
12
12
  :class="`${rtl ? 'rtl' : ''} ${isFluid ? 'isScrolled' : ''}`"
13
13
  class="table border"
14
14
  :striped="true"
15
- v-model:sort-desc="sortDesc"
16
- v-model:sort-by="sortBy"
15
+ :sort-by="sortBy"
17
16
  :borderless="false"
18
17
  :responsive="!isFluid"
19
18
  :stacked="!isFluid ? 'sm' : false"
@@ -74,8 +73,8 @@ export default {
74
73
  },
75
74
  data() {
76
75
  return {
77
- sortBy: this.initialSortBy,
78
- sortDesc: false,
76
+ sortBy: [{key:this.initialSortBy, order:'asc'}],
77
+ //sortDesc: false,
79
78
  sortIconNeutral:
80
79
  "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",
81
80
  sortIconDesc:
@@ -91,11 +90,13 @@ export default {
91
90
  },
92
91
  methods: {
93
92
  accessSort(fieldVar) {
94
- this.sortBy = fieldVar.key
93
+ //this.sortBy = fieldVar.key
95
94
  if (fieldVar.thAttr['aria-sort'] === 'none' || fieldVar.thAttr['aria-sort'] === 'descending' ) {
96
- this.sortDesc = false
95
+ this.sortBy = [{key:fieldVar.key, order:'asc'}]
96
+ //this.sortDesc = false
97
97
  } else {
98
- this.sortDesc = true
98
+ this.sortBy = [{key:fieldVar.key, order:'desc'}]
99
+ //this.sortDesc = true
99
100
  }
100
101
  }
101
102
  }
@@ -141,5 +142,9 @@ export default {
141
142
  vertical-align: middle;
142
143
  margin-left: 5px;
143
144
  }
145
+
146
+ .b-table-sortable-column svg {
147
+ display:none;
148
+ }
144
149
  }
145
150
  </style>
@@ -15,8 +15,7 @@ export default {
15
15
  headingTag: 'h2',
16
16
  rtl: false,
17
17
  workwell: false
18
- },
19
- template: '<task-finder v-bind="args" :storybook="true"/>'
18
+ }
20
19
  }
21
20
 
22
21
  export const Default = {}
@@ -21,7 +21,7 @@
21
21
  :selected-task="selectedTask"
22
22
  :is-child="false"
23
23
  :is-mobile-or-tablet-view="isMobileOrTabletView"
24
- @selected="(task) => taskClick(task, true)"
24
+ @selection="(task) => taskClick(task, true)"
25
25
  >
26
26
  <task-finder-column
27
27
  v-if="isMobileOrTabletView && selectedTask"
@@ -31,7 +31,7 @@
31
31
  :selected-task="selectedTask"
32
32
  :is-mobile-or-tablet-view="isMobileOrTabletView"
33
33
  :is-child="true"
34
- @selected="(task) => taskClick(task, false)"
34
+ @selection="(task) => taskClick(task, false)"
35
35
  >
36
36
  </task-finder-column>
37
37
  </task-finder-column>
@@ -49,7 +49,7 @@
49
49
  :selected-task="selectedTask"
50
50
  :is-mobile-or-tablet-view="isMobileOrTabletView"
51
51
  :is-child="true"
52
- @selected="(task) => taskClick(task, false)"
52
+ @selection="(task) => taskClick(task, false)"
53
53
  >
54
54
  </task-finder-column>
55
55
  </column>
@@ -16,7 +16,7 @@
16
16
  isChild ? 'task-finder-column__child' : 'task-finder-column__parent'
17
17
  "
18
18
  :style="cards.length > 6 ? false : 'overflow-y: auto'"
19
- @selected="(card) => $emit('selected', { card })"
19
+ @selected="(card) => $emit('selection', { card })"
20
20
  >
21
21
  <template v-slot:cardItem="{ card }">
22
22
  <card-grid-item
@@ -36,6 +36,31 @@ export default {
36
36
  table: {
37
37
  disable: true
38
38
  }
39
+ },
40
+ changed: {
41
+ table: {
42
+ disable: true
43
+ }
44
+ },
45
+ submitted: {
46
+ table: {
47
+ disable: true
48
+ }
49
+ },
50
+ rendered: {
51
+ table: {
52
+ disable: true
53
+ }
54
+ },
55
+ nextPage: {
56
+ table: {
57
+ disable: true
58
+ }
59
+ },
60
+ prevPage: {
61
+ table: {
62
+ disable: true
63
+ }
39
64
  }
40
65
  },
41
66
  args: {
@@ -24,7 +24,7 @@
24
24
 
25
25
  <script>
26
26
  import FormHandler from '../../SubComponents/FormInstance/components/handler/index.vue'
27
- import colors from '../../../includes/scss/vars/src/colors.scss'
27
+ import colors from '../../../includes/scss/vars/src/colors.scss?inline'
28
28
 
29
29
  export default {
30
30
  name: 'WebformPara',
@@ -3,34 +3,7 @@ import FormAddressPostcode from './index.vue'
3
3
  export default {
4
4
  title: 'SubComponents/FormAddressPostcode',
5
5
  component: FormAddressPostcode,
6
- argTypes: {
7
- showShadow: {
8
- control: 'boolean'
9
- },
10
- inputPlaceholder: {
11
- control: 'text'
12
- },
13
- showFullAddress: {
14
- control: 'boolean'
15
- },
16
- geocode: {
17
- control: 'boolean'
18
- },
19
- reverseGeocode: {
20
- control: 'boolean'
21
- },
22
- baseUrl: {
23
- control: 'text'
24
- },
25
- inputClassName: {
26
- control: 'text'
27
- }
28
- }
29
- }
30
-
31
-
32
- export const Default = {
33
-
6
+ tags: ['autodocs'],
34
7
  args: {
35
8
  showShadow: false,
36
9
  inputPlaceholder: 'Search for a suburb or postcode',
@@ -41,3 +14,5 @@ export const Default = {
41
14
  inputClassName: 'class-name'
42
15
  }
43
16
  }
17
+
18
+ export const Default = {}
@@ -22,12 +22,12 @@
22
22
  @update="searchType !== 'googlerest' ? onChange : () => {}"
23
23
  @keyup.enter="onChange"
24
24
  ></b-form-input>
25
- <b-input-group-append>
25
+ <template #append>
26
26
  <b-button size="sm" class="search-button" @click="onSearch"
27
27
  ><span class="not-extra-small-screen">Search</span>
28
28
  <img alt="search icon" :src="searchIcon"
29
29
  /></b-button>
30
- </b-input-group-append>
30
+ </template>
31
31
  </b-input-group>
32
32
  <search-listing
33
33
  v-if="loadSearchList && (searchResults || isLoading)"
@@ -56,10 +56,10 @@
56
56
  import axios from 'axios'
57
57
  import searchIcon from '../../../assets/icons/search.svg?url'
58
58
  import SearchListing from './SearchListing/index.vue'
59
- import { BButton, BInputGroup, BFormInput, BInputGroupAppend } from 'bootstrap-vue-next'
59
+ import { BButton, BInputGroup, BFormInput } from 'bootstrap-vue-next'
60
60
 
61
61
  export default {
62
- components: { SearchListing, BButton, BInputGroup, BFormInput, BInputGroupAppend },
62
+ components: { SearchListing, BButton, BInputGroup, BFormInput },
63
63
  props: {
64
64
  pageLimit: {
65
65
  type: Number,
@@ -127,13 +127,13 @@ export default {
127
127
  }
128
128
 
129
129
  .modal-header {
130
- position: absolute;
131
130
  top: 0;
132
131
  height: 45px;
133
132
  background: $white;
134
133
  z-index: 1;
135
- width: 100%;
136
-
134
+ margin-left: auto;
135
+ margin-right:0%;
136
+
137
137
  &__wrap {
138
138
  position: relative;
139
139
  width: 100%;
@@ -152,7 +152,7 @@ export default {
152
152
  }
153
153
  }
154
154
  .modal-body {
155
- padding: 32px;
155
+ padding: 0px 32px 32px;
156
156
  margin-top: 16px;
157
157
  .video-player {
158
158
  @include fp(min-height, 250, 588);
@@ -183,9 +183,6 @@ export default {
183
183
  .modal-footer {
184
184
  border: none;
185
185
  }
186
- .modal-footer {
187
- display: none;
188
- }
189
186
  }
190
187
  </style>
191
188
  <style lang="scss" scoped>