# 7.0.2

## Enhancements

1. Added new `showAlways` configuration property for `AutocompleteComponent`. A new `hasResults` property is now available to the Handlebars template.
2. Added new `precision` configuration property for `RangeSliderFacetComponent` and `NumericRangeFacetComponent` to control the number of decimal places displayed and submitted for decimal ranges (e.g. currency)
3. Added `ItemIndex` to tracking request body for Recommendations clicks

## Bug Fixes

1. Fixed Did You Mean in autocomplete when values contain a space (which was encoded as a plus sign)
2. Fixed `disableAutofill` logic in `UnifiedSearchFieldComponent` and `SearchFieldComponent` to handle configuration overrides
3. Fixed `requestType` query string parameter logic to ensure that search field components only populate with the `query` value corresponding to their own `requestType`
4. Clear `query` and `requestType` query string parameters when performing visual search
5. Cleaned up `SearchService.query` syntax and added deprecated overloads
6. Added `X-HawkSearch-IgnoreTracking` header on all API requests when tracking is disabled
7. Fixed `RangeSliderFacetComponent` slider positioning when the range minimum is non-zero
8. Fixed canonical URL and robots meta tag logic so that facet, sort, and query refinements are no longer included in the canonical URL and instead set `robots` to `noindex, follow`. Canonical is now only rendered for landing pages.

# 7.0.1

## Breaking Changes

1. Updated several component names to use proper kabob casing consistent with earlier components:
    - `hawksearch-conversational-search`
    - `hawksearch-image-search`
    - `hawksearch-no-results`
    - `hawksearch-smart-response`
    - `hawksearch-unified-search`
    - `hawksearch-visual-search`

2. Updated several attribute names to use proper kabob casing with `hawksearch-` prefix:
    - `ContentZoneComponent`:

    `index` --> `hawksearch-index`
    - `SmartResponseComponent`:

    `smartresponse-switch` --> `hawksearch-switch`
    - `VisualSearchComponent`:

    `hawksearch-visualsearch-display` --> `hawksearch-display`

    `hawksearch-visualsearch-droparea` --> `hawksearch-drop-area`

    `hawksearch-visualsearch-fileinput` --> `hawksearch-file-input`

3. Updated some CSS classes to be consistent with renamed components and adhere to BEM conventions

## Bug Fixes

1. Updated default `ConversationalSearchComponent` Handlebars template to use configured string values
2. Set the correct `RequestType` value when clicking View All Results link in autocomplete with `UnifiedSearchFieldComponent`. If using a custom Handlebars template, this requires updating the `hawksearch-autocomplete` tag to the following:

    ```hbs
    <hawksearch-autocomplete request-type='UnifiedSearch'></hawksearch-autocomplete>
    ```

# 6.4.1

## Bug Fixes

1. Fixed issue with compiled icons.svg file causing some icons to not be resized properly when embedded in `hawksearch-icon` component.

# 6.4.0

## Enhancements

1. Updated all npm package dependencies to latest versions
2. Updated tsconfig target to ES2022
3. Added `disablePlaceholderAnimation` property to `ConceptSearchComponent`, `ImageSearchFieldComponent`, `SearchFieldComponent`, and `UnifiedSearchComponent`. When `true` and the `placeholder` property is an array, a randomly selected value will be exposed to the Handlebars template without animation.

## Bug Fixes

1. Fixed error parsing search API response for Popular Queries Content when no data is present
2. Removed several unnecessary `console.log` instances
3. Fixed handling of absolute URLs in Color facets
4. Updated SearchFieldComponent to hook into input event instead of keyup to capture paste from browser context menu
5. Fixed several errors in documentation
6. Removed several `console.log` calls
7. When a nested checkbox filter is selected, ancestors will now be expanded by default so selection is visible

# 6.3.8

## Enhancements

