Skip to content

Commit

Permalink
Merge pull request #48 from Git-the-Sanz/feature/searchParameter
Browse files Browse the repository at this point in the history
Add Search parameter to Search action
  • Loading branch information
victorhmp authored Jan 4, 2022
2 parents 2bbc51b + e3b45c2 commit 1b553a5
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/
coverage/
*.snap.ts
*.snap.ts
7 changes: 5 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "vtex",
"root": true
}
"root": true,
"env": {
"node": true
}
}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"@vtex/prettier-config"
"@vtex/prettier-config"
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Added search parameter `?map=ft` to SearchAction's `potentialAction`

## [0.7.3] - 2022-01-03

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"version": "0.0.0",
"name": "structured-data",
"private": true,
"license": "UNLICENSED",
Expand All @@ -18,6 +17,9 @@
"eslint --fix",
"prettier --write"
],
"*.{json,graphql,gql}": [
"prettier --write"
],
"*.json": [
"prettier --write"
]
Expand All @@ -31,5 +33,6 @@
"lint-staged": "^10.2.11",
"prettier": "^2.0.5",
"typescript": "^3.9.6"
}
},
"version": "0.0.0"
}
2 changes: 1 addition & 1 deletion react/SearchAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function SearchAction({ searchTermPath }: Props) {
url: baseUrl,
potentialAction: {
'@type': 'SearchAction',
target: `${baseUrl}${path}{search_term_string}`,
target: `${baseUrl}${path}{search_term_string}?map=ft`,
// @ts-expect-error it's a valid property
'query-input': 'required name=search_term_string',
},
Expand Down
4 changes: 3 additions & 1 deletion react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"graphql": "^14.6.0",
"schema-dts": "^0.8.2",
"typescript": "3.9.7",
"vtex.render-runtime": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.render-runtime"
"vtex.apps-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.apps-graphql",
"vtex.render-runtime": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.render-runtime",
"vtex.structured-data": "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.structured-data"
},
"version": "0.7.3"
}
14 changes: 11 additions & 3 deletions react/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5517,9 +5517,17 @@ [email protected]:
core-util-is "1.0.2"
extsprintf "^1.2.0"

"vtex.render-runtime@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.render-runtime":
version "8.126.4"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.render-runtime#40d7ad8a7b04c50e61ff84a1089dcf7045efd548"
"vtex.apps-graphql@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.apps-graphql":
version "2.8.0"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.apps-graphql#4fd47b1281c4d36e8abb1cfa4daea83bc739eca1"

"vtex.render-runtime@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.render-runtime":
version "8.132.3"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.render-runtime#c7dd142e384f38bd7a7c841543b73e9349fadc93"

"vtex.structured-data@http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.structured-data":
version "0.7.1"
resolved "http://vtex.vtexassets.com/_v/public/typings/v1/[email protected]/public/@types/vtex.structured-data#ef3dfc28f5e8e993dd2583ee859608794a72f947"

w3c-hr-time@^1.0.1:
version "1.0.1"
Expand Down

0 comments on commit 1b553a5

Please sign in to comment.