@vtex/faststore-plugin-buyer-portal 2.0.8 → 2.0.9
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/.github/workflows/release.yaml +4 -4
- package/AGENTS.md +6 -0
- package/CHANGELOG.md +23 -1
- package/docs/superpowers/plans/2026-06-26-contracts-listing-selection-search-pagination.md +1070 -0
- package/docs/superpowers/specs/2026-06-26-contracts-listing-selection-search-pagination-design.md +157 -0
- package/package.json +1 -1
- package/plugin.config.js +8 -0
- package/public/buyer-portal-icons.svg +37 -1
- package/specs/001-suma-phase-2/checklists/requirements.md +36 -0
- package/specs/001-suma-phase-2/contracts/contracts-api.md +187 -0
- package/specs/001-suma-phase-2/contracts/feature-flag.md +91 -0
- package/specs/001-suma-phase-2/data-model.md +119 -0
- package/specs/001-suma-phase-2/plan.md +123 -0
- package/specs/001-suma-phase-2/quickstart.md +156 -0
- package/specs/001-suma-phase-2/research.md +150 -0
- package/specs/001-suma-phase-2/spec.md +186 -0
- package/specs/001-suma-phase-2/tasks.md +253 -0
- package/specs/suma-add-contracts.md +224 -0
- package/specs/suma-contract-listing.md +295 -0
- package/specs/suma-contract-switching.md +201 -0
- package/specs/suma-remove-contracts.md +233 -0
- package/specs/suma-set-default-contract.md +208 -0
- package/src/features/budgets/layouts/BudgetsLayout/BudgetsLayout.tsx +113 -105
- package/src/features/buying-policies/layouts/BuyingPoliciesLayout/BuyingPoliciesLayout.tsx +60 -46
- package/src/features/contracts/clients/ContractsClient.ts +45 -0
- package/src/features/contracts/components/AddContractsDrawer/AddContractsDrawer.tsx +323 -0
- package/src/features/contracts/components/AddContractsDrawer/add-contracts-drawer.scss +282 -0
- package/src/features/contracts/components/ConfirmRemoveDrawer/ConfirmRemoveDrawer.tsx +58 -0
- package/src/features/contracts/components/ConfirmRemoveDrawer/confirm-remove-drawer.scss +18 -0
- package/src/features/contracts/components/ContractListItem/ContractListItem.tsx +120 -0
- package/src/features/contracts/components/ContractSelectAllRow/ContractSelectAllRow.tsx +37 -0
- package/src/features/contracts/components/ContractSelectAllRow/index.ts +2 -0
- package/src/features/contracts/components/ContractSelectionBar/ContractSelectionBar.tsx +47 -0
- package/src/features/contracts/components/ContractSelectionBar/index.ts +2 -0
- package/src/features/contracts/components/ContractSelectionList/ContractSelectionList.tsx +55 -0
- package/src/features/contracts/components/ContractSwitchOverlay/ContractSwitchOverlay.tsx +36 -0
- package/src/features/contracts/components/ContractSwitchOverlay/contract-switch-overlay.scss +7 -0
- package/src/features/contracts/components/ContractsListHeader/ContractsListHeader.tsx +58 -0
- package/src/features/contracts/components/ContractsListHeader/index.ts +2 -0
- package/src/features/contracts/components/ErrorRemoveDrawer/ErrorRemoveDrawer.tsx +69 -0
- package/src/features/contracts/components/UnableToRemoveContractsDrawer/UnableToRemoveContractsDrawer.tsx +52 -0
- package/src/features/contracts/components/UnableToRemoveContractsDrawer/unable-to-remove-contracts-drawer.scss +29 -0
- package/src/features/contracts/components/index.ts +14 -0
- package/src/features/contracts/hooks/__tests__/contractListingHelpers.test.ts +71 -0
- package/src/features/contracts/hooks/__tests__/contractSwitchChannelHelpers.test.ts +32 -0
- package/src/features/contracts/hooks/__tests__/useAddContracts.test.ts +63 -0
- package/src/features/contracts/hooks/__tests__/useContractSelection.test.ts +72 -0
- package/src/features/contracts/hooks/__tests__/useRemoveContracts.test.ts +130 -0
- package/src/features/contracts/hooks/__tests__/useSetDefaultContract.test.ts +82 -0
- package/src/features/contracts/hooks/contractListingHelpers.ts +45 -0
- package/src/features/contracts/hooks/contractSelectionHelpers.ts +28 -0
- package/src/features/contracts/hooks/contractSwitchChannelHelpers.ts +9 -0
- package/src/features/contracts/hooks/index.ts +19 -0
- package/src/features/contracts/hooks/useAddContracts.ts +27 -0
- package/src/features/contracts/hooks/useContractListing.ts +71 -0
- package/src/features/contracts/hooks/useContractSelection.ts +53 -0
- package/src/features/contracts/hooks/useContractSwitchChannel.ts +49 -0
- package/src/features/contracts/hooks/useListAvailableContracts.ts +27 -0
- package/src/features/contracts/hooks/useRemoveContracts.ts +21 -0
- package/src/features/contracts/hooks/useSetDefaultContract.ts +21 -0
- package/src/features/contracts/hooks/useSwitchContract.ts +76 -0
- package/src/features/contracts/layouts/ContractInformationLayout/ContractInformationLayout.tsx +316 -0
- package/src/features/contracts/layouts/ContractListingLayout/ContractListingLayout.tsx +415 -0
- package/src/features/contracts/layouts/ContractListingLayout/ContractSettingsNav.tsx +83 -0
- package/src/features/contracts/layouts/ContractListingLayout/contract-listing-layout.scss +468 -0
- package/src/features/contracts/layouts/ContractListingLayout/utils.ts +4 -0
- package/src/features/contracts/layouts/index.ts +8 -0
- package/src/features/contracts/services/__tests__/contracts-client.test.ts +148 -0
- package/src/features/contracts/services/__tests__/list-attached-contracts.service.test.ts +95 -0
- package/src/features/contracts/services/add-contracts.service.ts +27 -0
- package/src/features/contracts/services/index.ts +24 -0
- package/src/features/contracts/services/list-attached-contracts.service.ts +40 -0
- package/src/features/contracts/services/list-available-contracts.service.ts +32 -0
- package/src/features/contracts/services/remove-contract.service.ts +27 -0
- package/src/features/contracts/services/remove-contracts.service.ts +36 -0
- package/src/features/contracts/services/set-default-contract.service.ts +27 -0
- package/src/features/contracts/types/ContractData.ts +1 -0
- package/src/features/contracts/utils/__tests__/changeContractToken.test.ts +141 -0
- package/src/features/contracts/utils/changeContractToken.ts +122 -0
- package/src/features/contracts/utils/clearPersistedSessionState.ts +74 -0
- package/src/features/org-units/components/OrgUnitDetailsNavbar/OrgUnitDetailsNavbar.tsx +45 -3
- package/src/features/org-units/components/OrgUnitDetailsNavbar/org-unit-details-navbar.scss +35 -0
- package/src/features/org-units/layouts/OrgUnitsLayout/OrgUnitsLayout.tsx +54 -48
- package/src/features/roles/layout/RolesLayout/RolesLayout.tsx +32 -23
- package/src/features/shared/components/BuyerPortalProvider/BuyerPortalProvider.tsx +1 -0
- package/src/features/shared/components/HeaderInside/HeaderInside.tsx +8 -1
- package/src/features/shared/components/HeaderInside/header-inside.scss +9 -0
- package/src/features/shared/layouts/BaseTabsLayout/SidebarMenu.tsx +6 -97
- package/src/features/shared/layouts/ContractTabsLayout/ContractTabsLayout.tsx +42 -5
- package/src/features/shared/layouts/LoadingTabsLayout/LoadingTabsLayout.tsx +1 -1
- package/src/features/shared/layouts/SumaPageLayout/FullSidebarNav.tsx +124 -0
- package/src/features/shared/layouts/SumaPageLayout/SumaPageLayout.tsx +56 -0
- package/src/features/shared/layouts/SumaPageLayout/SumaSidebar.tsx +80 -0
- package/src/features/shared/layouts/SumaPageLayout/SumaSidebarDrawer.tsx +48 -0
- package/src/features/shared/layouts/SumaPageLayout/index.ts +6 -0
- package/src/features/shared/layouts/SumaPageLayout/suma-sidebar-drawer.scss +37 -0
- package/src/features/shared/layouts/index.ts +6 -0
- package/src/features/shared/services/feature-flags/__tests__/get-feature-flags.service.test.ts +71 -0
- package/src/features/shared/services/feature-flags/get-feature-flags.service.ts +1 -0
- package/src/features/shared/utils/buyerPortalRoutes.ts +9 -0
- package/src/features/shared/utils/constants.ts +1 -1
- package/src/features/shared/utils/getSumaListingSidebarLinks.ts +18 -0
- package/src/features/shared/utils/index.ts +1 -0
- package/src/features/users/layouts/UsersLayout/UsersLayout.tsx +97 -103
- package/src/pages/contract-information.tsx +128 -0
- package/src/pages/contracts.tsx +104 -0
- package/src/pages/home.tsx +10 -6
- package/src/pages/org-unit-details.tsx +17 -13
- package/src/themes/layouts.scss +2 -0
- package/.agents/skills/create-page/SKILL.md +0 -154
- package/.agents/skills/create-page/metadata.json +0 -14
- package/.specify/memory/constitution.md +0 -83
|
@@ -38,8 +38,8 @@ jobs:
|
|
|
38
38
|
- name: Install dependencies
|
|
39
39
|
run: yarn install --ignore-engines
|
|
40
40
|
|
|
41
|
-
- name: Update npm
|
|
42
|
-
run: npm install -g npm@
|
|
41
|
+
- name: Update npm
|
|
42
|
+
run: npm install -g npm@11.16.0
|
|
43
43
|
|
|
44
44
|
- name: Generate CHANGELOG and update Version Const
|
|
45
45
|
run: yarn release
|
|
@@ -80,8 +80,8 @@ jobs:
|
|
|
80
80
|
- name: Install dependencies
|
|
81
81
|
run: yarn install --ignore-engines
|
|
82
82
|
|
|
83
|
-
- name: Update npm
|
|
84
|
-
run: npm install -g npm@
|
|
83
|
+
- name: Update npm
|
|
84
|
+
run: npm install -g npm@11.16.0
|
|
85
85
|
|
|
86
86
|
- name: Get current version
|
|
87
87
|
id: get_version
|
package/AGENTS.md
CHANGED
|
@@ -82,3 +82,9 @@ See [docs/conventions.md](docs/conventions.md#feature-flags).
|
|
|
82
82
|
| `ci.yml` | PR labeled `run-tests` | Cypress E2E against `b2bfaststoredev.store` |
|
|
83
83
|
| `changelog.yml` | PR | Validates changelog entry |
|
|
84
84
|
| `release.yaml` | Manual | Publishes to npm |
|
|
85
|
+
|
|
86
|
+
<!-- SPECKIT START -->
|
|
87
|
+
For additional context about technologies to be used, project structure,
|
|
88
|
+
shell commands, and other important information, read the current plan
|
|
89
|
+
at `specs/001-suma-phase-2/plan.md`.
|
|
90
|
+
<!-- SPECKIT END -->
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.0.9] - 2026-07-10
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- SUMA Phase 2 infrastructure foundation: `suma` feature flag wiring, `contracts` and `contract-information` route registration, `isDefault` field on `ContractData`, BFF service layer for attached/available contract listing, add, and remove-one operations (BFF v1.0.2 endpoints)
|
|
15
|
+
- Home page now redirects to the Contract Listing page when the `suma` feature flag is active, preserving the existing `org-unit-details` redirect when the flag is off
|
|
16
|
+
- Full-screen loading overlay during a contract switch, shown from click until the new contract context finishes loading
|
|
17
|
+
- "Unable to remove contracts" blocking drawer that prevents removing every contract from an organizational unit (at least one must remain)
|
|
18
|
+
- "Organization Manager" link with a sparkle icon in the contract listing navbar, routing to the buyer organization manager agent
|
|
19
|
+
- "Set as default" action for attached contracts, available from the Contract Listing dots menu and the Contract Information sidebar menu; calls BFF `PUT units/{unitId}/contracts/attached/{contractId}/default` (BFF v1.0.4) and refreshes the listing/page to reflect the new default. The default contract is marked with a star in the listing, and the action is disabled for the contract that is already the default ([B2BTEAM-3568](https://vtex-dev.atlassian.net/browse/B2BTEAM-3568))
|
|
20
|
+
- Hamburger menu toggle in the Contract Listing / Contract Details navbar, opening the sidebar as a left-side drawer on screens narrower than `notebook` (the sidebar is hidden by default at that breakpoint)
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Contract Listing now flags the unit's default contract (returned first by the BFF) so it shows the default indicator, even when the BFF response omits an explicit `isDefault` flag
|
|
25
|
+
- Confirm-remove drawer on the Contract Listing now closes after a successful contract removal (previously it stayed open over the refreshed list)
|
|
26
|
+
- `contracts` and `contract-information` routes are now gated by the `suma` feature flag — they redirect to the org unit details page when the flag is off (previously they were directly reachable)
|
|
27
|
+
- "Back to contracts" link in the Contract Information sidebar is now shown only when the `suma` feature flag is active
|
|
28
|
+
|
|
10
29
|
## [2.0.8] - 2026-07-07
|
|
11
30
|
|
|
12
31
|
### Fixed
|
|
@@ -14,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
33
|
- Fix Buying Policy criteria field not being editable: the click handler that re-focuses the criteria input referenced `isAccountingFieldCriteria`/`isAccountingValueCriteria` without calling them, so it never re-entered edit mode
|
|
15
34
|
|
|
16
35
|
## [2.0.7] - 2026-06-29
|
|
36
|
+
|
|
17
37
|
### Fixed
|
|
18
38
|
|
|
19
39
|
- Remove `react-dom` from `dependencies` and move `@types/react-dom` to `devDependencies`
|
|
@@ -719,7 +739,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
719
739
|
- Add CHANGELOG file
|
|
720
740
|
- Add README file
|
|
721
741
|
|
|
722
|
-
[unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/
|
|
742
|
+
[unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/2.0.9...HEAD
|
|
723
743
|
[1.3.55]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.54...v1.3.55
|
|
724
744
|
[1.3.54]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.53...v1.3.54
|
|
725
745
|
[1.3.53]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.52...v1.3.53
|
|
@@ -813,3 +833,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
813
833
|
[2.0.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v2.0.2...v2.0.3
|
|
814
834
|
[2.0.2]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v2.0.1...v2.0.2
|
|
815
835
|
[2.0.1]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/2.0.1
|
|
836
|
+
|
|
837
|
+
[2.0.9]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/2.0.9
|