@bridgeline-digital/hawksearch-handlebars-ui 4.0.3 → 5.0.0-beta.2
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 +95 -78
- 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 -38
- 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 -228
- 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 -0
- package/dist/components/variants/variant-selector/variant-selector.component.d.ts +23 -0
- package/dist/configuration/configuration.models.d.ts +574 -564
- package/dist/configuration/index.d.ts +4 -4
- package/dist/helpers/helpers.d.ts +200 -182
- 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 -93
- package/dist/models/base.models.d.ts +50 -0
- package/dist/models/component.models.d.ts +453 -442
- package/dist/models/content.models.d.ts +94 -85
- package/dist/models/index.d.ts +11 -10
- package/dist/models/raw/index.d.ts +4 -3
- package/dist/models/raw/raw-autocomplete.models.d.ts +51 -51
- package/dist/models/raw/raw-base.models.d.ts +8 -0
- package/dist/models/raw/raw-recommendation.models.d.ts +39 -29
- package/dist/models/raw/raw-search.models.d.ts +191 -184
- package/dist/models/recommendation.models.d.ts +31 -39
- package/dist/models/search.models.d.ts +237 -245
- package/dist/models/tracking.models.d.ts +42 -42
- package/dist/services/autocomplete.service.d.ts +10 -11
- package/dist/services/base.service.d.ts +62 -24
- package/dist/services/index.d.ts +8 -7
- package/dist/services/recommendations.service.d.ts +10 -11
- package/dist/services/search.service.d.ts +50 -51
- package/dist/services/tracking.service.d.ts +29 -29
- package/dist/styles.69909e432fb2cc23cf6e035925be065f.css +1 -0
- package/dist/utilities/colors.d.ts +1 -0
- package/dist/utilities/dates.d.ts +4 -4
- package/dist/utilities/formatters.d.ts +4 -4
- package/dist/utilities/index.d.ts +6 -5
- package/package.json +3 -3
- package/readme.md +1 -1
- package/dist/styles.d47f79757b4a33d3db5809736c115e15.css +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { HawkSearchComponents, ImageContentComponentConfig } from '@configuration';
|
|
2
|
-
import { ImageContent, ImageContentComponentModel } from '@models';
|
|
3
|
-
import { BaseContentComponent } from '../base-content.component';
|
|
4
|
-
/**
|
|
5
|
-
* The Image Content component displays an image defined in HawkSearch.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-image-content>`.
|
|
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 ./image-content.component.hbs}
|
|
13
|
-
*
|
|
14
|
-
* @category Content
|
|
15
|
-
*/
|
|
16
|
-
export declare class ImageContentComponent extends BaseContentComponent<ImageContentComponentConfig, ImageContent, ImageContentComponentModel> {
|
|
17
|
-
protected componentName: keyof HawkSearchComponents;
|
|
18
|
-
protected defaultHtml: any;
|
|
19
|
-
protected renderContent(): boolean;
|
|
20
|
-
protected getContentModel(): ImageContentComponentModel;
|
|
21
|
-
protected onRender(): void;
|
|
22
|
-
}
|
|
1
|
+
import { HawkSearchComponents, ImageContentComponentConfig } from '@configuration';
|
|
2
|
+
import { ImageContent, ImageContentComponentModel } from '@models';
|
|
3
|
+
import { BaseContentComponent } from '../base-content.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Image Content component displays an image defined in HawkSearch.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-image-content>`.
|
|
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 ./image-content.component.hbs}
|
|
13
|
+
*
|
|
14
|
+
* @category Content
|
|
15
|
+
*/
|
|
16
|
+
export declare class ImageContentComponent extends BaseContentComponent<ImageContentComponentConfig, ImageContent, ImageContentComponentModel> {
|
|
17
|
+
protected componentName: keyof HawkSearchComponents;
|
|
18
|
+
protected defaultHtml: any;
|
|
19
|
+
protected renderContent(): boolean;
|
|
20
|
+
protected getContentModel(): ImageContentComponentModel;
|
|
21
|
+
protected onRender(): void;
|
|
22
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './base-content.component';
|
|
2
|
-
export * from './custom-content/custom-content.component';
|
|
3
|
-
export * from './featured-items-content/featured-items-content.component';
|
|
4
|
-
export * from './featured-items-content-item/featured-items-content-item.component';
|
|
5
|
-
export * from './image-content/image-content.component';
|
|
6
|
-
export * from './popular-queries-content/popular-queries-content.component';
|
|
1
|
+
export * from './base-content.component';
|
|
2
|
+
export * from './custom-content/custom-content.component';
|
|
3
|
+
export * from './featured-items-content/featured-items-content.component';
|
|
4
|
+
export * from './featured-items-content-item/featured-items-content-item.component';
|
|
5
|
+
export * from './image-content/image-content.component';
|
|
6
|
+
export * from './popular-queries-content/popular-queries-content.component';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { HawkSearchComponents, PopularQueriesContentComponentConfig } from '@configuration';
|
|
2
|
-
import { PopularQueriesContent, PopularQueriesContentComponentModel } from '@models';
|
|
3
|
-
import { BaseContentComponent } from '../base-content.component';
|
|
4
|
-
/**
|
|
5
|
-
* The Popular Queries Content component renders a tag cloud of popular queries relating to the current query. Each link is weighted according to its search frequency, with the most popular queries displayed in the largest font size.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-popular-queries-content>`.
|
|
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 ./popular-queries-content.component.hbs}
|
|
13
|
-
*
|
|
14
|
-
* @category Content
|
|
15
|
-
*/
|
|
16
|
-
export declare class PopularQueriesContentComponent extends BaseContentComponent<PopularQueriesContentComponentConfig, PopularQueriesContent, PopularQueriesContentComponentModel> {
|
|
17
|
-
protected componentName: keyof HawkSearchComponents;
|
|
18
|
-
protected defaultHtml: any;
|
|
19
|
-
protected renderContent(): boolean;
|
|
20
|
-
protected getContentModel(): PopularQueriesContentComponentModel;
|
|
21
|
-
protected onRender(): void;
|
|
22
|
-
}
|
|
1
|
+
import { HawkSearchComponents, PopularQueriesContentComponentConfig } from '@configuration';
|
|
2
|
+
import { PopularQueriesContent, PopularQueriesContentComponentModel } from '@models';
|
|
3
|
+
import { BaseContentComponent } from '../base-content.component';
|
|
4
|
+
/**
|
|
5
|
+
* The Popular Queries Content component renders a tag cloud of popular queries relating to the current query. Each link is weighted according to its search frequency, with the most popular queries displayed in the largest font size.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-popular-queries-content>`.
|
|
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 ./popular-queries-content.component.hbs}
|
|
13
|
+
*
|
|
14
|
+
* @category Content
|
|
15
|
+
*/
|
|
16
|
+
export declare class PopularQueriesContentComponent extends BaseContentComponent<PopularQueriesContentComponentConfig, PopularQueriesContent, PopularQueriesContentComponentModel> {
|
|
17
|
+
protected componentName: keyof HawkSearchComponents;
|
|
18
|
+
protected defaultHtml: any;
|
|
19
|
+
protected renderContent(): boolean;
|
|
20
|
+
protected getContentModel(): PopularQueriesContentComponentModel;
|
|
21
|
+
protected onRender(): void;
|
|
22
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
/**
|
|
5
|
-
* The Content Zone component renders a list of content items or Spotlight products as defined in the Merchandising section of HawkSearch.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-content-zone>`.
|
|
9
|
-
*
|
|
10
|
-
* ## Attributes
|
|
11
|
-
* | Name | Value | Required |
|
|
12
|
-
* | :- | :- | :- |
|
|
13
|
-
* | name | `string` | Yes |
|
|
14
|
-
*
|
|
15
|
-
* The `name` attribute corresponds to the `Zone` property defined in HawkSearch. This is used to differentiate different content areas, allowing you to place content items exactly where you want within your search results page.
|
|
16
|
-
*
|
|
17
|
-
* ## Event-Binding Attributes
|
|
18
|
-
* | Name | Value |
|
|
19
|
-
* | :- | :- |
|
|
20
|
-
* | index | `number` |
|
|
21
|
-
*
|
|
22
|
-
* To render a content item, the `index` attribute must be present with a value corresponding to the item’s index in the {@link Models.ContentZoneComponentModel.items} array.
|
|
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 ./content-zone.component.hbs}
|
|
27
|
-
*
|
|
28
|
-
* @category Content
|
|
29
|
-
*/
|
|
30
|
-
export declare class ContentZoneComponent extends BaseComponent<ContentZoneComponentConfig, SearchResponse, ContentZoneComponentModel> {
|
|
31
|
-
protected componentName: keyof HawkSearchComponents;
|
|
32
|
-
protected defaultHtml: any;
|
|
33
|
-
protected bindFromEvent: boolean;
|
|
34
|
-
private get name();
|
|
35
|
-
private get zone();
|
|
36
|
-
private get displayType();
|
|
37
|
-
private previousDisplayType?;
|
|
38
|
-
private windowResizeEventHandler;
|
|
39
|
-
connectedCallback(): void;
|
|
40
|
-
disconnectedCallback(): void;
|
|
41
|
-
protected renderContent(): boolean;
|
|
42
|
-
protected getContentModel(): ContentZoneComponentModel;
|
|
43
|
-
protected bindChildElements(): void;
|
|
44
|
-
}
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { ContentZoneComponentConfig, HawkSearchComponents } from '@configuration';
|
|
3
|
+
import { ContentZoneComponentModel, SearchResponse } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Content Zone component renders a list of content items or Spotlight products as defined in the Merchandising section of HawkSearch.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-content-zone>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Attributes
|
|
11
|
+
* | Name | Value | Required |
|
|
12
|
+
* | :- | :- | :- |
|
|
13
|
+
* | name | `string` | Yes |
|
|
14
|
+
*
|
|
15
|
+
* The `name` attribute corresponds to the `Zone` property defined in HawkSearch. This is used to differentiate different content areas, allowing you to place content items exactly where you want within your search results page.
|
|
16
|
+
*
|
|
17
|
+
* ## Event-Binding Attributes
|
|
18
|
+
* | Name | Value |
|
|
19
|
+
* | :- | :- |
|
|
20
|
+
* | index | `number` |
|
|
21
|
+
*
|
|
22
|
+
* To render a content item, the `index` attribute must be present with a value corresponding to the item’s index in the {@link Models.ContentZoneComponentModel.items} array.
|
|
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 ./content-zone.component.hbs}
|
|
27
|
+
*
|
|
28
|
+
* @category Content
|
|
29
|
+
*/
|
|
30
|
+
export declare class ContentZoneComponent extends BaseComponent<ContentZoneComponentConfig, SearchResponse, ContentZoneComponentModel> {
|
|
31
|
+
protected componentName: keyof HawkSearchComponents;
|
|
32
|
+
protected defaultHtml: any;
|
|
33
|
+
protected bindFromEvent: boolean;
|
|
34
|
+
private get name();
|
|
35
|
+
private get zone();
|
|
36
|
+
private get displayType();
|
|
37
|
+
private previousDisplayType?;
|
|
38
|
+
private windowResizeEventHandler;
|
|
39
|
+
connectedCallback(): void;
|
|
40
|
+
disconnectedCallback(): void;
|
|
41
|
+
protected renderContent(): boolean;
|
|
42
|
+
protected getContentModel(): ContentZoneComponentModel;
|
|
43
|
+
protected bindChildElements(): void;
|
|
44
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './content-types';
|
|
2
|
-
export * from './content-zone/content-zone.component';
|
|
1
|
+
export * from './content-types';
|
|
2
|
+
export * from './content-zone/content-zone.component';
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
/**
|
|
5
|
-
* The Date Picker component provides an intuitive interface that allows the user to select a range in ISO format. This component is currently only used within the {@link Components.DateRangeFacetComponent | Date Range Facet Component}.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-date-picker>`.
|
|
9
|
-
*
|
|
10
|
-
* ## Attributes
|
|
11
|
-
* | Name | Value |
|
|
12
|
-
* | :- | :- |
|
|
13
|
-
* | label | `string` |
|
|
14
|
-
* | min | `Date` |
|
|
15
|
-
* | max | `Date` |
|
|
16
|
-
* | value | `Date` |
|
|
17
|
-
*
|
|
18
|
-
* ## Event-Binding Attributes
|
|
19
|
-
* | Name | Value |
|
|
20
|
-
* | :- | :- |
|
|
21
|
-
* | hawksearch-input | |
|
|
22
|
-
*
|
|
23
|
-
* The input element must have this attribute. When this element is clicked, the date picker modal will be displayed.
|
|
24
|
-
*
|
|
25
|
-
* | Name | Value |
|
|
26
|
-
* | :- | :- |
|
|
27
|
-
* | hawksearch-modal | |
|
|
28
|
-
*
|
|
29
|
-
* This root element of the date picker modal must have this attribute to calculate modal positioning.
|
|
30
|
-
*
|
|
31
|
-
* | Name | Value |
|
|
32
|
-
* | :- | :- |
|
|
33
|
-
* | hawksearch-month | |
|
|
34
|
-
*
|
|
35
|
-
* This attribute is used to identify the form element used to select a specific month.
|
|
36
|
-
*
|
|
37
|
-
* | Name | Value |
|
|
38
|
-
* | :- | :- |
|
|
39
|
-
* | hawksearch-year | |
|
|
40
|
-
*
|
|
41
|
-
* This attribute is used to identify the form element used to select a specific year.
|
|
42
|
-
*
|
|
43
|
-
* | Name | Value |
|
|
44
|
-
* | :- | :- |
|
|
45
|
-
* | hawksearch-select-month | |
|
|
46
|
-
*
|
|
47
|
-
* When an element with this attribute is clicked, the month specified by `hawksearch-month` and `hawksearch-year` to be displayed in the date picker modal.
|
|
48
|
-
*
|
|
49
|
-
* | Name | Value |
|
|
50
|
-
* | :- | :- |
|
|
51
|
-
* | hawksearch-previous | |
|
|
52
|
-
*
|
|
53
|
-
* When an element with this attribute is clicked, the previous month will be displayed in the date picker modal.
|
|
54
|
-
*
|
|
55
|
-
* | Name | Value |
|
|
56
|
-
* | :- | :- |
|
|
57
|
-
* | hawksearch-next | |
|
|
58
|
-
*
|
|
59
|
-
* When an element with this attribute is clicked, the next month will be displayed in the date picker modal.
|
|
60
|
-
*
|
|
61
|
-
* | Name | Value |
|
|
62
|
-
* | :- | :- |
|
|
63
|
-
* | hawksearch-month-selector | |
|
|
64
|
-
*
|
|
65
|
-
* When an element with this attribute is clicked, the month selector will be displayed in the date picker modal to quickly jump to a particular month rather than using pagination.
|
|
66
|
-
*
|
|
67
|
-
* | Name | Value |
|
|
68
|
-
* | :- | :- |
|
|
69
|
-
* | hawksearch-date | `string` (ISO date format) |
|
|
70
|
-
*
|
|
71
|
-
* When an element with this attribute is clicked, the specified date will be selected and displayed in the input element.
|
|
72
|
-
*
|
|
73
|
-
* ## Events
|
|
74
|
-
* | Name | Data Type |
|
|
75
|
-
* | :- | :- |
|
|
76
|
-
* | hawksearch:date-picker-changed | `Date` |
|
|
77
|
-
*
|
|
78
|
-
* This event fires whenever the user selects a date.
|
|
79
|
-
*
|
|
80
|
-
* ## Handlebars Helpers
|
|
81
|
-
* | Name | Parameter |
|
|
82
|
-
* | :- | :- |
|
|
83
|
-
* | dayOfMonth | `Date` |
|
|
84
|
-
*
|
|
85
|
-
* This helper function returns the zero-padded day of the month from a provided date object.
|
|
86
|
-
*
|
|
87
|
-
* ## Default Template
|
|
88
|
-
* 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.
|
|
89
|
-
* {@embed ./date-picker.component.hbs}
|
|
90
|
-
*
|
|
91
|
-
* @category General
|
|
92
|
-
*/
|
|
93
|
-
export declare class DatePickerComponent extends BaseComponent<DatePickerComponentConfig, never, DatePickerComponentModel> {
|
|
94
|
-
static get observedAttributes(): Array<string>;
|
|
95
|
-
protected componentName: keyof HawkSearchComponents;
|
|
96
|
-
protected defaultHtml: any;
|
|
97
|
-
protected bindFromEvent: boolean;
|
|
98
|
-
private label?;
|
|
99
|
-
private minDate?;
|
|
100
|
-
private maxDate?;
|
|
101
|
-
private selectedDate?;
|
|
102
|
-
private modalVisible;
|
|
103
|
-
private modalDate;
|
|
104
|
-
private monthSelectorVisible;
|
|
105
|
-
private documentClickEventHandler;
|
|
106
|
-
private windowResizeEventHandler;
|
|
107
|
-
connectedCallback(): void;
|
|
108
|
-
disconnectedCallback(): void;
|
|
109
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
110
|
-
protected registerHelpers(): void;
|
|
111
|
-
protected getContentModel(): DatePickerComponentModel;
|
|
112
|
-
protected onRender(): void;
|
|
113
|
-
private positionModal;
|
|
114
|
-
private getYears;
|
|
115
|
-
private getWeeks;
|
|
116
|
-
private getWeek;
|
|
117
|
-
}
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { DatePickerComponentConfig, HawkSearchComponents } from '@configuration';
|
|
3
|
+
import { DatePickerComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Date Picker component provides an intuitive interface that allows the user to select a range in ISO format. This component is currently only used within the {@link Components.DateRangeFacetComponent | Date Range Facet Component}.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-date-picker>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | label | `string` |
|
|
14
|
+
* | min | `Date` |
|
|
15
|
+
* | max | `Date` |
|
|
16
|
+
* | value | `Date` |
|
|
17
|
+
*
|
|
18
|
+
* ## Event-Binding Attributes
|
|
19
|
+
* | Name | Value |
|
|
20
|
+
* | :- | :- |
|
|
21
|
+
* | hawksearch-input | |
|
|
22
|
+
*
|
|
23
|
+
* The input element must have this attribute. When this element is clicked, the date picker modal will be displayed.
|
|
24
|
+
*
|
|
25
|
+
* | Name | Value |
|
|
26
|
+
* | :- | :- |
|
|
27
|
+
* | hawksearch-modal | |
|
|
28
|
+
*
|
|
29
|
+
* This root element of the date picker modal must have this attribute to calculate modal positioning.
|
|
30
|
+
*
|
|
31
|
+
* | Name | Value |
|
|
32
|
+
* | :- | :- |
|
|
33
|
+
* | hawksearch-month | |
|
|
34
|
+
*
|
|
35
|
+
* This attribute is used to identify the form element used to select a specific month.
|
|
36
|
+
*
|
|
37
|
+
* | Name | Value |
|
|
38
|
+
* | :- | :- |
|
|
39
|
+
* | hawksearch-year | |
|
|
40
|
+
*
|
|
41
|
+
* This attribute is used to identify the form element used to select a specific year.
|
|
42
|
+
*
|
|
43
|
+
* | Name | Value |
|
|
44
|
+
* | :- | :- |
|
|
45
|
+
* | hawksearch-select-month | |
|
|
46
|
+
*
|
|
47
|
+
* When an element with this attribute is clicked, the month specified by `hawksearch-month` and `hawksearch-year` to be displayed in the date picker modal.
|
|
48
|
+
*
|
|
49
|
+
* | Name | Value |
|
|
50
|
+
* | :- | :- |
|
|
51
|
+
* | hawksearch-previous | |
|
|
52
|
+
*
|
|
53
|
+
* When an element with this attribute is clicked, the previous month will be displayed in the date picker modal.
|
|
54
|
+
*
|
|
55
|
+
* | Name | Value |
|
|
56
|
+
* | :- | :- |
|
|
57
|
+
* | hawksearch-next | |
|
|
58
|
+
*
|
|
59
|
+
* When an element with this attribute is clicked, the next month will be displayed in the date picker modal.
|
|
60
|
+
*
|
|
61
|
+
* | Name | Value |
|
|
62
|
+
* | :- | :- |
|
|
63
|
+
* | hawksearch-month-selector | |
|
|
64
|
+
*
|
|
65
|
+
* When an element with this attribute is clicked, the month selector will be displayed in the date picker modal to quickly jump to a particular month rather than using pagination.
|
|
66
|
+
*
|
|
67
|
+
* | Name | Value |
|
|
68
|
+
* | :- | :- |
|
|
69
|
+
* | hawksearch-date | `string` (ISO date format) |
|
|
70
|
+
*
|
|
71
|
+
* When an element with this attribute is clicked, the specified date will be selected and displayed in the input element.
|
|
72
|
+
*
|
|
73
|
+
* ## Events
|
|
74
|
+
* | Name | Data Type |
|
|
75
|
+
* | :- | :- |
|
|
76
|
+
* | hawksearch:date-picker-changed | `Date` |
|
|
77
|
+
*
|
|
78
|
+
* This event fires whenever the user selects a date.
|
|
79
|
+
*
|
|
80
|
+
* ## Handlebars Helpers
|
|
81
|
+
* | Name | Parameter |
|
|
82
|
+
* | :- | :- |
|
|
83
|
+
* | dayOfMonth | `Date` |
|
|
84
|
+
*
|
|
85
|
+
* This helper function returns the zero-padded day of the month from a provided date object.
|
|
86
|
+
*
|
|
87
|
+
* ## Default Template
|
|
88
|
+
* 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.
|
|
89
|
+
* {@embed ./date-picker.component.hbs}
|
|
90
|
+
*
|
|
91
|
+
* @category General
|
|
92
|
+
*/
|
|
93
|
+
export declare class DatePickerComponent extends BaseComponent<DatePickerComponentConfig, never, DatePickerComponentModel> {
|
|
94
|
+
static get observedAttributes(): Array<string>;
|
|
95
|
+
protected componentName: keyof HawkSearchComponents;
|
|
96
|
+
protected defaultHtml: any;
|
|
97
|
+
protected bindFromEvent: boolean;
|
|
98
|
+
private label?;
|
|
99
|
+
private minDate?;
|
|
100
|
+
private maxDate?;
|
|
101
|
+
private selectedDate?;
|
|
102
|
+
private modalVisible;
|
|
103
|
+
private modalDate;
|
|
104
|
+
private monthSelectorVisible;
|
|
105
|
+
private documentClickEventHandler;
|
|
106
|
+
private windowResizeEventHandler;
|
|
107
|
+
connectedCallback(): void;
|
|
108
|
+
disconnectedCallback(): void;
|
|
109
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
110
|
+
protected registerHelpers(): void;
|
|
111
|
+
protected getContentModel(): DatePickerComponentModel;
|
|
112
|
+
protected onRender(): void;
|
|
113
|
+
private positionModal;
|
|
114
|
+
private getYears;
|
|
115
|
+
private getWeeks;
|
|
116
|
+
private getWeek;
|
|
117
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
/**
|
|
5
|
-
* The Icon component renders an SVG image inline with text content.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-icon>`.
|
|
9
|
-
*
|
|
10
|
-
* ## Attributes
|
|
11
|
-
* | Name | Type | Default Value | Required |
|
|
12
|
-
* | :- | :- | :- | :- |
|
|
13
|
-
* | name | {@link Models.IconName} | | Yes
|
|
14
|
-
* | size | `string` | `number` | `1em` | No
|
|
15
|
-
*
|
|
16
|
-
* ## CSS Variables
|
|
17
|
-
* The following CSS classes are available that allow you to bypass the [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and customize the appearance of this component without overriding the Handlebars template:
|
|
18
|
-
*
|
|
19
|
-
* | Name | Default Value |
|
|
20
|
-
* | :- | :- |
|
|
21
|
-
* | --icon-color | `currentColor` |
|
|
22
|
-
* | --icon-font-size | `1em` |
|
|
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 ./icon.component.hbs}
|
|
27
|
-
*
|
|
28
|
-
* @category General
|
|
29
|
-
*/
|
|
30
|
-
export declare class IconComponent extends BaseComponent<IconComponentConfig, never, IconComponentModel> {
|
|
31
|
-
protected componentName: keyof HawkSearchComponents;
|
|
32
|
-
protected defaultHtml: any;
|
|
33
|
-
protected bindFromEvent: boolean;
|
|
34
|
-
private get name();
|
|
35
|
-
private get size();
|
|
36
|
-
protected renderContent(): boolean;
|
|
37
|
-
protected getContentModel(): IconComponentModel;
|
|
38
|
-
}
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, IconComponentConfig } from '@configuration';
|
|
3
|
+
import { IconComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Icon component renders an SVG image inline with text content.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-icon>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Attributes
|
|
11
|
+
* | Name | Type | Default Value | Required |
|
|
12
|
+
* | :- | :- | :- | :- |
|
|
13
|
+
* | name | {@link Models.IconName} | | Yes
|
|
14
|
+
* | size | `string` | `number` | `1em` | No
|
|
15
|
+
*
|
|
16
|
+
* ## CSS Variables
|
|
17
|
+
* The following CSS classes are available that allow you to bypass the [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and customize the appearance of this component without overriding the Handlebars template:
|
|
18
|
+
*
|
|
19
|
+
* | Name | Default Value |
|
|
20
|
+
* | :- | :- |
|
|
21
|
+
* | --icon-color | `currentColor` |
|
|
22
|
+
* | --icon-font-size | `1em` |
|
|
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 ./icon.component.hbs}
|
|
27
|
+
*
|
|
28
|
+
* @category General
|
|
29
|
+
*/
|
|
30
|
+
export declare class IconComponent extends BaseComponent<IconComponentConfig, never, IconComponentModel> {
|
|
31
|
+
protected componentName: keyof HawkSearchComponents;
|
|
32
|
+
protected defaultHtml: any;
|
|
33
|
+
protected bindFromEvent: boolean;
|
|
34
|
+
private get name();
|
|
35
|
+
private get size();
|
|
36
|
+
protected renderContent(): boolean;
|
|
37
|
+
protected getContentModel(): IconComponentModel;
|
|
38
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './date-picker/date-picker.component';
|
|
2
|
-
export * from './icon/icon.component';
|
|
3
|
-
export * from './range-slider/range-slider.component';
|
|
4
|
-
export * from './rating/rating.component';
|
|
5
|
-
export * from './tooltip/tooltip.component';
|
|
1
|
+
export * from './date-picker/date-picker.component';
|
|
2
|
+
export * from './icon/icon.component';
|
|
3
|
+
export * from './range-slider/range-slider.component';
|
|
4
|
+
export * from './rating/rating.component';
|
|
5
|
+
export * from './tooltip/tooltip.component';
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
/**
|
|
5
|
-
* The Range Slider component provides a draggable interface that allows the user to select a range between 0-100. This component is currently only used within the {@link Components.RangeSliderFacetComponent | Range Slider Facet Component}.
|
|
6
|
-
*
|
|
7
|
-
* ## Tag
|
|
8
|
-
* The tag for this component is `<hawksearch-range-slider>`.
|
|
9
|
-
*
|
|
10
|
-
* ## Event-Binding Attributes
|
|
11
|
-
* | Name | Value |
|
|
12
|
-
* | :- | :- |
|
|
13
|
-
* | hawksearch-handle | `'start'` or `'end'` |
|
|
14
|
-
*
|
|
15
|
-
* This component should always have exactly two elements with the `hawksearch-handle` attribute: one with a value of `'start'`, and one with a value of `'end'`. This are the elements that the user will drag to adjust the selected range.
|
|
16
|
-
*
|
|
17
|
-
* ## Events
|
|
18
|
-
* | Name | Data Type |
|
|
19
|
-
* | :- | :- |
|
|
20
|
-
* | hawksearch:range-slider-changed | {@link Models.RangeSliderEventData} |
|
|
21
|
-
*
|
|
22
|
-
* This event fires repeatedly while the user is dragging the handles; it does not wait until the user deselects a handle.
|
|
23
|
-
*
|
|
24
|
-
* *Note: The `min` and `max` values will always be between `0` and `100` inclusive.*
|
|
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 ./range-slider.component.hbs}
|
|
29
|
-
*
|
|
30
|
-
* @category General
|
|
31
|
-
*/
|
|
32
|
-
export declare class RangeSliderComponent extends BaseComponent<RangeSliderComponentConfig, never, RangeSliderComponentModel> {
|
|
33
|
-
static get observedAttributes(): Array<string>;
|
|
34
|
-
protected componentName: keyof HawkSearchComponents;
|
|
35
|
-
protected defaultHtml: any;
|
|
36
|
-
protected bindFromEvent: boolean;
|
|
37
|
-
private dragging;
|
|
38
|
-
private activeHandle?;
|
|
39
|
-
private startX?;
|
|
40
|
-
private startOffsetPercentage?;
|
|
41
|
-
private mouseUpEventHandler;
|
|
42
|
-
private mouseMoveEventHandler;
|
|
43
|
-
private start;
|
|
44
|
-
private end;
|
|
45
|
-
connectedCallback(): void;
|
|
46
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
47
|
-
disconnectedCallback(): void;
|
|
48
|
-
private setStart;
|
|
49
|
-
private setEnd;
|
|
50
|
-
protected getContentModel(): RangeSliderComponentModel;
|
|
51
|
-
protected onRender(): void;
|
|
52
|
-
private onMouseUp;
|
|
53
|
-
private onMouseMove;
|
|
54
|
-
}
|
|
1
|
+
import { BaseComponent } from '@components';
|
|
2
|
+
import { HawkSearchComponents, RangeSliderComponentConfig } from '@configuration';
|
|
3
|
+
import { RangeSliderComponentModel } from '@models';
|
|
4
|
+
/**
|
|
5
|
+
* The Range Slider component provides a draggable interface that allows the user to select a range between 0-100. This component is currently only used within the {@link Components.RangeSliderFacetComponent | Range Slider Facet Component}.
|
|
6
|
+
*
|
|
7
|
+
* ## Tag
|
|
8
|
+
* The tag for this component is `<hawksearch-range-slider>`.
|
|
9
|
+
*
|
|
10
|
+
* ## Event-Binding Attributes
|
|
11
|
+
* | Name | Value |
|
|
12
|
+
* | :- | :- |
|
|
13
|
+
* | hawksearch-handle | `'start'` or `'end'` |
|
|
14
|
+
*
|
|
15
|
+
* This component should always have exactly two elements with the `hawksearch-handle` attribute: one with a value of `'start'`, and one with a value of `'end'`. This are the elements that the user will drag to adjust the selected range.
|
|
16
|
+
*
|
|
17
|
+
* ## Events
|
|
18
|
+
* | Name | Data Type |
|
|
19
|
+
* | :- | :- |
|
|
20
|
+
* | hawksearch:range-slider-changed | {@link Models.RangeSliderEventData} |
|
|
21
|
+
*
|
|
22
|
+
* This event fires repeatedly while the user is dragging the handles; it does not wait until the user deselects a handle.
|
|
23
|
+
*
|
|
24
|
+
* *Note: The `min` and `max` values will always be between `0` and `100` inclusive.*
|
|
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 ./range-slider.component.hbs}
|
|
29
|
+
*
|
|
30
|
+
* @category General
|
|
31
|
+
*/
|
|
32
|
+
export declare class RangeSliderComponent extends BaseComponent<RangeSliderComponentConfig, never, RangeSliderComponentModel> {
|
|
33
|
+
static get observedAttributes(): Array<string>;
|
|
34
|
+
protected componentName: keyof HawkSearchComponents;
|
|
35
|
+
protected defaultHtml: any;
|
|
36
|
+
protected bindFromEvent: boolean;
|
|
37
|
+
private dragging;
|
|
38
|
+
private activeHandle?;
|
|
39
|
+
private startX?;
|
|
40
|
+
private startOffsetPercentage?;
|
|
41
|
+
private mouseUpEventHandler;
|
|
42
|
+
private mouseMoveEventHandler;
|
|
43
|
+
private start;
|
|
44
|
+
private end;
|
|
45
|
+
connectedCallback(): void;
|
|
46
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
47
|
+
disconnectedCallback(): void;
|
|
48
|
+
private setStart;
|
|
49
|
+
private setEnd;
|
|
50
|
+
protected getContentModel(): RangeSliderComponentModel;
|
|
51
|
+
protected onRender(): void;
|
|
52
|
+
private onMouseUp;
|
|
53
|
+
private onMouseMove;
|
|
54
|
+
}
|