@searchcraft/javascript-sdk 0.13.0 → 0.13.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/index.d.ts +73 -1
- package/dist/components/index.js +58 -634
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-e8d97093.js → p-BV4HUriZ.js} +15 -10
- package/dist/components/p-BV4HUriZ.js.map +1 -0
- package/dist/components/{p-46ddde99.js → p-B_415D4A.js} +8 -5
- package/dist/components/p-B_415D4A.js.map +1 -0
- package/dist/components/{p-afe7ce60.js → p-BbSxfaD7.js} +12 -9
- package/dist/components/p-BbSxfaD7.js.map +1 -0
- package/dist/components/p-BfTCfPZ1.js +95 -0
- package/dist/components/p-BfTCfPZ1.js.map +1 -0
- package/dist/components/p-BlYgaV0q.js +1373 -0
- package/dist/components/p-BlYgaV0q.js.map +1 -0
- package/dist/components/{p-76d95772.js → p-C-wcIch1.js} +16 -13
- package/dist/components/p-C-wcIch1.js.map +1 -0
- package/dist/components/{p-87435aac.js → p-C1S92_N8.js} +12 -8
- package/dist/components/p-C1S92_N8.js.map +1 -0
- package/dist/components/{p-acf23bab.js → p-C681KruS.js} +10 -7
- package/dist/components/p-C681KruS.js.map +1 -0
- package/dist/components/{p-3d2107af.js → p-C7ZK8CYu.js} +11 -8
- package/dist/components/p-C7ZK8CYu.js.map +1 -0
- package/dist/components/{p-38b2dad0.js → p-Cju73I1E.js} +11 -8
- package/dist/components/p-Cju73I1E.js.map +1 -0
- package/dist/components/{p-e30203b1.js → p-D0j0UFpV.js} +2 -1
- package/dist/components/p-D0j0UFpV.js.map +1 -0
- package/dist/components/{p-16181756.js → p-D5p2scT9.js} +11 -8
- package/dist/components/p-D5p2scT9.js.map +1 -0
- package/dist/components/{p-5365011f.js → p-DO5g2x-l.js} +861 -186
- package/dist/components/p-DO5g2x-l.js.map +1 -0
- package/dist/components/{p-73db9122.js → p-Dc7S4y3b.js} +9 -6
- package/dist/components/p-Dc7S4y3b.js.map +1 -0
- package/dist/components/{p-f2585cdf.js → p-DjPZkCLP.js} +8 -5
- package/dist/components/p-DjPZkCLP.js.map +1 -0
- package/dist/components/{p-3286bbb3.js → p-DotXR-Gz.js} +10 -7
- package/dist/components/p-DotXR-Gz.js.map +1 -0
- package/dist/components/{p-90bc1590.js → p-Dr9rPC9v.js} +11 -8
- package/dist/components/p-Dr9rPC9v.js.map +1 -0
- package/dist/components/{p-fa799946.js → p-L4PwHqQC.js} +9 -6
- package/dist/components/p-L4PwHqQC.js.map +1 -0
- package/dist/components/{p-b4b67072.js → p-_aHgRsRD.js} +4 -3
- package/dist/components/p-_aHgRsRD.js.map +1 -0
- package/dist/components/{p-d54771ef.js → p-i8oXh7db.js} +2 -1
- package/dist/components/p-i8oXh7db.js.map +1 -0
- package/dist/components/searchcraft-ad.js +2 -1
- package/dist/components/searchcraft-button.js +2 -1
- package/dist/components/searchcraft-error-message.js +2 -1
- package/dist/components/searchcraft-facet-list.js +2 -1
- package/dist/components/searchcraft-filter-panel.js +11 -8
- package/dist/components/searchcraft-filter-panel.js.map +1 -1
- package/dist/components/searchcraft-input-form.js +2 -1
- package/dist/components/searchcraft-input-label.js +2 -1
- package/dist/components/searchcraft-loading.js +2 -1
- package/dist/components/searchcraft-pagination.js +12 -8
- package/dist/components/searchcraft-pagination.js.map +1 -1
- package/dist/components/searchcraft-popover-button.js +9 -6
- package/dist/components/searchcraft-popover-button.js.map +1 -1
- package/dist/components/searchcraft-popover-footer.js +2 -1
- package/dist/components/searchcraft-popover-form.js +17 -14
- package/dist/components/searchcraft-popover-form.js.map +1 -1
- package/dist/components/searchcraft-popover-list-item.js +2 -1
- package/dist/components/searchcraft-popover-list-view.js +2 -1
- package/dist/components/searchcraft-results-info.js +10 -7
- package/dist/components/searchcraft-results-info.js.map +1 -1
- package/dist/components/searchcraft-search-result.js +2 -1
- package/dist/components/searchcraft-search-results-per-page.js +11 -7
- package/dist/components/searchcraft-search-results-per-page.js.map +1 -1
- package/dist/components/searchcraft-search-results.js +11 -8
- package/dist/components/searchcraft-search-results.js.map +1 -1
- package/dist/components/searchcraft-select.js +2 -1
- package/dist/components/searchcraft-slider.js +2 -1
- package/dist/components/searchcraft-summary-box.js +12 -67
- package/dist/components/searchcraft-summary-box.js.map +1 -1
- package/dist/components/searchcraft-theme.js +8 -5
- package/dist/components/searchcraft-theme.js.map +1 -1
- package/dist/components/searchcraft-toggle-button.js +2 -1
- package/dist/hydrate/index.d.ts +40 -7
- package/dist/hydrate/index.js +3095 -2370
- package/dist/hydrate/index.mjs +3094 -2369
- package/dist/types/classes/SearchcraftCore.d.ts +1 -0
- package/dist/types/clients/MeasureClient.d.ts +2 -1
- package/dist/types/clients/SearchClient.d.ts +1 -1
- package/dist/types/clients/ad-clients/AdClient.d.ts +1 -1
- package/dist/types/clients/ad-clients/NativoClient.d.ts +1 -1
- package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +1 -1
- package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +1 -1
- package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts +1 -1
- package/dist/types/components/searchcraft-search-results/searchcraft-search-results.d.ts +2 -2
- package/dist/types/components.d.ts +70 -0
- package/dist/types/stencil-public-runtime.d.ts +84 -8
- package/package.json +2 -2
- package/dist/components/p-16181756.js.map +0 -1
- package/dist/components/p-3286bbb3.js.map +0 -1
- package/dist/components/p-38b2dad0.js.map +0 -1
- package/dist/components/p-3d2107af.js.map +0 -1
- package/dist/components/p-46ddde99.js.map +0 -1
- package/dist/components/p-5365011f.js.map +0 -1
- package/dist/components/p-5cdc6210.js +0 -82
- package/dist/components/p-5cdc6210.js.map +0 -1
- package/dist/components/p-73db9122.js.map +0 -1
- package/dist/components/p-76d95772.js.map +0 -1
- package/dist/components/p-87435aac.js.map +0 -1
- package/dist/components/p-90bc1590.js.map +0 -1
- package/dist/components/p-acf23bab.js.map +0 -1
- package/dist/components/p-afe7ce60.js.map +0 -1
- package/dist/components/p-b4b67072.js.map +0 -1
- package/dist/components/p-d54771ef.js.map +0 -1
- package/dist/components/p-e2a10337.js +0 -1355
- package/dist/components/p-e2a10337.js.map +0 -1
- package/dist/components/p-e30203b1.js.map +0 -1
- package/dist/components/p-e8d97093.js.map +0 -1
- package/dist/components/p-f2585cdf.js.map +0 -1
- package/dist/components/p-fa799946.js.map +0 -1
|
@@ -5,8 +5,9 @@ export declare class MeasureClient {
|
|
|
5
5
|
private config;
|
|
6
6
|
private sdkInfo;
|
|
7
7
|
private userId;
|
|
8
|
+
private userType;
|
|
8
9
|
sessionId: string;
|
|
9
|
-
constructor(config: SearchcraftConfig, sdkInfo: SearchcraftSDKInfo, userId: string);
|
|
10
|
+
constructor(config: SearchcraftConfig, sdkInfo: SearchcraftSDKInfo, userId: string, userType: 'authenticated' | 'anonymous');
|
|
10
11
|
/**
|
|
11
12
|
* Getter for the base url used by the /measure endpoints.
|
|
12
13
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SearchcraftCore } from "../classes/index";
|
|
2
|
-
import type { SearchcraftConfig, SearchcraftResponse
|
|
2
|
+
import type { SearchClientRequestProperties, SearchcraftConfig, SearchcraftResponse } from "../types/index";
|
|
3
3
|
export declare class SearchClient {
|
|
4
4
|
private config;
|
|
5
5
|
private userId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdClientResponseItem, SearchcraftConfig, SearchcraftResponse
|
|
1
|
+
import type { AdClientResponseItem, SearchClientRequestProperties, SearchcraftConfig, SearchcraftResponse } from "../../types/index";
|
|
2
2
|
export declare class AdClient {
|
|
3
3
|
config: SearchcraftConfig;
|
|
4
4
|
constructor(config: SearchcraftConfig);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdClientResponseItem, SearchcraftConfig, SearchcraftResponse
|
|
1
|
+
import type { AdClientResponseItem, SearchClientRequestProperties, SearchcraftConfig, SearchcraftResponse } from "../../types/index";
|
|
2
2
|
import { AdClient } from './AdClient';
|
|
3
3
|
export declare class NativoClient extends AdClient {
|
|
4
4
|
adCallTimeout?: NodeJS.Timeout;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SearchClientResponseItem, AdClientResponseItem, PopoverResultMappings } from "../../types/index";
|
|
2
1
|
import type { SearchcraftCore } from "../../classes/index";
|
|
2
|
+
import type { AdClientResponseItem, PopoverResultMappings, SearchClientResponseItem } from "../../types/index";
|
|
3
3
|
/**
|
|
4
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.
|
|
5
5
|
*
|
package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SearchDocument, SearchClientResponseItem, PopoverResultMappings } from "../../types/index";
|
|
2
1
|
import type { SearchcraftCore } from "../../classes/index";
|
|
2
|
+
import type { PopoverResultMappings, SearchClientResponseItem, SearchDocument } from "../../types/index";
|
|
3
3
|
/**
|
|
4
4
|
* A single list item rendered in a searchcraft-popover-list-view.
|
|
5
5
|
*
|
package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AdClientResponseItem, SearchClientResponseItem, PopoverResultMappings } from "../../types/index";
|
|
2
1
|
import type { SearchcraftCore } from "../../classes/index";
|
|
2
|
+
import type { AdClientResponseItem, PopoverResultMappings, SearchClientResponseItem } from "../../types/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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AdClientResponseItem, SearchClientResponseItem,
|
|
2
|
-
import type { SearchcraftState } from "../../store/index";
|
|
1
|
+
import type { AdClientResponseItem, SearchClientResponseItem, SearchResultTemplate, SearchResultTemplateData, SearchcraftConfig } from "../../types/index";
|
|
3
2
|
import type { SearchcraftCore } from "../../classes/index";
|
|
3
|
+
import type { SearchcraftState } from "../../store/index";
|
|
4
4
|
/**
|
|
5
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.
|
|
6
6
|
*
|
|
@@ -15,9 +15,13 @@ export namespace Components {
|
|
|
15
15
|
*/
|
|
16
16
|
interface SearchcraftAd {
|
|
17
17
|
"adClientResponseItem"?: AdClientResponseItem;
|
|
18
|
+
/**
|
|
19
|
+
* @default 'Custom'
|
|
20
|
+
*/
|
|
18
21
|
"adSource": 'Custom' | 'Nativo' | 'adMarketplace';
|
|
19
22
|
/**
|
|
20
23
|
* Where the ad is being rendered within the search results div. Lifecycle behavior differs for ads being rendered in different positions, so we need to be able to handle all of those cases.
|
|
24
|
+
* @default 'interstitial'
|
|
21
25
|
*/
|
|
22
26
|
"renderPosition": 'interstitial' | 'top' | 'bottom';
|
|
23
27
|
/**
|
|
@@ -32,10 +36,12 @@ export namespace Components {
|
|
|
32
36
|
interface SearchcraftButton {
|
|
33
37
|
/**
|
|
34
38
|
* Whether the button is disabled.
|
|
39
|
+
* @default false
|
|
35
40
|
*/
|
|
36
41
|
"disabled"?: boolean;
|
|
37
42
|
/**
|
|
38
43
|
* Controls the visual representation of the button.
|
|
44
|
+
* @default 'primary'
|
|
39
45
|
*/
|
|
40
46
|
"hierarchy"?: 'primary' | 'tertiary';
|
|
41
47
|
/**
|
|
@@ -44,18 +50,22 @@ export namespace Components {
|
|
|
44
50
|
"icon"?: Element;
|
|
45
51
|
/**
|
|
46
52
|
* Should the button only display an icon.
|
|
53
|
+
* @default false
|
|
47
54
|
*/
|
|
48
55
|
"iconOnly"?: boolean;
|
|
49
56
|
/**
|
|
50
57
|
* The position of the icon.
|
|
58
|
+
* @default 'left'
|
|
51
59
|
*/
|
|
52
60
|
"iconPosition"?: 'left' | 'right';
|
|
53
61
|
/**
|
|
54
62
|
* The label for the button.
|
|
63
|
+
* @default 'Search'
|
|
55
64
|
*/
|
|
56
65
|
"label": string;
|
|
57
66
|
/**
|
|
58
67
|
* The type of the button.
|
|
68
|
+
* @default 'button'
|
|
59
69
|
*/
|
|
60
70
|
"type"?: 'submit' | 'reset' | 'button';
|
|
61
71
|
}
|
|
@@ -91,6 +101,7 @@ export namespace Components {
|
|
|
91
101
|
"exclude"?: string[];
|
|
92
102
|
/**
|
|
93
103
|
* The name of the field where facets are applied.
|
|
104
|
+
* @default ''
|
|
94
105
|
*/
|
|
95
106
|
"fieldName": string;
|
|
96
107
|
/**
|
|
@@ -127,14 +138,17 @@ export namespace Components {
|
|
|
127
138
|
interface SearchcraftFilterPanel {
|
|
128
139
|
/**
|
|
129
140
|
* The items to filter.
|
|
141
|
+
* @default []
|
|
130
142
|
*/
|
|
131
143
|
"items": FilterItem[];
|
|
132
144
|
/**
|
|
133
145
|
* Controls whether the filter panel automatically hides/shows based on window size. - 'auto': Automatically hide/show based on window width - 'manual': User controls visibility manually
|
|
146
|
+
* @default 'auto'
|
|
134
147
|
*/
|
|
135
148
|
"responsiveBehavior"?: 'auto' | 'manual';
|
|
136
149
|
/**
|
|
137
150
|
* The breakpoint (in pixels) below which the filter panel will be hidden. Defaults to 768px (--sc-breakpoint-md).
|
|
151
|
+
* @default 768
|
|
138
152
|
*/
|
|
139
153
|
"responsiveBreakpoint"?: number;
|
|
140
154
|
/**
|
|
@@ -164,6 +178,7 @@ export namespace Components {
|
|
|
164
178
|
interface SearchcraftInputForm {
|
|
165
179
|
/**
|
|
166
180
|
* Whether or not to automatically submit the search term when the input changes.
|
|
181
|
+
* @default true
|
|
167
182
|
*/
|
|
168
183
|
"autoSearch"?: boolean;
|
|
169
184
|
/**
|
|
@@ -172,6 +187,7 @@ export namespace Components {
|
|
|
172
187
|
"buttonLabel"?: string;
|
|
173
188
|
/**
|
|
174
189
|
* Where to place the search button.
|
|
190
|
+
* @default 'none'
|
|
175
191
|
*/
|
|
176
192
|
"buttonPlacement"?: 'left' | 'right' | 'none';
|
|
177
193
|
/**
|
|
@@ -184,6 +200,7 @@ export namespace Components {
|
|
|
184
200
|
"placeholderBehavior"?: 'hide-on-focus' | 'hide-on-text-entered';
|
|
185
201
|
/**
|
|
186
202
|
* The input element's placeholder value.
|
|
203
|
+
* @default 'Enter Search'
|
|
187
204
|
*/
|
|
188
205
|
"placeholderValue"?: string;
|
|
189
206
|
/**
|
|
@@ -204,8 +221,12 @@ export namespace Components {
|
|
|
204
221
|
interface SearchcraftInputLabel {
|
|
205
222
|
/**
|
|
206
223
|
* The classname applied to the label element.
|
|
224
|
+
* @default ''
|
|
207
225
|
*/
|
|
208
226
|
"inputLabelClassName"?: string | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* @default ''
|
|
229
|
+
*/
|
|
209
230
|
"label": string;
|
|
210
231
|
}
|
|
211
232
|
/**
|
|
@@ -328,10 +349,12 @@ export namespace Components {
|
|
|
328
349
|
interface SearchcraftPopoverForm {
|
|
329
350
|
/**
|
|
330
351
|
* The hotkey that activates the popover.
|
|
352
|
+
* @default 'k'
|
|
331
353
|
*/
|
|
332
354
|
"hotkey"?: string;
|
|
333
355
|
/**
|
|
334
356
|
* The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
|
|
357
|
+
* @default 'meta'
|
|
335
358
|
*/
|
|
336
359
|
"hotkeyModifier"?: 'ctrl' | 'meta' | 'alt' | 'option';
|
|
337
360
|
/**
|
|
@@ -340,6 +363,7 @@ export namespace Components {
|
|
|
340
363
|
"placeholderBehavior"?: 'hide-on-focus' | 'hide-on-text-entered';
|
|
341
364
|
/**
|
|
342
365
|
* The input element's placeholder value.
|
|
366
|
+
* @default 'Enter Search'
|
|
343
367
|
*/
|
|
344
368
|
"placeholderValue"?: string;
|
|
345
369
|
/**
|
|
@@ -352,6 +376,7 @@ export namespace Components {
|
|
|
352
376
|
"searchcraftId"?: string;
|
|
353
377
|
/**
|
|
354
378
|
* The type of popover form to render. - `inline` - Renders inline with the rest of the content on the page. The search results pop over the page content. - `fullscreen` - Renders in fullscreen view. Used together with the `searchcraft-popover-button` component. - `modal` - Renders in a modal view. Used together with the `searchcraft-popover-button` component.
|
|
379
|
+
* @default 'inline'
|
|
355
380
|
*/
|
|
356
381
|
"type"?: 'inline' | 'fullscreen' | 'modal';
|
|
357
382
|
}
|
|
@@ -361,6 +386,7 @@ export namespace Components {
|
|
|
361
386
|
interface SearchcraftPopoverListItem {
|
|
362
387
|
/**
|
|
363
388
|
* The document position relative to the search results (For Measure)
|
|
389
|
+
* @default 0
|
|
364
390
|
*/
|
|
365
391
|
"documentPosition": number;
|
|
366
392
|
"item": SearchClientResponseItem | undefined;
|
|
@@ -444,6 +470,7 @@ export namespace Components {
|
|
|
444
470
|
interface SearchcraftSearchResult {
|
|
445
471
|
/**
|
|
446
472
|
* The position in the document. Used with the "document_clicked" measure event.
|
|
473
|
+
* @default 0
|
|
447
474
|
*/
|
|
448
475
|
"documentPosition": number;
|
|
449
476
|
/**
|
|
@@ -537,6 +564,7 @@ export namespace Components {
|
|
|
537
564
|
interface SearchcraftSearchResultsPerPage {
|
|
538
565
|
/**
|
|
539
566
|
* The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]). The base value is defined by the `searchResultsPerPage` option in the configuration.
|
|
567
|
+
* @default 20
|
|
540
568
|
*/
|
|
541
569
|
"increment": string | number;
|
|
542
570
|
/**
|
|
@@ -562,6 +590,7 @@ export namespace Components {
|
|
|
562
590
|
"caption"?: string;
|
|
563
591
|
/**
|
|
564
592
|
* Whether the select input is disabled.
|
|
593
|
+
* @default false
|
|
565
594
|
*/
|
|
566
595
|
"disabled"?: boolean;
|
|
567
596
|
/**
|
|
@@ -582,6 +611,7 @@ export namespace Components {
|
|
|
582
611
|
"name": string;
|
|
583
612
|
/**
|
|
584
613
|
* The options for the select input.
|
|
614
|
+
* @default []
|
|
585
615
|
*/
|
|
586
616
|
"options": SearchcraftSelectOption[] | string;
|
|
587
617
|
}
|
|
@@ -591,6 +621,7 @@ export namespace Components {
|
|
|
591
621
|
interface SearchcraftSlider {
|
|
592
622
|
/**
|
|
593
623
|
* The type of data the sliders are using.
|
|
624
|
+
* @default 'number'
|
|
594
625
|
*/
|
|
595
626
|
"dataType": 'number' | 'date';
|
|
596
627
|
/**
|
|
@@ -599,14 +630,17 @@ export namespace Components {
|
|
|
599
630
|
"dateGranularity"?: 'year' | 'month' | 'day' | 'hour';
|
|
600
631
|
/**
|
|
601
632
|
* The maximum value allowed.
|
|
633
|
+
* @default 100
|
|
602
634
|
*/
|
|
603
635
|
"max": number;
|
|
604
636
|
/**
|
|
605
637
|
* The minimum value allowed.
|
|
638
|
+
* @default 0
|
|
606
639
|
*/
|
|
607
640
|
"min": number;
|
|
608
641
|
/**
|
|
609
642
|
* The step amount for the slider inputs.
|
|
643
|
+
* @default 1
|
|
610
644
|
*/
|
|
611
645
|
"step": number;
|
|
612
646
|
}
|
|
@@ -663,6 +697,7 @@ export namespace Components {
|
|
|
663
697
|
interface SearchcraftToggleButton {
|
|
664
698
|
/**
|
|
665
699
|
* The label.
|
|
700
|
+
* @default 'Toggle'
|
|
666
701
|
*/
|
|
667
702
|
"label": string;
|
|
668
703
|
/**
|
|
@@ -1270,9 +1305,13 @@ declare namespace LocalJSX {
|
|
|
1270
1305
|
*/
|
|
1271
1306
|
interface SearchcraftAd {
|
|
1272
1307
|
"adClientResponseItem"?: AdClientResponseItem;
|
|
1308
|
+
/**
|
|
1309
|
+
* @default 'Custom'
|
|
1310
|
+
*/
|
|
1273
1311
|
"adSource"?: 'Custom' | 'Nativo' | 'adMarketplace';
|
|
1274
1312
|
/**
|
|
1275
1313
|
* Where the ad is being rendered within the search results div. Lifecycle behavior differs for ads being rendered in different positions, so we need to be able to handle all of those cases.
|
|
1314
|
+
* @default 'interstitial'
|
|
1276
1315
|
*/
|
|
1277
1316
|
"renderPosition"?: 'interstitial' | 'top' | 'bottom';
|
|
1278
1317
|
/**
|
|
@@ -1287,10 +1326,12 @@ declare namespace LocalJSX {
|
|
|
1287
1326
|
interface SearchcraftButton {
|
|
1288
1327
|
/**
|
|
1289
1328
|
* Whether the button is disabled.
|
|
1329
|
+
* @default false
|
|
1290
1330
|
*/
|
|
1291
1331
|
"disabled"?: boolean;
|
|
1292
1332
|
/**
|
|
1293
1333
|
* Controls the visual representation of the button.
|
|
1334
|
+
* @default 'primary'
|
|
1294
1335
|
*/
|
|
1295
1336
|
"hierarchy"?: 'primary' | 'tertiary';
|
|
1296
1337
|
/**
|
|
@@ -1299,14 +1340,17 @@ declare namespace LocalJSX {
|
|
|
1299
1340
|
"icon"?: Element;
|
|
1300
1341
|
/**
|
|
1301
1342
|
* Should the button only display an icon.
|
|
1343
|
+
* @default false
|
|
1302
1344
|
*/
|
|
1303
1345
|
"iconOnly"?: boolean;
|
|
1304
1346
|
/**
|
|
1305
1347
|
* The position of the icon.
|
|
1348
|
+
* @default 'left'
|
|
1306
1349
|
*/
|
|
1307
1350
|
"iconPosition"?: 'left' | 'right';
|
|
1308
1351
|
/**
|
|
1309
1352
|
* The label for the button.
|
|
1353
|
+
* @default 'Search'
|
|
1310
1354
|
*/
|
|
1311
1355
|
"label"?: string;
|
|
1312
1356
|
/**
|
|
@@ -1315,6 +1359,7 @@ declare namespace LocalJSX {
|
|
|
1315
1359
|
"onButtonClick"?: (event: SearchcraftButtonCustomEvent<void>) => void;
|
|
1316
1360
|
/**
|
|
1317
1361
|
* The type of the button.
|
|
1362
|
+
* @default 'button'
|
|
1318
1363
|
*/
|
|
1319
1364
|
"type"?: 'submit' | 'reset' | 'button';
|
|
1320
1365
|
}
|
|
@@ -1350,6 +1395,7 @@ declare namespace LocalJSX {
|
|
|
1350
1395
|
"exclude"?: string[];
|
|
1351
1396
|
/**
|
|
1352
1397
|
* The name of the field where facets are applied.
|
|
1398
|
+
* @default ''
|
|
1353
1399
|
*/
|
|
1354
1400
|
"fieldName"?: string;
|
|
1355
1401
|
/**
|
|
@@ -1390,14 +1436,17 @@ declare namespace LocalJSX {
|
|
|
1390
1436
|
interface SearchcraftFilterPanel {
|
|
1391
1437
|
/**
|
|
1392
1438
|
* The items to filter.
|
|
1439
|
+
* @default []
|
|
1393
1440
|
*/
|
|
1394
1441
|
"items"?: FilterItem[];
|
|
1395
1442
|
/**
|
|
1396
1443
|
* Controls whether the filter panel automatically hides/shows based on window size. - 'auto': Automatically hide/show based on window width - 'manual': User controls visibility manually
|
|
1444
|
+
* @default 'auto'
|
|
1397
1445
|
*/
|
|
1398
1446
|
"responsiveBehavior"?: 'auto' | 'manual';
|
|
1399
1447
|
/**
|
|
1400
1448
|
* The breakpoint (in pixels) below which the filter panel will be hidden. Defaults to 768px (--sc-breakpoint-md).
|
|
1449
|
+
* @default 768
|
|
1401
1450
|
*/
|
|
1402
1451
|
"responsiveBreakpoint"?: number;
|
|
1403
1452
|
/**
|
|
@@ -1427,6 +1476,7 @@ declare namespace LocalJSX {
|
|
|
1427
1476
|
interface SearchcraftInputForm {
|
|
1428
1477
|
/**
|
|
1429
1478
|
* Whether or not to automatically submit the search term when the input changes.
|
|
1479
|
+
* @default true
|
|
1430
1480
|
*/
|
|
1431
1481
|
"autoSearch"?: boolean;
|
|
1432
1482
|
/**
|
|
@@ -1435,6 +1485,7 @@ declare namespace LocalJSX {
|
|
|
1435
1485
|
"buttonLabel"?: string;
|
|
1436
1486
|
/**
|
|
1437
1487
|
* Where to place the search button.
|
|
1488
|
+
* @default 'none'
|
|
1438
1489
|
*/
|
|
1439
1490
|
"buttonPlacement"?: 'left' | 'right' | 'none';
|
|
1440
1491
|
/**
|
|
@@ -1459,6 +1510,7 @@ declare namespace LocalJSX {
|
|
|
1459
1510
|
"placeholderBehavior"?: 'hide-on-focus' | 'hide-on-text-entered';
|
|
1460
1511
|
/**
|
|
1461
1512
|
* The input element's placeholder value.
|
|
1513
|
+
* @default 'Enter Search'
|
|
1462
1514
|
*/
|
|
1463
1515
|
"placeholderValue"?: string;
|
|
1464
1516
|
/**
|
|
@@ -1479,8 +1531,12 @@ declare namespace LocalJSX {
|
|
|
1479
1531
|
interface SearchcraftInputLabel {
|
|
1480
1532
|
/**
|
|
1481
1533
|
* The classname applied to the label element.
|
|
1534
|
+
* @default ''
|
|
1482
1535
|
*/
|
|
1483
1536
|
"inputLabelClassName"?: string | undefined;
|
|
1537
|
+
/**
|
|
1538
|
+
* @default ''
|
|
1539
|
+
*/
|
|
1484
1540
|
"label"?: string;
|
|
1485
1541
|
}
|
|
1486
1542
|
/**
|
|
@@ -1603,10 +1659,12 @@ declare namespace LocalJSX {
|
|
|
1603
1659
|
interface SearchcraftPopoverForm {
|
|
1604
1660
|
/**
|
|
1605
1661
|
* The hotkey that activates the popover.
|
|
1662
|
+
* @default 'k'
|
|
1606
1663
|
*/
|
|
1607
1664
|
"hotkey"?: string;
|
|
1608
1665
|
/**
|
|
1609
1666
|
* The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
|
|
1667
|
+
* @default 'meta'
|
|
1610
1668
|
*/
|
|
1611
1669
|
"hotkeyModifier"?: 'ctrl' | 'meta' | 'alt' | 'option';
|
|
1612
1670
|
/**
|
|
@@ -1615,6 +1673,7 @@ declare namespace LocalJSX {
|
|
|
1615
1673
|
"placeholderBehavior"?: 'hide-on-focus' | 'hide-on-text-entered';
|
|
1616
1674
|
/**
|
|
1617
1675
|
* The input element's placeholder value.
|
|
1676
|
+
* @default 'Enter Search'
|
|
1618
1677
|
*/
|
|
1619
1678
|
"placeholderValue"?: string;
|
|
1620
1679
|
/**
|
|
@@ -1627,6 +1686,7 @@ declare namespace LocalJSX {
|
|
|
1627
1686
|
"searchcraftId"?: string;
|
|
1628
1687
|
/**
|
|
1629
1688
|
* The type of popover form to render. - `inline` - Renders inline with the rest of the content on the page. The search results pop over the page content. - `fullscreen` - Renders in fullscreen view. Used together with the `searchcraft-popover-button` component. - `modal` - Renders in a modal view. Used together with the `searchcraft-popover-button` component.
|
|
1689
|
+
* @default 'inline'
|
|
1630
1690
|
*/
|
|
1631
1691
|
"type"?: 'inline' | 'fullscreen' | 'modal';
|
|
1632
1692
|
}
|
|
@@ -1636,6 +1696,7 @@ declare namespace LocalJSX {
|
|
|
1636
1696
|
interface SearchcraftPopoverListItem {
|
|
1637
1697
|
/**
|
|
1638
1698
|
* The document position relative to the search results (For Measure)
|
|
1699
|
+
* @default 0
|
|
1639
1700
|
*/
|
|
1640
1701
|
"documentPosition"?: number;
|
|
1641
1702
|
"item"?: SearchClientResponseItem | undefined;
|
|
@@ -1719,6 +1780,7 @@ declare namespace LocalJSX {
|
|
|
1719
1780
|
interface SearchcraftSearchResult {
|
|
1720
1781
|
/**
|
|
1721
1782
|
* The position in the document. Used with the "document_clicked" measure event.
|
|
1783
|
+
* @default 0
|
|
1722
1784
|
*/
|
|
1723
1785
|
"documentPosition"?: number;
|
|
1724
1786
|
/**
|
|
@@ -1812,6 +1874,7 @@ declare namespace LocalJSX {
|
|
|
1812
1874
|
interface SearchcraftSearchResultsPerPage {
|
|
1813
1875
|
/**
|
|
1814
1876
|
* The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]). The base value is defined by the `searchResultsPerPage` option in the configuration.
|
|
1877
|
+
* @default 20
|
|
1815
1878
|
*/
|
|
1816
1879
|
"increment"?: string | number;
|
|
1817
1880
|
/**
|
|
@@ -1837,6 +1900,7 @@ declare namespace LocalJSX {
|
|
|
1837
1900
|
"caption"?: string;
|
|
1838
1901
|
/**
|
|
1839
1902
|
* Whether the select input is disabled.
|
|
1903
|
+
* @default false
|
|
1840
1904
|
*/
|
|
1841
1905
|
"disabled"?: boolean;
|
|
1842
1906
|
/**
|
|
@@ -1861,6 +1925,7 @@ declare namespace LocalJSX {
|
|
|
1861
1925
|
"onSelectChange"?: (event: SearchcraftSelectCustomEvent<string>) => void;
|
|
1862
1926
|
/**
|
|
1863
1927
|
* The options for the select input.
|
|
1928
|
+
* @default []
|
|
1864
1929
|
*/
|
|
1865
1930
|
"options"?: SearchcraftSelectOption[] | string;
|
|
1866
1931
|
}
|
|
@@ -1870,6 +1935,7 @@ declare namespace LocalJSX {
|
|
|
1870
1935
|
interface SearchcraftSlider {
|
|
1871
1936
|
/**
|
|
1872
1937
|
* The type of data the sliders are using.
|
|
1938
|
+
* @default 'number'
|
|
1873
1939
|
*/
|
|
1874
1940
|
"dataType"?: 'number' | 'date';
|
|
1875
1941
|
/**
|
|
@@ -1878,10 +1944,12 @@ declare namespace LocalJSX {
|
|
|
1878
1944
|
"dateGranularity"?: 'year' | 'month' | 'day' | 'hour';
|
|
1879
1945
|
/**
|
|
1880
1946
|
* The maximum value allowed.
|
|
1947
|
+
* @default 100
|
|
1881
1948
|
*/
|
|
1882
1949
|
"max"?: number;
|
|
1883
1950
|
/**
|
|
1884
1951
|
* The minimum value allowed.
|
|
1952
|
+
* @default 0
|
|
1885
1953
|
*/
|
|
1886
1954
|
"min"?: number;
|
|
1887
1955
|
/**
|
|
@@ -1890,6 +1958,7 @@ declare namespace LocalJSX {
|
|
|
1890
1958
|
"onRangeChanged"?: (event: SearchcraftSliderCustomEvent<any>) => void;
|
|
1891
1959
|
/**
|
|
1892
1960
|
* The step amount for the slider inputs.
|
|
1961
|
+
* @default 1
|
|
1893
1962
|
*/
|
|
1894
1963
|
"step"?: number;
|
|
1895
1964
|
}
|
|
@@ -1946,6 +2015,7 @@ declare namespace LocalJSX {
|
|
|
1946
2015
|
interface SearchcraftToggleButton {
|
|
1947
2016
|
/**
|
|
1948
2017
|
* The label.
|
|
2018
|
+
* @default 'Toggle'
|
|
1949
2019
|
*/
|
|
1950
2020
|
"label"?: string;
|
|
1951
2021
|
/**
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type CustomMethodDecorator<T> = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
|
2
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
3
|
+
type MixinInstance<F> = F extends (base: MixedInCtor) => MixedInCtor<infer I> ? I : never;
|
|
2
4
|
export interface ComponentDecorator {
|
|
3
5
|
(opts?: ComponentOptions): ClassDecorator;
|
|
4
6
|
}
|
|
@@ -151,7 +153,13 @@ export interface StateDecorator {
|
|
|
151
153
|
(): PropertyDecorator;
|
|
152
154
|
}
|
|
153
155
|
export interface WatchDecorator {
|
|
154
|
-
(propName:
|
|
156
|
+
(propName: any): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
|
|
157
|
+
}
|
|
158
|
+
export interface PropSerializeDecorator {
|
|
159
|
+
(propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
|
|
160
|
+
}
|
|
161
|
+
export interface AttrDeserializeDecorator {
|
|
162
|
+
(propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => any>;
|
|
155
163
|
}
|
|
156
164
|
export interface UserBuildConditionals {
|
|
157
165
|
isDev: boolean;
|
|
@@ -233,6 +241,14 @@ export declare const State: StateDecorator;
|
|
|
233
241
|
* https://stenciljs.com/docs/reactive-data#watch-decorator
|
|
234
242
|
*/
|
|
235
243
|
export declare const Watch: WatchDecorator;
|
|
244
|
+
/**
|
|
245
|
+
* Decorator to serialize a property to an attribute string.
|
|
246
|
+
*/
|
|
247
|
+
export declare const PropSerialize: PropSerializeDecorator;
|
|
248
|
+
/**
|
|
249
|
+
* Decorator to deserialize an attribute string to a property.
|
|
250
|
+
*/
|
|
251
|
+
export declare const AttrDeserialize: AttrDeserializeDecorator;
|
|
236
252
|
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
237
253
|
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
238
254
|
/**
|
|
@@ -260,6 +276,25 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
260
276
|
* @returns the base path
|
|
261
277
|
*/
|
|
262
278
|
export declare function getAssetPath(path: string): string;
|
|
279
|
+
/**
|
|
280
|
+
* Method to render a virtual DOM tree to a container element.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* ```tsx
|
|
284
|
+
* import { render } from '@stencil/core';
|
|
285
|
+
*
|
|
286
|
+
* const vnode = (
|
|
287
|
+
* <div>
|
|
288
|
+
* <h1>Hello, world!</h1>
|
|
289
|
+
* </div>
|
|
290
|
+
* );
|
|
291
|
+
* render(vnode, document.body);
|
|
292
|
+
* ```
|
|
293
|
+
*
|
|
294
|
+
* @param vnode - The virtual DOM tree to render
|
|
295
|
+
* @param container - The container element to render the virtual DOM tree to
|
|
296
|
+
*/
|
|
297
|
+
export declare function render(vnode: VNode, container: Element): void;
|
|
263
298
|
/**
|
|
264
299
|
* Used to manually set the base path where assets can be found. For lazy-loaded
|
|
265
300
|
* builds the asset path is automatically set and assets copied to the correct
|
|
@@ -330,6 +365,37 @@ export declare function readTask(task: RafCallback): void;
|
|
|
330
365
|
* Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
|
|
331
366
|
*/
|
|
332
367
|
export declare const setErrorHandler: (handler: ErrorHandler) => void;
|
|
368
|
+
/**
|
|
369
|
+
* @deprecated - Use `MixedInCtor` instead:
|
|
370
|
+
* ```ts
|
|
371
|
+
* import { MixedInCtor } from '@stencil/core';
|
|
372
|
+
*
|
|
373
|
+
* const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
374
|
+
* ```
|
|
375
|
+
*/
|
|
376
|
+
export type MixinFactory = (base: MixedInCtor) => MixedInCtor;
|
|
377
|
+
export type MixedInCtor<T = {}> = new (...args: any[]) => T;
|
|
378
|
+
/**
|
|
379
|
+
* Compose multiple mixin classes into a single constructor.
|
|
380
|
+
* The resulting class has the combined instance types of all mixed-in classes.
|
|
381
|
+
*
|
|
382
|
+
* Example:
|
|
383
|
+
* ```ts
|
|
384
|
+
* import { Mixin, MixedInCtor } from '@stencil/core';
|
|
385
|
+
*
|
|
386
|
+
* const AWrap = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
387
|
+
* const BWrap = <B extends MixedInCtor>(Base: B) => {class B extends Base { propB = B }; return B;}
|
|
388
|
+
* const CWrap = <B extends MixedInCtor>(Base: B) => {class C extends Base { propC = C }; return C;}
|
|
389
|
+
*
|
|
390
|
+
* class X extends Mixin(AWrap, BWrap, CWrap) {
|
|
391
|
+
* render() { return <div>{this.propA} {this.propB} {this.propC}</div>; }
|
|
392
|
+
* }
|
|
393
|
+
* ```
|
|
394
|
+
*
|
|
395
|
+
* @param mixinFactories mixin factory functions that return a class which extends from the provided class.
|
|
396
|
+
* @returns a class that is composed from extending each of the provided classes in the order they were provided.
|
|
397
|
+
*/
|
|
398
|
+
export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
|
|
333
399
|
/**
|
|
334
400
|
* This file gets copied to all distributions of stencil component collections.
|
|
335
401
|
* - no imports
|
|
@@ -826,7 +892,8 @@ export declare namespace JSXBase {
|
|
|
826
892
|
}
|
|
827
893
|
interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
828
894
|
open?: boolean;
|
|
829
|
-
|
|
895
|
+
name?: string;
|
|
896
|
+
onToggle?: (event: ToggleEvent) => void;
|
|
830
897
|
}
|
|
831
898
|
interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
832
899
|
cite?: string;
|
|
@@ -1532,6 +1599,13 @@ export declare namespace JSXBase {
|
|
|
1532
1599
|
z?: number | string;
|
|
1533
1600
|
zoomAndPan?: string;
|
|
1534
1601
|
}
|
|
1602
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1603
|
+
interface ToggleEvent extends Event {
|
|
1604
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
|
1605
|
+
readonly newState: string;
|
|
1606
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
|
|
1607
|
+
readonly oldState: string;
|
|
1608
|
+
}
|
|
1535
1609
|
interface DOMAttributes<T> extends JSXAttributes<T> {
|
|
1536
1610
|
slot?: string;
|
|
1537
1611
|
part?: string;
|
|
@@ -1548,6 +1622,10 @@ export declare namespace JSXBase {
|
|
|
1548
1622
|
onCompositionstartCapture?: (event: CompositionEvent) => void;
|
|
1549
1623
|
onCompositionupdate?: (event: CompositionEvent) => void;
|
|
1550
1624
|
onCompositionupdateCapture?: (event: CompositionEvent) => void;
|
|
1625
|
+
onBeforeToggle?: (event: ToggleEvent) => void;
|
|
1626
|
+
onBeforeToggleCapture?: (event: ToggleEvent) => void;
|
|
1627
|
+
onToggle?: (event: ToggleEvent) => void;
|
|
1628
|
+
onToggleCapture?: (event: ToggleEvent) => void;
|
|
1551
1629
|
onFocus?: (event: FocusEvent) => void;
|
|
1552
1630
|
onFocusCapture?: (event: FocusEvent) => void;
|
|
1553
1631
|
onFocusin?: (event: FocusEvent) => void;
|
|
@@ -1566,10 +1644,6 @@ export declare namespace JSXBase {
|
|
|
1566
1644
|
onSubmitCapture?: (event: Event) => void;
|
|
1567
1645
|
onInvalid?: (event: Event) => void;
|
|
1568
1646
|
onInvalidCapture?: (event: Event) => void;
|
|
1569
|
-
onBeforeToggle?: (event: Event) => void;
|
|
1570
|
-
onBeforeToggleCapture?: (event: Event) => void;
|
|
1571
|
-
onToggle?: (event: Event) => void;
|
|
1572
|
-
onToggleCapture?: (event: Event) => void;
|
|
1573
1647
|
onLoad?: (event: Event) => void;
|
|
1574
1648
|
onLoadCapture?: (event: Event) => void;
|
|
1575
1649
|
onError?: (event: Event) => void;
|
|
@@ -1581,7 +1655,7 @@ export declare namespace JSXBase {
|
|
|
1581
1655
|
onKeyUp?: (event: KeyboardEvent) => void;
|
|
1582
1656
|
onKeyUpCapture?: (event: KeyboardEvent) => void;
|
|
1583
1657
|
onAuxClick?: (event: MouseEvent) => void;
|
|
1584
|
-
onClick?: (event:
|
|
1658
|
+
onClick?: (event: PointerEvent) => void;
|
|
1585
1659
|
onClickCapture?: (event: MouseEvent) => void;
|
|
1586
1660
|
onContextMenu?: (event: MouseEvent) => void;
|
|
1587
1661
|
onContextMenuCapture?: (event: MouseEvent) => void;
|
|
@@ -1661,6 +1735,8 @@ export declare namespace JSXBase {
|
|
|
1661
1735
|
onTransitionRunCapture?: (event: TransitionEvent) => void;
|
|
1662
1736
|
onTransitionStart?: (event: TransitionEvent) => void;
|
|
1663
1737
|
onTransitionStartCapture?: (event: TransitionEvent) => void;
|
|
1738
|
+
[key: `aria-${string}`]: string | boolean | undefined;
|
|
1739
|
+
[key: `aria${string}`]: string | boolean | undefined;
|
|
1664
1740
|
}
|
|
1665
1741
|
}
|
|
1666
1742
|
export interface JSXAttributes<T = Element> {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@searchcraft/javascript-sdk",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"description": "Searchcraft Javascript SDK",
|
|
6
6
|
"author": "Searchcraft Inc.",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"nanoid": "^5.0.9",
|
|
56
56
|
"zustand": "^5.0.1"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "9c32e0fbced9754db2337c5e4c5e7c8bb7baa484"
|
|
59
59
|
}
|