@searchcraft/javascript-sdk 0.1.3 → 0.1.5
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/searchcraft-javascript-sdk/{index-be6bffea.js → index-2e19f875.js} +2 -2
- package/dist/searchcraft-javascript-sdk/{index-be6bffea.js.map → index-2e19f875.js.map} +1 -1
- package/dist/searchcraft-javascript-sdk/index.esm.js +2 -2
- package/dist/searchcraft-javascript-sdk/index.esm.js.map +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-auto-search-form.entry.js +14 -6
- package/dist/searchcraft-javascript-sdk/searchcraft-auto-search-form.entry.js.map +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-base-search-form.entry.js +2 -2
- package/dist/searchcraft-javascript-sdk/searchcraft-base-search-result.entry.js +4 -5
- package/dist/searchcraft-javascript-sdk/searchcraft-base-search-result.entry.js.map +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-base-search-results.entry.js +28 -9
- package/dist/searchcraft-javascript-sdk/searchcraft-base-search-results.entry.js.map +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-button-icon.entry.js +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-button.entry.js +2 -2
- package/dist/searchcraft-javascript-sdk/searchcraft-clear-icon-set.entry.js +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-clear-input-button.entry.js +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-error-message.entry.js +2 -2
- package/dist/searchcraft-javascript-sdk/searchcraft-input-caption.entry.js +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-input-icon.entry.js +4 -2
- package/dist/searchcraft-javascript-sdk/searchcraft-input-icon.entry.js.map +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-input-label.entry.js +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-input.entry.js +7 -4
- package/dist/searchcraft-javascript-sdk/searchcraft-input.entry.js.map +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +3 -3
- package/dist/searchcraft-javascript-sdk/searchcraft-search-icon-set.entry.js +8 -5
- package/dist/searchcraft-javascript-sdk/searchcraft-search-icon-set.entry.js.map +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-spinner-dark.entry.js +2 -2
- package/dist/searchcraft-javascript-sdk/searchcraft-spinner-light.entry.js +2 -2
- package/dist/searchcraft-javascript-sdk/{store-b50263a1.js → store-7a83a5d7.js} +2 -2
- package/dist/searchcraft-javascript-sdk/{store-b50263a1.js.map → store-7a83a5d7.js.map} +1 -1
- package/dist/types/assets/searchcraft-search-icon-set.d.ts +3 -1
- package/dist/types/components/searchcraft-auto-search-form/searchcraft-auto-search-form.d.ts +5 -0
- package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +9 -0
- package/dist/types/components/searchcraft-input/searchcraft-input.d.ts +3 -0
- package/dist/types/components/searchcraft-input-icon/searchcraft-input-icon.d.ts +8 -0
- package/dist/types/components.d.ts +48 -2
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare class SearchcraftSearchIconSet {
|
|
2
2
|
/**
|
|
3
3
|
* Type of the icon to display.
|
|
4
|
-
* Options: '
|
|
4
|
+
* Options: 'search-light', 'search-dark', 'error-light', 'error-dark'
|
|
5
5
|
*/
|
|
6
6
|
type: 'search-light' | 'search-dark' | 'error-light' | 'error-dark';
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
7
9
|
render(): any;
|
|
8
10
|
}
|
package/dist/types/components/searchcraft-auto-search-form/searchcraft-auto-search-form.d.ts
CHANGED
|
@@ -7,18 +7,23 @@ export declare class SearchcraftAutoSearchForm {
|
|
|
7
7
|
config: CoreConfigSDK;
|
|
8
8
|
customStylesForInput: string | Record<string, string>;
|
|
9
9
|
inputCaptionValue: string;
|
|
10
|
+
inputIconHeight: number;
|
|
11
|
+
inputIconWidth: number;
|
|
10
12
|
labelForInput: string;
|
|
11
13
|
placeholderValue: string;
|
|
12
14
|
rightToLeftOrientation: boolean;
|
|
13
15
|
searchContainerClass: string;
|
|
14
16
|
querySubmit: EventEmitter<string>;
|
|
15
17
|
error: boolean;
|
|
18
|
+
isRequesting: boolean;
|
|
16
19
|
query: string;
|
|
17
20
|
searchResults: string;
|
|
18
21
|
private debounceTimeout;
|
|
19
22
|
private debounceDelay;
|
|
20
23
|
private searchStore;
|
|
24
|
+
unsubscribe: () => void;
|
|
21
25
|
componentDidLoad(): void;
|
|
26
|
+
disconnectedCallback(): void;
|
|
22
27
|
handleInputChange: (event: ScInputCustomEvent<string>) => void;
|
|
23
28
|
handleClearInput: () => void;
|
|
24
29
|
private runSearch;
|
package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts
CHANGED
|
@@ -12,6 +12,15 @@ export declare class SearchcraftBaseSearchResults {
|
|
|
12
12
|
* Expected format: JSON string, e.g., '{"borderRadius": "10px", "padding": "16px"}'
|
|
13
13
|
*/
|
|
14
14
|
customStylesForResults: string | Record<string, Record<string, string>>;
|
|
15
|
+
/**
|
|
16
|
+
* Place ad at the end of the results.
|
|
17
|
+
*/
|
|
18
|
+
placeAdAtEnd: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Place ad every N results (e.g., every 4 results).
|
|
21
|
+
* Default value: 4
|
|
22
|
+
*/
|
|
23
|
+
adInterval: number;
|
|
15
24
|
private unsubscribe;
|
|
16
25
|
componentDidLoad(): void;
|
|
17
26
|
disconnectedCallback(): void;
|
|
@@ -10,6 +10,9 @@ export declare class SearchcraftInput {
|
|
|
10
10
|
inputCaptionClassName: string;
|
|
11
11
|
inputCaptionValue: string;
|
|
12
12
|
inputClassName: string;
|
|
13
|
+
inputIconHeight: number;
|
|
14
|
+
inputIconWidth: number;
|
|
15
|
+
isRequesting: boolean;
|
|
13
16
|
placeholderValue: string;
|
|
14
17
|
rightToLeftOrientation: boolean;
|
|
15
18
|
query: string;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export declare class SearchcraftInputIcon {
|
|
2
|
+
/**
|
|
3
|
+
* Determines if an error icon should be displayed.
|
|
4
|
+
*/
|
|
2
5
|
error?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Determines if the layout should be right-to-left.
|
|
8
|
+
*/
|
|
3
9
|
rightToLeftOrientation: boolean;
|
|
10
|
+
height: number;
|
|
11
|
+
width: number;
|
|
4
12
|
theme: string;
|
|
5
13
|
private isLightTheme;
|
|
6
14
|
render(): any;
|
|
@@ -14,6 +14,8 @@ export namespace Components {
|
|
|
14
14
|
"config": CoreConfigSDK;
|
|
15
15
|
"customStylesForInput": string | Record<string, string>;
|
|
16
16
|
"inputCaptionValue": string;
|
|
17
|
+
"inputIconHeight": number;
|
|
18
|
+
"inputIconWidth": number;
|
|
17
19
|
"labelForInput": string;
|
|
18
20
|
"placeholderValue": string;
|
|
19
21
|
"rightToLeftOrientation": boolean;
|
|
@@ -39,11 +41,19 @@ export namespace Components {
|
|
|
39
41
|
"themeMode": 'light' | 'dark';
|
|
40
42
|
}
|
|
41
43
|
interface SearchcraftBaseSearchResults {
|
|
44
|
+
/**
|
|
45
|
+
* Place ad every N results (e.g., every 4 results). Default value: 4
|
|
46
|
+
*/
|
|
47
|
+
"adInterval": number;
|
|
42
48
|
/**
|
|
43
49
|
* Custom styles to apply to search results. Expected format: JSON string, e.g., '{"borderRadius": "10px", "padding": "16px"}'
|
|
44
50
|
*/
|
|
45
51
|
"customStylesForResults": | string
|
|
46
52
|
| Record<string, Record<string, string>>;
|
|
53
|
+
/**
|
|
54
|
+
* Place ad at the end of the results.
|
|
55
|
+
*/
|
|
56
|
+
"placeAdAtEnd": boolean;
|
|
47
57
|
/**
|
|
48
58
|
* Array of keys to dynamically extract properties from each document. Must be explicitly set by the parent component.
|
|
49
59
|
*/
|
|
@@ -84,6 +94,9 @@ export namespace Components {
|
|
|
84
94
|
"inputCaptionClassName": string;
|
|
85
95
|
"inputCaptionValue": string;
|
|
86
96
|
"inputClassName": string;
|
|
97
|
+
"inputIconHeight": number;
|
|
98
|
+
"inputIconWidth": number;
|
|
99
|
+
"isRequesting": boolean;
|
|
87
100
|
"placeholderValue": string;
|
|
88
101
|
"query": string;
|
|
89
102
|
"rightToLeftOrientation": boolean;
|
|
@@ -95,18 +108,28 @@ export namespace Components {
|
|
|
95
108
|
"rightToLeftOrientation": boolean;
|
|
96
109
|
}
|
|
97
110
|
interface SearchcraftInputIcon {
|
|
111
|
+
/**
|
|
112
|
+
* Determines if an error icon should be displayed.
|
|
113
|
+
*/
|
|
98
114
|
"error"?: boolean;
|
|
115
|
+
"height": number;
|
|
116
|
+
/**
|
|
117
|
+
* Determines if the layout should be right-to-left.
|
|
118
|
+
*/
|
|
99
119
|
"rightToLeftOrientation": boolean;
|
|
120
|
+
"width": number;
|
|
100
121
|
}
|
|
101
122
|
interface SearchcraftInputLabel {
|
|
102
123
|
"inputLabelClassName"?: string;
|
|
103
124
|
"label"?: string;
|
|
104
125
|
}
|
|
105
126
|
interface SearchcraftSearchIconSet {
|
|
127
|
+
"height": number;
|
|
106
128
|
/**
|
|
107
|
-
* Type of the icon to display. Options: '
|
|
129
|
+
* Type of the icon to display. Options: 'search-light', 'search-dark', 'error-light', 'error-dark'
|
|
108
130
|
*/
|
|
109
131
|
"type": 'search-light' | 'search-dark' | 'error-light' | 'error-dark';
|
|
132
|
+
"width": number;
|
|
110
133
|
}
|
|
111
134
|
interface SearchcraftSpinnerDark {
|
|
112
135
|
}
|
|
@@ -329,6 +352,8 @@ declare namespace LocalJSX {
|
|
|
329
352
|
"config"?: CoreConfigSDK;
|
|
330
353
|
"customStylesForInput"?: string | Record<string, string>;
|
|
331
354
|
"inputCaptionValue"?: string;
|
|
355
|
+
"inputIconHeight"?: number;
|
|
356
|
+
"inputIconWidth"?: number;
|
|
332
357
|
"labelForInput"?: string;
|
|
333
358
|
"onQuerySubmit"?: (event: SearchcraftAutoSearchFormCustomEvent<string>) => void;
|
|
334
359
|
"placeholderValue"?: string;
|
|
@@ -359,11 +384,19 @@ declare namespace LocalJSX {
|
|
|
359
384
|
"themeMode"?: 'light' | 'dark';
|
|
360
385
|
}
|
|
361
386
|
interface SearchcraftBaseSearchResults {
|
|
387
|
+
/**
|
|
388
|
+
* Place ad every N results (e.g., every 4 results). Default value: 4
|
|
389
|
+
*/
|
|
390
|
+
"adInterval"?: number;
|
|
362
391
|
/**
|
|
363
392
|
* Custom styles to apply to search results. Expected format: JSON string, e.g., '{"borderRadius": "10px", "padding": "16px"}'
|
|
364
393
|
*/
|
|
365
394
|
"customStylesForResults"?: | string
|
|
366
395
|
| Record<string, Record<string, string>>;
|
|
396
|
+
/**
|
|
397
|
+
* Place ad at the end of the results.
|
|
398
|
+
*/
|
|
399
|
+
"placeAdAtEnd"?: boolean;
|
|
367
400
|
/**
|
|
368
401
|
* Array of keys to dynamically extract properties from each document. Must be explicitly set by the parent component.
|
|
369
402
|
*/
|
|
@@ -406,6 +439,9 @@ declare namespace LocalJSX {
|
|
|
406
439
|
"inputCaptionClassName"?: string;
|
|
407
440
|
"inputCaptionValue"?: string;
|
|
408
441
|
"inputClassName"?: string;
|
|
442
|
+
"inputIconHeight"?: number;
|
|
443
|
+
"inputIconWidth"?: number;
|
|
444
|
+
"isRequesting"?: boolean;
|
|
409
445
|
"onClearInput"?: (event: SearchcraftInputCustomEvent<void>) => void;
|
|
410
446
|
"onSearchInputChange"?: (event: SearchcraftInputCustomEvent<string>) => void;
|
|
411
447
|
"placeholderValue"?: string;
|
|
@@ -419,18 +455,28 @@ declare namespace LocalJSX {
|
|
|
419
455
|
"rightToLeftOrientation"?: boolean;
|
|
420
456
|
}
|
|
421
457
|
interface SearchcraftInputIcon {
|
|
458
|
+
/**
|
|
459
|
+
* Determines if an error icon should be displayed.
|
|
460
|
+
*/
|
|
422
461
|
"error"?: boolean;
|
|
462
|
+
"height"?: number;
|
|
463
|
+
/**
|
|
464
|
+
* Determines if the layout should be right-to-left.
|
|
465
|
+
*/
|
|
423
466
|
"rightToLeftOrientation"?: boolean;
|
|
467
|
+
"width"?: number;
|
|
424
468
|
}
|
|
425
469
|
interface SearchcraftInputLabel {
|
|
426
470
|
"inputLabelClassName"?: string;
|
|
427
471
|
"label"?: string;
|
|
428
472
|
}
|
|
429
473
|
interface SearchcraftSearchIconSet {
|
|
474
|
+
"height"?: number;
|
|
430
475
|
/**
|
|
431
|
-
* Type of the icon to display. Options: '
|
|
476
|
+
* Type of the icon to display. Options: 'search-light', 'search-dark', 'error-light', 'error-dark'
|
|
432
477
|
*/
|
|
433
478
|
"type"?: 'search-light' | 'search-dark' | 'error-light' | 'error-dark';
|
|
479
|
+
"width"?: number;
|
|
434
480
|
}
|
|
435
481
|
interface SearchcraftSpinnerDark {
|
|
436
482
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
* to consume components of this package as outlined in the `README.md`.
|
|
9
9
|
*/
|
|
10
10
|
export type * from './components';
|
|
11
|
-
export { extractDynamicProperties, parseCustomStyles, parseSearchKeys, } from './utils/utils';
|
|
11
|
+
export { extractDynamicProperties, parseCustomStyles, parseSearchKeys, serializeStyles, } from './utils/utils';
|
|
12
12
|
export { useSearchcraftStore, useThemeStore } from './provider/store';
|