@bridgeline-digital/hawksearch-handlebars-ui 5.1.2-beta.4 → 5.2.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.
package/changelog.md CHANGED
@@ -1,5 +1,46 @@
1
+ # 5.2.1
2
+
3
+ ## Bug Fixes
4
+
5
+ 1. Added support to successfully upgrade v5.1.x implementations
6
+
7
+ ## Breaking Changes
8
+
9
+ 1. Prevents implementations of components in v6, e.g. ConceptSearch, VisualSearch, ImageSearch
10
+
11
+ # 5.0.19
12
+
13
+ ## Bug Fixes
14
+
15
+ 1. Fixed bug with Quick Lookup filtering not handling special characters correctly, e.g. '(',')', etc
16
+
17
+ # 5.0.17
18
+
19
+ ## New Features
20
+
21
+ 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
22
+
23
+ # 5.0.16
24
+
25
+ ## New Features
26
+
27
+ 1. Add support for script elements for custom templates
28
+ 2. Added support for content result images in default templates
29
+
30
+ ## Bug Fixes
31
+
32
+ 1. Added check to not display range facets that do not have range data (from API bug)
33
+
34
+ # 5.0.15
35
+
36
+ ## Bug Fixes
37
+
38
+ 1. Fixed bug with QueryString not adding correct param names when same facet parents are selected
39
+
1
40
  # 5.0.1
2
41
 
42
+ ## Bug Fixes
43
+
3
44
  1. Fixed bug in API endpoint construction when overriding the default `endpointUrl` for Autocomplete
4
45
 
5
46
  # 5.0.0
@@ -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`.
@@ -455,10 +444,6 @@ export interface HawkSearchConfig {
455
444
  * `false`
456
445
  */
457
446
  decodeFacetValues?: boolean;
458
- /**
459
- * Specifies a kValue for Concept and Image search
460
- */
461
- kValue?: number;
462
447
  };
463
448
  recommendations?: {
464
449
  /**
@@ -595,13 +580,6 @@ export interface HawkSearchConfig {
595
580
  assets?: string;
596
581
  content?: string;
597
582
  };
598
- /**
599
- * Specifies whether search queries should be displayed on console
600
- *
601
- * #### Default Value
602
- * `false`
603
- */
604
- debug?: boolean;
605
583
  }
606
584
  export interface HawkSearchGlobal {
607
585
  config: HawkSearchConfig;
@@ -212,3 +212,10 @@ export declare function decode(value: string): string;
212
212
  * @returns Decoded URI value
213
213
  */
214
214
  export declare function decodeNested(value: string): string;
215
+ /**
216
+ * This function is a wrapper of Lodash: { escapeRegExp }
217
+ *
218
+ * @param string — The string to escape.
219
+ * @return — Returns the escaped string.
220
+ */
221
+ export declare function escapeRegExp(value: string): string;