Skip to content

Commit

Permalink
Version 1.15.4
Browse files Browse the repository at this point in the history
### Fixes
* Fix `near me` searches not triggering HTML5 geolocation in certain scenarios (#1809)
  • Loading branch information
oshi97 authored Mar 24, 2023
2 parents 3ab4bca + b4a6d5e commit 83b13ad
Show file tree
Hide file tree
Showing 28 changed files with 139 additions and 115 deletions.
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = [
},
{
path: 'dist/answers-modern.min.js',
limit: '155 KB'
limit: '160 KB'
},
{
path: 'dist/answerstemplates.compiled.min.js',
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ ANSWERS.addComponent('Facets', {

### Transforming Facets

The `transformFacets` option of the Facets component allows facets data to be fully customized. The function takes in and returns an array of the answers-core DisplayableFacet which is described [here](https://github.com/yext/answers-core/blob/master/docs/answers-core.displayablefacet.md). The function also has access to the Facets config as the second parameter.
The `transformFacets` option of the Facets component allows facets data to be fully customized. The function takes in and returns an array of the search-core DisplayableFacet which is described [here](https://github.com/yext/search-core/blob/master/docs/search-core.displayablefacet.md). The function also has access to the Facets config as the second parameter.

Here's an example of using this option to customize a boolean facet.

Expand Down
52 changes: 26 additions & 26 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -433,19 +433,13 @@ MIT License

The following NPM package may be included in this product:

- @yext/answers-core@1.6.0
- @yext/answers-storage@1.1.1

This package contains the following license and notice below:

The Answers Core files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
and certain functionality requires paid subscriptions to Yext products.

Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json)
which is made available under the ODC Attribution License (https://github.com/mattcg/language-subtag-registry/blob/master/LICENSE.md).

BSD 3-Clause License

Copyright (c) 2022, Yext
Copyright (c) 2020, Yext
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -477,13 +471,35 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The following NPM package may be included in this product:

- @yext/[email protected]
- @yext/[email protected]

This package contains the following license and notice below:

# rtf-converter
Provides methods for converting Yext's flavor of Markdown into HTML or plain text

## Distribution
CDN
- unminified: https://assets.sitescdn.net/rtf-converter/rtf-converter.js
- minified: https://assets.sitescdn.net/rtf-converter/rtf-converter.min.js

-----------

The following NPM package may be included in this product:

- @yext/[email protected]

This package contains the following license and notice below:

The Search Core files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
and certain functionality requires paid subscriptions to Yext products.

Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json)
which is made available under the ODC Attribution License (https://github.com/mattcg/language-subtag-registry/blob/master/LICENSE.md).

BSD 3-Clause License

Copyright (c) 2020, Yext
Copyright (c) 2022, Yext
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -513,22 +529,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-----------

The following NPM package may be included in this product:

- @yext/[email protected]

This package contains the following license and notice below:

# rtf-converter
Provides methods for converting Yext's flavor of Markdown into HTML or plain text

## Distribution
CDN
- unminified: https://assets.sitescdn.net/rtf-converter/rtf-converter.js
- minified: https://assets.sitescdn.net/rtf-converter/rtf-converter.min.js

-----------

The following NPM package may be included in this product:

- [email protected]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion conf/gulp-tasks/bundle/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ exports.legacyBundle = function (
babel({
runtimeHelpers: true,
babelrc: false,
exclude: /node_modules\/(?!cross-fetch)(?!@yext\/answers-storage)(?!@yext\/answers-core).*/,
exclude: /node_modules\/(?!cross-fetch)(?!@yext\/answers-storage)(?!@yext\/search-core).*/,
presets: [
[
'@babel/preset-env',
Expand Down
48 changes: 24 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/answers-search-ui",
"version": "1.15.3",
"version": "1.15.4",
"description": "Javascript Search Programming Interface",
"main": "dist/answers-umd.js",
"repository": {
Expand Down Expand Up @@ -28,9 +28,9 @@
],
"dependencies": {
"@mapbox/mapbox-gl-language": "^0.10.1",
"@yext/answers-core": "^1.6.0",
"@yext/answers-storage": "^1.1.0",
"@yext/rtf-converter": "^1.7.1",
"@yext/search-core": "^2.2.0",
"bowser": "^2.11.0",
"cross-fetch": "^3.1.5",
"css-vars-ponyfill": "^2.4.3",
Expand Down
6 changes: 3 additions & 3 deletions src/answers-umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ class Answers {
this.components
.setCore(this.core)
.setRenderer(this.renderer);

this._setDefaultInitialSearch(parsedConfig.search);

if (parsedConfig.visitor) {
Expand Down Expand Up @@ -731,6 +730,7 @@ class Answers {
this.core.init({ visitor: visitor });
} else {
console.error(`Invalid visitor. Visitor was not set because "${JSON.stringify(visitor)}" does not have an id.`);
this.core.init();
}
}
}
Expand Down Expand Up @@ -788,5 +788,5 @@ function initScrollListener (reporter) {
});
}

const ANSWERS = new Answers();
export default ANSWERS;
const ANSWERS_SINGLETON = new Answers();
export default ANSWERS_SINGLETON;
10 changes: 5 additions & 5 deletions src/core/core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @module Core */
import { provideCore } from '@yext/answers-core/lib/commonjs';
import { provideCore } from '@yext/search-core/lib/commonjs';
import { generateUUID } from './utils/uuid';
import SearchDataTransformer from './search/searchdatatransformer';

Expand Down Expand Up @@ -119,7 +119,7 @@ export default class Core {
/** @type {ComponentManager} */
this._componentManager = config.componentManager;

/** @type {import('@yext/answers-core').AdditionalHttpHeaders} */
/** @type {import('@yext/search-core').AdditionalHttpHeaders} */
this._additionalHttpHeaders = mergeAdditionalHttpHeaders(config.additionalHttpHeaders);
}

Expand Down Expand Up @@ -259,7 +259,7 @@ export default class Core {
queryId: sendQueryId && this.storage.get(StorageKeys.QUERY_ID),
retrieveFacets: this._isDynamicFiltersEnabled,
facets: this.filterRegistry.getFacetsPayload(),
staticFilters: this.filterRegistry.getStaticFilterPayload(),
staticFilter: this.filterRegistry.getStaticFilterPayload(),
offset: this.storage.get(StorageKeys.SEARCH_OFFSET) || 0,
skipSpellCheck: this.storage.get(StorageKeys.SKIP_SPELL_CHECK),
queryTrigger: queryTriggerForApi,
Expand Down Expand Up @@ -718,9 +718,9 @@ export default class Core {
}

/**
* Gets the location object needed for answers-core
* Gets the location object needed for search-core
*
* @returns {LatLong|undefined} from answers-core
* @returns {LatLong|undefined} from search-core
*/
_getLocationPayload () {
const geolocation = this.storage.get(StorageKeys.GEOLOCATION);
Expand Down
Loading

0 comments on commit 83b13ad

Please sign in to comment.