@asd20/ui-next 2.12.3 → 2.12.5
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 +14 -0
- package/package.json +1 -1
- package/src/components/organisms/Asd20SiteSearch/index.vue +73 -3
- package/src/components/templates/Asd20404Template/index.vue +1 -0
- package/src/components/templates/Asd20ArticleDigestCompactTemplate/index.vue +1 -0
- package/src/components/templates/Asd20ArticleDigestTemplate/index.vue +1 -0
- package/src/components/templates/Asd20ArticleListTemplate/index.vue +1 -0
- package/src/components/templates/Asd20ArticleTemplate/index.vue +1 -0
- package/src/components/templates/Asd20BasePageTemplate/index.vue +1 -0
- package/src/components/templates/Asd20ClubsTemplate/index.vue +1 -0
- package/src/components/templates/Asd20DetailAlternateTemplate/index.vue +1 -0
- package/src/components/templates/Asd20DetailImageFullTemplate/index.vue +1 -0
- package/src/components/templates/Asd20DetailImageTemplate/index.vue +1 -0
- package/src/components/templates/Asd20DetailTemplate/index.vue +1 -0
- package/src/components/templates/Asd20DistrictHomeTemplate/index.vue +1 -0
- package/src/components/templates/Asd20DistrictVideoTemplate/index.vue +1 -0
- package/src/components/templates/Asd20FileListPageTemplate/index.vue +1 -0
- package/src/components/templates/Asd20GroupFeatureTemplate/index.vue +1 -0
- package/src/components/templates/Asd20LoginsTemplate/index.vue +1 -0
- package/src/components/templates/Asd20PeopleFeatureTemplate/index.vue +1 -0
- package/src/components/templates/Asd20ProfileTemplate/index.vue +1 -0
- package/src/components/templates/Asd20SalaryCalculatorTemplate/index.vue +1 -0
- package/src/components/templates/Asd20SchoolHomeTemplate/index.vue +1 -0
- package/src/components/templates/Asd20SchoolHomeVideoTemplate/index.vue +1 -0
- package/src/components/templates/Asd20WayfindingAccessibilityTemplate/index.vue +1 -0
- package/src/components/templates/Asd20WayfindingAlternateTemplate/index.vue +1 -0
- package/src/components/templates/Asd20WayfindingImageTemplate/index.vue +1 -0
- package/src/components/templates/Asd20WayfindingTemplate/index.vue +1 -0
- package/src/mixins/pageTemplateMixin.js +29 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.12.5](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.12.4...ui-next-v2.12.5) (2026-05-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add navigation search props to all non-home templates ([038885c](https://github.com/academydistrict20/asd20-ui-next/commit/038885c83f7d3cc416c52c0305be954f894b8ece))
|
|
9
|
+
|
|
10
|
+
## [2.12.4](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.12.3...ui-next-v2.12.4) (2026-05-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* fix page/file results missing from non-home pages ([fd1d79c](https://github.com/academydistrict20/asd20-ui-next/commit/fd1d79c8f46a7869f7e45417678439e10aaff1e3))
|
|
16
|
+
|
|
3
17
|
## [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
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -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.
|
|
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
|
|
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()
|
|
@@ -64,6 +64,18 @@ export default {
|
|
|
64
64
|
// Page state
|
|
65
65
|
menuOpen: { type: Boolean, default: false },
|
|
66
66
|
searchOpen: { type: Boolean, default: false },
|
|
67
|
+
searchPages: { type: Array, default: () => [] },
|
|
68
|
+
searchFiles: { type: Array, default: () => [] },
|
|
69
|
+
searchGroups: { type: Array, default: () => [] },
|
|
70
|
+
searchPeople: { type: Array, default: () => [] },
|
|
71
|
+
includeDistrictResults: { type: Boolean, default: true },
|
|
72
|
+
searchLanguageCode: { type: String, default: null },
|
|
73
|
+
queryPagesHandler: { type: Function, default: null },
|
|
74
|
+
queryFilesHandler: { type: Function, default: null },
|
|
75
|
+
queryGroupsHandler: { type: Function, default: null },
|
|
76
|
+
queryPeopleHandler: { type: Function, default: null },
|
|
77
|
+
queryAiSiteHandler: { type: Function, default: null },
|
|
78
|
+
aiSearchFeedbackFormUrl: { type: String, default: '' },
|
|
67
79
|
|
|
68
80
|
// Navigation
|
|
69
81
|
navigation: { type: Array, default: () => [] },
|
|
@@ -112,6 +124,23 @@ export default {
|
|
|
112
124
|
},
|
|
113
125
|
|
|
114
126
|
computed: {
|
|
127
|
+
siteNavigationSearchProps() {
|
|
128
|
+
return {
|
|
129
|
+
pages: this.searchPages,
|
|
130
|
+
files: this.searchFiles,
|
|
131
|
+
groups: this.searchGroups,
|
|
132
|
+
people: this.searchPeople,
|
|
133
|
+
includeDistrictResults: this.includeDistrictResults,
|
|
134
|
+
searchLanguageCode: this.searchLanguageCode,
|
|
135
|
+
queryPagesHandler: this.queryPagesHandler,
|
|
136
|
+
queryFilesHandler: this.queryFilesHandler,
|
|
137
|
+
queryGroupsHandler: this.queryGroupsHandler,
|
|
138
|
+
queryPeopleHandler: this.queryPeopleHandler,
|
|
139
|
+
queryAiSiteHandler: this.queryAiSiteHandler,
|
|
140
|
+
aiSearchFeedbackFormUrl: this.aiSearchFeedbackFormUrl,
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
|
|
115
144
|
firstMessage() {
|
|
116
145
|
return this.messages.length > 0 ? this.messages[0] : null
|
|
117
146
|
},
|