@worksafevictoria/wcl7.5 1.2.0 → 1.2.2
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/.env +1 -3
- package/package.json +2 -2
- package/src/components/Containers/HomepageHeader/index.vue +25 -11
- package/src/components/Containers/Subheader/index.vue +17 -17
- package/src/components/Global/AppHeader/index.vue +52 -54
- package/src/components/Global/Cookies/index.vue +134 -141
- package/src/components/Global/GlobalNotice/index.vue +23 -2
- package/src/components/Global/HeroHeader/index.vue +33 -31
- package/src/components/Paragraphs/BrowseContent/index.vue +45 -31
- package/src/components/Paragraphs/Directory/index.vue +38 -27
- package/src/components/Paragraphs/TabulatedData/index.stories.js +5 -5
- package/src/components/Paragraphs/TabulatedData/index.vue +57 -34
- package/src/components/SubComponents/FormInstance/models/overrides/address.js +21 -12
- package/src/components/SubComponents/FormInstance/tests/address.test.js +48 -48
- package/src/components/SubComponents/ResourceGroup/index.vue +194 -170
- package/vite.config.js +28 -16
|
@@ -18,7 +18,7 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
18
18
|
key: 'address',
|
|
19
19
|
label: 'Address',
|
|
20
20
|
tableView: false,
|
|
21
|
-
type: 'textfield'
|
|
21
|
+
type: 'textfield',
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
customConditional:
|
|
@@ -27,7 +27,7 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
27
27
|
key: 'address_2',
|
|
28
28
|
label: 'Address 2',
|
|
29
29
|
tableView: false,
|
|
30
|
-
type: 'textfield'
|
|
30
|
+
type: 'textfield',
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
customConditional:
|
|
@@ -36,7 +36,7 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
36
36
|
key: 'city',
|
|
37
37
|
label: 'Suburb',
|
|
38
38
|
tableView: false,
|
|
39
|
-
type: 'textfield'
|
|
39
|
+
type: 'textfield',
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
customConditional:
|
|
@@ -45,7 +45,7 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
45
45
|
key: 'state_province',
|
|
46
46
|
label: 'State',
|
|
47
47
|
tableView: false,
|
|
48
|
-
type: 'textfield'
|
|
48
|
+
type: 'textfield',
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
customConditional:
|
|
@@ -54,7 +54,7 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
54
54
|
key: 'postal_code',
|
|
55
55
|
label: 'Postcode',
|
|
56
56
|
tableView: false,
|
|
57
|
-
type: 'textfield'
|
|
57
|
+
type: 'textfield',
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
customConditional:
|
|
@@ -63,8 +63,8 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
63
63
|
key: 'country',
|
|
64
64
|
label: 'Country',
|
|
65
65
|
tableView: false,
|
|
66
|
-
type: 'textfield'
|
|
67
|
-
}
|
|
66
|
+
type: 'textfield',
|
|
67
|
+
},
|
|
68
68
|
],
|
|
69
69
|
customClass: 'custom-formio-1',
|
|
70
70
|
defaultValue: {
|
|
@@ -73,7 +73,7 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
73
73
|
city: '',
|
|
74
74
|
country: '',
|
|
75
75
|
postal_code: '',
|
|
76
|
-
state_province: ''
|
|
76
|
+
state_province: '',
|
|
77
77
|
},
|
|
78
78
|
disabled: false,
|
|
79
79
|
enableManualMode: true,
|
|
@@ -89,13 +89,13 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
89
89
|
params: { components: 'country:au', types: 'address' },
|
|
90
90
|
queryProperty: 'input',
|
|
91
91
|
responseProperty: 'predictions',
|
|
92
|
-
url: '
|
|
92
|
+
url: 'https://www.worksafe.vic.gov.au/places/api/v1/place/autocomplete/json',
|
|
93
93
|
},
|
|
94
94
|
switchToManualModeLabel: "Can't find address? Switch to manual mode.",
|
|
95
95
|
type: 'address',
|
|
96
|
-
validate: { required: false }
|
|
97
|
-
}
|
|
98
|
-
])
|
|
96
|
+
validate: { required: false },
|
|
97
|
+
},
|
|
98
|
+
]),
|
|
99
99
|
)
|
|
100
100
|
})
|
|
101
101
|
|
|
@@ -108,8 +108,8 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
108
108
|
city: 'sd',
|
|
109
109
|
state_province: 'sd',
|
|
110
110
|
postal_code: 'sd',
|
|
111
|
-
country: 'sds'
|
|
112
|
-
}
|
|
111
|
+
country: 'sds',
|
|
112
|
+
},
|
|
113
113
|
})
|
|
114
114
|
expect(submission).toEqual({
|
|
115
115
|
address1: {
|
|
@@ -118,8 +118,8 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
118
118
|
city: 'sd',
|
|
119
119
|
country: 'sds',
|
|
120
120
|
postal_code: 'sd',
|
|
121
|
-
state_province: 'sd'
|
|
122
|
-
}
|
|
121
|
+
state_province: 'sd',
|
|
122
|
+
},
|
|
123
123
|
})
|
|
124
124
|
})
|
|
125
125
|
|
|
@@ -131,12 +131,12 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
131
131
|
matched_substrings: [
|
|
132
132
|
{
|
|
133
133
|
length: 3,
|
|
134
|
-
offset: 0
|
|
134
|
+
offset: 0,
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
length: 3,
|
|
138
|
-
offset: 4
|
|
139
|
-
}
|
|
138
|
+
offset: 4,
|
|
139
|
+
},
|
|
140
140
|
],
|
|
141
141
|
place_id: 'ChIJe_yY7VRD1moR4FaCIXpujzc',
|
|
142
142
|
reference: 'ChIJe_yY7VRD1moR4FaCIXpujzc',
|
|
@@ -145,102 +145,102 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
145
145
|
main_text_matched_substrings: [
|
|
146
146
|
{
|
|
147
147
|
length: 3,
|
|
148
|
-
offset: 0
|
|
148
|
+
offset: 0,
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
length: 3,
|
|
152
|
-
offset: 4
|
|
153
|
-
}
|
|
152
|
+
offset: 4,
|
|
153
|
+
},
|
|
154
154
|
],
|
|
155
|
-
secondary_text: 'Brunswick VIC, Australia'
|
|
155
|
+
secondary_text: 'Brunswick VIC, Australia',
|
|
156
156
|
},
|
|
157
157
|
terms: [
|
|
158
158
|
{
|
|
159
159
|
offset: 0,
|
|
160
|
-
value: '715'
|
|
160
|
+
value: '715',
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
offset: 4,
|
|
164
|
-
value: 'Sydney Road'
|
|
164
|
+
value: 'Sydney Road',
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
offset: 17,
|
|
168
|
-
value: 'Brunswick'
|
|
168
|
+
value: 'Brunswick',
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
offset: 27,
|
|
172
|
-
value: 'VIC'
|
|
172
|
+
value: 'VIC',
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
175
|
offset: 32,
|
|
176
|
-
value: 'Australia'
|
|
177
|
-
}
|
|
176
|
+
value: 'Australia',
|
|
177
|
+
},
|
|
178
178
|
],
|
|
179
|
-
types: ['street_address', 'geocode']
|
|
179
|
+
types: ['street_address', 'geocode'],
|
|
180
180
|
},
|
|
181
181
|
geocode: {
|
|
182
182
|
address_components: [
|
|
183
183
|
{
|
|
184
184
|
long_name: '715',
|
|
185
185
|
short_name: '715',
|
|
186
|
-
types: ['street_number']
|
|
186
|
+
types: ['street_number'],
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
long_name: 'Sydney Road',
|
|
190
190
|
short_name: 'Sydney Rd',
|
|
191
|
-
types: ['route']
|
|
191
|
+
types: ['route'],
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
long_name: 'Brunswick',
|
|
195
195
|
short_name: 'Brunswick',
|
|
196
|
-
types: ['locality', 'political']
|
|
196
|
+
types: ['locality', 'political'],
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
long_name: 'Moreland City',
|
|
200
200
|
short_name: 'Moreland',
|
|
201
|
-
types: ['administrative_area_level_2', 'political']
|
|
201
|
+
types: ['administrative_area_level_2', 'political'],
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
long_name: 'Victoria',
|
|
205
205
|
short_name: 'VIC',
|
|
206
|
-
types: ['administrative_area_level_1', 'political']
|
|
206
|
+
types: ['administrative_area_level_1', 'political'],
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
long_name: 'Australia',
|
|
210
210
|
short_name: 'AU',
|
|
211
|
-
types: ['country', 'political']
|
|
211
|
+
types: ['country', 'political'],
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
long_name: '3056',
|
|
215
215
|
short_name: '3056',
|
|
216
|
-
types: ['postal_code']
|
|
217
|
-
}
|
|
216
|
+
types: ['postal_code'],
|
|
217
|
+
},
|
|
218
218
|
],
|
|
219
219
|
formatted_address: '715 Sydney Rd, Brunswick VIC 3056, Australia',
|
|
220
220
|
geometry: {
|
|
221
221
|
location: {
|
|
222
222
|
lat: -37.7598676,
|
|
223
|
-
lng: 144.9631721
|
|
223
|
+
lng: 144.9631721,
|
|
224
224
|
},
|
|
225
225
|
location_type: 'ROOFTOP',
|
|
226
226
|
viewport: {
|
|
227
227
|
northeast: {
|
|
228
228
|
lat: -37.75852881970849,
|
|
229
|
-
lng: 144.9646129302915
|
|
229
|
+
lng: 144.9646129302915,
|
|
230
230
|
},
|
|
231
231
|
southwest: {
|
|
232
232
|
lat: -37.76122678029149,
|
|
233
|
-
lng: 144.9619149697085
|
|
234
|
-
}
|
|
235
|
-
}
|
|
233
|
+
lng: 144.9619149697085,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
236
|
},
|
|
237
237
|
place_id: 'ChIJe_yY7VRD1moR4FaCIXpujzc',
|
|
238
238
|
plus_code: {
|
|
239
239
|
compound_code: '6XR7+37 Brunswick VIC, Australia',
|
|
240
|
-
global_code: '4RJ66XR7+37'
|
|
240
|
+
global_code: '4RJ66XR7+37',
|
|
241
241
|
},
|
|
242
|
-
types: ['street_address']
|
|
243
|
-
}
|
|
242
|
+
types: ['street_address'],
|
|
243
|
+
},
|
|
244
244
|
})
|
|
245
245
|
expect(submission).toEqual({
|
|
246
246
|
address1: {
|
|
@@ -248,8 +248,8 @@ describe(`Form ${testComponent} parser`, () => {
|
|
|
248
248
|
city: 'Brunswick',
|
|
249
249
|
country: 'Australia',
|
|
250
250
|
postal_code: '3056',
|
|
251
|
-
state_province: 'Victoria'
|
|
252
|
-
}
|
|
251
|
+
state_province: 'Victoria',
|
|
252
|
+
},
|
|
253
253
|
})
|
|
254
254
|
})
|
|
255
255
|
})
|