@searchcraft/javascript-sdk 0.9.7 → 0.10.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/README.md +2 -2
- package/dist/components/defineCustomElements.js +8 -6
- package/dist/components/index.d.ts +2632 -68
- package/dist/components/index.js +51 -15
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-e41b0f43.js → p-0077f677.js} +14 -21
- package/dist/components/p-0077f677.js.map +1 -0
- package/dist/components/p-13e81b5d.js +147 -0
- package/dist/components/p-13e81b5d.js.map +1 -0
- package/dist/components/p-172a848d.js +93 -0
- package/dist/components/p-172a848d.js.map +1 -0
- package/dist/components/{p-580c09dc.js → p-17c646e2.js} +226 -190
- package/dist/components/p-17c646e2.js.map +1 -0
- package/dist/components/{p-e55a7970.js → p-1adf78b9.js} +2 -2
- package/dist/components/p-1adf78b9.js.map +1 -0
- package/dist/components/{p-e27a0dab.js → p-2be1a382.js} +5 -7
- package/dist/components/p-2be1a382.js.map +1 -0
- package/dist/components/{p-4df578e4.js → p-3e65aa91.js} +8 -8
- package/dist/components/p-3e65aa91.js.map +1 -0
- package/dist/components/{p-8f854dec.js → p-5d17ace0.js} +14 -13
- package/dist/components/p-5d17ace0.js.map +1 -0
- package/dist/components/{p-bf6a086a.js → p-73db9122.js} +3 -10
- package/dist/components/p-73db9122.js.map +1 -0
- package/dist/components/p-810a7850.js +17 -0
- package/dist/components/p-810a7850.js.map +1 -0
- package/dist/components/p-84e2cbd6.js +46 -0
- package/dist/components/p-84e2cbd6.js.map +1 -0
- package/dist/components/{p-bb12ab5a.js → p-868803f9.js} +4 -3
- package/dist/components/p-868803f9.js.map +1 -0
- package/dist/components/{p-60f05735.js → p-a62a2e74.js} +4 -4
- package/dist/components/p-a62a2e74.js.map +1 -0
- package/dist/components/{p-5fdaf1e6.js → p-a64b4cba.js} +2 -145
- package/dist/components/p-a64b4cba.js.map +1 -0
- package/dist/components/{p-71cc28c1.js → p-acf23bab.js} +2 -2
- package/dist/components/p-acf23bab.js.map +1 -0
- package/dist/components/{p-0e393fe1.js → p-f2585cdf.js} +3 -9
- package/dist/components/p-f2585cdf.js.map +1 -0
- package/dist/components/searchcraft-ad.js +1 -1
- package/dist/components/searchcraft-button.js +1 -1
- package/dist/components/searchcraft-error-message.js +1 -1
- package/dist/components/searchcraft-facet-list.js +1 -1
- package/dist/components/searchcraft-filter-panel.js +6 -5
- package/dist/components/searchcraft-filter-panel.js.map +1 -1
- package/dist/components/searchcraft-input-form.js +2 -2
- package/dist/components/searchcraft-input-label.js +1 -1
- package/dist/components/searchcraft-pagination.js +3 -9
- package/dist/components/searchcraft-pagination.js.map +1 -1
- package/dist/components/searchcraft-popover-button.js +95 -3
- package/dist/components/searchcraft-popover-button.js.map +1 -1
- package/dist/components/searchcraft-popover-footer.d.ts +11 -0
- package/dist/components/searchcraft-popover-footer.js +8 -0
- package/dist/components/searchcraft-popover-footer.js.map +1 -0
- package/dist/components/searchcraft-popover-form.js +36 -27
- 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 +12 -23
- package/dist/components/searchcraft-results-info.js.map +1 -1
- package/dist/components/searchcraft-search-result.d.ts +11 -0
- package/dist/components/searchcraft-search-result.js +8 -0
- package/dist/components/searchcraft-search-result.js.map +1 -0
- package/dist/components/searchcraft-search-results-per-page.js +3 -10
- package/dist/components/searchcraft-search-results-per-page.js.map +1 -1
- package/dist/components/searchcraft-search-results.d.ts +11 -0
- package/dist/components/{searchcraft-base-search-results.js → searchcraft-search-results.js} +25 -71
- package/dist/components/searchcraft-search-results.js.map +1 -0
- package/dist/components/searchcraft-select.js +1 -1
- package/dist/components/searchcraft-slider.js +1 -1
- package/dist/components/searchcraft-theme.js +4 -42
- package/dist/components/searchcraft-theme.js.map +1 -1
- package/dist/components/searchcraft-toggle-button.js +1 -1
- package/dist/hydrate/index.d.ts +242 -0
- package/dist/hydrate/index.js +23479 -0
- package/dist/hydrate/index.mjs +23471 -0
- package/dist/hydrate/package.json +12 -0
- package/dist/themes/hologram.css +1 -0
- package/dist/themes/hologram.css.map +1 -0
- package/dist/types/components/searchcraft-ad/searchcraft-ad.d.ts +2 -0
- package/dist/types/components/searchcraft-button/searchcraft-button.d.ts +3 -2
- package/dist/types/components/searchcraft-error-message/searchcraft-error-message.d.ts +6 -7
- package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +3 -1
- package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +30 -1
- package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +23 -14
- package/dist/types/components/searchcraft-input-label/searchcraft-input-label.d.ts +3 -2
- package/dist/types/components/searchcraft-pagination/searchcraft-pagination.d.ts +22 -8
- package/dist/types/components/searchcraft-popover-button/searchcraft-popover-button.d.ts +74 -0
- package/dist/types/components/searchcraft-popover-footer/searchcraft-popover-footer.d.ts +13 -0
- package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +27 -15
- package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +5 -3
- package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts +3 -2
- package/dist/types/components/searchcraft-results-info/searchcraft-results-info.d.ts +41 -19
- package/dist/types/components/searchcraft-search-result/searchcraft-search-result.d.ts +28 -0
- package/dist/types/components/searchcraft-search-results/searchcraft-search-results.d.ts +81 -0
- package/dist/types/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.d.ts +21 -5
- package/dist/types/components/searchcraft-select/searchcraft-select.d.ts +3 -5
- package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +3 -3
- package/dist/types/components/searchcraft-theme/searchcraft-theme.d.ts +24 -16
- package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +2 -1
- package/dist/types/components.d.ts +947 -612
- package/dist/types/index.d.ts +5 -4
- package/dist/types/store/SearchcraftStore.types.d.ts +3 -0
- package/dist/types/utils/html.d.ts +6 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +13 -7
- package/dist/components/bundled.types.d.ts +0 -2275
- package/dist/components/p-0e393fe1.js.map +0 -1
- package/dist/components/p-19fe91f1.js +0 -136
- package/dist/components/p-19fe91f1.js.map +0 -1
- package/dist/components/p-4df578e4.js.map +0 -1
- package/dist/components/p-580c09dc.js.map +0 -1
- package/dist/components/p-5fdaf1e6.js.map +0 -1
- package/dist/components/p-60f05735.js.map +0 -1
- package/dist/components/p-71cc28c1.js.map +0 -1
- package/dist/components/p-8f854dec.js.map +0 -1
- package/dist/components/p-bb12ab5a.js.map +0 -1
- package/dist/components/p-bf6a086a.js.map +0 -1
- package/dist/components/p-d9551738.js +0 -25
- package/dist/components/p-d9551738.js.map +0 -1
- package/dist/components/p-e27a0dab.js.map +0 -1
- package/dist/components/p-e41b0f43.js.map +0 -1
- package/dist/components/p-e55a7970.js.map +0 -1
- package/dist/components/searchcraft-base-search-result.d.ts +0 -11
- package/dist/components/searchcraft-base-search-result.js +0 -8
- package/dist/components/searchcraft-base-search-result.js.map +0 -1
- package/dist/components/searchcraft-base-search-results.d.ts +0 -11
- package/dist/components/searchcraft-base-search-results.js.map +0 -1
- package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +0 -55
- package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +0 -89
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { SearchClientResponseItem, SearchResultTemplate, SearchResultTemplateData } from '@searchcraft/core';
|
|
2
|
+
/**
|
|
3
|
+
* 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
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class SearchcraftSearchResult {
|
|
8
|
+
item?: SearchClientResponseItem;
|
|
9
|
+
/**
|
|
10
|
+
* The index.
|
|
11
|
+
*/
|
|
12
|
+
index: number;
|
|
13
|
+
/**
|
|
14
|
+
* The position in the document. Used with the "document_clicked" measure event.
|
|
15
|
+
*/
|
|
16
|
+
documentPosition: number;
|
|
17
|
+
/**
|
|
18
|
+
* A callback function responsible for rendering a result.
|
|
19
|
+
*/
|
|
20
|
+
template?: SearchResultTemplate<SearchResultTemplateData>;
|
|
21
|
+
templateHtml: string | undefined;
|
|
22
|
+
hostElement?: HTMLElement;
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
handleResultContainerClick: (event: MouseEvent) => void;
|
|
25
|
+
handleKeyDown: () => void;
|
|
26
|
+
render(): any;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=searchcraft-search-result.d.ts.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { AdClientResponseItem, SearchClientResponseItem, SearchcraftConfig, SearchResultTemplate, SearchResultTemplateData } from '@searchcraft/core';
|
|
2
|
+
import { type SearchcraftState } from "../../store/index";
|
|
3
|
+
/**
|
|
4
|
+
* 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
|
+
*
|
|
7
|
+
* @react-import
|
|
8
|
+
* ```jsx
|
|
9
|
+
* import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @vue-import
|
|
13
|
+
* ```jsx
|
|
14
|
+
* import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @js-example
|
|
18
|
+
* ```html
|
|
19
|
+
* <!-- index.html -->
|
|
20
|
+
* <searchcraft-search-results
|
|
21
|
+
* ad-interval="4"
|
|
22
|
+
* place-ad-at-start="true"
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* ```js
|
|
27
|
+
* // index.js
|
|
28
|
+
* const searchResults = document.querySelector('searchcraft-search-results');
|
|
29
|
+
*
|
|
30
|
+
* searchResults.template = (item, index, { html }) => html`
|
|
31
|
+
* <h2>${item.title}</h2>
|
|
32
|
+
* `;
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @react-example
|
|
36
|
+
* ```jsx
|
|
37
|
+
* <SearchcraftSearchResults
|
|
38
|
+
* adInterval={4}
|
|
39
|
+
* placeAdAtState={true}
|
|
40
|
+
* template={(item, index, { html }) => html`
|
|
41
|
+
* <h2>${item.title}</h2>
|
|
42
|
+
* `}
|
|
43
|
+
* />
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @vue-example
|
|
47
|
+
* ```jsx
|
|
48
|
+
* <SearchcraftSearchResults
|
|
49
|
+
* adInterval={4}
|
|
50
|
+
* placeAdAtState={true}
|
|
51
|
+
* :template={(item, index, { html }) => html`
|
|
52
|
+
* <h2>${item.title}</h2>
|
|
53
|
+
* `}
|
|
54
|
+
* />
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare class SearchcraftSearchResults {
|
|
58
|
+
/**
|
|
59
|
+
* A callback function responsible for rendering a result. Passed to `searchcraft-search-result`.
|
|
60
|
+
*/
|
|
61
|
+
template?: SearchResultTemplate<SearchResultTemplateData>;
|
|
62
|
+
searchTerm: string;
|
|
63
|
+
searchClientResponseItems?: SearchClientResponseItem[];
|
|
64
|
+
adClientResponseItems: AdClientResponseItem[];
|
|
65
|
+
searchResultsPerPage: any;
|
|
66
|
+
searchResultsPage: any;
|
|
67
|
+
isSearchInProgress: boolean;
|
|
68
|
+
config?: SearchcraftConfig;
|
|
69
|
+
private unsubscribe;
|
|
70
|
+
componentDidLoad(): void;
|
|
71
|
+
disconnectedCallback(): void;
|
|
72
|
+
handleStateChange(state: SearchcraftState): void;
|
|
73
|
+
renderEmptyState(): any;
|
|
74
|
+
renderNoResultsFoundState(): any;
|
|
75
|
+
renderWithADMAds(): any;
|
|
76
|
+
renderWithCustomAds(): any;
|
|
77
|
+
renderWithNativoAds(): any;
|
|
78
|
+
renderWithNoAds(): any;
|
|
79
|
+
render(): any;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=searchcraft-search-results.d.ts.map
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This web component is designed to choose the number of search results displayed.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* @react-import
|
|
5
|
+
* ```jsx
|
|
6
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* @vue-import
|
|
10
|
+
* ```jsx
|
|
11
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @js-example
|
|
5
15
|
* ```html
|
|
6
16
|
* <!-- index.html -->
|
|
7
17
|
* <searchcraft-search-results-per-page increment="20" />
|
|
8
18
|
* ```
|
|
19
|
+
*
|
|
20
|
+
* @react-example
|
|
21
|
+
* ```jsx
|
|
22
|
+
* <SearchcraftSearchResultsPerPage increment={20} />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @vue-example
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <SearchcraftSearchResultsPerPage increment="20" />
|
|
28
|
+
* ```
|
|
9
29
|
*/
|
|
10
30
|
export declare class SearchcraftSearchResultsPerPage {
|
|
11
31
|
/**
|
|
@@ -13,10 +33,6 @@ export declare class SearchcraftSearchResultsPerPage {
|
|
|
13
33
|
* The base value is defined by the `searchResultsPerPage` option in the configuration.
|
|
14
34
|
*/
|
|
15
35
|
increment: string | number;
|
|
16
|
-
/**
|
|
17
|
-
* The custom styles object.
|
|
18
|
-
*/
|
|
19
|
-
customStyles?: string;
|
|
20
36
|
searchTerm: any;
|
|
21
37
|
searchResultsPage: any;
|
|
22
38
|
searchResultsPerPage: any;
|
|
@@ -7,7 +7,7 @@ export type SearchcraftSelectOption = {
|
|
|
7
7
|
/**
|
|
8
8
|
* This web component is designed to allow users to select between a group of options.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* @js-example
|
|
11
11
|
* ```html
|
|
12
12
|
* <!-- index.html -->
|
|
13
13
|
* <searchcraft-select
|
|
@@ -16,6 +16,8 @@ export type SearchcraftSelectOption = {
|
|
|
16
16
|
* options="[{ label: 'label', value: 'value' }]"
|
|
17
17
|
* />
|
|
18
18
|
* ```
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
19
21
|
*/
|
|
20
22
|
export declare class SearchcraftSelect {
|
|
21
23
|
/**
|
|
@@ -46,10 +48,6 @@ export declare class SearchcraftSelect {
|
|
|
46
48
|
* The options for the select input.
|
|
47
49
|
*/
|
|
48
50
|
options: SearchcraftSelectOption[] | string;
|
|
49
|
-
/**
|
|
50
|
-
* A custom styles object.
|
|
51
|
-
*/
|
|
52
|
-
customStyles?: string;
|
|
53
51
|
/**
|
|
54
52
|
* The event fired when the select is changed.
|
|
55
53
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
/**
|
|
3
|
-
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value. The component renders a slider interface, which can be used to visually choose a value between two boundaries.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
6
|
*/
|
|
7
7
|
export declare class SearchcraftSlider {
|
|
8
8
|
/**
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This web component adds Searchcraft's built-in css theme to your page
|
|
3
|
-
* It does not render anything visible, its only function is to manage the css styles on the page.
|
|
2
|
+
* This web component adds Searchcraft's built-in css theme to your page. It does not render anything visible, its only function is to manage the css styles on the page.'
|
|
4
3
|
*
|
|
5
|
-
*
|
|
4
|
+
* @react-import
|
|
5
|
+
* ```jsx
|
|
6
|
+
* import { SearchcraftTheme } from "@searchcraft/react-sdk";
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* @vue-import
|
|
10
|
+
* ```jsx
|
|
11
|
+
* import { SearchcraftTheme } from "@searchcraft/vue-sdk";
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @js-example
|
|
6
15
|
* ```html
|
|
7
|
-
*
|
|
8
|
-
*
|
|
16
|
+
* <searchcraft-theme />
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @react-example
|
|
20
|
+
* ```jsx
|
|
21
|
+
* <SearchcraftTheme />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @vue-example
|
|
25
|
+
* ```jsx
|
|
26
|
+
* <SearchcraftTheme />
|
|
9
27
|
* ```
|
|
10
28
|
*/
|
|
11
29
|
export declare class SearchcraftTheme {
|
|
12
|
-
|
|
13
|
-
* The name of the theme.
|
|
14
|
-
*/
|
|
15
|
-
theme?: string;
|
|
16
|
-
/**
|
|
17
|
-
* The custom theme configuration object.
|
|
18
|
-
*/
|
|
19
|
-
customTheme?: string;
|
|
20
|
-
private camelToKebab;
|
|
21
|
-
componentDidLoad(): void;
|
|
22
|
-
render(): void;
|
|
30
|
+
render(): any;
|
|
23
31
|
}
|
|
24
32
|
//# sourceMappingURL=searchcraft-theme.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
/**
|
|
3
3
|
* This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
|
|
4
|
-
*
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
5
6
|
*/
|
|
6
7
|
export declare class SearchcraftToggleButton {
|
|
7
8
|
/**
|