@vtex/faststore-plugin-buyer-portal 2.0.34 → 2.0.36

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 (19) hide show
  1. package/package.json +1 -1
  2. package/public/buyer-portal-icons.svg +30 -3
  3. package/src/features/contracts/layouts/ContractInformationLayout/ContractInformationLayout.tsx +0 -1
  4. package/src/features/contracts/layouts/ContractListingLayout/ContractListingLayout.tsx +0 -1
  5. package/src/features/org-units/components/OrgUnitDetailsNavbar/LocalizationIconButtonTrigger.tsx +112 -0
  6. package/src/features/org-units/components/OrgUnitDetailsNavbar/OrgUnitDetailsNavbar.tsx +56 -51
  7. package/src/features/org-units/components/OrgUnitDetailsNavbar/org-unit-details-navbar.scss +159 -55
  8. package/src/features/org-units/components/OrgUnitHeaderNav/OrgUnitHeaderNav.tsx +12 -19
  9. package/src/features/org-units/components/OrgUnitHeaderNav/org-unit-header-nav.scss +78 -7
  10. package/src/features/org-units/layouts/OrgUnitDetailsLayout/OrgUnitDetailsLayout.tsx +0 -1
  11. package/src/features/profile/components/ProfileSummary/ProfileSummary.tsx +38 -20
  12. package/src/features/profile/components/ProfileSummary/profile-summary.scss +80 -13
  13. package/src/features/shared/layouts/BaseTabsLayout/Navbar.tsx +19 -118
  14. package/src/features/shared/layouts/BaseTabsLayout/base-tabs-layout.scss +0 -106
  15. package/src/features/shared/layouts/ContractTabsLayout/ContractTabsLayout.tsx +0 -1
  16. package/src/features/shared/layouts/ErrorTabsLayout/ErrorTabsLayout.tsx +0 -1
  17. package/src/features/shared/layouts/SumaPageLayout/SumaPageLayout.tsx +0 -1
  18. package/src/features/shared/utils/constants.ts +1 -1
  19. package/src/pages/user-details.tsx +12 -3
@@ -8,112 +8,6 @@
8
8
  height: 100vh;
9
9
  overflow: hidden;
10
10
 
