@asd20/ui-next 1.0.10 → 2.0.0
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 +12 -0
- 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/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/Asd20ActionMenu/index.vue +0 -12
- package/src/components/organisms/Asd20AiSearch/index.vue +20 -3
- package/src/components/organisms/Asd20PageFooter/index.vue +0 -22
- 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 +2 -3
- package/src/components/organisms/Asd20SiteSearch/index.vue +124 -80
- 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/Asd20DistrictVideoTemplate/index.vue +20 -0
- package/src/components/templates/Asd20SalaryCalculatorTemplate/index.vue +0 -2
- package/src/components/templates/Asd20SchoolHomeTemplate/index.vue +20 -0
- package/src/components/templates/Asd20SchoolHomeVideoTemplate/index.vue +20 -0
- 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/globalPropMixinFactory.js +46 -3
- package/src/mixins/hasLoaderMixin.js +14 -0
- package/src/mixins/inputComponentMixin.js +2 -7
- package/src/mixins/responsiveBreakpointMixin.js +2 -3
- package/src/utils/createLegacyDestroyHooks.js +0 -10
|
@@ -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',
|
|
@@ -136,9 +135,9 @@ 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: {
|
|
143
142
|
onKeyboardToggleEvent(event) {
|
|
144
143
|
this.keyboardToggleEvent = event
|
|
@@ -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 = {
|
|
@@ -677,6 +676,11 @@ export default {
|
|
|
677
676
|
inline: { type: Boolean, default: false },
|
|
678
677
|
showTabBar: { type: Boolean, default: true },
|
|
679
678
|
showContacts: { type: Boolean, default: true },
|
|
679
|
+
searchLanguageCode: { type: String, default: null },
|
|
680
|
+
queryPagesHandler: { type: Function, default: null },
|
|
681
|
+
queryFilesHandler: { type: Function, default: null },
|
|
682
|
+
queryGroupsHandler: { type: Function, default: null },
|
|
683
|
+
queryAiSiteHandler: { type: Function, default: null },
|
|
680
684
|
organization: {
|
|
681
685
|
type: Object,
|
|
682
686
|
default: () => ({ title: 'Academy District 20' }),
|
|
@@ -1188,9 +1192,9 @@ export default {
|
|
|
1188
1192
|
}
|
|
1189
1193
|
},
|
|
1190
1194
|
|
|
1191
|
-
|
|
1195
|
+
beforeUnmount() {
|
|
1192
1196
|
this.teardownSearchLifecycle()
|
|
1193
|
-
}
|
|
1197
|
+
},
|
|
1194
1198
|
|
|
1195
1199
|
methods: {
|
|
1196
1200
|
teardownSearchLifecycle() {
|
|
@@ -1218,7 +1222,61 @@ export default {
|
|
|
1218
1222
|
: null
|
|
1219
1223
|
},
|
|
1220
1224
|
|
|
1225
|
+
getSearchLanguageCode() {
|
|
1226
|
+
if (
|
|
1227
|
+
typeof this.searchLanguageCode === 'string' &&
|
|
1228
|
+
this.searchLanguageCode.trim()
|
|
1229
|
+
) {
|
|
1230
|
+
return this.searchLanguageCode.trim()
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
const searchStore = this.getSearchStore()
|
|
1234
|
+
const storeLanguageCode =
|
|
1235
|
+
searchStore &&
|
|
1236
|
+
searchStore.state &&
|
|
1237
|
+
searchStore.state.search &&
|
|
1238
|
+
searchStore.state.search.languageCode
|
|
1239
|
+
|
|
1240
|
+
return typeof storeLanguageCode === 'string' && storeLanguageCode.trim()
|
|
1241
|
+
? storeLanguageCode.trim()
|
|
1242
|
+
: 'en'
|
|
1243
|
+
},
|
|
1244
|
+
|
|
1245
|
+
setSearchResults({ pages, files, groups } = {}) {
|
|
1246
|
+
if (pages !== undefined) this.resolvedPages = pages
|
|
1247
|
+
if (files !== undefined) this.resolvedFiles = files
|
|
1248
|
+
if (groups !== undefined) this.resolvedGroups = groups
|
|
1249
|
+
},
|
|
1250
|
+
|
|
1251
|
+
async querySearchCollectionWithFallback({
|
|
1252
|
+
handler,
|
|
1253
|
+
storeAction,
|
|
1254
|
+
payload,
|
|
1255
|
+
target,
|
|
1256
|
+
}) {
|
|
1257
|
+
if (typeof handler === 'function') {
|
|
1258
|
+
const result = await handler(payload)
|
|
1259
|
+
if (Array.isArray(result)) {
|
|
1260
|
+
this[target] = result
|
|
1261
|
+
return result
|
|
1262
|
+
}
|
|
1263
|
+
return Array.isArray(this[target]) ? this[target] : []
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
const searchStore = this.getSearchStore()
|
|
1267
|
+
if (searchStore) {
|
|
1268
|
+
await searchStore.dispatch(storeAction, payload)
|
|
1269
|
+
return Array.isArray(this[target]) ? this[target] : []
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
return Array.isArray(this[target]) ? this[target] : []
|
|
1273
|
+
},
|
|
1274
|
+
|
|
1221
1275
|
async queryAiSiteWithFallback(payload) {
|
|
1276
|
+
if (typeof this.queryAiSiteHandler === 'function') {
|
|
1277
|
+
return this.queryAiSiteHandler(payload)
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1222
1280
|
const searchStore = this.getSearchStore()
|
|
1223
1281
|
if (searchStore) {
|
|
1224
1282
|
return searchStore.dispatch('search/queryAiSite', payload)
|
|
@@ -1565,15 +1623,7 @@ export default {
|
|
|
1565
1623
|
const pages = Array.isArray(snapshot.pages) ? snapshot.pages : []
|
|
1566
1624
|
const files = Array.isArray(snapshot.files) ? snapshot.files : []
|
|
1567
1625
|
const groups = Array.isArray(snapshot.groups) ? snapshot.groups : []
|
|
1568
|
-
|
|
1569
|
-
const searchStore = this.getSearchStore()
|
|
1570
|
-
if (searchStore) {
|
|
1571
|
-
await Promise.all([
|
|
1572
|
-
searchStore.dispatch('search/setPages', pages),
|
|
1573
|
-
searchStore.dispatch('search/setFiles', files),
|
|
1574
|
-
searchStore.dispatch('search/setGroups', groups),
|
|
1575
|
-
])
|
|
1576
|
-
}
|
|
1626
|
+
this.setSearchResults({ pages, files, groups })
|
|
1577
1627
|
|
|
1578
1628
|
if (!skipTabUpdate) {
|
|
1579
1629
|
const preferredTab = SEARCH_ROUTE_TABS.has(targetState.tab)
|
|
@@ -2362,15 +2412,7 @@ export default {
|
|
|
2362
2412
|
this.aiTranscript = []
|
|
2363
2413
|
this.anchoredUserTurnId = null
|
|
2364
2414
|
}
|
|
2365
|
-
|
|
2366
|
-
const searchStore = this.getSearchStore()
|
|
2367
|
-
if (searchStore) {
|
|
2368
|
-
await Promise.all([
|
|
2369
|
-
searchStore.dispatch('search/setPages', []),
|
|
2370
|
-
searchStore.dispatch('search/setFiles', []),
|
|
2371
|
-
searchStore.dispatch('search/setGroups', []),
|
|
2372
|
-
])
|
|
2373
|
-
}
|
|
2415
|
+
this.setSearchResults({ pages: [], files: [], groups: [] })
|
|
2374
2416
|
},
|
|
2375
2417
|
|
|
2376
2418
|
async clearInput() {
|
|
@@ -2399,55 +2441,58 @@ export default {
|
|
|
2399
2441
|
},
|
|
2400
2442
|
|
|
2401
2443
|
async searchPages(options = {}) {
|
|
2402
|
-
const
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
this.
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
this.scrollResultsToTop()
|
|
2417
|
-
}
|
|
2444
|
+
const keepAnswersTab = options.keepAnswersTab || this.keywordsFromAi
|
|
2445
|
+
const searchInput = {
|
|
2446
|
+
keywords: this.keywords,
|
|
2447
|
+
question: this.searchQuestion || this.inputText,
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
this.searchingPages = true
|
|
2451
|
+
await this.querySearchCollectionWithFallback({
|
|
2452
|
+
handler: this.queryPagesHandler,
|
|
2453
|
+
storeAction: 'search/queryPages',
|
|
2454
|
+
payload: searchInput,
|
|
2455
|
+
target: 'resolvedPages',
|
|
2456
|
+
})
|
|
2457
|
+
this.searchingPages = false
|
|
2418
2458
|
|
|
2419
|
-
|
|
2459
|
+
if (this.keywords && this.keywords.trim() && !keepAnswersTab) {
|
|
2460
|
+
this.currentTab = 'Pages'
|
|
2461
|
+
this.scrollResultsToTop()
|
|
2462
|
+
}
|
|
2420
2463
|
|
|
2421
|
-
|
|
2422
|
-
this.aiAnswer = null
|
|
2423
|
-
this.aiSources = []
|
|
2424
|
-
this.aiKeywordsDisplayAnswer = ''
|
|
2425
|
-
this.aiKeywordsDisplayPages = ''
|
|
2426
|
-
}
|
|
2464
|
+
this.keywordsFromAi = false
|
|
2427
2465
|
|
|
2428
|
-
|
|
2466
|
+
if (!keepAnswersTab) {
|
|
2467
|
+
this.aiAnswer = null
|
|
2468
|
+
this.aiSources = []
|
|
2469
|
+
this.aiKeywordsDisplayAnswer = ''
|
|
2470
|
+
this.aiKeywordsDisplayPages = ''
|
|
2429
2471
|
}
|
|
2472
|
+
|
|
2473
|
+
this.persistSearchCacheSnapshot()
|
|
2430
2474
|
},
|
|
2431
2475
|
|
|
2432
2476
|
async searchFiles(options = {}) {
|
|
2433
|
-
const
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
this.
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
}
|
|
2477
|
+
const searchInput = {
|
|
2478
|
+
keywords: this.keywords,
|
|
2479
|
+
question: this.searchQuestion || this.inputText,
|
|
2480
|
+
}
|
|
2481
|
+
const owners = Array.isArray(options.owners) ? options.owners : []
|
|
2482
|
+
if (owners.length > 0) searchInput.owners = owners
|
|
2483
|
+
|
|
2484
|
+
this.searchingFiles = true
|
|
2485
|
+
await this.querySearchCollectionWithFallback({
|
|
2486
|
+
handler: this.queryFilesHandler,
|
|
2487
|
+
storeAction: 'search/queryFiles',
|
|
2488
|
+
payload: searchInput,
|
|
2489
|
+
target: 'resolvedFiles',
|
|
2490
|
+
})
|
|
2491
|
+
this.searchingFiles = false
|
|
2492
|
+
this.persistSearchCacheSnapshot()
|
|
2447
2493
|
},
|
|
2448
2494
|
|
|
2449
2495
|
async searchFilesWithGroupOwners() {
|
|
2450
|
-
if (!this.getSearchStore()) return
|
|
2451
2496
|
const groupsPromise = this.searchGroups()
|
|
2452
2497
|
await this.searchFiles()
|
|
2453
2498
|
const ownerFilters = await groupsPromise
|
|
@@ -2457,28 +2502,28 @@ export default {
|
|
|
2457
2502
|
},
|
|
2458
2503
|
|
|
2459
2504
|
async searchGroups() {
|
|
2460
|
-
const
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
)
|
|
2505
|
+
const searchInput = {
|
|
2506
|
+
keywords: this.keywords,
|
|
2507
|
+
question: this.searchQuestion || this.inputText,
|
|
2508
|
+
}
|
|
2509
|
+
await this.querySearchCollectionWithFallback({
|
|
2510
|
+
handler: this.queryGroupsHandler,
|
|
2511
|
+
storeAction: 'search/queryGroups',
|
|
2512
|
+
payload: searchInput,
|
|
2513
|
+
target: 'resolvedGroups',
|
|
2514
|
+
})
|
|
2515
|
+
this.persistSearchCacheSnapshot()
|
|
2516
|
+
return Array.from(
|
|
2517
|
+
new Set(
|
|
2518
|
+
(this.resolvedGroups || [])
|
|
2519
|
+
.map(group => (group && group.title ? group.title.trim() : ''))
|
|
2520
|
+
.filter(Boolean)
|
|
2474
2521
|
)
|
|
2475
|
-
|
|
2476
|
-
return []
|
|
2522
|
+
)
|
|
2477
2523
|
},
|
|
2478
2524
|
|
|
2479
2525
|
async onSubmitInput() {
|
|
2480
2526
|
if (this.searchingAi) return
|
|
2481
|
-
const searchStore = this.getSearchStore()
|
|
2482
2527
|
const text = (this.inputText || '').trim()
|
|
2483
2528
|
if (!text) {
|
|
2484
2529
|
this.suppressAutoRestore = true
|
|
@@ -2533,7 +2578,7 @@ export default {
|
|
|
2533
2578
|
this.organization && this.organization.title
|
|
2534
2579
|
? this.organization.title
|
|
2535
2580
|
: null,
|
|
2536
|
-
languageCode:
|
|
2581
|
+
languageCode: this.getSearchLanguageCode(),
|
|
2537
2582
|
isFollowup: false,
|
|
2538
2583
|
functionsEndpoint:
|
|
2539
2584
|
this.$config && this.$config.functionsEndpoint
|
|
@@ -2590,7 +2635,6 @@ export default {
|
|
|
2590
2635
|
typeof question === 'string' ? question.trim() : ''
|
|
2591
2636
|
if (!normalizedQuestion) return
|
|
2592
2637
|
if (this.searchingAi) return
|
|
2593
|
-
const searchStore = this.getSearchStore()
|
|
2594
2638
|
if (
|
|
2595
2639
|
this.activeAiQuestionKey &&
|
|
2596
2640
|
this.activeAiQuestionKey === normalizedQuestion
|
|
@@ -2788,7 +2832,7 @@ export default {
|
|
|
2788
2832
|
this.organization && this.organization.title
|
|
2789
2833
|
? this.organization.title
|
|
2790
2834
|
: null,
|
|
2791
|
-
languageCode:
|
|
2835
|
+
languageCode: this.getSearchLanguageCode(),
|
|
2792
2836
|
isFollowup: isFollowUpQuestion,
|
|
2793
2837
|
functionsEndpoint:
|
|
2794
2838
|
this.$config && this.$config.functionsEndpoint
|
|
@@ -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
|
|
|
@@ -55,8 +55,18 @@
|
|
|
55
55
|
<client-only>
|
|
56
56
|
<Asd20AiSearch
|
|
57
57
|
class="ai-search"
|
|
58
|
+
:pages="searchPages"
|
|
59
|
+
:files="searchFiles"
|
|
60
|
+
:groups="searchGroups"
|
|
61
|
+
:include-district-results="includeDistrictResults"
|
|
62
|
+
:search-language-code="searchLanguageCode"
|
|
63
|
+
:query-pages-handler="queryPagesHandler"
|
|
64
|
+
:query-files-handler="queryFilesHandler"
|
|
65
|
+
:query-groups-handler="queryGroupsHandler"
|
|
66
|
+
:query-ai-site-handler="queryAiSiteHandler"
|
|
58
67
|
:organization="organization"
|
|
59
68
|
:organization-options="organizationOptions"
|
|
69
|
+
:ai-search-feedback-form-url="aiSearchFeedbackFormUrl"
|
|
60
70
|
/>
|
|
61
71
|
</client-only>
|
|
62
72
|
|
|
@@ -206,6 +216,16 @@ export default {
|
|
|
206
216
|
mixins: [pageTemplateMixin],
|
|
207
217
|
props: {
|
|
208
218
|
languageCode: { type: String, default: 'en' },
|
|
219
|
+
searchPages: { type: Array, default: () => [] },
|
|
220
|
+
searchFiles: { type: Array, default: () => [] },
|
|
221
|
+
searchGroups: { type: Array, default: () => [] },
|
|
222
|
+
includeDistrictResults: { type: Boolean, default: true },
|
|
223
|
+
searchLanguageCode: { type: String, default: null },
|
|
224
|
+
queryPagesHandler: { type: Function, default: null },
|
|
225
|
+
queryFilesHandler: { type: Function, default: null },
|
|
226
|
+
queryGroupsHandler: { type: Function, default: null },
|
|
227
|
+
queryAiSiteHandler: { type: Function, default: null },
|
|
228
|
+
aiSearchFeedbackFormUrl: { type: String, default: '' },
|
|
209
229
|
},
|
|
210
230
|
data: () => ({
|
|
211
231
|
factoids: [
|
|
@@ -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
|
|
@@ -97,8 +97,18 @@
|
|
|
97
97
|
<client-only>
|
|
98
98
|
<Asd20AiSearch
|
|
99
99
|
class="ai-search"
|
|
100
|
+
:pages="searchPages"
|
|
101
|
+
:files="searchFiles"
|
|
102
|
+
:groups="searchGroups"
|
|
103
|
+
:include-district-results="includeDistrictResults"
|
|
104
|
+
:search-language-code="searchLanguageCode"
|
|
105
|
+
:query-pages-handler="queryPagesHandler"
|
|
106
|
+
:query-files-handler="queryFilesHandler"
|
|
107
|
+
:query-groups-handler="queryGroupsHandler"
|
|
108
|
+
:query-ai-site-handler="queryAiSiteHandler"
|
|
100
109
|
:organization="organization"
|
|
101
110
|
:organization-options="organizationOptions"
|
|
111
|
+
:ai-search-feedback-form-url="aiSearchFeedbackFormUrl"
|
|
102
112
|
/>
|
|
103
113
|
</client-only>
|
|
104
114
|
<client-only>
|
|
@@ -218,6 +228,16 @@ export default {
|
|
|
218
228
|
mixins: [pageTemplateMixin],
|
|
219
229
|
props: {
|
|
220
230
|
languageCode: { type: String, default: 'en' },
|
|
231
|
+
searchPages: { type: Array, default: () => [] },
|
|
232
|
+
searchFiles: { type: Array, default: () => [] },
|
|
233
|
+
searchGroups: { type: Array, default: () => [] },
|
|
234
|
+
includeDistrictResults: { type: Boolean, default: true },
|
|
235
|
+
searchLanguageCode: { type: String, default: null },
|
|
236
|
+
queryPagesHandler: { type: Function, default: null },
|
|
237
|
+
queryFilesHandler: { type: Function, default: null },
|
|
238
|
+
queryGroupsHandler: { type: Function, default: null },
|
|
239
|
+
queryAiSiteHandler: { type: Function, default: null },
|
|
240
|
+
aiSearchFeedbackFormUrl: { type: String, default: '' },
|
|
221
241
|
},
|
|
222
242
|
|
|
223
243
|
data: () => ({
|