@worksafevictoria/wcl7.5 1.1.0-beta.76 → 1.1.0-beta.78
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 +1 -1
- package/src/components/Common/CardGrid/index.vue +48 -52
- package/src/components/Common/CardGridItem/index.vue +7 -2
- package/src/components/Containers/Subheader/index.vue +5 -1
- package/src/components/Global/AppFooter/index.vue +3 -1
- package/src/components/Global/Cookies/index.vue +5 -1
- package/src/components/Global/GlobalNotice/index.vue +9 -2
- package/src/components/Paragraphs/Accordion/AccordionItem/index.vue +4 -4
- package/src/components/Paragraphs/Accordion/StepperItem/index.vue +19 -23
- package/src/components/Paragraphs/Accordion/index.vue +16 -16
- package/src/components/Paragraphs/Directory/Records/index.vue +47 -32
- package/src/components/Paragraphs/ListGroup/index.vue +5 -1
- package/src/components/Paragraphs/Tabs/index.vue +19 -17
- package/src/components/SubComponents/CardGroup/index.vue +5 -1
- package/src/components/SubComponents/FormAddressPostcode/index.vue +33 -36
- package/src/components/SubComponents/ResourceGroup/index.vue +5 -1
- package/src/components/SubComponents/Search/index.vue +35 -33
package/package.json
CHANGED
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
:title-tag="titleTag"
|
|
12
12
|
class="card-grid"
|
|
13
13
|
:content-class="contentClass"
|
|
14
|
-
:class="{
|
|
15
|
-
[uniqueClass]: true
|
|
16
|
-
}"
|
|
14
|
+
:class="`cardGrid-${$.uid}`"
|
|
17
15
|
:card-browse-content="cardBrowseContent"
|
|
18
16
|
>
|
|
19
17
|
<template v-if="$slots.gridHeaderRight" v-slot:headerRight>
|
|
@@ -27,12 +25,12 @@
|
|
|
27
25
|
ref="cardRow"
|
|
28
26
|
:class="{
|
|
29
27
|
['card-grid__row--' + rowSpacing]: true,
|
|
30
|
-
['card-grid__row--' + rowClasses]: true
|
|
28
|
+
['card-grid__row--' + rowClasses]: true,
|
|
31
29
|
}"
|
|
32
30
|
>
|
|
33
31
|
<column
|
|
34
32
|
v-for="(item, index) in cards"
|
|
35
|
-
:key="`${redrawCounter}-${index}-${
|
|
33
|
+
:key="`${redrawCounter}-${index}-${$.uid}`"
|
|
36
34
|
ref="cardColumns"
|
|
37
35
|
:lg="largeViewPort"
|
|
38
36
|
:md="mediumViewPort"
|
|
@@ -40,7 +38,7 @@
|
|
|
40
38
|
cols="12"
|
|
41
39
|
class="card-grid__column"
|
|
42
40
|
:class="{
|
|
43
|
-
['card-grid__column--' + columnSpacing]: true
|
|
41
|
+
['card-grid__column--' + columnSpacing]: true,
|
|
44
42
|
}"
|
|
45
43
|
>
|
|
46
44
|
<slot name="cardItem" :card="item" :index="index"></slot>
|
|
@@ -65,52 +63,52 @@ export default {
|
|
|
65
63
|
props: {
|
|
66
64
|
title: {
|
|
67
65
|
type: String,
|
|
68
|
-
default: null
|
|
66
|
+
default: null,
|
|
69
67
|
},
|
|
70
68
|
subHeading: {
|
|
71
69
|
type: String,
|
|
72
|
-
default: null
|
|
70
|
+
default: null,
|
|
73
71
|
},
|
|
74
72
|
titleTag: {
|
|
75
73
|
type: String,
|
|
76
|
-
default: 'h2'
|
|
74
|
+
default: 'h2',
|
|
77
75
|
},
|
|
78
76
|
cards: {
|
|
79
77
|
type: Array,
|
|
80
|
-
default: () => []
|
|
78
|
+
default: () => [],
|
|
81
79
|
},
|
|
82
80
|
rtl: {
|
|
83
81
|
type: Boolean,
|
|
84
|
-
default: false
|
|
82
|
+
default: false,
|
|
85
83
|
},
|
|
86
84
|
columnsPerRow: {
|
|
87
85
|
type: Number,
|
|
88
|
-
default: 3
|
|
86
|
+
default: 3,
|
|
89
87
|
},
|
|
90
88
|
forceLgColumnsPerRow: {
|
|
91
89
|
type: Number,
|
|
92
|
-
default: undefined
|
|
90
|
+
default: undefined,
|
|
93
91
|
},
|
|
94
92
|
forceMdColumnsPerRow: {
|
|
95
93
|
type: Number,
|
|
96
|
-
default: undefined
|
|
94
|
+
default: undefined,
|
|
97
95
|
},
|
|
98
96
|
forceSmColumnsPerRow: {
|
|
99
97
|
type: Number,
|
|
100
|
-
default: undefined
|
|
98
|
+
default: undefined,
|
|
101
99
|
},
|
|
102
100
|
size: {
|
|
103
101
|
type: String,
|
|
104
102
|
default: 'page',
|
|
105
103
|
validator: (value) =>
|
|
106
|
-
['half-content', 'content', 'page', 'full'].indexOf(value) >= 0
|
|
104
|
+
['half-content', 'content', 'page', 'full'].indexOf(value) >= 0,
|
|
107
105
|
},
|
|
108
106
|
isSelectable: {
|
|
109
|
-
type: Boolean
|
|
107
|
+
type: Boolean,
|
|
110
108
|
},
|
|
111
109
|
cardIdPrefix: {
|
|
112
110
|
type: String,
|
|
113
|
-
default: null
|
|
111
|
+
default: null,
|
|
114
112
|
},
|
|
115
113
|
backgroundVariant: {
|
|
116
114
|
type: String,
|
|
@@ -123,49 +121,49 @@ export default {
|
|
|
123
121
|
'grey',
|
|
124
122
|
'yellow',
|
|
125
123
|
'white',
|
|
126
|
-
'lightblue'
|
|
127
|
-
].indexOf(value) >= 0
|
|
124
|
+
'lightblue',
|
|
125
|
+
].indexOf(value) >= 0,
|
|
128
126
|
},
|
|
129
127
|
applyBackgroundOn: {
|
|
130
128
|
type: String,
|
|
131
129
|
default: 'section',
|
|
132
130
|
validator: (value) =>
|
|
133
|
-
['content', 'block', 'container', 'section'].indexOf(value) >= 0
|
|
131
|
+
['content', 'block', 'container', 'section'].indexOf(value) >= 0,
|
|
134
132
|
},
|
|
135
133
|
noPaddingTop: {
|
|
136
|
-
type: Boolean
|
|
134
|
+
type: Boolean,
|
|
137
135
|
},
|
|
138
136
|
noPaddingBottom: {
|
|
139
|
-
type: Boolean
|
|
137
|
+
type: Boolean,
|
|
140
138
|
},
|
|
141
139
|
rowSpacing: {
|
|
142
140
|
type: String,
|
|
143
141
|
default: 'large',
|
|
144
|
-
validator: (value) => ['none', 'small', 'large'].indexOf(value) >= 0
|
|
142
|
+
validator: (value) => ['none', 'small', 'large'].indexOf(value) >= 0,
|
|
145
143
|
},
|
|
146
144
|
rowClasses: {
|
|
147
145
|
type: String,
|
|
148
|
-
default: null
|
|
146
|
+
default: null,
|
|
149
147
|
},
|
|
150
148
|
columnSpacing: {
|
|
151
149
|
type: String,
|
|
152
150
|
default: 'default',
|
|
153
|
-
validator: (value) => ['default', 'none'].indexOf(value) >= 0
|
|
151
|
+
validator: (value) => ['default', 'none'].indexOf(value) >= 0,
|
|
154
152
|
},
|
|
155
153
|
contentClass: {
|
|
156
154
|
type: String,
|
|
157
|
-
default: ''
|
|
155
|
+
default: '',
|
|
158
156
|
},
|
|
159
157
|
cardBrowseContent: {
|
|
160
158
|
type: Boolean,
|
|
161
|
-
default: false
|
|
162
|
-
}
|
|
159
|
+
default: false,
|
|
160
|
+
},
|
|
163
161
|
},
|
|
164
162
|
data() {
|
|
165
163
|
return {
|
|
166
164
|
childCards: [],
|
|
167
165
|
redrawCounter: 0,
|
|
168
|
-
setColumnSizeDebounce: debounce(this.setColumnSize, 500)
|
|
166
|
+
setColumnSizeDebounce: debounce(this.setColumnSize, 500),
|
|
169
167
|
}
|
|
170
168
|
},
|
|
171
169
|
computed: {
|
|
@@ -192,38 +190,35 @@ export default {
|
|
|
192
190
|
}
|
|
193
191
|
return 6
|
|
194
192
|
},
|
|
195
|
-
uniqueClass() {
|
|
196
|
-
return `cardGrid-${Math.random().toString(36).slice(2, 11)}`
|
|
197
|
-
}
|
|
198
193
|
},
|
|
199
194
|
watch: {
|
|
200
195
|
cards: {
|
|
201
|
-
handler: function() {
|
|
196
|
+
handler: function () {
|
|
202
197
|
this.redrawCounter += 1
|
|
203
198
|
this.setColumnSizeDebounce()
|
|
204
199
|
},
|
|
205
|
-
deep: true
|
|
200
|
+
deep: true,
|
|
206
201
|
},
|
|
207
202
|
columnsPerRow: {
|
|
208
|
-
handler: function() {
|
|
203
|
+
handler: function () {
|
|
209
204
|
this.setColumnSizeDebounce()
|
|
210
|
-
}
|
|
205
|
+
},
|
|
211
206
|
},
|
|
212
207
|
forceSmColumnsPerRow: {
|
|
213
|
-
handler: function() {
|
|
208
|
+
handler: function () {
|
|
214
209
|
this.setColumnSizeDebounce()
|
|
215
|
-
}
|
|
210
|
+
},
|
|
216
211
|
},
|
|
217
212
|
forceMdColumnsPerRow: {
|
|
218
|
-
handler: function() {
|
|
213
|
+
handler: function () {
|
|
219
214
|
this.setColumnSizeDebounce()
|
|
220
|
-
}
|
|
215
|
+
},
|
|
221
216
|
},
|
|
222
217
|
forceLgColumnsPerRow: {
|
|
223
|
-
handler: function() {
|
|
218
|
+
handler: function () {
|
|
224
219
|
this.setColumnSizeDebounce()
|
|
225
|
-
}
|
|
226
|
-
}
|
|
220
|
+
},
|
|
221
|
+
},
|
|
227
222
|
},
|
|
228
223
|
mounted() {
|
|
229
224
|
window.addEventListener('resize', this.setColumnSizeDebounce)
|
|
@@ -243,20 +238,22 @@ export default {
|
|
|
243
238
|
? this.cards[selectedCardModelIndex]
|
|
244
239
|
: null,
|
|
245
240
|
selectedCardModelIndex,
|
|
246
|
-
ev
|
|
241
|
+
ev,
|
|
247
242
|
})
|
|
248
243
|
},
|
|
249
244
|
cardSelected(selectedCard, ev) {
|
|
250
245
|
this.clearCards()
|
|
251
246
|
selectedCard.selected = !!!selectedCard.selected
|
|
252
247
|
const selectedCardModelIndex = this.getChildIndex(selectedCard)
|
|
253
|
-
|
|
248
|
+
|
|
254
249
|
this.$emit('selected', {
|
|
255
250
|
selectedCard: selectedCard.selected
|
|
256
|
-
? this.cardBrowseContent
|
|
251
|
+
? this.cardBrowseContent
|
|
252
|
+
? this.childCards[selectedCardModelIndex]
|
|
253
|
+
: this.cards[selectedCardModelIndex]
|
|
257
254
|
: null,
|
|
258
255
|
selectedCardModelIndex,
|
|
259
|
-
ev
|
|
256
|
+
ev,
|
|
260
257
|
})
|
|
261
258
|
},
|
|
262
259
|
clearCards(selectedCard) {
|
|
@@ -296,19 +293,18 @@ export default {
|
|
|
296
293
|
this.$emit('isMobileOrTabletView', isMobileView || isTabletView)
|
|
297
294
|
this.$emit('gridColumnSize', gridColumnSize)
|
|
298
295
|
this.childCards.forEach((card) =>
|
|
299
|
-
card.setGridMetaData(gridColumnSize, isMobileView, isTabletView)
|
|
296
|
+
card.setGridMetaData(gridColumnSize, isMobileView, isTabletView),
|
|
300
297
|
)
|
|
301
298
|
}
|
|
302
299
|
})
|
|
303
300
|
},
|
|
304
301
|
handleFocus(ev) {
|
|
305
302
|
this.$emit('focussed', ev)
|
|
306
|
-
}
|
|
307
|
-
}
|
|
303
|
+
},
|
|
304
|
+
},
|
|
308
305
|
}
|
|
309
306
|
</script>
|
|
310
307
|
|
|
311
|
-
|
|
312
308
|
<style lang="scss" scoped>
|
|
313
309
|
@import '../../../includes/scss/all';
|
|
314
310
|
.card-grid {
|
|
@@ -524,7 +524,10 @@ export default {
|
|
|
524
524
|
}
|
|
525
525
|
if (
|
|
526
526
|
(this.link,
|
|
527
|
-
this.isAbsoluteUrl(this.link) &&
|
|
527
|
+
this.isAbsoluteUrl(this.link) &&
|
|
528
|
+
(this.$config
|
|
529
|
+
? this.$config.public.caretaker
|
|
530
|
+
: process.env.CARETAKER) === 'false')
|
|
528
531
|
) {
|
|
529
532
|
this.$gtm.push({
|
|
530
533
|
event: 'custom.interaction.outboundlink',
|
|
@@ -538,7 +541,9 @@ export default {
|
|
|
538
541
|
this.link &&
|
|
539
542
|
this.isAbsoluteUrl(this.link) &&
|
|
540
543
|
isGovSite(this.link) &&
|
|
541
|
-
|
|
544
|
+
(this.$config
|
|
545
|
+
? this.$config.public.caretaker
|
|
546
|
+
: process.env.CARETAKER) === 'true'
|
|
542
547
|
) {
|
|
543
548
|
this.$gtm.push({
|
|
544
549
|
event: 'custom.interaction.outboundlink',
|
|
@@ -102,7 +102,11 @@ export default {
|
|
|
102
102
|
methods: {
|
|
103
103
|
selectedCard(card) {
|
|
104
104
|
// Some custom logic for gov caretaker logic
|
|
105
|
-
if (
|
|
105
|
+
if (
|
|
106
|
+
(this.$config
|
|
107
|
+
? this.$config.public.caretaker
|
|
108
|
+
: process.env.CARETAKER) === 'true'
|
|
109
|
+
) {
|
|
106
110
|
if (!isGovSite(card?.selectedCard?.linkHref)) {
|
|
107
111
|
// this.$store.commit('page/SET_CARETAKER_REF', 'subheader')
|
|
108
112
|
// this.$root.$emit('caretaker-open', card?.selectedCard?.linkHref)
|
|
@@ -425,7 +425,9 @@ export default {
|
|
|
425
425
|
showForm: false,
|
|
426
426
|
submitted: false,
|
|
427
427
|
endpoint:
|
|
428
|
-
|
|
428
|
+
(this.$config
|
|
429
|
+
? this.$config.public.apiURL
|
|
430
|
+
: process.env.CONTENT_API_URL) + '/webform_rest/submit?_format=json',
|
|
429
431
|
response: {
|
|
430
432
|
webform_id: 'page_feedback_form',
|
|
431
433
|
page_url: '',
|
|
@@ -253,7 +253,11 @@ export default {
|
|
|
253
253
|
},
|
|
254
254
|
showCookie() {
|
|
255
255
|
//Check first if cookies have been turned on in the environment variable
|
|
256
|
-
return
|
|
256
|
+
return (this.$config
|
|
257
|
+
? this.$config.public.showCookie
|
|
258
|
+
: process.env.SHOW_COOKIE) === false
|
|
259
|
+
? false
|
|
260
|
+
: true
|
|
257
261
|
},
|
|
258
262
|
},
|
|
259
263
|
mounted() {
|
|
@@ -73,7 +73,11 @@ export default {
|
|
|
73
73
|
computed: {
|
|
74
74
|
showGlobalNotice() {
|
|
75
75
|
//Check first if SHOW_GLOBAL_NOTICE have been turned on in the environment variable
|
|
76
|
-
return
|
|
76
|
+
return (this.$config
|
|
77
|
+
? this.$config.public.globalNotice
|
|
78
|
+
: process.env.SHOW_GLOBAL_NOTICE) === false
|
|
79
|
+
? false
|
|
80
|
+
: true
|
|
77
81
|
},
|
|
78
82
|
},
|
|
79
83
|
mounted() {
|
|
@@ -104,7 +108,10 @@ export default {
|
|
|
104
108
|
this.showGlobalNotice === true &&
|
|
105
109
|
!localStorage.getItem('globalModalHidden')
|
|
106
110
|
} else {
|
|
107
|
-
this.displayGlobal =
|
|
111
|
+
this.displayGlobal =
|
|
112
|
+
(this.$config
|
|
113
|
+
? this.$config.public.globalNotice
|
|
114
|
+
: process.env.SHOW_GLOBAL_NOTICE) === true
|
|
108
115
|
}
|
|
109
116
|
},
|
|
110
117
|
},
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
}"
|
|
11
11
|
>
|
|
12
12
|
<a
|
|
13
|
-
:id="'accordion' +
|
|
13
|
+
:id="'accordion' + $.uid ? $.uid : ''"
|
|
14
14
|
role="button"
|
|
15
15
|
:aria-expanded="showAccordion ? 'true' : 'false'"
|
|
16
16
|
class="accordion-item__title"
|
|
17
|
-
:aria-controls="'sect' +
|
|
17
|
+
:aria-controls="'sect' + $.uid ? $.uid : ''"
|
|
18
18
|
tabindex="0"
|
|
19
19
|
@click.prevent="toggleAccordion"
|
|
20
20
|
@keypress.enter="toggleAccordion"
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
<b-card-body v-if="content">
|
|
52
52
|
<div
|
|
53
53
|
v-show="showAccordion"
|
|
54
|
-
:id="'sect' +
|
|
54
|
+
:id="'sect' + $.uid ? $.uid : ''"
|
|
55
55
|
class="accordion-item__content"
|
|
56
56
|
role="region"
|
|
57
|
-
:aria-labelledby="'accordion' +
|
|
57
|
+
:aria-labelledby="'accordion' + $.uid ? $.uid : ''"
|
|
58
58
|
>
|
|
59
59
|
<rich-text :content="content" />
|
|
60
60
|
</div>
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
v-if="title"
|
|
6
6
|
class="accordion-stepper"
|
|
7
7
|
:class="{
|
|
8
|
-
rtl: rtl
|
|
8
|
+
rtl: rtl,
|
|
9
9
|
}"
|
|
10
10
|
>
|
|
11
11
|
<div>
|
|
12
12
|
<button
|
|
13
|
-
:id="'accordion' +
|
|
13
|
+
:id="'accordion' + $.uid ? $.uid : ''"
|
|
14
14
|
:aria-expanded="showAccordion ? 'true' : 'false'"
|
|
15
15
|
class="accordion-stepper__title"
|
|
16
|
-
:aria-controls="'sect' +
|
|
16
|
+
:aria-controls="'sect' + $.uid ? $.uid : ''"
|
|
17
17
|
@click="toggleAccordion"
|
|
18
18
|
>
|
|
19
19
|
<div
|
|
@@ -25,13 +25,9 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
27
|
<div class="accordion-stepper__titleText">
|
|
28
|
-
<rich-text
|
|
29
|
-
:tag="'h3'"
|
|
30
|
-
:tag-class="'card-title'"
|
|
31
|
-
:content="title"
|
|
32
|
-
/>
|
|
28
|
+
<rich-text :tag="'h3'" :tag-class="'card-title'" :content="title" />
|
|
33
29
|
</div>
|
|
34
|
-
|
|
30
|
+
|
|
35
31
|
<div class="stepper-icon__wrapper">
|
|
36
32
|
<icon
|
|
37
33
|
v-show="showAccordion && content"
|
|
@@ -54,10 +50,10 @@
|
|
|
54
50
|
<b-card-body v-if="content">
|
|
55
51
|
<div
|
|
56
52
|
v-show="showAccordion"
|
|
57
|
-
:id="'sect' +
|
|
53
|
+
:id="'sect' + $.uid ? $.uid : ''"
|
|
58
54
|
class="accordion-stepper__content"
|
|
59
55
|
role="region"
|
|
60
|
-
:aria-labelledby="'accordion' +
|
|
56
|
+
:aria-labelledby="'accordion' + $.uid ? $.uid : ''"
|
|
61
57
|
>
|
|
62
58
|
<rich-text :content="content" />
|
|
63
59
|
</div>
|
|
@@ -80,42 +76,42 @@ export default {
|
|
|
80
76
|
RichText,
|
|
81
77
|
Icon,
|
|
82
78
|
BCard,
|
|
83
|
-
BCardBody
|
|
79
|
+
BCardBody,
|
|
84
80
|
},
|
|
85
81
|
props: {
|
|
86
82
|
title: {
|
|
87
83
|
type: String,
|
|
88
|
-
default: 'Item'
|
|
84
|
+
default: 'Item',
|
|
89
85
|
},
|
|
90
86
|
content: {
|
|
91
87
|
type: String,
|
|
92
|
-
default: null
|
|
88
|
+
default: null,
|
|
93
89
|
},
|
|
94
90
|
rtl: {
|
|
95
91
|
type: Boolean,
|
|
96
|
-
default: false
|
|
92
|
+
default: false,
|
|
97
93
|
},
|
|
98
94
|
open: {
|
|
99
95
|
type: Boolean,
|
|
100
|
-
default: false
|
|
96
|
+
default: false,
|
|
101
97
|
},
|
|
102
98
|
showPreHeading: {
|
|
103
99
|
type: Boolean,
|
|
104
|
-
default: false
|
|
100
|
+
default: false,
|
|
105
101
|
},
|
|
106
102
|
number: {
|
|
107
103
|
type: Number,
|
|
108
|
-
default: null
|
|
104
|
+
default: null,
|
|
109
105
|
},
|
|
110
106
|
isWorkWell: {
|
|
111
107
|
type: Boolean,
|
|
112
|
-
default: false
|
|
113
|
-
}
|
|
108
|
+
default: false,
|
|
109
|
+
},
|
|
114
110
|
},
|
|
115
111
|
data: () => ({
|
|
116
112
|
showAccordion: false,
|
|
117
113
|
CaretDown,
|
|
118
|
-
CaretUp
|
|
114
|
+
CaretUp,
|
|
119
115
|
}),
|
|
120
116
|
mounted() {
|
|
121
117
|
this.$nextTick(() => {
|
|
@@ -125,8 +121,8 @@ export default {
|
|
|
125
121
|
methods: {
|
|
126
122
|
toggleAccordion() {
|
|
127
123
|
this.showAccordion = !this.showAccordion
|
|
128
|
-
}
|
|
129
|
-
}
|
|
124
|
+
},
|
|
125
|
+
},
|
|
130
126
|
}
|
|
131
127
|
</script>
|
|
132
128
|
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
<ol class="accordion-list">
|
|
11
11
|
<li
|
|
12
12
|
v-for="(item, index) in accordionList"
|
|
13
|
-
:key="
|
|
13
|
+
:key="$.uid ? $.uid : '' + index"
|
|
14
14
|
:class="{
|
|
15
15
|
workwell: isWorkwell,
|
|
16
16
|
rtl: rtl || item.field_rtl,
|
|
17
|
-
stepper: isStepper
|
|
17
|
+
stepper: isStepper,
|
|
18
18
|
}"
|
|
19
19
|
class="accordion"
|
|
20
20
|
>
|
|
@@ -55,51 +55,51 @@ export default {
|
|
|
55
55
|
props: {
|
|
56
56
|
titleTag: {
|
|
57
57
|
type: String,
|
|
58
|
-
default: 'h2'
|
|
58
|
+
default: 'h2',
|
|
59
59
|
},
|
|
60
60
|
title: {
|
|
61
61
|
type: String,
|
|
62
|
-
default: null
|
|
62
|
+
default: null,
|
|
63
63
|
},
|
|
64
64
|
isStepper: {
|
|
65
65
|
type: Boolean,
|
|
66
|
-
default: false
|
|
66
|
+
default: false,
|
|
67
67
|
},
|
|
68
68
|
showPreHeading: {
|
|
69
69
|
type: Boolean,
|
|
70
|
-
default: false
|
|
70
|
+
default: false,
|
|
71
71
|
},
|
|
72
72
|
isWorkwell: {
|
|
73
73
|
type: Boolean,
|
|
74
|
-
default: false
|
|
74
|
+
default: false,
|
|
75
75
|
},
|
|
76
76
|
accordionList: {
|
|
77
77
|
type: Array,
|
|
78
|
-
default: null
|
|
78
|
+
default: null,
|
|
79
79
|
},
|
|
80
80
|
rtl: {
|
|
81
81
|
type: Boolean,
|
|
82
|
-
default: false
|
|
82
|
+
default: false,
|
|
83
83
|
},
|
|
84
84
|
size: {
|
|
85
85
|
type: String,
|
|
86
|
-
default: 'content'
|
|
86
|
+
default: 'content',
|
|
87
87
|
},
|
|
88
88
|
option: {
|
|
89
89
|
type: String,
|
|
90
|
-
default: 'open-first'
|
|
91
|
-
}
|
|
90
|
+
default: 'open-first',
|
|
91
|
+
},
|
|
92
92
|
},
|
|
93
93
|
data: () => ({
|
|
94
94
|
OPEN_ALL: 'open-all',
|
|
95
95
|
CLOSE_ALL: 'close-all',
|
|
96
96
|
OPEN_FIRST: 'open-first',
|
|
97
|
-
accordionOption: null
|
|
97
|
+
accordionOption: null,
|
|
98
98
|
}),
|
|
99
99
|
computed: {
|
|
100
100
|
isPDF() {
|
|
101
101
|
return typeof this.$isPDF === 'function' ? this.$isPDF() : false
|
|
102
|
-
}
|
|
102
|
+
},
|
|
103
103
|
},
|
|
104
104
|
mounted() {
|
|
105
105
|
if (this.option) {
|
|
@@ -121,8 +121,8 @@ export default {
|
|
|
121
121
|
},
|
|
122
122
|
hasContent(item) {
|
|
123
123
|
return item?.field_rich_text?.value
|
|
124
|
-
}
|
|
125
|
-
}
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
126
|
}
|
|
127
127
|
</script>
|
|
128
128
|
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
<div v-if="items.length" class="paragraph--directory__records">
|
|
3
3
|
<template v-for="(item, index) in flatRecords">
|
|
4
4
|
<prs-record v-if="item.type === 'prs'" :key="index" :item="item" />
|
|
5
|
-
<isp-record
|
|
5
|
+
<isp-record
|
|
6
|
+
v-if="item.type === 'isp'"
|
|
7
|
+
:key="index"
|
|
8
|
+
:item="item"
|
|
9
|
+
:location="baseLocation"
|
|
10
|
+
/>
|
|
6
11
|
<hscp-record v-if="item.type === 'hscp'" :key="index" :item="item" />
|
|
7
12
|
<cj-record v-if="item.type === 'cj'" :key="index" :item="item" />
|
|
8
13
|
</template>
|
|
@@ -19,21 +24,21 @@ export default {
|
|
|
19
24
|
PrsRecord,
|
|
20
25
|
IspRecord,
|
|
21
26
|
CjRecord,
|
|
22
|
-
HscpRecord
|
|
27
|
+
HscpRecord,
|
|
23
28
|
},
|
|
24
29
|
props: {
|
|
25
30
|
items: {
|
|
26
31
|
type: Array,
|
|
27
|
-
required: true
|
|
32
|
+
required: true,
|
|
28
33
|
},
|
|
29
34
|
taxonomies: {
|
|
30
35
|
type: Array,
|
|
31
|
-
required: true
|
|
36
|
+
required: true,
|
|
32
37
|
},
|
|
33
38
|
baseLocation: {
|
|
34
39
|
type: [Object, Boolean],
|
|
35
|
-
default: false
|
|
36
|
-
}
|
|
40
|
+
default: false,
|
|
41
|
+
},
|
|
37
42
|
},
|
|
38
43
|
computed: {
|
|
39
44
|
flatRecords() {
|
|
@@ -64,13 +69,15 @@ export default {
|
|
|
64
69
|
field_prs_datepublished,
|
|
65
70
|
attachmentFormatted,
|
|
66
71
|
file_src_root,
|
|
67
|
-
file_src
|
|
68
|
-
} = {}
|
|
69
|
-
} = {}
|
|
72
|
+
file_src,
|
|
73
|
+
} = {},
|
|
74
|
+
} = {},
|
|
70
75
|
} = record
|
|
71
76
|
|
|
72
77
|
if (record_attachment !== undefined) {
|
|
73
|
-
file_src_root =
|
|
78
|
+
file_src_root = this.$config
|
|
79
|
+
? this.$config.public.apiURL
|
|
80
|
+
: process.env.CONTENT_API_URL
|
|
74
81
|
file_src = file_src_root + record_attachment
|
|
75
82
|
attachmentFormatted = record_attachment
|
|
76
83
|
.split(/.*[\/|\\]/)[1]
|
|
@@ -99,17 +106,17 @@ export default {
|
|
|
99
106
|
court: this.getTaxonomyLabelsByTid('Court', record_prs_court),
|
|
100
107
|
category: this.getTaxonomyLabelsByTid(
|
|
101
108
|
'Category',
|
|
102
|
-
record_prs_category
|
|
109
|
+
record_prs_category,
|
|
103
110
|
),
|
|
104
111
|
legislation: this.getTaxonomyLabelsByTid(
|
|
105
112
|
'Legislation',
|
|
106
|
-
record_prs_legislation
|
|
107
|
-
)
|
|
113
|
+
record_prs_legislation,
|
|
114
|
+
),
|
|
108
115
|
// coram: this.getTaxonomyLabelsByTid(
|
|
109
116
|
// 'record_prs_coram',
|
|
110
117
|
// record_prs_coram
|
|
111
118
|
// )
|
|
112
|
-
}
|
|
119
|
+
},
|
|
113
120
|
})
|
|
114
121
|
}
|
|
115
122
|
if (record.record_type === 'isp') {
|
|
@@ -119,9 +126,9 @@ export default {
|
|
|
119
126
|
attributes: {
|
|
120
127
|
title,
|
|
121
128
|
field_location,
|
|
122
|
-
isp: { suburb, postcode, phone_number, mobile_number } = {}
|
|
123
|
-
} = {}
|
|
124
|
-
} = {}
|
|
129
|
+
isp: { suburb, postcode, phone_number, mobile_number } = {},
|
|
130
|
+
} = {},
|
|
131
|
+
} = {},
|
|
125
132
|
} = record
|
|
126
133
|
flatRecords.push({
|
|
127
134
|
id: record_id,
|
|
@@ -129,15 +136,15 @@ export default {
|
|
|
129
136
|
title,
|
|
130
137
|
contact: {
|
|
131
138
|
mobile: mobile_number,
|
|
132
|
-
phone: phone_number
|
|
139
|
+
phone: phone_number,
|
|
133
140
|
},
|
|
134
141
|
address: {
|
|
135
142
|
suburb,
|
|
136
143
|
postcode,
|
|
137
144
|
map: {
|
|
138
|
-
field_location
|
|
139
|
-
}
|
|
140
|
-
}
|
|
145
|
+
field_location,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
141
148
|
})
|
|
142
149
|
}
|
|
143
150
|
if (record.record_type === 'hscp') {
|
|
@@ -146,9 +153,17 @@ export default {
|
|
|
146
153
|
data: {
|
|
147
154
|
attributes: {
|
|
148
155
|
title,
|
|
149
|
-
hscp: {
|
|
150
|
-
|
|
151
|
-
|
|
156
|
+
hscp: {
|
|
157
|
+
fulladdress,
|
|
158
|
+
workphone,
|
|
159
|
+
tollfreephone,
|
|
160
|
+
email,
|
|
161
|
+
website,
|
|
162
|
+
courses,
|
|
163
|
+
companyid,
|
|
164
|
+
} = {},
|
|
165
|
+
} = {},
|
|
166
|
+
} = {},
|
|
152
167
|
} = record
|
|
153
168
|
flatRecords.push({
|
|
154
169
|
id: record_id,
|
|
@@ -160,7 +175,7 @@ export default {
|
|
|
160
175
|
email,
|
|
161
176
|
website,
|
|
162
177
|
courses,
|
|
163
|
-
companyid
|
|
178
|
+
companyid,
|
|
164
179
|
})
|
|
165
180
|
}
|
|
166
181
|
if (record.record_type === 'cj') {
|
|
@@ -173,9 +188,9 @@ export default {
|
|
|
173
188
|
data: {
|
|
174
189
|
attributes: {
|
|
175
190
|
field_cj_datejudgement,
|
|
176
|
-
field_cj_datepublished
|
|
177
|
-
} = {}
|
|
178
|
-
} = {}
|
|
191
|
+
field_cj_datepublished,
|
|
192
|
+
} = {},
|
|
193
|
+
} = {},
|
|
179
194
|
} = record
|
|
180
195
|
flatRecords.push({
|
|
181
196
|
id: record_id,
|
|
@@ -185,12 +200,12 @@ export default {
|
|
|
185
200
|
appeal: record_cj_appeal,
|
|
186
201
|
court: record_cj_court,
|
|
187
202
|
judge: record_cj_judge,
|
|
188
|
-
judgement: field_cj_datejudgement
|
|
203
|
+
judgement: field_cj_datejudgement,
|
|
189
204
|
})
|
|
190
205
|
}
|
|
191
206
|
})
|
|
192
207
|
return flatRecords
|
|
193
|
-
}
|
|
208
|
+
},
|
|
194
209
|
},
|
|
195
210
|
methods: {
|
|
196
211
|
getTaxonomyLabelsByTid(taxName, listOfIds) {
|
|
@@ -218,7 +233,7 @@ export default {
|
|
|
218
233
|
}
|
|
219
234
|
return foundTerms
|
|
220
235
|
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
236
|
+
},
|
|
237
|
+
},
|
|
223
238
|
}
|
|
224
239
|
</script>
|
|
@@ -136,7 +136,11 @@ export default {
|
|
|
136
136
|
},
|
|
137
137
|
selectedCard(card) {
|
|
138
138
|
// Some custom logic for gov caretaker logic
|
|
139
|
-
if (
|
|
139
|
+
if (
|
|
140
|
+
(this.$config
|
|
141
|
+
? this.$config.public.caretaker
|
|
142
|
+
: process.env.CARETAKER) === 'true'
|
|
143
|
+
) {
|
|
140
144
|
if (!isGovSite(card?.selectedCard?.link)) {
|
|
141
145
|
// this.$store.commit('page/SET_CARETAKER_REF', 'list-group')
|
|
142
146
|
// this.$root.$emit('caretaker-open', card?.selectedCard?.link)
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
<b-tabs v-model="tabIndex">
|
|
17
17
|
<b-tab
|
|
18
18
|
v-for="(item, index) in items"
|
|
19
|
-
:key="`${index}-${
|
|
19
|
+
:key="`${index}-${$.uid}`"
|
|
20
20
|
:title="item.title"
|
|
21
|
-
:title-link-class="`tab-item-${index}-${
|
|
21
|
+
:title-link-class="`tab-item-${index}-${$.uid}`"
|
|
22
22
|
>
|
|
23
23
|
<rich-text
|
|
24
24
|
:content="item.content.value"
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
><rich-text
|
|
35
35
|
:tag="titleTag"
|
|
36
36
|
:content="title"
|
|
37
|
-
:without-container="true"/></column
|
|
37
|
+
:without-container="true" /></column
|
|
38
38
|
></row>
|
|
39
|
-
<row v-for="(item, index) in items" :key="`${index}-${
|
|
39
|
+
<row v-for="(item, index) in items" :key="`${index}-${$.uid}`">
|
|
40
40
|
<column>
|
|
41
41
|
<rich-text :content="getPdfContent(item)" :without-container="true" />
|
|
42
42
|
</column>
|
|
@@ -61,29 +61,29 @@ export default {
|
|
|
61
61
|
Row,
|
|
62
62
|
Column,
|
|
63
63
|
BTab,
|
|
64
|
-
BTabs
|
|
64
|
+
BTabs,
|
|
65
65
|
},
|
|
66
66
|
props: {
|
|
67
67
|
title: {
|
|
68
68
|
type: String,
|
|
69
|
-
default: null
|
|
69
|
+
default: null,
|
|
70
70
|
},
|
|
71
71
|
titleTag: {
|
|
72
72
|
type: String,
|
|
73
|
-
default: 'h2'
|
|
73
|
+
default: 'h2',
|
|
74
74
|
},
|
|
75
75
|
items: {
|
|
76
76
|
type: Array,
|
|
77
|
-
required: true
|
|
77
|
+
required: true,
|
|
78
78
|
},
|
|
79
79
|
rtl: {
|
|
80
80
|
type: Boolean,
|
|
81
|
-
default: false
|
|
81
|
+
default: false,
|
|
82
82
|
},
|
|
83
83
|
workwell: {
|
|
84
84
|
type: Boolean,
|
|
85
|
-
default: false
|
|
86
|
-
}
|
|
85
|
+
default: false,
|
|
86
|
+
},
|
|
87
87
|
},
|
|
88
88
|
data() {
|
|
89
89
|
return {
|
|
@@ -91,18 +91,20 @@ export default {
|
|
|
91
91
|
scrollIntoViewOptions: {
|
|
92
92
|
behavior: 'smooth',
|
|
93
93
|
block: 'center',
|
|
94
|
-
inline: 'nearest'
|
|
95
|
-
}
|
|
94
|
+
inline: 'nearest',
|
|
95
|
+
},
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
computed: {
|
|
99
99
|
activeTabEl() {
|
|
100
|
-
let el = document.querySelector(
|
|
100
|
+
let el = document.querySelector(
|
|
101
|
+
`.tab-item-${this.tabIndex}-${this.$.uid}`,
|
|
102
|
+
)
|
|
101
103
|
return el
|
|
102
104
|
},
|
|
103
105
|
isPDF() {
|
|
104
106
|
return typeof this.$isPDF === 'function' ? this.$isPDF() : false
|
|
105
|
-
}
|
|
107
|
+
},
|
|
106
108
|
},
|
|
107
109
|
methods: {
|
|
108
110
|
handleTabNav(direction) {
|
|
@@ -118,8 +120,8 @@ export default {
|
|
|
118
120
|
},
|
|
119
121
|
getPdfContent(item) {
|
|
120
122
|
return `<${this.titleTag}>${item.title}</${this.titleTag}>${item.content.value}`
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
+
},
|
|
124
|
+
},
|
|
123
125
|
}
|
|
124
126
|
</script>
|
|
125
127
|
<style lang="scss" scoped>
|
|
@@ -179,7 +179,11 @@ export default {
|
|
|
179
179
|
},
|
|
180
180
|
selectedCard(card) {
|
|
181
181
|
// Some custom logic for gov caretaker logic
|
|
182
|
-
if (
|
|
182
|
+
if (
|
|
183
|
+
(this.$config
|
|
184
|
+
? this.$config.public.caretaker
|
|
185
|
+
: process.env.CARETAKER) === 'true'
|
|
186
|
+
) {
|
|
183
187
|
if (!isGovSite(card?.selectedCard?.link)) {
|
|
184
188
|
// this.$store.commit('page/SET_CARETAKER_REF', 'card-group')
|
|
185
189
|
// this.$root.$emit('caretaker-open', card?.selectedCard?.link)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="suburb-postcode-search">
|
|
3
3
|
<input
|
|
4
|
-
:id="`suburb-postcode-search-input-${
|
|
4
|
+
:id="`suburb-postcode-search-input-${$.uid}`"
|
|
5
5
|
v-model="suburb.text"
|
|
6
6
|
autocomplete="no"
|
|
7
7
|
:placeholder="inputPlaceholder"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
aria-controls="sp-suggestions"
|
|
11
11
|
:class="{
|
|
12
12
|
'suburb-postcode-search--show-shadow': showShadow,
|
|
13
|
-
[inputClassName]: true
|
|
13
|
+
[inputClassName]: true,
|
|
14
14
|
}"
|
|
15
15
|
@keyup.prevent="searchSuburbPostcodeDebounce($event)"
|
|
16
16
|
/>
|
|
@@ -51,51 +51,51 @@ export default {
|
|
|
51
51
|
props: {
|
|
52
52
|
showShadow: {
|
|
53
53
|
type: Boolean,
|
|
54
|
-
default: false
|
|
54
|
+
default: false,
|
|
55
55
|
},
|
|
56
56
|
inputPlaceholder: {
|
|
57
57
|
type: String,
|
|
58
|
-
default: 'Search for a suburb or postcode'
|
|
58
|
+
default: 'Search for a suburb or postcode',
|
|
59
59
|
},
|
|
60
60
|
showFullAddress: {
|
|
61
61
|
type: Boolean,
|
|
62
|
-
default: false
|
|
62
|
+
default: false,
|
|
63
63
|
},
|
|
64
64
|
geocode: {
|
|
65
65
|
type: Boolean,
|
|
66
|
-
default: false
|
|
66
|
+
default: false,
|
|
67
67
|
},
|
|
68
68
|
reverseGeocode: {
|
|
69
69
|
type: Boolean,
|
|
70
|
-
default: false
|
|
70
|
+
default: false,
|
|
71
71
|
},
|
|
72
72
|
baseUrl: {
|
|
73
73
|
type: String,
|
|
74
|
-
default: ''
|
|
74
|
+
default: '',
|
|
75
75
|
},
|
|
76
76
|
inputClassName: {
|
|
77
77
|
type: String,
|
|
78
|
-
default: ''
|
|
79
|
-
}
|
|
78
|
+
default: '',
|
|
79
|
+
},
|
|
80
80
|
},
|
|
81
81
|
data() {
|
|
82
82
|
return {
|
|
83
83
|
suburb: {
|
|
84
84
|
text: null,
|
|
85
85
|
value: null,
|
|
86
|
-
location: null
|
|
86
|
+
location: null,
|
|
87
87
|
},
|
|
88
88
|
results: [],
|
|
89
89
|
show: false,
|
|
90
90
|
searchSuburbPostcodeDebounce: debounce(this.searchSuburbPostcode, 500, {
|
|
91
|
-
trailing: true
|
|
91
|
+
trailing: true,
|
|
92
92
|
}),
|
|
93
93
|
options: {
|
|
94
94
|
enableHighAccuracy: true,
|
|
95
95
|
timeout: 5000,
|
|
96
|
-
maximumAge: 0
|
|
96
|
+
maximumAge: 0,
|
|
97
97
|
},
|
|
98
|
-
searchingAddress: false
|
|
98
|
+
searchingAddress: false,
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
computed: {
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
},
|
|
106
106
|
isIE() {
|
|
107
107
|
return window && navigator && this.detectBrowser(navigator) === 'IE'
|
|
108
|
-
}
|
|
108
|
+
},
|
|
109
109
|
},
|
|
110
110
|
watch: {
|
|
111
111
|
suburb: {
|
|
@@ -115,8 +115,8 @@ export default {
|
|
|
115
115
|
if (!this.suburb.location && this.suburb.text.length === 0) {
|
|
116
116
|
this.$emit('cleared')
|
|
117
117
|
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
120
|
},
|
|
121
121
|
methods: {
|
|
122
122
|
detectBrowser,
|
|
@@ -145,10 +145,9 @@ export default {
|
|
|
145
145
|
|
|
146
146
|
try {
|
|
147
147
|
const response = await (this?.$axios || axios).get(
|
|
148
|
-
`${
|
|
149
|
-
window.origin
|
|
150
|
-
|
|
151
|
-
}`
|
|
148
|
+
`${
|
|
149
|
+
this.baseUrl || window.origin
|
|
150
|
+
}/places/api/v1/place/autocomplete/json?${this.queryString}`,
|
|
152
151
|
)
|
|
153
152
|
const predictions = response?.data?.predictions || []
|
|
154
153
|
if (
|
|
@@ -182,28 +181,28 @@ export default {
|
|
|
182
181
|
},
|
|
183
182
|
async getLatLng(address) {
|
|
184
183
|
const geocodedAddress = await (this.$axios || axios).get(
|
|
185
|
-
`${this.baseUrl}/places/api/v1/geocode/json?address=${address}&components=country:au&sensor=false
|
|
184
|
+
`${this.baseUrl}/places/api/v1/geocode/json?address=${address}&components=country:au&sensor=false`,
|
|
186
185
|
)
|
|
187
186
|
if (geocodedAddress.data?.results[0]) {
|
|
188
187
|
return Promise.resolve(
|
|
189
|
-
geocodedAddress.data.results[0].geometry.location
|
|
188
|
+
geocodedAddress.data.results[0].geometry.location,
|
|
190
189
|
)
|
|
191
190
|
}
|
|
192
191
|
},
|
|
193
192
|
async searchAddressByLatLng(lat, lng) {
|
|
194
193
|
const geocodedAddress = await (this.$axios || axios).get(
|
|
195
|
-
`${this.baseUrl}/places/api/v1/geocode/json?latlng=${lat},${lng}
|
|
194
|
+
`${this.baseUrl}/places/api/v1/geocode/json?latlng=${lat},${lng}`,
|
|
196
195
|
)
|
|
197
196
|
if (geocodedAddress.data?.results[0]) {
|
|
198
197
|
return Promise.resolve(
|
|
199
|
-
geocodedAddress.data.results[0].formatted_address
|
|
198
|
+
geocodedAddress.data.results[0].formatted_address,
|
|
200
199
|
)
|
|
201
200
|
}
|
|
202
201
|
},
|
|
203
202
|
async updateValue(v) {
|
|
204
203
|
this.suburb = {
|
|
205
204
|
text: v.description,
|
|
206
|
-
value: v.structured_formatting.main_text
|
|
205
|
+
value: v.structured_formatting.main_text,
|
|
207
206
|
}
|
|
208
207
|
if (this.geocode && this.suburb.value) {
|
|
209
208
|
this.suburb.location = await this.getLatLng(this.suburb.value)
|
|
@@ -213,10 +212,8 @@ export default {
|
|
|
213
212
|
// Next tick is too fast
|
|
214
213
|
// have to wait for DOM to update
|
|
215
214
|
let self = this
|
|
216
|
-
setTimeout(function() {
|
|
217
|
-
document
|
|
218
|
-
.getElementById(`suburb-postcode-search-input-${_uid}`)
|
|
219
|
-
.focus()
|
|
215
|
+
setTimeout(function () {
|
|
216
|
+
document.getElementById(`suburb-postcode-search-input-${$.uid}`).focus()
|
|
220
217
|
}, 100)
|
|
221
218
|
},
|
|
222
219
|
focusPrevious(e) {
|
|
@@ -236,7 +233,7 @@ export default {
|
|
|
236
233
|
return navigator.geolocation.getCurrentPosition(
|
|
237
234
|
self.findAndUpdateAddress,
|
|
238
235
|
self.errorFindingLocation,
|
|
239
|
-
self.options
|
|
236
|
+
self.options,
|
|
240
237
|
)
|
|
241
238
|
} else {
|
|
242
239
|
return false
|
|
@@ -244,7 +241,7 @@ export default {
|
|
|
244
241
|
},
|
|
245
242
|
async findAndUpdateAddress(pos) {
|
|
246
243
|
let {
|
|
247
|
-
coords: { latitude, longitude }
|
|
244
|
+
coords: { latitude, longitude },
|
|
248
245
|
} = pos
|
|
249
246
|
let foundAddress = await this.searchAddressByLatLng(latitude, longitude)
|
|
250
247
|
this.suburb = {
|
|
@@ -252,16 +249,16 @@ export default {
|
|
|
252
249
|
value: foundAddress,
|
|
253
250
|
location: {
|
|
254
251
|
lat: latitude,
|
|
255
|
-
lng: longitude
|
|
256
|
-
}
|
|
252
|
+
lng: longitude,
|
|
253
|
+
},
|
|
257
254
|
}
|
|
258
255
|
this.searchingAddress = false
|
|
259
256
|
this.$emit('suburbChange', this.suburb)
|
|
260
257
|
},
|
|
261
258
|
errorFindingLocation(err) {
|
|
262
259
|
console.warn(err)
|
|
263
|
-
}
|
|
264
|
-
}
|
|
260
|
+
},
|
|
261
|
+
},
|
|
265
262
|
}
|
|
266
263
|
</script>
|
|
267
264
|
<style lang="scss" scoped>
|
|
@@ -438,7 +438,11 @@ export default {
|
|
|
438
438
|
},
|
|
439
439
|
selectedCard(card) {
|
|
440
440
|
// Some custom logic for gov caretaker logic
|
|
441
|
-
if (
|
|
441
|
+
if (
|
|
442
|
+
(this.$config
|
|
443
|
+
? this.$config.public.caretaker
|
|
444
|
+
: process.env.CARETAKER) === 'true'
|
|
445
|
+
) {
|
|
442
446
|
if (!isGovSite(card?.selectedCard?.link)) {
|
|
443
447
|
// this.$store.commit('page/SET_CARETAKER_REF', 'list-group')
|
|
444
448
|
// this.$root.$emit('caretaker-open', card?.selectedCard?.link)
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
v-if="loadSearchList && (searchResults || isLoading)"
|
|
34
34
|
:class="{
|
|
35
35
|
[`wcl-search__typeahead`]: isTypeahead,
|
|
36
|
-
[`wcl-search__modal`]: isTypeahead
|
|
36
|
+
[`wcl-search__modal`]: isTypeahead,
|
|
37
37
|
}"
|
|
38
38
|
:is-loading="isLoading"
|
|
39
39
|
:is-typeahead="isTypeahead"
|
|
@@ -63,28 +63,28 @@ export default {
|
|
|
63
63
|
props: {
|
|
64
64
|
pageLimit: {
|
|
65
65
|
type: Number,
|
|
66
|
-
required: true
|
|
66
|
+
required: true,
|
|
67
67
|
},
|
|
68
68
|
contentParser: {
|
|
69
69
|
type: Function,
|
|
70
|
-
required: true
|
|
70
|
+
required: true,
|
|
71
71
|
},
|
|
72
72
|
isTypeahead: {
|
|
73
73
|
type: Boolean,
|
|
74
|
-
required: true
|
|
74
|
+
required: true,
|
|
75
75
|
},
|
|
76
76
|
initialSearchQuery: {
|
|
77
77
|
type: String,
|
|
78
|
-
default: ''
|
|
78
|
+
default: '',
|
|
79
79
|
},
|
|
80
80
|
googleSearchFlag: {
|
|
81
81
|
type: String,
|
|
82
|
-
default: 'solar'
|
|
82
|
+
default: 'solar',
|
|
83
83
|
},
|
|
84
84
|
visibleSearchList: {
|
|
85
85
|
type: Boolean,
|
|
86
|
-
default: true
|
|
87
|
-
}
|
|
86
|
+
default: true,
|
|
87
|
+
},
|
|
88
88
|
},
|
|
89
89
|
data() {
|
|
90
90
|
return {
|
|
@@ -95,16 +95,16 @@ export default {
|
|
|
95
95
|
field_language: '8671',
|
|
96
96
|
searchType: this.googleSearchFlag,
|
|
97
97
|
googleSearchScript: false,
|
|
98
|
-
loadSearchList: this.visibleSearchList
|
|
98
|
+
loadSearchList: this.visibleSearchList,
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
computed: {
|
|
102
102
|
searchClass() {
|
|
103
103
|
return {
|
|
104
104
|
'wcl-search': true,
|
|
105
|
-
'wcl-search__google': this.searchType !== 'solar'
|
|
105
|
+
'wcl-search__google': this.searchType !== 'solar',
|
|
106
106
|
}
|
|
107
|
-
}
|
|
107
|
+
},
|
|
108
108
|
},
|
|
109
109
|
mounted() {
|
|
110
110
|
if (this.searchType === 'google') {
|
|
@@ -134,9 +134,9 @@ export default {
|
|
|
134
134
|
key: apiKey,
|
|
135
135
|
cx: searchEngineId,
|
|
136
136
|
q: query,
|
|
137
|
-
start: start
|
|
138
|
-
}
|
|
139
|
-
}
|
|
137
|
+
start: start,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
140
|
)
|
|
141
141
|
return response
|
|
142
142
|
} catch (error) {
|
|
@@ -156,7 +156,7 @@ export default {
|
|
|
156
156
|
apiKey,
|
|
157
157
|
searchEngineId,
|
|
158
158
|
searchQuery,
|
|
159
|
-
start
|
|
159
|
+
start,
|
|
160
160
|
)
|
|
161
161
|
let items = []
|
|
162
162
|
let suggest = response?.data?.spelling?.correctedQuery || ''
|
|
@@ -165,7 +165,7 @@ export default {
|
|
|
165
165
|
apiKey,
|
|
166
166
|
searchEngineId,
|
|
167
167
|
response?.data?.spelling?.correctedQuery,
|
|
168
|
-
start
|
|
168
|
+
start,
|
|
169
169
|
)
|
|
170
170
|
items = response?.data?.items
|
|
171
171
|
} else if (response?.data?.items) {
|
|
@@ -181,7 +181,7 @@ export default {
|
|
|
181
181
|
// Return the modified item with the updated title
|
|
182
182
|
return {
|
|
183
183
|
...item,
|
|
184
|
-
title: modifiedTitle
|
|
184
|
+
title: modifiedTitle,
|
|
185
185
|
}
|
|
186
186
|
})
|
|
187
187
|
|
|
@@ -190,7 +190,7 @@ export default {
|
|
|
190
190
|
numFound: Number(totalResults),
|
|
191
191
|
query: this.searchQuery,
|
|
192
192
|
results: modifiedResults,
|
|
193
|
-
suggestion: suggest
|
|
193
|
+
suggestion: suggest,
|
|
194
194
|
}
|
|
195
195
|
} else {
|
|
196
196
|
this.searchResults = {
|
|
@@ -198,7 +198,7 @@ export default {
|
|
|
198
198
|
numFound: 0,
|
|
199
199
|
query: this.searchQuery ?? '',
|
|
200
200
|
results: [],
|
|
201
|
-
suggestion: suggest
|
|
201
|
+
suggestion: suggest,
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
this.$emit('loading', false)
|
|
@@ -214,10 +214,10 @@ export default {
|
|
|
214
214
|
this.$route?.path === '/'
|
|
215
215
|
? 'Homepage'
|
|
216
216
|
: this.$route?.path === '/search'
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
? 'Search Page'
|
|
218
|
+
: this.$route?.path,
|
|
219
219
|
label: this.searchQuery,
|
|
220
|
-
results: this.searchResults.numFound
|
|
220
|
+
results: this.searchResults.numFound,
|
|
221
221
|
}
|
|
222
222
|
if (this.$gtm) {
|
|
223
223
|
this.$gtm.push({ event: 'custom.search.site.submit', ...attrs })
|
|
@@ -291,7 +291,7 @@ export default {
|
|
|
291
291
|
query: searchQuery,
|
|
292
292
|
start: pageNr > 1 ? (pageNr - 1) * pageLimit : 0,
|
|
293
293
|
rows: pageLimit,
|
|
294
|
-
field_language: this.field_language
|
|
294
|
+
field_language: this.field_language,
|
|
295
295
|
}).then((res) => {
|
|
296
296
|
if (res.numFound) {
|
|
297
297
|
this.searchResults = {
|
|
@@ -299,7 +299,7 @@ export default {
|
|
|
299
299
|
numFound: Number(res.numFound),
|
|
300
300
|
query: searchQuery,
|
|
301
301
|
results: res.results,
|
|
302
|
-
suggestion: null
|
|
302
|
+
suggestion: null,
|
|
303
303
|
}
|
|
304
304
|
} else {
|
|
305
305
|
this.searchResults = {
|
|
@@ -307,7 +307,7 @@ export default {
|
|
|
307
307
|
numFound: 0,
|
|
308
308
|
query: this.searchQuery ?? '',
|
|
309
309
|
results: [],
|
|
310
|
-
suggestion: null
|
|
310
|
+
suggestion: null,
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
this.$emit('loading', false)
|
|
@@ -322,10 +322,10 @@ export default {
|
|
|
322
322
|
this.$route?.path === '/'
|
|
323
323
|
? 'Homepage'
|
|
324
324
|
: this.$route?.path === '/search'
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
? 'Search Page'
|
|
326
|
+
: this.$route?.path,
|
|
327
327
|
label: this.searchQuery,
|
|
328
|
-
results: this.searchResults.numFound
|
|
328
|
+
results: this.searchResults.numFound,
|
|
329
329
|
}
|
|
330
330
|
if (this.$gtm) {
|
|
331
331
|
this.$gtm.push({ event: 'custom.search.site.submit', ...attrs })
|
|
@@ -340,7 +340,9 @@ export default {
|
|
|
340
340
|
if (this.googleSearchScript === false) {
|
|
341
341
|
const script = document.createElement('script')
|
|
342
342
|
script.async = true
|
|
343
|
-
script.src =
|
|
343
|
+
script.src = this.$config
|
|
344
|
+
? this.$config.public.googleSearch
|
|
345
|
+
: process.env.GOOGLE__URL
|
|
344
346
|
document.head.appendChild(script)
|
|
345
347
|
this.googleSearchScript = true
|
|
346
348
|
|
|
@@ -386,8 +388,8 @@ export default {
|
|
|
386
388
|
|
|
387
389
|
this.setupPaginationEvent()
|
|
388
390
|
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
+
},
|
|
392
|
+
},
|
|
391
393
|
}
|
|
392
394
|
</script>
|
|
393
395
|
<style lang="scss" scoped>
|
|
@@ -454,8 +456,8 @@ export default {
|
|
|
454
456
|
display: none;
|
|
455
457
|
}
|
|
456
458
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
+
// Google Search styling
|
|
460
|
+
&.wcl-search__google {
|
|
459
461
|
:deep(form.gsc-search-box) {
|
|
460
462
|
position: relative;
|
|
461
463
|
display: -ms-flexbox;
|