-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3609aca
commit f4dbf91
Showing
23 changed files
with
1,293 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/** | ||
* Functions to use Luigi Global Search | ||
* @name GlobalSearch | ||
*/ | ||
class LuigiGlobalSearch { | ||
/** | ||
* Opens the global search field. | ||
* @memberof GlobalSearch | ||
* @since NEXTRELEASE | ||
* @example Luigi.globalSearch().openSearchField(); | ||
*/ | ||
openSearchField() { | ||
Luigi.openSearchField(); | ||
} | ||
|
||
/** | ||
* Closes the global search field. | ||
* @memberof GlobalSearch | ||
* @since NEXTRELEASE | ||
* @example Luigi.globalSearch().closeSearchField(); | ||
*/ | ||
closeSearchField() { | ||
Luigi.closeSearchField(); | ||
} | ||
|
||
/** | ||
* Clears the global search field. | ||
* @memberof GlobalSearch | ||
* @since NEXTRELEASE | ||
* @example Luigi.globalSearch().clearSearchField(); | ||
*/ | ||
clearSearchField() { | ||
Luigi.clearSearchField(); | ||
} | ||
|
||
/** | ||
* Opens the global search result. By standard it is a popover. | ||
* @memberof GlobalSearch | ||
* @param {Array} searchResultItems | ||
* @since NEXTRELEASE | ||
* @example | ||
* let searchResultItem = { | ||
* pathObject: { | ||
* link, | ||
* params: {} | ||
* }, | ||
* label, | ||
* description | ||
* } | ||
* | ||
* Luigi.globalSearch().showSearchResult([searchResultItem1, searchResultItem2]); | ||
*/ | ||
showSearchResult(searchResultItems) { | ||
Luigi.showSearchResult(searchResultItems); | ||
} | ||
|
||
/** | ||
* Closes the global search result. By standard it is rendered as a popover. | ||
* @memberof GlobalSearch | ||
* @since NEXTRELEASE | ||
* @example Luigi.globalSearch().closeSearchResult(); | ||
*/ | ||
closeSearchResult() { | ||
Luigi.closeSearchResult(); | ||
} | ||
|
||
/** | ||
* Gets the value of the search input field. | ||
* @memberof GlobalSearch | ||
* @since NEXTRELEASE | ||
* @example Luigi.globalSearch().getSearchString(); | ||
*/ | ||
getSearchString() { | ||
return Luigi.getGlobalSearchString(); | ||
} | ||
|
||
/** | ||
* Sets the value of the search input field. | ||
* @memberof GlobalSearch | ||
* @param searchString search value | ||
* @since NEXTRELEASE | ||
* @example Luigi.globalSearch().setSearchString('searchString'); | ||
*/ | ||
setSearchString(searchString) { | ||
Luigi.setGlobalSearchString(searchString); | ||
} | ||
} | ||
export const globalSearch = new LuigiGlobalSearch(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.