@vtex/faststore-plugin-buyer-portal 1.3.1 → 1.3.3

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.
@@ -33,6 +33,9 @@ jobs:
33
33
  - name: Install dependencies
34
34
  run: yarn
35
35
 
36
+ - name: Generate CHANGELOG and update Version Const
37
+ run: yarn release
38
+
36
39
  - name: Update version to patch
37
40
  run: yarn version --patch
38
41
 
package/.husky/pre-commit CHANGED
@@ -1,4 +1 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
1
  npx lint-staged
@@ -0,0 +1,24 @@
1
+ {
2
+ "github": false,
3
+ "hooks": {
4
+ "after:release": "echo Successfully released ${name} ${version}"
5
+ },
6
+ "git": {
7
+ "tag": false,
8
+ "push": false,
9
+ "commitMessage": "Update CHANGELOG",
10
+ "commitArgs": ["--no-verify"]
11
+ },
12
+ "plugins": {
13
+ "@release-it/keep-a-changelog": {
14
+ "strictLatest": false,
15
+ "addUnreleased": true,
16
+ "addVersionUrl": true,
17
+ "filename": "CHANGELOG.md"
18
+ },
19
+ "@release-it/bumper": {
20
+ "in": "package.json",
21
+ "out": "./src/features/shared/utils/constants.ts"
22
+ }
23
+ }
24
+ }
package/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.3] - 2025-10-16
11
+
12
+ ### Added
13
+
14
+ - Neighborhood field to Address form
15
+ - Added `neighborhood` field to address creation and editing forms
16
+ - Updated `AddressForm` component to include neighborhood input
17
+ - Updated `AddressInfoDisplay` to show neighborhood information
18
+ - Updated `CreateAddressDrawer` and `EditAddressDrawer` to handle neighborhood data
19
+ - Updated `AddressesClient` to support neighborhood field in API requests
20
+ - Setup KeepChangelog
21
+
22
+ ## [1.3.2] - 2025-10-16
23
+
24
+ ## [1.2.4] - 2025-10-16
25
+
10
26
  ### Added
11
27
 
12
28
  - Responsiviness adjustment to to Buying policies page
@@ -16,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
32
  - Responsiviness to Buying policies page
17
33
 
18
34
  ### Added
35
+
19
36
  - Credit card page responsiveness
20
37
  - Change for the store title based on the SEO
21
38
 
@@ -24,75 +41,84 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
41
  - Responsive design implementation for Addresses section
25
42
 
26
43
  ### Added
27
-
44
+
28
45
  - Standardization the sidebar menu throughout the navigation of the Organizational Account, regardless of the context.
29
46
 
30
47
  ### Added
31
- - Added responsiveness to the Payment Methods list.
32
- - Implemented responsiveness across all drawers in the Payment Methods flow.
33
- - Ensured responsive behavior for toasts and empty states.
48
+
49
+ - Added responsiveness to the Payment Methods list.
50
+ - Implemented responsiveness across all drawers in the Payment Methods flow.
51
+ - Ensured responsive behavior for toasts and empty states.
34
52
 
35
53
  ### Fixed
36
54
 
37
- - Allow creation of user with no roles
55
+ - Allow creation of user with no roles
38
56
 
39
57
  ### Added
40
58
 
41
- - Responsiviness to Buying policies page
59
+ - Responsiviness to Buying policies page
42
60
 
43
61
  ### Added
44
62
 
45
- - Credit card page responsiveness
46
- - Change for the store title based on the SEO
63
+ - Credit card page responsiveness
64
+ - Change for the store title based on the SEO
47
65
 
48
66
  ### Added
49
67
 
50
- - Standardization the sidebar menu throughout the navigation of the Organizational Account, regardless of the context.
68
+ - Standardization the sidebar menu throughout the navigation of the Organizational Account, regardless of the context.
51
69
 
52
70
  ### Fixed
53
71
 
54
- - Fix geoCordinate to be geoCoordinates
55
- - Adjusts in Credit Card's experience
56
- - Create a custom dropdown for Buying Policy criteria
72
+ - Fix geoCordinate to be geoCoordinates
73
+ - Adjusts in Credit Card's experience
74
+ - Create a custom dropdown for Buying Policy criteria
57
75
 
58
76
  ### Added
59
77
 
60
- - Send credentials
78
+ - Send credentials
61
79
 
62
80
  ### Added
63
81
 
64
- - Roles and Role Details Screen
65
- - Role Integration on Users
66
- - Setup lint
67
- - Add default values for Credit Cards
82
+ - Roles and Role Details Screen
83
+ - Role Integration on Users
84
+ - Setup lint
85
+ - Add default values for Credit Cards
68
86
 