11
- [data-fs-bp-nav] {
12
- display: flex;
13
- justify-content: space-between;
14
- align-items: center;
15
- background-color: var(--fs-bp-color-neutral-0);
16
- padding: var(--fs-bp-padding-3) var(--fs-bp-padding-5);
17
- border-bottom: 1px solid var(--fs-bp-color-neutral-2);
18
- min-height: 4.25rem;
19
-
20
- @include u.media(">=tablet") {
21
- padding-left: var(--fs-bp-padding-10);
22
- padding-right: var(--fs-bp-padding-10);
23
- }
24
-
25
- [data-fs-localization-button] {
26
- [data-fs-button-wrapper] {
27
- span {
28
- display: inline-flex;
29
- align-items: center;
30
- gap: var(--fs-bp-gap-3);
31
- }
32
- }
33
- }
34
-
35
- [data-fs-bp-breadcrumb-nav] {
36
- [data-fs-bp-breadcrumb-current],
37
- [data-fs-bp-breadcrumb-dropdown-trigger] {
38
- font-size: var(--fs-bp-text-body);
39
-
40
- @include u.media(">=phonemid") {
41
- font-size: var(--fs-bp-text-body-big);
42
- }
43
- }
44
- }
45
-
46
- [data-fs-bp-sidebar-drawer-btn] {
47
- --fs-button-height: var(--fs-bp-spacing-9);
48
- margin-right: var(--fs-bp-margin-2);
49
- }
50
-
51
- [data-fs-bp-nav-breadcrumb-skeleton] {
52
- margin-right: var(--fs-bp-margin-auto);
53
- }
54
-
55
- [data-fs-bp-nav-page-name] {
56
- position: absolute;
57
- left: 50%;
58
- transform: translateX(-50%);
59
-
60
- @include text-style('display-6');
61
- }
62
-
63
- [data-fs-bp-nav-about-trigger] {
64
- --fs-button-height: var(--fs-bp-spacing-9);
65
- --fs-button-border-radius: var(--fs-bp-border-radius-full);
66
- --fs-button-tertiary-text-color: var(--fs-bp-color-black);
67
- }
68
-
69
- [data-fs-bp-nav-account-menu-trigger] {
70
- cursor: pointer;
71
- }
72
-
73
- [data-fs-bp-nav-menu] {
74
- --fs-profile-dropdown-menu-width: 22.5rem;
75
- width: auto;
76
-
77
- background-color: white;
78
-
79
- [data-fs-bp-nav-menu-profile-summary] {
80
- min-width: var(--fs-profile-dropdown-menu-width);
81
- }
82
- }
83
-
84
- [data-fs-bp-nav-menu-actions] {
85
- display: flex;
86
- align-items: center;
87
- gap: var(--fs-bp-gap-4);
88
- }
89
-
90
- [data-fs-bp-nav-menu-start-shopping-link] {
91
- display: none;
92
-
93
- padding: var(--fs-bp-padding-0) var(--fs-bp-padding-5);
94
- @include text-style('action');
95
- color: var(--fs-bp-color-neutral-8);
96
- border-radius: var(--fs-bp-border-radius-full);
97
-
98
- height: var(--fs-bp-spacing-9);
99
- justify-content: center;
100
- align-items: center;
101
- text-decoration: none;
102
-
103
- &:hover {
104
- background-color: var(--fs-bp-color-transparent-0);
105
- }
106
-
107
- &:active {
108
- background-color: var(--fs-bp-color-transparent-1);
109
- }
110
-
111
- @include u.media(">=tablet") {
112
- display: inline-flex;
113
- }
114
- }
115
- }
116
-
117
11
  [data-fs-bp-base-tabs-layout-container] {
118
12
  display: grid;
119
13
  grid-template-columns: 26.25rem 1fr;
@@ -45,7 +45,6 @@ export const ContractTabsLayout = ({
45
45
  <>
46
46
  <OrgUnitDetailsNavbar
47
47
  orgId={resolvedOrgUnitId}
48
- orgName={currentOrgUnit?.name ?? ""}
49
48
  contractId={resolvedContractId}
50
49
  person={{
51
50
  name: currentUser?.name ?? "",
@@ -110,7 +110,6 @@ export const ErrorTabsLayout = ({ children, error }: ErrorTabsLayoutProps) => {
110
110
  <div data-fs-bp-create-user-error-state>
111
111
  <OrgUnitDetailsNavbar
112
112
  orgId={orgUnit?.id ?? ""}
113
- orgName={orgUnit?.name ?? ""}
114
113
  person={{
115
114
  name: user?.name ?? "",
116
115
  }}
@@ -43,7 +43,6 @@ export const SumaPageLayout = ({
43
43
  <>
44
44
  <OrgUnitDetailsNavbar
45
45
  orgId={currentOrgUnit.id}
46
- orgName={currentOrgUnit.name}
47
46
  contractId={contractId}
48
47
  person={{
49
48
  name: currentUser?.name ?? "",
@@ -33,4 +33,4 @@ export const STOREFRONT_RESOURCE_NAMES = {
33
33
  export type StorefrontResourceName =
34
34
  (typeof STOREFRONT_RESOURCE_NAMES)[keyof typeof STOREFRONT_RESOURCE_NAMES];
35
35
 
36
- export const CURRENT_VERSION = "2.0.34";
36
+ export const CURRENT_VERSION = "2.0.36";
@@ -51,7 +51,9 @@ const loaderFunction = async (
51
51
 
52
52
  return withAuthLoader(
53
53
  data,
54
- async ({ cookie, customerId, ...clientContext }) => {
54
+ async ({ cookie, customerId, userId: currentUserId, ...clientContext }) => {
55
+ // `userId` (query) is the user being viewed; `currentUserId` is the
56
+ // signed-in user, who feeds the header like on every other page.
55
57
  const user = await getUserByIdService({ orgUnitId, userId, cookie });
56
58
 
57
59
  if (!user) {
@@ -61,6 +63,7 @@ const loaderFunction = async (
61
63
 
62
64
  const [
63
65
  currentOrgUnit,
66
+ currentUser,
64
67
  orgUnitFromUser,
65
68
  rolesOptions,
66
69
  localizationLabels,
@@ -69,6 +72,7 @@ const loaderFunction = async (
69
72
  id: orgUnitId,
70
73
  cookie,
71
74
  }),
75
+ getUserByIdService({ orgUnitId, userId: currentUserId, cookie }),
72
76
  getOrgUnitByUserIdService({
73
77
  userId,
74
78
  cookie,
@@ -94,9 +98,14 @@ const loaderFunction = async (
94
98
  rolesOptions,
95
99
  },
96
100
  context: {
97
- clientContext: { cookie, customerId, ...clientContext },
101
+ clientContext: {
102
+ cookie,
103
+ customerId,
104
+ userId: currentUserId,
105
+ ...clientContext,
106
+ },
98
107
  currentOrgUnit,
99
- currentUser: user,
108
+ currentUser,
100
109
  localization: { labels: localizationLabels },
101
110
  },
102
111
  };