@asd20/ui-next 1.0.11 → 2.0.1
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/CHANGELOG.md +17 -0
- package/README.md +11 -15
- package/package.json +3 -3
- package/src/components/atoms/Asd20Checkbox/index.vue +2 -4
- package/src/components/atoms/Asd20CountUp/index.vue +2 -3
- package/src/components/atoms/Asd20Icon/index.vue +6 -62
- package/src/components/atoms/Asd20MultiselectInput/index.vue +6 -1
- package/src/components/atoms/Asd20SelectInput/index.vue +3 -1
- package/src/components/atoms/Asd20WidgetViewport/index.vue +2 -3
- package/src/components/molecules/Asd20Accordion/index.vue +2 -3
- package/src/components/molecules/Asd20Card/index.vue +10 -5
- package/src/components/molecules/Asd20CheckboxList/index.vue +4 -13
- package/src/components/molecules/Asd20FileInput/index.vue +3 -2
- package/src/components/molecules/Asd20Modal/index.vue +8 -3
- package/src/components/molecules/Asd20SearchField/index.vue +3 -5
- package/src/components/molecules/Asd20Share/index.vue +2 -3
- package/src/components/molecules/Asd20SliderInput/index.vue +3 -5
- package/src/components/molecules/Asd20Swipe/index.vue +2 -3
- package/src/components/molecules/Asd20Swiper/index.vue +2 -3
- package/src/components/molecules/Asd20TextAreaInput/index.vue +1 -3
- package/src/components/molecules/Asd20TextInput/index.vue +3 -1
- package/src/components/organisms/Asd20AiSearch/index.vue +2 -3
- package/src/components/organisms/Asd20Navbar/index.vue +9 -2
- package/src/components/organisms/Asd20SchoolHomepageVideoHeader/index.vue +2 -3
- package/src/components/organisms/Asd20SecondaryHeader/index.vue +2 -3
- package/src/components/organisms/Asd20SiteNavigation/index.vue +13 -4
- package/src/components/organisms/Asd20SiteSearch/index.vue +12 -11
- package/src/components/organisms/Asd20SwiperFeed/index.vue +1 -1
- package/src/components/organisms/Asd20TabBar/index.vue +2 -3
- package/src/components/organisms/Asd20VideoHeader/index.vue +2 -3
- package/src/components/templates/Asd20AppTemplate/index.vue +17 -10
- package/src/components/templates/Asd20ArticleDigestCompactTemplate/index.vue +4 -4
- package/src/components/templates/Asd20ArticleDigestTemplate/index.vue +5 -5
- package/src/components/templates/Asd20ArticleListTemplate/index.vue +4 -4
- package/src/components/templates/Asd20ClubsTemplate/index.vue +4 -4
- package/src/components/templates/Asd20SalaryCalculatorTemplate/index.vue +0 -2
- package/src/components/templates/Asd20SearchAppTemplate/index.vue +17 -10
- package/src/components/utils/FocusTrap.vue +2 -3
- package/src/components/utils/Intersect.vue +2 -3
- package/src/components/utils/MqLayout.vue +2 -3
- package/src/components/utils/Multiselect.vue +2 -3
- package/src/components/utils/Recaptcha.vue +2 -3
- package/src/directives/lazy-image.js +4 -2
- package/src/helpers/mapPageQueryResultToPageTemplateProps.js +2 -2
- package/src/mixins/inputComponentMixin.js +2 -7
- package/src/mixins/responsiveBreakpointMixin.js +2 -3
- package/src/utils/createLegacyDestroyHooks.js +0 -10
|
@@ -67,19 +67,26 @@ export default {
|
|
|
67
67
|
menuActive: function(val) {
|
|
68
68
|
if (!val) {
|
|
69
69
|
this.$nextTick(() => {
|
|
70
|
-
this
|
|
70
|
+
this.focusRef('menuButton')
|
|
71
71
|
})
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
searchActive: function(val) {
|
|
75
75
|
if (!val) {
|
|
76
76
|
this.$nextTick(() => {
|
|
77
|
-
this
|
|
77
|
+
this.focusRef('searchButton')
|
|
78
78
|
})
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
},
|
|
82
82
|
methods: {
|
|
83
|
+
focusRef(refName) {
|
|
84
|
+
const ref = this.$refs[refName]
|
|
85
|
+
const focusTarget = ref?.$el || ref
|
|
86
|
+
if (typeof focusTarget?.focus === 'function') {
|
|
87
|
+
focusTarget.focus()
|
|
88
|
+
}
|
|
89
|
+
},
|
|
83
90
|
toggleMenu(event) {
|
|
84
91
|
this.$emit('update:menuActive', !this.menuActive)
|
|
85
92
|
this.$emit('keyboardTriggeredLastAction', event.type === 'keyup')
|
|
@@ -105,7 +105,6 @@
|
|
|
105
105
|
import scrollTrack from '../../../directives/scroll-track'
|
|
106
106
|
import responsiveBreakpointMixin from '../../../mixins/responsiveBreakpointMixin'
|
|
107
107
|
import Asd20Button from '../../atoms/Asd20Button'
|
|
108
|
-
import createLegacyDestroyHooks from '../../../utils/createLegacyDestroyHooks'
|
|
109
108
|
|
|
110
109
|
export default {
|
|
111
110
|
name: 'Asd20SchoolHomepageVideoHeader',
|
|
@@ -160,9 +159,9 @@ export default {
|
|
|
160
159
|
this.checkIsMobile()
|
|
161
160
|
window.addEventListener('resize', this.checkIsMobile)
|
|
162
161
|
},
|
|
163
|
-
|
|
162
|
+
beforeUnmount() {
|
|
164
163
|
this.teardownResizeListener()
|
|
165
|
-
}
|
|
164
|
+
},
|
|
166
165
|
methods: {
|
|
167
166
|
teardownResizeListener() {
|
|
168
167
|
window.removeEventListener('resize', this.checkIsMobile)
|
|
@@ -126,7 +126,6 @@
|
|
|
126
126
|
|
|
127
127
|
<script>
|
|
128
128
|
import Asd20Messaging from '../../atoms/Asd20Messaging'
|
|
129
|
-
import createLegacyDestroyHooks from '../../../utils/createLegacyDestroyHooks'
|
|
130
129
|
|
|
131
130
|
export default {
|
|
132
131
|
name: 'Asd20SecondaryHeader',
|
|
@@ -220,9 +219,9 @@ export default {
|
|
|
220
219
|
// Initial set
|
|
221
220
|
this.scheduleParallaxUpdate()
|
|
222
221
|
},
|
|
223
|
-
|
|
222
|
+
beforeUnmount() {
|
|
224
223
|
this.teardownParallax()
|
|
225
|
-
}
|
|
224
|
+
},
|
|
226
225
|
methods: {
|
|
227
226
|
teardownParallax() {
|
|
228
227
|
this.disableParallax()
|
|
@@ -86,7 +86,6 @@ import Asd20Navbar from '../../../components/organisms/Asd20Navbar'
|
|
|
86
86
|
import responsiveBreakpointMixin from '../../../mixins/responsiveBreakpointMixin'
|
|
87
87
|
// import Asd20DistrictLogo from '../../../components/atoms/Asd20DistrictLogo'
|
|
88
88
|
import Asd20OrganizationPicker from '../../../components/organisms/Asd20OrganizationPicker'
|
|
89
|
-
import createLegacyDestroyHooks from '../../../utils/createLegacyDestroyHooks'
|
|
90
89
|
|
|
91
90
|
export default {
|
|
92
91
|
name: 'Asd20SiteNavigation',
|
|
@@ -124,7 +123,7 @@ export default {
|
|
|
124
123
|
menuOpen: function (val) {
|
|
125
124
|
this.$nextTick(() => {
|
|
126
125
|
if (val) {
|
|
127
|
-
this
|
|
126
|
+
this.focusSiteMenu()
|
|
128
127
|
}
|
|
129
128
|
})
|
|
130
129
|
},
|
|
@@ -136,10 +135,20 @@ export default {
|
|
|
136
135
|
this.isLoaded = true
|
|
137
136
|
window.addEventListener('resize', this.handleResize)
|
|
138
137
|
},
|
|
139
|
-
|
|
138
|
+
beforeUnmount() {
|
|
140
139
|
window.removeEventListener('resize', this.handleResize)
|
|
141
|
-
}
|
|
140
|
+
},
|
|
142
141
|
methods: {
|
|
142
|
+
focusSiteMenu() {
|
|
143
|
+
const focusTarget =
|
|
144
|
+
this.$refs.siteMenu?.$refs?.menuContainer ||
|
|
145
|
+
this.$refs.siteMenu?.$el ||
|
|
146
|
+
this.$refs.siteMenu
|
|
147
|
+
|
|
148
|
+
if (typeof focusTarget?.focus === 'function') {
|
|
149
|
+
focusTarget.focus()
|
|
150
|
+
}
|
|
151
|
+
},
|
|
143
152
|
onKeyboardToggleEvent(event) {
|
|
144
153
|
this.keyboardToggleEvent = event
|
|
145
154
|
},
|
|
@@ -558,7 +558,6 @@ import queryAiSite from '../../../helpers/queryAiSite'
|
|
|
558
558
|
|
|
559
559
|
// Mixins
|
|
560
560
|
import globalPropMixinFactory from '../../../mixins/globalPropMixinFactory.js'
|
|
561
|
-
import createLegacyDestroyHooks from '../../../utils/createLegacyDestroyHooks'
|
|
562
561
|
|
|
563
562
|
const DISTRICT_ORG_ID = '26eaf390-d8ab-11e9-a3a8-5de5bba4f125'
|
|
564
563
|
const SEARCH_ROUTE_QUERY_KEYS = {
|
|
@@ -1193,9 +1192,9 @@ export default {
|
|
|
1193
1192
|
}
|
|
1194
1193
|
},
|
|
1195
1194
|
|
|
1196
|
-
|
|
1195
|
+
beforeUnmount() {
|
|
1197
1196
|
this.teardownSearchLifecycle()
|
|
1198
|
-
}
|
|
1197
|
+
},
|
|
1199
1198
|
|
|
1200
1199
|
methods: {
|
|
1201
1200
|
teardownSearchLifecycle() {
|
|
@@ -1963,17 +1962,19 @@ export default {
|
|
|
1963
1962
|
},
|
|
1964
1963
|
|
|
1965
1964
|
focusQuery() {
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
if (input) input.focus()
|
|
1969
|
-
}
|
|
1965
|
+
const input = this.getQueryInput()
|
|
1966
|
+
if (input) input.focus()
|
|
1970
1967
|
},
|
|
1971
1968
|
|
|
1972
1969
|
blurQuery() {
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1970
|
+
const input = this.getQueryInput()
|
|
1971
|
+
if (input) input.blur()
|
|
1972
|
+
},
|
|
1973
|
+
|
|
1974
|
+
getQueryInput() {
|
|
1975
|
+
const queryRef = this.$refs.query?.$el || this.$refs.query
|
|
1976
|
+
if (typeof queryRef?.querySelector !== 'function') return null
|
|
1977
|
+
return queryRef.querySelector('input')
|
|
1977
1978
|
},
|
|
1978
1979
|
|
|
1979
1980
|
getResultsViewportRef(tabLabel = this.currentTab) {
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
|
|
34
34
|
<script>
|
|
35
35
|
import Asd20Tab from '../../../components/molecules/Asd20Tab'
|
|
36
|
-
import createLegacyDestroyHooks from '../../../utils/createLegacyDestroyHooks'
|
|
37
36
|
export default {
|
|
38
37
|
name: 'Asd20TabBar',
|
|
39
38
|
|
|
@@ -69,11 +68,11 @@ export default {
|
|
|
69
68
|
window.addEventListener('resize', this.onResize, { passive: true })
|
|
70
69
|
}
|
|
71
70
|
},
|
|
72
|
-
|
|
71
|
+
beforeUnmount() {
|
|
73
72
|
if (typeof window !== 'undefined') {
|
|
74
73
|
window.removeEventListener('resize', this.onResize)
|
|
75
74
|
}
|
|
76
|
-
}
|
|
75
|
+
},
|
|
77
76
|
|
|
78
77
|
methods: {
|
|
79
78
|
onScroll() {
|
|
@@ -151,7 +151,6 @@
|
|
|
151
151
|
|
|
152
152
|
<script>
|
|
153
153
|
import scrollTrack from '../../../directives/scroll-track'
|
|
154
|
-
import createLegacyDestroyHooks from '../../../utils/createLegacyDestroyHooks'
|
|
155
154
|
// import Asd20Button from '../../atoms/Asd20Button'
|
|
156
155
|
|
|
157
156
|
export default {
|
|
@@ -202,9 +201,9 @@ export default {
|
|
|
202
201
|
this.checkIsMobile()
|
|
203
202
|
window.addEventListener('resize', this.checkIsMobile)
|
|
204
203
|
},
|
|
205
|
-
|
|
204
|
+
beforeUnmount() {
|
|
206
205
|
this.teardownResizeListener()
|
|
207
|
-
}
|
|
206
|
+
},
|
|
208
207
|
methods: {
|
|
209
208
|
teardownResizeListener() {
|
|
210
209
|
window.removeEventListener('resize', this.checkIsMobile)
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
<slot name="toolbar-start"></slot>
|
|
49
49
|
<asd20-search-field
|
|
50
50
|
v-if="searchable"
|
|
51
|
-
:value="keywords"
|
|
51
|
+
:model-value="keywords"
|
|
52
52
|
:placeholder="searchPlaceholder"
|
|
53
|
-
@
|
|
53
|
+
@update:modelValue="$emit('update:keywords', $event)"
|
|
54
54
|
/>
|
|
55
55
|
<asd20-button
|
|
56
56
|
v-if="
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
<slot name="tabs" />
|
|
81
81
|
</asd20-tab-bar>
|
|
82
82
|
|
|
83
|
-
<
|
|
83
|
+
<div
|
|
84
|
+
v-if="isDesktopMq"
|
|
84
85
|
class="asd20-app-template__desktop-layout"
|
|
85
|
-
mq="lg+"
|
|
86
86
|
>
|
|
87
87
|
<div
|
|
88
88
|
v-if="$slots.sidebar"
|
|
@@ -117,10 +117,10 @@
|
|
|
117
117
|
</client-only>
|
|
118
118
|
<slot />
|
|
119
119
|
</div>
|
|
120
|
-
</
|
|
120
|
+
</div>
|
|
121
121
|
|
|
122
|
-
<
|
|
123
|
-
|
|
122
|
+
<div
|
|
123
|
+
v-if="isMobileMq"
|
|
124
124
|
class="asd20-app-template__mobile-layout"
|
|
125
125
|
>
|
|
126
126
|
<asd20-modal
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class="asd20-app-template__main">
|
|
147
147
|
<slot />
|
|
148
148
|
</div>
|
|
149
|
-
</
|
|
149
|
+
</div>
|
|
150
150
|
<client-only>
|
|
151
151
|
<asd20-notification-group
|
|
152
152
|
:notifications="activeNotificationsByType.floating"
|
|
@@ -160,6 +160,7 @@
|
|
|
160
160
|
|
|
161
161
|
<script>
|
|
162
162
|
import responsiveBreakpointMixin from '../../../mixins/responsiveBreakpointMixin'
|
|
163
|
+
import { matchesMqQuery } from '../../../utils/responsive-mq'
|
|
163
164
|
import Asd20AppHeader from '../../organisms/Asd20AppHeader'
|
|
164
165
|
import Asd20Button from '../../atoms/Asd20Button'
|
|
165
166
|
import Asd20Icon from '../../atoms/Asd20Icon'
|
|
@@ -168,7 +169,6 @@ import Asd20SearchField from '../../molecules/Asd20SearchField'
|
|
|
168
169
|
import Asd20TabBar from '../../organisms/Asd20TabBar'
|
|
169
170
|
import Asd20Badge from '../../atoms/Asd20Badge'
|
|
170
171
|
import Asd20NotificationGroup from '../../organisms/Asd20NotificationGroup'
|
|
171
|
-
import MqLayout from '../../utils/MqLayout'
|
|
172
172
|
|
|
173
173
|
export default {
|
|
174
174
|
name: 'Asd20AppTemplate',
|
|
@@ -181,7 +181,6 @@ export default {
|
|
|
181
181
|
Asd20TabBar,
|
|
182
182
|
Asd20Badge,
|
|
183
183
|
Asd20NotificationGroup,
|
|
184
|
-
MqLayout,
|
|
185
184
|
},
|
|
186
185
|
mixins: [responsiveBreakpointMixin],
|
|
187
186
|
|
|
@@ -212,6 +211,14 @@ export default {
|
|
|
212
211
|
sidebarOpen: false,
|
|
213
212
|
zoomed: false,
|
|
214
213
|
}),
|
|
214
|
+
computed: {
|
|
215
|
+
isDesktopMq() {
|
|
216
|
+
return matchesMqQuery(this.mq, 'lg+')
|
|
217
|
+
},
|
|
218
|
+
isMobileMq() {
|
|
219
|
+
return matchesMqQuery(this.mq, ['sm', 'md'])
|
|
220
|
+
},
|
|
221
|
+
},
|
|
215
222
|
mounted() {
|
|
216
223
|
this.zoomed = window.innerHeight <= 500
|
|
217
224
|
window.addEventListener('resize', this.handleResize)
|
|
@@ -85,16 +85,16 @@
|
|
|
85
85
|
</h2>
|
|
86
86
|
<!-- <div class="search-header">
|
|
87
87
|
<asd20-search-field
|
|
88
|
-
:value="keywords"
|
|
89
|
-
@
|
|
88
|
+
:model-value="keywords"
|
|
89
|
+
@update:modelValue="$emit('update:keywords', $event)"
|
|
90
90
|
medium
|
|
91
91
|
/>
|
|
92
92
|
<asd20-multiselect-input
|
|
93
93
|
label="Categories"
|
|
94
94
|
:taggable="false"
|
|
95
|
-
:value="selectedCategories"
|
|
95
|
+
:model-value="selectedCategories"
|
|
96
96
|
:items="categoryOptions"
|
|
97
|
-
@
|
|
97
|
+
@update:modelValue="$emit('update:selected-categories', $event)"
|
|
98
98
|
:hideLabel="true"
|
|
99
99
|
placeholder="Filter by Category"
|
|
100
100
|
/>
|
|
@@ -85,18 +85,18 @@
|
|
|
85
85
|
</h2>
|
|
86
86
|
<div class="search-header">
|
|
87
87
|
<asd20-search-field
|
|
88
|
-
:value="keywords"
|
|
88
|
+
:model-value="keywords"
|
|
89
89
|
medium
|
|
90
|
-
@
|
|
90
|
+
@update:modelValue="$emit('update:keywords', $event)"
|
|
91
91
|
/>
|
|
92
92
|
<asd20-multiselect-input
|
|
93
93
|
label="Categories"
|
|
94
94
|
:taggable="false"
|
|
95
|
-
:value="selectedCategories"
|
|
95
|
+
:model-value="selectedCategories"
|
|
96
96
|
:items="categoryOptions"
|
|
97
97
|
:hide-label="true"
|
|
98
98
|
placeholder="Filter by Category"
|
|
99
|
-
@
|
|
99
|
+
@update:modelValue="$emit('update:selected-categories', $event)"
|
|
100
100
|
/>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
:key="index"
|
|
160
160
|
v-bind="card"
|
|
161
161
|
zoom
|
|
162
|
-
|
|
162
|
+
separate-image
|
|
163
163
|
></asd20-card>
|
|
164
164
|
</div>
|
|
165
165
|
<div
|
|
@@ -96,19 +96,19 @@
|
|
|
96
96
|
</h2>
|
|
97
97
|
<div class="search-header">
|
|
98
98
|
<asd20-search-field
|
|
99
|
-
:value="keywords"
|
|
99
|
+
:model-value="keywords"
|
|
100
100
|
medium
|
|
101
|
-
@
|
|
101
|
+
@update:modelValue="$emit('update:keywords', $event)"
|
|
102
102
|
/>
|
|
103
103
|
<asd20-multiselect-input
|
|
104
104
|
label="Categories"
|
|
105
105
|
:taggable="false"
|
|
106
|
-
:value="selectedCategories"
|
|
106
|
+
:model-value="selectedCategories"
|
|
107
107
|
:items="categoryOptions"
|
|
108
108
|
:hide-label="true"
|
|
109
109
|
placeholder="Filter by Category"
|
|
110
110
|
autocomplete="off"
|
|
111
|
-
@
|
|
111
|
+
@update:modelValue="onCategorySelect"
|
|
112
112
|
/>
|
|
113
113
|
</div>
|
|
114
114
|
<div v-if="cards.length < 1">
|
|
@@ -103,16 +103,16 @@
|
|
|
103
103
|
</div>
|
|
104
104
|
<div class="search-header">
|
|
105
105
|
<asd20-search-field
|
|
106
|
-
:value="keywords"
|
|
106
|
+
:model-value="keywords"
|
|
107
107
|
medium
|
|
108
|
-
@
|
|
108
|
+
@update:modelValue="$emit('update:keywords', $event)"
|
|
109
109
|
/>
|
|
110
110
|
<!-- <asd20-multiselect-input
|
|
111
111
|
label="Categories"
|
|
112
112
|
:taggable="false"
|
|
113
|
-
:value="selectedCategories"
|
|
113
|
+
:model-value="selectedCategories"
|
|
114
114
|
:items="categoryOptions"
|
|
115
|
-
@
|
|
115
|
+
@update:modelValue="$emit('update:selected-categories', $event)"
|
|
116
116
|
/> -->
|
|
117
117
|
</div>
|
|
118
118
|
|
|
@@ -95,7 +95,6 @@
|
|
|
95
95
|
class="years-selector"
|
|
96
96
|
label="Years of Experience"
|
|
97
97
|
icon="calendar"
|
|
98
|
-
:value="years"
|
|
99
98
|
:items="yearsOfExperience"
|
|
100
99
|
/>
|
|
101
100
|
<p class="selectionHeading">
|
|
@@ -106,7 +105,6 @@
|
|
|
106
105
|
class="education-selector"
|
|
107
106
|
label="Education Level"
|
|
108
107
|
icon="school"
|
|
109
|
-
:value="educationLevel"
|
|
110
108
|
:items="educationLevelOptions"
|
|
111
109
|
/>
|
|
112
110
|
<asd20-button
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<slot name="toolbar-start"></slot>
|
|
5
5
|
<asd20-search-field
|
|
6
6
|
v-if="searchable"
|
|
7
|
-
:value="keywords"
|
|
8
|
-
@
|
|
7
|
+
:model-value="keywords"
|
|
8
|
+
@update:modelValue="$emit('update:keywords', $event)"
|
|
9
9
|
/>
|
|
10
10
|
<asd20-button
|
|
11
11
|
v-if="$slots.filters && (mq === 'sm' || mq === 'md')"
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
<slot name="toolbar-end"></slot>
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
|
-
<
|
|
27
|
+
<div
|
|
28
|
+
v-if="isDesktopMq"
|
|
28
29
|
class="asd20-search-app-template__desktop-layout"
|
|
29
|
-
mq="lg+"
|
|
30
30
|
>
|
|
31
31
|
<aside v-if="$slots.filters || $slots.aside">
|
|
32
32
|
<h2 v-if="$slots.filters">
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
<main v-if="$slots.results">
|
|
60
60
|
<slot name="results" />
|
|
61
61
|
</main>
|
|
62
|
-
</
|
|
62
|
+
</div>
|
|
63
63
|
|
|
64
|
-
<
|
|
65
|
-
|
|
64
|
+
<div
|
|
65
|
+
v-if="isMobileMq"
|
|
66
66
|
class="asd20-search-app-template__mobile-layout"
|
|
67
67
|
>
|
|
68
68
|
<asd20-modal
|
|
@@ -96,19 +96,19 @@
|
|
|
96
96
|
</asd20-modal>
|
|
97
97
|
|
|
98
98
|
<slot name="results" />
|
|
99
|
-
</
|
|
99
|
+
</div>
|
|
100
100
|
</div>
|
|
101
101
|
</template>
|
|
102
102
|
|
|
103
103
|
<script>
|
|
104
104
|
import responsiveBreakpointMixin from '../../../mixins/responsiveBreakpointMixin'
|
|
105
|
+
import { matchesMqQuery } from '../../../utils/responsive-mq'
|
|
105
106
|
import Asd20Viewport from '../../atoms/Asd20Viewport'
|
|
106
107
|
import Asd20Modal from '../../molecules/Asd20Modal'
|
|
107
108
|
import Asd20SearchField from '../../molecules/Asd20SearchField'
|
|
108
109
|
import Asd20Badge from '../../atoms/Asd20Badge'
|
|
109
110
|
import Asd20Icon from '../../atoms/Asd20Icon'
|
|
110
111
|
import Asd20Button from '../../atoms/Asd20Button'
|
|
111
|
-
import MqLayout from '../../utils/MqLayout'
|
|
112
112
|
|
|
113
113
|
export default {
|
|
114
114
|
name: 'Asd20SearchAppTemplate',
|
|
@@ -119,7 +119,6 @@ export default {
|
|
|
119
119
|
Asd20Badge,
|
|
120
120
|
Asd20Icon,
|
|
121
121
|
Asd20Button,
|
|
122
|
-
MqLayout,
|
|
123
122
|
},
|
|
124
123
|
mixins: [responsiveBreakpointMixin],
|
|
125
124
|
|
|
@@ -135,6 +134,14 @@ export default {
|
|
|
135
134
|
data: () => ({
|
|
136
135
|
filtersOpen: false,
|
|
137
136
|
}),
|
|
137
|
+
computed: {
|
|
138
|
+
isDesktopMq() {
|
|
139
|
+
return matchesMqQuery(this.mq, 'lg+')
|
|
140
|
+
},
|
|
141
|
+
isMobileMq() {
|
|
142
|
+
return matchesMqQuery(this.mq, ['sm', 'md'])
|
|
143
|
+
},
|
|
144
|
+
},
|
|
138
145
|
|
|
139
146
|
methods: {
|
|
140
147
|
clearFilters() {
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
12
|
import { createFocusTrap } from 'focus-trap'
|
|
13
|
-
import createLegacyDestroyHooks from '../../utils/createLegacyDestroyHooks'
|
|
14
13
|
|
|
15
14
|
export default {
|
|
16
15
|
name: 'FocusTrap',
|
|
@@ -53,9 +52,9 @@ export default {
|
|
|
53
52
|
this.syncTrapState()
|
|
54
53
|
})
|
|
55
54
|
},
|
|
56
|
-
|
|
55
|
+
beforeUnmount() {
|
|
57
56
|
this.disposeTrap()
|
|
58
|
-
}
|
|
57
|
+
},
|
|
59
58
|
methods: {
|
|
60
59
|
syncTrapState() {
|
|
61
60
|
if (!this.trap) return
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
|
-
import createLegacyDestroyHooks from '../../utils/createLegacyDestroyHooks'
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
13
|
name: 'Intersect',
|
|
@@ -29,9 +28,9 @@ export default {
|
|
|
29
28
|
updated() {
|
|
30
29
|
this.refreshObserver()
|
|
31
30
|
},
|
|
32
|
-
|
|
31
|
+
beforeUnmount() {
|
|
33
32
|
this.resetObserver()
|
|
34
|
-
}
|
|
33
|
+
},
|
|
35
34
|
methods: {
|
|
36
35
|
getTarget() {
|
|
37
36
|
const root = this.$refs.root
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
import { DEFAULT_MQ, getResponsiveMq, matchesMqQuery } from '../../utils/responsive-mq'
|
|
12
|
-
import createLegacyDestroyHooks from '../../utils/createLegacyDestroyHooks'
|
|
13
12
|
|
|
14
13
|
export default {
|
|
15
14
|
name: 'MqLayout',
|
|
@@ -43,10 +42,10 @@ export default {
|
|
|
43
42
|
if (typeof window === 'undefined') return
|
|
44
43
|
window.addEventListener('resize', this.updateMq)
|
|
45
44
|
},
|
|
46
|
-
|
|
45
|
+
beforeUnmount() {
|
|
47
46
|
if (typeof window === 'undefined') return
|
|
48
47
|
window.removeEventListener('resize', this.updateMq)
|
|
49
|
-
}
|
|
48
|
+
},
|
|
50
49
|
|
|
51
50
|
methods: {
|
|
52
51
|
updateMq() {
|
|
@@ -128,7 +128,6 @@
|
|
|
128
128
|
</template>
|
|
129
129
|
|
|
130
130
|
<script>
|
|
131
|
-
import createLegacyDestroyHooks from '../../utils/createLegacyDestroyHooks'
|
|
132
131
|
|
|
133
132
|
function normalizeOption(option, optionLabel, trackBy) {
|
|
134
133
|
if (option && typeof option === 'object') return option
|
|
@@ -263,9 +262,9 @@ export default {
|
|
|
263
262
|
document.addEventListener('mousedown', this.handleDocumentMouseDown)
|
|
264
263
|
}
|
|
265
264
|
},
|
|
266
|
-
|
|
265
|
+
beforeUnmount() {
|
|
267
266
|
this.removeDocumentListener()
|
|
268
|
-
}
|
|
267
|
+
},
|
|
269
268
|
methods: {
|
|
270
269
|
getOptionKey(option) {
|
|
271
270
|
const normalized = normalizeOption(option, this.label, this.trackBy)
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
|
-
import createLegacyDestroyHooks from '../../utils/createLegacyDestroyHooks'
|
|
16
15
|
|
|
17
16
|
const RECAPTCHA_SCRIPT_ID = 'asd20-recaptcha-script'
|
|
18
17
|
const RECAPTCHA_SCRIPT_SRC =
|
|
@@ -92,9 +91,9 @@ export default {
|
|
|
92
91
|
mounted() {
|
|
93
92
|
if (this.loadRecaptchaScript) this.ensureWidget()
|
|
94
93
|
},
|
|
95
|
-
|
|
94
|
+
beforeUnmount() {
|
|
96
95
|
this.reset()
|
|
97
|
-
}
|
|
96
|
+
},
|
|
98
97
|
methods: {
|
|
99
98
|
async getRecaptcha() {
|
|
100
99
|
if (!isBrowser()) return null
|
|
@@ -48,14 +48,16 @@ function mountLazyImage(el, binding = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
el.setAttribute('src', TRANSPARENT_PIXEL)
|
|
51
|
-
|
|
51
|
+
const observer = new window.IntersectionObserver(
|
|
52
52
|
entries => {
|
|
53
|
+
if (el.__lazyImageObserver !== observer) return
|
|
53
54
|
if (!entries.some(entry => entry.isIntersecting)) return
|
|
54
55
|
loadLazyImage(el)
|
|
55
56
|
},
|
|
56
57
|
{ rootMargin: '200px 0px' }
|
|
57
58
|
)
|
|
58
|
-
el.__lazyImageObserver
|
|
59
|
+
el.__lazyImageObserver = observer
|
|
60
|
+
observer.observe(el)
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
export default {
|
|
@@ -331,7 +331,7 @@ export default function mapPageQueryResultToPageTemplateProps(queryResult) {
|
|
|
331
331
|
// In the comm-center project look at
|
|
332
332
|
// /packages/configurations/helpers/*
|
|
333
333
|
|
|
334
|
-
// TODO: Eventually move this function into a
|
|
334
|
+
// TODO: Eventually move this function into a separate package
|
|
335
335
|
// Make this package a part of the comm-center project or ui project
|
|
336
336
|
// e.g. /packages/template-utilities
|
|
337
|
-
// Possible you could combine the configurations packages, or create a
|
|
337
|
+
// Possible you could combine the configurations packages, or create a separate package
|
|
@@ -15,8 +15,7 @@ function omitKeys(source, keys) {
|
|
|
15
15
|
export default {
|
|
16
16
|
inheritAttrs: false,
|
|
17
17
|
props: {
|
|
18
|
-
|
|
19
|
-
modelValue: { default: undefined },
|
|
18
|
+
modelValue: { default: '' },
|
|
20
19
|
label: { type: String, default: '' },
|
|
21
20
|
hideLabel: { type: Boolean, default: false },
|
|
22
21
|
helpText: { type: String, default: '' },
|
|
@@ -89,7 +88,7 @@ export default {
|
|
|
89
88
|
return this.validationErrors.length === 0
|
|
90
89
|
},
|
|
91
90
|
resolvedValue() {
|
|
92
|
-
return this.modelValue
|
|
91
|
+
return this.modelValue
|
|
93
92
|
},
|
|
94
93
|
|
|
95
94
|
computedId() {
|
|
@@ -133,9 +132,6 @@ export default {
|
|
|
133
132
|
inputAttrs() {
|
|
134
133
|
return omitKeys(this.$attrs, INPUT_MODEL_LISTENER_KEYS)
|
|
135
134
|
},
|
|
136
|
-
legacyListeners() {
|
|
137
|
-
return omitKeys(this.$options._parentListeners || {}, ['input'])
|
|
138
|
-
},
|
|
139
135
|
},
|
|
140
136
|
watch: {
|
|
141
137
|
resolvedValue(value) {
|
|
@@ -192,7 +188,6 @@ export default {
|
|
|
192
188
|
input(event) {
|
|
193
189
|
this.isDirty = true
|
|
194
190
|
this.validate(event.target.value)
|
|
195
|
-
this.$emit('input', event.target.value)
|
|
196
191
|
this.$emit('update:modelValue', event.target.value)
|
|
197
192
|
},
|
|
198
193
|
},
|