@asd20/ui-next 2.12.2 → 2.12.4

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.12.4](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.12.3...ui-next-v2.12.4) (2026-05-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fix page/file results missing from non-home pages ([fd1d79c](https://github.com/academydistrict20/asd20-ui-next/commit/fd1d79c8f46a7869f7e45417678439e10aaff1e3))
9
+
10
+ ## [2.12.3](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.12.2...ui-next-v2.12.3) (2026-05-27)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * fix background display when search flyout is opened ([4483b69](https://github.com/academydistrict20/asd20-ui-next/commit/4483b693a070d0d67c56b9caf1396eb174419777))
16
+
3
17
  ## [2.12.2](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.12.1...ui-next-v2.12.2) (2026-05-27)
4
18
 
5
19
  ## [2.12.1](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.12.0...ui-next-v2.12.1) (2026-05-26)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "2.12.2",
3
+ "version": "2.12.4",
4
4
  "private": false,
5
5
  "description": "ASD20 UI component library for Vue 3.",
6
6
  "license": "MIT",
@@ -557,8 +557,9 @@ import mapPeopleToListItems from '../../../helpers/mapPeopleToListItems'
557
557
  import logSearchAnalytics from '../../../helpers/logSearchAnalytics'
558
558
  import logSearchFeedback from '../../../helpers/logSearchFeedback'
559
559
  import queryAiSite from '../../../helpers/queryAiSite'
560
+ import queryFiles from '../../../helpers/queryFiles'
560
561
  import queryPeople from '../../../helpers/queryPeople'
561
- import { NO_PAGE_RESULTS_FALLBACKS } from '../../../helpers/queryPages'
562
+ import queryPages, { NO_PAGE_RESULTS_FALLBACKS } from '../../../helpers/queryPages'
562
563
 
563
564
  // Mixins
564
565
  import globalPropMixinFactory from '../../../mixins/globalPropMixinFactory.js'
@@ -745,8 +746,14 @@ export default {
745
746
  return Array.isArray(this.resolvedPeople) ? this.resolvedPeople : []
746
747
  },
747
748
 
749
+ contactGroups() {
750
+ return (this.currentGroups || []).filter(group =>
751
+ this.hasGroupContactDetails(group)
752
+ )
753
+ },
754
+
748
755
  contactResultCount() {
749
- return this.currentGroups.length + this.currentPeople.length
756
+ return this.contactGroups.length + this.currentPeople.length
750
757
  },
751
758
 
752
759
  shouldUsePageFallbacks() {
@@ -963,7 +970,7 @@ export default {
963
970
  })
964
971
  },
965
972
  groupListItems() {
966
- return (this.currentGroups || []).map(g => {
973
+ return this.contactGroups.map(g => {
967
974
  const org =
968
975
  (Array.isArray(this.organizationOptions) &&
969
976
  this.organizationOptions.find(
@@ -1333,9 +1340,49 @@ export default {
1333
1340
  return result
1334
1341
  }
1335
1342
 
1343
+ if (target === 'pages' || target === 'files') {
1344
+ try {
1345
+ const result = await this.querySearchHelperCollection(target, payload)
1346
+ if (!this.isCurrentSearchRun(runId)) {
1347
+ return this.readSearchResults(target)
1348
+ }
1349
+ this.setSearchResults({ [target]: result })
1350
+ return result
1351
+ } catch (error) {
1352
+ return this.readSearchResults(target)
1353
+ }
1354
+ }
1355
+
1336
1356
  return this.readSearchResults(target)
1337
1357
  },
1338
1358
 
1359
+ resolveSearchOrganizations() {
1360
+ const organizationId =
1361
+ this.organization && this.organization.id ? this.organization.id : ''
1362
+ if (!organizationId || this.resolvedIncludeDistrictResults) return []
1363
+ return [organizationId]
1364
+ },
1365
+
1366
+ async querySearchHelperCollection(target, payload = {}) {
1367
+ const queryPayload = {
1368
+ ...payload,
1369
+ runtimeConfig: this.resolveRuntimeConfig(),
1370
+ organizations: this.resolveSearchOrganizations(),
1371
+ }
1372
+
1373
+ if (target === 'pages') {
1374
+ const result = await queryPages(queryPayload)
1375
+ return result && Array.isArray(result.pages) ? result.pages : []
1376
+ }
1377
+
1378
+ if (target === 'files') {
1379
+ const result = await queryFiles(queryPayload)
1380
+ return result && Array.isArray(result.files) ? result.files : []
1381
+ }
1382
+
1383
+ return []
1384
+ },
1385
+
1339
1386
  async queryAiSiteWithFallback(payload) {
1340
1387
  if (typeof this.queryAiSiteHandler === 'function') {
1341
1388
  return this.queryAiSiteHandler(payload)
@@ -1394,6 +1441,29 @@ export default {
1394
1441
  return String(group.id || group.title || group.contactEmail || '').trim()
1395
1442
  },
1396
1443
 
1444
+ hasGroupContactDetails(group = {}) {
1445
+ if (!group || typeof group !== 'object') return false
1446
+ const detailFields = [
1447
+ 'description',
1448
+ 'contactName',
1449
+ 'contactPhone',
1450
+ 'contactFax',
1451
+ 'contactEmail',
1452
+ 'officeHours',
1453
+ 'buildingName',
1454
+ 'addressStreet',
1455
+ 'addressCity',
1456
+ 'addressState',
1457
+ 'addressZip',
1458
+ ]
1459
+
1460
+ return detailFields.some(field => {
1461
+ const value = group[field]
1462
+ if (typeof value === 'string') return !!value.trim()
1463
+ return value !== undefined && value !== null && value !== false
1464
+ })
1465
+ },
1466
+
1397
1467
  mergeContactGroups(primaryGroups = [], relatedGroups = []) {
1398
1468
  const merged = []
1399
1469
  const keyedIndexes = new Map()
@@ -2067,27 +2137,7 @@ export default {
2067
2137
  return
2068
2138
  }
2069
2139
  if (this.bodyScrollLock) return
2070
- const docEl = document.documentElement
2071
- const body = document.body
2072
- const scrollY =
2073
- window.pageYOffset || docEl.scrollTop || body.scrollTop || 0
2074
-
2075
- this.bodyScrollLock = {
2076
- scrollY,
2077
- bodyOverflow: body.style.overflow,
2078
- bodyPosition: body.style.position,
2079
- bodyTop: body.style.top,
2080
- bodyWidth: body.style.width,
2081
- docOverflow: docEl.style.overflow,
2082
- }
2083
-
2084
- body.classList.add('asd20-site-search--scroll-locked')
2085
- docEl.classList.add('asd20-site-search--scroll-locked')
2086
- body.style.position = 'fixed'
2087
- body.style.top = `-${scrollY}px`
2088
- body.style.width = '100%'
2089
- body.style.overflow = 'hidden'
2090
- docEl.style.overflow = 'hidden'
2140
+ this.bodyScrollLock = true
2091
2141
  },
2092
2142
 
2093
2143
  unlockBodyScroll() {
@@ -2095,20 +2145,7 @@ export default {
2095
2145
  return
2096
2146
  }
2097
2147
  if (!this.bodyScrollLock) return
2098
- const { scrollY } = this.bodyScrollLock
2099
- const docEl = document.documentElement
2100
- const body = document.body
2101
-
2102
- body.classList.remove('asd20-site-search--scroll-locked')
2103
- docEl.classList.remove('asd20-site-search--scroll-locked')
2104
- body.style.overflow = this.bodyScrollLock.bodyOverflow || ''
2105
- body.style.position = this.bodyScrollLock.bodyPosition || ''
2106
- body.style.top = this.bodyScrollLock.bodyTop || ''
2107
- body.style.width = this.bodyScrollLock.bodyWidth || ''
2108
- docEl.style.overflow = this.bodyScrollLock.docOverflow || ''
2109
2148
  this.bodyScrollLock = null
2110
-
2111
- window.scrollTo(0, scrollY || 0)
2112
2149
  },
2113
2150
 
2114
2151
  scrollResultsToTop() {