1. Smart Response Request to fire concurrently alongside Search Request to avoid extended wait times and updated Smart Response Timeout to 20 Seconds.
2. Support .jfif Image File Type in Smart Search Image Upload
3. No results component added
4. Implement Dynamic Zone Mapping for Merchandising Banners ('?' bubble that would explain the trigger for the campaign and contain a link to the campaign being displayed)
5. Implemented a new enhancement for property for the Title Field of the recommendation widget
6. Small bugfix regrading the property for the Title Field Name of the recommendation widget.
7. Fix for open range facet is passing NaN as upper and lower bound when no value is entered by the user.
8. Added Headers to API Calls

# 6.3.6

## Enhancements

1. Now with no additional Toggles for Mobile or Tablet selected/enabled Banners will ONLY display for Desktop device.
2. Returning 'unsupported' for if an Open Range facet is selected, and is neither currency or numeric.
3. Mapped Brand field now displayed in Rapid UI Preview

# 6.3.5

## Enhancements

1. Smartresponse API and Config Changes (Pointing to a new endpoint: https://genai.bridgeline.com/)
2. Introduced an additional config parameter useCustomStyle: true. When this is set, we can prevent our CSS from being injected altogether, allowing clients to apply their own styles without interference from Handlebars CSS.
3. Smart Response issues fixed where component was not respecting Prompt in Init Function
4. Bug fixes related to issue with Hawksearch.config.search being always true.

# 6.3.4

## Enhancements

1. Allowing image searches to function when initiated from the home page or other non-search pages.
2. Converting .avif file to jpeg

# 6.3.3

## Enhancements

1. Update documentation.

# 6.3.2

## Enhancements

1. Support .avif file format on VisualSearch.
2. Add configurable search debounce on Searchfield component.

# 6.3.1

## Enhancements

1. Fix rendering percentage`(%)` symcol correctly when displaying Autocomplete results.

# 6.3.0

# Enhancements

1. Added Unified Search component `hawksearch-unifiedsearch-field` that allows Keyword and Concept search simultaneously.
2. Support multiple rotating placeholder examples with a typing-out effect on searchbar components: `search-field`, `conceptsearch-field`, `imagesearch-field` and `unified-search`.
3. Multiple performance and stability improvements.

# 6.2.10

## Enhancements

1. Provide additional Result Item parameters on `hawksearch:conversationalsearch` component.

# 6.2.9

## Bug Fixes

1. Fix consistency issues when reading and writing `queryStringParams` on custom implementations.

# 6.2.8

## Bug Fixes

1. Update `hawksearch-autocomplete` default template to also render Suggested Product/Content without categories.

# 6.2.6

## Bug Fixes

1. Prevent `queryStringParams` being overriden when generating a SearchUrl with custom query parameters.

# 6.2.5

## Bug Fixes

1. Fix issue where VisualSearch queries would append on Search URL.

# 6.2.4

## Enhancements

1. Added `hawksearch:visualsearch-upload-failed` event hooks on VisualSearch component to better handle errors when uploading images.

## Bug Fixes

1. Fix issue where workbench layout options are inconsistent when rendering Recommendation component.

# 6.2.3

## Bug Fixes

1. Fix issue where recent queries are not decoded.

# 6.2.2

## Bug Fixes

1. Fixed bug in tracking API when clicking an item.

# 6.2.1

## Enhancements

1. Modified SearchService so that `hawksearch:search-failed` event fires before if the search fails due to any error.

# 6.2.0

## Enhancements

1. Added Conversational Search component `hawksearch-conversationalsearch` that allows thread maintained prompt driven search.
2. Added SmartResponse component `hawksearch-smartresponse` that allows prompt driven analysis of search results.

# 6.1.13

## Bug Fixes

1. Resolved an issue where changing the page size retained the previous pagination page, resulting in zero records displayed.

# 6.1.12

## Enhancements

1. Pagination links contains all query params, so facets and filters remain consistent when opening multiple pages in new tabs.

# 6.1.10

## Enhancements

1. Suggest `Popular Searches` on Autocomplete popup without needing products or Categories to match the query.

# 6.1.9

## Enhancements

1. Make decodeQuery and decodeFacetValue defaults to true on Search and Autocomplete services.

## Bug Fixes

1. Fix issue where facets and categories on Autocomplete popup are not decoded.

# 6.1.8

## Bug Fixes

1. Fix issue whererange facet not working when currency or number are false.

# 6.1.7

## Enhancements

1. Added `HawkSearch.config.components.['search-field'].disableAutofill` property with a default value of `false` to Specify whether the input element should be pre-populared if "query" parameter exists on the URL.

# 6.1.4

## Bug Fixes

1. Fixed bug with Quick Lookup filtering not handling special characters correctly, e.g. '(',')', etc

# 6.1.3

## Enhancements

1. Added new icons `send` and `reset`

# 6.1.2

## Enhancements

1. Added new icon `message`

# 6.1.1

## Enhancements

1. Added new icons as `hawksearch-icon` components

# 6.1.0

## Enhancements

1. Added smart search component `hawksearch-visualsearch-field` to search using images to find other similar images
2. Added smart search component `hawksearch-imagesearch-field` to search using a text-based query and finds the most relevant images based on the text provided
3. Added smart search component `hawksearch-conceptsearch-field` to search using a sentence or a concept and finds the most relevant results based on the text provided

# 6.0.0

## Enhancements

1. Build output now generated by Vite instead of Webpack
2. External assets such as default CSS and icons are now bundled directly in JavaScript file to minimize the number of HTTP requests
3. Build output now contains cjs, es, and umd formats along with typing to allow custom implementations to reference this as a libary
4. Changed TypeDoc theme to support latest version of Typedoc and allow bundling in npm package
5. Added support for storing custom templates in `script` as an alternative to `template` elements for greater flexibility and avoiding some edge case browser issues
6. Tests added and executed by `vitest`

## Bug Fixes

1. Prevented "empty" range facets from displaying when facet configuration is incorrect
2. Add decodeURI helper for Templates

## Breaking Changes

1. Hawksearch configuration requires executing the `HawkSearch.init` function which should be triggered after `hawksearch:loaded` event

# 5.2.5

## New Features

1. Suggest `Popular Searches` on Autocomplete popup without needing products or Categories to match the query.

# 5.2.4

## New Features

1. Make `decodeQuery` and `decodeFacetValue` defaults to `true` on Search and Autocomplete services.

## Bug Fixes

1. Fix issue where facets and categories on Autocomplete popup are not decoded.

# 5.2.3

## Bug Fixes

1. Fix issue where facets and categories on Autocomplete popup are not decoded.

# 5.2.2

## New Features

1. Added `HawkSearch.config.components.['search-field'].disableAutofill` property with a default value of `false` to Specify whether the input element should be pre-populared if "query" parameter exists on the URL.

# 5.2.1

## Bug Fixes

1. Added support to successfully upgrade v5.1.x implementations

## Breaking Changes

1. Prevents implementations of components in v6, e.g. ConceptSearch, VisualSearch, ImageSearch

# 5.0.19

## Bug Fixes

1. Fixed bug with Quick Lookup filtering not handling special characters correctly, e.g. '(',')', etc

# 5.0.17

## Enhancements

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

# 5.0.16

## Enhancements

1. Add support for script elements for custom templates
2. Added support for content result images in default templates

## Bug Fixes

1. Added check to not display range facets that do not have range data (from API bug)

# 5.0.15

## Bug Fixes

1. Fixed bug with QueryString not adding correct param names when same facet parents are selected

# 5.0.1

## Bug Fixes

1. Fixed bug in API endpoint construction when overriding the default `endpointUrl` for Autocomplete

# 5.0.0

## Enhancements

1. Added VariantSelectorComponent
2. Implemented VariantSelectorComponent in default templates for search results, featured items, recommendations, and autocomplete

## Bug Fixes

1. Updated the `attributes` collection on recommendation items to split single string values by `|^|` into string arrays
2. Added logic to catch HTTP errors in service layer

## Breaking Changes

1. Modified JSON structure for field mapping configuration
2. The `attributes` collection on recommendation items now consists of the data in `customDict` from the API response rather than preserving `customDict` as a nested property

# 4.0.4

1. Modified RecommendationsService to transform response properties into arrays to be consistent with search results and autocomplete
2. Modified `attributes` property on `RecommendationsItem` to include only the properties from `customDict` on the API response. The other properties from the response are standard so repeating them under `attributes` does not make sense.
3. Fixed bug with autocomplete top categories links not working when not on search results page
4. Fixed parameter name in order tracking event data

# 4.0.3

1. Fixed URL parsing logic to avoid prepending domain when API returns a value starting with `//`

# 4.0.2

1. Updated `number` and `currency` Handlebars helpers to handle string values from API and made decimals parameter optional

# 4.0.1

1. Modified SearchService so that `hawksearch:after-search-completed` event fires before SEO elements are set

# 4.0.0

## Enhancements

1. Added `HawkSearch.config.autocomplete.recommendationsEnabled` property with a default value of `false` to toggle autocomplete recommendations (instant engage)
2. Added new RatingComponent to be displayed on SearchResultsItemComponent, RecommendationsItemComponent, and FeaturedItemsContentItemComponent.
3. Added product ratings and prices to autocomplete
4. Added suggested queries (did you mean?) to autocomplete

## Bug Fixes

1. Converting `price` and `salePrice` values of 0 to `undefined`
2. Fixed price rendering logic in default templates of SearchResultsItemComponent, RecommendationsItemComponent, and FeaturedItemsContentItemComponent

## Breaking Changes

1. Refactored HawkSearchConfig structure to group properties by search, autocomplete, and recommendations. Some property names have changed slightly.
2. Modified endpoints configuration to expect only domain rather than full API URL

# 3.0.0

## Enhancements

1. Added support for A/B testing in Recommendations component
2. Added support for default autocomplete without entering a query
3. Modified autocomplete to display when refocusing on search field
4. Added optional `item-id` attribute to Recommendations component
5. Added instance-level configuration overrides through `config` attribute or `configOverride` property

## Bug Fixes

1. Fixed script file name and configuration link in documentation
2. Fixed bug requiring double-click to expand facet that is collapsed by default

## Breaking Changes

1. Removed unused option to define custom component template as child content of tag to provide future possibility of using slots or declarative Shadow DOM

# 2.0.0

## Enhancements

1. Added Landing Pages components
2. Added Recommendations components
3. Added component-level configuration to support functionality toggles and easy string replacements
4. Added `hawksearch:before-${componentName}-rendered` event hooks to support passing custom data to Handlebars templates
5. Added configuration setting to toggle facet exclude value functionality. This is now disabled by default.
6. Added ability to load CSS styles without requiring an external stylesheet
7. Added customizable index to search results, autocomplete, and recommendations requests
8. Added ability to set product as default search results item type
9. Added alternate `[[value]]` syntax to work the same as the default Handlerbars `{{value}}` syntax to avoid conflicts when customizing templates within BigCommerce
10. Added support for nested object properties in field mappings
11. Added rendering of canonical URL including search refinements
12. Added configurable facet exclusion prefix
13. Implemented TypeDoc code-generated documentation to ensure it remains up-to-date and available for each version

## Bug Fixes

1. Fixed Autocomplete template name
2. Added logic to handle scrolling facets by setting a max-height in default template

## Breaking Changes

1. Changed entry file from `hawksearch-handlebars-ui.js` to `index.js`
2. Renamed `Hawksearch` global object to `HawkSearch`
3. Changes to `HawkSearch.config` model to support enhancements
