@vtex/faststore-plugin-buyer-portal 1.3.15 → 1.3.16-experimental.20251103194517

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.
@@ -0,0 +1,69 @@
1
+ # This Action runs on experimental branch and publishes an experimental version to npm
2
+ name: CD Beta
3
+
4
+ on:
5
+ push:
6
+ branches:
7
+ - beta
8
+
9
+ jobs:
10
+ build:
11
+ name: BuyerPortal Beta
12
+ timeout-minutes: 15
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Check out code
17
+ uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 2
20
+
21
+ - name: Setup Node.js environment
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: 20
25
+ cache: "yarn"
26
+ registry-url: "https://registry.npmjs.org"
27
+
28
+ - name: Configure CI Git User
29
+ run: |
30
+ git config user.name vtexgithubbot
31
+ git config user.email vtexgithubbot@github.com
32
+
33
+ - name: Install dependencies
34
+ run: yarn
35
+
36
+ - name: Get current version
37
+ id: get_version
38
+ run: |
39
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
40
+ echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
41
+
42
+ - name: Generate experimental version
43
+ id: generate_version
44
+ run: |
45
+ # Extract base version (remove any existing prerelease suffix)
46
+ BASE_VERSION=$(echo "${{ steps.get_version.outputs.current_version }}" | sed -E 's/(-.*)?$//')
47
+ # Generate timestamp-based identifier
48
+ TIMESTAMP=$(date +%Y%m%d%H%M%S)
49
+ # Create experimental version
50
+ EXPERIMENTAL_VERSION="${BASE_VERSION}-experimental.${TIMESTAMP}"
51
+ echo "experimental_version=$EXPERIMENTAL_VERSION" >> $GITHUB_OUTPUT
52
+ echo "Publishing experimental version: $EXPERIMENTAL_VERSION"
53
+
54
+ - name: Update package.json version
55
+ run: |
56
+ npm version ${{ steps.generate_version.outputs.experimental_version }} --no-git-tag-version
57
+
58
+ - name: Publish experimental version
59
+ run: yarn publish --non-interactive --tag experimental
60
+ env:
61
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62
+
63
+ - name: Push changes and tags
64
+ run: |
65
+ git config user.email "vtexgithubbot@github.com"
66
+ git config user.name "vtexgithubbot"
67
+ git add package.json
68
+ git commit -m "chore: publish experimental version ${{ steps.generate_version.outputs.experimental_version }}" || echo "No changes to commit"
69
+ git push origin experimental || echo "No changes to push"
package/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+
12
+ - Create BETA publish flow
13
+
14
+ ## [1.3.16] - 2025-11-03
15
+
16
+ ### Added
17
+
18
+ - Add rename and delete options to dropdown
19
+
10
20
  ## [1.3.15] - 2025-11-03
11
21
 
12
22
  ### Added
@@ -189,7 +199,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
189
199
  - Add CHANGELOG file
190
200
  - Add README file
191
201
 
