@asd20/ui-next 2.12.3 → 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,12 @@
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
+
3
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)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "2.12.3",
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()