@searchcraft/react-sdk 0.11.1 → 0.12.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.
@@ -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.
339
+ */
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.
336
345
  */
337
- indexName: string;
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;
@@ -671,6 +683,11 @@ export interface SearchcraftStateValues {
671
683
  searchClientRequestProperties: SearchClientRequestProperties | string | undefined | null;
672
684
  searchClientResponseItems: SearchClientResponseItem[];
673
685
  cachedSearchClientResponseItems: SearchClientResponseItem[];
686
+ cachedSearchResponseFacetPrime: FacetPrime | undefined | null;
687
+ cachedSupplementalFacetPrime: FacetPrime | undefined | null;
688
+ cachedSearchResponseTimeTaken: number | undefined;
689
+ cachedSearchResultsCount: number | undefined;
690
+ cachedSearchClientRequestProperties: SearchClientRequestProperties | string | undefined | null;
674
691
  searchResponseTimeTaken: number | undefined;
675
692
  searchResponseFacetPrime: FacetPrime | undefined | null;
676
693
  supplementalFacetPrime: FacetPrime | undefined | null;
@@ -684,6 +701,7 @@ export interface SearchcraftStateValues {
684
701
  hasSummaryBox: boolean;
685
702
  isSummaryLoading: boolean;
686
703
  summaryClient?: SummaryClient;
704
+ isSummaryNotEnabled: boolean;
687
705
  }
688
706
  export interface SearchcraftState extends SearchcraftStateFunctions, SearchcraftStateValues {
689
707
  }
@@ -908,6 +926,10 @@ export namespace Components {
908
926
  * The id of the Searchcraft instance that this component should use.
909
927
  */
910
928
  "searchcraftId"?: string;
929
+ /**
930
+ * The value to display in the input field.
931
+ */
932
+ "value"?: string;
911
933
  }
912
934
  /**
913
935
  * This web component serves as the input label for the searchcraft-input-form component.
@@ -1048,6 +1070,14 @@ export namespace Components {
1048
1070
  * The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
1049
1071
  */
1050
1072
  "hotkeyModifier"?: "ctrl" | "meta" | "alt" | "option";
1073
+ /**
1074
+ * 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.
1075
+ */
1076
+ "placeholderBehavior"?: "hide-on-focus" | "hide-on-text-entered";
1077
+ /**
1078
+ * The input element's placeholder value.
1079
+ */
1080
+ "placeholderValue"?: string;
1051
1081
  /**
1052
1082
  * Formats the content rendered for each result.
1053
1083
  */
@@ -2163,6 +2193,10 @@ declare namespace LocalJSX {
2163
2193
  * The id of the Searchcraft instance that this component should use.
2164
2194
  */
2165
2195
  "searchcraftId"?: string;
2196
+ /**
2197
+ * The value to display in the input field.
2198
+ */
2199
+ "value"?: string;
2166
2200
  }
2167
2201
  /**
2168
2202
  * This web component serves as the input label for the searchcraft-input-form component.
@@ -2303,6 +2337,14 @@ declare namespace LocalJSX {
2303
2337
  * The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
2304
2338
  */
2305
2339
  "hotkeyModifier"?: "ctrl" | "meta" | "alt" | "option";
2340
+ /**
2341
+ * 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.
2342
+ */
2343
+ "placeholderBehavior"?: "hide-on-focus" | "hide-on-text-entered";
2344
+ /**
2345
+ * The input element's placeholder value.
2346
+ */
2347
+ "placeholderValue"?: string;
2306
2348
  /**
2307
2349
  * Formats the content rendered for each result.
2308
2350
  */