@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
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function returns the sum of two values.
|
|
3
|
+
*
|
|
4
|
+
* ### Example
|
|
5
|
+
*
|
|
6
|
+
* ```hbs
|
|
7
|
+
* {{sum 1 2}}
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @param value1 First value
|
|
11
|
+
* @param value2 Second value
|
|
12
|
+
* @returns Sum
|
|
13
|
+
*/
|
|
14
|
+
export declare function add(value1: number, value2: number): number;
|
|
15
|
+
/**
|
|
16
|
+
* This function returns whether all values resolve to `true`.
|
|
17
|
+
*
|
|
18
|
+
* ### Example
|
|
19
|
+
*
|
|
20
|
+
* ```hbs
|
|
21
|
+
* {{#if (and value1 value1)}}
|
|
22
|
+
* <span>Conditional content</span>
|
|
23
|
+
* {{/if}}
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param values Array of value
|
|
27
|
+
* @returns `true` if all values resolve to `true`, otherwise `false`
|
|
28
|
+
*/
|
|
29
|
+
export declare function and(...values: Array<any>): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* This function renders an inline attribute when `condition` resolves to `true`.
|
|
32
|
+
*
|
|
33
|
+
* ### Example
|
|
34
|
+
*
|
|
35
|
+
* ```hbs
|
|
36
|
+
* <div{{attribute ' style="display: block;"' visible}}></div>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @param attribute The attribute to be rendered
|
|
40
|
+
* @param condition The value that is evaluated to determine whether to render `attribute`
|
|
41
|
+
* @returns `attribute` if `condition` resolves to `true`, otherwise an empty string
|
|
42
|
+
*/
|
|
43
|
+
export declare function attribute(attribute: string, condition: any): Handlebars.SafeString;
|
|
44
|
+
/**
|
|
45
|
+
* This function concatenates multiple values into a single string
|
|
46
|
+
*
|
|
47
|
+
* ### Example
|
|
48
|
+
*
|
|
49
|
+
* ```hbs
|
|
50
|
+
* <div{{attribute (concat 'style="max-height: ' maxHeight 'px;"') maxHeight}}></div>
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @param values Array of values
|
|
54
|
+
* @returns Concatenated string
|
|
55
|
+
*/
|
|
56
|
+
export declare function concat(...values: Array<any>): string;
|
|
57
|
+
/**
|
|
58
|
+
* This function returns whether the supplied values are equal to each other.
|
|
59
|
+
*
|
|
60
|
+
* @param value1 First value
|
|
61
|
+
* @param value2 Second value
|
|
62
|
+
* @returns Whether `value1` and `value2` are equal
|
|
63
|
+
*/
|
|
64
|
+
export declare function eq(value1: any, value2: any): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* This function is used to prevent Handlebars from attempting to bind a data model to a nested control containing a custom template.
|
|
67
|
+
*
|
|
68
|
+
* ### Example
|
|
69
|
+
*
|
|
70
|
+
* ```hbs
|
|
71
|
+
* <hawksearch-results>
|
|
72
|
+
* {{{{exclude}}}}
|
|
73
|
+
* <hawksearch-pagination>
|
|
74
|
+
* {{#if displayFirstLink}}
|
|
75
|
+
* <a hawksearch-page="1">First</a>
|
|
76
|
+
* {{/if}}
|
|
77
|
+
* {{#if displayLastLink}}
|
|
78
|
+
* <a hawksearch-page="{{totalPages}}">Last</a>
|
|
79
|
+
* {{/if}}
|
|
80
|
+
* </hawksearch-pagination>
|
|
81
|
+
* {{{{/exclude}}}}
|
|
82
|
+
* </hawksearch-results>
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* @param options Automatically added by Handlebars
|
|
86
|
+
* @returns The preserved Handlebars template without binding it to the parent component data object
|
|
87
|
+
*/
|
|
88
|
+
export declare function exclude(options: any): any;
|
|
89
|
+
/**
|
|
90
|
+
* This function is used to render a provided string as HTML rather than escape special characters.
|
|
91
|
+
*
|
|
92
|
+
* @param html HTML string
|
|
93
|
+
* @returns Unencoded HTML string
|
|
94
|
+
*/
|
|
95
|
+
export declare function html(html: string): Handlebars.SafeString;
|
|
96
|
+
/**
|
|
97
|
+
* This function formats a value as currency
|
|
98
|
+
*
|
|
99
|
+
* @param value Number to be formatted
|
|
100
|
+
* @param decimals Number of decimal places to display
|
|
101
|
+
* @param defaultValue Default value
|
|
102
|
+
* @returns Formatted currency string
|
|
103
|
+
*/
|
|
104
|
+
export declare function currency(value: number | string | Array<number> | Array<string> | undefined, decimals: number | undefined, defaultValue?: number): string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* This function filters an array of objects based on whether a specified property value matches an optional condition, or, if omitted, has a truthy value
|
|
107
|
+
*
|
|
108
|
+
* @param values Array of objects to be filtered
|
|
109
|
+
* @param path Name of property or nested path to evaluate each object
|
|
110
|
+
* @param condition Optional condition
|
|
111
|
+
* @returns Formatted currency string
|
|
112
|
+
*/
|
|
113
|
+
export declare function arrayFilterObjects(values: Array<any | undefined>, path: string, condition?: any): Array<any> | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* This function returns whether any object in an array has a specified property value which matches an optional condition, or, if omitted, has a truthy value
|
|
116
|
+
*
|
|
117
|
+
* @param values Array of objects to be filtered
|
|
118
|
+
* @param path Name of property or nested path to evaluate each object
|
|
119
|
+
* @param condition Optional condition
|
|
120
|
+
* @returns Formatted currency string
|
|
121
|
+
*/
|
|
122
|
+
export declare function arrayHasObjectsWithValue(values: Array<any | undefined>, path: string, condition?: any): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* This function returns whether the first provided value is greater than the second provided value.
|
|
125
|
+
*
|
|
126
|
+
* @param value1 First value
|
|
127
|
+
* @param value2 Second value
|
|
128
|
+
* @returns Whether `value1` is greater than `value2`
|
|
129
|
+
*/
|
|
130
|
+
export declare function gt(value1: any, value2: any): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* This function returns whether the first provided value is greater than or equal to the second provided value.
|
|
133
|
+
*
|
|
134
|
+
* @param value1 First value
|
|
135
|
+
* @param value2 Second value
|
|
136
|
+
* @returns Whether `value1` is greater than or equal to `value2`
|
|
137
|
+
*/
|
|
138
|
+
export declare function gte(value1: any, value2: any): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* This function is used to render different content inline depending on whether a condition resolves to `true` or `false`.
|
|
141
|
+
*
|
|
142
|
+
* ### Example
|
|
143
|
+
* ```hbs
|
|
144
|
+
* <hawksearch-icon name="{{if-else toggled 'chevron-down' 'chevron-right'}}"></hawksearch-icon>
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* @param condition Condition to be evaluated
|
|
148
|
+
* @param trueValue The value to be returned if `condition` resolves to `true`
|
|
149
|
+
* @param falseValue The value to be returned if `condition` resolves to `false`
|
|
150
|
+
* @returns Either `trueValue` or `falseValue` depending on `condition`
|
|
151
|
+
*/
|
|
152
|
+
export declare function ifElse(condition: any, trueValue: any, falseValue: any): any;
|
|
153
|
+
/**
|
|
154
|
+
* This function returns whether the first provided value is less than the second provided value.
|
|
155
|
+
*
|
|
156
|
+
* @param value1 First value
|
|
157
|
+
* @param value2 Second value
|
|
158
|
+
* @returns Whether `value1` is less than `value2`
|
|
159
|
+
*/
|
|
160
|
+
export declare function lt(value1: any, value2: any): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* This function returns whether the first provided value is less than or equal to the second provided value.
|
|
163
|
+
*
|
|
164
|
+
* @param value1 First value
|
|
165
|
+
* @param value2 Second value
|
|
166
|
+
* @returns Whether `value1` is less than or equal to `value2`
|
|
167
|
+
*/
|
|
168
|
+
export declare function lte(value1: any, value2: any): boolean;
|
|
169
|
+
/**
|
|
170
|
+
* This function formats a number.
|
|
171
|
+
*
|
|
172
|
+
* @param value Number to be formatted
|
|
173
|
+
* @param decimals Number of decimal places to display
|
|
174
|
+
* @param defaultValue Default value
|
|
175
|
+
* @returns Formatted number string
|
|
176
|
+
*/
|
|
177
|
+
export declare function number(value: number | string | Array<number> | Array<string> | undefined, decimals: number | undefined, defaultValue?: number): string | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* This function returns whether any provided value resolves to `true`.
|
|
180
|
+
*
|
|
181
|
+
* @param values Array of values
|
|
182
|
+
* @returns Whether any value resolves to `true`
|
|
183
|
+
*/
|
|
184
|
+
export declare function or(...values: Array<any>): boolean;
|
|
185
|
+
/**
|
|
186
|
+
* This function displays a specified string with an optional default value.
|
|
187
|
+
*
|
|
188
|
+
* @param value Value to be returned
|
|
189
|
+
* @param defaultValue Default value if `value` does not resolve to `true`
|
|
190
|
+
* @returns `value` if it resolves to `true`, otherwise `defaultValue`
|
|
191
|
+
*/
|
|
192
|
+
export declare function string(value: string | Array<string> | undefined, defaultValue?: string): string | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* This function returns the difference of two values
|
|
195
|
+
*
|
|
196
|
+
* @param value1 First value
|
|
197
|
+
* @param value2 Second value
|
|
198
|
+
* @returns Difference
|
|
199
|
+
*/
|
|
200
|
+
export declare function subtract(value1: number, value2: number): number;
|
|
201
|
+
/**
|
|
202
|
+
* This function returns a decoded URI string
|
|
203
|
+
*
|
|
204
|
+
* @param value HTML value
|
|
205
|
+
* @returns Decoded URI value
|
|
206
|
+
*/
|
|
207
|
+
export declare function decode(value: string): string;
|
|
208
|
+
/**
|
|
209
|
+
* This function returns a recursively decoded URI string
|
|
210
|
+
*
|
|
211
|
+
* @param value HTML value
|
|
212
|
+
* @returns Decoded URI value
|
|
213
|
+
*/
|
|
214
|
+
export declare function decodeNested(value: string): string;
|
|
215
|
+
/**
|
|
216
|
+
* This function is a wrapper of Lodash: escapeRegExp
|
|
217
|
+
*
|
|
218
|
+
* @param string — The string to escape.
|
|
219
|
+
* @return — Returns the escaped string.
|
|
220
|
+
*/
|
|
221
|
+
export declare function escapeRegExp(value: string): string;
|