@vtex/faststore-plugin-buyer-portal 1.3.24 → 1.3.26

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +19 -2
  2. package/package.json +1 -1
  3. package/src/features/addresses/clients/DefaultValuesClient.ts +31 -1
  4. package/src/features/addresses/components/CreateAddressSettingsDrawer/CreateAddressSettingsDrawer.tsx +39 -5
  5. package/src/features/addresses/hooks/index.ts +3 -0
  6. package/src/features/addresses/hooks/useGetDefaultAddresses.ts +34 -0
  7. package/src/features/addresses/services/default-values/get-default-address.service.ts +58 -0
  8. package/src/features/addresses/services/index.ts +4 -0
  9. package/src/features/addresses/types/AddressData.ts +14 -0
  10. package/src/features/addresses/types/index.ts +1 -0
  11. package/src/features/budgets/components/BudgetDeleteDrawer/budget-delete-drawer.scss +0 -13
  12. package/src/features/budgets/components/BudgetEditNotificationDrawer/budget-edit-notification-drawer.scss +0 -13
  13. package/src/features/budgets/components/CreateBudgetAllocationDrawer/CreateBudgetAllocationDrawer.tsx +6 -1
  14. package/src/features/budgets/components/CreateBudgetAllocationDrawer/create-budget-allocation-drawer.scss +0 -12
  15. package/src/features/budgets/components/CreateBudgetDrawer/CreateBudgetDrawer.tsx +6 -1
  16. package/src/features/budgets/components/DeleteBudgetAllocationDrawer/delete-budget-allocations.scss +0 -14
  17. package/src/features/budgets/components/EditBudgetDrawer/EditBudgetDrawer.tsx +6 -1
  18. package/src/features/budgets/components/EditBudgetDrawer/edit-budget-drawer.scss +0 -3
  19. package/src/features/budgets/layouts/BudgetsDetailsLayout/budget-details-layout.scss +0 -2
  20. package/src/features/buying-policies/components/BasicBuyingPolicyDrawer/BasicBuyingPolicyDrawer.tsx +6 -1
  21. package/src/features/buying-policies/components/BasicBuyingPolicyDrawer/basic-buying-policy-drawer.scss +0 -5
  22. package/src/features/org-units/components/DeleteOrgUnitDrawer/DeleteOrgUnitDrawer.tsx +2 -1
  23. package/src/features/org-units/components/DeleteOrgUnitDrawer/delete-org-unit-drawer.scss +0 -8
  24. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx +6 -1
  25. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/add-payment-methods-drawer.scss +0 -11
  26. package/src/features/product-assortment/components/AddProductAssortmentDrawer/AddProductAssortmentDrawer.tsx +2 -1
  27. package/src/features/product-assortment/components/AddProductAssortmentDrawer/add-product-assortment-drawer.scss +0 -5
  28. package/src/features/shared/components/BasicDrawer/BasicDrawer.tsx +5 -1
  29. package/src/features/shared/components/BasicDrawer/basic-drawer.scss +10 -2
  30. package/src/features/shared/layouts/BaseTabsLayout/sidebar-drawer/sidebar-drawer.scss +0 -9
  31. package/src/features/shared/utils/constants.ts +1 -1
  32. package/src/features/users/components/CreateUserDrawer/CreateUserDrawer.tsx +3 -3
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.26] - 2025-11-25
11
+
12
+ ### Added
13
+
14
+ - Pre-populate default addresses in Address Settings drawer
15
+
16
+ ## [1.3.25] - 2025-11-25
17
+
18
+ ### Added
19
+
20
+ - Add default `size` prop to `BasicDrawer` component
21
+ - Set default size to `"partial"` - min-width with 30rem (480px)
22
+ - Added CSS rules to apply max-width of 960px for large-sized drawers
23
+ - Updated existing drawer components to explicitly specify `size="large"`
24
+ - Improved drawer sizing consistency across the application
25
+
10
26
  ## [1.3.24] - 2025-11-25
11
27
 
12
28
  ### Added
@@ -102,7 +118,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
102
118
  ## [1.3.9] - 2025-10-21
103
119
 
