@vtex/faststore-plugin-buyer-portal 1.0.20 → 1.0.22
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
|
@@ -21,7 +21,7 @@ export default function AddressesCard({ addresses }: AddressesCardProps) {
|
|
|
21
21
|
footerMessage="Manage addresses"
|
|
22
22
|
title="Addresses"
|
|
23
23
|
subTitle={addresses.length ?? 0}
|
|
24
|
-
onPlusIconClick={() => {}}
|
|
24
|
+
onPlusIconClick={() => { }}
|
|
25
25
|
>
|
|
26
26
|
{addresses.length &&
|
|
27
27
|
addresses.slice(0, 3).map((address) => {
|
|
@@ -39,13 +39,13 @@ export default function AddressesCard({ addresses }: AddressesCardProps) {
|
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
41
|
<div data-fs-card-information-type>
|
|
42
|
-
{address.
|
|
42
|
+
{address.types.map((tag) => (
|
|
43
43
|
<Tag key={`${address.id}-${tag}`}>{tag}</Tag>
|
|
44
44
|
))}
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
47
47
|
<div data-fs-card-action-row>
|
|
48
|
-
<Toggle id="addressActive" defaultChecked={address.
|
|
48
|
+
<Toggle id="addressActive" defaultChecked={address.isActive} />
|
|
49
49
|
|
|
50
50
|
<Dropdown>
|
|
51
51
|
<DropdownButton data-fs-card-row-dropdown-button>
|
|
@@ -87,7 +87,7 @@ export default function AddressesCard({ addresses }: AddressesCardProps) {
|
|
|
87
87
|
</div>
|
|
88
88
|
<Toggle
|
|
89
89
|
id="addressActiveMenu"
|
|
90
|
-
defaultChecked={address.
|
|
90
|
+
defaultChecked={address.isActive}
|
|
91
91
|
data-fs-internal-toggle
|
|
92
92
|
/>
|
|
93
93
|
</div>
|
|
@@ -9,9 +9,9 @@ import { Icon } from "../../components/Icon";
|
|
|
9
9
|
export type AddressDetailsLayoutProps = { data: AddressData };
|
|
10
10
|
|
|
11
11
|
export const AddressDetailsLayout = ({
|
|
12
|
-
data: { id,
|
|
12
|
+
data: { id, isActive, ...addressData },
|
|
13
13
|
}: AddressDetailsLayoutProps) => {
|
|
14
|
-
const [checked, setChecked] = useState(
|
|
14
|
+
const [checked, setChecked] = useState(isActive);
|
|
15
15
|
|
|
16
16
|
const props = Object.keys(addressLabelToPropMapping) as Array<
|
|
17
17
|
keyof typeof addressLabelToPropMapping
|
|
@@ -14,8 +14,8 @@ export const addressesData: AddressData[] = [
|
|
|
14
14
|
neighborhood: "Midtown",
|
|
15
15
|
latitude: 42.0059,
|
|
16
16
|
longitude: -87.9703,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
types: ["Billing", "Shipping"],
|
|
18
|
+
isActive: true,
|
|
19
19
|
locations: [
|
|
20
20
|
"Room E980B",
|
|
21
21
|
"Room E077O",
|
|
@@ -38,8 +38,8 @@ export const addressesData: AddressData[] = [
|
|
|
38
38
|
neighborhood: "Central Square",
|
|
39
39
|
latitude: 42.3736,
|
|
40
40
|
longitude: -71.1097,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
types: ["Shipping"],
|
|
42
|
+
isActive: true,
|
|
43
43
|
locations: [
|
|
44
44
|
"Room A101",
|
|
45
45
|
"Room A102",
|
|
@@ -62,8 +62,8 @@ export const addressesData: AddressData[] = [
|
|
|
62
62
|
neighborhood: "Davis Square",
|
|
63
63
|
latitude: 42.3964,
|
|
64
64
|
longitude: -71.1216,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
types: ["Shipping"],
|
|
66
|
+
isActive: true,
|
|
67
67
|
locations: [
|
|
68
68
|
"Room B201",
|
|
69
69
|
"Room B202",
|
|
@@ -86,8 +86,8 @@ export const addressesData: AddressData[] = [
|
|
|
86
86
|
neighborhood: "Midtown Manhattan",
|
|
87
87
|
latitude: 40.7128,
|
|
88
88
|
longitude: -74.006,
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
types: ["Billing"],
|
|
90
|
+
isActive: true,
|
|
91
91
|
locations: [
|
|
92
92
|
"Room C301",
|
|
93
93
|
"Room C302",
|
|
@@ -110,8 +110,8 @@ export const addressesData: AddressData[] = [
|
|
|
110
110
|
neighborhood: "Magnificent Mile",
|
|
111
111
|
latitude: 41.8781,
|
|
112
112
|
longitude: -87.6298,
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
types: ["Billing", "Shipping"],
|
|
114
|
+
isActive: false,
|
|
115
115
|
locations: [
|
|
116
116
|
"Room D401",
|
|
117
117
|
"Room D402",
|
|
@@ -134,8 +134,8 @@ export const addressesData: AddressData[] = [
|
|
|
134
134
|
neighborhood: "Downtown",
|
|
135
135
|
latitude: 37.7749,
|
|
136
136
|
longitude: -122.4194,
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
types: ["Shipping"],
|
|
138
|
+
isActive: true,
|
|
139
139
|
locations: [
|
|
140
140
|
"Room E501",
|
|
141
141
|
"Room E502",
|
|
@@ -158,8 +158,8 @@ export const addressesData: AddressData[] = [
|
|
|
158
158
|
neighborhood: "Hollywood",
|
|
159
159
|
latitude: 34.0522,
|
|
160
160
|
longitude: -118.2437,
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
types: ["Billing"],
|
|
162
|
+
isActive: false,
|
|
163
163
|
locations: [
|
|
164
164
|
"Room F601",
|
|
165
165
|
"Room F602",
|
|
@@ -182,8 +182,8 @@ export const addressesData: AddressData[] = [
|
|
|
182
182
|
neighborhood: "Downtown",
|
|
183
183
|
latitude: 47.6062,
|
|
184
184
|
longitude: -122.3321,
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
types: ["Shipping"],
|
|
186
|
+
isActive: true,
|
|
187
187
|
locations: [
|
|
188
188
|
"Room G701",
|
|
189
189
|
"Room G702",
|
|
@@ -206,8 +206,8 @@ export const addressesData: AddressData[] = [
|
|
|
206
206
|
neighborhood: "Downtown",
|
|
207
207
|
latitude: 30.2672,
|
|
208
208
|
longitude: -97.7431,
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
types: ["Billing", "Shipping"],
|
|
210
|
+
isActive: true,
|
|
211
211
|
locations: [
|
|
212
212
|
"Room H801",
|
|
213
213
|
"Room H802",
|
|
@@ -230,8 +230,8 @@ export const addressesData: AddressData[] = [
|
|
|
230
230
|
neighborhood: "South Beach",
|
|
231
231
|
latitude: 25.7617,
|
|
232
232
|
longitude: -80.1918,
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
types: ["Shipping"],
|
|
234
|
+
isActive: false,
|
|
235
235
|
locations: [
|
|
236
236
|
"Room I901",
|
|
237
237
|
"Room I902",
|