@bridgeline-digital/hawksearch-handlebars-ui 5.0.16 → 5.0.18
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 +12 -0
- package/dist/components/index.d.ts +6 -4
- package/dist/components/search/index.d.ts +0 -3
- package/dist/components/search/search-field/search-field.component.d.ts +1 -0
- package/dist/components/search/tabs/dist/tabs.component.spec.d.ts +1 -0
- package/dist/configuration/configuration.models.d.ts +9 -27
- package/dist/index.html +48 -0
- package/dist/index.js +20041 -2
- package/dist/index.js.map +1 -1
- package/dist/landing-page-custom.html +45 -0
- package/dist/landing-page-products.html +45 -0
- package/dist/models/component.models.d.ts +0 -12
- package/dist/models/raw/raw-search.models.d.ts +0 -1
- package/dist/models/search.models.d.ts +0 -12
- package/dist/recommendations.html +45 -0
- package/dist/services/base.service.d.ts +0 -1
- package/dist/services/search.service.d.ts +2 -2
- package/dist/styles.328cd3af2ed43ff243ce7ffede0f447c.css +1896 -0
- package/dist/variants.html +63 -0
- package/package.json +1 -1
- package/readme.md +3 -1
- package/dist/components/search/conceptsearch-field/conceptsearch-field.component.d.ts +0 -28
- package/dist/components/search/imagefinder-field/imagefinder-field.component.d.ts +0 -29
- package/dist/components/search/imagesearch-field/imagesearch-field.component.d.ts +0 -29
- package/dist/index.js.LICENSE.txt +0 -26
- package/dist/styles.136b28bd4e564a8f5bf3d6216289359e.css +0 -1
package/changelog.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# 5.0.18
|
|
2
|
+
|
|
3
|
+
## Bug Fixes
|
|
4
|
+
|
|
5
|
+
1. Fixed bug with Quick Lookup filtering not handling special characters correctly, e.g. '(',')', etc
|
|
6
|
+
|
|
7
|
+
# 5.0.17
|
|
8
|
+
|
|
9
|
+
## New Features
|
|
10
|
+
|
|
11
|
+
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
|
|
12
|
+
|
|
1
13
|
# 5.0.16
|
|
2
14
|
|
|
3
15
|
## 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
|
-
* <
|
|
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
|
-
* </
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Handlebars from 'handlebars';
|
|
2
|
-
import { ItemType, RecommendationsResponse,
|
|
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;
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>HawkSearch Demo (default)</title>
|
|
6
|
+
<meta name="description" content="This is a demo of the HawkSearch Handlebars UI" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
+
<style type="text/css">
|
|
9
|
+
body {
|
|
10
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.layout-container {
|
|
15
|
+
margin: 0 auto;
|
|
16
|
+
min-width: 340px;
|
|
17
|
+
max-width: 1280px;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
20
|
+
<script type="text/javascript">
|
|
21
|
+
var HawkSearch = HawkSearch || {};
|
|
22
|
+
|
|
23
|
+
HawkSearch.config = {
|
|
24
|
+
clientId: 'f51060e1c38446f0bacdf283390c37e8',
|
|
25
|
+
search: {
|
|
26
|
+
url: ''
|
|
27
|
+
},
|
|
28
|
+
autocomplete: {
|
|
29
|
+
recommendationsEnabled: true
|
|
30
|
+
},
|
|
31
|
+
urlPrefixes: {
|
|
32
|
+
assets: '//dev.hawksearch.net',
|
|
33
|
+
content: '//preview-dev.hawksearch.net/elasticdemo'
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
<script defer src="index.js"></script></head>
|
|
38
|
+
|
|
39
|
+
<body>
|
|
40
|
+
<div class="layout-container">
|
|
41
|
+
<h1>HawkSearch Demo (default)</h1>
|
|
42
|
+
<div style="margin: 0 0 30px 0">
|
|
43
|
+
<hawksearch-search-field></hawksearch-search-field>
|
|
44
|
+
</div>
|
|
45
|
+
<hawksearch-search-results></hawksearch-search-results>
|
|
46
|
+
</div>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|