@vtex/faststore-plugin-buyer-portal 1.1.94 → 1.1.95

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.1.94",
3
+ "version": "1.1.95",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -102,7 +102,7 @@ export default class AddressesClient extends Client {
102
102
  name: data.name,
103
103
  zip: data.zip,
104
104
  streetAddress: data.streetAddress,
105
- neighborhood: data.neighborhood,
105
+ neighborhood: data?.neighborhood ?? "",
106
106
  streetAddress2: data.streetAddress2,
107
107
  city: data.city,
108
108
  state: data.state,
@@ -135,7 +135,7 @@ export default class AddressesClient extends Client {
135
135
  name: data.name,
136
136
  zip: data.zip,
137
137
  streetAddress: data.streetAddress,
138
- neighborhood: data.neighborhood,
138
+ neighborhood: data?.neighborhood ?? "",
139
139
  streetAddress2: data.streetAddress2,
140
140
  city: data.city,
141
141
  state: data.state,
@@ -202,21 +202,6 @@ export const AddressForm = ({
202
202
  }
203
203
  />
204
204
 
205
- <InputText
206
- label="Neighborhood"
207
- value={address.neighborhood}
208
- className="address-postal-code"
209
- hasError={isTouched && !address.neighborhood?.trim()}
210
- onChange={(event) =>
211
- setAddress({ ...address, neighborhood: event.target.value })
212
- }
213
- />
214
-
215
- <ErrorMessage
216
- show={isTouched && !address.neighborhood?.trim()}
217
- message="Neighborhood is required"
218
- />
219
-
220
205
  <InputText
221
206
  label="City"
222
207
  className="address-city"
@@ -16,7 +16,6 @@ const AddressDisplay: React.FC<AddressDisplayProps> = ({
16
16
  {option?.streetAddress2 && `, ${option?.streetAddress2}`}
17
17
  {option?.streetNumber && ` ${option?.streetNumber}`}
18
18
  {option?.unit && ` ${option?.unit}`}
19
- {option?.neighborhood && `, ${option?.neighborhood}`}
20
19
  {option?.city && `, ${option?.city}`}
21
20
  {option?.state && `, ${option?.state}`}
22
21
  {option?.zip && `, ${option?.zip}`}
@@ -47,7 +47,6 @@ export const CreateAddressDrawer = ({
47
47
  geoCoordinates: "",
48
48
  city: "",
49
49
  types: [],
50
- neighborhood: "",
51
50
  });
52
51
 
53
52
  const [locations, setLocations] = useState<LocationInput[]>([{ name: "" }]);
@@ -104,7 +103,6 @@ export const CreateAddressDrawer = ({
104
103
  address.country &&
105
104
  address.zip &&
106
105
  address.state &&
107
- address.neighborhood &&
108
106
  address.city &&
109
107
  address.types.length > 0) ||
110
108
  useExistingAddress
@@ -11,7 +11,7 @@ export type AddressOption = {
11
11
  streetAddress2: string;
12
12
  streetNumber: string;
13
13
  unit: string;
14
- neighborhood: string;
14
+ neighborhood?: string;
15
15
  city: string;
16
16
  state: string;
17
17
  zip: string;
@@ -31,7 +31,7 @@ export type CheckoutAddress = {
31
31
  coutry: string;
32
32
  street: string;
33
33
  number: string;
34
- neighborhood: string;
34
+ neighborhood?: string;
35
35
  complement: string;
36
36
  reference: string;
37
37
  geoCoordinates: string[];
@@ -97,7 +97,7 @@ export type AddressInput = {
97
97
  locations?: string[];
98
98
  city: string;
99
99
  types: string[];
100
- neighborhood: string;
100
+ neighborhood?: string;
101
101
  };
102
102
 
103
103
  export type GetAddressesByUnitIdParams = {
@@ -7,7 +7,6 @@ export const addressLabelToPropMapping = {
7
7
  zip: "Postal Code",
8
8
  state: "State",
9
9
  city: "City",
10
- neighborhood: "Neighborhood",
11
10
  geoCoordinates: "Geo coordinate",
12
11
  types: "Address Type",
13
12
  };