@bridgeline-digital/hawksearch-handlebars-ui 5.2.6 → 5.2.8
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/base.component.d.ts +139 -0
- package/dist/components/content/content-types/base-content.component.d.ts +9 -0
- package/dist/components/content/content-types/custom-content/custom-content.component.d.ts +21 -0
- package/dist/components/content/content-types/featured-items-content/featured-items-content.component.d.ts +22 -0
- package/dist/components/content/content-types/featured-items-content-item/featured-items-content-item.component.d.ts +39 -0
- package/dist/components/content/content-types/image-content/image-content.component.d.ts +22 -0
- package/dist/components/content/content-types/index.d.ts +6 -0
- package/dist/components/content/content-types/popular-queries-content/popular-queries-content.component.d.ts +22 -0
- package/dist/components/content/content-zone/content-zone.component.d.ts +44 -0
- package/dist/components/content/index.d.ts +2 -0
- package/dist/components/general/date-picker/date-picker.component.d.ts +117 -0
- package/dist/components/general/icon/icon.component.d.ts +38 -0
- package/dist/components/general/index.d.ts +5 -0
- package/dist/components/general/range-slider/range-slider.component.d.ts +54 -0
- package/dist/components/general/rating/rating.component.d.ts +39 -0
- package/dist/components/general/tooltip/tooltip.component.d.ts +32 -0
- package/dist/components/index.d.ts +231 -0
- package/dist/components/landing-pages/index.d.ts +1 -0
- package/dist/components/landing-pages/landing-page/landing-page.component.d.ts +32 -0
- package/dist/components/recommendations/index.d.ts +2 -0
- package/dist/components/recommendations/recommendations/recommendations.component.d.ts +87 -0
- package/dist/components/recommendations/recommendations-item/recommendations-item.component.d.ts +40 -0
- package/dist/components/search/autocomplete/autocomplete.component.d.ts +59 -0
- package/dist/components/search/facet-types/base-facet.component.d.ts +44 -0
- package/dist/components/search/facet-types/checkbox-list-facet/checkbox-list-facet.component.d.ts +36 -0
- package/dist/components/search/facet-types/color-facet/color-facet.component.d.ts +24 -0
- package/dist/components/search/facet-types/date-range-facet/date-range-facet.component.d.ts +33 -0
- package/dist/components/search/facet-types/index.d.ts +11 -0
- package/dist/components/search/facet-types/linked-list-facet/link-list-facet.component.d.ts +24 -0
- package/dist/components/search/facet-types/numeric-range-facet/numeric-range-facet.component.d.ts +32 -0
- package/dist/components/search/facet-types/range-slider-facet/range-slider-facet.component.d.ts +34 -0
- package/dist/components/search/facet-types/recent-searches-facet/recent-searches-facet.component.d.ts +29 -0
- package/dist/components/search/facet-types/related-searches-facet/related-searches-facet.component.d.ts +29 -0
- package/dist/components/search/facet-types/search-within-facet/search-within-facet.component.d.ts +29 -0
- package/dist/components/search/facet-types/size-facet/size-facet.component.d.ts +24 -0
- package/dist/components/search/facet-wrapper/facet-wrapper.component.d.ts +47 -0
- package/dist/components/search/facets-list/facets-list.component.d.ts +32 -0
- package/dist/components/search/index.d.ts +15 -0
- package/dist/components/search/modified-query/modified-query.component.d.ts +32 -0
- package/dist/components/search/page-size/page-size.component.d.ts +32 -0
- package/dist/components/search/pagination/pagination.component.d.ts +43 -0
- package/dist/components/search/query-suggestions/query-suggestions.component.d.ts +38 -0
- package/dist/components/search/search-field/search-field.component.d.ts +40 -0
- package/dist/components/search/search-results/search-results.component.d.ts +34 -0
- package/dist/components/search/search-results-item/search-results-item.component.d.ts +38 -0
- package/dist/components/search/search-results-list/search-results-list.component.d.ts +23 -0
- package/dist/components/search/selected-facets/selected-facets.component.d.ts +31 -0
- package/dist/components/search/sorting/sorting.component.d.ts +30 -0
- package/dist/components/search/tabs/dist/tabs.component.spec.d.ts +1 -0
- package/dist/components/search/tabs/tabs.component.d.ts +30 -0
- package/dist/components/variants/index.d.ts +1 -0
- package/dist/components/variants/variant-selector/variant-selector.component.d.ts +23 -0
- package/dist/configuration/configuration.models.d.ts +609 -0
- package/dist/configuration/index.d.ts +4 -0
- package/dist/helpers/helpers.d.ts +221 -0
- package/dist/helpers/index.d.ts +4 -0
- package/dist/index.d.ts +1 -1438
- package/dist/index.html +102 -0
- package/dist/index.js +20108 -0
- package/dist/index.js.map +1 -0
- package/dist/landing-page-custom.html +45 -0
- package/dist/landing-page-products.html +45 -0
- package/dist/models/autocomplete.models.d.ts +85 -0
- package/dist/models/base.models.d.ts +50 -0
- package/dist/models/component.models.d.ts +453 -0
- package/dist/models/content.models.d.ts +94 -0
- package/dist/models/index.d.ts +11 -0
- package/dist/models/raw/index.d.ts +4 -0
- package/dist/models/raw/raw-autocomplete.models.d.ts +51 -0
- package/dist/models/raw/raw-base.models.d.ts +8 -0
- package/dist/models/raw/raw-recommendation.models.d.ts +39 -0
- package/dist/models/raw/raw-search.models.d.ts +191 -0
- package/dist/models/recommendation.models.d.ts +31 -0
- package/dist/models/search.models.d.ts +237 -0
- package/dist/models/tracking.models.d.ts +42 -0
- package/dist/placeholder.c99b7374b9bf579d0fd0.png +0 -0
- package/dist/recommendations.html +45 -0
- package/dist/services/autocomplete.service.d.ts +11 -0
- package/dist/services/base.service.d.ts +63 -0
- package/dist/services/index.d.ts +8 -0
- package/dist/services/recommendations.service.d.ts +10 -0
- package/dist/services/search.service.d.ts +53 -0
- package/dist/services/tracking.service.d.ts +29 -0
- package/dist/styles.328cd3af2ed43ff243ce7ffede0f447c.css +1896 -0
- package/dist/utilities/colors.d.ts +1 -0
- package/dist/utilities/dates.d.ts +4 -0
- package/dist/utilities/decodes.d.ts +1 -0
- package/dist/utilities/formatters.d.ts +4 -0
- package/dist/utilities/index.d.ts +7 -0
- package/dist/variants.html +63 -0
- package/package.json +1 -1
- package/dist/hawksearch-handlebars-ui.cjs +0 -10
- package/dist/hawksearch-handlebars-ui.js +0 -11623
- package/dist/hawksearch-handlebars-ui.min.js +0 -975
- package/dist/hawksearch-handlebars-ui.umd.cjs +0 -10
package/dist/components/search/facet-types/range-slider-facet/range-slider-facet.component.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { HawkSearchComponents, RangeSliderFacetComponentConfig } from '@configuration';
|
|
2
|
+
import { RangeSliderFacetComponentModel } from '@models';
|
|
3
|
+
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Range Slider Facet component renders a {@link Components.RangeSliderComponent | Range Slider component} and number input elements for minimum and maximum value.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-range-slider-facet>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-start | |
|
|
14
|
+
* | hawksearch-end | |
|
|
15
|
+
*
|
|
16
|
+
* These attributes should be placed on number input elements. When these elements lose focus (blurred), the entered range will be applied as a facet value.
|
|
17
|
+
*
|
|
18
|
+
* ## Default Template
|
|
19
|
+
* 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.
|
|
20
|
+
* {@embed ./range-slider-facet.component.hbs}
|
|
21
|
+
*
|
|
22
|
+
* @category Facet Types
|
|
23
|
+
*/
|
|
24
|
+
export declare class RangeSliderFacetComponent extends BaseFacetComponent<RangeSliderFacetComponentConfig, RangeSliderFacetComponentModel> {
|
|
25
|
+
protected componentName: keyof HawkSearchComponents;
|
|
26
|
+
protected defaultHtml: any;
|
|
27
|
+
private get range();
|
|
28
|
+
protected renderContent(): boolean;
|
|
29
|
+
protected getContentModel(): RangeSliderFacetComponentModel;
|
|
30
|
+
protected onRender(): void;
|
|
31
|
+
private getRange;
|
|
32
|
+
private updateInputElements;
|
|
33
|
+
private setFacetValue;
|
|
34
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HawkSearchComponents, RecentSearchesFacetComponentConfig } from '@configuration';
|
|
2
|
+
import { RecentSearchesFacetComponentModel } from '@models';
|
|
3
|
+
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Recent Searches Facet component displays a list of the five most recent searches performed by a user.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-recent-searches-facet>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-query | `string` |
|
|
14
|
+
*
|
|
15
|
+
* When an element with this attribute is clicked, the click will be tracked and a new search will be executed with that query.
|
|
16
|
+
*
|
|
17
|
+
* ## Default Template
|
|
18
|
+
* 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.
|
|
19
|
+
* {@embed ./recent-searches-facet.component.hbs}
|
|
20
|
+
*
|
|
21
|
+
* @category Facet Types
|
|
22
|
+
*/
|
|
23
|
+
export declare class RecentSearchesFacetComponent extends BaseFacetComponent<RecentSearchesFacetComponentConfig, RecentSearchesFacetComponentModel> {
|
|
24
|
+
protected componentName: keyof HawkSearchComponents;
|
|
25
|
+
protected defaultHtml: any;
|
|
26
|
+
protected renderContent(): boolean;
|
|
27
|
+
protected getContentModel(): RecentSearchesFacetComponentModel;
|
|
28
|
+
protected onRender(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HawkSearchComponents, RelatedSearchesFacetComponentConfig } from '@configuration';
|
|
2
|
+
import { RelatedSearchesFacetComponentModel } from '@models';
|
|
3
|
+
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Related Searches Facet component displays a list of queries related to the current query.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-related-searches-facet>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-query | `string` |
|
|
14
|
+
*
|
|
15
|
+
* When an element with this attribute is clicked, the click will be tracked and a new search will be executed with that query.
|
|
16
|
+
*
|
|
17
|
+
* ## Default Template
|
|
18
|
+
* 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.
|
|
19
|
+
* {@embed ./related-searches-facet.component.hbs}
|
|
20
|
+
*
|
|
21
|
+
* @category Facet Types
|
|
22
|
+
*/
|
|
23
|
+
export declare class RelatedSearchesFacetComponent extends BaseFacetComponent<RelatedSearchesFacetComponentConfig, RelatedSearchesFacetComponentModel> {
|
|
24
|
+
protected componentName: keyof HawkSearchComponents;
|
|
25
|
+
protected defaultHtml: any;
|
|
26
|
+
protected renderContent(): boolean;
|
|
27
|
+
protected getContentModel(): RelatedSearchesFacetComponentModel;
|
|
28
|
+
protected onRender(): void;
|
|
29
|
+
}
|
package/dist/components/search/facet-types/search-within-facet/search-within-facet.component.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HawkSearchComponents, SearchWithinFacetComponentConfig } from '@configuration';
|
|
2
|
+
import { SearchWithinFacetComponentModel } from '@models';
|
|
3
|
+
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Search Within Facet component allows the user to enter keywords to further refine the list of search results.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-search-within-facet>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-input | |
|
|
14
|
+
*
|
|
15
|
+
* When the value of an input element with this attribute changes, that value will be used to refine the list of search results.
|
|
16
|
+
*
|
|
17
|
+
* ## Default Template
|
|
18
|
+
* 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.
|
|
19
|
+
* {@embed ./search-within-facet.component.hbs}
|
|
20
|
+
*
|
|
21
|
+
* @category Facet Types
|
|
22
|
+
*/
|
|
23
|
+
export declare class SearchWithinFacetComponent extends BaseFacetComponent<SearchWithinFacetComponentConfig, SearchWithinFacetComponentModel> {
|
|
24
|
+
protected componentName: keyof HawkSearchComponents;
|
|
25
|
+
protected defaultHtml: any;
|
|
26
|
+
protected renderContent(): boolean;
|
|
27
|
+
protected getContentModel(): SearchWithinFacetComponentModel;
|
|
28
|
+
protected onRender(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HawkSearchComponents, SizeFacetComponentConfig } from '@configuration';
|
|
2
|
+
import { SizeFacetComponentModel } from '@models';
|
|
3
|
+
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Size Facet component displays a list of product sizes in a grid format.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-size-facet>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* *Note: For Event-Binding attributes common to all facet type components, see {@link Components.BaseFacetComponent}.*
|
|
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 ./size-facet.component.hbs}
|
|
16
|
+
*
|
|
17
|
+
* @category Facet Types
|
|
18
|
+
*/
|
|
19
|
+
export declare class SizeFacetComponent extends BaseFacetComponent<SizeFacetComponentConfig, SizeFacetComponentModel> {
|
|
20
|
+
protected componentName: keyof HawkSearchComponents;
|
|
21
|
+
protected defaultHtml: any;
|
|
22
|
+
protected renderContent(): boolean;
|
|
23
|
+
protected getContentModel(): SizeFacetComponentModel;
|
|
24
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { FacetWrapperComponentConfig, HawkSearchComponents } from '@configuration';
|
|
3
|
+
import { Facet, FacetState, FacetWrapperComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Facet Wrapper component adds functionality common to all facet types such as expand/collapse, tooltip, and value search.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-facet-wrapper>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-facet-heading | |
|
|
14
|
+
*
|
|
15
|
+
* When an element with this attribute is clicked, the {@link Models.FacetWrapperComponentModel.collapsed} value will be reversed. This is intended to show/hide the list of facet values to make the list of facets more manageable.
|
|
16
|
+
*
|
|
17
|
+
* | Name | Value |
|
|
18
|
+
* | :- | :- |
|
|
19
|
+
* | hawksearch-facet-search | |
|
|
20
|
+
*
|
|
21
|
+
* When the user types in an input element with this attribute, the {@link Models.FacetWrapperComponentModel.values} collection will be filtered to show only values containing the entered text.
|
|
22
|
+
*
|
|
23
|
+
* | Name | Value |
|
|
24
|
+
* | :- | :- |
|
|
25
|
+
* | hawksearch-facet | |
|
|
26
|
+
*
|
|
27
|
+
* The tag for each facet type must have this attribute to have data bound to it.
|
|
28
|
+
*
|
|
29
|
+
* This helper function returns the zero-padded day of the month from a provided date object.
|
|
30
|
+
*
|
|
31
|
+
* ## Default Template
|
|
32
|
+
* 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.
|
|
33
|
+
* {@embed ./facet-wrapper.component.hbs}
|
|
34
|
+
*
|
|
35
|
+
* @category Search
|
|
36
|
+
*/
|
|
37
|
+
export declare class FacetWrapperComponent extends BaseComponent<FacetWrapperComponentConfig, Facet, FacetWrapperComponentModel> {
|
|
38
|
+
protected componentName: keyof HawkSearchComponents;
|
|
39
|
+
protected defaultHtml: any;
|
|
40
|
+
protected bindFromEvent: boolean;
|
|
41
|
+
state: FacetState;
|
|
42
|
+
protected renderContent(): boolean;
|
|
43
|
+
protected getContentModel(): FacetWrapperComponentModel;
|
|
44
|
+
protected bindChildElements(): void;
|
|
45
|
+
protected onRender(): void;
|
|
46
|
+
private rebindChildElements;
|
|
47
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { FacetsListComponentConfig, HawkSearchComponents } from '@configuration';
|
|
3
|
+
import { Facet, FacetsListComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Facets List component displays a list of available facets with a toggle to expand/collapse on mobile devices.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-facets-list>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-mobile-toggle | |
|
|
14
|
+
*
|
|
15
|
+
* When an element with this attribute is clicked, the {@link Models.FacetsListComponentModel.expanded} value will be reversed. This is intended to show/hide the list of facets on mobile devices.
|
|
16
|
+
*
|
|
17
|
+
* ## Default Template
|
|
18
|
+
* 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.
|
|
19
|
+
* {@embed ./facets-list.component.hbs}
|
|
20
|
+
*
|
|
21
|
+
* @category Search
|
|
22
|
+
*/
|
|
23
|
+
export declare class FacetsListComponent extends BaseComponent<FacetsListComponentConfig, Array<Facet>, FacetsListComponentModel> {
|
|
24
|
+
protected componentName: keyof HawkSearchComponents;
|
|
25
|
+
protected defaultHtml: any;
|
|
26
|
+
protected bindFromEvent: boolean;
|
|
27
|
+
private readonly state;
|
|
28
|
+
protected renderContent(): boolean;
|
|
29
|
+
protected getContentModel(): FacetsListComponentModel;
|
|
30
|
+
protected bindChildElements(): void;
|
|
31
|
+
protected onRender(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './autocomplete/autocomplete.component';
|
|
2
|
+
export * from './facet-types';
|
|
3
|
+
export * from './facet-wrapper/facet-wrapper.component';
|
|
4
|
+
export * from './facets-list/facets-list.component';
|
|
5
|
+
export * from './modified-query/modified-query.component';
|
|
6
|
+
export * from './page-size/page-size.component';
|
|
7
|
+
export * from './pagination/pagination.component';
|
|
8
|
+
export * from './query-suggestions/query-suggestions.component';
|
|
9
|
+
export * from './search-field/search-field.component';
|
|
10
|
+
export * from './search-results-item/search-results-item.component';
|
|
11
|
+
export * from './search-results-list/search-results-list.component';
|
|
12
|
+
export * from './search-results/search-results.component';
|
|
13
|
+
export * from './selected-facets/selected-facets.component';
|
|
14
|
+
export * from './sorting/sorting.component';
|
|
15
|
+
export * from './tabs/tabs.component';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, ModifiedQueryComponentConfig } from '@configuration';
|
|
3
|
+
import { ModifiedQueryComponentModel, ModifiedQueryData } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Modified Query component is rendered when the spellchecker detects a spelling error and searches for the correctly-spelled query instead.
|
|
6
|
+
*
|
|
7
|
+
* *Note: This component is only visible for new searches. If the spellchecker revises a query and the user then performs an action such as applying facet or moving to another page of results, it is implied that the user accepts the correction.*
|
|
8
|
+
*
|
|
9
|
+
* ## Tag
|
|
10
|
+
* The tag for this component is `<hawksearch-modified-query>`.
|
|
11
|
+
*
|
|
12
|
+
* ## Event-Binding Attributes
|
|
13
|
+
* | Name | Value |
|
|
14
|
+
* | :- | :- |
|
|
15
|
+
* | hawksearch-query | `string` |
|
|
16
|
+
*
|
|
17
|
+
* When an element with this attribute is clicked, a new search will be executed with the specified query and spellcheck functionality disabled. This is useful when the spellchecker mistakes a valid entry for another term.
|
|
18
|
+
*
|
|
19
|
+
* ## Default Template
|
|
20
|
+
* 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.
|
|
21
|
+
* {@embed ./modified-query.component.hbs}
|
|
22
|
+
*
|
|
23
|
+
* @category Search
|
|
24
|
+
*/
|
|
25
|
+
export declare class ModifiedQueryComponent extends BaseComponent<ModifiedQueryComponentConfig, ModifiedQueryData, ModifiedQueryComponentModel> {
|
|
26
|
+
protected componentName: keyof HawkSearchComponents;
|
|
27
|
+
protected defaultHtml: any;
|
|
28
|
+
protected bindFromEvent: boolean;
|
|
29
|
+
protected renderContent(): boolean;
|
|
30
|
+
protected getContentModel(): ModifiedQueryComponentModel;
|
|
31
|
+
protected onRender(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, PageSizeComponentConfig } from '@configuration';
|
|
3
|
+
import { PageSizeComponentModel, PaginationOption } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Page Size component is used to modify the number of search results displayed on each page.
|
|
6
|
+
*
|
|
7
|
+
* *Note: When the page size changes, the first page will automatically be selected.*
|
|
8
|
+
*
|
|
9
|
+
* ## Tag
|
|
10
|
+
* The tag for this component is `<hawksearch-page-size>`.
|
|
11
|
+
*
|
|
12
|
+
* ## Event-Binding Attributes
|
|
13
|
+
* | Name | Value |
|
|
14
|
+
* | :- | :- |
|
|
15
|
+
* | hawksearch-page-size | |
|
|
16
|
+
*
|
|
17
|
+
* When a `select` element with this attribute changes in value, the search will be updated to use that value as the new page size.
|
|
18
|
+
*
|
|
19
|
+
* ## Default Template
|
|
20
|
+
* 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.
|
|
21
|
+
* {@embed ./page-size.component.hbs}
|
|
22
|
+
*
|
|
23
|
+
* @category Search
|
|
24
|
+
*/
|
|
25
|
+
export declare class PageSizeComponent extends BaseComponent<PageSizeComponentConfig, Array<PaginationOption>, PageSizeComponentModel> {
|
|
26
|
+
protected componentName: keyof HawkSearchComponents;
|
|
27
|
+
protected defaultHtml: any;
|
|
28
|
+
protected bindFromEvent: boolean;
|
|
29
|
+
protected renderContent(): boolean;
|
|
30
|
+
protected getContentModel(): PageSizeComponentModel;
|
|
31
|
+
protected onRender(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, PaginationComponentConfig } from '@configuration';
|
|
3
|
+
import { Pagination, PaginationComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Pagination component is used to navigate between different pages of a search results set.
|
|
6
|
+
*
|
|
7
|
+
* *Note: If no maximum number of page links to display is configured in the HawkSearch admin, a default value of `9` will be used.*
|
|
8
|
+
*
|
|
9
|
+
* ## Tag
|
|
10
|
+
* The tag for this component is `<hawksearch-pagination>`.
|
|
11
|
+
*
|
|
12
|
+
* ## Event-Binding Attributes
|
|
13
|
+
* | Name | Value |
|
|
14
|
+
* | :- | :- |
|
|
15
|
+
* | hawksearch-page | `number` |
|
|
16
|
+
*
|
|
17
|
+
* When an element with this attribute is clicked, the current search will be updated to display the results from the specified page.
|
|
18
|
+
*
|
|
19
|
+
* ## Handlebars Helpers
|
|
20
|
+
* | Name | Parameter |
|
|
21
|
+
* | :- | :- |
|
|
22
|
+
* | pageUrl | `number` |
|
|
23
|
+
*
|
|
24
|
+
* This helper function returns the URL for the specified page to enable crawling.
|
|
25
|
+
*
|
|
26
|
+
* ## Default Template
|
|
27
|
+
* 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.
|
|
28
|
+
* {@embed ./pagination.component.hbs}
|
|
29
|
+
*
|
|
30
|
+
* @category Search
|
|
31
|
+
*/
|
|
32
|
+
export declare class PaginationComponent extends BaseComponent<PaginationComponentConfig, Pagination, PaginationComponentModel> {
|
|
33
|
+
protected componentName: keyof HawkSearchComponents;
|
|
34
|
+
protected defaultHtml: any;
|
|
35
|
+
protected bindFromEvent: boolean;
|
|
36
|
+
private defaultMaxPageLinks;
|
|
37
|
+
protected registerHelpers(): void;
|
|
38
|
+
protected renderContent(): boolean;
|
|
39
|
+
protected getContentModel(): PaginationComponentModel;
|
|
40
|
+
protected onRender(): void;
|
|
41
|
+
protected setPage(page: number): Promise<void>;
|
|
42
|
+
private getPages;
|
|
43
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, QuerySuggestionsComponentConfig } from '@configuration';
|
|
3
|
+
import { QuerySuggestionsComponentModel, QuerySuggestionsData } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Query Suggestions component displays a list of possible queries that the search engine detects the user may be looking for.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-query-suggestions>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-query | `string` |
|
|
14
|
+
*
|
|
15
|
+
* When an element with this attribute is clicked, a new search will be formed for the specified query.
|
|
16
|
+
*
|
|
17
|
+
* ## Handlebars Helpers
|
|
18
|
+
* | Name | Parameter |
|
|
19
|
+
* | :- | :- |
|
|
20
|
+
* | query-suggestions | `Array<string>` |
|
|
21
|
+
*
|
|
22
|
+
* This helper function creates a comma-separated list of links with the `hawksearch-query` attribute, using the word “or” before the last link.
|
|
23
|
+
*
|
|
24
|
+
* ## Default Template
|
|
25
|
+
* 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.
|
|
26
|
+
* {@embed ./query-suggestions.component.hbs}
|
|
27
|
+
*
|
|
28
|
+
* @category Search
|
|
29
|
+
*/
|
|
30
|
+
export declare class QuerySuggestionsComponent extends BaseComponent<QuerySuggestionsComponentConfig, QuerySuggestionsData, QuerySuggestionsComponentModel> {
|
|
31
|
+
protected componentName: keyof HawkSearchComponents;
|
|
32
|
+
protected defaultHtml: any;
|
|
33
|
+
protected bindFromEvent: boolean;
|
|
34
|
+
protected registerHelpers(): void;
|
|
35
|
+
protected renderContent(): boolean;
|
|
36
|
+
protected getContentModel(): QuerySuggestionsComponentModel;
|
|
37
|
+
protected onRender(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, SearchFieldComponentConfig } from '@configuration';
|
|
3
|
+
import { SearchFieldComponentModel, SearchResponse } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Search component contains a text 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-search-field>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-input | |
|
|
14
|
+
*
|
|
15
|
+
* Input elements with this attribute will trigger {@link Components.AutocompleteComponent | Autocomplete} functionality when the user types and executes a new search when the user hits the `enter` key.
|
|
16
|
+
*
|
|
17
|
+
* ## Default Template
|
|
18
|
+
* 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.
|
|
19
|
+
* {@embed ./search-field.component.hbs}
|
|
20
|
+
*
|
|
21
|
+
* @category Search
|
|
22
|
+
*/
|
|
23
|
+
export declare class SearchFieldComponent extends BaseComponent<SearchFieldComponentConfig, SearchResponse, SearchFieldComponentModel> {
|
|
24
|
+
protected componentName: keyof HawkSearchComponents;
|
|
25
|
+
protected defaultHtml: any;
|
|
26
|
+
protected bindFromEvent: boolean;
|
|
27
|
+
private clickEventHandler;
|
|
28
|
+
private defaultAutocompleteResponse?;
|
|
29
|
+
private previousAutocompleteResponse?;
|
|
30
|
+
private previousValue;
|
|
31
|
+
private get autocompleteMinCharacterCount();
|
|
32
|
+
private get recommendationsEnabled();
|
|
33
|
+
private get disableAutofill();
|
|
34
|
+
connectedCallback(): void;
|
|
35
|
+
disconnectedCallback(): void;
|
|
36
|
+
protected getContentModel(): SearchFieldComponentModel;
|
|
37
|
+
protected onRender(): void;
|
|
38
|
+
private toggleAutocomplete;
|
|
39
|
+
private displayDefaultAutocomplete;
|
|
40
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, SearchResultsComponentConfig } from '@configuration';
|
|
3
|
+
import { SearchResponse, SearchResultsComponentModel, SearchResultsMode } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Search Results component encapsulates all components relating to search-results.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-search-results>`.
|
|
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 ./search-results.component.hbs}
|
|
13
|
+
*
|
|
14
|
+
* @category Search
|
|
15
|
+
*/
|
|
16
|
+
export declare class SearchResultsComponent extends BaseComponent<SearchResultsComponentConfig, SearchResponse, SearchResultsComponentModel> {
|
|
17
|
+
protected componentName: keyof HawkSearchComponents;
|
|
18
|
+
protected defaultHtml: any;
|
|
19
|
+
protected bindFromEvent: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Speficies the context that the component is being used. This is determined by the `mode` attribute on the HTML element.
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue `'search-results'`
|
|
24
|
+
*/
|
|
25
|
+
protected get mode(): SearchResultsMode;
|
|
26
|
+
/**
|
|
27
|
+
* If {@link mode} is set to `'landing-page'`, this specifies the URL sent to retrieve content from HawkSearch. This can be customized by setting the `url` attribute on the HTML element.
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue `window.location.pathname`
|
|
30
|
+
*/
|
|
31
|
+
protected get url(): string;
|
|
32
|
+
constructor();
|
|
33
|
+
protected getContentModel(): SearchResultsComponentModel;
|
|
34
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, SearchResultsItemComponentConfig } from '@configuration';
|
|
3
|
+
import { SearchResultsItem, SearchResultsItemComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Search Results Item component displays information for an individual product or page.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-search-results-item>`.
|
|
9
|
+
*
|
|
10
|
+
* *Note: This component should only be used within the context of the {@link Components.SearchResultsListComponent | Search Results List component}.
|
|
11
|
+
*
|
|
12
|
+
* ## Event-Binding Attributes
|
|
13
|
+
* | Name | Value |
|
|
14
|
+
* | :- | :- |
|
|
15
|
+
* | hawksearch-image | |
|
|
16
|
+
*
|
|
17
|
+
* Image elements with this attribute will have their `src` value replaced with a placeholder image URL if the image fails to load.
|
|
18
|
+
*
|
|
19
|
+
* | Name | Value |
|
|
20
|
+
* | :- | :- |
|
|
21
|
+
* | hawksearch-link | |
|
|
22
|
+
*
|
|
23
|
+
* Anchor elements with this attribute will be tracked when clicked.
|
|
24
|
+
*
|
|
25
|
+
* ## Default Template
|
|
26
|
+
* 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.
|
|
27
|
+
* {@embed ./search-results-item.component.hbs}
|
|
28
|
+
*
|
|
29
|
+
* @category Search
|
|
30
|
+
*/
|
|
31
|
+
export declare class SearchResultsItemComponent extends BaseComponent<SearchResultsItemComponentConfig, SearchResultsItem, SearchResultsItemComponentModel> {
|
|
32
|
+
protected componentName: keyof HawkSearchComponents;
|
|
33
|
+
protected defaultHtml: any;
|
|
34
|
+
protected bindFromEvent: boolean;
|
|
35
|
+
protected renderContent(): boolean;
|
|
36
|
+
protected getContentModel(): SearchResultsItemComponentModel;
|
|
37
|
+
protected onRender(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, SearchResultsListComponentConfig } from '@configuration';
|
|
3
|
+
import { SearchResultsItem, SearchResultsListComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Search Results List component is a wrapper around a group of {@link Components.SearchResultsItemComponent | Search Results Item} components.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-search-results-list>`.
|
|
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 ./search-results-list.component.hbs}
|
|
13
|
+
*
|
|
14
|
+
* @category Search
|
|
15
|
+
*/
|
|
16
|
+
export declare class SearchResultsListComponent extends BaseComponent<SearchResultsListComponentConfig, Array<SearchResultsItem>, SearchResultsListComponentModel> {
|
|
17
|
+
protected componentName: keyof HawkSearchComponents;
|
|
18
|
+
protected defaultHtml: any;
|
|
19
|
+
protected bindFromEvent: boolean;
|
|
20
|
+
protected renderContent(): boolean;
|
|
21
|
+
protected getContentModel(): SearchResultsListComponentModel;
|
|
22
|
+
protected bindChildElements(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, SelectedFacetsComponentConfig } from '@configuration';
|
|
3
|
+
import { SelectedFacet, SelectedFacetsComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Selected Facets component displays a list of facets that have been selected by the user.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-selected-facets>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-facet-field | `string` |
|
|
14
|
+
* | hawksearch-facet-value | `string` |
|
|
15
|
+
*
|
|
16
|
+
* When an element with both of these attributes is clicked, that facet selection will be removed and the search results will be updated.
|
|
17
|
+
*
|
|
18
|
+
* ## Default Template
|
|
19
|
+
* 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.
|
|
20
|
+
* {@embed ./selected-facets.component.hbs}
|
|
21
|
+
*
|
|
22
|
+
* @category Search
|
|
23
|
+
*/
|
|
24
|
+
export declare class SelectedFacetsComponent extends BaseComponent<SelectedFacetsComponentConfig, Array<SelectedFacet>, SelectedFacetsComponentModel> {
|
|
25
|
+
protected componentName: keyof HawkSearchComponents;
|
|
26
|
+
protected defaultHtml: any;
|
|
27
|
+
protected bindFromEvent: boolean;
|
|
28
|
+
protected renderContent(): boolean;
|
|
29
|
+
protected getContentModel(): SelectedFacetsComponentModel;
|
|
30
|
+
protected onRender(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, SortingComponentConfig } from '@configuration';
|
|
3
|
+
import { Sorting, SortingComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Sorting component is used to select the logic for ordering search results.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-sorting>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-sort | |
|
|
14
|
+
*
|
|
15
|
+
* When a `select` element with this attribute changes in value, the search will be updated to use that value as the new sort order.
|
|
16
|
+
*
|
|
17
|
+
* ## Default Template
|
|
18
|
+
* 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.
|
|
19
|
+
* {@embed ./sorting.component.hbs}
|
|
20
|
+
*
|
|
21
|
+
* @category Search
|
|
22
|
+
*/
|
|
23
|
+
export declare class SortingComponent extends BaseComponent<SortingComponentConfig, Sorting, SortingComponentModel> {
|
|
24
|
+
protected componentName: keyof HawkSearchComponents;
|
|
25
|
+
protected defaultHtml: any;
|
|
26
|
+
protected bindFromEvent: boolean;
|
|
27
|
+
protected renderContent(): boolean;
|
|
28
|
+
protected getContentModel(): SortingComponentModel;
|
|
29
|
+
protected onRender(): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __esModule: true;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, TabsComponentConfig } from '@configuration';
|
|
3
|
+
import { Facet, TabsComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Tabs component is used to segment search results by item type, often products and content.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-tabs>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-tab-value | `string` |
|
|
14
|
+
*
|
|
15
|
+
* When an element with this attribute is clicked, the specified tab facet value will be selected and the search results will update.
|
|
16
|
+
*
|
|
17
|
+
* ## Default Template
|
|
18
|
+
* 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.
|
|
19
|
+
* {@embed ./tabs.component.hbs}
|
|
20
|
+
*
|
|
21
|
+
* @category Search
|
|
22
|
+
*/
|
|
23
|
+
export declare class TabsComponent extends BaseComponent<TabsComponentConfig, Facet, TabsComponentModel> {
|
|
24
|
+
protected componentName: keyof HawkSearchComponents;
|
|
25
|
+
protected defaultHtml: any;
|
|
26
|
+
protected bindFromEvent: boolean;
|
|
27
|
+
protected renderContent(): boolean;
|
|
28
|
+
protected getContentModel(): TabsComponentModel;
|
|
29
|
+
protected onRender(): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './variant-selector/variant-selector.component';
|