@vtex/faststore-plugin-buyer-portal 1.3.11 → 1.3.12

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/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.12] - 2025-10-30
11
+
12
+ ### Added
13
+
14
+ - Updates JSONata expressions to match Budget data.
15
+
10
16
  ## [1.3.11] - 2025-10-23
11
17
 
12
18
  ### Added
@@ -165,7 +171,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
165
171
  - Add CHANGELOG file
166
172
  - Add README file
167
173
 
168
- [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/1.3.11...HEAD
174
+ [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.12...HEAD
169
175
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
170
176
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
171
177
  [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
@@ -177,5 +183,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
177
183
  [1.3.9]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.8...v1.3.9
178
184
  [1.3.8]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.7...v1.3.8
179
185
  [1.3.7]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.7
180
-
186
+ [1.3.12]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.11...v1.3.12
181
187
  [1.3.11]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -175,7 +175,7 @@ export const BasicBuyingPolicyDrawer = ({
175
175
 
176
176
  const isBudgetCriteria =
177
177
  criteria === BUDGET_CRITERIA ||
178
- criteria.includes('$exists(budgetData.unitAllocations.*[budgetId="');
178
+ criteria.includes('$exists(budgetData.budgets[id="');
179
179
 
180
180
  const renderCriteria = (criteria: string) => {
181
181
  if (isBudgetCriteria) {
@@ -18,7 +18,7 @@ export const BudgetCriteriaSelector = ({
18
18
  budgetData = { data: [], total: 0 },
19
19
  }: BudgetCriteriaSelectorProps) => {
20
20
  const extractBudgetValueFromCriteria = (criteria: string): string => {
21
- const match = criteria.match(/budgetId="([^"]+)"/);
21
+ const match = criteria.match(/id="([^"]+)"/);
22
22
  return match ? match[1] : "budget-001";
23
23
  };
24
24
 
@@ -39,7 +39,7 @@ export const BudgetCriteriaSelector = ({
39
39
  };
40
40
 
41
41
  const generateCriteriaString = (value: string) => {
42
- return `$exists(budgetData.unitAllocations.*[budgetId="${value}"])`;
42
+ return `$exists(budgetData.budgets[id="${value}"])`;
43
43
  };
44
44
 
45
45
  const handleBudgetSelect = (budgetId: string) => {
@@ -74,7 +74,7 @@ export const BudgetCriteriaSelector = ({
74
74
  >
75
75
  <div data-fs-bp-budget-criteria-string>
76
76
  <span onClick={handleEditablePartClick} data-fs-bp-editable-part>
77
- $exists(budgetData.unitAllocations.*[budgetId="
77
+ $exists(budgetData.budgets[id="
78
78
  </span>
79
79
  {hasBudgetData ? (
80
80
  <div onClick={handleBudgetSelectorClick}>
@@ -1,10 +1,9 @@
1
- export const BUDGET_CRITERIA =
2
- '$exists(budgetData.unitAllocations.*[budgetId="${budget-id}"])';
1
+ export const BUDGET_CRITERIA = '$exists(budgetData.budgets[id="${budget-id}"])';
3
2
 
4
3
  export const orderFieldsCriteriaOptions = [
5
4
  {
6
5
  label: "If the order contains a budget",
7
- criteria: "$exists(budgetData.unitAllocations.*[])",
6
+ criteria: "$exists(budgetData.budgets.*[])",
8
7
  },
9
8
  {
10
9
  label: "If the order contains the budgets X, Y, Z",
@@ -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.11";
16
+ export const CURRENT_VERSION = "1.3.12";