69
87
  ### changed
70
88
 
71
- - BFF API URLs
89
+ - BFF API URLs
72
90
 
73
91
  ### added
74
92
 
75
- - Address Recipients Add & Delete Feature
76
- - Address Recipients Edit Feature
77
- - Add Buying Policy integration with BFF
78
- - Add default values for Address
93
+ - Address Recipients Add & Delete Feature
94
+ - Address Recipients Edit Feature
95
+ - Add Buying Policy integration with BFF
96
+ - Add default values for Address
79
97
 
80
98
  ### Fixed
81
99
 
82
- - UserData accepts undefined e-mail
83
- - Fix styles
84
- - Fix Address Recipients bff path
100
+ - UserData accepts undefined e-mail
101
+ - Fix styles
102
+ - Fix Address Recipients bff path
85
103
 
86
104
  ### Added
87
105
 
88
- - Add Buying Policies Page
89
- - Add Buying Policy Details Page
90
- - Add Buying Policy Drawers
91
- - Add Buying Policy Integrations
92
- - Add Pagination Tools
93
- - Add Address Pagination
106
+ - Add Buying Policies Page
107
+ - Add Buying Policy Details Page
108
+ - Add Buying Policy Drawers
109
+ - Add Buying Policy Integrations
110
+ - Add Pagination Tools
111
+ - Add Address Pagination
94
112
 
95
113
  ### Added
96
114
 
