@vtex/faststore-plugin-buyer-portal 2.0.29 → 2.0.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "2.0.29",
3
+ "version": "2.0.30",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -16,6 +16,8 @@
16
16
  "test": "vitest run",
17
17
  "test:watch": "vitest",
18
18
  "test:coverage": "vitest run --coverage",
19
+ "i18n:check": "node scripts/check-localization-keys.mjs check --base=main",
20
+ "i18n:refresh": "node scripts/check-localization-keys.mjs refresh",
19
21
  "prepare": "husky",
20
22
  "release": "yarn release:stable",
21
23
  "release:stable": "yarn check --integrity && yarn release-it -c .release-it.json --ci --no-npm",
@@ -192,7 +192,7 @@ ${t("shared.messages.changesTimeout")}`,
192
192
  <BasicDropdownMenu data-fs-bp-dropdown-menu>
193
193
  <DropdownItem onClick={handleOpenNewTab}>
194
194
  <Icon name="OpenNewTab" {...sizeProps} />
195
- Open
195
+ {t("shared.buttons.open")}
196
196
  </DropdownItem>
197
197
  {!isAddressEditingRestricted && (
198
198
  <>
@@ -67,7 +67,7 @@ export default function AddressesCard({
67
67
  <DropdownMenu>
68
68
  <DropdownItem data-fs-card-dropdown-item>
69
69
  <Icon name="ArrowSquareOut" data-fs-dropdown-icon />
70
- Open
70
+ {t("shared.buttons.open")}
71
71
  </DropdownItem>
72
72
  <DropdownItem>
73
73
  <Icon
@@ -4,6 +4,7 @@ import { useUI } from "@faststore/ui";
4
4
 
5
5
  import { useListAccountingFields } from "../../../accounting-fields/hooks";
6
6
  import { CustomDropdown } from "../../../shared/components/CustomDropdown/CustomDropdown";
7
+ import { LocalizationEslintIgnore } from "../../../shared/components/LocalizationEslintIgnore/LocalizationEslintIgnore";
7
8
  import { useBuyerPortal } from "../../../shared/hooks";
8
9
  import { useLocalization } from "../../../shared/localization/LocalizationContext";
9
10
  import {
@@ -91,7 +92,9 @@ export const AccountingFieldCriteriaSelector = ({
91
92
  <div data-fs-bp-accounting-field-criteria-selector>
92
93
  <div data-fs-bp-accounting-fields-criteria-string>
93
94
  <span onClick={handleEditablePartClick} data-fs-bp-editable-part>
94
- $exists(customData.customFields.fields[customFieldId="
95
+ <LocalizationEslintIgnore>
96
+ $exists(customData.customFields.fields[customFieldId="
97
+ </LocalizationEslintIgnore>
95
98
  </span>
96
99
 
97
100
  <div onClick={handleFieldClick} style={{ display: "inline-block" }}>
@@ -115,7 +118,7 @@ export const AccountingFieldCriteriaSelector = ({
115
118
  </div>
116
119
 
117
120
  <span onClick={handleEditablePartClick} data-fs-bp-editable-part>
118
- "].value)
121
+ <LocalizationEslintIgnore>"].value)</LocalizationEslintIgnore>
119
122
  </span>
120
123
  </div>
121
124
  </div>
@@ -8,6 +8,7 @@ import {
8
8
  useListAccountingValues,
9
9
  } from "../../../accounting-fields/hooks";
10
10
  import { CustomDropdown } from "../../../shared/components/CustomDropdown/CustomDropdown";
11
+ import { LocalizationEslintIgnore } from "../../../shared/components/LocalizationEslintIgnore/LocalizationEslintIgnore";
11
12
  import { useBuyerPortal, useDebounce } from "../../../shared/hooks";
12
13
  import { useLocalization } from "../../../shared/localization/LocalizationContext";
13
14
  import {
@@ -216,7 +217,9 @@ export const AccountingValueCriteriaSelector = ({
216
217
  <div data-fs-bp-accounting-field-criteria-selector>
217
218
  <div data-fs-bp-accounting-fields-criteria-string>
218
219
  <span onClick={handleEditablePartClick} data-fs-bp-editable-part>
219
- customData.customFields.fields[customFieldId="
220
+ <LocalizationEslintIgnore>
221
+ customData.customFields.fields[customFieldId="
222
+ </LocalizationEslintIgnore>
220
223
  </span>
221
224
 
222
225
  <div onClick={handleFieldClick} style={{ display: "inline-block" }}>
@@ -244,7 +247,9 @@ export const AccountingValueCriteriaSelector = ({
244
247
  </div>
245
248
 
246
249
  <span onClick={handleEditablePartClick} data-fs-bp-editable-part>
247
- "].customFieldValueId="
250
+ <LocalizationEslintIgnore>
251
+ "].customFieldValueId="
252
+ </LocalizationEslintIgnore>
248
253
  </span>
249
254
 
250
255
  <div onClick={handleValueClick} style={{ display: "inline-block" }}>
@@ -275,7 +280,7 @@ export const AccountingValueCriteriaSelector = ({
275
280
  </div>
276
281
 
277
282
  <span onClick={handleEditablePartClick} data-fs-bp-editable-part>
278
- "
283
+ <LocalizationEslintIgnore>"</LocalizationEslintIgnore>
279
284
  </span>
280
285
  </div>
281
286
  </div>
@@ -1,6 +1,7 @@
1
1
  import { useState, useEffect } from "react";
2
2
 
3
3
  import { CustomDropdown } from "../../../shared/components/CustomDropdown/CustomDropdown";
4
+ import { LocalizationEslintIgnore } from "../../../shared/components/LocalizationEslintIgnore/LocalizationEslintIgnore";
4
5
  import { useBuyerPortal } from "../../../shared/hooks";
5
6
  import { useLocalization } from "../../../shared/localization/LocalizationContext";
6
7
  import { useGetBudgets } from "../../hooks/useGetBudgets";
@@ -90,7 +91,9 @@ export const BudgetCriteriaSelector = ({
90
91
  <div data-fs-bp-budget-criteria-selector>
91
92
  <div data-fs-bp-budget-criteria-string>
92
93
  <span onClick={handleEditablePartClick} data-fs-bp-editable-part>
93
- $exists(budgetData.budgets[id="
94
+ <LocalizationEslintIgnore>
95
+ $exists(budgetData.budgets[id="
96
+ </LocalizationEslintIgnore>
94
97
  </span>
95
98
 
96
99
  <div onClick={handleBudgetValueClick}>
@@ -115,7 +118,7 @@ export const BudgetCriteriaSelector = ({
115
118
  </div>
116
119
 
117
120
  <span onClick={handleEditablePartClick} data-fs-bp-editable-part>
118
- "])
121
+ <LocalizationEslintIgnore>"])</LocalizationEslintIgnore>
119
122
  </span>
120
123
  </div>
121
124
  </div>
@@ -37,6 +37,7 @@ export const UnableToRemoveContractsDrawer = ({
37
37
  </p>
38
38
  <p>
39
39
  {t("contracts.removeDrawer.unableDeselectHint", [
40
+ // eslint-disable-next-line no-restricted-syntax -- legacy hardcoded string, pending migration (see specs/custom-localization-system.md#out-of-scope)
40
41
  <strong key="organizationalUnit">organizational unit</strong>,
41
42
  ])}
42
43
  </p>
@@ -0,0 +1,12 @@
1
+ export type LocalizationEslintIgnoreProps = {
2
+ children: React.ReactNode;
3
+ };
4
+
5
+ /**
6
+ * Wraps non-translatable literals (e.g. technical/DSL syntax) so the
7
+ * localization guardrail ignores them. `eslint.config.mjs` exempts this
8
+ * component by name. See docs/conventions.md#localization.
9
+ */
10
+ export const LocalizationEslintIgnore = ({
11
+ children,
12
+ }: LocalizationEslintIgnoreProps) => <>{children}</>;
@@ -74,6 +74,10 @@ export {
74
74
  LevelDivider,
75
75
  type LevelDividerProps,
76
76
  } from "./LevelDivider/LevelDivider";
77
+ export {
78
+ LocalizationEslintIgnore,
79
+ type LocalizationEslintIgnoreProps,
80
+ } from "./LocalizationEslintIgnore/LocalizationEslintIgnore";
77
81
  export { Logo } from "./Logo/Logo";
78
82
  export { MainLinksDropdownMenu } from "./MainLinksDropdownMenu/MainLinksDropdownMenu";
79
83
  export { Pagination } from "./Pagination/Pagination";
@@ -48,7 +48,7 @@ export const SumaSidebar = ({
48
48
  aria-label="Back to contracts"
49
49
  >
50
50
  <Icon name="ChevronRight" width={16} height={16} />
51
- Contracts
51
+ {t("layouts.navigation.contracts")}
52
52
  </Link>
53
53
  )}
54
54
 
@@ -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.29";
36
+ export const CURRENT_VERSION = "2.0.30";