@vtex/faststore-plugin-buyer-portal 1.1.94 → 1.1.96
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 +1 -1
- package/src/features/addresses/clients/AddressesClient.ts +2 -2
- package/src/features/addresses/components/AddressForm/AddressForm.tsx +0 -15
- package/src/features/addresses/components/AddressInfoDisplay/AddressInfoDisplay.tsx +0 -1
- package/src/features/addresses/components/AddressLocationsList/AddressLocationsList.tsx +28 -39
- package/src/features/addresses/components/AddressRecipientsList/AddressRecipientsList.tsx +42 -42
- package/src/features/addresses/components/CreateAddressDrawer/CreateAddressDrawer.tsx +0 -2
- package/src/features/addresses/layouts/AddressDetailsLayout/address-details-layout.scss +285 -286
- package/src/features/addresses/layouts/AddressesLayout/AddressesLayout.tsx +26 -29
- package/src/features/addresses/layouts/AddressesLayout/addresses-layout.scss +144 -151
- package/src/features/addresses/types/AddressData.ts +3 -3
- package/src/features/budgets/components/BudgetAllocationsSelection/BudgetAllocationsSelection.tsx +61 -57
- package/src/features/budgets/components/BudgetAllocationsSelection/budget-allocations-selection.scss +131 -232
- package/src/features/budgets/components/BudgetAllocationsTable/BudgetAllocationsTable.tsx +104 -91
- package/src/features/budgets/components/BudgetAllocationsTable/budget-allocations-table.scss +80 -182
- package/src/features/budgets/components/BudgetsTable/BudgetsTable.tsx +90 -107
- package/src/features/budgets/components/BudgetsTable/budgets-table.scss +128 -126
- package/src/features/budgets/layouts/BudgetsLayout/BudgetsLayout.tsx +0 -15
- package/src/features/buying-policies/layouts/BuyingPoliciesLayout/BuyingPoliciesLayout.tsx +61 -46
- package/src/features/buying-policies/layouts/BuyingPoliciesLayout/buying-policies-layout.scss +64 -70
- package/src/features/collections/components/CollectionsTable/CollectionsTable.tsx +12 -18
- package/src/features/collections/components/CollectionsTable/collections-table.scss +138 -118
- package/src/features/collections/components/table/AddCollectionsDrawerTable.tsx +48 -54
- package/src/features/collections/components/table/add-collections-drawer-table.scss +57 -56
- package/src/features/credit-cards/layouts/CreditCardsLayout/CreditCardLayout.tsx +55 -61
- package/src/features/credit-cards/layouts/CreditCardsLayout/credit-card-layout.scss +63 -153
- package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx +58 -49
- package/src/features/payment-methods/components/AddPaymentMethodsDrawer/add-payment-methods-drawer.scss +58 -63
- package/src/features/payment-methods/layouts/PaymentMethodsLayout/PaymentMethodsLayout.tsx +15 -12
- package/src/features/roles/layout/RoleDetailsLayout/RoleDetailsLayout.tsx +57 -26
- package/src/features/roles/layout/RoleDetailsLayout/role-details-layout.scss +77 -0
- package/src/features/roles/layout/RolesLayout/RolesLayout.tsx +4 -12
- package/src/features/roles/layout/RolesLayout/roles-layout.scss +8 -22
- package/src/features/shared/components/CustomField/table/CustomFieldTable.tsx +67 -110
- package/src/features/shared/components/CustomField/table/custom-field-table.scss +39 -144
- package/src/features/shared/components/IconBookmarked/IconBookmarked.tsx +9 -0
- package/src/features/shared/components/IconBookmarked/icon-bookmarked.scss +9 -0
- package/src/features/shared/components/Table/Table.tsx +7 -2
- package/src/features/shared/components/Table/TableCell/TableCell.tsx +15 -3
- package/src/features/shared/components/Table/TableCell/table-cell.scss +34 -0
- package/src/features/shared/components/Table/TableHead/TableHead.tsx +34 -6
- package/src/features/shared/components/Table/TableHead/table-head.scss +53 -49
- package/src/features/shared/components/Table/TableLoading/TableLoading.tsx +16 -6
- package/src/features/shared/components/Table/TableLoading/table-loading.scss +13 -8
- package/src/features/shared/components/Table/TableRow/TableRow.tsx +65 -42
- package/src/features/shared/components/Table/TableRow/table-row.scss +104 -68
- package/src/features/shared/components/Table/table.scss +11 -6
- package/src/features/shared/components/Table/utils/tableColumns.ts +30 -33
- package/src/features/shared/components/index.ts +1 -0
- package/src/features/shared/utils/addresLabelToPropMapping.ts +0 -1
- package/src/features/users/layouts/UsersLayout/UsersLayout.tsx +20 -27
- package/src/themes/layouts.scss +1 -0
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
Paginator,
|
|
11
11
|
} from "../../../shared/components";
|
|
12
12
|
import { Table } from "../../../shared/components/Table/Table";
|
|
13
|
+
import { getTableColumns } from "../../../shared/components/Table/utils/tableColumns";
|
|
13
14
|
import {
|
|
14
15
|
useBuyerPortal,
|
|
15
16
|
useDrawerProps,
|
|
@@ -21,7 +22,6 @@ import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
|
21
22
|
import { CreateUserDrawer } from "../../components";
|
|
22
23
|
import { UserDropdownMenu } from "../../components/UserDropdownMenu/UserDropdownMenu";
|
|
23
24
|
|
|
24
|
-
import type { TableColumn } from "../../../shared/components/Table/TableHead/TableHead";
|
|
25
25
|
import type { UserData } from "../../types";
|
|
26
26
|
|
|
27
27
|
export type UsersLayoutProps = {
|
|
@@ -53,20 +53,19 @@ export const UsersLayout = ({
|
|
|
53
53
|
...createUserDrawerProps
|
|
54
54
|
} = useDrawerProps();
|
|
55
55
|
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
];
|
|
56
|
+
const columns = getTableColumns({
|
|
57
|
+
actionsLength: 1,
|
|
58
|
+
nameColumnSize: "13.5rem",
|
|
59
|
+
extraColumns: [
|
|
60
|
+
{
|
|
61
|
+
key: "role",
|
|
62
|
+
label: "Role",
|
|
63
|
+
size: "100%",
|
|
64
|
+
align: "left",
|
|
65
|
+
hideOnScreenSize: "phonemid",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
});
|
|
70
69
|
|
|
71
70
|
const rolesCellLayout = (roles?: string[]) => {
|
|
72
71
|
if (!roles || roles?.length === 0) {
|
|
@@ -112,18 +111,11 @@ export const UsersLayout = ({
|
|
|
112
111
|
itemsLength={users.length}
|
|
113
112
|
/>
|
|
114
113
|
</div>
|
|
115
|
-
<Table>
|
|
116
|
-
<
|
|
117
|
-
<col style={{ width: "40px" }} />
|
|
118
|
-
<col style={{ width: "175px" }} />
|
|
119
|
-
<col style={{ width: "100%" }} />
|
|
120
|
-
<col style={{ width: "40px" }} />
|
|
121
|
-
<col style={{ width: "0" }} />
|
|
122
|
-
</colgroup>
|
|
123
|
-
<Table.Head columns={configTable} />
|
|
114
|
+
<Table layoutFixed>
|
|
115
|
+
<Table.Head columns={columns} />
|
|
124
116
|
<Table.Body>
|
|
125
117
|
{isLoading ? (
|
|
126
|
-
<Table.Loading />
|
|
118
|
+
<Table.Loading columns={columns.length} />
|
|
127
119
|
) : (
|
|
128
120
|
items.map((user) => (
|
|
129
121
|
<Table.Row
|
|
@@ -141,9 +133,10 @@ export const UsersLayout = ({
|
|
|
141
133
|
rolesOptions={rolesOptions}
|
|
142
134
|
/>
|
|
143
135
|
}
|
|
144
|
-
data-fs-bp-users-item
|
|
145
136
|
>
|
|
146
|
-
<Table.Cell>
|
|
137
|
+
<Table.Cell hideOnScreenSize="phonemid">
|
|
138
|
+
{rolesCellLayout(user.roles)}
|
|
139
|
+
</Table.Cell>
|
|
147
140
|
</Table.Row>
|
|
148
141
|
))
|
|
149
142
|
)}
|
package/src/themes/layouts.scss
CHANGED