@searchstax-inc/searchstudio-ux-react 4.1.54 → 4.1.59
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 +10 -0
- package/README.md +2 -0
- package/README.mustache +1 -0
- package/dist/@searchstax-inc/components/SearchstaxAnswerWidget.d.ts +1 -1
- package/dist/@searchstax-inc/components/SearchstaxExternalPromotionsWidget.d.ts +1 -1
- package/dist/@searchstax-inc/components/SearchstaxFacetsWidget.d.ts +2 -1
- package/dist/@searchstax-inc/components/SearchstaxInputWidget.d.ts +1 -1
- package/dist/@searchstax-inc/components/SearchstaxLocationWidget.d.ts +1 -1
- package/dist/@searchstax-inc/components/SearchstaxOverviewWidget.d.ts +1 -1
- package/dist/@searchstax-inc/components/SearchstaxPaginationWidget.d.ts +1 -1
- package/dist/@searchstax-inc/components/SearchstaxRelatedSearchesWidget.d.ts +1 -1
- package/dist/@searchstax-inc/components/SearchstaxResultWidget.d.ts +1 -1
- package/dist/@searchstax-inc/components/SearchstaxSortingWidget.d.ts +1 -1
- package/dist/@searchstax-inc/components/SearchstaxWrapper.d.ts +1 -1
- package/dist/@searchstax-inc/components/templates/SearchstaxAnswerWidgetTemplate.d.ts +1 -1
- package/dist/@searchstax-inc/components/templates/SearchstaxExternalPromotionsWidgetTemplate.d.ts +1 -1
- package/dist/@searchstax-inc/components/templates/SearchstaxFacetsWidgetTemplate.d.ts +2 -2
- package/dist/@searchstax-inc/components/templates/SearchstaxOverviewWidgetTemplate.d.ts +1 -1
- package/dist/@searchstax-inc/components/templates/SearchstaxPaginationWidgetTemplate.d.ts +2 -2
- package/dist/@searchstax-inc/components/templates/SearchstaxRelatedSearchesWidgetTemplate.d.ts +1 -1
- package/dist/@searchstax-inc/components/templates/SearchstaxSortingWidgetTemplate.d.ts +1 -1
- package/dist/@searchstax-inc/searchstudio-ux-react.cjs +57 -46
- package/dist/@searchstax-inc/searchstudio-ux-react.iife.js +64 -53
- package/dist/@searchstax-inc/searchstudio-ux-react.mjs +1276 -1102
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "searchstudio-ux-react" project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [4.1.59]
|
|
6
|
+
### Features
|
|
7
|
+
- introduced beforeFacetsRender hook to be able sort and change facets before they render
|
|
8
|
+
- added support for smart answers returning config for showMore functionality
|
|
9
|
+
|
|
10
|
+
## [4.1.55]
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
- fixed related searches not being identified as links
|
|
13
|
+
- changed result card to read whole content on focus
|
|
14
|
+
|
|
5
15
|
## [4.1.54]
|
|
6
16
|
### Bug Fixes
|
|
7
17
|
- fixed various console errors in headles libraries
|
package/README.md
CHANGED
|
@@ -1150,6 +1150,7 @@ Facet lists are configured and ordered on the Site Search [Faceting Tab](https:/
|
|
|
1150
1150
|
- itemsPerPageMobile: number; // default expanded facets for mobile
|
|
1151
1151
|
- facetsTemplateDesktop - template override for desktop view
|
|
1152
1152
|
- facetsTemplateMobile - template override for mobile view
|
|
1153
|
+
- beforeFacetsRender `(facets: IFacetData[]) => IFacetData[]` — Called with the current facets array before the widget renders. Return the same or a modified array to filter, reorder, or transform facets (e.g., hide certain facets or change their order).
|
|
1153
1154
|
|
|
1154
1155
|
|
|
1155
1156
|
**Main Template Desktop Override**
|
|
@@ -1833,6 +1834,7 @@ function searchSortingTemplate(
|
|
|
1833
1834
|
<>
|
|
1834
1835
|
{sortingData &&
|
|
1835
1836
|
sortingData?.searchExecuted &&
|
|
1837
|
+
sortingData.sortOptions.length > 0 &&
|
|
1836
1838
|
sortingData?.hasResultsOrExternalPromotions && (
|
|
1837
1839
|
<div className="searchstax-sorting-container">
|
|
1838
1840
|
<label className="searchstax-sorting-label" htmlFor="searchstax-search-order-select">
|
package/README.mustache
CHANGED
|
@@ -396,6 +396,7 @@ Facet lists are configured and ordered on the Site Search [Faceting Tab](https:/
|
|
|
396
396
|
- itemsPerPageMobile: number; // default expanded facets for mobile
|
|
397
397
|
- facetsTemplateDesktop - template override for desktop view
|
|
398
398
|
- facetsTemplateMobile - template override for mobile view
|
|
399
|
+
- beforeFacetsRender `(facets: IFacetData[]) => IFacetData[]` — Called with the current facets array before the widget renders. Return the same or a modified array to filter, reorder, or transform facets (e.g., hide certain facets or change their order).
|
|
399
400
|
|
|
400
401
|
|
|
401
402
|
**Main Template Desktop Override**
|
|
@@ -3,5 +3,5 @@ declare function SearchstaxAnswerWidget(props: {
|
|
|
3
3
|
searchAnswerTemplate?: (answerData: null | ISearchstaxAnswerData, showMore: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) => React.ReactElement;
|
|
4
4
|
feedbackwidget?: IFeedbackWidgetProperties;
|
|
5
5
|
showMoreAfterWordCount?: number;
|
|
6
|
-
}):
|
|
6
|
+
}): JSX.Element;
|
|
7
7
|
export default SearchstaxAnswerWidget;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ISearchstaxExternalPromotionsData, IExternalPromotion } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
2
|
declare function SearchstaxExternalPromotionsWidget(props: {
|
|
3
3
|
searchExternalPromotionsTemplate?: (externalPromotionsData: null | ISearchstaxExternalPromotionsData, trackClick: (externalPromotion: IExternalPromotion, event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void) => React.ReactElement;
|
|
4
|
-
}):
|
|
4
|
+
}): JSX.Element;
|
|
5
5
|
export default SearchstaxExternalPromotionsWidget;
|
|
@@ -10,5 +10,6 @@ declare function SearchstaxFacetsWidget(props: {
|
|
|
10
10
|
facetsTemplateMobile?: (facetsTemplateDataMobile: IFacetsTemplateData | null, selectedFacetsCheckboxes: IFacetValue[], facetContainers: {
|
|
11
11
|
[key: string]: React.LegacyRef<HTMLDivElement> | undefined;
|
|
12
12
|
}, isNotDeactivated: (name: string) => boolean, toggleFacetGroup: (name: string) => void, selectFacet: (index: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetValueData, isInput: boolean) => void, isChecked: (facetValue: IFacetValueData) => boolean | undefined, unselectFacet: (facet: IFacetValue) => void, showMoreLessMobile: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetData) => void, openOverlay: () => void, closeOverlay: () => void, unselectAll: () => void) => React.ReactElement;
|
|
13
|
-
|
|
13
|
+
beforeFacetsRender?: (facetsTemplateDataDesktop: IFacetData[]) => IFacetData[];
|
|
14
|
+
}): JSX.Element;
|
|
14
15
|
export default SearchstaxFacetsWidget;
|
|
@@ -5,5 +5,5 @@ declare function SearchstaxInputWidget(props: {
|
|
|
5
5
|
searchInputId?: string;
|
|
6
6
|
suggestAfterMinChars?: number;
|
|
7
7
|
inputTemplate?: (suggestions: ISearchstaxSuggestion[], onMouseLeave: () => void, onMouseOver: (suggestion: ISearchstaxSuggestion) => void, onMouseClick: () => void, templateData?: ISearchstaxSearchInputRenderData | null) => React.ReactElement;
|
|
8
|
-
}):
|
|
8
|
+
}): JSX.Element;
|
|
9
9
|
export default SearchstaxInputWidget;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ISearchstaxSearchFeedbackData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
2
|
declare function SearchstaxOverviewWidget(props: {
|
|
3
3
|
searchOverviewTemplate?: (searchFeedbackData: null | ISearchstaxSearchFeedbackData, onOriginalQueryClick: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void) => React.ReactElement;
|
|
4
|
-
}):
|
|
4
|
+
}): JSX.Element;
|
|
5
5
|
export default SearchstaxOverviewWidget;
|
|
@@ -2,5 +2,5 @@ import type { IPaginationData } from "@searchstax-inc/searchstudio-ux-js";
|
|
|
2
2
|
declare function SearchstaxPaginationWidget(props: {
|
|
3
3
|
paginationTemplate?: (paginationData: IPaginationData | null, nextPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void, previousPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void) => React.ReactElement;
|
|
4
4
|
infiniteScrollTemplate?: (paginationData: IPaginationData | null, nextPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void) => React.ReactElement;
|
|
5
|
-
}):
|
|
5
|
+
}): JSX.Element;
|
|
6
6
|
export default SearchstaxPaginationWidget;
|
|
@@ -3,5 +3,5 @@ declare function SearchstaxRelatedSearchesWidget(props: {
|
|
|
3
3
|
relatedSearchesURL: string;
|
|
4
4
|
relatedSearchesAPIKey: string;
|
|
5
5
|
searchRelatedSearchesTemplate?: (relatedData: null | ISearchstaxRelatedSearchesData, executeSearch: (result: ISearchstaxRelatedSearchResult) => void) => React.ReactElement;
|
|
6
|
-
}):
|
|
6
|
+
}): JSX.Element;
|
|
7
7
|
export default SearchstaxRelatedSearchesWidget;
|
|
@@ -5,5 +5,5 @@ declare function SearchstaxResultWidget(props: {
|
|
|
5
5
|
resultsPerPage?: number;
|
|
6
6
|
noResultTemplate?: (searchTerm: string, metaData: ISearchstaxSearchMetadata | null, executeSearch: (searchTerm: string) => void) => React.ReactElement;
|
|
7
7
|
resultsTemplate?: (results: ISearchstaxParsedResult[], resultClicked: (result: ISearchstaxParsedResult, event: any) => any) => React.ReactElement;
|
|
8
|
-
}):
|
|
8
|
+
}): JSX.Element;
|
|
9
9
|
export default SearchstaxResultWidget;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ISearchstaxSearchSortingData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
2
|
declare function SearchstaxSortingWidget(props: {
|
|
3
3
|
searchSortingTemplate?: (sortingData: null | ISearchstaxSearchSortingData, orderChange: (value: string) => void, selectedSorting: string) => React.ReactElement;
|
|
4
|
-
}):
|
|
4
|
+
}): JSX.Element;
|
|
5
5
|
export default SearchstaxSortingWidget;
|
|
@@ -18,5 +18,5 @@ declare function SearchstaxWrapper(props: {
|
|
|
18
18
|
afterSearch?: (results: ISearchstaxParsedResult[]) => ISearchstaxParsedResult[];
|
|
19
19
|
children: any;
|
|
20
20
|
initialized: (searchstax: Searchstax) => void;
|
|
21
|
-
}):
|
|
21
|
+
}): JSX.Element;
|
|
22
22
|
export default SearchstaxWrapper;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ISearchstaxAnswerData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
|
-
declare function answerTemplate(answerData: null | ISearchstaxAnswerData, showMore: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void):
|
|
2
|
+
declare function answerTemplate(answerData: null | ISearchstaxAnswerData, showMore: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void): JSX.Element;
|
|
3
3
|
export { answerTemplate };
|
package/dist/@searchstax-inc/components/templates/SearchstaxExternalPromotionsWidgetTemplate.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IExternalPromotion, ISearchstaxExternalPromotionsData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
|
-
declare function searchExternalPromotionsTemplate(externalPromotionsData: null | ISearchstaxExternalPromotionsData, trackClick: (externalPromotion: IExternalPromotion, event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void):
|
|
2
|
+
declare function searchExternalPromotionsTemplate(externalPromotionsData: null | ISearchstaxExternalPromotionsData, trackClick: (externalPromotion: IExternalPromotion, event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void): JSX.Element;
|
|
3
3
|
export { searchExternalPromotionsTemplate };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IFacetData, IFacetValue, IFacetValueData, IFacetsTemplateData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
2
|
declare function facetsTemplateDesktop(facetsTemplateDataDesktop: IFacetsTemplateData | null, facetContainers: {
|
|
3
3
|
[key: string]: React.LegacyRef<HTMLDivElement> | undefined;
|
|
4
|
-
}, isNotDeactivated: (name: string) => boolean, toggleFacetGroup: (name: string) => void, selectFacet: (index: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetValueData, isInput: boolean) => void, isChecked: (facetValue: IFacetValueData) => boolean | undefined, showMoreLessDesktop: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetData) => void):
|
|
4
|
+
}, isNotDeactivated: (name: string) => boolean, toggleFacetGroup: (name: string) => void, selectFacet: (index: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetValueData, isInput: boolean) => void, isChecked: (facetValue: IFacetValueData) => boolean | undefined, showMoreLessDesktop: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetData) => void): JSX.Element;
|
|
5
5
|
declare function facetsTemplateMobile(facetsTemplateDataMobile: IFacetsTemplateData | null, selectedFacetsCheckboxes: IFacetValue[], facetContainers: {
|
|
6
6
|
[key: string]: React.LegacyRef<HTMLDivElement> | undefined;
|
|
7
|
-
}, isNotDeactivated: (name: string) => boolean, toggleFacetGroup: (name: string) => void, selectFacet: (index: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetValueData, isInput: boolean, isMobile?: boolean) => void, isChecked: (facetValue: IFacetValueData) => boolean | undefined, unselectFacet: (facet: IFacetValue) => void, showMoreLessMobile: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetData) => void, openOverlay: () => void, closeOverlay: () => void, unselectAll: () => void):
|
|
7
|
+
}, isNotDeactivated: (name: string) => boolean, toggleFacetGroup: (name: string) => void, selectFacet: (index: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetValueData, isInput: boolean, isMobile?: boolean) => void, isChecked: (facetValue: IFacetValueData) => boolean | undefined, unselectFacet: (facet: IFacetValue) => void, showMoreLessMobile: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetData) => void, openOverlay: () => void, closeOverlay: () => void, unselectAll: () => void): JSX.Element;
|
|
8
8
|
export { facetsTemplateDesktop, facetsTemplateMobile };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ISearchstaxSearchFeedbackData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
|
-
declare function searchOverviewTemplate(searchFeedbackData: null | ISearchstaxSearchFeedbackData, onOriginalQueryClick: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void):
|
|
2
|
+
declare function searchOverviewTemplate(searchFeedbackData: null | ISearchstaxSearchFeedbackData, onOriginalQueryClick: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void): JSX.Element;
|
|
3
3
|
export { searchOverviewTemplate };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IPaginationData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
|
-
declare function paginationTemplate(paginationData: IPaginationData | null, nextPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void, previousPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void):
|
|
3
|
-
declare function infiniteScrollTemplate(paginationData: IPaginationData | null, nextPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void):
|
|
2
|
+
declare function paginationTemplate(paginationData: IPaginationData | null, nextPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void, previousPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void): JSX.Element;
|
|
3
|
+
declare function infiniteScrollTemplate(paginationData: IPaginationData | null, nextPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void): JSX.Element;
|
|
4
4
|
export { paginationTemplate, infiniteScrollTemplate };
|
package/dist/@searchstax-inc/components/templates/SearchstaxRelatedSearchesWidgetTemplate.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ISearchstaxRelatedSearchResult, ISearchstaxRelatedSearchesData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
|
-
declare function searchRelatedSearchesTemplate(relatedData: null | ISearchstaxRelatedSearchesData, executeSearch: (result: ISearchstaxRelatedSearchResult) => void):
|
|
2
|
+
declare function searchRelatedSearchesTemplate(relatedData: null | ISearchstaxRelatedSearchesData, executeSearch: (result: ISearchstaxRelatedSearchResult) => void): JSX.Element;
|
|
3
3
|
export { searchRelatedSearchesTemplate };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ISearchstaxSearchSortingData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
|
-
declare function searchSortingTemplate(sortingData: null | ISearchstaxSearchSortingData, orderChange: (value: string) => void, selectedSorting: string):
|
|
2
|
+
declare function searchSortingTemplate(sortingData: null | ISearchstaxSearchSortingData, orderChange: (value: string) => void, selectedSorting: string): JSX.Element;
|
|
3
3
|
export { searchSortingTemplate };
|