@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.
Files changed (128) hide show
  1. package/README.md +2 -2
  2. package/dist/components/defineCustomElements.js +8 -6
  3. package/dist/components/index.d.ts +2632 -68
  4. package/dist/components/index.js +51 -15
  5. package/dist/components/index.js.map +1 -1
  6. package/dist/components/{p-e41b0f43.js → p-0077f677.js} +14 -21
  7. package/dist/components/p-0077f677.js.map +1 -0
  8. package/dist/components/p-13e81b5d.js +147 -0
  9. package/dist/components/p-13e81b5d.js.map +1 -0
  10. package/dist/components/p-172a848d.js +93 -0
  11. package/dist/components/p-172a848d.js.map +1 -0
  12. package/dist/components/{p-580c09dc.js → p-17c646e2.js} +226 -190
  13. package/dist/components/p-17c646e2.js.map +1 -0
  14. package/dist/components/{p-e55a7970.js → p-1adf78b9.js} +2 -2
  15. package/dist/components/p-1adf78b9.js.map +1 -0
  16. package/dist/components/{p-e27a0dab.js → p-2be1a382.js} +5 -7
  17. package/dist/components/p-2be1a382.js.map +1 -0
  18. package/dist/components/{p-4df578e4.js → p-3e65aa91.js} +8 -8
  19. package/dist/components/p-3e65aa91.js.map +1 -0
  20. package/dist/components/{p-8f854dec.js → p-5d17ace0.js} +14 -13
  21. package/dist/components/p-5d17ace0.js.map +1 -0
  22. package/dist/components/{p-bf6a086a.js → p-73db9122.js} +3 -10
  23. package/dist/components/p-73db9122.js.map +1 -0
  24. package/dist/components/p-810a7850.js +17 -0
  25. package/dist/components/p-810a7850.js.map +1 -0
  26. package/dist/components/p-84e2cbd6.js +46 -0
  27. package/dist/components/p-84e2cbd6.js.map +1 -0
  28. package/dist/components/{p-bb12ab5a.js → p-868803f9.js} +4 -3
  29. package/dist/components/p-868803f9.js.map +1 -0
  30. package/dist/components/{p-60f05735.js → p-a62a2e74.js} +4 -4
  31. package/dist/components/p-a62a2e74.js.map +1 -0
  32. package/dist/components/{p-5fdaf1e6.js → p-a64b4cba.js} +2 -145
  33. package/dist/components/p-a64b4cba.js.map +1 -0
  34. package/dist/components/{p-71cc28c1.js → p-acf23bab.js} +2 -2
  35. package/dist/components/p-acf23bab.js.map +1 -0
  36. package/dist/components/{p-0e393fe1.js → p-f2585cdf.js} +3 -9
  37. package/dist/components/p-f2585cdf.js.map +1 -0
  38. package/dist/components/searchcraft-ad.js +1 -1
  39. package/dist/components/searchcraft-button.js +1 -1
  40. package/dist/components/searchcraft-error-message.js +1 -1
  41. package/dist/components/searchcraft-facet-list.js +1 -1
  42. package/dist/components/searchcraft-filter-panel.js +6 -5
  43. package/dist/components/searchcraft-filter-panel.js.map +1 -1
  44. package/dist/components/searchcraft-input-form.js +2 -2
  45. package/dist/components/searchcraft-input-label.js +1 -1
  46. package/dist/components/searchcraft-pagination.js +3 -9
  47. package/dist/components/searchcraft-pagination.js.map +1 -1
  48. package/dist/components/searchcraft-popover-button.js +95 -3
  49. package/dist/components/searchcraft-popover-button.js.map +1 -1
  50. package/dist/components/searchcraft-popover-footer.d.ts +11 -0
  51. package/dist/components/searchcraft-popover-footer.js +8 -0
  52. package/dist/components/searchcraft-popover-footer.js.map +1 -0
  53. package/dist/components/searchcraft-popover-form.js +36 -27
  54. package/dist/components/searchcraft-popover-form.js.map +1 -1
  55. package/dist/components/searchcraft-popover-list-item.js +1 -1
  56. package/dist/components/searchcraft-popover-list-view.js +1 -1
  57. package/dist/components/searchcraft-results-info.js +12 -23
  58. package/dist/components/searchcraft-results-info.js.map +1 -1
  59. package/dist/components/searchcraft-search-result.d.ts +11 -0
  60. package/dist/components/searchcraft-search-result.js +8 -0
  61. package/dist/components/searchcraft-search-result.js.map +1 -0
  62. package/dist/components/searchcraft-search-results-per-page.js +3 -10
  63. package/dist/components/searchcraft-search-results-per-page.js.map +1 -1
  64. package/dist/components/searchcraft-search-results.d.ts +11 -0
  65. package/dist/components/{searchcraft-base-search-results.js → searchcraft-search-results.js} +25 -71
  66. package/dist/components/searchcraft-search-results.js.map +1 -0
  67. package/dist/components/searchcraft-select.js +1 -1
  68. package/dist/components/searchcraft-slider.js +1 -1
  69. package/dist/components/searchcraft-theme.js +4 -42
  70. package/dist/components/searchcraft-theme.js.map +1 -1
  71. package/dist/components/searchcraft-toggle-button.js +1 -1
  72. package/dist/hydrate/index.d.ts +242 -0
  73. package/dist/hydrate/index.js +23479 -0
  74. package/dist/hydrate/index.mjs +23471 -0
  75. package/dist/hydrate/package.json +12 -0
  76. package/dist/themes/hologram.css +1 -0
  77. package/dist/themes/hologram.css.map +1 -0
  78. package/dist/types/components/searchcraft-ad/searchcraft-ad.d.ts +2 -0
  79. package/dist/types/components/searchcraft-button/searchcraft-button.d.ts +3 -2
  80. package/dist/types/components/searchcraft-error-message/searchcraft-error-message.d.ts +6 -7
  81. package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +3 -1
  82. package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +30 -1
  83. package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +23 -14
  84. package/dist/types/components/searchcraft-input-label/searchcraft-input-label.d.ts +3 -2
  85. package/dist/types/components/searchcraft-pagination/searchcraft-pagination.d.ts +22 -8
  86. package/dist/types/components/searchcraft-popover-button/searchcraft-popover-button.d.ts +74 -0
  87. package/dist/types/components/searchcraft-popover-footer/searchcraft-popover-footer.d.ts +13 -0
  88. package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +27 -15
  89. package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +5 -3
  90. package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts +3 -2
  91. package/dist/types/components/searchcraft-results-info/searchcraft-results-info.d.ts +41 -19
  92. package/dist/types/components/searchcraft-search-result/searchcraft-search-result.d.ts +28 -0
  93. package/dist/types/components/searchcraft-search-results/searchcraft-search-results.d.ts +81 -0
  94. package/dist/types/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.d.ts +21 -5
  95. package/dist/types/components/searchcraft-select/searchcraft-select.d.ts +3 -5
  96. package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +3 -3
  97. package/dist/types/components/searchcraft-theme/searchcraft-theme.d.ts +24 -16
  98. package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +2 -1
  99. package/dist/types/components.d.ts +947 -612
  100. package/dist/types/index.d.ts +5 -4
  101. package/dist/types/store/SearchcraftStore.types.d.ts +3 -0
  102. package/dist/types/utils/html.d.ts +6 -0
  103. package/dist/types/utils/index.d.ts +1 -0
  104. package/package.json +13 -7
  105. package/dist/components/bundled.types.d.ts +0 -2275
  106. package/dist/components/p-0e393fe1.js.map +0 -1
  107. package/dist/components/p-19fe91f1.js +0 -136
  108. package/dist/components/p-19fe91f1.js.map +0 -1
  109. package/dist/components/p-4df578e4.js.map +0 -1
  110. package/dist/components/p-580c09dc.js.map +0 -1
  111. package/dist/components/p-5fdaf1e6.js.map +0 -1
  112. package/dist/components/p-60f05735.js.map +0 -1
  113. package/dist/components/p-71cc28c1.js.map +0 -1
  114. package/dist/components/p-8f854dec.js.map +0 -1
  115. package/dist/components/p-bb12ab5a.js.map +0 -1
  116. package/dist/components/p-bf6a086a.js.map +0 -1
  117. package/dist/components/p-d9551738.js +0 -25
  118. package/dist/components/p-d9551738.js.map +0 -1
  119. package/dist/components/p-e27a0dab.js.map +0 -1
  120. package/dist/components/p-e41b0f43.js.map +0 -1
  121. package/dist/components/p-e55a7970.js.map +0 -1
  122. package/dist/components/searchcraft-base-search-result.d.ts +0 -11
  123. package/dist/components/searchcraft-base-search-result.js +0 -8
  124. package/dist/components/searchcraft-base-search-result.js.map +0 -1
  125. package/dist/components/searchcraft-base-search-results.d.ts +0 -11
  126. package/dist/components/searchcraft-base-search-results.js.map +0 -1
  127. package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +0 -55
  128. package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +0 -89