192
- [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.15...HEAD
202
+ [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.16...HEAD
193
203
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
194
204
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
195
205
  [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
@@ -204,6 +214,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
204
214
 
205
215
  # <<<<<<< HEAD
206
216
 
217
+ [1.3.16]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.15...v1.3.16
207
218
  [1.3.15]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.14...v1.3.15
208
219
  [1.3.14]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.13...v1.3.14
209
220
  [1.3.13]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.12...v1.3.13
@@ -0,0 +1,23 @@
1
+ #!/bin/bash
2
+
3
+ BRANCH_NAME="beta"
4
+
5
+ echo "Attempting to checkout branch: $BRANCH_NAME"
6
+
7
+ git fetch --all
8
+
9
+ echo "Delete current $BRANCH_NAME"
10
+ git branch -D "$BRANCH_NAME"
11
+
12
+ echo "Create branch $BRANCH_NAME"
13
+ git checkout -b "$BRANCH_NAME"
14
+
15
+ git add .
16
+
17
+ echo "Update $BRANCH_NAME"
18
+ git commit -m "Update BETA environment"
19
+
20
+ git push --set-upstream origin +$BRANCH_NAME
21
+
22
+ echo "Go back to previous branch on local workspace"
23
+ git checkout -
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.3.15",
3
+ "version": "1.3.16-experimental.20251103194517",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,7 +8,8 @@
8
8
  "lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
9
9
  "prepare": "husky",
10
10
  "release": "yarn release:stable",
11
- "release:stable": "yarn check --integrity && yarn release-it -c .release-it.json --ci --no-npm"
11
+ "release:stable": "yarn check --integrity && yarn release-it -c .release-it.json --ci --no-npm",
12
+ "release:beta": "./beta-release.sh"
12
13
  },
13
14
  "lint-staged": {
14
15
  "*.{js,jsx,ts,tsx}": [
@@ -2,6 +2,11 @@ import { useState } from "react";
2
2
 
3
3
  import { DropdownItem } from "@faststore/ui";
4
4
 
5
+ import {
6
+ CreateOrgUnitDrawer,
7
+ DeleteOrgUnitDrawer,
8
+ UpdateOrgUnitDrawer,
9
+ } from "..";
5
10
  import { CreateAddressDrawer } from "../../../addresses/components";
6
11
  import { CreateBudgetDrawer } from "../../../budgets/components/CreateBudgetDrawer/CreateBudgetDrawer";
7
12
  import { AddBuyingPolicyDrawer } from "../../../buying-policies/components";
@@ -14,7 +19,6 @@ import { useGetRolesOptions } from "../../../roles/hooks";
14
19
  import { BasicDropdownMenu, Icon } from "../../../shared/components";
15
20
  import { useDrawerProps } from "../../../shared/hooks";
16
21
  import { CreateUserDrawer } from "../../../users/components";
17
- import { CreateOrgUnitDrawer } from "../CreateOrgUnitDrawer/CreateOrgUnitDrawer";
18
22
 
19
23
  export type AddAllToOrgUnitDropdownProps = {
20
24
  isSingleContract: boolean;
@@ -60,6 +64,12 @@ export const AddAllToOrgUnitDropdown = ({
60
64
  setCustomField(customField);
61
65
  }
62
66
 
67
+ const {
68
+ open: openUpdateDrawer,
69
+ isOpen: isOpenUpdateDrawer,
70
+ ...updateDrawerProps
71
+ } = useDrawerProps();
72
+
63
73
  const {
64
74
  open: openAddressDrawer,
65
75
  isOpen: isOpenAddressDrawer,
@@ -84,6 +94,12 @@ export const AddAllToOrgUnitDropdown = ({
84
94
  ...buyingPolicyDrawerProps
85
95
  } = useDrawerProps();
86
96
 
97
+ const {
98
+ open: openDeleteDrawer,
99
+ isOpen: isOpenDeleteDrawer,
100
+ ...deleteDrawerProps
101
+ } = useDrawerProps();
102
+
87
103
  return (
88
104
  <>
89
105
  <BasicDropdownMenu align={align}>
@@ -95,6 +111,12 @@ export const AddAllToOrgUnitDropdown = ({
95
111
  Add contract
96
112
  </DropdownItem> */}
97
113
 
114
+ <DropdownItem onClick={openUpdateDrawer}>
115
+ <Icon name="FormatSize" {...sizeProps} />
116
+ Rename
117
+ </DropdownItem>
118
+ <BasicDropdownMenu.Separator />
119
+
98
120
  {isSingleContract && (
99
121
  <>
100
122
  <DropdownItem onClick={openAddressDrawer}>
@@ -149,6 +171,16 @@ export const AddAllToOrgUnitDropdown = ({
149
171
  <Icon name="Rebase" {...sizeProps} />
150
172
  Add buying policy
151
173
  </DropdownItem>
174
+
175
+ <BasicDropdownMenu.Separator />
176
+
177
+ <DropdownItem
178
+ onClick={openDeleteDrawer}
179
+ data-fs-bp-dropdown-menu-item-mode="danger"
180
+ >
181
+ <Icon name="Delete" {...sizeProps} />
182
+ Delete
183
+ </DropdownItem>
152
184
  </BasicDropdownMenu>
153
185
 
154
186
  {isOpenCreditCardDrawer && (
@@ -215,6 +247,23 @@ export const AddAllToOrgUnitDropdown = ({
215
247
  contractId={contractId}
216
248
  />
217
249
  )}
250
+ {isOpenUpdateDrawer && (
251
+ <UpdateOrgUnitDrawer
252
+ readonly
253
+ id={unitId}
254
+ name={unitName}
255
+ {...updateDrawerProps}
256
+ isOpen={isOpenUpdateDrawer}
257
+ />
258
+ )}
259
+ {isOpenDeleteDrawer && (
260
+ <DeleteOrgUnitDrawer
261
+ id={unitId}
262
+ name={unitName}
263
+ {...deleteDrawerProps}
264
+ isOpen={isOpenDeleteDrawer}
265
+ />
266
+ )}
218
267
  </>
219
268
  );
220
269
  };
@@ -25,7 +25,6 @@ import {
25
25
  AddAllToOrgUnitDropdown,
26
26
  OrgUnitBreadcrumb,
27
27
  OrgUnitDetailsNavbar,
28
- OrgUnitsDropdownMenu,
29
28
  } from "../../components";
30
29
  import { useOrgUnitByUser } from "../../hooks";
31
30
 
@@ -104,14 +103,6 @@ export const OrgUnitsDetailsLayout = ({
104
103
  />
105
104
  )}
106
105
 
107
- <Dropdown>
108
- <BasicDropdownMenu.Trigger />
109
- <OrgUnitsDropdownMenu
110
- isComplete={false}
111
- id={orgUnit.id}
112
- name={orgUnit.name}
113
- />
114
- </Dropdown>
115
106
  <Dropdown>
116
107
  <DropdownButton asChild>
117
108
  <HeaderInside.Button />
@@ -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.15";
16
+ export const CURRENT_VERSION = "1.3.16";