@vtex/faststore-plugin-buyer-portal 1.1.95 → 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.
Files changed (46) hide show
  1. package/package.json +1 -1
  2. package/src/features/addresses/components/AddressLocationsList/AddressLocationsList.tsx +28 -39
  3. package/src/features/addresses/components/AddressRecipientsList/AddressRecipientsList.tsx +42 -42
  4. package/src/features/addresses/layouts/AddressDetailsLayout/address-details-layout.scss +285 -286
  5. package/src/features/addresses/layouts/AddressesLayout/AddressesLayout.tsx +26 -29
  6. package/src/features/addresses/layouts/AddressesLayout/addresses-layout.scss +144 -151
  7. package/src/features/budgets/components/BudgetAllocationsSelection/BudgetAllocationsSelection.tsx +61 -57
  8. package/src/features/budgets/components/BudgetAllocationsSelection/budget-allocations-selection.scss +131 -232
  9. package/src/features/budgets/components/BudgetAllocationsTable/BudgetAllocationsTable.tsx +104 -91
  10. package/src/features/budgets/components/BudgetAllocationsTable/budget-allocations-table.scss +80 -182
  11. package/src/features/budgets/components/BudgetsTable/BudgetsTable.tsx +90 -107
  12. package/src/features/budgets/components/BudgetsTable/budgets-table.scss +128 -126
  13. package/src/features/budgets/layouts/BudgetsLayout/BudgetsLayout.tsx +0 -15
  14. package/src/features/buying-policies/layouts/BuyingPoliciesLayout/BuyingPoliciesLayout.tsx +61 -46
  15. package/src/features/buying-policies/layouts/BuyingPoliciesLayout/buying-policies-layout.scss +64 -70
  16. package/src/features/collections/components/CollectionsTable/CollectionsTable.tsx +12 -18
  17. package/src/features/collections/components/CollectionsTable/collections-table.scss +138 -118
  18. package/src/features/collections/components/table/AddCollectionsDrawerTable.tsx +48 -54
  19. package/src/features/collections/components/table/add-collections-drawer-table.scss +57 -56
  20. package/src/features/credit-cards/layouts/CreditCardsLayout/CreditCardLayout.tsx +55 -61
  21. package/src/features/credit-cards/layouts/CreditCardsLayout/credit-card-layout.scss +63 -153
  22. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx +58 -49
  23. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/add-payment-methods-drawer.scss +58 -63
  24. package/src/features/payment-methods/layouts/PaymentMethodsLayout/PaymentMethodsLayout.tsx +15 -12
  25. package/src/features/roles/layout/RoleDetailsLayout/RoleDetailsLayout.tsx +57 -26
  26. package/src/features/roles/layout/RoleDetailsLayout/role-details-layout.scss +77 -0
  27. package/src/features/roles/layout/RolesLayout/RolesLayout.tsx +4 -12
  28. package/src/features/roles/layout/RolesLayout/roles-layout.scss +8 -22
  29. package/src/features/shared/components/CustomField/table/CustomFieldTable.tsx +67 -110
  30. package/src/features/shared/components/CustomField/table/custom-field-table.scss +39 -144
  31. package/src/features/shared/components/IconBookmarked/IconBookmarked.tsx +9 -0
  32. package/src/features/shared/components/IconBookmarked/icon-bookmarked.scss +9 -0
  33. package/src/features/shared/components/Table/Table.tsx +7 -2
  34. package/src/features/shared/components/Table/TableCell/TableCell.tsx +15 -3
  35. package/src/features/shared/components/Table/TableCell/table-cell.scss +34 -0
  36. package/src/features/shared/components/Table/TableHead/TableHead.tsx +34 -6
  37. package/src/features/shared/components/Table/TableHead/table-head.scss +53 -49
  38. package/src/features/shared/components/Table/TableLoading/TableLoading.tsx +16 -6
  39. package/src/features/shared/components/Table/TableLoading/table-loading.scss +13 -8
  40. package/src/features/shared/components/Table/TableRow/TableRow.tsx +65 -42
  41. package/src/features/shared/components/Table/TableRow/table-row.scss +104 -68
  42. package/src/features/shared/components/Table/table.scss +11 -6
  43. package/src/features/shared/components/Table/utils/tableColumns.ts +30 -33
  44. package/src/features/shared/components/index.ts +1 -0
  45. package/src/features/users/layouts/UsersLayout/UsersLayout.tsx +20 -27
  46. 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 configTable: Array<TableColumn> = [
57
- {
58
- key: "name",
59
- label: "Name",
60
- align: "left",
61
- colspan: 2,
62
- },
63
- {
64
- key: "role",
65
- label: "Role",
66
- align: "left",
67
- colspan: 3,
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
- <colgroup>
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>{rolesCellLayout(user.roles)}</Table.Cell>
137
+ <Table.Cell hideOnScreenSize="phonemid">
138
+ {rolesCellLayout(user.roles)}
139
+ </Table.Cell>
147
140
  </Table.Row>
148
141
  ))
149
142
  )}
@@ -40,3 +40,4 @@
40
40
  @import "../features/payment-methods/layouts/PaymentMethodsLayout/payment-methods-layout.scss";
41
41
  // Roles
42
42
  @import "../features/roles/layout/RolesLayout/roles-layout.scss";
43
+ @import "../features/roles/layout/RoleDetailsLayout/role-details-layout.scss";