@asd20/ui-next 2.0.22 → 2.0.23
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.0.23](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.22...ui-next-v2.0.23) (2026-04-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* ensure search result urls are accurate ([0684303](https://github.com/academydistrict20/asd20-ui-next/commit/06843037c47bdb7b7ee4adee215c118695a1e2dc))
|
|
9
|
+
|
|
3
10
|
## [2.0.22](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.21...ui-next-v2.0.22) (2026-04-02)
|
|
4
11
|
|
|
5
12
|
## [2.0.21](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.0.20...ui-next-v2.0.21) (2026-04-02)
|
package/package.json
CHANGED
|
@@ -1790,46 +1790,7 @@ export default {
|
|
|
1790
1790
|
|
|
1791
1791
|
appendSearchContextToUrl(rawUrl) {
|
|
1792
1792
|
if (!rawUrl || typeof rawUrl !== 'string') return rawUrl
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
const searchState = this.getCurrentSearchStateForRoute()
|
|
1796
|
-
if (!searchState) return rawUrl
|
|
1797
|
-
if (/^(mailto:|tel:|javascript:|#)/i.test(rawUrl)) return rawUrl
|
|
1798
|
-
|
|
1799
|
-
try {
|
|
1800
|
-
const parsed = new URL(rawUrl, window.location.origin)
|
|
1801
|
-
const currentHost = window.location.hostname || ''
|
|
1802
|
-
const targetHost = parsed.hostname || ''
|
|
1803
|
-
const sameOrigin = parsed.origin === window.location.origin
|
|
1804
|
-
const currentIsLocal = this.isLocalDevelopmentHost(currentHost)
|
|
1805
|
-
const currentIsAsd20 =
|
|
1806
|
-
currentHost === 'asd20.org' || currentHost.endsWith('.asd20.org')
|
|
1807
|
-
const targetIsAsd20 =
|
|
1808
|
-
targetHost === 'asd20.org' || targetHost.endsWith('.asd20.org')
|
|
1809
|
-
const sameAsd20Domain = currentIsAsd20 && targetIsAsd20
|
|
1810
|
-
const mapAsd20ToLocal = currentIsLocal && targetIsAsd20
|
|
1811
|
-
if (!sameOrigin && !sameAsd20Domain && !mapAsd20ToLocal) return rawUrl
|
|
1812
|
-
|
|
1813
|
-
const resolved = mapAsd20ToLocal
|
|
1814
|
-
? new URL(
|
|
1815
|
-
`${parsed.pathname}${parsed.search}${parsed.hash}`,
|
|
1816
|
-
window.location.origin
|
|
1817
|
-
)
|
|
1818
|
-
: parsed
|
|
1819
|
-
|
|
1820
|
-
const queryValues = this.buildRouteSearchQueryValues(searchState)
|
|
1821
|
-
Object.keys(queryValues).forEach(key => {
|
|
1822
|
-
resolved.searchParams.set(key, queryValues[key])
|
|
1823
|
-
})
|
|
1824
|
-
|
|
1825
|
-
if (mapAsd20ToLocal) {
|
|
1826
|
-
return `${resolved.pathname}${resolved.search}${resolved.hash}`
|
|
1827
|
-
}
|
|
1828
|
-
if (/^https?:\/\//i.test(rawUrl)) return resolved.toString()
|
|
1829
|
-
return `${resolved.pathname}${resolved.search}${resolved.hash}`
|
|
1830
|
-
} catch (error) {
|
|
1831
|
-
return rawUrl
|
|
1832
|
-
}
|
|
1793
|
+
return rawUrl
|
|
1833
1794
|
},
|
|
1834
1795
|
|
|
1835
1796
|
async restoreSearchStateFromRoute() {
|