Skip to content

Commit

Permalink
Merge pull request #159 from vtex-apps/feature/B2BTEAM-1162-enable-de…
Browse files Browse the repository at this point in the history
…fault-alwaysShowAddToCart

feat: set default value true for alwaysShowAddToCart
  • Loading branch information
Rudge authored Aug 30, 2023
2 parents 364c6d3 + 88c8d0a commit 22914b7
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 32 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- Set default value true for alwaysShowAddToCart

## [3.13.0] - 2023-08-24

### Added
Expand Down
1 change: 0 additions & 1 deletion cy-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ strategy:
- cypress-shared/integration/quick-order/1.2.1-skucode_quantity.spec.js
- cypress-shared/integration/quick-order/1.2.2-skucode_quantity_negative_testcase.spec.js
- cypress-shared/integration/quick-order/1.3.1-upload_csv.spec.js
- cypress-shared/integration/quick-order/1.3.2-upload_csv_negative_testcase.spec.js
- cypress-shared/integration/quick-order/1.3.3_download-spreadsheet_verify_data&extension.spec.js
OneByOneAndCategoriesTestCase:
enabled: true
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ All blocks exported by the `quickorder` app share the same props:

Especially, the `quickorder-upload` block also can use the following prop:

| Prop name | Type | Description | Default value |
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- |
| Prop name | Type | Description | Default value |
| -------------- | -------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| `downloadText` | `string` | Defines a text for the spreadsheet download button. Use this prop to explain users how to properly download the spreadsheet model provided by the component. | `undefined` |
| `alwaysShowAddToCart` | `boolean` | Property that defines if the add to cart button will appear even if it has some invalid Sku. | `undefined` |
| `alwaysShowAddToCart` | `boolean` | Property that defines if the add to cart button will appear even if it has some invalid Sku. | `true` |

In addition, the `quickorder-upload` and the `quickorder-textarea` block can use the following prop:

Expand Down
2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@gocommerce/utils": "^0.7.3",
"@vtex/api": "6.45.15",
"@vtex/api": "6.45.19",
"atob": "^2.1.2",
"axios": "^0.19.0",
"camelcase": "^5.0.0",
Expand Down
73 changes: 47 additions & 26 deletions node/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1863,10 +1863,10 @@
resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d"
integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==

"@vtex/[email protected].15":
version "6.45.15"
resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.15.tgz#aa987d22f7df16ce2861130deda6ffd63156817b"
integrity sha512-Rg1VGDzJ4hHUNp1vSidMdGGPojr1PikMTptlZsJ3oNZVdEo4cPx2l8ZcAEwHWORL7QjPjXaEgmeA5ZOSf+boCQ==
"@vtex/[email protected].19":
version "6.45.19"
resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.19.tgz#97b449850b517d6610e7123aa91caec2a29ae7b1"
integrity sha512-WUsAn1Oi+Z7Ih84DcRf4HQH85Mh+zO84L0ta7zuRyb13DoAEq2qMi0Mv6vZMd9BFWOCSD8AcTHVF/gZskwh9Yw==
dependencies:
"@types/koa" "^2.11.0"
"@types/koa-compose" "^3.2.3"
Expand All @@ -1886,7 +1886,7 @@
fs-extra "^7.0.0"
graphql "^14.5.8"
graphql-tools "^4.0.6"
graphql-upload "^8.1.0"
graphql-upload "^13.0.0"
jaeger-client "^3.18.0"
js-base64 "^2.5.1"
koa "^2.11.0"
Expand All @@ -1897,7 +1897,7 @@
mime-types "^2.1.12"
opentracing "^0.14.4"
p-limit "^2.2.0"
prom-client "^12.0.0"
prom-client "^14.2.0"
qs "^6.5.1"
querystring "^0.2.0"
ramda "^0.26.0"
Expand Down Expand Up @@ -3425,10 +3425,10 @@ fresh@~0.5.2:
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=

fs-capacitor@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/fs-capacitor/-/fs-capacitor-2.0.4.tgz#5a22e72d40ae5078b4fe64fe4d08c0d3fc88ad3c"
integrity sha512-8S4f4WsCryNw2mJJchi46YgB6CR5Ze+4L1h8ewl9tEpL4SJ3ZO+c/bS4BWhB8bK+O3TMqhuZarTitd0S0eh2pA==
fs-capacitor@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/fs-capacitor/-/fs-capacitor-6.2.0.tgz#fa79ac6576629163cb84561995602d8999afb7f5"
integrity sha512-nKcE1UduoSKX27NSZlg879LdQc94OtbOsEmKMN2MBNudXREvijRKx2GEBsTMTfws+BrbkJoEuynbGSVRSpauvw==

