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

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,24 @@
1
+ # 5.0.16
2
+
3
+ ## New Features
4
+
5
+ 1. Add support for script elements for custom templates
6
+ 2. Added support for content result images in default templates
7
+
8
+ ## Bug Fixes
9
+
10
+ 1. Added check to not display range facets that do not have range data (from API bug)
11
+
12
+ # 5.0.15
13
+
14
+ ## Bug Fixes
15
+
16
+ 1. Fixed bug with QueryString not adding correct param names when same facet parents are selected
17
+
1
18
  # 5.0.1
2
19
 
20
+ ## Bug Fixes
21
+
3
22
  1. Fixed bug in API endpoint construction when overriding the default `endpointUrl` for Autocomplete
4
23
 
5
24
  # 5.0.0
@@ -0,0 +1,28 @@
1
+ import { BaseComponent } from '@components';
2
+ import { HawkSearchComponents, SearchFieldComponentConfig } from '@configuration';
3
+ import { SearchFieldComponentModel, SearchResponse } from '@models';
4
+ /**
5
+ * ## Tag
6
+ * The tag for this component is `<hawksearch-conceptearch-field>`.
7
+ *
8
+ * ## Event-Binding Attributes
9
+ * | Name | Value |
10
+ * | :- | :- |
11
+ * | hawksearch-input | |
12
+ *
13
+ * ## Default Template
14
+ * The following is the default Handlebars template for this component. To create a custom template, it is recommended to use this as a starting point.
15
+ * {@embed ./conceptsearch-field.component.hbs}
16
+ *
17
+ * @category Search
18
+ */
19
+ export declare class ConceptSearchFieldComponent extends BaseComponent<SearchFieldComponentConfig, SearchResponse, SearchFieldComponentModel> {
20
+ protected componentName: keyof HawkSearchComponents;
21
+ protected defaultHtml: any;
22
+ protected bindFromEvent: boolean;
23
+ private previousValue;
24
+ connectedCallback(): void;
25
+ disconnectedCallback(): void;
26
+ protected getContentModel(): SearchFieldComponentModel;
27
+ protected onRender(): void;
28
+ }
@@ -0,0 +1,29 @@
1
+ import { BaseComponent } from '@components';
2
+ import { HawkSearchComponents, SearchFieldComponentConfig } from '@configuration';
3
+ import { SearchFieldComponentModel, SearchResponse } from '@models';
4
+ /**
5
+ *
6
+ * ## Tag
7
+ * The tag for this component is `<hawksearch-imagefinder-field>`.
8
+ *
9
+ * ## Event-Binding Attributes
10
+ * | Name | Value |
11
+ * | :- | :- |
12
+ * | hawksearch-input | |
13
+ *
14
+ * ## Default Template
15
+ * The following is the default Handlebars template for this component. To create a custom template, it is recommended to use this as a starting point.
16
+ * {@embed ./imagefinder-field.component.hbs}
17
+ *
18
+ * @category Search
19
+ */
20
+ export declare class ImageFinderFieldComponent extends BaseComponent<SearchFieldComponentConfig, SearchResponse, SearchFieldComponentModel> {
21
+ protected componentName: keyof HawkSearchComponents;
22
+ protected defaultHtml: any;
23
+ protected bindFromEvent: boolean;
24
+ private previousValue;
25
+ connectedCallback(): void;
26
+ disconnectedCallback(): void;
27
+ protected getContentModel(): SearchFieldComponentModel;
28
+ protected onRender(): void;
29
+ }
@@ -0,0 +1,29 @@
1
+ import { BaseComponent } from '@components';
2
+ import { HawkSearchComponents, ImageSearchFieldComponentConfig } from '@configuration';
3
+ import { ImageSearchFieldComponentModel, SearchResponse } from '@models';
4
+ /**
5
+ * The Search component contains a file input element which triggers the {@link Components.AutocompleteComponent | Autocomplete component} as the user types and executes a new search when the user hits the `enter` key.
6
+ *
7
+ * ## Tag
8
+ * The tag for this component is `<hawksearch-imagesearch-field>`.
9
+ *
10
+ * ## Default Template
11
+ * The following is the default Handlebars template for this component. To create a custom template, it is recommended to use this as a starting point.
12
+ * {@embed ./imagesearch-field.component.hbs}
13
+ *
14
+ * @category Search
15
+ */
16
+ export declare class ImageSearchFieldComponent extends BaseComponent<ImageSearchFieldComponentConfig, SearchResponse, ImageSearchFieldComponentModel> {
17
+ protected componentName: keyof HawkSearchComponents;
18
+ protected defaultHtml: any;
19
+ protected bindFromEvent: boolean;
20
+ private clickEventHandler;
21
+ private previousValue;
22
+ private maxSize;
23
+ private allowedExtensions;
24
+ private handleFiles;
25
+ connectedCallback(): void;
26
+ disconnectedCallback(): void;
27
+ protected getContentModel(): ImageSearchFieldComponentModel;
28
+ protected onRender(): void;
29
+ }
@@ -7,6 +7,9 @@ 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';
10
13
  export * from './search-results-item/search-results-item.component';
11
14
  export * from './search-results-list/search-results-list.component';
12
15
  export * from './search-results/search-results.component';
@@ -1,5 +1,5 @@
1
1
  import * as Handlebars from 'handlebars';
2
- import { ItemType, RecommendationsResponse, SearchRequest, SearchResponse } from '@models';
2
+ import { ItemType, RecommendationsResponse, RequestType, SearchRequest, SearchResponse } from '@models';
3
3
  import { AutocompleteService, RecommendationsService, SearchService, TrackingService } from '../services';
4
4
  export interface BaseComponentConfig {
5
5
  /**
@@ -160,6 +160,14 @@ 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
+ }
163
171
  export interface SearchResultsComponentConfig extends BaseComponentConfig {
164
172
  }
165
173
  export interface SearchResultsItemComponentConfig extends BaseComponentConfig {
@@ -226,6 +234,9 @@ export interface HawkSearchComponents {
226
234
  'recent-searches-facet'?: RecentSearchesFacetComponentConfig;
227
235
  'related-searches-facet'?: RelatedSearchesFacetComponentConfig;
228
236
  'search-field'?: SearchFieldComponentConfig;
237
+ 'conceptsearch-field'?: SearchFieldComponentConfig;
238
+ 'imagesearch-field'?: SearchFieldComponentConfig;
239
+ 'imagefinder-field'?: SearchFieldComponentConfig;
229
240
  'search-results'?: SearchResultsComponentConfig;
230
241
  'search-results-item'?: SearchResultsItemComponentConfig;
231
242
  'search-results-list'?: SearchResultsListComponentConfig;
@@ -422,6 +433,13 @@ export interface HawkSearchConfig {
422
433
  * `'sort'`
423
434
  */
424
435
  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;
425
443
  };
426
444
  /**
427
445
  * Whether to automatically URI decode the search query value. Runs recursively until value is fully decoded. For example, `Test%2520Value` would become `Test Value`.
@@ -573,6 +591,13 @@ export interface HawkSearchConfig {
573
591
  assets?: string;
574
592
  content?: string;
575
593
  };
594
+ /**
595
+ * Specifies whether search queries should be displayed on console
596
+ *
597
+ * #### Default Value
598
+ * `false`
599
+ */
600
+ debug?: boolean;
576
601
  }
577
602
  export interface HawkSearchGlobal {
578
603
  config: HawkSearchConfig;