-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (api): Adds ability for click insights events to be triggered (#…
…1916) * Adds ability for click insights events to be triggered * Bump bundlesize * Cleanup insights click defenition * Update packages/docsearch-react/src/DocSearchModal.tsx Co-authored-by: François Chalifour <[email protected]> * Inline creating insights event parameters --------- Co-authored-by: François Chalifour <[email protected]>
- Loading branch information
1 parent
f783d9d
commit cacade4
Showing
5 changed files
with
52 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,4 +84,5 @@ export declare type DocSearchHit = { | |
appId: string; | ||
apiKey: string; | ||
}; | ||
__autocomplete_id?: number; | ||
}; |
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,17 @@ | ||
import type { | ||
AutocompleteContext, | ||
AutocompleteInsightsApi, | ||
AutocompleteState, | ||
BaseItem, | ||
} from '@algolia/autocomplete-core'; | ||
|
||
interface DocSearchContext extends AutocompleteContext { | ||
algoliaInsightsPlugin?: { | ||
insights: AutocompleteInsightsApi; | ||
}; | ||
} | ||
|
||
export interface DocSearchState<TItem extends BaseItem> | ||
extends AutocompleteState<TItem> { | ||
context: DocSearchContext; | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './DocSearchHit'; | ||
export * from './DocSearchState'; | ||
export * from './InternalDocSearchHit'; | ||
export * from './StoredDocSearchHit'; |