@bridgeline-digital/hawksearch-handlebars-ui 5.0.0 → 5.0.4
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 +106 -102
- package/dist/components/base.component.d.ts +139 -139
- package/dist/components/content/content-types/base-content.component.d.ts +9 -9
- package/dist/components/content/content-types/custom-content/custom-content.component.d.ts +21 -21
- package/dist/components/content/content-types/featured-items-content/featured-items-content.component.d.ts +22 -22
- package/dist/components/content/content-types/featured-items-content-item/featured-items-content-item.component.d.ts +39 -39
- package/dist/components/content/content-types/image-content/image-content.component.d.ts +22 -22
- package/dist/components/content/content-types/index.d.ts +6 -6
- package/dist/components/content/content-types/popular-queries-content/popular-queries-content.component.d.ts +22 -22
- package/dist/components/content/content-zone/content-zone.component.d.ts +44 -44
- package/dist/components/content/index.d.ts +2 -2
- package/dist/components/general/date-picker/date-picker.component.d.ts +117 -117
- package/dist/components/general/icon/icon.component.d.ts +38 -38
- package/dist/components/general/index.d.ts +5 -5
- package/dist/components/general/range-slider/range-slider.component.d.ts +54 -54
- package/dist/components/general/rating/rating.component.d.ts +39 -39
- package/dist/components/general/tooltip/tooltip.component.d.ts +32 -32
- package/dist/components/index.d.ts +229 -229
- package/dist/components/landing-pages/index.d.ts +1 -1
- package/dist/components/landing-pages/landing-page/landing-page.component.d.ts +32 -32
- package/dist/components/recommendations/index.d.ts +2 -2
- package/dist/components/recommendations/recommendations/recommendations.component.d.ts +87 -87
- package/dist/components/recommendations/recommendations-item/recommendations-item.component.d.ts +40 -40
- package/dist/components/search/autocomplete/autocomplete.component.d.ts +59 -59
- package/dist/components/search/facet-types/base-facet.component.d.ts +44 -44
- package/dist/components/search/facet-types/checkbox-list-facet/checkbox-list-facet.component.d.ts +36 -36
- package/dist/components/search/facet-types/color-facet/color-facet.component.d.ts +24 -24
- package/dist/components/search/facet-types/date-range-facet/date-range-facet.component.d.ts +33 -33
- package/dist/components/search/facet-types/index.d.ts +11 -11
- package/dist/components/search/facet-types/linked-list-facet/link-list-facet.component.d.ts +24 -24
- package/dist/components/search/facet-types/numeric-range-facet/numeric-range-facet.component.d.ts +32 -32
- package/dist/components/search/facet-types/range-slider-facet/range-slider-facet.component.d.ts +34 -34
- package/dist/components/search/facet-types/recent-searches-facet/recent-searches-facet.component.d.ts +29 -29
- package/dist/components/search/facet-types/related-searches-facet/related-searches-facet.component.d.ts +29 -29
- package/dist/components/search/facet-types/search-within-facet/search-within-facet.component.d.ts +29 -29
- package/dist/components/search/facet-types/size-facet/size-facet.component.d.ts +24 -24
- package/dist/components/search/facet-wrapper/facet-wrapper.component.d.ts +47 -47
- package/dist/components/search/facets-list/facets-list.component.d.ts +32 -32
- package/dist/components/search/index.d.ts +15 -15
- package/dist/components/search/modified-query/modified-query.component.d.ts +32 -32
- package/dist/components/search/page-size/page-size.component.d.ts +32 -32
- package/dist/components/search/pagination/pagination.component.d.ts +43 -43
- package/dist/components/search/query-suggestions/query-suggestions.component.d.ts +38 -38
- package/dist/components/search/search-field/search-field.component.d.ts +38 -38
- package/dist/components/search/search-results/search-results.component.d.ts +34 -34
- package/dist/components/search/search-results-item/search-results-item.component.d.ts +38 -38
- package/dist/components/search/search-results-list/search-results-list.component.d.ts +23 -23
- package/dist/components/search/selected-facets/selected-facets.component.d.ts +31 -31
- package/dist/components/search/sorting/sorting.component.d.ts +30 -30
- package/dist/components/search/tabs/tabs.component.d.ts +30 -30
- package/dist/components/variants/index.d.ts +1 -1
- package/dist/components/variants/variant-selector/variant-selector.component.d.ts +23 -23
- package/dist/configuration/configuration.models.d.ts +574 -574
- package/dist/configuration/index.d.ts +4 -4
- package/dist/helpers/helpers.d.ts +200 -200
- package/dist/helpers/index.d.ts +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models/autocomplete.models.d.ts +85 -85
- package/dist/models/base.models.d.ts +50 -50
- package/dist/models/component.models.d.ts +453 -453
- package/dist/models/content.models.d.ts +94 -94
- package/dist/models/index.d.ts +11 -11
- package/dist/models/raw/index.d.ts +4 -4
- package/dist/models/raw/raw-autocomplete.models.d.ts +51 -51
- package/dist/models/raw/raw-base.models.d.ts +8 -8
- package/dist/models/raw/raw-recommendation.models.d.ts +39 -39
- package/dist/models/raw/raw-search.models.d.ts +191 -191
- package/dist/models/recommendation.models.d.ts +31 -31
- package/dist/models/search.models.d.ts +237 -237
- package/dist/models/tracking.models.d.ts +42 -42
- package/dist/services/autocomplete.service.d.ts +10 -10
- package/dist/services/base.service.d.ts +63 -63
- package/dist/services/index.d.ts +8 -8
- package/dist/services/recommendations.service.d.ts +10 -10
- package/dist/services/search.service.d.ts +50 -50
- package/dist/services/tracking.service.d.ts +29 -29
- package/dist/utilities/colors.d.ts +1 -1
- package/dist/utilities/dates.d.ts +4 -4
- package/dist/utilities/formatters.d.ts +4 -4
- package/dist/utilities/index.d.ts +6 -6
- package/package.json +1 -1
- package/readme.md +1 -1
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { BaseComponent } from '@components';
|
|
2
|
-
import { HawkSearchComponents, RecommendationsComponentConfig } from '@configuration';
|
|
3
|
-
import { RecommendationsComponentModel, RecommendationsWidget } from '@models';
|
|
4
|
-
/**
|
|
5
|
-
* The Recommendations component displays a list of products determined by the rules configured in the HawkSearch admin.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-recommendations>`.
|
|
9
|
-
*
|
|
10
|
-
* ## Attributes
|
|
11
|
-
* | Name | Value | Required |
|
|
12
|
-
* | :- | :- | :- |
|
|
13
|
-
* | widget-id | `string` | Yes |
|
|
14
|
-
*
|
|
15
|
-
* This attribute specifies which recommendation configuration created in the HawkSearch admin is retrieved from the API.
|
|
16
|
-
*
|
|
17
|
-
* ## Event-Binding Attributes
|
|
18
|
-
*
|
|
19
|
-
* | Name | Value |
|
|
20
|
-
* | :- | :- |
|
|
21
|
-
* | hawksearch-carousel | |
|
|
22
|
-
*
|
|
23
|
-
* This attribute should be placed on the element that contains each individual item element of a carousel. This is used to bind touch events.
|
|
24
|
-
*
|
|
25
|
-
* | Name | Value |
|
|
26
|
-
* | :- | :- |
|
|
27
|
-
* | hawksearch-carousel-item | `number` |
|
|
28
|
-
*
|
|
29
|
-
* When an element with this attribute is clicked, the carousel will move to display the range of items starting with the given index. This is typically used within pagination for the carousel.
|
|
30
|
-
*
|
|
31
|
-
* | Name | Value |
|
|
32
|
-
* | :- | :- |
|
|
33
|
-
* | hawksearch-next | |
|
|
34
|
-
*
|
|
35
|
-
* When an element with this attribute is clicked, the carousel will display the next range of items.
|
|
36
|
-
*
|
|
37
|
-
* | Name | Value |
|
|
38
|
-
* | :- | :- |
|
|
39
|
-
* | hawksearch-previous | |
|
|
40
|
-
*
|
|
41
|
-
* When an element with this attribute is clicked, the carousel will display the previous range of items.
|
|
42
|
-
*
|
|
43
|
-
* ## Default Template
|
|
44
|
-
* 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.
|
|
45
|
-
* {@embed ./recommendations.component.hbs}
|
|
46
|
-
*
|
|
47
|
-
* @category Recommendations
|
|
48
|
-
*/
|
|
49
|
-
export declare class RecommendationsComponent extends BaseComponent<RecommendationsComponentConfig, RecommendationsWidget, RecommendationsComponentModel> {
|
|
50
|
-
static get observedAttributes(): Array<string>;
|
|
51
|
-
protected componentName: keyof HawkSearchComponents;
|
|
52
|
-
protected defaultHtml: any;
|
|
53
|
-
protected bindFromEvent: boolean;
|
|
54
|
-
private widgetId;
|
|
55
|
-
private itemId;
|
|
56
|
-
private requestTimer;
|
|
57
|
-
private get carousel();
|
|
58
|
-
private get carouselPosition();
|
|
59
|
-
private get displayType();
|
|
60
|
-
private get itemsToDisplay();
|
|
61
|
-
private get itemWidth();
|
|
62
|
-
private selectedIndex;
|
|
63
|
-
private autorotationTimer?;
|
|
64
|
-
private dragElement?;
|
|
65
|
-
private dragOffset?;
|
|
66
|
-
private dragOrigin?;
|
|
67
|
-
private previousDisplayType?;
|
|
68
|
-
private touchMoveEventHandler;
|
|
69
|
-
private touchEndEventHandler;
|
|
70
|
-
private windowResizeEventHandler;
|
|
71
|
-
constructor();
|
|
72
|
-
connectedCallback(): void;
|
|
73
|
-
disconnectedCallback(): void;
|
|
74
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
75
|
-
protected renderContent(): boolean;
|
|
76
|
-
protected getContentModel(): RecommendationsComponentModel;
|
|
77
|
-
protected bindChildElements(): void;
|
|
78
|
-
protected onRender(): void;
|
|
79
|
-
private toggleAutorotation;
|
|
80
|
-
private previous;
|
|
81
|
-
private next;
|
|
82
|
-
private getSelected;
|
|
83
|
-
private displayItem;
|
|
84
|
-
private onWindowResize;
|
|
85
|
-
private onTouchMove;
|
|
86
|
-
private onTouchEnd;
|
|
87
|
-
}
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, RecommendationsComponentConfig } from '@configuration';
|
|
3
|
+
import { RecommendationsComponentModel, RecommendationsWidget } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Recommendations component displays a list of products determined by the rules configured in the HawkSearch admin.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-recommendations>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Attributes
|
|
11
|
+
* | Name | Value | Required |
|
|
12
|
+
* | :- | :- | :- |
|
|
13
|
+
* | widget-id | `string` | Yes |
|
|
14
|
+
*
|
|
15
|
+
* This attribute specifies which recommendation configuration created in the HawkSearch admin is retrieved from the API.
|
|
16
|
+
*
|
|
17
|
+
* ## Event-Binding Attributes
|
|
18
|
+
*
|
|
19
|
+
* | Name | Value |
|
|
20
|
+
* | :- | :- |
|
|
21
|
+
* | hawksearch-carousel | |
|
|
22
|
+
*
|
|
23
|
+
* This attribute should be placed on the element that contains each individual item element of a carousel. This is used to bind touch events.
|
|
24
|
+
*
|
|
25
|
+
* | Name | Value |
|
|
26
|
+
* | :- | :- |
|
|
27
|
+
* | hawksearch-carousel-item | `number` |
|
|
28
|
+
*
|
|
29
|
+
* When an element with this attribute is clicked, the carousel will move to display the range of items starting with the given index. This is typically used within pagination for the carousel.
|
|
30
|
+
*
|
|
31
|
+
* | Name | Value |
|
|
32
|
+
* | :- | :- |
|
|
33
|
+
* | hawksearch-next | |
|
|
34
|
+
*
|
|
35
|
+
* When an element with this attribute is clicked, the carousel will display the next range of items.
|
|
36
|
+
*
|
|
37
|
+
* | Name | Value |
|
|
38
|
+
* | :- | :- |
|
|
39
|
+
* | hawksearch-previous | |
|
|
40
|
+
*
|
|
41
|
+
* When an element with this attribute is clicked, the carousel will display the previous range of items.
|
|
42
|
+
*
|
|
43
|
+
* ## Default Template
|
|
44
|
+
* 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.
|
|
45
|
+
* {@embed ./recommendations.component.hbs}
|
|
46
|
+
*
|
|
47
|
+
* @category Recommendations
|
|
48
|
+
*/
|
|
49
|
+
export declare class RecommendationsComponent extends BaseComponent<RecommendationsComponentConfig, RecommendationsWidget, RecommendationsComponentModel> {
|
|
50
|
+
static get observedAttributes(): Array<string>;
|
|
51
|
+
protected componentName: keyof HawkSearchComponents;
|
|
52
|
+
protected defaultHtml: any;
|
|
53
|
+
protected bindFromEvent: boolean;
|
|
54
|
+
private widgetId;
|
|
55
|
+
private itemId;
|
|
56
|
+
private requestTimer;
|
|
57
|
+
private get carousel();
|
|
58
|
+
private get carouselPosition();
|
|
59
|
+
private get displayType();
|
|
60
|
+
private get itemsToDisplay();
|
|
61
|
+
private get itemWidth();
|
|
62
|
+
private selectedIndex;
|
|
63
|
+
private autorotationTimer?;
|
|
64
|
+
private dragElement?;
|
|
65
|
+
private dragOffset?;
|
|
66
|
+
private dragOrigin?;
|
|
67
|
+
private previousDisplayType?;
|
|
68
|
+
private touchMoveEventHandler;
|
|
69
|
+
private touchEndEventHandler;
|
|
70
|
+
private windowResizeEventHandler;
|
|
71
|
+
constructor();
|
|
72
|
+
connectedCallback(): void;
|
|
73
|
+
disconnectedCallback(): void;
|
|
74
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
75
|
+
protected renderContent(): boolean;
|
|
76
|
+
protected getContentModel(): RecommendationsComponentModel;
|
|
77
|
+
protected bindChildElements(): void;
|
|
78
|
+
protected onRender(): void;
|
|
79
|
+
private toggleAutorotation;
|
|
80
|
+
private previous;
|
|
81
|
+
private next;
|
|
82
|
+
private getSelected;
|
|
83
|
+
private displayItem;
|
|
84
|
+
private onWindowResize;
|
|
85
|
+
private onTouchMove;
|
|
86
|
+
private onTouchEnd;
|
|
87
|
+
}
|
package/dist/components/recommendations/recommendations-item/recommendations-item.component.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { BaseComponent } from '@components';
|
|
2
|
-
import { HawkSearchComponents, RecommendationsItemComponentConfig } from '@configuration';
|
|
3
|
-
import { RecommendationsItem, RecommendationsItemComponentModel } from '@models';
|
|
4
|
-
/**
|
|
5
|
-
* The Recommendations Item component displays information for an individual product or page.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-recommendations-item>`.
|
|
9
|
-
*
|
|
10
|
-
* *Note: This component should only be used within the context of the {@link Components.RecommendationsComponent | Recommendations 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 ./recommendations-item.component.hbs}
|
|
28
|
-
*
|
|
29
|
-
* @category Recommendations
|
|
30
|
-
*/
|
|
31
|
-
export declare class RecommendationsItemComponent extends BaseComponent<RecommendationsItemComponentConfig, RecommendationsItem, RecommendationsItemComponentModel> {
|
|
32
|
-
protected componentName: keyof HawkSearchComponents;
|
|
33
|
-
protected defaultHtml: any;
|
|
34
|
-
protected bindFromEvent: boolean;
|
|
35
|
-
private get widgetId();
|
|
36
|
-
private get requestId();
|
|
37
|
-
protected renderContent(): boolean;
|
|
38
|
-
protected getContentModel(): RecommendationsItemComponentModel;
|
|
39
|
-
protected onRender(): void;
|
|
40
|
-
}
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, RecommendationsItemComponentConfig } from '@configuration';
|
|
3
|
+
import { RecommendationsItem, RecommendationsItemComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Recommendations Item component displays information for an individual product or page.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-recommendations-item>`.
|
|
9
|
+
*
|
|
10
|
+
* *Note: This component should only be used within the context of the {@link Components.RecommendationsComponent | Recommendations 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 ./recommendations-item.component.hbs}
|
|
28
|
+
*
|
|
29
|
+
* @category Recommendations
|
|
30
|
+
*/
|
|
31
|
+
export declare class RecommendationsItemComponent extends BaseComponent<RecommendationsItemComponentConfig, RecommendationsItem, RecommendationsItemComponentModel> {
|
|
32
|
+
protected componentName: keyof HawkSearchComponents;
|
|
33
|
+
protected defaultHtml: any;
|
|
34
|
+
protected bindFromEvent: boolean;
|
|
35
|
+
private get widgetId();
|
|
36
|
+
private get requestId();
|
|
37
|
+
protected renderContent(): boolean;
|
|
38
|
+
protected getContentModel(): RecommendationsItemComponentModel;
|
|
39
|
+
protected onRender(): void;
|
|
40
|
+
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { BaseComponent } from '@components';
|
|
2
|
-
import { AutocompleteComponentConfig, HawkSearchComponents } from '@configuration';
|
|
3
|
-
import { AutocompleteComponentModel, AutocompleteResponse } from '@models';
|
|
4
|
-
/**
|
|
5
|
-
* The Autocomplete component displays a preview of search results after a user begins to type a query in the {@link Components.SearchFieldComponent}.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-autocomplete>`.
|
|
9
|
-
*
|
|
10
|
-
* ## Event-Binding Attributes
|
|
11
|
-
* ### Categories
|
|
12
|
-
* | Name | Value |
|
|
13
|
-
* | :- | :- |
|
|
14
|
-
* | hawksearch-category-field | {@link Models.AutocompleteCategory.field} |
|
|
15
|
-
* | hawksearch-category-field | {@link Models.AutocompleteCategory.value} |
|
|
16
|
-
*
|
|
17
|
-
* ### Content Results
|
|
18
|
-
* | Name | Value |
|
|
19
|
-
* | :- | :- |
|
|
20
|
-
* | hawksearch-content | {@link Models.AutocompleteProductResult.id } |
|
|
21
|
-
*
|
|
22
|
-
* When an element with this attribute is clicked, the click will be tracked and the user will be redirected to the page corresponding to that content item.
|
|
23
|
-
*
|
|
24
|
-
* ### Product Results
|
|
25
|
-
* | Name | Value |
|
|
26
|
-
* | :- | :- |
|
|
27
|
-
* | hawksearch-product | {@link Models.AutocompleteProductResult.id } |
|
|
28
|
-
*
|
|
29
|
-
* When an element with this attribute is clicked, the click will be tracked and the user will be redirected to the page corresponding to that content item.
|
|
30
|
-
*
|
|
31
|
-
* ### Query Results (Popular Queries)
|
|
32
|
-
* | Name | Value |
|
|
33
|
-
* | :- | :- |
|
|
34
|
-
* | hawksearch-query | {@link Models.AutocompleteQuery.query } |
|
|
35
|
-
*
|
|
36
|
-
* When an element with this attribute is clicked, the click will be tracked and the user will be redirected to the page corresponding to that product.
|
|
37
|
-
*
|
|
38
|
-
* ### View All Results
|
|
39
|
-
* | Name | Value |
|
|
40
|
-
* | :- | :- |
|
|
41
|
-
* | hawksearch-view-all | |
|
|
42
|
-
*
|
|
43
|
-
* When an element with this attribute is clicked, a new search will be executed with the query entered in the search box.
|
|
44
|
-
*
|
|
45
|
-
* ## Default Template
|
|
46
|
-
* 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.
|
|
47
|
-
* {@embed ./autocomplete.component.hbs}
|
|
48
|
-
*
|
|
49
|
-
* @category Search
|
|
50
|
-
*/
|
|
51
|
-
export declare class AutocompleteComponent extends BaseComponent<AutocompleteComponentConfig, AutocompleteResponse, AutocompleteComponentModel> {
|
|
52
|
-
protected bindFromEvent: boolean;
|
|
53
|
-
protected componentName: keyof HawkSearchComponents;
|
|
54
|
-
protected defaultHtml: any;
|
|
55
|
-
protected renderContent(): boolean;
|
|
56
|
-
protected getContentModel(): AutocompleteComponentModel;
|
|
57
|
-
protected onRender(): void;
|
|
58
|
-
private close;
|
|
59
|
-
}
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { AutocompleteComponentConfig, HawkSearchComponents } from '@configuration';
|
|
3
|
+
import { AutocompleteComponentModel, AutocompleteResponse } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Autocomplete component displays a preview of search results after a user begins to type a query in the {@link Components.SearchFieldComponent}.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-autocomplete>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* ### Categories
|
|
12
|
+
* | Name | Value |
|
|
13
|
+
* | :- | :- |
|
|
14
|
+
* | hawksearch-category-field | {@link Models.AutocompleteCategory.field} |
|
|
15
|
+
* | hawksearch-category-field | {@link Models.AutocompleteCategory.value} |
|
|
16
|
+
*
|
|
17
|
+
* ### Content Results
|
|
18
|
+
* | Name | Value |
|
|
19
|
+
* | :- | :- |
|
|
20
|
+
* | hawksearch-content | {@link Models.AutocompleteProductResult.id } |
|
|
21
|
+
*
|
|
22
|
+
* When an element with this attribute is clicked, the click will be tracked and the user will be redirected to the page corresponding to that content item.
|
|
23
|
+
*
|
|
24
|
+
* ### Product Results
|
|
25
|
+
* | Name | Value |
|
|
26
|
+
* | :- | :- |
|
|
27
|
+
* | hawksearch-product | {@link Models.AutocompleteProductResult.id } |
|
|
28
|
+
*
|
|
29
|
+
* When an element with this attribute is clicked, the click will be tracked and the user will be redirected to the page corresponding to that content item.
|
|
30
|
+
*
|
|
31
|
+
* ### Query Results (Popular Queries)
|
|
32
|
+
* | Name | Value |
|
|
33
|
+
* | :- | :- |
|
|
34
|
+
* | hawksearch-query | {@link Models.AutocompleteQuery.query } |
|
|
35
|
+
*
|
|
36
|
+
* When an element with this attribute is clicked, the click will be tracked and the user will be redirected to the page corresponding to that product.
|
|
37
|
+
*
|
|
38
|
+
* ### View All Results
|
|
39
|
+
* | Name | Value |
|
|
40
|
+
* | :- | :- |
|
|
41
|
+
* | hawksearch-view-all | |
|
|
42
|
+
*
|
|
43
|
+
* When an element with this attribute is clicked, a new search will be executed with the query entered in the search box.
|
|
44
|
+
*
|
|
45
|
+
* ## Default Template
|
|
46
|
+
* 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.
|
|
47
|
+
* {@embed ./autocomplete.component.hbs}
|
|
48
|
+
*
|
|
49
|
+
* @category Search
|
|
50
|
+
*/
|
|
51
|
+
export declare class AutocompleteComponent extends BaseComponent<AutocompleteComponentConfig, AutocompleteResponse, AutocompleteComponentModel> {
|
|
52
|
+
protected bindFromEvent: boolean;
|
|
53
|
+
protected componentName: keyof HawkSearchComponents;
|
|
54
|
+
protected defaultHtml: any;
|
|
55
|
+
protected renderContent(): boolean;
|
|
56
|
+
protected getContentModel(): AutocompleteComponentModel;
|
|
57
|
+
protected onRender(): void;
|
|
58
|
+
private close;
|
|
59
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { BaseComponent } from '@components';
|
|
2
|
-
import { BaseComponentConfig } from '@configuration';
|
|
3
|
-
import { BaseComponentModel, Facet, FacetState } from '@models';
|
|
4
|
-
/**
|
|
5
|
-
* The Base Facet component is inherited by all facet type copmonents.
|
|
6
|
-
*
|
|
7
|
-
* ## Event-Binding Attributes
|
|
8
|
-
* The following attributes are common to all facet type components. Individual facet types may support additional attribute bindings.
|
|
9
|
-
*
|
|
10
|
-
* | Name | Value |
|
|
11
|
-
* | :- | :- |
|
|
12
|
-
* | hawksearch-facet-value | `string` (if applicable) |
|
|
13
|
-
*
|
|
14
|
-
* When a checkbox input element with this attribute is checked or unchecked, the value of that element will be added or removed from the search request as appropriate. For non-input elements, the attribute value will be used instead of a form element value.
|
|
15
|
-
*
|
|
16
|
-
* | Name | Value |
|
|
17
|
-
* | :- | :- |
|
|
18
|
-
* | hawksearch-facet-value-exclude | `string` |
|
|
19
|
-
*
|
|
20
|
-
* When an element with this attribute is clicked, search results with the corresponding attribute value will be excluded from search results.
|
|
21
|
-
*
|
|
22
|
-
* | Name | Value |
|
|
23
|
-
* | :- | :- |
|
|
24
|
-
* | hawksearch-facet-value-include | `string` |
|
|
25
|
-
*
|
|
26
|
-
* When an element with this attribute is clicked, search results with the corresponding attribute value will no longer be excluded from search results.
|
|
27
|
-
*
|
|
28
|
-
* *Note: Elements with this attribute value should only be displayed for facet values that are excluded.*
|
|
29
|
-
*
|
|
30
|
-
* | Name | Value |
|
|
31
|
-
* | :- | :- |
|
|
32
|
-
* | hawksearch-facet-value-toggle | |
|
|
33
|
-
*
|
|
34
|
-
* When an element with this attribute is clicked, child facet values will be displayed or hidden as appropriate.
|
|
35
|
-
*
|
|
36
|
-
* *Note: This attribute should only be used for facets that support nested values.*
|
|
37
|
-
*
|
|
38
|
-
* @category Facet Types
|
|
39
|
-
*/
|
|
40
|
-
export declare abstract class BaseFacetComponent<TConfig extends BaseComponentConfig, TModel extends BaseComponentModel> extends BaseComponent<TConfig, Facet, TModel> {
|
|
41
|
-
protected bindFromEvent: boolean;
|
|
42
|
-
state: FacetState;
|
|
43
|
-
protected onRender(): void;
|
|
44
|
-
}
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { BaseComponentConfig } from '@configuration';
|
|
3
|
+
import { BaseComponentModel, Facet, FacetState } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Base Facet component is inherited by all facet type copmonents.
|
|
6
|
+
*
|
|
7
|
+
* ## Event-Binding Attributes
|
|
8
|
+
* The following attributes are common to all facet type components. Individual facet types may support additional attribute bindings.
|
|
9
|
+
*
|
|
10
|
+
* | Name | Value |
|
|
11
|
+
* | :- | :- |
|
|
12
|
+
* | hawksearch-facet-value | `string` (if applicable) |
|
|
13
|
+
*
|
|
14
|
+
* When a checkbox input element with this attribute is checked or unchecked, the value of that element will be added or removed from the search request as appropriate. For non-input elements, the attribute value will be used instead of a form element value.
|
|
15
|
+
*
|
|
16
|
+
* | Name | Value |
|
|
17
|
+
* | :- | :- |
|
|
18
|
+
* | hawksearch-facet-value-exclude | `string` |
|
|
19
|
+
*
|
|
20
|
+
* When an element with this attribute is clicked, search results with the corresponding attribute value will be excluded from search results.
|
|
21
|
+
*
|
|
22
|
+
* | Name | Value |
|
|
23
|
+
* | :- | :- |
|
|
24
|
+
* | hawksearch-facet-value-include | `string` |
|
|
25
|
+
*
|
|
26
|
+
* When an element with this attribute is clicked, search results with the corresponding attribute value will no longer be excluded from search results.
|
|
27
|
+
*
|
|
28
|
+
* *Note: Elements with this attribute value should only be displayed for facet values that are excluded.*
|
|
29
|
+
*
|
|
30
|
+
* | Name | Value |
|
|
31
|
+
* | :- | :- |
|
|
32
|
+
* | hawksearch-facet-value-toggle | |
|
|
33
|
+
*
|
|
34
|
+
* When an element with this attribute is clicked, child facet values will be displayed or hidden as appropriate.
|
|
35
|
+
*
|
|
36
|
+
* *Note: This attribute should only be used for facets that support nested values.*
|
|
37
|
+
*
|
|
38
|
+
* @category Facet Types
|
|
39
|
+
*/
|
|
40
|
+
export declare abstract class BaseFacetComponent<TConfig extends BaseComponentConfig, TModel extends BaseComponentModel> extends BaseComponent<TConfig, Facet, TModel> {
|
|
41
|
+
protected bindFromEvent: boolean;
|
|
42
|
+
state: FacetState;
|
|
43
|
+
protected onRender(): void;
|
|
44
|
+
}
|
package/dist/components/search/facet-types/checkbox-list-facet/checkbox-list-facet.component.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { CheckboxListFacetComponentConfig, HawkSearchComponents } from '@configuration';
|
|
2
|
-
import { CheckboxListFacetComponentModel } from '@models';
|
|
3
|
-
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
-
/**
|
|
5
|
-
* The Checkbox List Facet component renders a checkbox for each facet and may be nested depending on the configuration in the HawkSearch admin.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-checkbox-list-facet>`.
|
|
9
|
-
*
|
|
10
|
-
* ## Event-Binding Attributes
|
|
11
|
-
* *Note: For Event-Binding attributes common to all facet type components, see {@link Components.BaseFacetComponent}.*
|
|
12
|
-
*
|
|
13
|
-
* ## Handlebars Partials
|
|
14
|
-
* | Name | Parameter |
|
|
15
|
-
* | :- | :- |
|
|
16
|
-
* | facet-checkbox-list | `Array<CheckboxListFacetValue>` |
|
|
17
|
-
*
|
|
18
|
-
* This partial renders a checkbox for each facet value along with any applicable actions (include, exclude, toggle).
|
|
19
|
-
*
|
|
20
|
-
* *Note: For more information, see {@link Models.CheckboxListFacetValue}.*
|
|
21
|
-
*
|
|
22
|
-
* {@embed ./facet-checkbox-list.partial.hbs}
|
|
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 ./checkbox-list-facet.component.hbs}
|
|
27
|
-
*
|
|
28
|
-
* @category Facet Types
|
|
29
|
-
*/
|
|
30
|
-
export declare class CheckboxListFacetComponent extends BaseFacetComponent<CheckboxListFacetComponentConfig, CheckboxListFacetComponentModel> {
|
|
31
|
-
protected componentName: keyof HawkSearchComponents;
|
|
32
|
-
protected defaultHtml: any;
|
|
33
|
-
protected registerHelpers(): void;
|
|
34
|
-
protected renderContent(): boolean;
|
|
35
|
-
protected getContentModel(): CheckboxListFacetComponentModel;
|
|
36
|
-
}
|
|
1
|
+
import { CheckboxListFacetComponentConfig, HawkSearchComponents } from '@configuration';
|
|
2
|
+
import { CheckboxListFacetComponentModel } from '@models';
|
|
3
|
+
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Checkbox List Facet component renders a checkbox for each facet and may be nested depending on the configuration in the HawkSearch admin.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-checkbox-list-facet>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* *Note: For Event-Binding attributes common to all facet type components, see {@link Components.BaseFacetComponent}.*
|
|
12
|
+
*
|
|
13
|
+
* ## Handlebars Partials
|
|
14
|
+
* | Name | Parameter |
|
|
15
|
+
* | :- | :- |
|
|
16
|
+
* | facet-checkbox-list | `Array<CheckboxListFacetValue>` |
|
|
17
|
+
*
|
|
18
|
+
* This partial renders a checkbox for each facet value along with any applicable actions (include, exclude, toggle).
|
|
19
|
+
*
|
|
20
|
+
* *Note: For more information, see {@link Models.CheckboxListFacetValue}.*
|
|
21
|
+
*
|
|
22
|
+
* {@embed ./facet-checkbox-list.partial.hbs}
|
|
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 ./checkbox-list-facet.component.hbs}
|
|
27
|
+
*
|
|
28
|
+
* @category Facet Types
|
|
29
|
+
*/
|
|
30
|
+
export declare class CheckboxListFacetComponent extends BaseFacetComponent<CheckboxListFacetComponentConfig, CheckboxListFacetComponentModel> {
|
|
31
|
+
protected componentName: keyof HawkSearchComponents;
|
|
32
|
+
protected defaultHtml: any;
|
|
33
|
+
protected registerHelpers(): void;
|
|
34
|
+
protected renderContent(): boolean;
|
|
35
|
+
protected getContentModel(): CheckboxListFacetComponentModel;
|
|
36
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ColorFacetComponentConfig, HawkSearchComponents } from '@configuration';
|
|
2
|
-
import { ColorFacetComponentModel } from '@models';
|
|
3
|
-
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
-
/**
|
|
5
|
-
* The Color Facet component renders a box with color preview for each value.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-color-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 ./color-facet.component.hbs}
|
|
16
|
-
*
|
|
17
|
-
* @category Facet Types
|
|
18
|
-
*/
|
|
19
|
-
export declare class ColorFacetComponent extends BaseFacetComponent<ColorFacetComponentConfig, ColorFacetComponentModel> {
|
|
20
|
-
protected componentName: keyof HawkSearchComponents;
|
|
21
|
-
protected defaultHtml: any;
|
|
22
|
-
protected renderContent(): boolean;
|
|
23
|
-
protected getContentModel(): ColorFacetComponentModel;
|
|
24
|
-
}
|
|
1
|
+
import { ColorFacetComponentConfig, HawkSearchComponents } from '@configuration';
|
|
2
|
+
import { ColorFacetComponentModel } from '@models';
|
|
3
|
+
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Color Facet component renders a box with color preview for each value.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-color-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 ./color-facet.component.hbs}
|
|
16
|
+
*
|
|
17
|
+
* @category Facet Types
|
|
18
|
+
*/
|
|
19
|
+
export declare class ColorFacetComponent extends BaseFacetComponent<ColorFacetComponentConfig, ColorFacetComponentModel> {
|
|
20
|
+
protected componentName: keyof HawkSearchComponents;
|
|
21
|
+
protected defaultHtml: any;
|
|
22
|
+
protected renderContent(): boolean;
|
|
23
|
+
protected getContentModel(): ColorFacetComponentModel;
|
|
24
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { DateRangeFacetComponentConfig, HawkSearchComponents } from '@configuration';
|
|
2
|
-
import { DateRangeFacetComponentModel } from '@models';
|
|
3
|
-
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
-
/**
|
|
5
|
-
* The Date Range Facet component renders number input elements for minimum and maximum value.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-date-range-facet>`.
|
|
9
|
-
*
|
|
10
|
-
* ## Event-Binding Attributes
|
|
11
|
-
* | Name | Value |
|
|
12
|
-
* | :- | :- |
|
|
13
|
-
* | hawksearch-start | |
|
|
14
|
-
* | hawksearch-end | |
|
|
15
|
-
*
|
|
16
|
-
* These attributes should be placed on {@link Components.DatePickerComponent | Date Picker} 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 ./date-range-facet.component.hbs}
|
|
21
|
-
*
|
|
22
|
-
* @category Facet Types
|
|
23
|
-
*/
|
|
24
|
-
export declare class DateRangeFacetComponent extends BaseFacetComponent<DateRangeFacetComponentConfig, DateRangeFacetComponentModel> {
|
|
25
|
-
protected componentName: keyof HawkSearchComponents;
|
|
26
|
-
protected defaultHtml: any;
|
|
27
|
-
private get range();
|
|
28
|
-
protected renderContent(): boolean;
|
|
29
|
-
protected getContentModel(): DateRangeFacetComponentModel;
|
|
30
|
-
protected onRender(): void;
|
|
31
|
-
private updateInputElements;
|
|
32
|
-
private setFacetValue;
|
|
33
|
-
}
|
|
1
|
+
import { DateRangeFacetComponentConfig, HawkSearchComponents } from '@configuration';
|
|
2
|
+
import { DateRangeFacetComponentModel } from '@models';
|
|
3
|
+
import { BaseFacetComponent } from '../base-facet.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Date Range Facet component renders number input elements for minimum and maximum value.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-date-range-facet>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-start | |
|
|
14
|
+
* | hawksearch-end | |
|
|
15
|
+
*
|
|
16
|
+
* These attributes should be placed on {@link Components.DatePickerComponent | Date Picker} 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 ./date-range-facet.component.hbs}
|
|
21
|
+
*
|
|
22
|
+
* @category Facet Types
|
|
23
|
+
*/
|
|
24
|
+
export declare class DateRangeFacetComponent extends BaseFacetComponent<DateRangeFacetComponentConfig, DateRangeFacetComponentModel> {
|
|
25
|
+
protected componentName: keyof HawkSearchComponents;
|
|
26
|
+
protected defaultHtml: any;
|
|
27
|
+
private get range();
|
|
28
|
+
protected renderContent(): boolean;
|
|
29
|
+
protected getContentModel(): DateRangeFacetComponentModel;
|
|
30
|
+
protected onRender(): void;
|
|
31
|
+
private updateInputElements;
|
|
32
|
+
private setFacetValue;
|
|
33
|
+
}
|