@asd20/ui-next 2.4.1 → 2.4.2
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.4.2](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.4.1...ui-next-v2.4.2) (2026-05-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* keep link urls provided by ai answers free of additional parameters ([dfdef5c](https://github.com/academydistrict20/asd20-ui-next/commit/dfdef5c872e67a99c3030e186a32e42eb3557411))
|
|
9
|
+
|
|
3
10
|
## [2.4.1](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.4.0...ui-next-v2.4.1) (2026-05-01)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -1857,34 +1857,7 @@ export default {
|
|
|
1857
1857
|
|
|
1858
1858
|
appendSearchContextToUrl(rawUrl) {
|
|
1859
1859
|
if (!rawUrl || typeof rawUrl !== 'string') return rawUrl
|
|
1860
|
-
|
|
1861
|
-
if (!state) return rawUrl
|
|
1862
|
-
if (typeof window === 'undefined' || typeof URL === 'undefined') {
|
|
1863
|
-
return rawUrl
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
const trimmedUrl = rawUrl.trim()
|
|
1867
|
-
if (!trimmedUrl) return rawUrl
|
|
1868
|
-
if (/^(#|mailto:|tel:|javascript:)/i.test(trimmedUrl)) return rawUrl
|
|
1869
|
-
|
|
1870
|
-
try {
|
|
1871
|
-
const resolvedUrl = new URL(trimmedUrl, window.location.href)
|
|
1872
|
-
if (resolvedUrl.origin !== window.location.origin) return rawUrl
|
|
1873
|
-
|
|
1874
|
-
const stateQueryValues = this.buildRouteSearchQueryValues(state)
|
|
1875
|
-
Object.entries(stateQueryValues).forEach(([key, value]) => {
|
|
1876
|
-
if (value === undefined || value === null || value === '') {
|
|
1877
|
-
resolvedUrl.searchParams.delete(key)
|
|
1878
|
-
return
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
resolvedUrl.searchParams.set(key, value)
|
|
1882
|
-
})
|
|
1883
|
-
|
|
1884
|
-
return `${resolvedUrl.pathname}${resolvedUrl.search}${resolvedUrl.hash}`
|
|
1885
|
-
} catch (error) {
|
|
1886
|
-
return rawUrl
|
|
1887
|
-
}
|
|
1860
|
+
return rawUrl
|
|
1888
1861
|
},
|
|
1889
1862
|
|
|
1890
1863
|
async restoreSearchStateFromRoute() {
|