@vtex/faststore-plugin-buyer-portal 1.3.2 → 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.
package/CHANGELOG.md CHANGED
@@ -7,12 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [1.3.2] - 2025-10-16
10
+ ## [1.3.3] - 2025-10-16
11
11
 
12
12
  ### Added
13
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
14
20
  - Setup KeepChangelog
15
21
 
22
+ ## [1.3.2] - 2025-10-16
23
+
16
24
  ## [1.2.4] - 2025-10-16
17
25
 
18
26
  ### Added
@@ -107,9 +115,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
107
115
  - Add CHANGELOG file
108
116
  - Add README file
109
117
 
110
- [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/1.3.2...HEAD
118
+ [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/1.3.3...HEAD
111
119
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
112
120
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
113
121
  [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
114
-
115
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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();
@@ -13,4 +13,4 @@ export const LOCAL_STORAGE_LOCATION_EDIT_KEY = "bp_hide_edit_location_confirm";
13
13
  export const LOCAL_STORAGE_RECIPIENT_EDIT_KEY =
14
14
  "bp_hide_edit_recipient_confirm";
15
15
 
16
- export const CURRENT_VERSION = "1.3.2";
16
+ export const CURRENT_VERSION = "1.3.3";