@searchcraft/javascript-sdk 0.10.7 → 0.11.1
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/dist/components/defineCustomElements.js +4 -0
- package/dist/components/index.d.ts +530 -217
- package/dist/components/index.js +1661 -8
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-e99cd628.js → p-0c495408.js} +30 -20
- package/dist/components/p-0c495408.js.map +1 -0
- package/dist/components/{p-b4cac872.js → p-1d5c5536.js} +18 -8
- package/dist/components/p-1d5c5536.js.map +1 -0
- package/dist/components/{p-274c5cc8.js → p-3286bbb3.js} +22 -10
- package/dist/components/p-3286bbb3.js.map +1 -0
- package/dist/components/{p-ea48ccae.js → p-3e41546c.js} +17 -8
- package/dist/components/p-3e41546c.js.map +1 -0
- package/dist/components/{p-adc6236e.js → p-87435aac.js} +31 -20
- package/dist/components/p-87435aac.js.map +1 -0
- package/dist/components/p-919734fe.js +31 -0
- package/dist/components/p-919734fe.js.map +1 -0
- package/dist/components/{p-b01f8216.js → p-b13c7fbb.js} +48 -33
- package/dist/components/p-b13c7fbb.js.map +1 -0
- package/dist/components/{p-810a7850.js → p-b4b67072.js} +2 -2
- package/dist/components/p-b4b67072.js.map +1 -0
- package/dist/components/{p-acab4d41.js → p-b7e99386.js} +22 -22
- package/dist/components/p-b7e99386.js.map +1 -0
- package/dist/components/{p-4dd1995c.js → p-c9b65e8f.js} +4 -4
- package/dist/components/{p-4dd1995c.js.map → p-c9b65e8f.js.map} +1 -1
- package/dist/components/p-d54771ef.js.map +1 -1
- package/dist/components/{p-a64b4cba.js → p-e2a10337.js} +2 -2
- package/dist/components/{p-a64b4cba.js.map → p-e2a10337.js.map} +1 -1
- package/dist/components/p-e30203b1.js +62 -0
- package/dist/components/p-e30203b1.js.map +1 -0
- package/dist/components/{p-320e3895.js → p-fc8ccffa.js} +22 -11
- package/dist/components/p-fc8ccffa.js.map +1 -0
- package/dist/components/searchcraft-ad.js +1 -1
- package/dist/components/searchcraft-facet-list.js +1 -1
- package/dist/components/searchcraft-filter-panel.js +51 -23
- package/dist/components/searchcraft-filter-panel.js.map +1 -1
- package/dist/components/searchcraft-input-form.js +1 -1
- package/dist/components/searchcraft-loading.d.ts +11 -0
- package/dist/components/searchcraft-loading.js +8 -0
- package/dist/components/searchcraft-loading.js.map +1 -0
- package/dist/components/searchcraft-pagination.js +13 -3
- package/dist/components/searchcraft-pagination.js.map +1 -1
- package/dist/components/searchcraft-popover-button.js +21 -9
- package/dist/components/searchcraft-popover-button.js.map +1 -1
- package/dist/components/searchcraft-popover-footer.js +1 -1
- package/dist/components/searchcraft-popover-form.js +32 -20
- package/dist/components/searchcraft-popover-form.js.map +1 -1
- package/dist/components/searchcraft-popover-list-item.js +1 -1
- package/dist/components/searchcraft-popover-list-view.js +1 -1
- package/dist/components/searchcraft-results-info.js +15 -7
- package/dist/components/searchcraft-results-info.js.map +1 -1
- package/dist/components/searchcraft-search-result.js +1 -1
- package/dist/components/searchcraft-search-results-per-page.js +14 -4
- package/dist/components/searchcraft-search-results-per-page.js.map +1 -1
- package/dist/components/searchcraft-search-results.js +50 -69
- package/dist/components/searchcraft-search-results.js.map +1 -1
- package/dist/components/searchcraft-slider.js +1 -1
- package/dist/components/searchcraft-summary-box.d.ts +11 -0
- package/dist/components/searchcraft-summary-box.js +2287 -0
- package/dist/components/searchcraft-summary-box.js.map +1 -0
- package/dist/components/searchcraft-theme.js +2 -2
- package/dist/components/searchcraft-theme.js.map +1 -1
- package/dist/components/searchcraft-toggle-button.js +1 -1
- package/dist/hydrate/index.js +6072 -4862
- package/dist/hydrate/index.mjs +6072 -4862
- package/dist/themes/hologram.css +1 -1
- package/dist/themes/hologram.css.map +1 -1
- package/dist/types/classes/CoreInstanceRegistry.d.ts +38 -0
- package/dist/types/classes/Logger.d.ts +25 -0
- package/dist/types/classes/SearchcraftCore.d.ts +50 -0
- package/dist/types/classes/index.d.ts +3 -0
- package/dist/types/clients/MeasureClient.d.ts +27 -0
- package/dist/types/clients/SearchClient.d.ts +35 -0
- package/dist/types/clients/SummaryClient.d.ts +10 -0
- package/dist/types/clients/ad-clients/AdClient.d.ts +20 -0
- package/dist/types/clients/ad-clients/AdMarketplaceClient.d.ts +14 -0
- package/dist/types/clients/ad-clients/CustomAdClient.d.ts +6 -0
- package/dist/types/clients/ad-clients/NativoClient.d.ts +14 -0
- package/dist/types/clients/ad-clients/index.d.ts +5 -0
- package/dist/types/clients/index.d.ts +4 -0
- package/dist/types/components/searchcraft-ad/searchcraft-ad.d.ts +10 -3
- package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +9 -2
- package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +14 -3
- package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +9 -6
- package/dist/types/components/searchcraft-loading/searchcraft-loading.d.ts +10 -0
- package/dist/types/components/searchcraft-pagination/searchcraft-pagination.d.ts +8 -1
- package/dist/types/components/searchcraft-popover-button/searchcraft-popover-button.d.ts +10 -2
- package/dist/types/components/searchcraft-popover-footer/searchcraft-popover-footer.d.ts +8 -1
- package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +11 -3
- package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +9 -1
- package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts +11 -3
- package/dist/types/components/searchcraft-results-info/searchcraft-results-info.d.ts +8 -1
- package/dist/types/components/searchcraft-search-result/searchcraft-search-result.d.ts +10 -1
- package/dist/types/components/searchcraft-search-results/searchcraft-search-results.d.ts +11 -5
- package/dist/types/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.d.ts +8 -1
- package/dist/types/components/searchcraft-summary-box/searchcraft-summary-box.d.ts +49 -0
- package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +8 -1
- package/dist/types/components.d.ts +256 -6
- package/dist/types/index.d.ts +4 -5
- package/dist/types/store/SearchcraftStore.types.d.ts +14 -15
- package/dist/types/store/SearchcraftStoreFactory.d.ts +13 -0
- package/dist/types/store/index.d.ts +1 -1
- package/dist/types/types/core-types/AdClientResponses.types.d.ts +24 -0
- package/dist/types/types/core-types/Facets.types.d.ts +39 -0
- package/dist/types/types/core-types/Measure.types.d.ts +52 -0
- package/dist/types/types/core-types/SearchClient.types.d.ts +67 -0
- package/dist/types/types/core-types/SearchClientResponses.types.d.ts +7 -0
- package/dist/types/types/core-types/SearchcraftAdConfig.types.d.ts +76 -0
- package/dist/types/types/core-types/SearchcraftConfig.types.d.ts +65 -0
- package/dist/types/types/core-types/SearchcraftResponse.types.d.ts +46 -0
- package/dist/types/types/core-types/SubscriptionEvents.types.d.ts +51 -0
- package/dist/types/types/core-types/index.d.ts +10 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/types/sdk-types/index.d.ts +4 -0
- package/dist/types/types/sdk-types/result-mappings.types.d.ts +58 -0
- package/dist/types/types/sdk-types/searchcraft-filter-panel.types.d.ts +44 -0
- package/dist/types/types/sdk-types/templates.types.d.ts +29 -0
- package/dist/types/utils/core-utils/index.d.ts +3 -0
- package/dist/types/utils/core-utils/sanitize.d.ts +2 -0
- package/dist/types/utils/core-utils/url.d.ts +2 -0
- package/dist/types/utils/facets.d.ts +1 -1
- package/dist/types/utils/html.d.ts +1 -1
- package/dist/types/utils/units.d.ts +1 -1
- package/package.json +5 -3
- package/dist/components/p-062d6b80.js +0 -1940
- package/dist/components/p-062d6b80.js.map +0 -1
- package/dist/components/p-274c5cc8.js.map +0 -1
- package/dist/components/p-320e3895.js.map +0 -1
- package/dist/components/p-810a7850.js.map +0 -1
- package/dist/components/p-acab4d41.js.map +0 -1
- package/dist/components/p-adc6236e.js.map +0 -1
- package/dist/components/p-b01f8216.js.map +0 -1
- package/dist/components/p-b4cac872.js.map +0 -1
- package/dist/components/p-e99cd628.js.map +0 -1
- package/dist/components/p-ea48ccae.js.map +0 -1
- package/dist/types/store/SearchcraftStore.d.ts +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import type { SearchcraftCore } from
|
|
2
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
3
3
|
/**
|
|
4
4
|
* This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
|
|
5
5
|
* It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
|
|
@@ -30,6 +30,10 @@ import type { SearchcraftCore } from '@searchcraft/core';
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
export declare class SearchcraftInputForm {
|
|
33
|
+
/**
|
|
34
|
+
* The id of the Searchcraft instance that this component should use.
|
|
35
|
+
*/
|
|
36
|
+
searchcraftId?: string;
|
|
33
37
|
/**
|
|
34
38
|
* Whether or not to automatically submit the search term when the input changes.
|
|
35
39
|
*/
|
|
@@ -71,17 +75,16 @@ export declare class SearchcraftInputForm {
|
|
|
71
75
|
inputValue: string;
|
|
72
76
|
searchTerm: string;
|
|
73
77
|
error: boolean;
|
|
74
|
-
core
|
|
75
|
-
private
|
|
76
|
-
private
|
|
78
|
+
private core?;
|
|
79
|
+
private unsubscribe?;
|
|
80
|
+
private cleanupCore?;
|
|
77
81
|
init(): void;
|
|
78
82
|
onCoreChange(): void;
|
|
83
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
79
84
|
connectedCallback(): void;
|
|
80
|
-
componentDidLoad(): void;
|
|
81
85
|
disconnectedCallback(): void;
|
|
82
86
|
handleInput: (event: Event) => void;
|
|
83
87
|
private performSearch;
|
|
84
|
-
private handleReset;
|
|
85
88
|
handleClearInput: () => void;
|
|
86
89
|
handleFormSubmit: (event: Event) => Promise<void>;
|
|
87
90
|
render(): any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
1
2
|
/**
|
|
2
3
|
* This web component is designed to facilitate pagination of search results. Once a query is submitted, calculates the number for pages.
|
|
3
4
|
*
|
|
@@ -27,6 +28,10 @@
|
|
|
27
28
|
* ```
|
|
28
29
|
*/
|
|
29
30
|
export declare class SearchcraftPagination {
|
|
31
|
+
/**
|
|
32
|
+
* The id of the Searchcraft instance that this component should use.
|
|
33
|
+
*/
|
|
34
|
+
searchcraftId?: string;
|
|
30
35
|
searchTerm: any;
|
|
31
36
|
searchResultsPerPage: any;
|
|
32
37
|
searchResultsPage: any;
|
|
@@ -36,7 +41,9 @@ export declare class SearchcraftPagination {
|
|
|
36
41
|
searchResultsRangeMax: number;
|
|
37
42
|
setSearchResultsPage: (page: number) => void;
|
|
38
43
|
private unsubscribe;
|
|
39
|
-
|
|
44
|
+
private cleanupCore?;
|
|
45
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
46
|
+
connectedCallback(): void;
|
|
40
47
|
disconnectedCallback(): void;
|
|
41
48
|
handleGoToPage(page: number): void;
|
|
42
49
|
renderOddPaginationItem(page: number): any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
2
|
+
import type { PopoverButtonTemplate } from "../../types/index";
|
|
2
3
|
/**
|
|
3
4
|
* Renders a button which, when clicked, turns on popover visibility.
|
|
4
5
|
*
|
|
@@ -60,14 +61,21 @@ export declare class SearchcraftPopoverButton {
|
|
|
60
61
|
* The type of popover button to render.
|
|
61
62
|
*/
|
|
62
63
|
type?: 'skeuomorphic';
|
|
64
|
+
/**
|
|
65
|
+
* The id of the Searchcraft instance that this component should use.
|
|
66
|
+
*/
|
|
67
|
+
searchcraftId?: string;
|
|
63
68
|
hotkey: any;
|
|
64
69
|
hotkeyModifier: any;
|
|
65
70
|
hotkeyModifierSymbol: any;
|
|
66
71
|
isPopoverVisible: any;
|
|
67
72
|
userAgent: any;
|
|
68
73
|
private unsubscribe;
|
|
74
|
+
private cleanupCore?;
|
|
75
|
+
private core?;
|
|
76
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
77
|
+
connectedCallback(): void;
|
|
69
78
|
handleOnClick(): void;
|
|
70
|
-
componentDidLoad(): void;
|
|
71
79
|
disconnectedCallback(): void;
|
|
72
80
|
setUserAgent(): "window" | "mac" | "other";
|
|
73
81
|
renderOptionSymbol: () => any;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
1
2
|
/**
|
|
2
3
|
* Renders the footer for the searchcraft-popover-form.
|
|
3
4
|
*
|
|
4
5
|
* @internal
|
|
5
6
|
*/
|
|
6
7
|
export declare class SearchcraftPopoverFooter {
|
|
8
|
+
/**
|
|
9
|
+
* The id of the Searchcraft instance that this component should use.
|
|
10
|
+
*/
|
|
11
|
+
searchcraftId?: string;
|
|
7
12
|
searchResultsCount: any;
|
|
8
13
|
private unsubscribe;
|
|
9
|
-
|
|
14
|
+
private cleanupCore?;
|
|
15
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
16
|
+
connectedCallback(): void;
|
|
10
17
|
disconnectedCallback(): void;
|
|
11
18
|
render(): any;
|
|
12
19
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { SearchClientResponseItem, AdClientResponseItem, PopoverResultMappings } from
|
|
1
|
+
import type { SearchClientResponseItem, AdClientResponseItem, PopoverResultMappings } from "../../types/index";
|
|
2
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
2
3
|
/**
|
|
3
4
|
* This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
|
|
4
5
|
*
|
|
@@ -56,8 +57,11 @@ export declare class SearchcraftPopoverForm {
|
|
|
56
57
|
* The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
|
|
57
58
|
*/
|
|
58
59
|
hotkeyModifier?: 'ctrl' | 'meta' | 'alt' | 'option';
|
|
60
|
+
/**
|
|
61
|
+
* The id of the Searchcraft instance that this component should use.
|
|
62
|
+
*/
|
|
63
|
+
searchcraftId?: string;
|
|
59
64
|
isPopoverVisibleInState: boolean;
|
|
60
|
-
unsubscribe: (() => void) | undefined;
|
|
61
65
|
searchClientResponseItems: SearchClientResponseItem[];
|
|
62
66
|
adClientResponseItems: AdClientResponseItem[];
|
|
63
67
|
searchTerm: string | undefined;
|
|
@@ -69,7 +73,11 @@ export declare class SearchcraftPopoverForm {
|
|
|
69
73
|
searchResultsPerPage: any;
|
|
70
74
|
modalElement: any;
|
|
71
75
|
hostElement: HTMLElement;
|
|
72
|
-
|
|
76
|
+
private unsubscribe;
|
|
77
|
+
private cleanupCore?;
|
|
78
|
+
core?: SearchcraftCore;
|
|
79
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
80
|
+
connectedCallback(): void;
|
|
73
81
|
disconnectedCallback(): void;
|
|
74
82
|
handleDocumentClick: (event: MouseEvent) => void;
|
|
75
83
|
/**
|
package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { SearchDocument, SearchClientResponseItem, PopoverResultMappings } from
|
|
1
|
+
import type { SearchDocument, SearchClientResponseItem, PopoverResultMappings } from "../../types/index";
|
|
2
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
2
3
|
/**
|
|
3
4
|
* A single list item rendered in a searchcraft-popover-list-view.
|
|
4
5
|
*
|
|
@@ -9,12 +10,19 @@ export declare class SearchcraftPopoverListItem {
|
|
|
9
10
|
popoverResultMappings: PopoverResultMappings | undefined;
|
|
10
11
|
/** The document position relative to the search results (For Measure) */
|
|
11
12
|
documentPosition: number;
|
|
13
|
+
/**
|
|
14
|
+
* The id of the Searchcraft instance that this component should use.
|
|
15
|
+
*/
|
|
16
|
+
searchcraftId?: string;
|
|
12
17
|
title?: string;
|
|
13
18
|
subtitle?: string;
|
|
14
19
|
href?: string;
|
|
15
20
|
imageSource?: string;
|
|
16
21
|
imageAlt?: string;
|
|
22
|
+
core?: SearchcraftCore;
|
|
23
|
+
private cleanupCore?;
|
|
17
24
|
mapValuesFromDocument(document: SearchDocument): void;
|
|
25
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
18
26
|
connectedCallback(): void;
|
|
19
27
|
disconnectedCallback(): void;
|
|
20
28
|
handleLinkClick: () => void;
|
package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AdClientResponseItem, SearchClientResponseItem } from
|
|
2
|
-
import type {
|
|
1
|
+
import type { AdClientResponseItem, SearchClientResponseItem, PopoverResultMappings } from "../../types/index";
|
|
2
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
3
3
|
/**
|
|
4
4
|
* This web component is designed to display a list of results within a popover interface.
|
|
5
5
|
* It is consumed within the `searchcraft-popover-form` component.
|
|
@@ -12,6 +12,10 @@ import type { PopoverResultMappings } from '@searchcraft/core';
|
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|
|
14
14
|
export declare class SearchcraftPopoverListView {
|
|
15
|
+
/**
|
|
16
|
+
* The id of the Searchcraft instance that this component should use.
|
|
17
|
+
*/
|
|
18
|
+
searchcraftId?: string;
|
|
15
19
|
/**
|
|
16
20
|
* The mappings that define how the data in the documents are mapped to the
|
|
17
21
|
* list-view-item elements.
|
|
@@ -24,7 +28,11 @@ export declare class SearchcraftPopoverListView {
|
|
|
24
28
|
adClientResponseItems: AdClientResponseItem[] | undefined;
|
|
25
29
|
searchResultsPage: number;
|
|
26
30
|
searchResultsPerPage: number;
|
|
27
|
-
private config
|
|
31
|
+
private config?;
|
|
32
|
+
private cleanupCore?;
|
|
33
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
34
|
+
connectedCallback(): void;
|
|
35
|
+
disconnectedCallback(): void;
|
|
28
36
|
renderWithADMAds(): any;
|
|
29
37
|
renderWithCustomAds(): any;
|
|
30
38
|
renderWithNativoAds(): any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
2
|
+
import type { ResultsInfoTemplate } from "../../types/index";
|
|
2
3
|
/**
|
|
3
4
|
* This web component is designed to display the number of results returned from a search query.
|
|
4
5
|
*
|
|
@@ -50,6 +51,10 @@ export declare class SearchcraftResultsInfo {
|
|
|
50
51
|
* A callback function responsible for rendering the results info.
|
|
51
52
|
*/
|
|
52
53
|
template?: ResultsInfoTemplate;
|
|
54
|
+
/**
|
|
55
|
+
* The id of the Searchcraft instance that this component should use.
|
|
56
|
+
*/
|
|
57
|
+
searchcraftId?: string;
|
|
53
58
|
searchTerm: any;
|
|
54
59
|
searchResultsPage: any;
|
|
55
60
|
searchResultsPerPage: any;
|
|
@@ -58,6 +63,8 @@ export declare class SearchcraftResultsInfo {
|
|
|
58
63
|
range: number[];
|
|
59
64
|
responseTime: string;
|
|
60
65
|
unsubscribe: () => void;
|
|
66
|
+
private cleanupCore?;
|
|
67
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
61
68
|
connectedCallback(): void;
|
|
62
69
|
disconnectedCallback(): void;
|
|
63
70
|
render(): any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { SearchClientResponseItem, SearchResultTemplate, SearchResultTemplateData } from
|
|
1
|
+
import type { SearchClientResponseItem, SearchResultTemplate, SearchResultTemplateData } from "../../types/index";
|
|
2
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
2
3
|
/**
|
|
3
4
|
* This web component is designed to display detailed information for a single search result. Once a query is submitted, the component formats and presents the result.
|
|
4
5
|
*
|
|
@@ -18,9 +19,17 @@ export declare class SearchcraftSearchResult {
|
|
|
18
19
|
* A callback function responsible for rendering a result.
|
|
19
20
|
*/
|
|
20
21
|
template?: SearchResultTemplate<SearchResultTemplateData>;
|
|
22
|
+
/**
|
|
23
|
+
* The id of the Searchcraft instance that this component should use.
|
|
24
|
+
*/
|
|
25
|
+
searchcraftId?: string;
|
|
21
26
|
templateHtml: string | undefined;
|
|
22
27
|
hostElement?: HTMLElement;
|
|
28
|
+
core?: SearchcraftCore;
|
|
29
|
+
private cleanupCore?;
|
|
30
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
23
31
|
connectedCallback(): void;
|
|
32
|
+
disconnectedCallback(): void;
|
|
24
33
|
handleResultContainerClick: (event: MouseEvent) => void;
|
|
25
34
|
handleKeyDown: () => void;
|
|
26
35
|
render(): any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { AdClientResponseItem, SearchClientResponseItem, SearchcraftConfig, SearchResultTemplate, SearchResultTemplateData } from
|
|
2
|
-
import {
|
|
1
|
+
import type { AdClientResponseItem, SearchClientResponseItem, SearchcraftConfig, SearchResultTemplate, SearchResultTemplateData } from "../../types/index";
|
|
2
|
+
import type { SearchcraftState } from "../../store/index";
|
|
3
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
3
4
|
/**
|
|
4
5
|
* This web component is responsible for displaying the results of a search query. Once a query is submitted, the component formats and presents an ordered list of the results.
|
|
5
6
|
*
|
|
@@ -55,6 +56,10 @@ import { type SearchcraftState } from "../../store/index";
|
|
|
55
56
|
* ```
|
|
56
57
|
*/
|
|
57
58
|
export declare class SearchcraftSearchResults {
|
|
59
|
+
/**
|
|
60
|
+
* The id of the Searchcraft instance that this component should use.
|
|
61
|
+
*/
|
|
62
|
+
searchcraftId?: string;
|
|
58
63
|
/**
|
|
59
64
|
* A query that will appears when the component initializes or the search term is ''..
|
|
60
65
|
*/
|
|
@@ -65,14 +70,15 @@ export declare class SearchcraftSearchResults {
|
|
|
65
70
|
template?: SearchResultTemplate<SearchResultTemplateData>;
|
|
66
71
|
adClientResponseItems: AdClientResponseItem[];
|
|
67
72
|
config?: SearchcraftConfig;
|
|
68
|
-
initialSearchClientResponseItems?: SearchClientResponseItem[];
|
|
69
73
|
isSearchInProgress: boolean;
|
|
70
74
|
searchClientResponseItems?: SearchClientResponseItem[];
|
|
71
75
|
searchResultsPage: any;
|
|
72
76
|
searchResultsPerPage: any;
|
|
73
77
|
searchTerm: string;
|
|
74
|
-
private unsubscribe
|
|
75
|
-
|
|
78
|
+
private unsubscribe?;
|
|
79
|
+
private cleanupCore?;
|
|
80
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
81
|
+
connectedCallback(): void;
|
|
76
82
|
disconnectedCallback(): void;
|
|
77
83
|
handleStateChange(state: SearchcraftState): void;
|
|
78
84
|
renderEmptyState(): any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
1
2
|
/**
|
|
2
3
|
* This web component is designed to choose the number of search results displayed.
|
|
3
4
|
*
|
|
@@ -33,6 +34,10 @@ export declare class SearchcraftSearchResultsPerPage {
|
|
|
33
34
|
* The base value is defined by the `searchResultsPerPage` option in the configuration.
|
|
34
35
|
*/
|
|
35
36
|
increment: string | number;
|
|
37
|
+
/**
|
|
38
|
+
* The id of the Searchcraft instance that this component should use.
|
|
39
|
+
*/
|
|
40
|
+
searchcraftId?: string;
|
|
36
41
|
searchTerm: any;
|
|
37
42
|
searchResultsPage: any;
|
|
38
43
|
searchResultsPerPage: any;
|
|
@@ -42,7 +47,9 @@ export declare class SearchcraftSearchResultsPerPage {
|
|
|
42
47
|
setSearchResultsPerPage: (perPage: number) => void;
|
|
43
48
|
setSearchResultsPage: (page: number) => void;
|
|
44
49
|
private unsubscribe;
|
|
45
|
-
|
|
50
|
+
private cleanupCore?;
|
|
51
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
52
|
+
connectedCallback(): void;
|
|
46
53
|
disconnectedCallback(): void;
|
|
47
54
|
render(): any;
|
|
48
55
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
2
|
+
/**
|
|
3
|
+
* This component renders a summary box for RAG search result summaries.
|
|
4
|
+
* When the user makes a search, a network call is made to retrieve the summary content, which is then
|
|
5
|
+
* rendered in this box.
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This component requires the usage of a read key that has "SUMMARY" permissions.
|
|
8
|
+
*
|
|
9
|
+
* @react-import
|
|
10
|
+
* ```jsx
|
|
11
|
+
* import { SearchcraftSummaryBox } from "@searchcraft/react-sdk";
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @vue-import
|
|
15
|
+
* ```jsx
|
|
16
|
+
* import { SearchcraftSummaryBox } from "@searchcraft/vue-sdk";
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @js-example
|
|
20
|
+
* ```html
|
|
21
|
+
* <searchcraft-summary-box />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @react-example
|
|
25
|
+
* ```jsx
|
|
26
|
+
* <SearchcraftSummaryBox />
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @vue-example
|
|
30
|
+
* ```jsx
|
|
31
|
+
* <SearchcraftSummaryBox />
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare class SearchcraftSummaryBox {
|
|
35
|
+
/**
|
|
36
|
+
* The id of the Searchcraft instance that this component should use.
|
|
37
|
+
*/
|
|
38
|
+
searchcraftId?: string;
|
|
39
|
+
summary: string;
|
|
40
|
+
isLoading: boolean;
|
|
41
|
+
hostElement?: HTMLElement;
|
|
42
|
+
private unsubscribe?;
|
|
43
|
+
private cleanupCore?;
|
|
44
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
45
|
+
connectedCallback(): void;
|
|
46
|
+
disconnectedCallback(): void;
|
|
47
|
+
render(): any;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=searchcraft-summary-box.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SearchcraftCore } from "../../classes/index";
|
|
1
2
|
import { type EventEmitter } from '../../stencil-public-runtime';
|
|
2
3
|
/**
|
|
3
4
|
* This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
|
|
@@ -13,14 +14,20 @@ export declare class SearchcraftToggleButton {
|
|
|
13
14
|
* The secondary label displayed below the main label.
|
|
14
15
|
*/
|
|
15
16
|
subLabel: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The id of the Searchcraft instance that this component should use.
|
|
19
|
+
*/
|
|
20
|
+
searchcraftId?: string;
|
|
16
21
|
/**
|
|
17
22
|
* When the toggle element is changed.
|
|
18
23
|
*/
|
|
19
24
|
toggleUpdated?: EventEmitter<boolean>;
|
|
20
25
|
isActive: boolean;
|
|
21
|
-
unsubscribe: (() => void) | undefined;
|
|
22
26
|
lastSearchTerm: string | undefined;
|
|
27
|
+
private unsubscribe;
|
|
28
|
+
private cleanupCore?;
|
|
23
29
|
private handleToggle;
|
|
30
|
+
onCoreAvailable(core: SearchcraftCore): void;
|
|
24
31
|
connectedCallback(): void;
|
|
25
32
|
disconnectedCallback(): void;
|
|
26
33
|
render(): any;
|