104
120
  ### Added
105
-
106
121
  - Add Changelog entry check on actions
107
122
 
108
123
  ## [1.3.8] - 2025-10-17
@@ -247,7 +262,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
247
262
  - Add CHANGELOG file
248
263
  - Add README file
249
264
 
250
- [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.24...HEAD
265
+ [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.26...HEAD
251
266
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
252
267
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
253
268
  [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
@@ -262,6 +277,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
262
277
 
263
278
  # <<<<<<< HEAD
264
279
 
280
+ [1.3.26]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.25...v1.3.26
281
+ [1.3.25]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.24...v1.3.25
265
282
  [1.3.24]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.23...v1.3.24
266
283
  [1.3.23]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.22...v1.3.23
267
284
  [1.3.22]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.21...v1.3.22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.3.24",
3
+ "version": "1.3.26",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,7 +1,10 @@
1
1
  import { Client } from "../../shared/clients/Client";
2
2
  import { getApiUrl } from "../../shared/utils";
3
3
 
4
- import type { DefaultAddressParams } from "../types/AddressData";
4
+ import type {
5
+ DefaultAddressParams,
6
+ DefaultAddressResponse,
7
+ } from "../types/AddressData";
5
8
 
6
9
  export default class DefaultValuesClient extends Client {
7
10
  constructor() {
@@ -42,6 +45,33 @@ export default class DefaultValuesClient extends Client {
42
45
  }
43
46
  );
44
47
  }
48
+
49
+ getDefaultAddress({
50
+ customerId,
51
+ orgUnitId,
52
+ addressType,
53
+ cookie,
54
+ }: {
55
+ customerId: string;
56
+ orgUnitId: string;
57
+ addressType: "shipping" | "billing";
58
+ cookie: string;
59
+ }) {
60
+ const entity =
61
+ addressType === "shipping" ? "address/shipping" : "address/billing";
62
+
63
+ return this.get<DefaultAddressResponse>(
64
+ `/customers/${customerId}/units/${orgUnitId}/default-values`,
65
+ {
66
+ headers: {
67
+ Cookie: cookie,
68
+ },
69
+ params: {
70
+ entity,
71
+ },
72
+ }
73
+ );
74
+ }
45
75
  }
46
76
 
47
77
  const defaultValuesClient = new DefaultValuesClient();
@@ -1,8 +1,8 @@
1
- import { useState } from "react";
1
+ import { useState, useEffect } from "react";
2
2
 
3
3
  import { useRouter } from "next/router";
4
4
 
5
- import { useUI } from "@faststore/ui";
5
+ import { useUI, Skeleton } from "@faststore/ui";
6
6
 
7
7
  import {
8
8
  type BasicDrawerProps,
@@ -14,6 +14,7 @@ import { OptionSelected } from "../../../shared/components/OptionSelected/Option
14
14
  import { SearchHighlight } from "../../../shared/components/SearchHighlight/SearchHighlight";
15
15
  import { ADDRESS_MESSAGES } from "../../constants/messages";
16
16
  import { useDebouncedSearchAddressByUnitId } from "../../hooks/useDebouncedSearchAddressByUnitId";
17
+ import { useGetDefaultAddress } from "../../hooks/useGetDefaultAddresses";
17
18
  import { useSetDefaultAddress } from "../../hooks/useSetDefaultAddress";
18
19
  import AddressDisplay from "../AddressInfoDisplay/AddressInfoDisplay";
19
20
 
@@ -33,7 +34,6 @@ export const CreateAddressSettingsDrawer = ({
33
34
  ...props
34
35
  }: CreateAddressSettingsDrawerProps) => {
35
36
  const { pushToast } = useUI();
36
-
37
37
  const router = useRouter();
38
38
 
39
39
  const [searchValue, setSearchValue] = useState("");
@@ -47,6 +47,36 @@ export const CreateAddressSettingsDrawer = ({
47
47
  {} as AddressData
48
48
  );
49
49
 
50
+ const {
51
+ defaultAddress: defaultShippingAddress,
52
+ isDefaultAddressLoading: isLoadingShipping,
53
+ } = useGetDefaultAddress({
54
+ customerId: router.query.contractId as string,
55
+ orgUnitId: router.query.orgUnitId as string,
56
+ addressType: "shipping",
57
+ });
58
+
59
+ const {
60
+ defaultAddress: defaultBillingAddress,
61
+ isDefaultAddressLoading: isLoadingBilling,
62
+ } = useGetDefaultAddress({
63
+ customerId: router.query.contractId as string,
64
+ orgUnitId: router.query.orgUnitId as string,
65
+ addressType: "billing",
66
+ });
67
+
68
+ useEffect(() => {
69
+ if (defaultShippingAddress && !shippingAddress?.id) {
70
+ setShippingAddress(defaultShippingAddress);
71
+ }
72
+ }, [defaultShippingAddress]);
73
+
74
+ useEffect(() => {
75
+ if (defaultBillingAddress && !billingAddress?.id) {
76
+ setBillingAddress(defaultBillingAddress);
77
+ }
78
+ }, [defaultBillingAddress]);
79
+
50
80
  const { searchedAddresses } = useDebouncedSearchAddressByUnitId({
51
81
  orgUnitId: router.query.orgUnitId as string,
52
82
  search: searchValue,
@@ -118,7 +148,9 @@ export const CreateAddressSettingsDrawer = ({
118
148
  Default shipping address (optional)
119
149
  </p>
120
150
 
121
- {shippingAddress?.id ? (
151
+ {isLoadingShipping ? (
152
+ <Skeleton size={{ height: "3.5rem", width: "100%" }} />
153
+ ) : shippingAddress?.id ? (
122
154
  <OptionSelected
123
155
  label={shippingAddress.name}
124
156
  triggerIcon={<Icon name="MinusCircle" />}
@@ -169,7 +201,9 @@ export const CreateAddressSettingsDrawer = ({
169
201
  Default billing address (optional)
170
202
  </p>
171
203
 
172
- {billingAddress?.id ? (
204
+ {isLoadingBilling ? (
205
+ <Skeleton size={{ height: "3.5rem", width: "100%" }} />
206
+ ) : billingAddress?.id ? (
173
207
  <OptionSelected
174
208
  label={billingAddress.name}
175
209
  triggerIcon={<Icon name="MinusCircle" />}
@@ -5,3 +5,6 @@ export * from "./useAddLocationsToAddress";
5
5
  export * from "./useAddressLocationList";
6
6
  export * from "./useAddressLocationEdit";
7
7
  export * from "./useAddressLocationDelete";
8
+ export * from "./useSetDefaultAddress";
9
+ export * from "./useUnsetDefaultAddress";
10
+ export * from "./useGetDefaultAddresses";
@@ -0,0 +1,34 @@
1
+ import { type QueryOptions, useQuery } from "../../shared/hooks";
2
+ import { getDefaultAddressService } from "../services";
3
+
4
+ import type { AddressData } from "../types";
5
+
6
+ interface GetDefaultAddressParams {
7
+ customerId: string;
8
+ orgUnitId: string;
9
+ addressType: "shipping" | "billing";
10
+ }
11
+
12
+ export const useGetDefaultAddress = (
13
+ { customerId, orgUnitId, addressType }: GetDefaultAddressParams,
14
+ options?: QueryOptions<AddressData | null>
15
+ ) => {
16
+ const { data, error, isLoading, refetch } = useQuery(
17
+ `defaultAddress/${customerId}/${orgUnitId}/${addressType}`,
18
+ ({ cookie }) =>
19
+ getDefaultAddressService({
20
+ customerId,
21
+ orgUnitId,
22
+ addressType,
23
+ cookie,
24
+ }),
25
+ options
26
+ );
27
+
28
+ return {
29
+ defaultAddress: data,
30
+ hasDefaultAddressError: error,
31
+ isDefaultAddressLoading: isLoading,
32
+ refetchDefaultAddress: refetch,
33
+ };
34
+ };
@@ -0,0 +1,58 @@
1
+ import { defaultValuesClient } from "../../clients/DefaultValuesClient";
2
+
3
+ import type { AddressData, DefaultAddressResponse } from "../../types";
4
+
5
+ export interface GetDefaultAddressServiceProps {
6
+ customerId: string;
7
+ orgUnitId: string;
8
+ addressType: "shipping" | "billing";
9
+ cookie: string;
10
+ }
11
+
12
+ const mapDefaultAddressToAddressData = (
13
+ response: DefaultAddressResponse
14
+ ): AddressData => {
15
+ return {
16
+ id: response.userId || "",
17
+ name: response.addressLabel,
18
+ types: [response.addressType],
19
+ isActive: response.isActive,
20
+ isDefault: true,
21
+ streetAddress: response.street,
22
+ streetAddress2: response.complement,
23
+ streetNumber: response.number,
24
+ number: response.number,
25
+ unit: "",
26
+ neighborhood: response.neighborhood,
27
+ city: response.city,
28
+ state: response.state,
29
+ zip: response.postalCode,
30
+ country: response.country,
31
+ geoCoordinates: response.geoCoordinate || "",
32
+ locations: [],
33
+ };
34
+ };
35
+
36
+ export async function getDefaultAddressService({
37
+ customerId,
38
+ orgUnitId,
39
+ addressType,
40
+ cookie,
41
+ }: GetDefaultAddressServiceProps): Promise<AddressData | null> {
42
+ try {
43
+ const data = await defaultValuesClient.getDefaultAddress({
44
+ customerId,
45
+ orgUnitId,
46
+ addressType,
47
+ cookie,
48
+ });
49
+
50
+ if (!data) {
51
+ return null;
52
+ }
53
+
54
+ return mapDefaultAddressToAddressData(data);
55
+ } catch {
56
+ return null;
57
+ }
58
+ }
@@ -31,3 +31,7 @@ export {
31
31
  getAddressRecipientsService,
32
32
  type GetAddressRecipientsServiceProps,
33
33
  } from "./recipients/get-address-recipients.service";
34
+ export {
35
+ getDefaultAddressService,
36
+ type GetDefaultAddressServiceProps,
37
+ } from "./default-values/get-default-address.service";
@@ -171,3 +171,17 @@ export type EditDeleteLocationParams = {
171
171
  location: LocationData;
172
172
  unitId: string;
173
173
  };
174
+
175
+ export type DefaultAddressResponse = Pick<
176
+ CheckoutAddress,
177
+ "postalCode" | "city" | "state" | "street" | "number" | "complement"
178
+ > &
179
+ Pick<PaymentAddress, "addressType" | "receiverName"> & {
180
+ addressName: string;
181
+ addressLabel: string;
182
+ neighborhood: string;
183
+ country: string;
184
+ geoCoordinate: string | null;
185
+ isActive: boolean;
186
+ userId?: string;
187
+ };
@@ -5,4 +5,5 @@ export type {
5
5
  RecipientInput,
6
6
  RecipientData,
7
7
  AddressInput,
8
+ DefaultAddressResponse,
8
9
  } from "./AddressData";
@@ -4,19 +4,6 @@
4
4
  @import "../../../shared/components/InputText/input-text.scss";
5
5
  @import "../../../shared/components/ErrorMessage/error-message.scss";
6
6
 
7
- &[data-fs-bp-basic-drawer][data-fs-slide-over-size="partial"] {
8
- width: 100%;
9
- max-width: none;
10
-
11
- @include media(">=tablet") {
12
- max-width: 30rem;
13
- }
14
-
15
- @include media(">=notebook") {
16
- max-width: 40rem;
17
- }
18
- }
19
-
20
7
  [data-fs-bp-basic-drawer-body] {
21
8
  overflow-y: auto;
22
9
  }
@@ -11,19 +11,6 @@
11
11
  gap: var(--fs-spacing-1);
12
12
  }
13
13
 
14
- &[data-fs-bp-basic-drawer][data-fs-slide-over-size="partial"] {
15
- width: 100%;
16
- max-width: none;
17
-
18
- @include media(">=tablet") {
19
- max-width: 30rem;
20
- }
21
-
22
- @include media(">=notebook") {
23
- max-width: 40rem;
24
- }
25
- }
26
-
27
14
  [data-fs-bp-basic-drawer-body] {
28
15
  overflow-y: auto;
29
16
  }
@@ -95,7 +95,12 @@ export const CreateBudgetAllocationDrawer = ({
95
95
  }
96
96
 
97
97
  return (
98
- <BasicDrawer data-fs-bp-create-budget-drawer close={close} {...props}>
98
+ <BasicDrawer
99
+ data-fs-bp-create-budget-drawer
100
+ close={close}
101
+ size="large"
102
+ {...props}
103
+ >
99
104
  <BasicDrawer.Heading
100
105
  title={
101
106
  <div data-fs-bp-create-budget-drawer-header-arrow>
@@ -16,18 +16,6 @@
16
16
  }
17
17
 
18
18
  &[data-fs-bp-basic-drawer] {
19
- width: 100% !important;
20
- max-width: none !important;
21
-
22
- @include media(">=tablet") {
23
- max-width: 32rem !important;
24
- }
25
-
26
- @include media(">=notebook") {
27
- max-width: 60rem !important;
28
- width: 100% !important;
29
- }
30
-
31
19
  & > [data-fs-bp-basic-drawer-footer] {
32
20
  justify-content: flex-end !important;
33
21
  gap: var(--fs-spacing-1);
@@ -278,7 +278,12 @@ export const CreateBudgetDrawer = ({
278
278
  }
279
279
 
280
280
  return (
281
- <BasicDrawer data-fs-bp-create-budget-drawer close={close} {...props}>
281
+ <BasicDrawer
282
+ data-fs-bp-create-budget-drawer
283
+ close={close}
284
+ size="large"
285
+ {...props}
286
+ >
282
287
  <BasicDrawer.Heading
283
288
  data-fs-bp-create-budget-drawer-step-success={step === "confirmation"}
284
289
  title={
@@ -2,18 +2,4 @@
2
2
 
3
3
  [data-fs-bp-delete-allocation-drawer] {
4
4
  @import "../../../shared/components/InputText/input-text.scss";
5
-
6
- &[data-fs-bp-basic-drawer] {
7
- width: 100%;
8
- max-width: none;
9
-
10
- @include media(">=tablet") {
11
- max-width: 30rem;
12
- min-width: 30rem;
13
- }
14
-
15
- @include media(">=notebook") {
16
- max-width: 40rem;
17
- }
18
- }
19
5
  }
@@ -171,7 +171,12 @@ export const EditBudgetDrawer = ({
171
171
  };
172
172
 
173
173
  return (
174
- <BasicDrawer data-fs-bp-edit-budget-drawer close={close} {...props}>
174
+ <BasicDrawer
175
+ data-fs-bp-edit-budget-drawer
176
+ close={close}
177
+ size="large"
178
+ {...props}
179
+ >
175
180
  <BasicDrawer.Heading title="Edit Budget Settings" onClose={close} />
176
181
 
177
182
  <BasicDrawer.Body>
@@ -13,9 +13,6 @@
13
13
 
14
14
  @include media(">=tablet", "<notebook") {
15
15
  &[data-fs-modal-content] {
16
- max-width: 30rem;
17
- min-width: 30rem;
18
- width: 100%;
19
16
  [data-fs-bp-basic-drawer-body] {
20
17
  [data-fs-bp-basic-drawer-body-wrapper] {
21
18
  padding: var(--fs-spacing-8)
@@ -62,8 +62,6 @@
62
62
  }
63
63
 
64
64
  &[data-fs-bp-basic-drawer] {
65
- max-width: 60rem !important;
66
- width: 100% !important;
67
65
  & > [data-fs-bp-basic-drawer-footer] {
68
66
  justify-content: flex-end !important;
69
67
  gap: var(--fs-spacing-1);
@@ -192,7 +192,12 @@ export const BasicBuyingPolicyDrawer = ({
192
192
  const isConfirmButtonEnabled = isAllFieldsFilled && !isLoading;
193
193
 
194
194
  return (
195
- <BasicDrawer data-fs-bp-basic-buying-policy-drawer close={close} {...props}>
195
+ <BasicDrawer
196
+ data-fs-bp-basic-buying-policy-drawer
197
+ close={close}
198
+ size="large"
199
+ {...props}
200
+ >
196
201
  <BasicDrawer.Heading title={drawerTitle} onClose={close} />
197
202
 
198
203
  <BasicDrawer.Body>
@@ -10,11 +10,6 @@
10
10
  @import "@faststore/ui/src/components/molecules/Tooltip/styles.scss";
11
11
  @import "@faststore/ui/src/components/molecules/Dropdown/styles.scss";
12
12
 
13
- &[data-fs-bp-basic-drawer][data-fs-slide-over-size="partial"] {
14
- --fs-slide-over-partial-max-width-notebook: 60rem;
15
- min-width: var(--fs-slide-over-partial-max-width-notebook);
16
- }
17
-
18
13
  [data-fs-bp-autocomplete-dropdown] {
19
14
  [data-fs-bp-input-text-input] {
20
15
  top: 0;
@@ -73,6 +73,7 @@ export const DeleteOrgUnitDrawer = ({
73
73
  data-fs-bp-delete-org-unit-drawer
74
74
  data-fs-bp-delete-org-unit-drawer-has-content={hasChildren}
75
75
  close={close}
76
+ size={hasChildren ? "large" : "partial"}
76
77
  {...props}
77
78
  >
78
79
  <BasicDrawer.Heading title="Delete organizational unit" onClose={close} />
@@ -112,7 +113,7 @@ export const DeleteOrgUnitDrawer = ({
112
113
  <p data-fs-bp-delete-org-unit-drawer-message>
113
114
  Before deleting
114
115
  <span data-fs-bp-delete-org-unit-drawer-message-name>
115
- {` ${name} `}
116
+ {` ${name}`}
116
117
  </span>
117
118
  , you must first remove all child organizational units{" "}
118
119
  {users?.length ? "and users" : ""}.
@@ -6,14 +6,6 @@
6
6
  @import "../../../shared/components/ErrorMessage/error-message.scss";
7
7
  @import "../OrgUnitsHierarchyTree/org-units-hierarchy-tree.scss";
8
8
 
9
- &[data-fs-bp-delete-org-unit-drawer-has-content="true"] {
10
- @include media(">=tablet") {
11
- width: 75vw !important;
12
- min-width: 31.25rem !important;
13
- max-width: 75vw !important;
14
- }
15
- }
16
-
17
9
  [data-fs-bp-delete-org-unit-drawer-message] {
18
10
  font-weight: var(--fs-text-weight-regular);
19
11
  font-size: var(--fs-text-size-1);
@@ -205,7 +205,12 @@ export const AddPaymentMethodsDrawer = ({
205
205
  };
206
206
 
207
207
  return (
208
- <BasicDrawer data-fs-bp-add-payment-methods-drawer close={close} {...props}>
208
+ <BasicDrawer
209
+ data-fs-bp-add-payment-methods-drawer
210
+ close={close}
211
+ size="large"
212
+ {...props}
213
+ >
209
214
  <BasicDrawer.Heading title="Add payment methods" onClose={close} />
210
215
 
211
216
  <BasicDrawer.Body>
@@ -1,17 +1,6 @@
1
1
  @import "../SearchPaymentMethods/search-payment-methods.scss";
2
2
 
3
3
  [data-fs-bp-add-payment-methods-drawer] {
4
- &[data-fs-bp-basic-drawer][data-fs-slide-over-size="partial"] {
5
- width: 66%;
6
- min-width: 66%;
7
-
8
- @include media(">=notebook") {
9
- width: 60rem;
10
- min-width: 60rem;
11
- max-width: 60rem;
12
- }
13
- }
14
-
15
4
  [data-fs-payment-methods-drawer] {
16
5
  @import "../../../shared/components/EmptyState/empty-state.scss";
17
6
  @import "../../../shared/components/Table/table.scss";
@@ -70,8 +70,9 @@ export const AddProductAssortmentDrawer = ({
70
70
  return (
71
71
  <BasicDrawer
72
72
  data-fs-bp-add-product-assortment-drawer
73
- id="basicDrawer"
73
+ id="add-product-assortment-drawer"
74
74
  close={close}
75
+ size="large"
75
76
  {...props}
76
77
  >
77
78
  <BasicDrawer.Heading title="Add product assortment" onClose={close} />
@@ -7,11 +7,6 @@
7
7
  @import "../../../shared/components/Paginator/paginator.scss";
8
8
  @import "../../components/table/add-product-assortment-drawer-table.scss";
9
9
 
10
- &[data-fs-bp-basic-drawer] {
11
- max-width: 60rem !important;
12
- width: 100%;
13
- }
14
-
15
10
  [data-fs-bp-add-product-assortment-text-drawer] {
16
11
  display: block;
17
12
  color: var(--fs-color-neutral-5);
@@ -14,6 +14,7 @@ export type BasicDrawerProps = Omit<DrawerProps, "open"> & {
14
14
  id?: string;
15
15
  isOpen: boolean;
16
16
  onDismiss?: () => void;
17
+ size?: "full" | "partial" | "large";
17
18
  };
18
19
 
19
20
  export const BasicDrawer = ({
@@ -21,16 +22,19 @@ export const BasicDrawer = ({
21
22
  onDismiss,
22
23
  id,
23
24
  children,
25
+ size = "partial",
24
26
  ...props
25
27
  }: BasicDrawerProps) => {
26
28
  const { fadeOut } = useFadeEffect();
29
+ const isSizeLarge = size === "large";
27
30
  return (
28
31
  <SlideOver
29
32
  isOpen={isOpen}
30
33
  direction="rightSide"
31
- size="partial"
34
+ size={isSizeLarge ? "full" : size}
32
35
  data-fs-bp-basic-drawer
33
36
  data-fs-mobile-bottom-sheet
37
+ data-fs-bp-basic-drawer-large={isSizeLarge}
34
38
  id={id}
35
39
  onDismiss={onDismiss ?? fadeOut}
36
40
  {...props}
@@ -64,12 +64,20 @@
64
64
  width: 100%;
65
65
 
66
66
  @include media(">=tablet") {
67
- width: 33vw;
68
- min-width: 31.25rem;
67
+ width: 30rem; // 480px
68
+ min-width: 3rem;
69
69
  max-width: 100vw;
70
70
  }
71
71
  }
72
72
 
73
+ &[data-fs-slide-over-size="full"] {
74
+ &[data-fs-bp-basic-drawer-large="true"] {
75
+ --fs-slide-over-partial-max-width-notebook: 60rem; // 960px
76
+ max-width: var(--fs-slide-over-partial-max-width-notebook);
77
+ }
78
+ }
79
+
80
+
73
81
  [data-fs-bp-basic-drawer-heading] {
74
82
  width: 100%;
75
83
  display: flex;
@@ -53,16 +53,7 @@
53
53
  }
54
54
  }
55
55
 
56
- @include media(">=tablet") {
57
- width: 30rem !important;
58
- min-width: 30rem !important;
59
- max-width: 30rem !important;
60
- }
61
-
62
56
  @include media("<=tablet") {
63
- width: 19rem !important;
64
- min-width: 19rem !important;
65
- max-width: 19rem !important;
66
57
  height: 100% !important;
67
58
  border-radius: 0 !important;
68
59
  & > [data-fs-bp-basic-drawer-heading] {
@@ -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.24";
16
+ export const CURRENT_VERSION = "1.3.26";
@@ -298,9 +298,9 @@ export const CreateUserDrawer = ({
298
298
  <br />
299
299
  <p>
300
300
  Users can only belong to one organizational unit at a time. To add
301
- <a href={`/user/${userAlreadyInUse?.id}`}>
302
- {` ${userAlreadyInUse?.name}`}
303
- </a>{" "}
301
+ <a
302
+ href={`/user/${userAlreadyInUse?.id}`}
303
+ >{` ${userAlreadyInUse?.name}`}</a>{" "}
304
304
  to {orgUnitName}, go to their profile and move them from
305
305
  {` ${userAlreadyInUse?.orgUnit}`}.
306
306
  </p>