@@ -1,55 +0,0 @@
1
- import type { SearchClientResponseItem, SearchDocument } from '@searchcraft/core';
2
- import type { SearchResultMappings } from '@searchcraft/core';
3
- /**
4
- * This web component is designed to display detailed information for a single search result.
5
- * Once a query is submitted, the component formats and presents the result.
6
- * It is consumed within the `searchcraft-base-search-results` component.
7
- */
8
- export declare class SearchcraftBaseSearchResult {
9
- item?: SearchClientResponseItem;
10
- searchResultMappings?: SearchResultMappings;
11
- /**
12
- * Where to open the link for the containing element.
13
- */
14
- containerTarget: '_blank' | '_self' | '_top' | '_parent';
15
- /**
16
- * The relationship between the current document and the link for the containing element.
17
- */
18
- containerRel?: 'noreferrer' | 'noopener' | 'nofollow';
19
- /**
20
- * Where to open the link for the button rendered when containerHref is not present.
21
- */
22
- buttonTarget: '_blank' | '_self' | '_top' | '_parent';
23
- /**
24
- * The relationship between the current document and the link for the button rendered when containerHref is not present.
25
- */
26
- buttonRel?: 'noreferrer' | 'noopener' | 'nofollow';
27
- /**
28
- * The placement of the image.
29
- */
30
- imagePlacement: 'left' | 'right';
31
- /**
32
- * A custom styles object.
33
- */
34
- customStyles?: string;
35
- /**
36
- * The position in the document. Used with the "document_clicked" measure event.
37
- */
38
- documentPosition: number;
39
- titleContent: string | undefined;
40
- subtitleContent: string | undefined;
41
- bodyContent: string | undefined;
42
- footerContent: string | undefined;
43
- buttonLabel: string | undefined;
44
- buttonHref: string | undefined;
45
- containerHref: string | undefined;
46
- imageSrc: string | undefined;
47
- imageAlt: string | undefined;
48
- private searchcraftStore;
49
- connectedCallback(): void;
50
- mapValuesFromDocument(document: SearchDocument): void;
51
- private handleLinkClick;
52
- private parseStyles;
53
- render(): any;
54
- }
55
- //# sourceMappingURL=searchcraft-base-search-result.d.ts.map
@@ -1,89 +0,0 @@
1
- import type { AdClientResponseItem, SearchClientResponseItem, SearchcraftConfig } from '@searchcraft/core';
2
- import { type SearchcraftState } from "../../store/index";
3
- import type { SearchResultMappings } from '@searchcraft/core';
4
- /**
5
- * This web component is responsible for displaying the results of a search query.
6
- * Once a query is submitted, the component formats and presents an ordered list of the results.
7
- *
8
- * ## Usage
9
- * ```html
10
- * <!-- index.html -->
11
- * <searchcraft-base-search-results
12
- * ad-interval="4"
13
- * place-ad-at-start="false"
14
- * result-image-placement="right"
15
- * />
16
- * ```
17
- *
18
- * ```js
19
- * // index.js
20
- * const baseSearchResults = document.querySelector('searchcraft-base-search-results');
21
- *
22
- * baseSearchResults.searchResultMappings = containerHref: {
23
- * fieldNames: [
24
- * {
25
- * fieldName: 'canonical_link',
26
- * dataType: 'text',
27
- * },
28
- * ],
29
- * };
30
- *
31
- * baseSearchResults.addEventListener('noResults', () => {
32
- * console.log('No search results found');
33
- * });
34
- * ```
35
- */
36
- export declare class SearchcraftBaseSearchResults {
37
- /**
38
- * A custom styles object.
39
- */
40
- customStylesForResults?: string | Record<string, Record<string, string>>;
41
- /**
42
- * Formats the content rendered for each result.
43
- */
44
- searchResultMappings?: SearchResultMappings;
45
- /**
46
- * The placement of the image for each result.
47
- */
48
- resultImagePlacement: 'left' | 'right';
49
- /**
50
- * The label for the button rendered when containerHref is not present for each result.
51
- */
52
- buttonLabel?: string;
53
- /**
54
- * Where to open the link for the button rendered when containerHref is not present for each result.
55
- */
56
- buttonTarget: '_blank' | '_self' | '_top' | '_parent';
57
- /**
58
- * The relationship between the current document and the link for the button rendered when containerHref is not present for each result.
59
- */
60
- buttonRel?: 'noreferrer' | 'noopener' | 'nofollow';
61
- /**
62
- * Where to open the link for the containing element for each result.
63
- */
64
- containerTarget: '_blank' | '_self' | '_top' | '_parent';
65
- /**
66
- * The relationship between the current document and the link for the containing element for each result.
67
- */
68
- containerRel?: 'noreferrer' | 'noopener' | 'nofollow';
69
- searchTerm: string;
70
- searchClientResponseItems?: SearchClientResponseItem[];
71
- adClientResponseItems: AdClientResponseItem[];
72
- searchResultsPerPage: any;
73
- searchResultsPage: any;
74
- isSearchInProgress: boolean;
75
- config?: SearchcraftConfig;
76
- private unsubscribe;
77
- get serializedStyles(): string;
78
- componentDidLoad(): void;
79
- disconnectedCallback(): void;
80
- handleStateChange(state: SearchcraftState): void;
81
- renderEmptyState(): any;
82
- renderNoResultsFoundState(): any;
83
- renderWithADMAds(): any;
84
- renderWithCustomAds(): any;
85
- renderWithNativoAds(): any;
86
- renderWithNoAds(): any;
87
- render(): any;
88
- }
89
- //# sourceMappingURL=searchcraft-base-search-results.d.ts.map