97
- - Add CHANGELOG file
98
- - Add README file
115
+ - Add CHANGELOG file
116
+ - Add README file
117
+
118
+ [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/1.3.3...HEAD
119
+ [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
120
+ [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
121
+ [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
122
+ [1.3.2]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.2
123
+
124
+ [1.3.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.3
package/package.json CHANGED
@@ -1,44 +1,49 @@
1
1
  {
2
- "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.3.1",
4
- "description": "A plugin for faststore with buyer portal",
5
- "main": "index.js",
6
- "scripts": {
7
- "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
8
- "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
9
- "prepare": "husky"
10
- },
11
- "lint-staged": {
12
- "*.{js,jsx,ts,tsx}": [
13
- "eslint --fix"
14
- ]
15
- },
16
- "dependencies": {
17
- "@types/react-dom": "^19.0.3",
18
- "react-dom": "^19.0.0"
19
- },
20
- "devDependencies": {
21
- "@eslint/js": "^9.29.0",
22
- "@faststore/core": "^3.41.5",
23
- "@faststore/ui": "^3.41.5",
24
- "@types/react": "^18.2.42",
25
- "cypress": "13",
26
- "eslint": "^9.29.0",
27
- "eslint-config-prettier": "^10.1.5",
28
- "eslint-plugin-import": "^2.32.0",
29
- "eslint-plugin-prettier": "^5.5.1",
30
- "eslint-plugin-react": "^7.37.5",
31
- "globals": "^16.2.0",
32
- "husky": "^9.1.7",
33
- "lint-staged": "^16.1.2",
34
- "next": "13.5.7",
35
- "typescript": "4.7.3",
36
- "typescript-eslint": "^8.35.0"
37
- },
38
- "peerDependencies": {
39
- "react": "^18.2.0",
40
- "react-dom": "^18.2.0"
41
- },
42
- "license": "MIT",
43
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
2
+ "name": "@vtex/faststore-plugin-buyer-portal",
3
+ "version": "1.3.3",
4
+ "description": "A plugin for faststore with buyer portal",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
8
+ "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
9
+ "prepare": "husky",
10
+ "release": "yarn release:stable",
11
+ "release:stable": "yarn check --integrity && yarn release-it -c .release-it.json --ci --no-npm"
12
+ },
13
+ "lint-staged": {
14
+ "*.{js,jsx,ts,tsx}": [
15
+ "eslint --fix"
16
+ ]
17
+ },
18
+ "dependencies": {
19
+ "@types/react-dom": "^19.0.3",
20
+ "react-dom": "^19.0.0"
21
+ },
22
+ "devDependencies": {
23
+ "@eslint/js": "^9.29.0",
24
+ "@faststore/core": "^3.41.5",
25
+ "@faststore/ui": "^3.41.5",
26
+ "@release-it/bumper": "^4.0.0",
27
+ "@release-it/keep-a-changelog": "^3.0.0",
28
+ "@types/react": "^18.2.42",
29
+ "cypress": "13",
30
+ "eslint": "^9.29.0",
31
+ "eslint-config-prettier": "^10.1.5",
32
+ "eslint-plugin-import": "^2.32.0",
33
+ "eslint-plugin-prettier": "^5.5.1",
34
+ "eslint-plugin-react": "^7.37.5",
35
+ "globals": "^16.2.0",
36
+ "husky": "^9.1.7",
37
+ "lint-staged": "^16.1.2",
38
+ "next": "13.5.7",
39
+ "release-it": "^17.1.1",
40
+ "typescript": "4.7.3",
41
+ "typescript-eslint": "^8.35.0"
42
+ },
43
+ "peerDependencies": {
44
+ "react": "^18.2.0",
45
+ "react-dom": "^18.2.0"
46
+ },
47
+ "license": "MIT",
48
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
44
49
  }
@@ -537,4 +537,11 @@
537
537
  fill="currentColor"
538
538
  />
539
539
  </symbol>
540
+
541
+ <symbol id="CircleQuestionMark" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
542
+ <path
543
+ d="M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"
544
+ fill="currentColor"/>
545
+ </symbol>
540
546
  </svg>
547
+
@@ -138,7 +138,7 @@ export default class AddressesClient extends Client {
138
138
  streetAddress: data.streetAddress,
139
139
  neighborhood: data?.neighborhood ?? "",
140
140
  streetAddress2: data.streetAddress2,
141
- number: data.streetNumber ?? "",
141
+ streetNumber: data.streetNumber ?? "",
142
142
  city: data.city,
143
143
  state: data.state,
144
144
  country: data.countryCode,
@@ -210,6 +210,21 @@ export const AddressForm = ({
210
210
  show={isTouched && !address.streetNumber?.trim()}
211
211
  message="Number is required"
212
212
  />
213
+
214
+ <InputText
215
+ label="Neighborhood"
216
+ value={address.neighborhood || ""}
217
+ className="address-neighborhood"
218
+ hasError={isTouched && !address.neighborhood?.trim()}
219
+ onChange={(event) =>
220
+ setAddress({ ...address, neighborhood: event.target.value })
221
+ }
222
+ />
223
+
224
+ <ErrorMessage
225
+ show={isTouched && !address.neighborhood?.trim()}
226
+ message="Neighborhood is required"
227
+ />
213
228
  </>
214
229
  )}
215
230
 
@@ -15,6 +15,7 @@ const AddressDisplay: React.FC<AddressDisplayProps> = ({
15
15
  {option?.streetAddress}
16
16
  {option?.streetAddress2 && `, ${option?.streetAddress2}`}
17
17
  {option?.streetNumber && ` ${option?.streetNumber}`}
18
+ {option?.neighborhood && `, ${option?.neighborhood}`}
18
19
  {option?.unit && ` ${option?.unit}`}
19
20
  {option?.city && `, ${option?.city}`}
20
21
  {option?.state && `, ${option?.state}`}
@@ -110,7 +110,13 @@ export const CreateAddressDrawer = ({
110
110
  const hasBrazilianNumber =
111
111
  !isBrazil || (isBrazil && address.streetNumber?.trim());
112
112
 
113
- return (hasRequiredFields && hasBrazilianNumber) || useExistingAddress;
113
+ const hasBrazilianNeighborhood =
114
+ !isBrazil || (isBrazil && address.neighborhood?.trim());
115
+
116
+ return (
117
+ (hasRequiredFields && hasBrazilianNumber && hasBrazilianNeighborhood) ||
118
+ useExistingAddress
119
+ );
114
120
  };
115
121
 
116
122
  const isConfirmButtonEnabled = hasMinimumAddressInformation();
@@ -75,7 +75,10 @@ export const EditAddressDrawer = ({
75
75
  const hasBrazilianNumber =
76
76
  !isBrazil || (isBrazil && address.streetNumber?.trim());
77
77
 
78
- return hasRequiredFields && hasBrazilianNumber;
78
+ const hasBrazilianNeighborhood =
79
+ !isBrazil || (isBrazil && address.neighborhood?.trim());
80
+
81
+ return hasRequiredFields && hasBrazilianNumber && hasBrazilianNeighborhood;
79
82
  };
80
83
 
81
84
  const isConfirmButtonEnabled = hasMinimumAddressInformation();
@@ -12,3 +12,5 @@ export const LOCAL_STORAGE_LOCATION_EDIT_KEY = "bp_hide_edit_location_confirm";
12
12
 
13
13
  export const LOCAL_STORAGE_RECIPIENT_EDIT_KEY =
14
14
  "bp_hide_edit_recipient_confirm";
15
+
16
+ export const CURRENT_VERSION = "1.3.3";