@appbaseio/autocomplete-suggestions-plugin
Advanced tools
Comparing version 1.0.16-alpha to 1.0.17-alpha
@@ -0,1 +1,5 @@ | ||
## [1.0.17-alpha] - 226-10-2021. | ||
- url field support | ||
- categoryfield support | ||
## [1.0.16-alpha] - 22-10-2021. | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "@appbaseio/autocomplete-suggestions-plugin", | ||
"version": "1.0.16-alpha", | ||
"version": "1.0.17-alpha", | ||
"description": "A suggestions plugin for autocomplete-js, backed by appbase client.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -65,2 +65,18 @@ /** @jsx createElement */ | ||
} | ||
if ( | ||
item.url && | ||
// check valid url: https://stackoverflow.com/a/43467144/10822996 | ||
new RegExp( | ||
"^(https?:\\/\\/)?" + // protocol | ||
"((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|" + // domain name | ||
"((\\d{1,3}\\.){3}\\d{1,3}))" + // OR ip (v4) address | ||
"(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*" + // port and path | ||
"(\\?[;&a-z\\d%_.~+=-]*)?" + // query string | ||
"(\\#[-a-z\\d_]*)?$", | ||
"i" | ||
).test(item.url) | ||
) { | ||
window.open(item.url); | ||
return; | ||
} | ||
setQuery(item.label); | ||
@@ -94,3 +110,3 @@ refresh(); | ||
width: "100%", | ||
marginLeft: "5px" | ||
marginLeft: "5px", | ||
}} | ||
@@ -97,0 +113,0 @@ > |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47152
497