@vtex/faststore-plugin-buyer-portal 2.0.42 → 2.0.44

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.42",
3
+ "version": "2.0.44",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -53,7 +53,6 @@ export type AddressFormValues = Pick<
53
53
  export type ClearableAddressField = "state" | "streetNumber" | "neighborhood";
54
54
 
55
55
  const NEIGHBORHOOD_LABEL = "addresses.forms.neighborhood";
56
- const COLONIA_LABEL = "addresses.forms.colonia";
57
56
 
58
57
  const FALLBACK_RULE: CountryRule = {
59
58
  zip: { required: true, pattern: null, renderFirst: false },
@@ -148,7 +147,7 @@ const COUNTRY_RULES: Record<SupportedCountryCode, CountryRule> = {
148
147
  neighborhood: {
149
148
  visible: true,
150
149
  required: true,
151
- labelKey: COLONIA_LABEL,
150
+ labelKey: NEIGHBORHOOD_LABEL,
152
151
  },
153
152
  state: { visible: true, required: true },
154
153
  streetAddress: { separated: true },
@@ -376,12 +375,7 @@ export function collectAddressIssues(
376
375
  rule.neighborhood.required &&
377
376
  isBlank(values.neighborhood)
378
377
  ) {
379
- pushRequired(
380
- "neighborhood",
381
- rule.neighborhood.labelKey === COLONIA_LABEL
382
- ? "addresses.validation.coloniaRequired"
383
- : "addresses.validation.neighborhoodRequired"
384
- );
378
+ pushRequired("neighborhood", "addresses.validation.neighborhoodRequired");
385
379
  }
386
380
 
387
381
  return issues;
@@ -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.42";
36
+ export const CURRENT_VERSION = "2.0.44";
@@ -17,6 +17,8 @@ const MASK_MAP: Record<CountryCodes, MaskType> = {
17
17
  MEX: { mask: "(999) 999-9999", length: 14, ddi: "52" },
18
18
  BRA: { mask: "(99) 99999-9999", length: 15, ddi: "55" },
19
19
  CAN: { mask: "(999) 999-9999", length: 14, ddi: "1" },
20
+ FRA: { mask: "9 99 99 99 99", length: 13, ddi: "33" },
21
+ COL: { mask: "(999) 999-9999", length: 14, ddi: "57" },
20
22
  };
21
23
 
22
24
  export function maskPhoneNumber(phoneNumber: string, country?: CountryCodes) {