@searchcraft/react-sdk 0.11.0 → 0.12.0

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.
@@ -90,6 +90,7 @@ export interface MeasureRequestProperties {
90
90
  searchcraft_organization_id?: string;
91
91
  searchcraft_application_id?: string;
92
92
  searchcraft_index_names: string[];
93
+ searchcraft_federation_name?: string;
93
94
  search_term?: string;
94
95
  number_of_documents?: number;
95
96
  external_document_id?: string;
@@ -333,8 +334,16 @@ export interface SearchcraftConfig {
333
334
  endpointURL: string;
334
335
  /**
335
336
  * Name of the Searchcraft search index to search for results within. If you are using Searchcraft Cloud, this value can be found within the Vektron dashboard in the Code Snippets section when configuring a search index.
337
+ *
338
+ * Note: Either `indexName` or `federationName` must be provided, but not both.
336
339
  */
337
- indexName: string;
340
+ indexName?: string;
341
+ /**
342
+ * Name of the Searchcraft federation to search across multiple indices. Federation search allows you to search across all indices defined in a federation with a single query.
343
+ *
344
+ * Note: Either `indexName` or `federationName` must be provided, but not both.
345
+ */
346
+ federationName?: string;
338
347
  /**
339
348
  * The initial search query to call when Searchcraft is first initialized in your front-end application. This parameter can be used when you want to populate a page with an initial set of search results based on a query.
340
349
  *
@@ -601,6 +610,7 @@ declare class SearchClient {
601
610
  constructor(parent: SearchcraftCore, config: SearchcraftConfig, userId: string);
602
611
  /**
603
612
  * Getter for the base url used by the /search endpoint.
613
+ * Supports both index and federation search endpoints.
604
614
  */
605
615
  private get baseSearchUrl();
606
616
  /**
@@ -640,7 +650,9 @@ export interface SearchcraftStateFunctions {
640
650
  removeFacetPathsForIndexField: (fieldName: string) => void;
641
651
  removeRangeValueForIndexField: (fieldName: string) => void;
642
652
  resetSearchValues: () => void;
643
- search: () => Promise<void>;
653
+ search: (options?: {
654
+ skipSummary?: boolean;
655
+ }) => Promise<void>;
644
656
  setPopoverVisibility: (isVisible: boolean) => void;
645
657
  setSearchResultsCount: (count: number) => void;
646
658
  setSearchResultsPage: (page: number) => void;
@@ -684,6 +696,7 @@ export interface SearchcraftStateValues {
684
696
  hasSummaryBox: boolean;
685
697
  isSummaryLoading: boolean;
686
698
  summaryClient?: SummaryClient;
699
+ isSummaryNotEnabled: boolean;
687
700
  }
688
701
  export interface SearchcraftState extends SearchcraftStateFunctions, SearchcraftStateValues {
689
702
  }
@@ -1048,6 +1061,14 @@ export namespace Components {
1048
1061
  * The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
1049
1062
  */
1050
1063
  "hotkeyModifier"?: "ctrl" | "meta" | "alt" | "option";
1064
+ /**
1065
+ * The placeholder's render behavior. 'hide-on-focus' - Hide the placeholder text immediately when the input form gains focus. 'hide-on-text-entered' - Only hide the placeholder when the input form has text entered into it.
1066
+ */
1067
+ "placeholderBehavior"?: "hide-on-focus" | "hide-on-text-entered";
1068
+ /**
1069
+ * The input element's placeholder value.
1070
+ */
1071
+ "placeholderValue"?: string;
1051
1072
  /**
1052
1073
  * Formats the content rendered for each result.
1053
1074
  */
@@ -2303,6 +2324,14 @@ declare namespace LocalJSX {
2303
2324
  * The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
2304
2325
  */
2305
2326
  "hotkeyModifier"?: "ctrl" | "meta" | "alt" | "option";
2327
+ /**
2328
+ * The placeholder's render behavior. 'hide-on-focus' - Hide the placeholder text immediately when the input form gains focus. 'hide-on-text-entered' - Only hide the placeholder when the input form has text entered into it.
2329
+ */
2330
+ "placeholderBehavior"?: "hide-on-focus" | "hide-on-text-entered";
2331
+ /**
2332
+ * The input element's placeholder value.
2333
+ */
2334
+ "placeholderValue"?: string;
2306
2335
  /**
2307
2336
  * Formats the content rendered for each result.
2308
2337
  */