fs-constants@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -3545,15 +3545,15 @@ graphql-tools@^4.0.6:
iterall "^1.1.3"
uuid "^3.1.0"

graphql-upload@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/graphql-upload/-/graphql-upload-8.1.0.tgz#6d0ab662db5677a68bfb1f2c870ab2544c14939a"
integrity sha512-U2OiDI5VxYmzRKw0Z2dmfk0zkqMRaecH9Smh1U277gVgVe9Qn+18xqf4skwr4YJszGIh7iQDZ57+5ygOK9sM/Q==
graphql-upload@^13.0.0:
version "13.0.0"
resolved "https://registry.yarnpkg.com/graphql-upload/-/graphql-upload-13.0.0.tgz#1a255b64d3cbf3c9f9171fa62a8fb0b9b59bb1d9"
integrity sha512-YKhx8m/uOtKu4Y1UzBFJhbBGJTlk7k4CydlUUiNrtxnwZv0WigbRHP+DVhRNKt7u7DXOtcKZeYJlGtnMXvreXA==
dependencies:
busboy "^0.3.1"
fs-capacitor "^2.0.4"
http-errors "^1.7.3"
object-path "^0.11.4"
fs-capacitor "^6.2.0"
http-errors "^1.8.1"
object-path "^0.11.8"

graphql@*:
version "14.5.4"
Expand Down Expand Up @@ -3694,7 +3694,7 @@ http-assert@^1.3.0:
deep-equal "~1.0.1"
http-errors "~1.7.2"

[email protected], http-errors@^1.3.1, http-errors@^1.6.3, http-errors@^1.7.3, http-errors@~1.7.2:
[email protected], http-errors@^1.3.1, http-errors@^1.6.3, http-errors@~1.7.2:
version "1.7.3"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
Expand All @@ -3705,6 +3705,17 @@ [email protected], http-errors@^1.3.1, http-errors@^1.6.3, http-errors@^1.7.3, h
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"

http-errors@^1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c"
integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==
dependencies:
depd "~1.1.2"
inherits "2.0.4"
setprototypeof "1.2.0"
statuses ">= 1.5.0 < 2"
toidentifier "1.0.1"

http-signature@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
Expand Down Expand Up @@ -5087,10 +5098,10 @@ object-keys@^1.0.11, object-keys@^1.0.12:
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==

object-path@^0.11.4:
version "0.11.4"
resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.4.tgz#370ae752fbf37de3ea70a861c23bba8915691949"
integrity sha1-NwrnUvvzfePqcKhhwju6iRVpGUk=
object-path@^0.11.8:
version "0.11.8"
resolved "https://registry.yarnpkg.com/object-path/-/object-path-0.11.8.tgz#ed002c02bbdd0070b78a27455e8ae01fc14d4742"
integrity sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==

object-visit@^1.0.0:
version "1.0.1"
Expand Down Expand Up @@ -5345,10 +5356,10 @@ process@^0.10.0:
resolved "https://registry.yarnpkg.com/process/-/process-0.10.1.tgz#842457cc51cfed72dc775afeeafb8c6034372725"
integrity sha1-hCRXzFHP7XLcd1r+6vuMYDQ3JyU=

prom-client@^12.0.0:
version "12.0.0"
resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-12.0.0.tgz#9689379b19bd3f6ab88a9866124db9da3d76c6ed"
integrity sha512-JbzzHnw0VDwCvoqf8y1WDtq4wSBAbthMB1pcVI/0lzdqHGJI3KBJDXle70XK+c7Iv93Gihqo0a5LlOn+g8+DrQ==
prom-client@^14.2.0:
version "14.2.0"
resolved "https://registry.yarnpkg.com/prom-client/-/prom-client-14.2.0.tgz#ca94504e64156f6506574c25fb1c34df7812cf11"
integrity sha512-sF308EhTenb/pDRPakm+WgiN+VdM/T1RaHj1x+MvAuT8UiQP8JmOEbxVqtkbfR4LrvOg5n7ic01kRBDGXjYikA==
dependencies:
tdigest "^0.1.1"

Expand Down Expand Up @@ -5850,6 +5861,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==

[email protected]:
version "1.2.0"
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==

shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
Expand Down Expand Up @@ -6291,6 +6307,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==

[email protected]:
version "1.0.1"
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==

tokenbucket@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/tokenbucket/-/tokenbucket-0.3.2.tgz#8172b2b58e3083acc8d914426fed15162a3a8e90"
Expand Down
2 changes: 1 addition & 1 deletion react/UploadBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const UploadBlock: FunctionComponent<
downloadText,
componentOnly,
intl,
alwaysShowAddToCart,
alwaysShowAddToCart = true,
}: any) => {
let productsArray: any = []
const [state, setState] = useState<any>({
Expand Down

0 comments on commit 22914b7

Please sign in to comment.