@bridgeline-digital/hawksearch-handlebars-ui 5.0.16 → 5.0.17

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/changelog.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 5.0.17
2
+
3
+ ## New Features
4
+
5
+ 1. Added `HawkSearch.config.autocomplete.minCharacterCount` property with a default value of `1` to specify the minimum length of a query before triggering autocomplete recommendations
6
+
1
7
  # 5.0.16
2
8
 
3
9
  ## New Features
@@ -50,9 +50,9 @@
50
50
  * </html>
51
51
  * ```
52
52
  *
53
- * ### Creating a template element
53
+ * ### Creating a script or template element
54
54
  *
55
- * In your HTML file, add the custom markup to a `template` element and pass the ID in the configuration options:
55
+ * In your HTML file, add the custom markup to either a `script` element with `type` attribute set to `text/x-handlebars-template` or a `template` element and pass the ID in the configuration options:
56
56
  *
57
57
  * ```html
58
58
  * <!DOCTYPE html>
@@ -79,7 +79,7 @@
79
79
  * <h1>HawkSearch Handlebars UI</h1>
80
80
  * <hawksearch-search></hawksearch-search>
81
81
  * <hawksearch-results></hawksearch-results>
82
- * <template id="page-size-template">
82
+ * <script id="page-size-template" type="text/x-handlebars-template">
83
83
  * <div class='page-size'>
84
84
  * <select hawksearch-page-size>
85
85
  * {{#each options}}
@@ -87,11 +87,13 @@
87
87
  * {{/each}}
88
88
  * </select>
89
89
  * </div>
90
- * </template>
90
+ * </script>
91
91
  * </body>
92
92
  * </html>
93
93
  * ```
94
94
  *
95
+ * * *Note: `script` elements are preferred over `template` elements as they prevent some browser parsing behavior which can conflict with Handlebars directives in some edge cases.*
96
+ *
95
97
  * *Note: This approach tends to be easier to manage than the previous option as it is more compatible with popular HTML editors and templates can potentially be loaded from separate files using Server-side Includes (SSI).*
96
98
  *
97
99
  * ## Customizing CSS
@@ -7,9 +7,6 @@ export * from './page-size/page-size.component';
7
7
  export * from './pagination/pagination.component';
8
8
  export * from './query-suggestions/query-suggestions.component';
9
9
  export * from './search-field/search-field.component';
10
- export * from './conceptsearch-field/conceptsearch-field.component';
11
- export * from './imagefinder-field/imagefinder-field.component';
12
- export * from './imagesearch-field/imagesearch-field.component';
13
10
  export * from './search-results-item/search-results-item.component';
14
11
  export * from './search-results-list/search-results-list.component';
15
12
  export * from './search-results/search-results.component';
@@ -28,6 +28,7 @@ export declare class SearchFieldComponent extends BaseComponent<SearchFieldCompo
28
28
  private defaultAutocompleteResponse?;
29
29
  private previousAutocompleteResponse?;
30
30
  private previousValue;
31
+ private get autocompleteMinCharacterCount();
31
32
  private get recommendationsEnabled();
32
33
  connectedCallback(): void;
33
34
  disconnectedCallback(): void;
@@ -1,5 +1,5 @@
1
1
  import * as Handlebars from 'handlebars';
2
- import { ItemType, RecommendationsResponse, RequestType, SearchRequest, SearchResponse } from '@models';
2
+ import { ItemType, RecommendationsResponse, SearchRequest, SearchResponse } from '@models';
3
3
  import { AutocompleteService, RecommendationsService, SearchService, TrackingService } from '../services';
4
4
  export interface BaseComponentConfig {
5
5
  /**
@@ -160,14 +160,6 @@ export interface SearchFieldComponentConfig extends BaseComponentConfig {
160
160
  placeholder?: string;
161
161
  };
162
162
  }
163
- export interface ImageSearchFieldComponentConfig extends BaseComponentConfig {
164
- strings?: {
165
- dragImageMessage?: string;
166
- uploadImageMessage?: string;
167
- dropImageMessage?: string;
168
- errorMessage?: string;
169
- };
170
- }
171
163
  export interface SearchResultsComponentConfig extends BaseComponentConfig {
172
164
  }
173
165
  export interface SearchResultsItemComponentConfig extends BaseComponentConfig {
@@ -234,9 +226,6 @@ export interface HawkSearchComponents {
234
226
  'recent-searches-facet'?: RecentSearchesFacetComponentConfig;
235
227
  'related-searches-facet'?: RelatedSearchesFacetComponentConfig;
236
228
  'search-field'?: SearchFieldComponentConfig;
237
- 'conceptsearch-field'?: SearchFieldComponentConfig;
238
- 'imagesearch-field'?: SearchFieldComponentConfig;
239
- 'imagefinder-field'?: SearchFieldComponentConfig;
240
229
  'search-results'?: SearchResultsComponentConfig;
241
230
  'search-results-item'?: SearchResultsItemComponentConfig;
242
231
  'search-results-list'?: SearchResultsListComponentConfig;
@@ -344,7 +333,7 @@ export interface HawkSearchConfig {
344
333
  */
345
334
  endpointUrl?: string;
346
335
  /**
347
- * Specifies whether autocomplete recommendations (autocomplete without entering a query) is enabled
336
+ * Specifies whether autocomplete recommendations (autocomplete without entering a query - "instant engage") is enabled
348
337
  *
349
338
  * #### Default Value
350
339
  * `false`
@@ -357,6 +346,13 @@ export interface HawkSearchConfig {
357
346
  * `false`
358
347
  */
359
348
  decodeQuery?: boolean;
349
+ /**
350
+ * Specifies the minimum length for a query to trigger an autocomplete recommendations request
351
+ *
352
+ * #### Default Value
353
+ * `1`
354
+ */
355
+ minCharacterCount?: number;
360
356
  };
361
357
  search?: {
362
358
  /**
@@ -433,13 +429,6 @@ export interface HawkSearchConfig {
433
429
  * `'sort'`
434
430
  */
435
431
  sort?: string;
436
- /**
437
- * Sets RequestType field to toggle between Keyword search, Image search or Concept search
438
- *
439
- * #### Default Value
440
- * `'DefaultSearch'`
441
- */
442
- requestType?: RequestType;
443
432
  };
444
433
  /**
445
434
  * Whether to automatically URI decode the search query value. Runs recursively until value is fully decoded. For example, `Test%2520Value` would become `Test Value`.
@@ -591,13 +580,6 @@ export interface HawkSearchConfig {
591
580
  assets?: string;
592
581
  content?: string;
593
582
  };
594
- /**
595
- * Specifies whether search queries should be displayed on console
596
- *
597
- * #### Default Value
598
- * `false`
599
- */
600
- debug?: boolean;
601
583
  }
602
584
  export interface HawkSearchGlobal {
603
585
  config: HawkSearchConfig;